diff options
author | Alan Modra <amodra@gmail.com> | 2019-10-02 10:41:01 +0930 |
---|---|---|
committer | Alan Modra <amodra@gmail.com> | 2019-11-19 07:36:20 +1030 |
commit | aa465b19c80b660b4d4fe6608fb66ebeb469f38b (patch) | |
tree | db8c348a1928f2ad30917daaf2234cb0542b8eb2 /gold/ChangeLog | |
parent | 94698d0198f4018b2ac248b248868cb7a5c0cc43 (diff) | |
download | gdb-aa465b19c80b660b4d4fe6608fb66ebeb469f38b.zip gdb-aa465b19c80b660b4d4fe6608fb66ebeb469f38b.tar.gz gdb-aa465b19c80b660b4d4fe6608fb66ebeb469f38b.tar.bz2 |
[GOLD] OSABI not set when STT_GNU_IFUNC or STB_GNU_UNIQUE symbols output
This patch arranges to have OSABI set to ELFOSABI_GNU (if not set to
some other non-zero value) when gold outputs an ifunc local or global
symbol, or a unique global symbol to either .dynsym or .symtab.
STT_GNU_IFUNC and STB_GNU_UNIQUE have values in the LOOS to HIOS range
and therefore require interpretation according to OSABI.
I'm not sure why parameters->target() is const Target& while
parameters->sized_target() is Sized_target*, but it's inconvenient to
use the latter in Symbol_table::finalize. So this patch adds another
const_cast complained about in layout.cc and gold.cc.
PR 24853
* symtab.h (set_has_gnu_output, has_gnu_output_): New.
* symtab.cc (Symbol_table::Symbol_table): Init has_gnu_output_.
(Symbol_table::finalize): Set ELFOSABI_GNU when has_gnu_output_.
(Symbol_table::set_dynsym_indexes, Symbol_table::sized_finalize):
Call set_has_gnu_output for STT_GNU_IFUNC and STB_GNU_UNIQUE globals.
* object.cc (Sized_relobj_file::do_finalize_local_symbols): Call
set_has_gnu_output when STT_GNU_IFUNC locals will be output.
Diffstat (limited to 'gold/ChangeLog')
-rw-r--r-- | gold/ChangeLog | 11 |
1 files changed, 11 insertions, 0 deletions
diff --git a/gold/ChangeLog b/gold/ChangeLog index cc5da7d..9d71814 100644 --- a/gold/ChangeLog +++ b/gold/ChangeLog @@ -1,3 +1,14 @@ +2019-11-19 Alan Modra <amodra@gmail.com> + + PR 24853 + * symtab.h (set_has_gnu_output, has_gnu_output_): New. + * symtab.cc (Symbol_table::Symbol_table): Init has_gnu_output_. + (Symbol_table::finalize): Set ELFOSABI_GNU when has_gnu_output_. + (Symbol_table::set_dynsym_indexes, Symbol_table::sized_finalize): + Call set_has_gnu_output for STT_GNU_IFUNC and STB_GNU_UNIQUE globals. + * object.cc (Sized_relobj_file::do_finalize_local_symbols): Call + set_has_gnu_output when STT_GNU_IFUNC locals will be output. + 2019-11-11 Miguel Saldivar <saldivarcher@gmail.com> PR 24996 |