summaryrefslogtreecommitdiff
path: root/ld/testsuite/ld-scripts/section-match-1.t
diff options
context:
space:
mode:
Diffstat (limited to 'ld/testsuite/ld-scripts/section-match-1.t')
-rw-r--r--ld/testsuite/ld-scripts/section-match-1.t16
1 files changed, 16 insertions, 0 deletions
diff --git a/ld/testsuite/ld-scripts/section-match-1.t b/ld/testsuite/ld-scripts/section-match-1.t
new file mode 100644
index 0000000..155b3dc
--- /dev/null
+++ b/ld/testsuite/ld-scripts/section-match-1.t
@@ -0,0 +1,16 @@
+SECTIONS
+{
+ /* .secA should collect all sections with a prefix of ".sec."
+ except for those with a prefix of ".sec..". */
+ .secA : { *(*.sec.[^.]*) }
+
+ /* .secB should be empty because .secA will have taken all of
+ the potential matches. */
+ .secB : { *(*.sec.[!.]*) }
+
+ /* .secC should match any sections with a ".sec.." prefix. */
+ .secC : { *(*.sec.*) }
+
+ /* Ignore anything else. */
+ /DISCARD/ : { *(*) }
+}