Commit Graph

780 Commits

Author SHA1 Message Date
Alan Modra fcf0e35b46 * ldlang.c (ldlang_add_undef): If the output bfd has been opened,
add the symbol to the linker hash table immediately.
	(lang_place_undefineds): Split symbol creation out..
	(insert_undefined): ..to here.
2002-03-20 07:49:53 +00:00
David O'Brien fed2999dfb 2002-03-18 David O'Brien <obrien@FreeBSD.org>
* emultempl/elf32.em: Use lbasename vs. basename to fix problem where
	the contents of the buffer returned from basename function will are
	getting overwritten while still being used.

Approved by:  Alan Modra <amodra@bigpond.net.au>
              Message-ID: <20020318032031.GD1089@bubble.sa.bigpond.net.au>
2002-03-19 21:03:43 +00:00
Jan Hubicka beb43bb9f4 * cpu-i386.c (bfd_x86_64_arch): Rename to "i386:x86-64"
* configure.tgt (x86_64-*-linux-gnu*): Configure i386 as native.

	* elf_x86_64.sh (ARCH): Set to i386:x86-64
	set libraries to default to lib64 paths.
2002-03-18 16:42:43 +00:00
Nick Clifton eb1e0e807a Add AIX 64 shared library support and emulation layer for binutils 2002-03-18 12:46:27 +00:00
Nick Clifton a1c259a138 Updated French translations 2002-03-18 09:44:22 +00:00
Alan Modra 862120bdbe * ldmain.c (main): Move .text readonly flag fudges from here..
* ldlang.c (lang_process): ..to here.
2002-03-18 02:55:51 +00:00
Alan Modra d35a52e2a7 * ldlang.c (lang_check): Remove the word size check added in last
change.  Treat emitrelocations case as for relocatable links.
2002-03-14 10:39:46 +00:00
Nick Clifton 9ce88e60f3 Updated French translations 2002-03-13 10:35:17 +00:00
Alan Modra 30cba02509 * ldlang.c (lang_check): Do relocatable link checks first, so that
warn_mismatch can't override.  Check compatible and word size too.
2002-03-13 02:56:36 +00:00
Daniel Jacobowitz 84ec0e6d80 2002-03-07 Daniel Jacobowitz <drow@mvista.com>
* ld.texinfo: Wrap @menu in @ifnottex, not @ifinfo.
2002-03-08 04:07:21 +00:00
Jakub Jelinek 2d13d8c5ee * scripttempl/elf.sc: Only use DATA_SEGMENT_END() together with
DATA_SEGMENT_ALIGN.
2002-03-05 11:56:23 +00:00
H.J. Lu b5090659de 2002-03-04 H.J. Lu <hjl@gnu.org>
* scripttempl/elf.sc: Put .preinit_array, .init_array and
	.fini_array in the data segment.
2002-03-04 20:40:14 +00:00
Alan Modra f42ce16e2f * scripttempl/elf.sc: Correct syntax errors in 2002-03-01 commit. 2002-03-04 01:37:52 +00:00
Richard Henderson de77b6ac8b * scripttempl/elf.sc (SECTIONS): Add entries for .preinit_array,
.init_array, and .fini_array.
2002-03-02 01:25:26 +00:00
Andreas Schwab 997e08c061 * emulparams/elf64_ia64.sh (OTHER_READONLY_SECTIONS): Don't fold
.IA64_unwind* in a relocatable link.
2002-02-20 10:48:25 +00:00
Nick Clifton 9a66911f91 Mark 2.12 branch 2002-02-20 10:46:54 +00:00
David O'Brien 6a7f963b84 match reality 2002-02-20 06:53:29 +00:00
Martin Schwidefsky d86bcc1089 2002-02-19 Martin Schwidefsky <schwidefsky@de.ibm.com>
* emulparams/elf64_s390.sh (ARCH): Change to "s390:64-bit".
	* emulparams/elf_s390.sh (ARCH): Change to "s390:31-bit".
2002-02-19 18:58:04 +00:00
Tom Rix 69f284c74e Add support for -brtl, run time linking, to AIX ld. 2002-02-19 05:01:40 +00:00
Alan Modra 82bd7b59c9 * elf64-ppc.c (STFD_FR0_0R1, LFD_FR0_0R1, BLR): Define.
(struct ppc_link_hash_table): Add sfpr.
	(ppc64_elf_link_hash_table_create): Init it.
	(ppc64_elf_create_dynamic_sections): Split creation of .stub and
	.glink out to..
	(create_linkage_sections): ..here.  Make .sfpr too.
	(ppc64_elf_check_relocs): Call create_linkage_sections, and set
	dynobj early.
	(MIN_SAVE_FPR, MAX_SAVE_FPR): Define.
	(ppc64_elf_func_desc_adjust): Look for missing ._savef* and
	._restf* functions, and create as needed.
	(func_desc_adjust): Only force_local for shared libs.

	* emulparams/elf64ppc.sh (OTHER_TEXT_SECTIONS): Define.
2002-02-18 12:40:28 +00:00
David O'Brien ac3e50bf05 2002-02-18 David O'Brien <obrien@FreeBSD.org>
* Makefile.in: Add new files earmelf_fbsd, eelf32ppc_fbsd,
	eelf_i386_fbsd, eelf64_ia64_fbsd, eelf_x86_64_fbsd, eelf64_sparc_fbsd,
	and eelf64alpha_fbsd.
	* configure.tgt(sparc64-*-freebsd, ia64-*-freebsd, i[3456]86-*-freebsd,
	x86_64-*-freebsd, arm-*-freebsd, alpha*-*-freebsd, powerpc-*-freebsd):
	use a FreeBSD-specific emulation rather than the psABI one.
	* emulparams/elf_fbsd.sh (ELF_INTERPRETER_NAME): Set appropriate value
	for all FreeBSD ELF systems.
	* emulparams/armelf_fbsd.sh: Bridge elf_fbsd.sh and the "native" psABI
	emulation.
	* emulparams/elf32ppc_fbsd.sh: Likewise.
	* emulparams/elf64_ia64_fbsd.sh: Likewise.
	* emulparams/elf64_sparc_fbsd.sh: Likewise.
	* emulparams/elf64alpha_fbsd.sh: Likewise.
	* emulparams/elf_i386_fbsd.sh: Likewise.
	* emulparams/elf_x86_64_fbsd.sh: Likewise.

Approved by:  Nick Clifton <nickc@cambridge.redhat.com>
              <m3pu33yy0b.fsf@north-pole.nickc.cambridge.redhat.com>
2002-02-18 09:38:01 +00:00
Nick Clifton 6ad738c5d9 Updated translations 2002-02-18 08:40:03 +00:00
Alan Modra 9673c93c26 * ld.texinfo (Output Section Fill): Fix amateur texinfo.
(FILL): Likewise.
2002-02-17 22:15:40 +00:00
Hans-Peter Nilsson 1c5e644702 * emultempl/mmo.em (mmo_after_open): Don't call
_bfd_mmix_check_all_relocs when producing ELF output.
2002-02-17 21:38:03 +00:00
Richard Henderson 8bb5751698 * emulparams/elf64alpha.sh (NOP): Adjust for big-endian
definition.  Emit a unop+nop pair.
2002-02-15 23:39:27 +00:00
Hans-Peter Nilsson 83c2d653c3 * emultempl/mmix-elfnmmo.em (mmix_after_allocation): Also check
for presence of .MMIX.reg_contents.linker_allocated before early
	exit.
2002-02-15 06:50:19 +00:00
Hans-Peter Nilsson 49fda6c8d0 * NEWS: Mention support for MMIX. 2002-02-15 04:04:03 +00:00
Alan Modra a139d329de * ld.texinfo (Output Section Fill): Describe fill expressions.
(FILL): Refer to the above.
2002-02-15 03:34:47 +00:00
Alan Modra 2c382fb6f5 Support arbitrary length fill patterns.
* ldexp.h (etree_value_type): Add "str" field.
	(union etree_union): Add "str" to "value" struct.
	(exp_bigintop): Declare.
	(exp_get_fill): Declare.
	* ldexp.c: Include "safe-ctype.h".
	(exp_intop): Set value.str to NULL.
	(exp_bigintop): New function.
	(new_rel): Pass in "str", and set new.str from it.
	(new_rel_from_section): Set new.str to NULL.
	(fold_name): Adjust calls to new_rel.
	(exp_fold_tree): Likewise.
	(exp_get_fill): New function.
	* ldgram.y (struct big_int bigint, fill_type *fill): New.
	(INT): Returns a "bigint".  Adjust all code handling INTs.
	(fill_opt): Returns a "fill".
	(fill_exp): Split out of fill_opt, use for FILL.
	* ldlang.h (struct _fill_type): New.
	(fill_type): Move typedef to ldexp.h.
	(lang_output_section_statement_type): "fill" is now a pointer.
	(lang_fill_statement_type): Likewise.
	(lang_padding_statement_type): Likewise.
	(lang_add_fill): Now takes a "fill_type *" param.
	(lang_leave_output_section_statement): Likewise.
	(lang_do_assignments): Likewise.
	(lang_size_sections): Likewise.
	(lang_leave_overlay_section): Likewise.
	(lang_leave_overlay): Likewise.
	* ldlang.c: Include ldgram.h after ldexp.h.
	(lang_output_section_statement_lookup): Adjust for fill_type change.
	(print_fill_statement): Likewise.
	(print_padding_statement): Likewise.
	(insert_pad): Now takes a "fill_type *" arg.
	(size_input_section): Likewise.
	(lang_size_sections_1): Likewise.
	(lang_size_sections): Likewise.
	(lang_do_assignments): Likewise.
	(lang_add_fill): Likewise.
	(lang_leave_output_section_statement): Likewise.
	(lang_leave_overlay_section): Likewise.
	(lang_leave_overlay): Likewise.
	Adjust all callers of the above function.
	* ldlex.l: Include ldgram.h after ldexp.h.  Allow hex numbers
	starting with "0X" as well as "0x".  Return bigint.str for hex
	numbers starting with "0x" or "0X", zero bigint.str otherwise.
	Always use base 16 for numbers starting with "$".
	* ldmain.c: Include ldgram.h after ldexp.h.
	* ldwrite.c (build_link_order): Use bfd_data_link_order in place
	of bfd_fill_link_order.
	* pe-dll.c: Adjust lang_do_assignments calls.
	* emultempl/elf32.em: Likewise.
	* emultempl/hppaelf.em: Likewise.
	* emultempl/ppc64elf.em: Likewise.
	* emultempl/beos.em: Include ldgram.h after ldexp.h, adjust
	lang_add_assignment call.
	* emultempl/pe.em: Likewise.
2002-02-15 02:11:05 +00:00
Alan Modra 313e35ee7c * ld.texinfo (VERSION scripts): Symbol names are globbing patterns.
* ldgram.y (lang_new_vers_regex):  Rename to lang_new_vers_pattern;
	the pattern in question is not a regexp.
	* ldlang.c:  Likewise.
	* ldlang.h:  Likewise.
	* ldlex.l (V_IDENTIFIER):  Allow '[', ']', '-', '!', and '^' also.
