Commit Graph

2110 Commits

Author SHA1 Message Date
Alan Modra 66eb6687c9 PR 2434
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.
2006-03-16 12:20:16 +00:00
Richard Sandiford 81d43bffb5 bfd/
* elf32-mips.c (mips_elf_adjust_addend): New function, mostly split
	out from...
	(_bfd_mips_elf_relocate_section): ...here.  Use it to adjust r_addend
	for final links too.

ld/testsuite/
	* ld-mips/emit-relocs-1a.s, ld-mips/emit-relocs-1b.s,
	* ld-mips/emit-relocs-1.ld, ld-mips/emit-relocs-1.d: New test.
	* ld-mips/mips-elf.exp: Run it.
2006-03-14 07:47:49 +00:00
Richard Sandiford 00a976722a bfd/
* configure.in (bfd_elf32_bigarm_vec): Include elf-vxworks.lo.
	(bfd_elf32_bigarm_symbian_vec): Likewise.
	(bfd_elf32_bigarm_vxworks_vec): Likewise.
	(bfd_elf32_littlearm_vec): Likewise.
	(bfd_elf32_littlearm_symbian_vec): Likewise.
	(bfd_elf32_littlearm_vxworks_vec): Likewise.
	* configure: Regenerate.
	* elf32-arm.c: Include libiberty.h and elf-vxworks.h.
	(RELOC_SECTION, RELOC_SIZE, SWAP_RELOC_IN, SWAP_RELOC_OUT): New macros.
	(elf32_arm_vxworks_bed): Add forward declaration.
	(elf32_arm_howto_table_1): Fix the masks for R_ASM_ABS12.
	(elf32_arm_vxworks_exec_plt0_entry): New table.
	(elf32_arm_vxworks_exec_plt_entry): Likewise.
	(elf32_arm_vxworks_shared_plt_entry): Likewise.
	(elf32_arm_link_hash_table): Add vxworks_p and srelplt2 fields.
	(reloc_section_p): New function.
	(create_got_section): Use RELOC_SECTION.
	(elf32_arm_create_dynamic_sections): Likewise.  Call
	elf_vxworks_create_dynamic_sections for VxWorks targets.
	Choose between the two possible values of plt_header_size
	and plt_entry_size.
	(elf32_arm_link_hash_table_create): Initialize vxworks_p and srelplt2.
	(elf32_arm_abs12_reloc): New function.
	(elf32_arm_final_link_relocate): Call it.  Allow the creation of
	dynamic R_ARM_ABS12 relocs on VxWorks.  Use reloc_section_p,
	RELOC_SIZE, SWAP_RELOC_OUT and RELOC_SECTION.  Initialize the
	r_addend fields of relocs.  On rela targets, skip any code that
	adjusts in-place addends.  When using _bfd_link_final_relocate
	to perform a final relocation, pass rel->r_addend as the addend
	argument.
	(elf32_arm_merge_private_bfd_data): If one of the bfds is a VxWorks
	object, ignore flags that are not standard on VxWorks.
	(elf32_arm_check_relocs): Allow the creation of dynamic R_ARM_ABS12
	relocs on VxWorks.  Use reloc_section_p.
	(elf32_arm_adjust_dynamic_symbol): Use RELOC_SECTION and RELOC_SIZE.
	(allocate_dynrelocs): Use RELOC_SIZE.  Account for the size of
	.rela.plt.unloaded relocs on VxWorks targets.
	(elf32_arm_size_dynamic_sections): Use RELOC_SIZE.  Check for
	.rela.plt.unloaded as well as .rel(a).plt.  Add DT_RELA* tags
	instead of DT_REL* tags on RELA targets.
	(elf32_arm_finish_dynamic_symbol): Use RELOC_SECTION, RELOC_SIZE
	and SWAP_RELOC_OUT.  Initialize r_addend fields.  Handle VxWorks
	PLT entries.  Do not make _GLOBAL_OFFSET_TABLE_ absolute on VxWorks.
	(elf32_arm_finish_dynamic_sections): Use RELOC_SECTION, RELOC_SIZE
	and SWAP_RELOC_OUT.  Initialize r_addend fields.  Handle DT_RELASZ
	like DT_RELSZ.  Handle the VxWorks form of initial PLT entry.
	Correct the .rela.plt.unreloaded symbol indexes.
	(elf32_arm_output_symbol_hook): Call the VxWorks version of this
	hook on VxWorks targets.
	(elf32_arm_vxworks_link_hash_table_create): Set vxworks_p to true.
	Minor formatting tweak.
	(elf32_arm_vxworks_final_write_processing): New function.
	(elf_backend_add_symbol_hook): Override for VxWorks and reset
	for Symbian.
	(elf_backend_final_write_processing): Likewise.
	(elf_backend_emit_relocs): Likewise.
	(elf_backend_want_plt_sym): Likewise.
	(ELF_MAXPAGESIZE): Likewise.
	(elf_backend_may_use_rel_p): Minor formatting tweak.
	(elf_backend_may_use_rela_p): Likewise.
	(elf_backend_default_use_rela_p): Likewise.
	(elf_backend_rela_normal): Likewise.
	* Makefile.in (elf32-arm.lo): Depend on elf-vxworks.h.

