Commit Graph

2067 Commits

Author SHA1 Message Date
H.J. Lu 7af8e99880 bfd/
2005-08-05  H.J. Lu  <hongjiu.lu@intel.com>

	* bfd.c (bfd_hide_symbol): New.
	* bfd-in2.h: Regenerated.

ld/

2005-08-05  H.J. Lu  <hongjiu.lu@intel.com>

	* ld.texinfo: Document PROVIDE_HIDDEN.

	* ldexp.c (exp_fold_tree_1): Hide a provided symbol if asked.
	(exp_provide): Add and set hidden.

	* ldexp.h (etree_type): Add hidden to assign.

	* ldgram.y (PROVIDE_HIDDEN): New.
	* ldlex.l (PROVIDE_HIDDEN): Likewise.

	* scripttempl/elf.sc: Use PROVIDE_HIDDEN on array bound
	symbols.
2005-08-05 13:52:13 +00:00
Alan Modra 9599dfb1f6 * emulparams/elf_x86_64.sh: Revert last change.
* scripttempl/elf.sc (REL_LARGE, LARGE_SECTIONS): Define here.
2005-08-05 13:42:22 +00:00
Alan Modra 827a1c67ae * emulparams/armelf.sh (OTHER_BSS_END_SYMBOLS): Split out from
OTHER_END_SYMBOLS.
	* emulparams/armelf_linux.sh: Likewise.
	* emulparams/armnto.sh: Likewise.
	* emulparams/criself.sh: Likewise.
	* emulparams/elf32mcore.sh: Likewise.
	* emulparams/criself.sh (OTHER_SYMBOLS): Define.
	* emulparams/crislinux.sh (OTHER_SYMBOLS): Define.
	(OTHER_END_SYMBOLS): Don't define.
	* emulparams/elf32fr30.sh: Likewise.
	* emulparams/elf64mmix.sh: Likewise.
	* emulparams/hppa64linux.sh: Likewise.
	* emulparams/m32relf.sh: Likewise.
	* emulparams/vxworks.sh: Likewise.
	* scripttempl/armbpabi.sc (OTHER_BSS_SECTIONS): Delete.
	(OTHER_BSS_END_SYMBOLS): Add.
	(OTHER_END_SYMBOLS): Move before current end sym definitions.
	(OTHER_SYMBOLS): Replace OTHER_END_SYMBOLS near end of script.
	* scripttempl/elf.sc: Likewise.
	* scripttempl/elf32sh-symbian.sc: Likewise.
	* scripttempl/elf_chaos.sc: Likewise.
	* scripttempl/elfxtensa.sc: Likewise.
	* scripttempl/iq2000.sc: Likewise.
	* scripttempl/xstormy16.sc: Likewise.

	* scripttempl/elf.sc (LBSS, LARGE_SECTIONS): Delete.
	(REL_LDATA, REL_LBSS, REL_LRODATA): Delete.
	(REL_LARGE, LARGE_SECTIONS): Add.
	* emulparams/elf_x86_64.sh (LARGE_SECTIONS): Define as script text.
	(REL_LARGE): Define.
	* emulparams/hppa64linux.sh (OTHER_BSS_SECTIONS): Don't define.
	(LARGE_SECTIONS): Define.
	* emulparams/hppa64linux.sh (OTHER_BSS_SECTIONS): Don't define.
	(LARGE_SECTIONS): Define.
2005-08-05 04:29:57 +00:00
Alan Modra 046183de0e bfd/
* 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.
2005-08-04 06:22:14 +00:00
Alan Modra fa498e0947 * Makefile.am (eelf32m32c.c): Fix dependencies.
* Makefile.in: Regenerate.
2005-08-04 04:00:03 +00:00
Alan Modra 1e035701d6 bfd/
* elflink.c (fix_syms, _bfd_elf_fix_excluded_sec_syms): Move to..
	* linker.c (fix_syms, _bfd_fix_excluded_sec_syms): ..here.
	* bfd-in.h (_bfd_fix_excluded_sec_syms): Rename.
	* bfd-in2.h: Regenerate.
ld/
	* ldemul.c (ldemul_finish): Call ld_emulation->finish unconditionally.
	(finish_default): New function.
	* ldemul.h (finish_default): Declare.
	* emultempl/aix.em (gld*_before_allocation): Call
	before_allocation_default rather than strip_excluded_output_sections.
	(ld_*_emulation): Init finish field to finish_default.
	* emultempl/armcoff.em: Likewise.
	* emultempl/beos.em: Likewise.
	* emultempl/elf32.em: Likewise.
	* emultempl/generic.em: Likewise.
	* emultempl/gld960.em: Likewise.
	* emultempl/gld960c.em: Likewise.
	* emultempl/hppaelf.em: Likewise.
	* emultempl/linux.em: Likewise.
	* emultempl/lnk960.em: Likewise.
	* emultempl/m68kcoff.em: Likewise.
	* emultempl/mmo.em: Likewise.
	* emultempl/pe.em: Likewise.
	* emultempl/ppc64elf.em: Likewise.
	* emultempl/sunos.em: Likewise.
	* emultempl/ticoff.em: Likewise.
	* emultempl/vanilla.em: Likewise.
2005-08-04 01:19:10 +00:00
H.J. Lu b0360d8cfa bfd/
2005-08-03  H.J. Lu  <hongjiu.lu@intel.com>

	* elf32-i386.c (elf_howto_table): Undo the overflow change for
	R_386_PC16 made on 2005-07-18.

	* elf64-x86-64.c (x86_64_elf_howto_table): Undo the overflow
	change for R_X86_64_PC16 made on 2005-07-18.

ld/testsuite/

2005-08-03  H.J. Lu  <hongjiu.lu@intel.com>

	* ld-i386/pcrel16.d: Updated.
	* ld-i386/pcrel16.s: Likewise.
	* ld-x86-64/pcrel16.d: Likewise.
2005-08-03 16:30:34 +00:00
Alan Modra 9f4fb50211 * ldlang.c (exp_init_os): Handle etree_provide.
* emulparams/armelf.sh (OTHER_END_SYMBOLS): Rename from..
	(OTHER_BSS_END_SYMBOLS): ..this.
	* emulparams/armelf_linux.sh: Likewise.
	* emulparams/armnto.sh: Likewise.
	* emulparams/criself.sh: Likewise.
	* emulparams/crislinux.sh: Likewise.
	* emulparams/elf32frv.sh: Likewise.
	* emulparams/elf32mcore.sh: Likewise.
	* emulparams/elf32ppc.sh: Likewise.
	* emulparams/elf32ppclinux.sh: Likewise.
	* emulparams/hppa64linux.sh: Likewise.
	* scripttempl/armbpabi.sc: Substitute $OTHER_END_SYMBOLS, not
	$OTHER_BSS_END_SYMBOLS.
	* scripttempl/elf32sh-symbian.sc: Likewise.
	* scripttempl/elf_chaos.sc: Likewise.
	* scripttempl/iq2000.sc: Likewise.
	* scripttempl/xstormy16.sc: Likewise.
	* scripttempl/elf.sc: Likewise.  Delete __bss_start comment.
	* scripttempl/elfxtensa.sc: Likewise.
2005-08-03 05:09:49 +00:00
Richard Sandiford c5211a5487 * elfxx-mips.c (mips_mach_extends_p): Treat MIPS64 as an extension
of MIPS32 and MIPS64r2 as an extension of MIPS32r2.
2005-08-01 11:59:33 +00:00
Nick Clifton e9156f741a * ldmain.c (main): Allow -shared and -static to be used together.
* ld.texinfo (-static): Mention that it is allowed with -shared.
2005-07-29 13:32:45 +00:00
DJ Delorie 8980686623 * ldlang.c (lang_output_section_statement_lookup_1): Don't cast a
unary & address operator, as that breaks GCC's strict aliasing
rules.
2005-07-28 20:08:15 +00:00
Ben Elliston c8c140d941 * lib/ld-lib.exp (run_ld_link_exec_tests): Add new parameter
${targets_to_xfail} that is applied for each test item.
	* ld-elf/elf.exp: Pass *-*-netbsdelf* as an xfailed target.
2005-07-27 21:29:12 +00:00
Alan Modra 9d6404037f * ld-elfweak/size2a.s: Extend test to check size for two weaks.
* ld-elfweak/size2b.s: Likewise.
	* ld-elfweak/size2.d: Update.
2005-07-27 00:08:40 +00:00
H.J. Lu 3b22753a67 bfd/
2005-07-25  Jan Hubicka  <jh@suse.cz>
	    H.J. Lu  <hongjiu.lu@intel.com>

	* elf-bfd.h (_bfd_elf_large_com_section): New.
	* elf.c (_bfd_elf_large_com_section): New. Defined.

	* elf64-x86-64.c (elf64_x86_64_add_symbol_hook): New.
	(elf64_x86_64_elf_section_from_bfd_section): New.
	(elf64_x86_64_symbol_processing): New.
	(elf64_x86_64_common_definition): New.
	(elf64_x86_64_common_section_index): New.
	(elf64_x86_64_common_section): New.
	(elf64_x86_64_merge_symbol): New.
	(elf64_x86_64_additional_program_headers): New.
	(elf64_x86_64_special_sections): New.
	(elf_backend_section_from_bfd_section): New. Defined.
	(elf_backend_add_symbol_hook): Likewise.
	(elf_backend_common_section_index): Likewise.
	(elf_backend_common_section): Likewise.
	(elf_backend_common_definition): Likewise.
	(elf_backend_merge_symbol): Likewise.
	(elf_backend_special_sections): Likewise.
	(elf_backend_additional_program_headers): Likewise.

binutils/

2005-07-25  H.J. Lu  <hongjiu.lu@intel.com>

	* readelf.c (dump_relocations): Handle SHN_X86_64_LCOMMON.
	(get_symbol_index_type): Likewise.
	(get_elf_section_flags): Handle SHF_X86_64_LARGE.

gas/

2005-07-25  Jan Hubicka  <jh@suse.cz>
	    H.J. Lu  <hongjiu.lu@intel.com>

	* config/obj-elf.c: Include "elf/x86-64.h" if TC_I386 is
	defined.
	(elf_com_section_ptr): New.
	(elf_begin): Set elf_com_section_ptr to bfd_com_section_ptr.
	(elf_common_parse): Make it global. Use elf_com_section_ptr
	instead of bfd_com_section_ptr.
	(obj_elf_change_section): Handle x86-64 large bss sections.

	* config/obj-elf.h (elf_com_section_ptr): New.
	(elf_common_parse): New.

	* config/tc-i386.c (handle_large_common): New.
	(md_pseudo_table): Add "largecomm".
	(x86_64_section_letter): New.
	(x86_64_section_word): New.

	* config/tc-i386.h (x86_64_section_word): New.
	(x86_64_section_letter): New.
	(md_elf_section_letter): New. Defined.
	(md_elf_section_word): Likewise.

include/elf/

2005-07-25  Jan Hubicka  <jh@suse.cz>

	* x86-64.h (SHN_X86_64_LCOMMON): New.
	(SHF_X86_64_LARGE): New.

ld/

2005-07-25  Jan Hubicka  <jh@suse.cz>
	    H.J. Lu  <hongjiu.lu@intel.com>

	* emulparams/elf_x86_64.sh (LARGE_SECTIONS): New.

	* scripttempl/elf.sc: Updated for large section support.
2005-07-25 15:41:08 +00:00
Nick Clifton 9f971fcbd4 Remove special case handling for rtems targets that are sufficiently handled by
the default rtems targets.
2005-07-22 10:34:30 +00:00
Ben Elliston 71f51525ec * ldgram.y (ldgram_want_filename): Remove unused static. 2005-07-21 07:59:10 +00:00
DJ Delorie fe77349403 * emulparams/elf32m32c.sh (TEMPLATE_NAME): New.
(EXTRA_EM_FILE): New.
2005-07-20 19:33:18 +00:00
H.J. Lu 0e1b44bada 2005-07-19 H.J. Lu <hongjiu.lu@intel.com>
* ldmain.c (main): Reindent.
2005-07-19 21:41:03 +00:00
Paul Brook a3540342ed 2005-07-19 Paul Brook <paul@codesourcery.com>
* configure.host (HOSTING_CRT0): Parse output of gcc --help --verbose
	to determine dynamic linker name.
