diff options
author | Alan Modra <amodra@gmail.com> | 2021-03-30 12:25:03 +1030 |
---|---|---|
committer | Alan Modra <amodra@gmail.com> | 2021-03-30 13:38:41 +1030 |
commit | 0af4fcc25dd5e2f98698da03396084258ebfb756 (patch) | |
tree | a385cfc8b484a255c8b8cb2ddebaee42aedfe777 /gold/ChangeLog | |
parent | 1b82252e8c2964ca79de7f352a3972549183155b (diff) | |
download | gdb-0af4fcc25dd5e2f98698da03396084258ebfb756.zip gdb-0af4fcc25dd5e2f98698da03396084258ebfb756.tar.gz gdb-0af4fcc25dd5e2f98698da03396084258ebfb756.tar.bz2 |
PR27625, powerpc64 gold __tls_get_addr calls
This patch supports linking powerpc64 glibc with gold, specifically
the __tls_get_addr call in elf/dl-sym.c. That call lacks marker
relocations tying it to the arg setup instructions, but the arg setup
insns are also contructed lacking the usual relocations on a Global
Dynamic TLS code sequence. So there is no chance that anything in
that sequence might be wrongly edited by the linker.
In fact, the aim of linking glibc could have been supported by simply
omitting the error whenever TLS optimisation is disabled, as it is
when linking a shared library. The patch goes further than that,
disabling TLS GD and LD sequence optimisation on a per-object basis
for object files lacking marker relocs.
PR gold/27625
* powerpc.cc (Powerpc_relobj): Add no_tls_marker_, tls_marker_,
and tls_opt_error_ variables and accessors.
(Target_powerpc::Scan::local, global): Call set_tls_marker and
set_no_tls_marker for GD and LD code sequence relocations.
(Target_powerpc::Relocate::relocate): Downgrade the "lacks marker
reloc" error to a warning when safe to do so, and omit the error
entirely if not optimising TLS sequences. Do not optimise GD and
LD sequences for objects lacking marker relocs.
(Target_powerpc::relocate_relocs): Heed no_tls_marker here too.
Diffstat (limited to 'gold/ChangeLog')
-rw-r--r-- | gold/ChangeLog | 13 |
1 files changed, 13 insertions, 0 deletions
diff --git a/gold/ChangeLog b/gold/ChangeLog index e6c0d92..82dae33 100644 --- a/gold/ChangeLog +++ b/gold/ChangeLog @@ -1,3 +1,16 @@ +2021-03-30 Alan Modra <amodra@gmail.com> + + PR gold/27625 + * powerpc.cc (Powerpc_relobj): Add no_tls_marker_, tls_marker_, + and tls_opt_error_ variables and accessors. + (Target_powerpc::Scan::local, global): Call set_tls_marker and + set_no_tls_marker for GD and LD code sequence relocations. + (Target_powerpc::Relocate::relocate): Downgrade the "lacks marker + reloc" error to a warning when safe to do so, and omit the error + entirely if not optimising TLS sequences. Do not optimise GD and + LD sequences for objects lacking marker relocs. + (Target_powerpc::relocate_relocs): Heed no_tls_marker here too. + 2021-03-19 Cary Coutant <ccoutant@gmail.com> PR gold/27615 |