Commit Graph

1699 Commits

Author SHA1 Message Date
Ian Lance Taylor 3a6eb9c0d7 * ld-mips-elf/jalbal.d: New test.
* ld-mips-elf/jalbal.s: New test.
	* ld-mips-elf/mips-elf.exp: Run it.
2004-12-09 07:14:53 +00:00
Ian Lance Taylor 0efd416086 * ld-mips-elf/jaloverflow.d: New test.
* ld-mips-elf/jaloverflow.s: New test.
	* ld-mips-elf/mips-elf.exp: Run it.
2004-12-08 20:28:08 +00:00
Ben Elliston cb9faf63f8 * ldemul.h: Forward declare struct option. 2004-12-07 12:29:41 +00:00
H.J. Lu e1d9786917 2004-12-03 H.J. Lu <hongjiu.lu@intel.com>
* ld-elf/group1.d: Support 64bit.
2004-12-03 17:06:28 +00:00
Paul Brook 529fcb9585 2004-12-01 Paul Brook <paul@codesourcery.com>
bfd/
	* elflink.c (elf_link_add_object_symbols): Make symbols from discarded
	sections undefined.
ld/testsuite/
	* ld-elf/group1.d: New test.
	* ld-elf/group.ld, ld-elf/group1a.s, ld-elf/group1b.s: New test.
2004-12-01 23:23:12 +00:00
Daniel Jacobowitz 6db74b6f21 * ld-selective/selective.exp: Use -print-libgcc-file-name for
ARM and v850 also.
2004-12-01 21:12:39 +00:00
Danny Smith 02f80eef3f * scripttempl/pe.sc (.data): Add .jcr subsection. 2004-11-30 23:54:53 +00:00
Paul Brook dea514f51d 2004-11-30 Paul Brook <paul@codesourcery.com>
bfd/
	* elf32-arm.c (struct elf32_arm_link_hash_table): Remove
	no_pipeline_knowledge
	(elf32_arm_link_hash_table_create): Ditto.
	(bfd_elf32_arm_process_before_allocation): Ditto.
	(elf32_arm_final_link_relocate): Ditto.  Remove oabi relocation
	handling.
	* bfd-in.h (bfd_elf32_arm_process_before_allocation): Update
	prototype.
	* bfd-in2.h: Regenerate.
ld/
	* emultempl/armelf.em: Ignore -p and -no-pipeline-knowledge.
2004-11-30 17:45:54 +00:00
Nick Clifton 3211808135 Change LOCALEDIR to $(datadir)/share. 2004-11-30 17:20:48 +00:00
Nick Clifton 33f362e109 Add support for --subsystem:xbox as well as --subsystem:<number>. 2004-11-26 09:42:04 +00:00
Paul Brook 0beaef2b05 2004-11-24 Paul Brook <paul@codesourcery.com>
bfd/
	* elf32-arm.c (elf32_arm_swap_symbol_in): New function.
	(elf32_arm_swap_symbol_out): New function.
	(elf32_arm_size_info): Add.
	(elf_backend_size_info): Define.
ld/testsuite/
	* ld-arm/mixed-lib.sym: Update for THUMB_FUNC change.
2004-11-24 14:44:47 +00:00
Alan Modra 3eda52aa32 * ldexp.c (fold_name): Correct PR 338 fix. 2004-11-24 11:30:17 +00:00
Mark Mitchell 6b3221b47a * Makefile.am (ALL_EMULATIONS): Add earmelf_linux_eabi.o.
(earmelf_linux_eabi.c): New target.
	* configure.tgt (arm*-*-linux-gnueabi): Handle it.
	* emulparams/armelf_linux_eabi.sh: New file.
	* Makefile.in: Regenerated.
