2012-08-13 14:52:54 +00:00
|
|
|
# Expect script for various AARCH64 ELF tests.
|
2015-01-01 14:15:26 +00:00
|
|
|
# Copyright (C) 2009-2015 Free Software Foundation, Inc.
|
2012-08-13 14:52:54 +00:00
|
|
|
#
|
|
|
|
# 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 3 of the License, or
|
|
|
|
# (at your option) any later version.
|
|
|
|
#
|
|
|
|
# This program is distributed in the hope that it will be useful,
|
|
|
|
# but WITHOUT ANY WARRANTY; without even the implied warranty of
|
|
|
|
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
|
|
|
# GNU General Public License for more details.
|
|
|
|
#
|
|
|
|
# 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.
|
|
|
|
|
|
|
|
# Exclude non-aarch64-ELF targets.
|
|
|
|
if { ![is_elf_format] || ![istarget "aarch64*-*-*"] } {
|
|
|
|
return
|
|
|
|
}
|
|
|
|
|
|
|
|
# List contains test-items with 3 items followed by 2 lists:
|
2013-02-19 01:10:06 +00:00
|
|
|
# 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
|
2012-08-13 14:52:54 +00:00
|
|
|
|
|
|
|
# Actions:
|
|
|
|
# objdump: Apply objdump options on result. Compare with regex (last arg).
|
|
|
|
# nm: Apply nm options on result. Compare with regex (last arg).
|
|
|
|
# readelf: Apply readelf options on result. Compare with regex (last arg).
|
|
|
|
|
|
|
|
set aarch64elftests {
|
2013-02-19 01:10:06 +00:00
|
|
|
{"EH Frame merge" "-Ttext 0x8000" "" "" {eh-frame-bar.s eh-frame-foo.s}
|
2012-08-13 14:52:54 +00:00
|
|
|
{{objdump --dwarf=frames eh-frame.d}} "eh-frame"}
|
2014-10-24 10:39:35 +00:00
|
|
|
{"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"}
|
2012-08-13 14:52:54 +00:00
|
|
|
}
|
|
|
|
|
2015-06-17 15:36:04 +00:00
|
|
|
proc aarch64_choose_ilp32_emul {} {
|
2015-08-12 12:17:50 +00:00
|
|
|
if [istarget aarch64-*-linux*] then {
|
|
|
|
return "aarch64linux32"
|
|
|
|
} elseif [istarget aarch64-*-elf] {
|
|
|
|
return "aarch64elf32"
|
|
|
|
} elseif [istarget aarch64_be-*-linux*] {
|
|
|
|
return "aarch64linux32b"
|
|
|
|
} elseif [istarget aarch64_be-*-elf] {
|
2015-06-17 15:36:04 +00:00
|
|
|
return "aarch64elf32b"
|
|
|
|
} else {
|
2015-08-12 12:17:50 +00:00
|
|
|
perror "Unknown target triple."
|
|
|
|
exit 1
|
2015-06-17 15:36:04 +00:00
|
|
|
}
|
|
|
|
}
|
|
|
|
|
2012-08-13 14:52:54 +00:00
|
|
|
run_ld_link_tests $aarch64elftests
|
2015-02-24 12:04:41 +00:00
|
|
|
run_dump_test "erratum843419"
|
2012-08-13 14:52:54 +00:00
|
|
|
|
|
|
|
# Relocation Tests
|
|
|
|
run_dump_test "weak-undefined"
|
2015-06-01 14:45:25 +00:00
|
|
|
run_dump_test "emit-relocs-28"
|
2015-08-11 16:44:30 +00:00
|
|
|
run_dump_test "emit-relocs-86"
|
|
|
|
run_dump_test "emit-relocs-86-overflow"
|
2015-08-19 10:18:25 +00:00
|
|
|
run_dump_test "emit-relocs-87"
|
|
|
|
run_dump_test "emit-relocs-88"
|
|
|
|
run_dump_test "emit-relocs-88-overflow"
|
|
|
|
run_dump_test "emit-relocs-89"
|
|
|
|
run_dump_test "emit-relocs-90"
|
|
|
|
run_dump_test "emit-relocs-90-overflow"
|
2015-08-19 09:58:13 +00:00
|
|
|
run_dump_test "emit-relocs-92"
|
2012-08-13 14:52:54 +00:00
|
|
|
run_dump_test "emit-relocs-257"
|
|
|
|
run_dump_test "emit-relocs-257-be"
|
|
|
|
# 258 is tested in 257
|
|
|
|
# 259 is tested in 257
|
|
|
|
run_dump_test "emit-relocs-260"
|
|
|
|
run_dump_test "emit-relocs-260-be"
|
|
|
|
# 261 is tested by 260
|
|
|
|
run_dump_test "emit-relocs-262"
|
|
|
|
run_dump_test "emit-relocs-263"
|
|
|
|
run_dump_test "emit-relocs-264"
|
2014-08-26 14:48:47 +00:00
|
|
|
run_dump_test "emit-relocs-264-bad"
|
2012-08-13 14:52:54 +00:00
|
|
|
run_dump_test "emit-relocs-265"
|
|
|
|
run_dump_test "emit-relocs-266"
|
2014-08-26 14:48:47 +00:00
|
|
|
run_dump_test "emit-relocs-266-bad"
|
2012-08-13 14:52:54 +00:00
|
|
|
run_dump_test "emit-relocs-267"
|
|
|
|
run_dump_test "emit-relocs-268"
|
2014-08-26 14:48:47 +00:00
|
|
|
run_dump_test "emit-relocs-268-bad"
|
2012-08-13 14:52:54 +00:00
|
|
|
run_dump_test "emit-relocs-269"
|
2014-08-26 14:48:47 +00:00
|
|
|
run_dump_test "emit-relocs-269-bad"
|
2012-08-13 14:52:54 +00:00
|
|
|
run_dump_test "emit-relocs-270"
|
|
|
|
run_dump_test "emit-relocs-270-bad"
|
|
|
|
run_dump_test "emit-relocs-271"
|
|
|
|
run_dump_test "emit-relocs-272"
|
|
|
|
run_dump_test "emit-relocs-273"
|
|
|
|
run_dump_test "emit-relocs-274"
|
|
|
|
run_dump_test "emit-relocs-275"
|
|
|
|
run_dump_test "emit-relocs-276"
|
|
|
|
run_dump_test "emit-relocs-277"
|
|
|
|
run_dump_test "emit-relocs-278"
|
|
|
|
run_dump_test "emit-relocs-279"
|
|
|
|
run_dump_test "emit-relocs-279-bad"
|
|
|
|
run_dump_test "emit-relocs-280"
|
|
|
|
# 281 is unused
|
|
|
|
run_dump_test "emit-relocs-282"
|
|
|
|
run_dump_test "emit-relocs-283"
|
|
|
|
run_dump_test "emit-relocs-284"
|
|
|
|
run_dump_test "emit-relocs-285"
|
|
|
|
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"
|
2012-09-12 16:25:51 +00:00
|
|
|
# 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
|
2012-08-13 14:52:54 +00:00
|
|
|
run_dump_test "emit-relocs-311"
|
|
|
|
run_dump_test "emit-relocs-312"
|
2015-06-01 09:26:00 +00:00
|
|
|
run_dump_test "emit-relocs-313"
|
2015-08-19 10:18:25 +00:00
|
|
|
run_dump_test "emit-relocs-523"
|
|
|
|
run_dump_test "emit-relocs-524"
|
|
|
|
run_dump_test "emit-relocs-525"
|
|
|
|
run_dump_test "emit-relocs-526"
|
|
|
|
run_dump_test "emit-relocs-526-overflow"
|
|
|
|
run_dump_test "emit-relocs-527"
|
|
|
|
run_dump_test "emit-relocs-528"
|
|
|
|
run_dump_test "emit-relocs-528-overflow"
|
2015-08-11 16:44:30 +00:00
|
|
|
run_dump_test "emit-relocs-529"
|
|
|
|
run_dump_test "emit-relocs-529-overflow"
|
2015-08-19 09:58:13 +00:00
|
|
|
run_dump_test "emit-relocs-530"
|
2015-08-19 10:26:56 +00:00
|
|
|
run_dump_test "emit-relocs-531"
|
|
|
|
run_dump_test "emit-relocs-531-overflow"
|
|
|
|
run_dump_test "emit-relocs-532"
|
|
|
|
run_dump_test "emit-relocs-533"
|
|
|
|
run_dump_test "emit-relocs-533-overflow"
|
|
|
|
run_dump_test "emit-relocs-534"
|
|
|
|
run_dump_test "emit-relocs-535"
|
|
|
|
run_dump_test "emit-relocs-535-overflow"
|
|
|
|
run_dump_test "emit-relocs-536"
|
|
|
|
run_dump_test "emit-relocs-537"
|
|
|
|
run_dump_test "emit-relocs-537-overflow"
|
|
|
|
run_dump_test "emit-relocs-538"
|
2012-08-13 14:52:54 +00:00
|
|
|
|
2014-07-08 08:29:06 +00:00
|
|
|
# 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"
|
2012-08-13 14:52:54 +00:00
|
|
|
|
2015-04-24 21:35:04 +00:00
|
|
|
# test error handling on pcrel relocation for shared libraries.
|
|
|
|
run_dump_test "pcrel_pic_undefined"
|
|
|
|
run_dump_test "pcrel_pic_defined_local"
|
|
|
|
|
2012-08-13 14:52:54 +00:00
|
|
|
run_dump_test "limit-b"
|
|
|
|
run_dump_test "limit-bl"
|
|
|
|
run_dump_test "farcall-section"
|
|
|
|
run_dump_test "farcall-back"
|
2015-08-11 20:55:52 +00:00
|
|
|
run_dump_test "farcall-b-defsym"
|
|
|
|
run_dump_test "farcall-bl-defsym"
|
2015-08-11 20:44:31 +00:00
|
|
|
run_dump_test "farcall-b-gsym"
|
|
|
|
run_dump_test "farcall-b-plt"
|
|
|
|
run_dump_test "farcall-bl-plt"
|
2012-08-13 14:52:54 +00:00
|
|
|
run_dump_test "farcall-bl"
|
|
|
|
run_dump_test "farcall-b"
|
|
|
|
run_dump_test "farcall-b-none-function"
|
|
|
|
run_dump_test "farcall-bl-none-function"
|
|
|
|
|
|
|
|
run_dump_test "tls-relax-all"
|
|
|
|
run_dump_test "tls-relax-gd-le"
|
|
|
|
run_dump_test "tls-relax-gdesc-le"
|
|
|
|
run_dump_test "tls-relax-gd-ie"
|
|
|
|
run_dump_test "tls-relax-gdesc-ie"
|
|
|
|
run_dump_test "tls-relax-ie-le"
|
2015-09-09 13:19:28 +00:00
|
|
|
run_dump_test "tls-relax-ld-le-small"
|
|
|
|
run_dump_test "tls-relax-ld-le-tiny"
|
2012-08-13 14:52:54 +00:00
|
|
|
run_dump_test "tls-desc-ie"
|
|
|
|
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"
|
2015-02-19 09:10:11 +00:00
|
|
|
run_dump_test "tls-tiny-gd"
|
|
|
|
run_dump_test "tls-tiny-gd-ie"
|
|
|
|
run_dump_test "tls-tiny-gd-le"
|
2015-02-19 09:52:24 +00:00
|
|
|
run_dump_test "tls-tiny-desc"
|
|
|
|
run_dump_test "tls-tiny-desc-ie"
|
|
|
|
run_dump_test "tls-tiny-desc-le"
|
2015-02-18 18:10:59 +00:00
|
|
|
run_dump_test "tls-tiny-ie"
|
2015-07-16 14:46:21 +00:00
|
|
|
run_dump_test "tls-tiny-ld"
|
2015-08-11 16:05:34 +00:00
|
|
|
run_dump_test "tls-small-ld"
|
2015-03-04 09:08:49 +00:00
|
|
|
run_dump_test "tlsle"
|
2012-10-16 16:36:50 +00:00
|
|
|
run_dump_test "tlsle-symbol-offset"
|
2013-04-03 14:21:18 +00:00
|
|
|
run_dump_test "gc-got-relocs"
|
|
|
|
run_dump_test "gc-tls-relocs"
|
2013-04-10 12:00:14 +00:00
|
|
|
run_dump_test "gc-plt-relocs"
|
|
|
|
run_dump_test "gc-relocs-257-dyn"
|
|
|
|
run_dump_test "gc-relocs-257"
|
2015-01-13 11:18:10 +00:00
|
|
|
run_dump_test "pr17415"
|
2015-01-13 11:21:43 +00:00
|
|
|
run_dump_test "tprel_g2_overflow"
|
2015-06-01 09:31:38 +00:00
|
|
|
run_dump_test "tprel_add_lo12_overflow"
|
2015-07-27 10:48:48 +00:00
|
|
|
run_dump_test "protected-data"
|
2013-10-03 14:46:09 +00:00
|
|
|
|
|
|
|
# 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"
|
2013-11-25 11:07:07 +00:00
|
|
|
run_dump_test "ifunc-21"
|
2013-11-25 14:44:59 +00:00
|
|
|
run_dump_test "ifunc-22"
|
2014-03-14 11:45:32 +00:00
|
|
|
|
|
|
|
run_dump_test "relasz"
|
2015-08-12 01:31:04 +00:00
|
|
|
run_dump_test "relocs-1027-symbolic-func"
|
2014-08-26 14:48:47 +00:00
|
|
|
|
2015-06-23 11:12:06 +00:00
|
|
|
run_dump_test "dt_textrel"
|
|
|
|
|
2014-08-26 14:48:47 +00:00
|
|
|
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
|