PR ld/24709 [arm] linker crash and assertion failure with CMSE
authorChristophe Lyon <christophe.lyon@linaro.org>
Tue, 2 Jul 2019 13:09:02 +0000 (13:09 +0000)
committerChristophe Lyon <christophe.lyon@linaro.org>
Tue, 2 Jul 2019 13:09:02 +0000 (13:09 +0000)
commit4d83e8d97e3b15dcd7b5c58f4199e9f5bd6fca3d
treeea3ffc06faef177c6e90bc74851fcaf34023846a
parentbb32413ff7247f5ac3685ca9075b3432bca69a82
PR ld/24709 [arm] linker crash and assertion failure with CMSE

As discussed in the PR, we do not support the case where CMSE stubs
are inserted too far from their destination. This would require an
intermediate long-branch stub, which is tricky in this context.

Instead of crashing, this patch emit an error message and exits.

2019-07-02  Christophe Lyon  <christophe.lyon@linaro.org>

* bfd/elf32-arm.c (CMSE_STUB_NAME): New define.
(elf32_arm_get_stub_entry): Do not try to emit long-branch stubs
for CMSE stubs.
(arm_dedicated_stub_output_section_name): Use CMSE_STUB_NAME.

Change-Id: I6d4e1c0fdee6bb9f4b07e5e1b46700b5ba31c62e
bfd/ChangeLog
bfd/elf32-arm.c