2002-02-14 04:24:33 +00:00
Jakub Jelinek 2d20f7bf67 * ldlex.l (DATA_SEGMENT_ALIGN, DATA_SEGMENT_END): New tokens.
* ldgram.y (DATA_SEGMENT_ALIGN, DATA_SEGMENT_END): New tokens.
	(exp): Add DATA_SEGMENT_ALIGN (exp, exp) and DATA_SEGMENT_END (exp).
	* ldexp.c (exp_data_seg): New variable.
	(exp_print_token): Handle DATA_SEGMENT_ALIGN and DATA_SEGMENT_END.
	(fold_binary): Handle DATA_SEGMENT_ALIGN.
	(exp_fold_tree): Handle DATA_SEGMENT_END.
	Pass allocation_done when recursing instead of hardcoding
	lang_allocating_phase_enum.
	* ldexp.h (exp_data_seg): New.
	* ldlang.c (lang_size_sections_1): Renamed from lang_size_sections.
	(lang_size_sections): New.
	* ld.texinfo (DATA_SEGMENT_ALIGN, DATA_SEGMENT_END): Document.
	* scripttempl/elf.sc: Use DATA_SEGMENT_ALIGN and DATA_SEGMENT_END
	if COMMONPAGESIZE is defined.
	* emulparams/elf_i386.sh (COMMONPAGESIZE): Set to 4K.
	* emulparams/elf32_sparc.sh (COMMONPAGESIZE): Set to 8K.
	* emulparams/elf64_sparc.sh (COMMONPAGESIZE): Set to 8K.
	* emulparams/elf64alpha.sh (COMMONPAGESIZE): Set to 8K.
	* emulparams/elf64_ia64.sh (COMMONPAGESIZE): Set to 16K for shared
	libraries only.
2002-02-12 14:50:08 +00:00
Alan Modra 06880219d1 * Makefile.in: Regenerate. 2002-02-11 05:18:20 +00:00
Daniel Jacobowitz 37b0ac0fc8 2002-02-10 Daniel Jacobowitz <drow@mvista.com>
* lexsup.c: Remove strtoul declaration.
2002-02-11 02:41:37 +00:00
Daniel Jacobowitz 4e5bae56d4 2002-02-10 Daniel Jacobowitz <drow@mvista.com>
* ldmain.c: Add prototype for main ().
	* lexsup.c: Guard declaration of strtoul with HAVE_STDLIB_H.
	* emultempl/lnk960.em (lnk960_choose_target): Function should
	take two arguments.
2002-02-10 19:12:13 +00:00
Alan Modra 1e28151506 * ldlang.c (entry_section): New initialised variable.
(lang_finish): Use it.
	* ldlang.h (entry_section): Declare.
	* emultempl/ppc64elf.em (gld${EMULATION_NAME}_finish): Set
	entry_section to ".opd".
2002-02-10 10:55:23 +00:00
Chris Demetriou f92d92ffd1 Fix date in last entry. I should stop living in the past. 2002-02-10 02:50:09 +00:00
Chris Demetriou 0a9c1c8e0c 2002-02-08 Chris Demetriou <cgd@broadcom.com>
* ld.texinfo (Options): Add back in -nostdlib documentation,
        which had been inadvertently removed.
2002-02-10 00:40:38 +00:00
Hans-Peter Nilsson 74c44237fd * emultempl/mmix-elfnmmo.em (mmix_after_allocation): Adjust
register section vma to a sane value after emitting error.  Make
	fatal conditions cause program exit when emitting message.
2002-02-09 05:07:07 +00:00
Nick Clifton 5e37cc4676 Fix compile time warning messages 2002-02-08 12:12:15 +00:00
Alexandre Oliva 2d92cb7d27 Contribute sh64-elf.
2002-01-24  Alexandre Oliva  <aoliva@redhat.com>
* emulparams/shelf32.sh (STACK_ADDR): Define as formerly defined
in OTHER_RELOCATABLE_SECTIONS.
2002-01-18  Alexandre Oliva  <aoliva@redhat.com>
* emulparams/shelf32.sh (STACK_ADDR): Define.
(OTHER_RELOCATABLE_SECTIONS): Renamed to...
(OTHER_SECTIONS): this.	 Removed stack settings.
* emulparams/shelf64.sh (OTHER_RELOCATABLE_SECTIONS): Do not set.
(OTHER_SECTIONS): Reset after sourcing shelf32.sh.
2001-03-12  DJ Delorie	<dj@redhat.com>
* emultempl/sh64elf.em (sh64_elf_$_before_allocation): Disable
relaxing if any shmedia or mixed sections are found.
2001-03-07  DJ Delorie	<dj@redhat.com>
* emultempl/sh64elf.em (sh64_elf_before_allocation): Pass f to
einfo.	Gracefully decline to output to non-elf formats.
2001-03-06  Hans-Peter Nilsson	<hpn@redhat.com>
* emulparams/shelf64.sh (OTHER_RELOCATING_SECTIONS) <.stack>:
Default to _end aligned to next multiple of 0x40000, plus 0x40000.
* emulparams/shelf32.sh: Ditto.
2001-01-14  Hans-Peter Nilsson	<hpn@cygnus.com>
* emulparams/shelf32.sh (OTHER_RELOCATING_SECTIONS): Tweak
comment.
2001-01-10  Ben Elliston  <bje@redhat.com>
* emulparams/shelf32.sh (OTHER_RELOCATING_SECTIONS): Avoid
non-portable shell constructs. From Hans-Peter Nilsson.
2001-01-09  Hans-Peter Nilsson	<hpn@cygnus.com>
* emulparams/shelf64.sh (EXTRA_EM_FILE): Define empty.
* Makefile.am (eshelf64.c, eshlelf64.c, eshlelf32.c): Adjust
dependencies to the shell script include chain.
* Makefile.in: Regenerate.
2001-01-06  Hans-Peter Nilsson	<hpn@cygnus.com>
* emultempl/sh64elf.em: Update and tweak comments.
(sh64_elf_${EMULATION_NAME}_after_allocation): Always allocate and
make a .cranges section SEC_IN_MEMORY.
2000-12-30  Hans-Peter Nilsson	<hpn@cygnus.com>
* emultempl/sh64elf.em
(sh64_elf_${EMULATION_NAME}_before_allocation): Don't stop when
.cranges section found to be necessary; continue and set stored
section contents flags for sections with non-mixed contents.
Use a struct sh64_section_data container and sh64_elf_section_data
to store contents-type flags.
Remove unused update of "isec".
(sh64_elf_${EMULATION_NAME}_after_allocation): Only process
sections marked SHF_SH5_ISA32_MIXED.  Use sh64_elf_section_data to
access contents-type flags.  Assert that the associated container
is initialized.	 Use that container, not elf_gp_size, to hold size
of linker-generated cranges contents.
2000-12-18  Hans-Peter Nilsson	<hpn@cygnus.com>
* emultempl/sh64elf.em
(sh64_elf_${EMULATION_NAME}_before_allocation): Exit early if
there's already a .cranges section.  When section flag difference
is found, don't NULL-check cranges a second time.  Tweak comments.
(sh64_elf_${EMULATION_NAME}_after_allocation): Use size after
merging, not max size, as size of ld-generated .cranges contents.
Don't set ELF section flags in output section.	When checking for
needed .cranges descriptors, don't use a variable; compare
incoming ELF section flags directly to SHF_SH5_ISA32_MIXED.  Tweak
comments.
2000-12-18  Hans-Peter Nilsson	<hpn@cygnus.com>
* emultempl/sh64elf.em: New file.
* Makefile.am (eshelf32.c, eshlelf32.c): Adjust dependencies.
* Makefile.in: Regenerate.
* emulparams/shelf32.sh (OUTPUT_FORMAT): Only set if not set.
(OTHER_RELOCATING_SECTIONS): Ditto.
(EXTRA_EM_FILE): New, set to sh64elf if not set.
* emulparams/shlelf32.sh: Stub out all settings except
OUTPUT_FORMAT.	Source shelf32.sh.
* emulparams/shelf64.sh: Similar, but also keep ELF_SIZE and
OTHER_RELOCATING_SECTIONS.
(OTHER_RELOCATING_SECTIONS): Remove .cranges.
* emulparams/shlelf64.sh: Stub out all settings except
OUTPUT_FORMAT.	Source shelf64.sh.
2000-12-15  Hans-Peter Nilsson	<hpn@cygnus.com>
* emulparams/shelf64.sh (OTHER_RELOCATING_SECTIONS): Include
.cranges section.
(DATA_START_SYMBOLS): Define, provide ___data.
(OTHER_READONLY_SYMBOLS): Define, provide ___rodata and align to 8
for consecutive .data section.
(OTHER_GOT_SECTIONS): Define, align to 8 for consecutive .bss
section after .data section.
* emulparams/shlelf64.sh: Ditto.
* emulparams/shelf32.sh: Ditto.
(ALIGNMENT): Define to 8.
* emulparams/shelf32.sh: Ditto.
2000-12-12  Hans-Peter Nilsson	<hpn@cygnus.com>
* configure.tgt (sh64-*-elf*): Assign targ_extra_libpath to get
built-in linker scripts.
2000-11-30  Hans-Peter Nilsson	<hpn@cygnus.com>
* emulparams/shlelf64.sh: New.
* emulparams/shelf64.sh: New.
* configure.tgt (sh64-*-elf*): Add shelf64 and shlelf64 to
targ_extra_emuls.
* Makefile.am: Add support for shlelf64 and shelf64.
* Makefile.in: Regenerate.
2000-11-29  Hans-Peter Nilsson	<hpn@cygnus.com>
* configure.tgt (sh64-*-elf*): Add shelf as default.
Add shlelf to targ_extra_emuls.
2000-11-24  Hans-Peter Nilsson	<hpn@cygnus.com>
* emulparams/shelf32.sh: New file.
* emulparams/shlelf32.sh: New file.
* Makefile.am: Add support for shlelf32 and shelf32.
* configure.tgt: Map sh64-*-elf* to shlelf32 and shelf32.
* Makefile.in: Regenerate.
2002-02-08 06:39:01 +00:00
Hans-Peter Nilsson 126730bd1c Forgot to ci ChangeLog 2002-02-05 07:14:26 +00:00
Hans-Peter Nilsson e3dc884769 * ldlang.c (lang_reset_memory_regions): Rename from
reset_memory_regions.  Change all callers.  Make public.
	* ldlang.h (lang_reset_memory_regions): Prototype.
	* emultempl/elf32.em (gld${EMULATION_NAME}_finish): Call
	lang_reset_memory_regions before lang_size_sections.
2002-02-05 06:52:17 +00:00
Hans-Peter Nilsson 8017dbcb39 * emultempl/mmix-elfnmmo.em (mmix_after_allocation): Use signed
arithmetic when checking for too many global registers.
2002-02-04 04:42:29 +00:00
Jason Thorpe 006336b8fe bfd:
* config.bfd (hppa*-*-netbsd*): New target.

gas:
* configure.in (hppa-*-netbsd*): New target.
* configure: Regenerate.
* config/tc-hppa.h: Also define WARN_COMMENTS if TE_NetBSD.

ld:
* Makefile.am (ALL_EMULATIONS): Add ehppanbsd.o.
(ehppanbsd.c): New rule.
* Makefile.in: Regenerate.
* configure.tgt (hppa*-*-netbsd*): New target.
* emulparams/hppalinux.sh: Add comment to check other files
that source this file it is modified, and list which
files that do.
* emulparams/hppanbsd.sh: New file.
2002-02-02 18:36:04 +00:00
Geoffrey Keating da1f2fec05 In ld/ChangeLog:
* scripttempl/xstormy16.sc: Don't allocate extra space for the
	stack.
In libgloss/ChangeLog:
	* xstormy16/Makefile.in (SIM_OBJS): Remove sbrk.o, add
	sim_malloc_start.o.
	* xstormy16/eva_app.ld: Add __malloc_start.
	* xstormy16/sbrk.c: Remove.
	* xstormy16/sim_malloc_start.s: New file.
	* xstormy16/sim_high.ld: Make the stack start immediately at the
	end of the program.