2004-11-19 19:28:40 +00:00
Nick Clifton 9cd6d51a56 PR 518
Update the descriptions of the ORIGIN and LENGTH fields in the MEMORY command,
to explicitly state that symbols cannot be used in their expressions.
2004-11-19 09:38:04 +00:00
Nick Clifton 3ec5763260 Add ORIGIN and LENGTH linker script operators. 2004-11-19 09:31:55 +00:00
Daniel Jacobowitz b7693d0213 bfd/
* elf32-arm.c (PLT_THUMB_STUB_SIZE): Define.
	(elf32_arm_plt_thumb_stub): New.
	(struct elf32_arm_link_hash_entry): Add plt_thumb_refcount
	and plt_got_offset.
	(elf32_arm_link_hash_traverse): Fix typo.
	(elf32_arm_link_hash_table): Add obfd.
	(elf32_arm_link_hash_newfunc): Initialize new fields.
	(elf32_arm_copy_indirect_symbol): Copy plt_thumb_refcount.
	(elf32_arm_link_hash_table_create): Initialize obfd.
	(record_arm_to_thumb_glue): Mark the glue as a local ARM function.
	(record_thumb_to_arm_glue): Mark the glue as a local Thumb function.
	(bfd_elf32_arm_get_bfd_for_interworking): Verify that the
	interworking BFD is not dynamic.
	(bfd_elf32_arm_process_before_allocation): Handle R_ARM_PLT32.  Do
	not emit glue for PLT references.
	(elf32_arm_final_link_relocate): Handle Thumb functions.  Do not
	emit glue for PLT references.  Support the Thumb PLT prefix.
	(elf32_arm_gc_sweep_hook): Handle R_ARM_THM_PC22 and
	plt_thumb_refcount.
	(elf32_arm_check_relocs): Likewise.
	(elf32_arm_adjust_dynamic_symbol): Handle Thumb functions and
	plt_thumb_refcount.
	(allocate_dynrelocs): Handle Thumb PLT references.
	(elf32_arm_finish_dynamic_symbol): Likewise.
	(elf32_arm_symbol_processing): New function.
	(elf_backend_symbol_processing): Define.
opcodes/
	* arm-dis.c (WORD_ADDRESS): Define.
	(print_insn): Use it.  Correct big-endian end-of-section handling.
gas/testsuite/
	* gas/arm/mapping.d: Expect F markers for Thumb code.
	* gas/arm/unwind.d: Update big-endian pattern.
ld/
	* emultempl/armelf.em (arm_elf_set_bfd_for_interworking): Don't use
	a dynamic object for stubs.
ld/testsuite/
	* ld-arm/mixed-app.d, ld-arm/mixed-app.r, ld-arm/mixed-app.s,
	ld-arm/mixed-app.sym, ld-arm/mixed-lib.d, ld-arm/mixed-lib.r,
	ld-arm/mixed-lib.s, ld-arm/mixed-lib.sym, ld-arm/arm-dyn.ld,
	ld-arm/arm-lib.ld: New files.
	* ld-arm/arm-app-abs32.d, ld-arm/arm-app-abs32.r, ld-arm/arm-app.d,
	ld-arm/arm-app.r, ld-arm/arm-lib-plt32.d, ld-arm/arm-lib-plt32.r,
	ld-arm/arm-lib.d, ld-arm/arm-lib.r, ld-arm/arm-static-app.d,
	ld-arm/arm-static-app.r: Update for big-endian.
	* ld-arm/arm-elf.exp: Run the new tests.
2004-11-17 17:50:28 +00:00
Richard Sandiford 353057a53c * elf-bfd.h (eh_cie_fde): Add new fields: add_augmentation_size and
add_fde_encoding.  Remove need_relative.
	* elf-eh-frame.c (extra_augmentation_string_bytes)
	(extra_augmentation_data_bytes, size_of_output_cie_fde): New functions.
	(_bfd_elf_discard_section_eh_frame): Consider changing the FDE encoding
	in cases where the CIE has no existing 'R' augmentation.  Use
	size_of_output_cie_fde when assigning offsets.  Use the final offset
	as the new section size.
	(_bfd_elf_eh_frame_section_offset): Remove need_relative handling.
	Account for any extra augmentation bytes in the returned offset.
	(_bfd_elf_write_section_eh_frame): Rework so that the entries are
	moved before being modified.  Pad growing entries with DW_CFA_nops.
	Add 'z' and 'R' augmentations as directed by add_augmentation_size
	and add_fde_encoding.
