Generate a warning in the ARM assembler if a PC-relative thumb load instruction is...
authorAlexandre Oliva <oliva@adacore.com>
Wed, 4 Mar 2020 17:28:46 +0000 (17:28 +0000)
committerNick Clifton <nickc@redhat.com>
Wed, 4 Mar 2020 17:28:46 +0000 (17:28 +0000)
commit749479c8d3b63c9075d2fabf4b87b1f7109608b6
treeea0bf41a6d7fb0dd11a33e930893a96adb2a9f38
parent440cf44eb0f70830b8d8ac35289f84129c7a35c1
Generate a warning in the ARM assembler if a PC-relative thumb load instruction is detected in a section with insufficient alignment.

* config/tc-arm.c (md_apply_fix): Warn if a PC-relative load is
detected in a section which does not have at least 4 byte
alignment.
* testsuite/gas/arm/armv8-ar-it-bad.s: Add alignment directive.
* testsuite/gas/arm/ldr-t.s: Likewise.
* testsuite/gas/arm/sp-pc-usage-t.s: Likewise.
* testsuite/gas/arm/sp-pc-usage-t.d: Finish test at end of
disassembly, ignoring any NOPs that may have been inserted because
of section alignment.
* testsuite/gas/arm/ldr-t.d: Likewise.
gas/ChangeLog
gas/config/tc-arm.c
gas/testsuite/gas/arm/armv8-ar-it-bad.s
gas/testsuite/gas/arm/ldr-t.d
gas/testsuite/gas/arm/ldr-t.s
gas/testsuite/gas/arm/sp-pc-usage-t.d
gas/testsuite/gas/arm/sp-pc-usage-t.s