소스 검색

binutils: backport ld patch to fix ARM specific issues with --gc-sections

SVN-Revision: 33461
Felix Fietkau 13 년 전
부모
커밋
e566454513
1개의 변경된 파일12개의 추가작업 그리고 0개의 파일을 삭제
  1. 12 0
      toolchain/binutils/patches/2.22/400-fix_arm_gc_sections.patch

+ 12 - 0
toolchain/binutils/patches/2.22/400-fix_arm_gc_sections.patch

@@ -0,0 +1,12 @@
+--- a/bfd/elf32-arm.c
++++ b/bfd/elf32-arm.c
+@@ -12408,7 +12408,8 @@ elf32_arm_check_relocs (bfd *abfd, struc
+ 
+ 	  /* If the symbol is a function that doesn't bind locally,
+ 	     this relocation will need a PLT entry.  */
+-	  root_plt->refcount += 1;
++	  if (root_plt->refcount != -1)
++	    root_plt->refcount += 1;
+ 
+ 	  if (!call_reloc_p)
+ 	    arm_plt->noncall_refcount++;