aboutsummaryrefslogtreecommitdiff
path: root/ld/testsuite/ld-powerpc
diff options
context:
space:
mode:
authorNathan Sidwell <nathan@codesourcery.com>2009-05-27 13:31:24 +0000
committerNathan Sidwell <nathan@codesourcery.com>2009-05-27 13:31:24 +0000
commitc8a1f2548b56bc210c8bcb067e91de8132f56d67 (patch)
treed765705e9894e818c3ef4e0895ecd402ced6541c /ld/testsuite/ld-powerpc
parent07fc31c9c913c27ac64af66c32689db4a63827e2 (diff)
downloadbinutils-c8a1f2548b56bc210c8bcb067e91de8132f56d67.zip
binutils-c8a1f2548b56bc210c8bcb067e91de8132f56d67.tar.gz
binutils-c8a1f2548b56bc210c8bcb067e91de8132f56d67.tar.bz2
bfd/
* elf32-ppc.c (ppc_elf_relax_section): Work with a partial link. * bout.c (b_out_bfd_relax_section): Reject relocatable links. * elf32-m10300.c (mn10300_elf_relax_section): Likewise. * elf32-avr.c (elf32_avr_relax_section): Likewise. * elf32-frv.c (elf32_avr_relax_section): Likewise. * elf32-xtensa.c (elf_xtensa_relax_section): Likewise. * elf64-mmix.c (mmix_elf_relax_section): Likewise. * elfxx-ia64.c (elfNN_ia64_relax_section): Likewise. * elfxx-sparc.c (_bfd_sparc_elf_relax_section): Likewise. * reloc.c (bfd_generic_relax_section): Likewise. * reloc16.c (bfd_coff_reloc16_relax_section): Likewise. * vms.c (vms_bfd_relax_section): Likewise. ld/ * ldmain.c (main): Don't reject --relax -r. * ld.texinfo (PowerPC ELF32): Document behaviour of relaxing partial links. ld/testsuite/ * ld-powerpc/vxworks-relax-2.s: New. * ld-powerpc/vxworks-relax-2.rd: New. * ld-powerpc/powerpc.exp: Add it.
Diffstat (limited to 'ld/testsuite/ld-powerpc')
-rw-r--r--ld/testsuite/ld-powerpc/powerpc.exp5
-rw-r--r--ld/testsuite/ld-powerpc/vxworks-relax-2.rd11
-rw-r--r--ld/testsuite/ld-powerpc/vxworks-relax-2.s14
3 files changed, 30 insertions, 0 deletions
diff --git a/ld/testsuite/ld-powerpc/powerpc.exp b/ld/testsuite/ld-powerpc/powerpc.exp
index 2ed41f2..bc63a46 100644
--- a/ld/testsuite/ld-powerpc/powerpc.exp
+++ b/ld/testsuite/ld-powerpc/powerpc.exp
@@ -54,6 +54,11 @@ if {[istarget "*-*-vxworks"]} {
"-mregnames" {vxworks-relax.s}
{{readelf --relocs vxworks-relax.rd}}
"vxworks-relax"}
+ {"VxWorks relocatable relax test"
+ "-Tvxworks1.ld -r --relax -q"
+ "-mregnames" {vxworks-relax-2.s}
+ {{readelf --relocs vxworks-relax-2.rd}}
+ "vxworks-relax-2"}
}
run_ld_link_tests $ppcvxtests
run_dump_test "vxworks1-static"
diff --git a/ld/testsuite/ld-powerpc/vxworks-relax-2.rd b/ld/testsuite/ld-powerpc/vxworks-relax-2.rd
new file mode 100644
index 0000000..02eb964
--- /dev/null
+++ b/ld/testsuite/ld-powerpc/vxworks-relax-2.rd
@@ -0,0 +1,11 @@
+
+Relocation section '.rela.text' at offset 0x[0-9a-f]+ contains 8 entries:
+ Offset Info Type Sym.Value Sym. Name \+ Addend
+00000016 00000106 R_PPC_ADDR16_HA 00000000 .text \+ 4000034
+0000001a 00000104 R_PPC_ADDR16_LO 00000000 .text \+ 4000034
+00000006 00000106 R_PPC_ADDR16_HA 00000000 .text \+ 4000034
+0000000a 00000104 R_PPC_ADDR16_LO 00000000 .text \+ 4000034
+00000026 00000506 R_PPC_ADDR16_HA 00000000 undefined \+ 0
+0000002a 00000504 R_PPC_ADDR16_LO 00000000 undefined \+ 0
+0400003e 00000606 R_PPC_ADDR16_HA 00000000 _start \+ 0
+04000042 00000604 R_PPC_ADDR16_LO 00000000 _start \+ 0
diff --git a/ld/testsuite/ld-powerpc/vxworks-relax-2.s b/ld/testsuite/ld-powerpc/vxworks-relax-2.s
new file mode 100644
index 0000000..4e58124
--- /dev/null
+++ b/ld/testsuite/ld-powerpc/vxworks-relax-2.s
@@ -0,0 +1,14 @@
+ .globl _start
+_start:
+ bl elsewhere
+ lis 9,elsewhere@ha
+ la 0,elsewhere@l(9)
+ bl undefined
+
+
+ .section .far,"ax",@progbits
+elsewhere:
+ bl _start
+
+ .section .pad
+ .space 0x4000000