1# Expect script for various AARCH64 ELF tests. 2# Copyright (C) 2009-2014 Free Software Foundation, Inc. 3# 4# This file is part of the GNU Binutils. 5# 6# This program is free software; you can redistribute it and/or modify 7# it under the terms of the GNU General Public License as published by 8# the Free Software Foundation; either version 3 of the License, or 9# (at your option) any later version. 10# 11# This program is distributed in the hope that it will be useful, 12# but WITHOUT ANY WARRANTY; without even the implied warranty of 13# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 14# GNU General Public License for more details. 15# 16# You should have received a copy of the GNU General Public License 17# along with this program; if not, write to the Free Software 18# Foundation, Inc., 51 Franklin Street - Fifth Floor, Boston, 19# MA 02110-1301, USA. 20 21# Exclude non-aarch64-ELF targets. 22if { ![is_elf_format] || ![istarget "aarch64*-*-*"] } { 23 return 24} 25 26# List contains test-items with 3 items followed by 2 lists: 27# 0:name 1:ld early options 2:ld late options 3:assembler options 28# 4:filenames of assembler files 5: action and options. 6: name of output file 29 30# Actions: 31# objdump: Apply objdump options on result. Compare with regex (last arg). 32# nm: Apply nm options on result. Compare with regex (last arg). 33# readelf: Apply readelf options on result. Compare with regex (last arg). 34 35set aarch64elftests { 36 {"EH Frame merge" "-Ttext 0x8000" "" "" {eh-frame-bar.s eh-frame-foo.s} 37 {{objdump --dwarf=frames eh-frame.d}} "eh-frame"} 38 {"Erratum 835769 dump test" 39 "--fix-cortex-a53-835769" "" "" {erratum835769.s} 40 {{objdump -dr erratum835769.d}} 41 "erratum835769"} 42 {"Erratum 835769 dump test -shared" 43 "--fix-cortex-a53-835769 -shared" "" "" {erratum835769.s} 44 {{objdump -dr erratum835769.d}} 45 "erratum835769"} 46} 47 48run_ld_link_tests $aarch64elftests 49run_dump_test "erratum843419" 50 51# Relocation Tests 52run_dump_test "weak-undefined" 53run_dump_test "emit-relocs-257" 54run_dump_test "emit-relocs-257-be" 55# 258 is tested in 257 56# 259 is tested in 257 57run_dump_test "emit-relocs-260" 58run_dump_test "emit-relocs-260-be" 59# 261 is tested by 260 60run_dump_test "emit-relocs-262" 61run_dump_test "emit-relocs-263" 62run_dump_test "emit-relocs-264" 63run_dump_test "emit-relocs-264-bad" 64run_dump_test "emit-relocs-265" 65run_dump_test "emit-relocs-266" 66run_dump_test "emit-relocs-266-bad" 67run_dump_test "emit-relocs-267" 68run_dump_test "emit-relocs-268" 69run_dump_test "emit-relocs-268-bad" 70run_dump_test "emit-relocs-269" 71run_dump_test "emit-relocs-269-bad" 72run_dump_test "emit-relocs-270" 73run_dump_test "emit-relocs-270-bad" 74run_dump_test "emit-relocs-271" 75run_dump_test "emit-relocs-272" 76run_dump_test "emit-relocs-273" 77run_dump_test "emit-relocs-274" 78run_dump_test "emit-relocs-275" 79run_dump_test "emit-relocs-276" 80run_dump_test "emit-relocs-277" 81run_dump_test "emit-relocs-278" 82run_dump_test "emit-relocs-279" 83run_dump_test "emit-relocs-279-bad" 84run_dump_test "emit-relocs-280" 85# 281 is unused 86run_dump_test "emit-relocs-282" 87run_dump_test "emit-relocs-283" 88run_dump_test "emit-relocs-284" 89run_dump_test "emit-relocs-285" 90run_dump_test "emit-relocs-286" 91run_dump_test "emit-relocs-286-bad" 92# 287-298 are not done yet 93run_dump_test "emit-relocs-299" 94# 300-308 are not done yet 95run_dump_test "emit-relocs-309-up" 96run_dump_test "emit-relocs-309-low" 97run_dump_test "emit-relocs-309-up-bad" 98run_dump_test "emit-relocs-309-low-bad" 99# 310 not done yet 100run_dump_test "emit-relocs-311" 101run_dump_test "emit-relocs-312" 102 103# test addend correctness when --emit-relocs specified for non-relocatable obj. 104run_dump_test "emit-relocs-local-addend" 105# test addend correctness when -r specified. 106run_dump_test "local-addend-r" 107 108run_dump_test "limit-b" 109run_dump_test "limit-bl" 110run_dump_test "farcall-section" 111run_dump_test "farcall-back" 112run_dump_test "farcall-bl" 113run_dump_test "farcall-b" 114run_dump_test "farcall-b-none-function" 115run_dump_test "farcall-bl-none-function" 116 117run_dump_test "tls-relax-all" 118run_dump_test "tls-relax-gd-le" 119run_dump_test "tls-relax-gdesc-le" 120run_dump_test "tls-relax-gd-ie" 121run_dump_test "tls-relax-gdesc-ie" 122run_dump_test "tls-relax-ie-le" 123run_dump_test "tls-desc-ie" 124run_dump_test "tls-relax-gdesc-ie-2" 125run_dump_test "tls-relax-gdesc-le-2" 126run_dump_test "tls-relax-ie-le-2" 127run_dump_test "tls-relax-ie-le-3" 128run_dump_test "tlsle-symbol-offset" 129run_dump_test "gc-got-relocs" 130run_dump_test "gc-tls-relocs" 131run_dump_test "gc-plt-relocs" 132run_dump_test "gc-relocs-257-dyn" 133run_dump_test "gc-relocs-257" 134 135# ifunc tests 136run_dump_test "ifunc-1" 137run_dump_test "ifunc-1-local" 138run_dump_test "ifunc-2" 139run_dump_test "ifunc-2-local" 140run_dump_test "ifunc-3a" 141run_dump_test "ifunc-3b" 142run_dump_test "ifunc-4" 143run_dump_test "ifunc-4a" 144run_dump_test "ifunc-5a" 145run_dump_test "ifunc-5b" 146run_dump_test "ifunc-5a-local" 147run_dump_test "ifunc-5b-local" 148run_dump_test "ifunc-5r-local" 149run_dump_test "ifunc-6a" 150run_dump_test "ifunc-6b" 151run_dump_test "ifunc-7a" 152run_dump_test "ifunc-7b" 153run_dump_test "ifunc-7c" 154run_dump_test "ifunc-8" 155run_dump_test "ifunc-9" 156run_dump_test "ifunc-10" 157run_dump_test "ifunc-11" 158run_dump_test "ifunc-12" 159run_dump_test "ifunc-13" 160run_dump_test "ifunc-14a" 161run_dump_test "ifunc-14b" 162run_dump_test "ifunc-14c" 163run_dump_test "ifunc-14d" 164run_dump_test "ifunc-14e" 165run_dump_test "ifunc-14f" 166run_dump_test "ifunc-15" 167run_dump_test "ifunc-16" 168run_dump_test "ifunc-17a" 169run_dump_test "ifunc-17b" 170run_dump_test "ifunc-18a" 171run_dump_test "ifunc-18b" 172run_dump_test "ifunc-19a" 173run_dump_test "ifunc-19b" 174run_dump_test "ifunc-20" 175run_dump_test "ifunc-21" 176run_dump_test "ifunc-22" 177 178run_dump_test "relasz" 179 180set aarch64elflinktests { 181 {"ld-aarch64/so with global symbol" "-shared" "" "" {copy-reloc-so.s} 182 {} "copy-reloc-so.so"} 183 {"ld-aarch64/exe with copy relocation" "-e0 tmpdir/copy-reloc-so.so" "" "" 184 {copy-reloc-exe.s} {{objdump -R copy-reloc.d}} "copy-reloc"} 185} 186 187run_ld_link_tests $aarch64elflinktests 188