* resolve.cc (Symbol_table::resolve): Remember whether undef was
authorCary Coutant <ccoutant@google.com>
Fri, 9 Jul 2010 01:34:31 +0000 (01:34 +0000)
committerCary Coutant <ccoutant@google.com>
Fri, 9 Jul 2010 01:34:31 +0000 (01:34 +0000)
commitce279a62c420e20c2d33e89641b6d9ed581a90c2
tree10299dc3eb7f6c0fddb969fa11ae0dc079165aa0
parent2ee2fea80422d6e481541aa20a5d4e26ca8f0192
* resolve.cc (Symbol_table::resolve): Remember whether undef was
weak when resolving to a dynamic def.
(Symbol_table::should_override): Add adjust_dyndef flag; set it
for weak undef/dynamic def cases. Adjust callers.
* symtab.cc (Symbol::init_fields): Initialize undef_binding_set_ and
undef_binding_weak_.
(Symbol_table::sized_write_globals): Adjust symbol binding.
(Symbol_table::sized_write_symbol): Add binding parameter.
* symtab.h (Symbol::set_undef_binding): New method.
(Symbol::is_undef_binding_weak): New method.
(Symbol::undef_binding_set_, Symbol::undef_binding_weak_): New members.
(Symbol_table::should_override): Add new parameter.
(Symbol_table::sized_write_symbol): Add new parameter.

* testsuite/weak_undef_file1.cc: Add new test case.
* testsuite/weak_undef_file2.cc: Fix header comment.
* testsuite/weak_undef_test.cc: Add new test case.
gold/ChangeLog
gold/resolve.cc
gold/symtab.cc
gold/symtab.h
gold/testsuite/weak_undef_file1.cc
gold/testsuite/weak_undef_file2.cc
gold/testsuite/weak_undef_test.cc