aboutsummaryrefslogtreecommitdiff
AgeCommit message (Collapse)AuthorFilesLines
2021-02-06This is 2.36.1 releasebinutils-2_36_1Nick Clifton23-266/+316
2021-02-06Automatic date update in version.inGDB Administrator1-1/+1
2021-02-05Revert "binutils: Make smart_rename safe too"Nick Clifton5-130/+42
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$
2021-02-05Revert "Fix a build problem when using FreeBSD 12."Nick Clifton3-3/+3
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$
2021-02-05Revert "pr27270 and pr27284, ar segfaults and wrong file mode"Nick Clifton4-50/+28
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$
2021-02-05Revert "PR27345, binutils/arsup.c: lstat() not available on all targets"Nick Clifton2-6/+1
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.
2021-02-05PR27345, binutils/arsup.c: lstat() not available on all targetsAlan Modra2-1/+6
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)
2021-02-05RISC-V: Removed the v0.93 bitmanip ZBA/ZBB/ZBC instructions.Nelson Chu12-326/+28
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*.
2021-02-05Automatic date update in version.inGDB Administrator1-1/+1
2021-02-04ld: Restore PR ld/15146 testsH.J. Lu7-0/+57
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)
2021-02-04PR27311, (symbol from plugin): undefined reference, hidden symAlan Modra5-2/+27
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)
2021-02-04Automatic date update in version.inGDB Administrator1-1/+1
2021-02-03pr27270 and pr27284, ar segfaults and wrong file modeAlan Modra4-28/+50
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)
2021-02-03PR27311, ld.bfd (symbol from plugin): undefined referenceAlan Modra10-8/+56
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)
2021-02-03Automatic date update in version.inGDB Administrator1-1/+1
2021-02-02Automatic date update in version.inGDB Administrator1-1/+1
2021-02-01Automatic date update in version.inGDB Administrator1-1/+1
2021-01-31Automatic date update in version.inGDB Administrator1-1/+1
2021-01-30Automatic date update in version.inGDB Administrator1-1/+1
2021-01-30PR27259, SHF_LINK_ORDER self-linkAlan Modra4-15/+42
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)
2021-01-29PR27271, c6x-uclinux-ld segfaults linking ld-uClibc-1.0.37.soAlan Modra4-0/+17
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)
2021-01-29Automatic date update in version.inGDB Administrator1-1/+1
2021-01-28gold: Skip address size and segment selector for DWARF5H.J. Lu2-0/+10
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)
2021-01-28Automatic date update in version.inGDB Administrator1-1/+1
2021-01-27ld: depend on libctfNick Alcock3-0/+7
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.
2021-01-27Update the DWARF sections recognuised by ELF linker scripts.Nick Clifton2-8/+22
PR ld/27230 * scripttempl/DWARF.sc: Add DWARF-5 .debug_* sections.
2021-01-27Automatic date update in version.inGDB Administrator1-1/+1
2021-01-27Segmentation fault i386-genAlan Modra2-0/+7
A case of inst->next being uninitialised. * i386-gen.c (parse_template): Ensure entire template_instance is initialised. (cherry picked from commit c3ffb8f340f567949f24c3bab62259f0e593637f)
2021-01-27pr27228 testcaseAlan Modra5-4/+15
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)
2021-01-27Fix thinko in objcopy's memory freeing code.Frederic Cambus2-1/+7
* 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)
2021-01-26nios2: Don't disable relaxation with --gdwarf-NH.J. Lu4-4/+38
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)
2021-01-26Automatic date update in version.inGDB Administrator1-1/+1
2021-01-25Automatic date update in version.inGDB Administrator1-1/+1
2021-01-24DWARF-5: Ignore empty range in DWARF-5 line number tablesH.J. Lu2-3/+6
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)
2021-01-24gas: Add a testcase for PR gas/27228H.J. Lu4-0/+21
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)
2021-01-24Enable development. Set version to 2.36.0Nick Clifton16-64/+92
2021-01-242.36 releasebinutils-2_36Nick Clifton23-470/+520
2021-01-24PR27228, .reloc wrong symbol emitted for undefined local symbolAlan Modra2-1/+9
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)
2021-01-23DWARF-5: Fix parsing DWARF-5 line number tablesH.J. Lu2-0/+8
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)
2021-01-24Automatic date update in version.inGDB Administrator1-1/+1
2021-01-23Automatic date update in version.inGDB Administrator1-1/+1
2021-01-22Automatic date update in version.inGDB Administrator1-1/+1
2021-01-21PR27221, 058430b4a1 warnings while assembling the Linux kernelAlan Modra6-22/+13
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)
2021-01-21PR27218, memory access violation in dwarf2dbg.cAlan Modra2-13/+20
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)
2021-01-21mips XPASS pr26936Alan Modra2-5/+7
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)
2021-01-21Automatic date update in version.inGDB Administrator1-1/+1
2021-01-20PowerPC64 synthetic symbolsAlan Modra2-1/+7
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)
2021-01-20Automatic date update in version.inGDB Administrator1-1/+1
2021-01-19libctf, create: fix ctf_type_add of structs with unnamed membersNick Alcock5-0/+106
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)
2021-01-19libctf: lookup_by_name: do not return success for nonexistent pointer typesNick Alcock5-10/+45
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)