In newlib/ChangeLog:
	* configure.host (xstormy16): Don't use the generic malloc.
	* libc/machine/xstormy16/Makefile.am: Build tiny-malloc.
	* libc/machine/xstormy16/Makefile.in: Regenerate.
	* libc/machine/xstormy16/mallocr.c: New file.
	* libc/machine/xstormy16/tiny-malloc.c: New file.
2002-02-01 18:00:36 +00:00
Hans-Peter Nilsson 48fa4a5def Support on-demand global register allocation from
R_MMIX_BASE_PLUS_OFFSET relocs.
	* emultempl/mmix-elfnmmo.em (mmix_after_allocation): Rename from
	mmix_set_reg_section_vma.  Call
	_bfd_mmix_finalize_linker_allocated_gregs.
	(mmix_before_allocation): New function.
	(LDEMUL_AFTER_ALLOCATION): Set to mmix_after_allocation.
	(LDEMUL_BEFORE_ALLOCATION): Define to mmix_before_allocation.
	* scripttempl/mmo.sc (.text): Mark .init, .fini as KEEP.
	(.MMIX.reg_contents): Add .MMIX.reg_contents.linker_allocated
	before .MMIX.reg_contents.
	* emultempl/mmo.em (gldmmo_before_allocation): Define to default.
	(mmo_after_open): New function.
	(LDEMUL_AFTER_OPEN): Define to mmo_after_open.
	* emulparams/elf64mmix.sh (OTHER_SECTIONS): Tweak formatting.  Add
	.MMIX.reg_contents.linker_allocated before .MMIX.reg_contents.
2002-02-01 08:24:03 +00:00
Nick Clifton 3b16e843f2 Add support for OpenRISC 32-bit embedded processor 2002-01-31 17:33:08 +00:00
Chris Demetriou f744d540a5 2002-01-29 Chris Demetriou <cgd@broadcom.com>
Mitch Lichtenberg  <mpl@broadcom.com>

        * emulparams/elf32bmip.sh (EXTRA_EM_FILE): Define to be mipself.
        * emultempl/mipself.em: New file to handle MIPS ELF embedded
        reloc creation (ld --embedded-relocs).
2002-01-30 02:22:14 +00:00
Daniel Jacobowitz 4867be4168 2002-01-27 Daniel Jacobowitz <drow@mvista.com>
From Steve Ellcey <sje@cup.hp.com>:
        * libtool.m4 (HPUX_IA64_MODE): Set to 32 or 64 based on ABI.
        (lt_cv_deplibs_check_method, lt_cv_file_magic_cmd,
        lt_cv_file_magic_test_file): Set to appropriate values for HP-UX
        IA64.
        * ltcf-c.sh (archive_cmds, hardcode_*): Ditto.
        * ltconfig (shlibpath_*, dynamic_linker, library_names_spec,
        soname_spec, sys_lib_search_path_spec): Ditto.


Various configure scripts regenerated.
2002-01-28 04:59:39 +00:00
Hans-Peter Nilsson cd8e197bd1 * Makefile.am (install): Depend on install-info.
* Makefile.in: Regenerate.
2002-01-26 21:33:06 +00:00
Alan Modra 9cb61eabc1 * ldmain.c (main): Use full sentences to ease translation. 2002-01-26 12:25:21 +00:00
Nick Clifton 1caa7b2354 Updated French translation 2002-01-26 08:53:50 +00:00
Nick Clifton 1ddbd15255 Updated Spanish translation 2002-01-25 14:25:03 +00:00
Andreas Jaeger 1e84433f5c * ldlex.l (yy_input): Correct error check. 2002-01-25 13:04:32 +00:00
Alan Modra 6d39955ebe * ldmisc.c (demangle): Put back dots when string not demangled. 2002-01-25 12:22:42 +00:00
Richard Henderson a9ed1e1b4e * emulparams/elf64alpha.sh (NOP): Use unop. 2002-01-22 09:51:15 +00:00
Andreas Jaeger 968ec2b9ac * ldlex.l: Use fread instead of read. 2002-01-21 19:53:44 +00:00
Jason Thorpe 9596feeafe bfd:
* config.bfd (ia64*-*-netbsd*): New target.

gas:
* configure.in (ia64-*-netbsd*): New target.
* configure: Regenerate.

ld:
* configure.tgt (ia64-*-netbsd*): New target.
2002-01-21 18:17:28 +00:00
H.J. Lu 493a6d4755 2002-01-21 H.J. Lu <hjl@gnu.org>
* emulparams/elf32btsmip.sh (SHLIB_TEXT_START_ADDR): Change to
	0.
	* emulparams/elf64btsmip.sh (SHLIB_TEXT_START_ADDR): Likewise.
2002-01-21 17:19:09 +00:00
Andreas Jaeger 2a538ba50c gas:
2002-01-18  Andreas Jaeger  <aj@suse.de>

	* as.c (parse_args): Update year.

binutils:
2002-01-18  Andreas Jaeger  <aj@suse.de>

	* version.c (print_version): Update year.

ld:
2002-01-18  Andreas Jaeger  <aj@suse.de>

	* ldver.c (ldversion): Update year.
2002-01-18 11:28:42 +00:00
Nick Clifton 328577adeb Regenerate .pot and .po files 2002-01-17 14:12:08 +00:00
Alan Modra 1f808cd5d7 * Makefile.am (eelf64ppc.c, eelf64lppc.c): Depend on ppc64elf.em.
* Makefile.in: Regenerate.
	* emulparams/elf64ppc.sh (EXTRA_EM_FILE): Define.
	* emultempl/ppc64elf.em: New file.
2002-01-16 05:52:38 +00:00
DJ Delorie 335c561080 * scripttempl/pe.sc: Add support for constructor priorities. 2002-01-16 01:48:43 +00:00
Denis Chertykov c40bbade5d * emulparams/avr1200.sh (DATA_START): Define as 0x60.
* emulparams/avr23xx.sh: Likewise.
	* emulparams/avr4433.sh: Likewise.
	* emulparams/avr44x4.sh: Likewise.
	* emulparams/avr85xx.sh: Likewise.
	* emulparams/avrmega103.sh: Likewise.
	* emulparams/avrmega161.sh: Likewise.
	* emulparams/avrmega603.sh: Likewise.
	* scripttempl/elf32avr.sc: Use DATA_START instead of 0x60.
2002-01-12 20:22:19 +00:00
Alexandre Oliva 34efb44947 * ldlang.c (walk_wild_section): Exclude object file if enclosing
archive is excluded.
2002-01-08 14:56:09 +00:00
Jason Thorpe 8d05742ff6 bfd:
* Makefile.am (BFD32_BACKENDS): Add elf32-sh-nbsd.lo.
(BFD32_BACKENDS_CFILES): Add elf32-sh-nbsd.c.
(elf32-sh-nbsd.lo): New rule.
* Makefile.in: Regenerate.
* config.bfd (sh*le-*-netbsdelf*): New target.
(sh*-*-netbsdelf*): New target.
* configure.in: Include netbsd-core.lo for native sh*-*-netbsd*.
(bfd_elf32_shnbsd_vec): New vector.
(bfd_elf32_shlnbsd_vec): New vector.
* configure: Regenerate.
* elf32-sh-nbsd.c: New file.
* targets.c: Update copyright years.
(_bfd_target_vector): Add bfd_elf32_shlnbsd_vec and
bfd_elf32_shnbsd_vec.

gas:
* configure.in (sh*le): Set cpu_type=sh and endian=little.
(sh*-*-netbsdelf*): New target.
* configure: Regenerate.
* tc-sh.h: Update copyright years.
(TARGET_FORMAT): Add version for TE_NetBSD.

ld:
* Makefile.am (ALL_EMULATIONS): Add eshelf_nbsd.o and eshlelf_nbsd.o.
(eshelf_nbsd.c): New rule.
(eshlelf_nbsd.c): New rule.
* Makefile.in: Regenerate.
* configure.tgt (sh*le-*-netbsdelf*): New target.
(sh*-*-netbsdelf*): New target.
* emulparams/shelf.sh: Document that shelf_nbsd.sh sources this file.
* ld/emulparams/shelf_nbsd.sh: New emulation.
* ld/emulparams/shlelf_nbsd.sh: New emulation.
2002-01-08 04:23:02 +00:00
Nick Clifton be2d1673e4 Add spanish translation files 2002-01-07 17:37:59 +00:00
Nick Clifton dbab7a7bff Note that --emit-relocs is currently only implemented for ELF. 2002-01-07 17:32:42 +00:00
Alan Modra 3dfe7a8c3a * emultempl/elf32.em (gld${EMULATION_NAME}_place_orphan): Make use
of bfd_section_list_remove and bfd_section_list_insert macros.
	* emultempl/pe.em (gld_${EMULATION_NAME}_place_orphan): Likewise.
	* emultempl/mmo.em (mmo_place_orphan): Likewise.
2002-01-05 13:14:00 +00:00
Andreas Jaeger 8a8b2d4b4a bfd:
* config.bfd (x86_64-*-netbsd*): New target.
	* configure.in (x86_64-*-netbsd*): Set COREFILE
	to netbsd-core.lo.
	* configure: Regenerated.

gas:
	* configure.in (i386-*-netbsdelf*): Collapse target into...
	(i386-*-netbsd*): ...this.  Add support for x86-64.
	* configure: Regenerated.

ld:
	* configure.tgt (x86_64-*-netbsd*): New target.
2002-01-04 14:49:06 +00:00
Tom Rix 9a4c7f1669 -binitfini emulation, put __rtinit symbol generation into linker. 2001-12-22 17:18:34 +00:00
Alan Modra cf86e6dffb * configure.tgt (mips*-dec-netbsd*): Delete alias for
mips*el-*-netbsd*.
	(sparc64-*-netbsd*): Add elf32_sparc to targ_extra_emuls.
2001-12-20 05:40:08 +00:00
Alan Modra 3695c2997d * configure.tgt (arm-*-netbsdelf*): Add target.
(arm-*-netbsd*): Add armelf and armelf_nbsd to targ_extra_emuls.
	* emulparams/armelf_nbsd.sh: Added.
	* Makefile.am: Add rules for earmelf_nbsd.
	* Makefile.in: Regenerate.
2001-12-20 03:19:43 +00:00
Andreas Jaeger 97cb79ae08 * configure.host: Add rules for x86_64-*linux-gnu. Change
s390x-linux entry to use gcc to report configuration, replace gcc
	with $CC in s390-linux
2001-12-19 19:58:28 +00:00
Andreas Jaeger 9d201f2ff1 * ld.texinfo (VERSION): Fix markup. 2001-12-19 09:20:22 +00:00
Matthew Green 0b69cd08e0 * config.bfd (m68*-*-netbsdelf*): New target.
(m68*-*-netbsd): Also include bfd_elf32_m68k_vec.
(m68*-*-netbsdaout*): New alias for m68*-*-netbsd.

* configure.in (m68k-*-netbsdelf*): New target.
(m68k-*-netbsd*): Also include ELF support.
(m68k-*-netbsdaout*): New alias for m68*-*-netbsd*.
* configure: Regenerate.

