Fix a problem assembling AArch64 sources when a relocation is generated against a...
authorNick Clifton <nickc@redhat.com>
Tue, 6 Apr 2021 12:27:50 +0000 (13:27 +0100)
committerNick Clifton <nickc@redhat.com>
Tue, 6 Apr 2021 12:27:50 +0000 (13:27 +0100)
commiteac4eb8ecb2626ef7711d8f6bee9e870ae435604
treefd02dab5fb608d6b4383540e03f36dcd295f9dd8
parentda0835aebea71232f6b4fb4dea3ee18bdef0c139
Fix a problem assembling AArch64 sources when a relocation is generated against a symbol that has a defined value.

PR 27217
* config/tc-aarch64.c (my_get_expression): Rename to
aarch64_get_expression.  Add a fifth argument to enable deferring
of expression resolution.
(parse_typed_reg): Update calls to my_get_expression.
(parse_vector_reg_list): Likewise.
(parse_immediate_expression): Likewise.
(parse_big_immediate): Likewise.
(parse_shift): Likewise.
(parse_shifter_operand_imm): Likewise.
(parse_operands): Likewise.
(parse_shifter_operand_reloc): Update calls to my_get_expression
and call aarch64_force_reloc to determine the value of the new
fifth argument.
(parse_address_main): Likewise.
(parse_half): Likewise.
(parse_adrp): Likewise.
(aarch64_force_reloc): New function.  Contains code extracted from...
(aarch64_force_relocation): ... here.
* testsuite/gas/aarch64/pr27217.s: New test case.
* testsuite/gas/aarch64/pr27217.d: New test driver.
gas/ChangeLog
gas/config/tc-aarch64.c
gas/testsuite/gas/aarch64/pr27217.d [new file with mode: 0644]
gas/testsuite/gas/aarch64/pr27217.s [new file with mode: 0644]