gas/
	* config/tc-arm.c (md_apply_fix): Install a value of zero into a
	BFD_RELOC_ARM_OFFSET_IMM field if we're going to generate a RELA
	R_ARM_ABS12 reloc.
	(tc_gen_reloc): Keep the original fx_offset for RELA pc-relative
	relocs, but adjust by md_pcrel_from_section.  Create R_ARM_ABS12
	relocations for BFD_RELOC_ARM_OFFSET_IMM on RELA targets.

gas/testsuite/
	* gas/arm/abs12.s, gas/arm/abs12.d: New test.
	* gas/arm/pic.d: Skip for *-*-vxworks*...
	* gas/arm/pic_vxworks.d: ...use this version instead.
	* gas/arm/unwind_vxworks.d: Fix expected output.

ld/
	* emulparams/armelf_vxworks.sh: Include vxworks.sh.
	(MAXPAGESIZE): Define.
	* emulparams/vxworks.sh: Undefine.
	* Makefile.am (earmelf_vxworks.c): Depend on vxworks.sh and vxworks.em.
	* Makefile.in: Regenerate.

ld/testsuite/
	* ld-arm/vxworks1.dd, ld-arm/vxworks1.ld, ld-arm/vxworks1-lib.dd,
	* ld-arm/vxworks1-lib.nd, ld-arm/vxworks1-lib.rd,
	* ld-arm/vxworks1-lib.s, ld-arm/vxworks1.rd, ld-arm/vxworks1.s,
	* ld-arm/vxworks1-static.d, ld-arm/vxworks2.s, ld-arm/vxworks2.sd,
	* ld-arm/vxworks2-static.sd: New tests.
	* ld-arm/arm-elf.exp: Run them.
2006-03-07 08:39:21 +00:00
Nathan Sidwell 0b2e31dc3b bfd:
* archures.c (bfd_mach_mcf_isa_a_nodiv, bfd_mach_mcf_isa_b_nousp):
	New.  Adjust other variants.
	(bfd_default_scan): Update.
	* bfd-in2.h: Rebuilt.
	* cpu-m68k.c: Adjust.
	(bfd_m68k_compatible): New. Use it for architectures.
	* elf32-m68k.c (elf32_m68k_object_p): Adjust.
	(elf32_m68k_merge_private_bfd_data): Adjust.  Correct isa-a/b
	mismatch.
	(elf32_m68k_print_private_bfd_data): Adjust.
	* ieee.c (ieee_write_processor): Adjust.

	binutils:
	* readelf.c (get_machine_flags): Adjust.

	gas:
	* config/tc-m68k.c (m68k_extensions): Allow 'float' on both m68k
	and cf.
	(m68k_ip): <case 'J'> Check we have some control regs.
	(md_parse_option): Allow raw arch switch.
	(m68k_init_arch): Better detection of arch/cpu mismatch.  Detect
	whether 68881 or cfloat was meant by -mfloat.
	(md_show_usage): Adjust extension display.
	(m68k_elf_final_processing): Adjust.

	gas/testsuite:
	* gas/m68k/arch-cpu-1.s: Tweak.
	* gas/m68k/arch-cpu-1.d: Tweak.

	include/elf:
	* m68k.h (EF_M68K_ISA_MASK, EF_M68K_ISA_A,
	EF_M68K_ISA_A_PLUS, EF_M68K_ISA_B, EF_M68K_ISA_C): Adjust.
	(EF_M68K_ISA_A_NODIV, EF_M68K_ISA_B_NOUSP): New.
	(EF_M68K_HW_DIV, EF_M68K_USP): Remove.
	(EF_M68K_MAC, EF_M68K_EMAC, EF_M68K_FLOAT): Adjust.
	(EF_M68K_EMAC_B): New.

	ld/testsuite:
	* ld-m68k: New tests.
