diff options
author | Alan Modra <amodra@gmail.com> | 2021-01-06 12:01:10 +1030 |
---|---|---|
committer | Alan Modra <amodra@gmail.com> | 2021-01-06 21:03:55 +1030 |
commit | 3677b7296185e6abfe8327c00c460712151ade15 (patch) | |
tree | 370c074e27e892bab67491450645e9bbb26f651f | |
parent | 73624512cf1d982953539ef538dc9ceb067885a6 (diff) | |
download | gdb-3677b7296185e6abfe8327c00c460712151ade15.zip gdb-3677b7296185e6abfe8327c00c460712151ade15.tar.gz gdb-3677b7296185e6abfe8327c00c460712151ade15.tar.bz2 |
sparc-sun-solaris2 and sparc64-sun-solaris2 config
A bunch of ld tests fail on these targets due to the test specifying
-melf32_sparc or -melf64_sparc, which according to ld/configure.tgt
are valid. However, config.bfd lacks the corresponding bfd target
resulting in an error. Fix that by adding target_selvecs.
bfd/
* config.bfd (sparc-*-solaris2*): Add sparc_elf32_vec.
(sparc64-*-solaris2*): Add sparc_elf64_vec and
sparc_elf32_vec.
ld/
* testsuite/ld-sparc/sparc.exp (sparc64tests): Set text-segment
base for some tests.
* testsuite/ld-sparc/gotop32.dd: Match solaris output.
* testsuite/ld-sparc/gotop32.sd: Likewise.
* testsuite/ld-sparc/gotop32.td: Likewise.
* testsuite/ld-sparc/gotop64.dd: Likewise.
* testsuite/ld-sparc/gotop64.sd: Likewise.
* testsuite/ld-sparc/gotop64.td: Likewise.
* testsuite/ld-sparc/tlsg32.sd: Likewise.
* testsuite/ld-sparc/tlsg64.sd: Likewise.
* testsuite/ld-sparc/tlspie32.dd: Likewise.
* testsuite/ld-sparc/tlspie64.dd: Likewise.
* testsuite/ld-sparc/tlssunbin32.dd: Likewise.
* testsuite/ld-sparc/tlssunbin32.sd: Likewise.
* testsuite/ld-sparc/tlssunbin32.td: Likewise.
* testsuite/ld-sparc/tlssunbin64.dd: Likewise.
* testsuite/ld-sparc/tlssunbin64.sd: Likewise.
* testsuite/ld-sparc/tlssunbin64.td: Likewise.
* testsuite/ld-sparc/tlssunnopic32.dd: Likewise.
* testsuite/ld-sparc/tlssunnopic32.sd: Likewise.
* testsuite/ld-sparc/tlssunnopic64.dd: Likewise.
* testsuite/ld-sparc/tlssunnopic64.sd: Likewise.
* testsuite/ld-sparc/tlssunpic32.dd: Likewise.
* testsuite/ld-sparc/tlssunpic32.sd: Likewise.
* testsuite/ld-sparc/tlssunpic32.td: Likewise.
* testsuite/ld-sparc/tlssunpic64.dd: Likewise.
* testsuite/ld-sparc/tlssunpic64.sd: Likewise.
* testsuite/ld-sparc/tlssunpic64.td: Likewise.
* testsuite/ld-sparc/wdispcall.dd: Likewise.
31 files changed, 72 insertions, 34 deletions
diff --git a/bfd/ChangeLog b/bfd/ChangeLog index a629e8a..b9b5f7b 100644 --- a/bfd/ChangeLog +++ b/bfd/ChangeLog @@ -1,3 +1,9 @@ +2021-01-06 Alan Modra <amodra@gmail.com> + + * config.bfd (sparc-*-solaris2*): Add sparc_elf32_vec. + (sparc64-*-solaris2*): Add sparc_elf64_vec and + sparc_elf32_vec. + 2021-01-06 Marcus Comstedt <marcus@mc.pp.se> * config.bfd: Added targets riscv64be*-*-*, riscv32be*-*-* and diff --git a/bfd/config.bfd b/bfd/config.bfd index bbd0aaa..e7b55b0 100644 --- a/bfd/config.bfd +++ b/bfd/config.bfd @@ -1285,11 +1285,12 @@ case "${targ}" in sparc-*-solaris2.[0-6] | sparc-*-solaris2.[0-6].*) targ_defvec=sparc_elf32_sol2_vec + targ_selvecs=sparc_elf32_vec ;; #ifdef BFD64 sparc-*-solaris2* | sparcv9-*-solaris2* | sparc64-*-solaris2*) targ_defvec=sparc_elf32_sol2_vec - targ_selvecs="sparc_elf64_sol2_vec" + targ_selvecs="sparc_elf64_sol2_vec sparc_elf32_vec sparc_elf64_vec" want64=true ;; sparc64-*-freebsd* | sparc64-*-kfreebsd*-gnu) diff --git a/ld/ChangeLog b/ld/ChangeLog index 00b05a0..41fdda1 100644 --- a/ld/ChangeLog +++ b/ld/ChangeLog @@ -1,5 +1,37 @@ 2021-01-06 Alan Modra <amodra@gmail.com> + * testsuite/ld-sparc/sparc.exp (sparc64tests): Set text-segment + base for some tests. + * testsuite/ld-sparc/gotop32.dd: Match solaris output. + * testsuite/ld-sparc/gotop32.sd: Likewise. + * testsuite/ld-sparc/gotop32.td: Likewise. + * testsuite/ld-sparc/gotop64.dd: Likewise. + * testsuite/ld-sparc/gotop64.sd: Likewise. + * testsuite/ld-sparc/gotop64.td: Likewise. + * testsuite/ld-sparc/tlsg32.sd: Likewise. + * testsuite/ld-sparc/tlsg64.sd: Likewise. + * testsuite/ld-sparc/tlspie32.dd: Likewise. + * testsuite/ld-sparc/tlspie64.dd: Likewise. + * testsuite/ld-sparc/tlssunbin32.dd: Likewise. + * testsuite/ld-sparc/tlssunbin32.sd: Likewise. + * testsuite/ld-sparc/tlssunbin32.td: Likewise. + * testsuite/ld-sparc/tlssunbin64.dd: Likewise. + * testsuite/ld-sparc/tlssunbin64.sd: Likewise. + * testsuite/ld-sparc/tlssunbin64.td: Likewise. + * testsuite/ld-sparc/tlssunnopic32.dd: Likewise. + * testsuite/ld-sparc/tlssunnopic32.sd: Likewise. + * testsuite/ld-sparc/tlssunnopic64.dd: Likewise. + * testsuite/ld-sparc/tlssunnopic64.sd: Likewise. + * testsuite/ld-sparc/tlssunpic32.dd: Likewise. + * testsuite/ld-sparc/tlssunpic32.sd: Likewise. + * testsuite/ld-sparc/tlssunpic32.td: Likewise. + * testsuite/ld-sparc/tlssunpic64.dd: Likewise. + * testsuite/ld-sparc/tlssunpic64.sd: Likewise. + * testsuite/ld-sparc/tlssunpic64.td: Likewise. + * testsuite/ld-sparc/wdispcall.dd: Likewise. + +2021-01-06 Alan Modra <amodra@gmail.com> + * testsuite/ld-scripts/rgn-at10.d: xfail v850. * testsuite/ld-scripts/rgn-at11.d: Likewise. diff --git a/ld/testsuite/ld-sparc/gotop32.dd b/ld/testsuite/ld-sparc/gotop32.dd index 28dd942..ea1ca13 100644 --- a/ld/testsuite/ld-sparc/gotop32.dd +++ b/ld/testsuite/ld-sparc/gotop32.dd @@ -4,7 +4,7 @@ #objdump: -drj.text #target: sparc*-*-* -.*: +file format elf32-sparc +.*: +file format elf32-sparc.* Disassembly of section .text: 00001000 <foo-0x8>: diff --git a/ld/testsuite/ld-sparc/gotop32.sd b/ld/testsuite/ld-sparc/gotop32.sd index fc16756..85f4c19 100644 --- a/ld/testsuite/ld-sparc/gotop32.sd +++ b/ld/testsuite/ld-sparc/gotop32.sd @@ -4,7 +4,7 @@ #objdump: -sj.got #target: sparc*-*-* -.*: +file format elf32-sparc +.*: +file format elf32-sparc.* Contents of section .got: 12070 00012000 00000000 .* diff --git a/ld/testsuite/ld-sparc/gotop32.td b/ld/testsuite/ld-sparc/gotop32.td index d933b71..74bc41f 100644 --- a/ld/testsuite/ld-sparc/gotop32.td +++ b/ld/testsuite/ld-sparc/gotop32.td @@ -4,7 +4,7 @@ #objdump: -sj.data #target: sparc*-*-* -.*: +file format elf32-sparc +.*: +file format elf32-sparc.* Contents of section .data: 13000 12345678 deadbeef .* diff --git a/ld/testsuite/ld-sparc/gotop64.dd b/ld/testsuite/ld-sparc/gotop64.dd index e3c59c2..fc6d3a4 100644 --- a/ld/testsuite/ld-sparc/gotop64.dd +++ b/ld/testsuite/ld-sparc/gotop64.dd @@ -4,7 +4,7 @@ #objdump: -drj.text #target: sparc*-*-* -.*: +file format elf64-sparc +.*: +file format elf64-sparc.* Disassembly of section .text: 0000000000001000 <foo-0x8>: diff --git a/ld/testsuite/ld-sparc/gotop64.sd b/ld/testsuite/ld-sparc/gotop64.sd index 9ab0f61..316a66b 100644 --- a/ld/testsuite/ld-sparc/gotop64.sd +++ b/ld/testsuite/ld-sparc/gotop64.sd @@ -4,7 +4,7 @@ #objdump: -sj.got #target: sparc*-*-* -.*: +file format elf64-sparc +.*: +file format elf64-sparc.* Contents of section .got: 1020e0 00000000 00102000 00000000 00000000 .* diff --git a/ld/testsuite/ld-sparc/gotop64.td b/ld/testsuite/ld-sparc/gotop64.td index 303cdfe..1e9412f 100644 --- a/ld/testsuite/ld-sparc/gotop64.td +++ b/ld/testsuite/ld-sparc/gotop64.td @@ -4,7 +4,7 @@ #objdump: -sj.data #target: sparc*-*-* -.*: +file format elf64-sparc +.*: +file format elf64-sparc.* Contents of section .data: 103000 12345678 deadbeef .* diff --git a/ld/testsuite/ld-sparc/sparc.exp b/ld/testsuite/ld-sparc/sparc.exp index 7bdf676..5621d07 100644 --- a/ld/testsuite/ld-sparc/sparc.exp +++ b/ld/testsuite/ld-sparc/sparc.exp @@ -117,7 +117,7 @@ set sparc64tests { {"64-bit: Another helper shared library" "-shared -melf64_sparc" "" "--64 -Av9 -K PIC" {tlssunbinpic64.s} {} "libtlssunbinpic64.so"} {"64-bit: TLS -fpic and -fno-pic exec transitions" - "-melf64_sparc --hash-style=sysv tmpdir/libtlslib64.so tmpdir/tlssunbinpic64.o" "" + "-melf64_sparc -Ttext-segment=0x100000 --hash-style=sysv tmpdir/libtlslib64.so tmpdir/tlssunbinpic64.o" "" "--64 -Av9" {tlssunbin64.s} {{readelf -WSsrl tlssunbin64.rd} {objdump -drj.text tlssunbin64.dd} {objdump -sj.got tlssunbin64.sd} {objdump -sj.tdata tlssunbin64.td}} @@ -130,7 +130,8 @@ set sparc64tests { {"64-bit: TLS in debug sections" "-melf64_sparc" "" "--64 -Av9" {tlsg64.s} {{objdump -sj.debug_foobar tlsg64.sd}} "tlsg64"} - {"64-bit: TLS -fpie" "-melf64_sparc -pie tmpdir/libtlslib64.so" "" + {"64-bit: TLS -fpie" + "-melf64_sparc -pie -Ttext-segment=0x100000 tmpdir/libtlslib64.so" "" "--64 -Av9 -K PIC" {tlspie64.s} {{objdump -drj.text tlspie64.dd}} "tlspie64"} {"64-bit: GOTDATA relocations" diff --git a/ld/testsuite/ld-sparc/tlsg32.sd b/ld/testsuite/ld-sparc/tlsg32.sd index 861ac2e..307955d 100644 --- a/ld/testsuite/ld-sparc/tlsg32.sd +++ b/ld/testsuite/ld-sparc/tlsg32.sd @@ -4,7 +4,7 @@ #objdump: -sj.debug_foobar #target: sparc*-*-* -.*: +file format elf32-sparc +.*: +file format elf32-sparc.* Contents of section .debug_foobar: 0+ 0+18 .* diff --git a/ld/testsuite/ld-sparc/tlsg64.sd b/ld/testsuite/ld-sparc/tlsg64.sd index 4181dde..e38387d 100644 --- a/ld/testsuite/ld-sparc/tlsg64.sd +++ b/ld/testsuite/ld-sparc/tlsg64.sd @@ -4,7 +4,7 @@ #objdump: -sj.debug_foobar #target: sparc*-*-* -.*: +file format elf64-sparc +.*: +file format elf64-sparc.* Contents of section .debug_foobar: 0+ 0+ 0+18 .* diff --git a/ld/testsuite/ld-sparc/tlspie32.dd b/ld/testsuite/ld-sparc/tlspie32.dd index a31e11a..a0a1f84 100644 --- a/ld/testsuite/ld-sparc/tlspie32.dd +++ b/ld/testsuite/ld-sparc/tlspie32.dd @@ -5,8 +5,7 @@ #objdump: -drj.text #target: sparc*-*-* -.*: +file format elf32-sparc - +.*: +file format elf32-sparc.* Disassembly of section .text: @@ -18,7 +17,7 @@ Disassembly of section .text: +[0-9a-f]+: 9d e3 bf 98 save %sp, -104, %sp +[0-9a-f]+: 2f 00 00 40 sethi %hi\(0x10000\), %l7 +[0-9a-f]+: 7f ff ff fc call [0-9a-f]+ <.*> - +[0-9a-f]+: ae 05 e1 60 add %l7, 0x160, %l7 ! 10160 <.*> + +[0-9a-f]+: ae 05 e1 (58|60) add %l7, 0x(158|160), %l7 ! 10(158|160) <.*> +[0-9a-f]+: 01 00 00 00 nop +[0-9a-f]+: 01 00 00 00 nop +[0-9a-f]+: 01 00 00 00 nop diff --git a/ld/testsuite/ld-sparc/tlspie64.dd b/ld/testsuite/ld-sparc/tlspie64.dd index 6c8aea9..c067575 100644 --- a/ld/testsuite/ld-sparc/tlspie64.dd +++ b/ld/testsuite/ld-sparc/tlspie64.dd @@ -5,8 +5,7 @@ #objdump: -drj.text #target: sparc*-*-* -.*: +file format elf64-sparc - +.*: +file format elf64-sparc.* Disassembly of section .text: @@ -18,7 +17,7 @@ Disassembly of section .text: +[0-9a-f]+: 9d e3 bf 60 save %sp, -160, %sp +[0-9a-f]+: 2f 00 04 00 sethi %hi\(0x100000\), %l7 +[0-9a-f]+: 7f ff ff fc call [0-9a-f]+ <.*> - +[0-9a-f]+: ae 05 e2 08 add %l7, 0x208, %l7 ! 100208 <.*> + +[0-9a-f]+: ae 05 (e1 f8|e2 08) add %l7, 0x(1f8|208), %l7 ! 100(1f8|208) <.*> +[0-9a-f]+: 01 00 00 00 nop +[0-9a-f]+: 01 00 00 00 nop +[0-9a-f]+: 01 00 00 00 nop diff --git a/ld/testsuite/ld-sparc/tlssunbin32.dd b/ld/testsuite/ld-sparc/tlssunbin32.dd index ce8b174..502b11e 100644 --- a/ld/testsuite/ld-sparc/tlssunbin32.dd +++ b/ld/testsuite/ld-sparc/tlssunbin32.dd @@ -4,7 +4,7 @@ #objdump: -drj.text #target: sparc*-*-* -.*: +file format elf32-sparc +.*: +file format elf32-sparc.* Disassembly of section .text: diff --git a/ld/testsuite/ld-sparc/tlssunbin32.sd b/ld/testsuite/ld-sparc/tlssunbin32.sd index 6c5509e..1d5112f 100644 --- a/ld/testsuite/ld-sparc/tlssunbin32.sd +++ b/ld/testsuite/ld-sparc/tlssunbin32.sd @@ -4,7 +4,7 @@ #objdump: -sj.got #target: sparc*-*-* -.*: +file format elf32-sparc +.*: +file format elf32-sparc.* Contents of section .got: 2328c 000231f4 0+ 0+ 0+ .* diff --git a/ld/testsuite/ld-sparc/tlssunbin32.td b/ld/testsuite/ld-sparc/tlssunbin32.td index f5974e7..943f24c 100644 --- a/ld/testsuite/ld-sparc/tlssunbin32.td +++ b/ld/testsuite/ld-sparc/tlssunbin32.td @@ -4,7 +4,7 @@ #objdump: -sj.tdata #target: sparc*-*-* -.*: +file format elf32-sparc +.*: +file format elf32-sparc.* Contents of section .tdata: 22194 00000011 00000000 00000000 00000000 .* diff --git a/ld/testsuite/ld-sparc/tlssunbin64.dd b/ld/testsuite/ld-sparc/tlssunbin64.dd index 5893556..c318846 100644 --- a/ld/testsuite/ld-sparc/tlssunbin64.dd +++ b/ld/testsuite/ld-sparc/tlssunbin64.dd @@ -4,7 +4,7 @@ #objdump: -drj.text #target: sparc*-*-* -.*: +file format elf64-sparc +.*: +file format elf64-sparc.* Disassembly of section .text: diff --git a/ld/testsuite/ld-sparc/tlssunbin64.sd b/ld/testsuite/ld-sparc/tlssunbin64.sd index 68e0d97..28e1765 100644 --- a/ld/testsuite/ld-sparc/tlssunbin64.sd +++ b/ld/testsuite/ld-sparc/tlssunbin64.sd @@ -4,7 +4,7 @@ #objdump: -sj.got #target: sparc*-*-* -.*: +file format elf64-sparc +.*: +file format elf64-sparc.* Contents of section .got: 202338 0+ 0+202208 0+ 0+ .* diff --git a/ld/testsuite/ld-sparc/tlssunbin64.td b/ld/testsuite/ld-sparc/tlssunbin64.td index f7eef83..0fddf32 100644 --- a/ld/testsuite/ld-sparc/tlssunbin64.td +++ b/ld/testsuite/ld-sparc/tlssunbin64.td @@ -4,7 +4,7 @@ #objdump: -sj.tdata #target: sparc*-*-* -.*: +file format elf64-sparc +.*: +file format elf64-sparc.* Contents of section .tdata: 2021a4 00000011 00000012 00000013 00000014 .* diff --git a/ld/testsuite/ld-sparc/tlssunnopic32.dd b/ld/testsuite/ld-sparc/tlssunnopic32.dd index 4f47c7a..3074dfd 100644 --- a/ld/testsuite/ld-sparc/tlssunnopic32.dd +++ b/ld/testsuite/ld-sparc/tlssunnopic32.dd @@ -5,7 +5,7 @@ #objdump: -drj.text #target: sparc*-*-* -.*: +file format elf32-sparc +.*: +file format elf32-sparc.* Disassembly of section .text: diff --git a/ld/testsuite/ld-sparc/tlssunnopic32.sd b/ld/testsuite/ld-sparc/tlssunnopic32.sd index 0d1beac..738b43a 100644 --- a/ld/testsuite/ld-sparc/tlssunnopic32.sd +++ b/ld/testsuite/ld-sparc/tlssunnopic32.sd @@ -5,7 +5,7 @@ #objdump: -sj.got #target: sparc*-*-* -.*: file format elf32-sparc +.*: file format elf32-sparc.* Contents of section \.got: 12080 0+12000 0+ 0+ 0+ .* diff --git a/ld/testsuite/ld-sparc/tlssunnopic64.dd b/ld/testsuite/ld-sparc/tlssunnopic64.dd index cd872f2..d8712e3 100644 --- a/ld/testsuite/ld-sparc/tlssunnopic64.dd +++ b/ld/testsuite/ld-sparc/tlssunnopic64.dd @@ -5,7 +5,7 @@ #objdump: -drj.text #target: sparc*-*-* -.*: +file format elf64-sparc +.*: +file format elf64-sparc.* Disassembly of section .text: diff --git a/ld/testsuite/ld-sparc/tlssunnopic64.sd b/ld/testsuite/ld-sparc/tlssunnopic64.sd index 45c77e7..e2d6748 100644 --- a/ld/testsuite/ld-sparc/tlssunnopic64.sd +++ b/ld/testsuite/ld-sparc/tlssunnopic64.sd @@ -5,7 +5,7 @@ #objdump: -sj.got #target: sparc*-*-* -.*: file format elf64-sparc +.*: file format elf64-sparc.* Contents of section \.got: 102100 0+ 0+102000 0+ 0+ .* diff --git a/ld/testsuite/ld-sparc/tlssunpic32.dd b/ld/testsuite/ld-sparc/tlssunpic32.dd index 5589771..c0dc035 100644 --- a/ld/testsuite/ld-sparc/tlssunpic32.dd +++ b/ld/testsuite/ld-sparc/tlssunpic32.dd @@ -5,7 +5,7 @@ #objdump: -drj.text #target: sparc*-*-* -.*: +file format elf32-sparc +.*: +file format elf32-sparc.* Disassembly of section .text: diff --git a/ld/testsuite/ld-sparc/tlssunpic32.sd b/ld/testsuite/ld-sparc/tlssunpic32.sd index 4aecfd7..8503487 100644 --- a/ld/testsuite/ld-sparc/tlssunpic32.sd +++ b/ld/testsuite/ld-sparc/tlssunpic32.sd @@ -5,7 +5,7 @@ #objdump: -sj.got #target: sparc*-*-* -.*: +file format elf32-sparc +.*: +file format elf32-sparc.* Contents of section .got: 120f8 00012060 00000000 00000020 00000000 .* diff --git a/ld/testsuite/ld-sparc/tlssunpic32.td b/ld/testsuite/ld-sparc/tlssunpic32.td index eb4e344..d916d94 100644 --- a/ld/testsuite/ld-sparc/tlssunpic32.td +++ b/ld/testsuite/ld-sparc/tlssunpic32.td @@ -5,7 +5,7 @@ #objdump: -sj.tdata #target: sparc*-*-* -.*: +file format elf32-sparc +.*: +file format elf32-sparc.* Contents of section .tdata: 12000 00000011 00000012 00000013 00000014 .* diff --git a/ld/testsuite/ld-sparc/tlssunpic64.dd b/ld/testsuite/ld-sparc/tlssunpic64.dd index 00dbc20..e08dc46 100644 --- a/ld/testsuite/ld-sparc/tlssunpic64.dd +++ b/ld/testsuite/ld-sparc/tlssunpic64.dd @@ -5,7 +5,7 @@ #objdump: -drj.text #target: sparc*-*-* -.*: +file format elf64-sparc +.*: +file format elf64-sparc.* Disassembly of section .text: diff --git a/ld/testsuite/ld-sparc/tlssunpic64.sd b/ld/testsuite/ld-sparc/tlssunpic64.sd index 9061c2e..60110be 100644 --- a/ld/testsuite/ld-sparc/tlssunpic64.sd +++ b/ld/testsuite/ld-sparc/tlssunpic64.sd @@ -5,7 +5,7 @@ #objdump: -sj.got #target: sparc*-*-* -.*: +file format elf64-sparc +.*: +file format elf64-sparc.* Contents of section .got: 102190 00000000 00102060 00000000 00000000 .* diff --git a/ld/testsuite/ld-sparc/tlssunpic64.td b/ld/testsuite/ld-sparc/tlssunpic64.td index 1e82d2b..f06909b 100644 --- a/ld/testsuite/ld-sparc/tlssunpic64.td +++ b/ld/testsuite/ld-sparc/tlssunpic64.td @@ -5,7 +5,7 @@ #objdump: -sj.tdata #target: sparc*-*-* -.*: +file format elf64-sparc +.*: +file format elf64-sparc.* Contents of section .tdata: 102000 00000011 00000012 00000013 00000014 .* diff --git a/ld/testsuite/ld-sparc/wdispcall.dd b/ld/testsuite/ld-sparc/wdispcall.dd index ab06a56..1dd1282 100644 --- a/ld/testsuite/ld-sparc/wdispcall.dd +++ b/ld/testsuite/ld-sparc/wdispcall.dd @@ -4,7 +4,7 @@ #objdump: -dj.wdispcall #target: sparc*-*-* -.*: +file format elf32-sparc +.*: +file format elf32-sparc.* Disassembly of section .wdispcall: |