Commit Graph

1085 Commits

Author SHA1 Message Date
Alexandre Oliva 44349745f2 * emulparams/elf32frvfd.sh (MAXPAGESIZE): Change to 16Kb. 2004-03-20 05:49:27 +00:00
Alan Modra 81359a70c3 * config.in: Regenerate.
* po/ld.pot: Regenerate.
2004-03-19 07:06:35 +00:00
Alan Modra 4a43e768f1 bfd/
* elf-bfd.h (struct elf_obj_tdata): Delete dt_soname field.  Add
	dyn_lib_class field.  Rearrange for better packing.
	(elf_dt_soname): Delete.
	(elf_dyn_lib_class): Define.
	* elf.c (bfd_elf_set_dt_needed_name): Update comment.
	(bfd_elf_set_dt_needed_soname): Delete.
	(bfd_elf_set_dyn_lib_class): New function.
	* elflink.h (add_dt_needed_tag): New function.  Split out from..
	(elf_link_add_object_symbols): ..here.  Rename "name" to "soname".
	Use elf_dyn_lib_class to set dt_needed and add_needed.  Move fallback
	initialization of soname.
	(elf_link_check_versioned_symbol): Test elf_dyn_lib_class instead of
	elf_dt_soname.
	* bfd-in.h (enum dynamic_lib_link_class): New.
	(bfd_elf_set_dt_needed_soname): Delete.
	(bfd_elf_set_dyn_lib_class): Declare.
	* bfd-in2.h: Regenerate.
ld/
	* ld.texinfo: Add --as-needed doco.
	* ldmain.c (as_needed): New global var.
	* ldmain.h (as_needed): Declare.
	* lexsup.c (option_values): Add OPTION_AS_NEEDED and
	OPTION_NO_AS_NEEDED.
	(ld_options): Likewise.
	(parse_args): Handle them.
	* ldlang.h (lang_input_statement_type): Add as_needed field.
	* ldlang.c (new_afile): Set p->as_needed.
	* emultempl/elf32.em (gld${EMULATION_NAME}_load_symbols): New function.
	(gld${EMULATION_NAME}_try_needed): Use bfd_elf_set_dyn_lib_class.
	(ld_${EMULATION_NAME}_emulation): Set LDEMUL_RECOGNIZED_FILE entry.

	* ldlang.c (open_input_bfds): Remove useless cast.
	(lang_do_assignments_1): Likewise.
	(lang_for_each_input_section): Delete.
2004-03-18 12:50:20 +00:00
Alan Modra 9183ed4b1b Switch sh-*-rtems* to ELF. Add sh-*-rtemscoff*. 2004-03-17 00:46:25 +00:00
Nick Clifton ee31fbd036 Honour PRIVATE keyword 2004-03-08 11:33:59 +00:00
Nathan Sidwell e5caec89a0 * elf.c (map_sections_to_segments): Ignore .tbss sections for
layout purposes.

	* ldlang.c (lang_add_section): Don't force SEC_LOAD on
	SEC_THREAD_LOCAL.
	(IGNORE_SECTION): Ignore .tbss sections too.
	(lang_size_sections_1): .tbss sections do not advance dot.

	* ld-scripts/size.exp: New.
	* ld-scripts/size-[12].{d,s,t}: New.
2004-03-05 11:26:05 +00:00
Andreas Schwab cc2f008e43 * ld.texinfo (Options): Fix example for --wrap. 2004-03-01 17:33:36 +00:00
Danny Smith f5a95868e4 * pe-dll.c (fill_edata): Check that exported_symbol_sections is
not NULL.
2004-02-25 21:00:32 +00:00
Ian Lance Taylor 177b729b44 * ldlang.c (lang_check): Use %P, not %E, in error message. 2004-02-23 19:41:53 +00:00
Nathan Sidwell 1b49374200 * ldlang.h (struct lang_output_section_state): Change processed
field's type.
	* ldexp.c (check, invalid): Remove.
	(fold_name): Move valid_p assignments. Create undefined symbol
	when needed. Directly exampine section's processd flag.
	* ldlang.c (lang_output_section_statement_lookup): Adjust
	processed field init.
	(lang_size_sections_1): Allow LOADADDR when determining section's
	VMA. Adjust error message. Fold data statement's expr.
	(lang_size_sections): Correctly increment lang_statement_iteration.

	* ld-scripts/provide.exp: New.
	* ld-scripts/provide-{1,2,3}.{s,t,d}.exp: New.

	* ldexp.c (fold_tree): Follow indirect symbols.
