Spurious R_386_NONE relocations
Alan Modra
amodra@bigpond.net.au
Wed Aug 25 23:05:00 GMT 2004
On Wed, Aug 25, 2004 at 11:02:09AM -0400, Jeff Baker wrote:
> This patch causes the appropriate data to be nulled,
Good, probably. I say probably, because zero might not be correct for
R_386_PC32. I'm applying the following:
* elf32-i386.c (elf_i386_relocate_section): Tweak last change so
that pcrel correction is applied for R_386_PC32.
Index: bfd/elf32-i386.c
===================================================================
RCS file: /cvs/src/src/bfd/elf32-i386.c,v
retrieving revision 1.126
diff -u -p -r1.126 elf32-i386.c
--- bfd/elf32-i386.c 25 Aug 2004 14:35:58 -0000 1.126
+++ bfd/elf32-i386.c 25 Aug 2004 23:00:19 -0000
@@ -2328,7 +2328,7 @@ elf_i386_relocate_section (bfd *output_b
This is a hint to unwinders and other consumers of
exception handling info that the FDE is invalid. */
bfd_put_32 (input_bfd, 0, contents + rel->r_offset);
- continue;
+ break;
}
if ((input_section->flags & SEC_ALLOC) == 0)
> but many NONE
> relocations are still produced.
I'm not particularly concerned about this, and certainly not motivated
personally to write another version of elf-eh-frame.c just to edit
.eh_frame produced by an old gcc.
> Using a loader set to ignore NONE
> relocations causes the program to SEGV calling the global constructor
> for the class contained in the shared object.
If the above change doesn't fix it, I'm afraid you're going to have to
figure out why yourself..
--
Alan Modra
IBM OzLabs - Linux Technology Centre
More information about the Binutils
mailing list