* Makefile.am (ALL_EMULATIONS): Add m68kelfnbsd.o.
(m68kelfnbsd.c): New rule.
* Makefile.in: Regenerate.
* configure.tgt (m68*-hp-netbsd*): Renamed to ..
(m68*-*-netbsd*4k*): .. this.
(m68*-*-netbsdelf*): New target.
(m68*-*-netbsd*): Also include ELF support.
(m68*-*-netbsdaout*): New alias for m68*-*-netbsd*.
* emulparams/m68kelfnbsd.sh: New emulation.
2001-12-18 13:26:26 +00:00
Jakub Jelinek 6b9b879a02 * ldgram.y (vers_node): Support anonymous version tags.
* ldlang.c (lang_register_vers_node): Ensure anonymous version
	tag is not defined together with non-anonymous versions.
	* ld.texinfo: Document it.

	* elflink.h (size_dynamic_sections): Skip anonymous version tag.
	(elf_link_assign_sym_version): Don't count anonymous version tag.
2001-12-18 12:15:35 +00:00
Nick Clifton 9fc877edc5 Import Turkish translation. 2001-12-18 10:35:27 +00:00
Richard Henderson fc18a3f3f5 * Makefile.am: Add rules for eelf64alpha_nbsd.
* Makefile.in: Regenerate.
        * configure.tgt (alpha*-*-netbsd*): Set
        targ_emul to elf64alpha_nbsd.
        * emulparams/elf64alpha_nbsd.sh: Added.
2001-12-17 23:54:58 +00:00
Alan Modra 76f63e9126 Oops, changelog for last patch. 2001-12-17 00:43:17 +00:00
Hans-Peter Nilsson d03b89bdb6 * scripttempl/mmo.sc: Add .debug_ranges to listed sections. 2001-12-16 12:23:01 +00:00
Alan Modra 320fec9a20 * ldmain.c (main): Initialise link_info.eh_frame_hdr. 2001-12-14 13:50:01 +00:00
Jakub Jelinek 6576570080 * elf-bfd.h (enum elf_link_info_type): New.
(struct bfd_elf_section_data): Remove stab_info and merge_info
	fields, add sec_info and sec_info_type.
	(struct elf_obj_tdata): Add eh_frame_hdr field.
	(_bfd_elf_discard_section_eh_frame): New prototype.
	(_bfd_elf_discard_section_eh_frame_hdr): Likewise.
	(_bfd_elf_eh_frame_section_offset): Likewise.
	(_bfd_elf_write_section_eh_frame): Likewise.
	(_bfd_elf_write_section_eh_frame_hdr): Likewise.
	* Makefile.am (BFD32_BACKENDS): Add elf-eh-frame.lo.
	(BFD32_BACKENDS_CFILES): Add elf-eh-frame.c.
	(elf-eh-frame.lo): New.
	* Makefile.in: Rebuilt.
	* configure.in (elf): Add elf-eh-frame.lo.
	* configure: Rebuilt.
	* elf.c (_bfd_elf_print_private_bfd_data): Support PT_GNU_EH_FRAME.
	(map_sections_to_segments): Create PT_GNU_EH_FRAME if requested.
	(get_program_header_size): Take into account PT_GNU_EH_FRAME
	segment.
	(_bfd_elf_rela_local_sym): Use sec_info_type and sec_info.
	(_bfd_elf_rel_local_sym): Likewise.
	(_bfd_elf_section_offset): Likewise.  Call
	_bfd_elf_eh_frame_section_offset too.
	* elfxx-ia64.c (elfNN_ia64_relocate_section): Use sec_info_type and
	sec_info.
	* elf64-alpha.c (elf64_alpha_relocate_section): Likewise.
	* elf-eh-frame.c: New file.
	* elflink.h (elf_link_add_object_symbols): Don't optimize SHF_MERGE
	.stab sections.  Set sec_info_type, use sec_info instead
	of merge_info and stab_info.
	(elf_link_create_dynamic_sections): Create .eh_frame_hdr section
	if --eh-frame-hdr.
	(elf_bfd_final_link): Write .eh_frame_hdr section.
	(elf_link_sec_merge_syms): Use sec_info_type and sec_info.
	(elf_link_input_bfd): Likewise.
	Call _bfd_elf_write_section_eh_frame to write .eh_frame sections.
	(elf_bfd_discard_info): Add output_bfd argument.
	Call _bfd_elf_discard_section_eh_frame and
	_bfd_elf_discard_section_eh_frame_hdr.
	(elf_section_ignore_discarded_relocs): Use sec_info_type, not section
	names.
	* bfd-in.h (bfd_elf32_discard_info, bfd_elf64_discard_info): Adjust
	prototypes.
	* bfd-in2.h (bfd_elf32_discard_info, bfd_elf64_discard_info): Likewise.

	* elf/common.h (PT_GNU_EH_FRAME): Define.
	* bfdlink.h (struct bfd_link_info): Add eh_frame_hdr field.

	* emultempl/elf32.em (finish): Supply output_bfd
	to bfd_elf*_discard_info.
	(OPTION_EH_FRAME_HDR): Define.
	(longopts): Add --eh-frame-hdr.
	(parse_args): Handle it.
	(list_options): Add --eh-frame-hdr to help.
	* emultempl/hppaelf.em (finish): Supply output_bfd
	to bfd_elf*_discard_info.
	* scripttempl/elf.sc (.eh_frame_hdr): Add.

	* readelf.c (get_segment_type): Support PT_GNU_EH_FRAME.
2001-12-13 11:09:34 +00:00
Alan Modra 89894c62c6 * lexsup.c (parse_args): Don't pass shortopts to second call to
getopt functions.  Restore optind rather than decrementing before
	second call.  Remove errind as it now duplicates last_optind.
2001-12-13 09:38:11 +00:00
Christopher Faylor 583f192640 * emultempl/pe.em (gld_${EMULATION_NAME}_list_options): Fix typo. 2001-12-11 18:31:57 +00:00
Geoffrey Keating 93fbbb04b8 Index: bfd/ChangeLog
2001-12-07  Geoffrey Keating  <geoffk@redhat.com>
	    Richard Henderson  <rth@redhat.com>
	    Corinna Vinschen  <vinschen@redhat.com>

	* Makefile.am: Add support for xstormy16.
	* archures.c: Add support for xstormy16.
	* config.bfd: Add support for xstormy16.
	* configure.in: Add support for xstormy16.
	* reloc.c: Add support for xstormy16.
	* targets.c: Add support for xstormy16.
	* cpu-xstormy16.c: New file.
	* elf32-xstormy16.c: New file.
	* Makefile.in: Regenerated.
	* bfd-in2.h: Regenerated.
	* configure: Regenerated.
	* libbfd.h: Regenerated.

Index: binutils/ChangeLog
2001-12-07  Geoffrey Keating  <geoffk@redhat.com>

	* readelf.c (guess_is_rela): Add support for stormy16.
	(dump_relocations): Likewise.
	(get_machine_name): Likewise.

Index: gas/ChangeLog
2001-12-07  Geoffrey Keating  <geoffk@redhat.com>
	    Richard Henderson  <rth@redhat.com>

	* configure.in: Add support for xstormy16.
	* configure: Regenerated.
	* Makefile.am: Add support for xstormy16.
	* Makefile.in: Regenerated.
	* config/tc-xstormy16.c: New file.
	* config/tc-xstormy16.h: New file.

Index: gas/testsuite/ChangeLog
2001-12-07  Geoffrey Keating  <geoffk@redhat.com>
	    matthew green  <mrg@redhat.com>

	* gas/xstormy16/allinsn.d: New file.
	* gas/xstormy16/allinsn.exp: New file.
	* gas/xstormy16/allinsn.s: New file.
	* gas/xstormy16/allinsn.sh: New file.
	* gas/xstormy16/gcc.d: New file.
	* gas/xstormy16/gcc.s: New file.
	* gas/xstormy16/gcc.sh: New file.
	* gas/xstormy16/reloc-1.d: New file.
	* gas/xstormy16/reloc-1.s: New file.
	* gas/xstormy16/reloc-2.d: New file.
	* gas/xstormy16/reloc-2.s: New file.

Index: ld/ChangeLog
2001-12-07  Geoffrey Keating  <geoffk@redhat.com>
	    Richard Henderson  <rth@redhat.com>

	* Makefile.am: Add support for xstormy16.
	* configure.tgt: Add support for xstormy16.
	* Makefile.in: Regenerate.
	* emulparams/elf32xstormy16.sh: New file.
	* scripttempl/xstormy16.sc: New file.

Index: opcodes/ChangeLog
2001-12-07  Geoffrey Keating  <geoffk@redhat.com>

	* Makefile.am: Add support for xstormy16.
	* Makefile.in: Regenerate.
	* configure.in: Add support for xstormy16.
	* configure: Regenerate.
	* disassemble.c: Add support for xstormy16.
	* xstormy16-asm.c: New generated file.
	* xstormy16-desc.c: New generated file.
	* xstormy16-desc.h: New generated file.
	* xstormy16-dis.c: New generated file.
	* xstormy16-ibld.c: New generated file.
	* xstormy16-opc.c: New generated file.
	* xstormy16-opc.h: New generated file.

Index: include/ChangeLog
2001-12-07  Geoffrey Keating  <geoffk@redhat.com>

	* dis-asm.h (print_insn_xstormy16): Declare.

Index: include/elf/ChangeLog
2001-12-07  Geoffrey Keating  <geoffk@redhat.com>
	    Richard Henderson  <rth@redhat.com>

	* common.h (EM_XSTORMY16): Define.
	* xstormy16.h: New file.
2001-12-08 03:46:03 +00:00
Nick Clifton ff291a48c0 Insert 'PROGRAM' into the text string describing the -N option so that it is
easier to translate into foreign languages.
2001-12-07 12:41:21 +00:00
Nick Clifton e3c8793a40 Fixes to improve the ability to translate messages in the binutils tools 2001-12-06 10:22:36 +00:00
Tom Rix f2eab0af2b Remove eaixppc64 from Makefile.am 2001-12-05 21:46:39 +00:00
Tom Rix 249172c3f2 Formatting and misc cleanup for AIX. 2001-12-05 13:34:46 +00:00
Hans-Peter Nilsson 5b5cd1b0fa * emulparams/criself.sh (NO_SMALL_DATA): Set, to yes.
(OTHER_BSS_END_SYMBOLS): Don't refer to .sbss when setting
	__Sbss.
	(OTHER_END_SYMBOLS): Fix formatting.
	* emulparams/crislinux.sh (NO_SMALL_DATA): Set, to yes.
	(OTHER_END_SYMBOLS): Fix formatting.
2001-12-04 18:28:31 +00:00
Alan Modra 7cecdbff28 * ldexp.c (exp_print_token): Correct "table" entry for RSHIFT. 2001-12-04 00:10:40 +00:00
Tom Rix 742aeb63e9 Pass argc and argv to ldemul_choose_target.
Support -b64 in AIX
2001-12-03 23:15:28 +00:00
H.J. Lu 484593416a 2001-11-27 H.J. Lu <hjl@gnu.org>
* emulparams/elf_i386.sh (NO_SMALL_DATA): Set to yes.
	* emulparams/elf_i386_be.sh (NO_SMALL_DATA): Likewise.
	* emulparams/elf_i386_chaos.sh (NO_SMALL_DATA): Likewise.
	* emulparams/elf_i386_ldso.sh (NO_SMALL_DATA): Likewise.
	* emulparams/elf_x86_64.sh (NO_SMALL_DATA): Likewise.
	* emulparams/m68kelf.sh (NO_SMALL_DATA): Likewise.
	* emulparams/elf32_sparc.sh (NO_SMALL_DATA): Likewise.
	* emulparams/elf64_sparc.sh (NO_SMALL_DATA): Likewise.

	* scripttempl/elf.sc (SBSS): New. Define if ${NO_SMALL_DATA}
	is not empty.
	(SDATA): Likewise.
	(REL_SDATA): Likewise.
	(REL_SBSS): Likewise.
	(REL_SDATA2): Likewise.
	(REL_SBSS2): Likewise.
	(SBSS2): Define if ${NO_SMALL_DATA} is not empty.
	(SDATA2): Likewise.
