binutils-gdb/ld/testsuite/ld-elf/reloc-discard.ld
H.J. Lu d5f4da5e33 ld: Discard .rel.* and .rela.* sections
On many targets, like x86, .rel.dyn/.rela.dyn section is combined from
different .rel/.rela sections by -z combreloc.  To discard dynamic
relocation section, we need to discard .rel.* and .rela.* sections
instead of .rel.dyn and .rela.dyn sections.

Note: This test fails for targets which issue a warning when dynamic
section is discarded.

	* testsuite/ld-elf/reloc-discard.ld: Discard .rel.* and .rela.*
	sections instead of .rel.dyn and .rela.dyn sections.
2018-07-20 09:58:45 -07:00

7 lines
150 B
Plaintext

SECTIONS
{
/* .dynamic needs to go first with MIPS IRIX-style emulations. */
.dynamic : { *(.dynamic) }
/DISCARD/ : { *(.rel.*) *(.rela.*) }
}