diff options
author | Paul Brook <paul@codesourcery.com> | 2011-05-31 14:07:58 +0000 |
---|---|---|
committer | Paul Brook <paul@codesourcery.com> | 2011-05-31 14:07:58 +0000 |
commit | 63e1a0fcbacd4cee2d74a2f31c84bce7807e5e77 (patch) | |
tree | 6d40bb661791da5d0de645f36d957332c2133c86 /ld | |
parent | 10960bfbce1719b569d2f7e3b0a9931ec7f2b5d9 (diff) | |
download | fsf-binutils-gdb-63e1a0fcbacd4cee2d74a2f31c84bce7807e5e77.zip fsf-binutils-gdb-63e1a0fcbacd4cee2d74a2f31c84bce7807e5e77.tar.gz fsf-binutils-gdb-63e1a0fcbacd4cee2d74a2f31c84bce7807e5e77.tar.bz2 |
2011-05-31 Paul Brook <paul@codesourcery.com>
bfd/
* elf32-arm.c (elf32_arm_final_link_relocate): Only do bl conversion
for known functions.
(elf32_arm_swap_symbol_in): Only set ST_BRANCH_TO_ARM for function
symbols.
include/elf/
* arm.h (arm_st_branch_type): Add ST_BRANCH_UNKNOWN.
ld/testsuite/
* ld-arm/cortex-a8-far.d: Adjust expected output.
* ld-arm/arm-call1.s: Give function symbol correct type.
* ld-arm/arm-call2.s: Ditto.
* ld-arm/farcall-group4.s: Ditto.
* ld-arm/arm-elf.exp (cortex-a8-far): Define far symbols with correct
type via assembly file.
* ld-arm/cortex-a8-far-3.s: New file.
* ld-arm/abs-call-1.s: Add Thumb tests
Diffstat (limited to 'ld')
-rw-r--r-- | ld/testsuite/ChangeLog | 11 | ||||
-rw-r--r-- | ld/testsuite/ld-arm/abs-call-1.d | 7 | ||||
-rw-r--r-- | ld/testsuite/ld-arm/abs-call-1.s | 7 | ||||
-rw-r--r-- | ld/testsuite/ld-arm/arm-call1.s | 1 | ||||
-rw-r--r-- | ld/testsuite/ld-arm/arm-call2.s | 1 | ||||
-rw-r--r-- | ld/testsuite/ld-arm/arm-elf.exp | 4 | ||||
-rw-r--r-- | ld/testsuite/ld-arm/cortex-a8-far-3.s | 9 | ||||
-rw-r--r-- | ld/testsuite/ld-arm/farcall-group4.s | 1 |
8 files changed, 38 insertions, 3 deletions
diff --git a/ld/testsuite/ChangeLog b/ld/testsuite/ChangeLog index 586356e..5c645bc 100644 --- a/ld/testsuite/ChangeLog +++ b/ld/testsuite/ChangeLog @@ -1,4 +1,15 @@ 2011-05-31 Paul Brook <paul@codesourcery.com> + + * ld-arm/cortex-a8-far.d: Adjust expected output. + * ld-arm/arm-call1.s: Give function symbol correct type. + * ld-arm/arm-call2.s: Ditto. + * ld-arm/farcall-group4.s: Ditto. + * ld-arm/arm-elf.exp (cortex-a8-far): Define far symbols with correct + type via assembly file. + * ld-arm/cortex-a8-far-3.s: New file. + * ld-arm/abs-call-1.s: Add Thumb tests + +2011-05-31 Paul Brook <paul@codesourcery.com> Nathan Sidwell <nathan@codesourcery.com> * ld-arm/abs-call-1.d: New. diff --git a/ld/testsuite/ld-arm/abs-call-1.d b/ld/testsuite/ld-arm/abs-call-1.d index 4482beb..7214e3a 100644 --- a/ld/testsuite/ld-arm/abs-call-1.d +++ b/ld/testsuite/ld-arm/abs-call-1.d @@ -6,4 +6,9 @@ Disassembly of section .text: 00008000 <arm>: 8000: eb03dffe bl 100000 <foo> 8004: ea03dffd b 100000 <foo> - 8008: eb03dffc bl 100000 <foo> + 8008: fa03dffc blx 100000 <foo> + 800c: eb03dffb bl 100000 <foo> +00008010 <thumb>: + 8010: f0f7 fff6 bl 100000 <foo> + 8014: f0f7 bff4 b\.w 100000 <foo> + 8018: f0f7 eff2 blx 100000 <foo> diff --git a/ld/testsuite/ld-arm/abs-call-1.s b/ld/testsuite/ld-arm/abs-call-1.s index c0a66b4..ab1ac3d 100644 --- a/ld/testsuite/ld-arm/abs-call-1.s +++ b/ld/testsuite/ld-arm/abs-call-1.s @@ -4,5 +4,12 @@ arm: bl 0x100000 b 0x100000 + blx 0x100000 bl foo + .syntax unified + .thumb +thumb: bl 0x100000 + b 0x100000 + blx 0x100000 + @ bl foo is broken - gas fails to preserve the symbol reference diff --git a/ld/testsuite/ld-arm/arm-call1.s b/ld/testsuite/ld-arm/arm-call1.s index e6ea1f2..e4ab1c2 100644 --- a/ld/testsuite/ld-arm/arm-call1.s +++ b/ld/testsuite/ld-arm/arm-call1.s @@ -2,6 +2,7 @@ .text .arch armv5t .global _start + .type _start, %function _start: bl arm bl t1 diff --git a/ld/testsuite/ld-arm/arm-call2.s b/ld/testsuite/ld-arm/arm-call2.s index 30ae349..02aa379 100644 --- a/ld/testsuite/ld-arm/arm-call2.s +++ b/ld/testsuite/ld-arm/arm-call2.s @@ -4,6 +4,7 @@ .global t1 .global t2 .global t5 + .type arm, %function arm: bx lr .thumb diff --git a/ld/testsuite/ld-arm/arm-elf.exp b/ld/testsuite/ld-arm/arm-elf.exp index a8c51c2..8b8495e 100644 --- a/ld/testsuite/ld-arm/arm-elf.exp +++ b/ld/testsuite/ld-arm/arm-elf.exp @@ -276,8 +276,8 @@ set armelftests { {{objdump -dr cortex-a8-fix-blx-rel-thumb.d}} "cortex-a8-fix-blx-rel-thumb"} {"Cortex-A8 erratum fix, relocate bl.w and far call" - "-EL -Ttext=0x00 --fix-cortex-a8 --defsym far_fn1=0x80000000 --defsym far_fn2=0x80000004 --defsym far_fn=0x7fff0000 --defsym _start=0" - "-EL -mcpu=cortex-a8" {cortex-a8-far-1.s cortex-a8-far-2.s} + "-EL -Ttext=0x00 --fix-cortex-a8 --defsym _start=0" + "-EL -mcpu=cortex-a8" {cortex-a8-far-1.s cortex-a8-far-2.s cortex-a8-far-3.s} {{objdump -dr cortex-a8-far.d}} "cortex-a8-far"} {"Cortex-A8 erratum fix, headers" diff --git a/ld/testsuite/ld-arm/cortex-a8-far-3.s b/ld/testsuite/ld-arm/cortex-a8-far-3.s new file mode 100644 index 0000000..48241a5 --- /dev/null +++ b/ld/testsuite/ld-arm/cortex-a8-far-3.s @@ -0,0 +1,9 @@ +.globl far_fn +.type far_fn, %function +.set far_fn, 0x7fff0000 +.globl far_fn1 +.type far_fn1, %function +.set far_fn1, 0x80000000 +.globl far_fn2 +.type far_fn2, %function +.set far_fn2, 0x80000004 diff --git a/ld/testsuite/ld-arm/farcall-group4.s b/ld/testsuite/ld-arm/farcall-group4.s index 17f503b..95ad035 100644 --- a/ld/testsuite/ld-arm/farcall-group4.s +++ b/ld/testsuite/ld-arm/farcall-group4.s @@ -8,6 +8,7 @@ myfunc: bl bar .section .far, "xa" + .type bar, %function .global bar bar: bx lr |