aboutsummaryrefslogtreecommitdiff
path: root/bfd
AgeCommit message (Collapse)AuthorFilesLines
2019-07-12Automatic date update in version.inGDB Administrator1-1/+1
2019-07-11Automatic date update in version.inGDB Administrator1-1/+1
2019-07-10Automatic date update in version.inGDB Administrator1-1/+1
2019-07-09Automatic date update in version.inGDB Administrator1-1/+1
2019-07-08PR24785, bfd crashes on empty .PPC.EMB.apuinfo sectionAlan Modra2-1/+9
PR 24785 * elf32-ppc.c (_bfd_elf_ppc_set_arch): Sanity check .PPC.EMB.apuinfo size before reading first word.
2019-07-08Automatic date update in version.inGDB Administrator1-1/+1
2019-07-07Automatic date update in version.inGDB Administrator1-1/+1
2019-07-06Automatic date update in version.inGDB Administrator1-1/+1
2019-07-05Automatic date update in version.inGDB Administrator1-1/+1
2019-07-04Automatic date update in version.inGDB Administrator1-1/+1
2019-07-03Automatic date update in version.inGDB Administrator1-1/+1
2019-07-02Stop the BFD library from issuing a warning message when processing ↵Nick Clifton3-1/+47
allocated sections in debuginfo files that lie outside of any loadable segment. PR 24717 * elf.c (is_debuginfo_file): New function. (assign_file_positions_for_non_load_sections): Do not warn about allocated sections outside of loadable segments if they are found in a debuginfo file. * elf-bfd.h (is_debuginfo_file): Prototype.
2019-07-02Fix a bug recently introduced to the linker where it would complain about a ↵Nick Clifton2-0/+9
section being larger than a file, even if the section was artificial. PR 24753 bfd * compress.c (bfd_get_full_section_contents): Do not complain about linker created sections that are larger than the file size. ld * emultempl/aarch64elf.em (_aarch64_add_stub_section): Include the LINKER_CREATED section flag when creating the stub section.
2019-07-02PR ld/24709 [arm] linker crash and assertion failure with CMSEChristophe Lyon2-1/+31
As discussed in the PR, we do not support the case where CMSE stubs are inserted too far from their destination. This would require an intermediate long-branch stub, which is tricky in this context. Instead of crashing, this patch emit an error message and exits. 2019-07-02 Christophe Lyon <christophe.lyon@linaro.org> * bfd/elf32-arm.c (CMSE_STUB_NAME): New define. (elf32_arm_get_stub_entry): Do not try to emit long-branch stubs for CMSE stubs. (arm_dedicated_stub_output_section_name): Use CMSE_STUB_NAME. Change-Id: I6d4e1c0fdee6bb9f4b07e5e1b46700b5ba31c62e
2019-07-02Ensure that debug information is retained for ARMv8-M security functions.Srinath Parvathaneni2-0/+25
Consider a file containing only Armv8-M secure entry functions. This file is compiled and linked with "-march=armv8-m.main -mfloat-abi=hard -mfpu=fpv5-sp-d16 -mcmse -static --specs=rdimon.specs -Wl,--section-start,.gnu.sgstubs=0x190000 -ffunction-sections -fdata-sections -Wl,--gc-sections -g" options to generate an executable. The executable generated does not contain any debug information of these secure entry functions even though it contains secure entry functions in the .text section. This patch fixes this problem.
2019-07-02Automatic date update in version.inGDB Administrator1-1/+1
2019-07-01Correct the calculation of offsets for ARM exidx relocs when performing a ↵Nick Clifton2-1/+7
partial link. PR 23839 bfd * elf32-arm.c (elf32_arm_update_relocs): Do not include the section VMA in the offset used to update exidx relocs. ld * testsuite/ld-arm/unwind-4.d: Adjust for corrected calculation of exidx relocs.
2019-07-01Automatic date update in version.inGDB Administrator1-1/+1
2019-06-30Automatic date update in version.inGDB Administrator1-1/+1
2019-06-29Automatic date update in version.inGDB Administrator1-1/+1
2019-06-28Prevent attempts to allocate excessive amounts of memory when parsing ↵Nick Clifton3-0/+37
corrupt ELF files. PR 24708 * elf.c (_bfd_elf_slurp_version_tables): Check for an excessively large version reference section. * compress.c (bfd_get_full_section_contents): Check for an uncompressed section whose size is larger than the file size.
2019-06-28Plugin target handlingAlan Modra6-26/+37
This patch fixes failures with LTO on mingw32 targets. Since git commit 7cf7fcc83c all possible targets (minus binary) are matched in bfd_check_format_matches rather than lower priority targets being excluded once a higher priority target matches. During linking that results in the ld/plugin.c plugin_object_p function being called with the input file xvec set to plugin_vec, which means plugin_get_ir_dummy_bfd doesn't see the real format of the file (pe-i386). It defaults to the output format instead, which happens to be pei-i386, and this wrong choice persists for the dummy bfd. pei-i386 isn't recognised as a valid linker input file. So, omit recognizing a plugin object in bfd_check_format_matches when some other object format matches, and make sure those other object formats are checked first. * format.c (bfd_check_format_matches): Don't match plugin target if another target matches. Expand comment. * targets.c (_bfd_target_vector): Move plugin_vec after all other non-corefile targets, outside !SELECT_VECS. * config.bfd: Don't handle targ=plugin here. * configure.ac: Don't add plugin to enable_targets or handle in target loop setting selvecs and other target vars. * configure: Regenerate.
2019-06-28Automatic date update in version.inGDB Administrator1-1/+1
2019-06-27Automatic date update in version.inGDB Administrator1-1/+1
2019-06-26Ensure that when attempting to process an ARM Mach-O file with unknown ↵Nick Clifton3-3/+40
relocs, that a suitable error message is displayed. PR 24703 binutils* bucomm.c (bfd_nonfatal): If no bfd error code has been set then indicate this in the output. (bfd_nonfatal_message): Likewise. bfd * mach-o-arm.c (bfd_mach_o_arm_canonicalize_one_reloc): Add error messages for failures. * mach-o.c (bfd_mach_o_canonicalize_relocs): Set an bfd error code if returning an error value.
2019-06-26Automatic date update in version.inGDB Administrator1-1/+1
2019-06-25bfd/elf-properties: avoid shadowing a C library symbolJan Beulich2-4/+9
With my (oldish) gcc/glibc combination I'm seeing .../bfd/elf-properties.c: In function ‘elf_find_and_remove_property’: .../bfd/elf-properties.c:244: error: declaration of ‘remove’ shadows a global declaration /usr/include/stdio.h:157: error: shadowed declaration is here
2019-06-25Automatic date update in version.inGDB Administrator1-1/+1
2019-06-24RISC-V: Enable lui relaxation for CODE and MERGE sections.Jim Wilson2-10/+55
2019-06-24 Ilia Diachkov <ilia.diachkov@optimitech.com> bfd/ * elfnn-riscv.c (_bfd_riscv_relax_lui): Delete early exit when SEC_MERGE or SEC_CODE flags are set. (_bfd_riscv_relax_section): New local symtype. Set sym_sec and symtype consistently. Don't include sec_addr (sym_sec) in symval. Add check for SEC_INFO_TYPE_MERGE and call _bfd_merged_section_offset. Add sec_addr (sym_sec) after handling merge sections.
2019-06-24elf: Remove the property after reporting its removalH.J. Lu2-6/+10
commit d2ef37ebd9f771d06edf1fdea37970f60b242b2d Author: H.J. Lu <hjl.tools@gmail.com> Date: Fri Dec 7 08:30:30 2018 -0800 elf: Report property change when merging properties failed to remove the property after reporting it has been removed. This patch corrects it. bfd/ PR ld/24721 * elf-properties.c (elf_merge_gnu_property_list): Remove the property after reporting property removal. ld/ PR ld/24721 * testsuite/ld-x86-64/x86-64.exp: Run PR ld/24721 tests. * testsuite/ld-x86-64/pr24721-x32.d: New file. * testsuite/ld-x86-64/pr24721.d: Likewise. * testsuite/ld-x86-64/pr24721.map: Likewise. * testsuite/ld-x86-64/pr24721a.s: Likewise. * testsuite/ld-x86-64/pr24721b.s: Likewise.
2019-06-24Automatic date update in version.inGDB Administrator1-1/+1
2019-06-23PR24704, Internal error building skiboot for powerpc64-linux-gnuAlan Modra2-16/+25
While the skiboot linker script bears some culpability in this PR, it's also true that the GOT indirect to GOT relative optimisation for 16-bit offsets isn't safe. At least, it isn't safe to remove the GOT entry based on distance between the GOT pointer and symbol calculated from the preliminary layout. So this patch removes that optimisation, and reduces the range allowed for 32-bit and 34-bit offsets. PR 24704 bfd/ * elf64-ppc.c (R_PPC64_GOT16_DS): Don't set has_gotrel. (ppc64_elf_edit_toc): Don't remove R_PPC64_GOT16_DS got entries. Reduce range of offsets allowed for other GOT relocs. ld/ * testsuite/ld-powerpc/elfv2exe.d: Update. * testsuite/ld-powerpc/elfv2so.d: Update.
2019-06-23PR24689 again, string table corruptionAlan Modra2-4/+5
Depending on optimisation level and gcc version, git commit 890f750a3b introduces a false positive warning that i_shdrp may be used uninitialized. PR 24689 * elfcode.h (elf_object_p): Warning fix.
2019-06-23Automatic date update in version.inGDB Administrator1-1/+1
2019-06-22Automatic date update in version.inGDB Administrator1-1/+1
2019-06-21PR24689, string table corruptionAlan Modra2-1/+7
The testcase in the PR had a e_shstrndx section of type SHT_GROUP. hdr->contents were initialized by setup_group rather than being read from the file, thus last byte was not zero and string dereference ran off the end of the buffer. PR 24689 * elfcode.h (elf_object_p): Check type of e_shstrndx section.
2019-06-21Automatic date update in version.inGDB Administrator1-1/+1
2019-06-20Automatic date update in version.inGDB Administrator1-1/+1
2019-06-19PR24697, R_PPC_EMB_SDA21 relocationAlan Modra2-7/+21
PR 24697 * elf32-ppc.c (ppc_elf_relocate_section): Don't read insn for R_PPC_EMB_RELSDA. Mask low bit of R_PPC_EMB_SDA21 r_offset.
2019-06-19PowerPC64 notoc callsAlan Modra2-3/+9
Calls from functions that don't have a valid toc pointer in r2 (these calls are marked with _NOTOC relocs) to functions that require r2 valid must go via the callee global entry point. This patch corrects the condition the linker was using to detect functions that require r2 to be valid. Values of both zero and one in st_other local entry bits mean a function doesn't care about r2. * elf64-ppc.c (ppc64_elf_inline_plt): Correct st_other test for functions that require r2 valid to use local entry. (ppc64_elf_size_stubs, ppc64_elf_relocate_section): Likewise.
2019-06-19Automatic date update in version.inGDB Administrator1-1/+1
2019-06-18Automatic date update in version.inGDB Administrator1-1/+1
2019-06-17aarch64: remove unnecessary loc_hash_table traversalSzabolcs Nagy2-24/+6
The loc_hash_table should only contain local ifunc symbols. The current code already aborts if there is anything else and for defined ifunc symbols elfNN_aarch64_allocate_dynrelocs is a no-op. bfd/ChangeLog: * elfnn-aarch64.c (elfNN_aarch64_allocate_local_dynrelocs): Remove. (elfNN_aarch64_size_dynamic_sections): Remove loc_hash_table traversal with elfNN_aarch64_allocate_local_dynrelocs.
2019-06-17Automatic date update in version.inGDB Administrator1-1/+1
2019-06-16Automatic date update in version.inGDB Administrator1-1/+1
2019-06-15Automatic date update in version.inGDB Administrator1-1/+1
2019-06-14Add R_AARCH64_P32_MOVW_PREL_* ELF32 relocsSzabolcs Nagy2-3/+7
These ilp32 relocations were missing for some reason. bfd/ChangeLog: * elfnn-aarch64.c: Enable MOVW_PREL relocs for ELF32. include/ChangeLog: * elf/aarch64.h (R_AARCH64_P32_MOVW_PREL_G0): Define. (R_AARCH64_P32_MOVW_PREL_G0_NC): Define. (R_AARCH64_P32_MOVW_PREL_G1): Define. ld/ChangeLog: * testsuite/ld-aarch64/aarch64-elf.exp: Add emit-relocs-22 and -23. * testsuite/ld-aarch64/emit-relocs-22.d: New test. * testsuite/ld-aarch64/emit-relocs-22.s: New test. * testsuite/ld-aarch64/emit-relocs-23.d: New test. * testsuite/ld-aarch64/emit-relocs-23.s: New test.
2019-06-14Regenerate with approved autotools versionAlan Modra3-21/+13
bfd/ * Makefile.in: Regenerate. * configure: Regenerate. binutils/ * Makefile.in: Regenerate. * aclocal.m4: Regenerate. * doc/Makefile.in: Regenerate. gas/ * Makefile.in: Regenerate. * configure: Regenerate. * doc/Makefile.in: Regenerate. ld/ * Makefile.in: Regenerate. * configure: Regenerate. libctf/ * configure: Regenerate.
2019-06-14PowerPC comment fixesAlan Modra2-5/+9
"paddi rt,sym@pcrel" as an abbreviation for "paddi rt,0,sym@pcrel,1" is invalid, so replace with "pla rt,sym@pcrel" which is a valid form of "pla rt,sym@pcrel(0),1". * elf64-ppc.c: Fix comments involving paddi.
2019-06-14Automatic date update in version.inGDB Administrator1-1/+1