Files
binutils-gdb/ld/testsuite/ld-scripts/sort-file.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

7 lines
98 B
Raku

SECTIONS
{
.text : { SORT_BY_NAME(*)(.text*) }
.data : { *(.data*) }
/DISCARD/ : { *(*) }
}