2004-02-23 10:10:02 +00:00
Nathan Sidwell 876f40905a * ldgram.y (exp): Add two operand ALIGN.
* ldexp.c (fold_binary): Add ALIGN_K case.
	* ld.texinfo (ALIGN): Document two operand version.
	* ld-scripts/align.{s,t,exp}: New.
2004-02-20 15:31:10 +00:00
Nathan Sidwell 384d938fc8 * ldlang.c (map_input_to_output_sections): Initialize sections
mentioned in a data statement expression.
	(lang_do_assignments_1): Add data statement's expression's
	section's vma.
	* ld-scripts/data.{s,t,d,exp}: New.
2004-02-19 14:08:31 +00:00
Nathan Sidwell b6ca8815ef * ldgram.y (statement_anywhere): Add assert rule.
* ldlang.c (exp_init_os): Add assert case.
	* testsuite/ld-scripts/assert.{s,t,exp}: New.
2004-02-18 16:37:21 +00:00
Andrew Cagney c92c35e706 Use bfd_cache_close, instead of accessing bfd->iostream directly. 2004-02-15 02:24:53 +00:00
Richard Sandiford 9bf78c997e * emulparams/elf32bmipn32-defs.sh (OTHER_SECTIONS): Discard
.MIPS.content* and .MIPS.events* sections.
2004-02-14 11:45:25 +00:00
Daniel Jacobowitz f380691611 * emulparams/armelf.sh, emulparams/armelf_linux.sh: Move
.note.gnu.arm.ident to after allocated sections.  Mark its
	address as 0.
2004-02-09 18:06:20 +00:00
Daniel Jacobowitz 4c8e70d733 * emulparams/armelf_linux.sh (COMMONPAGESIZE): Set to 4KB.
* emulparams/elf32bmip.sh (COMMONPAGESIZE): Likewise.
	* emulparams/elf32bmipn32.sh (COMMONPAGESIZE): Likewise.
	* emulparams/elf32btsmipn32.sh (COMMONPAGESIZE): Likewise.
	* emulparams/shlelf_linux.sh (COMMONPAGESIZE): Likewise.
2004-02-09 17:54:25 +00:00
Nick Clifton ff71f4f7d0 Fix typo in previous delta 2004-02-05 11:41:51 +00:00
Nick Clifton 07a68a8066 Fix thinko checking for dlls in archives. 2004-02-04 09:13:28 +00:00
Alan Modra 586196d51c * genscripts.sh: Fix typo. 2004-01-28 13:42:26 +00:00
Alan Modra 1dd3bf6876 * genscripts.sh: Apply $LIBPATH_SUFFIX to $tool_lib and $libdir too. 2004-01-28 13:31:30 +00:00
Jakub Jelinek 13d9421f66 * emulparams/elf64_ia64.sh: Put .rela.opd into
OTHER_GOT_RELOC_SECTIONS instead of OTHER_PLT_RELOC_SECTIONS.
2004-01-24 16:29:40 +00:00
Danny Smith 4d8907ac12 * pe-dll.c (pe_create_import_fixup): Clear WP_TEXT flag.
* ld.texinfo (--omagic): Note that writable text section
	does not conform to published PE-COFF specs.
	(--enable-auto-import): Likewise.
2004-01-20 21:08:16 +00:00
Alan Modra e5c60db524 * emulparams/elf32ppc.sh (COMMONPAGESIZE): Define. 2004-01-15 12:38:19 +00:00
Nick Clifton 6bdafbeb57 * ldlang.c (lang_get_regions): Add extra parameter 'have_vma' which if true will
prevent the LMA region being used as a replacement for a default VMA region.
  (lang_leave_output_section_statement): Pass extra parameter.
  (lang_leave_overlay): Likewise.
* ld.texinfo (Output Section LMA): Document that the LMA region can be set to
  the VMA region if no VMA has been set.
* ldlang.h (struct lang_output_section_phdr_list): Create a typedef for this
  type.  Minor formatting fixes.
2004-01-13 11:10:53 +00:00
Nick Clifton 9dfc8ab287 If dot is advanced, then assume that the section should be allocated. 2004-01-13 08:24:20 +00:00
Alan Modra 8325c4dd4e * ldlang.c (IGNORE_SECTION): Don't ignore SEC_ALLOC && !SEC_LOAD
sections.  Do ignore SEC_NEVER_LOAD sections.
	(lang_size_sections_1): Remove test made redundant with the above.
