binutils-gdb/ld/testsuite/ld-elf/pr14156c.t
Alan Modra 2902e6682d /DISCARD/ in ld testsuite
The canonical form to discard all sections not mentioned earlier in
the script is
  /DISCARD/ : { *(*) }
not
  /DISCARD/ : { *(.*) }
".*" happens to work with the usual section names starting with a dot,
but let's not promote something not quite right.
2023-07-27 23:38:14 +09:30

6 lines
91 B
Raku

SECTIONS {
.text : { *(.text) }
.foo : { *(SORT_NONE(.foo)) }
/DISCARD/ : { *(*) }
}