2005-07-19 12:43:19 +00:00
Nick Clifton 85da3a565d Add ChangeLog entries for yesterdays deltas (oops!) 2005-07-19 10:01:32 +00:00
Nick Clifton e729279b04 Fix building for MS1 and M32C.
Restore alpha- sorting to the architecture tables.
2005-07-18 14:13:36 +00:00
Jan Beulich ac2aa337d3 bfd/
2005-07-18  Jan Beulich  <jbeulich@novell.com>

	* elf32-i386.c (elf_howto_table): Adjust overflow complaint handler
	for R_386_PC16.
	* elf64-x86-64.c (x86_64_elf_howto_table): Adjust overflow complaint
	handler for R_X86_64_PC16, R_X86_64_8, and R_X86_64_DTPOFF.

ld/testsuite/
2005-07-18  Jan Beulich  <jbeulich@novell.com>

	* ld-i386/abs.s, ld-i386/zero.s, ld-i386/abs.d, ld-x86-64/abs.d,
	ld-i386/pcrel16.s, ld-i386/pcrel16.d, ld-x86-64/pcrel16.d,
	ld-i386/pcrel8.s, ld-i386/pcrel8.d, ld-x86-64/pcrel8.d: New.
	* ld-i386/i386.exp, ld-x86-64/x86-64.exp: Run new tests.
2005-07-18 06:23:40 +00:00
Alan Modra 42fa7765a2 bfd/
* 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.
2005-07-16 03:30:24 +00:00
Alan Modra 0f82ff91a0 bfd/
* Makefile.am: Run "make dep-am".
	* Makefile.in: Regenerate.
opcodes/
	* Makefile.am: Run "make dep-am".
	(stamp-m32c): Fix cpu dependencies.
	* Makefile.in: Regenerate.
	* ip2k-dis.c: Regenerate.
binutils/
	* Makefile.am: Run "make dep-am".
	* Makefile.in: Regenerate.
gas/
	* Makefile.am: Run "make dep-am".
	* Makefile.in: Regenerate.
ld/
	* Makefile.am: Run "make dep-am".
	(emipsidt.c, emipsidtl.c): Depend on generic.em.
	* Makefile.in: Regenerate.
2005-07-16 02:03:55 +00:00
Alan Modra 5e797c2c67 * ldemul.c (ldemul_do_assignments): New function.
(do_assignments_default): New function.
	* ldemul.h (ldemul_do_assignments): Declare.
	(do_assignments_default): Declare.
	(struct ld_emulation_xfer_struct): Add do_assignments.
	* ldlang.c (lang_do_assignments) Call ldemul_do_assignments.
	* emultempl/aix.em (ld_*_emulation): Init do_assignments field.
	* 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, to call gld*_provide_init_fini_syms.
	(gld*_find_exp_assignment): Adjust bfd_elf_record_link_assignment call.
2005-07-15 12:19:15 +00:00
Jim Blandy 49f58d10f8 ChangeLog:
2005-07-14  Jim Blandy  <jimb@redhat.com>

	* configure.in: Add cases for Renesas m32c.
	* configure: Regenerated.

bfd/ChangeLog:
2005-07-14  Jim Blandy  <jimb@redhat.com>

	Add support for m32c-*-elf (Renesas m32c and m16c).
	* Makefile.am (ALL_MACHINES): Add cpu-m32c.lo.
	(ALL_MACHINES_CFILES): Add cpu-m32c.c.
	(BFD32_BACKENDS): Add elf32-m32c.lo.
	(BFD32_BACKENDS_CFILES): Add elf32-m32c.c.
	(cpu-m32c.lo, elf32-m32c.lo): New rules, generated by 'make dep-am'.
	* Makefile.in: Regenerated.
	* archures.c (bfd_arch_m32c, bfd_mach_m16c, bfd_mach_m32c): New
	arch and mach codes.
	(bfd_m32c_arch): New arch info object.
	(bfd_archures_list): List bfd_m32c_arch.
	* bfd-in2.h: Regenerated.
	* config.bfd: Add case for the m32c.
	* configure.in: Add case for the m32c.
	* configure: Regenerated.
	* cpu-m32c.c, elf32-m32c.c: New files.
	* libbfd.h: Regenerated.
	* targets.c (bfd_elf32_m32c_vec): Declare.
	(_bfd_target_vector): List bfd_elf32_m32c_vec.

binutils/ChangeLog:
2005-07-14  Jim Blandy  <jimb@redhat.com>

	* readelf.c: #include "elf/m32c.h"
	(guess_is_rela, dump_relocations, get_machine_name): Add cases for
	EM_M32C.
	* Makefile.am (readelf.o): Update dependencies.
	* Makefile.in: Regenerated.

cpu/ChangeLog:
2005-07-14  Jim Blandy  <jimb@redhat.com>

	* m32c.cpu, m32c.opc: Machine description for the Renesas M32C.

gas/ChangeLog:
2005-07-14  Jim Blandy  <jimb@redhat.com>

	Add support for the Renesas M32C.
	* Makefile.am (CPU_TYPES): List m32c.
	(TARGET_CPU_CFILES): List config/tc-m32c.c.
	(TARGET_CPU_HFILES): List config/tc-m32c.h.
	* configure.in: Add case for m32c.
	* configure.tgt: Add cases for m32c and m32c-*-elf.
	* configure: Regenerated.
	* config/tc-m32c.c, config/tc-m32c.h: New files.
	* doc/Makefile.am (CPU_DOCS): Add c-m32c.texi.
	* doc/Makefile.in: Regenerated.
	* doc/all.texi: Set M32C.
	* doc/as.texinfo: Add text for the M32C-specific options and line
	comment characters, and refer to c-m32c.texi.
	* doc/c-m32c.texi: New file.

include/ChangeLog:
2005-07-14  Jim Blandy  <jimb@redhat.com>

	* dis-asm.h (print_insn_m32c): New declaration.

include/elf/ChangeLog:
2005-07-14  Jim Blandy  <jimb@redhat.com>

	Add support for Renesas M32C and M16C.
	* common.h (EM_M32C): New machine number.
	* m32c.h: New file.

ld/ChangeLog:
2005-07-14  Jim Blandy  <jimb@redhat.com>

	Add support for the Renesas M32C and M16C.
	* Makefile.am (ALL_EMULATIONS): Add eelf32m32c.o.
	(eelf32m32c.c): New target.
	* Makefile.in: Regenerated.
	* configure.tgt: Add case for m32c-*-elf.
	* emulparams/elf32m32c.sh: New file.

opcodes/ChangeLog:
2005-07-14  Jim Blandy  <jimb@redhat.com>

	Add support for the Renesas M32C and M16C.
	* m32c-asm.c, m32c-desc.c, m32c-dis.c, m32c-ibld.c, m32c-opc.c: New.
	* m32c-desc.h, m32c-opc.h: New.
	* Makefile.am (HFILES): List m32c-desc.h and m32c-opc.h.
	(CFILES): List m32c-asm.c, m32c-desc.c, m32c-dis.c, m32c-ibld.c,
	m32c-opc.c.
	(ALL_MACHINES): List m32c-asm.lo, m32c-desc.lo, m32c-dis.lo,
	m32c-ibld.lo, m32c-opc.lo.
	(CLEANFILES): List stamp-m32c.
	(M32C_DEPS): List stamp-m32c, if CGEN_MAINT.
	(CGEN_CPUS): Add m32c.
	(m32c-asm.c, m32c-desc.c, m32c-dis.c, m32c-ibld.c, m32c-opc.c)
	(m32c-desc.h, m32c-opc.h): Depend on M32C_DEPS.
	(m32c_opc_h): New variable.
	(stamp-m32c, m32c-asm.lo, m32c-desc.lo, m32c-dis.lo, m32c-ibld.lo)
	(m32c-opc.lo): New rules.
	* Makefile.in: Regenerated.
	* configure.in: Add case for bfd_m32c_arch.
	* configure: Regenerated.
	* disassemble.c (ARCH_m32c): New.
	[ARCH_m32c]: #include "m32c-desc.h".
	(disassembler) [ARCH_m32c]: Add case for bfd_arch_m32c.
	(disassemble_init_for_target) [ARCH_m32c]: Same.

	* cgen-ops.h, cgen-types.h: New files.
	* Makefile.am (HFILES): List them.
	* Makefile.in: Regenerated.
2005-07-14 22:52:28 +00:00
H.J. Lu 22ec3bd171 2005-07-14 H.J. Lu <hongjiu.lu@intel.com>
* lib/ld-lib.exp (run_ld_link_exec_tests): Ignore assembler
	warnings.
2005-07-14 18:42:01 +00:00
H.J. Lu 955057fccb 2005-07-14 H.J. Lu <hongjiu.lu@intel.com>
* lib/ld-lib.exp (run_ld_link_exec_tests): Update comments.
2005-07-14 17:09:48 +00:00
H.J. Lu 24edc24dbe 2005-07-14 H.J. Lu <hongjiu.lu@intel.com>
* ld-elf/elf.exp (array_tests): New.
	Call run_ld_link_exec_tests with array_tests.

	* ld-elf/fini.c: New file.
	* ld-elf/fini.out: Likewise.
	* ld-elf/init.c: Likewise.
	* ld-elf/init.out: Likewise.
	* ld-elf/preinit.c: Likewise.
	* ld-elf/preinit.out: Likewise.

	* lib/ld-lib.exp (run_ld_link_exec_tests): New.
2005-07-14 17:02:11 +00:00
Alan Modra a3c2b96af6 bfd/
* 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.
2005-07-14 13:54:23 +00:00
Alan Modra 2910ae9649 * ld-powerpc/sdalib.s (lib_var): Size it. 2005-07-12 12:08:11 +00:00
Nick Clifton 438361cd2f Remove sparc*-*-rtemsaout*, i[3-7]86-go32-rtems*, i[3-7]86-*-rtemscoff*,
hppa*-*-rtems*, mips*el-*-rtems*, powerpcle-*-rtems*.
2005-07-11 07:43:53 +00:00
Christopher Faylor 2c7fd14a3b * emultempl/pe.em (gld_${EMULATION_NAME}_before_parse): Enable runtime
relocation by default.
(compute_dll_image_base): Avoid linking into cygwin dll address space.
2005-07-10 01:33:13 +00:00
H.J. Lu 3403418e49 2005-07-08 H.J. Lu <hongjiu.lu@intel.com>
* ld-ia64/tlsbin.rd: Update for empty section removal change.
	* ld-ia64/tlsbin.sd: Likewise.
	* ld-ia64/tlspic.dd: Likewise.
	* ld-ia64/tlspic.rd: Likewise.
	* ld-ia64/tlspic.sd: Likewise.
	* ld-x86-64/tlspic.dd: Likewise.
	* ld-x86-64/tlspic.rd: Likewise.
2005-07-08 16:20:24 +00:00
Alan Modra f6ac761239 * ld-cris/pv32.s: Give expobj a size.
* ld-cris/pv32-1.d: Update.
	* ld-alpha/tlsbin.dd: Update for empty section removal change.
	* ld-alpha/tlsbin.sd: Likewise.
	* ld-alpha/tlsbin.td: Likewise.
	* ld-alpha/tlsbinr.dd: Likewise.
	* ld-alpha/tlsbinr.rd: Likewise.
	* ld-alpha/tlspic.dd: Likewise.
	* ld-alpha/tlspic.rd: Likewise.
	* ld-alpha/tlspic.sd: Likewise.
	* ld-alpha/tlspic.td: Likewise.
	* ld-arm/tls-lib.d: Likewise.
	* ld-arm/tls-lib.r: Likewise.
	* ld-cris/gotplt2.d: Likewise.
	* ld-cris/gotplt3.d: Likewise.
	* ld-cris/hiddef1.d: Likewise.
	* ld-cris/libdso-10.d: Likewise.
	* ld-cris/libdso-11.d: Likewise.
	* ld-cris/libdso-12.d: Likewise.
	* ld-cris/libdso-14.d: Likewise.
	* ld-cris/libdso-2.d: Likewise.
	* ld-i386/tlsnopic.dd: Likewise.
	* ld-i386/tlsnopic.rd: Likewise.
	* ld-i386/tlsnopic.sd: Likewise.
	* ld-i386/tlspic.rd: Likewise.
	* ld-mmix/bpo-10.d: Likewise.
	* ld-mmix/bpo-22.d: Likewise.
	* ld-mmix/sec-7m.d: Likewise.
	* ld-powerpc/tlsexe.r: Likewise.
	* ld-powerpc/tlsexetoc.r: Likewise.
	* ld-powerpc/tlsso.g: Likewise.
	* ld-powerpc/tlsso.r: Likewise.
	* ld-powerpc/tlsso32.d: Likewise.
	* ld-powerpc/tlsso32.g: Likewise.
	* ld-powerpc/tlsso32.r: Likewise.
	* ld-powerpc/tlstocso.g: Likewise.
	* ld-powerpc/tlstocso.r: Likewise.
