Commit Graph

1942 Commits

Author SHA1 Message Date
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