mirror of
https://sourceware.org/git/binutils-gdb.git
synced 2024-12-03 04:12:10 +08:00
2008-07-23 Simon Baldwin <simonb@google.com>
* symtab.cc (Symbol_table::sized_write_symbol): Only set st_size to zero for undefined symbols from dynamic libraries.
This commit is contained in:
parent
95d14cd31e
commit
58e54ac21d
@ -1,3 +1,8 @@
|
||||
2008-07-23 Simon Baldwin <simonb@google.com>
|
||||
|
||||
* symtab.cc (Symbol_table::sized_write_symbol): Only set st_size
|
||||
to zero for undefined symbols from dynamic libraries.
|
||||
|
||||
2008-07-23 Ian Lance Taylor <iant@google.com>
|
||||
|
||||
* symtab.cc (Symbol_table::resolve): Remove version parameter.
|
||||
|
@ -2354,8 +2354,11 @@ Symbol_table::sized_write_symbol(
|
||||
elfcpp::Sym_write<size, big_endian> osym(p);
|
||||
osym.put_st_name(pool->get_offset(sym->name()));
|
||||
osym.put_st_value(value);
|
||||
// Use a symbol size of zero for undefined symbols.
|
||||
osym.put_st_size(shndx == elfcpp::SHN_UNDEF ? 0 : sym->symsize());
|
||||
// Use a symbol size of zero for undefined symbols from shared libraries.
|
||||
if (shndx == elfcpp::SHN_UNDEF && sym->is_from_dynobj())
|
||||
osym.put_st_size(0);
|
||||
else
|
||||
osym.put_st_size(sym->symsize());
|
||||
// A version script may have overridden the default binding.
|
||||
if (sym->is_forced_local())
|
||||
osym.put_st_info(elfcpp::elf_st_info(elfcpp::STB_LOCAL, sym->type()));
|
||||
|
Loading…
Reference in New Issue
Block a user