Age | Commit message (Collapse) | Author | Files | Lines |
|
|
|
|
|
This reverts commit 014cc7f849e8209623fc99264814bce7b3b6faf2.
Given the problems associated with this patch and the others intended to fix the smart_rename CVE, the decision has been taken to$
|
|
This reverts commit b143e2d506bee1020752597f979d5af174edc36d.
Given the problems associated with this patch and the others intended to fix the smart_rename CVE, the decision has been taken to$
|
|
This reverts commit 95b91a043aeaeb546d2fea556d84a2de1e917770.
Given the problems associated with this patch and the others intended to fix the smart_rename CVE, the decision has been taken to$
|
|
This reverts commit c0034ac596db89dfb5fa007a63488ad7af555fe9.
Given the problems associated with this patch and the others intended to fix the smart_rename CVE, the decision has been taken to revert the patches for the 2.36.1 point release.
|
|
We can just use stat here, the same as is done in ar.c:open_inarch.
PR 27345
* arsup.c (ar_save): Use stat rather than lstat.
(cherry picked from commit c180f095f32ca62f138da9bc7fb96cac0365fb5d)
|
|
bfd/
* elfxx-riscv.c (riscv_parse_prefixed_ext): Removed zb*.
gas/
* config/tc-riscv.c (riscv_multi_subset_supports): Removed
INSN_CLASS_ZB*.
* testsuite/gas/riscv/bitmanip-insns-32.d: Removed.
* testsuite/gas/riscv/bitmanip-insns-64.d: Removed.
* testsuite/gas/riscv/bitmanip-insns.s: Removed.
include/
* opcode/riscv-opc.h: Removed macros for zb* extensions.
* opcode/riscv.h (riscv_insn_class): Removed INSN_CLASS_ZB*.
opcodes/
* riscv-opc.c (MASK_RVB_IMM): Removed.
(riscv_opcodes): Removed zb* instructions.
(riscv_ext_version_table): Removed versions for zb*.
|
|
|
|
commit 7d409ac001cce916661d345bff01ed589991e762
Author: Alan Modra <amodra@gmail.com>
Date: Thu Feb 4 13:56:34 2021 +1030
PR27311, (symbol from plugin): undefined reference, hidden sym
fixed PR ld/15146. Restore PR ld/15146 tests.
PR ld/15146
* testsuite/ld-plugin/lto.exp: Run PR ld/15146 tests.
* testsuite/ld-plugin/pr15146.d: Restored.
* testsuite/ld-plugin/pr15146a.c: Likewise.
* testsuite/ld-plugin/pr15146b.c: Likewise.
* testsuite/ld-plugin/pr15146c.c: Likewise.
* testsuite/ld-plugin/pr15146d.c: Likewise.
(cherry picked from commit 37707bd8221c2e3f7676de8bee0c42ce3ab38c77)
|
|
bfd/
PR 27311
* elflink.c (elf_link_add_object_symbols): Don't pull in as-needed
libraries for IR references on pass over libraries after LTO
recompilation.
ld/
* testsuite/ld-plugin/pr27311d.c: New test.
* testsuite/ld-plugin/lto.exp: Rename pr27311 to pr27311-1, compile
and link new test as pr27311-2.
(cherry picked from commit 7d409ac001cce916661d345bff01ed589991e762)
|
|
|
|
PR 27270
PR 27284
PR 26945
* ar.c: Don't include libbfd.h.
(write_archive): Replace xmalloc+strcpy with xstrdup. Use
bfd_stat rather than fstat on iostream. Move stat and fd tests
outside of _WIN32 ifdef. Delete skip_stat variable.
* arsup.c (temp_name, real_ofd): New static variables.
(ar_open): Use make_tempname and bfd_fdopenw.
(ar_save): Adjust to suit ar_open changes. Move stat output
of _WIN32 ifdef.
* objcopy.c: Don't include libbfd.h.
(copy_file): Use bfd_stat.
(cherry picked from commit 95b91a043aeaeb546d2fea556d84a2de1e917770)
|
|
A default versioned symbol definition in a shared library is
overridden by an unversioned definition in a regular object file, and
thus should not be reason to make an as-needed library needed.
bfd/
PR 27311
* elflink.c (elf_link_add_object_symbols): Don't pull in as-needed
libraries when H is an indirect symbol after calling
_bfd_elf_add_default_symbol.
ld/
* testsuite/ld-ifunc/ifunc.exp (libpr16467b.so, libpr16467bn.so):
Link with --as-needed.
* testsuite/ld-plugin/pr27311.d,
* testsuite/ld-plugin/pr27311.ver,
* testsuite/ld-plugin/pr27311a.c,
* testsuite/ld-plugin/pr27311b.c,
* testsuite/ld-plugin/pr27311c.c: New testcase.
* testsuite/ld-plugin/lto.exp: Run it. Correct PR14918 and
PR12982 entries.
(cherry picked from commit 9918bff7cf2a566aaa2036d2242a61c140652dc7)
(cherry picked from commit 6955136728a68365bbb5e6e1327dff1654b2a0ca)
(cherry picked from commit f01fb44c0621b064996493bb5acd5077646ea84e)
|
|
|
|
|
|
|
|
|
|
|
|
This stops ld from endless looping on SHF_LINK_ORDER sh_link loops.
bfd/
PR 27259
* elflink.c (_bfd_elf_gc_mark_extra_sections): Use linker_mark to
prevent endless looping of linked-to sections.
ld/
PR 27259
* ldelf.c (ldelf_before_place_orphans): Use linker_mark to
prevent endless looping of linked-to sections.
(cherry picked from commit def97fb945a98544938087eff3111e16ce58da6d)
|
|
bfd/
PR 27271
* elflink.c (bfd_elf_link_record_dynamic_symbol): Don't segfault
on symbols defined in absolute or other special sections.
ld/
* testsuite/ld-tic6x/tic6x.exp: Add pr27271 test.
(cherry picked from commit c4566785ac265b3e4b3cde0e43733975c58d9175)
|
|
|
|
The .debug_line secton in DWARF5 has a byte for address size and a byte
for segment selector after DWARF version. Skip them for DWARF5.
PR gold/27246
* dwarf_reader.cc (Sized_dwarf_line_info::read_header_prolog):
Skip address size and segment selector for DWARF5.
(cherry picked from commit 0318cca4934fc5d85e83351842985ad2a3475146)
|
|
|
|
Since ld may depend on libctf (if present), and libctf may be relinked
by the installation process, libctf must be installed before ld is,
or the relink may fail if it calls on symbols or symbol versions that do
not exist in any libctf already present on the system. (If none is
present, the copy in the build tree will be automatically used, but
if one *is* present, it may take precedence and break things.)
(This is a maybe- dependency, so it will work even if libctf is
disabled.)
ChangeLog
2021-01-26 Nick Alcock <nick.alcock@oracle.com>
* Makefile.def: Add install-libctf dependency to install-ld.
* Makefile.in: Regenerated.
|
|
PR ld/27230
* scripttempl/DWARF.sc: Add DWARF-5 .debug_* sections.
|
|
|
|
A case of inst->next being uninitialised.
* i386-gen.c (parse_template): Ensure entire template_instance
is initialised.
(cherry picked from commit c3ffb8f340f567949f24c3bab62259f0e593637f)
|
|
This failed on ft32, hppa, and mips-irix targets. In the case of ft32
the problem was iterating over an array in reverse and not using the
proper condition, so BFD_RELOC_NONE was not recognised.
bfd/
* elf32-ft32.c (ft32_reloc_type_lookup): Don't miss ft32_reloc_map[0].
gas/
PR 27282
* testsuite/gas/all/none.d: Replace skip with xfail, don't xfail ft32.
* testsuite/gas/elf/pr27228.d: xfail hppa and allow OBJECT match.
(cherry picked from commit 4287950e540900bfefa113f264c7f798b1616ee0)
|
|
* objcopy.c (copy_main): Fix a double free happening when both
--localize-symbols and --globalize-symbols options are invoked
together.
(cherry picked from commit e37709f0901fe6f2410094151002bab3d123df85)
|
|
GCC 11 passes --gdwarf-5 to assembler to enable DWARF5 debug info. Don't
disable relaxation when --gdwarf-N is specified. The assembler generated
debug information will treat the sequence of the relaxed instructions as
a single instruction.
PR gas/27243
* config/tc-nios2.c (md_begin): Don't disable relaxation with
--gdwarf-N.
* testsuite/gas/nios2/relax.d: New file.
* testsuite/gas/nios2/relax.s: Likewise.
(cherry picked from commit 1f583bc2fcb1b5c4125faf8b8e815255b2b21b62)
|
|
|
|
|
|
The DWARF5 spec does indeed explicitly say: "A bounded range entry whose
beginning and ending address offsets are equal (including zero) indicates
an empty range and may be ignored."
Since arange_add already ignores empty ranges, remove the whole check
which is equivalent to the check plus explicit continue.
PR binutils/27231
* dwarf2.c (read_rnglists): Ignore empty range when parsing line
number tables.
(cherry picked from commit 940d0202fd472b09d370fb483bf5a8ae99c9c830)
|
|
PR gas/27228
* testsuite/gas/elf/elf.exp: Run pr27228.
* testsuite/gas/elf/pr27228.d: New file.
* testsuite/gas/elf/pr27228.s: Likewise.
(cherry picked from commit eea133e65524218c05bd7a1e93b4fe4241dd8e08)
|
|
|
|
|
|
Local symbols are of course supposed to be defined by their object
file, but in other cases a local symbol is promoted to global by gas
if undefined and referenced. This patch stops gas wrongly replacing a
local undefined symbol with the undefined section symbol, resulting in
a .reloc undefined local symbol being emitted as global.
PR 27228
* write.c (resolve_reloc_expr_symbols): Don't assume local symbol
is defined.
(cherry picked from commit 68fcee4fa753f6488c9f90610da2f5a5a95d5a1f)
|
|
Advance rngs_ptr when parsing DW_RLE_offset_pair, which was missing in
commit c3757b583d2448a5996e83e374fb96ac7938da35
Author: Mark Wielaard <mark@klomp.org>
Date: Tue Aug 25 15:33:00 2020 +0100
Fix the linker's handling of DWARF-5 line number tables.
PR binutils/27231
* dwarf2.c (read_rnglists): Advance rngs_ptr after
_bfd_safe_read_leb128 when parsing DW_RLE_offset_pair.
(cherry picked from commit 18454c151f5824564130ba626bd90e9de30444ef)
|
|
|
|
|
|
|
|
PR 27221
* dwarf2dbg.c (dwarf2_gen_line_info_1): Don't warn about ignored
line number info when gas is generating it.
* testsuite/gas/elf/dwarf2-20.d: Adjust to not expect warnings.
* testsuite/gas/m68hc11/indexed12.d: Likewise.
* testsuite/gas/elf/elf.exp: Don't run warn-2.
* gas/testsuite/gas/elf/warn-2.s: Delete.
(cherry picked from commit be07043ea8ea9b22a8db1ff46b557321a7714e9a)
|
|
PR 27218
* dwarf2dbg.c (dwarf2_gen_line_info): Correct setting of dwarf_level.
(dwarf2_directive_filename, dwarf2_directive_loc): Likewise, and
error for negative file numbers.
(cherry picked from commit 498ff0328fed7689f7a675d8c9f0f04bed1f1522)
|
|
git commit 994b25132814 "Ignore section symbols when matching linkonce
with comdat" cured the reason why this test used to fail on mips.
* testsuite/ld-elf/pr26936.d: No longer xfail mips.
(cherry picked from commit c78eec4424a6322682b3a164d1691135dcf004b3)
|
|
|
|
If an assembler trims off unused section symbols there may be no
section symbols. This means that testing for the .opd section symbol
needs to test both the section name and symbol flags.
* elf64-ppc.c (ppc64_elf_get_synthetic_symtab): Don't assume
section symbols are present.
(cherry picked from commit 8bd10d6b16de92570336e6026d466ef90e077e6e)
|
|
|
|
Our recent commit to support unnamed structure members better ditched
the old ctf_member_iter iterator body in favour of ctf_member_next.
However, these functions treat unnamed structure members differently:
ctf_member_iter just returned whatever the internal representation
contained, while ctf_member_next took care to always return "" rather
than sometimes returning "" and sometimes NULL depending on whether the
dict was dynamic (a product of ctf_create) or not (a product of
ctf_open). After this commit, ctf_member_iter did the same.
It was always a bug for external callers not to treat a "" return from
these functions as if it were NULL, so only buggy callers could be
affected -- but one of those buggy callers was ctf_add_type, which
assumed that it could just take whatever name was returned from
ctf_member_iter and slam it directly into the internal representation of
a dynamic dict -- which expects NULL for unnamed members, not "". The
net effect of all of this is that taking a struct containing unnamed
members and ctf_add_type'ing it into a dynamic dict produced a dict
whose unnamed members were inaccessible to ctf_member_info (though if
you wrote that dict out and then ctf_open'ed it, they would magically
reappear again).
Compensate for this by suitably transforming a "" name into NULL in the
internal representation, as should have been done all along.
libctf/ChangeLog
2021-01-19 Nick Alcock <nick.alcock@oracle.com>
* ctf-create.c (membadd): Transform ""-named members into
NULL-named ones.
* testsuite/libctf-regression/type-add-unnamed-struct*: New test.
(cherry picked from commit 26503e2f5eae6019c8649a3dd204a82705efc740)
|
|
The recent work allowing lookups of pointers in child dicts when the
pointed-to type is in the parent dict broke the case where a pointer
type that does not exist at all is looked up: we mistakenly return the
pointed-to type, which is likely not a pointer at all. This causes
considerable confusion.
Fixed, with a new testcase.
libctf/ChangeLog
2021-01-19 Nick Alcock <nick.alcock@oracle.com>
* ctf-lookup.c (ctf_lookup_by_name_internal): Do not return the
base type if looking up a nonexistent pointer type.
* testsuite/libctf-regression/pptrtab*: Test it.
(cherry picked from commit e05a3e5a491a8ef2079eef558bbe8e9feb0b3c03)
|