2005-07-08 06:22:04 +00:00
Alan Modra 32124d5bbf * ldlang.c (wild_sort): Formatting.
(strip_excluded_output_sections): Strip zero size sections here.
	* emultempl/elf32.em (gld*_strip_empty_sections): Delete.
	(gld*_finish): Don't call the above.
	* emultempl/hppaelf.em (hppaelf_finish): Likewise.
	* emultempl/ppc64elf.em (ppc_finish): Likewise.
2005-07-08 06:20:16 +00:00
H.J. Lu 4cd5aacc4b Fix the date of the last checkin. 2005-07-07 15:08:20 +00:00
Paul Brook 9d8504b17f 2005-05-07 Paul Brook <paul@codesourcery.com>
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.
2005-07-05 13:25:56 +00:00
Nick Clifton 35eb9fb631 (GENERATE_PIE_SCRIPT): Define as "yes". 2005-07-05 12:17:55 +00:00
Nick Clifton 5b5a4ec726 Fix typo 2005-07-04 14:36:02 +00:00
Nick Clifton 80447b21a9 m32r-linux-ld support for position independent executables 2005-07-04 13:54:36 +00:00
Alan Modra 711c0baa9d * emultempl/elf32.em: Enable use of ld.so.conf for *-*-k*bsd-*. 2005-07-04 04:04:19 +00:00
Alan Modra c8c9c2972e * scripttempl/elf.sc (.gcc_except_table): Don't KEEP. 2005-07-01 01:55:01 +00:00
Ben Elliston b753922c0b * Makefile.am (check-DEJAGNU): Don't search for expect.
* Makefile.in: Regenerate.
2005-06-30 00:54:06 +00:00
Ben Elliston c329887411 * Makefile.am (EXPECT): Set to expect.
(RUNTEST): Likewise, set to runtest.
	* Makefile.in: Regenerate.
2005-06-29 20:30:00 +00:00
Andreas Schwab aa20706882 * ld-elfweak/size_foo.c (foo): Fix warning about implicit return
type.
2005-06-23 11:36:22 +00:00
Nick Clifton a82644e225 Add quotes to avoid a null test expression. 2005-06-16 09:46:10 +00:00
Daniel Jacobowitz e185dd5153 * ld.texinfo (Command Line Options): Add @item for --hash-size. 2005-06-12 18:38:39 +00:00
Alan Modra 0df40b5e49 * ld-cris/libdso-10.d: Adjust for elf.sc .bss change.
* ld-cris/libdso-2.d: Likewise.
	* ld-mmix/loc6.d: Likewise.
2005-06-10 07:28:57 +00:00
Alan Modra bdd87c7744 * ld-scripts/empty-aligned.t: Adjust alignment expressions so
that no .text? section is kept.  Also check setting vma and
	lma.
	* ld-scripts/empty-aligned.d: Update.
2005-06-10 00:44:01 +00:00
Alan Modra 80f5644900 remove conflict indicator 2005-06-10 00:41:30 +00:00
Alan Modra 9d12f64cdc * scripttempt/elf.sc (.bss): Align tail in a way that allows
empty section pruning.
2005-06-10 00:39:56 +00:00
Jim Wilson 502bdb00ee configure clean up patch from Steve Ellcey.
* configure.in (AM_BINUTILS_WARNINGS): Add.
(BFD_NEED_DECLARATION) Replace with AC_CHECK_DECLS.
* config.in: Regenerate.
* configure: Regenerate.
* sysdep.h (NEED_DECLARATION_*): Replace with HAVE_DECL_*
* ldmain.c: Ditto.
2005-06-09 18:39:34 +00:00
Alan Modra dea2f0a859 * ldexp.c (fold_unary <ALIGN_K>): Revert last change. 2005-06-09 02:59:57 +00:00
Alan Modra 6e81d46e50 * ld-scripts/empty-aligned.d: Adjust. 2005-06-09 02:06:58 +00:00
Alan Modra e9ee469ad1 * ld.h (lang_phase_type): Move to..
* ldexp.h: ..here.  Add lang_mark_phase_enum.
	(node_type): Remove etree_undef and etree_unspec.
	(exp_data_seg): Delete.
	(struct ldexp_control, expld): New.
	(invalid, exp_mark_used_section): Delete.
	(exp_fold_tree, exp_get_vma, exp_get_value_int, exp_get_fill,
	exp_get_abs_int): Update prototypes.
	* ldexp.c (assigning_to_dot): Delete.
	(expld): Define.
	(make_abs): Operate directly on expld.result.  Update all callers.
	(new_abs): Likewise.  Return void.
	(new_rel_from_abs): Rename from new_rel_from_section.
	(new_rel, new_rel_from_abs): Operate on expld.result and return void.
	Update all callers.
	(fold_unary): Operate on expld.result and return void.  Remove
	"current_section", "allocation_done", "dot", "dotp" and "mark_used"
	params.  Update all callers.
	(fold_binary, fold_trinary, fold_name, exp_fold_tree_1): Likewise.
	(fold_unary <ALIGN_K>): Ensure alignment is absolute.
	(fold_unary <ABSOLUTE>): Use make_abs.
	(fold_unary <DATA_SEGMENT_END>): Evaluate mark_phase as for
	allocating_phase.
	(fold_binary <DATA_SEGMENT_ALIGN, DATA_SEGMENT_RELRO_END, >): Ditto.
	(fold_binary <'%','/'>): Don't error if marking.
	(fold_name <SIZEOF_HEADERS>): Don't call bfd_sizeof_headers when
	marking.
	(fold_name <NAME>): Remove FIXME; -R is handled correctly.  Don't
	error when marking.
	(fold_name <ADDR, LOADADDR, SIZEOF>): Don't set SEC_KEEP.
	(exp_fold_tree_1): Don't error when marking.
	(exp_fold_tree_1 <etree_rel>): Evaluate in all phases except first.
	(exp_fold_tree_1 <etree_assign to dot>): Don't check for NULL
	current section, instead check for NULL dotp.
	(exp_fold_tree_1 <etree_provide>): Don't evaluate the assignment
	source unless the symbol is referenced and undefined.
	(exp_fold_tree): Remove "allocation_done" and "dot" params.  Save
	params to expld.
	(exp_fold_tree_no_dot): Remove "current_section", "allocation_done
	and "mark_used" params.  Save params to expld.  Update all callers.
	(exp_assop): Do without temp var.
	(exp_print_tree <etree_undef>): Delete code.
	(exp_get_vma): Remove "allocation_done" param.  Correct error return.
	(exp_get_fill, exp_get_abs_int): Likewise.
	(exp_get_value_int): Remove "allocation_done" param.
	(exp_mark_used_section): Delete.
	* ldgram.y (fill_exp): Update exp_get_fill call.
	(origin_spec, length_spec): Update exp_get_vma call.
	* ldlang.c (lang_init): Don't bother clearing lang_statement_iteration.
	(lang_mark_used_section_1, lang_mark_used_section): Delete.
	(strip_excluded_output_sections): Call one_lang_size_sections_pass in
	marking mode.  Merge old lang_mark_used_section code.  Correct handling
	of output sections with excluded input sections and data statements.
	Don't drop non-zero sized sections.  Don't zap os->bfd_section.
	Do set SEC_EXCLUDE when appropriate.
	(print_output_section_statement): Update for changed ldexp.c
	interface.
	(print_assignment, lang_size_sections_1): Likewise.
	(lang_do_assignments_1, lang_enter_output_section_statement): Likewise.
	(lang_new_phdr, lang_record_phdrs): Likewise.
	(lang_size_sections): Likewise.
	(insert_pad): Use following statement if it is a pad, rather than
	creating a new one.
	(lang_size_sections_1 <lang_output_section_statement_enum>): Do
	process ignored output section to set vma and lma, but don't
	update dot for these sections.  Don't error if marking.
	(lang_size_sections_1 <lang_assignment_statement_enum>): Don't
	update dot for ignored sections.
	(lang_size_sections_1 <lang_data_statement_enum>): Don't mark absolute
	section with SEC_ALLOC.
	(one_lang_size_sections_pass): New function.
	(lang_size_sections): Remove first five params.  Set expld.phase on
	entry and exit.   Use one_lang_size_sections_pass.
	(lang_do_assignments): Remove all params.  Update all callers.
	(lang_reset_memory_regions): Clear os->processed for all output
	section statements.
	* ldlang.h (lang_do_assignments): Update prototype.
	(lang_size_sections): Likewise.
	(one_lang_size_sections_pass): Declare.
	* pe-dll.c (pe_dll_fill_sections, pe_exe_fill_sections): Update
	lang_size_sections and lang_do_assignments calls.
	* emultempl/elf32.em (layout_sections_again): Likewise.
	* emultempl/ppc64elf.em (ppc_before_allocation): Use
	one_lang_size_sections_pass.
2005-06-09 02:05:47 +00:00
Aldy Hernandez b2be201308 * emulparams/elf32ms1.sh: New. 2005-06-08 13:03:24 +00:00
Eric Christopher a34e3ecb69 2005-06-07 Eric Christopher <echristo@redhat.com>
* Makefile.am (eelf32ms1.c): Use tab.
        * Makefile.in: Regenerate.

2005-06-07  Eric Christopher  <echristo@redhat.com>

        * readelf.c (guess_is_rela): Support ms1.
        (dump_relocations): Ditto.
        (get_machine_name): Ditto.
2005-06-07 23:56:50 +00:00
Aldy Hernandez 9e1f170fa9 * configure.tgt: Same.
* Makefile.am (ALL_EMULATIONS): Depend on eelf32ms1.o.
	(eelf32ms1.c): Add eelf32ms1.c rule.

	* Makefile.in: Regenerate.
2005-06-07 21:12:16 +00:00
Alan Modra b4f4e59fff bfd/
* elf64-pcc.c (ppc64_elf_gc_mark_hook): For the local sym in .opd
	case, include addend when indexing .opd section map.
	(ppc64_elf_edit_opd): Add no_opd_opt param.  Do nothing besides
	clear opd_adjust array if no_opd_opt set.  Tidy code.
	* elf64-ppc.h (ppc64_elf_edit_opd): Update prototype.
ld/
	* emultempl/ppc64elf.em (ppc_before_allocation): Always run
	ppc64_elf_edit_opd.
2005-06-06 12:59:59 +00:00
H.J. Lu 18b7982923 ld/
2005-06-05  H.J. Lu  <hongjiu.lu@intel.com>

	* ldexp.c (exp_mark_used_section): Set SEC_KEEP on current
	section only if the symbol will be defined.

ld/testsuite/

2005-06-05  H.J. Lu  <hongjiu.lu@intel.com>

	* ld-cris/hiddef1.d: Undo the last change.
	* ld-cris/libdso-10.d: Likewise.
	* ld-cris/libdso-2.d: Likewise.
2005-06-05 15:28:36 +00:00
H.J. Lu 00d8e0ea3e 2005-06-04 H.J. Lu <hongjiu.lu@intel.com>
* ld-cris/hiddef1.d: Updated.
	* ld-cris/libdso-10.d: Likewise.
	* ld-cris/libdso-2.d: Likewise.
2005-06-04 18:11:07 +00:00
H.J. Lu 079f985c5a 2005-06-04 H.J. Lu <hongjiu.lu@intel.com>
PR 992
	* ldexp.c (exp_mark_used_section): Set SEC_KEEP on current
	section for etree_assign, etree_provide and etree_provided.
	Call fold_binary on etree_binary.

	* ldlang.c (lang_mark_used_section_1): Handle load base.
2005-06-04 14:40:21 +00:00
Alan Modra e1fffbe6e9 include/
* bfdlink.h (struct bfd_link_callbacks): Add einfo.
bfd/
	* configure.in: Bump version
	* configure: Regenerate.
	* elflink.c (elf_link_input_bfd): Use einfo linker callback to print
	discarded section sym refs and kill linker output.
	* simple.c (simple_dummy_einfo): New function.
	(bfd_simple_get_relocated_section_contents): Init callbacks.einfo.
ld/
	* ldmain.c (link_callbacks): Add einfo.
	(add_archive_element): Use passed info, not link_info.
	(constructor_callback): Likewise.
	(reloc_overflow): Don't handle null bfd specially.
	(reloc_dangerous, unattached_reloc): Likewise.
	* ldmisc.c (vfinfo <B>): Print "ld generated" for null bfd.
	(vfinfo <C, D, G>): Handle null bfd.  Wrap comments.