2001-11-27 19:06:07 +00:00
Stephane Carrez ecfdd20cce * scripttempl/elfm68hc11.sc (CTOR, DTOR): Put constructor and
destructor in rom.
	* scripttempl/elfm68hc12.sc (CTOR, DTOR): Likewise.
2001-11-25 17:29:27 +00:00
H.J. Lu da54c6eb1c 2001-11-22 H.J. Lu <hjl@gnu.org>
* Makefile.in: Regenerated with automake based on automake
	1.4-8 in RedHat 7.1.
2001-11-22 18:49:12 +00:00
Alan Modra 465bc359f9 * Makefile.am (CONFIG_STATUS_DEPENDENCIES): Define.
(config.status): Delete rule.
	Add extra dependencies to cover sourced emulparams files.
	* Makefile.in: Regenerate.

	* scripttempl/elf.sc: Order <section>, <section>.* and
	corresponding linkonce sections as seen in input files.
	Formatting fixes.  Zero vma of all sections if not relocating.
	(STACK): Define and insert if STACK_ADDR defined.
	(OTHER_RELOCATING_SECTIONS): Delete.
	(OTHER_END_SYMBOLS): Define.
	(OTHER_READONLY_SECTIONS): Always insert, not just when relocating.
	(OTHER_READWRITE_SECTIONS): Likewise.
	(OTHER_GOT_SECTIONS): Likewise.
	(OTHER_SDATA_SECTIONS): Likewise.
	(OTHER_BSS_SECTIONS): Likewise.
	* scripttempl/elfi370.sc (OTHER_READONLY_SECTIONS): Likewise.
	(OTHER_READWRITE_SECTIONS): Likewise.
	* scripttempl/nw.sc (OTHER_READONLY_SECTIONS): Likewise.
	(OTHER_READWRITE_SECTIONS): Likewise

	* emulparams/armelf.sh (OTHER_RELOCATING_SECTIONS): Delete.
	(STACK_ADDR): Define.
	* emulparams/armelf_oabi.sh: As for armelf.sh.
	* emulparams/elf32mcore.sh: As for armelf.sh.
	* emulparams/h8300elf.sh: As for armelf.sh.
	* emulparams/mn10200.sh: As for armelf.sh.
	* emulparams/shelf.sh: As for armelf.sh.

	* emulparams/elf32fr30.sh (OTHER_RELOCATING_SECTIONS): Delete.
	(OTHER_END_SYMBOLS): Define.
	* emulparams/m32relf.sh: As for elf32fr30.sh.
	* emulparams/h8300helf.sh: As for elf32fr30.sh.
	* emulparams/h8300self.sh: As for elf32fr30.sh.

	* emulparams/criself.sh (OTHER_READONLY_SECTIONS): Protect symbol
	defines with RELOCATING test.
	(OTHER_SDATA_SECTIONS): Likewise.
	(OTHER_RELOCATING_SECTIONS): Delete, replacing with..
	(OTHER_END_SYMBOLS): ..this.
	* emulparams/crislinux.sh: As for criself.sh.

	* emulparams/elf32bmipn32.sh (OTHER_SDATA_SECTIONS): Zero vma
	if not relocating.
	(OTHER_RELOCATING_SECTIONS): Delete, replacing with..
	(OTHER_SECTIONS): ..this.  Zero vma if not relocating.  Order
	normal and linkonce sections as seen in input files.
	* emulparams/elf32bmip.sh (DATA_ADDR): Don't define if EMBEDDED.
	(TEXT_DYNAMIC): Likewise.
	(INITIAL_READONLY_SECTIONS): Zero vma if not relocating.
	(OTHER_SDATA_SECTIONS): Likewise.
	* emulparams/elf32ppc.sh (OTHER_READWRITE_SECTIONS): Likewise.
	* emulparams/shlelf_linux.sh (OTHER_READWRITE_SECTIONS): Likewise.
	* emulparams/elf64alpha.sh (OTHER_READONLY_SECTIONS): Likewise.
	* emulparams/hppalinux.sh (OTHER_READONLY_SECTIONS): Likewise.
	* emulparams/elf64_aix.sh (OTHER_GOT_SECTIONS): Likewise.
	(OTHER_PLT_RELOC_SECTIONS): Likewise.
	(OTHER_READONLY_SECTIONS): Likewise.  Order normal and linkonce
	sections as seen in input files.
	* emulparams/elf64_ia64.sh: As for emulparams/elf64_aix.sh.
	* emulparams/hppa64linux.sh (OTHER_READONLY_SECTIONS): Zero vma
	if not relocating.
	(OTHER_READWRITE_SECTIONS, OTHER_BSS_SECTIONS): Likewise.
	(OTHER_BSS_END_SYMBOLS): Merge from elf64hppa.sh.
	* emulparams/elf64mmix.sh (OTHER_RELOCATING_SECTIONS): Delete.
	(OTHER_SECTIONS): Instead, use this..
	(OTHER_END_SYMBOLS): ..and this.

	* emulparams/elf32b4300.sh: Source elf32bmip.sh, remove duplicates.
	* emulparams/elf32bsmip.sh: Likewise.
	* emulparams/elf32btsmip.sh: Likewise.
	* emulparams/elf32ebmip.sh: Likewise.
	* emulparams/elf32lmip.sh: Likewise.
	* emulparams/elf32elmip.sh: Source elf32lmip.sh, remove duplicates.
	* emulparams/elf32lsmip.sh: Likewise.
	* emulparams/elf32ltsmip.sh: Source elf32btsmip.sh, remove duplicates.
	* emulparams/elf32l4300.sh: Source elf32b4300.sh, remove duplicates.
	* emulparams/elf64bmip.sh: Source elf32bmipn32.sh, remove duplicates.
	* emulparams/elf64btsmip.sh: Likewise.
	* emulparams/elf64ltsmip.sh: Source elf64btsmip.sh, remove duplicates.
	* emulparams/elf32lppc.sh: Source elf32ppc.sh, remove duplicates.
	* emulparams/elf32ppclinux.sh: Likewise.
	* emulparams/elf32ppcsim.sh: Likewise.
	* emulparams/elf32lppcsim.sh: Source elf32lppc.sh, remove duplicates.
	* emulparams/elf64hppa.sh: Source hppa64linux.sh, remove duplicates.
	* emulparams/h8300helf.sh: Source h8300elf.sh, remove duplicates.
	* emulparams/h8300self.sh: Likewise.
	* emulparams/mn10300.sh: Source mn10200.sh, remove duplicates.
	* emulparams/sh.sh: Comment.
	* emulparams/shl.sh: Source sh.sh, remove duplicates.
	* emulparams/shlelf.sh: Source shelf.sh, remove duplicates.
	* emulparams/shelf_linux.sh: Source shlelf_linux.sh, remove duplicates.
2001-11-22 09:08:05 +00:00
Alan Modra abc6ab0a54 * ldlang.c (map_input_to_output_sections): Replace "break"
accidentally removed with 2001-08-03 change.
	(lang_gc_sections_1): Likewise.
2001-11-21 01:13:15 +00:00
Alan Modra 2181f54fd8 * ldlang.c (walk_wild_section): Move sec == NULL case out of loop. 2001-11-20 15:31:10 +00:00
Alan Modra ca0b584738 * emultempl/elf32.em (gld${EMULATION_NAME}_finish): Use NULL instead
of false when calling lang_size_sections.
	(hppaelf_layout_sections_again): Likewise.
2001-11-20 15:19:39 +00:00
Alan Modra c56feb2b8c * emultempl/elf32.em (gld${EMULATION_NAME}_finish): Only emit this
function when LDEMUL_FINISH isn't set to the same name.  Don't
	call ${LDEMUL_FINISH}.
	(ld_${EMULATION_NAME}_emulation): Call $LDEMUL_FINISH if defined.
	* emultempl/armelf.em (arm_elf_finish): Call
	gld${EMULATION_NAME}_finish.
	* emultempl/hppaelf.em (hppaelf_finish): Rename to
	gld${EMULATION_NAME}_finish.  Call bfd_elf32_discard_info and
	hppaelf_layout_sections_again if necessary.
	(need_laying_out): New var.
	(hppaelf_layaout_sections_again): Rename to
	hppaelf_layout_sections_again.  Clear need_laying_out.
	(PARSE_AND_LIST_OPTIONS): Format text.
2001-11-15 12:44:03 +00:00
H.J. Lu a48ca7f2ea 2001-11-14 H.J. Lu <hjl@gnu.org>
* emultempl/armelf.em (arm_elf_finish): Renamed from
	gld${EMULATION_NAME}_finish.
	(LDEMUL_FINISH): Set to arm_elf_finish.
2001-11-15 07:12:48 +00:00
Daniel Jacobowitz 73d074b4e2 2001-11-11 Daniel Jacobowitz <drow@mvista.com>
* bfd-in.h (bfd_elf32_discard_info): Add prototype.
	(bfd_elf64_discard_info): Likewise.
	* bfd-in2.h: Regenerate.
	* elf-bfd.h (struct elf_reloc_cookie): New.
	(struct elf_backend_data): Add elf_backend_discard_info,
	elf_backend_ignore_discarded_relocs, and elf_backend_write_section.
	(_bfd_elf32_reloc_symbol_deleted_p): Add prototype.
	(_bfd_elf64_reloc_symbol_deleted_p): Likewise.
	* elf32-mips.c (_bfd_elf32_mips_discard_info): New.
	(_bfd_elf32_mips_ignore_discarded_relocs): New.
	(_bfd_elf32_mips_write_section): New.
	(elf_backend_discard_info): Define.
	(elf_backend_ignore_discarded_relocs): Define.
	(elf_backend_write_section): Define.
	* elfcode.h (elf_bfd_discard_info): Define.
	(elf_reloc_symbol_deleted_p): Define.
	* elflink.h (elf_link_input_bfd): Check
	elf_section_ignore_discarded_relocs.  Call
	bed->elf_backend_write_section if available.
	(elf_reloc_symbol_deleted_p): New.
	(elf_bfd_discard_info): New.
	(elf_section_ignore_discarded_relocs): New.
	* elfxx-target.h (elf_backend_discard_info): Define.
	(elf_backend_ignore_discarded_relocs): Define.
	(elf_backend_write_section): Define.
	(elfNN_bed): Add elf_backend_discard_info,
	elf_backend_ignore_discarded_relocs, and
	elf_backend_write_section.
	* libbfd-in.h (_bfd_discard_section_stabs): Add prototype.
	* libbfd.h: Regenerate.
	* stabs.c (_bfd_discard_section_stabs): New.

2001-11-11  Daniel Jacobowitz  <drow@mvista.com>

	* emultempl/elf32.em (gld${EMULATION_NAME}_finish): New.
	(struct ld_emulation_xfer_struct): Use it.