2006-03-06 13:42:05 +00:00
Nick Clifton df406460e9 Add linker relaxation support for the AVR 2006-03-03 15:25:31 +00:00
Richard Sandiford 4f471f3957 ld/
* emulparams/vxworks.sh (VXWORKS_BASE_EM_FILE): New variable.
	(EXTRA_EM_FILE): Define.
	* emultempl/vxworks.em: New file.
	* ld.texinfo (--force-dynamic): Document.
	* Makefile.am (eelf32ppcvxworks.cm, eelf_i386_vxworks.c): Depend
	on vxworks.em.
	* Makefile.in: Regenerate.

ld/testsuite/
	* ld-i386/vxworks1-static.d, ld-i386/vxworks2.s,
	* ld-i386/vxworks2.sd, ld-i386/vxworks2-static.sd: New tests.
	* ld-i386/i386.exp: Run them.
	* ld-powerpc/vxworks1-static.d, ld-powerpc/vxworks2.s,
	* ld-powerpc/vxworks2.sd, ld-powerpc/vxworks2-static.sd: New tests.
	* ld-powerpc/powerpc.exp: Run them.
2006-03-03 09:32:01 +00:00
Richard Sandiford 1739bf618d ld/testsuite/
* ld-powerpc/vxworks1.ld: Use a page alignment of 0x10000.
	* ld-powerpc/vxworks1.dd: Update accordingly.
	* ld-powerpc/vxworks1-lib.nd: Likewise.
	* ld-powerpc/vxworks1-lib.rd: Likewise.
	* ld-powerpc/vxworks1.rd: Likewise.
2006-03-02 15:16:27 +00:00
Richard Sandiford 7c4927199c bfd/
* 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.
2006-03-02 09:44:23 +00:00
Richard Sandiford 711de32caa bfd/
* 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.
2006-03-02 08:57:00 +00:00
Richard Sandiford 83503a060f ld/testsuite/
* ld-i386/vxworks1.ld: Use bigger alignments.  Make sure .bss isn't
	placed as an orphan.
	* ld-i386/vxworks1-lib.dd, ld-i386/vxworks1.dd,
	* ld-i386/vxworks1.rd: Update accordingly.
	* ld-i386/vxworks1-lib.rd: Likewise.  Remove symbol indexes.
2006-03-02 08:54:43 +00:00
Richard Sandiford 4a3dc54359 bfd/
* 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.
2006-03-02 08:50:04 +00:00
Richard Sandiford b9201bb360 ld/testsuite/
* ld-i386/vxworks1-lib.s, ld-i386/vxworks1-lib.dd,
	* ld-i386/vxworks1-lib.rd, ld-i386/vxworks1.s, ld-i386/vxworks1.dd,
	* ld-i386/vxworks1.rd, ld-i386/vxworks1.ld: New test.
	* ld-i386/i386.exp: Run it.
2006-02-28 07:17:33 +00:00
Richard Sandiford 5ae0bfb60a bfd/
* elf32-i386.c (elf_i386_link_hash_table): Add next_tls_desc_index.
	(elf_i386_link_hash_table_create): Initialize it.
	(elf_i386_compute_jump_table_size): Use it instead of
	srelplt->reloc_count.
	(allocate_dynrelocs): Likewise.
	(elf_i386_size_dynamic_sections): Likewise.
	(elf_i386_relocate_section): Likewise.

ld/testsuite/
	* ld-i386/emit-relocs.s, ld-i386/emit-relocs.d: New test.
	* ld-i386/i386.exp: Run it.
