RISC-V: Print symbol address for jalr w/ zero offset.
[deliverable/binutils-gdb.git] / ld / testsuite / ld-riscv-elf / ld-riscv-elf.exp
CommitLineData
3342be5d 1# Expect script for RISC-V ELF linker tests
219d1afa 2# Copyright (C) 2017-2018 Free Software Foundation, Inc.
3342be5d
AW
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
da02107a 22if [istarget "riscv*-*-*"] {
3342be5d 23 run_dump_test "c-lui"
35eeb78f 24 run_dump_test "disas-jalr"
da02107a
JW
25
26 set abis { rv32gc ilp32 elf32lriscv rv64gc lp64 elf64lriscv }
27 foreach { arch abi emul } $abis {
0527614a
JW
28 # This checks whether our linker scripts handle __global_pointer$
29 # correctly. It should be defined in executables and PIE, but not
30 # in shared libraries.
da02107a
JW
31 set suff64 [string map {ilp32 "" lp64 -64} $abi]
32 run_ld_link_tests [list \
0527614a 33 [list "gp test ($abi shared library)" \
da02107a
JW
34 "-m$emul -shared" "" \
35 "-march=$arch -mabi=$abi -fpic" \
0527614a
JW
36 { gp-test.s } \
37 [list "readelf --syms gp-test-lib.sd"] \
38 "gp-test-lib-${abi}.so"] \
39 [list "gp test ($abi executable)" \
40 "-m$emul" "" \
da02107a 41 "-march=$arch -mabi=$abi" \
0527614a
JW
42 { gp-test.s } \
43 [list "readelf --syms gp-test.sd"] \
44 "gp-test-${abi}"]]
da02107a 45 }
3342be5d 46}
This page took 0.035759 seconds and 4 git commands to generate.