binutils-gdb/ld/testsuite/ld-arm/non-contiguous-arm7.s
Torbjörn SVENSSON 106791196f bfd: Discard symbol regardless of warning flag
The discard of symbols should be performed whether the warning for
the discard is enabled or not.
Without this patch, ld would segfault in bfd_section_removed_from_list,
called in the if-statement right after this block, as the argument
isec->output_section can be NULL.

Signed-off-by: Torbjörn SVENSSON <torbjorn.svensson@foss.st.com>
Co-Authored-By: Yvan ROUX <yvan.roux@foss.st.com>
2022-12-20 11:37:22 +01:00

17 lines
267 B
ArmAsm

.global MY_BUF
.section .bss.MY_BUF,"aw",%nobits
.type MY_BUF, %object
.size MY_BUF, 102400
MY_BUF:
.space 102400
.section .text.foo,"ax",%progbits
.global foo
.type foo, %function
foo:
ldr r0, .L3
bx lr
.L3:
.word MY_BUF
.size foo, .-foo