From e68ed250e82e049bff0f537a1a3d3c5afc15854b Mon Sep 17 00:00:00 2001 From: Richard Sandiford Date: Tue, 15 May 2007 12:22:34 +0000 Subject: ld/testsuite/ * ld-arm/vxworks1.ld: Swap .bss and .data. * ld-arm/vxworks1-lib.rd: Update accordingly. * ld-arm/vxworks1-lib.td: New test. * ld-arm/arm-elf.exp: Run it. * ld-i386/vxworks1.ld: Swap .bss and .data. * ld-i386/vxworks1-lib.rd: Update accordingly. * ld-i386/vxworks1-lib.td: New test. * ld-i386/i386.exp: Run it. * ld-mips-elf/vxworks1.ld: Swap .bss and .data. * ld-mips-elf/vxworks1-lib.rd: Update accordingly. * ld-mips-elf/vxworks1.rd: Likewise. * ld-powerpc/vxworks1.ld: Swap .bss and .data. * ld-powerpc/vxworks1-lib.rd: Update accordingly. * ld-powerpc/vxworks1-lib.td: New test. * ld-powerpc/powerpc.exp: Run it. * ld-sh/vxworks1.ld: Swap .bss and .data. * ld-sh/vxworks1-lib.rd: Update accordingly. * ld-sh/vxworks1-lib.td: New test. * ld-sh/sh-vxworks.exp: Run it. * ld-sparc/vxworks1.ld: Swap .bss and .data. * ld-sparc/vxworks1-lib.rd: Update accordingly. * ld-sparc/vxworks1-lib.td: New test. * ld-sparc/sparc.exp: Run it. --- ld/testsuite/ChangeLog | 31 +++++++++++++++++++++++++++++++ ld/testsuite/ld-arm/arm-elf.exp | 2 +- ld/testsuite/ld-arm/vxworks1-lib.rd | 4 ++-- ld/testsuite/ld-arm/vxworks1-lib.td | 3 +++ ld/testsuite/ld-arm/vxworks1.ld | 4 ++-- ld/testsuite/ld-i386/i386.exp | 2 +- ld/testsuite/ld-i386/vxworks1-lib.rd | 4 ++-- ld/testsuite/ld-i386/vxworks1-lib.td | 3 +++ ld/testsuite/ld-i386/vxworks1.ld | 4 ++-- ld/testsuite/ld-mips-elf/vxworks1-lib.rd | 10 +++++----- ld/testsuite/ld-mips-elf/vxworks1.ld | 4 ++-- ld/testsuite/ld-mips-elf/vxworks1.rd | 8 ++++---- ld/testsuite/ld-powerpc/powerpc.exp | 2 +- ld/testsuite/ld-powerpc/vxworks1-lib.rd | 4 ++-- ld/testsuite/ld-powerpc/vxworks1-lib.td | 3 +++ ld/testsuite/ld-powerpc/vxworks1.ld | 4 ++-- ld/testsuite/ld-sh/sh-vxworks.exp | 2 +- ld/testsuite/ld-sh/vxworks1-lib.rd | 4 ++-- ld/testsuite/ld-sh/vxworks1-lib.td | 3 +++ ld/testsuite/ld-sh/vxworks1.ld | 4 ++-- ld/testsuite/ld-sparc/sparc.exp | 2 +- ld/testsuite/ld-sparc/vxworks1-lib.rd | 4 ++-- ld/testsuite/ld-sparc/vxworks1-lib.td | 3 +++ ld/testsuite/ld-sparc/vxworks1.ld | 4 ++-- 24 files changed, 82 insertions(+), 36 deletions(-) create mode 100644 ld/testsuite/ld-arm/vxworks1-lib.td create mode 100644 ld/testsuite/ld-i386/vxworks1-lib.td create mode 100644 ld/testsuite/ld-powerpc/vxworks1-lib.td create mode 100644 ld/testsuite/ld-sh/vxworks1-lib.td create mode 100644 ld/testsuite/ld-sparc/vxworks1-lib.td (limited to 'ld') diff --git a/ld/testsuite/ChangeLog b/ld/testsuite/ChangeLog index 4214809..57a5d05 100644 --- a/ld/testsuite/ChangeLog +++ b/ld/testsuite/ChangeLog @@ -1,5 +1,36 @@ 2007-05-15 Richard Sandiford + * ld-arm/vxworks1.ld: Swap .bss and .data. + * ld-arm/vxworks1-lib.rd: Update accordingly. + * ld-arm/vxworks1-lib.td: New test. + * ld-arm/arm-elf.exp: Run it. + + * ld-i386/vxworks1.ld: Swap .bss and .data. + * ld-i386/vxworks1-lib.rd: Update accordingly. + * ld-i386/vxworks1-lib.td: New test. + * ld-i386/i386.exp: Run it. + + * ld-mips-elf/vxworks1.ld: Swap .bss and .data. + * ld-mips-elf/vxworks1-lib.rd: Update accordingly. + * ld-mips-elf/vxworks1.rd: Likewise. + + * ld-powerpc/vxworks1.ld: Swap .bss and .data. + * ld-powerpc/vxworks1-lib.rd: Update accordingly. + * ld-powerpc/vxworks1-lib.td: New test. + * ld-powerpc/powerpc.exp: Run it. + + * ld-sh/vxworks1.ld: Swap .bss and .data. + * ld-sh/vxworks1-lib.rd: Update accordingly. + * ld-sh/vxworks1-lib.td: New test. + * ld-sh/sh-vxworks.exp: Run it. + + * ld-sparc/vxworks1.ld: Swap .bss and .data. + * ld-sparc/vxworks1-lib.rd: Update accordingly. + * ld-sparc/vxworks1-lib.td: New test. + * ld-sparc/sparc.exp: Run it. + +2007-05-15 Richard Sandiford + * ld-mips-elf/vxworks1-lib.rd: Expect the GOT relocation to be against symbol 0. diff --git a/ld/testsuite/ld-arm/arm-elf.exp b/ld/testsuite/ld-arm/arm-elf.exp index 6442df4..942d67f 100644 --- a/ld/testsuite/ld-arm/arm-elf.exp +++ b/ld/testsuite/ld-arm/arm-elf.exp @@ -21,7 +21,7 @@ if {[istarget "arm-*-vxworks"]} { {"VxWorks shared library test 1" "-shared -Tvxworks1.ld" "" {vxworks1-lib.s} {{readelf --relocs vxworks1-lib.rd} {objdump -dr vxworks1-lib.dd} - {readelf --symbols vxworks1-lib.nd}} + {readelf --symbols vxworks1-lib.nd} {readelf -d vxworks1-lib.td}} "libvxworks1.so"} {"VxWorks executable test 1 (dynamic)" \ "tmpdir/libvxworks1.so -Tvxworks1.ld -q --force-dynamic" diff --git a/ld/testsuite/ld-arm/vxworks1-lib.rd b/ld/testsuite/ld-arm/vxworks1-lib.rd index c4c46f6..226bd09 100644 --- a/ld/testsuite/ld-arm/vxworks1-lib.rd +++ b/ld/testsuite/ld-arm/vxworks1-lib.rd @@ -6,7 +6,7 @@ Relocation section '\.rela\.plt' at offset .* contains 2 entries: Relocation section '\.rela\.dyn' at offset .* contains 4 entries: Offset Info Type Sym\.Value Sym\. Name \+ Addend -00081c00 00000017 R_ARM_RELATIVE * 00080c38 +00081800 00000017 R_ARM_RELATIVE * 00080c38 00080c0c .*06 R_ARM_ABS12 00000000 __GOTT_INDEX__ \+ 0 00080c30 .*02 R_ARM_ABS32 00000000 __GOTT_BASE__ \+ 0 -00081414 .*15 R_ARM_GLOB_DAT 00081800 x \+ 0 +00081414 .*15 R_ARM_GLOB_DAT 00081c00 x \+ 0 diff --git a/ld/testsuite/ld-arm/vxworks1-lib.td b/ld/testsuite/ld-arm/vxworks1-lib.td new file mode 100644 index 0000000..9f223e3 --- /dev/null +++ b/ld/testsuite/ld-arm/vxworks1-lib.td @@ -0,0 +1,3 @@ +#... + 0x0+16 \(TEXTREL\) +0x0 +#pass diff --git a/ld/testsuite/ld-arm/vxworks1.ld b/ld/testsuite/ld-arm/vxworks1.ld index ec5039d..65bf65d 100644 --- a/ld/testsuite/ld-arm/vxworks1.ld +++ b/ld/testsuite/ld-arm/vxworks1.ld @@ -23,8 +23,8 @@ SECTIONS .got : { *(.got.plt) *(.got) } . = ALIGN (0x400); - .bss : { *(.bss) *(.dynbss) } + .data : { *(.data) } . = ALIGN (0x400); - .data : { *(.data) } + .bss : { *(.bss) *(.dynbss) } } diff --git a/ld/testsuite/ld-i386/i386.exp b/ld/testsuite/ld-i386/i386.exp index 1032e8e..989d392 100644 --- a/ld/testsuite/ld-i386/i386.exp +++ b/ld/testsuite/ld-i386/i386.exp @@ -24,7 +24,7 @@ if {[istarget "i?86-*-vxworks"]} { {"VxWorks shared library test 1" "-shared -Tvxworks1.ld" "" {vxworks1-lib.s} {{readelf --relocs vxworks1-lib.rd} {objdump -dr vxworks1-lib.dd} - {readelf --symbols vxworks1-lib.nd}} + {readelf --symbols vxworks1-lib.nd} {readelf -d vxworks1-lib.td}} "libvxworks1.so"} {"VxWorks executable test 1 (dynamic)" \ "tmpdir/libvxworks1.so -Tvxworks1.ld -q --force-dynamic" diff --git a/ld/testsuite/ld-i386/vxworks1-lib.rd b/ld/testsuite/ld-i386/vxworks1-lib.rd index ab567b6..61ff293 100644 --- a/ld/testsuite/ld-i386/vxworks1-lib.rd +++ b/ld/testsuite/ld-i386/vxworks1-lib.rd @@ -6,7 +6,7 @@ Relocation section '\.rel\.plt' at offset .* contains 2 entries: Relocation section '\.rel\.dyn' at offset .* contains 4 entries: Offset Info Type Sym\.Value Sym\. Name -00081c00 00000008 R_386_RELATIVE * +00081800 00000008 R_386_RELATIVE * 00080c03 .*01 R_386_32 00000000 __GOTT_BASE__ 00080c09 .*01 R_386_32 00000000 __GOTT_INDEX__ -00081414 .*06 R_386_GLOB_DAT 00081800 x +00081414 .*06 R_386_GLOB_DAT 00081c00 x diff --git a/ld/testsuite/ld-i386/vxworks1-lib.td b/ld/testsuite/ld-i386/vxworks1-lib.td new file mode 100644 index 0000000..9f223e3 --- /dev/null +++ b/ld/testsuite/ld-i386/vxworks1-lib.td @@ -0,0 +1,3 @@ +#... + 0x0+16 \(TEXTREL\) +0x0 +#pass diff --git a/ld/testsuite/ld-i386/vxworks1.ld b/ld/testsuite/ld-i386/vxworks1.ld index ff25b39..ed76f18 100644 --- a/ld/testsuite/ld-i386/vxworks1.ld +++ b/ld/testsuite/ld-i386/vxworks1.ld @@ -23,8 +23,8 @@ SECTIONS .got : { *(.got.plt) *(.got) } . = ALIGN (0x400); - .bss : { *(.bss) *(.dynbss) } + .data : { *(.data) } . = ALIGN (0x400); - .data : { *(.data) } + .bss : { *(.bss) *(.dynbss) } } diff --git a/ld/testsuite/ld-mips-elf/vxworks1-lib.rd b/ld/testsuite/ld-mips-elf/vxworks1-lib.rd index 225fdea..56bc9a8 100644 --- a/ld/testsuite/ld-mips-elf/vxworks1-lib.rd +++ b/ld/testsuite/ld-mips-elf/vxworks1-lib.rd @@ -5,11 +5,11 @@ Relocation section '\.rela\.dyn' at offset .* contains .* entries: 00080c10 .*06 R_MIPS_LO16 00000000 __GOTT_BASE__ \+ 0 00080c14 .*01 R_MIPS_16 00000000 __GOTT_INDEX__ \+ 0 0008141c 00000002 R_MIPS_32 00080c5c -00081c00 00000002 R_MIPS_32 00080c5c -00081c04 00000002 R_MIPS_32 00081c00 -00081c08 .*02 R_MIPS_32 00081c08 dglobal \+ 0 -00081c0c .*02 R_MIPS_32 00000000 dexternal \+ 0 -00081424 .*02 R_MIPS_32 00081800 x \+ 0 +00081800 00000002 R_MIPS_32 00080c5c +00081804 00000002 R_MIPS_32 00081800 +00081808 .*02 R_MIPS_32 00081808 dglobal \+ 0 +0008180c .*02 R_MIPS_32 00000000 dexternal \+ 0 +00081424 .*02 R_MIPS_32 00081c00 x \+ 0 00000000 00000000 R_MIPS_NONE 00000000 #... Relocation section '\.rela\.plt' at offset .* contains 2 entries: diff --git a/ld/testsuite/ld-mips-elf/vxworks1.ld b/ld/testsuite/ld-mips-elf/vxworks1.ld index 74e2c26..8fe3c48 100644 --- a/ld/testsuite/ld-mips-elf/vxworks1.ld +++ b/ld/testsuite/ld-mips-elf/vxworks1.ld @@ -23,10 +23,10 @@ SECTIONS .got : { *(.got.plt) *(.got) } . = ALIGN (0x400); - .bss : { *(.bss) *(.dynbss) } + .data : { *(.data) } . = ALIGN (0x400); - .data : { *(.data) } + .bss : { *(.bss) *(.dynbss) } /DISCARD/ : { *(.reginfo) } } diff --git a/ld/testsuite/ld-mips-elf/vxworks1.rd b/ld/testsuite/ld-mips-elf/vxworks1.rd index f4793a2..f4455f5 100644 --- a/ld/testsuite/ld-mips-elf/vxworks1.rd +++ b/ld/testsuite/ld-mips-elf/vxworks1.rd @@ -1,7 +1,7 @@ Relocation section '\.rela\.dyn' at offset .* contains 1 entries: Offset Info Type Sym.Value Sym. Name \+ Addend -00081800 .*7e R_MIPS_COPY 00081800 dglobal \+ 0 +00081c00 .*7e R_MIPS_COPY 00081c00 dglobal \+ 0 Relocation section '\.rela\.plt' at offset .* contains 2 entries: Offset Info Type Sym\.Value Sym\. Name \+ Addend @@ -16,9 +16,9 @@ Relocation section '\.rela\.text' at offset .* contains 3 entries: Relocation section '\.rela\.data' at offset .* contains 3 entries: Offset Info Type Sym.Value Sym. Name \+ Addend -00081c00 .*02 R_MIPS_32 00081c00 .data \+ 0 -00081c04 .*02 R_MIPS_32 00081800 .bss \+ 0 -00081c08 .*02 R_MIPS_32 00081c04 dexternal \+ 0 +00081800 .*02 R_MIPS_32 00081800 .data \+ 0 +00081804 .*02 R_MIPS_32 00081c00 .bss \+ 0 +00081808 .*02 R_MIPS_32 00081804 dexternal \+ 0 Relocation section '\.rela\.plt\.unloaded' at offset .* contains 8 entries: Offset Info Type Sym\.Value Sym\. Name \+ Addend diff --git a/ld/testsuite/ld-powerpc/powerpc.exp b/ld/testsuite/ld-powerpc/powerpc.exp index 262cd3d..927c4b8 100644 --- a/ld/testsuite/ld-powerpc/powerpc.exp +++ b/ld/testsuite/ld-powerpc/powerpc.exp @@ -29,7 +29,7 @@ if {[istarget "*-*-vxworks"]} { {"VxWorks shared library test 1" "-shared -Tvxworks1.ld" "-mregnames" {vxworks1-lib.s} {{readelf --relocs vxworks1-lib.rd} {objdump -dr vxworks1-lib.dd} - {readelf --symbols vxworks1-lib.nd}} + {readelf --symbols vxworks1-lib.nd} {readelf -d vxworks1-lib.td}} "libvxworks1.so"} {"VxWorks executable test 1 (dynamic)" \ "tmpdir/libvxworks1.so -Tvxworks1.ld -q --force-dynamic" diff --git a/ld/testsuite/ld-powerpc/vxworks1-lib.rd b/ld/testsuite/ld-powerpc/vxworks1-lib.rd index d60e70f..40a5d55 100644 --- a/ld/testsuite/ld-powerpc/vxworks1-lib.rd +++ b/ld/testsuite/ld-powerpc/vxworks1-lib.rd @@ -6,8 +6,8 @@ Relocation section '\.rela\.plt' at offset .* contains 2 entries: Relocation section '\.rela\.dyn' at offset .* contains 5 entries: Offset Info Type Sym\.Value Sym\. Name \+ Addend -00090c00 00000016 R_PPC_RELATIVE * 00080c44 +00090800 00000016 R_PPC_RELATIVE * 00080c44 00080c0e .*06 R_PPC_ADDR16_HA 00000000 __GOTT_BASE__ \+ 0 00080c12 .*04 R_PPC_ADDR16_LO 00000000 __GOTT_BASE__ \+ 0 00080c16 .*03 R_PPC_ADDR16 00000000 __GOTT_INDEX__ \+ 0 -00090414 .*14 R_PPC_GLOB_DAT 00090800 x \+ 0 +00090414 .*14 R_PPC_GLOB_DAT 00090c00 x \+ 0 diff --git a/ld/testsuite/ld-powerpc/vxworks1-lib.td b/ld/testsuite/ld-powerpc/vxworks1-lib.td new file mode 100644 index 0000000..9f223e3 --- /dev/null +++ b/ld/testsuite/ld-powerpc/vxworks1-lib.td @@ -0,0 +1,3 @@ +#... + 0x0+16 \(TEXTREL\) +0x0 +#pass diff --git a/ld/testsuite/ld-powerpc/vxworks1.ld b/ld/testsuite/ld-powerpc/vxworks1.ld index 979d773..ce750b0 100644 --- a/ld/testsuite/ld-powerpc/vxworks1.ld +++ b/ld/testsuite/ld-powerpc/vxworks1.ld @@ -23,8 +23,8 @@ SECTIONS .got : { *(.got.plt) *(.got) } . = ALIGN (0x400); - .bss : { *(.bss) } + .data : { *(.data) } . = ALIGN (0x400); - .data : { *(.data) } + .bss : { *(.bss) } } diff --git a/ld/testsuite/ld-sh/sh-vxworks.exp b/ld/testsuite/ld-sh/sh-vxworks.exp index 8435f7e..42c75e8 100644 --- a/ld/testsuite/ld-sh/sh-vxworks.exp +++ b/ld/testsuite/ld-sh/sh-vxworks.exp @@ -10,7 +10,7 @@ foreach { gas_option ld_option suffix } $endians { "$gas_option" {vxworks1-lib.s} {{readelf --relocs vxworks1-lib.rd} {objdump -dr vxworks1-lib$suffix.dd} - {readelf --symbols vxworks1-lib.nd}} + {readelf --symbols vxworks1-lib.nd} {readelf -d vxworks1-lib.td}} "libvxworks1.so"} {"VxWorks executable test 1 (dynamic)" \ "tmpdir/libvxworks1.so -Tvxworks1.ld -q --force-dynamic $ld_option" diff --git a/ld/testsuite/ld-sh/vxworks1-lib.rd b/ld/testsuite/ld-sh/vxworks1-lib.rd index 4ad7044..d9c56a0 100644 --- a/ld/testsuite/ld-sh/vxworks1-lib.rd +++ b/ld/testsuite/ld-sh/vxworks1-lib.rd @@ -6,7 +6,7 @@ Relocation section '\.rela\.plt' at offset .* contains 2 entries: Relocation section '\.rela\.dyn' at offset .* contains 4 entries: Offset Info Type Sym\.Value Sym\. Name \+ Addend -00081c00 000000a5 R_SH_RELATIVE * 00080c48 +00081800 000000a5 R_SH_RELATIVE * 00080c48 00080c30 .*01 R_SH_DIR32 00000000 ___GOTT_BASE__ \+ 0 00080c34 .*01 R_SH_DIR32 00000000 ___GOTT_INDEX__ \+ 0 -00081414 .*a3 R_SH_GLOB_DAT 00081800 x \+ 0 +00081414 .*a3 R_SH_GLOB_DAT 00081c00 x \+ 0 diff --git a/ld/testsuite/ld-sh/vxworks1-lib.td b/ld/testsuite/ld-sh/vxworks1-lib.td new file mode 100644 index 0000000..9f223e3 --- /dev/null +++ b/ld/testsuite/ld-sh/vxworks1-lib.td @@ -0,0 +1,3 @@ +#... + 0x0+16 \(TEXTREL\) +0x0 +#pass diff --git a/ld/testsuite/ld-sh/vxworks1.ld b/ld/testsuite/ld-sh/vxworks1.ld index ec5039d..65bf65d 100644 --- a/ld/testsuite/ld-sh/vxworks1.ld +++ b/ld/testsuite/ld-sh/vxworks1.ld @@ -23,8 +23,8 @@ SECTIONS .got : { *(.got.plt) *(.got) } . = ALIGN (0x400); - .bss : { *(.bss) *(.dynbss) } + .data : { *(.data) } . = ALIGN (0x400); - .data : { *(.data) } + .bss : { *(.bss) *(.dynbss) } } diff --git a/ld/testsuite/ld-sparc/sparc.exp b/ld/testsuite/ld-sparc/sparc.exp index 6e7e95c..aaf37a7 100644 --- a/ld/testsuite/ld-sparc/sparc.exp +++ b/ld/testsuite/ld-sparc/sparc.exp @@ -24,7 +24,7 @@ if {[istarget "sparc-*-vxworks"]} { {"VxWorks shared library test 1" "-shared -Tvxworks1.ld" "-KPIC" {vxworks1-lib.s} {{readelf --relocs vxworks1-lib.rd} {objdump -dr vxworks1-lib.dd} - {readelf --symbols vxworks1-lib.nd}} + {readelf --symbols vxworks1-lib.nd} {readelf -d vxworks1-lib.td}} "libvxworks1.so"} {"VxWorks executable test 1 (dynamic)" \ "tmpdir/libvxworks1.so -Tvxworks1.ld -q --force-dynamic" diff --git a/ld/testsuite/ld-sparc/vxworks1-lib.rd b/ld/testsuite/ld-sparc/vxworks1-lib.rd index 1390e78..3604528 100644 --- a/ld/testsuite/ld-sparc/vxworks1-lib.rd +++ b/ld/testsuite/ld-sparc/vxworks1-lib.rd @@ -5,8 +5,8 @@ Relocation section '\.rela\.plt' at offset .* contains 1 entries: Relocation section '\.rela\.dyn' at offset .* contains 5 entries: Offset Info Type Sym\.Value Sym\. Name \+ Addend -00090c00 00000016 R_SPARC_RELATIVE 00080c44 +00090800 00000016 R_SPARC_RELATIVE 00080c44 00080c04 .*09 R_SPARC_HI22 00000000 __GOTT_BASE__ \+ 0 00080c08 .*0c R_SPARC_LO10 00000000 __GOTT_BASE__ \+ 0 00080c0c .*0c R_SPARC_LO10 00000000 __GOTT_INDEX__ \+ 0 -00090410 .*14 R_SPARC_GLOB_DAT 00090800 x \+ 0 +00090410 .*14 R_SPARC_GLOB_DAT 00090c00 x \+ 0 diff --git a/ld/testsuite/ld-sparc/vxworks1-lib.td b/ld/testsuite/ld-sparc/vxworks1-lib.td new file mode 100644 index 0000000..9f223e3 --- /dev/null +++ b/ld/testsuite/ld-sparc/vxworks1-lib.td @@ -0,0 +1,3 @@ +#... + 0x0+16 \(TEXTREL\) +0x0 +#pass diff --git a/ld/testsuite/ld-sparc/vxworks1.ld b/ld/testsuite/ld-sparc/vxworks1.ld index 979d773..ce750b0 100644 --- a/ld/testsuite/ld-sparc/vxworks1.ld +++ b/ld/testsuite/ld-sparc/vxworks1.ld @@ -23,8 +23,8 @@ SECTIONS .got : { *(.got.plt) *(.got) } . = ALIGN (0x400); - .bss : { *(.bss) } + .data : { *(.data) } . = ALIGN (0x400); - .data : { *(.data) } + .bss : { *(.bss) } } -- cgit v1.1