diff options
Diffstat (limited to 'ld')
-rw-r--r-- | ld/ChangeLog | 6 | ||||
-rw-r--r-- | ld/ld.texinfo | 5 | ||||
-rw-r--r-- | ld/ldmain.c | 2 | ||||
-rw-r--r-- | ld/testsuite/ChangeLog | 6 | ||||
-rw-r--r-- | ld/testsuite/ld-powerpc/powerpc.exp | 5 | ||||
-rw-r--r-- | ld/testsuite/ld-powerpc/vxworks-relax-2.rd | 11 | ||||
-rw-r--r-- | ld/testsuite/ld-powerpc/vxworks-relax-2.s | 14 |
7 files changed, 46 insertions, 3 deletions
diff --git a/ld/ChangeLog b/ld/ChangeLog index b996d65..9c02e69 100644 --- a/ld/ChangeLog +++ b/ld/ChangeLog @@ -1,3 +1,9 @@ +2009-05-26 Nathan Sidwell <nathan@codesourcery.com> + + * ldmain.c (main): Don't reject --relax -r. + * ld.texinfo (PowerPC ELF32): Document behaviour of relaxing + partial links. + 2009-05-26 Nick Clifton <nickc@redhat.com> * po/id.po: Updated Indonesian translation. diff --git a/ld/ld.texinfo b/ld/ld.texinfo index fbda265..57286ba 100644 --- a/ld/ld.texinfo +++ b/ld/ld.texinfo @@ -6284,7 +6284,10 @@ displacement, which may result in @command{ld} giving @samp{--relax} enables the generation of trampolines that can access the entire 32-bit address space. These trampolines are inserted at section boundaries, so may not themselves be reachable if an input -section exceeds 33M in size. +section exceeds 33M in size. You may combine @samp{-r} and +@samp{--relax} to add trampolines in a partial link. In that case +both branches to undefined symbols and inter-section branches are also +considered potentially out of range, and trampolines inserted. @cindex PowerPC ELF32 options @table @option diff --git a/ld/ldmain.c b/ld/ldmain.c index 7cb4fc9..3b8fed6 100644 --- a/ld/ldmain.c +++ b/ld/ldmain.c @@ -294,8 +294,6 @@ main (int argc, char **argv) { if (command_line.check_section_addresses < 0) command_line.check_section_addresses = 0; - if (command_line.relax) - einfo (_("%P%F: --relax and -r may not be used together\n")); if (link_info.shared) einfo (_("%P%F: -r and -shared may not be used together\n")); } diff --git a/ld/testsuite/ChangeLog b/ld/testsuite/ChangeLog index 06b10c3..9d54d03 100644 --- a/ld/testsuite/ChangeLog +++ b/ld/testsuite/ChangeLog @@ -1,3 +1,9 @@ +2009-05-26 Nathan Sidwell <nathan@codesourcery.com> + + * ld-powerpc/vxworks-relax-2.s: New. + * ld-powerpc/vxworks-relax-2.rd: New. + * ld-powerpc/powerpc.exp: Add it. + 2009-05-22 Hans-Peter Nilsson <hp@axis.com> * ld-scripts/rgn-over7.d: Adjust expected message for recent change. 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 |