mirror of
https://sourceware.org/git/binutils-gdb.git
synced 2024-11-25 19:14:52 +08:00
* 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.
This commit is contained in:
parent
451ffe6311
commit
63f2573fe4
@ -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.
|
||||
|
9
ld/testsuite/ld-cris/expdref3.s
Normal file
9
ld/testsuite/ld-cris/expdref3.s
Normal file
@ -0,0 +1,9 @@
|
||||
.text
|
||||
.global x
|
||||
.type x,@function
|
||||
x:
|
||||
move.d expobj2,$r10
|
||||
move.d expfn2,$r10
|
||||
.Lfe1:
|
||||
.size x,.Lfe1-x
|
||||
|
7
ld/testsuite/ld-cris/expdref4.s
Normal file
7
ld/testsuite/ld-cris/expdref4.s
Normal file
@ -0,0 +1,7 @@
|
||||
.data
|
||||
.global x
|
||||
.type x,@object
|
||||
x:
|
||||
.dword expobj2
|
||||
.Lfe1:
|
||||
.size x,.Lfe1-x
|
@ -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
|
||||
|
36
ld/testsuite/ld-cris/weakref3.d
Normal file
36
ld/testsuite/ld-cris/weakref3.d
Normal file
@ -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 .*
|
32
ld/testsuite/ld-cris/weakref4.d
Normal file
32
ld/testsuite/ld-cris/weakref4.d
Normal file
@ -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 .*
|
||||
|
Loading…
Reference in New Issue
Block a user