ld-cris/weakref4.d: New tests.
* ld-cris/libdso-15b.d: Adjust for recent weakref fix.
+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.
--- /dev/null
+ .text
+ .global x
+ .type x,@function
+x:
+ move.d expobj2,$r10
+ move.d expfn2,$r10
+.Lfe1:
+ .size x,.Lfe1-x
+
--- /dev/null
+ .data
+ .global x
+ .type x,@object
+x:
+ .dword expobj2
+.Lfe1:
+ .size x,.Lfe1-x
# 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
--- /dev/null
+#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 .*
--- /dev/null
+#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 .*
+