]> git.ipfire.org Git - thirdparty/binutils-gdb.git/commitdiff
* ld-cris/expdref3.s, ld-cris/expdref4.s, ld-cris/weakref3.d,
authorHans-Peter Nilsson <hp@axis.com>
Mon, 19 Jan 2009 17:33:26 +0000 (17:33 +0000)
committerHans-Peter Nilsson <hp@axis.com>
Mon, 19 Jan 2009 17:33:26 +0000 (17:33 +0000)
ld-cris/weakref4.d: New tests.
* ld-cris/libdso-15b.d: Adjust for recent weakref fix.

ld/testsuite/ChangeLog
ld/testsuite/ld-cris/expdref3.s [new file with mode: 0644]
ld/testsuite/ld-cris/expdref4.s [new file with mode: 0644]
ld/testsuite/ld-cris/libdso-15b.d
ld/testsuite/ld-cris/weakref3.d [new file with mode: 0644]
ld/testsuite/ld-cris/weakref4.d [new file with mode: 0644]

index 3c9fac770905cd9c03561315f931c119130f452e..ee3615b7d55c7c239a696683cd5a93673e8cf24f 100644 (file)
@@ -1,3 +1,9 @@
+2009-01-19  Hans-Peter Nilsson  <hp@axis.com>
+
+       * ld-cris/expdref3.s, ld-cris/expdref4.s, ld-cris/weakref3.d,
+       ld-cris/weakref4.d: New tests.
+       * ld-cris/libdso-15b.d: Adjust for recent weakref fix.
+
 2009-01-19  H.J. Lu  <hongjiu.lu@intel.com>
 
        * ld-elf/group9.s: Replace .byte with .long.
diff --git a/ld/testsuite/ld-cris/expdref3.s b/ld/testsuite/ld-cris/expdref3.s
new file mode 100644 (file)
index 0000000..dd35893
--- /dev/null
@@ -0,0 +1,9 @@
+ .text
+ .global x
+ .type x,@function
+x:
+ move.d expobj2,$r10
+ move.d expfn2,$r10
+.Lfe1:
+ .size x,.Lfe1-x
+
diff --git a/ld/testsuite/ld-cris/expdref4.s b/ld/testsuite/ld-cris/expdref4.s
new file mode 100644 (file)
index 0000000..e639039
--- /dev/null
@@ -0,0 +1,7 @@
+ .data
+ .global x
+ .type x,@object
+x:
+ .dword expobj2
+.Lfe1:
+ .size x,.Lfe1-x
index 0f14c5ea83e6b4f70a21412076cf5d8920216e74..308b110f35f866835c4504471b09e32ede3351d2 100644 (file)
@@ -9,12 +9,14 @@
 # definition is also in the other DSO.
 # There was a bug causing GOT markups to be during symbol handling,
 # with a newly added assertion failure and a reloc turned R_CRIS_NONE.
+# The dynamic __expobj2 entry is unused and seems spurious, or there
+# should at least be a similar __expfn2 reference
 
 .*:     file format elf32-cris
 
 DYNAMIC SYMBOL TABLE:
 #...
-0+  w[  ]+DO \*UND\*[   ]+0+  TST3[     ]+__expobj2
+0+[     ]+DO \*UND\*[   ]+0+  TST3[     ]+__expobj2
 #...
 0+[     ]+DO \*UND\*[   ]+0+  TST3[     ]+expobj2
 0+[     ]+DF \*UND\*[   ]+0+  TST3[     ]+expfn2
diff --git a/ld/testsuite/ld-cris/weakref3.d b/ld/testsuite/ld-cris/weakref3.d
new file mode 100644 (file)
index 0000000..492ef41
--- /dev/null
@@ -0,0 +1,36 @@
+#source: start1.s
+#source: expdref3.s
+#as: --no-underscore --em=criself
+#ld: -m crislinux
+#ld_after_inputfiles: tmpdir/libdso-15.so
+#readelf: -a -x 10
+
+# Like libdso-15b.d, but referencing the weak symbol and function from
+# a program.  At some time we broke emitting a copy reloc for the
+# object, instead yielding NULL.
+
+#...
+  \[[0-9]+\] .got              PROGBITS        0+82314 000314 000010 04  WA  0   0  4
+#...
+  \[[0-9]+\] .bss              NOBITS          0+82324 .*
+#...
+Relocation section '.rela.dyn' at offset 0x... contains 1 entries:
+ Offset     Info    Type            Sym.Value  Sym. Name \+ Addend
+00082324  00000109 R_CRIS_COPY       00082324   __expobj2 \+ 0
+
+Relocation section '.rela.plt' at offset 0x... contains 1 entries:
+ Offset     Info    Type            Sym.Value  Sym. Name \+ Addend
+00082320  0000030b R_CRIS_JUMP_SLOT  00080238   expfn2 \+ 0
+
+There are no unwind sections in this file.
+
+Symbol table '.dynsym' contains . entries:
+#...
+     .: 00082324     4 OBJECT  GLOBAL DEFAULT   13 __expobj2@TST3 \(2\)
+#...
+     .: 00080238     0 FUNC    GLOBAL DEFAULT  UND expfn2@TST3 \(2\)
+#...
+Symbol table '.symtab' contains .. entries:
+#...
+Hex dump of section '\.text':
+  0x0008024c 41b20000 6fae2423 08006fae 38020800 .*
diff --git a/ld/testsuite/ld-cris/weakref4.d b/ld/testsuite/ld-cris/weakref4.d
new file mode 100644 (file)
index 0000000..8b19f2f
--- /dev/null
@@ -0,0 +1,32 @@
+#source: start1.s
+#source: expdref4.s
+#as: --no-underscore --em=criself
+#ld: -m crislinux
+#ld_after_inputfiles: tmpdir/libdso-15.so
+#readelf: -a -x 11
+
+# Like weakref3.d, but just the expobj2 referenced from .data.  We
+# should avoid a copy reloc (instead emitting a R_CRIS_GLOB_DAT or
+# R_CRIS_32 against the weak symbol), but for the time being, make
+# sure we get a valid reloc.
+
+#...
+  \[[0-9]+\] .data             PROGBITS        0+822a4 0002a4 000004 00  WA  0   0  1
+#...
+  \[[0-9]+\] .bss              NOBITS          0+822a8 .*
+#...
+Relocation section '.rela.dyn' at offset 0x... contains 1 entries:
+#...
+000822a8  00000109 R_CRIS_COPY       000822a8   __expobj2 \+ 0
+
+There are no unwind sections in this file.
+
+Symbol table '.dynsym' contains . entries:
+#...
+     .: 000822a8     4 OBJECT  GLOBAL DEFAULT   12 __expobj2@TST3 \(2\)
+#...
+Symbol table '.symtab' contains .. entries:
+#...
+Hex dump of section '.data':
+  0x000822a4 a8220800                            .*
+