aboutsummaryrefslogtreecommitdiff
path: root/bfd
AgeCommit message (Collapse)AuthorFilesLines
2010-02-10daily updateAlan Modra1-1/+1
2010-02-09daily updateAlan Modra1-1/+1
2010-02-092010-02-09 Tristan Gingold <gingold@adacore.com>Tristan Gingold2-0/+11
* mach-o.c (bfd_mach_o_canonicalize_one_reloc): Adjust addend for non-external relocation.
2010-02-09 * elf64-ppc.c (merge_got_entries): Move earlier in file.Alan Modra2-40/+76
(allocate_dynrelocs): Merge got entries here if not doing multi-toc. (ppc64_elf_size_dynamic_sections): Similarly merge tlsld_got. (ppc64_elf_layout_multitoc): Don't resize if we have already merged got entries.
2010-02-09bfd/Martin Schwidefsky3-0/+159
2010-02-09 Michael Holzheu <holzheu@de.ibm.com> * elf-bfd.h (elfcore_write_s390_timer, elfcore_write_s390_todcmp, elfcore_write_s390_todpreg, elfcore_write_s390_ctrs, elfcore_write_s390_prefix): New. * elf.c (elfcore_write_s390_timer, elfcore_write_s390_todcmp, elfcore_write_s390_todpreg, elfcore_write_s390_ctrs, elfcore_write_s390_prefix): New. (elfcore_grok_note): Handle NT_S390_TIMER, NT_S390_TODCMP, NT_S390_TODPREG, NT_S390_CTRS and NT_S390_PREFIX. (elfcore_write_register_note): Handle .reg-s390-timer, .reg-s390-todcmp, .reg-s390-todpreg, .reg-s390-ctrs, .reg-s390-prefix section. binutils/ 2010-02-09 Michael Holzheu <holzheu@de.ibm.com> * readelf.c (get_note_type): Handle NT_S390_TIMER, NT_S390_TODCMP, NT_S390_TODPREG, NT_S390_CTRS and NT_S390_PREFIX. include/elf/ 2010-02-09 Michael Holzheu <holzheu@de.ibm.com> * common.h (NT_S390_TIMER, NT_S390_TODCMP, NT_S390_TODPREG, NT_S390_CTRS and NT_S390_PREFIX): Define.
2010-02-09 * elf64-ppc.c (has_small_toc_reloc): Don't define.Alan Modra2-10/+20
(makes_toc_func_call, call_check_in_progress): Shuffle flags. (struct ppc64_elf_obj_tdata): Add has_small_toc_reloc. Update code setting the flag. (ppc64_elf_next_toc_section): Group big-toc sections in 0x80008000 chunks.
2010-02-09 * elf64-ppc.c (ppc64_elf_layout_multitoc): Don't merge local got ents.Alan Modra2-41/+19
2010-02-09 * elf64-ppc.c (struct got_entry): Make tls_type and is_indirectAlan Modra2-24/+30
unsigned char. Update variables and code using them throughout file. (struct ppc_link_hash_entry): Likewise for tls_mask.
2010-02-08daily updateAlan Modra1-1/+1
2010-02-08include/David S. Miller8-61/+565
* elf/sparc.h (R_SPARC_JMP_IREL, R_SPARC_IRELATIVE): Define. bfd/ * reloc.c (BFD_RELOC_SPARC_JMP_IREL): New. (BFD_RELOC_SPARC_IRELATIVE): Likewise. * bfd-in2.h: Regenerate. * libbfd.h: Regenerate. * elfxx-sparc.h (_bfd_sparc_elf_link_hash_table): Add loc_hash_table and loc_hash_memory. (_bfd_sparc_elf_link_hash_table_free): Declare. * elf32-sparc.c (elf32_sparc_add_symbol_hook): New. (elf_backend_add_symbol_hook, elf_backend_post_process_headers, bfd_elf32_bfd_link_hash_table_free): Define. * elf64-sparc.c (elf64_sparc_add_symbol_hook): Set has_ifunc_symbols if STT_GNU_IFUNC. (bfd_elf64_bfd_link_hash_table_free): Define. (elf_backend_post_process_headers): Define always. * elfxx-sparc.c (sparc_jmp_irel_howto, sparc_irelative_howto): New. (sparc_reloc_map): Add entries for new IFUNC relocs. (_bfd_sparc_elf_reloc_type_lookup): Handle new IFUNC relocs. (_bfd_sparc_elf_info_to_howto_ptr): Likewise. (elf_sparc_local_htab_hash, elf_sparc_local_htab_eq, elf_sparc_get_local_sym_hash): New. (_bfd_sparc_elf_create_dynamic_sections): Move PLT ops initialization from here... (_bfd_sparc_elf_link_hash_table_create): ... to here. Allocate local hash table. (_bfd_sparc_elf_link_hash_table_free): New. (create_ifunc_sections): New. (_bfd_sparc_elf_check_relocs): Unconditionally assign htab->elf.dynobj and call create_ifunc_sections(). For local STT_GNU_IFUNC symbols cons up a fake local hash table entry for it. Unconditionally add a PLT refcount for STT_GNU_IFUNC symbols when h->def_regular. Count dyn relocs for ifunc. (_bfd_sparc_elf_adjust_dynamic_symbol): Handle ifunc. (allocate_dynrelocs): Unconditionally emit a PLT entry when STT_GNU_IFUNC and h->def_regular. Count GOT dyn relocs for ifunc. (allocate_local_dynrelocs): New function. (_bfd_sparc_elf_size_dynamic_sections): Invoke it over the local hash table. Emit dynamic relocs to irelplt when not shared. Treat iplt like splt. (_bfd_sparc_elf_relocate_section): Handle ifunc relocations by hand. (_bfd_sparc_elf_finish_dynamic_symbol): Adjust for non-dynamic ifunc plt in iplt/irelplt. ld/testsuite/ * ld-ifunc/ifunc.exp: Run for sparc.
2010-02-08bfd/David S. Miller3-151/+138
* elfxx-sparc.h (struct _bfd_sparc_elf_link_hash_table): Remove sgot, srelgot, splt, srelplt, and sgotplt members in favor of generic copies. * elfxx-sparc.c (create_got_section): Delete. (_bfd_sparc_elf_create_dynamic_sections): Don't call, the dynamic section creator does that work for us. Use ->elf.foo instead of ->foo where applicable. (_bfd_sparc_elf_check_relocs): Use ->elf.foo instead of ->foo where applicable. (allocate_dynrelocs): Likewise. (_bfd_sparc_elf_size_dynamic_sections): Likewise. (_bfd_sparc_elf_relocate_section): Likewise. (sparc_vxworks_build_plt_entry): Likewise. (_bfd_sparc_elf_finish_dynamic_symbol): Likewise. (sparc_finish_dyn): Likewise. (sparc_vxworks_finish_exec_plt): Likewise. (sparc_vxworks_finish_shared_plt): Likewise. (_bfd_sparc_elf_finish_dynamic_sections): Likewise. * elfxx-sparc.c (_bfd_sparc_elf_check_relocs): Use the SYMBOL_* macros for visibilty and locality checks. (_bfd_sparc_elf_adjust_dynamic_symbol): Likewise. (allocate_dynrelocs): Likewise. (_bfd_sparc_elf_relocate_section): Likewise. (_bfd_sparc_elf_finish_dynamic_symbol):Likewise. * elfxx-sparc.c (_bfd_sparc_elf_finish_dynamic_symbol): Remove set but never used local var 'dynobj'. * elfxx-sparc.c (_bfd_sparc_elf_adjust_dynamic_symbol): Handle nocopyreloc.
2010-02-08bfd/Richard Sandiford2-4/+13
* xcofflink.c (_bfd_xcoff_bfd_final_link): When calculating max_contents_size, only consider sections whose contents must be swapped in.
2010-02-08 * elf64-ppc.c (allocate_dynrelocs): Remove unused got structs here..Alan Modra2-32/+30
(ppc64_elf_size_dynamic_sections): ..and here.. (merge_got_entries): ..rather than here.
2010-02-08bfd/Alan Modra3-14/+47
* elf64-ppc.c (struct ppc_link_hash_table): Add do_multi_toc. (has_small_toc_reloc): Define. (ppc64_elf_check_relocs): Set the above flags. (ppc64_elf_edit_opd): Delete obfd param. (ppc64_elf_tls_optimize): Likewise. (ppc64_elf_edit_toc): Likewise. (ppc64_elf_tls_setup): Likewise. Add no_multi_toc param. * elf64-ppc.h: Update prototypes. ld/ * emultempl/ppc64elf.em (ppc_before_allocation): Update for changed function parameters.
2010-02-08update copyright dateAlan Modra1-1/+1
2010-02-08 * section.c (struct bfd_section): Delete has_tls_reloc,Alan Modra8-58/+82
has_tls_get_addr_call, has_gp_reloc, need_finalize_relax, reloc_done. Add sec_flg0 thru sec_flg5. (BFD_FAKE_SECTION): Update for changed flags. * ecoff.c (bfd_debug_section): Likewise. * elf32-ppc.c (has_tls_reloc, has_tls_get_addr_call): Define. * elf64-ppc.c (has_tls_reloc, has_tls_get_addr_call): Define. (has_toc_reloc, makes_toc_func_call, call_check_in_progress): Update. * elf32-xtensa.c (reloc_done): Define. * elfxx-ia64.c (skip_relax_pass_0, skip_relax_pass_1): Update. * bfd-in2.h: Regenerate.
2010-02-082010-02-08 Tristan Gingold <gingold@adacore.com>Tristan Gingold2-1/+10
* mach-o.c (bfd_mach_o_canonicalize_one_reloc): Set reloc.r_extern for non-scattered relocations.
2010-02-08bfd/Nathan Sidwell3-64/+40
* elf32-ppc.c (ppc_elf_begin_write_processing): Allow empty apuinfo sections, only scan input sections once and reuse the buffer. ld/testsuite/ * ld-powerpc/apuinfo-nul.s: New. * ld-powerpc/apuinfo.rd: Add it. * ld-powerpc/powerpc.exp: Likewise.
2010-02-08include/Alan Modra4-2/+24
* opcode/ppc.h (PPC_OPCODE_TITAN): Define. bfd/ * archures.c (bfd_mach_ppc_titan): Define. * bfd-in2.h: Regenerate. * cpu-powerpc.c (bfd_powerpc_archs): Add titan entry. opcodes/ * ppc-dis.c (ppc_opts): Add titan entry. * ppc-opc.c (TITAN, MULHW): Define. (powerpc_opcodes): Support AppliedMicro Titan core (APM83xxx). gas/ * config/tc-ppc.c (md_show_usage): Mention -mtitan. Don't use tabs. (ppc_mach): Handle titan. * doc/c-ppc.texi: Mention -mtitan. gas/testsuite/ * gas/ppc/titan.d, * gas/ppc/titan.s: New test. * gas/ppc/ppc.exp: Run it.
2010-02-08 * elf32-ppc.c (ppc_elf_check_relocs): Remove dead ifunc code.Alan Modra2-34/+29
2010-02-07daily updateAlan Modra1-1/+1
2010-02-06daily updateAlan Modra1-1/+1
2010-02-05daily updateAlan Modra1-1/+1
2010-02-05Update Changelog entry to include bug number. Checked in as obvious.Sterling Augustine1-0/+5
2010-02-052010-02-05 Sterling Augustine <sterling@tensilica.com>Sterling Augustine1-0/+16
* elf.c (assign_file_positions_for_load_sections) Update lma of section if necessary.
2010-02-05Remove trailing white spaces.H.J. Lu3-10/+15
2010-02-05 H.J. Lu <hongjiu.lu@intel.com> * elf32-i386.c: Remove trailing white spaces. * elf64-x86-64.c: Likewise.
2010-02-04daily updateAlan Modra1-1/+1
2010-02-04 * elf-bfd.h (emum elf_object_id): Rename to elf_target_id. AddNick Clifton38-634/+1298
entries for other architectures. (struct elf_link_hash_table): Add hash_table_id field. (elf_hash_table_id): New accessor macro. * elflink.c (_bfd_elf_link_hash_table_init): Add target_id parameter. * elf-m10300.c (elf32_mn10300_hash_table): Check table id before returning cast pointer. (elf32_mn10300_link_hash_table_create): Identify new table as containing MN10300 extensions. (mn10300_elf_relax_section): Check pointer returned by elf32_mn10300_hash_table. * elf32-arm.c: Likewise, except using ARM extensions. * elf32-avr.c: Likewise, except using AVR extensions. * elf32-bfin.c: Likewise, except using BFIN extensions. * elf32-cris.c: Likewise, except using CRIS extensions. * elf32-frv.c: Likewise, except using FRV extensions. * elf32-hppa.c: Likewise, except using HPPA32 extensions. * elf32-i386.c: Likewise, except using I386 extensions. * elf32-lm32.c: Likewise, except using LM32 extensions. * elf32-m32r.c: Likewise, except using M32RM extensions. * elf32-m68hc11.c: Likewise, except using M68HC11 extensions. * elf32-m68hc1x.c: Likewise, except using M68HC11 extensions. * elf32-m68hc1x.h: Likewise, except using M68HC11 extensions. * elf32-m68k.c: Likewise, except using M68K extensions. * elf32-microblaze.c: Likewise, except using MICROBLAZE extensions. * elf32-ppc.c: Likewise, except using PPC32 extensions. * elf32-s390.c: Likewise, except using S390 extensions. * elf32-sh.c: Likewise, except using SH extensions. * elf32-spu.c: Likewise, except using SPU extensions. * elf32-xtensa.c: Likewise, except using XTENSA extensions. * elf64-alpha.c: Likewise, except using ALPHA extensions. * elf64-hppa.c: Likewise, except using HPPA64 extensions. * elf64-ppc.c: Likewise, except using PPC64 extensions. * elf64-s390.c: Likewise, except using S390 extensions. * elf64-x86-64.c: Likewise, except using X86_64 extensions. * elfxx-ia64.c: Likewise, except using IA64 extensions. * elfxx-mips.c: Likewise, except using MIPS extensions. * elfxx-sparc.c: Likewise, except using SPARC extensions. * elfxx-sparc.h: Likewise, except using SPARC extensions. * elf32-cr16.c (struct elf32_cr16_link_hash_table): Delete redundant structure. (elf32_cr16_hash_table): Delete unused macro. (elf32_cr16_link_hash_traverse): Delete unused macro. * elf32-score.c: Likewise. * elf32-score7.c: Likewise. * elf32-vax.c: Likewise. * elf64-sh64.c: Likewise. * emultempl/alphaelf.em: Update value expected from elf_object_id. * emultempl/hppaelf.em: Likewise. * emultempl/mipself.em: Likewise. * emultempl/ppc32elf.em: Likewise. * emultempl/ppc64elf.em: Likewise.
2010-02-03daily updateAlan Modra1-1/+1
2010-02-03bfd/Alan Modra3-127/+494
* elf64-ppc.c (struct plt_entry): Move earlier in file. (struct got_entry): Likewise. Add is_indirect and got.ent fields. (struct ppc64_elf_obj_tdata): Change tlsld_got to be a struct got_entry. Update all uses. (struct ppc_link_hash_table): Add got_reli_size and second_toc_pass. Remove no_multi_toc. (update_local_sym_info, ppc64_elf_check_relocs): Clear is_indirect when allocating a new struct got_entry. (allocate_got): New function, extracted from.. (allocate_dynrelocs): ..here. Abort on got entry in non-ppc64 bfd. (ppc64_elf_size_dynamic_sections): Track got relocs allocated in .reliplt by got_reli_size. Set owner on ppc64_tlsld_got entries. (ppc64_elf_setup_section_lists): Remove output_bfd param and no_multi_toc, add add_stub_section and layout_sections_again. Stash new params in htab. Extract some code to.. (ppc64_elf_start_multitoc_partition): ..here. New function. (ppc64_elf_next_toc_section): Check for linker script errors. Handle second pass toc scan. (merge_got_entries, merge_global_got, reallocate_got): New functions. (ppc64_elf_reinit_toc): Rename to.. (ppc64_elf_finish_multitoc_partition): ..this. (ppc64_elf_layout_multitoc): New function. (ppc64_elf_size_stubs): Delete output_bfd, add_stub_section and layout_sections_again params. (ppc64_elf_relocate_section): Handle indirect got entries. * elf64-ppc.h: Update prototypes. Declare new functions. ld/ * emultempl/ppc64elf.em (build_toc_list): Report errors from ppc64_elf_next_toc_section. (after_allocation): Update for changed function names and params. Run second pass of multitoc partitioning.
2010-02-02daily updateAlan Modra1-1/+1
2010-02-02Add NT_386_XSTATE.H.J. Lu3-0/+39
bfd/ 2010-02-02 H.J. Lu <hongjiu.lu@intel.com> * elf-bfd.h (elfcore_write_xstatereg): New. * elf.c (elfcore_grok_xstatereg): New. (elfcore_write_xstatereg): Likewise. (elfcore_grok_note): Handle NT_X86_XSTATE. (elfcore_write_register_note): Handle .reg-xstate section. binutils/ 2010-02-02 H.J. Lu <hongjiu.lu@intel.com> * readelf.c (get_note_type): Handle NT_X86_XSTATE. include/elf/ 2010-02-02 H.J. Lu <hongjiu.lu@intel.com> * common.h (NT_386_XSTATE): New.
2010-02-01daily updateAlan Modra1-1/+1
2010-02-012010-02-01 Tristan Gingold <gingold@adacore.com>Tristan Gingold2-0/+5
* som.c (som_write_ar_hdr): Define this macro.
2010-01-31daily updateAlan Modra1-1/+1
2010-01-30daily updateAlan Modra1-1/+1
2010-01-30 * elf32-hppa.c (final_link_relocate): Convert R_PARISC_TLS_GD21L,Dave Anglin2-4/+15
R_PARISC_TLS_LDM21L and R_PARISC_TLS_IE21L relocations that use the linkage table pointer to use the global table pointer if not doing a shared link.
2010-01-29daily updateAlan Modra1-1/+1
2010-01-29core files: wrong signal number with threaded program on sparc-solaris.Joel Brobecker2-1/+9
* elf.c (elfcore_grok_lwpstatus): Do not overwrite the core signal if it has already been set.
2010-01-28daily updateAlan Modra1-1/+1
2010-01-27daily updateAlan Modra1-1/+1
2010-01-272010-01-27 Tristan Gingold <gingold@adacore.com>Tristan Gingold6-29/+79
* vms.h: Remove trailing spaces. (struct hdr_struct): Remove unused hdr_c_cpr field. (enum file_format_enum): Add comments. * vms.c (vms_bfd_print_private_bfd_data): New function that replaces the macro. Remove trailing spaces. * vms-misc.c: Improve comments. (_bfd_vms_get_object_record): Also handle files without pads. * vms-hdr.c (_bfd_vms_write_dbg): Fix format string. * vms-gsd.c (struct flagdescstruct): Make name field const. (gsyflagdesc): Fix typo.
2010-01-27 PR ld/11217Alan Modra2-7/+28
* elf64-ppc.c (struct ppc_link_hash_table): Add toc_bfd, toc_first_sec. (ppc64_elf_setup_section_lists): Init them. (ppc64_elf_next_toc_section): Don't partition multi-toc between .got and .toc on the same input file. (ppc64_elf_relocate_section): Correct GOT entry offset.
2010-01-26daily updateAlan Modra1-1/+1
2010-01-262010-01-26 Tristan Gingold <gingold@adacore.com>Tristan Gingold17-25/+274
* targets.c (BFD_JUMP_TABLE_ARCHIVE): Add initializer for write_ar_hdr. (bfd_target): Add _bfd_write_ar_hdr_fn field. * archive.c (is_bsd44_extended_name): New macro. (_bfd_generic_read_ar_hdr_mag): Use it. Add extra_size. (bfd_slurp_armap): Also check for "__.SYMDEF" as a BSD4.4 extended name. (_bfd_archive_bsd44_construct_extended_name_table): New function. (_bfd_generic_write_ar_hdr): Ditto. (_bfd_bsd44_write_ar_hdr): Ditto. (_bfd_write_archive_contents): Call _bfd_write_ar_hdr. (bsd_write_armap): Adjust firstreal computation. * libbfd-in.h (struct areltdata): Add extra_size field. (_bfd_generic_write_ar_hdr): Add prototype. (_bfd_bsd44_write_ar_hdr): Ditto. (_bfd_write_ar_hdr): Define. (_bfd_noarchive_write_ar_hdr): Ditto. (_bfd_archive_bsd_write_ar_hdr): Ditto. (_bfd_archive_coff_write_ar_hdr): Ditto. (_bfd_archive_bsd44_slurp_armap): Ditto. (_bfd_archive_bsd44_slurp_extended_name_table): Ditto. (_bfd_archive_bsd44_construct_extended_name_table): New prototype. (_bfd_archive_bsd44_truncate_arname): Ditto. (_bfd_archive_bsd44_write_armap): Ditto. (_bfd_archive_bsd44_read_ar_hdr): Ditto. (_bfd_archive_bsd44_write_ar_hdr): Ditto. (_bfd_archive_bsd44_openr_next_archived_file): Ditto. (_bfd_archive_bsd44_get_elt_at_index): Ditto. (_bfd_archive_bsd44_generic_stat_arch_elt): Ditto. (_bfd_archive_bsd44_update_armap_timestamp): Ditto. * libbfd.h: Regenerate. * oasys.c (oasys_write_ar_hdr): Define. * libecoff.h (_bfd_ecoff_write_ar_hdr): Define. * ieee.c (ieee_write_ar_hdr): Define. * elf64-mips.c (bfd_elf64_archive_write_ar_hdr): Define. * coff-rs6000.c (rs6000coff_vec): Adjust for write_ar_hdr field. (bfd_pmac_xcoff_backend_data): Ditto. * coff64-rs6000.c (rs6000coff64_vec): Ditto. (bfd_xcoff_aix5_backend_data): Ditto. * coff-alpha.c (alpha_ecoff_write_ar_hdr): Define. * aout-target.h (MY_write_ar_hdr): Define it if not defined. * aout-tic30.c (MY_write_ar_hdr): Ditto. * mach-o-target.c (TARGET_NAME): Use _bfd_archive_bsd44 archive. (bfd_mach_o_mkarchive, bfd_mach_o_read_ar_hdr) (bfd_mach_o_slurp_armap, bfd_mach_o_slurp_extended_name_table) (bfd_mach_o_construct_extended_name_table) (bfd_mach_o_truncate_arname, bfd_mach_o_write_armap) (bfd_mach_o_get_elt_at_index, bfd_mach_o_generic_stat_arch_elt) (bfd_mach_o_update_armap_timestamp): Moved to mach-o.c * mach-o.c (bfd_mach_o_mkarchive, bfd_mach_o_read_ar_hdr) (bfd_mach_o_slurp_armap, bfd_mach_o_slurp_extended_name_table) (bfd_mach_o_construct_extended_name_table) (bfd_mach_o_truncate_arname, bfd_mach_o_write_armap) (bfd_mach_o_get_elt_at_index, bfd_mach_o_generic_stat_arch_elt) (bfd_mach_o_update_armap_timestamp): Moved from mach-o-target.c * bfd-in2.h: Regenerate.
2010-01-26Properly check undefined symbols when gc_sections is active.H.J. Lu2-3/+13
bfd/ 2010-01-26 Alan Modra <amodra@gmail.com> H.J. Lu <hongjiu.lu@intel.com> PR ld/11218 * elflink.c (elf_link_output_extsym): Do not ignore undefined symbols with ref_regular set when gc_sections is active. ld/testsuite/ 2010-01-26 H.J. Lu <hongjiu.lu@intel.com> PR ld/11218 * ld-gc/dummy.s: New. * ld-gc/pr11218-1.c: Likewise. * ld-gc/pr11218-2.c: Likewise. * ld-gc/pr11218.d: Likewise.
2010-01-25daily updateAlan Modra1-1/+1
2010-01-25 PR ld/11217Alan Modra5-11/+116
* elf64-ppc.c (ppc64_elf_tls_optimize): Optimize tls sequences with relocations against undefined weak symbols. (ppc64_elf_relocate_section): Don't optimize calls to undefined weak functions if the symbol is dynamic. (ppc64_elf_relocate_section): Edit tprel tls sequences. * elf32-ppc.c (ppc_elf_relocate_section): Likewise. (_bfd_elf_ppc_at_tprel_transform): New function. * bfd-in.h (_bfd_elf_ppc_at_tprel_transform): Declare. * bfd-in2.h: Regenerate.
2010-01-24daily updateAlan Modra1-1/+1
2010-01-23daily updateAlan Modra1-1/+1