diff options
author | Doug Kwan <dougkwan@google.com> | 2010-08-13 00:18:19 +0000 |
---|---|---|
committer | Doug Kwan <dougkwan@google.com> | 2010-08-13 00:18:19 +0000 |
commit | 74f67560959c1ba65f6be4571d846b759522fcd5 (patch) | |
tree | 4fe9c88f4c8f983f92e2ce4ea93a411cf6ee15f9 /gold/symtab.cc | |
parent | e06bb621dfe6e7877c3f53c9c8d8ee4bee2c0268 (diff) | |
download | gdb-74f67560959c1ba65f6be4571d846b759522fcd5.zip gdb-74f67560959c1ba65f6be4571d846b759522fcd5.tar.gz gdb-74f67560959c1ba65f6be4571d846b759522fcd5.tar.bz2 |
2010-08-12 Cary Coutant <ccoutant@google.com>
Doug Kwan <dougkwan@google.com>
* resolve.cc (Symbol_table::should_override): When a weak dynamic
defintion overrides non-weak undef, remember that the original undef
is not weak.
* symtab.cc (Symbol_table::sized_write_global): For undef without
an original weak binding, set binding to global in output.
* testsuite/Makefile.am: Add new test strong_ref_weak_def.
* testsuite/Makefile.in: Regenerate.
* testsuite/strong_ref_weak_def.sh: New file.
* testsuite/strong_ref_weak_def_1.c: Ditto.
* testsuite/strong_ref_weak_def_2.c: Ditto.
Diffstat (limited to 'gold/symtab.cc')
-rw-r--r-- | gold/symtab.cc | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/gold/symtab.cc b/gold/symtab.cc index f46d8de..5a59f4c 100644 --- a/gold/symtab.cc +++ b/gold/symtab.cc @@ -2756,6 +2756,8 @@ Symbol_table::sized_write_globals(const Stringpool* sympool, shndx = elfcpp::SHN_UNDEF; if (sym->is_undef_binding_weak()) binding = elfcpp::STB_WEAK; + else + binding = elfcpp::STB_GLOBAL; } else if (symobj->pluginobj() != NULL) shndx = elfcpp::SHN_UNDEF; |