summaryrefslogtreecommitdiff
path: root/bfd/elf32-ppc.c
Commit message (Collapse)AuthorAgeFilesLines
* Merge changes between binutils-csl-2_17-branchpoint andJoseph Myers2006-08-221-0/+4
| | | | binutils-2_17, except for the addition of generated files to CVS.
* bfd/ChangeLog:Alexandre Oliva2006-03-171-1/+2
| | | | | | | | | * elf32-ppc.c (ppc_elf_relocate_section): Copy addend from first relocation to the second when relaxing TLS GD to LE; zero it out when relaxing to IE. ld/testsuite/ChangeLog: * ld-powerpc/tls32.s: Verify that +32768 @plt addend is discarded.
* PR 2434Alan Modra2006-03-161-3/+4
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | bfd/ * elflink.c (struct elf_smash_syms_data, elf_smash_syms): Delete. (elf_link_add_object_symbols): Delete unnecessary locals. Rename hash_table -> htab. Formatting. Save entire symbol table before loading as-needed syms, and restore afterwards if lib not needed. Use bfd_hash_allocate rather than bfd_alloc for sym name. Free some buffers earlier. * bfd-in.h (struct bfd_hash_table): Add entsize. (bfd_hash_table_init, bfd_hash_table_init_n): Adjust prototype. * elf-bfd.h (_bfd_elf_link_hash_table_init): Likewise * hash.c (bfd_hash_table_init_n): Add entsize param, save to hash table. (bfd_hash_table_init): Add param, adjust calls. * aoutx.h: Adjust all hash_table_init functions and calls. * bfd.c: Likewise. * coff-arm.c: Likewise. * coff-h8300.c: Likewise. * coff-ppc.c: Likewise. * cofflink.c: Likewise. * ecoff.c: Likewise. * ecofflink.c: Likewise. * elf-m10300.c: Likewise. * elf-strtab.c: Likewise. * elf.c: Likewise. * elf32-arm.c: Likewise. * elf32-bfin.c: Likewise. * elf32-cris.c: Likewise. * elf32-frv.c: Likewise. * elf32-hppa.c: Likewise. * elf32-i386.c: Likewise. * elf32-m32r.c: Likewise. * elf32-m68hc1x.c: Likewise. * elf32-m68k.c: Likewise. * elf32-ppc.c: Likewise. * elf32-s390.c: Likewise. * elf32-sh.c: Likewise. * elf32-vax.c: Likewise. * elf64-alpha.c: Likewise. * elf64-hppa.c: Likewise. * elf64-ppc.c: Likewise. * elf64-s390.c: Likewise. * elf64-sh64.c: Likewise. * elf64-x86-64.c: Likewise. * elfxx-ia64.c: Likewise. * elfxx-mips.c: Likewise. * elfxx-sparc.c: Likewise. * i386linux.c: Likewise. * libaout.h: Likewise. * libbfd-in.h: Likewise. * libcoff-in.h: Likewise. * linker.c: Likewise. * m68klinux.c: Likewise. * merge.c: Likewise. * opncls.c: Likewise. * pdp11.c: Likewise. * sparclinux.c: Likewise. * stabs.c: Likewise. * sunos.c: Likewise. * vms.c: Likewise. * xcofflink.c: Likewise. * section.c (struct section_hash_entry): Move to.. * libbfd-in.h: ..here. * Makefile.am: Run "make dep-am" * Makefile.in: Regenerate. * bfd-in2.h: Regenerate. * libbfd.h: Regenerate. * libcoff.h: Regenerate. binutils/ * ieee.c (write_ieee_debugging_info): Adjust bfd_hash_table_init calls. * wrstabs.c (write_stabs_in_sections_debugging_info): Likewise. ld/ * ldcref.c (add_cref): Adjust bfd_hash_table_init calls. * ldlang.c (output_statement_table_init, lang_init): Likewise. * ldmain.c (add_ysym, add_wrap, add_keepsyms_file): Likewise. (undefined_symbol): Likewise.
* * elf32-ppc.c (ppc_elf_check_relocs): REL24 and REL14 relocsAlan Modra2006-03-151-4/+6
| | | | | | against __GLOBAL_OFFSET_TABLE__ need never be dynamic. Tweak last change to REL32 relocs so that they are counted as possibly dynamic as per REL24 and REL14.
* * elf32-ppc.c (ppc_elf_check_relocs): Don't fall into REL24Alan Modra2006-03-151-1/+3
| | | | checks from REL32.
* bfd/Richard Sandiford2006-03-021-1/+4
| | | | | | | | | | | | | * elf32-ppc.c (is_ppc_elf_target): Return true if the target is bfd_elf32_powerpc_vxworks_vec. ld/testsuite/ * ld-i386/vxworks1.ld (.data): New section. * ld-i386/vxworks1-lib.s: Add a pointer to a local symbol. * ld-i386/vxworks1-lib.rd: Test for the associated reloc. * ld-powerpc/vxworks1.ld (.data): New section. * ld-powerpc/vxworks1-lib.s: Add a pointer to a local symbol. * ld-powerpc/vxworks1-lib.rd: Test for the associated reloc.
* bfd/Richard Sandiford2006-03-021-28/+3
| | | | | | | | | | | | | | | | | | | * elf32-i386.c (elf_i386_create_dynamic_sections): Use elf_vxworks_create_dynamic_sections. (elf_i386_size_dynamic_sections): Remove VxWorks GOT and PLT symbol handling. * elf32-ppc.c (ppc_elf_create_dynamic_sections): Use elf_vxworks_create_dynamic_sections. (ppc_elf_size_dynamic_sections): Remove VxWorks GOT and PLT symbol handling. * elf-vxworks.c (elf_vxworks_create_dynamic_sections): New function. * elf-vxworks.h (elf_vxworks_create_dynamic_sections): Declare. ld/testsuite/ * ld-i386/ld-i386/vxworks1-lib.nd: New test. * ld-i386/i386.exp: Run it. * ld-powerpc/ld-powerpc/vxworks1-lib.nd: New test. * ld-powerpc/powerc.exp: Run it.
* bfd/Richard Sandiford2006-03-021-18/+1
| | | | | | | | | | | | | * elf32-i386.c (elf_i386_vxworks_link_output_symbol_hook): Delete. (elf_backend_link_output_symbol_hook): Use elf_vxworks_link_output_symbol_hook instead. * elf32-ppc.c (elf_i386_vxworks_link_output_symbol_hook): Delete. (elf_backend_link_output_symbol_hook): Use elf_vxworks_link_output_symbol_hook instead. * elf-vxworks.c (elf_vxworks_link_output_symbol_hook): Provide the same interface as elf_backend_link_output_symbol_hook. * elf-vxworks.h (elf_vxworks_link_output_symbol_hook): Update prototype accordingly.
* bfd/Richard Sandiford2006-03-021-56/+64
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * elf32-ppc.c (ppc_elf_plt_type): New enumeration. (ppc_elf_link_hash_table): Replace old_got and new_got with plt_type and can_use_new_plt. (ppc_elf_create_dynamic_sections): Add SEC_HAS_CONTENTS, SEC_LOAD and SEC_READONLY to the VxWorks .plt flags. (ppc_elf_check_relocs): Set can_use_new_plt instead of new_plt. Move from plt_type == PLT_UNSET to PLT_OLD instead of setting old_plt. (ppc_elf_select_plt_layout): Move from plt_type == PLT_UNSET to either plt_type == PLT_OLD or plt_type == PLT_NEW. Assert that this function should not be called for VxWorks targets. (ppc_elf_tls_setup): Use plt_type instead of old_got. (allocate_got): Likewise. Rearrange so that max_before_header is only used for PLT_OLD and PLT_NEW. (allocate_dynrelocs): Use plt_type instead of old_got and is_vxworks. (ppc_elf_size_dynamic_sections): Likewise. (ppc_elf_relax_section): Likewise. (ppc_elf_relocate_section): Likewise. (ppc_elf_finish_dynamic_symbol): Likewise. (ppc_elf_vxworks_link_hash_table_create): Initialize plt_type. ld/ * emulparams/elf32ppccommon.sh: New file, extracted from... * emulparams/elf32ppc.sh: ...here. * emulparams/elf32ppcvxworks.sh: Include elf32ppccommon.sh instead of elf32ppc.sh. (BSS_PLT): Remove override. * Makefile.am (eelf32lppc.c): Depend on elf32ppccommons.h. (eelf32lppcnto.c, eelf32lppcsim.c, eelf32ppcnto.c): Likewise. (eelf32ppc.c, eelf32ppc_fbsd.c, eelf32ppcsimm): Likewise. (eelf32ppclinux.c): Likewise. (eelf32ppcvxworks.c): Likewise. Add missing vxworks.sh dependency. * Makefile.in: Regenerate. ld/testsuite/ * ld-powerpc/vxworks1-lib.s, ld-powerpc/vxworks1-lib.dd, * ld-powerpc/vxworks1-lib.rd, ld-powerpc/vxworks1.s, * ld-powerpc/vxworks1.dd, ld-powerpc/vxworks1.rd, * ld-powerpc/vxworks1.ld, ld-powerpc/vxworks1.sd: New test. * ld-powerpc/powerpc.exp: Run it.
* bfd/Richard Sandiford2006-02-251-18/+11
| | | | | | | | | | | | | | | | | | | * elf-bfd.h (elf_link_hash_table): Add hplt field. * elflink.c (_bfd_elf_create_dynamic_sections): Initialize it. * elf-m10300.c (_bfd_mn10300_elf_create_got_section): Likewise. * elf32-frv.c (_frv_create_got_section): Likewise. * elf32-m32r.c (m32r_elf_create_dynamic_sections): Likewise. * elf32-sh.c (sh_elf_create_dynamic_sections): Likewise. * elf64-alpha.c (elf64_alpha_create_dynamic_sections): Likewise. * elf64-sh64.c (sh64_elf64_create_dynamic_sections): Likewise. * elf32-i386.c (elf_i386_link_hash_table): Remove hgot and hplt. (elf_i386_link_hash_table_create): Don't initialize them. (elf_i386_size_dynamic_sections): Use the generic ELF hplt and hgot fields. (elf_i386_finish_dynamic_symbol): Likewise. * elf32-ppc.c (ppc_elf_link_hash_table): Remove hplt. (ppc_elf_size_dynamic_sections): Use the generic ELF hplt fields. (ppc_elf_finish_dynamic_symbol): Likewise.
* * elf32-ppc.c (allocate_dynrelocs): Tweak undef weak handling.Alan Modra2006-02-171-1/+2
| | | | * elf64-ppc.c (allocate_dynrelocs): Likewise.
* PR ld/2218Alan Modra2006-02-171-13/+12
| | | | | | | * elf64-ppc.c (allocate_dynrelocs): Ensure undef weak sym is dynamic. (ppc64_elf_relocate_section): Check output reloc section size. * elf32-ppc.c (allocate_dynrelocs): Simplify undef weak test.
* * elf32-ppc.c (add_stub_sym): Pass info rather than htab.Alan Modra2005-12-271-11/+18
| | | | | Use different names for pic vs non-pic, '.' instead of '_'. (allocate_dynrelocs): Adjust add_stub_sym call.
* bfd/Alan Modra2005-12-081-1/+91
| | | | | | | | | | | | | | | | | * elf32-ppc.c (struct ppc_elf_link_hash_table): Add emit_stub_syms. (ppc_elf_select_plt_layout): Add emit_stub_syms param, save to htab. (add_stub_sym): New function. (allocate_dynrelocs): Call add_stub_sym. (ppc_elf_size_dynamic_sections): Emit __glink and __glink_PLTresolve when emit_stub_syms. * elf32-ppc.h (ppc_elf_select_plt_layout): Update prototype. ld/ * emultempl/ppc32elf.em (emit_stub_syms): New var. (ppc_after_open): Pass it to ppc_elf_select_plt_layout. (PARSE_AND_LIST_PROLOGUE <OPTION_STUBSYMS>): Define. (PARSE_AND_LIST_LONGOPTS): Add emit-stub-syms. (PARSE_AND_LIST_OPTIONS): Describe emit-stub-syms. (PARSE_AND_LIST_OPTIONS): Handle it.
* PR ld/1540Alan Modra2005-10-251-17/+8
| | | | | | | | | | | | | | | | | | | | | | | | * elf-bfd.h (elf_backend_copy_indirect_symbol): Replace pointer to elf_backend_data with pointer to bfd_link_info. (_bfd_elf_link_hash_copy_indirect): Likewise. * elf.c (_bfd_elf_link_hash_copy_indirect): Likewise. Handle direct and indirect symbols both having dynamic link info. * elf32-arm.c (elf32_arm_copy_indirect_symbol): Likewise. * elf32-hppa.c (elf32_hppa_copy_indirect_symbol): Likewise. * elf32-i386.c (elf_i386_copy_indirect_symbol): Likewise. * elf32-m32r.c (m32r_elf_copy_indirect_symbol): Likewise. * elf32-ppc.c (ppc_elf_copy_indirect_symbol): Likewise. * elf32-s390.c (elf_s390_copy_indirect_symbol): Likewise. * elf32-sh.c (sh_elf_copy_indirect_symbol): Likewise. * elf64-ppc.c (ppc64_elf_copy_indirect_symbol): Likewise. * elf64-s390.c (elf_s390_copy_indirect_symbol): Likewise. * elf64-x86-64.c (elf64_x86_64_copy_indirect_symbol): Likewise. * elfxx-ia64.c (elfNN_ia64_hash_copy_indirect): Likewise. * elfxx-mips.c (_bfd_mips_elf_copy_indirect_symbol): Likewise. * elfxx-sparc.c (_bfd_sparc_elf_copy_indirect_symbol): Likewise. * elflink.c: Adjust all calls to bed->elf_backend_copy_indirect_symbol. * elfxx-mips.h (_bfd_mips_elf_copy_indirect_symbol): Update prototype. * elfxx-sparc.h (_bfd_sparc_elf_copy_indirect_symbol): Likewise.
* * elf32-ppc.c (ppc_elf_fake_sections): Don't set SHF_EXCLUDE onAlan Modra2005-10-241-1/+1
| | | | group sections.
* bfd/Daniel Jacobowitz2005-10-061-2/+4
| | | | | | | | | | | | | | | | | | | | | | | | | | | * elf32-arm.c (elf32_arm_check_relocs): Avoid aliasing warnings from GCC. (elf32_arm_size_dynamic_sections): Likewise. * ecofflink.c (bfd_ecoff_debug_one_external): Likewise. * elf32-hppa.c (elf32_hppa_check_relocs): Likewise. * elf32-m32r.c (m32r_elf_check_relocs): Likewise. * elf32-m68k.c (elf_m68k_check_relocs): Likewise. * elf32-ppc.c (ppc_elf_check_relocs): Likewise. * elf32-s390.c (elf_s390_check_relocs): Likewise. (elf_s390_size_dynamic_sections): Likewise. * elf32-sh.c (sh_elf_check_relocs): Likewise. * elf64-ppc.c (ppc64_elf_check_relocs, dec_dynrel_count) (ppc64_elf_size_dynamic_sections): Likewise. * elf64-s390.c (elf_s390_check_relocs): Likewise. (elf_s390_size_dynamic_sections): Likewise. * elfxx-mips.c (_bfd_mips_elf_finish_dynamic_sections): Likewise. * elfxx-sparc.c (_bfd_sparc_elf_check_relocs): Likewise. (_bfd_sparc_elf_size_dynamic_sections): Likewise. * ieee.c (ieee_slurp_section_data): Likewise. * oasys.c (oasys_slurp_section_data): Likewise. opcodes/ * ppc-dis.c (struct dis_private): Remove. (powerpc_dialect): Avoid aliasing warnings. (print_insn_big_powerpc, print_insn_little_powerpc): Likewise.
* * elf-m10300.c (_bfd_mn10300_elf_adjust_dynamic_symbol): Warn onAlan Modra2005-08-181-0/+7
| | | | | | | | | | | | | | | | | | | | zero size dynamic variables. * elf32-arm.c (elf32_arm_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-m32r.c (m32r_elf_adjust_dynamic_symbol): Likewise. * elf32-m68k.c (elf_m68k_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-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 (elf64_x86_64_adjust_dynamic_symbol): Likewise. * elfxx-sparc.c (_bfd_sparc_elf_adjust_dynamic_symbol): Likewise.
* bfd/Alan Modra2005-08-041-76/+95
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * elf32-ppc.c (struct elf_linker_section): Replace sym_val field with sym. (ppc_elf_relocate_section): Adjust for above. (create_sdata_sym): New function. (ppc_elf_create_linker_section): Call it. (ppc_elf_check_relocs): Correct has_sda_refs and non_got_refs. Create sdata syms for all SDA relocs. (ppc_elf_adjust_dynamic_symbol): Don't special case _SDA_BASE_ and _SDA2_BASE_. (ppc_elf_set_sdata_syms): Delete. * elflink.c (bfd_elf_size_dynamic_sections): Don't create DT_INIT and DT_FINI tags unless associated section has input. (bfd_elf_set_symbol, _bfd_elf_provide_symbol): Delete. (_bfd_elf_provide_section_bound_symbols): Delete. * bfd-in.h (_bfd_elf_provide_symbol): Delete. (_bfd_elf_provide_section_bound_symbols): Delete. * bfd-in2.h: Regenerate. ld/ * ldemul.c (ldemul_do_assignments, do_assignments_default): Delete. * ldemul.h (ldemul_do_assignments, do_assignments_default): Delete. (struct ld_emulation_xfer_struct): Remove do_assignments field. * ldlang.c (lang_do_assignments): Don't call ldemul_do_assignments. * emulparams/elf32ppc.sh (SDATA_START_SYMBOLS): New. (SDATA2_START_SYMBOLS, SBSS_START_SYMBOLS, SBSS_END_SYMBOLS): New. * emultempl/aix.em (ld_*_emulation): Delete do_assignments init. * emultempl/armcoff.em: Likewise. * emultempl/beos.em: Likewise. * emultempl/generic.em: Likewise. * emultempl/gld960.em: Likewise. * emultempl/gld960c.em: Likewise. * emultempl/linux.em: Likewise. * emultempl/lnk960.em: Likewise. * emultempl/m68kcoff.em: Likewise. * emultempl/pe.em: Likewise. * emultempl/sunos.em: Likewise. * emultempl/ticoff.em: Likewise. * emultempl/vanilla.em: Likewise. * emultempl/elf32.em: Likewise. (gld*_provide_bound_symbols): Delete. (gld*_provide_init_fini_syms): Delete. (gld*_before_allocation): Don't call ldemul_do_assignments. * emultempl/ppc32elf.em (ppc_do_assignments): Delete. (LDEMUL_DO_ASSIGNMENTS): Delete. * scripttempl/elf.sc: Provide init/fini syms. Add SBSS_START_SYMBOLS, SBSS_END_SYMBOLS, SDATA2_START_SYMBOLS.
* * elf32-ppc.c (struct ppc_elf_link_hash_table): Remove hgot. UseAlan Modra2005-08-021-23/+22
| | | | elf.hgot throughout file.
* * elf32-ppc.c (ppc_elf_size_dynamic_sections): Correct value ofAlan Modra2005-08-021-3/+6
| | | | _GLOBAL_OFFSET_TABLE_ for > 32k GOT.
* * elf-bfd.h (struct elf_backend_data): Add action_discarded.Alan Modra2005-07-291-0/+16
| | | | | | | | | | | | | | | | | (enum action_discarded): Move from.. * elflink.c (enum action_discarded): ..here. (_bfd_elf_default_action_discarded): Rename from elf_action_discarded. Remove target specific section checks. (elf_link_input_bfd): Adjust. * elfxx-target.h (elf_backend_action_discarded): Define. (elfNN_bed): Init new field. * bfd-in.h (_bfd_elf_default_action_discarded): Declare. * bfd-in2.h: Regenerate. * elf-hppa.h (elf_hppa_action_discarded): New function. * elf32-hppa.c (elf_backend_action_discarded): Define. * elf64-hppa.c (elf_backend_action_discarded): Define. * elf32-ppc.c (ppc_elf_action_discarded): New function. (elf_backend_action_discarded): Define.
* * elflink.c (elf_gc_mark_dynamic_ref_symbol): Handle -shared.Alan Modra2005-07-261-0/+4
| | | | | (bfd_elf_gc_sections): Allow -gc-sections when -shared. * elf32-ppc.c (ppc_elf_gc_sweep_hook): Correct for -shared.
* bfd/Alan Modra2005-07-161-16/+2
| | | | | | | | | | | | | | * elf32-ppc.c (ppc_elf_set_sdata_syms): Return void. Remove hack for zero size sections. Don't set .sbss syms here. * elf32-ppc.h (ppc_elf_set_sdata_syms): Adjust prototype. ld/ * emultempl/elf32.em (gld*_provide_init_fini_syms): Prototype. (gld*_before_allocation): Call ldemul_do_assignments rather than gld*_provide_init_fini_syms directly. * emultempl/ppc32elf.em (gld*_after_allocation): Delete. (ppc_do_assignments): New function. (LDEMUL_AFTER_ALLOCATION): Don't define. (LDEMUL_DO_ASSIGNMENTS): Define.
* bfd/Alan Modra2005-07-141-7/+4
| | | | | | | | | | | | | | | | | | | | | | | | | * bfd-in.h (_bfd_elf_fix_excluded_sec_syms): Declare. (_bfd_elf_provide_section_bound_symbols): Remove param name. Formatting. * bfd-in2.h: Regenerate. * elflink.c (bfd_elf_gc_sections): Don't call generic function. (_bfd_elf_provide_symbol): Formatting. (_bfd_elf_provide_section_bound_symbols): Remove all hacks, just create section relative syms. (fix_syms, _bfd_elf_fix_excluded_sec_syms): New functions. * elf32-ppc.c (ppc_elf_set_sdata_syms): Use _bfd_elf_provide_section_bound_symbols. * reloc.c (bfd_mark_used_section): Delete. (bfd_generic_gc_sections): Don't call the above. ld/ * ldlang.c (strip_excluded_output_sections): Don't call bfd_gc_sections. * emultempl/elf32.em (gld*_provide_bound_symbols): Move. (gld*_provide_init_fini_syms): Move. (gld*_before_allocation): Call the above from here.. (gld*_finish): ..not here. Call _bfd_elf_fix_excluded_sec_syms. * emultempl/hppaelf.em (hppaelf_finish): Likewise. * emultempl/ppc64elf.em (ppc_finish): Likewise.
* * elf32-ppc.c (ppc_elf_set_sdata_syms): Correct __sbss_start value.Alan Modra2005-07-121-4/+3
|
* * elf-hppa.h (elf_hppa_final_link): Use gp val of zero when noneAlan Modra2005-07-081-14/+13
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | of the usual sections are found. * elf-m10300.c (_bfd_mn10300_elf_size_dynamic_sections): Tidy. Strip .dynbss if it is zero size. * elf32-arm.c (elf32_arm_size_dynamic_sections): Likewise. * elf32-cris.c (elf_cris_size_dynamic_sections): Likewise. * elf32-hppa.c (elf32_hppa_size_dynamic_sections): Likewise. * elf32-i370.c (i370_elf_size_dynamic_sections): Likewise, and .dynsbss. (i370_elf_finish_dynamic_sections): Don't attempt to write .got when it is zero size. * elf32-i386.c (elf_i386_size_dynamic_sections): Correct handling of .dynbss and zero size sections. * elf32-m32r.c (m32r_elf_size_dynamic_sections): Strip .dynbss if it is zero size. * elf32-m68k.c (elf_m68k_size_dynamic_sections): Tidy. Strip .dynbss if zero size. * elf32-ppc.c (ppc_elf_size_dynamic_sections): Likewise, .dynsbss too. * elf32-s390.c (elf_s390_size_dynamic_sections): Likewise. * elf32-sh.c (sh_elf_size_dynamic_sections): Likewise. * elf32-vax.c (elf_vax_size_dynamic_sections): Likewise. * elf32-xtensa.c (elf_xtensa_size_dynamic_sections): Tidy. Strip .plt.* and .got.plt.* if zero size. * elf64-alpha.c (elf64_alpha_size_dynamic_sections): Tidy. Strip .got* and .dynbss if zero size. * elf64-hppa.c (elf64_hppa_size_dynamic_sections): Tidy. Strip * elf64-ppc.c (create_linkage_sections): Create branch lookup table in .data.rel.ro.brlt or .rodata.brlt, and similarly for associated reloc section. (create_got_section): Always create new .got and .rela.got sections. (ppc64_elf_size_dynamic_sections): Tidy. Strip .dynbss if zero size. * elf64-s390.c (elf_s390_size_dynamic_sections): Likewise. * elf64-sh64.c (sh64_elf64_size_dynamic_sections): Likewise. * elf64-x86-64.c (elf64_x86_64_size_dynamic_sections): Handle dynamic bss sections correctly. * elfxx-mips.c (_bfd_mips_elf_size_dynamic_sections): Tidy. * elfxx-sparc.c (_bfd_sparc_elf_size_dynamic_sections): Tidy. Strip .dynbss if zero size.
* 2005-07-05 Paul Brook <paul@codesourcery.com>Paul Brook2005-07-051-35/+14
| | | | | | | * elf32-ppc.c (ppc_elf_vxworks_special_sections): Remove. (ppc_elf_vxworks_get_sec_type_attr): New function. (elf_backend_special_sections): Remove vxwords definition. (elf_backend_get_sec_type_attr): Define for vxworks.
* 2005-05-07 Paul Brook <paul@codesourcery.com>Paul Brook2005-07-051-57/+622
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | bfd/ * config.bfd: Add separate case for ppc-vxworks. * configure: Regenerate. * configure.in: Include elf-vxworks.lo on ppc targets. * elf-vxworks.c (elf_vxworks_final_write_processing): Handle .rela.plt.unloaded. * elf32-ppc.c: Add VxWorks target vec. Include elf-vxworks.h. (PLT_ENTRY_SIZE, PLT_INITIAL_ENTRY_SIZE, PLT_SLOT_SIZE): Remove. (VXWORKS_PLT_ENTRY_SIZE, ppc_elf_vxworks_plt_entry, ppc_elf_vxworks_pic_plt_entry, VXWORKS_PLT_INITIAL_ENTRY_SIZE, ppc_elf_vxworks_plt0_entry, ppc_elf_vxworks_pic_plt0_entry, VXWORKS_PLT_NON_JMP_SLOT_RELOCS, VXWORKS_PLTRESOLVE_RELOCS, VXWORKS_PLTRESOLVE_RELOCS_SHLIB): New. (ppc_elf_link_hash_table): Add srelplt2, sgotplt, hgot, hplt, is_vxworks, plt_entry_size, plt_slot_size, plt_initial_entry_size. (ppc_elf_link_hash_table_create): Initialize hadtab plt fields. (ppc_elf_create_got): Create .got.plt for VxWorks. (ppc_elf_create_dynamic_sections): Create unloaded plt relocation section for VxWorks. (ppc_elf_select_plt_layout): Handle VxWorks plt format. (allocate_got): VxWorks does not need a got header. (allocate_dynrelocs): Handle VxWorks plt format. (ppc_elf_size_dynamic_sections): Save _G_O_T_ and _P_L_T_ symbols for VxWorks. Handle VxWorks plt/got. (ppc_elf_finish_dynamic_sections): Fill in VxWorks plt. (ppc_elf_vxworks_special_sections): New. (ppc_elf_vxworks_link_hash_table_create, ppc_elf_vxworks_add_symbol_hook, elf_i386_vxworks_link_output_symbol_hook, ppc_elf_vxworks_final_write_processing): New functions. * targets.c (bfd_elf32_powerpc_vxworks_vec): Declare. (_bfd_target_vector): Use it. gas/ * config/tc-ppc.c (ppc_target_format): Add VxWorks. gas/testsuite/ * gas/ppc/altivec.d: Match all powerpc target vecs. * gas/ppc/booke.d: Ditto. * gas/ppc/e500.d: Ditto. ld/ * Makefile.am (ALL_EMULATIONS): Add eelf32ppcvxworks.o. (eelf32ppcvxworks.o): Add dependencies. * Makefile.in: Regenerate. * configure.tgt: Add entry for powerpc-vxworks. * emulparams/elf32-ppc.c: Mention elf32ppcvxworks.sh in comment. * emulparams/elf32ppcvxworks.sh: New file. * emultempl/ppc32elf.em (bfd_elf32_powerpc_vxworks_vec): Declare. (is_ppc_elf32_vec): New function. (ppc_after_open, ppc_before_allocation, gld${EMULATION_NAME}_after_allocation): Use it.
* * elf.c (special_sections): Move const qualifier.Alan Modra2005-07-051-2/+2
| | | | | | | | | | | | | | | | | | | | | (special_sections_b..special_sections_t): Likewise. * elf32-arm.c (elf32_arm_symbian_get_sec_type_attr): Remove duplicate const. (elf32_arm_symbian_special_sections): Move const qualifier. * elf32-m32r.c: Similarly. * elf32-m68hc11.c: Similarly. * elf32-m68hc12.c: Similarly. * elf32-mcore.c: Similarly. * elf32-ppc.c: Similarly. * elf32-sh64.c: Similarly. * elf32-v850.c: Similarly. * elf32-xtensa.c: Similarly. * elf64-alpha.c: Similarly. * elf64-hppa.c: Similarly. * elf64-ppc.c: Similarly. * elf64-sh64.c: Similarly. * elfxx-ia64.c: Similarly. * elfxx-mips.c: Similarly.
* PR 1004Alan Modra2005-07-041-55/+29
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | bfd/ * elf-bfd.h (struct elf_backend_data): Add get_sec_type_attr. Delete special_sections. (_bfd_elf_get_special_section): Declare. (bfd_elf_special_section): Update prototype. * elf.c (special_sections): Remove unused outer entries. (get_special_section): Delete. (_bfd_elf_get_special_section): New function. (_bfd_elf_get_sec_type_attr): Replace "name" arg with "sec". Update special_sections indexing. (_bfd_elf_new_section_hook): Call backend get_sec_type_attr. * elf32-arm.c (symbian_special_sections_d): Delete. (symbian_special_sections_g, symbian_special_sections_h): Delete. (symbian_special_sections_i, symbian_special_sections_f): Delete. (symbian_special_sections_p): Delete. (elf32_arm_symbian_special_sections): Merge above to here. (elf32_arm_symbian_get_sec_type_attr): New function. (elf_backend_special_sections): Don't define. (elf_backend_get_sec_type_attr): Define. * elf32-m32r.c: Similarly to elf32-arm.c. * elf32-m68hc11.c: Likewise. * elf32-m68hc12.c: Likewise. * elf32-mcore.c: Likewise. * elf32-sh64.c: Likewise. * elf32-v850.c: Likewise. * elf32-xtensa.c: Likewise. * elf64-alpha.c: Likewise. * elf64-hppa.c: Likewise. * elf64-ppc.c: Likewise. * elf64-sh64.c: Likewise. * elfxx-ia64.c: Likewise. * elfxx-mips.c: Likewise. * elf32-ppc.c: Likewise. (bfd_elf_special_section ppc_alt_plt): New. Use it if .plt loadable. * elfxx-mips.h (_bfd_mips_elf_get_sec_type_attr): Declare. (_bfd_mips_elf_special_sections, elf_backend_special_sections): Delete. (elf_backend_get_sec_type_attr): Define. * elfxx-target.h (elf_backend_get_sec_type_attr): Define. (elf_backend_special_sections): Don't define. (elfNN_bed): Update. binutils/ * objcopy.c (copy_object): Use bfd_make_section_with_flags. (write_debugging_info): Likewise. (setup_section): Use bfd_make_section_anyway_with_flags. gas/ * config/obj-elf.c (obj_elf_change_section): Use backend get_sec_type_attr.
* * elf32-ppc.c (ppc_elf_adjust_dynamic_symbol): Ignore dynamicAlan Modra2005-06-301-0/+18
| | | | | | | _SDA_BASE_ and _SDA2_BASE_ symbols. * elflink.c (_bfd_elf_provide_symbol): Correct comment. Define sym if not def_regular. (_bfd_elf_provide_section_bound_symbols): Similarly.
* 2005-06-29 Paul Brook <paul@codesourcery.com>Paul Brook2005-06-291-13/+27
| | | | | | | | | | * bfd-in.h (_bfd_elf_provide_symbol): Update prototype. * bfd-in2.h: Regenerate. * elf32-ppc.c (ppc_elf_set_sdata_syms): Make sdata symbols section relative. * elflink.c (bfd_elf_set_symbol): Add section argument. (_bfd_elf_provide_symbol): Ditto. (_bfd_elf_provide_section_bound_symbols): Pass NULL section argument.
* 2005-06-20 H.J. Lu <hongjiu.lu@intel.com>H.J. Lu2005-06-201-1/+6
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | PR 1025 * elf-m10300.c (mn10300_elf_check_relocs): Handle indirect symbol. * elf32-arm.c (elf32_arm_check_relocs): Likewise. * elf32-avr.c (elf32_avr_check_relocs): Likewise. * elf32-cris.c (cris_elf_check_relocs): Likewise. * elf32-d10v.c (elf32_d10v_check_relocs): Likewise. * elf32-dlx.c (elf32_dlx_check_relocs): Likewise. * elf32-fr30.c (fr30_elf_check_relocs): Likewise. * elf32-frv.c (elf32_frv_check_relocs): Likewise. * elf32-i370.c (i370_elf_check_relocs): Likewise. * elf32-iq2000.c (iq2000_elf_check_relocs): Likewise. * elf32-m32r.c (m32r_elf_check_relocs): Likewise. * elf32-m68hc1x.c (elf32_m68hc11_check_relocs): Likewise. * elf32-m68k.c (elf_m68k_check_relocs): Likewise. * elf32-mcore.c (mcore_elf_check_relocs): Likewise. * elf32-ms1.c (ms1_elf_check_relocs): Likewise. * elf32-msp430.c (elf32_msp430_check_relocs): Likewise. * elf32-openrisc.c (openrisc_elf_check_relocs): Likewise. * elf32-ppc.c (ppc_elf_check_relocs): Likewise. * elf32-s390.c (elf_s390_check_relocs): Likewise. * elf32-sh.c (sh_elf_check_relocs): Likewise. * elf32-v850.c (v850_elf_check_relocs): Likewise. * elf32-vax.c (elf_vax_check_relocs): Likewise. * elf64-mmix.c (mmix_elf_check_relocs): Likewise. * elf64-ppc.c (ppc64_elf_check_relocs): Likewise. * elf64-s390.c (elf_s390_check_relocs): Likewise. * elf64-sh64.c (sh_elf64_check_relocs): Likewise. * elfxx-mips.c (_bfd_mips_elf_check_relocs): Likewise. * elfxx-sparc.c (_bfd_sparc_elf_check_relocs): Likewise.
* * elf32-ppc.c (ppc_elf_check_relocs): For old gcc -fPIC codeAlan Modra2005-05-231-4/+22
| | | | force old plt layout.
* bfd/Daniel Jacobowitz2005-05-201-9/+21
| | | | | | | | | | | | | | | * bfd/elf32-ppc.c (struct ppc_elf_link_hash_entry): Add new field has_sda_refs. (ppc_elf_copy_indirect_symbol): Copy has_sda_refs. (ppc_elf_check_relocs): Set has_sda_refs. (ppc_elf_adjust_dynamic_symbol): Check has_sda_refs before eliminating copy relocations. Use has_sda_refs to place variables in .sbss. (ppc_elf_finish_dynamic_symbol): Use has_sda_refs to place variables in .sbss. ld/testsuite/ * ld-powerpc/sdalib.s, ld-powerpc/sdadyn.s, ld-powerpc/sdadyn.d: New files. * ld-powerpc/powerpc.exp: Run the new test.
* * elf32-ppc.c (allocate_dynrelocs): Correct plt offset assignedAlan Modra2005-05-201-33/+49
| | | | | | | for second and subsequent list entries. Only allocate multiple glink stubs when shared or pie. (ppc_elf_finish_dynamic_symbol): Break out early when only one glink stub is needed.
* * elf-bfd.h (struct elf_link_hash_table): Delete init_refcount andAlan Modra2005-05-191-295/+595
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | init_offset. Add init_got_refcount, init_plt_refcount, init_got_offset and init_plt_offset. * elf.c (_bfd_elf_link_hash_newfunc): Adjust for above change. (_bfd_elf_link_hash_hide_symbol): Likewise. (_bfd_elf_link_hash_table_init): Likewise. * elf32-hppa.c (elf32_hppa_hide_symbol): Likewise. * elf64-ppc.c (ppc64_elf_link_hash_table_create): Likewise. * elflink.c (_bfd_elf_adjust_dynamic_symbol): Likewise. (bfd_elf_size_dynamic_sections): Likewise. * elf32-ppc.c (GLINK_PLTRESOLVE): Now 16 insns. (LWZU_0_X_12, LWZ_0_4_30, LWZ_0_X_12, LWZ_11_X_11, LWZ_11_X_30, LWZ_12_4_12, LWZ_12_8_30, LWZ_12_X_12, SUB_11_11_30): Delete. (ADDIS_12_12, BCL_20_31, LWZU_0_12, LWZ_0_12, LWZ_11_11, LWZ_11_30, LWZ_12_12, MFLR_0, MFLR_12, MTLR_0, SUB_11_11_12): Define. (struct plt_entry): New. (ppc_elf_link_hash_table_create): Set new init_plt fields. (ppc_elf_copy_indirect_symbol): Handle merge of plt plist. Don't use _bfd_elf_link_hash_copy_indirect. (update_plt_info, find_plt_ent): New functions. (ppc_elf_check_relocs): Handle R_PPC_PLTREL24 with non-zero addend and adjust for use of plt list rather than refcount. (ppc_elf_gc_sweep_hook): Likewise. (ppc_elf_tls_optimize): Likewise. (ppc_elf_adjust_dynamic_symbol): Likewise. (allocate_dynrelocs): Likewise. (ppc_elf_relax_section): Likewise. (ppc_elf_relocate_section): Likewise. Adjust R_PPC_PLTREL24 addends when performing a relocatable link. (ppc_elf_finish_dynamic_symbol): Likewise. Write .glink stubs here.. (ppc_elf_finish_dynamic_sections): ..rather than here. Use new pic resolver stub.
* * elf32-ppc.c (LIS_11. LIS_12): Define.Alan Modra2005-05-171-38/+93
| | | | | | (LWZU_0_X_12, LWZ_0_X_12, LWZ_12_4_12, LWZ_12_X_12): Define. (ppc_elf_finish_dynamic_sections): Provide non-pic plt call stub for --data-plt when building non-pie executables.
* include/elf/Alan Modra2005-05-141-10/+11
| | | | | | | | | | | * ppc.h (DT_PPC_GOT): Rename from DT_PPC_GLINK. bfd/ * elf32-ppc.c (ppc_elf_size_dynamic_sections): Set DT_PPC_GOT, not DT_PPC_GLINK. (ppc_elf_finish_dynamic_sections): Likewise. binutils/ * readelf.c (get_ppc_dynamic_type): Display DT_PPC_GOT, not DT_PPC_GLINK.
* * elf32-ppc.c (LWZU_0_X_11): Delete.Alan Modra2005-05-121-38/+82
| | | | | | | | | | | (B, LWZ_11_X_11, LWZ_11_X_30, MTCTR_11): Define. (ppc_elf_select_plt_layout): Set .got flags too. Formatting. (ppc_elf_size_dynamic_sections): Allocate space for .glink branch table. (ppc_elf_finish_dynamic_symbol): Point .plt entries into the branch table. (ppc_elf_finish_dynamic_sections): Adjust DT_PPC_GLINK value. Generate .glink branch table and updated stubs.
* * reloc.c (BFD_RELOC_HI16_PCREL): Define.Alan Modra2005-05-111-60/+359
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | (BFD_RELOC_HI16_S_PCREL, BFD_RELOC_LO16_PCREL): Define. * elf32-ppc.c (GLINK_PLTRESOLVE, GLINK_ENTRY_SIZE): Define. (CROR_151515, CROR_313131): Delete. (ADDIS_11_11, ADDI_11_11, SUB_11_11_30, ADD_0_11_11, ADD_11_0_11, LWZ_0_4_30, MTCTR_0, LWZ_12_8_30, BCTR, ADDIS_11_30, LWZU_0_X_11): Define. (ppc_elf_howto_raw): Add R_PPC_REL16, R_PPC_REL16_LO, R_PPC_REL16_HI and R_PPC_REL16_HA entries. (ppc_elf_reloc_type_lookup): Convert new bfd reloc types. (ppc_elf_addr16_ha_reloc): Also handle R_PPC_REL16_HA. (struct ppc_elf_link_hash_table): Add glink, glink_pltresolve, new_plt, and old_plt. (ppc_elf_create_dynamic_sections): Create .glink section. (ppc_elf_check_relocs): Set new_plt and old_plt. (ppc_elf_select_plt_layout): New function. (ppc_elf_tls_setup): Set plt output section elf type and flags. (allocate_got): Handle differences between old and new got layout. (allocate_dynrelocs): Likewise for plt. (ppc_elf_size_dynamic_sections): Likewise. Allocate memory for .glink. Don't allocate memory for old bss .plt. Emit DT_PPC_GLINK. (ppc_elf_relax_section): Rename ppc_info to htab. Handle .glink destination of R_PPC_PLTREL24 relocs. (ppc_elf_relocate_section): Handle new relocs and changed destination of R_PPC_PLTREL24. (ppc_elf_finish_dynamic_symbol): Init new style plt and handle differences in layout. (ppc_elf_finish_dynamic_sections): Set DT_PPC_GLINK value. Don't put a blrl in new got. Write glink contents. * elf32-ppc.h (ppc_elf_select_plt_layout): Declare. * libbfd.h: Regenerate. * bfd-in2.h: Regenerate.
* 2005-05-07 H.J. Lu <hongjiu.lu@intel.com>H.J. Lu2005-05-071-4/+55
| | | | | | | | | | | | | | | | | | | | | | | | * elf-bfd.h (elf_backend_data): Update special_sections to array of pointer to bfd_elf_special_section. * elf.c (special_sections): Likewise. * elf32-arm.c (elf32_arm_symbian_special_sections): Likewise. * elf32-m32r.c (m32r_elf_special_sections): Likewise. * elf32-m68hc11.c (elf32_m68hc11_special_sections): Likewise. * elf32-m68hc12.c (elf32_m68hc12_special_sections): Likewise. * elf32-mcore.c (mcore_elf_special_sections): Likewise. * elf32-ppc.c (ppc_elf_special_sections): Likewise. * elf32-sh64.c (sh64_elf_special_sections): Likewise. * elf32-v850.c (v850_elf_special_sections): Likewise. * elf32-xtensa.c (elf_xtensa_special_sections): Likewise. * elf64-alpha.c (elf64_alpha_special_sections): Likewise. * elf64-hppa.c (elf64_hppa_special_sections): Likewise. * elf64-ppc.c (ppc64_elf_special_sections): Likewise. * elf64-sh64.c (sh64_elf64_special_sections): Likewise. * elfxx-ia64.c (elfNN_ia64_special_sections): Likewise. * elfxx-mips.c (_bfd_mips_elf_special_sections): Likewise. * elfxx-mips.h (_bfd_mips_elf_special_sections): Likewise. * elf.c (get_special_section): Updated.
* bfd/Alan Modra2005-05-071-78/+113
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * elf-bfd.h (struct elf_backend_data): Remove got_symbol_offset. * elfxx-target.h (elf_backend_got_symbol_offset): Delete. * elflink.c (_bfd_elf_create_got_section): Use zero in place of got_symbol_offset. * elf-m10300.c (_bfd_mn10300_elf_create_got_section): Likewise. * elf32-frv.c (_frv_create_got_section): Likewise. * elf32-i370.c (i370_elf_finish_dynamic_sections): Delete ppc code. (elf_backend_got_symbol_offset): Don't define. * elf64-ppc.c (elf_backend_got_symbol_offset): Don't define. * elf32-ppc.c (struct ppc_elf_link_hash_table): Add got_header_size and got_gap. (ppc_elf_create_got): Tidy. (ppc_elf_create_dynamic_sections): Don't set SEC_IN_MEMORY for .plt. (ppc_elf_check_relocs): Reduce string comparisons by using elf.hgot. (ppc_elf_gc_sweep_hook): Likewise. (ppc_elf_relocate_section): Likewise. (ppc_elf_finish_dynamic_symbol): Likewise. (allocate_got): New function. (allocate_dynrelocs): Use allocate_got. (ppc_elf_size_dynamic_sections): Likewise. Delay tlsld_got allocation so that local got can refcount it. Set got_header_size. (ppc_elf_relocate_section): Use value of elf.hgot rather than hard- coded 4. (ppc_elf_finish_dynamic_sections): Likewise. (elf_backend_got_symbol_offset): Don't define. (elf_backend_got_header_size): Ditto. ld/testsuite/ * ld-powerpc/tlsexe32.d: Update for changed got layout. * ld-powerpc/tlsexe32.g: Likewise. * ld-powerpc/tlsexe32.r: Likewise. * ld-powerpc/tlsso32.d: Likewise. * ld-powerpc/tlsso32.g: Likewise. * ld-powerpc/tlsso32.r: Likewise.
* 2005-05-05 H.J. Lu <hongjiu.lu@intel.com>H.J. Lu2005-05-051-18/+23
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * section.c (bfd_make_section_anyway_with_flags): New. (bfd_make_section_anyway): Call bfd_make_section_anyway_with_flags, (bfd_make_section_with_flags): New. (bfd_make_section): Call bfd_make_section_with_flags. * elf-m10300.c (_bfd_mn10300_elf_create_got_section): Call bfd_make_section_with_flags/bfd_make_section_anyway_with_flags instead of bfd_make_section/bfd_make_section and don't call bfd_set_section_flags. (mn10300_elf_check_relocs): Likewise. (_bfd_mn10300_elf_create_dynamic_sections): Likewise. * elf32-arm.c (create_got_section): Likewise. (bfd_elf32_arm_add_glue_sections_to_bfd): Likewise. (elf32_arm_check_relocs): Likewise. * elf32-cris.c (cris_elf_check_relocs): Likewise. * elf32-frv.c (elf32_frv_add_symbol_hook): Likewise. (_frv_create_got_section): Likewise. (elf32_frvfdpic_create_dynamic_sections): Likewise. * elf32-hppa.c (elf32_hppa_create_dynamic_sections): Likewise. (elf32_hppa_check_relocs): Likewise. * elf32-i370.c (i370_elf_create_dynamic_sections): Likewise. (i370_elf_check_relocs): Likewise. * elf32-i386.c (create_got_section): Likewise. (elf_i386_check_relocs): Likewise. * elf32-m32r.c (m32r_elf_add_symbol_hook): Likewise. (create_got_section): Likewise. (m32r_elf_create_dynamic_sections): Likewise. (m32r_elf_check_relocs): Likewise. * elf32-m68k.c (elf_m68k_check_relocs): Likewise. * elf32-ppc.c (ppc_elf_create_got): Likewise. (ppc_elf_create_dynamic_sections): Likewise. (ppc_elf_add_symbol_hook): Likewise. (ppc_elf_check_relocs): Likewise. * elf32-s390.c (create_got_section): Likewise. (elf_s390_check_relocs): Likewise. * elf32-sh.c (create_got_section): Likewise. (sh_elf_create_dynamic_sections): Likewise. (sh_elf_check_relocs): Likewise. * elf32-vax.c (elf_vax_check_relocs): Likewise. * elf32-xstormy16.c (xstormy16_elf_check_relocs): Likewise. * elf32-xtensa.c (elf_xtensa_create_dynamic_sections): Likewise. (add_extra_plt_sections): Likewise. * elf64-alpha.c (elf64_alpha_add_symbol_hook): Likewise. (elf64_alpha_create_got_section): Likewise. (elf64_alpha_create_dynamic_sections): Likewise. (elf64_alpha_check_relocs): Likewise. * elf64-hppa.c (get_reloc_section): Likewise. (get_opd): Likewise. (get_plt): Likewise. (get_dlt): Likewise. (get_stub): Likewise. (elf64_hppa_create_dynamic_sectionso): Likewise. * elf64-mmix.c (mmix_elf_check_common_relocs): Likewise. * elf64-ppc.c (create_linkage_sections): Likewise. (ppc64_elf_check_relocs): Likewise. * elf64-s390.c (create_got_section): Likewise. (elf_s390_check_relocs): Likewise. * elf64-sh64.c (sh_elf64_check_relocs): Likewise. (sh64_elf64_create_dynamic_sections): Likewise. * elf64-x86-64.c (create_got_section): Likewise. (elf64_x86_64_check_relocs): Likewise. * elflink.c (_bfd_elf_create_got_section): Likewise. (_bfd_elf_link_create_dynamic_sections): Likewise. (elf_link_add_object_symbols): Likewise. * elfxx-ia64.c (elfNN_ia64_add_symbol_hook): Likewise. (elfNN_ia64_create_dynamic_sections): Likewise. (get_fptr): Likewise. (get_pltoff): Likewise. (get_reloc_section): Likewise. (elfNN_ia64_object_p): Likewise. * elfxx-mips.c (mips_elf_rel_dyn_section): Likewise. (mips_elf_create_compact_rel_section): Likewise. (mips_elf_create_got_section): Likewise. (_bfd_mips_elf_create_dynamic_sections): Likewise. * elfxx-sparc.c (create_got_section): Likewise. (_bfd_sparc_elf_check_relocs): Likewise. * elf.c (_bfd_elf_new_section_hook): Call _bfd_elf_get_sec_type_attr on linker created sections.
* Update the address and phone number of the FSF organization in the GPL noticesNick Clifton2005-05-041-1/+1
|
* bfd/Alan Modra2005-05-041-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * section.c (struct bfd_section): Replace link_order_head and link_order_tail with map_head and map_tail union. (STD_SECTION): Update. (_bfd_strip_section_from_output): Delete. * aoutx.h: Update throughout for above changes. * coff-ppc.c: Likewise. * cofflink.c: Likewise. * ecoff.c: Likewise. * elf-eh-frame.c: Likewise. * elf-m10300.c: Likewise. * elf.c: Likewise. * elf32-arm.c: Likewise. * elf32-cris.c: Likewise. * elf32-hppa.c: Likewise. * elf32-i386.c: Likewise. * elf32-m32r.c: Likewise. * elf32-m68hc1x.c: Likewise. * elf32-m68k.c: Likewise. * elf32-ppc.c: Likewise. * elf32-s390.c: Likewise. * elf32-sh.c: Likewise. * elf32-vax.c: Likewise. * elf32-xtensa.c: Likewise. * elf64-alpha.c: Likewise. * elf64-hppa.c: Likewise. * elf64-ppc.c: Likewise. * elf64-s390.c: Likewise. * elf64-sh64.c: Likewise. * elf64-x86-64.c: Likewise. * elflink.c: Likewise. * elfxx-ia64.c: Likewise. * elfxx-mips.c: Likewise. * elfxx-sparc.c: Likewise. * linker.c: Likewise. * merge.c: Likewise. * pdp11.c: Likewise. * xcofflink.c: Likewise. * elflink.c (bfd_boolean bfd_elf_size_dynsym_hash_dynstr): Split out from bfd_elf_size_dynamic_sections. * bfd-in.h (bfd_boolean bfd_elf_size_dynsym_hash_dynstr): Declare. * bfd-in2.h: Regenerate. ld/ * ldemul.c: Include bfdlink.h. (ldemul_before_allocation): Assume before_allocation is non-zero. (before_allocation_default): Call strip_excluded_output_sections. * ldlang.c (stripped_excluded_sections): New variable. (lang_add_section): Build input section list for each output section, attached via map_head and map_tail pointers. (strip_excluded_output_sections): Make global. Traverse the input section lists to find which output sections can go. Clear link_order pointers and set stripped_excluded_sections. (lang_process): Call strip_excluded_output_sections. * ldlang.h (strip_excluded_output_sections): Declare. * ldwrite.c: Update throuhout for link_order_head -> map_head change. * emultempl/aix.em (before_allocation): Call strip_excluded_output_sections. * emultempl/armcoff.em (before_allocation): Likewise. * emultempl/beos.em (before_allocation): Likewise. * emultempl/linux.em (before_allocation): Likewise. * emultempl/pe.em (before_allocation): Likewise. * emultempl/sunos.em (before_allocation): Likewise. * emultempl/elf32.em (before_allocation): Likewise. Call bfd_elf_size_dynsym_hash_dynstr too. * emultempl/lnk960.em (lnk960_before_allocation): Delete. (ld_lnk960): Use before_allocation_default.
* Update the FSF address in the copyright/GPL noticeNick Clifton2005-05-041-1/+1
|
* 2005-04-27 H.J. Lu <hongjiu.lu@intel.com>H.J. Lu2005-04-271-3/+1
| | | | | | | | | | | | | | | | * elf-bfd.h (bfd_elf_sym_name): Also take "asection *". * elf.c (bfd_elf_sym_name): Updated. (group_signature): Likewise. * elf32-ppc.c (ppc_elf_relocate_section): Likewise. * elf64-ppc.c (ppc64_elf_edit_opd): Likewise. (ppc64_elf_edit_toc): Likewise. (ppc64_elf_relocate_section): Likewise. * elfcode.h (elf_slurp_symbol_table): Likewise. * elflink.c (elf_link_input_bfd): Likewise. * elfxx-ia64.c (elfNN_ia64_relocate_section): Call bfd_elf_sym_name to get local symbol name when reporting errors.
* bfd/Alan Modra2005-04-191-7/+23
| | | | | | | | | | * elf32-ppc.c (ppc_elf_check_relocs): Don't bother with dynamic relocs in non-SEC_ALLOC sections. (ppc_elf_gc_sweep_hook): Likewise. (ppc_elf_relax_section): Likewise. (ppc_elf_relocate_section): Likewise. ld/testsuite/ * ld-powerpc/reloc.d: Update to suit removal of non-alloc relocs.