2004-11-16 10:16:30 +00:00
Paul Brook fc0e6df64d bfd/
* elf-bfd.h (_bfd_elf_slurp_version_tables): Update prototype.
	* elf.c (_bfd_elf_print_private_bfd_data): Pass extra argument.
	(_bfd_elf_slurp_version_tables): Add extra argument.  Create extra
	default version definition for unversioned symbols.
	* elfcode.h (elf_slurp_symbol_table): Pass extra argument.
	* elflink.c (elf_link_add_object_symbols): Pass extra argument to
	_bfd_elf_slurp_version_tables.  Set default version for unversioned
	imported symbols.
include/
	* bfdlink.h (bfd_link_info): Add default_imported_symver.
ld/
	* ld.texinfo: Document --default-imported-symver.
	* ldmain.c (main): Set link_info.default_imported_symver.
	* lexsup.c (option_values): Add OPTION_DEFAULT_IMPORTED_SYMVER.
	(ld_options): Add --default-imported-symver.
	(parse_args): Handle OPTION_DEFAULT_IMPORTED_SYMVER.
2004-11-15 23:21:27 +00:00
Alan Modra d693c47eec * ld-d10v/reloc-003.d: Update for changed error message.
* ld-d10v/reloc-004.d: Likewise.
	* ld-d10v/reloc-007.d: Likewise.
	* ld-d10v/reloc-008.d: Likewise.
	* ld-d10v/reloc-011.d: Likewise.
	* ld-d10v/reloc-012.d: Likewise.
	* ld-d10v/reloc-015.d: Likewise.
	* ld-d10v/reloc-016.d: Likewise.
2004-11-10 03:38:17 +00:00
Nick Clifton 300dac7e8c oops - omitted from previous delta 2004-11-09 14:53:56 +00:00
Nick Clifton 7499d566bb Add support fpr MAXQ processor 2004-11-08 13:17:43 +00:00
Nick Clifton 977cdf5aa7 Fix support for PECOFF weak symbols 2004-11-08 08:12:53 +00:00
Daniel Jacobowitz 7f266840a2 ./
* configure.in (arm-*-oabi*, thumb-*-oabi*): Remove.
	* configure: Regenerated.
bfd/
	* Makefile.am (BFD32_BACKENDS, BFD32_BACKENDS_CFILES): Replace
	elfarm-nabi with elf32-arm.  Remove elfarm-oabi.
	(elf32-arm.lo): Replace elfarm-nabi.lo rule.  Remove elf32-arm.h
	dependency.
	* config.bfd: Move arm-*-oabi* and thumb-*-oabi* from obsolete list
	to a new removed list.  Remove normal configuration stanzas.
	* configure.in: (bfd_elf32_bigarm_vec, bfd_elf32_bigarm_symbian_vec)
	(bfd_elf32_littlearm_symbian_vec, bfd_elf32_littlearm_vec): Replace
	elfarm-nabi.lo with elf32-arm.lo.
	(bfd_elf32_bigarm_oabi_vec, bfd_elf32_littlearm_oabi_vec): Remove.
	* elf32-arm.c: Renamed from elfarm-nabi.c.  Inline elf32-arm.h.
	* elf32-arm.h: Remove.
	* elfarm-oabi.c: Remove.
	* targets.c (_bfd_target_vector): Remove bfd_elf32_bigarm_oabi_vec
	and bfd_elf32_littlearm_oabi_vec.
	* aclocal.m4, Makefile.in, configure, doc/Makefile.in: Regenerated.
gas/
	* configure.in: Remove arm-*-oabi and thumb-*-oabi.
	* config/tc-arm.c (target_oabi): Delete.
	(md_apply_fix3, elf32_arm_target_format): Remove target_oabi checks.
	(arm_opts): Remove moabi.
	* doc/as.texinfo (Overview): Remove documentation of -moabi.
	* doc/c-arm.texi (ARM Options): Likewise.
	* configure: Regenerated.
ld/
	* Makefile.am (ALL_EMULATIONS): Remove earmelf_oabi.o.
	(earmelf_oabi.c): Remove rule.
	* configure.tgt: Remove arm-*-oabi and thumb-*-oabi.
	* emulparams/armelf_oabi.sh, emultempl/armelf_oabi.em: Delete files.
	* Makefile.in: Regenerated.
