[gold][aarch64] Patch for erratum-843419 (2 of 2 - fix erratum occurrences)
Han Shen
shenhan@google.com
Tue May 12 18:20:00 GMT 2015
Hi Cary, here is the 2nd patch for erratum 843419 - fixing the erratum.
(Our customers are waiting for gold-aarch64 errata fixes, without this 843419
fix and 835769 (which will be my next CL), they have to temporarily revert to
bfd linker.)
For each erratum occurrence, a stub is generated and inserted into the stub
table. To implement this, a new stub type Erratum_stub is created and some
refactoring work is done to factor out common fields/operations in Erratum_stub
and Reloc_stub into Stub_base.
Test
- build successfully on x86-64 host and aarch64 host box.
- passed all gold aarch64 tests (which were created during the
development of gold-aarch64)
- passed bfd erratum-843419 test - erratum843419.s
Ok for trunk?
Thanks,
Han
gold/ChangeLog:
2015-05-12 Han Shen <shenhan@google.com>
* aarch64.cc(Stub_type): New constants representing stub types.
(Stub_template): New class.
(Stub_template_repertoire): New class.
(Stub_base): New class.
(Erratum_stub): New class.
(Reloc_stub): Refactored to be a subclass of Stub_base.
(Reloc_stub::Stub_type): Removed.
(Reloc_stub::offset): Moved to Stub_base.
(Reloc_stub::set_offset): Moved to Stub_base.
(Reloc_stub::destination_address): Moved to Stub_base.
(Reloc_stub::set_destination_address): Moved to Stub_base.
(Reloc_stub::reset_destination_address): Moved to Stub_base.
(Reloc_stub::stub_type): Renamed and moved to Stub_base.
(Reloc_stub::stub_size): Renamed and moved to Stub_base.
(Reloc_stub::stub_insns): Renamed and moved to Stub_base.
(Reloc_stub::write): Moved to Stub_base.
(Reloc_stub::invalid_offset): Moved to Stub_base.
(Reloc_stub::invalid_address): Moved to Stub_base.
(Reloc_stub::stub_type_): Renamed and moved to Stub_base.
(Reloc_stub::stub_insns_): Moved to Stub_base.
(Reloc_stub::offset_): Moved to Stub_base.
(Reloc_stub::destination_address_): Moved to Stub_base.
(Stub_table::The_aarch64_relobj): New typedef.
(Stub_table::The_erratum_stub): New typedef.
(Stub_table::The_erratum_stub_less): New typedef.
(Stub_table::The_erratum_stub_set): New typedef.
(Stub_table::The_erratum_stub_set_iter): New typedef.
(Stub_table::empty): Added emptiness testing for erratum stubs.
(Stub_table::add_erratum_stub): New method to add an erratum stub.
(Stub_table::find_erratum_stub): New method.
(Stub_table::find_erratum_stubs_for_input_section): New method.
(Stub_table::erratum_stub_address): New method.
(Stub_table::update_date_size_changed_p): Modified to handle erratum stubs.
(Stub_table::do_addralign): Modified to handle erratum stubs.
(Stub_table::erratum_stubs_): New member.
(Stub_table::erratum_stub_size_): New member.
(Stub_table::relocate_stubs): Modified to handle erratum stubs.
(Stub_table::do_write): Modified to handle erratum stubs.
(AArch64_relobj::The_erratum_stub): New typedef.
(AArch64_relobj::Erratum_stub_set_iter): New typedef.
(AArch64_relobj::fix_errata): New method.
(Target_aarch64::The_reloc_stub_type): Removed.
(Target_aarch64::The_erratum_stub): New typede.
(AArch64_relocate_functions::construct_b): New method.
-------------- next part --------------
A non-text attachment was scrubbed...
Name: e843419.patch
Type: text/x-patch
Size: 43032 bytes
Desc: not available
URL: <https://sourceware.org/pipermail/binutils/attachments/20150512/9cd48e64/attachment.bin>
More information about the Binutils
mailing list