aboutsummaryrefslogtreecommitdiff
path: root/bfd
AgeCommit message (Collapse)AuthorFilesLines
2015-08-05Automatic date update in version.inGDB Administrator1-1/+1
2015-08-04Fix stack buffer overflows when parsing corrupt ihex files.Yuriy M. Kaminskiy3-4/+16
PR binutils/18750 * ihex.c (ihex_scan): Fixes incorrect escape sequence in error message and stack overflow when char is signed and \200-\376 was in place of hex digit; also fixes \377 was handled as EOF instead of "incorrect character". (ihex_read_section): Changed for consistency. (ihex_bad_byte): Prevent (now impossible to trigger) stack overflow and incorrect escape sequence handling. * srec.c (srec_bad_byte): Likewise. * readelf.c (process_mips_specific): Fix incorrect escape sequence handling.
2015-08-04Automatic date update in version.inGDB Administrator1-1/+1
2015-08-03Fix ChangeLog for "FAIL: -Bsymbolic-functions" for cris-linux in ldHans-Peter Nilsson1-1/+1
It's bfd_link_info, not elf_link_hash_entry, for the old reference: * elf32-cris.c (cris_elf_relocate_section) (elf_cris_finish_dynamic_symbol, cris_elf_check_relocs) (elf_cris_discard_excess_dso_dynamics): Use SYMBOLIC_BIND, not just bfd_link_info->symbolic, to check if a symbol should be bound symbolically.
2015-08-03Fix "FAIL: -Bsymbolic-functions" for cris-linux in ldHans-Peter Nilsson2-7/+15
* elf32-cris.c (cris_elf_relocate_section) (elf_cris_finish_dynamic_symbol, cris_elf_check_relocs) (elf_cris_discard_excess_dso_dynamics): Use SYMBOLIC_BIND, not just h->symbolic, to check if a symbol should be bound symbolically.
2015-08-03Automatic date update in version.inGDB Administrator1-1/+1
2015-08-02Automatic date update in version.inGDB Administrator1-1/+1
2015-08-01Automatic date update in version.inGDB Administrator1-1/+1
2015-07-31Automatic date update in version.inGDB Administrator1-1/+1
2015-07-30Don't change the default symbol for relocatable linkH.J. Lu2-9/+23
We should change the default symbol for the versioned symbol only when not performing a relocatable link. bfd/ PR ld/18735 * elflink.c (_bfd_elf_add_default_symbol): Add the default symbol if not performing a relocatable link. (elf_link_add_object_symbols): Adjust the default symbol if not performing a relocatable link. ld/testsuite/ PR ld/18735 * ld-elf/pr18735.d: New file. * ld-elf/pr18735.s: Likewise.
2015-07-30Automatic date update in version.inGDB Administrator1-1/+1
2015-07-29Don't set link_info.executable for "ld -r"H.J. Lu2-4/+11
This patch changes "ld -r" not to set link_info.executable. It removes !info->relocatable check for info->executable and adds it for !info->executable in elflink.c. bfd/ * elflink.c (elf_link_add_object_symbols): Remove !info->relocatable check for info->executable. Add !info->relocatable check for !info->executable. (elf_link_output_extsym): Remove !info->relocatable check for info->executable. ld/ * lexsup.c (parse_args): Don't set link_info.executable to TRUE for link_info.relocatable.
2015-07-29bfd/mmo.c (MMIX): Fix massive gcc LTO testsuite failures.Hans-Peter Nilsson2-47/+58
* mmo.c (mmo_write_symbols_and_terminator): Skip symbol-type assignment loop for bfd plugin objects.
2015-07-29Automatic date update in version.inGDB Administrator1-1/+1
2015-07-28Fallout from "Reorder more powerpc64 sections for -z relro"Alan Modra2-4/+17
Commit 23283c1b changed the layout of some bss style sections on powerpc64, but neglected to add a page gap before the third PT_LOAD segment created by this reording. Without a page gap we get two PT_LOAD headers that overlap by one page in memory. That shouldn't be allowed because the dynamic loader will load garbage from the first page of the last segment over the last page of the previous segment. bfd/ * elf.c (_bfd_elf_map_sections_to_segments): Do not make a new segment for loaded sections after nonloaded sections if the sections are on the same page. ld/testsuite/ * ld-powerpc/elfv2so.d: Update
2015-07-28Check for asprintf and vasprintf during configure stage.Iain Buclaw4-0/+37
This should fix some build errors seen on AIX, MinGW, and possibly other non-GNU systems too due to missing asprintf(). bfd/ * configure.in: Add asprintf and vasprintf to AC_CHECK_DECLS. * config.in, configure: Regenerate.
2015-07-28Automatic date update in version.inGDB Administrator1-1/+1
2015-07-27Regenerate configure filesH.J. Lu2-2/+6
bfd/ * configure: Regenerated. binutils/ * configure: Regenerated. gas/ * configure: Regenerated. gold/ * configure: Regenerated. gprof/ * configure: Regenerated. ld/ * configure: Regenerated. opcodes/ * configure: Regenerated.
2015-07-27Fix the address size computation for the MSP430 port.Nick Clifton2-0/+28
* elf32-msp430.c (uses_large_model): New function. (msp430_elf_eh_frame_address_size): New function. (elf_backend_eh_frame_address_size): Define.
2015-07-27[AArch64] Fix extern protected data handlingSzabolcs Nagy2-0/+6
Emit *GLOB_DAT instead of *RELATIVE relocs for protected data in shared objects. This is needed for the fix of glibc bug 17711: https://sourceware.org/bugzilla/show_bug.cgi?id=17711 bfd: PR ld/18705 * elfnn-aarch64.c (elf_backend_extern_protected_data): Define. ld/testsuite: PR ld/18705 * ld-aarch64/protected-data.d: New. * ld-aarch64/protected-data.s: New. * ld-aarch64/aarch64-elf.exp: Add new test.
2015-07-27[ARM] Fix extern protected data handlingSzabolcs Nagy2-0/+6
Emit *GLOB_DAT instead of *RELATIVE relocs for protected data in shared objects. This is needed for the fix of glibc bug 17711: https://sourceware.org/bugzilla/show_bug.cgi?id=17711 bfd: PR ld/18705 * elf32-arm.c (elf_backend_extern_protected_data): Define. ld/testsuite: PR ld/18705 * ld-arm/protected-data.d: New. * ld-arm/protected-data.s: New. * ld-arm/arm-elf.exp: Add new test.
2015-07-27Automatic date update in version.inGDB Administrator1-1/+1
2015-07-26Automatic date update in version.inGDB Administrator1-1/+1
2015-07-25Add missing ChangeLog filesH.J. Lu1-0/+7
2015-07-25Skip missing symbol version section check for executableH.J. Lu1-2/+6
Missing symbol version section is a run-time problem only if it will be referenced dynamically at run-time. We should skip the check for locally defined symbol, which isn't referenced by shared library, when linking executable. bfd/ PR ld/18718 * elflink.c (elf_link_output_extsym): Check symbol version section check only if not linking executable, the symbol is referenced by shared library or not locally defined. ld/testsuite/ PR ld/18718 * ld-elf/pr18718.c: New file. * ld-elf/shared.exp: Run tests for PR ld/18718.
2015-07-25Fix broken -Bsymbolic-functionsAlan Modra6-12/+26
For selected targets. The testcase reveals a number of targets that still need fixing. bfd/ * elf32-arm.c (elf32_arm_final_link_relocate): Use SYMBOLIC_BIND to check if a symbol should be bound symbolically. * elf32-hppa.c (elf32_hppa_check_relocs, elf32_hppa_adjust_dynamic_symbol, elf32_hppa_relocate_section, elf32_hppa_finish_dynamic_symbol): Likewise. * elf32-m68k.c (elf_m68k_check_relocs, elf_m68k_relocate_section): Likewise. * elf32-nios2.c (nios2_elf32_relocate_section, nios2_elf32_check_relocs, allocate_dynrelocs): Likewise. * elf32-tic6x.c (elf32_tic6x_finish_dynamic_symbol, elf32_tic6x_relocate_section): Likewise. ld/testsuite/ * ld-elf/symbolic-func.s, * ld-elf/symbolic-func.r: New test. * ld-elf/elf.exp: Run it.
2015-07-25Automatic date update in version.inGDB Administrator1-1/+1
2015-07-24Correct reloc section nameAlan Modra2-1/+7
* elf.c (_bfd_elf_assign_file_positions_for_non_load): Use .rela prefix for reloc section corresponding to rela section associated with renamed debug section.
2015-07-24bfd_get_section_by_name_if hash chain traversalAlan Modra2-8/+10
This function stops too soon, as I found when the hash chain happened to contain two .debug_macro sections and a .bss section: .debug_macro -> .bss -> .debug_macro * section.c (bfd_get_section_by_name_if): Iterate over entire hash chain.
2015-07-24Automatic date update in version.inGDB Administrator1-1/+1
2015-07-23Fix DT_MIPS_RLD_MAP_REL tag for n64 target and 32-bit host.Joseph Myers2-1/+7
For the case of MIPS n64 target and 32-bit host, the computation of the DT_MIPS_RLD_MAP_REL tag involves sdyn->output_section->vma + sdyn->output_offset (64-bit) being added to b (32-bit host pointer), so losing the high part and resulting in an incorrect DT_MIPS_RLD_MAP_REL tag, and all dynamically linked glibc tests failing for n64. This patch fixes this (spot-tested with glibc tests; however, I don't have a self-contained testcase for this bug). * elfxx-mips.c (_bfd_mips_elf_finish_dynamic_sections) <DT_MIPS_RLD_MAP_REL>: Add target address to host address difference, not to host pointer.
2015-07-23Automatic date update in version.inGDB Administrator1-1/+1
2015-07-22Fix ppc64 ELFv1 assertion failureAlan Modra2-7/+11
Bogus assembly can hit an assertion in opd_entry_value when the symbol referenced by a function descriptor is undefined. Worse, the code after the assert copies unitialised memory to return the code section. This uninitialised pointer can later be dereferencd, possibly causing a linker segmentation fault. * elf64-ppc.c (opd_entry_value): Remove assertion. Instead, return -1 if symbol referenced is not defined. Tidy.
2015-07-22Automatic date update in version.inGDB Administrator1-1/+1
2015-07-21Automatic date update in version.inGDB Administrator1-1/+1
2015-07-20Make binutils abort message GDB friendlyH.J. Lu1-2/+2
We used to generate abort messages like: internal error, aborting at .../bfd/elf64-x86-64.c line 1554 in elf_x86_64_check_relocs We can't cut and paste "file line ???" to GDB. This patch changes those abort messages to internal error, aborting at .../bfd/elf64-x86-64.c:1554 in elf_x86_64_check_relocs so that we can cut and paste "file:???" to GDB. bfd/ * bfd.c (_bfd_abort): Replace " line " with ":" in output message. gas/ * messages.c (as_assert): Replace " line " with ":" in output message. (as_abort): Likewise. ld/ * ldmisc.c (ld_abort): Replace " line " with ":" in output message.
2015-07-20Regen two filesAlan Modra2-0/+5
bfd/ * po/SRC-POTFILES.in: Regenerate. binutils/ * doc/Makefile.in: Regenerate.
2015-07-20Automatic date update in version.inGDB Administrator1-1/+1
2015-07-19Automatic date update in version.inGDB Administrator1-1/+1
2015-07-18Automatic date update in version.inGDB Administrator1-1/+1
2015-07-17[AArch64] Sort TLS reloc types alphabeticallyJiong Wang2-17/+22
2015-07-17Automatic date update in version.inGDB Administrator1-1/+1
2015-07-16[AArch64][3/3] LD support BFD_RELOC_AARCH64_TLSLD_ADR_PREL21Jiong Wang3-1/+31
2015-07-16[AArch64][2/3] GAS support BFD_RELOC_AARCH64_TLSLD_ADR_PREL21Jiong Wang5-0/+30
2015-07-16Automatic date update in version.inGDB Administrator1-1/+1
2015-07-15Automatic date update in version.inGDB Administrator1-1/+1
2015-07-14Automatic date update in version.inGDB Administrator1-1/+1
2015-07-13Automatic date update in version.inGDB Administrator1-1/+1
2015-07-12Automatic date update in version.inGDB Administrator1-1/+1
2015-07-11Automatic date update in version.inGDB Administrator1-1/+1