diff options
author | Nick Clifton <nickc@redhat.com> | 2004-04-20 12:17:16 +0000 |
---|---|---|
committer | Nick Clifton <nickc@redhat.com> | 2004-04-20 12:17:16 +0000 |
commit | 6482c264f4a6d239f2abd356e09ae465e74efeb1 (patch) | |
tree | 7ff3cb95f0c24d9341f9366e551a0e23bdb5d9bf /ld | |
parent | b4781d441cad5589faa6e3fcbfcfb20d28cc7579 (diff) | |
download | gdb-6482c264f4a6d239f2abd356e09ae465e74efeb1.zip gdb-6482c264f4a6d239f2abd356e09ae465e74efeb1.tar.gz gdb-6482c264f4a6d239f2abd356e09ae465e74efeb1.tar.bz2 |
Add support for a .secrel32 x86 reloc to allow DWARF" debug information to used
with COFF based x86 ports.
Diffstat (limited to 'ld')
-rw-r--r-- | ld/testsuite/ChangeLog | 8 | ||||
-rw-r--r-- | ld/testsuite/ld-pe/pe.exp | 31 | ||||
-rw-r--r-- | ld/testsuite/ld-pe/secrel.d | 27 | ||||
-rw-r--r-- | ld/testsuite/ld-pe/secrel1.s | 77 | ||||
-rw-r--r-- | ld/testsuite/ld-pe/secrel2.s | 14 |
5 files changed, 157 insertions, 0 deletions
diff --git a/ld/testsuite/ChangeLog b/ld/testsuite/ChangeLog index 1849b20..d682835 100644 --- a/ld/testsuite/ChangeLog +++ b/ld/testsuite/ChangeLog @@ -1,3 +1,11 @@ +2004-04-14 Brian Ford <ford@vss.fsi.com> + DJ Delorie <dj@redhat.com> + + * ld-pe/pe.exp: New, tests for i?86 PE. + * ld-pe/secrel1.s: New, test R_SECREL32 reloc. + * ld-pe/secrel2.s: Likewise. + * ld-pe/secrel.d: Likewise. + 2004-04-19 Jakub Jelinek <jakub@redhat.com> * ld-elfvsb/elfvsb.exp: XFAIL some tests on sparc64. diff --git a/ld/testsuite/ld-pe/pe.exp b/ld/testsuite/ld-pe/pe.exp new file mode 100644 index 0000000..cbdae79 --- /dev/null +++ b/ld/testsuite/ld-pe/pe.exp @@ -0,0 +1,31 @@ +# Expect script for export table in executables tests
+# Copyright 2004
+# Free Software Foundation, Inc.
+#
+# This file is free software; you can redistribute it and/or modify
+# it under the terms of the GNU General Public License as published by
+# the Free Software Foundation; either version 2 of the License, or
+# (at your option) any later version.
+#
+# This program is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+# GNU General Public License for more details.
+#
+# You should have received a copy of the GNU General Public License
+# along with this program; if not, write to the Free Software
+# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
+#
+
+# This test can only be run on i386 PE/COFF platforms.
+if { ![istarget i*86-*-cygwin*] && ![istarget i*86-*-pe]
+ && ![istarget i*86-*-mingw*] } {
+ return
+}
+
+set pe_tests {
+ {".secrel32" "" "" {secrel1.s secrel2.s}
+ {{objdump -s secrel.d}} "secrel.x"}
+}
+
+run_ld_link_tests $pe_tests
diff --git a/ld/testsuite/ld-pe/secrel.d b/ld/testsuite/ld-pe/secrel.d new file mode 100644 index 0000000..9c5d9a3 --- /dev/null +++ b/ld/testsuite/ld-pe/secrel.d @@ -0,0 +1,27 @@ +
+tmpdir/secrel\.x: file format pei-i386
+
+Contents of section \.text:
+ 401000 3e3e3e3e 3c3c3c3c 3e3e3e3e 3e3c3c3c >>>><<<<>>>>><<<
+ 401010 3e3e3e3e 3e3e3c3c 3e3e3e3e 3e3e3e3c >>>>>><<>>>>>>><
+ 401020 3e3e3e3e 3c3c3c3c 3e3e3e3e 3e3c3c3c >>>><<<<>>>>><<<
+ 401030 3e3e3e3e 3e3e3c3c 3e3e3e3e 3e3e3e3c >>>>>><<>>>>>>><
+ 401040 ........ ........ ........ ........ ................
+Contents of section \.data:
+ 402000 3e3e3e3e 3c3c3c3c 3e3e3e3e 3e3c3c3c >>>><<<<>>>>><<<
+ 402010 3e3e3e3e 3e3e3c3c 3e3e3e3e 3e3e3e3c >>>>>><<>>>>>>><
+ 402020 3e3e3e3e 04000000 110d0000 00111600 >>>>............
+ 402030 0000111f 00000011 3c3c3c3c 3c3c3c3c ........<<<<<<<<
+ 402040 3e3e3e3e 04000000 110d0000 00111600 >>>>............
+ 402050 0000111f 00000011 3c3c3c3c 3c3c3c3c ........<<<<<<<<
+ 402060 3e3e3e3e 04000000 110d0000 00111600 >>>>............
+ 402070 0000111f 00000011 3c3c3c3c 3c3c3c3c ........<<<<<<<<
+ 402080 3e3e3e3e 24000000 112d0000 00113600 >>>>\$....-....6.
+ 402090 0000113f 00000011 3c3c3c3c 3c3c3c3c ...\?....<<<<<<<<
+Contents of section \.rdata:
+ 403000 3e3e3e3e 3c3c3c3c 3e3e3e3e 3e3c3c3c >>>><<<<>>>>><<<
+ 403010 3e3e3e3e 3e3e3c3c 3e3e3e3e 3e3e3e3c >>>>>><<>>>>>>><
+ 403020 3e3e3e3e >>>>
+Contents of section \.idata:
+ 404000 00000000 00000000 00000000 00000000 ................
+ 404010 00000000 ....
diff --git a/ld/testsuite/ld-pe/secrel1.s b/ld/testsuite/ld-pe/secrel1.s new file mode 100644 index 0000000..eaf59cd --- /dev/null +++ b/ld/testsuite/ld-pe/secrel1.s @@ -0,0 +1,77 @@ +.text
+
+ .ascii ">>>>"
+pre04: .ascii "<<<<"
+ .ascii ">>>>>"
+pre0d: .ascii "<<<"
+ .ascii ">>>>>>"
+pre16: .ascii "<<"
+ .ascii ">>>>>>>"
+pre1f: .ascii "<"
+
+.data
+
+ .ascii ">>>>"
+sam04: .ascii "<<<<"
+ .ascii ">>>>>"
+sam0d: .ascii "<<<"
+ .ascii ">>>>>>"
+sam16: .ascii "<<"
+ .ascii ">>>>>>>"
+sam1f: .ascii "<"
+
+ .ascii ">>>>"
+ .secrel32 pre04
+ .byte 0x11
+ .secrel32 pre0d
+ .byte 0x11
+ .secrel32 pre16
+ .byte 0x11
+ .secrel32 pre1f
+ .byte 0x11
+ .ascii "<<<<<<<<"
+
+ .ascii ">>>>"
+ .secrel32 sam04
+ .byte 0x11
+ .secrel32 sam0d
+ .byte 0x11
+ .secrel32 sam16
+ .byte 0x11
+ .secrel32 sam1f
+ .byte 0x11
+ .ascii "<<<<<<<<"
+
+ .ascii ">>>>"
+ .secrel32 nex04
+ .byte 0x11
+ .secrel32 nex0d
+ .byte 0x11
+ .secrel32 nex16
+ .byte 0x11
+ .secrel32 nex1f
+ .byte 0x11
+ .ascii "<<<<<<<<"
+
+ .ascii ">>>>"
+ .secrel32 ext24
+ .byte 0x11
+ .secrel32 ext2d
+ .byte 0x11
+ .secrel32 ext36
+ .byte 0x11
+ .secrel32 ext3f
+ .byte 0x11
+ .ascii "<<<<<<<<"
+
+.section .rdata
+
+ .ascii ">>>>"
+nex04: .ascii "<<<<"
+ .ascii ">>>>>"
+nex0d: .ascii "<<<"
+ .ascii ">>>>>>"
+nex16: .ascii "<<"
+ .ascii ">>>>>>>"
+nex1f: .ascii "<"
+ .ascii ">>>>"
diff --git a/ld/testsuite/ld-pe/secrel2.s b/ld/testsuite/ld-pe/secrel2.s new file mode 100644 index 0000000..a1f871f --- /dev/null +++ b/ld/testsuite/ld-pe/secrel2.s @@ -0,0 +1,14 @@ +.text
+
+ .ascii ">>>>"
+.global ext24
+ext24: .ascii "<<<<"
+ .ascii ">>>>>"
+.global ext2d
+ext2d: .ascii "<<<"
+ .ascii ">>>>>>"
+.global ext36
+ext36: .ascii "<<"
+ .ascii ">>>>>>>"
+.global ext3f
+ext3f: .ascii "<"
|