binutils-gdb/ld/testsuite/ld-arm/non-contiguous-arm7.ld
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

33 lines
459 B
Plaintext

/*
The section .bss.MY_BUF won't fit in RAM1 or RAM2
*/
MEMORY
{
ROM (rx) : ORIGIN = 0x8000000, LENGTH = 10K
RAM1 (xrw) : ORIGIN = 0x10000000, LENGTH = 64K
RAM2 (xrw) : ORIGIN = 0x20000000, LENGTH = 96K
}
SECTIONS
{
.text :
{
KEEP(*(.text.foo)) ;
} >ROM
.bss :
{
_sbss = .;
*(.bss) *(.bss*) ;
_ebss = .;
} >RAM1
.bss_ram2 :
{
_sbss_ram2 = .;
*(.bss) *(.bss*) ;
_ebss_ram2 = .;
} >RAM2
}