2001-11-15 01:34:12 +00:00
Jeff Law fc65c60263 * emulparams/elf64hppa.sh (OTHER_BSS_END_SECTIONS): Add
additional symbols referenced by newer crt0.o files from HP.
2001-11-13 18:25:37 +00:00
Nick Clifton f11b702702 New symbol: DATA_START_SYMBOLS 2001-11-12 14:39:11 +00:00
Alan Modra 3bf2994f9c * Makefile.am (GENSCRIPTS): Quote ${exec_prefix}.
* Makefile.in: Regenerate.
2001-11-12 00:20:16 +00:00
Stephane Carrez ff5dcc9215 * ld.texinfo: Use @command for commands, @option for options.
* Makefile.am (POD2MAN): Use 'GNU Development Tools' for
	the page man title.
	* Makefile.in: Rebuild.
2001-11-09 20:30:40 +00:00
Chris Demetriou 9fb9af6ef4 [ gas/ChangeLog ]
2001-11-04  Chris Demetriou  <cgd@broadcom.com>

	* configure.in (mips-*-netbsd*): Add support for target.
	* configure: Regenerate.

[ gas/testsuite/ChangeLog ]
2001-11-04  Chris Demetriou  <cgd@broadcom.com>

	* gas/mips/mips.exp (svr4pic): Set if target is *-*-netbsd*.
	(aout): Don't set if *-*-netbsd*.

[ ld/ChangeLog ]
2001-11-04  Chris Demetriou  <cgd@broadcom.com>

	* configure.tgt (mips*el-*-netbsd*, mips*-*-netbsd*):
	Add support for targets.
2001-11-04 19:06:38 +00:00
Nick Clifton 3c62831e20 Add translations 2001-11-02 19:09:06 +00:00
Nick Clifton 3a9091c4e5 Set targ_emul, targ_extra_emuls as little endian default and to support big endian. 2001-11-02 16:58:18 +00:00
Chris Demetriou 361b220ebe 2001-11-01 Chris Demetriou <cgd@broadcom.com>
* ld.texinfo (Options): Document new option, -nostdlib.
        * lexsup.c (OPTION_NOSTDLIB): New definition.
        (ld_options): Add entry for "nostdlib".
        (parse_args): Handle OPTIONS_NOSTDLIB.
        * ldfile.c (ldfile_add_library_path): Don't add directories
        to the search path if they weren't specified on the command line
        and -nostdlib was specified.
        * ld.h (ld_config_type): New member only_cmd_line_lib_dirs.
2001-11-02 01:13:09 +00:00
Nick Clifton 210a7bd13d Fix infinite parsing loop 2001-10-31 15:41:19 +00:00
Nick Clifton 114283d84f Update documentation about -T augmenting linker scripts 2001-10-31 14:19:22 +00:00
Nick Clifton 7649aa5088 Supports sh3/sh4/sh3eb/sh4eb-unknown-linux-gnu targets 2001-10-31 09:50:09 +00:00
Alan Modra 6e814ff881 * ldlang.c (lang_size_sections): Keep a valid output_offset field
for padding statements.
2001-10-31 01:12:26 +00:00
Nick Clifton 3c3bdf30e4 Add MMIX support 2001-10-30 15:20:14 +00:00
Kazu Hirata ca0c1d3ede * ldlang.c: Fix a comment typo. 2001-10-29 22:36:32 +00:00
Alan Modra 1a3d33ce81 * configure.host: Move alpha*-*-linux-gnu* entry to generic
entries, and match *-*-linux*.
2001-10-23 05:49:02 +00:00
Alan Modra b47c420856 * ldgram.y (mri_script_command): Surround processing of INCLUDE
with ldlex_script, ldlex_popstate.
	(ifile_p1): Likewise.
	* ldlex.l (EOF): Don't BEGIN(SCRIPT).  Restore lineno from the
	correct slot.
	(lex_push_file): Save current lineno to lineno_stack.  Set lineno
	to 1.  Don't BEGIN(SCRIPT).
	(lex_redirect): Similarly.
	* ldmain.c (main): Set yydebug non-zero if YYDEBUG.
2001-10-20 13:49:00 +00:00
Nick Clifton fd521b4750 Define __EH_FRAME_{BEGIN|END}__ 2001-10-20 09:56:29 +00:00
DJ Delorie 59d28a9467 * pe-dll.c (autofilter_objectlist): Add gcrt0.o.
(auto-export): Fix indentation.
2001-10-19 14:25:51 +00:00
DJ Delorie 663dd37808 * pe-dll.c (autofilter_objectlist): Add startup objects
for profiling.
(auto-export): Constify char * p.
Extract file basename and use strcmp rather than ststr
for object lookup.
2001-10-19 00:00:55 +00:00
Chris Demetriou 31d677f9ba 2001-10-18 Chris Demetriou <cgd@broadcom.com>
* ldmain.c (get_emulation): Improve comment about the handling
        of -mipsN options.
