[GOLD] PowerPC64 __tls_get_addr_opt stub
This stub doesn't have the r2 store at the beginning. * powerpc.cc (Target_powerpc::Relocate::relocate): Don't skip first insn of __tls_get_addr_opt stub.
This commit is contained in:
parent
294338867c
commit
a993d270f8
@ -1,3 +1,8 @@
|
||||
2020-09-24 Alan Modra <amodra@gmail.com>
|
||||
|
||||
* powerpc.cc (Target_powerpc::Relocate::relocate): Don't skip
|
||||
first insn of __tls_get_addr_opt stub.
|
||||
|
||||
2020-08-24 Alan Modra <amodra@gmail.com>
|
||||
|
||||
* powerpc.cc (Target_powerpc): Add tprel_opt_ and accessors.
|
||||
|
@ -10401,22 +10401,25 @@ Target_powerpc<size, big_endian>::Relocate::relocate(
|
||||
value += ent->tocoff_;
|
||||
if (size == 64
|
||||
&& ent->r2save_
|
||||
&& r_type == elfcpp::R_PPC64_REL24_NOTOC)
|
||||
&& !(gsym != NULL
|
||||
&& target->is_tls_get_addr_opt(gsym)))
|
||||
{
|
||||
if (r_type == elfcpp::R_PPC64_REL24_NOTOC)
|
||||
{
|
||||
if (!(target->power10_stubs()
|
||||
&& target->power10_stubs_auto()))
|
||||
value += 4;
|
||||
}
|
||||
else if (size == 64
|
||||
&& ent->r2save_
|
||||
&& relnum < reloc_count - 1)
|
||||
else if (relnum < reloc_count - 1)
|
||||
{
|
||||
Reltype next_rela(preloc + reloc_size);
|
||||
if (elfcpp::elf_r_type<size>(next_rela.get_r_info())
|
||||
== elfcpp::R_PPC64_TOCSAVE
|
||||
&& next_rela.get_r_offset() == rela.get_r_offset() + 4)
|
||||
&& (next_rela.get_r_offset()
|
||||
== rela.get_r_offset() + 4))
|
||||
value += 4;
|
||||
}
|
||||
}
|
||||
localentry0 = ent->localentry0_;
|
||||
has_stub_value = true;
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user