aboutsummaryrefslogtreecommitdiff
path: root/bfd
AgeCommit message (Collapse)AuthorFilesLines
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
2019-02-04Automatic date update in version.inGDB Administrator1-1/+1
2019-02-03Automatic date update in version.inGDB Administrator1-1/+1
2019-02-02Automatic date update in version.inGDB Administrator1-1/+1
2019-02-01Automatic date update in version.inGDB Administrator1-1/+1
2019-01-31Automatic date update in version.inGDB Administrator1-1/+1
2019-01-30Automatic date update in version.inGDB Administrator1-1/+1
2019-01-29Automatic date update in version.inGDB Administrator1-1/+1
2019-01-28Fix GCC9 warning on elf32-arm.c:elf32_arm_final_link_relocateSergio Durigan Junior2-1/+6
Fedora Rawhide has just switched to GCC9, and now GDB doesn't compile because of a BFD warning: BUILDSTDERR: ../../bfd/elf32-arm.c: In function 'elf32_arm_final_link_relocate': BUILDSTDERR: ../../bfd/elf32-arm.c:10907:10: error: absolute value function 'labs' given an argument of type 'bfd_signed_vma' {aka 'long long int'} but has parameter of type 'long int' which may cause truncation of value [-Werror=absolute-value] BUILDSTDERR: 10907 | value = labs (relocation); BUILDSTDERR: | ^~~~ You can take a look at the full build log here: https://kojipkgs.fedoraproject.org//work/tasks/4828/32174828/build.log The fix is (apparently) simple: instead of using 'labs', we should use 'llabs', since we're passing a 'bfd_signed_vma' to it, which is at least a 'long long int', as far as I have checked. This is what this patch does. bfd/ChangeLog: 2019-01-25 Sergio Durigan Junior <sergiodj@redhat.com> * elf32-arm.c (elf32_arm_final_link_relocate): Use 'llabs' instead of 'labs' (and fix GCC warning).
2019-01-28Automatic date update in version.inGDB Administrator1-1/+1