aboutsummaryrefslogtreecommitdiff
AgeCommit message (Collapse)AuthorFilesLines
2015-02-11Correct logic for "defined by object"Alan Modra2-4/+7
The old code missed testing bfd_link_hash_undefweak, and wrongly excluded bfd_link_hash_common symbols. It is also clearer to invert the set of enum bfd_link_hash_type values tested. bfd_link_hash_indirect and bfd_link_hash_warning will never appear here. * ldexp.c (update_definedness): Correct logic setting by_object.
2015-02-11Move support code for linker script DEFINED to ldexp.cAlan Modra6-93/+116
This moves support code for DEFINED to ldexp.c where it is used, losing the lang_ prefix on identifiers. Two new functions are needed to initialize and clean up to hash table, but other than that there are no functional changes here. * ldexp.c (struct definedness_hash_entry, definedness_table) (definedness_newfunc, symbol_defined, update_definedness): Move and rename from.. * ldlang.h (struct lang_definedness_hash_entry): ..here,.. * ldlang.c (lang_definedness_table, lang_definedness_newfunc) (lang_symbol_defined, lang_update_definedness): ..and here. * ldexp.c (ldexp_init, ldexp_finish): New functions, extracted from.. * ldlang.c (lang_init, lang_finish): ..here. * ldexp.h (ldexp_init, ldexp_finish): Declare. * ldlang.h (lang_symbol_defined, lang_update_definedness): Delete. * ldmain.c (main): Call ldexp_init and ldexp_finish.
2015-02-11[GOLD] Fix powerpc overflow checkCary Coutant2-1/+8
* powerpc.cc (Target_powerpc::relocate): Fix overflow check.
2015-02-11Set ppc COMMONPAGESIZE to 64kRichard Henderson3-2/+7
bfd/ * elf32-ppc.c (ELF_COMMONPAGESIZE): Set to 64k. * elf64-ppc.c (ELF_COMMONPAGESIZE): Likewise.
2015-02-11Display DW_LANG_C11 as (C11).Mark Wielaard2-1/+5
* dwarf.c (read_and_display_attr_value): Change display name of DW_LANG_C11 from (ANSI C11) to (C11).
2015-02-11PowerPC register numbers in DWARFAlan Modra4-3/+47
This makes gas .cfi output to .debug_frame match register numbering emitted by gcc. md_reg_eh_frame_to_debug_frame follows the ABI, targets not using it, notably Linux, don't. * config/tc-ppc.h (md_reg_eh_frame_to_debug_frame): Match current gcc behaviour. * config/te-aix.h: New file. * configure.tgt: Use em=aix for powerpc-aix.
2015-02-11Set bfd_error in _bfd_elf_adjust_dynamic_copyAlan Modra2-0/+5
PR 15228 * elflink.c (_bfd_elf_adjust_dynamic_copy): Call bfd_set_error.
2015-02-11Copy relocations against protected symbolsAlan Modra29-28/+76
Copy relocs are used in a scheme to avoid dynamic text relocations in non-PIC executables that refer to variables defined in shared libraries. The idea is to have the linker define any such variable in the executable, with a copy reloc copying the initial value, then have both the executable and shared library refer to the executable copy. If the shared library defines the variable as protected then we have two copies of the variable being used. PR 15228 * elflink.c (_bfd_elf_adjust_dynamic_copy): Add "info" param. Error on copy relocs against protected symbols. (elf_merge_st_other): Set h->protected_def. * elf-bfd.h (struct elf_link_hash_entry): Add "protected_def". (_bfd_elf_adjust_dynamic_copy): Update prototype. * elf-m10300.c (_bfd_mn10300_elf_adjust_dynamic_symbol): Update _bfd_elf_adjust_dynamic_copy call. * elf32-arm.c (elf32_arm_adjust_dynamic_symbol): Likewise. * elf32-cr16.c (_bfd_cr16_elf_adjust_dynamic_symbol): Likewise. * elf32-cris.c (elf_cris_adjust_dynamic_symbol): Likewise. * elf32-hppa.c (elf32_hppa_adjust_dynamic_symbol): Likewise. * elf32-i370.c (i370_elf_adjust_dynamic_symbol): Likewise. * elf32-i386.c (elf_i386_adjust_dynamic_symbol): Likewise. * elf32-lm32.c (lm32_elf_adjust_dynamic_symbol): Likewise. * elf32-m32r.c (m32r_elf_adjust_dynamic_symbol): Likewise. * elf32-m68k.c (elf_m68k_adjust_dynamic_symbol): Likewise. * elf32-metag.c (elf_metag_adjust_dynamic_symbol): Likewise. * elf32-or1k.c (or1k_elf_adjust_dynamic_symbol): Likewise. * elf32-ppc.c (ppc_elf_adjust_dynamic_symbol): Likewise. * elf32-s390.c (elf_s390_adjust_dynamic_symbol): Likewise. * elf32-sh.c (sh_elf_adjust_dynamic_symbol): Likewise. * elf32-tic6x.c (elf32_tic6x_adjust_dynamic_symbol): Likewise. * elf32-tilepro.c (tilepro_elf_adjust_dynamic_symbol): Likewise. * elf32-vax.c (elf_vax_adjust_dynamic_symbol): Likewise. * elf64-ppc.c (ppc64_elf_adjust_dynamic_symbol): Likewise. * elf64-s390.c (elf_s390_adjust_dynamic_symbol): Likewise. * elf64-sh64.c (sh64_elf64_adjust_dynamic_symbol): Likewise. * elf64-x86-64.c (elf_x86_64_adjust_dynamic_symbol): Likewise. * elfnn-aarch64.c (elfNN_aarch64_adjust_dynamic_symbol): Likewise. * elfxx-mips.c (_bfd_mips_elf_adjust_dynamic_symbol): Likewise. * elfxx-sparc.c (_bfd_sparc_elf_adjust_dynamic_symbol): Likewise. * elfxx-tilegx.c (tilegx_elf_adjust_dynamic_symbol): Likewise.
2015-02-11Use autoconf check for long long in binutilsAlan Modra7-25/+356
* configure.ac: Check for long long and sizes of long long and long. * elfcomm.h (HOST_WIDEST_INT): Test HAVE_LONG_LONG in place of __STDC_VERSION__ and __GNUC__. * strings.c (print_strings): Likewise. * dwarf.c (DWARF_VMA_FMT, DWARF_VMA_FMT_LONG): Likewise. * configure: Regenerate. * config.in: Regenerate.
2015-02-11Don't return DW_AT_name for function name in C++Alan Modra4-153/+228
DW_AT_name for functions typically just contains the base function name, so lacks namespace, class and parameter information. It would be possible to extract all these from the DWARF, but at a considerable complication of the parser in dwarf2.c, and then you'd need to mangle it all together. Much simpler is to look up the actual symbol. This patch does that, avoiding the extra symbol lookup when the language doesn't do name mangling. PR 17541 * dwarf2.c (struct comp_unit): Add "lang". (non_mangled): New function. (struct funcinfo): Add "is_linkage". Reorder for better packing. Make "name" a const char*. (lookup_address_in_function_table): Delete functionname_ptr param. (find_abstract_instance_name): Add is_linkage param. Set if we have DW_AT_linkage_name or non_mangled DW_AT_name. (scan_unit_for_symbols): Similarly set func->is_linkage. (parse_comp_unit): Stash DW_AT_language. (comp_unit_find_nearest_line): Replace functionname_ptr param with function_ptr param. (_bfd_dwarf2_find_nearest_line): Adjust above calls. Set functionname_ptr from function->name. Call _bfd_elf_find_function to retrieve symbol for function if not linkage name. (_bfd_elf_find_function): Add bfd_target_elf_flavour test, moved from.. * elf.c (elf_find_function): ..here. (_bfd_elf_find_nearest_line): Adjust calls. * elf-bfd.h (_bfd_elf_find_function): Declare.
2015-02-11Don't sort ld -r relocs for mipsAlan Modra8-22/+67
HI16/LO16 are deliberately put adjacent, which might mean relocs are then not sorted by r_offset. See tc-mips.c:mips_frob_file. Don't undo the HI16/LO16 sorting. PR 17666 * elf-bfd.h (struct elf_backend_data): Add sort_relocs_p. * elfxx-target.h (elf_backend_sort_relocs_p): Define. (elfNN_bed): Init new field. * elflink.c (elf_link_adjust_relocs): Conditionally sort. (bfd_elf_final_link): Control sorting of relocs. * elfxx-mips.c (_bfd_mips_elf_sort_relocs_p): New function. * elfxx-mips.h (_bfd_mips_elf_sort_relocs_p): Declare. * elf32-mips.c (elf_backend_sort_relocs_p): Define. * elf64-mips.c (elf_backend_sort_relocs_p): Define.
2015-02-11ppc64_elf_edit_opd revamp, take 2Alan Modra2-16/+4
Now that ld -r relocs are sorted by the pr17666 fix, there isn't so much need to sort incoming relocs. * elf64-ppc.c (sort_r_offset): Delete. (ppc64_elf_edit_opd): Don't sort input relocs.
2015-02-11Sort relocs output by ld -rAlan Modra7-8/+183
bfd/ PR 17666 * elflink.c: Include bfd_stdint.h. (cmp_ext32l_r_offset, cmp_ext32b_r_offset, cmp_ext64l_r_offset, cmp_ext64b_r_offset): New functions. (elf_link_adjust_relocs): Sort relocs. Free reloc hashes after sorting invalidates. ld/testsuite/ * ld-powerpc/vxworks-relax.rd: Update for reloc sorting. * ld-powerpc/vxworks-relax-2.rd: Likewise. * ld-sh/sh64/reldl32.rd: Likewise. * ld-sh/sh64/reldl64.rd: Likewise.
2015-02-11ppc64_elf_edit_opd revampAlan Modra2-128/+165
This patch sorts .opd relocs (see pr17666) and allows .opd sections with a mix of 16 and 24 byte entries to be edited. * elf64-ppc.c (OPD_NDX): Define. Use throughout for sizing/indexing _opd_sec_data array, halving required memory. (sort_r_offset): New function. (ppc64_elf_edit_opd): Sort incoming relocs. Accept .opd sections with a mix of 16 and 24 byte OPD entries. Don't attempt to honour --non-overlapping-opd for .opd sections with unexpected relocs. Simplify opd entry size calculations by first finding the reloc for the next entry. Make edit loop handle one opd entry per iteration, with an inner loop handling relocs per entry.
2015-02-11dwarf.c handle new DWARFv5 C11, C++11 and C++14 DW_LANG constants.Mark Wielaard2-0/+10
binutils/ChangeLog * dwarf.c (read_and_display_attr_value): Handle DW_LANG_C11, DW_LANG_C_plus_plus_11 and DW_LANG_C_plus_plus_14.
2015-02-11Recognize new DWARFv5 C11, C++11 and C++14 DW_LANG constants.Mark Wielaard2-0/+11
include/ChangeLog * dwarf2.h: Add DW_LANG_C_plus_plus_11, DW_LANG_C11 and DW_LANG_C_plus_plus_14.
2015-02-11Automatic date update in version.inGDB Administrator1-1/+1
2015-02-10Automatic date update in version.inGDB Administrator1-1/+1
2015-02-09Automatic date update in version.inGDB Administrator1-1/+1
2015-02-08Automatic date update in version.inGDB Administrator1-1/+1
2015-02-07Automatic date update in version.inGDB Administrator1-1/+1
2015-02-06Automatic date update in version.inGDB Administrator1-1/+1
2015-02-05Automatic date update in version.inGDB Administrator1-1/+1
2015-02-04Automatic date update in version.inGDB Administrator1-1/+1
2015-02-03Automatic date update in version.inGDB Administrator1-1/+1
2015-02-02Automatic date update in version.inGDB Administrator1-1/+1
2015-02-01Automatic date update in version.inGDB Administrator1-1/+1
2015-01-31Automatic date update in version.inGDB Administrator1-1/+1
2015-01-30Automatic date update in version.inGDB Administrator1-1/+1
2015-01-29Automatic date update in version.inGDB Administrator1-1/+1
2015-01-28[ARM] Backport vcmp/vcmpe should accept #0x0 as an operandJiong Wang6-9/+38
gas/ 2015-01-28 Matthew Wahab <matthew.wahab@arm.com> * config/tc-arm.c (parse_ifimm_zero): Accept #0x0 as a synonym for #0, restoring previous behaviour. testsuite/ 2015-01-28 Matthew Wahab <matthew.wahab@arm.com> * gas/arm/ual-vcmp.s: Add vcmp, vcmpe with #0x0 operand. * gas/ual/vcmp.d: Update expected output. * gas/ual/vcmp-zero-bad.l: Likewise
2015-01-28Automatic date update in version.inGDB Administrator1-1/+1
2015-01-27Automatic date update in version.inGDB Administrator1-1/+1
2015-01-26Automatic date update in version.inGDB Administrator1-1/+1
2015-01-25Automatic date update in version.inGDB Administrator1-1/+1
2015-01-24Automatic date update in version.inGDB Administrator1-1/+1
2015-01-23Automatic date update in version.inGDB Administrator1-1/+1
2015-01-22Backport from master:Terry Guo6-1/+34
bfd/ChangeLog: 2015-01-22 Thomas Preud'homme <thomas.preudhomme@arm.com> Backport from mainline 2015-01-13 Thomas Preud'homme <thomas.preudhomme@arm.com> * elfnn-aarch64.c (elfNN_aarch64_final_link_relocate): Use SYMBOLIC_BIND to check if a symbol should be bound symbolically. ld/testsuite/ChangeLog: 2015-01-22 Thomas Preud'homme <thomas.preudhomme@arm.com> Backport from mainline 2015-01-13 Thomas Preud'homme <thomas.preudhomme@arm.com> * ld-aarch64/aarch64-elf.exp: Added relocs-257-symbolic-func test. * ld-aarch64/relocs-257-symbolic-func.d: New file. * ld-aarch64/relocs-257-symbolic-func.s: Likewise.
2015-01-22Automatic date update in version.inGDB Administrator1-1/+1
2015-01-21Automatic date update in version.inGDB Administrator1-1/+1
2015-01-19Backport from master:Chung-Lin Tang2-0/+6
Define elf_backend_default_execstack as 0 for Nios II.
2015-01-20Automatic date update in version.inGDB Administrator1-1/+1
2015-01-19Automatic date update in version.inGDB Administrator1-1/+1
2015-01-18Automatic date update in version.inGDB Administrator1-1/+1
2015-01-17Automatic date update in version.inGDB Administrator1-1/+1
2015-01-16Automatic date update in version.inGDB Administrator1-1/+1
2015-01-15Automatic date update in version.inGDB Administrator1-1/+1
2015-01-14Automatic date update in version.inGDB Administrator1-1/+1
2015-01-13Automatic date update in version.inGDB Administrator1-1/+1
2015-01-12Automatic date update in version.inGDB Administrator1-1/+1