2006-02-28 07:16:12 +00:00
Carlos O'Donell f7d9e5c379 bfd/doc/
2006-10-14  Carlos O'Donell  <carlos@codesourcery.com>

       * Makefile.am: Add html target.
       * Makefile.in: Regenerate.

bfd/
2006-10-14  Carlos O'Donell  <carlos@codesourcery.com>

       * po/Make-in: Add html target.

binutils/
2006-10-14  Carlos O'Donell  <carlos@codesourcery.com>

       * po/Make-in: Add html target.

gas/
2006-10-14  Carlos O'Donell  <carlos@codesourcery.com>

       * doc/Makefile.am: Add html target.
       * doc/Makefile.in: Regenerate.
       * po/Make-in: Add html target.

gprof/
2006-10-14  Carlos O'Donell  <carlos@codesourcery.com>

       * po/Make-in: Add html target.

ld/
2006-10-14  Carlos O'Donell  <carlos@codesourcery.com>

       * Makefile.am: Add html target.
       * Makefile.in: Regenerate.
       * po/Make-in: Add html target.

opcodes/
2006-10-14  Carlos O'Donell  <carlos@codesourcery.com>

       * po/Make-in: Add html target.

etc/
2006-10-14  Carlos O'Donell  <carlos@codesourcery.com>

       * Makefile.in: TEXI2HTML uses makeinfo. Define
       HTMLFILES. Add html targets.
       * configure.texi: Use ifnottex. Add alternative
       image format specifier as jpg.
       * standards.texi: Use ifnottex.

intl/
2006-10-14  Carlos O'Donell  <carlos@codesourcery.com>

       * intl/Makefile.in: Add html target.
2006-02-27 16:26:26 +00:00
H.J. Lu 7dd61ce72a 2006-02-23 H.J. Lu <hongjiu.lu@intel.com>
* ld-pie/weakundef-data.c: Fix the typo.
2006-02-23 22:23:26 +00:00
H.J. Lu 44a260c17d 2006-02-22 H.J. Lu <hongjiu.lu@intel.com>
* ld-pie/pie.c: New file.

	* ld-pie/pie.exp: Check if compiler supports -pie.
2006-02-22 17:41:04 +00:00
H.J. Lu 72aa65a751 2006-02-20 H.J. Lu <hongjiu.lu@intel.com>
PR ld/2218
	* ld-pie/pie.exp: Add the weak undefined data test.

	* ld-pie/weakundef-data.c: New file.
2006-02-20 20:11:00 +00:00
Nick Clifton d70c5fc7c5 Add support for the Infineon XC16X. 2006-02-17 14:36:28 +00:00
Nick Hudson aaa2ab3d61 bfd:
* config.bfd (mips*el-*-netbsd*, mips*-*-netbsd*): Use
	traditional MIPS ELF targets.

	gas:
	* configure.tgt: set emulation for mips-*-netbsd*

	ld:
	* configure.tgt (mips*el-*-netbsd*, mips*-*-netbsd*):
	Use the traditional target.
2006-02-16 08:05:02 +00:00
Joseph Myers 94089a50d3 gas:
* configure.tgt (arm-*-linux-gnueabi*): Change to
	arm-*-linux-*eabi*.

ld:
	* configure.tgt (arm*b-*-linux-gnueabi): Change to
	arm*b-*-linux-*eabi.
	(arm*-*-linux-gnueabi): Change to arm*-*-linux-*eabi.
2006-02-13 15:08:43 +00:00
H.J. Lu c1446dbab7 2006-02-08 H.J. Lu <hongjiu.lu@intel.com>
PR ld/2290
	* NEWS: Updated for the Linux linker search order change.

	* emultempl/elf32.em (gld${EMULATION_NAME}_after_open): Call
	gld${EMULATION_NAME}_check_ld_so_conf before checking default
	search directories for DT_NEEDED entries.
2006-02-09 01:05:10 +00:00
Paul Brook 1d022697d9 2006-02-07 Paul Brook <paul@codesourcery.com>
ld/
	* emultempl/armelf.em: Include elf/arm.h.
	(arm_elf_finish): Set low address bit if enty point is a Thumb
	function.