2004-11-04 15:54:50 +00:00
Hans-Peter Nilsson 1f02b94b93 * ld-elf/merge.d: xfail crisv32-*-*.
* ld-cris/dsov32-1.s, ld-cris/dsov32-2.s, ld-cris/dsov32-3.s,
	ld-cris/dsov32-4.s, ld-cris/libdso-10.d, ld-cris/libdso-11.d,
	ld-cris/libdso-12.d, ld-cris/libdso-13.d, ld-cris/libdso-14.d,
	ld-cris/move-1.s, ld-cris/pv32-1.d, ld-cris/pv32.s,
	ld-cris/start1.s, ld-cris/v10-v32.d, ld-cris/v10-va.d,
	ld-cris/v32-ba-1.d, ld-cris/v32-ba-1.s, ld-cris/v32-bin-1.d,
	ld-cris/v32-bin-1.s, ld-cris/v32-v10.d, ld-cris/v32-va.d,
	ld-cris/va-v10.d, ld-cris/va-v32.d: New tests.
	* ld-cris/ldsym1.d: Adjust for change in linker script.
2004-11-04 15:04:05 +00:00
Hans-Peter Nilsson a005500724 * configure.tgt (crisv32-*-*): Handle like cris-*-* for non-aout.
* emulparams/criself.sh (INIT_START): Remove emitted "push srp".
	(FINI_START): Ditto.
	(INIT_END): Remove emitted "jump [sp+]".
	(FINI_END): Ditto.
2004-11-04 15:01:40 +00:00
Alan Modra c5614fa460 bfd/
* elf64-ppc.h (ppc64_elf_edit_toc): Declare.
	* elf64-ppc.c (struct ppc_link_hash_entry <adjust_done>): Update
	comment.
	(struct adjust_toc_info): New.
	(adjust_toc_syms, ppc64_elf_edit_toc): New functions.
ld/
	* emultempl/ppc64elf.em (no_tls_opt): Rename from notlsopt.
	(no_opd_opt, no_toc_opt): New static vars.
	(ppc_before_allocation): Don't edit opt if no_opd_opt.  Call
	ppc64_elf_edit_toc.
	(OPTION_NO_OPD_OPT, OPTION_NO_TOC_OPT): Define.
	(PARSE_AND_LIST_LONGOPTS): Add no-opd-optimize and no-toc-optimize.
	(PARSE_AND_LIST_OPTIONS): Describe new options.
	(PARSE_AND_LIST_ARGS_CASES): Handle them.
2004-11-04 11:55:13 +00:00
Hans-Peter Nilsson ca7d30d9ca * ld-cris/expdyn1.d, ld-cris/expdyn5.d, ld-cris/expdyn6.d,
ld-cris/expdyn7.d, ld-cris/gotplt1.d, ld-cris/gotplt2.d,
	ld-cris/gotplt3.d, ld-cris/hiddef1.d, ld-cris/libdso-2.d,
	ld-cris/locref1.d, ld-cris/locref2.d, ld-cris/weakref2.d,
	ld-i386/tlsbin.rd, ld-i386/tlsnopic.rd, ld-i386/tlspic.rd,
	ld-ia64/tlsbin.dd, ld-ia64/tlsbin.rd, ld-ia64/tlspic.dd,
	ld-ia64/tlspic.rd, ld-powerpc/tlsexe32.d, ld-powerpc/tlsexe32.g,
	ld-powerpc/tlsexe32.r, ld-powerpc/tlsexe32.t,
	ld-powerpc/tlsso32.d, ld-powerpc/tlsso32.g, ld-powerpc/tlsso32.r,
	ld-powerpc/tlsso32.t, ld-s390/tlsbin.dd, ld-s390/tlsbin.rd,
	ld-s390/tlspic.rd, ld-sparc/tlssunbin32.rd,
	ld-sparc/tlssunpic32.rd, ld-x86-64/tlsbin.rd, ld-x86-64/tlspic.dd,
	ld-x86-64/tlspic.rd: Adjust for _GLOBAL_OFFSET_TABLE_ now hidden.
2004-11-02 05:40:05 +00:00
Nick Clifton 7a5df8d098 emultempl/alphaelf.em (alpha_after_parse): Add extra, NULL, parameter to
invocation of lang_section_start.
emultempl/aix.em (_handle_option): Likewise.

Makefile.am (eelf64alpha.c, eelf64alpha_fbsd.c,	eelf64alpha_nbsd.c): Add
  dependency upon emultempl/alphaelf.em.
