aboutsummaryrefslogtreecommitdiff
path: root/bfd
AgeCommit message (Collapse)AuthorFilesLines
2005-02-06 * elf-bfd.h (elf_string_from_elf_strtab): Delete macro.Alan Modra4-66/+94
* elf.c (bfd_elf_string_from_elf_section): Expand occurrence of elf_string_from_elf_strtab. (_bfd_elf_setup_group_pointers, bfd_section_from_shdr): Likewise. (bfd_section_from_shdr): For SHT_SYMTAB, load SHT_SYMTAB_SHNDX too if it exists. Don't do the reverse for SHT_SYMTAB_SHNDX. For SHT_STRTAB, check whether the strtab is for symtab or dynsymtab by looking at cached symtab info first, before iterating over headers. For SHT_REL and SHT_RELA, load dynsymtab if needed. * elfcode.h (elf_object_p): Don't load section header stringtab
2005-02-06daily updateAlan Modra1-1/+1
2005-02-062005-02-06 H.J. Lu <hongjiu.lu@intel.com>H.J. Lu3-6/+64
* elf32-i386.c (elf_i386_relocate_section): Disallow R_386_GOTOFF against protected function when building shared library. PR 584 * elf64-x86-64.c (is_32bit_relative_branch): New. (elf64_x86_64_relocate_section): Alllow R_X86_64_PC32 on a protected function symbol when building shared library for 32bit relative branch instruction.
2005-02-06 * elf64-ppc.c (add_symbol_adjust): Don't create fake descriptorAlan Modra2-10/+35
syms when doing a relocatable link. (ppc64_elf_gc_mark_hook): Check that syms are defined before looking at u.def.section. (ppc64_elf_tls_setup): Likewise. (ppc64_elf_edit_opd): Don't use an undefined func desc sym.
2005-02-03 * elf64-ppc.c (struct ppc_link_hash_entry): Add "fake".Alan Modra2-18/+44
(link_hash_newfunc): Clear all locals using memset. (make_fdh): Remove flags param. Always create fake func desc weak. Link the descriptor with the code entry sym. (ppc64_elf_archive_symbol_lookup): Don't return fake syms. (add_symbol_adjust): Adjust make_fdh call. (func_desc_adjust): Likewise. Twiddle any pre-existing fake descriptor to strong undefined if code entry is strong.
2005-02-03bfd/Alan Modra2-6/+13
* elflink.c (bfd_elf_record_link_assignment): Do "provide" symbol lookup here. Set to new before calling bfd_link_repair_undef_list. (elf_smash_syms): Check that u.undef.weak isn't the not_needed bfd. ld/ emultempl/elf32.em (gld${EMULATION_NAME}_find_exp_assignment): Don't look up symbol for etree_provide here.
2005-02-03 * linker.c (_bfd_link_hash_newfunc): Set all local fields.Alan Modra2-1/+7
2005-02-03include/Alan Modra3-0/+27
* bfdlink.h (struct bfd_link_hash_entry): Add u.undef.weak. bfd/ * linker.c (_bfd_generic_link_add_one_symbol): Set u.undef.weak. * elflink.c (elf_smash_syms): Restore symbols that were undefweak before the as-needed lib was loaded. Abort on unexpected refs.
2005-02-02daily updateAlan Modra1-1/+1
2005-02-02 * elflink.c (elf_smash_syms): Expand comments.Alan Modra2-6/+18
(elf_link_add_object_symbols): Only call elf_smash_syms for as-needed dynamic objects.
2005-02-02 * elf64-hppa.c (elf64_hppa_new_dyn_hash_entry): Don't clear everything,Alan Modra2-5/+7
just the fields specific to hppa64.
2005-02-02 * elfxx-ia64.c (elfNN_ia64_new_elf_hash_entry): Don't clearAlan Modra2-5/+7
everything, just the field specific to ia64.
2005-02-01daily updateAlan Modra1-1/+1
2005-02-01bfd/Alan Modra2-30/+81
* elf64-ppc.c (func_desc_adjust): Move code creating func desc sym to.. (make_fdh): ..here. New function. Don't set BSF_OBJECT for undefined syms. (struct add_symbol_adjust_data): New. (add_symbol_adjust): Make an undefweak func desc for old ABI objects to link with --as-needed shared libs. Return fail status. Don't adjust old ABI func entry sym to weak if func desc syms isn't defined. (ppc64_elf_check_directives): Adjust call to add_symbol_adjust, and return status. ld/testsuite/ * ld-powerpc/tlsso.r: Update. * ld-powerpc/tlstocso.r: Update.
2005-02-01 * cpu-cris.c (get_compatible): Rearrange disabled code and commentHans-Peter Nilsson2-7/+11
for clarity.
2005-02-01include/Alan Modra7-73/+186
* bfdlink.h (bfd_link_repair_undef_list): Declare. bfd/ * elf64-ppc.c (ppc64_elf_check_directives): Move undefs list fixup.. * linker.c (bfd_link_repair_undef_list): ..to new function, but don't remove anything but new and undefweak. * elflink.c (_bfd_elf_link_create_dynamic_sections): Override any existing _DYNAMIC. (_bfd_elf_create_dynamic_sections): Formatting. (bfd_elf_record_link_assignment): Call bfd_link_repair_undef_list. (_bfd_elf_merge_symbol): Don't handle as-needed syms here. (struct elf_smash_data): New. (elf_smash_syms): New function. (elf_link_add_object_symbols): Call elf_smash_syms. Don't add unneeded dynamic objects to loaded list. (elf_link_output_extsym): Don't handle as-needed here. Strip bfd_link_hash_new symbols. * elf32-cris.c (elf_cris_discard_excess_program_dynamics): Don't delref when dynindx is already -1. * elf64-alpha.c (elf64_alpha_output_extsym): Strip bfd_link_hash_new symbols. * elfxx-mips.c (mips_elf_output_extsym): Likewise. ld/ * ld.texinfo: Clarify --as-needed operation.
2005-01-31 * elfxx-target.h (bfd_elfNN_bfd_discard_group): Redefine.Ben Elliston2-0/+8
2005-01-31 * aout-arm.c, aout-target.h, aoutx.h, archive.c, armnetbsd.c,Ben Elliston64-2748/+87
bfd-in.h, bfdio.c, coff-alpha.c, coff-arm.c, coff-h8300.c, coff-i860.c, coff-mcore.c, coff-or32.c, coff-ppc.c, coff-sh.c, coff-sparc.c, coffcode.h, coffgen.c, cofflink.c, cpu-cris.c, cpu-h8500.c, cpu-ns32k.c, ecoff.c, ecofflink.c, elf.c, elf32-dlx.c, elf32-fr30.c, elf32-frv.c, elf32-hppa.c, elf32-i860.c, elf32-ip2k.c, elf32-m32r.c, elf32-sh.c, elf32-v850.c, elf64-mips.c, elf64-sparc.c, elflink.c, i386aout.c, i386msdos.c, i386os9k.c, ieee.c, mach-o.c, nlm32-sparc.c, oasys.c, opncls.c, pdp11.c, pe-mips.c, peXXigen.c, pef.c, peicode.h, reloc.c, riscix.c, section.c, simple.c, som.c, sparclynx.c, targets.c, vms-misc.c, vms-tir.c, xsym.c, doc/chew.c, hosts/delta68.h, hosts/vaxbsd.h: Remove #if 0'd code throughout. Similarly, collapse #if 1'd code.
2005-01-31daily updateAlan Modra1-1/+1
2005-01-31 * elf-bfd.h (bfd_elf_discard_group): Remove.Ben Elliston4-29/+6
* elf.c (bfd_elf_discard_group): Likewise. * elfxx-target.h (bfd_elfNN_bfd_discard_group): Remove macro.
2005-01-31 * elf-bfd.h (elf_backend_data): Add elf_backend_eh_frame_address_size.Richard Sandiford6-5/+112
(_bfd_elf_eh_frame_address_size): Declare. * elfxx-target.h (elf_backend_eh_frame_address_size): Define a default. (elfNN_bed): Initialize elf_backend_eh_frame_address_size. * elfxx-mips.h (_bfd_mips_elf_eh_frame_address_size): Declare. (elf_backend_eh_frame_address_size): Define. * elfxx-mips.c (_bfd_mips_elf_eh_frame_address_size): New function. * elf-eh-frame.c (_bfd_elf_discard_section_eh_frame): Get the address size from the new backend hook. (_bfd_elf_write_section_eh_frame): Likewise. (_bfd_elf_eh_frame_address_size): New function.
2005-01-312005-01-31 Andrew Cagney <cagney@gnu.org>Andrew Cagney2-5/+11
* gettext.m4: Only set ENABLE_NLS when gettext is present.
2005-01-31 * elf32-arm.c (elf32_arm_symbian_special_sections): Do not setMark Mitchell2-4/+15
SHF_WRITE for .init_array, .fini_array, and .preinit_array.
2005-01-31Remove obsolete targetsNick Clifton2-3/+8
2005-01-30daily updateAlan Modra1-1/+1
2005-01-29daily updateAlan Modra1-1/+1
2005-01-28daily updateAlan Modra1-1/+1
2005-01-28 * elf-bfd.h (struct elf_backend_data): Add minpagesize.Daniel Jacobowitz6-3/+25
* elf32-arm.c (ELF_MINPAGESIZE): Define. * elf32-ppc.c (ELF_MINPAGESIZE): Define. * elfcode.h (elf_object_p): Use minpagesize instead of maxpagesize. * elfxx-target.h (ELF_MINPAGESIZE): Default to ELF_MAXPAGESIZE. (elfNN_bed): Include ELF_MINPAGESIZE.
2005-01-28 * bfd/bin-in.h (bfd_elf32_arm_set_target_relocs): Update prototype.Julian Brown4-3/+34
* bfd/bin-in2.h (bfd_elf32_arm_set_target_relocs): Update prototype. * bfd/elf32-arm.c (elf32_arm_link_hash_table): Add fix_v4bx flag. (bfd_elf32_arm_set_target_relocs): Add formal parameter fix_v4bx for passing flag value from ld. Set flag value in global hash table entry. (elf32_arm_final_link_relocate): Add code to implement R_ARM_V4BX relocation. * ld/emultempl/armelf.em (fix_v4bx): New variable. (arm_elf_create_output_section_statements): Communicate fix_v4bx flag value to bfd. (PARSE_AND_LIST_PROLOGUE): Add option token OPTION_FIX_V4BX. (PARSE_AND_LIST_LONGOPTS): Add option --fix-v4bx. (PARSE_AND_LIST_OPTIONS): Add option --fix-v4bx. (PARSE_AND_LIST_ARGS_CASES): Add option OPTION_FIX_V4BX. * ld/NEWS: Mention --fix-v4bx. * ld/ld.texinfo: Document --fix-v4bx.
2005-01-27daily updateAlan Modra1-1/+1
2005-01-272005-01-27 Andrew Cagney <cagney@gnu.org>Andrew Cagney2-2/+6
* gettext.m4: Don't use NONE as a default for CATOBJEXT.
2005-01-26daily updateAlan Modra1-1/+1
2005-01-26 * elf32-arm.c (elf_backend_default_use_rela_p): Define to zero forMark Mitchell2-1/+6
SymbianOS. * emulparams/armsymbian.sh (OTHER_READONLY_SECTIONS): Define, so as to include .ARM.exidx$${Base,Limit}. * ld/scripttempl/armbpabi.sc: Move .plt to end of text segment. Define IMAGE$$ER_RO$${Base,Limit} and SHT$$INIT_ARRAY$${Base,Limit}. Put .init_array, .fini_array, etc. into the read-only data segment.
2005-01-25daily updateAlan Modra1-1/+1
2005-01-25bfd/ChangeLog:Alexandre Oliva5-215/+2550
2004-12-10 Alexandre Oliva <aoliva@redhat.com> * elf32-frv.c (elf32_frv_relocate_section): Force local binding for TLSMOFF. * reloc.c: Add R_FRV_TLSMOFF. * elf32-frv.c (elf32_frv_howto_table): Likewise. (frv_reloc_map, frv_reloc_type_lookup): Map it. (elf32_frv_relocate_section): Handle it. (elf32_frv_check_relocs): Likewise. * libbfd.h, bfd-in2.h: Rebuilt. 2004-11-26 Alexandre Oliva <aoliva@redhat.com> * elf32-frv.c (_frvfdpic_emit_got_relocs_plt_entries): Don't crash when given an undefweak TLS symbol. Fix constant TLS PLT entries such that they return the constant in gr9. (_frvfdpic_relax_tls_entries): Don't crash for undefweak TLS symbols. (_frvfdpic_size_got_plt): Set _cooked_size of dynamic sections. too, such that they shrink on relaxation. (elf32_frvfdpic_finish_dynamic_sections): Check __ROFIXUP_END__ as marking the position right past the _GLOBAL_OFFSET_TABLE_ value. (_frvfdpic_assign_plt_entries): Shrink constant TLS PLT entries if we can guarantee the use of 16-bit constants. 2004-11-10 Alexandre Oliva <aoliva@redhat.com> Introduce TLS support for FR-V FDPIC. * reloc.c: Add TLS relocations. * elf32-frv.c (elf32_frv_howto_table): Add TLS relocations. (elf32_frv_rel_tlsdesc_value_howto): New. (elf32_frv_rel_tlsoff_howto): New. (frv_reloc_map): Add new mappings. (struct frvfdpic_elf_link_hash_table): Add pointer to summary reloc information. (frvfdpic_dynamic_got_plt_info): New. (frvfdpic_plt_tls_ret_offset): New. (ELF_DYNAMIC_INTERPRETER, DEFAULT_STACK_SIZE): Move earlier. (struct _frvfdpic_dynamic_got_info): Likewise. Add TLS members. (struct _frvfdpic_dynamic_got_plt_info): Likewise. (FRVFDPIC_SYM_LOCAL): Regard symbols defined in the absolute section as local. (struct frvfdpic_relocs_info): Add TLS fields. (frvfdpic_relocs_info_hash): Warning clean up. (frvfdpic_relocs_info_find): Initialize tlsplt_entry. (frvfdpic_pic_merge_early_relocs_info): Merge TLS fields. (FRVFDPIC_TLS_BIAS): Define. (tls_biased_base): New. (_frvfdpic_emit_got_relocs_plt_entries): Deal with TLS relocations. (frv_reloc_type_lookup): Likewise. (frvfdpic_info_to_howto_rel): Likewise. (elf32_frv_relocate_section): Likewise. (_frv_create_got_section): Create the PLT section here. (elf32_frvfdpic_create_dynamic_sections): Not here. (_frvfdpic_count_nontls_entries): Move out of... (_frvfdpic_count_got_plt_entries): ... here. (_frvfdpic_count_tls_entries): Likewise. Add TLS support. (_frvfdpic_count_relocs_fixups): Likewise. Add relaxation support. (_frvfdpic_relax_tls_entries): New. (_frvfdpic_compute_got_alloc_data): Add TLS support. (_frvfdpic_get_tlsdesc_entry): New. (_frvfdpic_assign_got_entries): Add TLS support. (_frvfdpic_assign_plt_entries): Likewise. (_frvfdpic_reset_got_plt_entries): New. (_frvfdpic_size_got_plt): Move out of... (elf32_frvfdpic_size_dynamic_sections): ... here. (_frvfdpic_relax_got_plt_entries): New. (elf32_frvfdpic_relax_section): New. (elf32_frvfdpic_finish_dynamic_sections): Add TLS sanity check. (elf32_frv_check_relocs): Add TLS support. (bfd_elf32_bfd_relax_section): Define for FDPIC. * libbfd.h, bfd-in2.h: Rebuilt. cpu/ChangeLog: 2004-11-10 Alexandre Oliva <aoliva@redhat.com> * frv.cpu: Add support for TLS annotations in loads and calll. * frv.opc (parse_symbolic_address): New. (parse_ldd_annotation): New. (parse_call_annotation): New. (parse_ld_annotation): New. (parse_ulo16, parse_uslo16): Use parse_symbolic_address. Introduce TLS relocations. (parse_d12, parse_s12, parse_u12): Likewise. (parse_uhi16): Likewise. Fix constant checking on 64-bit host. (parse_call_label, print_at): New. gas/ChangeLog: * config/tc-frv.c (md_apply_fix3): Mark TLS symbols as such. 2004-12-10 Alexandre Oliva <aoliva@redhat.com> * config/tc-frv.c (frv_pic_ptr): Add tlsmoff support. 2004-11-10 Alexandre Oliva <aoliva@redhat.com> * cgen.c (gas_cgen_parse_operand): Handle CGEN_PARSE_OPERAND_SYMBOLIC. * config/tc-frv.c (md_cgen_lookup_reloc): Handle TLS relocations. (frv_force_relocation): Likewise. Fix handling of PIC relocations. (md_apply_fix3): Likewise. include/elf/ChangeLog: 2004-12-10 Alexandre Oliva <aoliva@redhat.com> * frv.h: Add R_FRV_TLSMOFF. 2004-11-10 Alexandre Oliva <aoliva@redhat.com> * frv.h: Add TLS relocations. include/opcode/ChangeLog: 2004-11-10 Alexandre Oliva <aoliva@redhat.com> * cgen.h (enum cgen_parse_operand_type): Add CGEN_PARSE_OPERAND_SYMBOLIC. ld/testsuite/ChangeLog: * ld-frv/fdpic.exp: Add -mfdpic to ASFLAGS. * ld-frv/tls.exp: Likewise. 2004-11-26 Alexandre Oliva <aoliva@redhat.com> * ld-frv/tls-3.s: New. * ld-frv/tls-static-3.d: New. * ld-frv/tls-dynamic-3.d: New. * ld-frv/tls-pie-3.d: New. * ld-frv/tls-shared-3.d: New. * ld-frv/tls-relax-static-3.d: New. * ld-frv/tls-relax-dynamic-3.d: New. * ld-frv/tls-relax-pie-3.d: New. * ld-frv/tls-relax-shared-3.d: New. * ld-frv/tls.exp: Run the new tests. * ld-frv/tls-dynamic-2.d: Adjust for improved relaxation. * ld-frv/tls-relax-dynamic-2.d: Likewise. * ld-frv/tls-relax-initial-shared-2.d: Likewise. 2004-11-10 Alexandre Oliva <aoliva@redhat.com> * ld-frv/tls-1-dep.s: New. * ld-frv/tls-1-shared.lds: New. * ld-frv/tls-1.s: New. * ld-frv/tls-2.s: New. * ld-frv/tls-dynamic-1.d: New. * ld-frv/tls-dynamic-2.d: New. * ld-frv/tls-initial-shared-2.d: New. * ld-frv/tls-pie-1.d: New. * ld-frv/tls-relax-dynamic-1.d: New. * ld-frv/tls-relax-dynamic-2.d: New. * ld-frv/tls-relax-initial-shared-2.d: New. * ld-frv/tls-relax-pie-1.d: New. * ld-frv/tls-relax-shared-1.d: New. * ld-frv/tls-relax-shared-2.d: New. * ld-frv/tls-relax-static-1.d: New. * ld-frv/tls-shared-1-fail.d: New. * ld-frv/tls-shared-1.d: New. * ld-frv/tls-shared-2.d: New. * ld-frv/tls-static-1.d: New. * ld-frv/tls.exp: New. * ld-frv/fdpic-pie-1.d: Adjust for 64-bit host. * ld-frv/fdpic-pie-2.d: Likewise. * ld-frv/fdpic-pie-6.d: Likewise. * ld-frv/fdpic-pie-7.d: Likewise. * ld-frv/fdpic-pie-8.d: Likewise. * ld-frv/fdpic-shared-1.d: Likewise. * ld-frv/fdpic-shared-2.d: Likewise. * ld-frv/fdpic-shared-3.d: Likewise. * ld-frv/fdpic-shared-4.d: Likewise. * ld-frv/fdpic-shared-5.d: Likewise. * ld-frv/fdpic-shared-6.d: Likewise. * ld-frv/fdpic-shared-7.d: Likewise. * ld-frv/fdpic-shared-8.d: Likewise. * ld-frv/fdpic-shared-local-2.d: Likewise. * ld-frv/fdpic-shared-local-8.d: Likewise. * ld-frv/fdpic-static-1.d: Likewise. * ld-frv/fdpic-static-2.d: Likewise. * ld-frv/fdpic-static-6.d: Likewise. * ld-frv/fdpic-static-7.d: Likewise. * ld-frv/fdpic-static-8.d: Likewise. opcodes/ChangeLog: 2004-11-10 Alexandre Oliva <aoliva@redhat.com> * frv-asm.c: Rebuilt. * frv-desc.c: Rebuilt. * frv-desc.h: Rebuilt. * frv-dis.c: Rebuilt. * frv-ibld.c: Rebuilt. * frv-opc.c: Rebuilt. * frv-opc.h: Rebuilt.
2005-01-25bfd/Alan Modra2-18/+30
* elf.c (_bfd_elf_get_dynamic_reloc_upper_bound): Only include loadable reloc sections. (_bfd_elf_canonicalize_dynamic_reloc): Likewise. (_bfd_elf_get_synthetic_symtab): Return 0 if no dynamic syms. binutils/ * nm.c (display_rel_file): Read dynamic syms before calling bfd_get_synthetic_symtab.
2005-01-25bfd/Alan Modra2-37/+61
* elflink.c (elf_link_add_object_symbols): Don't create link dynamic sections immediately when linking shared libs. Instead, wait until we know a lib is needed. (_bfd_elf_link_create_dynstrtab): Extract from.. (_bfd_elf_link_create_dynamic_sections_): ..here. (elf_add_dt_needed_tag): Call _bfd_elf_link_create_dynstrtab and _bfd_elf_link_create_dynamic_sections. Add abfd param. Allow for non-existent .dynamic. (elf_link_output_extsym): Don't complain about undefined symbols in as-needed dynamic libs that aren't actually linked. ld/ * emultempl/elf32.em (gld${EMULATION_NAME}_try_needed): Formatting. (gld${EMULATION_NAME}_after_open): Ignore needed libs if they were only needed by an as-needed lib that didn't get linked.
2005-01-24daily updateAlan Modra1-1/+1
2005-01-242005-01-24 Andrew Cagney <cagney@gnu.org>Andrew Cagney2-2/+8
* gettext.m4: Only fall back to ../intl/ when it's present.
2005-01-23daily updateAlan Modra1-1/+1
2005-01-22daily updateAlan Modra1-1/+1
2005-01-21daily updateAlan Modra1-1/+1
2005-01-21 * aout-encap.c: Remove unused file.Ben Elliston2-239/+4
2005-01-20daily updateAlan Modra1-1/+1
2005-01-19daily updateAlan Modra1-1/+1
2005-01-192005-01-19 H.J. Lu <hongjiu.lu@intel.com>H.J. Lu2-1/+12
PR 679 * elflink.c (_bfd_elf_dynamic_symbol_p): Only protected non-function symbols are local. (_bfd_elf_symbol_refs_local_p): Likewise.
2005-01-18daily updateAlan Modra1-1/+1
2005-01-18bfd/Alan Modra3-3/+8
* bfd.c (bfd_link_just_syms): Add abfd param. * bfd-in2.h: Regenerate. ld/ * ldlang.c (section_already_linked): Adjust bfd_link_just_syms call. (lang_place_orphans): Don't abort on just_syms_flag, instead call bfd_link_just_syms.
2005-01-17daily updateAlan Modra1-1/+1
2005-01-17 * elf-eh-frame.c (skip_cfa_op, skip_non_nops): New functions.Richard Sandiford2-4/+128
(_bfd_elf_discard_section_eh_frame): Use them to interpret the CFA instructions. If the amount of padding is known, reduce the size of the CIE or FDE by that amount.