ld/testsuite/
	* ld-arm/arm-elf.exp: Add thumb-entry test.
	* ld-arm/thumb-entry.d: New test.
	* ld-arm/thumb-entry.s: New test.
2006-02-07 03:50:20 +00:00
Richard Sandiford 4005427f86 bfd/
* elfxx-mips.c (mips_elf_initialize_tls_index): If a TLS symbol
	has already been assigned a GOT index, copy that index to the
	current hash table entry.

ld/testsuite/
	* ld-mips-elf/tls-hidden2a.s, ld-mips-elf/tls-hidden2b.s,
	* ld/testsuite/ld-mips-elf/tls-hidden2.d,
	* ld/testsuite/ld-mips-elf/tls-hidden2-got.d: New test.
	* ld-mips-elf/mips-elf.exp: Run it.
2006-02-04 08:29:58 +00:00
Richard Sandiford 2f2817dbda * ld-mips-elf/rel32-n32.d: Adjust for changes in linker behaviour.
* ld-mips-elf/rel32-o32.d: Likewise.
	* ld-mips-elf/rel64.d: Likewise.
	* ld-mips-elf/tls-multi-got-1.got: Likewise.
	* ld-mips-elf/tls-multi-got-1.r: Likewise.
	* ld-mips-elf/tlsdyn-o32-1.d: Likewise.
	* ld-mips-elf/tlsdyn-o32-1.got: Likewise.
	* ld-mips-elf/tlsdyn-o32-2.d: Likewise.
	* ld-mips-elf/tlsdyn-o32-2.got: Likewise.
	* ld-mips-elf/tlsdyn-o32-3.d: Likewise.
	* ld-mips-elf/tlsdyn-o32-3.got: Likewise.
	* ld-mips-elf/tlsdyn-o32.d: Likewise.
	* ld-mips-elf/tlsdyn-o32.got: Likewise.
	* ld-mips-elf/tlslib-o32-hidden.got: Likewise.
	* ld-mips-elf/tlslib-o32-ver.got: Likewise.
	* ld-mips-elf/tlslib-o32.got: Likewise.
2006-02-04 08:28:29 +00:00
H.J. Lu d72d9b9e57 Updo the last change to binutils and ld/testsuite. 2006-02-02 22:53:46 +00:00
H.J. Lu ec21a0f54c Add missing entries. 2006-02-02 22:16:02 +00:00
H.J. Lu de205c03b9 binutils/
2006-02-02  H.J. Lu  <hongjiu.lu@intel.com>

	* readelf.c (process_program_headers): Undo the change made on
	2004-09-22.  Match PT_DYNAMIC segment only with SHT_DYNAMIC
	sections.

ld/testsuite/

2006-02-02  H.J. Lu  <hongjiu.lu@intel.com>

	* ld-i386/tlsbin.rd: Update for changed segment map.
	* ld-i386/tlsnopic.rd: Likewise.
	* ld-i386/tlspic.rd: Likewise.
	* ld-powerpc/tlsexe.r: Likewise.
	* ld-powerpc/tlsexe32.r: Likewise.
	* ld-powerpc/tlsexetoc.r: Likewise.
	* ld-powerpc/tlsso.r: Likewise.
	* ld-powerpc/tlsso32.r: Likewise.
	* ld-powerpc/tlstocso.r: Likewise.
	* ld-s390/tlsbin.rd: Likewise.
	* ld-s390/tlsbin_64.rd: Likewise.
	* ld-s390/tlspic.rd: Likewise.
	* ld-s390/tlspic_64.rd: Likewise.
	* ld-sh/tlsbin-2.d: Likewise.
	* ld-sh/tlspic-2.d: Likewise.
	* ld-x86-64/tlsbin.rd: Likewise.
	* ld-x86-64/tlspic.rd: Likewise.
2006-02-02 22:05:56 +00:00
Danny Smith 6b31ad165d * deffilep.y (def_image_name): If the image name does not have
a suffix, append the default.
	* ld.texinfo: Document NAME, LIBRARY usage in PE-COFF .def files.
