Refactor Cortex-A8 erratum workaround in preparation
authorThomas Preud'homme <thomas.preudhomme@arm.com>
Tue, 10 May 2016 14:28:10 +0000 (15:28 +0100)
committerThomas Preud'homme <thomas.preudhomme@arm.com>
Tue, 10 May 2016 14:28:10 +0000 (15:28 +0100)
commit8d9d9490142a0cd6edb7cfec820a7c8f28b88395
tree5afbcb7d81ecebd203b626c3a0cf15230ae32e4f
parent15afaa63f39a44563e49bb3b9fb38ed43e8b48ed
Refactor Cortex-A8 erratum workaround in preparation

2016-05-10  Thomas Preud'homme  <thomas.preudhomme@arm.com>

bfd/
* elf32-arm.c (enum elf32_arm_stub_type): Delete
arm_stub_a8_veneer_lwm enumerator.
(arm_stub_a8_veneer_lwm): New unsigned constant to replace
aforementioned enumerator.
(struct elf32_arm_stub_hash_entry): Delete target_addend
field and add source_value.
(struct a8_erratum_fix): Delete addend field and add target_offset.
(stub_hash_newfunc): Initialize source_value field amd remove
initialization for target_addend.
(arm_build_one_stub): Stop special casing Thumb relocations: promote
the else to being always executed, moving the
arm_stub_a8_veneer_b_cond specific code in it.  Remove
stub_entry->target_addend from points_to computation.
(cortex_a8_erratum_scan): Store in a8_erratum_fix structure the offset
to target symbol from start of section rather than the offset from the
stub address.
(elf32_arm_size_stubs): Set stub_entry's source_value and target_value
fields from struct a8_erratum_fix's offset and target_offset
respectively.
(make_branch_to_a8_stub): Rename target variable to loc.  Compute
veneered_insn_loc and loc using stub_entry's source_value.
bfd/ChangeLog
bfd/elf32-arm.c