| Commit message (Collapse) | Author | Age | Files | Lines |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Before running our tests, we made a fake installation into ./tmpdir.
This installation changes libopcodes.la in the build area.
Gas testing may fail if gas and gprofng tests are run in parallel.
I create a script to run gprofng. Inside this script, LD_LIBRARY_PATH,
GPROFNG_SYSCONFDIR are set.
putenv_libcollector_ld_misc() first uses $GPROFNG_PRELOAD_LIBDIRS to create
directories for SP_COLLECTOR_LIBRARY_PATH ($SP_COLLECTOR_LIBRARY_PATH is used
to set up LD_PRELOAD).
gprofng/ChangeLog
2024-01-19 Vladimir Mezentsev <vladimir.mezentsev@oracle.com>
PR gprofng/31252
PR gprofng/30808
* src/envsets.cc (putenv_libcollector_ld_misc): Use
$GPROFNG_PRELOAD_LIBDIRS first to build SP_COLLECTOR_LIBRARY_PATH.
* testsuite/config/default.exp: Create a script to run gprofng.
* testsuite/lib/display-lib.exp: Fix typo.
(cherry picked from commit 26f557af696726a8556bff12f54e4d05cd7a5034)
(cherry picked from commit 883df8a8c0afef2e1d0a17083d95001251f7d3f6)
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
aarch64-elf fails the ld-aarch64/bfd-far-3.d test, due to the stubs
being emitted in a different order to that of aarch64-linux. They are
emitted in a different order due to stub names for local symbols
having the section id in the stub name. aarch64-linux-ld generates
one more section than aarch64-elf-ld. That section is .gnu.hash. So
the stub names differ and are hashed to different slots in
stub_hash_table.
Fix this by running the test with --hash-style=sysv, and adjust
expected output. I've also changed the branch over stubs emitted at
the start of a group of stubs to not care about the symbol, for all
groups not just the one that needed changing.
* ld-aarch64/bti-far-3.d: Add --hash-style=sysv. Adjust
expected output.
(cherry picked from commit 21a2a3d567a2af583768b5f614403e65611c58a5)
(cherry picked from commit 5f41ff2d2cddd6d477351b36353ba1cf89bdafe7)
|
|
|
|
|
|
|
|
|
|
|
|
| |
The tests are not compatible with ilp32 abi: the GNU property
note is ABI dependent (size changes) and the disasm is ABI
dependent too. Making the test portable between the ABIs is
not trivial.
For now force lp64 abi.
(cherry picked from commit 7b0c124970d0dba1703284189f09be2cbe17fa91)
(cherry picked from commit 3d37af699dd1e0a27b6b3e4f2fef7e673574564a)
|
|
|
|
|
|
|
|
| |
The test creates a large shared library and covers a number of
BTI stub insertion cases.
(cherry picked from commit b418c9d49ece5d503eea35a3ff994e55326da6f9)
(cherry picked from commit e485efaee0a80ac16be7cde2fb52810d5e410415)
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
We decide to emit BTI stubs based on the instruction at the target
location. But PLT code is generated later than the stubs so we always
read 0 which is not a valid BTI.
Fix the logic to special case the PLT section: this is code the linker
generates so we know when it will have BTI.
This avoids BTI stubs in large executables where the PLTs have them
already. An alternative is to never emit BTI stubs for PLTs, instead
use BTI in the PLT if a library gets too big, however that may be
more tricky given the ordering of PLT sizing and stub insertion.
Related to bug 30957.
(cherry picked from commit fc48504c7abe8eb9d9723632b2d53504927f46ff)
(cherry picked from commit 0c0527d30bcb168691faa7a611a54cf68d1d1770)
|
|
|
|
|
|
|
|
|
| |
BTI stub parameters were recomputed even if those were already set up.
This is unnecessary work and leaks the symbol name that is allocated
for the stub.
(cherry picked from commit a74ac8c41971682f687a8a5ce94f36a8054ecd0e)
(cherry picked from commit 95a26c1f3de31f82162dda78e571cf0e58d11833)
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Input sections are grouped together that can use the same stub area
(within reach) and these groups have a stable id.
Stubs have a name generated from the stub group id and target symbol.
When a relocation requires a stub with a name that already exists, the
stub is reused instead of adding a new one.
For an indirect branch stub another BTI stub may be inserted near the
target to provide a BTI landing pad.
The BTI stub can end up with the same stub group id and thus the same
name as the indirect stub. This happens if the target symbol is within
reach of the indirect branch stub. Then, due to the name collision,
only a single stub was emmitted which branched to itself causing an
infinite loop at runtime.
A possible solution is to just name the BTI stubs differently, but
since in the problematic case the indirect and BTI stub are in the
same stub area, a better solution is to emit a single stub with a
direct branch. The stub is still needed since the caller cannot reach
the target directly and we also want a BTI landing pad in the stub in
case other indirect stubs target the same symbol and thus need a BTI
stub.
In short we convert an indirect branch stub into a BTI stub when the
target is within reach and has no BTI. It is a hassle to change the
symbol of the stub so a BTI stub may end up with *_veneer instead of
*_bti_veneer after the conversion, but this should not matter much.
(Refactoring some of _bfd_aarch64_add_call_stub_entries would be
useful but too much for this bug fix patch.)
The same conversion to direct branch could be done even if the target
did not need a BTI. The stub groups are fixed in the current logic so
linking can fail if too many stubs are inserted and the section layout
is changed too much, but this only happens in extreme cases that can
be reasonably ignored. Because of this the target cannot go out of
reach during stub insertion so the optimization is valid, but not
implemented by this patch for the non-BTI case.
Fixes bug 30930.
(cherry picked from commit d3a8dfdef0797244d0f2f3a8ec5db8f1dcf1337b)
(cherry picked from commit d00636070750a9be57eb5a24aca75a06efa93140)
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
The instruction was looked up in the wrong input file (file of branch
source instead of branch target) when optimizing away BTI stubs in
commit 5834f36d93cabf1a8bcc7dd7654141aed3d296bc
bfd: aarch64: Optimize BTI stubs PR30076
This can cause adding BTI stubs when they are not necessary or removing
them when they are (the latter is a correctness issue but it is very
unlikely in practice).
Fixes bug 30957.
(cherry picked from commit 98b94ebb3ffe715fddde762bb3ee7fd6d972f233)
(cherry picked from commit 8b9de994244a85f6d87564a798e00d5acefa75b7)
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
In gprofng testing, we need a tempory gprofng installation to resolve run-time
dependencies on libraries (libgprofng, libopcodes, libbfd, etc).
We set LD_LIBRARY_PATH and GPROFNG_SYSCONFDIR to find our libraries and
configuration file. These variables must be set for all gprofng tests.
Tested on aarch64 and x86_64 with and without --enable-shared and --target=<>.
gprofng/ChangeLog
2023-08-31 Vladimir Mezentsev <vladimir.mezentsev@oracle.com>
PR gprofng/30808
* testsuite/config/default.exp: Make a temporary install dir.
Set LD_LIBRARY_PATH, GPROFNG_SYSCONFDIR.
* testsuite/lib/Makefile.skel: Move LD_LIBRARY_PATH and
GPROFNG_SYSCONFDIR setting in testsuite/config/default.exp.
(cherry picked from commit a13e4c5c10d1a13d9128d033c9525810e876ac14)
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
commit eab996435fe65a421541f59557c5f1fd427573a3
Author: Jan Beulich <jbeulich@suse.com>
Date: Tue Nov 7 13:58:32 2023 +0100
ld/x86: reduce testsuite dependency on system object files
changed some C compiler tests to assembler/linker tests which introduced
2 problems:
1. It broke x32 binutils tests since --64 was passed to assembler, but
-m elf_x86_64 wasn't passed to linker.
2. -nostdlib was passed to C compiler driver to exclude standard run-time
files which should be avoided with -r option for linker tests.
Fix them by passing -m elf_x86_64 to linker and removing -nostdlib for
linker tests with -r.
PR ld/30722
* testsuite/ld-x86-64/x86-64.exp: Pass -m elf_x86_64 to linker
for tests with --64. Remove -nostdlib for tests with -r.
(cherry picked from commit 260aa570edcf120332daefb4a102a08c90e4d9b4)
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
If we're using dump_prog in a test which fails, log the dump.out contents
to ld.log to aid debugging.
This avoids needing to ask reporters to manually run e.g. `objdump` commands
when making bug reports.
PR30722
* ld/testsuite/lib/ld-lib.exp: Log failed dump.out contents to aid
debugging.
Approved-by: Nick Clifton <nickc@redhat.com>
Signed-off-by: Sam James <sam@gentoo.org>
(cherry picked from commit 646657284f6b62a71a6869826e951b3def4d73a6)
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
PR ld/30722
Tests looking for certain .note-section recorded properties may not
involve object files from the underlying platform (e.g. via using the C
compiler for linking): Such object files may themselves have similar
note sections, and hence they may influence the overall outcome.
For now convert just the tests known to be affected by crt*.o coming
with "ISA v3 needed" notes. Eventually other tests ought to be
converted, too.
(cherry picked from commit eab996435fe65a421541f59557c5f1fd427573a3)
|
|
|
|
|
|
| |
Backport commit: 619a8a364d6cdc43d6677f86369aa2b5d1a1cc0f
(cherry picked from commit eb49941e7e16bfcd71bd76544c84bf347b03e64f)
|
|
|
|
|
|
| |
Backport commit: 870a4f2cc3df832eab92151e27fd9e7db9027726
(cherry picked from commit c27eff41737c95a84c01bd1f498931ad2323141c)
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
PR gas/30856
In 5cc007751cdb ("x86: further adjust extend-to-32bit-address
conditions") I neglected the case of PUSH, which is the only insn
allowing (proper) symbol addresses to be used as immediates (not
displacements, like CALL/JMP) in the absence of any register operands.
Since it defaults to 64-bit operand size, guessing an L suffix is wrong
there.
(cherry picked from commit 7fe76f02413fff61566ae52ec80d581da1e264a2)
|
|
|
|
|
|
|
| |
set_expected_error is no longer used. It has been replaced by
more specific error messages.
(cherry picked from commit 6ffa5a420a0ce533feb6bc09f6f76bac9e3930bd)
|
|
|
|
|
|
| |
Avoid triggering the respective abort() in output_insn().
(cherry picked from commit b6f6a3ecd15f4c55a4652933f8478feb8b685788)
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Caused by commit 5a97377e5513, specifically this code added to
Target_powerpc::do_relax
+ if (parameters->options().output_is_position_independent())
+ this->rela_dyn_size_
+ = this->rela_dyn_section(layout)->current_data_size();
The problem here is that if .rela.dyn isn't already created then the
call to rela_dyn_section creates it, and as this comment in
Target_powerpc::do_finalize_sections says:
// Annoyingly, we need to make these sections now whether or
// not we need them. If we delay until do_relax then we
// need to mess with the relaxation machinery checkpointing.
We can't be creating sections in do_relax.
PR 30794
* powerpc.cc (Target_powerpc::do_relax): Only set rela_dyn_size_
for size == 64, and assert that rela_dyn_ already exists.
Tidy code setting plt_thread_safe, which also only needs to be
set when size == 64 for ELFv1.
(cherry picked from commit d537f77ef3b18a5fbfd598643aaad957652e9608)
(cherry picked from commit 60834ae1eb7b4f87598cfa79abdc72221415ac9e)
|
|
|
|
| |
(cherry picked from commit 951a6945b44f1882847a45d55a0046b097a09943)
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
According to the reporter of this bug the newlib fseek implementation
is likely slowed down by locking and fflush, only attempting to
optimise seeks when the file is opened read-only. Thus when writing
the output we get a dramatic slowdown due to commit 014a602b86.
PR 30724
* bfd.c (enum bfd_last_io): New.
(struct bfd): Add last_io field.
* bfd-in2.h: Regenerate.
* bfd-io.c (bfd_bread, bfd_bwrite): Force seek if last_io is
opposite direction.
(bfd_seek): Reinstate optimisation for seek to same position.
(cherry picked from commit f82ee0c8dc4ee32556e23e6cd83ef083618f704f)
(cherry picked from commit 226f2e6b924612ecbdb7dfe4f3ca611116ed77f4)
|
|
|
|
|
|
|
|
|
|
| |
pr23169b test only works with lazy binding. To work with linker which
disables lazy binding by default, build pr23169b binaries with -z lazy.
PR ld/30698
* ld-ifunc/ifunc.exp: Build pr23169b binaries with -z lazy.
(cherry picked from commit 51dd9e7c4cab13748f31f6575aed0672f03d6710)
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Fix issue reported by Dave and Alan.
Put back the old pattern for hppa-*-linux* and add hppa[12]*-*-linux* to cover
Gentoo's hppa1.1 and hppa2.0 without including hppa64 inadvertently like I did
before.
ld/
PR 30733
PR 30734
* ld/testsuite/ld-elf/relocatable.d: Use better pattern to exclude hppa64
but include hppa1.1, hppa2.0.
* ld/testsuite/ld-elf/retain7a.d: Ditto.
Fixes: 0e339f6b4f2df25ed351cb94dc7fe16868626f49
Fixes: e3b66187192ce6840df283c00f6395bb0ff15cf5
Signed-off-by: Sam James <sam@gentoo.org>
(cherry picked from commit 3b23a5ea693deee60648c9a9e9d666d83549298e)
|
|
|
|
|
|
|
|
|
| |
PR 30733
* ld/testsuite/ld-elf/retain7a.d: Fix XFAIL entry for hppa to match
hppa{1.1,2.0}*, like hppa2.0-unknown-linux-gnu which Gentoo uses.
Signed-off-by: Sam James <sam@gentoo.org>
(cherry picked from commit e3b66187192ce6840df283c00f6395bb0ff15cf5)
|
|
|
|
|
|
|
|
|
| |
PR 30734
* ld/testsuite/ld-elf/relocatable.d: Fix notarget entry for hppa to match
hppa{1.1,2.0}*, like hppa2.0-unknown-linux-gnu which Gentoo uses.
Signed-off-by: Sam James <sam@gentoo.org>
(cherry picked from commit 0e339f6b4f2df25ed351cb94dc7fe16868626f49)
|
|
|
|
|
|
|
|
|
|
|
| |
gprofng/ChangeLog
2023-08-03 Vladimir Mezentsev <vladimir.mezentsev@oracle.com>
PR gprofng/30700
* testsuite/gprofng.display/gp-collect-app_F.exp: Fix -name argument
for sub-experiment filtering.
(cherry picked from commit e0282cf1284b4d358892427a6b4f60d6f4c0580b)
|
|
|
|
| |
(cherry picked from commit e34acfce343d53290e72c317213a28327bc52fb0)
|
|
|
|
|
|
|
|
|
| |
which add .debug_macro sections to object files.
PR 30699
* binutils/testsuite/binutils-all/objcopy.exp (keep_debug_symbols_for_elf_relocatable): Do not add sections containing the string "debug_" to the list of non-debug sections.
(cherry picked from commit b99a9693430a9f04165b1b868f890b622bb1b46c)
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
This fixes miscounting of dynamic relocations on GOT entries when
a) there are both local-dynamic and global-dynamic tls accesss for a
given symbol, and
b) the symbol is global with non-default visibility, and
c) the __tls_get_addr calls aren't optimised away.
PR 30697
bfd/
* elf32-ppc.c (allocate_dynrelocs): Correct local-dynamic
reloc count.
ld/
* testsuite/ld-powerpc/tls32ldgd.d,
* testsuite/ld-powerpc/tls32ldgd.s: New test.
* testsuite/ld-powerpc/powerpc.exp: Run it.
(cherry picked from commit ae33771224660dac25e64c3f70943a17bfab7681)
(cherry picked from commit 8c05bf16a51e413dfd3da2e018cbcd32a2a8c0f3)
|
|
|
|
|
|
|
|
|
|
|
| |
PR 28909
Sadly "cp -p", doing more than just preserving the time stamp, can fail
e.g. upon trying to preserve ownership (which we don't care about), as
can be observed on e.g. Cygwin. Replace the use of -p by a use of touch,
this way also only preserving modification time.
(cherry picked from commit 31b78cc991781265d9404bd55151691bedd6d556)
|
|
|
|
| |
(cherry picked from commit fd3cc73ee4a84df3ace3c0e470250a957e7d3468)
|
|
|
|
| |
(cherry picked from commit 7872e3bdb0de234ae4ace053cde0c915ff2332d4)
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Tested with the following:
* --enable-textrel-check=error
* --enable-warn-execstack=yes
* --enable-warn-rwx-segments=yes
* --enable-default-execstack=no
in preparation for hopefully toggling these in Gentoo Hardened
at least.
This is similar in nature to 0ab7005043ee404dabfd690952efc25c399995ae
and 340640f710e690b37c885166949595cde5f827b2.
This fixes the following test failures:
* FAIL: ld-x86-64/pr18801a
* FAIL: ld-x86-64/pr18801b
* FAIL: ld-x86-64/ifunc-textrel-1a
* FAIL: ld-x86-64/ifunc-textrel-1b
* FAIL: ld-i386/pr18801a
* FAIL: ld-i386/pr18801b
* FAIL: ld-i386/ifunc-textrel-1a
* FAIL: ld-i386/ifunc-textrel-1b
Signed-off-by: Sam James <sam@gentoo.org>
|
|
|
|
|
|
| |
Bug: https://sourceware.org/bugzilla/show_bug.cgi?id=29042
Bug: https://bugs.gentoo.org/834720
Signed-off-by: Andreas K. Hüttel <dilfridge@gentoo.org>
|
|
|
|
|
|
|
|
|
|
| |
It seems like either the tests or ld.gold in general cannot handle
compilers built with --enable-default-pie. No fix yet, so let's ignore
these test failures for the moment. For details see the linked bugs.
Bug: https://bugs.gentoo.org/684046
Bug: https://sourceware.org/bugzilla/show_bug.cgi?id=22755
Bug: https://sourceware.org/bugzilla/show_bug.cgi?id=27303
|
| |
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
--with-extra-soversion-suffix= will allow Gentoo to
distinct libbfd.so and libopcodes.so to have more precise
SONAME.
Today --enable-targets=all and --enable-64-bit-bfd change
libbfd.so ABI:
--enable-targets=all adds new symbols to the library
--enable-64-bit-bfd modifies BFD_ARCH_SIZE default and
changes sizes of integer parameters and fields to most
APIs.
--with-extra-soversion-suffix= will allow Gentoo to inject
additional keys into SONAME to indicate ABI change and avoid
hard to diagnose crashes when user reinstalls libbfd.so
built with different flags (see https://bugs.gentoo.org/663690).
Bug: https://bugs.gentoo.org/666100
Signed-off-by: Sergei Trofimovich <slyfox@gentoo.org>
Ported to binutils 2.37 by Andreas K. Hüttel <dilfridge@gentoo.org>
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
This will install a PIC version of libiberty.a by overwriting the non-PIC
version of libiberty.a while compiling. We do this because there is no
shared version of libiberty for random apps to link against which means if
someone wants to use this in a shared library or PIE, they're out of luck.
It's arguable whether people should be able to use this in a shared lib,
but usage in PIE should be fine. You could argue that this penalizes the
non-PIE users, but the counter point is that people using this library in
general are fairly low, and we'd rather have things work for all of them.
(cherry picked from commit 112aff9ad3e2675556370c4281117a6df0a879d9)
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
This is based on the old CodeSourcery patch written by Joseph Myers to add
support to the link for detecting & rejecting bad -L paths when using a
cross-compiler. The differences here:
* The command line flags are always available.
* We can turn on & off the warning via the command line.
* The configure option controls the default warning behavior.
* Add support for gold.
It is not currently upstream, nor has it been submitted at all. There are
no plans to do so currently either.
BUG=chromium:488360
TEST=`cbuildbot chromiumos-sdk` passes # tests arm/amd64/mipsel/x86
TEST=`cbuildbot panther_moblab-full whirlwind-release` pass
TEST=`cbuildbot {x32,arm64}-generic-full` has no new failures
TEST=x86_64-cros-linux-gnu-ld throws warnings when using -L/lib (gold & bfd)
Reviewed-on: https://chromium-review.googlesource.com/272083
(cherry picked from commit f92dbf35c00ab13cee36f6be8ae5ca46454d9000)
Ported to binutils 2.37 by Andreas K. Hüttel <dilfridge@gentoo.org>
Ported to binutils 2.39 by WANG Xuerui <xen0n@gentoo.org>
|
|
|
|
| |
Signed-off-by: Andreas K. Hüttel <dilfridge@gentoo.org>
|
|
|
|
| |
Signed-off-by: Andreas K. Hüttel <dilfridge@gentoo.org>
|
| |
|
| |
|
| |
|
|
|
|
|
|
|
|
| |
PR gas/30688
X_unsigned being clear does not indicate a negative number; it merely
indicates a signed one (whose sign may still be clear). Amend two uses
by an actual value check.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
The 'Zvkt' extension is listed on the added extensions in the GNU Binutils
version 2.41 (see binutils/NEWS). However, the support of this extension
was actually missing.
This commit adds actual support of this extension and adds implications
from 'Zvkn' and 'Zvks' superset extensions.
bfd/ChangeLog:
* elfxx-riscv.c (riscv_implicit_subsets) Add implications from
'Zvkn' and 'Zvks'. (riscv_supported_std_z_ext): Add 'Zvkt' to
the supported extension list.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Make the n64 ABI the default for 64-bit Linux targets specified with
`-gnuabi64' suffix included in the target triplet, for configurations
such as the Debian mips64el and mips64r6el ports. Adjust testsuite
configuration accordingly.
There are the following regressions with the new target triplet:
mips64-linux-gnuabi64 +FAIL: readelf -S bintest
mips64-linux-gnuabi64 +FAIL: MIPS reloc estimation 1
mips64el-linux-gnuabi64 +FAIL: readelf -S bintest
mips64el-linux-gnuabi64 +FAIL: MIPS reloc estimation 1
The `readelf' issue comes from a difference in section headers produced
that the `binutils/testsuite/binutils-all/readelf.s-64' pattern template
does not match. While there has been a precedent it does not appear to
me that there is a clear advantage from adding more and more variations
to the template rather than forking the existing template into multiple
ones for a more exact match. So this is best deferred to a separate
discussion.
The MIPS reloc estimation issue is an actual bug in `objdump', which
discards a number of trailing entries from output here for n64 composed
relocations:
DYNAMIC RELOCATION RECORDS
OFFSET TYPE VALUE
0000000000000000 R_MIPS_NONE *ABS*
0000000000000000 R_MIPS_NONE *ABS*
and consequently `ld/testsuite/ld-mips-elf/reloc-estimate-1.d' does not
match even though ELF output produced is correct according to `readelf':
Relocation section '.rel.dyn' at offset 0x10400 contains 2 entries:
Offset Info Type Sym. Value Sym. Name
000000000000 000000000000 R_MIPS_NONE
Type2: R_MIPS_NONE
Type3: R_MIPS_NONE
000000010000 000300001203 R_MIPS_REL32 0000000000010010 foo@@V2
Type2: R_MIPS_64
Type3: R_MIPS_NONE
As a genuine bug this has to be handled separately.
Co-Authored by: Maciej W. Rozycki <macro@orcam.me.uk>
bfd/
* config.bfd: Add `mips64*el-*-linux*-gnuabi64' and
`mips64*-*-linux*-gnuabi64' targets.
binutils/
* testsuite/binutils-all/mips/mips.exp: Handle `*-*-*-gnuabi64'
targets.
* testsuite/binutils-all/objcopy.exp: Handle
`mips64*-*-*-gnuabi64' targets.
* testsuite/binutils-all/remove-relocs-01.d: Likewise.
* testsuite/binutils-all/remove-relocs-04.d: Likewise.
* testsuite/binutils-all/remove-relocs-05.d: Likewise.
* testsuite/binutils-all/remove-relocs-06.d: Likewise.
gas/
* configure.ac: Handle `mips64*-linux-gnuabi64' targets.
* configure: Regenerate.
* testsuite/gas/mips/compact-eh-eb-7.d: Handle
`mips64*-*-*-gnuabi64' targets.
* testsuite/gas/mips/compact-eh-el-7.d: Likewise.
ld/
* configure.tgt: Add `mips64*el-*-linux-gnuabi64' and
`mips64*-*-linux-gnuabi64' targets.
* testsuite/ld-undefined/undefined.exp: Handle
`mips64*-*-*-gnuabi64' targets.
* testsuite/ld-mips-elf/attr-gnu-4-10.d: Likewise.
* testsuite/ld-mips-elf/compact-eh6.d: Likewise.
* testsuite/ld-mips-elf/mips-elf.exp: Handle `*-*-*-gnuabi64'
targets.
(cherry picked from commit 29c108c9610640439daa5244a573348b7c47d994)
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Expect a `.MIPS.options' section alternatively to `.reginfo' and ignore
contents of either as irrelevant for all the affected compact EH tests,
removing these regressions:
mips64-openbsd -FAIL: Compact EH EB #1 with personality ID and FDE data
mips64-openbsd -FAIL: Compact EH EB #2 with personality routine and FDE data
mips64-openbsd -FAIL: Compact EH EB #3 with personality id and large FDE data
mips64-openbsd -FAIL: Compact EH EB #4 with personality id, FDE data and LSDA
mips64-openbsd -FAIL: Compact EH EB #5 with personality routine, FDE data and LSDA
mips64-openbsd -FAIL: Compact EH EB #6 with personality id, LSDA and large FDE data
mips64-openbsd -FAIL: Compact EH EL #1 with personality ID and FDE data
mips64-openbsd -FAIL: Compact EH EL #2 with personality routine and FDE data
mips64-openbsd -FAIL: Compact EH EL #3 with personality id and large FDE data
mips64-openbsd -FAIL: Compact EH EL #4 with personality id, FDE data and LSDA
mips64-openbsd -FAIL: Compact EH EL #5 with personality routine, FDE data and LSDA
mips64-openbsd -FAIL: Compact EH EL #6 with personality id, LSDA and large FDE data
mips64el-openbsd -FAIL: Compact EH EB #1 with personality ID and FDE data
mips64el-openbsd -FAIL: Compact EH EB #2 with personality routine and FDE data
mips64el-openbsd -FAIL: Compact EH EB #3 with personality id and large FDE data
mips64el-openbsd -FAIL: Compact EH EB #4 with personality id, FDE data and LSDA
mips64el-openbsd -FAIL: Compact EH EB #5 with personality routine, FDE data and LSDA
mips64el-openbsd -FAIL: Compact EH EB #6 with personality id, LSDA and large FDE data
mips64el-openbsd -FAIL: Compact EH EL #1 with personality ID and FDE data
mips64el-openbsd -FAIL: Compact EH EL #2 with personality routine and FDE data
mips64el-openbsd -FAIL: Compact EH EL #3 with personality id and large FDE data
mips64el-openbsd -FAIL: Compact EH EL #4 with personality id, FDE data and LSDA
mips64el-openbsd -FAIL: Compact EH EL #5 with personality routine, FDE data and LSDA
mips64el-openbsd -FAIL: Compact EH EL #6 with personality id, LSDA and large FDE data
Co-Authored-By: Maciej W. Rozycki <macro@orcam.me.uk>
gas/
* testsuite/gas/mips/compact-eh-eb-1.d: Accept `.MIPS.options'
section as an alternative to `.reginfo' and ignore contents of
either.
* testsuite/gas/mips/compact-eh-eb-2.d: Likewise.
* testsuite/gas/mips/compact-eh-eb-3.d: Likewise.
* testsuite/gas/mips/compact-eh-eb-4.d: Likewise.
* testsuite/gas/mips/compact-eh-eb-5.d: Likewise.
* testsuite/gas/mips/compact-eh-eb-6.d: Likewise.
* testsuite/gas/mips/compact-eh-el-1.d: Likewise.
* testsuite/gas/mips/compact-eh-el-2.d: Likewise.
* testsuite/gas/mips/compact-eh-el-3.d: Likewise.
* testsuite/gas/mips/compact-eh-el-4.d: Likewise.
* testsuite/gas/mips/compact-eh-el-5.d: Likewise.
* testsuite/gas/mips/compact-eh-el-6.d: Likewise.
(cherry picked from commit 316be2b229f5bd07ebef48fd1d7b8cb103e4d815)
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
MIPS n64 ABI has a peculiarity where all relocations are composed of
three, with subsequent relocation types set to R_MIPS_NONE if further
calculation is not required. Example output produced by `readelf' and
`objdump' for such relocations is:
Offset Info Type Sym. Value Sym. Name + Addend
000000000000 000800000002 R_MIPS_32 0000000000000000 foo + 0
Type2: R_MIPS_NONE
Type3: R_MIPS_NONE
and:
OFFSET TYPE VALUE
0000000000000000 R_MIPS_32 foo
0000000000000000 R_MIPS_NONE *ABS*
0000000000000000 R_MIPS_NONE *ABS*
respectively. The presence of these extra R_MIPS_NONE entries is not
relevant for generic or even some MIPS tests, so optionally match them
with the respective dump patterns, also discarding `xfail' annotation
for MIPS/OpenBSD targets from gas/elf/missing-build-notes.d, removing
these regressions:
mips64-openbsd -FAIL: readelf -r bintest
mips64-openbsd -FAIL: forward expression
mips64-openbsd -FAIL: assignment tests
mips64-openbsd -FAIL: gas/all/none
mips64-openbsd -XFAIL: gas/elf/missing-build-notes
mips64-openbsd -FAIL: macro test 2
mips64-openbsd -FAIL: macro irp
mips64-openbsd -FAIL: macro rept
mips64-openbsd -FAIL: nested irp/irpc/rept
mips64-openbsd -FAIL: macro vararg
mips64-openbsd -FAIL: mips jalx
mips64-openbsd -FAIL: ST Microelectronics Loongson-2F workarounds of Jump Instruction issue
mips64el-openbsd -FAIL: readelf -r bintest
mips64el-openbsd -FAIL: forward expression
mips64el-openbsd -FAIL: assignment tests
mips64el-openbsd -FAIL: gas/all/none
mips64el-openbsd -XFAIL: gas/elf/missing-build-notes
mips64el-openbsd -FAIL: macro test 2
mips64el-openbsd -FAIL: macro irp
mips64el-openbsd -FAIL: macro rept
mips64el-openbsd -FAIL: nested irp/irpc/rept
mips64el-openbsd -FAIL: macro vararg
mips64el-openbsd -FAIL: mips jalx
mips64el-openbsd -FAIL: ST Microelectronics Loongson-2F workarounds of Jump Instruction issue
Co-Authored-By: Maciej W. Rozycki <macro@orcam.me.uk>
binutils/
* testsuite/binutils-all/readelf.r-64: Optionally match extra
R_MIPS_NONE pairs.
gas/
* testsuite/gas/all/assign.d: Optionally match extra
R_MIPS_NONE pairs.
* testsuite/gas/all/fwdexp.d: Likewise.
* testsuite/gas/all/none.d: Likewise.
* testsuite/gas/macros/irp.d: Likewise.
* testsuite/gas/macros/repeat.d: Likewise.
* testsuite/gas/macros/rept.d: Likewise.
* testsuite/gas/macros/test2.d: Likewise.
* testsuite/gas/macros/vararg.d: Likewise.
* testsuite/gas/mips/compact-eh-eb-1.d: Likewise.
* testsuite/gas/mips/compact-eh-eb-2.d: Likewise.
* testsuite/gas/mips/compact-eh-eb-3.d: Likewise.
* testsuite/gas/mips/compact-eh-eb-4.d: Likewise.
* testsuite/gas/mips/compact-eh-eb-5.d: Likewise.
* testsuite/gas/mips/compact-eh-eb-6.d: Likewise.
* testsuite/gas/mips/compact-eh-el-1.d: Likewise.
* testsuite/gas/mips/compact-eh-el-2.d: Likewise.
* testsuite/gas/mips/compact-eh-el-3.d: Likewise.
* testsuite/gas/mips/compact-eh-el-4.d: Likewise.
* testsuite/gas/mips/compact-eh-el-5.d: Likewise.
* testsuite/gas/mips/compact-eh-el-6.d: Likewise.
* testsuite/gas/mips/loongson-2f-3.d: Likewise.
* testsuite/gas/mips/mips-jalx.d: Likewise.
* testsuite/gas/elf/missing-build-notes.d: Likewise. Remove
the `xfail' tag.
ld/
* testsuite/ld-mips-elf/reloc-estimate-1.d: Optionally match
extra R_MIPS_NONE pairs.
(cherry picked from commit ed4dca900c0dbc1317917cb289255d2f8d03f732)
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Several MIPS test cases are suitable for the n64 ABI if not for the
extra leading zeros or spaces in addresses not handled by dump patterns.
Match the characters then, removing these regressions:
mips64-openbsd -FAIL: .set arch=FOO
mips64-openbsd -FAIL: ST Microelectronics Loongson-2F workarounds of nop issue
mips64-openbsd -FAIL: MIPS DSP ASE for MIPS64
mips64-openbsd -FAIL: gas/mips/align2
mips64-openbsd -FAIL: gas/mips/align2-el
mips64-openbsd -FAIL: Locally-resolvable PC-relative code references
mips64-openbsd -FAIL: MIPS jalx-1
mips64-openbsd -FAIL: JAL overflow 2
mips64el-openbsd -FAIL: .set arch=FOO
mips64el-openbsd -FAIL: ST Microelectronics Loongson-2F workarounds of nop issue
mips64el-openbsd -FAIL: MIPS DSP ASE for MIPS64
mips64el-openbsd -FAIL: gas/mips/align2
mips64el-openbsd -FAIL: gas/mips/align2-el
mips64el-openbsd -FAIL: Locally-resolvable PC-relative code references
mips64el-openbsd -FAIL: MIPS jalx-1
mips64el-openbsd -FAIL: JAL overflow 2
Co-Authored-By: Maciej W. Rozycki <macro@orcam.me.uk>
gas/
* testsuite/gas/mips/align2-el.d: Match extra leading zeros
with addresses.
* testsuite/gas/mips/align2.d: Likewise.
* testsuite/gas/mips/compact-eh-eb-1.d: Likewise.
* testsuite/gas/mips/compact-eh-eb-2.d: Likewise.
* testsuite/gas/mips/compact-eh-eb-3.d: Likewise.
* testsuite/gas/mips/compact-eh-eb-4.d: Likewise.
* testsuite/gas/mips/compact-eh-eb-5.d: Likewise.
* testsuite/gas/mips/compact-eh-eb-6.d: Likewise.
* testsuite/gas/mips/compact-eh-el-1.d: Likewise.
* testsuite/gas/mips/compact-eh-el-2.d: Likewise.
* testsuite/gas/mips/compact-eh-el-3.d: Likewise.
* testsuite/gas/mips/compact-eh-el-4.d: Likewise.
* testsuite/gas/mips/compact-eh-el-5.d: Likewise.
* testsuite/gas/mips/compact-eh-el-6.d: Likewise.
* testsuite/gas/mips/loongson-2f-2.d: Likewise.
* testsuite/gas/mips/loongson-2f-3.d: Likewise.
* testsuite/gas/mips/mips-jalx.d: Likewise.
* testsuite/gas/mips/mips64-dsp.d: Likewise.
* testsuite/gas/mips/pcrel-1.d: Likewise.
* testsuite/gas/mips/set-arch.d: Likewise.
ld/
* testsuite/ld-mips-elf/jaloverflow-2.d: Match extra leading
zeros and spaces with addresses as appropriate.
* testsuite/ld-mips-elf/jalx-1.d: Likewise.
* testsuite/ld-mips-elf/reloc-estimate-1.d: Likewise.
(cherry picked from commit ec76a6172f7b6d61f7d76c2bcf766122132116b8)
|