* ld-elf/start.s, ld-elf/symbolref.s, ld-elf/symbol1w.s,
authorHans-Peter Nilsson <hp@axis.com>
Mon, 7 Feb 2005 02:46:15 +0000 (02:46 +0000)
committerHans-Peter Nilsson <hp@axis.com>
Mon, 7 Feb 2005 02:46:15 +0000 (02:46 +0000)
ld-elf/warn1.d: New test.

ld/testsuite/ChangeLog
ld/testsuite/ld-elf/start.s [new file with mode: 0644]
ld/testsuite/ld-elf/symbol1ref.s [new file with mode: 0644]
ld/testsuite/ld-elf/symbol1w.s [new file with mode: 0644]
ld/testsuite/ld-elf/warn1.d [new file with mode: 0644]

index aa4ca53eb8842b46a970934cbcf59f11550dff17..38887d2151026faa43ffd040c67d4eb81b251ec3 100644 (file)
@@ -1,5 +1,8 @@
 2005-02-07  Hans-Peter Nilsson  <hp@axis.com>
 
+       * ld-elf/start.s, ld-elf/symbolref.s, ld-elf/symbol1w.s,
+       ld-elf/warn1.d: New test.
+
        * lib/ld-lib.exp: Support new directive "warning".
 
 2005-02-02  Daniel Jacobowitz  <dan@codesourcery.com>
diff --git a/ld/testsuite/ld-elf/start.s b/ld/testsuite/ld-elf/start.s
new file mode 100644 (file)
index 0000000..f4c8af6
--- /dev/null
@@ -0,0 +1,4 @@
+       .text
+       .global _start
+_start:
+       .long 0
diff --git a/ld/testsuite/ld-elf/symbol1ref.s b/ld/testsuite/ld-elf/symbol1ref.s
new file mode 100644 (file)
index 0000000..582e6ba
--- /dev/null
@@ -0,0 +1,3 @@
+       .text
+       .long symbol1
+
diff --git a/ld/testsuite/ld-elf/symbol1w.s b/ld/testsuite/ld-elf/symbol1w.s
new file mode 100644 (file)
index 0000000..7fe8b13
--- /dev/null
@@ -0,0 +1,10 @@
+       .section .gnu.warning.symbol1
+       .asciz "witty one-liner"
+       .text
+       .type symbol1,@function
+       .global symbol1
+symbol1:
+.L1:
+       .long 0
+.L0:
+       .size symbol1,.L0-.L1
diff --git a/ld/testsuite/ld-elf/warn1.d b/ld/testsuite/ld-elf/warn1.d
new file mode 100644 (file)
index 0000000..97da85b
--- /dev/null
@@ -0,0 +1,13 @@
+#source: start.s
+#source: symbol1ref.s
+#source: symbol1w.s
+#ld: 
+#warning: ^[^\\n]*\): warning: witty one-liner$
+#readelf: -s
+
+# Check that warnings are generated for the .gnu.warning.SYMBOL
+# construct and that the symbol still appears as expected.
+
+#...
+[      ]+[0-9]+:[      ]+[0-9a-f]+[    ]+[48][         ]+FUNC[  ]+GLOBAL DEFAULT[      ]+[1-9] symbol1
+#pass