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 H.J. Lu <hongjiu.lu@intel.com>
+
+ * testsuite/ld-elf/reloc-discard.ld: Discard .rel.* and .rela.*
+ sections instead of .rel.dyn and .rela.dyn sections.
+
2018-07-20 H.J. Lu <hongjiu.lu@intel.com>
PR ld/23428
{
/* .dynamic needs to go first with MIPS IRIX-style emulations. */
.dynamic : { *(.dynamic) }
- /DISCARD/ : { *(.rel.dyn) *(.rela.dyn) }
+ /DISCARD/ : { *(.rel.*) *(.rela.*) }
}