2018-07-20 06:00:29 +02:00
|
|
|
# Expect script for ld-xtensa tests
|
2020-01-01 08:57:01 +01:00
|
|
|
# Copyright (C) 2008-2020 Free Software Foundation, Inc.
|
2018-07-20 06:00:29 +02: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.
|
|
|
|
#
|
|
|
|
|
|
|
|
if { !([istarget "xtensa*-*-*"]) } {
|
|
|
|
return
|
|
|
|
}
|
|
|
|
|
2019-02-16 01:43:23 +01:00
|
|
|
run_dump_test "call_overflow"
|
2018-07-23 06:45:48 +02:00
|
|
|
run_dump_test "coalesce"
|
|
|
|
run_dump_test "diff_overflow"
|
|
|
|
run_dump_test "lcall"
|
2020-04-25 09:40:25 +02:00
|
|
|
run_dump_test "relax-diff1"
|
xtensa: fix PR ld/25861
Introduce new relaxations XTENSA_PDIFF{8,16,32} for positive differences
(subtracted symbol precedes diminished symbol) and XTENSA_NDIFF{8,16,32}
for negative differences (subtracted symbol follows diminished symbol).
Don't generate XTENSA_DIFF relocations in the assembler, generate
XTENSA_PDIFF or XTENSA_NDIFF based on relative symbol position.
Handle XTENSA_DIFF in BFD for compatibility with old object files.
Handle XTENSA_PDIFF and XTENSA_NDIFF in BFD, treating difference value
as unsigned.
2020-04-22 Max Filippov <jcmvbkbc@gmail.com>
bfd/
* bfd-in2.h: Regenerated.
* elf32-xtensa.c (elf_howto_table): New entries for
R_XTENSA_PDIFF{8,16,32} and R_XTENSA_NDIFF{8,16,32}.
(elf_xtensa_reloc_type_lookup, elf_xtensa_do_reloc)
(relax_section): Add cases for R_XTENSA_PDIFF{8,16,32} and
R_XTENSA_NDIFF{8,16,32}.
* libbfd.h (bfd_reloc_code_real_names): Add names for
BFD_RELOC_XTENSA_PDIFF{8,16,32} and
BFD_RELOC_XTENSA_NDIFF{8,16,32}.
* reloc.c: Add documentation for BFD_RELOC_XTENSA_PDIFF{8,16,32}
and BFD_RELOC_XTENSA_NDIFF{8,16,32}.
binutils/
* readelf.c (is_none_reloc): Recognize
BFD_RELOC_XTENSA_PDIFF{8,16,32} and
BFD_RELOC_XTENSA_NDIFF{8,16,32}.
gas/
* config/tc-xtensa.c (md_apply_fix): Replace
BFD_RELOC_XTENSA_DIFF{8,16,32} generation with
BFD_RELOC_XTENSA_PDIFF{8,16,32} and
BFD_RELOC_XTENSA_NDIFF{8,16,32} generation.
* testsuite/gas/xtensa/loc.d: Replace BFD_RELOC_XTENSA_DIFF16
with BFD_RELOC_XTENSA_PDIFF16 in the expected output.
include/
* elf/xtensa.h (elf_xtensa_reloc_type): New entries for
R_XTENSA_PDIFF{8,16,32} and R_XTENSA_NDIFF{8,16,32}.
ld/
* testsuite/ld-xtensa/relax-loc.d: New test definition.
* testsuite/ld-xtensa/relax-loc.s: New test source.
* testsuite/ld-xtensa/xtensa.exp (relax-loc): New test.
2020-04-20 04:04:41 +02:00
|
|
|
run_dump_test "relax-loc"
|
2020-04-25 09:40:25 +02:00
|
|
|
run_dump_test "relax-ndiff"
|
2018-07-23 06:45:48 +02:00
|
|
|
|
2018-07-20 06:00:29 +02:00
|
|
|
run_dump_test "relax-static-pie"
|
|
|
|
run_dump_test "relax-static-local-pie"
|
|
|
|
run_dump_test "relax-static-shared"
|
|
|
|
run_dump_test "relax-static-local-shared"
|
|
|
|
|
|
|
|
run_dump_test "relax-undef-weak-pie"
|
2019-03-29 01:03:57 +01:00
|
|
|
run_dump_test "relax-undef-weak-pie-export-dynamic"
|
2018-07-20 06:00:29 +02:00
|
|
|
run_dump_test "relax-undef-weak-local-pie"
|
|
|
|
run_dump_test "relax-undef-weak-shared"
|
|
|
|
run_dump_test "relax-undef-weak-local-shared"
|