aboutsummaryrefslogtreecommitdiff
path: root/ld
diff options
context:
space:
mode:
authorNathan Sidwell <nathan@codesourcery.com>2010-04-01 10:02:28 +0000
committerNathan Sidwell <nathan@codesourcery.com>2010-04-01 10:02:28 +0000
commitf2faa8006cc51cebefb638ea285b1202ebf2ee71 (patch)
tree71787697cae7ecf4073497329532f95468afd7c1 /ld
parent4b544b64681eec335bef3d3383772a7a38278fa9 (diff)
downloadgdb-f2faa8006cc51cebefb638ea285b1202ebf2ee71.zip
gdb-f2faa8006cc51cebefb638ea285b1202ebf2ee71.tar.gz
gdb-f2faa8006cc51cebefb638ea285b1202ebf2ee71.tar.bz2
bfd/
* elf32-ppc.c (apuinfo_set): New static var. (ppc_elf_begin_write_processing): Set it here, always create an APUinfo section if there were any in the inputs. (ppc_elf_write_section): Check apuinfo_set. (ppc_elf_final_write_processing): Likewise. ld/testsuite/ * ld-powerpc/apuinfo-nul.rd: New. * ld-powerpc/apuinfo-nul1.s: New. * ld-powerpc/powerpc.exp: Add it.
Diffstat (limited to 'ld')
-rw-r--r--ld/testsuite/ChangeLog6
-rw-r--r--ld/testsuite/ld-powerpc/apuinfo-nul.rd9
-rw-r--r--ld/testsuite/ld-powerpc/apuinfo-nul1.s10
-rw-r--r--ld/testsuite/ld-powerpc/powerpc.exp3
4 files changed, 28 insertions, 0 deletions
diff --git a/ld/testsuite/ChangeLog b/ld/testsuite/ChangeLog
index 3731c1f..97a39ec 100644
--- a/ld/testsuite/ChangeLog
+++ b/ld/testsuite/ChangeLog
@@ -1,3 +1,9 @@
+2010-04-01 Nathan Sidwell <nathan@codesourcery.com>
+
+ * ld-powerpc/apuinfo-nul.rd: New.
+ * ld-powerpc/apuinfo-nul1.s: New.
+ * ld-powerpc/powerpc.exp: Add it.
+
2010-03-31 Kai TIetz <kai.tietz@onevision.com>
* ld-pe//pe-compile.exp (run_basefile_test): Trim result of wc
diff --git a/ld/testsuite/ld-powerpc/apuinfo-nul.rd b/ld/testsuite/ld-powerpc/apuinfo-nul.rd
new file mode 100644
index 0000000..c20fc5e
--- /dev/null
+++ b/ld/testsuite/ld-powerpc/apuinfo-nul.rd
@@ -0,0 +1,9 @@
+#source: apuinfo-nul.s
+#source: apuinfo-nul1.s
+#as: -me500
+#readelf: -x2
+#target: powerpc-eabi*
+
+Hex dump of section '.PPC.EMB.apuinfo':
+ 0x00000000 00000008 00000000 00000002 41505569 ............APUi
+ 0x00000010 6e666f00 nfo.
diff --git a/ld/testsuite/ld-powerpc/apuinfo-nul1.s b/ld/testsuite/ld-powerpc/apuinfo-nul1.s
new file mode 100644
index 0000000..f415e71
--- /dev/null
+++ b/ld/testsuite/ld-powerpc/apuinfo-nul1.s
@@ -0,0 +1,10 @@
+ .text
+_start: nop
+
+ # dummy empty apuinfo
+ # some other tools emit these
+ .section ".PPC.EMB.apuinfo"
+ .long 8
+ .long 0
+ .long 2
+ .asciz "APUinfo"
diff --git a/ld/testsuite/ld-powerpc/powerpc.exp b/ld/testsuite/ld-powerpc/powerpc.exp
index 4c0038a..9d0207f 100644
--- a/ld/testsuite/ld-powerpc/powerpc.exp
+++ b/ld/testsuite/ld-powerpc/powerpc.exp
@@ -103,6 +103,9 @@ set ppcelftests {
{"APUinfo section processing" "-melf32ppc"
"-a32 -me500" {apuinfo1.s apuinfo-nul.s apuinfo2.s}
{{readelf -x2 apuinfo.rd}} "apuinfo"}
+ {"APUinfo NULL section processing" "-melf32ppc"
+ "-a32 -me500" {apuinfo-nul1.s apuinfo-nul.s}
+ {{readelf -x2 apuinfo-nul.rd}} "apuinfo"}
{"TLS32 static exec" "-melf32ppc" "-a32" {tls32.s tlslib32.s}
{{objdump -dr tls32.d} {objdump -sj.got tls32.g}
{objdump -sj.tdata tls32.t}}