2005-06-03 09:52:50 +00:00
Alan Modra b38b1562e1 * ld-powerpc/powerpc.exp (ppcelftests): Assemble sda test with -a32. 2005-06-02 14:30:03 +00:00
Alan Modra 408082ec18 * ldexp.h (etree_value_type): Use "asection *" in place of
"struct lang_output_section_statement_struct *" for "section".
	(exp_fold_tree): Likewise.
	(exp_mark_used_section): Likewise.
	* ldexp.c (new_rel, new_rel_from_section, fold_unary, fold_binary,
	fold_trinary, fold_name, exp_fold_tree_1, exp_fold_tree,
	exp_mark_used_section): Likewise for "current_section" param.
	(make_abs, new_abs, exp_binop, exp_unop, exp_get_vma, exp_get_fill,
	exp_get_abs_int): Adjust for above changes.
	* ldlang.c (lang_mark_used_section_1, print_assignment,
	lang_size_sections_1, lang_do_assignments_1): Likewise.
	* ldexp.c (fold_name): Init entire result struct.
2005-06-02 03:08:41 +00:00
Maciej W. Rozycki d0d3b2e89e * emulparams/elf32btsmip.sh: Unset DATA_ADDR. 2005-06-01 19:26:25 +00:00
Zack Weinberg a359509ed3 ld:
* ldlang.c (entry_symbol_default): New file-scope global.
	(lang_finish): Use it, not a hardwired "start".
	(lang_default_entry): Set it.
	* ldlang.h: Declare lang_default_entry.
	* emultempl/beos.em, emultempl/pe.em: Use lang_default_entry,
	not lang_add_entry, to override default entry point symbol.

ld/testsuite:
	* ld-scripts/align.exp: Mark align1 XFAIL on PECOFF targets.
	* ld-scripts/data.exp: Mark data UNSUPPORTED on a.out targets.
	* ld-scripts/provide.exp, ld-scripts/size.exp: Mark all tests
	UNSUPPORTED on a.out targets.  Tidy.
2005-06-01 04:04:19 +00:00
Richard Henderson 8d6d53d427 * emulparams/elf64alpha.sh (PLT): New.
(TEXT_PLT): New.
        * emultempl/alphaelf.em (disable_relaxation): New.
        (limit_32bit): Rename from elf64alpha_32bit; update all users.
        (elf64_alpha_use_secureplt): Declare.
        (bfd_elf64_alpha_vec, bfd_elf64_alpha_freebsd_vec): Declare.
        (alpha_after_open): New.
        (alpha_before_allocation): New.
        (OPTION_NO_RELAX, OPTION_SECUREPLT, OPTION_NO_SECUREPLT): New.
        (PARSE_AND_LIST_LONGOPTS): Include them.
        (PARSE_AND_LIST_OPTIONS): Likewise.
        (PARSE_AND_LIST_ARGS_CASES): Likewise.
        (LDEMUL_AFTER_OPEN, LDEMUL_BEFORE_ALLOCATION): New.
        * scripttempl/elf.sc (TEXT_PLT): New.
        (PLT): Use it.
2005-05-29 23:16:09 +00:00
Mark Mitchell dae043d2cb * config/default.exp (CC): Use find_gcc.
(CFLAGS): Define, if no definition is provided.
	(CXX): Likewise.
	(CXXFLAGS): Likewise.
2005-05-27 17:27:03 +00:00
Andreas Schwab f93e81d68b * configure.host (HOSTING_LIBS): Add libunwind.a if it exists. 2005-05-26 22:23:15 +00:00
H.J. Lu c7e2e997e4 2005-05-24 H.J. Lu <hongjiu.lu@intel.com>
* ld-mmix/bpo-6.d: Updated.
	* ld-mmix/bpo-19.d: Likewise.
2005-05-25 06:49:53 +00:00
Alan Modra 61f8ebf259 * emultempl/ppc32elf.em (after_allocation): Don't call
ppc_elf_set_sdata_syms when relocatable.
2005-05-24 00:27:58 +00:00
Richard Henderson 175ac04375 * ld-elfweak/dsow.dsym: Adjust for non-zero ST_OTHER.
* ld-elfweak/weak.dsym: Likewise.

        * ld-selective/selective.exp: Don't test alpha.
2005-05-22 21:02:19 +00:00
H.J. Lu 8b8036013c 2005-05-21 H.J. Lu <hongjiu.lu@intel.com>
* Makefile.am (ld.1): Revert the last 2 changes.
	(info-recursive): Depend on ld.1.
	* Makefile.in: Regenerated.
2005-05-21 23:43:59 +00:00
H.J. Lu e366efef9b 2005-05-21 H.J. Lu <hongjiu.lu@intel.com>
* Makefile.am (ld.1): Depend on "info" instead of
	"configdoc.texi ldver.texi".
	* Makefile.in: Regenerated.
2005-05-21 22:22:20 +00:00
H.J. Lu abf32a893c 2005-05-21 H.J. Lu <hongjiu.lu@intel.com>
* Makefile.am (ld.1): Depend on "info".
	* Makefile.in: Regenerated.
2005-05-21 21:31:13 +00:00
Daniel Jacobowitz 4dc4a9a515 bfd/
* 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.
2005-05-20 21:57:12 +00:00
Bob Wilson 3974a4b6b0 * ld-undefined/undefined.exp: Revert xfail for xtensa-*-*. 2005-05-20 19:09:54 +00:00
Zack Weinberg e3e71e27a4 * bfd/Makefile.am, binutils/Makefile.am, etc/Makefile.in
* gas/Makefile.am: Have 'all' depend on 'info'.
	* ld/Makefile.am: Have 'all' depend on 'info' and 'ld.1'.
	* bfd/Makefile.in, binutils/Makefile.in, gas/Makefile.in
	* ld/Makefile.in: Regenerate.
2005-05-19 23:49:52 +00:00
Zack Weinberg c19d120533 include/elf:
* arm.h: Import complete list of official relocation names
	and numbers from AAELF.  Define FAKE_RELOCs for old names.
	Remove a few old names no longer used anywhere.

bfd:
	* elf32-arm.c: Wherever possible, use official reloc names
	from AAELF.
	(elf32_arm_howto_table, elf32_arm_tls_gd32_howto)
	(elf32_arm_tls_ldo32_howto, elf32_arm_tls_ldm32_howto)
	(elf32_arm_tls_le32_howto, elf32_arm_tls_ie32_howto)
	(elf32_arm_vtinherit_howto, elf32_arm_vtentry_howto)
	(elf32_arm_pc11_howto, elf32_arm_thm_pc9_howto, elf32_arm_got_prel)
	(elf32_arm_r_howto): Replace with elf32_arm_howto_table_1,
	elf32_arm_howto_table_2, and elf32_arm_howto_table_3.
	Add many new relocations from AAELF.
	(elf32_arm_howto_from_type): Update to match.
	(elf32_arm_reloc_map): Add entries for R_ARM_THM_JUMP24,
	R_ARM_THM_JUMP11, R_ARM_THM_JUMP19, R_ARM_THM_JUMP8,
	R_ARM_THM_JUMP6, R_ARM_GNU_VTINHERIT, and R_ARM_GNU_VTENTRY.
	(elf32_arm_reloc_type_lookup): Use elf32_arm_howto_from_type.
	(elf32_arm_final_link_relocate): Add support for
	R_ARM_THM_JUMP24, R_ARM_THM_JUMP19, R_ARM_THM_JUMP6.  Remove
	case entries redundant with default.

	* reloc.c: Reorganize ARM relocations.  Add Thumb
	assembler-internal relocations BFD_RELOC_ARM_T32_OFFSET_U8,
	BFD_RELOC_ARM_T32_OFFSET_IMM, BFD_RELOC_ARM_T32_IMMEDIATE.
	Add visible relocations BFD_RELOC_THUMB_PCREL_BRANCH7,
	BFD_RELOC_THUMB_BRANCH20, BFD_RELOC_THUMB_BRANCH25.
	Delete unused relocations BFD_RELOC_ARM_GOT12, BFD_RELOC_ARM_COPY.
	* bfd-in2.h, libbfd.h: Regenerate.

opcodes:
	* arm-dis.c (thumb_opcodes): Add disassembly for V6T2 16-bit
	instructions.  Adjust disassembly of some opcodes to match
	unified syntax.
	(thumb32_opcodes): New table.
	(print_insn_thumb): Rename print_insn_thumb16; don't handle
	two-halfword branches here.
	(print_insn_thumb32): New function.
	(print_insn): Choose among print_insn_arm, print_insn_thumb16,
	and print_insn_thumb32.  Be consistent about order of
	halfwords when printing 32-bit instructions.

gas:
	* hash.c (hash_lookup): Add len parameter.  All callers changed.
	(hash_find_n): New interface.
	* hash.h: Prototype hash_find_n.
	* sb.c: Include as.h.
	(scrub_from_sb, sb_to_scrub, scrub_position): New statics.
	(sb_scrub_and_add_sb): New interface.
	* sb.h: Prototype sb_scrub_and_add_sb.
	* input-scrub.c (input_scrub_include_sb): Use sb_scrub_and_add_sb.

	* config/tc-arm.h (TC_FORCE_RELOCATION_LOCAL): Remove
	reference to BFD_RELOC_ARM_GOT12 which is never generated.
	* config/tc-arm.c: Rewrite, adding Thumb-2 support.

gas/testsuite:
	* gas/arm/arm.exp: Convert all existing "gas_test" tests to
	"run_dump_test" tests.  Run more tests unconditionally.  Run new tests.
	* gas/arm/arch4t.s, gas/arm/arch6zk.s, gas/arm/arm3.s, gas/arm/arm6.s
	* gas/arm/arm7dm.s, gas/arm/bignum1.s, gas/arm/float.s
	* gas/arm/immed.s, gas/arm/iwmmxt.s, gas/arm/offset.s, gas/arm/thumb.s:
	Adjust to work as a dump test.
	* gas/arm/arch4t.d, gas/arm/arch6zk.d, gas/arm/arm3.d, gas/arm/arm6.d
	* gas/arm/arm7dm.d, gas/arm/bignum1.d, gas/arm/float.d
	* gas/arm/immed.d, gas/arm/iwmmxt.d, gas/arm/offset.d, gas/arm/thumb.d:
	New files.

	* gas/arm/armv1-bad.l, gas/arm/armv1-bad.s: Remove tests for
	diagnostics that don't happen in the first pass anymore.

	* gas/arm/iwmmxt-bad.l, gas/arm/r15-bad.l, gas/arm/req.l
	* gas/arm/vfp-bad.l:
	Update expected diagnostics.
	* gas/arm/pic.d: Update expected reloc name.
	* gas/arm/thumbv6.d: CPY no longer appears in disassembly.
	* gas/arm/r15-bad.s: Avoid two-argument mul.
	* gas/arm/req.s: Adjust comments.
	* gas/arm/maverick.d, gas/arm/maverick.s: Avoid inappropriate
	use of PC.

	* gas/arm/macro-1.d, gas/arm/macro1.s
	* gas/arm/t16-bad.l, gas/arm/t16-bad.s
	* gas/arm/tcompat.d, gas/arm/tcompat.s
	* gas/arm/tcompat2.d, gas/arm/tcompat2.s
	* gas/arm/thumb32.d, gas/arm/thumb32.s
	New test pair.

ld/testsuite:
	* ld-arm/mixed-app.d: Adjust expected disassembly a little.
2005-05-18 05:40:12 +00:00
Daniel Jacobowitz 970c3dbce8 binutils/
* doc/Makefile.am (config.texi): Don't use $<.
	* doc/Makefile.in: Regenerated.
ld/
	* Makefile.am (ldver.texi): Don't use $<.
	* Makefile.in: Regenerated.
gas/
	* doc/Makefile.am (gasver.texi): Don't use $<.
	* doc/Makefile.in: Regenerated.
2005-05-17 19:43:52 +00:00
Daniel Jacobowitz 6e1b59d2fd * Makefile.am (AM_MAKEINFOFLAGS, TEXI2DVI): Explicitly include
$(srcdir) before $(BFDDIR)/doc.
	* Makefile.in: Regenerated.
2005-05-17 19:41:29 +00:00
H.J. Lu 75ff45898c bfd/
2005-05-17  H.J. Lu  <hongjiu.lu@intel.com>

	PR 797
	* elf32-i386.c (elf_i386_size_dynamic_sections): Also remove
	empty sdynbss section.
	* elf64-x86-64.c (elf64_x86_64_size_dynamic_sections): Likewise.

ld/