Makefile.in: Regenerate.
2004-10-27 15:53:21 +00:00
Mark Mitchell 6f372e19e7 * emulparams/armelf.sh (OTHER_READONLY_SECTIONS): Do not emit
__exidx_{start,end} when not relocating.
2004-10-27 06:57:43 +00:00
Paul Brook 0c6616e1ae Missed from previous commit.
ld/testsuite/
	* ld-elfvers/vers29.c: New file.
	* ld-elfvers/vers29.dsym: New file.
	* ld-elfvers/vers29.ver: New file.
2004-10-26 21:00:23 +00:00
Mark Mitchell ba916c8af2 * Makefile.in (earmsymbian.c): Depend on armbpabi.sc, not elf.sc.
* ldexp.h (segment_type): New type.
	(segments): New variable.
	* ldexp.c (segments): New variable.
	(exp_print_token): Handle SEGMENT_START.
	(fold_binary): Likewise.
	* ldgram.y (SEGMENT_START): Declare it as a token.
	(exp): Handle SEGMENT_START.
	* ldlang.h (lang_address_statement_type): Add segment field.
	(lang_section_start): Change prototype.
	* ldlang.c (map_input_to_output_sections): Do not process section
	assignments if a corresponding SEGMENT_START has already been
	seen.
	(lang_section_start): Add segment parameter.
	* ldlex.l (SEGMENT_START): Add it.
	* lexsup.c (seg_segment_start): New function.
	(parse_args): Use it for -Tbss, -Tdata, and -Ttext.
	* ld.texinfo (SEGMENT_START): Document it.
	* emulparams/armsymbian.sh (EMBEDDED): Set it.
	* scripttempl/armbpabi.sc: Use SEGMENT_START to control segment
	base addresses.  Do not map relocations.
	* NEWS: Mention SEGMENT_START.
2004-10-26 18:41:52 +00:00
Paul Brook 3e3b46e5c8 bfd/
* elflink.c (elf_finalize_dynstr): Skip shared aux structure.
	(bfd_elf_size_dynamic_sections): Create default version definition.
	(elf_link_output_extsym): Adjust for default symbol version.
include/
	* bfdlink.h (struct bfd_link_info): Add create_default_symver.
ld/
	* ld.texinfo: Document --default-symver.
	* ldmain.c (main): Set link_info.create_default_symver.
	* lexsup.c (enum option_values): Add OPTION_DEFAULT_SYMVER.
	(ld_options): Add default-symver.
	(parse_args): Handle OPTION_DEFAULT_SYMVER.
ld/testsuite/
	* ld-elfvers/vers.exp (build_binary): Add ldargs parameter.
	(build_vers_lib_pic_flags): New function.
	Add vers29 test.
	* ld-elfvers/vers29.c: New file.
	* ld-elfvers/vers29.dsym: New file.
	* ld-elfvers/vers29.ver: New file.
2004-10-26 13:46:05 +00:00
Hans-Peter Nilsson 1fddb8daad * ld-mmix/sec-8m.d: Adjust test for dump using correct section
length.
	* ld-mmix/sec-9.d: Renamed test, formerly known as sec-5.d.
	* ld-mmix/sec-5.d, ld-mmix/b-offloc.s: Rewritten test.
2004-10-24 21:39:30 +00:00
Danny Smith 7b0eaa22d7 * pe-dll.c (process_def_file): Don't export all symbols by default if
building a position-independent executable.
2004-10-24 01:00:12 +00:00
Hans-Peter Nilsson 04d3ad575b * ld-mmix/getaa-6b.d, ld-mmix/getaa-6f.d, ld-mmix/getaa14b.d,
ld-mmix/getaa14f.d, ld-mmix/jumpa-6b.d, ld-mmix/jumpa-6f.d,
	ld-mmix/jumpa14b.d, ld-mmix/jumpa14f.d, ld-mmix/reg-1.d,
	ld-mmix/reg-1m.d: Adjust for changed error message format.
