From cc969da947681b3199a2091ca4ad7d550ee19ac9 Mon Sep 17 00:00:00 2001 From: Alan Modra Date: Mon, 9 May 2016 17:07:33 +0930 Subject: [PATCH] Correct script input section pattern We don't want this to match .rela.text or similar. * testsuite/ld-scripts/pr14962-2.t: Match .text, not *.text. * testsuite/ld-scripts/rgn-at5.t: Similarly, .sec not *.sec. * testsuite/ld-scripts/section-match-1.t: Likewise. --- ld/ChangeLog | 6 ++++++ ld/testsuite/ld-scripts/pr14962-2.t | 2 +- ld/testsuite/ld-scripts/rgn-at5.t | 10 +++++----- ld/testsuite/ld-scripts/section-match-1.t | 6 +++--- 4 files changed, 15 insertions(+), 9 deletions(-) diff --git a/ld/ChangeLog b/ld/ChangeLog index 97031bd3c38..9aca49fe332 100644 --- a/ld/ChangeLog +++ b/ld/ChangeLog @@ -1,3 +1,9 @@ +2016-05-09 Alan Modra + + * testsuite/ld-scripts/pr14962-2.t: Match .text, not *.text. + * testsuite/ld-scripts/rgn-at5.t: Similarly, .sec not *.sec. + * testsuite/ld-scripts/section-match-1.t: Likewise. + 2016-05-06 H.J. Lu PR ld/17550 diff --git a/ld/testsuite/ld-scripts/pr14962-2.t b/ld/testsuite/ld-scripts/pr14962-2.t index f2c603b88bd..5b42fc0cb95 100644 --- a/ld/testsuite/ld-scripts/pr14962-2.t +++ b/ld/testsuite/ld-scripts/pr14962-2.t @@ -6,6 +6,6 @@ SECTIONS .text TOTO : { x = ABSOLUTE(TOTO); - *(*.text) + *(.text) } } diff --git a/ld/testsuite/ld-scripts/rgn-at5.t b/ld/testsuite/ld-scripts/rgn-at5.t index 3a35994cba1..0129b91b353 100644 --- a/ld/testsuite/ld-scripts/rgn-at5.t +++ b/ld/testsuite/ld-scripts/rgn-at5.t @@ -8,17 +8,17 @@ MEMORY SECTIONS { - .sec0 : { *(*.sec0) } + .sec0 : { *(.sec0) } - .sec1 ORIGIN (region1) : { *(*.sec1) } AT> region2 + .sec1 ORIGIN (region1) : { *(.sec1) } AT> region2 fred = ORIGIN (region1) + LENGTH (region1); - .sec2 : { *(*.sec2) } > region3 AT> region4 + .sec2 : { *(.sec2) } > region3 AT> region4 - .sec3 0x5000 : { *(*.sec3) } + .sec3 0x5000 : { *(.sec3) } - .sec4 : { *(*.sec4) } AT> region2 + .sec4 : { *(.sec4) } AT> region2 .sec5 : { LONG(0x5555) } > region2 diff --git a/ld/testsuite/ld-scripts/section-match-1.t b/ld/testsuite/ld-scripts/section-match-1.t index 155b3dce6eb..a9309f88e4e 100644 --- a/ld/testsuite/ld-scripts/section-match-1.t +++ b/ld/testsuite/ld-scripts/section-match-1.t @@ -2,14 +2,14 @@ SECTIONS { /* .secA should collect all sections with a prefix of ".sec." except for those with a prefix of ".sec..". */ - .secA : { *(*.sec.[^.]*) } + .secA : { *(.sec.[^.]*) } /* .secB should be empty because .secA will have taken all of the potential matches. */ - .secB : { *(*.sec.[!.]*) } + .secB : { *(.sec.[!.]*) } /* .secC should match any sections with a ".sec.." prefix. */ - .secC : { *(*.sec.*) } + .secC : { *(.sec.*) } /* Ignore anything else. */ /DISCARD/ : { *(*) } -- 2.30.2