aboutsummaryrefslogtreecommitdiff
path: root/gas/testsuite
diff options
context:
space:
mode:
authorJan Beulich <jbeulich@novell.com>2009-07-27 10:04:25 +0000
committerJan Beulich <jbeulich@novell.com>2009-07-27 10:04:25 +0000
commitefa19bfde4d57f33974cac17dfddb18f6f460f43 (patch)
treea54004628ab9a90b64e32ae145f1ff920d0eb5ee /gas/testsuite
parent7859b21da558a842c9d35c3cae480e38204d9892 (diff)
downloadgdb-efa19bfde4d57f33974cac17dfddb18f6f460f43.zip
gdb-efa19bfde4d57f33974cac17dfddb18f6f460f43.tar.gz
gdb-efa19bfde4d57f33974cac17dfddb18f6f460f43.tar.bz2
gas/
2009-07-27 Jan Beulich <jbeulich@novell.com> * obj-elf.c (elf_file_symbol): Replace symbol name set up by symbol_new() with the passed in, unmodified one. gas/testsuite/ 2009-07-27 Jan Beulich <jbeulich@novell.com> * gas/elf/file.[ds]: New. * gas/elf/elf.exp: Run new test.
Diffstat (limited to 'gas/testsuite')
-rw-r--r--gas/testsuite/ChangeLog5
-rw-r--r--gas/testsuite/gas/elf/elf.exp14
-rw-r--r--gas/testsuite/gas/elf/file.d18
-rw-r--r--gas/testsuite/gas/elf/file.s29
4 files changed, 66 insertions, 0 deletions
diff --git a/gas/testsuite/ChangeLog b/gas/testsuite/ChangeLog
index 2769e04..ebe6b7e 100644
--- a/gas/testsuite/ChangeLog
+++ b/gas/testsuite/ChangeLog
@@ -1,3 +1,8 @@
+2009-07-27 Jan Beulich <jbeulich@novell.com>
+
+ * gas/elf/file.[ds]: New.
+ * gas/elf/elf.exp: Run new test.
+
2009-07-25 H.J. Lu <hongjiu.lu@intel.com>
* gas/i386/l1om.d: New.
diff --git a/gas/testsuite/gas/elf/elf.exp b/gas/testsuite/gas/elf/elf.exp
index 454aa60..65245f4 100644
--- a/gas/testsuite/gas/elf/elf.exp
+++ b/gas/testsuite/gas/elf/elf.exp
@@ -82,6 +82,20 @@ if { ([istarget "*-*-*elf*"]
&& ![istarget "am3*-*-*"]} then {
run_dump_test "ehopt0"
}
+ case $target_triplet in {
+ { m68k-*-* m68[03]??-*-* } {
+ run_dump_test "file" { { as "--defsym m68k=1" } }
+ }
+ { mmix-*-* } {
+ run_dump_test "file" { { as "--defsym mmix=1" } }
+ }
+ { xtensa*-*-* } {
+ run_dump_test "file" { { as "--rename-section file.s=file.c" } }
+ }
+ default {
+ run_dump_test "file"
+ }
+ }
run_dump_test "group0a"
run_dump_test "group0b"
run_dump_test "group1a"
diff --git a/gas/testsuite/gas/elf/file.d b/gas/testsuite/gas/elf/file.d
new file mode 100644
index 0000000..1e98186
--- /dev/null
+++ b/gas/testsuite/gas/elf/file.d
@@ -0,0 +1,18 @@
+#objdump: -t
+#name: .file file names
+
+.*: .*
+
+SYMBOL TABLE:
+#...
+0+ l[ ]*df \*ABS\*[ ]+0+ file\.s
+0+ l[ ]*df \*ABS\*[ ]+0+ slash/data
+0+ l[ ]*df \*ABS\*[ ]+0+ \{braces\}
+0+ l[ ]*df \*ABS\*[ ]+0+ \[brackets\]
+0+ l[ ]*df \*ABS\*[ ]+0+ /dir/file\.s
+0+ l[ ]*df \*ABS\*[ ]+0+ :colon
+0+ l[ ]*df \*ABS\*[ ]+0+ UPPER
+0+ l[ ]*df \*ABS\*[ ]+0+ lower
+0+ l[ ]*df \*ABS\*[ ]+0+ hash\#
+0+ l[ ]*df \*ABS\*[ ]+0+ ~tilde
+#pass
diff --git a/gas/testsuite/gas/elf/file.s b/gas/testsuite/gas/elf/file.s
new file mode 100644
index 0000000..7718cc7
--- /dev/null
+++ b/gas/testsuite/gas/elf/file.s
@@ -0,0 +1,29 @@
+ # delta (m68k sub-target)
+ .file "~tilde"
+
+ # ia64
+ .file "hash#"
+
+ # m68k
+ .ifdef m86k
+ .opt nocase
+ .endif
+ .file "lower"
+ .file "UPPER"
+
+ # mmix
+ .file ":colon"
+ .ifdef mmix
+ .prefix prefix
+ .endif
+ .file "/dir/file.s"
+
+ # ppc/xcoff
+ .file "[brackets]"
+ .file "{braces}"
+
+ # thumb (arm sub-target)
+ .file "slash/data"
+
+ # xtensa (through --rename-section file.s=file.c)
+ .file "file.s"