aboutsummaryrefslogtreecommitdiff
Commit message (Collapse)AuthorAgeFilesLines
* Gentoo: Fix textrel warning format testgentoo/binutils-2.31Andreas K. Hüttel2018-07-161-1/+1
|
* [no patch] The 0000 patch is not needed in this branchgentoo/binutils-2.31-1Andreas K. Hüttel2018-07-151-1/+1
|
* [no-patch] Gentoo: make patch tarball script 9999-readyAndreas K. Hüttel2018-07-151-3/+8
|
* Gentoo: Fix test for precise textrel warning message, after non-shared ↵Andreas K. Hüttel2018-07-151-1/+1
| | | | | | object change (Broken by "Gentoo: Restore TEXTREL warnings for non-shared objects")
* Gentoo: Restore TEXTREL warnings for non-shared objectsSergei Trofimovich2018-07-151-2/+2
|
* Gentoo: Pass --no-warn-shared-textrel to ld in its testsuiteAndreas K. Hüttel2018-07-151-4/+4
|
* Gentoo: Pass --hash-style=sysv to ld in its testsuiteAndreas K. Hüttel2018-07-151-3/+15
|
* [no patch] Gentoo: Add patch tarball generation scriptAndreas K. Hüttel2018-07-154-0/+184
| | | | (cherry picked from commit 90427abb2aac0cc4ebcb73397cc3ad574c6fec5d)
* Gentoo: opcodes: link against libbfd.la for rpath depsMike Frysinger2018-07-152-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 Frysinger2018-07-151-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: ld: enable new dtags by default for linux/gnu targetsMike Frysinger2018-07-151-0/+10
| | | | | | | | | | | | | | | | | | 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)
* Gentoo: gold/ld: add support for poisoned system directoriesMike Frysinger2018-07-1511-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)
* Gentoo: Add an option --no-warn-shared-textrel (self-explanatory)Andreas K. Hüttel2018-07-153-0/+11
|
* Gentoo: ld: always warn about textrels in filesMike Frysinger2018-07-151-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)
* Automatic date update in version.inGDB Administrator2018-07-151-1/+1
|
* Reset branch back to development modeNick Clifton2018-07-1417-177/+210
|
* 2.31 Release pointbinutils-2_31Nick Clifton2018-07-1423-711/+808
|
* Automatic date update in version.inGDB Administrator2018-07-141-1/+1
|
* Allow bit-patterns in the immediate field of ARM neon mov instructions.Nick Clifton2018-07-134-4/+33
| | | | | | | | | | | * config/tc-arm.c (do_neon_mov): When converting an integer immediate into a floating point value, check that the conversion is valid. Also warn if the immediate is valid as both a floating point value and a bit pattern. * testsuite/gas/arm/vfp-mov-enc.s: Add instructions that use floating point bit patterns. * testsuite/gas/arm/vfp-mov-enc.d: Add regexps for the disassembly of the new insns.
* Automatic date update in version.inGDB Administrator2018-07-131-1/+1
|
* Hide dynamic symbols in discarded sectionsAlan Modra2018-07-132-2/+12
| | | | | | | | | | | | | | | | | | | | | | | | | | | | This is a followup to git commit 97196564c7 "Strip global symbol defined in discarded section". If a symbol defined in a discarded section was dynamic, that patch left .dynsym with holes (ie. all zero entries). For example, the following from libstdc++.so: Symbol table '.dynsym' contains 6090 entries: Num: Value Size Type Bind Vis Ndx Name 0: 0000000000000000 0 NOTYPE LOCAL DEFAULT UND 1: 00000000000a74e0 0 SECTION LOCAL DEFAULT 10 2: 0000000000264180 0 SECTION LOCAL DEFAULT 17 3: 0000000000000000 0 NOTYPE WEAK DEFAULT UND _ITM_addUserCommitAction 4: 0000000000000000 0 NOTYPE WEAK DEFAULT UND _ITM_memcpyRtWn 5: 0000000000000000 0 NOTYPE LOCAL DEFAULT UND readelf: Warning: local symbol 5 found at index >= .dynsym's sh_info value of 3 6: 0000000000000000 0 NOTYPE LOCAL DEFAULT UND readelf: Warning: local symbol 6 found at index >= .dynsym's sh_info value of 3 [snip] This patch removes the symbols from .dynsym too. PR 17550 * elflink.c (_bfd_elf_fix_symbol_flags): Hide dynamic symbols in discarded sections. (cherry picked from commit af0bfb9c4283ce80fe37ad6360d12cae8ec38696)
* This patch adds support for the SSBB and PSSBB speculation barrier ↵Nick Clifton2018-07-128-1369/+1398
| | | | | | | | | | | | | | | | | instructions to the AArch64 assembler and disassembler. For more details see: https://static.docs.arm.com/ddi0596/a/DDI_0596_ARM_a64_instruction_set_architecture.pdf opcodes * aarch64-tbl.h (aarch64_opcode_table): Add entry for ssbb and pssbb and update dsb flags to F_HAS_ALIAS. * aarch64-asm-2.c: Regenerate. * aarch64-dis-2.c: Regenerate. * aarch64-opc-2.c: Regenerate. gas * testsuite/gas/aarch64/system.s: Add test for ssbb and pssbb. * testsuite/gas/aarch64/system.d: Update accordingly and remove explicit addresses.
* Resolve merge conflicts.Nick Clifton2018-07-126-26/+239
|\
| * Add remainder of Em16 restrictions for AArch64 gas.Tamar Christina2018-07-126-26/+239
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This adds the missing Em16 constraints the rest of the instructions requiring them and also adds a testcase to test all the instructions so these are checked from now on. The Em16 operand constrains the valid registers to the lower 16 registers when used with a half precision qualifier. The list has been cross checked (by hand) through the Arm ARM version Ca. opcodes/ PR binutils/23192 * aarch64-tbl.h (sqdmlal, sqdmlal2, smlsl, smlsl2, sqdmlsl, sqdmlsl2, mul, smull, smull2, sqdmull, sqdmull2, sqdmulh, sqrdmulh, mla, umlal, umlal2, mls, umlsl, umlsl2, umull, umull2, sqdmlal, sqdmlsl, sqdmull, sqdmulh, sqrdmulh): Use Em16. gas/ PR binutils/23192 * testsuite/gas/aarch64/illegal-by-element.s: New. * testsuite/gas/aarch64/illegal-by-element.d: New. * testsuite/gas/aarch64/illegal-by-element.l: New. (cherry picked from commit 45a28947f3fe5693560e9a1d6373807a9e82c04a) Signed-off-by: Tamar Christina <tamar.christina@arm.com>
* | Add support for the ARM speculation barrier instructions SSBB and PSSBB.Sudakshina Das2018-07-1210-12/+45
|/ | | | | | | | | | | | | | opcodes * arm-dis.c (arm_opcodes): Add ssbb and pssbb and move csdb together with them. (thumb32_opcodes): Likewise. gas * config/tc-arm.c (insns): Add new ssbb and pssbb instructions. * testsuite/gas/arm/csdb.s: Add new tests for ssbb and pssbb. * testsuite/gas/arm/csdb.d: Likewise * testsuite/gas/arm/thumb2_it_bad.s: Likewise. * testsuite/gas/arm/thumb2_it_bad.l: Likewise. * testsuite/gas/arm/barrier.d: Update with ssbb. * testsuite/gas/arm/barrier-thumb.d: Likewise.
* Automatic date update in version.inGDB Administrator2018-07-121-1/+1
|
* xtensa: don't emit dynamic relocation for weak undefined symbolMax Filippov2018-07-112-2/+20
| | | | | | | | | | | | | | | | | | | | | | | | | | Resolved reference to a weak undefined symbol in PIE must not have a dynamic relative relocation against itself, otherwise the value of a reference will be changed from 0 to the base of executable, breaking code like the following: void weak_function (void); if (weak_function) weak_function (); This fixes tests for PR ld/22269 and a number of PIE tests in xtensa gcc testsuite. bfd/ 2018-07-11 Max Filippov <jcmvbkbc@gmail.com> * elf32-xtensa.c (elf_xtensa_allocate_dynrelocs): Don't allocate space for dynamic relocation for undefined weak symbol. (elf_xtensa_relocate_section): Don't emit R_XTENSA_RELATIVE relocation for undefined weak symbols. (shrink_dynamic_reloc_sections): Don't shrink dynamic relocation section for relocations against undefined weak symbols. (cherry picked from commit c451bb34ae8bd2d0669bd563366883cfbcf0de9b)
* Duplicate code update.Nick Clifton2018-07-111-5/+1
|\
| * Fix printing the size of GOLD's memory areana on Cygwin based systems.Franz Sirl2018-07-112-2/+6
| | | | | | | | | | | | | | I just stumbled over this with 2.29.1 while building a cross-toolchain, on Cygwin64, but it's still the same for 2.30. m.arena has size_t on Cygwin64 and thus errors out due to -Werror=format. gold * main.cc: Print m.arena as long long.
* | Reimport a patch to fix building gold on Cygwin64 systms: m.arena has size_t ↵Franz Sirl2018-07-112-2/+10
|/ | | | | | on Cygwin64 and thus errors out due to -Werror=format. gold * main.cc: Print m.arena as long long.
* Automatic date update in version.inGDB Administrator2018-07-111-1/+1
|
* BFD/ELF: Correct a `remove' global shadowing error for pre-4.8 GCCMaciej W. Rozycki2018-07-112-4/+9
| | | | | | | | | | | | | | | | | | Remove `-Wshadow' compilation errors: cc1: warnings being treated as errors .../bfd/elflink.c: In function 'bfd_elf_final_link': .../bfd/elflink.c:11722: error: declaration of 'remove' shadows a global declaration /usr/include/stdio.h:154: error: shadowed declaration is here which for versions of GCC before 4.8 prevent support for ELF targets from being built. See also GCC PR c/53066. bfd/ * elflink.c (bfd_elf_final_link): Rename `remove' local variable to `remove_section'. (cherry picked from commit 5270eddc6ed6b5d8e4e2817491bb44b784fa6f81)
* Fix test for availability of emplace_back.Cary Coutant2018-07-102-3/+8
| | | | | | | | | | Testing for the GCC version 5 or later isn't right, since C++ 11 support wasn't enabled by default until later. This patch tests the C++ standard support directly instead of inferring it from the GCC version. gold/ * incremental.cc (Sized_incremental_binary::setup_readers): Use emplace_back for C++ 11 or later.
* Automatic date update in version.inGDB Administrator2018-07-101-1/+1
|
* bfd: Use changequote for "i[3-7]86-*-linux-*"H.J. Lu2018-07-093-1/+9
| | | | | | | | | | | Use changequote to match "i[3-7]86-*-linux-*", instead of "i3-786-*-linux-*". PR ld/23388 * configure.ac: Use changequote for "i[3-7]86-*-linux-*". * configure: Regenerated. (cherry picked from commit 872899f1efeda1e93ed569d322c6b2ee85ce885c)
* x86: Remove x86 ISA properties with empty bitsH.J. Lu2018-07-0917-4/+230
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | There is no need to generate x86 ISA properties with empty bits in linker output. bfd/ PR ld/23372 * elfxx-x86.c (_bfd_x86_elf_merge_gnu_properties): Remove x86 ISA properties with empty bits. ld/ PR ld/23372 * testsuite/ld-i386/i386.exp: Run pr23372a and pr23372b. * testsuite/ld-i386/pr23372a.d: New file. * testsuite/ld-i386/pr23372a.s: Likewise. * testsuite/ld-i386/pr23372b.d: Likewise. * testsuite/ld-i386/pr23372b.s: Likewise. * testsuite/ld-i386/pr23372c.s: Likewise. * testsuite/ld-x86-64/pr23372a-x32.d: Likewise. * testsuite/ld-x86-64/pr23372a.d: Likewise. * testsuite/ld-x86-64/pr23372a.s: Likewise. * testsuite/ld-x86-64/pr23372b-x32.d: Likewise. * testsuite/ld-x86-64/pr23372b.d: Likewise. * testsuite/ld-x86-64/pr23372b.s: Likewise. * testsuite/ld-x86-64/pr23372c.s: Likewise. * testsuite/ld-x86-64/x86-64.exp: Run pr23372a, pr23372a-x32, pr23372b and pr23372b-x32. (cherry picked from commit 56ad703d56ffe5dc55d5e719a6ec41fd6cf9bfbe)
* Fix diagnostic errorsAlan Modra2018-07-099-6/+46
| | | | | | | | | | | | | | | | | | | | | Fixes a number of build errors like the following .../elf32-arm.c: In function 'elf32_arm_nabi_write_core_note': .../elf32-arm.c:2177: error: #pragma GCC diagnostic not allowed inside functions .../elf32-arm.c:2186: error: #pragma GCC diagnostic not allowed inside functions See the comment in diagnostics.h. include/ * diagnostics.h: Comment on macro usage. bfd/ * elf32-arm.c (elf32_arm_nabi_write_core_note): Don't use DIAGNOTIC_PUSH and DIAGNOSTIC_POP unconditionally. * elf32-ppc.c (ppc_elf_write_core_note): Likewise. * elf32-s390.c (elf_s390_write_core_note): Likewise. * elf64-ppc.c (ppc64_elf_write_core_note): Likewise. * elf64-s390.c (elf_s390_write_core_note): Likewise. * elfxx-aarch64.c (_bfd_aarch64_elf_write_core_note): Likewise. (cherry picked from commit fe75810f8e0cc33384f22d0479506711d4014c60)
* [GOLD] PowerPC .gnu.attributes supportAlan Modra2018-07-094-7/+393
| | | | | | | | | | | | | | | | | | | | | elfcpp/ * powerpc.h (Tag_GNU_Power_ABI_FP): Define. (Tag_GNU_Power_ABI_Vector, Tag_GNU_Power_ABI_Struct_Return): Define. gold/ * powerpc.cc: Include attributes.h. (Powerpc_relobj::attributes_section_data_): New variable, with accessor and associated constructor and destructor support. (Powerpc_dynobj::attributes_section_data_): Likewise. (Powerpc_relobj::do_read_symbols): Stash SHT_GNU_ATTRIBUTES section contents in attributes_section_data_. (Powerpc_dynobj::do_read_symbols): Likewise. (Target_powerpc): Add attributes_section_data_, last_fp_, last_ld_, last_vec_, and last_struct_ vars. (Target_powerpc::merge_object_attributes): New function. (Target_powerpc::do_finalize_sections): Iterate over input objects merging attributes. Create output attributes section. (cherry picked from commit 724436fccb68156ff53b7b03cb7f41547a65c30c)
* Automatic date update in version.inGDB Administrator2018-07-091-1/+1
|
* Automatic date update in version.inGDB Administrator2018-07-081-1/+1
|
* Automatic date update in version.inGDB Administrator2018-07-071-1/+1
|
* RISC-V: Add riscv-*-* configure support, and minor cleanup.Jim Wilson2018-07-064-3/+14
| | | | | | | | | | | | bfd/ * config.bfd (riscv32*-*-*): Renamed from riscv32-*-*. (riscv64*-*-*): Likewise. (riscv-*-*): Add as an alias for riscv32*-*-*. ld/ * configure.tgt (riscv-*-*): Add as an alias for riscv32*-*-*. (cherry picked from commit bb11866d6a635fadb9285d18e2fb819d2de2c28c)
* Fix SBO bit in disassembly mask for ldrah on AArch64.Tamar Christina2018-07-062-1/+6
| | | | | | | | | | | | | | | | The disassembly mask for ldarh incorrectly didn't mask out bit 20 which is part of the SBO part of the instruction and shouldn't be considered input. This fixes the wrong bit fixing the disassembly of instructions to ldarh and makes the behavior consistent. opcodes/ PR binutils/23242 * aarch64-tbl.h (ldarh): Fix disassembly mask. (cherry picked from commit f311ba7ed84d66ae2cd77bd969747d7ab959d866) Signed-off-by: Tamar Christina <tamar.christina@arm.com>
* Fix the read/write flag for these registers on AArch64Tamar Christina2018-07-065-5/+44
| | | | | | | | | | | | | | | | | | | | | | | | The previous constraints were based on information already in opcodes and it seems that a few of them were wrong. I have now hand verified the ones changed by the previous patch and corrected where needed. This prevents a warning to be issued when one shouldn't be. opcodes/ PR binutils/23369 * aarch64-opc.c (aarch64_sys_regs): Make read/write csselr_el1, vsesr_el2, osdtrrx_el1, osdtrtx_el1, pmsidr_el1. gas/testsuite/ PR binutils/23369 * gas/aarch64/msr.d (csselr_el1, vsesr_el2, osdtrrx_el1, osdtrtx_el1, pmsidr_el1): New. * gas/aarch64/msr.s: Likewise. (cherry picked from commit cba05feb51cb97f75f9a7814b081ce45245ac7b2) Signed-off-by: Tamar Christina <tamar.christina@arm.com>
* Fix bug generating relocations for notes created by the assembler.Nick Clifton2018-07-062-3/+8
| | | | | * write.c (maybe_generate_build_notes): Bias reloc offsets by the number of notes already generated.
* Update config.subSebastian Huber2018-07-062-9/+7
| | | | * config.sub: Sync with upstream version 2018-07-03.
* Automatic date update in version.inGDB Administrator2018-07-061-1/+1
|
* Error for mismatched powerpc ABI tagsAlan Modra2018-07-0513-44/+96
| | | | | | | | | | | | | | | | | | | | | | | | | | And report the two input files that are incompatible rather than reporting that an input file is incompatible with the output. bfd/ * elf-bfd.h (_bfd_elf_ppc_merge_fp_attributes): Update prototype. * elf32-ppc.c (_bfd_elf_ppc_merge_fp_attributes): Return error on mismatch. Remove "warning: " from messages. Track last bfd used to set tags. (ppc_elf_merge_obj_attributes): Likewise. Handle status from _bfd_elf_ppc_merge_fp_attributes. * elf64-ppc.c (ppc64_elf_merge_private_bfd_data): Handle status from _bfd_elf_ppc_merge_fp_attributes. ld/ * testsuite/ld-powerpc/attr-gnu-4-12.d: Update expected output. * testsuite/ld-powerpc/attr-gnu-4-13.d: Likewise. * testsuite/ld-powerpc/attr-gnu-4-21.d: Likewise. * testsuite/ld-powerpc/attr-gnu-4-23.d: Likewise. * testsuite/ld-powerpc/attr-gnu-4-31.d: Likewise. * testsuite/ld-powerpc/attr-gnu-4-32.d: Likewise. * testsuite/ld-powerpc/attr-gnu-8-23.d: Likewise. * testsuite/ld-powerpc/attr-gnu-12-21.d: Likewise. (cherry picked from commit 4a91d0ba307eb24eb87ad27f4ea8fcde823c3e61)
* Correct removal of .gnu.attributesAlan Modra2018-07-052-7/+16
| | | | | | | | | | | Setting SEC_EXCLUDE for empty .gnu.attributes is too late in the link process for the linker to remove the section. That must be done in bfd_elf_final_link, as we do for removed group sections. * elflink.c (bfd_elf_final_link): Remove zero size .gnu.attributes sections. (cherry picked from commit b8a6ced79668ec8af3180e50b76f7517ebbab0d9)
* GNU attribute output on errorsAlan Modra2018-07-055-58/+109
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | .gnu.attributes entries from linker input files are merged to the output file, the output having the union of compatible input attributes. Incompatible attributes generally cause a linker error and no output. However in some cases only a warning is emitted, and one of the incompatible input attributes is passed on to the output. PowerPC tends to emit warnings rather than errors, and the output takes the first input attribute. For example, if we have two input files with Tag_GNU_Power_ABI_FP, the first with a value signifying "double-precision hard float, IBM long double", the second with a value signifying "double-precision hard float, IEEE long double", we'll get a warning about incompatible long double types and the output will say "double-precision hard float, IBM long double". The output attribute of course isn't correct. It would be correct to specify "IBM and IEEE long double", but we don't have a way to represent that currently. While it would be possible to extend the encoding, there isn't much gain in doing so. A shared library providing support for both long double types should link against objects using either long double type without warning or error. That is what you'd get if such a shared library had no Tag_GNU_Power_ABI_FP attribute. So this patch provides a way for the backend to omit .gnu.attributes tags from the output. * elf-bfd.h (ATTR_TYPE_FLAG_ERROR, ATTR_TYPE_HAS_ERROR): Define. * elf-attrs.c (is_default_attr): Handle ATTR_TYPE_HAS_ERROR. * elf32-ppc.c (_bfd_elf_ppc_merge_fp_attributes): Use ATTR_TYPE_FLAG_INT_VAL. Set ATTR_TYPE_HAS_ERROR on finding incompatible attribute. (ppc_elf_merge_obj_attributes): Likewise. Return _bfd_elf_merge_object_attributes result. * elf64-ppc.c (ppc64_elf_merge_private_bfd_data): Return _bfd_elf_merge_object_attributes result. (cherry picked from commit 8d2c8c3d17926826864f4b739362f66af547428f)