aboutsummaryrefslogtreecommitdiff
path: root/ld/testsuite
diff options
context:
space:
mode:
authorAlan Modra <amodra@gmail.com>2013-05-21 01:37:41 +0000
committerAlan Modra <amodra@gmail.com>2013-05-21 01:37:41 +0000
commit60245b884790a97a51b8c7f8e63947e41571a5c8 (patch)
tree3fbe68c14dd667ee9815ed8d8171a22b1a6c87dc /ld/testsuite
parentc0637f3af6866ed35039406e564a6743f373cd67 (diff)
downloadgdb-60245b884790a97a51b8c7f8e63947e41571a5c8.zip
gdb-60245b884790a97a51b8c7f8e63947e41571a5c8.tar.gz
gdb-60245b884790a97a51b8c7f8e63947e41571a5c8.tar.bz2
* ld-powerpc/export-class.exp (supports_ppc64): Delete.
(powerpc_export_class_test): Add "endian" param. (abis): Add little-endian targets and test. * ld-powerpc/powerpc-64-export-class.xd: Update for little-endian.
Diffstat (limited to 'ld/testsuite')
-rw-r--r--ld/testsuite/ChangeLog7
-rw-r--r--ld/testsuite/ld-powerpc/export-class.exp33
-rw-r--r--ld/testsuite/ld-powerpc/powerpc-64-export-class.xd20
3 files changed, 29 insertions, 31 deletions
diff --git a/ld/testsuite/ChangeLog b/ld/testsuite/ChangeLog
index ad0b000..a1712bf 100644
--- a/ld/testsuite/ChangeLog
+++ b/ld/testsuite/ChangeLog
@@ -1,3 +1,10 @@
+2013-05-21 Alan Modra <amodra@gmail.com>
+
+ * ld-powerpc/export-class.exp (supports_ppc64): Delete.
+ (powerpc_export_class_test): Add "endian" param.
+ (abis): Add little-endian targets and test.
+ * ld-powerpc/powerpc-64-export-class.xd: Update for little-endian.
+
2013-05-10 Joel Brobecker <brobecker@adacore.com>
* ld-powerpc/aix-core-sec-1.hd, ld-powerpc/aix-core-sec-2.hd,
diff --git a/ld/testsuite/ld-powerpc/export-class.exp b/ld/testsuite/ld-powerpc/export-class.exp
index 5b721fc..6171d13 100644
--- a/ld/testsuite/ld-powerpc/export-class.exp
+++ b/ld/testsuite/ld-powerpc/export-class.exp
@@ -30,22 +30,11 @@ if { ![istarget powerpc*-*-linux*] } {
return
}
-proc supports_ppc64 { } {
- global ld
+proc powerpc_export_class_test { abi endian emul } {
- catch "exec $ld --help | grep emulations" tmp
- if [string match "*elf64ppc*" $tmp] then {
- return 1
- } else {
- return 0
- }
-}
-
-proc powerpc_export_class_test { abi emul } {
-
- set testname "PowerPC $abi symbol export class test"
+ set testname "PowerPC $abi $endian symbol export class test"
- set AFLAGS "-a$abi -be"
+ set AFLAGS "-a$abi -$endian"
set LDFLAGS "-m$emul"
# Build an auxiliary shared object with conflicting versioned symbol
@@ -96,11 +85,13 @@ proc powerpc_export_class_test { abi emul } {
]
}
-if { [supports_ppc64] } {
- set abis { 32 elf32ppclinux 64 elf64ppc }
-} else {
- set abis { 32 elf32ppclinux }
-}
-foreach { abi emul } $abis {
- powerpc_export_class_test $abi $emul
+set abis { 32 be elf32ppclinux 32 le elf32lppclinux 64 be elf64ppc 64 le elf64lppc }
+
+global ld
+catch "exec $ld --help | grep emulations" ldemul
+
+foreach { abi endian emul } $abis {
+ if { [string first $emul $ldemul] != -1 } then {
+ powerpc_export_class_test $abi $endian $emul
+ }
}
diff --git a/ld/testsuite/ld-powerpc/powerpc-64-export-class.xd b/ld/testsuite/ld-powerpc/powerpc-64-export-class.xd
index d0388ad..264803c 100644
--- a/ld/testsuite/ld-powerpc/powerpc-64-export-class.xd
+++ b/ld/testsuite/ld-powerpc/powerpc-64-export-class.xd
@@ -1,11 +1,11 @@
Hex dump of section '\.data':
- 0x12340000 00000000 123400a0 00000000 00000000 .*
- 0x12340010 00000000 123400a0 00000000 00000000 .*
- 0x12340020 00000000 123400a0 00000000 00000000 .*
- 0x12340030 00000000 00000000 00000000 00000000 .*
- 0x12340040 00000000 123400a0 00000000 00000000 .*
- 0x12340050 00000000 123400a0 00000000 00000000 .*
- 0x12340060 00000000 123400a0 00000000 00000000 .*
- 0x12340070 00000000 123400a0 00000000 00000000 .*
- 0x12340080 00000000 123400a0 00000000 00000000 .*
- 0x12340090 00000000 123400a0 00000000 00000000 .*
+ 0x12340000 (00000000|a0003412) (123400a0|00000000) 00000000 00000000 .*
+ 0x12340010 (00000000|a0003412) (123400a0|00000000) 00000000 00000000 .*
+ 0x12340020 (00000000|a0003412) (123400a0|00000000) 00000000 00000000 .*
+ 0x12340030 (00000000|00000000) (00000000|00000000) 00000000 00000000 .*
+ 0x12340040 (00000000|a0003412) (123400a0|00000000) 00000000 00000000 .*
+ 0x12340050 (00000000|a0003412) (123400a0|00000000) 00000000 00000000 .*
+ 0x12340060 (00000000|a0003412) (123400a0|00000000) 00000000 00000000 .*
+ 0x12340070 (00000000|a0003412) (123400a0|00000000) 00000000 00000000 .*
+ 0x12340080 (00000000|a0003412) (123400a0|00000000) 00000000 00000000 .*
+ 0x12340090 (00000000|a0003412) (123400a0|00000000) 00000000 00000000 .*