2005-05-17  H.J. Lu  <hongjiu.lu@intel.com>

	PR 797
	* ldexp.c (exp_fold_tree_1): Renamed from exp_fold_tree and
	take take a bfd_boolean, mark_used. Ignore assert failure if
	mark_used is TRUE.
	(exp_fold_tree) Call exp_fold_tree_1 with mark_used == FALSE.
	(exp_fold_tree_no_dot): Updated to take a bfd_boolean,
	mark_used and pass down.
	(fold_unary): Likewise.
	(fold_binary): Likewise.
	(fold_trinary): Likewise.
	(exp_binop): Add FALSE to call to exp_fold_tree_no_dot.
	(exp_trinop): Likewise.
	(exp_unop): Likewise.
	(exp_nameop): Likewise.
	(exp_get_vma): Likewise.
	(exp_get_fill): Likewise.
	(exp_get_abs_int): Likewise.
	(fold_name): Likewise. Set SEC_KEEP in output section flags.
	(exp_mark_used_section): New.

	* ldexp.h (exp_mark_used_section): New.

	* ldlang.c (lang_output_section_statement_lookup_1): Set the
	ignored field to FALSE.
	(lang_mark_used_section_1): New.
	(lang_mark_used_section): Call lang_mark_used_section_1.
	(strip_excluded_output_sections): Call lang_mark_used_section
	and check for unused sections.
	(lang_size_sections_1): Skip an output section if it should
	be ignored.
	(lang_do_assignments_1): Likewise.
	(lang_process): Don't call lang_mark_used_section here.

	* ldlang.h (lang_output_section_statement_type): Change
	all_input_readonly to bitfield. Add ignored.

ld/testsuite/

2005-05-17  H.J. Lu  <hongjiu.lu@intel.com>

	PR 797
	* empty-aligned.d: New file.
	* empty-aligned.exp: Likewise.
	* empty-aligned.s: Likewise.
	* empty-aligned.t: Likewise.
2005-05-17 16:43:02 +00:00
Nick Clifton 25ba8e7b96 (GENERATE_PIE_SCRIPT): Define as "yes". 2005-05-17 15:16:55 +00:00
Nick Clifton 10dbd1f36f ldlang.c (print_assignment): Do not rely upon a valid result having a section
associated with it.
elf32-arm.c (elf32_arm_final_link_relocate): Gracefully handle the situation
  where a symbols's section is not known but a section relative R_ARM_RELATIVE
  reloc has to be generated for the Symbian OS.
2005-05-17 14:39:18 +00:00
Nick Clifton 3b83e13a45 * ldlang.c (Scan_for_self_assignment): Check an assignment tree to
see if the same value is being used on the rhs as on the lhs.
	(print_assignment): Call scan_for_self_assignment and if it
	returns true, do no display the result of the computation but
	instead just the final value of the symbol on the lhs.
* ld.texinfo: Document this behaviour and provide an example of
	when it will happen.
2005-05-17 14:35:21 +00:00
Daniel Jacobowitz 42ecbf5eda ./
* ylwrap: Import from Automake 1.9.5.
binutils/
	* acinclude.m4: Remove obsolete code.
	* configure.in: Update AC_PREREQ.
	* doc/Makefile.am (binutils_TEXINFOS): Define.
	(config.texi): Depend on distributed files instead of built
	files.
	(binutils.dvi, binutils.info): Remove unnecessary rules.
	(DISTCLEANFILES): Remove.
	(install-data-local): Renamed from install.
	(info-local): Renamed from info.
	* Makefile.in, aclocal.m4, config.in, configure,
	doc/Makefile.in: Regenerated.
gas/
	* Makefile.am (m68k-parse.c, itbl-parse.c): Update ylwrap
	invocation.
	* Makefile.in: Regenerated.
ld/
	* Makefile.am (AM_MAKEINFOFLAGS): Define.
	(TEXI2DVI): Define.
	(ldver.texi): Depend on distributed files instead of built files.
	(ld.info): Include $(srcdir) in the rule target.  Remove actions.
	(ld.dvi): Remove actions.
	(MAINTAINERCLEANFILES): Add configdoc.texi.
	(CONFIG_STATUS_DEPENDENCIES): Add bfd/configure.in.
	(install-data-local): Renamed from install.
	(Makefile): Remove explicit dependency.
	* acinclude.m4: Remove obsolete code.
	* configure.in: Update AC_PREREQ.  Remove extra $CONFIG_SHELL.
	* Makefile.in, aclocal.m4, config.in, configure: Regenerated.
gdb/
	* Makefile.in (.y.c): Update ylwrap invocation.
2005-05-15 18:19:45 +00:00
Nick Clifton 75be928bd2 Update FSF addresses 2005-05-12 07:32:09 +00:00
Bob Wilson be2c2e39a9 * scripttempl/elfxtensa.sc: Sync up with elf.sc.
* emulparams/elf32xtensa.sh (PLT, GOT): Define.
2005-05-12 00:31:22 +00:00
Bob Wilson 34732de928 * ld-undefined/undefined.exp: xfail xtensa-*-*. 2005-05-11 20:52:43 +00:00
Alan Modra 0cf7d72c50 * ldgram.y: Add SPECIAL token.
(sect_constraint): Handle SPECIAL.
	* ldlang.c (lang_output_section_find_1): Don't match SPECIAL.
	(map_input_to_output_sections): Likewise.
	* ldlex.l (SPECIAL): Define.
	* emulparams/elf32ppc.sh (DATA_GOT, SDATA_GOT, SEPARATE_GOTPLT,
	GOT, PLT, GOTPLT): Define.
	* emultempl/ppc32elf.em (old_plt, old_got): New static vars.
	(ppc_after_open): New function.
	(PARSE_AND_LIST_PROLOGUE): Define OPTION_OLD_LPT and OPTION_OLD_GOT.
	(PARSE_AND_LIST_LONGOPTS): Add "bss-plt" and "sdata-got".
	(PARSE_AND_LIST_OPTIONS): Document them.
	(PARSE_AND_LIST_ARGS_CASES): Handle them.
	(LDEMUL_AFTER_OPEN): Define.
	* scripttempl/elf.sc (PLT): Don't override existing define.
	(DATA_GOT, SDATA_GOT): Define and use to enable alternate got
	placement rather than using NO_SMALL_DATA.  Emit GOTPLT for RELRO_NOW.
2005-05-11 14:10:10 +00:00
Alan Modra 4ca02259f7 * scripttempl/elf.sc (DATA_SEGMENT_RELRO_GOTPLT_END): Delete.
(DATA_SEGMENT_RELRO_END): Use SEPARATE_GOTPLT value.
	(GOTPLT): Remove DATA_SEGMENT_RELRO_GOTPLT_END.  Place after
	DATA_SEGMENT_RELRO_END in script.
2005-05-10 02:27:38 +00:00
H.J. Lu baf6e97fe3 2005-05-09 H.J. Lu <hongjiu.lu@intel.com>
* emultempl/elf32.em (gld${EMULATION_NAME}_provide_bound_symbols):
	Don't use a removed section.
2005-05-10 01:07:30 +00:00
H.J. Lu a6e1b90f78 2005-05-09 H.J. Lu <hongjiu.lu@intel.com>
* ldmain.c (reloc_overflow): Use output_bfd if the symbol
	is defined in the ABS section.
2005-05-10 01:06:04 +00:00
Alan Modra 3b36f7e629 bfd/
* 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-07 02:55:55 +00:00
H.J. Lu c18bae34de 2005-05-06 H.J. Lu <hongjiu.lu@intel.com>
* emultempl/elf32.em (gld${EMULATION_NAME}_provide_init_fini_syms):
	Put back !link_info.relocatable.
2005-05-07 02:14:21 +00:00
H.J. Lu 3f693ed581 Mention PR. 2005-05-06 15:42:02 +00:00
H.J. Lu 4ef24a2e9d 2005-05-06 H.J. Lu <hongjiu.lu@intel.com>
* emultempl/elf32.em (gld${EMULATION_NAME}_provide_init_fini_syms):
	Just check link_info.executable.
2005-05-06 15:40:24 +00:00
Nick Clifton e06fb9c30f Update the address and phone number of the FSF organization in the GPL notices 2005-05-06 08:26:58 +00:00
H.J. Lu 01d9ad14d4 bfd/
2005-05-05  H.J. Lu  <hongjiu.lu@intel.com>

	* elflink.c (_bfd_elf_provide_section_bound_symbols): Use
	"__bss_start" instead of "_edata" as fallback.

ld/

2005-05-05  H.J. Lu  <hongjiu.lu@intel.com>

	* scripttempl/elf.sc: Document the usage of __bss_start.
2005-05-05 16:40:11 +00:00
Paul Brook eac338cfd5 2005-05-05 Paul Brook <paul@codesourcery.com>
bfd/
	* config.bfd: Use bfd_elf32_i386_vxworks_vec for i?86-*-vxworks.
	* configure.in: Add bfd_elf32_i386_vxworks_vec. i386 targets need
	elf-vxworks.lo.
	* configure: Regenerate.
	* Makefile.am (BFD32_BACKENDS): Add elf-vxworks.lo.
	(BFD32_BACKENDS_CFILES): Add elf-vxworks.c.
	(elf32-i386.lo): Depend on elf-vxworks.h.
	(elf-vxworks.lo): New rule.
	* Makefile.in: Regenerate.
	* elf-bfd.h (elf_backend_data): Update type of
	elf_backend_emit_relocs.
	(_bfd_elf_link_output_relocs): Update prototype.
	* elflink.c (_bfd_elf_link_output_relocs): Always use
	bed->elf_backend_emit_relocs when outputting relocations.
	* elfxx-target.h (elf_backend_emit_relocs): Default to
	_bfd_elf_link_output_relocs.
	* targets.c (bfd_elf32_i386_vxworks_vec): Declare.
	(_bfd_target_vector): Add bfd_elf32_i386_vxworks_vec.
	* elf32-i386.c: Add elf32-i386-vxworks target BFD.
	(elf_i386_plt0_entry): Remove padding.
	(elf_i386_pic_plt0_entry): Ditto.
	(PLTRESOLVE_RELOCS_SHLIB, PLTRESOLVE_RELOCS): Define.
	(PLT_NON_JUMP_SLOT_RELOCS): Define.
	(elf_i386_link_hash_table): Add srelplt2, hgot, hplt, is_vxworks and
	plt0_pad_byte fields.
	(elf_i386_link_hash_table_create): Zero them.
	(elf_i386_create_dynamic_sections): Create static relocation section.
	(allocate_dynrelocs): Allocate space for static PLT relocations.
	(elf_i386_size_dynamic_sections): Save shortcuts to PLT and GOT
	symbols.  Give PLT symbols function type.  Don't strip PLT sections
	if we have exported symbols from them.
	(elf_i386_finish_dynamic_symbol): Fill in VxWorks PLT static
	relocation section.  Don't mark _GLOBAL_OFFSET_TABLE_ as absolute on
	VxWorks.
	(elf_i386_finish_dynamic_sections): Allow different pad bytes.
	Add relocation for GOT location.  Fill in PLT static relocations.
	(elf_i386_vxworks_link_hash_table_create): New function.
	(elf_i386_vxworks_link_output_symbol_hook): New function.
	* elf-vxworks.h: New file.
gas/
	* config/tc-i386.h (ELF_TARGET_FORMAT): Define for TE_VXWORKS.
gas/testsuite/
	* gas/i386/i386.exp: Don't run divide test on vxworks.
ld/
	* Makefile.am: Add eelf_i386_vxworks.
	* Makefile.in: Regenerate.
	* configure.tgt: Make i?86-*-vxworks use targ_emul=elf_i386_vxworks.
	* emulparams/elf_i386_vxworks.sh: New file.
	* emulparams/vxworks.sh: New file.
	* scripttempl/elf.sc: Add DATA_END_SYMBOLS and ETEXT_NAME.
2005-05-05 14:37:27 +00:00
Nick Clifton ee58dd1ec5 Replace linux-gnu with linux-* to allow for versions of Linux which do not use
glibc.
2005-05-05 10:29:16 +00:00
Paul Brook 5cfd5a0c98 2005-05-05 Paul Brook <paul@codesourcery.com>
gas/testsuite/
	* lib/gas-defs.exp (regexp_diff): Pass test if last line is "#...".
ld/testsuite/
	* lib/ld-lib.exp (regexp_diff): Pass test if last line is "#...".
	* ld-elfweak/elfweak.exp: Run size2.d.
	* ld-elfwaek/size2.d: New file.
	* ld-elfwaek/size2a.s: New file.
	* ld-elfwaek/size2b.s: New file.
2005-05-05 03:11:24 +00:00
H.J. Lu f652615e8c bfd/
2005-05-04  H.J. Lu  <hongjiu.lu@intel.com>

	* bfd-in.h (_bfd_elf_provide_section_bound_symbols): New.
	* bfd-in2.h: Regenerated.

	* elflink.c (bfd_elf_set_symbol): New.
	(_bfd_elf_provide_symbol): Call it.
	(_bfd_elf_provide_section_bound_symbols): New.

