aboutsummaryrefslogtreecommitdiff
Commit message (Collapse)AuthorAgeFilesLines
* Fix ld/PR25316 for the ia64 target by refusing to support binary merging.gentoo/binutils-2.33.1-2gentoo/binutils-2.33.1Sergei Trofimovich2020-01-041-4/+7
| | | | | | | | | | | ld/PR25316 * elfnn-ia64.c (elfNN_ia64_merge_private_bfd_data): don't fail on binary inputs ld/PR25316. (is_ia64_elf): new helper to filter on ia64 objects. Cherry-picked from upstream's b26a3d5827edcb942b3af5b9. Signed-off-by: Sergei Trofimovich <slyfox@gentoo.org>
* Gentoo: ld: enable new dtags by default for linux/gnu targetsgentoo/binutils-2.33.1-1Andreas K. Hüttel2019-10-131-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. (cherry picked from commit 3ed91ee23d7ba05bffe6fb00bdaf5fa089643d77)
* [no patch] Gentoo: Add patch tarball generation scriptAndreas K. Hüttel2019-10-134-0/+173
| | | | | (cherry picked from commit 90427abb2aac0cc4ebcb73397cc3ad574c6fec5d) (cherry picked from commit 8453cdd006a0457d0b3130dae98ebbdfda46673b)
* Gentoo: add --with-extra-soversion-suffix= optionSergei Trofimovich2019-10-134-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> (cherry picked from commit 8e11cd274874120e00034585d01337628c661705)
* Gentoo: Restore TEXTREL warnings for non-shared objects, fix tests accordinglySergei Trofimovich2019-10-132-3/+3
| | | | | | (cherry picked from commit 0c4fa652ef81b030beaaaa358c1a535006f0a52e) (cherry picked from commit 474f0cf721ac221f235a6f49df06eb5b81e65d0c) (cherry picked from commit 8dcb963e1da3b13ce9045ef520f2903fb2407d32)
* Gentoo: Pass --no-warn-shared-textrel to ld in its testsuiteAndreas K. Hüttel2019-10-131-4/+4
| | | | (cherry picked from commit 47c5a106fe455b935e159c8418178f4051f1dbbf)
* Gentoo: Pass --hash-style=sysv to ld in its testsuiteAndreas K. Hüttel2019-10-131-2/+767
| | | | (cherry picked from commit 584663d863b0532dd447b2f8554672ce4dd1438a)
* Gentoo: opcodes: link against libbfd.la for rpath depsMike Frysinger2019-10-132-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) (cherry picked from commit 4c21c70c187a55cd8ce0992cda3687655d6d8df9)
* Gentoo: libiberty: install PIC version of libiberty.aMike Frysinger2019-10-131-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) (cherry picked from commit e9fa814339d59372129949ef87ddb525cffdd663)
* Gentoo: gold/ld: add support for poisoned system directoriesMike Frysinger2019-10-1311-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) (cherry picked from commit bcf3dcf1c50ff2a9368cd74f377d4c0657324246)
* Gentoo: Add an option --no-warn-shared-textrel (self-explanatory)Andreas K. Hüttel2019-10-133-0/+11
| | | | (cherry picked from commit 10389166c08e84d708e7533d1f413e0aae51789a)
* Gentoo: ld: always warn about textrels in filesMike Frysinger2019-10-131-0/+1
| | | | | | | | | | textrels are bad for forcing copy-on-write (this affects everyone), and for security/runtime code generation, this affects security ppl. But in either case, it doesn't matter who needs textrels, it's the very fact that they're needed at all. (cherry picked from commit cd6411ad57aab78686f67cbbc1ed70ee810ad335) (cherry picked from commit c7ba0482f06cc42f528139a01136c9dd15c8f403)
* Automatic date update in version.inGDB Administrator2019-10-131-1/+1
|
* Release 2.33.1binutils-2_33_1Nick Clifton2019-10-1218-251/+307
|
* Automatic date update in version.inGDB Administrator2019-10-121-1/+1
|
* Automatic date update in version.inGDB Administrator2019-10-111-1/+1
|
* PR25081, Discrepancy between VMA and LMA after ALIGNAlan Modra2019-10-112-1/+9
| | | | | | | | | | | | | | | | | | | The testcase in the PR has two empty output sections, .sec1 with an ALIGN and symbol assignment, and .sec2 just with an empty input section. The symbol assignment results in .sec1 being kept, but because it is empty this section doesn't take space from the memory region as you might expect from the ALIGN. Instead the next section .sec2, has vma/lma as if .sec1 wasn't present. However, .sec2 is discarded and os->ignored set, which unfortunately meant that dot wasn't set from .sec2 vma. That in turn results in .sec2 lma being set incorrectly. That vma/lma difference is then propagated to .sec3 where it is seen as an overlap. PR 25081 * ldlang.c (lang_size_sections_1): Set lma from section vma rather than dot. (cherry picked from commit 8610e0fd93ea253f9beb9ebb6e50e8807ed83327)
* [PR ld/22263][PR ld/25056] arm: Avoid dynamic TLS relocs in PIESzabolcs Nagy2019-10-102-5/+16
| | | | | | | | | | | | | | | | | | | | | | | | Dynamic relocs are only needed in an executable for TLS symbols if those are defined in an external module and even then TLS access can be relaxed to use IE model instead of GD. Several bfd_link_pic checks are turned into bfd_link_dll checks to fix TLS handling in PIE, for the same fix some other targets used !bfd_link_executable checks, but that includes relocatable objects so dll seems safer (in most cases either should work, since dynamic relocations are not applied in relocatable objects). On arm* fixes FAIL: Build pr22263-1 bfd/ PR ld/22263 PR ld/25056 * elf32-arm.c (elf32_arm_tls_transition): Use bfd_link_dll instead of bfd_link_pic for TLS checks. (elf32_arm_final_link_relocate): Likewise. (allocate_dynrelocs_for_symbol): Likewise.
* [PR ld/25062] arm: sign extend the addend of R_ARM_TLS_GOTDESCSzabolcs Nagy2019-10-106-2/+91
| | | | | | | | | | | | | | | | | On 64-bit host the 32-bit addend was loaded without sign extension into an unsigned long. bfd/ChangeLog: PR ld/25062 * elf32-arm.c (elf32_arm_final_link_relocate): Sign extend data. ld/ChangeLog: PR ld/25062 * testsuite/ld-arm/arm-elf.exp: Update. * testsuite/ld-arm/tls-gdesc-neg.d: New test. * testsuite/ld-arm/tls-gdesc-neg.s: New test.
* Automatic date update in version.inGDB Administrator2019-10-101-1/+1
|
* Automatic date update in version.inGDB Administrator2019-10-091-1/+1
|
* PR25079, "ar s" stopped workingAlan Modra2019-10-092-1/+7
| | | | | | | | | | | | 's' is both a command and a modifier. If given as a command then we aren't lacking an operation. I think the same goes when mri mode is selected: any following command line used to be ignored. PR 25079 * ar.c (decode_options): Don't try for command options if write_armap or mri_mode is selected. (cherry picked from commit b7d9d3ee59236d6039d7d7ccd17ff6b47e07a8aa)
* PowerPC TLS miscounting PLT for __tls_get_addrAlan Modra2019-10-093-7/+18
| | | | | | | | | | | | | | | | | | ppc*_elf_tls_optimize decrements the PLT refcount for __tls_get_addr when a GD or LD sequence can be optimized. Without tls marker relocs this must be done when processing the argument setup relocations. With marker relocs it's better done when processing the marker reloc. But don't count them both ways. Seen as "unresolvable R_PPC_REL24 relocation against symbol `__tls_get_addr_opt'" (and other branch relocs). * elf32-ppc.c (ppc_elf_tls_optimize): Don't process R_PPC_TLSLD with non-local symbol. Don't double count __tls_get_addr calls with marker relocs. * elf64-ppc.c (ppc64_elf_tls_optimize): Likewise. (cherry picked from commit 7d04a20ae4af0f1f6e75ec642413c27de4c1e1b8)
* PowerPC section flag tidyAlan Modra2019-10-093-14/+21
| | | | | | | | | | | | has_tls_get_addr_call is no longer named correctly as the flag is only set on finding a __tls_get_addr call without tlsld/tlsgd marker relocations. * elf32-ppc.c (nomark_tls_get_addr): Rename from has_tls_get_addr_call throughout. * elf64-ppc.c (nomark_tls_get_addr): Likewise. (cherry picked from commit 9737e8af48e257f24e860fbf36af8c314e73076a)
* Re: PowerPC PIC vs. DLL TLS issuesAlan Modra2019-10-092-1/+7
| | | | | | | | | | A bug crept into commit f749f26eea, which could cause linker segfaults when creating PIEs. This patch fixes it. * elf64-ppc.c (ppc64_elf_size_dynamic_sections): Do allocate space for local got non-tls relocs when PIE. (cherry picked from commit 93370e8e7b406cf0aeedcf57cf457c07d6a2c7e6)
* PowerPC PIC vs. DLL TLS issuesAlan Modra2019-10-0910-85/+92
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 1) GOT entries generated for any of the GOT TLS relocations don't need dynamic relocations for locally defined symbols in PIEs. In the case of a tls_index doubleword, the dtpmod entry is known to be 1, and the dtprel entry is also known at link time and relative. Similarly, dtprel and tprel words are known at link time and relative. (GOT entries for other than TLS symbols are not relative and thus need dynamic relocations in PIEs.) 2) Local dynamic TLS code is really only meant for accesses local to the current binary. There was a cheapskate test for this before using the common tlsld_got slot, but the test wasn't exactly correct and might confuse anyone looking at the code. The proper test, SYMBOL_REFERENCES_LOCAL isn't so expensive that it should be avoided. 3) The same cheap test for local syms when optimising TLS sequences should be SYMBOL_REFERENCES_LOCAL too. bfd/ * elf64-ppc.c (ppc64_elf_check_relocs): Move initialisation of vars. (ppc64_elf_tls_optimize): Correct is_local condition. (allocate_got): Don't reserve dynamic relocations for any of the tls got relocs in PIEs when the symbol is local. (allocate_dynrelocs): Correct validity test for local sym using tlsld_got slot. (ppc64_elf_size_dynamic_sections): Don't reserve dynamic relocations for any of the tls got relocs in PIEs. (ppc64_elf_layout_multitoc): Likewise. (ppc64_elf_relocate_section): Correct validity test for local sym using tlsld_got slot. Don't emit dynamic relocations for any of the tls got relocs in PIEs when the symbol is local. * elf32-ppc.c (ppc_elf_tls_optimize): Correct is_local condition. (got_relocs_needed): Delete. (allocate_dynrelocs): Correct validity test for local sym using tlsld_got slot. Don't reserve dynamic relocations for any of the tls got relocs in PIEs when the symbol is local. (ppc_elf_size_dynamic_sections): Don't reserve dynamic relocations for any of the tls got relocs in PIEs. (ppc_elf_relocate_section): Correct validity test for local sym using tlsld_got slot. Don't emit dynamic relocations for any of the tls got relocs in PIEs when the symbol is local. ld/ * testsuite/ld-powerpc/tlsso.d: Adjust to suit tlsld_got usage change. * testsuite/ld-powerpc/tlsso.g: Likewise. * testsuite/ld-powerpc/tlsso.r: Likewise. * testsuite/ld-powerpc/tlsso32.d: Likewise. * testsuite/ld-powerpc/tlsso32.g: Likewise. * testsuite/ld-powerpc/tlsso32.r: Likewise. (cherry picked from commit f749f26eea052459c27e21d0d15f5fac060961dc)
* PR25046, readelf "Reading xxx bytes extends past end of file for dynamic ↵Alan Modra2019-10-092-3/+11
| | | | | | | | | | section" PR 25046 * readelf.c (process_program_headers): Clear dynamic_addr and dynamic_size earlier. (cherry picked from commit 663f67df1e8a7ac0ab8c8c577817067ca32ea4be)
* PR24262, plugin search dir doesn't respect --libdirAlan Modra2019-10-096-35/+77
| | | | | | | | | | | | | | bfd/ PR 24262 * Makefile.am (AM_CPPFLAGS): Add -DLIBDIR. * plugin.c (load_plugin): Search both ${libdir}/bfd-plugins and ${bindir}/../lib/bfd-plugins if different. * Makefile.in: Regenerate. ld/ PR 24262 * ld.texi (-plugin): Revert 2019-03-15 change. (cherry picked from commit 41f37a6fb71f2a3de388108f5cdfca9cbe6e9d51)
* Automatic date update in version.inGDB Administrator2019-10-081-1/+1
|
* Automatic date update in version.inGDB Administrator2019-10-071-1/+1
|
* Automatic date update in version.inGDB Administrator2019-10-061-1/+1
|
* Automatic date update in version.inGDB Administrator2019-10-051-1/+1
|
* x86-64: fix handling of PUSH/POP of segment registerJan Beulich2019-10-047-8/+64
| | | | | | | | | | | | Commit 21df382b91 ("x86: fold SReg{2,3}") went too far: Folding 64-bit PUSH/POP templates into non-64-bit ones isn't correct, due to the different operand widths, and hence suffixes permitted. Restore the separate templates. Add tests of PUSH/POP with q suffix and %fs/%gs operands to the testsuite. While doing so also add PUSHF/POPF ones _without_ suffix. (cherry picked from commit 3f9aad111cea2f25877d0a6b404956769c14faee)
* Automatic date update in version.inGDB Administrator2019-10-041-1/+1
|
* Automatic date update in version.inGDB Administrator2019-10-031-1/+1
|
* Change objcopy's --set-section-alignment option so that it takes a byte ↵Nick Clifton2019-10-025-11/+47
| | | | | | | | | | | | | | alignment value rather than a power of two alignment value. PR 24942 * objcopy.c (copy_usage): Update description of --set-section-alignment. (copy_main): Interpret numeric argument of --set-section-alignment as a byte alignment, not a power of two alignment. * doc/binutils.texi: Update description of --set-section-alignment. * testsuite/binutils-all/set-section-alignment.d: New test. * testsuite/binutils-all/objcopy.exp: Run the new test.
* Automatic date update in version.inGDB Administrator2019-10-021-1/+1
|
* Automatic date update in version.inGDB Administrator2019-10-011-1/+1
|
* Update version number and generated files for 2.33 release.binutils-2_33Phil Blundell2019-09-3032-8956/+9989
|
* Automatic date update in version.inGDB Administrator2019-09-301-1/+1
|
* Automatic date update in version.inGDB Administrator2019-09-291-1/+1
|
* Automatic date update in version.inGDB Administrator2019-09-281-1/+1
|
* Automatic date update in version.inGDB Administrator2019-09-271-1/+1
|
* Automatic date update in version.inGDB Administrator2019-09-261-1/+1
|
* PR25031, nm reports wrong address on 32bitAlan Modra2019-09-252-54/+57
| | | | | | | | | | | | | Using saved_format breaks when nm is presented with multiple object files, some 32-bit and some 64-bit. PR 25031 * nm.c (print_format_string): New. (get_print_format): Delete saved_format. Move earlier. (set_print_width): Call get_print_format. (print_value): Use print_format_string. (cherry picked from commit 352f6bc3e5b23e76d8e6f56fb7db4e57d8f5d5bd)
* implicit conversion from enum ld_plugin_level to enum ld_plugin_statusAlan Modra2019-09-252-3/+10
| | | | | | | | | | This is a gcc10 warning fix. gold/ * testsuite/plugin_new_section_layout.c (new_input_hook): Correct return status enum values. (cherry picked from commit 6831670dd3c0a64e332b316c95873c57ab19887a)
* PR25018, readelf crash on 32bitsAlan Modra2019-09-252-4/+15
| | | | | | | | | | | | | | Pointer comparisons after adding an offset just don't work to catch overflow when the offset is a larger type than the pointer. PR 25018 * dwarf.c (get_type_signedness): Delete ineffective pointer comparison check. Properly range check uvalue offset on recursive call. (read_and_display_attr_value): Range check uvalue offset before calling get_type_signedness. (cherry picked from commit b3fe587ed2c78d46132bd33e14f42449d410354b)
* Work around gcc10 FAIL: S-records with constructorsAlan Modra2019-09-252-1/+7
| | | | | | | | | | | gcc10 on x86_64 and powerpc64le recognises that the loop in Foo::operator= can be turned into a call to memmove, which then results in an undefined symbol when linking. Avoid that by making the loop smaller. * testsuite/ld-srec/sr3.cc (FOO_MSG_LEN): Set to 4. (cherry picked from commit a13ba30840ba7a8450dcb4edd356de61fcb89130)
* tc-i386.c gcc10 warning fixAlan Modra2019-09-252-2/+8
| | | | | | | | | | | | | | .../gas/config/tc-i386.c: In function ‘md_parse_option’: .../gas/config/tc-i386.c:11441:9: error: implicit conversion from ‘enum <anonymous>’ to ‘enum <anonymous>’ [-Werror=enum-conversion] 11441 | vexwig = evexw0; | ^ .../gas/config/tc-i386.c:11443:9: error: implicit conversion from ‘enum <anonymous>’ to ‘enum <anonymous>’ [-Werror=enum-conversion] 11443 | vexwig = evexw1; | ^ * config/tc-i386.c (md_parse_option): Fix warning on vexwig assignment. (cherry picked from commit 40c9c8deb94be6576f5729172dce117cbe155856)
* Automatic date update in version.inGDB Administrator2019-09-251-1/+1
|