diff options
author | Han Shen <shenhan@chromium.org> | 2014-08-29 17:53:03 -0700 |
---|---|---|
committer | Han Shen <shenhan@chromium.org> | 2014-08-29 17:53:03 -0700 |
commit | 8e33481e13facdf33c732e25d18b4b9772cc4e9c (patch) | |
tree | c06550eb34185412f4c1b98fa785a838f06d6de6 /gold/aarch64-reloc-property.cc | |
parent | 6128f9cf2b2c4188145faba45596ce49dd0f08be (diff) | |
download | gdb-8e33481e13facdf33c732e25d18b4b9772cc4e9c.zip gdb-8e33481e13facdf33c732e25d18b4b9772cc4e9c.tar.gz gdb-8e33481e13facdf33c732e25d18b4b9772cc4e9c.tar.bz2 |
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 <shenhan@google.com>
Jing Yu <jingyu@google.com>
* 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.
Diffstat (limited to 'gold/aarch64-reloc-property.cc')
-rw-r--r-- | gold/aarch64-reloc-property.cc | 5 |
1 files changed, 2 insertions, 3 deletions
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) { |