ld/

2005-05-04  H.J. Lu  <hongjiu.lu@intel.com>

	* emultempl/elf32.em (gld${EMULATION_NAME}_provide_bound_symbols):
	Call _bfd_elf_provide_section_bound_symbols.
2005-05-04 13:19:02 +00:00
Alan Modra 8423293d34 bfd/
* 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.
2005-05-04 11:00:28 +00:00
H.J. Lu 5daa8fe797 bfd/
2005-05-02  H.J. Lu  <hongjiu.lu@intel.com>

	* bfd.c (bfd): Remove section_tail and add section_last.
	(bfd_preserve): Likewise.
	(bfd_preserve_save): Likewise.
	(bfd_preserve_restore): Likewise.
	* opncls.c (_bfd_new_bfd): Likewise.

	* coffcode.h (coff_compute_section_file_positions): Updated.
	(coff_compute_section_file_positions): Likewise.
	* elf.c (assign_section_numbers): Likewise.
	* elf32-i370.c (i370_elf_size_dynamic_sections): Likewise.
	* elf64-mmix.c (mmix_elf_final_link): Likewise.
	* elfxx-ia64.c (elfNN_ia64_object_p): Likewise.
	* elfxx-mips.c (_bfd_mips_elf_link_hash_table_create): Likewise.
	* sunos.c (sunos_add_dynamic_symbols): Likewise.
	* xcofflink.c (_bfd_xcoff_bfd_final_link): Likewise.

	* ecoff.c (bfd_debug_section): Initialize prev.

	* section.c (bfd_section): Add prev.
	(bfd_section_list_remove): Updated.
	(bfd_section_list_append): New.
	(bfd_section_list_insert_after): New.
	(bfd_section_list_insert_before): New.
	(bfd_section_list_insert): Removed.
	(bfd_section_removed_from_list): Updated.
	(STD_SECTION): Initialize prev.
	(bfd_section_init): Updated.
	(bfd_section_list_clear): Updated.

	* bfd-in2.h: Regenerated.

gas/

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

	* write.c (write_object_file): Use bfd_section_double_list_remove
	to remove sections.

ld/

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

	* emultempl/elf32.em (gld${EMULATION_NAME}_strip_empty_section):
	Updated for bfd_section_list_remove change.
	* ldlang.c (lang_insert_orphan): Likewise.
	(strip_excluded_output_sections): Likewise.
	(sort_sections_by_lma): New.
	(lang_check_section_addresses): Sort the sections before
	checking addresses.
2005-05-03 01:05:03 +00:00
Daniel Jacobowitz 009b6a7aa9 * configure.tgt: Add h8300*-*-rtemscoff.
Switch h8300*-*-rtems* to elf.
2005-04-29 18:43:35 +00:00
Ben Elliston 279e75dcef * ldgram.y (lang_memory_region_type): Make static.
(ldgram_want_filename): Likewise.
	* ldemul.c (ld_emulation): Make static.
	* ldfile.h (ldfile_find_command_file): Remove extern.
	* ldfile.c (ldfile_find_command_file): Make static.
	* ldlang.h (unique_section_list): Remove extern declaration.
	* ldlang.c (unique_section_list): Make static.
	* mri.h (symbol_truncate): Remove extern declaration.
	* mri.c (symbol_truncate): Make static.
	(order, only_load, address, alias): Likewise.
	(alignment, subalignment): Likewise.
2005-04-28 23:54:33 +00:00
H.J. Lu 4a2afbc126 2005-04-27 H.J. Lu <hongjiu.lu@intel.com>
* emultempl/elf32.em (gld${EMULATION_NAME}_provide_bound_symbols):
	Use the first SEC_ALLOC section which isn't SEC_READONLY or the
	last SEC_ALLOC section if such a section doesn't exist.
2005-04-28 02:41:40 +00:00
Mark Kettenis 19dce67779 * ld-fastcall/fastcall.exp: Don't run on i*86-*-openbsd*. 2005-04-26 19:11:14 +00:00
Mark Kettenis 907dcf3f87 * ld-srec/srec.exp (run_srec_test): Deal with ProPolice on
*-*-openbsd*.
2005-04-26 18:56:50 +00:00
H.J. Lu 6d633fd282 bfd/
2005-04-25  H.J. Lu  <hongjiu.lu@intel.com>

	PR 858
	* elflink.c (elf_link_input_bfd): Make non-debugging reference
	to discarded section an error.

ld/testsuite/

2005-04-25  H.J. Lu  <hongjiu.lu@intel.com>

	* ld-discard/extern.d: Expect error.
	* ld-discard/start.d: Likewise.
	* ld-discard/static.d: Likewise.
2005-04-25 14:59:09 +00:00
Mark Kettenis fd9719b15b * configure.host: Add *-*-openbsd support. 2005-04-24 20:26:38 +00:00
Alan Modra c87b5a93b2 bfd/
* 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.
2005-04-19 05:44:55 +00:00
Julian Brown 33bfe77466 * bfd/bfd-in.h (bfd_elf32_arm_set_target_relocs): Update prototype.
* bfd/bfd-in2.h: Regenerate.
	* bfd/elf32-arm.c (elf32_arm_link_hash_table): New field, 'use_blx'.
	(elf32_arm_link_hash_table_create): Initialise fix_v4bx, use_blx.
	(bfd_elf32_arm_set_target_relocs): Handle use_blx.
	(elf32_arm_final_link_relocate): Use Thumb BLX for R_ARM_THM_PC22
	relocations if requested to.
	(allocate_dynrelocs): Don't count size of omitted Thumb stubs based on
	use_blx rather than symbian_p.
	(elf32_arm_finish_dynamic_symbol): Don't output Thumb PLT stubs if
	use_blx is in effect.
	(elf32_arm_symbian_link_hash_table_create): Enable use_blx by default
	for SymbianOS.
	* ld/ld.texinfo: Document --use-blx.
	* ld/emultempl/armelf.em (use_blx): New variable.
	(arm_elf_create_output_section_statements): Communicate value of
	use_blx to bfd.
	(PARSE_AND_LIST_PROLOGUE): Add OPTION_USE_BLX.
	(PARSE_AND_LIST_OPTIONS): Add --use-blx option.
	(PARSE_AND_LIST_ARGS_CASES): Add OPTION_USE_BLX case.
2005-04-15 16:37:47 +00:00
Alan Modra dcd5e84970 * ld-d10v/default_layout.d: Update for unused section removal. 2005-04-15 06:02:54 +00:00
Alan Modra 9e9b66a956 bfd/
* Makefile.am (NO_WERROR): Define.
	* warning.m4: New file
	* acinclude.m4: Include warning.m4.
	* configure.in: Invoke AM_BINUTILS_WARNINGS.
	* Makefile.in: Regenerate.
	* configure: Regenerate.
bfd/doc/
	* Makefile.in: Regenerate.
binutils/
	* Makefile.am (NO_WERROR): Define.  Use instead of -Wno-error.
	* configure.in: Include ../bfd/warning.m4 contents.
	* Makefile.in: Regenerate.
	* configure: Regenerate.
	* doc/Makefile.in: Regenerate.
gas/
	* Makefile.am (NO_WERROR): Define.  Use instead of -Wno-error.
	* acinclude.m4: Include ../bfd/warning.m4.
	* configure.in: Invoke AM_BINUTILS_WARNINGS.
	* Makefile.in: Regenerate.
	* configure: Regenerate.
	* doc/Makefile.in: Regenerate.
gprof/
	* Makefile.am (NO_WERROR): Define.
	* acinclude.m4: Include ../bfd/warning.m4.
	* configure.in: Invoke AM_BINUTILS_WARNINGS.
	* Makefile.in: Regenerate.
	* aclocal.m4: Regenerate.
	* configure: Regenerate.
ld/
	* Makefile.am (NO_WERROR): Define.  Use instead of -Wno-error.
	* configure.in: Include ../bfd/warning.m4 contents.
	* Makefile.in: Regenerate.
	* configure: Regenerate.
opcodes/
	* Makefile.am (NO_WERROR): Define.
	* configure.in: Invoke AM_BINUTILS_WARNINGS.
	* Makefile.in: Regenerate.
	* aclocal.m4: Regenerate.
	* configure: Regenerate.
2005-04-14 05:26:44 +00:00
Jakub Jelinek 40937810e1 2005-04-14 David S. Miller <davem@davemloft.net>
bfd/
	Add TLS support for 64-bit Sparc ELF.
	*  elf64-sparc.c (sparc64_elf_dyn_relocs,
	sparc64_elf_link_hash_entry, sparc64_elf_obj_tdata): New structs.
	(GOT_UNKNOWN, GOT_NORMAL, GOT_TLD_GD, GOT_TLD_IE,
	sparc64_elf_hash_entry, sparc64_elf_tdata,
	sparc64_elf_local_got_tls_type): New defines.
	(sparc64_elf_mkobject): New function.
	(sparc64_elf_link_hash_table): Add members for dynamic linker
	sections PLT, RELPLT, DYNBSS, and RELBSS.  Add tls_ldm_got
	uion to track TLS GOT references.  Add sym_sec to cache
	mappings from local sym to section.
	(link_hash_newfunc): New function.
	(sparc64_elf_bfd_link_hash_table_create): Rename to
	sparc64_elf_link_hash_table_create for consistency.
	Pass link_hash_newfunc to _bfd_elf_link_hash_table_init.
	(sparc64_elf_create_dynamic_sections): Initialize new section
	members of sparc64_elf_link_hash_table.  Only init srelbss
	if not-shared.
	(sparc64_elf_copy_indirect_symbol, sparc64_elf_tls_transition):
	New functions.
	(SPARC_NOP): Define.
	(sparc64_elf_build_plt, sparc64_elf_plt_entry_offset,
	sparc64_elf_plt_ptr_offset): Delete.
	(sparc64_plt_entry_build): New function to build PLT entries
	gradually instread of all at once at the end of linking.
	(sparc64_elf_check_relocs): Delete dynobj, sgot, and srelgot
	local vars.  Get them from sparc64_elf_hash_table instead.
	Check early on if r_symndx is in bounds.  Handle TLS transitions.
	Account for TLS GOT references and DF_STATIC_TLS, as needed.
	For TLS relocs, record the tls_type in either
	sparc64_elf_local_got_tls_type or sparc64_elf_hash_entry as
	appropriate.  For R_SPARC_TLS_{GD,LDM}_CALL, emit a reference
	to the __tls_get_addr symbol.  For PLT relocs, track references
	via h->plt.refcount.  When R_SPARC_{PC10,PC22,PC_HH22,PC_HM10,
	PC_LM22} and h not-NULL, set h->non_got_ref.  For global data
	symbol references, count the number of relocations needed for
	that symbol.  For default switch case, don't error, this lets
	the TLS relocs not explicitly handled by this function get
	accepted.
	(sparc64_elf_gc_mark_hook, sparc64_gc_sweep_hook): New functions.
	(sparc64_elf_adjust_dynamic_symbol): Remove dynobj local var, get
	it from sparc64_elf_hash_table.  Store the real PLT offset
	in h->plt.offset, and build PLT entries one at a time.  Also
	get .dynbss section pointer from htab.
	(allocate_dynrelocs, readonly_dynrelocs,
	sparc64_omit_section_dynsym): New functions.
	(sparc64_elf_omit_section_dynsym): Use these new functions as
	helpers.
	(dtpoff_base, tpoff): New functions.
	(sparc64_elf_relocate_section): Kill dynobj, sgot, and splt
	locals, get them from sparc64_elf_hash_table.  Handle TLS
	relocations and refcounting in main relocation loop.
	(sparc64_elf_finish_dynamic_symbol): Use
	sparc64_elf_link_hash_table.  Build PLT entries as we see
	them.  Handle TLS GOT relocations.
	(sparc64_elf_finish_dynamic_sections): Get sgot and dynobj
	from sparc64_elf_hash_table.  Initialize only PLT header
	not all entries since we not build PLT entries one by one.
	(elf_backend_copy_indirect_symbol, bfd_elf64_mkobject,
	elf_backend_gc_mark_hook, elf_backend_gc_sweep_hook,
	elf_backend_can_gc_sections, elf_backend_can_refcount): Define.
