aarch64: handle STO_AARCH64_VARIANT_PCS in bfd
authorSzabolcs Nagy <szabolcs.nagy@arm.com>
Thu, 25 Apr 2019 14:07:14 +0000 (15:07 +0100)
committerSzabolcs Nagy <szabolcs.nagy@arm.com>
Fri, 24 May 2019 14:11:00 +0000 (15:11 +0100)
commit823710d5856996d1f54f04ecb2f7647aeae99b5b
tree7b44adae584db07fd7736ad67b89626e1a757a00
parent0b4eac57c44ec4c9e13f5201b40936c3b3e6c639
aarch64: handle STO_AARCH64_VARIANT_PCS in bfd

Propagate STO_AARCH64_VARIANT_PCS st_other attribute to the output and
add DT_AARCH64_VARIANT_PCS dynamic tag if necessary.

Mismatching attributes are not diagnosed.

bfd/ChangeLog:

* elfnn-aarch64.c (elfNN_aarch64_merge_symbol_attribute): New function.
(struct elf_aarch64_link_hash_table): Add variant_pcs member.
(elfNN_aarch64_allocate_dynrelocs): Update variant_pcs.
(elfNN_aarch64_size_dynamic_sections): Add DT_AARCH64_VARIANT_PCS.
(elf_backend_merge_symbol_attribute): Define.

ld/ChangeLog:

* testsuite/ld-aarch64/aarch64-elf.exp: Add new tests.
* testsuite/ld-aarch64/variant_pcs-1.s: New asm for tests.
* testsuite/ld-aarch64/variant_pcs-2.s: New asm for tests.
* testsuite/ld-aarch64/variant_pcs-now.d: New test.
* testsuite/ld-aarch64/variant_pcs-r.d: New test.
* testsuite/ld-aarch64/variant_pcs-shared.d: New test.
* testsuite/ld-aarch64/variant_pcs.ld: New linker script for tests.
bfd/ChangeLog
bfd/elfnn-aarch64.c
ld/ChangeLog
ld/testsuite/ld-aarch64/aarch64-elf.exp
ld/testsuite/ld-aarch64/variant_pcs-1.s [new file with mode: 0644]
ld/testsuite/ld-aarch64/variant_pcs-2.s [new file with mode: 0644]
ld/testsuite/ld-aarch64/variant_pcs-now.d [new file with mode: 0644]
ld/testsuite/ld-aarch64/variant_pcs-r.d [new file with mode: 0644]
ld/testsuite/ld-aarch64/variant_pcs-shared.d [new file with mode: 0644]
ld/testsuite/ld-aarch64/variant_pcs.ld [new file with mode: 0644]