2004-10-24 00:13:15 +00:00
H.J. Lu dfeffb9fe1 bfd/
2004-10-21  H.J. Lu  <hongjiu.lu@intel.com>

	PR 463
	* aoutx.h (aout_link_input_section_std): Pass proper hash entry
	to linker reloc_overflow callback.
	(aout_link_input_section_ext): Likewise.
	(aout_link_reloc_link_order): Likewise.
	* coff-a29k.c (coff_a29k_relocate_section): Likewise.
	* coff-alpha.c (alpha_ecoff_get_relocated_section_contents):
	Likewise.
	(alpha_relocate_section): Likewise.
	* coff-arm.c (coff_arm_relocate_section): Likewise.
	* coff-h8300.c (h8300_reloc16_extra_cases): Likewise.
	* coff-h8500.c (extra_case): Likewise.
	* coff-i960.c (coff_i960_relocate_section): Likewise.
	* coff-mcore.c (coff_mcore_relocate_section): Likewise.
	* coff-mips.c (mips_relocate_section): Likewise.
	* coff-or32.c (coff_or32_relocate_section): Likewise.
	* coff-ppc.c (coff_ppc_relocate_section): Likewise.
	* coff-rs6000.c (xcoff_ppc_relocate_section): Likewise.
	* coff-sh.c (sh_relocate_section): Likewise.
	* coff-tic80.c (coff_tic80_relocate_section): Likewise.
	* coff-w65.c (w65_reloc16_extra_cases): Likewise.
	* coff-z8k.c (extra_case): Likewise.
	* coff64-rs6000.c (xcoff64_ppc_relocate_section): Likewise.
	* cofflink.c (_bfd_coff_reloc_link_order): Likewise.
	(_bfd_coff_generic_relocate_section): Likewise.
	* ecoff.c (ecoff_reloc_link_order): Likewise.
	* elf-hppa.h (elf_hppa_relocate_section): Likewise.
	* elf-m10200.c (mn10200_elf_relocate_section): Likewise.
	* elf-m10300.c (mn10300_elf_relocate_section): Likewise.
	* elf32-arm.h (elf32_arm_relocate_section): Likewise.
	* elf32-avr.c (elf32_avr_relocate_section): Likewise.
	* elf32-cr16c.c (elf32_cr16c_relocate_section): Likewise.
	* elf32-cris.c (cris_elf_relocate_section): Likewise.
	* elf32-crx.c (elf32_crx_relocate_section): Likewise.
	* elf32-d10v.c (elf32_d10v_relocate_section): Likewise.
	* elf32-fr30.c (fr30_elf_relocate_section): Likewise.
	* elf32-frv.c (elf32_frv_relocate_section): Likewise.
	* elf32-h8300.c (elf32_h8_relocate_section): Likewise.
	* elf32-hppa.c (elf32_hppa_relocate_section): Likewise.
	* elf32-i370.c (i370_elf_relocate_section): Likewise.
	* elf32-i386.c (elf_i386_relocate_section): Likewise.
	* elf32-i860.c (elf32_i860_relocate_section): Likewise.
	* elf32-ip2k.c (ip2k_elf_relocate_section): Likewise.
	* elf32-iq2000.c (iq2000_elf_relocate_section): Likewise.
	* elf32-m32r.c (m32r_elf_relocate_section): Likewise.
	* elf32-m68hc1x.c (elf32_m68hc11_relocate_section): Likewise.
	* elf32-m68k.c (elf_m68k_relocate_section): Likewise.
	* elf32-mcore.c (mcore_elf_relocate_section): Likewise.
	* elf32-msp430.c (elf32_msp430_relocate_section): Likewise.
	* elf32-openrisc.c (openrisc_elf_relocate_section): Likewise.
	* elf32-ppc.c (ppc_elf_relocate_section): Likewise.
	* elf32-s390.c (elf_s390_relocate_section): Likewise.
	* elf32-sh.c (sh_elf_relocate_section): Likewise.
	* elf32-sparc.c (elf32_sparc_relocate_section): Likewise.
	* elf32-v850.c (v850_elf_relocate_section): Likewise.
	* elf32-vax.c (elf_vax_relocate_section): Likewise.
	* elf32-xstormy16.c (xstormy16_elf_relocate_section): Likewise.
	* elf64-alpha.c (elf64_alpha_relocate_section): Likewise.
	* elf64-mmix.c (mmix_elf_relocate_section): Likewise.
	* elf64-ppc.c (ppc64_elf_relocate_section): Likewise.
	* elf64-s390.c (elf_s390_relocate_section): Likewise.
	* elf64-sh64.c (sh_elf64_relocate_section): Likewise.
	* elf64-sparc.c (sparc64_elf_relocate_section): Likewise.
	* elf64-x86-64.c (elf64_x86_64_relocate_section): Likewise.
	* elflink.c (elf_reloc_link_order): Likewise.
	* elfxx-ia64.c (elfNN_ia64_relocate_section): Likewise.
	* elfxx-mips.c (_bfd_mips_elf_relocate_section): Likewise.
	(_bfd_elf_mips_get_relocated_section_contents): Likewise.
	* linker.c (_bfd_generic_reloc_link_order): Likewise.
	* pdp11.c (pdp11_aout_link_input_section): Likewise.
	(aout_link_reloc_link_order): Likewise.
	* reloc.c (bfd_generic_get_relocated_section_contents):
	Likewise.
	* xcofflink.c (xcoff_reloc_link_order): Likewise.
	* simple.c (simple_dummy_reloc_overflow): Updated.