ld/testsuite/
	* ld-selective/sel-dump.exp: Do not exclude sparc64-*.
	* ld-selective/selective.exp: Likewise.
	* ld-sparc/sparc.exp: Add {32,64}-bit prefix to test
	names so we know which one is failing.  Run sparc64 TLS
	tests on multi-arch sparc platforms.
	* ld-sparc/tls64.sd, ld-sparc/tlssunbin64.dd,
	ld-sparc/tlssunbin64.rd, ld/testsuite/ld-sparc/tlssunbin64.sd,
	ld-sparc/tlssunbin64.td, ld-sparc/tlssunnopic64.dd,
	ld-sparc/tlssunnopic64.rd, ld-sparc/tlssunnopic64.sd,
	ld-sparc/tlssunpic64.dd, ld-sparc/tlssunpic64.rd,
	ld-sparc/tlssunpic64.sd, ld-sparc/tlssunpic64.td): Update now
	that sparc64 ELF does support TLS.
2005-04-13 22:29:36 +00:00
H.J. Lu e75a280b02 bfd/
2005-04-13  Daniel Jacobowitz  <dan@codesourcery.com>

	* elflink.c (elf_link_input_bfd): Update check for removed
	sections.

ld/testsuite/

2005-04-13  H.J. Lu  <hongjiu.lu@intel.com>

	* ld-elf/empty.d: New file.
	* ld-elf/empty.s: Likewise.
2005-04-13 16:44:08 +00:00
Alan Modra ceae3e339f bfd/
* Makefile.am: Run "make dep-am".
	* Makefile.in: Regenerate.
	* aclocal.m4: Regenerate.
	* libcoff.h: Regenerate.
bfd/doc/
	* Makefile.in: Regenerate.
binutils/
	* Makefile.am: Run "make dep-am".
	(syslex.o, sysinfo.o, arparse.o, arlex.o): Add -Wno-error to command.
	(sysroff.o, defparse.o, deflex.o): Likewise.
	(nlmheader.o, rcparse.o, rclex.o): Likewise.
	* Makefile.in: Regenerate.
	* aclocal.m4: Regenerate.
	* config.in: Regenerate.
	* configure: Regenerate.
gas/
	* Makefile.am: Run "make dep-am".
	* Makefile.in: Regenerate.
ld/
	* Makefile.am: Run "make dep-am".
	(ldgram.o, ldlex.o, deffilep.o): Add -Wno-error to command.
	* Makefile.in: Regenerate.
	* config.in: Regenerate.
2005-04-12 02:50:28 +00:00
Jakub Jelinek bd695bcc90 2005-04-11 David S. Miller <davem@davemloft.net>
* elf32-sparc.c (elf32_sparc_relocate_section,
	R_SPARC_TLS_LDO_{HIX22,LOX10}): When not shared, transition to
	R_SPARC_TLS_LE_{HIX22,LOX10}.
	(elf32_sparc_relocate_section, R_SPARC_TLS_{LDO,LE}_HIX22): Only
	xor relocation with 0xffffffff if R_SPARC_TLS_LE_HIX22.
	(elf32_sparc_relocate_section, R_SPARC_TLS_{LDO,LE}_LOX10): Only
	or 0x1c00 into relocation if R_SPARC_TLS_LE_HIX22.

	* ld-sparc/tlssunbin32.dd: Update for TLS relocation fixes.
	* ld-sparc/tlssunbin32.rd: Likewise.
	* ld-sparc/tlssunbin32.sd: Likewise.
	* ld-sparc/tlssunpic32.dd: Likewise.
2005-04-11 22:13:28 +00:00
Alan Modra 7cedef86d8 * emultempl/elf32.em (gld${EMULATION_NAME}_stat_needed): Ignore
as_needed libs that were not needed.
	(gld${EMULATION_NAME}_check_needed): Likewise.
2005-04-11 14:26:46 +00:00
Nick Clifton 187ffe9590 Include ldexp.h and ldlang.h so that ldfile.h can use the lang_input_statement
type.
2005-04-07 14:07:33 +00:00
Jakub Jelinek 7222318829 2005-04-06 Jakub Jelinek <jakub@redhat.com>
* ldlang.c: Formatting.
	(walk_wild_consider_section): Remember return value from wildcardp.
	(is_simple_wild): Use strcspn instead of 2 strpbrk calls and strlen.
	(wild_spec_can_overlap): Use strcspn instead of strpbrk and strlen.

2005-04-06  Robert O'Callahan  <rocallahan@novell.com>

	* ld.h (lean_section_userdata_type): Remove.
	(fat_section_userdata_type): Remove file field.
	(SECTION_USERDATA_SIZE): Remove.
	* ldlang.c (init_os): Eliminate initialization of unused
	lean_section_userdata_type.

	* ldlang.h (callback_t, walk_wild_section_handler_t): New
	typedefs.
	(struct lang_wild_statement_struct): Add walk_wild_section_handler
	and handler_data fields.
	* ldlang.c (callback_t): Removed.
	(walk_wild_consider_section, walk_wild_section_general,
	section_iterator_callback, find_section, is_simple_wild,
	match_simple_wild, walk_wild_section_specs1_wild0,
	walk_wild_section_specs1_wild1, walk_wild_section_specs2_wild1,
	walk_wild_section_specs3_wild2, walk_wild_section_specs4_wild2,
	wild_spec_can_overlap, analyze_walk_wild_section_handler): New
	functions.
	(lang_add_wild): Call analyze_walk_wild_section_handler.
	(walk_wild_section): Renamed to walk_wild_section_general and
	created a wrapper function.
	(section_iterator_callback_data): New typedef.
2005-04-06 15:33:03 +00:00
Nick Clifton 34875e6487 Add a check for <unistd.h> providing a prototype for getopt() which is compatible
with the one in	include/getopt.h.  If so then define HAVE_DECL_GETOPT.
2005-04-04 11:27:16 +00:00
Julian Brown 9d2da7ca8d * bfd/bfd-in.h (bfd_elf32_is_arm_mapping_symbol_name): Add prototype.
* bfd/bfd-in2.h: Regenerate.
	* bfd/elf32-arm.c (elf32_arm_is_target_special_symbol): Rename call to
	bfd_elf32_is_arm_mapping_symbol_name.
	(elf32_arm_output_symbol_hook): Likewise.
	(arm_elf_find_function): Likewise, and include STT_NOTYPE in test for
	mapping symbols.
	(is_arm_mapping_symbol_name): Function moved from here...
	* bfd/cpu-arm.c (bfd_elf32_is_arm_mapping_symbol_name): ...to here,
	renamed and made global.
	* gas/config/tc-arm.c (mapping_state): Change documentation in function
	comment to cross-reference spec instead. Change type of mapping symbols
	to BSF_NO_TYPE.
	(arm_adjust_symtab): Don't change type of mapping symbols here.
	* gas/testsuite/gas/arm/mapping.d: Update expected output.
	* ld/testsuite/ld-arm/arm-app-abs32.d: Likewise.
	* ld/testsuite/ld-arm/arm-app.d: Likewise.
	* ld/testsuite/ld-arm/mixed-app.d: Likewise.
2005-03-30 16:22:07 +00:00
Daniel Jacobowitz ba93b8aced bfd/
* bfd-in2.h, libbfd.h: Regenerated.
	* reloc.c: Add ARM TLS relocations.
	* elf32-arm.c (elf32_arm_howto_table): Add dynamic TLS
	relocations.
	(elf32_arm_tls_gd32_howto, elf32_arm_tls_ldo32_howto)
	(elf32_arm_tls_ldm32_howto, elf32_arm_tls_le32_howto)
	(elf32_arm_tls_ie32_howto): New.
	(elf32_arm_howto_from_type): Support TLS relocations.
	(elf32_arm_reloc_map): Likewise.
	(elf32_arm_reloc_type_lookup): Likewise.
	(TCB_SIZE): Define.
	(struct elf32_arm_obj_tdata): New.
	(elf32_arm_tdata, elf32_arm_local_got_tls_type): Define.
	(elf32_arm_mkobject): New function.
	(struct elf32_arm_relocs_copied): Add pc_count.
	(elf32_arm_hash_entry, GOT_UNKNOWN, GOT_NORMAL, GOT_TLS_GD)
	(GOT_TLS_IE): Define.
	(struct elf32_arm_link_hash_table): Add tls_ldm_got.
	(elf32_arm_link_hash_newfunc): Initialize tls_type.
	(elf32_arm_copy_indirect_symbol): Copy pc_count and tls_type.
	(elf32_arm_link_hash_table_create): Initialize tls_ldm_got.
	(dtpoff_base, tpoff): New functions.
	(elf32_arm_final_link_relocate): Handle TLS relocations.
	(IS_ARM_TLS_RELOC): Define.
	(elf32_arm_relocate_section): Warn about TLS mismatches.
	(elf32_arm_gc_sweep_hook): Handle TLS relocations and pc_count.
	(elf32_arm_check_relocs): Detect invalid symbol indexes.  Handle
	TLS relocations and pc_count.
	(elf32_arm_adjust_dynamic_symbol): Check non_got_ref.
	(allocate_dynrelocs): Handle TLS.  Bind REL32 relocs to local
	calls.
	(elf32_arm_size_dynamic_sections): Handle TLS.
	(elf32_arm_finish_dynamic_symbol): Likewise.
	(bfd_elf32_mkobject): Define.
gas/
	* config/tc-arm.c (arm_parse_reloc): Add TLS relocations.
	(md_apply_fix3): Mark TLS symbols.
	(tc_gen_reloc): Handle TLS relocations.
	(arm_fix_adjustable): Ignore TLS relocations.
	(s_arm_elf_cons): Support expressions after decorated symbols.
gas/testuite/
	* gas/arm/tls.s, gas/arm/tls.d: New files.
	* gas/arm/arm.exp: Run TLS test.
include/elf/
	* arm.h: Add TLS relocations.
ld/testsuite/
	* ld-arm/tls-lib.s, ld-arm/tls-lib.d, ld-arm/tls-lib.r,
	ld-arm/tls-app.s, ld-arm/tls-app.d, ld-arm/tls-app.r: New files.
	* ld-arm/arm-lib.ld, ld-arm/arm-dyn.ld: Increase data segment
	alignment.
	* ld-arm/arm-elf.exp: Run TLS tests.
2005-03-29 16:54:22 +00:00
Alan Modra deb04cdb5e * emultempl/elf32.em (gld${EMULATION_NAME}_layout_sections_again):
New function, extracted from static void gld${EMULATION_NAME}_finish.
	(gld${EMULATION_NAME}_strip_empty_sections): Likewise.
	(gld${EMULATION_NAME}_provide_init_fini_syms): Likewise.
	* emultempl/ppc64elf.em: Revert last change.
	(ppc_layout_sections_again): Use
	gld${EMULATION_NAME}_layout_sections_again.
	(ppc_finish): Don't call gld${EMULATION_NAME}_finish.  Instead call
	gld${EMULATION_NAME}_strip_empty_sections and
	gld${EMULATION_NAME}_provide_init_fini_syms.
	* emultempl/hppaelf.em: Similarly.
2005-03-29 11:07:38 +00:00
Alan Modra 8b4e5e2810 * emultempl/ppc64elf.em (need_laying_out): Delete. Remove all refs.
(ppc_finish): Don't call bfd_elf_discard_info.
	* emultempl/hppaelf.em: Similarly.
2005-03-29 06:52:22 +00:00
H.J. Lu 8c2fda1d2b gas/
2005-03-28  David Mosberger  <davidm@hpl.hp.com>
	    H.J. Lu  <hongjiu.lu@intel.com>

	PR 803
	NEWS: Mention "-mtune=[itanium1|itanium2]".

	* config/tc-ia64.c (md): Add tune.
	(md_parse_option): Accepted "-mtune=[itanium1|itanium2]".
	(md_show_usage): Add "-mtune=[itanium1|itanium2]".
	(extra_goodness): Prefer M- and I-unit NOPs for itanium2. F and
	B unit NOPs are discouraged for McKinley-derived cores.
	(md_begin): Don't hardcode the "extra_goodness()" function in
	the comment...
	(ia64_init): Set md.tune to itanium2.

	* doc/as.texinfo: Add -mtune=[itanium1|itanium2]".
	* doc/c-ia64.texi: Likewise.

gas/testsuite/

2005-03-28  H.J. Lu  <hongjiu.lu@intel.com>

	PR 803
	* gas/ia64/dv-imply.d: Pass -mtune=itanium1 to as.
	* gas/ia64/dv-mutex.d : Likewise.
	* gas/ia64/dv-safe.d: Likewise.
	* gas/ia64/dv-srlz.d.nop: Likewise.
	* gas/ia64/ldxmov-1.d: Likewise.
	* gas/ia64/opc-b.d: Likewise.
	* gas/ia64/opc-f.d: Likewise.
	* gas/ia64/opc-i.d: Likewise.
	* gas/ia64/opc-m.d: Likewise.
	* gas/ia64/operand-or.d: Likewise.
	* gas/ia64/pcrel.d: Likewise.
	* gas/ia64/pseudo.d: Likewise.
	* gas/ia64/tls.d: Likewise.

