From 8e33481e13facdf33c732e25d18b4b9772cc4e9c Mon Sep 17 00:00:00 2001 From: Han Shen Date: Fri, 29 Aug 2014 17:53:03 -0700 Subject: The 3rd patch for aarch64 gold. This enables - 1. static linking hello world 2. limited support for TLSIE and TLSLE 3. limited support for linking shared library, linking executable against shared library. gold/ChangeLog 2014-08-29 Han Shen Jing Yu * aarch64-reloc-property.cc (AArch64_reloc_property_table::reloc_name_in_error_message): Fix bug in reference reloc property in the table. * aarch64-reloc.def: Add TLSLE reloc types and fix some errors in 3 other entries. * aarch64.cc: (Output_data_got_aarch64::add_static_reloc): 2 new overloaded methods. (Output_data_got_aarch64::do_write): Add code to write out static relocs. (class Output_data_got_aarch64::Static_reloc): New class to wrap static relocs. (Output_data_got_aarch64::static_relocs): New vector to hold static relocs. (Target_aarch64::TCB_SIZE): New const static memeber. (Target_aarch64::tcb_size): New method. (Target_aarch64::Relocate::relocate): Add code handling new reloc types. (Target_aarch64::Relocate::relocate_tls): New method. (Target_aarch64::Scan::local): Add code handling new reloc types. (Target_aarch64::Scan::global): Add code handling new reloc types. --- gold/aarch64-reloc-property.cc | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) (limited to 'gold/aarch64-reloc-property.cc') diff --git a/gold/aarch64-reloc-property.cc b/gold/aarch64-reloc-property.cc index beaed10..16f8449 100644 --- a/gold/aarch64-reloc-property.cc +++ b/gold/aarch64-reloc-property.cc @@ -130,9 +130,8 @@ AArch64_reloc_property_table::AArch64_reloc_property_table() std::string AArch64_reloc_property_table::reloc_name_in_error_message(unsigned int code) { - gold_assert(code < Property_table_size); - - const AArch64_reloc_property* arp = this->table_[code]; + int tidx = code_to_array_index(code); + const AArch64_reloc_property* arp = this->table_[tidx]; if (arp == NULL) { -- cgit v1.1