2001-10-18 23:44:17 +00:00
Alan Modra aa200fe8a3 * po/POTFILES.in: Regenerate. 2001-10-17 05:41:53 +00:00
Alan Modra 146e7110d8 * emultempl/elf32.em (gld*_list_options): Remove extra '\t' from
-z nocopyreloc and -z nocombreloc usage strings.
2001-10-15 23:28:21 +00:00
Nick Clifton b4330e85f7 Include -z nocopyreloc in usage 2001-10-12 10:34:25 +00:00
Nick Clifton 5af8a2fbdc Fix arm aout placement of .bss section 2001-10-11 17:28:43 +00:00
DJ Delorie 5b784096c9 * pe-dll.c (autofilter_entry_type autofilter_liblist: Add
startup files for mingw32 dlls to list.
2001-10-11 17:16:58 +00:00
Chris Demetriou 61585df298 2001-10-10 Chris Demetriou <cgd@broadcom.com>
* emultempl/elf32.em: Fix shell 'if' usage for portability.
2001-10-10 23:05:55 +00:00
Aldy Hernandez 45cf6f3e23 2001-10-08 Aldy Hernandez <aldyh@redhat.com>
* configure.tgt (targ): Add arm9e-*-elf.
2001-10-08 18:54:13 +00:00
H.J. Lu e24d7c123d 2001-10-05 H.J. Lu <hjl@gnu.org>
* genscripts.sh: Fix a typo in the last change.
2001-10-05 16:40:23 +00:00
Jakub Jelinek ec38dd0548 * doc/as.texinfo: Document M and S ELF section flags.
* emultempl/elf32.em (gld_*_list_options): Include -z combreloc and
	-z nocombreloc in usage.
2001-10-05 16:36:55 +00:00
Jim Blandy cedd6b0d8e * genscripts.sh: Include a comment at the top of each generated
script, explaining its purpose.
2001-10-03 21:36:43 +00:00
Alan Modra 8bd621d883 Add support for -z nocopyreloc. 2001-10-03 15:11:48 +00:00
Alan Modra fcd8210c95 Regenerate configure to include the gettext.m4 change. Update
opcodes/po/POTFILES.in
2001-10-03 13:46:35 +00:00
Alan Modra d32820f2fa * ldver.h (ld_program_version): Remove declaration.
* lexsup.c (parse_args): Move printing of copyright message..
	* ldver.c (ldversion): .. to here.
	Use BFD_VERSION_STRING in place of BFD_VERSION.
	(ld_program_version): Remove.
	* Makefile.am (Makefile): Depend on bfd/configure.in
	Run "make dep-am"
	* Makefile.in: Regenerate.
2001-10-02 06:04:23 +00:00
Hans-Peter Nilsson af46bcdc57 * Makefile.am: Update dependencies with "make dep-am".
* Makefile.in: Regenerate.
2001-09-30 22:22:05 +00:00
Alan Modra 4818e05fe5 From John Reiser <jreiser@BitWagon.com>
* ldlang.c (lang_common): Conditionally inhibit Common allocation.
	* lexsup.c: Add --no-define-common commandline option.
	* ldgram.y: Add INHIBIT_COMMON_ALLOCATION script command.
	* ldlex.l: Likewise.
	* ld.h: Add command_line.inhibit_common_definition.
	* ldmain.c (main): Initialize.
	* ld.texinfo: Document.
2001-09-29 12:57:54 +00:00
Alan Modra 862517b650 * section.c (struct sec): Remove kept_section.
(STD_SECTION): Remove kept_section initialisation.
	(bfd_make_section_anyway): Here too.
	* ecoff.c (bfd_debug_section): Remove kept_section initialisation.
	* cofflink.c (_bfd_coff_link_input_bfd): Don't test kept_section.
	* elflink.h (elf_link_input_bfd): Set discarded link-once section
	symbols to zero, and remove all code involved with kept_section
	and tracking section symbol values.
	* bfd-in2.h: Regenerate.
	* configure.in: Bump version number.
	* configure: Regenerate.

	* ldlang.c (section_already_linked): Remove assignment to kept_section.
2001-09-29 12:07:01 +00:00
Alan Modra d5e0ebeb62 * ldmisc.c (USE_STDARG): Remove.
(info_msg): Define using VPARAMS, VA_OPEN, VA_FIXEDARG, VA_CLOSE.
	(einfo): Likewise.
	(minfo): Likewise.
	(lfinfo): Likewise.

	* ldmisc.h: Remove #ifdef ANSI_PROTOTYPES and non-ansi
	declarations.  Update copyright.
2001-09-26 01:55:44 +00:00
Nick Clifton 85c774585e Fix thinko 2001-09-24 21:16:47 +00:00
Nick Clifton 9cc16c3a6b Remove spurious prototype. 2001-09-24 21:13:48 +00:00
Nick Clifton 2f8d8971c6 improve documenation about auto-import 2001-09-24 16:17:46 +00:00
Nick Clifton 72358f6568 Define and use pe_get_data_import_dll_name(). 2001-09-24 15:03:01 +00:00
H.J. Lu 3882b01078 Locale changes from Bruno Haible <haible@clisp.cons.org>. 2001-09-19 05:33:36 +00:00
Alan Modra db09f25b32 * deffilep.y (def_stash_module): Constify "name" param.
* pe-dll.c: Replace CONST with const throughout.
	(quick_symbol): Constify "n1", "n2", "n3" params.
	(make_singleton_name_thunk): Constify "import" param.  Make
	"buffer_len" a size_t.
	(make_import_fixup_entry): Constify "name", "fixup_name",
	"dll_symname" params.
	(pe_get16): Cast args of bfd_seek.  Replace bfd_read with bfd_bread.
	(pe_get32): Likewise.
	(pe_implied_import_dll): Likewise.

	* emultempl/beos.em (sort_by_file_name): Constify "ra", "rb".
	(sort_by_section_name): Likewise.

	* emultempl/pe.em: Move defines for arm_epoc_pe before bfd.h included.
	(make_import_fixup): Cast printf arg, rel->address to long rather
	than int.
	(gld_${EMULATION_NAME}_after_open): Don't compare NULL against int.
2001-09-18 10:10:21 +00:00
Alan Modra 7469926815 * ldmain.c (main): Rename BufferSize to ld_bufsz because HPUX
defines BufferSize.  Increase buffer size by one.
2001-09-16 04:25:33 +00:00
Nick Clifton 775cabad23 Fix memory leak 2001-09-14 14:19:05 +00:00
Nick Clifton 056a1d49d7 Add support for arm-openbsd target 2001-09-14 11:46:40 +00:00
H.J. Lu a7d792bb15 2001-09-12 H.J. Lu <hjl@gnu.org>
* Makefile.am (ALL_EMULATIONS): Move eelf64ppc.o and
	eelf64lppc.o to ...
	(ALL_64_EMULATIONS): Here.
	* Makefile.in: Regenerated.
2001-09-12 23:57:21 +00:00
Charles Wilson 0d888aac30 2001-09-12 Paul Sokolovsky <Paul.Sokolovsky@technologist.com>
* emultempl/pe.em(make_import_fixup): change signature to
        take asection as well as arelec; we need this for proper
        error reporting.  Only call pe_create_import_fixup() if
        there is no attempt to add a constant addend to the reloc;
        otherwise, report error condition.
        * pe-dll.c(pe_walk_relocs_of_symbol): change signature,
        since final argument is a pointer to make_import_fixup().
        Change call to cb() to match make_import_fixup() signature.
        (make_import_fixup_mark): make buffer_len unsigned.
        * pe-dll.h: change signature of pe_walk_relocs_of_symbol.
2001-09-12  Charles Wilson  <cwilson@ece.gatech.edu>
        * ld.texinfo: add verbose documentation for auto-import
        direct-addressing workaround, to compliment the terse
        error message.
2001-09-12 15:58:10 +00:00
Catherine Moore cedacdc05a * scripttempl/v850.sc: Add gcc_except_table sections. 2001-09-12 14:09:18 +00:00
Jeff Law 38be0bb1e6 * emulparams/h8300helf.sh: Move stack to a much higher memory address.
* emulparams/h8300self.sh: Similarly.
2001-09-07 17:35:04 +00:00
Tom Rix 1fdf02497c Fix import symbols for AIX. 2001-09-06 15:20:01 +00:00
Nick Clifton 559e4713db Set correct value for default (PE) stack size. 2001-09-05 16:00:13 +00:00
Andreas Jaeger 9b5799b87b * emultempl/beos.em: Declare prototypes for comparions functions,
adjust definitions.
2001-09-03 07:29:50 +00:00
Andreas Jaeger 48f6162b7a * emultempl/aix.em: Add missing prototype.
* emultempl/lnk960.em: Likewise.
	* emultempl/vanilla.em: Likewise.
	* emultempl/armcoff.em: Likewise.
	* emultempl/armelf_oabi.em: Likewise.
	* emultempl/beos.em: Likewise.
	* emultempl/gld960c.em: Likewise.
	* emultempl/gld960.em: Likewise.

	* emulparams/elf64alpha.sh (PARSE_AND_LIST_PROLOGUE): Add parameter
	for prototype declaration.
2001-09-03 06:43:37 +00:00
Eric Christopher 39e5585e1b 2001-08-31 Eric Christopher <echristo@redhat.com>
Jason Eckhardt  <jle@redhat.com>

	* ldmain.c (get_emulation): Add support for -mips32 and -mips64.
2001-08-31 21:28:05 +00:00
Andreas Jaeger 3fc90ddbe3 * emultempl/pe.em: Add missing prototypes.
(gld_${EMULATION_NAME}_after_open): Remove extra args to
	pe_find_data_imports.
	(pr_sym): Add unused attribute.
2001-08-31 13:30:13 +00:00
Phil Blundell d43ded80a7 2001-08-29 Joel Sherrill <joel@OARcorp.com>
* configure.tgt (i[3456]86-*-rtems*, m68*-*-rtems*): Change
	default from coff to elf.
2001-08-29 18:47:28 +00:00
Jeff Law 3946dd2f8d * emulparams/h8300helf.sh: Resync with h8300elf.sh. Update
ARCH specification.
	* emulparams/h8300self.sh: Similarly.
2001-08-29 17:35:27 +00:00
Nick Clifton 70d0c6e9db Add missing changelog entry 2001-08-29 17:18:52 +00:00
Joern Rennecke 8af6dd4198 * Makefile.am (ALL_EMULATIONS): Add eh8300elf.o, eh8300elf.o and
eh8300self.o .
	(eh8300elf.c, eh8300helf.c, eh8300self.c): New targets.
	* configure.tgt (h8300-*-elf*): New case.
	* emulparams/h8300elf.sh, emulparams/h8300helf.sh: New files.
	* emulparams/h8300self.sh: New file.
	* Makefile.in: Regenerated.
2001-08-29 12:51:26 +00:00
Alan Modra 5c67d4bb59 * Makefile.am (ALL_EMULATIONS): Add eelf64ppc.o and eelf64lppc.o.
(eelf64ppc.c, eelf64lppc.c): Add make targets.
	Run "make dep-am"
	* Makefile.in: Regenerate.
	* configure.tgt: Add powerpc64 support.  Move pdp11, pjl, pj
	entries to correct alphabetical position.
	* emulparams/elf64ppc.sh: New.
	* emulparams/elf64lppc.sh: New.
2001-08-27 10:45:55 +00:00
Nick Clifton 081310158f Declare BSIZE as static 2001-08-27 08:52:50 +00:00
Jakub Jelinek db6751f2e7 * elf-bfd.h (enum elf_reloc_type_class): New.
(struct elf_backend_data): Add elf_backend_reloc_type_class.
	(_bfd_elf_reloc_type_class): New.
	* elfxx-target.h (elf_backend_reloc_type_class): Define.
	(elfNN_bed): Add elf_backend_reloc_type_class.
	* elf.c (_bfd_elf_reloc_type_class): New.
	* elf32-i386.c (elf_i386_check_relocs): Set DF_TEXTREL if the reloc
	is against read-only section.
	(elf_i386_size_dynamic_sections): Use DF_TEXTREL flag instead of
	looking up section names for DT_TEXTREL.
	(elf_i386_reloc_type_class): New.
	(elf_backend_reloc_type_class): Define.
	* elf32-sparc.c (elf32_sparc_check_relocs): Set DF_TEXTREL if the
	reloc is against read-only section.
	(elf32_sparc_size_dynamic_sections): Use DF_TEXTREL flag instead of
	looking up section names for DT_TEXTREL.
	(elf32_sparc_reloc_type_class): New.
	(elf_backend_reloc_type_class): Define.
	* elf64-sparc.c (sparc64_elf_check_relocs): Set DF_TEXTREL if the
	reloc is against read-only section.
	(sparc64_elf_size_dynamic_sections): Use DF_TEXTREL flag instead of
	looking up section names for DT_TEXTREL.
	(sparc64_elf_reloc_type_class): New.
	(elf_backend_reloc_type_class): Define.
	* elfxx-ia64.c (struct elfNN_ia64_link_hash_table): Add reltext field.
	(elfNN_ia64_hash_table_create): Clear ia64_info.
	(get_reloc_section): Set DF_TEXTREL if the reloc is against read-only
	section.
	(elfNN_ia64_size_dynamic_sections): Use ia64_info->reltext flag
	instead of looking up section names for DT_TEXTREL.
	(elfNN_ia64_reloc_type_class): New.
	(elf_backend_reloc_type_class): Define.
	* elflink.h (size_dynamic_sections): Add spare DT_NULL tags.
	(struct elf_link_sort_rela): New.
	(elf_link_sort_cmp1, elf_link_sort_cmp2, elf_link_sort_relocs): New.
	(elf_bfd_final_link): Call elf_link_sort_relocs.
	Convert one spare DT_NULL into DT_RELCOUNT resp. DT_RELACOUNT if
	necessary.

	* bfdlink.h (struct bfd_link_info): Add combreloc and
	spare_dynamic_tags fields.

	* emultempl/elf32.em (place_orphan): Place orphan .rel* sections
	into .rel.dyn resp. .rela.dyn if combreloc.
	(get_script): If .x linker script is equal to .xn, only put it
	once into the binary.
	Add .xc and .xsc scripts.
	(parse_args): Handle -z combreloc and -z nocombreloc.
	* scripttempl/elf.sc (.rela.sbss): Fix a typo.
	For .xc and .xsc scripts put all .rel* or .rela* input sections
	but .rel*.plt and PLT-like sections into .rel.dyn resp. .rela.dyn.
	* genscripts.sh (GENERATE_COMBRELOC_SCRIPT): Set if SCRIPT_NAME
	is elf.
	Strip trailing whitespace from script.
	Generate .xc and .xsc scripts if requested.
	* ldmain.c (main): Initialize link_info.combreloc and
	link_info.spare_dynamic_tags.
	* lexsup.c (OPTION_SPARE_DYNAMIC_TAGS): Define.
	(ld_options): Add --spare-dynamic-tags option.
	(parse_args): Likewise.
	* ld.texinfo: Document -z combreloc and -z nocombreloc.
	* ldint.texinfo: Document .xc and .xsc linker scripts.
	* NEWS: Add notes about -z combreloc and SHF_MERGE.
2001-08-23 15:14:18 +00:00
H.J. Lu 63d069c06f 2001-08-22 H.J. Lu <hjl@gnu.org>
* emulparams/elf32fr30.sh: Add a newline.
2001-08-22 16:00:25 +00:00
Andreas Jaeger 948f9114c9 * deffilep.y: Add missing prototypes.
* pe-dll.c: Likewise.
2001-08-21 11:42:57 +00:00
Alan Modra 2af022575a * ldlang.c (insert_pad): Fix typos in last patch. 2001-08-20 03:09:07 +00:00
Alan Modra c0c330a70f * ldlang.c (insert_pad): Use offsetof macro.
(lang_size_sections): Always neuter padding statements.
	* emultempl/hppaelf.em (hppaelf_delete_padding_statements): Delete.
2001-08-20 01:21:08 +00:00
Alan Modra ae7fb08f1a * pe-dll.c (pe_dll_fill_sections): Correct type of "relax" param
passed to lang_size_sections.
	(pe_exe_fill_sections): Likewise.
	* emultempl/pe.em (output_prev_sec_find): Copied from elf32.em.
	(gld_${EMULATION_NAME}_place_orphan): Merge from elf32.em.
2001-08-20 00:22:41 +00:00
Alan Modra fab80407fe * emultempl/aix.em: Formatting fixes. 2001-08-18 15:42:26 +00:00
Alan Modra b3327aadfd * ldlang.c (insert_pad): Make use of an existing pad statement if
available.  Move code calculating alignment, adjusting section
	alignment power, and adjusting dot to ..
	(size_input_section): .. here.  Remove unused relax param.
	(lang_size_sections): Change boolean `relax' param to boolean *.
	Adjust call to size_input_section.  Make use of insert_pad to
	place pad after the assignment statement.  If relaxing, zap
	padding statements.
	(reset_memory_regions): Reset output_bfd section sizes too.
	(relax_again): Move to..
	(lang_process): ..here.  Adjust call to lang_size_sections, and
	remove duplicated code.
	* ldlang.h (lang_size_sections): Change `relax' param to boolean *.
2001-08-18 14:54:26 +00:00
Alan Modra 563e308f24 * ld.texinfo: Document that fill values now use the four least
significant bytes.
	* emulparams/elf32fr30.sh (NOP): Update.
	* emulparams/elf32mcore.sh: Likewise.
	* emulparams/elf64_s390.sh: Likewise.
	* emulparams/elf_i386.sh: Likewise.
	* emulparams/elf_i386_be.sh: Likewise.
	* emulparams/elf_i386_chaos.sh: Likewise.
	* emulparams/elf_i386_ldso.sh: Likewise.
	* emulparams/elf_s390.sh: Likewise.
	* emulparams/elf_x86_64.sh: Likewise.
	* emulparams/i386moss.sh: Likewise.
	* emulparams/i386nw.sh: Likewise.
	* emulparams/m68kelf.sh: Likewise.
	* scripttempl/elf.sc: Update NOP comment.
	* scripttempl/elfi370.sc: Likewise.
	* scripttempl/elfm68hc11.sc: Likewise.
	* scripttempl/elfm68hc12.sc: Likewise.
	* scripttempl/nw.sc: Likewise.
2001-08-17 09:51:08 +00:00
Tom Rix b90e1c6f3e Fix for ld 2001-08-15 17:10:18 +00:00
Alan Modra cde43e70f1 * emultempl/elf32.em: Formatting fixes.
(output_prev_sec_find): Test for bfd_ind_section too;  do so by
	looking at sec->owner.
	(output_rel_find): Move function inside LDEMUL_PLACE_ORPHAN test.
	(gld${EMULATION_NAME}_place_orphan): Add a few comments.  Remove
	unused code, and reorganize orphan section placement code.
2001-08-14 04:40:38 +00:00
Alan Modra 39dcfe18ca (wild_doit): Rename to lang_add_section. 2001-08-14 02:01:31 +00:00
Richard Henderson 908d20b308 * emultempl/needrelax.em: New file.
* emulparams/elf64_ia64.sh (EXTRA_EM_FILE): Reference it.
        * Makefile.am (eelf64_ia64.c): Depend on it.
        * Makefile.in: Rebuild.
2001-08-13 20:40:31 +00:00
Alan Modra 22af9fd35c * emultempl/elf32.em: For SEC_EXCLUDE sections, ensure that
output_section is set non-NULL.
2001-08-13 14:28:57 +00:00
Alan Modra 0f33d40bfc * emultempl/elf32.em (gld${EMULATION_NAME}_place_orphan): Return
`true' for SEC_EXCLUDE sections so that the generic code doesn't
	needlessly create an output_section_statement.  Treat a correctly
	named output_section_statement with NULL bfd_section as compatible.
2001-08-13 10:56:21 +00:00
Hans-Peter Nilsson 55ab6103c5 * emultempl/generic.em: Support EXTRA_EM_FILE.
(ld_${EMULATION_NAME}_emulation): Support emulation parameters
	LDEMUL_BEFORE_PARSE, LDEMUL_SYSLIB, LDEMUL_HLL,
	LDEMUL_AFTER_PARSE, LDEMUL_AFTER_OPEN, LDEMUL_AFTER_ALLOCATION,
	LDEMUL_SET_OUTPUT_ARCH, LDEMUL_CHOOSE_TARGET,
	LDEMUL_BEFORE_ALLOCATION, LDEMUL_GET_SCRIPT, LDEMUL_FINISH,
	LDEMUL_CREATE_OUTPUT_SECTION_STATEMENTS,
	LDEMUL_OPEN_DYNAMIC_ARCHIVE, LDEMUL_PLACE_ORPHAN,
	LDEMUL_SET_SYMBOLS, LDEMUL_PARSE_ARGS, LDEMUL_UNRECOGNIZED_FILE,
	LDEMUL_LIST_OPTIONS, LDEMUL_RECOGNIZED_FILE,
	LDEMUL_FIND_POTENTIAL_LIBRARIES.
2001-08-13 07:24:58 +00:00
Richard Henderson 24098abb6c * scripttempl/elf.sc, scripttempl/elfd30v.sc,
scripttempl/elfm68hc11.sc, scripttempl/elfm68hc12.sc,
        scripttempl/v850.sc: Keep .jcr data.
2001-08-12 20:19:49 +00:00
Nick Clifton b9a8de1ea3 Make --verbose always display linker script 2001-08-12 07:59:28 +00:00
Andreas Jaeger 0218d1e4c2 * configure.in: Add -Wstrict-prototypes and -Wmissing-prototypes
to build warnings.
	* configure: Regenerate.
2001-08-10 10:56:47 +00:00
Alan Modra 738108961e * emultempl/elf32.em (output_prev_sec_find): Add missing prototype. 2001-08-09 14:44:18 +00:00
Alan Modra 5253f23b62 * scripttempl/elf.sc: Move non-text .dynamic section before
.plt/.got/.sdata* group.
	(OTHER_GOT_SECTIONS): Move to immediately after .got.
	(OTHER_SDATA_SECTIONS): Add.
	* emulparams/criself.sh: Use OTHER_SDATA_SECTIONS rather than
	OTHER_GOT_SECTIONS.
	* emulparams/crislinux.sh: Likewise.
	* emulparams/elf32b4300.sh: Likewise.
	* emulparams/elf32bmip.sh: Likewise.
	* emulparams/elf32bmipn32.sh: Likewise.
	* emulparams/elf32bsmip.sh: Likewise.
	* emulparams/elf32btsmip.sh: Likewise.
	* emulparams/elf32ebmip.sh: Likewise.
	* emulparams/elf32elmip.sh: Likewise.
	* emulparams/elf32l4300.sh: Likewise.
	* emulparams/elf32lmip.sh: Likewise.
	* emulparams/elf32lsmip.sh: Likewise.
	* emulparams/elf32ltsmip.sh: Likewise.
	* emulparams/elf64bmip.sh: Likewise.
	* emulparams/elf64btsmip.sh: Likewise.
	* emulparams/elf64ltsmip.sh: Likewise.
2001-08-09 14:25:59 +00:00
Alan Modra 179c732cf6 * genscripts.sh: Source the emulparams script before each output
script is generated so that variables like `RELOCATING' may affect
	variables defined in the emulparams script.
2001-08-08 13:14:38 +00:00
Alan Modra 20713691c2 * emultempl/aix.em: ldexp.h,ldlang.h,ldfile.h,ldemul.h go in this
order.
2001-08-04 04:14:10 +00:00
Alan Modra 3fd367102d * emultempl/beos.em (sort_sections): Modify for 2001-08-03 change,
ie. iterate over wild_statement.section_list.
	(gld${EMULATION_NAME}_place_orphan): Likewise.
2001-08-04 01:21:43 +00:00
Stephane Carrez de0b18539d * scripttempl/elfm68hc12.sc (FINISH_CODE, FINISH_RELOC): New to handle
.fini[0-4] sections used by _exit
	(CTOR, DTOR): Export ctor/dtor symbols; move them to ROM.
	(*.text,*.data,*.bss): Take into account .text.*, .data.*, .bss.*.
	* scripttempl/elfm68hc11.sc: Likewise.
2001-08-03 20:41:26 +00:00
H.J. Lu ff7e6f8868 2001-08-03 H.J. Lu <hjl@gnu.org>
* emultempl/beos.em (init): Add the missing initialization.
2001-08-03 19:19:42 +00:00
Alan Modra b6bf44ba1b * ld.texinfo (Input Section Basics): Clarify ordering of output
sections.
	* ldlang.c (callback_t): Add wildcard_list param.
	(walk_wild_section): Remove "section" param.  Rewrite for
	lang_wild_statement_type change.  Remove unique_section_p test.
	(walk_wild_file): Remove "section" param.
	(walk_wild): Remove "section" and "file" params.
	(lang_gc_wild): Likewise.
	(wild): Likewise.  Modify for lang_wild_statement_type change.
	(wild_sort): Likewise.  Add "sec" param.
	(gc_section_callback): Likewise.
	(output_section_callback): Likewise.  Do unique_section_p test.
	(map_input_to_output_sections): Modify call to wild.
	(lang_gc_sections_1): Likewise.
	(print_wild_statement): Modify for lang_wild_statement_type
	change.
	(lang_add_wild): Replace filename, filenames_sorted param with
	filespec.  Replace section_name, sections_sorted,
	exclude_filename_list with section_list.
	* ldlang.h (lang_add_wild): Here too.
	(lang_wild_statement_type): Replace section_name, sections_sorted,
	and exclude_filename_list with section_list.
	* ldgram.y (current_file): Delete.
	(%union): Add wildcard_list.
	(file_NAME_list): Set type to wildcard_list.  Build a linked list
	rather than calling lang_add_wild for each entry.
	(input_section_spec_no_keep): Call lang_add_wild here instead.
	* ld.h (struct wildcard_list): Declare.
	* mri.c (mri_draw_tree): Modify to suit new lang_add_wild.
2001-08-03 01:11:21 +00:00
Charles Wilson b044cda1de 2001-08-02 Charles Wilson <cwilson@ece.gatech.edu>
* ldmain.c (main): initialize link_info.pei386_auto_import
        * pe-dll.c: new tables for auto-export filtering
        (auto_export): change API, pass abfd for contextual filtering.
        Loop thru tables of excluded symbols instead of comparing
        "by hand".
2001-08-02  Paul Sokolovsky  <paul.sokolovsky@technologist.com>
        * pe-dll.c: new variable pe_dll_enable_extra_debug. New
        static variable current_sec (static struct sec *). Add
        forward declaration for add_bfd_to_link.
        (process_def_file): Don't export undefined symbols. Do not
        export symbols starting with  "_imp__".  Call auto_export()
        with new API.
        (pe_walk_relocs_of_symbol): New function.
        (generate_reloc): add optional extra debugging
        (pe_dll_generate_def_file): eliminate extraneous initial blank
        line in output
        (make_one): enlarge symtab to make room for __nm__ symbols
        (DATA auto-import support).
        (make_singleton_name_thunk): New function.
        (make_import_fixup_mark): New function.
        (make_import_fixup_entry): New function.
        (pe_create_import_fixup): New function.
        (add_bfd_to_link): Specify that 'name' argument is a CONST
        char *.
        * pe-dll.h: declare new variable pe_dll_extra_pe_debug;
        declare new functions pe_walk_relocs_of_symbol and
        pe_create_import_fixup.
        * emultempl/pe.em: add new options --enable-auto-import,
        --disable-auto-import, and --enable-extra-pe-debug.
        (make_import_fixup): New function.
        (pe_find_data_imports): New function.
        (pr_sym): New function.
        (gld_${EMULATION_NAME}_after_open): Add optional extra pe
        debugging. Call pe_find_data_imports.  Mark .idata as DATA, not
        CODE.
2001-08-02  Charles Wilson  <cwilson@ece.gatech.edu>
        * ld.texinfo: add additional documentation for
        --export-all-symbols.  Document --out-implib,
        --enable-auto-image-base, --disable-auto-image-base,
        --dll-search-prefix, --enable-auto-import, and
        --disable-auto-import.
        * ldint.texinfo: Add detailed documentation on auto-import
        implementation.
2001-08-02 23:12:02 +00:00
Nick Clifton 156e34dd45 Fix computation in SECTIONS example. 2001-07-30 18:12:07 +00:00
Alan Modra d623142740 Update dependencies with "make dep-am". 2001-07-24 10:08:32 +00:00
Alan Modra e14ec88b39 * ldcref.c (check_section_sym_xref): New function.
(check_nocrossrefs): Call it.
	(check_nocrossref): Interate over h->refs here instead of..
	(check_refs): ..here.  Pass in the symbol name, section, and bfd
	rather than hash_entry pointers.
	(struct check_refs_info): Keep symbol name rather than hash entry.
	Remove "same".
	(check_reloc_refs): Tweak for above changes in check_refs_info.
	Only report references to section syms when symname is NULL to
	prevent duplicate messages for the same reloc.
2001-07-23 07:54:04 +00:00
Nick Clifton c7d701b094 Use stderr if config.map_file is not available. Do not print NULL trees. 2001-07-19 16:41:00 +00:00
Nick Clifton 1545243be0 If a region is specified assign it to all sections inside the overlay unless they have been assigned to the own, non-default, memory region. 2001-07-19 16:21:39 +00:00
Nick Clifton 1b577b00bd Change bug reporting email address. 2001-07-19 10:43:13 +00:00
H.J. Lu 5030876b5d 2001-07-14 H.J. Lu <hjl@gnu.org>
* emultempl/elf32.em (output_prev_sec_find): Never return
	bfd_abs_section_ptr, bfd_com_section_ptr nor
	bfd_und_section_ptr.
2001-07-14 16:36:25 +00:00