ld/testsuite/

2005-03-28  H.J. Lu  <hongjiu.lu@intel.com>

	PR 803
	* ld-ia64/ia64.exp: Pass -mtune=itanium1 to as.
2005-03-28 22:34:20 +00:00
Mark Mitchell 99c05fe4f7 * config/default.exp: Do not load libpath.exp if it does not
exist.
	(CC): Provide fallback definition.
	(CFLAGS): Likewise.
	(CXX): Likewise.
	(CXXFLAGS): Likewise.
2005-03-24 23:36:03 +00:00
Eric Christopher 82f0cfbdcc 2005-03-24 Eric Christopher <echristo@redhat.com>
* elfxx-mips.c: Revert previous patch.

2005-03-24  Eric Christopher  <echristo@redhat.com>

	* ld-mips-elf/rel32-n32.d: Revert changes.
	* ld-mips-elf/rel32-o32.d: Ditto.
	* ld-mips-elf/rel64.d: Ditto.
2005-03-24 22:47:52 +00:00
Nick Clifton 510a939ba7 Updated French translation 2005-03-24 21:13:03 +00:00
Eric Christopher cc27e1dc44 bfd/ChangeLog:
2005-03-23  Eric Christopher  <echristo@redhat.com>

	* elfxx-mips.c (MIPS_ELF_READONLY_SECTION): New.
	(mips_elf_calculate_relocation): Use. Define DF_TEXTREL
	after emitting relocation.
	(_bfd_mips_elf_adjust_dynamic_symbol): Ditto.
	(_bfd_mips_elf_check_relocs): Remove code to set DF_TEXTREL
	and readonly_reloc.

ld/testsuite/ChangeLog:

2005-03-23  Eric Christopher  <echristo@redhat.com>

	* ld-mips-elf/textrel-1.s, ld-mips-elf/textrel-1.d: New
	test.
	* ld-mips-elf/mips-elf.exp: Call it.
	* ld-mips-elf/rel32-n32.d: Update for DF_TEXTREL removal.
	* ld-mips-elf/rel32-o32.d: Ditto.
	* ld-mips-elf/rel64.d: Ditto.
2005-03-24 01:30:47 +00:00
H.J. Lu 4f02944618 2005-03-23 H.J. Lu <hongjiu.lu@intel.com>
* ld-cris/expdyn5.d: Updated for alignment change in elf.sc.
	* ld-cris/expdyn6.d: Likewise.
	* ld-cris/expdyn7.d: Likewise.
	* ld-cris/gotplt1.d: Likewise.
	* ld-cris/gotplt2.d: Likewise.
	* ld-cris/gotplt3.d: Likewise.
	* ld-cris/libdso-10.d: Likewise.
	* ld-cris/libdso-11.d: Likewise.
	* ld-cris/libdso-12.d: Likewise.
	* ld-cris/libdso-14.d: Likewise.
	* ld-cris/libdso-2.d: Likewise.
	* ld-cris/locref1.d: Likewise.
	* ld-cris/locref2.d: Likewise.
	* ld-cris/nodyn5.d: Likewise.
	* ld-cris/pv32-1.d: Likewise.
	* ld-cris/weakref2.d: Likewise.
2005-03-23 19:04:33 +00:00
Nick Clifton ed84e69560 Accept any C library to accompany a GNU Linux implementation, not just the GNU
C library.
2005-03-23 15:35:50 +00:00
H.J. Lu 81e1b023da bfd/
2005-03-22  H.J. Lu  <hongjiu.lu@intel.com>

	* bfd-in.h (_bfd_elf_provide_symbol): New.
	* bfd-in2.h: Regenerated.

	* elf32-ppc.c (set_linker_sym): Moved to elflink.c.
	(ppc_elf_set_sdata_syms): Call _bfd_elf_provide_symbol instead
	of set_linker_sym.

	* elflink.c (_bfd_elf_provide_symbol): New. Moved and renamed
	from elf32-ppc.c.

ld/

2005-03-22  H.J. Lu  <hongjiu.lu@intel.com>

	* emultempl/elf32.em (gld${EMULATION_NAME}_provide_bound_symbols): New
	(gld${EMULATION_NAME}_finish): Call
	gld${EMULATION_NAME}_provide_bound_symbols to provide
	__preinit_array_start, __preinit_array_end, __init_array_start,
	__init_array_end, __fini_array_start and __fini_array_end.

	* scripttempl/elf.sc: Don't provide __preinit_array_start,
	__preinit_array_end, __init_array_start, __init_array_end,
	__fini_array_start nor __fini_array_end.
2005-03-23 04:14:46 +00:00
Alan Modra 11d2f718eb bfd/
* elflink.c (elf_link_add_object_symbols): Set SEC_EXCLUDE on
	.gnu.warning.* sections.
ld/
	* emultempl/elf32.em (gld${EMULATION_NAME}_before_allocation): Set
	SEC_EXCLUDE on .gnu.warning sections.
2005-03-22 14:49:16 +00:00
Alan Modra 52a43e7100 gas/testsuite/
* gas/elf/section5.s: Don't start directives in first column.
ld/testsuite/
	* ld-elf/tbss.s: Don't start directives in first column.
	* ld-scripts/weak1.s: Likewise.
	* ld-scripts/weak2.s: Likewise.
	* ld-undefined/weak-undef.s: Likewise.
	* ld-undefined/undefined.exp: Enable tests for hppa-elf.
2005-03-22 14:20:38 +00:00
Alan Modra 644285efef bfd/
* elf32-ppc.c (ppc_elf_add_symbol_hook): Make htab->sbss
	SEC_LINKER_CREATED.  Attach to dynobj.
	(ppc_elf_size_dynamic_sections): Strip htab->sbss if zero size.
ld/
	* scripttempl/elf.sc (SBSS): Don't provide sbss start and end syms.
ld/testsuite/
	* ld-powerpc/tlsexe32.r: Update.
	* ld-powerpc/tlsso32.d: Update.
	* ld-powerpc/tlsso32.g: Update.
	* ld-powerpc/tlsso32.r: Update.
2005-03-21 13:56:57 +00:00
Alan Modra c9a2f3330b bfd/
* elf32-ppc.c (struct elf_linker_section): Remove sym_hash and
	sym_offset.  Add name, bss_name, sym_name, sym_val.
	(struct ppc_elf_link_hash_table): Remove sdata and sdata2 pointers.
	Add sdata array of elf_linker_section_t.
	(ppc_elf_link_hash_table_create): Set name, sym_name, and bss_name.
	(enum elf_linker_section_enum): Delete.
	(ppc_elf_create_linker_section): Rewrite.  Don't create syms here.
	(ppc_elf_check_relocs): Delay ppc_elf_create_linker_section until
	the special sections are needed.  Adjust htab->sdata refs.
	Ensure dynobj is set in sreloc code.
	(ppc_elf_size_dynamic_sections): Strip sdata sections.
	(ppc_elf_set_sdata_syms): New function.
	(elf_finish_pointer_linker_section): Use 0x8000 for sym_offset.
	(ppc_elf_relocate_section): Adjust references to htab->sdata.  Use
	sym_val instead of sym_hash.
	* elf32-ppc.h (ppc_elf_set_sdata_syms): Declare.
ld/
	* emultempl/ppc32elf.em (gld${EMULATION_NAME}_after_allocation): New
	function.
	(LDEMUL_AFTER_ALLOCATION): Define.
2005-03-21 13:23:15 +00:00
Alan Modra b1ab97771e ld/
* emultempl/ppc64elf.em (ppc_finish): Rename from
	gld${EMULATION_NAME}_finish.  Call gld${EMULATION_NAME}_finish.
	(LDEMUL_FINISH): Update.
	* emultempl/hppaelf.em (hppaelf_finish, LDEMUL_FINISH): Likewise.
	* emultempl/m68hc1xelf.em (m68hc11elf_finish, LDEMUL_FINISH): Likewise.
ld/testsuite/
	* ld-powerpc/tlsexe.r: Update.
	* ld-powerpc/tlsexetoc.r: Update.
	* ld-powerpc/tlsso.r: Update.
	* ld-powerpc/tlstocso.r: Update.
2005-03-21 09:39:54 +00:00
H.J. Lu 8d7146bab4 2005-03-20 H.J. Lu <hongjiu.lu@intel.com>
* ld-mmix/bpo-1.d: Updated for empty section removal.
	* ld-mmix/bpo-10.d: Likewise.
	* ld-mmix/bpo-11.d: Likewise.
	* ld-mmix/bpo-14.d: Likewise.
	* ld-mmix/bpo-16.d: Likewise.
	* ld-mmix/bpo-17.d: Likewise.
	* ld-mmix/bpo-18.d: Likewise.
	* ld-mmix/bpo-19.d: Likewise.
	* ld-mmix/bpo-2.d: Likewise.
	* ld-mmix/bpo-3.d: Likewise.
	* ld-mmix/bpo-4.d: Likewise.
	* ld-mmix/bpo-5.d: Likewise.
	* ld-mmix/bpo-6.d: Likewise.
	* ld-mmix/bpo-9.d: Likewise.
	* ld-mmix/bspec1.d: Likewise.
	* ld-mmix/bspec2.d: Likewise.
	* ld-mmix/greg-1.d: Likewise.
	* ld-mmix/greg-19.d: Likewise.
	* ld-mmix/greg-2.d: Likewise.
	* ld-mmix/greg-3.d: Likewise.
	* ld-mmix/greg-4.d: Likewise.
	* ld-mmix/greg-5.d: Likewise.
	* ld-mmix/greg-5s.d: Likewise.
	* ld-mmix/greg-6.d: Likewise.
	* ld-mmix/greg-7.d: Likewise.
	* ld-mmix/loc1.d: Likewise.
	* ld-mmix/loc2.d: Likewise.
	* ld-mmix/loc3.d: Likewise.
	* ld-mmix/loc4.d: Likewise.
	* ld-mmix/loc6.d: Likewise.
	* ld-mmix/local1.d: Likewise.
	* ld-mmix/local12.d: Likewise.
	* ld-mmix/local3.d: Likewise.
	* ld-mmix/local5.d: Likewise.
	* ld-mmix/local7.d: Likewise.
	* ld-mmix/locdo-1.d: Likewise.
	* ld-mmix/loct-1.d: Likewise.
	* ld-mmix/locto-1.d: Likewise.
	* ld-mmix/start-1.d: Likewise.
	* ld-mmix/undef-3.d: Likewise.
2005-03-20 17:00:14 +00:00
Julian Brown 2a2a7c9466 * ld/scripttempl/armbpapi.sc (.rel.dyn): Add .rel.init_array,
.rel.fini_array.
	(.rela.dyn): Add .rela.init_array, .rela.fini_array.
	(SECTIONS): Add .rel.other, .rela.other, .reli.other after PLT relocs.
2005-03-18 16:55:44 +00:00
H.J. Lu 98720c64bc 2005-03-18 H.J. Lu <hongjiu.lu@intel.com>
* emultempl/elf32.em (gld${EMULATION_NAME}_finish): Don't set
	bfd_section when removing unused empty output sections for
	non-relocatable link.
2005-03-18 15:56:27 +00:00
Alan Modra 41c7ba7cc2 * ldlang.c (lang_insert_orphan): Use old section_tail rather than
traversing the bfd section list to find pointer to new section.
2005-03-18 13:56:26 +00:00
Alan Modra 0fb531188f * scripttempl/elf.sc: When CREATE_SHLIB, put .sdata2 and .sbss2
input sections into .sdata and .sbss output respectively.
2005-03-17 22:51:09 +00:00
Bob Wilson de7f8cc8e0 ld/ChangeLog:
* ldlang.c (IGNORE_SECTION): Remove check for zero size.
        (lang_check_section_addresses): Ignore zero size sections here.
ld/testsuite/ChangeLog:
        * ld-scripts/empty-orphan.d, ld-scripts/empty-orphan.exp,
        ld-scripts/empty-orphan.s, ld-scripts/emtpy-orphan.t: New test.
2005-03-17 16:20:39 +00:00
H.J. Lu 05f83022ad 2005-03-16 H.J. Lu <hongjiu.lu@intel.com>
* ld-cris/hiddef1.d: Updated for empty section removal.
	* ld-cris/libdso-10.d: Likewise.
	* ld-cris/libdso-2.d: Likewise.
2005-03-17 02:21:50 +00:00