Age | Commit message (Collapse) | Author | Files | Lines |
|
This should be the first related issue, which posted in riscv-gnu-toolchain,
https://github.com/riscv-collab/riscv-gnu-toolchain/issues/497
If the output sections are not between gp and the symbol, then their alignments
shouldn't affect the gp relaxation. However, this patch improves this idea
even more, it limits the range to the gp+-2k, which means only the output
section which are in the [gp-2K, gp+2K) range need to be considered.
Even if the output section candidates may be different for each relax passes,
the symbol that can be relaxed ar this round will not be truncated at next
round. That is because this round you can do relaxation which means that the
section where the symbol is located is within the [gp-2K, gp+2K) range, so all
the output section alignments between them should be considered. In other
words, if the alignments between them may cause truncated, then we should
already preserve the size and won't do the gp relaxation this time.
This patch can resolve the github issue which mentioned above, and also passed
all gcc/binutils regressions of riscv-gnu-toolchain, so should be worth and
safe enough to commit.
Originally, this patch also do the same optimization for the call relaxations,
https://sourceware.org/pipermail/binutils/2022-October/123918.html
But just in case there is something that has not been considered, we only
deal with the gp relaxation at this time.
bfd/
* elfnn-riscv.c (riscv_elf_link_hash_table): Added new bfd_vma,
max_alignment_for_gp. It is used to record the maximum alignment of
the output sections, which are in the [gp-2K, gp+2k) range.
(riscv_elf_link_hash_table_create): Init max_alignment_for_gp to -1.
(_bfd_riscv_get_max_alignment): Added new parameter, gp. If gp is
zero, then all the output section alignments are possible candidates;
Otherwise, only the output sections which are in the [gp-2K, gp+2K)
range need to be considered.
(_bfd_riscv_relax_lui): Called _bfd_riscv_get_max_alignment with the
non-zero gp if the max_alignment_for_gp is -1.
(_bfd_riscv_relax_pc): Likewise.
(_bfd_riscv_relax_section): Record the first input section, so that
we can reset the max_alignment_for_gp for each repeated relax passes.
ld/
* testsuite/ld-riscv-elf/ld-riscv-elf.exp: Updated.
* testsuite/ld-riscv-elf/relax-max-align-gp.*: New testcase. It fails
without this patch.
|
|
At least older versions of one of the doc generation tools complain
(warn) about it missing.
|
|
Make ldemul_before_plugin_all_symbols_read more useful.
* ldlang.c (lang_process): Move call to
ldemul_before_plugin_all_symbols_read outside BFD_SUPPORTS_PLUGINS.
Allow backends to add to gc_sym_list before handling entry sym.
* ldelf.c (ldelf_before_plugin_all_symbols_read): Test
lto_plugin_active.
|
|
gas
* config/tc-loongarch.c (loongarch_fix_adjustable): Symbols with GOT relocatios do not fix adjustbale.
* testsuite/gas/loongarch/macro_op_large_abs.d: Regenerated.
* testsuite/gas/loongarch/macro_op_large_pc.d: Regenerated.
ld
* testsuite/ld-loongarch-elf/macro_op.d: Regenerated. -
|
|
targets.
PR 30354
* emulparams/armelf.sh (OTHER_PLT_SECTIONS): Define in order to handle the .gnu.sgstubs section.
|
|
All the tests are designed for a little-endian ARC system. Thus,
update the arc predicate in arc.exp, improve the matching pattern for
linker relaxation test, and add linker scripts to nps-1x tests.
Signed-off-by: Claudiu Zissulescu <claziss@synopsys.com>
|
|
--enable-non-contiguous-regions option.
|
|
Having been irritated by seeing bfd/elf{32,64}-aarch64.c to be re-
generated in x86-only builds, I came across 769a27ade588 ("Re: bfd
BLD-POTFILES.in dependencies"). I think this went slightly too far, as
outside of maintainer mode dependencies will cause the subset of files
to be (re-)generated which are actually needed for the build.
Generating them all is only needed when wanting to update certain files
under bfd/po/, i.e. in maintainer mode.
In the course of looking around in an attempt to try to understand how
things are meant to work, I further noticed that ld has got things
slightly wrong too: BLD-POTFILES.in depending on $(BLD_POTFILES) isn't
quite right (the output doesn't change when any of the enumerated files
changes; it's the mere presence which matters); like in bfd it looks
like we would better extend BUILT_SOURCES accordingly.
Furthermore it became apparent that ld fails to enumerate the .c files
generated from the .l and .y ones. While in their absence it was benign
whether translatable strings in the source files were actually marked as
such, this now becomes relevant. Mark respective strings at the same
time, but skipping ones which look to be of interest for debugging
purposes only (e.g. such used by printf() enclosed in #ifdef TRACE).
|
|
Linker adds indirect symbols for versioned symbol aliases, which are
created by ".symver foo, foo@FOO", by checking symbol type, value and
section so that references to foo will be replaced by references to
foo@FOO if foo and foo@FOO have the same symbol type, value and section.
But in IR, since all symbols of the same type have the same value and
section, we can't tell if a symbol is an alias of another symbol by
their types, values and sections. We shouldn't add indirect symbols
for versioned symbol aliases in IR.
bfd/
PR ld/30281
* elflink.c (elf_link_add_object_symbols): Don't add indirect
symbols for ".symver foo, foo@FOO" aliases in IR.
ld/
PR ld/30281
* testsuite/ld-plugin/lto.exp: Add PR ld/30281 test.
* testsuite/ld-plugin/pr30281.t: New file.
* testsuite/ld-plugin/pr30281.c: Likewise.
|
|
|
|
The non-preemptible SHN_ABS symbol with a pc-relative relocation should be
disallowed when generating shared object (pic and pie). Generally, the
following cases, which refer to pr25749, will cause a symbol be
non-preemptible,
* -pie, or -shared with -symbolic
* STV_HIDDEN, STV_INTERNAL, STV_PROTECTED
* Have dynamic symbol table, but without the symbol
* VER_NDX_LOCAL
However, PCREL_HI20/LO12 relocs are always bind locally when generating
shared object, so not only the non-preemptible absolute symbol need to
be disallowed, all absolute symbol references need but except that they
are defined in linker script. If we also disallow the absolute symbol
in linker script, then the glibc-linux toolchain build failed, so regard
them as pc-relative symbols, just like what x86 did.
Maybe we should add this check for all pc-relative relocations, rather
than just handle in R_RISCV_PCREL relocs. Ideally, since the value of
SHN_ABS symbol is a constant, only S - A relocations should be allowed
in the shared object, so only BFD_RELOC_8/16/32/64 are allowed, which
means R_RISCV_32/R_RISCV_64.
bfd/
PR 28789
* elfnn-riscv.c (riscv_elf_check_relocs): The absolute symbol cannot be
referneced with pc-relative relocation when generating shared object.
ld/
PR 28789
* ld/testsuite/ld-riscv-elf/ld-riscv-elf.exp: Updated.
* ld/testsuite/ld-riscv-elf/pcrel-reloc*: New testcases.
|
|
There are two improvements, which are all referenced to aarch64,
* R_RISCV_32 with non ABS symbol cannot be used under RV64 when making
shard objects.
* Don't need dynamic relocation for R_RISCV_32/64 under RV32/RV64 when
making shared objects, if the referenced symbol is local ABS symbol.
However, considering this link,
https://github.com/riscv-non-isa/riscv-elf-psabi-doc/issues/341
Seems like we should makes all R_RISCV_32/64 relocs with ABS symbol
that don't need any dynamic relocations when making the shared objects.
But anyway, I just sync the current behavior as aarch64 ld, in case
there are any unexpected behaviors happen.
Passed the gcc/binutils regressions in riscv-gnu-toolchain.
bfd/
* elfnn-riscv.c (riscv_elf_check_relocs): Only allow R_RISCV_32 with ABS
symbol under RV64.
(riscv_elf_relocate_section): R_RISCV_32/64 with local ABS symbol under
RV32/RV64 doesn't need any dynamic relocation when making shared objects.
I just make the implementations similar to other targets, so that will be
more easy to mainatain.
ld/
* testsuite/ld-riscv-elf/data-reloc*: New testcases.
* testsuite/ld-riscv-elf/ld-riscv-elf.exp: Added new data-reloc* testcases,
and need to make ifunc-seperate* testcases work for rv32.
* testsuite/ld-riscv-elf/ifunc-seperate-caller-nonplt.s: Likewise.
* testsuite/ld-riscv-elf/ifunc-seperate-caller-plt.s: Likewise.
|
|
run_host_cmd adds $gcc_B_opt and $ld_L_opt to the command line if it
detects the program being run is a compiler. Since the program being
run in lto.exp linking pr28138 is "sh", we need to add these by hand.
This isn't exactly as run_host_cmd does, as it lacks reordering of
any user -B option in $CC_FOR_TARGET, but it's better than ignoring
gcc_B_opt. This fixes a mips64 testsuite fail.
ld_compile adds CFLAGS_FOR_TARGET and other flags as well, so there
is no need for the ld_compile command line to include
CFLAGS_FOR_TARGET. Fixing this is just a tidy.
* testsuite/ld-plugin/lto.exp: Add gcc_B_opt, CFLAGS_FOR_TARGET
and $ld_L_opt to pr28138 link line.
* testsuite/lib/ld-lib.exp (run_ld_link_tests): Don't pass
unnecessary flags to ld_compile.
(run_ld_link_exec_tests, run_cc_link_tests): Likewise.
|
|
long is a poor choice of type to store 32-bit values read from
objects files by H_GET_32. H_GET_32 doesn't sign extend so tests like
that in gdb/coffread.c for "negative" values won't work if long is
larger than 32 bits. If long is 32-bit then code needs to be careful
to not accidentally index negative array elements. (I'd rather see a
segfault on an unmapped 4G array index than silently reading bogus
data.) long is also a poor choice for x_sect.s_scnlen, which might
have 64-bit values. It's better to use unsigned exact width types to
avoid surprises.
I decided to change the field names too, which makes most of this
patch simply renaming. Besides that there are a few places where
casts are no longer needed, and where printf format strings or tests
need adjusting.
include/
* coff/internal.h (union internal_auxent): Use unsigned stdint
types. Rename l fields to u32 and u64 as appropriate.
bfd/
* coff-bfd.c,
* coff-rs6000.c,
* coff64-rs6000.c,
* coffcode.h,
* coffgen.c,
* cofflink.c,
* coffswap.h,
* peXXigen.c,
* xcofflink.c: Adjust to suit internal_auxent changes.
binutils/
* rdcoff.c: Adjust to suit internal_auxent changes.
gas/
* config/obj-coff.h,
* config/tc-ppc.c: Adjust to suit internal_auxent changes.
gdb/
* coffread.c,
* xcoffread.c: Adjust to suit internal_auxent changes.
ld/
* pe-dll.c: Adjust to suit internal_auxent changes.
|
|
Don't insert a second stub if the target is already compatible with
an indirect branch.
|
|
Insert two stubs in a BTI enabled binary when fixing long calls: The
first is near the call site and uses an indirect jump like before,
but it targets the second stub that is near the call target site and
uses a direct jump.
This is needed when a single stub breaks BTI compatibility.
The stub layout is kept fixed between sizing and building the stubs,
so the location of the second stub is known at build time, this may
introduce padding between stubs when those are relaxed. Stub layout
with BTI disabled is unchanged.
|
|
Recent BPF patch removed and renamed the list of relocations based on
the limitations of BPF instruction set.
This patch is a correction to the tests.
|
|
|
|
* scripttempl/z80.sc: Use source_sh to source elf.sc.
|
|
The recently-added ld-version*.d tests expect
.*GNU ld \(GNU Binutils\) 2.*
in the .comment section.
However, when buidling --with-pkgversion=XXX, we get
GNU ld (XXX) 2.[...]
instead, leading to a spurious FAIL.
This small patch replaces "GNU Binutils" with ".*" instead.
I inspected other testcases to see if we already had similar
occurrences but I couldn't see any, so I hope this fix is OK for the
purpose?
Thanks,
Christophe
|
|
aarch64nto32 emulation isn't supported. The tests will then fall back
on aarch64elf32. It does work but some extra warnings are being
generated because the "-z relro" being added aarch64nto but ignored by
aarch64elf32 emulation.
Skip the tests to avoid any problems.
ld/ChangeLog:
* testsuite/ld-aarch64/emit-relocs-112-overflow.d: Skip for
aarch64nto.
* testsuite/ld-aarch64/emit-relocs-112.d: Likewise.
* testsuite/ld-aarch64/emit-relocs-113.d: Likewise.
* testsuite/ld-aarch64/emit-relocs-114-overflow.d: Likewise.
* testsuite/ld-aarch64/emit-relocs-114.d: Likewise.
* testsuite/ld-aarch64/emit-relocs-115.d: Likewise.
* testsuite/ld-aarch64/emit-relocs-116-overflow.d: Likewise.
* testsuite/ld-aarch64/emit-relocs-116.d: Likewise.
* testsuite/ld-aarch64/emit-relocs-117.d: Likewise.
* testsuite/ld-aarch64/emit-relocs-118-overflow.d: Likewise.
* testsuite/ld-aarch64/emit-relocs-118.d: Likewise.
* testsuite/ld-aarch64/emit-relocs-119.d: Likewise.
* testsuite/ld-aarch64/emit-relocs-22.d: Likewise.
* testsuite/ld-aarch64/emit-relocs-23.d: Likewise.
* testsuite/ld-aarch64/emit-relocs-28.d: Likewise.
* testsuite/ld-aarch64/emit-relocs-86-overflow.d: Likewise.
* testsuite/ld-aarch64/emit-relocs-86.d: Likewise.
* testsuite/ld-aarch64/emit-relocs-87.d: Likewise.
* testsuite/ld-aarch64/emit-relocs-88-overflow.d: Likewise.
* testsuite/ld-aarch64/emit-relocs-88.d: Likewise.
* testsuite/ld-aarch64/emit-relocs-89.d: Likewise.
* testsuite/ld-aarch64/emit-relocs-90-overflow.d: Likewise.
* testsuite/ld-aarch64/emit-relocs-90.d: Likewise.
* testsuite/ld-aarch64/emit-relocs-92.d: Likewise.
* testsuite/ld-aarch64/tls-desc-ie-ilp32.d: Likewise.
* testsuite/ld-aarch64/tls-relax-all-ilp32.d: Likewise.
* testsuite/ld-aarch64/tls-relax-gd-ie-ilp32.d: Likewise.
* testsuite/ld-aarch64/tls-relax-gd-le-ilp32.d: Likewise.
* testsuite/ld-aarch64/tls-relax-gdesc-le-2-ilp32.d: Likewise.
* testsuite/ld-aarch64/tls-relax-gdesc-le-ilp32.d: Likewise.
* testsuite/ld-aarch64/tls-relax-ie-le-2-ilp32.d: Likewise.
* testsuite/ld-aarch64/tls-relax-ie-le-3-ilp32.d: Likewise.
* testsuite/ld-aarch64/tls-relax-ie-le-ilp32.d: Likewise.
* testsuite/ld-aarch64/tls-relax-ld-le-small-ilp32.d: Likewise.
* testsuite/ld-aarch64/tls-relax-ld-le-tiny-ilp32.d: Likewise.
* testsuite/ld-aarch64/tls-tiny-desc-ie-ilp32.d: Likewise.
* testsuite/ld-aarch64/tls-tiny-desc-le-ilp32.d: Likewise.
* testsuite/ld-aarch64/tls-tiny-gd-ie-ilp32.d: Likewise.
* testsuite/ld-aarch64/tls-tiny-gd-le-ilp32.d: Likewise.
|
|
ld/ChangeLog:
* testsuite/ld-aarch64/aarch64-elf.exp: Add support for
aarch64nto.
|
|
QNX is handling the stack argument using a .note section. Generate it
according to ELF argument -zexecstack, -zstack-size and a new NTO
argument --lazy-stack. Another NTO argument --stack mimicking
-zstack-size is added in order to ensure compatibility with previously
made NTO linkers.
This requires a new emultempl nto.em which is applied above the default
${ARCH}elf.em.
ld/ChangeLog:
* emulparams/aarch64nto.sh: Move to nto.em.
* emultempl/nto.em: New file.
* testsuite/ld-aarch64/aarch64-nto.exp: New test.
* testsuite/ld-aarch64/nto-stack-note-1.d: New test.
* testsuite/ld-aarch64/nto-stack-note-2.d: New test.
* testsuite/ld-aarch64/start.s: New test.
|
|
This target has its own ld emulation based on aarch64elf.em.
|
|
Output sections without any input sections to initialise their flags
have their flags initialised by data statements to LOAD, ALLOC,
HAS_CONTENTS by default. This is wrong for .comment. Fix that by
making the script initialise the section type to INFO, one of the
noalloc section types. That also allows the address of .comment to be
set to zero, as is usual for non-alloc sections.
Also, use source_sh for all of the sourced scripts to set up make
dependencies.
PR 30187
* scripttempl/misc-sections.sc: Set .comment address to zero
and type to INFO.
* scripttempl/ft32.sc: Fix breakages from last edit.
* scripttempl/arclinux.sc: Use source_sh to source DWARF.sc
and misc-sections.sc.
* scripttempl/avr.sc: Likewise.
* scripttempl/dlx.sc: Likewise.
* scripttempl/elf.sc: Likewise.
* scripttempl/elf32cr16.sc: Likewise.
* scripttempl/elf32crx.sc: Likewise.
* scripttempl/elf32msp430.sc: Likewise.
* scripttempl/elf64bpf.sc: Likewise.
* scripttempl/elf64hppa.sc: Likewise.
* scripttempl/elf_chaos.sc: Likewise.
* scripttempl/elfarc.sc: Likewise.
* scripttempl/elfarcv2.sc: Likewise.
* scripttempl/elfd10v.sc: Likewise.
* scripttempl/elfd30v.sc: Likewise.
* scripttempl/elfm68hc11.sc: Likewise.
* scripttempl/elfm68hc12.sc: Likewise.
* scripttempl/elfm9s12z.sc: Likewise.
* scripttempl/elfmicroblaze.sc: Likewise.
* scripttempl/elfxgate.sc: Likewise.
* scripttempl/elfxtensa.sc: Likewise.
* scripttempl/epiphany_4x4.sc: Likewise.
* scripttempl/i386beos.sc: Likewise.
* scripttempl/i386go32.sc: Likewise.
* scripttempl/ia64vms.sc: Likewise.
* scripttempl/ip2k.sc: Likewise.
* scripttempl/iq2000.sc: Likewise.
* scripttempl/mep.sc: Likewise.
* scripttempl/mmo.sc: Likewise.
* scripttempl/nds32elf.sc: Likewise.
* scripttempl/pru.sc: Likewise.
* scripttempl/v850.sc: Likewise.
* scripttempl/v850_rh850.sc: Likewise.
* scripttempl/visium.sc: Likewise.
* scripttempl/xstormy16.sc: Likewise.
* scripttempl/z80.sc: Likewise.
* testsuite/ld-scripts/ld-version-2.d: Don't skip ft32 or pru.
|
|
.comment section.
PR 30187
* NEWS: Mention the new feature. * ld.texi: Document the new feature. * ldgram.y: Handle LINKER_VERSION token. * ldlang.c (lang_add_version): New function. (enable_linker_version): New global variable. * ldlang.h (land_add_version): Prototype. (enable_linker_version): Export. * ldlex.h (OPTION_ENABLE_LINKER_VERSION): Define. (OPTION_DISABLE_LINKER_VERSION): Define. * ldlex.l (LINKER_VERSION): Add token. * lexsup.c (ld_options): Add --enable-linker-version and --disable-linker-version. (parse_args): Handle the new options. * scripttempl/arclinux.sc: Remove stabs and comment sections and replace with inclusion of misc-sections.sc * scripttempl/avr.sc: Likewise. * scripttempl/dlx.sc: Likewise. * scripttempl/elf.sc: Likewise. * scripttempl/elf32cr16.sc: Likewise. * scripttempl/elf32crx.sc: Likewise. * scripttempl/elf32msp430.sc: Likewise. * scripttempl/elf64bpf.sc: Likewise. * scripttempl/elf64hppa.sc: Likewise. * scripttempl/elf_chaos.sc: Likewise. * scripttempl/elfarc.sc: Likewise. * scripttempl/elfarcv2.sc: Likewise. * scripttempl/elfd10v.sc: Likewise. * scripttempl/elfd30v.sc: Likewise. * scripttempl/elfm68hc11.sc: Likewise. * scripttempl/elfm68hc12.sc: Likewise. * scripttempl/elfm9s12z.sc: Likewise. * scripttempl/elfmicroblaze.sc: Likewise. * scripttempl/elfxgate.sc: Likewise. * scripttempl/elfxtensa.sc: Likewise. * scripttempl/epiphany_4x4.sc: Likewise. * scripttempl/ft32.sc: Likewise. * scripttempl/ip2k.sc: Likewise. * scripttempl/iq2000.sc: Likewise. * scripttempl/mep.sc: Likewise. * scripttempl/nds32elf.sc: Likewise. * scripttempl/pru.sc: Likewise. * scripttempl/v850.sc: Likewise. * scripttempl/v850_rh850.sc: Likewise. * scripttempl/visium.sc: Likewise. * scripttempl/xstormy16.sc: Likewise. * scripttempl/z80.sc: Likewise. * testsuite/ld-scripts/script.exp: Run new tests. * scripttempl/misc-sections.sc: New file. * testsuite/ld-scripts/ld-version-2.d: New file. * testsuite/ld-scripts/ld-version.d: New file. * testsuite/ld-scripts/ld-version.t: New file.
|
|
Revert "Prevent the ASCII linker script directive from generating huge amounts of padding if the size expression is not a constant."
This reverts commit adbe951fc95943016325af08d677f18e8c177ac1.
Revert "ld test asciz and ascii fails"
This reverts the ascii.d part of commit 5f497256bee624f0fa470949aa41534093bc5b25.
Revert "Add support for the ASCII directive inside linker scripts."
This mostly reverts commit 9fe129a4105bb59398f73ce96938a94f19265b79
leaving the asciz.d and asciz.t changes in place.
|
|
This is a hopefully temporary reversion of new ld features for
embedded processors by Ulf Samuelsson, plus some followup patches.
Squashed together from the following:
Revert "lddigest 32-bit support and gcc-4 compile errors"
This reverts commit d7ee19be87110a8f5342cec6e323d83d01c641d1.
Revert "ld: Use correct types for crc64 calculations"
This reverts commit 9a534b9f8e3d0f3cdb5a20f19ff165693fbb84d2.
Revert "Re: DIGEST: testsuite"
This reverts commit c8e85484d8a0fe9f7b88e00a6b9ae63bcb53ba32.
Revert "Regen potfiles"
This reverts commit 4d98c966f8bf305ab25badd34cb295631873cf7c.
Revert "DIGEST: Makefile.*"
This reverts commit 78ef6ab03f56ce83a606d974bb8a9f34b5d6e0b7.
Revert "DIGEST: calculation"
This reverts commit 5243990191e683d5066d3dd622c76deaba0bf15c.
Revert "DIGEST: ldlang.*: add timestamp"
This reverts commit bd9466d4aa277a469a9d8b12f0a6e6fa51678e36.
Revert "DIGEST: ldmain.c"
This reverts commit c8f8653fa7eeb3dc0769ac23039eadb5c5f09dff.
Revert "DIGEST: ldgram.y"
This reverts commit d73c01be2669e9c5267fab669a269f95a32048c9.
Revert "DIGEST: ldlex.l"
This reverts commit 48b5163a9dd5759cc87171331bbd6e902c547b5a.
Revert "DIGEST: testsuite"
This reverts commit a4135d1a4886400ea29af2da782dd8dd40ccad23.
Revert "DIGEST: Documentation"
This reverts commit 3ec28966c3e4c63704212778f96c517cbf2e0090.
Revert "DIGEST: NEWS"
This reverts commit 099bf2927d446424e8585a60cf4ce63209999aa2.
Revert "DIGEST: LICENSING"
This reverts commit 5c8a0c6654fb55926985edf3b360b62d4f20691d.
|
|
* ld.texi: Revert 2023-03-08 commit 9a534b9f8e3d.
* testsuite/ld-scripts/crc64-poly.d: Likewise.
* testsuite/ld-scripts/crc64-poly.t: Likewise.
* lddigest.c: Formatting.
(get_uint64_t): New function.
(lang_add_digest): Take etree_type* args. Replace "illegal" with
"invalid" in error message.
* lddigest.h (lang_add_digest): Update prototype.
* lddigest_tab.c (algorithms): Work around gcc-4 errors.
* ldgram.y (polynome): Adjust lang_add_digest call.
* testsuite/ld-scripts/crc64-poly-size.d: Update expected error.
|
|
|
|
Correct test target/skip lines to fix fails on alpha-dec-vms,
alpha-linux-gnuecoff, i386-bsd, i386-msdos, ns32k-openbsd,
ns32k-pc532-mach, pdp11-dec-aout, rs6000-aix*, tic4x-coff, and
tic54x-coff.
|
|
|
|
Signed-off-by: Ulf Samuelsson <ulf@emagii.com>
|
|
The Makefile.in was generated using automake
after adding a few files.
When adding the ldreflect.* files, the autotools
versions were wrong.
After upgrading the host OS, autotools were upgraded to 2.71
reinstalling the desired 2.69 still generates a lot of changes.
Makefile.ini has therefore been manually edited.
Signed-off-by: Ulf Samuelsson <ulf@emagii.com>
|
|
Signed-off-by: Ulf Samuelsson <ulf@emagii.com>
|
|
Signed-off-by: Ulf Samuelsson <ulf@emagii.com>
|
|
Signed-off-by: Ulf Samuelsson <ulf@emagii.com>
|
|
Signed-off-by: Ulf Samuelsson <ulf@emagii.com>
|
|
Signed-off-by: Ulf Samuelsson <ulf@emagii.com>
|
|
Signed-off-by: Ulf Samuelsson <ulf@emagii.com>
|
|
Signed-off-by: Ulf Samuelsson <ulf@emagii.com>
|
|
Signed-off-by: Ulf Samuelsson <ulf@emagii.com>
|
|
Signed-off-by: Ulf Samuelsson <ulf@emagii.com>
|
|
padding if the size expression is not a constant.
PR 30193 * ldgram.y (ASCII): Fail if the size is not a constant.
|
|
|
|
Microsoft's DIA library, and thus also MSVC and WinDbg, expects section
contributions to be ordered by section number and offset, otherwise it's
unable to resolve line numbers.
|
|
On DOS systems, absolute paths start with the drive letter. This can
trigger failures in the regexp from dump tests, especially for those
checking for warnings or errors. They are usually skipping everything
before the first ":" as it has to be the file path.
| [^:]*: warning: ...
In order to avoid modifying many regexps to allow such drive letters,
prune them from all the outputs if they are found at the beginning of
a line.
binutils/ChangeLog:
* testsuite/lib/binutils-common.exp (prune_dump_output): New
(run_dump_test): Use it.
ld/ChangeLog:
* testsuite/ld-elf/noinit-sections-2.l: Remove DOS drive letter
handler.
|
|
The segfault was a symptom of messing with the absolute section next
field, confusing bfd_section_removed_from_list in linker.c:fix_syms.
That's not all that was going wrong. The INSERT list of output
sections was being inserted into itself, ie. lost from the main
list of linker statements.
PR 30155
* ldlang.c (process_insert_statements): Handle pathological
case of the insert script being inserted before the first
output section statement in the default script.
(output_prev_sec_find): Don't test section owner here.
(insert_os_after): Change parameter to a list union pointer.
(lang_insert_orphan): Test section owner here and adjust
insert_os_after call.
|
|
--relax enables all relaxations. --no-relax-gp disables GP relaxation to
allow measuring its effect.
The option can test effectiveness of GP relaxation and support some ABI
variants that use GP for other purposes.
Link: https://github.com/riscv-non-isa/riscv-elf-psabi-doc/issues/298
bfd/
* elfnn-riscv.c (struct riscv_elf_link_hash_table): Add params.
(riscv_elfNN_set_options): New.
(riscv_info_to_howto_rela): Check relax_gp.
(_bfd_riscv_relax_section): Likewise.
* elfxx-riscv.h (struct riscv_elf_params): New.
(riscv_elf32_set_options): New.
(riscv_elf64_set_options): New.
ld/
* emultempl/riscvelf.em: Add option parsing.
* testsuite/ld-riscv-elf/code-model-relax-medlow-01-norelaxgp.d: New.
* testsuite/ld-riscv-elf/pcgp-relax-01-norelaxgp.d: New.
* testsuite/ld-riscv-elf/pcgp-relax-02.d: Test --relax --relax-gp can be
used together.
|
|
|