2006-02-01 21:28:29 +00:00
Eric Botcazou ca6d06e538 * ld-sparc/sparc.exp: Do not run 64-bit tests on Solaris 2.5.1
and Solaris 2.6.
2006-01-31 23:49:32 +00:00
Danny Smith 4b5bd4e780 * NEWS: mention support for forward exports in PE-COFF dll's.
* ld.texinfo: Expand documentation of EXPORT statements in
	PE-COFF .def files.
2006-01-31 22:13:41 +00:00
Danny Smith a8d701fd09 2006-01-31 Filip Navara <navaraf@reactos.com>
* deffile.h (struct def_file_export): Add field flag_forward.
	* pe-dll.c (process_def_file): Check for forward exports.
	(generate_edata): Generate forward export symbols.
	(fill_edata): Emit them.

	* pe-dll.c (process_def_file): Don't crash on malformed
	fastcall symbol names in .def file.
2006-01-31 22:08:14 +00:00
Nick Clifton 790433a9e1 Updated Vietnamese translation. 2006-01-30 12:20:22 +00:00
Nick Clifton 63d852486f * pe-dll.c (pe_dll_generate_implib): Issue "Creating library file:" as
informational message, not a warning.
2006-01-27 17:18:13 +00:00
H.J. Lu a10e6b21d4 2006-01-27 H.J. Lu <hongjiu.lu@intel.com>
PR ld/2218
	* ld-pie/pie.exp: New file.
	* ld-pie/weakundef.c: Likewise.
	* ld-pie/weakundef.out: Likewise.

	* lib/ld-lib.exp (run_ld_link_exec_tests): Fix nesting. Support
	building PIE and shared library.
