[AArch64] Enable overflow check for R_AARCH64_TLSLE_ADD_TPREL_HI12
[external/binutils.git] / ld / testsuite / ld-aarch64 / aarch64-elf.exp
index eefe05a..9b715bb 100644 (file)
@@ -1,5 +1,5 @@
 # Expect script for various AARCH64 ELF tests.
-# Copyright 2009-2012 Free Software Foundation, Inc.
+# Copyright (C) 2009-2015 Free Software Foundation, Inc.
 #
 # This file is part of the GNU Binutils.
 #
@@ -24,8 +24,8 @@ if { ![is_elf_format] || ![istarget "aarch64*-*-*"] } {
 }
 
 # List contains test-items with 3 items followed by 2 lists:
-# 0:name 1:ld options 2:assembler options
-# 3:filenames of assembler files 4: action and options. 5: name of output file
+# 0:name 1:ld early options 2:ld late options 3:assembler options
+# 4:filenames of assembler files 5: action and options. 6: name of output file
 
 # Actions:
 # objdump: Apply objdump options on result.  Compare with regex (last arg).
@@ -33,8 +33,16 @@ if { ![is_elf_format] || ![istarget "aarch64*-*-*"] } {
 # readelf: Apply readelf options on result.  Compare with regex (last arg).
 
 set aarch64elftests {
-    {"EH Frame merge" "-Ttext 0x8000" "" {eh-frame-bar.s eh-frame-foo.s}
+    {"EH Frame merge" "-Ttext 0x8000" "" "" {eh-frame-bar.s eh-frame-foo.s}
        {{objdump --dwarf=frames eh-frame.d}} "eh-frame"}
+    {"Erratum 835769 dump test"
+     "--fix-cortex-a53-835769" "" "" {erratum835769.s}
+     {{objdump -dr erratum835769.d}}
+     "erratum835769"}
+    {"Erratum 835769 dump test -shared"
+     "--fix-cortex-a53-835769 -shared" "" "" {erratum835769.s}
+     {{objdump -dr erratum835769.d}}
+     "erratum835769"}
 }
 
 run_ld_link_tests $aarch64elftests
@@ -51,11 +59,15 @@ run_dump_test "emit-relocs-260-be"
 run_dump_test "emit-relocs-262"
 run_dump_test "emit-relocs-263"
 run_dump_test "emit-relocs-264"
+run_dump_test "emit-relocs-264-bad"
 run_dump_test "emit-relocs-265"
 run_dump_test "emit-relocs-266"
+run_dump_test "emit-relocs-266-bad"
 run_dump_test "emit-relocs-267"
 run_dump_test "emit-relocs-268"
+run_dump_test "emit-relocs-268-bad"
 run_dump_test "emit-relocs-269"
+run_dump_test "emit-relocs-269-bad"
 run_dump_test "emit-relocs-270"
 run_dump_test "emit-relocs-270-bad"
 run_dump_test "emit-relocs-271"
@@ -78,10 +90,19 @@ run_dump_test "emit-relocs-286"
 run_dump_test "emit-relocs-286-bad"
 # 287-298 are not done yet
 run_dump_test "emit-relocs-299"
-# 300-310 are not done yet
+# 300-308 are not done yet
+run_dump_test "emit-relocs-309-up"
+run_dump_test "emit-relocs-309-low"
+run_dump_test "emit-relocs-309-up-bad"
+run_dump_test "emit-relocs-309-low-bad"
+# 310 not done yet
 run_dump_test "emit-relocs-311"
 run_dump_test "emit-relocs-312"
 
+# test addend correctness when --emit-relocs specified for non-relocatable obj.
+run_dump_test "emit-relocs-local-addend"
+# test addend correctness when -r specified.
+run_dump_test "local-addend-r"
 
 run_dump_test "limit-b"
 run_dump_test "limit-bl"
@@ -103,3 +124,64 @@ run_dump_test "tls-relax-gdesc-ie-2"
 run_dump_test "tls-relax-gdesc-le-2"
 run_dump_test "tls-relax-ie-le-2"
 run_dump_test "tls-relax-ie-le-3"
+run_dump_test "tlsle-symbol-offset"
+run_dump_test "gc-got-relocs"
+run_dump_test "gc-tls-relocs"
+run_dump_test "gc-plt-relocs"
+run_dump_test "gc-relocs-257-dyn"
+run_dump_test "gc-relocs-257"
+run_dump_test "pr17415"
+
+# ifunc tests
+run_dump_test "ifunc-1"
+run_dump_test "ifunc-1-local"
+run_dump_test "ifunc-2"
+run_dump_test "ifunc-2-local"
+run_dump_test "ifunc-3a"
+run_dump_test "ifunc-3b"
+run_dump_test "ifunc-4"
+run_dump_test "ifunc-4a"
+run_dump_test "ifunc-5a"
+run_dump_test "ifunc-5b"
+run_dump_test "ifunc-5a-local"
+run_dump_test "ifunc-5b-local"
+run_dump_test "ifunc-5r-local"
+run_dump_test "ifunc-6a"
+run_dump_test "ifunc-6b"
+run_dump_test "ifunc-7a"
+run_dump_test "ifunc-7b"
+run_dump_test "ifunc-7c"
+run_dump_test "ifunc-8"
+run_dump_test "ifunc-9"
+run_dump_test "ifunc-10"
+run_dump_test "ifunc-11"
+run_dump_test "ifunc-12"
+run_dump_test "ifunc-13"
+run_dump_test "ifunc-14a"
+run_dump_test "ifunc-14b"
+run_dump_test "ifunc-14c"
+run_dump_test "ifunc-14d"
+run_dump_test "ifunc-14e"
+run_dump_test "ifunc-14f"
+run_dump_test "ifunc-15"
+run_dump_test "ifunc-16"
+run_dump_test "ifunc-17a"
+run_dump_test "ifunc-17b"
+run_dump_test "ifunc-18a"
+run_dump_test "ifunc-18b"
+run_dump_test "ifunc-19a"
+run_dump_test "ifunc-19b"
+run_dump_test "ifunc-20"
+run_dump_test "ifunc-21"
+run_dump_test "ifunc-22"
+
+run_dump_test "relasz"
+
+set aarch64elflinktests {
+  {"ld-aarch64/so with global symbol" "-shared" "" "" {copy-reloc-so.s}
+  {} "copy-reloc-so.so"}
+  {"ld-aarch64/exe with copy relocation" "-e0 tmpdir/copy-reloc-so.so" "" ""
+  {copy-reloc-exe.s} {{objdump -R copy-reloc.d}} "copy-reloc"}
+}
+
+run_ld_link_tests $aarch64elflinktests