bfd/
[deliverable/binutils-gdb.git] / ld / testsuite / ld-arm / arm-elf.exp
index 942d67fc54ba3d16abdf46cf467647234ed8bde6..0dd64bcbe67168222b98e2f93dbac0505aa783b4 100644 (file)
@@ -1,9 +1,11 @@
 # Expect script for various ARM ELF tests.
-#   Copyright 2002, 2003, 2004 Free Software Foundation, Inc.
+#   Copyright 2002, 2003, 2004, 2007, 2008 Free Software Foundation, Inc.
 #
-# This file is free software; you can redistribute it and/or modify
+# This file is part of the GNU Binutils.
+#
+# This program is free software; you can redistribute it and/or modify
 # it under the terms of the GNU General Public License as published by
-# the Free Software Foundation; either version 2 of the License, or
+# the Free Software Foundation; either version 3 of the License, or
 # (at your option) any later version.
 #
 # This program is distributed in the hope that it will be useful,
@@ -13,7 +15,8 @@
 #
 # You should have received a copy of the GNU General Public License
 # along with this program; if not, write to the Free Software
-# Foundation, Inc., 51 Franklin Street - Fifth Floor, Boston, MA 02110-1301, USA.
+# Foundation, Inc., 51 Franklin Street - Fifth Floor, Boston,
+# MA 02110-1301, USA.
 #
 
 if {[istarget "arm-*-vxworks"]} {
@@ -41,6 +44,11 @@ if {[istarget "arm-*-vxworks"]} {
     }
     run_ld_link_tests $armvxworkstests
     run_dump_test "vxworks1-static"
+    run_dump_test "emit-relocs1-vxworks"
+}
+
+if { [istarget "arm*-*-symbianelf*"] } {
+    run_dump_test "symbian-seg1"
 }
 
 # Exclude non-ARM-ELF targets.
@@ -166,6 +174,68 @@ set armelftests {
      {"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"}
+
+     {"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"}
+
+     {"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"}
 }
 
 run_ld_link_tests $armelftests
@@ -173,8 +243,11 @@ run_dump_test "group-relocs-alu-bad"
 run_dump_test "group-relocs-ldr-bad"
 run_dump_test "group-relocs-ldrs-bad"
 run_dump_test "group-relocs-ldc-bad"
-run_dump_test "thumb2-bl-as-thumb1-bad"
-run_dump_test "thumb2-bl-bad"
+run_dump_test "emit-relocs1"
+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"
 
 # Exclude non-ARM-EABI targets.
 
@@ -183,9 +256,18 @@ if { ![istarget "arm*-*-*eabi"] } {
 }
 
 set armeabitests {
-    {"Thumb-2 BL" "-Ttext 0x1000 --section-start .foo=0x1001000" "" {thumb2-bl.s}
-     {{objdump -dr thumb2-bl.d}}
-     "thumb2-bl"}
+     {"EABI attribute merging" "-r" "" {attr-merge.s attr-merge.s}
+      {{readelf -A attr-merge.attr}}
+      "attr-merge"}
+     {"EABI attribute merging 2" "-r" "" {attr-merge-2a.s attr-merge-2b.s}
+      {{readelf -A attr-merge-2.attr}}
+      "attr-merge-2"}
+     {"Thumb-2 BL" "-Ttext 0x1000 --section-start .foo=0x1001000" "" {thumb2-bl.s}
+      {{objdump -dr thumb2-bl.d}}
+      "thumb2-bl"}
+     {"Thumb-2 Interworked branch" "-T arm.ld" "" {thumb2-b-interwork.s}
+      {{objdump -dr thumb2-b-interwork.d}}
+      "thumb2-b-interwork"}
 }
 
 run_ld_link_tests $armeabitests
This page took 0.027351 seconds and 4 git commands to generate.