2004-01-12 13:47:32 +00:00
Alan Modra 8349035256 * emultempl/ppc64elf.em (ppc_before_allocation): Clear cached
program_header_size.
2004-01-09 05:36:30 +00:00
Alexandre Oliva 005e11184b 2003-11-28 Alexandre Oliva <aoliva@redhat.com>
* emulparams/elf32frvfd.sh (EMBEDDED): Clear.
2003-11-05  Alexandre Oliva  <aoliva@redhat.com>
* emulparams/elf32frvfd.sh (STACK_ADDR): Unset.
(MAXPAGESIZE): Set to 64Kb.
(OTHER_READONLY_SECTIONS): Define __ROFIXUP_LIST__ and
__ROFIXUP_END__.  Don't map .rofixup.got any more.
* emulparams/elf32frv.sh (NOP): Set.
2003-10-31  Alexandre Oliva  <aoliva@redhat.com>
* configure.tgt: Add frv-*-*linux*.
2003-09-30  Alexandre Oliva  <aoliva@redhat.com>
* Makefile.am (ALL_EMULATIONS): Added eelf32frvfd.o.
(eelf32frvfd.c): New.
* configure.tgt <frv-*-*>: Added it to targ_extra_emuls.
* emulparams/elf32frv.sh: Reverted previous two patches.
* emulparams/elf32frvfd.sh: New.
* Makefile.in: Rebuilt.
2003-09-18  Alexandre Oliva  <aoliva@redhat.com>
* emulparams/elf32frv.sh (OTHER_READONLY_SECTIONS): Added
.rofixup.got to .rofixup.
2003-09-15  Alexandre Oliva  <aoliva@redhat.com>
* emulparams/elf32frv.sh (MAXPAGESIZE): Make it 256KiB, not 256B.
(TEMPLATE_NAME, GENERATE_SHLIB_SCRIPT): Set.
2004-01-06 19:19:52 +00:00
Jakub Jelinek 060feee54d * emulparams/elf_s390.sh (NO_SMALL_DATA): Set to yes.
* emulparams/elf64_s390.sh (NO_SMALL_DATA): Set to yes.
2004-01-05 09:53:31 +00:00
Alan Modra c2df3ea5c0 typo fix 2004-01-03 12:49:29 +00:00
Alan Modra e5caa5e0ca * ldexp.c (align_n): Make static.
* ldexp.h (align_n): Delete declaration.
	* ldlang.h (lang_enter_output_section_statement): Remove
	block_value param.
	* ldlang.c (lang_enter_output_section_statement): Likewise.
	(TO_ADDR, TO_SIZE): Define.
	(opb): New var.
	(init_opb): New function.
	(print_input_section): Call init_opb and use TO_ADDR.
	(print_data_statement, print_reloc_statement): Likewise.
	(print_padding_statement): Likewise.
	(size_input_section): Use TO_SIZE and TO_ADDR, and global opb.
	(lang_check_section_addresses): Likewise.
	(lang_size_sections_1): Likewise.
	(lang_do_assignments_1): Likewise.
	(lang_set_startof): Likewise.
	(lang_one_common): Likewise.  Combine power_of_two and opb alignment.
	(lang_process): Call init_opb.
	(lang_abs_symbol_at_end_of): Use TO_ADDR and global opb.
	(lang_enter_overlay_section): Adjust
	lang_enter_output_section_statement call.
	* ldgram.y: Likewise.
	* mri.c (mri_draw_tree): Likewise.
	* emultempl/elf32.em (gld${EMULATION_NAME}_place_orphan): Likewise.
	* emultempl/mmo.em (mmo_place_orphan): Likewise.
	* emultempl/pe.em (gld${EMULATION_NAME}_place_orphan): Likewise.
2004-01-03 12:39:07 +00:00
Alan Modra 5e2f15758b * ldfile.c (ldfile_set_output_arch): Add defarch param.
* ldfile.h (ldfile_set_output_arch): Ditto.
	* emultempl/aix.em (gld${EMULATION_NAME}_before_parse): Use
	ldfile_set_output_arch.
	* emultempl/beos.em (gld${EMULATION_NAME}_before_parse): Ditto.
	* emultempl/elf32.em (gld${EMULATION_NAME}_before_parse): Ditto.
	* emultempl/linux.em (gld${EMULATION_NAME}_before_parse): Ditto.
	* emultempl/mipsecoff.em (gld${EMULATION_NAME}_before_parse): Ditto.
	* emultempl/pe.em (gld${EMULATION_NAME}_before_parse): Ditto.
	* emultempl/sunos.em (gld${EMULATION_NAME}_before_parse): Ditto.
	* ldgram.y: Adjust ldfile_set_output_arch call.
	* emultempl/armcoff.em (gld${EMULATION_NAME}_before_parse): Ditto.
	* emultempl/armelf.em (gld${EMULATION_NAME}_before_parse): Ditto.
	* emultempl/armelf_oabi.em (gld${EMULATION_NAME}_before_parse): Ditto.
	* emultempl/generic.em (gld${EMULATION_NAME}_before_parse): Ditto.
	* emultempl/gld960c.em (gld960_set_output_arch): Ditto.
	* emultempl/m68kcoff.em (gld${EMULATION_NAME}_before_parse): Ditto.
	* emultempl/ticoff.em (gld${EMULATION_NAME}_before_parse): Ditto.
