aboutsummaryrefslogtreecommitdiff
path: root/ld/testsuite/ld-powerpc
diff options
context:
space:
mode:
authorNick Clifton <nickc@redhat.com>2002-12-03 18:24:33 +0000
committerNick Clifton <nickc@redhat.com>2002-12-03 18:24:33 +0000
commite1a9cb8e15a2f05592910ee3e27dacf7fbee68b0 (patch)
treec4886077fcbfbe0e648140c236aa9ffa1c40b817 /ld/testsuite/ld-powerpc
parenta823923bf657b448ef2ef71ab7b8fad2f31cd818 (diff)
downloadgdb-e1a9cb8e15a2f05592910ee3e27dacf7fbee68b0.zip
gdb-e1a9cb8e15a2f05592910ee3e27dacf7fbee68b0.tar.gz
gdb-e1a9cb8e15a2f05592910ee3e27dacf7fbee68b0.tar.bz2
Fix the merging of .PPC.EMB.apuinfo sections. Add a test to make sure that
the fix continues to work.
Diffstat (limited to 'ld/testsuite/ld-powerpc')
-rw-r--r--ld/testsuite/ld-powerpc/apuinfo.rd10
-rw-r--r--ld/testsuite/ld-powerpc/apuinfo1.s9
-rw-r--r--ld/testsuite/ld-powerpc/apuinfo2.s8
-rw-r--r--ld/testsuite/ld-powerpc/powerpc.exp2
4 files changed, 29 insertions, 0 deletions
diff --git a/ld/testsuite/ld-powerpc/apuinfo.rd b/ld/testsuite/ld-powerpc/apuinfo.rd
new file mode 100644
index 0000000..421ae7d
--- /dev/null
+++ b/ld/testsuite/ld-powerpc/apuinfo.rd
@@ -0,0 +1,10 @@
+#source: apuinfo1.s
+#source: apuinfo2.s
+#as: -me500
+#readelf: -x5
+#target: powerpc-eabi*
+
+Hex dump of section '.PPC.EMB.apuinfo':
+ 0x00000000 00000008 00000007 00000002 41505569 ............APUi
+ 0x00000010 6e666f00 00420001 00430001 00410001 nfo..B...C...A..
+ 0x00000020 01020001 01010001 00400001 01000001 .........@......
diff --git a/ld/testsuite/ld-powerpc/apuinfo1.s b/ld/testsuite/ld-powerpc/apuinfo1.s
new file mode 100644
index 0000000..fd42eac
--- /dev/null
+++ b/ld/testsuite/ld-powerpc/apuinfo1.s
@@ -0,0 +1,9 @@
+ .text
+ .global apuinfo1
+apuinfo1:
+ evstdd 29,8(1)
+ isellt 29, 28, 27
+ efsabs 29, 28
+ .global _start
+_start:
+ nop
diff --git a/ld/testsuite/ld-powerpc/apuinfo2.s b/ld/testsuite/ld-powerpc/apuinfo2.s
new file mode 100644
index 0000000..7f4e7bb
--- /dev/null
+++ b/ld/testsuite/ld-powerpc/apuinfo2.s
@@ -0,0 +1,8 @@
+ .text
+ .global apuinfo2
+apuinfo2:
+ evstdd 29,8(1)
+ mfbbear 29
+ mfpmr 29, 27
+ dcbtstls 1, 29, 28
+ rfmci
diff --git a/ld/testsuite/ld-powerpc/powerpc.exp b/ld/testsuite/ld-powerpc/powerpc.exp
index f52278d..a853df9 100644
--- a/ld/testsuite/ld-powerpc/powerpc.exp
+++ b/ld/testsuite/ld-powerpc/powerpc.exp
@@ -41,6 +41,8 @@ if { [istarget "*-*-macos*"] || [istarget "*-*-netware*"]
set ppcelftests {
{"Reloc section order" "-shared -z nocombreloc" "" {reloc.s}
{{objdump -hw reloc.d}} "reloc.so"}
+ {"APUinfo section processing" "" "-me500" {apuinfo1.s apuinfo2.s}
+ {{readelf -x5 apuinfo.rd}} "apuinfo"}
}
run_ld_link_tests $ppcelftests