]> git.ipfire.org Git - thirdparty/binutils-gdb.git/commitdiff
Fix problem parsing symbol version strings when they are preceeded by whitespace.
authorNick Clifton <nickc@redhat.com>
Tue, 29 Apr 2003 11:52:37 +0000 (11:52 +0000)
committerNick Clifton <nickc@redhat.com>
Tue, 29 Apr 2003 11:52:37 +0000 (11:52 +0000)
Add test to catch this problem in the future.

gas/ChangeLog
gas/config/obj-elf.c
gas/testsuite/ChangeLog
gas/testsuite/gas/elf/elf.exp
gas/testsuite/gas/elf/symver.d [new file with mode: 0644]
gas/testsuite/gas/elf/symver.s [new file with mode: 0644]

index f9eec49a12071516e191b2343d9f27d015469962..3417eb236eb6d2973dc2419eef6975f6752352c3 100644 (file)
@@ -1,3 +1,8 @@
+2003-04-29  Nick Clifton  <nickc@redhat.com>
+
+       * config/obj-elf.c (obj_elf_symver): Skip whitespace before the
+       start of a version name.
+
 2003-04-28  Chris Demetriou  <cgd@broadcom.com>
 
        * configure.in (mips-*-*n*bsd*): Replace with...
index 6c15704fe5d8165206aa8e8387fbed1c9e1fb33e..7c2423c11bd2e9037bc8a46f5943cda107734ec3 100644 (file)
@@ -1269,6 +1269,7 @@ obj_elf_symver (ignore)
     }
 
   ++input_line_pointer;
+  SKIP_WHITESPACE ();
   name = input_line_pointer;
 
   /* Temporarily include '@' in symbol names.  */
index e619931f285729699ee68a07588d7536f313a1ed..381233ce7376ce1704ecfce2be8b044956cfb707 100644 (file)
@@ -1,3 +1,9 @@
+2003-04-29  Nick Clifton  <nickc@redhat.com>
+
+       * gas/elf/elf.exp: Invoke symver test.
+        * gas/elf/symver.s: New test case.
+        * gas/elf/symver.d: Expected output.
+
 2003-04-24  Nick Clifton  <nickc@redhat.com>
 
        * gas/ppc/astest2.s: Add tests for conditional branches with
index a967cb7d43c58da5bc6f553c9ccb32204c0162e6..c9aa34d5f180571015944539b186c1552a3a3081 100644 (file)
@@ -53,4 +53,5 @@ if { ([istarget "*-*-elf*"]
     run_dump_test "section0" 
     run_dump_test "section1" 
     run_list_test "section2" "$target_machine" "-al"
+    run_dump_test "symver" 
 }
diff --git a/gas/testsuite/gas/elf/symver.d b/gas/testsuite/gas/elf/symver.d
new file mode 100644 (file)
index 0000000..67b8a4c
--- /dev/null
@@ -0,0 +1,17 @@
+#objdump: --syms
+#name: ELF symbol versioning
+#
+# The #... and #pass are there to match extra symbols inserted by
+# some toolchains, eg the mips-elf port will add .reginfo and .ptrd
+
+dump.o:     file format .*
+
+SYMBOL TABLE:
+
+0+000 l.*d.*\.text.*0+000.*
+0+000 l.*d.*\.data.*0+000.*
+0+000 l.*d.*\.bss.*0+000.*
+#...
+0+000 l.*O.*\.data.*0+004 x
+0+000 l.*O.*\.data.*0+004 x@VERS\.0
+#pass
diff --git a/gas/testsuite/gas/elf/symver.s b/gas/testsuite/gas/elf/symver.s
new file mode 100644 (file)
index 0000000..dd2315b
--- /dev/null
@@ -0,0 +1,6 @@
+        .data
+        .type   x,@object
+        .size   x,4
+x:
+        .word 12
+        .symver x, x@VERS.0