diff options
author | Cary Coutant <ccoutant@gmail.com> | 2015-06-07 14:03:09 -0700 |
---|---|---|
committer | Cary Coutant <ccoutant@gmail.com> | 2015-06-07 14:03:52 -0700 |
commit | b8cf50755b573140aae71f7247b604373fcdfbeb (patch) | |
tree | 9703225459949bc9fde830bbf7bba2cca5dcd38d /Makefile.def | |
parent | 66f38e2951a1f7110ca3f1adf362322ec4208428 (diff) | |
download | gdb-b8cf50755b573140aae71f7247b604373fcdfbeb.zip gdb-b8cf50755b573140aae71f7247b604373fcdfbeb.tar.gz gdb-b8cf50755b573140aae71f7247b604373fcdfbeb.tar.bz2 |
Fix incorrect handling of STT_COMMON symbols in shared libraries.
The gABI allows STT_COMMON symbols to appear in executables and shared
objects, so that the dynamic loader can resolve commons across modules.
When reading a shared object, however, an STT_COMMON symbol should be
treated as a regular definition at link time.
In a relocatable object, the gABI requires that any STT_COMMON symbols
must also be defined in the special SHN_COMMON section (which we extend
to include target-specific small and large common sections). Thus,
there is no need for gold to treat STT_COMMON symbols as common unless
the st_shndx field is also set to a common section.
gold/
PR gold/18288
* resolve.cc (symbol_to_bits): Remove type parameter; adjust all
callers. Don't use STT_COMMON to check for common symbols.
(Symbol_table::resolve): Warn if relocatable object has STT_COMMON
symbol that's not in a common section.
* symtab.h (Symbol::is_common): Don't use STT_COMMON to check for
common symbols.
Diffstat (limited to 'Makefile.def')
0 files changed, 0 insertions, 0 deletions