2006-01-27 14:32:04 +00:00
Eric Christopher 0dacb9e1e3 2006-01-18 Roger Sayle <roger@eyesopen.com>
* emultempl/irix.em: Use lbasename instead of basename.
2006-01-19 01:06:48 +00:00
Alexandre Oliva 67a4f2b710 include/elf/ChangeLog:
Introduce TLS descriptors for i386 and x86_64.
* common.h (DT_TLSDESC_GOT, DT_TLSDESC_PLT): New.
* i386.h (R_386_TLS_GOTDESC, R_386_TLS_DESC_CALL, R_386_TLS_DESC):
New.
* x86-64.h (R_X86_64_GOTPC32_TLSDESC, R_X86_64_TLSDESC_CALL,
R_X86_64_TLSDESC): New.
bfd/ChangeLog:
Introduce TLS descriptors for i386 and x86_64.
* reloc.c (BFD_RELOC_386_TLS_GOTDESC, BFD_RELOC_386_TLS_DESC,
BFD_RELOC_386_TLS_DESC_CALL, BFD_RELOC_X86_64_GOTPC32_TLSDESC,
BFD_RELOC_X86_64_TLSDESC, BFD_RELOC_X86_64_TLSDESC_CALL): New.
* libbfd.h, bfd-in2.h: Rebuilt.
* elf32-i386.c (elf_howto_table): New relocations.
(R_386_tls): Adjust.
(elf_i386_reloc_type_lookup): Map new relocations.
(GOT_TLS_GDESC, GOT_TLS_GD_BOTH_P): New macros.
(GOT_TLS_GD_P, GOT_TLS_GDESC_P, GOT_TLS_GD_ANY_P): New macros.
(struct elf_i386_link_hash_entry): Add tlsdesc_got field.
(struct elf_i386_obj_tdata): Add local_tlsdesc_gotent field.
(elf_i386_local_tlsdesc_gotent): New macro.
(struct elf_i386_link_hash_table): Add sgotplt_jump_table_size.
(elf_i386_compute_jump_table_size): New macro.
(link_hash_newfunc): Initialize tlsdesc_got.
(elf_i386_link_hash_table_create): Set sgotplt_jump_table_size.
(elf_i386_tls_transition): Handle R_386_TLS_GOTDESC and
R_386_TLS_DESC_CALL.
(elf_i386_check_relocs): Likewise.  Allocate space for
local_tlsdesc_gotent.
(elf_i386_gc_sweep_hook): Handle R_386_TLS_GOTDESC and
R_386_TLS_DESC_CALL.
(allocate_dynrelocs): Count function PLT relocations.  Reserve
space for TLS descriptors and relocations.
(elf_i386_size_dynamic_sections): Reserve space for TLS
descriptors and relocations.  Set up sgotplt_jump_table_size.
Don't zero reloc_count in srelplt.
(elf_i386_always_size_sections): New.  Set up _TLS_MODULE_BASE_.
(elf_i386_relocate_section): Handle R_386_TLS_GOTDESC and
R_386_TLS_DESC_CALL.
(elf_i386_finish_dynamic_symbol): Use GOT_TLS_GD_ANY_P.
(elf_backend_always_size_sections): Define.
* elf64-x86-64.c (x86_64_elf_howto): Add R_X86_64_GOTPC32_TLSDESC,
R_X86_64_TLSDESC, R_X86_64_TLSDESC_CALL.
(R_X86_64_standard): Adjust.
(x86_64_reloc_map): Map new relocs.
(elf64_x86_64_rtype_to_howto): New, split out of...
(elf64_x86_64_info_to_howto): ... this function, and...
(elf64_x86_64_reloc_type_lookup): ... use it to map elf_reloc_val.
(GOT_TLS_GDESC, GOT_TLS_GD_BOTH_P): New macros.
(GOT_TLS_GD_P, GOT_TLS_GDESC_P, GOT_TLS_GD_ANY_P): New macros.
(struct elf64_x86_64_link_hash_entry): Add tlsdesc_got field.
(struct elf64_x86_64_obj_tdata): Add local_tlsdesc_gotent field.
(elf64_x86_64_local_tlsdesc_gotent): New macro.
(struct elf64_x86_64_link_hash_table): Add tlsdesc_plt,
tlsdesc_got and sgotplt_jump_table_size fields.
(elf64_x86_64_compute_jump_table_size): New macro.
(link_hash_newfunc): Initialize tlsdesc_got.
(elf64_x86_64_link_hash_table_create): Initialize new fields.
(elf64_x86_64_tls_transition): Handle R_X86_64_GOTPC32_TLSDESC and
R_X86_64_TLSDESC_CALL.
(elf64_x86_64_check_relocs): Likewise.  Allocate space for
local_tlsdesc_gotent.
(elf64_x86_64_gc_sweep_hook): Handle R_X86_64_GOTPC32_TLSDESC and
R_X86_64_TLSDESC_CALL.
(allocate_dynrelocs): Count function PLT relocations.  Reserve
space for TLS descriptors and relocations.
(elf64_x86_64_size_dynamic_sections): Reserve space for TLS
descriptors and relocations.  Set up sgotplt_jump_table_size,
tlsdesc_plt and tlsdesc_got.  Make room for them.  Don't zero
reloc_count in srelplt.  Add dynamic entries for DT_TLSDESC_PLT
and DT_TLSDESC_GOT.
(elf64_x86_64_always_size_sections): New.  Set up
_TLS_MODULE_BASE_.
(elf64_x86_64_relocate_section): Handle R_386_TLS_GOTDESC and
R_386_TLS_DESC_CALL.
(elf64_x86_64_finish_dynamic_symbol): Use GOT_TLS_GD_ANY_P.
(elf64_x86_64_finish_dynamic_sections): Set DT_TLSDESC_PLT and
DT_TLSDESC_GOT.  Set up TLS descriptor lazy resolver PLT entry.
(elf_backend_always_size_sections): Define.
binutils/ChangeLog:
Introduce TLS descriptors for i386 and x86_64.
* readelf.c (get_dynamic_type): Handle DT_TLSDESC_GOT and
DT_TLSDESC_PLT.
gas/ChangeLog:
Introduce TLS descriptors for i386 and x86_64.
* config/tc-i386.c (tc_i386_fix_adjustable): Handle
BFD_RELOC_386_TLS_GOTDESC, BFD_RELOC_386_TLS_DESC_CALL,
BFD_RELOC_X86_64_GOTPC32_TLSDESC, BFD_RELOC_X86_64_TLSDESC_CALL.
(optimize_disp): Emit fix up for BFD_RELOC_386_TLS_DESC_CALL and
BFD_RELOC_X86_64_TLSDESC_CALL immediately, and clear the
displacement bits.
(build_modrm_byte): Set up zero modrm for TLS desc calls.
(lex_got): Handle @tlsdesc and @tlscall.
(md_apply_fix, tc_gen_reloc): Handle the new relocations.
ld/testsuite/ChangeLog:
Introduce TLS descriptors for i386 and x86_64.
* ld-i386/i386.exp: Run on x86_64-*-linux* and amd64-*-linux*.
Add new tests.
* ld-i386/pcrel16.d: Add -melf_i386.
* ld-i386/pcrel8.d: Likewise.
* ld-i386/tlsbindesc.dd: New.
* ld-i386/tlsbindesc.rd: New.
* ld-i386/tlsbindesc.s: New.
* ld-i386/tlsbindesc.sd: New.
* ld-i386/tlsbindesc.td: New.
* ld-i386/tlsdesc.dd: New.
* ld-i386/tlsdesc.rd: New.
* ld-i386/tlsdesc.s: New.
* ld-i386/tlsdesc.sd: New.
* ld-i386/tlsdesc.td: New.
* ld-i386/tlsgdesc.dd: New.
* ld-i386/tlsgdesc.rd: New.
* ld-i386/tlsgdesc.s: New.
* ld-x86-64/x86-64.exp: Run new tests.
* ld-x86-64/tlsbindesc.dd: New.
* ld-x86-64/tlsbindesc.rd: New.
* ld-x86-64/tlsbindesc.s: New.
* ld-x86-64/tlsbindesc.sd: New.
* ld-x86-64/tlsbindesc.td: New.
* ld-x86-64/tlsdesc.dd: New.
* ld-x86-64/tlsdesc.pd: New.
* ld-x86-64/tlsdesc.rd: New.
* ld-x86-64/tlsdesc.s: New.
* ld-x86-64/tlsdesc.sd: New.
* ld-x86-64/tlsdesc.td: New.
* ld-x86-64/tlsgdesc.dd: New.
* ld-x86-64/tlsgdesc.rd: New.
* ld-x86-64/tlsgdesc.s: New.
2006-01-18 21:07:51 +00:00
Alan Modra e88d958a4f split changelogs 2006-01-16 23:15:07 +00:00
Nick Clifton 32fba81dfe Add new Chinese (simplified) translation 2006-01-16 16:15:17 +00:00
Nick Clifton cc629b0279 Fix email address in previous delta 2006-01-16 16:08:55 +00:00
Nick Clifton f2a8f14838 Fix duplicated word typo 2006-01-16 16:07:45 +00:00
Hans-Peter Nilsson aab87437e3 * ld-mmix/sec-1.d: Adjust for section order changes. 2006-01-03 07:03:26 +00:00
Jie Zhang cdc34721c4 * emulparams/bfin.sh: Define DATA_END_SYMBOLS and END_SYMBOLS.
And add a prefix '_' to ENTRY.
	* scripttempl/elf.sc: Add END_SYMBOLS.
