bug-binutils
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Bug ld/13049] Generates R_ARM_NONE relocations for stub_* symbols when


From: amodra at gmail dot com
Subject: [Bug ld/13049] Generates R_ARM_NONE relocations for stub_* symbols when using -fdata-sections
Date: Wed, 26 Oct 2011 11:31:33 +0000

http://sourceware.org/bugzilla/show_bug.cgi?id=13049

--- Comment #13 from Alan Modra <amodra at gmail dot com> 2011-10-26 11:31:33 
UTC ---
Thanks Nick.  Incidentally, it looks to me that the only real problem with
using strstr to check for stub sections is the one in
elf32_arm_final_link_relocate,
introduced in http://sourceware.org/ml/binutils/2010-02/msg00460.html.

In all other cases you are dealing with sections in stub_bfd, all linker
created so random user named sections aren't involved.  I suspect the following
is the proper fix, but I don't play enough with arm to be sure.

Index: bfd/elf32-arm.c
===================================================================
RCS file: /cvs/src/src/bfd/elf32-arm.c,v
retrieving revision 1.280
diff -u -p -r1.280 elf32-arm.c
--- bfd/elf32-arm.c    24 Oct 2011 12:52:37 -0000    1.280
+++ bfd/elf32-arm.c    26 Oct 2011 11:27:31 -0000
@@ -8069,7 +8069,8 @@ elf32_arm_final_link_relocate (reloc_how
               ".tls_vars") == 0)
       && ((r_type != R_ARM_REL32 && r_type != R_ARM_REL32_NOI)
           || !SYMBOL_CALLS_LOCAL (info, h))
-      && (!strstr (input_section->name, STUB_SUFFIX))
+      && !(input_bfd == globals->stub_bfd
+           && strstr (input_section->name, STUB_SUFFIX))
       && (h == NULL
           || ELF_ST_VISIBILITY (h->other) == STV_DEFAULT
           || h->root.type != bfd_link_hash_undefweak)

-- 
Configure bugmail: http://sourceware.org/bugzilla/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are on the CC list for the bug.



reply via email to

[Prev in Thread] Current Thread [Next in Thread]