diff options
author | Alan Modra <amodra@gmail.com> | 2023-07-27 18:03:49 +0930 |
---|---|---|
committer | Alan Modra <amodra@gmail.com> | 2023-07-27 23:38:14 +0930 |
commit | 2902e6682d63183d373f385d4efaf8597fd22544 (patch) | |
tree | 040aceac580c1c1f50ed736e6aad0dadbe401158 /ld | |
parent | f1036ada3bca6f88340a0a1fbd8b103a3e0cdc2d (diff) | |
download | binutils-2902e6682d63183d373f385d4efaf8597fd22544.zip binutils-2902e6682d63183d373f385d4efaf8597fd22544.tar.gz binutils-2902e6682d63183d373f385d4efaf8597fd22544.tar.bz2 |
/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.
Diffstat (limited to 'ld')
35 files changed, 35 insertions, 35 deletions
diff --git a/ld/testsuite/ld-elf/expr1.t b/ld/testsuite/ld-elf/expr1.t index 9670e25..684cffb 100644 --- a/ld/testsuite/ld-elf/expr1.t +++ b/ld/testsuite/ld-elf/expr1.t @@ -2,5 +2,5 @@ SECTIONS { .bar : AT ((ADDR(.foo) + 4095) & ~(4095)) { *(.bar) } .foo : { *(.foo) } - /DISCARD/ : { *(.*) } + /DISCARD/ : { *(*) } } diff --git a/ld/testsuite/ld-elf/flags1.ld b/ld/testsuite/ld-elf/flags1.ld index c003ce7..14d17cb 100644 --- a/ld/testsuite/ld-elf/flags1.ld +++ b/ld/testsuite/ld-elf/flags1.ld @@ -9,5 +9,5 @@ SECTIONS { . += 0x160; } - /DISCARD/ : { *(.*) } + /DISCARD/ : { *(*) } } diff --git a/ld/testsuite/ld-elf/loadaddr.t b/ld/testsuite/ld-elf/loadaddr.t index 91e9ef2..e4036f1 100644 --- a/ld/testsuite/ld-elf/loadaddr.t +++ b/ld/testsuite/ld-elf/loadaddr.t @@ -6,5 +6,5 @@ SECTIONS .foo : { *(.foo) } . = ALIGN(8192); .data : AT (ADDR(.data)) { *(.data) } - /DISCARD/ : { *(.*) } + /DISCARD/ : { *(*) } } diff --git a/ld/testsuite/ld-elf/loadaddr3.t b/ld/testsuite/ld-elf/loadaddr3.t index 789f61e..c70e363 100644 --- a/ld/testsuite/ld-elf/loadaddr3.t +++ b/ld/testsuite/ld-elf/loadaddr3.t @@ -12,5 +12,5 @@ SECTIONS .data : {data_load = LOADADDR (.data); data_start = ADDR (.data); *(.data .data.*)} >ram AT>rom - /DISCARD/ : { *(.*) } + /DISCARD/ : { *(*) } } diff --git a/ld/testsuite/ld-elf/noload-1.t b/ld/testsuite/ld-elf/noload-1.t index 768cd42..7c5c26d 100644 --- a/ld/testsuite/ld-elf/noload-1.t +++ b/ld/testsuite/ld-elf/noload-1.t @@ -5,5 +5,5 @@ SECTIONS { *(TEST) } - /DISCARD/ : { *(.*) } + /DISCARD/ : { *(*) } } diff --git a/ld/testsuite/ld-elf/overlay.t b/ld/testsuite/ld-elf/overlay.t index 640af96..ee37d05 100644 --- a/ld/testsuite/ld-elf/overlay.t +++ b/ld/testsuite/ld-elf/overlay.t @@ -11,7 +11,7 @@ SECTIONS } = 0 .silly-name3 : { *(.silly-name3) } = 0 .silly-name4 : { *(.silly-name4) } = 0 - /DISCARD/ : { *(.*) } + /DISCARD/ : { *(*) } ASSERT(ADDR(.text1)==ADDR(.text2), "overlay error") ASSERT(ADDR(.silly-name1)==ADDR(.silly-name2), "silly overlay error") } diff --git a/ld/testsuite/ld-elf/pr13839.t b/ld/testsuite/ld-elf/pr13839.t index 6baa228..5999719 100644 --- a/ld/testsuite/ld-elf/pr13839.t +++ b/ld/testsuite/ld-elf/pr13839.t @@ -4,6 +4,6 @@ SECTIONS { *(.text) } _end = .; - /DISCARD/ : { *(.*) } + /DISCARD/ : { *(*) } } . = ASSERT((_end - _text <= (512 * 1024 * 1024)), "foo"); diff --git a/ld/testsuite/ld-elf/pr14052.t b/ld/testsuite/ld-elf/pr14052.t index 84fffbd..ebc40f1 100644 --- a/ld/testsuite/ld-elf/pr14052.t +++ b/ld/testsuite/ld-elf/pr14052.t @@ -8,5 +8,5 @@ SECTIONS { _data_start = .; *(.data) } - /DISCARD/ : { *(.*) } + /DISCARD/ : { *(*) } } diff --git a/ld/testsuite/ld-elf/pr14156c.t b/ld/testsuite/ld-elf/pr14156c.t index c8be2c5..adf1f0a 100644 --- a/ld/testsuite/ld-elf/pr14156c.t +++ b/ld/testsuite/ld-elf/pr14156c.t @@ -1,5 +1,5 @@ SECTIONS { .text : { *(.text) } .foo : { *(SORT_NONE(.foo)) } - /DISCARD/ : { *(.*) } + /DISCARD/ : { *(*) } } diff --git a/ld/testsuite/ld-elf/pr19005.t b/ld/testsuite/ld-elf/pr19005.t index 0e89e0b..e9170c3 100644 --- a/ld/testsuite/ld-elf/pr19005.t +++ b/ld/testsuite/ld-elf/pr19005.t @@ -2,5 +2,5 @@ SECTIONS { .foo : { *(.foo) } .bar : { *(.bar) } - /DISCARD/ : { *(.*) } + /DISCARD/ : { *(*) } } diff --git a/ld/testsuite/ld-elf/relocatable.t b/ld/testsuite/ld-elf/relocatable.t index 2ec056a..0839555 100644 --- a/ld/testsuite/ld-elf/relocatable.t +++ b/ld/testsuite/ld-elf/relocatable.t @@ -4,5 +4,5 @@ SECTIONS .text : { *(.text) } . = 0x900000; .data : { *(.data) } - /DISCARD/ : { *(.*) } + /DISCARD/ : { *(*) } } diff --git a/ld/testsuite/ld-i386/alloc.t b/ld/testsuite/ld-i386/alloc.t index f7dd17a..1bbb9a6 100644 --- a/ld/testsuite/ld-i386/alloc.t +++ b/ld/testsuite/ld-i386/alloc.t @@ -8,5 +8,5 @@ SECTIONS .bar : AT(ADDR(.bar) - 0xC0000000) { *(.bar) } :text .bss : AT(ADDR(.bss) - 0xC0000000) { *(.bss) } .foo 0 : AT(ADDR(.bss) + SIZEOF(.bss) - 0xC0000000) { *(.foo) } :text - /DISCARD/ : { *(.*) } + /DISCARD/ : { *(*) } } diff --git a/ld/testsuite/ld-pe/image_size.t b/ld/testsuite/ld-pe/image_size.t index f646eca..93f2f50 100644 --- a/ld/testsuite/ld-pe/image_size.t +++ b/ld/testsuite/ld-pe/image_size.t @@ -11,5 +11,5 @@ SECTIONS { *(.data) } - /DISCARD/ : { *(.*) } + /DISCARD/ : { *(*) } } diff --git a/ld/testsuite/ld-scripts/empty-address-1.t b/ld/testsuite/ld-scripts/empty-address-1.t index a24f25a..a579683 100644 --- a/ld/testsuite/ld-scripts/empty-address-1.t +++ b/ld/testsuite/ld-scripts/empty-address-1.t @@ -8,5 +8,5 @@ SECTIONS } __data_end = .; .bss : { *(.bss) } - /DISCARD/ : { *(.*) } + /DISCARD/ : { *(*) } } diff --git a/ld/testsuite/ld-scripts/empty-address-2a.t b/ld/testsuite/ld-scripts/empty-address-2a.t index 0ab29a4..bc53115 100644 --- a/ld/testsuite/ld-scripts/empty-address-2a.t +++ b/ld/testsuite/ld-scripts/empty-address-2a.t @@ -4,5 +4,5 @@ SECTIONS .data : { *(.data) } __data_end = .; .bss : { *(.bss) } - /DISCARD/ : { *(.*) } + /DISCARD/ : { *(*) } } diff --git a/ld/testsuite/ld-scripts/empty-address-2b.t b/ld/testsuite/ld-scripts/empty-address-2b.t index c6d1e52..788cd65 100644 --- a/ld/testsuite/ld-scripts/empty-address-2b.t +++ b/ld/testsuite/ld-scripts/empty-address-2b.t @@ -8,5 +8,5 @@ SECTIONS } __data_end = .; .bss : { *(.bss) } - /DISCARD/ : { *(.*) } + /DISCARD/ : { *(*) } } diff --git a/ld/testsuite/ld-scripts/empty-address-3a.t b/ld/testsuite/ld-scripts/empty-address-3a.t index 28767a1..42128f8 100644 --- a/ld/testsuite/ld-scripts/empty-address-3a.t +++ b/ld/testsuite/ld-scripts/empty-address-3a.t @@ -7,5 +7,5 @@ SECTIONS } __data_end = .; .bss : { *(.bss) } - /DISCARD/ : { *(.*) } + /DISCARD/ : { *(*) } } diff --git a/ld/testsuite/ld-scripts/empty-address-3b.t b/ld/testsuite/ld-scripts/empty-address-3b.t index 6da2421..2b9e27d 100644 --- a/ld/testsuite/ld-scripts/empty-address-3b.t +++ b/ld/testsuite/ld-scripts/empty-address-3b.t @@ -8,5 +8,5 @@ SECTIONS } __data_end = .; .bss : { *(.bss) } - /DISCARD/ : { *(.*) } + /DISCARD/ : { *(*) } } diff --git a/ld/testsuite/ld-scripts/empty-address-3c.t b/ld/testsuite/ld-scripts/empty-address-3c.t index 0829c58..13fe34e 100644 --- a/ld/testsuite/ld-scripts/empty-address-3c.t +++ b/ld/testsuite/ld-scripts/empty-address-3c.t @@ -8,5 +8,5 @@ SECTIONS } __data_end = .; .bss : { *(.bss) } - /DISCARD/ : { *(.*) } + /DISCARD/ : { *(*) } } diff --git a/ld/testsuite/ld-scripts/empty-address-4.t b/ld/testsuite/ld-scripts/empty-address-4.t index f25bbfe..bb0c2f6 100644 --- a/ld/testsuite/ld-scripts/empty-address-4.t +++ b/ld/testsuite/ld-scripts/empty-address-4.t @@ -7,5 +7,5 @@ SECTIONS ASSERT (. < 0x400, oops); } .bss : { *(.bss) } - /DISCARD/ : { *(.*) } + /DISCARD/ : { *(*) } } diff --git a/ld/testsuite/ld-scripts/phdrs.t b/ld/testsuite/ld-scripts/phdrs.t index 283e30c..1267322 100644 --- a/ld/testsuite/ld-scripts/phdrs.t +++ b/ld/testsuite/ld-scripts/phdrs.t @@ -12,5 +12,5 @@ SECTIONS . = 0x800000 + SIZEOF_HEADERS; .text : { *(.text) } :text .data : { *(.data) } :data - /DISCARD/ : { *(.*) } + /DISCARD/ : { *(*) } } diff --git a/ld/testsuite/ld-scripts/phdrs2.t b/ld/testsuite/ld-scripts/phdrs2.t index bccbcec..d5a4c2a 100644 --- a/ld/testsuite/ld-scripts/phdrs2.t +++ b/ld/testsuite/ld-scripts/phdrs2.t @@ -19,5 +19,5 @@ SECTIONS LONG(EMPTY_START) ; } : Bar - /DISCARD/ : { *(.*) } + /DISCARD/ : { *(*) } } diff --git a/ld/testsuite/ld-scripts/phdrs3.t b/ld/testsuite/ld-scripts/phdrs3.t index 4bd4e85..d86e206 100644 --- a/ld/testsuite/ld-scripts/phdrs3.t +++ b/ld/testsuite/ld-scripts/phdrs3.t @@ -12,5 +12,5 @@ SECTIONS . = 0x800000 + SIZEOF_HEADERS; .text : { *(.text) } :text .data : { *(.data) } :data - /DISCARD/ : { *(.*) } + /DISCARD/ : { *(*) } } diff --git a/ld/testsuite/ld-scripts/phdrs3a.t b/ld/testsuite/ld-scripts/phdrs3a.t index c07ff34..4853b7b 100644 --- a/ld/testsuite/ld-scripts/phdrs3a.t +++ b/ld/testsuite/ld-scripts/phdrs3a.t @@ -11,5 +11,5 @@ SECTIONS . = 0x800000 + SIZEOF_HEADERS; .text : { *(.text) } :text .data : { *(.data) } :data - /DISCARD/ : { *(.*) } + /DISCARD/ : { *(*) } } diff --git a/ld/testsuite/ld-scripts/provide-9.t b/ld/testsuite/ld-scripts/provide-9.t index 00d906a..b26051a 100644 --- a/ld/testsuite/ld-scripts/provide-9.t +++ b/ld/testsuite/ld-scripts/provide-9.t @@ -20,6 +20,6 @@ SECTIONS *(.bss .bss.*) } >FOO - /DISCARD/ : { *(.*) } + /DISCARD/ : { *(*) } } diff --git a/ld/testsuite/ld-scripts/sort-file.t b/ld/testsuite/ld-scripts/sort-file.t index 559a000..f46f574 100644 --- a/ld/testsuite/ld-scripts/sort-file.t +++ b/ld/testsuite/ld-scripts/sort-file.t @@ -2,5 +2,5 @@ SECTIONS { .text : { SORT_BY_NAME(*)(.text*) } .data : { *(.data*) } - /DISCARD/ : { *(.*) } + /DISCARD/ : { *(*) } } diff --git a/ld/testsuite/ld-scripts/sort.t b/ld/testsuite/ld-scripts/sort.t index c53481f..a7bb88f 100644 --- a/ld/testsuite/ld-scripts/sort.t +++ b/ld/testsuite/ld-scripts/sort.t @@ -1,5 +1,5 @@ SECTIONS { .text : {*(.text .text.*)} - /DISCARD/ : { *(.*) } + /DISCARD/ : { *(*) } } diff --git a/ld/testsuite/ld-scripts/sort_b_a.t b/ld/testsuite/ld-scripts/sort_b_a.t index cbfd3c3..c53f6c2 100644 --- a/ld/testsuite/ld-scripts/sort_b_a.t +++ b/ld/testsuite/ld-scripts/sort_b_a.t @@ -1,5 +1,5 @@ SECTIONS { .text : {*(SORT_BY_ALIGNMENT(.text*))} - /DISCARD/ : { *(.*) } + /DISCARD/ : { *(*) } } diff --git a/ld/testsuite/ld-scripts/sort_b_a_a.t b/ld/testsuite/ld-scripts/sort_b_a_a.t index 359cdff..df0b190 100644 --- a/ld/testsuite/ld-scripts/sort_b_a_a.t +++ b/ld/testsuite/ld-scripts/sort_b_a_a.t @@ -1,5 +1,5 @@ SECTIONS { .text : {*(SORT_BY_ALIGNMENT(SORT_BY_ALIGNMENT(.text*)))} - /DISCARD/ : { *(.*) } + /DISCARD/ : { *(*) } } diff --git a/ld/testsuite/ld-scripts/sort_b_a_n.t b/ld/testsuite/ld-scripts/sort_b_a_n.t index 04c3917..f5661bb 100644 --- a/ld/testsuite/ld-scripts/sort_b_a_n.t +++ b/ld/testsuite/ld-scripts/sort_b_a_n.t @@ -1,5 +1,5 @@ SECTIONS { .text : {*(SORT_BY_ALIGNMENT(SORT_BY_NAME(.text*)))} - /DISCARD/ : { *(.*) } + /DISCARD/ : { *(*) } } diff --git a/ld/testsuite/ld-scripts/sort_b_n.t b/ld/testsuite/ld-scripts/sort_b_n.t index 26c2b6e..344d7f3 100644 --- a/ld/testsuite/ld-scripts/sort_b_n.t +++ b/ld/testsuite/ld-scripts/sort_b_n.t @@ -1,5 +1,5 @@ SECTIONS { .text : {*(SORT_BY_NAME(.text*))} - /DISCARD/ : { *(.*) } + /DISCARD/ : { *(*) } } diff --git a/ld/testsuite/ld-scripts/sort_b_n_a.t b/ld/testsuite/ld-scripts/sort_b_n_a.t index 49cbdd3..532ba52 100644 --- a/ld/testsuite/ld-scripts/sort_b_n_a.t +++ b/ld/testsuite/ld-scripts/sort_b_n_a.t @@ -1,5 +1,5 @@ SECTIONS { .text : {*(SORT_BY_NAME(SORT_BY_ALIGNMENT(.text*)))} - /DISCARD/ : { *(.*) } + /DISCARD/ : { *(*) } } diff --git a/ld/testsuite/ld-scripts/sort_b_n_n.t b/ld/testsuite/ld-scripts/sort_b_n_n.t index b4eabfe..b8b0914 100644 --- a/ld/testsuite/ld-scripts/sort_b_n_n.t +++ b/ld/testsuite/ld-scripts/sort_b_n_n.t @@ -1,5 +1,5 @@ SECTIONS { .text : {*(SORT_BY_NAME(SORT_BY_NAME(.text*)))} - /DISCARD/ : { *(.*) } + /DISCARD/ : { *(*) } } diff --git a/ld/testsuite/ld-scripts/sort_no.t b/ld/testsuite/ld-scripts/sort_no.t index d797c79..7ddc352 100644 --- a/ld/testsuite/ld-scripts/sort_no.t +++ b/ld/testsuite/ld-scripts/sort_no.t @@ -1,5 +1,5 @@ SECTIONS { .text : {*(.text*)} - /DISCARD/ : { *(.*) } + /DISCARD/ : { *(*) } } diff --git a/ld/testsuite/ld-x86-64/pr18176.t b/ld/testsuite/ld-x86-64/pr18176.t index 480c0cd..0004a5e 100644 --- a/ld/testsuite/ld-x86-64/pr18176.t +++ b/ld/testsuite/ld-x86-64/pr18176.t @@ -35,5 +35,5 @@ SECTIONS . = ALIGN(64 / 8); _end = .; PROVIDE (end = .); . = DATA_SEGMENT_END (.); - /DISCARD/ : { *(.*) } + /DISCARD/ : { *(*) } } |