aboutsummaryrefslogtreecommitdiff
path: root/bfd
AgeCommit message (Collapse)AuthorFilesLines
2014-09-10daily updateAlan Modra1-1/+1
2014-09-09daily updateAlan Modra1-1/+1
2014-09-08daily updateAlan Modra1-1/+1
2014-09-07daily updateAlan Modra1-1/+1
2014-09-06daily updateAlan Modra1-1/+1
2014-09-05daily updateAlan Modra1-1/+1
2014-09-04daily updateAlan Modra1-1/+1
2014-09-03daily updateAlan Modra1-1/+1
2014-09-02daily updateAlan Modra1-1/+1
2014-09-01daily updateAlan Modra1-1/+1
2014-08-31daily updateAlan Modra1-1/+1
2014-08-30ppc476 patch area size miscalculationAlan Modra2-1/+5
ppc476 sections that end exactly on a page boundary need the workaround applied when a function ends in "bctr", or when pasting together code from multiple sections. The space allocated for the patch area didn't allow for this case, while the code in relocate_section performing the patches did, leading to an assertion failure. * elf32-ppc.c (ppc_elf_relax_section): Fix off by one error.
2014-08-30daily updateAlan Modra1-1/+1
2014-08-29PowerPC64 call lacks nop errorAlan Modra2-4/+16
* elf64-ppc.c (ppc64_elf_relocate_section): Report a different error for calls via a toc adjusting stub without a nop.
2014-08-29Prevent alpha_vms_object_p stopping bfd_check_format_matches scanAlan Modra2-9/+7
Any error other than bfd_error_wrong_format returned from object_p() is effectively a fatal error. * vms-alpha.c (alpha_vma_object_p): Don't return file_truncated error. Remove redundant bfd_set_error.
2014-08-29Report an error for S-records with less than the miniumum sizeAlan Modra2-3/+20
* srec.c (srec_scan): Revert last change. Report an error for S-records with less than the miniumum byte count.
2014-08-29daily updateAlan Modra1-1/+1
2014-08-28Check S-record with 0 sizeH.J. Lu2-1/+6
* srec.c (srec_scan): Return error for 0 size.
2014-08-28daily updateAlan Modra1-1/+1
2014-08-27Use bfd_is_abs_section to check discarded input sectionH.J. Lu3-2/+9
bfd/ PR ld/17306 * elf32-i386.c (elf_i386_convert_mov_to_lea): Use bfd_is_abs_section to check discarded input section. * elf64-x86-64.c (elf_x86_64_convert_mov_to_lea): Likewise. ld/testsuite/ PR ld/17306 * ld-i386/i386.exp (i386tests): Add tests for PR ld/17306. * ld-x86-64/x86-64.exp (x86_64tests): Likewise. * ld-i386/pr17306a.s: New file. * ld-i386/pr17306b.s: Likewise. * ld-x86-64/pr17306a.s: Likewise. * ld-x86-64/pr17306b.s: Likewise.
2014-08-27Don't attach dynamic sections to input from ld --just-symbolsH.J. Lu2-5/+16
bfd/ PR ld/17313 * elflink.c (elf_link_add_object_symbols): Don't attach dynamic sections to input from ld --just-symbols. 2014-08-27 H.J. Lu <hongjiu.lu@intel.com> PR ld/17313 * ld-i386/i386.exp (i386tests): Add tests for PR ld/17313. * ld-x86-64/x86-64.exp (x86_64tests): Likewise.
2014-08-27daily updateAlan Modra1-1/+1
2014-08-26Disambiguate test for relaxation type.DJ Delorie2-2/+7
* elf32-rl78.c (rl78_elf_relax_section): Disambiguate test for relaxation type.
2014-08-26[AArch64] Improve copy relocation support on four absolute relocation typesJiong Wang2-10/+30
2014-08-26 Jiong Wang <jiong.wang@arm.com> bfd/ * elfnn-aarch64.c (elfNN_aarch64_check_relocs): Initialize non_got_ref properly for MOVW_G0/1/2_NC and MOVW_G3. Reject them when linking shared library. (elfNN_aarch64_gc_sweep_hook): Add check on these relocs. ld/testsuite/ * ld-aarch64/copy-relocs-so.s: New test file. * ld-aarch64/copy-relocs-exe.s: Likewise. * ld-aarch64/copy-relocs.d: New expectation file. * ld-aarch64/emit-relocs-264-bad.d: New test file. * ld-aarch64/emit-relocs-266-bad.d: Likewise. * ld-aarch64/emit-relocs-268-bad.d: Likewise. * ld-aarch64/emit-relocs-269-bad.d: Likewise. * ld-aarch64/aarch64-elf.exp: Run new added test.
2014-08-26Fix a typo in the selection pattern for the or1knd cpu.Nick Clifton2-1/+5
* config.bfd: Fix typo in or1knd selection.
2014-08-26daily updateAlan Modra1-1/+1
2014-08-25daily updateAlan Modra1-1/+1
2014-08-24daily updateAlan Modra1-1/+1
2014-08-23daily updateAlan Modra1-1/+1
2014-08-22Fix file-alignment for objcopy for pe-coffKai Tietz2-1/+8
2014-08-22 Kai Tietz <ktietz@redhat.com> PR binutils/11822 * coffcode.h (coff_compute_section_file_positions): Keep FileAlignment valid as set.
2014-08-22Delete redundant struct cie fieldAlan Modra2-5/+8
cie->output_sec is used to when merging CIEs to ensure that only CIEs from the same output section are merged. I noticed an assignment to this field in _bfd_elf_parse_eh_frame, and thought "That's wrong, output_section isn't set properly when _bfd_elf_parse_eh_frame is called from gc-sections code". It turns out that this assignment is premature, and in fact a dead store. find_merged_cie overwrites with the correct value before the field is ever used. On looking a little more it becomes apparent that cie->cie_inf.u.cie.u.sec->output_section holds the same value, so cie->output_sec is redundant. * elf-eh-frame.c (struct cie): Delete "output_sec" field. (cie_eq, cie_compute_hash): Use output_section from cie_inf instead.
2014-08-22Index PowerPC64 linker generated .eh_frame in .eh_frame_hdrAlan Modra5-169/+190
I noticed recently that .eh_frame FDEs generated by the linker for call stubs and .glink weren't being indexed in .eh_frame_hdr, due to bfd_elf_discard_info being run before the linker generated .eh_frame sections were available for parsing. This patch moves code around in elf64-ppc.c and ppc64elf.em to avoid that problem. Another problem fixed here is that --gc-sections parses .eh_frame early, and the existing machinery allows only one go at parsing the .eh_frame sections. That resulted in the linker generated .eh_frame CIEs not being merged and no .eh_frame_hdr index entries for those FDEs. It turns out that all the info from parsing .eh_frame is attached to the section, so order of parsing isn't important, and after parsing sec_info_type being set will prevent a section being parsed again. At least, when parsing doesn't hit an error. So there isn't really any need for "parsed_eh_frame". "merge_cies" is also redundant, which means _bfd_elf_{begin,end}_eh_frame_parsing can also disappear. bfd/ * elf-bfd.h (struct eh_frame_hdr_info): Delete merge_cies and parsed_eh_frames. (_bfd_elf_begin_eh_frame_parsing): Delete. (_bfd_elf_end_eh_frame_parsing): Delete. * elf-eh-frame.c (_bfd_elf_begin_eh_frame_parsing): Delete. (_bfd_elf_end_eh_frame_parsing): Delete. (_bfd_elf_parse_eh_frame): Don't test parsed_eh_frame. Test !info->relocatable in place of merge_cies. * elflink.c (bfd_elf_gc_sections, bfd_elf_discard_info): Adjust. * elf64-ppc.c (glink_eh_frame_cie): Pad to multiple of 8. (ppc64_elf_size_stubs): Likewise pad stub FDE. (ppc64_elf_build_stubs): Move code setting glink .eh_frame to.. (ppc64_elf_size_stubs): ..here and.. (ppc64_elf_finish_dynamic_sections): ..here. ld/ * emultempl/ppc64elf.em (gld${EMULATION_NAME}_after_allocation): Call bfd_elf_discard_info after generating glink .eh_frame. Delete redundant test on ppc64_elf_setup_section_lists status.
2014-08-22daily updateAlan Modra1-1/+1
2014-08-21PowerPC64/BFD: Fix ppc64_elf_set_toc indentationMaciej W. Rozycki2-1/+5
* elf64-ppc.h (ppc64_elf_set_toc): Fix indentation.
2014-08-21bfd/ChangeLogTerry Guo2-6/+42
2014-08-21 Tony Wang <tony.wang@arm.com> * elf32-arm.c (elf32_arm_final_link_relocate): Implement the veneer routine for R_ARM_THM_JUMP19. (arm_type_of_stub): Add conditional clause for R_ARM_THM_JUMP19 (elf32_arm_size_stub): Ditto. ld/testsuite/ChangeLog 2014-08-21 Tony Wang <tony.wang@arm.com> * ld-arm/jump-reloc-veneers-cond.s: New test. * ld-arm/farcall-cond-thumb-arm.s: Ditto. * ld-arm/jump-reloc-veneers-cond-short.d: Expected output for target without a veneer generation. * ld-arm/jump-reloc-veneers-cond-long.d: Expected output for target with a veneer generation. * ld-arm/farcall-cond-thumb-arm.d: Expected output for inter working veneer generation. * ld-arm/arm-elf.exp: Add tests for conditional branch veneer.
2014-08-20Fix PR ld/17277: bogus dynamic relocs and TEXTREL for ARM PC-relative relocsRoland McGrath2-12/+24
bfd/ PR ld/17277 * elf32-arm.c (elf32_arm_check_relocs): Increment P->pc_count for all reloc types with pc_relative set in the howto, not just for R_ARM_REL32 and R_ARM_REL32_NOI. (allocate_dynrelocs_for_symbol): Update comment. (elf32_arm_gc_sweep_hook): For all reloc types with pc_relative set in the howto, set call_reloc_p and may_need_local_target_p but not may_become_dynamic_p; not only for R_ARM_REL32 and R_ARM_REL32_NOI. (elf32_arm_check_relocs): Likewise. ld/testsuite/ PR ld/17277 * ld-arm/pcrel-shared.s: New file. * ld-arm/pcrel-shared.rd: New file. * ld-arm/arm-elf.exp (armelftests_common): Add it.
2014-08-20ARM: Add support for armeb-*-eabi*Will Newton2-1/+5
At the moment it is possible to configure binutils for these triples but the resulting linker defaults to little endian with huge numbers of testsuite failures, which on the face of it does not appear to make much sense. This patch makes the behaviour similar to armeb-elf and the testsuite is clean. bfd/ChangeLog: 2014-08-20 Will Newton <will.newton@linaro.org> * config.bfd: Default armeb-*-eabi* to big endian. ld/ChangeLog: 2014-08-20 Will Newton <will.newton@linaro.org> * configure.tgt: Default armeb-*-eabi* to big endian.
2014-08-20daily updateAlan Modra1-1/+1
2014-08-19Fix --diable-shared --enable-plugins build breakageAlan Modra2-0/+62
Directories that don't use libtool need to add -ldl (on most *nix hosts) to provide dlopen for libbfd. config/ * plugins.m4 (AC_PLUGINS): If plugins are enabled, add -ldl to LIBS via AC_SEARCH_LIBS. gdb/ * acinclude.m4 (GDB_AC_CHECK_BFD): Don't add -ldl. * config.in: Regenerate. sim/ppc/ * configure.ac: Invoke AC_PLUGINS. * config.in: Regenerate. and regen lots of configure files.
2014-08-19daily updateAlan Modra1-1/+1
2014-08-18PowerPC fix for ifunc broken by d1eca1e4Alan Modra3-1/+11
This probably could be fixed by making changes in relocate_section for ifunc, but it's simpler to disable the optimisation for ifunc. * elf64-ppc.c (ppc64_elf_adjust_dynamic_symbol): Don't attempt to use dynrelocs for ifunc. * elf32-ppc.c (ppc_elf_adjust_dynamic_symbol): Similarly.
2014-08-18PR 17287, DT_NEEDED of unneeded libraries affects --as-neededAlan Modra2-1/+8
PR 17287 bfd/ * elflink.c (on_needed_list): Only consider libraries that have been loaded. ld/ * ld.texinfo (--as-needed): Clarify that references from libraries must be from needed libraries. ld/testsuite/ * ld-plugin/needed3.c: New file. * ld-elf/shared.exp: Add needed3 test.
2014-08-18Return error status from bfd_elf_discard_info.Alan Modra5-17/+24
bfd/ * elflink.c (bfd_elf_discard_info): Return int error status. * stabs.c (_bfd_discard_section_stabs): Comment typo fix. * bfd-in.h (bfd_elf_discard_info): Updata prototype. * bfd-in2.h: Regenerate. ld/ * emultempl/aarch64elf.em (gld${EMULATION_NAME}_after_allocation): Handle error status from bfd_elf_discard_info. * emultempl/armelf.em: Likewise. * emultempl/elf32.em: Likewise. * emultempl/hppaelf.em: Likewise. * emultempl/metagelf.em: Likewise. * emultempl/nios2elf.em: Likewise. * emultempl/ppc64elf.em: Likewise. * emultempl/tic6xdsbt.em: Likewise. * emultempl/vms.em: Likewise.
2014-08-18daily updateAlan Modra1-1/+1
2014-08-17daily updateAlan Modra1-1/+1
2014-08-16daily updateAlan Modra1-1/+1
2014-08-15daily updateAlan Modra1-1/+1
2014-08-14Fix for objdump segfault on broken PE executableAlan Modra2-17/+25
* peXXigen.c (pe_print_reloc): Protect against access past end of .reloc section.
2014-08-14Linker part of PR16563 fixAlan Modra2-47/+68
Presents .eh_frame input sections to the optimisation machinery in elf-eh-frame.c in the order they are given by the linker script. PR 16563 bfd/ * elflink.c (bfd_elf_discard_info): Process .eh_frame and .stab in the order they are mapped to output sections. ld/ * ldlang.c (map_head_is_link_order): Rename from stripped_excluded_sections. (lang_clear_os_map): New function, extracted from.. (strip_excluded_output_sections): ..here. * ldlang.h (lang_clear_os_map): Declare. * ldwrite.c (ldwrite): Call lang_clear_os_map. * emultempl/sh64elf.em (sh64_elf_${EMULATION_NAME}_after_allocation): Likewise.
2014-08-14configury changes to make ld plugin support controlled by --enable-pluginsAlan Modra3-32/+43
This also makes --enable-plugins default to on for hosts that can support plugins, so we have consistent lto toolchain support. The ACX_LARGEFILE moves aren't strictly necessary, but are harmless and will be necessary if plugin support is extended to more hosts via libtool's dlopen support. I started down that path then decided it was more work than I was interested in doing. (ACX_LARGEFILE invokes AC_PLUGINS.) config/ * plugins.m4: Test for dlfcn.h or windows.h here to set default for --enable-plugins. Report error if someone tries to enable plugins on a host we don't support. bfd/ * configure.ac: Delete redundant plugin related checks. * configure: Regenerate. binutils/ * configure.ac: Move ACX_LARGEFILE after LT_INIT. * config.in: Regenerate. * configure: Regenerate. gas/ * configure.ac: Move ACX_LARGEFILE after LT_INIT. * config.in: Regenerate. * configure: Regenerate. gprof/ * configure.ac: Move ACX_LARGEFILE after LT_INIT. * configure: Regenerate. * gconfig.in: Regenerate. ld/ * configure.ac: Move AC_PROG_CC and other macros earlier. Delete plugin checks now done in config/plugins.m4. * config.in: Regenerate. * configure: Regenerate.