aboutsummaryrefslogtreecommitdiff
path: root/bfd
AgeCommit message (Collapse)AuthorFilesLines
2019-03-06Fix a segmentation fault triggered by disassembling an EFi file with source ↵Nick Clifton3-3/+11
included. * dwarf2.c (_bfd_dwarf2_find_symbol_bias): Check for a NULL symbol table pointer. * coffgen.c (coff_find_nearest_line_with_names): Do not call _bfd_dwarf2_find_symbol_bias if there is no symbol table available. https://bugzilla.redhat.com/show_bug.cgi?id=1685727
2019-03-06Automatic date update in version.inGDB Administrator1-1/+1
2019-03-05Automatic date update in version.inGDB Administrator1-1/+1
2019-03-04Automatic date update in version.inGDB Administrator1-1/+1
2019-03-03Automatic date update in version.inGDB Administrator1-1/+1
2019-03-02Automatic date update in version.inGDB Administrator1-1/+1
2019-03-01Revert "Add support to GNU ld to separate got related plt entries"Andreas Krebbel2-1/+10
bfd/ChangeLog: 2019-03-01 Andreas Krebbel <krebbel@linux.ibm.com> This reverts commit 5a12586d44fa8d5dfc74cbca4f2f36a273a16335. 2019-01-14 Maamoun Tarsha <maamountk@hotmail.com> PR 20113 * elf32-s390.c (allocate_dynrelocs): Update comment. ld/ChangeLog: 2019-03-01 Andreas Krebbel <krebbel@linux.ibm.com> This reverts commit 5a12586d44fa8d5dfc74cbca4f2f36a273a16335. 2019-01-14 Maamoun Tarsha <maamountk@hotmail.com> PR 20113 * emulparams/elf64_s390.sh (SEPARATE_GOTPLT): Define. * emulparams/elf_s390.sh (SEPARATE_GOTPLT): Define. * testsuite/ld-s390/gotreloc_31-1.dd: Update expected output. * testsuite/ld-s390/tlsbin.dd: Likewise. * testsuite/ld-s390/tlsbin.rd: Likewise. * testsuite/ld-s390/tlsbin.sd: Likewise. * testsuite/ld-s390/tlsbin_64.dd: Likewise. * testsuite/ld-s390/tlsbin_64.rd: Likewise. * testsuite/ld-s390/tlsbin_64.sd: Likewise. * testsuite/ld-s390/tlspic.dd: Likewise. * testsuite/ld-s390/tlspic.rd: Likewise. * testsuite/ld-s390/tlspic.sd: Likewise. * testsuite/ld-s390/tlspic_64.dd: Likewise. * testsuite/ld-s390/tlspic_64.rd: Likewise. * testsuite/ld-s390/tlspic_64.sd: Likewise. * testsuite/ld-s390/s390.exp: Skip s390 tests for tpf targets.
2019-03-01Binutils: Always skip only 1 byte for CIE version 1's return address register.Tamar Christina2-4/+12
According to the specification for the CIE entries, when the CIE version is 1 then the return address register field is always 1 byte. Readelf does this correctly in read_cie in dwarf.c but ld does this incorrectly and always tries to read a skip_leb128. If the value here has the top bit set then ld will incorrectly read at least another byte, causing either an assert failure or an incorrect address to be used in eh_frame. I'm not sure how to generate a generic test for this as I'd need to write assembly, and it's a bit hard to trigger. Essentially the relocated value needs to start with something that & 0x70 != 0x10 while trying to write a personality. bfd/ChangeLog: * elf-eh-frame.c (_bfd_elf_write_section_eh_frame): Correct CIE parse.
2019-03-01PR24272, out-of-bounds read in pex64_xdata_print_uwd_codesAlan Modra1-18/+17
The fix here is to use an unsigned comparison for if (a->NumberOfRvaAndSizes > IMAGE_NUMBEROF_DIRECTORY_ENTRIES) include/ PR 24272 * coff/internal.h (struct internal_extra_pe_aouthdr): Change type of SizeOfCode, SizeOfInitializedData, and SizeOfUninitializedData to bfd_vma. Change type of SectionAlignment, FileAlignment, Reserved1, SizeOfImage, SizeOfHeaders, CheckSum, LoaderFlags, and NumberOfRvaAndSizes to uint32_t. bfd/ PR 24272 * peXXigen.c (_bfd_XXi_swap_aouthdr_in): Use unsigned index. (_bfd_XX_print_private_bfd_data_common): Adjust for type changes.
2019-03-01Automatic date update in version.inGDB Administrator1-1/+1
2019-02-28Prevent a buffer overrun error when attempting to parse a corrupt ELF file.Nick Clifton2-1/+17
PR 24273 * elf.c (bfd_elf_string_from_elf_section): Check for a string section that is not NUL terminated.
2019-02-28Automatic date update in version.inGDB Administrator1-1/+1
2019-02-27x86-64: Skip protected check on symbol defined by linkerH.J. Lu2-0/+8
Skip symbol defined by linker when checking copy reloc on protected symbol. bfd/ PR ld/24276 * elf64-x86-64.c (elf_x86_64_check_relocs): Skip symbol defined by linker when checking copy reloc on protected symbol. ld/ PR ld/24276 * testsuite/ld-i386/i386.exp: Run PR ld/24276 test. * testsuite/ld-x86-64/x86-64.exp: Likewise. * testsuite/ld-i386/pr24276.dso: New file. * testsuite/ld-i386/pr24276.warn: Likewise. * testsuite/ld-x86-64/pr24276.dso: Likewise. * testsuite/ld-x86-64/pr24276.warn: Likewise.
2019-02-27Automatic date update in version.inGDB Administrator1-1/+1
2019-02-26Automatic date update in version.inGDB Administrator1-1/+1
2019-02-25Automatic date update in version.inGDB Administrator1-1/+1
2019-02-24PR24144, pdp11-ld overwriting section data with zerosAlan Modra2-8/+5
bfd/ PR 24144 * pdp11.c (set_section_contents): Revert 2015-02-24 change. gas/ PR 24144 * config/obj-aout.c (obj_aout_frob_file_before_fix): Write to end of section to ensure file contents cover aligned section size.
2019-02-24Automatic date update in version.inGDB Administrator1-1/+1
2019-02-23Automatic date update in version.inGDB Administrator1-1/+1
2019-02-22Automatic date update in version.inGDB Administrator1-1/+1
2019-02-21Automatic date update in version.inGDB Administrator1-1/+1
2019-02-20bfd: xtensa: fix callx relaxationMax Filippov2-0/+61
Big section alignment requirements between source and destination of a long call can result in making call range bigger than what's reachable by the call opcode. Add biggest section alignment of sections between the call site and call destination to the call distance when making long call relaxation decision. 2019-02-20 Eric Tsai <erictsai@cadence.com> bfd/ * elf32-xtensa.c (is_resolvable_asm_expansion): Scan output sections between the call site and call destination and adjust call distance by the largest alignment. ld/ * testsuite/ld-xtensa/call_overflow.d: New test definition. * testsuite/ld-xtensa/call_overflow1.s: New test source. * testsuite/ld-xtensa/call_overflow2.s: New test source. * testsuite/ld-xtensa/call_overflow3.s: New test source. * testsuite/ld-xtensa/xtensa.exp: Add call_overflow test.
2019-02-20AArch64: Add pauth core file sectionAlan Hayward3-0/+37
Used for the AArch64 pointer authentication code mask registers in Arm v8.3-a. NT_ARM_PAC_MASK matches the value in Linux include/uapi/linux/elf.h include/ChangeLog: * elf/common.h (NT_ARM_PAC_MASK): Add define. bfd/ChangeLog: * elf-bfd.h (elfcore_write_aarch_pauth): Add declaration. * elf.c (elfcore_grok_aarch_pauth): New function. (elfcore_grok_note): Check for NT_ARM_PAC_MASK. (elfcore_write_aarch_pauth): New function. (elfcore_write_register_note): Check for AArch64 pauth section.
2019-02-20Check asprintf return valueAlan Modra2-4/+13
git a31b8bd9a05 introduced a warning (depending on your system headers). PR 24225 * elf32-nios2.c (nios2_elf32_relocate_section): Check asprintf return value.
2019-02-20Use or1k-darwin host SHARED_LIBADD for *-darwin.Michael Roitzsch3-6/+12
* configure.ac (SHARED_LIBADD): Add -liberty -lintl for all Darwin hosts, not just or1k. * configure: Regenerate.
2019-02-20PR24236, Heap buffer overflow in _bfd_archive_64_bit_slurp_armapAlan Modra3-15/+22
PR 24236 * archive64.c (_bfd_archive_64_bit_slurp_armap): Move code adding sentinel NUL to string buffer nearer to loop where it is used. Don't go past sentinel when scanning strings, and don't write NUL again. * archive.c (do_slurp_coff_armap): Simplify string handling to archive64.c style.
2019-02-20Automatic date update in version.inGDB Administrator1-1/+1
2019-02-19PR24235, Read memory violation in pei-x86_64.cAlan Modra2-5/+10
PR 24235 * pei-x86_64.c (pex64_bfd_print_pdata_section): Correct checks attempting to prevent read past end of section.
2019-02-19Automatic date update in version.inGDB Administrator1-1/+1
2019-02-18PR24225, nios2 buffer overflowAlan Modra2-10/+27
PR 24225 * elf32-nios2.c (nios2_elf32_relocate_section): Use asprintf and PRIx64 to generate warning messages. Print local sym names too.
2019-02-18Automatic date update in version.inGDB Administrator1-1/+1
2019-02-17Automatic date update in version.inGDB Administrator1-1/+1
2019-02-16Automatic date update in version.inGDB Administrator1-1/+1
2019-02-15Automatic date update in version.inGDB Administrator1-1/+1
2019-02-14Automatic date update in version.inGDB Administrator1-1/+1
2019-02-13Automatic date update in version.inGDB Administrator1-1/+1
2019-02-12Automatic date update in version.inGDB Administrator1-1/+1
2019-02-11Automatic date update in version.inGDB Administrator1-1/+1
2019-02-10Automatic date update in version.inGDB Administrator1-1/+1
2019-02-09[ARC] don't force _init/_fini as DT_INIT/DT_FINI.Claudiu Zissulescu2-10/+7
Recent gcc commit b4371b277f1e ("[ARC] Enable init_array support") inhibits DT_"INIT,FINI} in favor of DT_{INIT,FINI}ARRAY. Even prior to that, it seems ARC port is the only one with this special DT_INIT/FINI handling in linker emulation. Removing it doesn't seem to change any uClibc/glibc testsuite results, so this can RIP anyways. bfd/ 2019-02-01 Vineet Gupta <vgupta@synopsys.com> * elf32-arc.c: Delete init_str, fini_str ld/ 2019-02-01 Vineet Gupta <vgupta@synopsys.com> * emultempl/arclinux.em : Delete special INIT/FINI handling.
2019-02-09Automatic date update in version.inGDB Administrator1-1/+1
2019-02-08Make inline plt reloc "unsupported for bss-plt" an errorAlan Modra2-2/+7
This was always supposed to be an error. Code emitted by gcc for inline PLT calls assumes PLT is an array of addresses. * elf32-ppc.c (ppc_elf_relocate_section): Add %X to "unsupported for bss-plt" warning to make it an error.
2019-02-08Automatic date update in version.inGDB Administrator1-1/+1
2019-02-07SPARC: fix PR ld/18841Eric Botcazou3-2/+71
This fixes the last ld failures on SPARC64/Linux: FAIL: Run pr18841 with libpr18841b.so FAIL: Run pr18841 with libpr18841c.so FAIL: Run pr18841 with libpr18841bn.so (-z now) FAIL: Run pr18841 with libpr18841cn.so (-z now) by mimicing what has been done on x86-64 and Aarch64 to fix the PR. bfd/ PR ld/18841 * elf32-sparc.c (elf32_sparc_reloc_type_class): Return reloc_class_ifunc for ifunc symbols. * elf64-sparc.c (elf64_sparc_reloc_type_class): Likewise.
2019-02-07Visium: fix bogus overflow check on 32-bit hostsEric Botcazou2-7/+11
bfd/ * elf32-visium.c (visium_elf_howto_parity_reloc): Minor tweak. <R_VISIUM_PC16>: Use explicit range test to detect an overflow.
2019-02-07Move potentially obsolete BFD targets into the definitely obsolete section. ↵Nick Clifton2-1/+6
Add a note to the README-how-to-make-a-release document about doing this. bfd * config.bfd: Move the powerpc-lynxos and powerpc-windiss targets into the definitely obsolete list. binutils * README-how-to-make-a-release: Add a note about updating the obsolete targets in the bfd/config.bfd file.
2019-02-07Automatic date update in version.inGDB Administrator1-1/+1
2019-02-05x86-64: Restore PIC check for PCREL reloc against protected symbolH.J. Lu3-54/+98
commit bd7ab16b4537788ad53521c45469a1bdae84ad4a Author: H.J. Lu <hjl.tools@gmail.com> Date: Tue Feb 13 07:34:22 2018 -0800 x86-64: Generate branch with PLT32 relocation removed check R_X86_64_PC32 relocation against protected symbols in shared objects. Since elf_x86_64_check_relocs is called after we have seen all input files, we can check for PC-relative relocations in elf_x86_64_check_relocs. We should not allow PC-relative relocations against protected symbols since address of protected function and location of protected data may not be in the shared object. bfd/ PR ld/24151 * elf64-x86-64.c (elf_x86_64_need_pic): Check SYMBOL_DEFINED_NON_SHARED_P instead of def_regular. (elf_x86_64_relocate_section): Move PIC check for PC-relative relocations to ... (elf_x86_64_check_relocs): Here. (elf_x86_64_finish_dynamic_symbol): Use SYMBOL_DEFINED_NON_SHARED_P to check if a symbol is defined in a non-shared object. * elfxx-x86.h (SYMBOL_DEFINED_NON_SHARED_P): New. ld/ PR ld/24151 * testsuite/ld-x86-64/pr24151a-x32.d: New file. * testsuite/ld-x86-64/pr24151a.d: Likewise. * testsuite/ld-x86-64/pr24151a.s: Likewise. * testsuite/ld-x86-64/x86-64.exp: Run pr24151a and pr24151a-x32.
2019-02-06Automatic date update in version.inGDB Administrator1-1/+1
2019-02-05Automatic date update in version.inGDB Administrator1-1/+1