Age | Commit message (Collapse) | Author | Files | Lines |
|
SFrame format is meant for generating stack traces only.
ld/
* ld.texi: Replace the use of "unwind" with "stack trace".
|
|
The merge test fais on numerous targets because they don't support the
necessary pc-relative relocs. This patch removes that part of the
merge test, and makes references to the merged strings from .data
rather than .text to better support targets that relax text by
default.
|
|
Revert 1c66b8a03989 and instead fix the broken list pointer.
PR 29998
* pe-dll.c (build_filler_bfd): Revert last change.
* ldlang.c (lang_process): When rescanning archives for lto,
fix file_chain.tail pointer if the insert point happens to be
at the end of the list.
|
|
This adjusts the testsuite to get rid of a number of XPASSes that have
appeared. Someone might like to look into a better patch for the s390
change.
aarch64-pe XPASS: weak symbols
arm-nacl XPASS: rgn-over8
mcore-pe XPASS: ld-scripts/provide-8
mips64-linux-gnuabi64 XPASS: vers4
mips64-linux-gnuabi64 XPASS: vers4b
mips-linux-gnu XPASS: vers4
mips-linux-gnu XPASS: vers4b
s390-linux-gnu XPASS: undefined line
sh4-linux-gnu XPASS: --gc-sections with __start_SECTIONNAME
sh-coff XPASS: objcopy object (simple copy)
sh-coff XPASS: objcopy executable (pr25662)
binutils/
* testsuite/binutils-all/objcopy.exp: Don't xfail "simple
copy" and "pr25662" on sh-*-coff. Remove all non-ELF xfails
on "ELF unknown section type" test.
ld/
* testsuite/ld-elfvers/vers.exp (vers4, vers4b): Don't xfail
all mips, just xfail mips irix.
* testsuite/ld-gc/pr19161.d: Don't xfail sh.
* testsuite/ld-scripts/rgn-over8-ok.d: Don't xfail nacl.
* testsuite/ld-scripts/weak.exp: Don't xfail aarch64-pe.
* testsuite/ld-undefined/undefined.exp: Conditionally xfail
"undefined line" depending on gcc version for s390.
|
|
PR 29998 * pe-dll.c (build_filler_bfd): Initialise the next field of the filler input statement, so that it does not break the file chain.
|
|
This is similar to "Call bfd_close_all_done in output_file_close",
but with some code tidying in the pe/pep write_build_id functions.
write_build_id is passed the output bfd as its parameter, so there is
no need to go looking for the output bfd via link_info (and doing so
will no longer work since I clear link_info.output_bfd before calling
bfd_close).
* emultempl/pe.em (write_build_id): Rename t to td. Formatting.
Don't access pe_data(link_info.output_bfd), use td instead.
(setup_build_id): Rename t to td. Formatting.
* emultempl/pep.em: As for pe.em.
* ldmain.c (ld_cleanup): Call bfd_close_all_done on linker bfds.
(main): Clear link_info.output_bfd when closing.
|
|
|
|
This extends PDB support to the aarch64 PE targets.
The changes to the test files are just to make it so they can be assembled as
either x86, x86_64, or aarch64, mainly by changing the comment style.
The only actual code change here is in adding the architecture constants
to pdb.c.
|
|
Pass -Wl,--no-as-needed to linker tests to fix
FAIL: Run pr19031
FAIL: Run got1
FAIL: Undefined weak symbol (-fPIE -no-pie)
FAIL: Undefined weak symbol (-fPIE -pie)
when --as-needed is passed to linker by compiler.
PR ld/30050
* testsuite/ld-i386/i386.exp: Pass -Wl,--no-as-needed to compiler
as needed.
|
|
ld PR 29998
* pe-dll.c (generate_reloc): Handle sections
with no assigned output section.
Terminate early of there are no relocs to put
in the .reloc section.
(pe_exe_fill_sections): Do not emit an empty
.reloc section.
bfd * cofflink.c (_bfd_coff_generic_relocate_section):
Add an assertion that the output section is set
for defined, global symbols.
|
|
|
|
This fixes the test failures introduced by 87a5cf5c, by changing the
default subsystem for arm-pe from 9 (IMAGE_SUBSYSTEM_WINDOWS_CE_GUI) to
2 (IMAGE_SUBSYSTEM_WINDOWS_GUI), which matches what happens with other
PE targets.
As far as I can tell there's no working modern Windows CE toolchain
knocking about anyway, so this change shouldn't inconvenience anyone.
|
|
This patch adds support for the .secidx directive and its corresponding
relocation to aarch64-w64-mingw32. As with x86, this is a two-byte LE
integer which gets filled in with the 1-based index of the output
section that a symbol ends up in.
This is needed for PDBs, which represent addresses as a .secrel32,
.secidx pair.
The test is substantially the same as for amd64, but with changes made
for padding and alignment.
|
|
to check a situation that once failed with the new section merging
when it mishandled offsets pointing into alignment padding in mergable
string sections (i.e. pointing to zeros). It made bootstrap.exp fail
but that depends on many factors to actually go wrong so this is a more
explicit variant of it.
|
|
the test expects a second, but useless, $d mapping symbol for
the partially merged section, and specifically disallows one
for the completely merged section. The new merging algorithm
makes it so that also the partially merged sections are conceptually
SEC_EXCLUDED, except the first merge section (e.g. as if the very
first object file already contains all strings). So that second mapping
symbol is now missing. It never was needed anyway.
So, adjust the test.
|
|
"foo" is at 0x2010. This corrects the expected output for .long and
.word referencing foo, showing a problem with relocation handling.
* testsuite/ld-pe/aarch64.d: Correct expected output.
|
|
Many tests reflect a setting of ELF_MAXPAGESIZE to 64 KiB.
With ELF_MAXPAGESIZE changed to 4 KiB, layout is sometimes
different and symbols end up in other places. Avoid churn
and regexpification of old test patterns by passing the
max-page-size setting active at the time.
ld/testsuite:
* testsuite/ld-arm/arm-elf.exp,
testsuite/ld-arm/non-contiguous-arm2.d,
testsuite/ld-arm/non-contiguous-arm3.d,
testsuite/ld-arm/non-contiguous-arm5.d,
testsuite/ld-arm/non-contiguous-arm6.d,
testsuite/ld-arm/thumb-plt-got.d, testsuite/ld-arm/thumb-plt.d:
Pass -z max-page-size=0x10000 explicitly to test that rely on
that value in output-matching patterns.
|
|
We already use C99's __func__ in places, use it more generally. This
patch doesn't change uses in the testsuite. I've also left one in
gold.h that is protected by GCC_VERSION < 4003. If any of the
remaining uses bothers anyone I invite patches.
bfd/
* bfd-in.h: Replace __FUNCTION__ with __func__.
* elf32-bfin.c: Likewise.
* elfnn-aarch64.c: Likewise.
* elfxx-sparc.c: Likewise.
* bfd-in2.h: Regenerate.
gas/
* config/tc-cris.c: Replace __FUNCTION__ with __func__.
* config/tc-m68hc11.c: Likewise.
* config/tc-msp430.c: Likewise.
gold/
* dwp.h: Replace __FUNCTION__ with __func__.
* gold.h: Likewise, except for use inside GCC_VERSION < 4003.
ld/
* emultempl/pe.em: Replace __FUNCTION__ with __func__.
* emultempl/pep.em: Likewise.
* pe-dll.c: Likewise.
|
|
Fixes commit 16fea92ccd99.
* testsuite/ld-scripts/weak.exp: Don't xfail x86_64 PE targets.
Do xfail other PE OS triplets by moving code setting xfails.
|
|
This adds a mingw target for aarch64, including windres and dlltool.
Note that the old value of jmp_aarch64_bytes was wrong, and this does
the same thing as MSVC does.
|
|
Adds the .secrel32 pseudo-directive and its corresponding relocation.
|
|
This adds the remaining pe-aarch64 relocations, and gets them working.
It also brings in the constant directives from ELF, as otherwise .word
would be 2 rather than 4 bytes, and .xword and .dword wouldn't be
defined.
|
|
For local exec TLS relocations of the form foo@NTPOFF+x the addend was
ignored.
bfd/ChangeLog:
* elf32-s390.c (elf_s390_relocate_section): Honor addend for
R_390_TLS_LE32.
* elf64-s390.c (elf_s390_relocate_section): Honor addend for
R_390_TLS_LE64.
ld/ChangeLog:
* testsuite/ld-s390/reloctlsle-1.d: New test.
* testsuite/ld-s390/reloctlsle-1.s: New test.
|
|
The test is already skipped on several targets (including AArch64)
because it's invalid.
* testsuite/ld-ifunc/ifunc.exp: Skip pr23169 on arm.
|
|
In order to get the ifunc relocs properly sorted the correct class
needs to be returned. The code mimics what has been done for AArch64.
Fixes:
FAIL: Run pr18841 with libpr18841b.so
FAIL: Run pr18841 with libpr18841c.so
FAIL: Run pr18841 with libpr18841bn.so (-z now)
FAIL: Run pr18841 with libpr18841cn.so (-z now)
bfd/
PR ld/18841
* elf32-arm.c (elf32_arm_reloc_type_class): Return
reloc_class_ifunc for ifunc symbols.
ld/testsuite/
* ld-arm/ifunc-12.rd: Update relocations order.
* ld-arm/ifunc-3.rd: Likewise.
* ld-arm/ifunc-4.rd: Likewise.
|
|
Older bash looks to improperly deal with backslashes in here-documents,
leaving them in place on the escaped double quotes inside the parameter
expansion. Convert to a model without using such a construct, by simply
splitting the here-documents into three ones.
|
|
|
|
Make it a bool, use obj_pe accessor everywhere.
|
|
|
|
|
|
Fix testsuite fallout.
* testsuite/ld-pe/cfi.d: Adjust for changed .idata padding.
* testsuite/ld-pe/secidx_64.d: Likewise.
* testsuite/ld-pe/secrel_64.d: Likewise.
|
|
environments.
PR 29843
* testsuite/ld-aarch64/bti-plt-5.d: Relax regxps slightly to allow
for differences in build environments.
* testsuite/ld-aarch64/tls-relax-gdesc-le-now.d: Likewise.
|
|
This is something I discovered when working on aarch64, though it's
relevant to x86_64 too.
The PE32+ imports are located in the .idata section, which starts off
with a 20-byte structure for each DLL, containing offsets into the rest
of the section. This is the Import Directory Table in
https://learn.microsoft.com/en-us/windows/win32/debug/pe-format, which
is a concatenation of the .idata$2 sections. This is then followed by an
20 zero bytes generated by the linker script, which calls this .idata$3.
After this comes the .idata$4 entries for each function, which the
loader overwrites with the function pointers. Because there's no padding
between .idata$3 and .idata$4, this means that if there's an even number
of DLLs, the function pointers won't be aligned on an 8-byte boundary.
Misaligned reads are slower on x86_64, but this is more important on
aarch64, as the e.g. `ldr x0, [x0, :lo12:__imp__func]` the compiler
might generate requires __imp__func (the .idata$4 entry) to be aligned
to 8 bytes. Without this you get IMAGE_REL_ARM64_PAGEOFFSET_12L overflow
errors.
|
|
|
|
Delete a few files only used for obsolete targets, and tidy config,
xfails and other pieces of support specific to those targets. And
since I was editing target triplets in test files, fix the nm
alpha-linuxecoff fails.
|
|
The newer update-copyright.py fixes file encoding too, removing cr/lf
on binutils/bfdtest2.c and ld/testsuite/ld-cygwin/exe-export.exp, and
embedded cr in binutils/testsuite/binutils-all/ar.exp string match.
|
|
|
|
|
|
|
|
|
|
A few fixes to minor issues I've discovered in my PDB patches.
* If sizes or offsets are greater than 0x8000, they get encoded as
extended values in the same way as for enum values - e.g. a LF_ULONG
.short followed by a .long.
* I've managed to coax MSVC to produce another type, LF_VFTABLE, which
is seen when dealing with COM. I don't think LLVM emits this. Note that
we can't just implement everything in Microsoft's header files, as most
of it is obsolete.
* Fixes a stupid bug in the test program, where I was adding an index to
a size. The index was hard-coded to 0, so this didn't cause any actual
issues.
|
|
When --no-keep-memory is used, the input section memory may not be cached.
Allocate input section memory for -z pack-relative-relocs if needed.
bfd/
PR ld/29939
* elfxx-x86.c (elf_x86_size_or_finish_relative_reloc): Allocate
input section memory if needed.
ld/
PR ld/29939
* testsuite/ld-elf/dt-relr-2i.d: New test.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|