gold patch committed: Fix debug info for commons in shared libraries
Ian Lance Taylor
iant@google.com
Wed Mar 4 06:53:00 GMT 2009
PR 9918 is about a bug in gold in which it does not generate correct
debugging information for common symbols in shared libraries. The bug
only occurred for the x86 target (not x86_64). gold does not scan
relocs for sections with the SHF_ALLOC flag clear. When i386 gold is
processing relocs, it skips applying relocs which will get a dynamic
reloc. However, the calculation for whether a reloc would get a dynamic
reloc was flawed, because it did not consider the sections with
SHF_ALLOC clear which had been skipped.
I committed this patch to fix the problem, along with a test case.
Ian
2009-03-03 Ian Lance Taylor <iant@google.com>
PR 9918
* target-reloc.h (relocate_section): Pass output_section to
relocate.
* i386.cc (Target_i386::should_apply_static_reloc): Add
output_section parameter. Change all callers.
(Target_i386::Relocate::relocate): Add output_section parameter.
* x86_64.cc (Target_x86_64::Relocate::relocate): Likewise.
* sparc.cc (Target_sparc::Relocate::relocate): Likewise.
* powerpc.cc (Target_powerpc::Relocate::relocate): Likewise.
* testsuite/two_file_shared.sh: New script.
* testsuite/Makefile.am (check_SCRIPTS): Add two_file_shared.sh.
(check_DATA): Add two_file_shared.dbg.
(two_file_shared.dbg): New target.
* testsuite/Makefile.in: Rebuild.
-------------- next part --------------
A non-text attachment was scrubbed...
Name: foo.patch
Type: text/x-patch
Size: 11800 bytes
Desc: Fix debug info for commons in shared libraries
URL: <https://sourceware.org/pipermail/binutils/attachments/20090304/33916ad1/attachment.bin>
More information about the Binutils
mailing list