aboutsummaryrefslogtreecommitdiff
path: root/gold/s390.cc
diff options
context:
space:
mode:
authorAlan Modra <amodra@gmail.com>2021-10-09 10:03:21 +1030
committerAlan Modra <amodra@gmail.com>2021-10-14 13:08:46 +1030
commitf19c3684a6db145f57048bff5485fec6e3dd0f76 (patch)
treef9a488503e22d7ecae390a551b5bbadddd0ec52a /gold/s390.cc
parenta19da04b3c3a01699aaf7a59b03f5f008355b23d (diff)
downloadfsf-binutils-gdb-f19c3684a6db145f57048bff5485fec6e3dd0f76.zip
fsf-binutils-gdb-f19c3684a6db145f57048bff5485fec6e3dd0f76.tar.gz
fsf-binutils-gdb-f19c3684a6db145f57048bff5485fec6e3dd0f76.tar.bz2
[GOLD] Two GOT sections for PowerPC64
Split .got into two piece, one with the header and entries for small model got entries, the other with entries for medium/large model got entries. The idea is to better support mixed pcrel/non-pcrel code where non-pcrel small-model .toc entries need to be within 32k of the toc pointer. * target.h (Target::tls_offset_for_local): Add got param. (Target::tls_offset_for_global): Likewise. (Target::do_tls_offset_for_local, do_tls_offset_for_global): Likewise. * output.h (Output_data_got::Got_entry::write): Add got param. * output.cc (Output_data_got::Got_entry::write): Likewise, pass to tls_offset_for_local/global calls. (Output_data_got::do_write): Adjust to suit. * s390.cc (Target_s390::do_tls_offset_for_local): Likewise. (Target_s390::do_tls_offset_for_global): Likewise. * powerpc.cc (enum Got_type): Extend with small types, move from class Target_powerpc. (Target_powerpc::biggot_): New. (Traget_powerpc::do_tls_offset_for_local, do_tls_offset_for_global, got_size, got_section, got_base_offset): Handle biggot_. (Target_powerpc::do_define_standard_symbols): Adjust. (Target_powerpc::make_plt_section, do_finalize_sections): Likewise. (Output_data_got_powerpc::Output_data_got_powerpc): Only make 64-bit header for small got section. (Output_data_got_powerpc::g_o_t): Only return a result for small got section. (Output_data_got_powerpc::write): Only write small got section header. (Target_powerpc::Scan::local, global): Select small/big Got_type and section to suit reloc. (Target_powerpc::Relocate::relocate): Similarly. (Sort_toc_sections): Rewrite.
Diffstat (limited to 'gold/s390.cc')
-rw-r--r--gold/s390.cc7
1 files changed, 6 insertions, 1 deletions
diff --git a/gold/s390.cc b/gold/s390.cc
index 3095320..a515f80 100644
--- a/gold/s390.cc
+++ b/gold/s390.cc
@@ -401,13 +401,16 @@ class Target_s390 : public Sized_target<size, true>
int64_t
do_tls_offset_for_local(const Relobj* object,
unsigned int symndx,
+ Output_data_got_base* got,
unsigned int got_indx,
uint64_t addend) const;
// Return the offset to use for the GOT_INDX'th got entry which is
// for global tls symbol GSYM.
int64_t
- do_tls_offset_for_global(Symbol* gsym, unsigned int got_indx,
+ do_tls_offset_for_global(Symbol* gsym,
+ Output_data_got_base* got,
+ unsigned int got_indx,
uint64_t addend) const;
// This function should be defined in targets that can use relocation
@@ -4220,6 +4223,7 @@ int64_t
Target_s390<size>::do_tls_offset_for_local(
const Relobj*,
unsigned int,
+ Output_data_got_base*,
unsigned int,
uint64_t) const
{
@@ -4235,6 +4239,7 @@ template<int size>
int64_t
Target_s390<size>::do_tls_offset_for_global(
Symbol*,
+ Output_data_got_base*,
unsigned int,
uint64_t) const
{