aboutsummaryrefslogtreecommitdiff
Commit message (Collapse)AuthorAgeFilesLines
* PR26574, heap buffer overflow in _bfd_elf_slurp_secondary_reloc_sectiongentoo/binutils-2.35.2-1gentoo/binutils-2.35.2Alan Modra2021-02-073-5/+14
| | | | | | | | | | | | A horribly fuzzed object with section headers inside the ELF header. Disallow that, and crazy reloc sizes. PR 26574 * elfcode.h (elf_object_p): Sanity check section header offset. * elf.c (_bfd_elf_slurp_secondary_reloc_section): Sanity check sh_entsize. (cherry picked from commit 8642dafaef21aa6747cec01df1977e9c52eb4679)
* ld: Override the IR definition for non-ELF targetsH.J. Lu2021-02-072-2/+10
| | | | | | | | | | | For non-ELF targets, override the IR definition before all LTO symbols have been read. PR ld/26675 * plugin.c (plugin_notice): Override the IR definition before all LTO symbols have been read for non-ELF targets. (cherry picked from commit 04e433a8571e727108b8f1b9a04ba5c7ab20112c)
* Gentoo: Pass --hash-style=sysv to ld in the testsuiteAndreas K. Hüttel2021-02-072-3/+15
|
* Gentoo: ld: enable new dtags by default for linux/gnu targetsAndreas K. Hüttel2021-02-071-0/+10
| | | | | | | | | | | | | | | | | | Original author: Mike Frysinger <vapier@gentoo.org> The "new" dtags options have been around for 14+ years now, so for Linux and GNU targets, enable them by default. 2012-01-21 Mike Frysinger <vapier@gentoo.org> * emultempl/elf32.em (gld${EMULATION_NAME}_before_parse): Set link_info.new_dtags to TRUE for linux/gnu targets. * NEWS: Mention new dtags default. 2013-01-22 Roland McGrath <mcgrathr@google.com> * emultempl/elf32.em (gld${EMULATION_NAME}_before_parse): Set new_dtags to TRUE for *-*-nacl* targets.
* Gentoo: add --with-extra-soversion-suffix= optionSergei Trofimovich2021-02-074-0/+29
| | | | | | | | | | | | | | | | | | | | | --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>
* Gentoo: opcodes: link against libbfd.la for rpath depsMike Frysinger2021-02-072-2/+2
| | | | | | | | | | | | | The reason opcodes doesn't link against libbfd.la is to workaround a libtool bug where it uses installed -L paths ahead of DESTDIR paths. The downside is that the library itself lacks rpath tags to find the right version of libbfd.so. Since Gentoo has patched the libtool bug for a while, we don't need the workaround. Use the .la file so we get the rpath tags. URL: https://bugs.gentoo.org/563934 (cherry picked from commit 662586237b0b00ee881e79b56f6234ff36e8bfe6)
* Gentoo: libiberty: install PIC version of libiberty.aMike Frysinger2021-02-071-0/+1
| | | | | | | | | | | | | 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)
* Gentoo: gold/ld: add support for poisoned system directoriesMike Frysinger2021-02-0711-0/+146
| | | | | | | | | | | | | | | | | | | | | | 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)
* Reset development to trueNick Clifton2021-01-302-1/+5
|
* GNU Binutils 2.35.2 Releasebinutils-2_35_2Nick Clifton2021-01-3024-1855/+1993
|
* PR27259, SHF_LINK_ORDER self-linkAlan Modra2021-01-304-15/+43
| | | | | | | | | | | | | | | 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)
* Don't assert at ldwrite.c:212Alan Modra2021-01-302-0/+8
| | | | | | | | | | When excluding SHF_LINK_ORDER sections that happen to have SEC_KEEP set, we need to set SEC_EXCLUDE here to avoid a problem later. * ldelf.c (ldelf_before_place_orphans): Set SEC_EXCLUDE for discarded sections. (cherry picked from commit 5987401fcbc9933808fa0d84d1b01c93356c39a1)
* gold: Skip address size and segment selector for DWARF5H.J. Lu2021-01-282-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)
* POWER10: Add Return-Oriented Programming instructionsPeter Bergner2021-01-289-1/+149
| | | | | | | | | | | | | | | | | | | | | | | POWER10 adds some return-oriented programming (ROP) instructions and this patch adds support for them. You will notice that they are enabled for POWER8 and later, not just POWER10 and later. This is on purpose. This allows the instructions to be added to POWER8 binaries that can be run on POWER8, POWER9 and POWER10 cpus. On POWER8 and POWER9, these instructions just act as nop's. opcodes/ * ppc-opc.c (insert_dw, (extract_dw): New functions. (DW, (XRC_MASK): Define. (powerpc_opcodes) <hashchk, hashchkp, hashst, haststp>: New mnemonics. gas/ * testsuite/gas/ppc/rop-checks.d, * testsuite/gas/ppc/rop-checks.l, * testsuite/gas/ppc/rop-checks.s, * testsuite/gas/ppc/rop.d, * testsuite/gas/ppc/rop.s: New tests. * testsuite/gas/ppc/ppc.exp: Run them. (cherry picked from commit aae7fcb8d755a2eb3f32a3f945a4e8f30cf5c5e2)
* R_PPC64_GOT_LO_DS and R_PPC64_GOT_HA sanity checkAlan Modra2021-01-282-2/+8
| | | | | | | | | | The previous sanity check allowed a ld on the HA reloc and addis on the LO_DS. * elf64-ppc.c (ppc64_elf_relocate_section): Tighten sanity check on R_PPC64_GOT_LO_DS and R_PPC64_GOT_HA instructions. (cherry picked from commit fba8689ad3b72a3e895ebd41485d747dba5da811)
* power10 on ppc32Alan Modra2021-01-282-1/+9
| | | | | | | | | | | | | | | We don't support power10 on ppc32, mainly because some instructions have 34-bit fields for which we don't have relocations on ppc32. If you try to assemble typical code, you'll see errors saying "reloc ... not supported by object file format". Also, on 32-bit hosts with binutils configured without a 64-bit bfd, you'll see errors saying "bignum invalid" when using large offsets. But let's not kill output of prefix insns entirely on 32-bit hosts. * config/tc-ppc.c (md_assemble): Emit prefix insn by parts when valueT is smaller than 64 bits. (cherry picked from commit 15a32af52fdc010801396cbcf62f33d88435ac1a)
* PR26489, ASAN: ppc64_elf_size_stubs elf64-ppc.c:13389Alan Modra2021-01-282-3/+8
| | | | | | | | | | | | Stub sections are inserted after sec_info is sized, so have higher ids. Test flags that will exclude stub sections before looking at the sec_info array. PR 26489 * elf64-ppc.c (ppc64_elf_size_stubs): Test code_sec->has_toc_reloc and code_sec->makes_toc_func_call before sec_info[code_sec->id]. (cherry picked from commit 918dc783deadc206691dcc20bf8aa6c807c10244)
* PR26492, ASAN: ppc64_elf_before_check_relocs elf64-ppc.c:4337Alan Modra2021-01-282-2/+8
| | | | | | | | PR 26492 * elf64-ppc.c (ppc_hash_table): Test is_elf_hash_table before accessing elf_hash_table_id. (cherry picked from commit 573eb292ee79dc78207cedadaa8acbb1922ab699)
* PR26483, ASAN: ppc_elf_link_params elf32-ppc.c:2314Alan Modra2021-01-282-2/+11
| | | | | | | | PR 26483 * elf32-ppc.c (ppc_elf_hash_table): Test is_elf_hash_table before accessing elf_hash_table_id. (cherry picked from commit a8d549c006a2135b86186d14ab5d0d5fdb702b2f)
* Segmentation fault i386-genAlan Modra2021-01-272-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)
* Fix thinko in objcopy's memory freeing code.Frederic Cambus2021-01-272-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)
* PR27218, memory access violation in dwarf2dbg.cAlan Modra2021-01-262-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)
* as: Automatically enable DWARF5 supportH.J. Lu2021-01-264-9/+30
| | | | | | | | | | | | | | | | | | | | | | | | | Currently $ as -o x.o x.s fails when x.s contains DWARF5 ".file 0" or ".loc 0" directives. Update assembler to automatically enable DWARF5 support so that $ gcc -S -g -c x.c $ gcc -c x.s works. PR gas/27195 * dwarf2dbg.c (dwarf2_gen_line_info): Set dwarf_level to 5 if needed. (dwarf2_directive_filename): Likewise. (dwarf2_directive_loc): Likewise. * testsuite/gas/elf/dwarf-5-file0.d: Pass --gdwarf-3. * testsuite/gas/lns/lns-diag-1.l: Remove the "Error: file number less than one" errors. (cherry picked from commit 705989f19adf20dd70c50237ec61cd708f2b0939)
* DWARF-5: Ignore empty range in DWARF-5 line number tablesH.J. Lu2021-01-242-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)
* DWARF-5: Fix parsing DWARF-5 line number tablesH.J. Lu2021-01-232-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)
* Automatic date update in version.inGDB Administrator2021-01-101-1/+1
|
* Automatic date update in version.inGDB Administrator2021-01-091-1/+1
|
* Automatic date update in version.inGDB Administrator2021-01-081-1/+1
|
* Automatic date update in version.inGDB Administrator2021-01-071-1/+1
|
* Automatic date update in version.inGDB Administrator2021-01-061-1/+1
|
* Automatic date update in version.inGDB Administrator2021-01-051-1/+1
|
* Automatic date update in version.inGDB Administrator2021-01-041-1/+1
|
* PR27140, ppc32 segmentation fault in make_stubAlan Modra2021-01-032-4/+13
| | | | | | | | | | | | | This fixes a thinko in commit fa40fbe4849. st_other global entry bits are relevant only for 64-bit ELFv2. PowerPC gold leaves local sym vector of st_other bits as NULL for 32-bit, hence the segfault. PR 27140 * powerpc.cc (Target_powerpc::Branch_info::make_stub): Only access object->st_other() when 64-bit. (Stub_table::add_long_branch_entry): Ignore "other" when 32-bit. (cherry picked from commit e3b53295d59d2e78292eaae4500243dd9e007ae4)
* Automatic date update in version.inGDB Administrator2021-01-031-1/+1
|
* Automatic date update in version.inGDB Administrator2021-01-021-1/+1
|
* Automatic date update in version.inGDB Administrator2021-01-011-1/+1
|
* PR27128, nm -P portable output format regressionAlan Modra2021-01-0110-13/+131
| | | | | | | | | | | | | | | | | | | binutils/ PR 27128 * nm.c (print_symname): Append version string to symbol name before printing the lot under control of "form". Append version to demangled names too. ld/ PR 27128 * testsuite/ld-elf/pr27128.s: New file. * testsuite/ld-elf/pr27128.t: Likewise. * testsuite/ld-elf/pr27128a.d: Likewise. * testsuite/ld-elf/pr27128b.d: Likewise. * testsuite/ld-elf/pr27128c.d: Likewise. * testsuite/ld-elf/pr27128d.d: Likewise. * testsuite/ld-elf/pr27128e.d: Likewise. (cherry picked from commit cab3f4da68672647cde72bc0c06ec08977819817)
* sparc testsuite falloutAlan Modra2021-01-013-2/+6
| | | | (cherry picked from commit f1a9fbd995b8997b7ed7e8e6a83129e923400a58)
* elf: Keep only one '@' for undefined versioned symbolsH.J. Lu2021-01-019-5/+68
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The symbol string table in the .symtab section is optional and cosmetic. Keep only one '@' for undefined versioned symbols, which are defined in shared objects, in the symbol string table. Update "nm -D" to display only one '@' for undefined versioned symbols. bfd/ PR ld/26382 * elflink.c (elf_link_output_symstrtab): Keep only one '@' for versioned symbols, which are defined in shared objects, in symbol string table. binutils/ PR ld/26382 * nm.c (print_symname): Display only one '@' for undefined versioned symbols. * doc/binutils.texi: Update nm version information. ld/ PR ld/26382 * testsuite/ld-elf/pr26302.nd: Updated. * testsuite/ld-elf/pr26302.rd: New file. * testsuite/ld-elf/shared.exp: Add a test for readelf -sW. (cherry picked from commit 3f2e9699234ca31d083bc93ea6e03903f10baeaf)
* nm: Remove --with-symbol-versionsH.J. Lu2021-01-019-28/+69
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Since commit 7e6e972f74aeac0ebdbd95a7f905d871cd2581de Author: H.J. Lu <hjl.tools@gmail.com> Date: Tue Mar 24 04:23:11 2020 -0700 bfd: Display symbol version for nm -D always displays symbol version for nm, remove --with-symbol-versions and silently accept it for backward compatibility. binutils/ PR binutils/26302 * nm.c (with_symbol_versions): Removed. (long_option_values): Add OPTION_WITH_SYMBOL_VERSIONS. (long_options): Update --with-symbol-versions entry. (print_symbol): Remove the with_symbol_versions check. (main): Add OPTION_WITH_SYMBOL_VERSIONS for backward compatibility. * doc/binutils.texi: Remove --with-symbol-versions. ld/ PR binutils/26302 * testsuite/ld-elf/pr26302.nd: New file. * testsuite/ld-elf/pr26302.ver: Likewise. * testsuite/ld-elf/pr26302a.c: Likewise. * testsuite/ld-elf/pr26302b.c: Likewise. * testsuite/ld-elf/shared.exp: Run binutils/26302 tests. (cherry picked from commit 9b0ac51b22d0cf900f39e17e615bb22e32720f6e)
* Automatic date update in version.inGDB Administrator2020-12-311-1/+1
|
* Automatic date update in version.inGDB Administrator2020-12-301-1/+1
|
* Automatic date update in version.inGDB Administrator2020-12-291-1/+1
|
* Automatic date update in version.inGDB Administrator2020-12-281-1/+1
|
* Automatic date update in version.inGDB Administrator2020-12-271-1/+1
|
* Automatic date update in version.inGDB Administrator2020-12-261-1/+1
|
* Automatic date update in version.inGDB Administrator2020-12-251-1/+1
|
* Automatic date update in version.inGDB Administrator2020-12-241-1/+1
|
* Automatic date update in version.inGDB Administrator2020-12-231-1/+1
|
* Automatic date update in version.inGDB Administrator2020-12-221-1/+1
|