include/

2004-10-21  H.J. Lu  <hongjiu.lu@intel.com>

	PR 463
	* bfdlink.h (bfd_link_callbacks): Add a pointer to struct
	bfd_link_hash_entry to reloc_overflow.

ld/

2004-10-21  H.J. Lu  <hongjiu.lu@intel.com>

	PR 463
	* ldmain.c (reloc_overflow): Accept a pointer to struct
	bfd_link_hash_entry. Report symbol location for relocation
	overflow.
2004-10-21 15:28:33 +00:00
H.J. Lu dc4f76f869 2004-10-21 H.J. Lu <hongjiu.lu@intel.com>
* genscripts.sh (libpath.exp): Really generate for first
	emulation only.
2004-10-21 15:20:35 +00:00
Danny Smith 2a08daf3f5 * emultempl/pe.em (gld_${EMULATION_NAME}_after_open): Simplify
comparison and replacement of filenames.
2004-10-19 20:07:32 +00:00
H.J. Lu 0e99ae0cc2 2004-10-19 H.J. Lu <hongjiu.lu@intel.com>
* ld-elf/exclude.exp: Allow cris-*-elf.

	* ld-elf/exclude1.s: Add ".data". Remove "- include_sym".
	* ld-elf/exclude2.s: Add ".data".
2004-10-19 17:14:38 +00:00
H.J. Lu 532345f2da 2004-10-19 H.J. Lu <hongjiu.lu@intel.com>
PR 459
	* ldlang.c (load_symbols): Use the same -Bdynamic/-Bstatic
	option on linker script as the one for linker script.
2004-10-19 15:44:58 +00:00
Hans-Peter Nilsson cad5e2c2ac * ld-elf/exclude.exp: Don't run for cris-*-elf. 2004-10-19 05:02:49 +00:00
Daniel Jacobowitz b58f81aef6 bfd/
* bfd-in2.h: Regenerate.
	* bfd.c (struct bfd): Add no_export.
	* elflink.c (elf_link_add_object_symbols): Handle no_export.
ld/
	* ldlang.c (struct excluded_lib, excluded_libs, add_excluded_libs)
	(check_excluded_libs): New.
	(load_symbols): Call check_excluded_libs.
	* ldlang.h (add_excluded_libs): New prototype.
	* emultempl/elf32.em (OPTION_EXCLUDED_LIBS): Define.
	(gld${EMULATION_NAME}_add_options): Add --exclude-libs.
	(gld${EMULATION_NAME}_handle_option): Handle --exclude-libs.
	* ld.texinfo (Command Line Variables): Document --exclude-libs.
	(Options Specific to i386 PE Targets): Remove --exclude-libs.
ld/testsuite/
	* ld-elf/exclude1.s, ld-elf/exclude2.s, ld-elf/exclude.exp: New.
2004-10-16 18:13:54 +00:00
Alan Modra c468c8bcab * ldexp.c (exp_fold_tree): Don't immediately exit ld on a
failing link script assert.
2004-10-15 06:00:15 +00:00
Alan Modra 95c148b400 * ldctor.c (ldctor_add_set_entry): Fix comment typo. 2004-10-15 05:54:11 +00:00
Alan Modra 391df1c063 * ld-crx/reloc-num8.d: Adjust for changed orphan placement.
* ld-crx/reloc-num16.d: Likewise.
	* ld-crx/reloc-num32.d: Likewise.
	* ld-scripts/provide-2.t: Start .data at 0x2000.
	* ld-scripts/provide-2.d: Adjust.
