This is the mail archive of the
binutils@sourceware.org
mailing list for the binutils project.
powerpc64le ld tests
- From: Alan Modra <amodra at gmail dot com>
- To: binutils at sourceware dot org
- Date: Thu, 22 Aug 2013 17:02:09 +0930
- Subject: powerpc64le ld tests
Due to a bug in powerpc.exp:supports_ppc64 we weren't running a group
of ld tests for powerpc64le-linux except when ld supported
powerpc64-linux as well, and then running the tests in big-endian mode.
* ld-powerpc/powerpc.exp: Substitute for le in options_regsub(ld).
Correct ppc64elftests option replacement.
(supports_ppc64): Match elf64lppc too.
* ld-powerpc/relbrlt.d: Update for little-endian.
* ld-powerpc/symtocbase.d: Likewise.
* ld-powerpc/tls.t: Likewise.
* ld-powerpc/tlsexetoc.g: Likewise.
* ld-powerpc/tlsso.d: Likewise.
* ld-powerpc/tlsso.g: Likewise.
* ld-powerpc/tlstoc.t: Likewise.
* ld-powerpc/tlstocso.d: Likewise.
* ld-powerpc/tlstocso.g: Likewise.
* ld-powerpc/tlstocso.t: Likewise.
* ld-powerpc/tocopt.d: Likewise.
* ld-powerpc/tocopt2.d: Likewise.
* ld-powerpc/tocopt3.d: Likewise.
* ld-powerpc/tocopt4.d: Likewise.
* ld-powerpc/tocopt5.d: Likewise.
Index: ld/testsuite/ld-powerpc/powerpc.exp
===================================================================
RCS file: /cvs/src/src/ld/testsuite/ld-powerpc/powerpc.exp,v
retrieving revision 1.42
diff -u -p -r1.42 powerpc.exp
--- ld/testsuite/ld-powerpc/powerpc.exp 19 Feb 2013 01:10:01 -0000 1.42
+++ ld/testsuite/ld-powerpc/powerpc.exp 22 Aug 2013 05:35:38 -0000
@@ -82,7 +82,7 @@ proc supports_ppc64 { } {
global ld
catch "exec $ld --help | grep emulations" tmp
- if [ string match "*elf64ppc*" $tmp ] then {
+ if [ regexp "elf64l?ppc" $tmp ] then {
return 1
} else {
return 0
@@ -243,7 +243,7 @@ set ppceabitests {
}
if [istarget "powerpc*le*-*-*"] then {
- set options_regsub(ld) {-melf32ppc -melf32lppc}
+ set options_regsub(ld) {{-melf([3264]*)ppc} {-melf\1lppc}}
for {set i 0} {$i < [llength $ppcelftests]} {incr i} {
set line [lindex $ppcelftests $i]
@@ -255,7 +255,7 @@ if [istarget "powerpc*le*-*-*"] then {
if [ supports_ppc64 ] then {
for {set i 0} {$i < [llength $ppc64elftests]} {incr i} {
- set line [lindex $ppcelftests $i]
+ set line [lindex $ppc64elftests $i]
set ld_options [lindex $line 1]
regsub -all elf64ppc $ld_options elf64lppc ld_options
set line [lreplace $line 1 1 $ld_options]
Index: ld/testsuite/ld-powerpc/relbrlt.d
===================================================================
RCS file: /cvs/src/src/ld/testsuite/ld-powerpc/relbrlt.d,v
retrieving revision 1.8
diff -u -p -r1.8 relbrlt.d
--- ld/testsuite/ld-powerpc/relbrlt.d 15 Jun 2012 15:13:37 -0000 1.8
+++ ld/testsuite/ld-powerpc/relbrlt.d 22 Aug 2013 05:35:38 -0000
@@ -3,58 +3,58 @@
#ld: -melf64ppc --no-ld-generated-unwind-info --emit-relocs
#objdump: -Dr
-.*: file format elf64-powerpc
+.*
Disassembly of section \.text:
0*100000c0 <_start>:
-[0-9a-f ]*: 49 bf 00 2d bl .*
+[0-9a-f ]*: (49 bf 00 2d|2d 00 bf 49) bl .*
[0-9a-f ]*: R_PPC64_REL24 \.text\+0x37e003c
-[0-9a-f ]*: 60 00 00 00 nop
-[0-9a-f ]*: 49 bf 00 19 bl .*
+[0-9a-f ]*: (60 00 00 00|00 00 00 60) nop
+[0-9a-f ]*: (49 bf 00 19|19 00 bf 49) bl .*
[0-9a-f ]*: R_PPC64_REL24 \.text\+0x3bf0020
-[0-9a-f ]*: 60 00 00 00 nop
-[0-9a-f ]*: 49 bf 00 21 bl .*
+[0-9a-f ]*: (60 00 00 00|00 00 00 60) nop
+[0-9a-f ]*: (49 bf 00 21|21 00 bf 49) bl .*
[0-9a-f ]*: R_PPC64_REL24 \.text\+0x57e0024
-[0-9a-f ]*: 60 00 00 00 nop
+[0-9a-f ]*: (60 00 00 00|00 00 00 60) nop
[0-9a-f ]*: 00 00 00 00 \.long 0x0
-[0-9a-f ]*: 4b ff ff e4 b .* <_start>
+[0-9a-f ]*: (4b ff ff e4|e4 ff ff 4b) b .* <_start>
\.\.\.
[0-9a-f ]*<.*plt_branch.*>:
-[0-9a-f ]*: e9 62 80 00 ld r11,-32768\(r2\)
+[0-9a-f ]*: (e9 62 80 00|00 80 62 e9) ld r11,-32768\(r2\)
[0-9a-f ]*: R_PPC64_TOC16_DS \*ABS\*\+0x157f00e8
-[0-9a-f ]*: 7d 69 03 a6 mtctr r11
-[0-9a-f ]*: 4e 80 04 20 bctr
+[0-9a-f ]*: (7d 69 03 a6|a6 03 69 7d) mtctr r11
+[0-9a-f ]*: (4e 80 04 20|20 04 80 4e) bctr
[0-9a-f ]*<.*long_branch.*>:
-[0-9a-f ]*: 49 bf 00 10 b .* <far>
+[0-9a-f ]*: (49 bf 00 10|10 00 bf 49) b .* <far>
[0-9a-f ]*: R_PPC64_REL24 \*ABS\*\+0x137e00fc
[0-9a-f ]*<.*plt_branch.*>:
-[0-9a-f ]*: e9 62 80 08 ld r11,-32760\(r2\)
+[0-9a-f ]*: (e9 62 80 08|08 80 62 e9) ld r11,-32760\(r2\)
[0-9a-f ]*: R_PPC64_TOC16_DS \*ABS\*\+0x157f00f0
-[0-9a-f ]*: 7d 69 03 a6 mtctr r11
-[0-9a-f ]*: 4e 80 04 20 bctr
+[0-9a-f ]*: (7d 69 03 a6|a6 03 69 7d) mtctr r11
+[0-9a-f ]*: (4e 80 04 20|20 04 80 4e) bctr
\.\.\.
0*137e00fc <far>:
-[0-9a-f ]*: 4e 80 00 20 blr
+[0-9a-f ]*: (4e 80 00 20|20 00 80 4e) blr
\.\.\.
0*13bf00e0 <far2far>:
-[0-9a-f ]*: 4e 80 00 20 blr
+[0-9a-f ]*: (4e 80 00 20|20 00 80 4e) blr
\.\.\.
0*157e00e4 <huge>:
-[0-9a-f ]*: 4e 80 00 20 blr
+[0-9a-f ]*: (4e 80 00 20|20 00 80 4e) blr
Disassembly of section \.branch_lt:
0*157f00e8 .*:
-[0-9a-f ]*: 00 00 00 00 .*
+[0-9a-f ]*: (00 00 00 00|e0 00 bf 13) .*
[0-9a-f ]*: R_PPC64_RELATIVE \*ABS\*\+0x13bf00e0
-[0-9a-f ]*: 13 bf 00 e0 .*
-[0-9a-f ]*: 00 00 00 00 .*
+[0-9a-f ]*: (13 bf 00 e0|00 00 00 00) .*
+[0-9a-f ]*: (00 00 00 00|e4 00 7e 15) .*
[0-9a-f ]*: R_PPC64_RELATIVE \*ABS\*\+0x157e00e4
-[0-9a-f ]*: 15 7e 00 e4 .*
+[0-9a-f ]*: (15 7e 00 e4|00 00 00 00) .*
Index: ld/testsuite/ld-powerpc/symtocbase.d
===================================================================
RCS file: /cvs/src/src/ld/testsuite/ld-powerpc/symtocbase.d,v
retrieving revision 1.2
diff -u -p -r1.2 symtocbase.d
--- ld/testsuite/ld-powerpc/symtocbase.d 18 Nov 2005 04:41:30 -0000 1.2
+++ ld/testsuite/ld-powerpc/symtocbase.d 22 Aug 2013 05:35:38 -0000
@@ -2,23 +2,24 @@
#source: symtocbase-2.s
#as: -a64
#ld: -shared -melf64ppc
-#objdump: -dj.data
+#objdump: -dj.data -z
#target: powerpc64*-*-*
-.*: file format elf64-powerpc
+.*
Disassembly of section \.data:
.* <i>:
- \.\.\.
-.*: 00 02 80 00 \.long 0x28000
-.*: 00 00 00 00 \.long 0x0
-.*: 00 02 80 00 \.long 0x28000
-.*: 00 00 00 00 \.long 0x0
-.*: 00 03 80 00 \.long 0x38000
-.*: 00 00 00 00 \.long 0x0
-.*: 00 03 80 00 \.long 0x38000
-.*: 00 00 00 00 \.long 0x0
-.*: 00 02 80 00 \.long 0x28000
-.*: 00 00 00 00 \.long 0x0
-.*: 00 03 80 00 \.long 0x38000
+#...
+.* \.long 0x28000
+.* \.long 0x0
+.* \.long 0x28000
+.* \.long 0x0
+.* \.long 0x38000
+.* \.long 0x0
+.* \.long 0x38000
+.* \.long 0x0
+.* \.long 0x28000
+.* \.long 0x0
+.* \.long 0x38000
+#pass
Index: ld/testsuite/ld-powerpc/tls.t
===================================================================
RCS file: /cvs/src/src/ld/testsuite/ld-powerpc/tls.t,v
retrieving revision 1.3
diff -u -p -r1.3 tls.t
--- ld/testsuite/ld-powerpc/tls.t 29 Oct 2012 09:25:53 -0000 1.3
+++ ld/testsuite/ld-powerpc/tls.t 22 Aug 2013 05:35:38 -0000
@@ -5,7 +5,7 @@
#objdump: -sj.tdata
#target: powerpc64*-*-*
-.*: +file format elf64-powerpc
+.*
Contents of section \.tdata:
.* (12345678|f0debc9a) (9abcdef0|78563412) (23456789|01efcdab) (abcdef01|89674523) .*
Index: ld/testsuite/ld-powerpc/tlsexetoc.g
===================================================================
RCS file: /cvs/src/src/ld/testsuite/ld-powerpc/tlsexetoc.g,v
retrieving revision 1.11
diff -u -p -r1.11 tlsexetoc.g
--- ld/testsuite/ld-powerpc/tlsexetoc.g 29 Oct 2012 09:25:53 -0000 1.11
+++ ld/testsuite/ld-powerpc/tlsexetoc.g 22 Aug 2013 05:35:38 -0000
@@ -4,7 +4,7 @@
#objdump: -sj.got
#target: powerpc64*-*-*
-.*: +file format elf64-powerpc
+.*
Contents of section \.got:
.* (00000000|c0850110) (100185c0|00000000) 00000000 00000000 .*
Index: ld/testsuite/ld-powerpc/tlsso.d
===================================================================
RCS file: /cvs/src/src/ld/testsuite/ld-powerpc/tlsso.d,v
retrieving revision 1.15
diff -u -p -r1.15 tlsso.d
--- ld/testsuite/ld-powerpc/tlsso.d 22 Apr 2013 03:11:40 -0000 1.15
+++ ld/testsuite/ld-powerpc/tlsso.d 22 Aug 2013 05:35:38 -0000
@@ -4,7 +4,7 @@
#objdump: -dr
#target: powerpc64*-*-*
-.*: +file format elf64-powerpc
+.*
Disassembly of section \.text:
Index: ld/testsuite/ld-powerpc/tlsso.g
===================================================================
RCS file: /cvs/src/src/ld/testsuite/ld-powerpc/tlsso.g,v
retrieving revision 1.11
diff -u -p -r1.11 tlsso.g
--- ld/testsuite/ld-powerpc/tlsso.g 15 Jan 2013 06:13:26 -0000 1.11
+++ ld/testsuite/ld-powerpc/tlsso.g 22 Aug 2013 05:35:38 -0000
@@ -4,7 +4,7 @@
#objdump: -sj.got
#target: powerpc64*-*-*
-.*: +file format elf64-powerpc
+.*
Contents of section \.got:
10788 (00000000|88870100) (00018788|00000000) 00000000 00000000 .*
Index: ld/testsuite/ld-powerpc/tlstoc.t
===================================================================
RCS file: /cvs/src/src/ld/testsuite/ld-powerpc/tlstoc.t,v
retrieving revision 1.2
diff -u -p -r1.2 tlstoc.t
--- ld/testsuite/ld-powerpc/tlstoc.t 29 Oct 2012 09:25:53 -0000 1.2
+++ ld/testsuite/ld-powerpc/tlstoc.t 22 Aug 2013 05:35:38 -0000
@@ -8,7 +8,7 @@
.*
Contents of section \.tdata:
- 10010148 (00c0ffee|eeffc000) 00000000 (12345678|78563412) (9abcdef0|f0debc9a) .*
- 10010158 (23456789|89674523) (abcdef01|01efcdab) (3456789a|9a785634) (bcdef012|12f0debc) .*
- 10010168 (456789ab|ab896745) (cdef0123|2301efcd) (56789abc|bc9a7856) (def01234|3412f0de) .*
- 10010178 (6789abcd|cdab8967) (ef012345|452301ef) (789abcde|debc9a78) (f0123456|563412f0) .*
+ 10010148 (00c0ffee|eeffc000) 00000000 (12345678|f0debc9a) (9abcdef0|78563412) .*
+ 10010158 (23456789|01efcdab) (abcdef01|89674523) (3456789a|12f0debc) (bcdef012|9a785634) .*
+ 10010168 (456789ab|2301efcd) (cdef0123|ab896745) (56789abc|3412f0de) (def01234|bc9a7856) .*
+ 10010178 (6789abcd|452301ef) (ef012345|cdab8967) (789abcde|563412f0) (f0123456|debc9a78) .*
Index: ld/testsuite/ld-powerpc/tlstocso.d
===================================================================
RCS file: /cvs/src/src/ld/testsuite/ld-powerpc/tlstocso.d,v
retrieving revision 1.14
diff -u -p -r1.14 tlstocso.d
--- ld/testsuite/ld-powerpc/tlstocso.d 22 Apr 2013 03:11:40 -0000 1.14
+++ ld/testsuite/ld-powerpc/tlstocso.d 22 Aug 2013 05:35:38 -0000
@@ -4,7 +4,7 @@
#objdump: -dr
#target: powerpc64*-*-*
-.*: +file format elf64-powerpc
+.*
Disassembly of section \.text:
Index: ld/testsuite/ld-powerpc/tlstocso.g
===================================================================
RCS file: /cvs/src/src/ld/testsuite/ld-powerpc/tlstocso.g,v
retrieving revision 1.11
diff -u -p -r1.11 tlstocso.g
--- ld/testsuite/ld-powerpc/tlstocso.g 15 Jan 2013 06:13:26 -0000 1.11
+++ ld/testsuite/ld-powerpc/tlstocso.g 22 Aug 2013 05:35:38 -0000
@@ -7,7 +7,7 @@
.*
Contents of section \.got:
- 106c8 00000000 (000186c8|c8860100) 00000000 00000000 .*
+ 106c8 (00000000|c8860100) (000186c8|00000000) 00000000 00000000 .*
.* 00000000 00000000 00000000 00000000 .*
.* 00000000 00000000 00000000 00000000 .*
.* 00000000 00000000 00000000 00000000 .*
Index: ld/testsuite/ld-powerpc/tlstocso.t
===================================================================
RCS file: /cvs/src/src/ld/testsuite/ld-powerpc/tlstocso.t,v
retrieving revision 1.3
diff -u -p -r1.3 tlstocso.t
--- ld/testsuite/ld-powerpc/tlstocso.t 29 Oct 2012 09:25:53 -0000 1.3
+++ ld/testsuite/ld-powerpc/tlstocso.t 22 Aug 2013 05:35:38 -0000
@@ -7,7 +7,7 @@
.*
Contents of section \.tdata:
-.* (12345678|78563412) (9abcdef0|f0debc9a) (23456789|89674523) (abcdef01|01efcdab) .*
-.* (3456789a|9a785634) (bcdef012|12f0debc) (456789ab|ab896745) (cdef0123|2301efcd) .*
-.* (56789abc|bc9a7856) (def01234|3412f0de) (6789abcd|cdab8967) (ef012345|452301ef) .*
-.* (789abcde|debc9a78) (f0123456|563412f0) .*
+.* (12345678|f0debc9a) (9abcdef0|78563412) (23456789|01efcdab) (abcdef01|89674523) .*
+.* (3456789a|12f0debc) (bcdef012|9a785634) (456789ab|2301efcd) (cdef0123|ab896745) .*
+.* (56789abc|3412f0de) (def01234|bc9a7856) (6789abcd|452301ef) (ef012345|cdab8967) .*
+.* (789abcde|563412f0) (f0123456|debc9a78) .*
Index: ld/testsuite/ld-powerpc/tocopt.d
===================================================================
RCS file: /cvs/src/src/ld/testsuite/ld-powerpc/tocopt.d,v
retrieving revision 1.2
diff -u -p -r1.2 tocopt.d
--- ld/testsuite/ld-powerpc/tocopt.d 30 Sep 2011 05:11:04 -0000 1.2
+++ ld/testsuite/ld-powerpc/tocopt.d 22 Aug 2013 05:35:38 -0000
@@ -2,13 +2,13 @@
.*: file format .*
Contents of section \.text:
- 100000b0 3d220000 e9298018 3c820000 38a48020 .*
- 100000c0 e8c50000 3fa00000 3bbd8028 7c62e82a .*
- 100000d0 3d220000 39298033 3c820000 38a48008 .*
- 100000e0 e8c50000 3fa00000 3bbd8010 7c62e82a .*
+ 100000b0 (3d220000|0000223d) (e9298018|188029e9) (3c820000|0000823c) (38a48020|2080a438) .*
+ 100000c0 (e8c50000|0000c5e8) (3fa00000|0000a03f) (3bbd8028|2880bd3b) (7c62e82a|2ae8627c) .*
+ 100000d0 (3d220000|0000223d) (39298033|33802939) (3c820000|0000823c) (38a48008|0880a438) .*
+ 100000e0 (e8c50000|0000c5e8) (3fa00000|0000a03f) (3bbd8010|1080bd3b) (7c62e82a|2ae8627c) .*
Contents of section \.got:
- 100100f0 00000000 100180f0 00000000 10010124 .*
- 10010100 00000000 10010125 00000000 10010120 .*
- 10010110 00000000 10010121 00000000 10010122 .*
+ 100100f0 (00000000|f0800110) (100180f0|00000000) (00000000|24010110) (10010124|00000000) .*
+ 10010100 (00000000|25010110) (10010125|00000000) (00000000|20010110) (10010120|00000000) .*
+ 10010110 (00000000|21010110) (10010121|00000000) (00000000|22010110) (10010122|00000000) .*
Contents of section \.sdata:
10010120 01020304 0506 .*
Index: ld/testsuite/ld-powerpc/tocopt2.d
===================================================================
RCS file: /cvs/src/src/ld/testsuite/ld-powerpc/tocopt2.d,v
retrieving revision 1.1
diff -u -p -r1.1 tocopt2.d
--- ld/testsuite/ld-powerpc/tocopt2.d 11 Jul 2011 12:03:55 -0000 1.1
+++ ld/testsuite/ld-powerpc/tocopt2.d 22 Aug 2013 05:35:38 -0000
@@ -2,4 +2,4 @@
.*: file format .*
Contents of section \.text:
- 100000b0 3d22effe 39297f4a .*
+ 100000b0 (3d22effe|feef223d) (39297f4a|4a7f2939) .*
Index: ld/testsuite/ld-powerpc/tocopt3.d
===================================================================
RCS file: /cvs/src/src/ld/testsuite/ld-powerpc/tocopt3.d,v
retrieving revision 1.1
diff -u -p -r1.1 tocopt3.d
--- ld/testsuite/ld-powerpc/tocopt3.d 11 Jul 2011 12:03:55 -0000 1.1
+++ ld/testsuite/ld-powerpc/tocopt3.d 22 Aug 2013 05:35:38 -0000
@@ -2,4 +2,4 @@
.*: file format .*
Contents of section \.text:
- 100000b0 3d22effe 39297f4a .*
+ 100000b0 (3d22effe|feef223d) (39297f4a|4a7f2939) .*
Index: ld/testsuite/ld-powerpc/tocopt4.d
===================================================================
RCS file: /cvs/src/src/ld/testsuite/ld-powerpc/tocopt4.d,v
retrieving revision 1.1
diff -u -p -r1.1 tocopt4.d
--- ld/testsuite/ld-powerpc/tocopt4.d 22 Aug 2011 14:28:54 -0000 1.1
+++ ld/testsuite/ld-powerpc/tocopt4.d 22 Aug 2013 05:35:38 -0000
@@ -2,6 +2,6 @@
.*: file format .*
Contents of section \.text:
- 100000b0 e9298000 .*
+ 100000b0 (e9298000|008029e9) .*
Contents of section \.got:
- 100100b8 00000000 00000002 .*
+ 100100b8 (00000000|02000000) (00000002|00000000) .*
Index: ld/testsuite/ld-powerpc/tocopt5.d
===================================================================
RCS file: /cvs/src/src/ld/testsuite/ld-powerpc/tocopt5.d,v
retrieving revision 1.1
diff -u -p -r1.1 tocopt5.d
--- ld/testsuite/ld-powerpc/tocopt5.d 30 Sep 2011 05:11:04 -0000 1.1
+++ ld/testsuite/ld-powerpc/tocopt5.d 22 Aug 2013 05:35:38 -0000
@@ -2,12 +2,12 @@
.*: file format .*
Contents of section \.text:
- 100000b0 60000000 e9228018 60000000 38a28020 .*
- 100000c0 e8c50000 60000000 3922802b 60000000 .*
- 100000d0 38a28008 e8c50000 .*
+ 100000b0 (60000000|00000060) (e9228018|188022e9) (60000000|00000060) (38a28020|2080a238) .*
+ 100000c0 (e8c50000|0000c5e8) (60000000|00000060) (3922802b|2b802239) (60000000|00000060) .*
+ 100000d0 (38a28008|0880a238) (e8c50000|0000c5e8) .*
Contents of section \.got:
- 100100d8 00000000 100180d8 00000000 10010104 .*
- 100100e8 00000000 10010105 00000000 10010100 .*
- 100100f8 00000000 10010101 .*
+ 100100d8 (00000000|d8800110) (100180d8|00000000) (00000000|04010110) (10010104|00000000) .*
+ 100100e8 (00000000|05010110) (10010105|00000000) (00000000|00010110) (10010100|00000000) .*
+ 100100f8 (00000000|01010110) (10010101|00000000) .*
Contents of section \.sdata:
10010100 01020304 0506 .*
--
Alan Modra
Australia Development Lab, IBM