2004-01-03 11:09:07 +00:00
Nick Clifton b50c15dce9 Add m68k-uclinux target 2004-01-02 16:37:12 +00:00
Alan Modra c9e214e571 Split ChangeLog files. 2004-01-02 11:16:21 +00:00
Nick Clifton 6edf0760c5 Add support for m32r-linux target, including a RELA ABI and PIC. 2003-12-19 11:44:01 +00:00
Nick Clifton 44dbf3639f When scanning MS import libraries allow for the possible presence of static
objects.
2003-12-18 14:56:44 +00:00
Michael Snyder d8d962c31a Fix typo. 2003-12-16 21:49:41 +00:00
H.J. Lu 2f97444a4f 2003-12-07 H.J. Lu <hongjiu.lu@intel.com>
* ldlang.c (lang_vers_match): Pass "DMGL_PARAMS | DMGL_ANSI" to
	cplus_demangle.
2003-12-08 03:43:33 +00:00
Kazu Hirata 62b635b637 * ldemul.c: Convert to ISO-C.
* ldver.c: Likewise.
2003-12-07 23:52:44 +00:00
Kazu Hirata 48ecb30c92 * lexsup.c (is_num): Remove. 2003-12-07 00:08:41 +00:00
Nick Clifton d3793eaa60 Fixes for use of ARM_26D reloc in arm-wince toolchain. 2003-12-05 11:30:18 +00:00
H.J. Lu d9c458fcc1 bfd/
2003-12-04  H.J. Lu  <hongjiu.lu@intel.com>

	* elfxx-ia64.c (elfNN_ia64_relax_section): Use the
	need_relax_finalize field in link_info instead of
	relax_finalizing to check if the relax finalize pass is being
	done.

include/

2003-12-04  H.J. Lu  <hongjiu.lu@intel.com>

	* bfdlink.h (bfd_link_info): Change relax_finalizing to
	need_relax_finalize.

ld/

2003-12-04  H.J. Lu  <hongjiu.lu@intel.com>

	* emultempl/ia64elf.em (gld${EMULATION_NAME}_after_parse): Set
	link_info.need_relax_finalize to TRUE.

	* ldlang.c (lang_process): Use link_info.need_relax_finalize
	instead of link_info.relax_finalizing.
	* ldmain.c (main): Likewise.
2003-12-04 22:43:36 +00:00
Nick Clifton 2051433802 Define RELOCATEABLE_OUTPUT_FORMAT 2003-12-04 17:51:43 +00:00
Alan Modra f2241121e3 * ldlang.c (lang_do_assignments): Function return is void.
* ldlang.h (lang_do_assignments): Ditto.
	* emultempl/netbsd.em (gld${EMULATION_NAME}_before_parse): Declare.
	* Makefile.am (ens32knbsd.c): Depend on netbsd.em.
	* Makefile.in: Regenerate.
2003-12-04 12:09:25 +00:00
Nick Clifton f8fc344381 Add vax-linux-gnu target 2003-12-03 15:07:17 +00:00
Nick Clifton f2f489ac6f (HEAP_SECTION_MSP430): New section for forthcoming devices.
(_etext): provide this defenition for all scripts.
2003-12-03 10:44:50 +00:00
Kazu Hirata 021d913e2e * emultempl/beos.em: Remove ARGSUSED. 2003-12-03 03:25:36 +00:00
Alan Modra 6ad841a183 Rename bfd_link_hash_entry field "next" -> "und_next". 2003-12-02 23:00:00 +00:00
Nick Clifton da8bce141c Update docs to reflect fact the --undefined-symbols==ignore-all is no longer
the default for shared libraries and dynamic executables.
2003-12-02 15:38:46 +00:00