PATCH: Fix gold problem with weak undefined symbols
Cary Coutant
ccoutant@google.com
Tue Apr 1 23:43:00 GMT 2008
This patch fixes a problem in gold where it incorrectly generates a
dynamic relocation for a reference to a weak undefined symbol, or for
a reference to an absolute symbol.
OK to commit?
-cary
2008-03-31 Cary Coutant <ccoutant@google.com>
* symtab.h (Symbol::is_weak_undefined): New function.
(Symbol::is_strong_undefined): New function.
(Symbol::is_absolute): New function.
(Symbol::needs_plt_entry): Exclude weak undefined symbols.
(Symbol::needs_dynamic_reloc): Exclude weak undefined and
absolute symbols.
* testsuite/Makefile.am (check_PROGRAMS): Add weak_undef_test.
(weak_undef_test): New target.
* testsuite/Makefile.in: Rebuild.
* testsuite/weak_undef_file1.cc: New file.
* testsuite/weak_undef_file2.cc: New file.
* testsuite/weak_undef_test.cc: New file.
-------------- next part --------------
An embedded and charset-unspecified text was scrubbed...
Name: weak-undef-patch.txt
URL: <https://sourceware.org/pipermail/binutils/attachments/20080401/44662404/attachment.txt>
More information about the Binutils
mailing list