diff options
author | Nathan Sidwell <nathan@codesourcery.com> | 2009-08-05 12:36:14 +0000 |
---|---|---|
committer | Nathan Sidwell <nathan@codesourcery.com> | 2009-08-05 12:36:14 +0000 |
commit | eb7c4339fafb5fcc63a227bf134c0eb97e5d85f7 (patch) | |
tree | 77784cd300c5e95ea7bd5ce65a1c715d5dd795cc /ld | |
parent | 30f8113aa76f852675280e7f1575de4c8018dea4 (diff) | |
download | gdb-eb7c4339fafb5fcc63a227bf134c0eb97e5d85f7.zip gdb-eb7c4339fafb5fcc63a227bf134c0eb97e5d85f7.tar.gz gdb-eb7c4339fafb5fcc63a227bf134c0eb97e5d85f7.tar.bz2 |
bfd/
* elf32-arm.c (elf32_arm_stub_type): Add arm_stub_a8_veneer_lwm.
(arm_build_one_stub): Build a8 veneers as a separate pass.
(cortex_a8_erratum_scan): Add prev_num_a8_fixes and stub_changed_p
parameters. Use them to check if we create a different a8 fixup
than the previous pass.
(elf32_arm_size_stubs): Move scope of stub_changed and
prev_num_a8_fixes into main loop.
(elf32_arm_build_stubs): Build a8 veneers in a second pass.
ld/testsuite/
* ld-arm/cortex-a8-far-1.s: New.
* ld-arm/cortex-a8-far-2.s: New.
* ld-arm/cortex-a8-far.d: New.
* ld-arm/arm-elf.exp: Add new test.
Diffstat (limited to 'ld')
-rw-r--r-- | ld/testsuite/ChangeLog | 7 | ||||
-rw-r--r-- | ld/testsuite/ld-arm/arm-elf.exp | 4 | ||||
-rw-r--r-- | ld/testsuite/ld-arm/cortex-a8-far-1.s | 8 | ||||
-rw-r--r-- | ld/testsuite/ld-arm/cortex-a8-far-2.s | 20 | ||||
-rw-r--r-- | ld/testsuite/ld-arm/cortex-a8-far.d | 40 |
5 files changed, 79 insertions, 0 deletions
diff --git a/ld/testsuite/ChangeLog b/ld/testsuite/ChangeLog index 60ee1ec..d63c14b 100644 --- a/ld/testsuite/ChangeLog +++ b/ld/testsuite/ChangeLog @@ -1,3 +1,10 @@ +2009-08-05 Nathan Sidwell <nathan@codesourcery.com> + + * ld-arm/cortex-a8-far-1.s: New. + * ld-arm/cortex-a8-far-2.s: New. + * ld-arm/cortex-a8-far.d: New. + * ld-arm/arm-elf.exp: Add new test. + 2009-08-02 H.J. Lu <hongjiu.lu@intel.com> PR ld/6443 diff --git a/ld/testsuite/ld-arm/arm-elf.exp b/ld/testsuite/ld-arm/arm-elf.exp index de3628e..941ef50 100644 --- a/ld/testsuite/ld-arm/arm-elf.exp +++ b/ld/testsuite/ld-arm/arm-elf.exp @@ -205,6 +205,10 @@ set armelftests { "-EL -Ttext=0x8f00 --fix-cortex-a8" "-EL" {cortex-a8-thumb-target.s cortex-a8-fix-blx-rel.s} {{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" {cortex-a8-far-1.s cortex-a8-far-2.s} + {{objdump -dr cortex-a8-far.d}} + "cortex-a8-far"} {"Unwinding and -gc-sections" "-gc-sections" "" {gc-unwind.s} {{objdump -sj.data gc-unwind.d}} "gc-unwind"} diff --git a/ld/testsuite/ld-arm/cortex-a8-far-1.s b/ld/testsuite/ld-arm/cortex-a8-far-1.s new file mode 100644 index 0000000..09d3583 --- /dev/null +++ b/ld/testsuite/ld-arm/cortex-a8-far-1.s @@ -0,0 +1,8 @@ + .syntax unified + .thumb + .globl two +two: + bl far_fn + .rept 0x200000 + .long 0 + .endr diff --git a/ld/testsuite/ld-arm/cortex-a8-far-2.s b/ld/testsuite/ld-arm/cortex-a8-far-2.s new file mode 100644 index 0000000..22fd40f --- /dev/null +++ b/ld/testsuite/ld-arm/cortex-a8-far-2.s @@ -0,0 +1,20 @@ + .syntax unified + .thumb +three: + bl far_fn1 + bl far_fn2 + .rept 1016 + .long 0 + .endr + nop +label1: + eor.w r0, r1, r2 + beq.w label1 + + eor.w r0, r1, r2 + + eor.w r0, r1, r2 + b.w label1 + + eor.w r0, r1, r2 + eor.w r0, r1, r2 diff --git a/ld/testsuite/ld-arm/cortex-a8-far.d b/ld/testsuite/ld-arm/cortex-a8-far.d new file mode 100644 index 0000000..3d9059d --- /dev/null +++ b/ld/testsuite/ld-arm/cortex-a8-far.d @@ -0,0 +1,40 @@ + +.*: file format .* + + +Disassembly of section \.text: + +00000000 <two>: + 0: f000 c802 blx 800008 <__far_fn_from_thumb> + ... +#... +00800008 <__far_fn_from_thumb>: + 800008: e51ff004 ldr pc, \[pc, #-4\] ; 80000c <__far_fn_from_thumb\+0x4> + 80000c: 7fff0000 .word 0x7fff0000 + +00800010 <three>: + 800010: f001 e806 blx 801020 <__far_fn1_from_thumb> + 800014: f001 e800 blx 801018 <__far_fn2_from_thumb> + ... + 800ff8: bf00 nop + +00800ffa <label1>: + 800ffa: ea81 0002 eor.w r0, r1, r2 + 800ffe: f000 b813 b.w 801028 <__far_fn1_from_thumb\+0x8> + 801002: ea81 0002 eor.w r0, r1, r2 + 801006: ea81 0002 eor.w r0, r1, r2 + 80100a: f7ff bff6 b.w 800ffa <label1> + 80100e: ea81 0002 eor.w r0, r1, r2 + 801012: ea81 0002 eor.w r0, r1, r2 + ... + +00801018 <__far_fn2_from_thumb>: + 801018: e51ff004 ldr pc, \[pc, #-4\] ; 80101c <__far_fn2_from_thumb\+0x4> + 80101c: 80000004 .word 0x80000004 + +00801020 <__far_fn1_from_thumb>: + 801020: e51ff004 ldr pc, \[pc, #-4\] ; 801024 <__far_fn1_from_thumb\+0x4> + 801024: 80000000 .word 0x80000000 + 801028: d001 beq.n 80102e <__far_fn1_from_thumb\+0xe> + 80102a: f7ff bfea b.w 801002 <label1\+0x8> + 80102e: f7ff bfe4 b.w 800ffa <label1> |