2005-12-28 06:01:48 +00:00
Bob Wilson 01b5a19e0b * emultempl/xtensaelf.em (elf_xtensa_place_orphan): Delete.
(LDEMUL_PLACE_ORPHAN): Delete.
2005-12-27 22:56:02 +00:00
Nick Clifton b59bea8a13 Add support for RDOS targets. 2005-12-27 17:42:45 +00:00
Nick Clifton 590f19724d Add new Vietnamese translation 2005-12-27 11:00:03 +00:00
Alan Modra 1763d3d870 * Makefile.am: Run "make dep-am".
* Makefile.in: Regenerate.
2005-12-27 01:21:01 +00:00
Alan Modra 218868ba41 * ldlang.h (lang_output_section_statement_type): Add prev.
* ldlang.c (output_statement_newfunc): Set os.prev.
	(lang_insert_orphan): Likewise.
	(output_prev_sec_find): Use os.prev.
2005-12-24 07:48:30 +00:00
Nick Clifton ecc49060c6 Add TINY_READONLY_SECTION, TINY_DATA_SECTION, TINY_BSS_SECTION. 2005-12-22 17:43:34 +00:00
Bob Wilson b43bf3432a fix typo in previous entry 2005-12-20 01:22:48 +00:00
Bob Wilson a6a1cb4e19 fix filename typo in previous entry for ld-elf/group2.d 2005-12-19 23:45:01 +00:00