diff options
author | Hans-Peter Nilsson <hp@axis.com> | 2002-07-12 15:51:54 +0000 |
---|---|---|
committer | Hans-Peter Nilsson <hp@axis.com> | 2002-07-12 15:51:54 +0000 |
commit | f1cf2c2e58d26549bd69ae893073d35eb74abeac (patch) | |
tree | 6c2184fae10ef3a5630fd93875cdbd6bd2fe9bba /ld | |
parent | af5f3db67c5dcbbc7b2038fe781d03301b94783d (diff) | |
download | gdb-f1cf2c2e58d26549bd69ae893073d35eb74abeac.zip gdb-f1cf2c2e58d26549bd69ae893073d35eb74abeac.tar.gz gdb-f1cf2c2e58d26549bd69ae893073d35eb74abeac.tar.bz2 |
* ld-cris/nodyn4.d, ld-cris/expdyn4.d, ld-cris/comref1.s,
ld-cris/euwref1.s, ld-cris/expdyn3.d, ld-cris/expdyn2.d,
ld-cris/expdref1.s: New tests.
Diffstat (limited to 'ld')
-rw-r--r-- | ld/testsuite/ChangeLog | 6 | ||||
-rw-r--r-- | ld/testsuite/ld-cris/comref1.s | 8 | ||||
-rw-r--r-- | ld/testsuite/ld-cris/euwref1.s | 8 | ||||
-rw-r--r-- | ld/testsuite/ld-cris/expdref1.s | 6 | ||||
-rw-r--r-- | ld/testsuite/ld-cris/expdyn2.d | 16 | ||||
-rw-r--r-- | ld/testsuite/ld-cris/expdyn3.d | 12 | ||||
-rw-r--r-- | ld/testsuite/ld-cris/expdyn4.d | 12 | ||||
-rw-r--r-- | ld/testsuite/ld-cris/nodyn4.d | 19 |
8 files changed, 87 insertions, 0 deletions
diff --git a/ld/testsuite/ChangeLog b/ld/testsuite/ChangeLog index 1151b3f..ff64b79 100644 --- a/ld/testsuite/ChangeLog +++ b/ld/testsuite/ChangeLog @@ -1,3 +1,9 @@ +2002-07-12 Hans-Peter Nilsson <hp@axis.com> + + * ld-cris/nodyn4.d, ld-cris/expdyn4.d, ld-cris/comref1.s, + ld-cris/euwref1.s, ld-cris/expdyn3.d, ld-cris/expdyn2.d, + ld-cris/expdref1.s: New tests. + 2002-07-09 Richard Sandiford <rsandifo@redhat.com> * ld-scripts/dynamic-sections*: New test. diff --git a/ld/testsuite/ld-cris/comref1.s b/ld/testsuite/ld-cris/comref1.s new file mode 100644 index 0000000..5be25d8 --- /dev/null +++ b/ld/testsuite/ld-cris/comref1.s @@ -0,0 +1,8 @@ + .text +y: + .comm c1,4,1 + .comm c2,4,1 + .comm c3,4,1 + move.d c1,$r10 + move.d c2:GOT,$r10 + move.d c3:PLT,$r10 diff --git a/ld/testsuite/ld-cris/euwref1.s b/ld/testsuite/ld-cris/euwref1.s new file mode 100644 index 0000000..5d21f4a --- /dev/null +++ b/ld/testsuite/ld-cris/euwref1.s @@ -0,0 +1,8 @@ + .text +y: + .weak uw1 + .weak uw2 + .weak uw3 + move.d uw1,$r10 + move.d uw2:GOT,$r10 + move.d uw3:PLT,$r10 diff --git a/ld/testsuite/ld-cris/expdref1.s b/ld/testsuite/ld-cris/expdref1.s new file mode 100644 index 0000000..58faa60 --- /dev/null +++ b/ld/testsuite/ld-cris/expdref1.s @@ -0,0 +1,6 @@ + .text +x: + move.d expobj:GOT,$r10 + move.d expobj:PLT,$r10 + move.d expfn:GOT,$r10 + move.d expfn:PLT,$r10 diff --git a/ld/testsuite/ld-cris/expdyn2.d b/ld/testsuite/ld-cris/expdyn2.d new file mode 100644 index 0000000..714396e --- /dev/null +++ b/ld/testsuite/ld-cris/expdyn2.d @@ -0,0 +1,16 @@ +#source: expdyn1.s +#source: expdref1.s --pic +#as: --no-underscore +#ld: -m crislinux --export-dynamic tmpdir/libdso-1.so +#objdump: -R + +# Programs linked with --export-dynamic threw away .rela.got for exported +# symbols, but since got reference counter wasn't reset, there was a SEGV +# trying to generate the .rela.got relocations. In this test, we have an +# object in the program that has pic-relocations to an exported symbol, +# but those relocations can be resolved at link-time. We link to a DSO to +# get dynamic linking. + +.*: file format elf32-cris + +DYNAMIC RELOCATION RECORDS \(none\) diff --git a/ld/testsuite/ld-cris/expdyn3.d b/ld/testsuite/ld-cris/expdyn3.d new file mode 100644 index 0000000..f16f819 --- /dev/null +++ b/ld/testsuite/ld-cris/expdyn3.d @@ -0,0 +1,12 @@ +#source: expdyn1.s +#source: expdref1.s --pic +#source: euwref1.s --pic +#as: --no-underscore +#ld: -m crislinux --export-dynamic tmpdir/libdso-1.so +#objdump: -R + +# Like expdyn2.d, but also weakly referencing symbols. + +.*: file format elf32-cris + +DYNAMIC RELOCATION RECORDS \(none\) diff --git a/ld/testsuite/ld-cris/expdyn4.d b/ld/testsuite/ld-cris/expdyn4.d new file mode 100644 index 0000000..31ce664 --- /dev/null +++ b/ld/testsuite/ld-cris/expdyn4.d @@ -0,0 +1,12 @@ +#source: expdyn1.s +#source: expdref1.s --pic +#source: comref1.s --pic +#as: --no-underscore +#ld: -m crislinux --export-dynamic tmpdir/libdso-1.so +#objdump: -R + +# Like expdyn2.d, but referencing COMMON symbols. + +.*: file format elf32-cris + +DYNAMIC RELOCATION RECORDS \(none\) diff --git a/ld/testsuite/ld-cris/nodyn4.d b/ld/testsuite/ld-cris/nodyn4.d new file mode 100644 index 0000000..3baa4e1 --- /dev/null +++ b/ld/testsuite/ld-cris/nodyn4.d @@ -0,0 +1,19 @@ +#source: expdyn1.s +#source: expdref1.s --pic +#source: comref1.s --pic +#as: --no-underscore +#ld: -m crislinux +#readelf: -l + +# Like expdyn4.d, but no --export-dynamic. Got a BFD_ASSERT at one time. +# Check that we get the expected sections. + +#... +There are 2 program headers, .* +#... + LOAD [0-9a-fx ]+ R E 0x2000 + LOAD [0-9a-fx ]+ RW 0x2000 +#... + 00 \.text[ ]* + 01 \.data \.got \.bss[ ]* +#pass |