aboutsummaryrefslogtreecommitdiff
path: root/gold/aarch64.cc
diff options
context:
space:
mode:
authorIgor Kudrin <ikudrin@accesssoftek.com>2016-06-28 15:34:11 -0700
committerCary Coutant <ccoutant@gmail.com>2016-06-28 15:34:11 -0700
commit8032ac03390ca5bc33f8efe29447d0a4bc492950 (patch)
tree3aac6455d03096fbbea29fef7f820af96b0a045d /gold/aarch64.cc
parentf224a3c59068fc8060c261d329f54bdc7374d63a (diff)
downloadgdb-8032ac03390ca5bc33f8efe29447d0a4bc492950.zip
gdb-8032ac03390ca5bc33f8efe29447d0a4bc492950.tar.gz
gdb-8032ac03390ca5bc33f8efe29447d0a4bc492950.tar.bz2
Implement SORT_BY_INIT_PRIORITY.
2016-06-28 Igor Kudrin <ikudrin@accesssoftek.com> gold/ PR gold/18098 * script-c.h (Sort_wildcard): Add SORT_WILDCARD_BY_INIT_PRIORITY. * script-sections.cc (Input_section_sorter::get_init_priority): New method. (Input_section_sorter::operator()): Handle SORT_WILDCARD_BY_INIT_PRIORITY. (Output_section_element_input::print): Likewise. * script.cc (script_keyword_parsecodes): Add entry SORT_BY_INIT_PRIORITY. * yyscript.y (SORT_BY_INIT_PRIORITY): New token. (wildcard_section): Handle SORT_BY_INIT_PRIORITY. * testsuite/Makefile.am (script_test_14): New test. * testsuite/Makefile.in: Regenerate. * testsuite/script_test_14.s: New test source file. * testsuite/script_test_14.sh: New test script. * testsuite/script_test_14.t: New test linker script.
Diffstat (limited to 'gold/aarch64.cc')
-rw-r--r--gold/aarch64.cc10
1 files changed, 8 insertions, 2 deletions
diff --git a/gold/aarch64.cc b/gold/aarch64.cc
index 75e4177..3d03c11 100644
--- a/gold/aarch64.cc
+++ b/gold/aarch64.cc
@@ -5958,8 +5958,6 @@ Target_aarch64<size, big_endian>::Scan::local(
typedef Output_data_reloc<elfcpp::SHT_RELA, true, size, big_endian>
Reloc_section;
- Output_data_got_aarch64<size, big_endian>* got =
- target->got_section(symtab, layout);
unsigned int r_sym = elfcpp::elf_r_sym<size>(rela.get_r_info());
// A local STT_GNU_IFUNC symbol may require a PLT entry.
@@ -6004,6 +6002,8 @@ Target_aarch64<size, big_endian>::Scan::local(
case elfcpp::R_AARCH64_LD64_GOTPAGE_LO15:
// The above relocations are used to access GOT entries.
{
+ Output_data_got_aarch64<size, big_endian>* got =
+ target->got_section(symtab, layout);
bool is_new = false;
// This symbol requires a GOT entry.
if (is_ifunc)
@@ -6056,6 +6056,8 @@ Target_aarch64<size, big_endian>::Scan::local(
// Create a GOT entry for the tp-relative offset.
if (!parameters->doing_static_link())
{
+ Output_data_got_aarch64<size, big_endian>* got =
+ target->got_section(symtab, layout);
got->add_local_with_rel(object, r_sym, GOT_TYPE_TLS_OFFSET,
target->rela_dyn_section(layout),
elfcpp::R_AARCH64_TLS_TPREL64);
@@ -6063,6 +6065,8 @@ Target_aarch64<size, big_endian>::Scan::local(
else if (!object->local_has_got_offset(r_sym,
GOT_TYPE_TLS_OFFSET))
{
+ Output_data_got_aarch64<size, big_endian>* got =
+ target->got_section(symtab, layout);
got->add_local(object, r_sym, GOT_TYPE_TLS_OFFSET);
unsigned int got_offset =
object->local_got_offset(r_sym, GOT_TYPE_TLS_OFFSET);
@@ -6086,6 +6090,8 @@ Target_aarch64<size, big_endian>::Scan::local(
}
gold_assert(tlsopt == tls::TLSOPT_NONE);
+ Output_data_got_aarch64<size, big_endian>* got =
+ target->got_section(symtab, layout);
got->add_local_pair_with_rel(object,r_sym, data_shndx,
GOT_TYPE_TLS_PAIR,
target->rela_dyn_section(layout),