2004-10-15 00:27:12 +00:00
H.J. Lu 951e9133c4 2004-10-14 H.J. Lu <hongjiu.lu@intel.com>
PR 445
	* emulparams/elf64_ia64.sh (SMALL_DATA_CTOR): Set.
	(SMALL_DATA_DTOR): Set.
	* emulparams/elf64_ia64_fbsd.sh (SMALL_DATA_CTOR): Unset.
	(SMALL_DATA_DTOR): Unset.
	* scripttempl/elf.sc: If SMALL_DATA_CTOR is set, move .ctors
	after .data. If SMALL_DATA_DTOR is set, move .dtors after
	.data.
2004-10-14 17:00:16 +00:00
H.J. Lu e0255be8fc 2004-10-14 H.J. Lu <hongjiu.lu@intel.com>
* ld-scripts/sort.exp: Run for ELF targets only.
2004-10-14 16:20:47 +00:00
Alan Modra afd7a018c9 ld/
PR 63
	* ldlang.h (lang_output_section_statement_type): Make "next" a
	struct lang_output_section_statement_struct *.
	(struct orphan_save): Move from elf32.em.  Add "name" and "flags".
	(lang_output_section_find_by_flags, lang_insert_orphan): Declare.
	* ldlang.c (lang_output_section_find_1): Adjust for changed
	output_section_statement "next".
	(strip_excluded_output_sections): Likewise.
	(lang_record_phdrs): Likewise.
	(lang_output_section_find_by_flags): New function.
	(output_prev_sec_find): Move from pe.em.  Adjust iterator.
	(lang_insert_orphan): New function.  Tail end of elf32.em's
	place_orphan merged with that from pe.em.  Allow bfd_section to
	be placed first.  New heuristic for placing new output section
	statement in existing script, and accompanying split of __start
	symbol alignment into a separate assignment to dot.
	(lang_add_section): Consistently use output->bfd_section rather than
	an alias, section->output_section.
	(map_input_to_output_sections): Rename overly long arg.  Move
	initialization of data_statement output section to here..
	(lang_check_section_addresses): ..from here.
	(print_assignment): Correct printing of etree_assert.
	(print_all_symbols): Don't bomb if userdata is NULL.
	(IGNORE_SECTION): Rearrange.
	* emultempl/elf32.em (output_rel_find): Adjust interator.
	(output_prev_sec_find): Delete.
	(struct orphan_save): Delete.
	(gld${EMULATION_NAME}_place_orphan): Cater for zero bfd_section
	flags without creating a duplicate output section statement.
	Revise code holding history of various orphan section placements.
	Allow orphan sections to place before script specified output
	sections.  Call lang_output_section_find_by_flags when placement
	by name fails.  Use lang_insert_orphan.
	* emultempl/mmo.em (output_prev_sec_find): Delete.
	(struct orphan_save): Delete.
	(mmo_place_orphan): Revise code holding history of orphan placement.
	Allow orphans to place before existing output sections.  Use
	lang_insert_orphan.
	* emultempl/pe.em (output_prev_sec_find): Delete.
	(struct orphan_save): Delete.
	(gld_${EMULATION_NAME}_place_orphan): Revise to suit use of
	lang_insert_orphan.
ld/testsuite/
	* ld-scripts/overlay-size.d: Update for changed orphan section
	placement.
	* ld-mmix/bpo-18.d: Likewise.
2004-10-14 12:54:47 +00:00
Mark Mitchell c0042f5da0 * elf32-arm.h (elf32_arm_finish_dynamic_sections): Use file
offsets, not VMAs, for DT_VERSYM, DT_VERDEF, DT_VERNEED.

	* scripttempl/armbpabi.sc: Do not put .gnu.version.* into a
	loadable segment.
2004-10-13 17:45:31 +00:00
Alan Modra 09c112daa3 PR 44
* ldcref.c (check_section_sym_xref): Delete.
	(check_local_sym_xref): New function.
	(check_nocrossrefs): Adjust call.
2004-10-13 02:28:01 +00:00