2008-02-20 Paul Brook <paul@codesourcery.com>
[binutils-gdb.git] / ld / testsuite / ld-arm / arm-elf.exp
index b4e84381de67d3f67621022bfc4772531f4fc749..3f2b69c1ac685d68add9b82338bb8c762142b50e 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 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"]} {
@@ -21,7 +24,7 @@ if {[istarget "arm-*-vxworks"]} {
        {"VxWorks shared library test 1" "-shared -Tvxworks1.ld"
         "" {vxworks1-lib.s}
         {{readelf --relocs vxworks1-lib.rd} {objdump -dr vxworks1-lib.dd}
-         {readelf --symbols vxworks1-lib.nd}}
+         {readelf --symbols vxworks1-lib.nd} {readelf -d vxworks1-lib.td}}
         "libvxworks1.so"}
        {"VxWorks executable test 1 (dynamic)" \
         "tmpdir/libvxworks1.so -Tvxworks1.ld -q --force-dynamic"
@@ -41,6 +44,7 @@ if {[istarget "arm-*-vxworks"]} {
     }
     run_ld_link_tests $armvxworkstests
     run_dump_test "vxworks1-static"
+    run_dump_test "emit-relocs1-vxworks"
 }
 
 # Exclude non-ARM-ELF targets.
@@ -156,6 +160,22 @@ set armelftests {
     {"Unwinding and -gc-sections" "-gc-sections" "" {gc-unwind.s}
      {{objdump -sj.data gc-unwind.d}}
      "gc-unwind"}
+    {"arm-pic-veneer" "-static -T arm.ld --pic-veneer" "" {arm-pic-veneer.s}
+     {{objdump -d arm-pic-veneer.d}}
+     "arm-pic-veneer"}
+    {"Preempt Thumb symbol" "tmpdir/mixed-lib.so -T arm-dyn.ld --use-blx" ""
+     {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"}
+    {"ARMv4 interworking" "-static -T arm.ld --fix-v4bx-interworking" "--fix-v4bx -meabi=4" {armv4-bx.s}
+     {{objdump -d armv4-bx.d}}
+     "armv4-bx"}
 }
 
 run_ld_link_tests $armelftests
@@ -165,6 +185,7 @@ 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"
 
 # Exclude non-ARM-EABI targets.
 
@@ -173,9 +194,15 @@ 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"}
 }
 
 run_ld_link_tests $armeabitests