diff options
author | Nick Clifton <nickc@redhat.com> | 2008-05-23 13:53:27 +0000 |
---|---|---|
committer | Nick Clifton <nickc@redhat.com> | 2008-05-23 13:53:27 +0000 |
commit | da5938a216697f120702fe275362302c8855c94b (patch) | |
tree | 35700ff54ab89ed2842023cf41f0c8744135b153 /ld/testsuite | |
parent | 50ee75353252ec07aa1f062a2b409a2f6eb0d48d (diff) | |
download | gdb-da5938a216697f120702fe275362302c8855c94b.zip gdb-da5938a216697f120702fe275362302c8855c94b.tar.gz gdb-da5938a216697f120702fe275362302c8855c94b.tar.bz2 |
bfd/
* elf32-arm.c (arm_type_of_stub): Ignore STT_SECTION symbols.
(elf32_arm_stub_add_mapping_symbol): Remove.
(elf32_arm_add_stub): Don't generate mapping symbols. Change
prototype.
(elf32_arm_size_stubs): Use new elf32_arm_add_stub
prototype. Don't generate thumb to arm glue for calls.
(arm_map_one_stub): Define.
(elf32_arm_output_arch_local_syms): Generate mapping symbols for
long calls stubs.
ld/testsuite/
* ld-arm/farcall-arm-arm.s: Force function type on 'bar'.
* ld-arm/farcall-thumb-arm.s: Likewise.
* ld-arm/farcall-thumb-arm-blx.d: Fix encoding.
* ld-arm/farcall-thumb-arm.d: Likewise.
* ld-arm/farcall-thumb-arm-blx-pic-veneer.d: Likewise.
* ld-arm/arm-elf.exp (armelftests): Add farcall-mix, farcall-mix2,
farcall-group-default, farcall-group-size2, farcall-section Ignore
gas warnings in farcall-thumb-arm, farcall-thumb-arm-blx,
farcall-thumb-arm-blx-pic-veneer.
Diffstat (limited to 'ld/testsuite')
-rw-r--r-- | ld/testsuite/ChangeLog | 12 | ||||
-rw-r--r-- | ld/testsuite/ld-arm/arm-elf.exp | 135 | ||||
-rw-r--r-- | ld/testsuite/ld-arm/armthumb-lib.d | 2 | ||||
-rw-r--r-- | ld/testsuite/ld-arm/farcall-arm-arm.s | 1 | ||||
-rw-r--r-- | ld/testsuite/ld-arm/farcall-thumb-arm-blx-pic-veneer.d | 2 | ||||
-rw-r--r-- | ld/testsuite/ld-arm/farcall-thumb-arm-blx.d | 2 | ||||
-rw-r--r-- | ld/testsuite/ld-arm/farcall-thumb-arm.d | 2 | ||||
-rw-r--r-- | ld/testsuite/ld-arm/farcall-thumb-arm.s | 2 |
8 files changed, 94 insertions, 64 deletions
diff --git a/ld/testsuite/ChangeLog b/ld/testsuite/ChangeLog index 3f4c8c9..be242b6 100644 --- a/ld/testsuite/ChangeLog +++ b/ld/testsuite/ChangeLog @@ -1,3 +1,15 @@ +2008-05-22 Christophe Lyon <christophe.lyon@st.com> + + * ld-arm/farcall-arm-arm.s: Force function type on 'bar'. + * ld-arm/farcall-thumb-arm.s: Likewise. + * ld-arm/farcall-thumb-arm-blx.d: Fix encoding. + * ld-arm/farcall-thumb-arm.d: Likewise. + * ld-arm/farcall-thumb-arm-blx-pic-veneer.d: Likewise. + * ld-arm/arm-elf.exp (armelftests): Add farcall-mix, farcall-mix2, + farcall-group-default, farcall-group-size2, farcall-section Ignore + gas warnings in farcall-thumb-arm, farcall-thumb-arm-blx, + farcall-thumb-arm-blx-pic-veneer. + 2008-05-21 Maxim Kuvyrkov <maxim@codesourcery.com> * ld-m68k/got-12.s: New file. diff --git a/ld/testsuite/ld-arm/arm-elf.exp b/ld/testsuite/ld-arm/arm-elf.exp index 0dd64bc..62a7ef0 100644 --- a/ld/testsuite/ld-arm/arm-elf.exp +++ b/ld/testsuite/ld-arm/arm-elf.exp @@ -171,71 +171,85 @@ set armelftests { {preempt-app.s} {{readelf -Ds preempt-app.sym}} "preempt-app"} - {"jump19" "-static -T arm.ld" "" {jump19.s} - {{objdump -dr jump19.d}} - "jump19"} - {"callweak" "-static -T arm.ld" "" {callweak.s} - {{objdump -dr callweak.d}} - "callweak"} + {"jump19" "-static -T arm.ld" "" {jump19.s} + {{objdump -dr jump19.d}} + "jump19"} + {"callweak" "-static -T arm.ld" "" {callweak.s} + {{objdump -dr callweak.d}} + "callweak"} - {"ARMv4 interworking" "-static -T arm.ld --fix-v4bx-interworking" "--fix-v4bx -meabi=4" {armv4-bx.s} - {{objdump -d armv4-bx.d}} - "armv4-bx"} - {"MOVW/MOVT and merged sections" "-T arm.ld" "" {movw-merge.s} - {{objdump -dw movw-merge.d}} - "movw-merge"} - {"MOVW/MOVT against shared libraries" "tmpdir/arm-lib.so" "" {arm-app-movw.s} - {{objdump -Rw arm-app.r}} - "arm-app-movw"} - {"Thumb-2-as-Thumb-1 BL" "-Ttext 0x1000 --section-start .foo=0x40100c" "" {thumb2-bl-as-thumb1-bad.s} - {{objdump -d thumb2-bl-as-thumb1-bad.d}} - "thumb2-bl-as-thumb1-bad"} - {"Thumb-2 BL" "-Ttext 0x1000 --section-start .foo=0x100100c" "" {thumb2-bl-bad.s} - {{objdump -d thumb2-bl-bad.d}} - "thumb2-bl-bad"} + {"ARMv4 interworking" "-static -T arm.ld --fix-v4bx-interworking" "--fix-v4bx -meabi=4" {armv4-bx.s} + {{objdump -d armv4-bx.d}} + "armv4-bx"} + {"MOVW/MOVT and merged sections" "-T arm.ld" "" {movw-merge.s} + {{objdump -dw movw-merge.d}} + "movw-merge"} + {"MOVW/MOVT against shared libraries" "tmpdir/arm-lib.so" "" {arm-app-movw.s} + {{objdump -Rw arm-app.r}} + "arm-app-movw"} + {"Thumb-2-as-Thumb-1 BL" "-Ttext 0x1000 --section-start .foo=0x40100c" "" {thumb2-bl-as-thumb1-bad.s} + {{objdump -d thumb2-bl-as-thumb1-bad.d}} + "thumb2-bl-as-thumb1-bad"} + {"Thumb-2 BL" "-Ttext 0x1000 --section-start .foo=0x100100c" "" {thumb2-bl-bad.s} + {{objdump -d thumb2-bl-bad.d}} + "thumb2-bl-bad"} - {"ARM-ARM farcall" "-Ttext 0x1000 --section-start .foo=0x2001020" "" {farcall-arm-arm.s} - {{objdump -d farcall-arm-arm.d}} - "farcall-arm-arm"} - {"ARM-ARM farcall (PIC veneer)" "-Ttext 0x1000 --section-start .foo=0x2001020 --pic-veneer" "" {farcall-arm-arm.s} - {{objdump -d farcall-arm-arm-pic-veneer.d}} - "farcall-arm-arm-pic-veneer"} - {"ARM-ARM farcall (BE8)" "-Ttext 0x1000 --section-start .foo=0x2001020 -EB --be8" "-EB" {farcall-arm-arm.s} - {{objdump -d farcall-arm-arm-be8.d}} - "farcall-arm-arm-be8"} + {"ARM-ARM farcall" "-Ttext 0x1000 --section-start .foo=0x2001020" "" {farcall-arm-arm.s} + {{objdump -d farcall-arm-arm.d}} + "farcall-arm-arm"} + {"ARM-ARM farcall (PIC veneer)" "-Ttext 0x1000 --section-start .foo=0x2001020 --pic-veneer" "" {farcall-arm-arm.s} + {{objdump -d farcall-arm-arm-pic-veneer.d}} + "farcall-arm-arm-pic-veneer"} + {"ARM-ARM farcall (BE8)" "-Ttext 0x1000 --section-start .foo=0x2001020 -EB --be8" "-EB" {farcall-arm-arm.s} + {{objdump -d farcall-arm-arm-be8.d}} + "farcall-arm-arm-be8"} - {"ARM-Thumb farcall" "-Ttext 0x1000 --section-start .foo=0x2001014" "" {farcall-arm-thumb.s} - {{objdump -d farcall-arm-thumb.d}} - "farcall-arm-thumb"} - {"ARM-Thumb farcall with BLX" "-Ttext 0x1000 --section-start .foo=0x2001014" "-march=armv5t" {farcall-arm-thumb.s} - {{objdump -d farcall-arm-thumb-blx.d}} - "farcall-arm-thumb-blx"} - {"ARM-Thumb farcall (PIC veneer)" "-Ttext 0x1000 --section-start .foo=0x2001014 --pic-veneer" "" {farcall-arm-thumb.s} - {{objdump -d farcall-arm-thumb-pic-veneer.d}} - "farcall-arm-thumb-pic-veneer"} - {"ARM-Thumb farcall with BLX (PIC veneer)" "-Ttext 0x1000 --section-start .foo=0x2001014 --pic-veneer" "-march=armv5t" {farcall-arm-thumb.s} - {{objdump -d farcall-arm-thumb-blx-pic-veneer.d}} - "farcall-arm-thumb-blx-pic-veneer"} + {"ARM-Thumb farcall" "-Ttext 0x1000 --section-start .foo=0x2001014" "" {farcall-arm-thumb.s} + {{objdump -d farcall-arm-thumb.d}} + "farcall-arm-thumb"} + {"ARM-Thumb farcall with BLX" "-Ttext 0x1000 --section-start .foo=0x2001014" "-march=armv5t" {farcall-arm-thumb.s} + {{objdump -d farcall-arm-thumb-blx.d}} + "farcall-arm-thumb-blx"} + {"ARM-Thumb farcall (PIC veneer)" "-Ttext 0x1000 --section-start .foo=0x2001014 --pic-veneer" "" {farcall-arm-thumb.s} + {{objdump -d farcall-arm-thumb-pic-veneer.d}} + "farcall-arm-thumb-pic-veneer"} + {"ARM-Thumb farcall with BLX (PIC veneer)" "-Ttext 0x1000 --section-start .foo=0x2001014 --pic-veneer" "-march=armv5t" {farcall-arm-thumb.s} + {{objdump -d farcall-arm-thumb-blx-pic-veneer.d}} + "farcall-arm-thumb-blx-pic-veneer"} - {"Thumb-Thumb farcall with BLX" "-Ttext 0x1000 --section-start .foo=0x2001014" "-march=armv5t" {farcall-thumb-thumb.s} - {{objdump -d farcall-thumb-thumb-blx.d}} - "farcall-thumb-thumb-blx"} - {"Thumb-Thumb farcall M profile" "-Ttext 0x1000 --section-start .foo=0x2001014" "-march=armv7m" {farcall-thumb-thumb.s} - {{objdump -d farcall-thumb-thumb-m.d}} - "farcall-thumb-thumb-m"} - {"Thumb-Thumb farcall with BLX (PIC veneer)" "-Ttext 0x1000 --section-start .foo=0x2001014 --pic-veneer" "-march=armv5t" {farcall-thumb-thumb.s} - {{objdump -d farcall-thumb-thumb-blx-pic-veneer.d}} - "farcall-thumb-thumb-blx-pic-veneer"} + {"Thumb-Thumb farcall with BLX" "-Ttext 0x1000 --section-start .foo=0x2001014" "-march=armv5t" {farcall-thumb-thumb.s} + {{objdump -d farcall-thumb-thumb-blx.d}} + "farcall-thumb-thumb-blx"} + {"Thumb-Thumb farcall M profile" "-Ttext 0x1000 --section-start .foo=0x2001014" "-march=armv7m" {farcall-thumb-thumb.s} + {{objdump -d farcall-thumb-thumb-m.d}} + "farcall-thumb-thumb-m"} + {"Thumb-Thumb farcall with BLX (PIC veneer)" "-Ttext 0x1000 --section-start .foo=0x2001014 --pic-veneer" "-march=armv5t" {farcall-thumb-thumb.s} + {{objdump -d farcall-thumb-thumb-blx-pic-veneer.d}} + "farcall-thumb-thumb-blx-pic-veneer"} - {"Thumb-ARM farcall" "-Ttext 0x1000 --section-start .foo=0x2001014" "" {farcall-thumb-arm.s} - {{objdump -d farcall-thumb-arm.d}} - "farcall-thumb-arm"} - {"Thumb-ARM farcall with BLX" "-Ttext 0x1000 --section-start .foo=0x2001014" "-march=armv5t" {farcall-thumb-arm.s} - {{objdump -d farcall-thumb-arm-blx.d}} - "farcall-thumb-arm-blx"} - {"Thumb-ARM farcall with BLX (PIC veneer)" "-Ttext 0x1000 --section-start .foo=0x2001014 --pic-veneer" "-march=armv5t" {farcall-thumb-arm.s} - {{objdump -d farcall-thumb-arm-blx-pic-veneer.d}} - "farcall-thumb-arm-blx-pic-veneer"} + {"Thumb-ARM farcall" "-Ttext 0x1000 --section-start .foo=0x2001014" "-W" {farcall-thumb-arm.s} + {{objdump -d farcall-thumb-arm.d}} + "farcall-thumb-arm"} + {"Thumb-ARM farcall with BLX" "-Ttext 0x1000 --section-start .foo=0x2001014" "-W -march=armv5t" {farcall-thumb-arm.s} + {{objdump -d farcall-thumb-arm-blx.d}} + "farcall-thumb-arm-blx"} + {"Thumb-ARM farcall with BLX (PIC veneer)" "-Ttext 0x1000 --section-start .foo=0x2001014 --pic-veneer" "-W -march=armv5t" {farcall-thumb-arm.s} + {{objdump -d farcall-thumb-arm-blx-pic-veneer.d}} + "farcall-thumb-arm-blx-pic-veneer"} + + {"Multiple farcalls" "-Ttext 0x1000 --section-start .foo=0x2002020" "" {farcall-mix.s} + {{objdump -d farcall-mix.d}} + "farcall-mix"} + {"Multiple farcalls from several sections" "-Ttext 0x1000 --section-start .mytext=0x2000 --section-start .foo=0x2003020" "" {farcall-mix2.s} + {{objdump -d farcall-mix2.d}} + "farcall-mix2"} + + {"Default group size" "-Ttext 0x1000 --section-start .foo=0x2003020" "" {farcall-group.s farcall-group2.s} + {{objdump -d farcall-group.d}} + "farcall-group-default"} + {"Group size=2" "-Ttext 0x1000 --section-start .foo=0x2003020 --stub-group-size=2" "" {farcall-group.s farcall-group2.s} + {{objdump -d farcall-group-size2.d}} + "farcall-group-size2"} } run_ld_link_tests $armelftests @@ -248,6 +262,7 @@ run_dump_test "farcall-thumb-thumb" run_dump_test "farcall-thumb-thumb-pic-veneer" run_dump_test "farcall-thumb-thumb-m-pic-veneer" run_dump_test "farcall-thumb-arm-pic-veneer" +run_dump_test "farcall-section" # Exclude non-ARM-EABI targets. diff --git a/ld/testsuite/ld-arm/armthumb-lib.d b/ld/testsuite/ld-arm/armthumb-lib.d index bd45c87..cc922f1 100644 --- a/ld/testsuite/ld-arm/armthumb-lib.d +++ b/ld/testsuite/ld-arm/armthumb-lib.d @@ -8,7 +8,7 @@ Disassembly of section .plt: .* <.plt>: .*: e52de004 push {lr} ; \(str lr, \[sp, #-4\]!\) - .*: e59fe004 ldr lr, \[pc, #4\] ; .* <lib_func1-0x1c> + .*: e59fe004 ldr lr, \[pc, #4\] ; .* <lib_func1-0x1.> .*: e08fe00e add lr, pc, lr .*: e5bef008 ldr pc, \[lr, #8\]! .*: .* diff --git a/ld/testsuite/ld-arm/farcall-arm-arm.s b/ld/testsuite/ld-arm/farcall-arm-arm.s index bc77ad3..00c1e48 100644 --- a/ld/testsuite/ld-arm/farcall-arm-arm.s +++ b/ld/testsuite/ld-arm/farcall-arm-arm.s @@ -14,6 +14,7 @@ _start: .section .foo, "xa" + .type bar, %function bar: bx lr diff --git a/ld/testsuite/ld-arm/farcall-thumb-arm-blx-pic-veneer.d b/ld/testsuite/ld-arm/farcall-thumb-arm-blx-pic-veneer.d index 3e0cb39..23db877 100644 --- a/ld/testsuite/ld-arm/farcall-thumb-arm-blx-pic-veneer.d +++ b/ld/testsuite/ld-arm/farcall-thumb-arm-blx-pic-veneer.d @@ -13,4 +13,4 @@ Disassembly of section .text: Disassembly of section .foo: 02001014 <bar>: - 2001014: 4770 bx lr + 2001014: e12fff1e bx lr diff --git a/ld/testsuite/ld-arm/farcall-thumb-arm-blx.d b/ld/testsuite/ld-arm/farcall-thumb-arm-blx.d index c4bdd3b..7a72ed4 100644 --- a/ld/testsuite/ld-arm/farcall-thumb-arm-blx.d +++ b/ld/testsuite/ld-arm/farcall-thumb-arm-blx.d @@ -11,4 +11,4 @@ Disassembly of section .text: Disassembly of section .foo: 02001014 <bar>: - 2001014: 4770 bx lr + 2001014: e12fff1e bx lr diff --git a/ld/testsuite/ld-arm/farcall-thumb-arm.d b/ld/testsuite/ld-arm/farcall-thumb-arm.d index 90495b8..bcabeb9 100644 --- a/ld/testsuite/ld-arm/farcall-thumb-arm.d +++ b/ld/testsuite/ld-arm/farcall-thumb-arm.d @@ -16,4 +16,4 @@ Disassembly of section .text: Disassembly of section .foo: 02001014 <bar>: - 2001014: 4770 bx lr + 2001014: e12fff1e bx lr diff --git a/ld/testsuite/ld-arm/farcall-thumb-arm.s b/ld/testsuite/ld-arm/farcall-thumb-arm.s index 82cfb95..6fcdbfc 100644 --- a/ld/testsuite/ld-arm/farcall-thumb-arm.s +++ b/ld/testsuite/ld-arm/farcall-thumb-arm.s @@ -14,6 +14,8 @@ _start: .section .foo, "xa" + .arm + .type bar, %function bar: bx lr |