summaryrefslogtreecommitdiff
path: root/ld/testsuite
diff options
context:
space:
mode:
authorNick Clifton <nickc@redhat.com>2008-05-23 13:53:27 +0000
committerNick Clifton <nickc@redhat.com>2008-05-23 13:53:27 +0000
commit5047425a08695ea86ce412cd754e5db1091b4ce2 (patch)
tree0c09cb02165467b233e8f8aec5c18e084bbb7b3c /ld/testsuite
parent35a4ecfaf129faa758f553ddb9a3302bacc68112 (diff)
downloadbinutils-redhat-5047425a08695ea86ce412cd754e5db1091b4ce2.tar.gz
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/ChangeLog12
-rw-r--r--ld/testsuite/ld-arm/arm-elf.exp135
-rw-r--r--ld/testsuite/ld-arm/armthumb-lib.d2
-rw-r--r--ld/testsuite/ld-arm/farcall-arm-arm.s1
-rw-r--r--ld/testsuite/ld-arm/farcall-thumb-arm-blx-pic-veneer.d2
-rw-r--r--ld/testsuite/ld-arm/farcall-thumb-arm-blx.d2
-rw-r--r--ld/testsuite/ld-arm/farcall-thumb-arm.d2
-rw-r--r--ld/testsuite/ld-arm/farcall-thumb-arm.s2
8 files changed, 94 insertions, 64 deletions
diff --git a/ld/testsuite/ChangeLog b/ld/testsuite/ChangeLog
index 3f4c8c917e..be242b6e06 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 0dd64bcbe6..62a7ef00b3 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 bd45c87fce..cc922f1448 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 bc77ad3ee8..00c1e48be4 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 3e0cb39fa5..23db877b27 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 c4bdd3bd71..7a72ed46ec 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 90495b85e0..bcabeb91e2 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 82cfb95554..6fcdbfc37a 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