summaryrefslogtreecommitdiffstats
path: root/contrib/binutils/ld
diff options
context:
space:
mode:
authorjdp <jdp@FreeBSD.org>1998-09-06 22:57:45 +0000
committerjdp <jdp@FreeBSD.org>1998-09-06 22:57:45 +0000
commiteffee09f856ecc81feb91290459a2cda49d20287 (patch)
tree5c46ac1ee102130859f788aeb927e8086985cfe7 /contrib/binutils/ld
parent31cb88078db5bdc51eb451c5a61e31a426fb8ae6 (diff)
downloadFreeBSD-src-effee09f856ecc81feb91290459a2cda49d20287.zip
FreeBSD-src-effee09f856ecc81feb91290459a2cda49d20287.tar.gz
Import GNU binutils-2.9.1. This will break things for a few minutes
until I've made the commits to resolve the conflicts. Submitted by: Doug Rabson <dfr>
Diffstat (limited to 'contrib/binutils/ld')
-rw-r--r--contrib/binutils/ld/ChangeLog780
-rw-r--r--contrib/binutils/ld/Makefile.am778
-rw-r--r--contrib/binutils/ld/Makefile.in1048
-rw-r--r--contrib/binutils/ld/NEWS9
-rw-r--r--contrib/binutils/ld/README26
-rw-r--r--contrib/binutils/ld/acconfig.h6
-rw-r--r--contrib/binutils/ld/acinclude.m41
-rw-r--r--contrib/binutils/ld/aclocal.m4461
-rw-r--r--contrib/binutils/ld/config.in9
-rwxr-xr-xcontrib/binutils/ld/configure1225
-rw-r--r--contrib/binutils/ld/configure.host80
-rw-r--r--contrib/binutils/ld/configure.in69
-rw-r--r--contrib/binutils/ld/configure.tgt54
-rw-r--r--contrib/binutils/ld/emulparams/arcelf.sh11
-rw-r--r--contrib/binutils/ld/emulparams/elf32b4300.sh10
-rw-r--r--contrib/binutils/ld/emulparams/elf32l4300.sh10
-rw-r--r--contrib/binutils/ld/emulparams/i386pe.sh2
-rwxr-xr-xcontrib/binutils/ld/emulparams/tic30aout.sh7
-rwxr-xr-xcontrib/binutils/ld/emulparams/tic30coff.sh7
-rw-r--r--contrib/binutils/ld/emulparams/v850.sh14
-rw-r--r--contrib/binutils/ld/emultempl/elf32.em244
-rw-r--r--contrib/binutils/ld/emultempl/pe.em63
-rw-r--r--contrib/binutils/ld/ld.113
-rw-r--r--contrib/binutils/ld/ld.h4
-rw-r--r--contrib/binutils/ld/ld.texinfo160
-rw-r--r--contrib/binutils/ld/ldcref.c8
-rw-r--r--contrib/binutils/ld/ldctor.c15
-rw-r--r--contrib/binutils/ld/ldemul.c2
-rw-r--r--contrib/binutils/ld/ldexp.c38
-rw-r--r--contrib/binutils/ld/ldfile.c31
-rw-r--r--contrib/binutils/ld/ldgram.y15
-rw-r--r--contrib/binutils/ld/ldlang.c289
-rw-r--r--contrib/binutils/ld/ldlang.h9
-rw-r--r--contrib/binutils/ld/ldlex.h6
-rw-r--r--contrib/binutils/ld/ldlex.l72
-rw-r--r--contrib/binutils/ld/ldmain.c1
-rw-r--r--contrib/binutils/ld/ldmisc.c37
-rw-r--r--contrib/binutils/ld/ldmisc.h4
-rw-r--r--contrib/binutils/ld/ldver.c2
-rw-r--r--contrib/binutils/ld/ldwrite.c76
-rw-r--r--contrib/binutils/ld/lexsup.c56
-rw-r--r--contrib/binutils/ld/scripttempl/elf.sc42
-rw-r--r--contrib/binutils/ld/scripttempl/pe.sc123
-rw-r--r--contrib/binutils/ld/scripttempl/tic30aout.sc34
-rw-r--r--contrib/binutils/ld/scripttempl/tic30coff.sc58
-rw-r--r--contrib/binutils/ld/scripttempl/v850.sc183
-rw-r--r--contrib/binutils/ld/stamp-h.in1
47 files changed, 5097 insertions, 1096 deletions
diff --git a/contrib/binutils/ld/ChangeLog b/contrib/binutils/ld/ChangeLog
index abef050..6baf1f4 100644
--- a/contrib/binutils/ld/ChangeLog
+++ b/contrib/binutils/ld/ChangeLog
@@ -1,11 +1,662 @@
+Mon Apr 27 11:56:21 1998 Ian Lance Taylor <ian@cygnus.com>
+
+ * configure.in: Set version number to 2.9.1.
+ * configure: Rebuild.
+
+ Based on patch from H.J. Lu <hjl@gnu.org>:
+ * emultempl/elf32.em (global_vercheck_needed): New file static
+ variable.
+ (global_vercheck_failed): New file static variable.
+ (gld${EMULATION_NAME}_after_open): Check for shared libraries
+ twice, once with force set to 0 and once with it set to 1.
+ (gld${EMULATION_NAME}_check_ld_so_conf): Add force parameter.
+ Change all callers.
+ (gld${EMULATION_NAME}_search_needed): Likewise.
+ (gld${EMULATION_NAME}_try_needed): Likewise. If not force, check
+ whether the libraries needs any incompatible versions.
+ (gld${EMULATION_NAME}_vercheck): New static function.
+
+Tue Apr 7 13:35:29 1998 H.J. Lu <hjl@gnu.org>
+
+ * configure.in (TESTBFDLIB): New. Defined and substituted.
+ * Makefile.am (TESTBFDLIB): Changed to @TESTBFDLIB@.
+ * configure, Makefile.in: Rebuild.
+
+Mon Apr 6 15:33:39 1998 Ian Lance Taylor <ian@cygnus.com>
+
+ * Makefile.am (ld.info): Invoke makeinfo with -I options directly
+ rather than relying on default rule. Don't depend upon
+ bfdsumm.texi.
+ (ld.dvi): Likewise.
+ (bfdsumm.texi): Remove target.
+ (CLEANFILES): Take bfdsumm.texi out of value.
+ * Makefile.in: Rebuild.
+
+Sun Apr 5 13:07:57 1998 Ian Lance Taylor <ian@cygnus.com>
+
+ * scripttempl/pe.sc: Use shell variables to avoid depending upon
+ how $ is handled when expanding a shell substitution.
+
+Fri Apr 3 13:31:46 1998 Ian Lance Taylor <ian@cygnus.com>
+
+ * Makefile.am (MOSTLYCLEANFILES): Add ld.log and ld.sum.
+ (DISTCLEANFILES): Define with site.exp and site.bak.
+ * Makefile.in: Rebuild.
+
+ * Makefile.am (DISTCLEANFILES): Remove.
+ (distclean-local): New target.
+ * Makefile.in: Rebuild.
+
+Mon Mar 30 16:12:48 1998 Ian Lance Taylor <ian@cygnus.com>
+
+ * configure.in: Set version number to 2.9.
+ * configure: Rebuild.
+
+Sat Mar 28 16:48:19 1998 Ian Lance Taylor <ian@cygnus.com>
+
+ * Makefile.am (MOSTLYCLEANFILES): Remove tmpdir.
+ (mostlyclean-local): New target to remove tmpdir.
+ * Makefile.in: Rebuild.
+
+ Fix some gcc -Wall warnings:
+ * ldcref.c (output_cref): Add casts to avoid warnings.
+ * ldfile.c (ldfile_add_arch): Likewise.
+ * ldlang.c (lang_leave_overlay_section): Likewise.
+ * lexsup.c (OPTION_COUNT): Likewise.
+ (parse_args): Likewise.
+ * emultempl/elf32.em (gld${EMULATION_NAME}_place_orphan):
+ Likewise.
+ * emultempl/sunos.em (gld${EMULATION_NAME}_search_dir): Likewise.
+ * ldlang.c (lang_check): Initialize variables to avoid warnings.
+ * ldwrite.c (build_link_order): Likewise.
+ * emultempl/sunos.em (gld${EMULATION_NAME}_find_so): Likewise.
+ * emultempl/armcoff.em (gld${EMULATION_NAME}_before_allocation):
+ Remove unused variables.
+
+ * Makefile.am (MOSTLYCLEANFILES): Correct name (was
+ MOSTCLEANFILES).
+ * Makefile.in: Rebuild.
+
+Fri Mar 27 16:39:25 1998 Ian Lance Taylor <ian@cygnus.com>
+
+ * emultempl/pe.em (gld_${EMULATION_NAME}_before_allocation): Put
+ ARM code inside ifdef TARGET_IS_armpe.
+
+Wed Mar 25 11:34:13 1998 Ian Lance Taylor <ian@cygnus.com>
+
+ Based on patch from H.J. Lu <hjl@gnu.org>:
+ * Makefile.am (LDDISTSTUFF): New variable.
+ (diststuff): New target.
+ * Makefile.in: Rebuild.
+
+ * scripttempl/pe.sc: Only include .idata\$[0-7] in .idata when
+ relocating.
+
+Tue Mar 24 15:59:29 1998 Nick Clifton <nickc@cygnus.com>
+
+ * scripttempl/pe.sc (.text): Add .glue_7 and .glue_7t sections to
+ hold Arm/Thumb stubs.
+
+ * emultempl/pe.em (gld_pe_before_allocation): Call
+ arm_process_before_allocation (for ARM/Thumb targets) in order to
+ gather interworking stb information.
+
+Mon Mar 23 18:54:15 1998 Joel Sherrill <joel@OARcorp.com>
+
+ * configure.tgt: (sh*-*-rtems*): Switched from ELF to COFF.
+
+Fri Mar 20 19:17:13 1998 Ian Lance Taylor <ian@cygnus.com>
+
+ * aclocal.m4, configure: Rebuild with libtool 1.2.
+
+Thu Mar 19 14:54:45 1998 Geoffrey Noer <noer@cygnus.com>
+
+ * scripttempl/pe.sc: The Cygwin32 library uses a .data$nocopy
+ section to avoid copying certain data on fork. The linker used to
+ include this between __data_start__ and __data_end__, but that
+ breaks building the cygwin32 dll. The fix is to rename the
+ section ".data_cygwin_nocopy" and explictly include it after
+ __data_end__.
+
+Wed Mar 18 09:42:24 1998 Nick Clifton <nickc@cygnus.com>
+
+ * configure.tgt (targ_extra_emuls): Add thumb-pe target.
+
+Sun Mar 8 23:34:14 1998 Stan Cox <scox@equinox.cygnus.com>
+
+ * configure.tgt (sparclite*-*-elf): Added.
+
+Mon Mar 2 19:24:08 1998 Michael Meissner <meissner@cygnus.com>
+
+ * ldlang.c (lang_size_sections): If the default memory region is
+ *default*, see if there is a memory region that could be used.
+
+Mon Feb 23 17:46:51 1998 Ian Lance Taylor <ian@cygnus.com>
+
+ * emultempl/pe.em (sort_sections): Permit the wildcard to include
+ a trailing '*' when sorting grouped sections.
+ * scripttempl/pe.sc: Include grouped sections using NAME\$*. Only
+ include them when relocating.
+
+Wed Feb 18 23:39:46 1998 Richard Henderson <rth@cygnus.com>
+
+ * Makefile.am (install-exec-local): Install properly when ln
+ fails or tooldir == prefix.
+
+Fri Feb 13 15:24:06 1998 Ian Lance Taylor <ian@cygnus.com>
+
+ * Makefile.am (AUTOMAKE_OPTIONS): Define.
+ * configure, Makefile.in, aclocal.m4: Rebuild with automake 1.2e.
+
+Thu Feb 12 14:10:44 1998 Ian Lance Taylor <ian@cygnus.com>
+
+ * scripttempl/elf.sc: Align the _end symbol according to the ELF
+ format size. From Gordon W. Ross <gwr@mc.com>.
+
+ NetBSD patches from Gordon W. Ross <gwr@mc.com>:
+ * configure.host (alpha*-*-netbsd*): New host.
+ * configure.tgt (alpha*-*-netbsd*, powerpc-*-netbsd*): New
+ targets.
+
+ * lexsup.c (help): Update bug-gnu-utils address.
+ * ld.texinfo (Bug Reporting): Likewise.
+
+Tue Feb 10 18:05:56 1998 Ian Lance Taylor <ian@cygnus.com>
+
+ * ldlang.c (lang_size_sections): Warn if some memory regions were
+ defined, but a loadable section is going into the default memory
+ region.
+
+Tue Feb 10 16:17:20 1998 H.J. Lu <hjl@gnu.org>
+
+ * ldlex.l (V_IDENTIFIER): Allow '.' as symbol prefix.
+
+Tue Feb 10 15:09:45 1998 Ian Lance Taylor <ian@cygnus.com>
+
+ * Makefile.am (Makefile): Add target, for dependencies on
+ configure.host and configure.tgt.
+ * configure.host, configure.tgt: Change -linux* to -linux-gnu*.
+ * Makefile.in: Rebuild.
+
+Mon Feb 9 13:44:40 1998 Andrew Cagney <cagney@b1.cygnus.com>
+
+ * scripttempl/elfd10v.sc (.stack): Move stack to 0x00..7FFE.
+
+ * emulparams/d10velf.sh (READONLY_START_ADDR): Read only section
+ moved to 0x00.....4.
+
+Sat Feb 7 15:41:26 1998 Ian Lance Taylor <ian@cygnus.com>
+
+ * configure, aclocal.m4: Rebuild with new libtool.
+
+Thu Feb 5 12:16:11 1998 Ian Lance Taylor <ian@cygnus.com>
+
+ * scripttempl/pe.sc: Remove ${RELOCATING-0} from all sections.
+ From Thomas de Lellis <tdel@wrs.com>.
+
+ * configure, Makefile.in, aclocal.m4: Rebuild with new libtool.
+
+Wed Feb 4 13:02:32 1998 Ian Lance Taylor <ian@cygnus.com>
+
+ * Makefile.am (ld_new_LDADD): Remove @LEXLIB@.
+ * Makefile.in: Rebuild.
+
+Mon Feb 2 19:34:54 1998 Steve Haworth <steve@pm.cse.rmit.EDU.AU>
+
+ Add tms320c30 support:
+ * configure.tgt (tic30-*-*aout*, tic30-*-*coff*): New targets.
+ * emulparams/tic30aout.sh: New file.
+ * emulparams/tic30coff.sh: New file.
+ * scripttempl/tic30aout.sc: New file.
+ * scripttempl/tic30coff.sc: New file.
+ * Makefile.am (ALL_EMULATIONS): Add etic30aout.o and
+ etic30coff.o.
+ (etic30aout.c, etic30coff.c): New targets.
+ * Makefile.in: Rebuild.
+
+Mon Feb 2 14:10:59 1998 Ian Lance Taylor <ian@cygnus.com>
+
+ * configure.host: Correct HOSTING_CRT0 in alpha*-*-linux* case to
+ accept either ld.so or ld-linux.so.
+
+Fri Jan 30 19:16:28 1998 Doug Evans <devans@canuck.cygnus.com>
+
+ * Makefile.am ({CC,CXX}_FOR_TARGET): Change program_transform_name
+ to transform.
+ * Makefile.in: Regenerate.
+
+Fri Jan 30 19:15:17 1998 Geoff Keating <geoffk@ozemail.com.au>
+
+ * scripttempl/elfppc.sc: Put .dynsbss in .sbss.
+
+Fri Jan 30 11:43:49 1998 H.J. Lu <hjl@gnu.ai.mit.edu>
+
+ * Makefile.am (eelf32bsmip.c, eelf32lsmip.c): New targets.
+ * Makefile.in: Rebuild.
+
+Thu Jan 29 16:04:21 1998 Mumit Khan <khan@xraylith.wisc.edu>
+
+ * ldfile.c (slash): Set to backslash if _WIN32 but not
+ __CYGWIN32__.
+ (ldfile_open_file_search): If __MSDOS__ or _WIN32, accept a
+ leading backslash or a leading x: as an absolute path.
+ (ldfile_find_command_file): Use slash rather than / when
+ generating name to try.
+ * lexsup.c (PATH_SEPARATOR): Define.
+ (set_default_dirlist): Use PATH_SEPARATOR rather than ':'.
+
+Wed Jan 28 14:06:30 1998 Richard Henderson <rth@cygnus.com>
+
+ * emulparams/elf64_sparc.sh (ELFSIZE): 64
+ (TEXT_START_ADDR): Round off, since SIZEOF_HEADERS is added later.
+ (DATA_PLT): Needed by v9 abi.
+
+Wed Jan 28 16:37:27 1998 J.J. van der Heijden <J.J.vanderHeijden@student.utwente.nl>
+
+ * configure.tgt (i[3456]86-*-mingw32*): New entry.
+
+Wed Jan 28 15:51:58 1998 Ian Lance Taylor <ian@cygnus.com>
+
+ * scripttempl/elf.sc: Only include linkonce sections in final
+ sections when relocating.
+
+Wed Jan 28 14:10:01 1998 Ian Lance Taylor <ian@cygnus.com>
+
+ * ld.texinfo (Options): Add a brief description of the types of
+ information included in a link map.
+
+ * ld.texinfo (Options): Mention LDEMULATION in description of -m.
+ (Environment): Mention LDEMULATION.
+
+ * ld.texinfo (Options): Clarify --export-dynamic a bit.
+
+Thu Jan 22 16:07:23 1998 Richard Henderson <rth@cygnus.com>
+
+ * ldlex.l (<SCRIPT>{WILDCHAR}*): Take care for the comments this
+ pattern could match.
+
+Wed Jan 21 22:26:46 1998 Ian Lance Taylor <ian@cygnus.com>
+
+ * emultempl/pe.em (gld_${EMULATION_NAME}_set_symbols): When doing
+ a relocateable link, set the image base to 0, and don't define the
+ various symbols.
+ * emulparams/i386pe.sh (RELOCATEABLE_OUTPUT_FORMAT): Define.
+ * scripttempl/pe.sc: Swap the .data and .bss sections so that
+ .data comes first. If doing a relocateable link, use
+ RELOCATEABLE_OUTPUT_FORMAT if it is defined, and start the
+ sections at 0, and don't define any symbols.
+
+ * ldlang.c (lang_memory_default): Correct parenthisization of
+ expression.
+
+Wed Jan 21 21:20:32 1998 Manfred Hollstein <manfred@s-direktnet.de>
+
+ * emultempl/sunos.em: Don't include sys/types.h and sys/stat.h
+ here; they are included already via sysdep.h.
+
+Tue Jan 6 13:40:02 1998 Richard Henderson <rth@cygnus.com>
+
+ * scripttempl/i960.sc: Don't explicitly set .data and .bss start.
+
+Fri Jan 2 20:15:37 1998 Michael Meissner <meissner@cygnus.com>
+
+ * ldgram.y (attributes_opt): Pass region pointer to
+ lang_set_flags, not &region->flags.
+
+ * ldlang.c (lang_memory_default): New function to figure out a
+ default memory region for a section if it was not specified.
+ (lang_memory_region_lookup): Zero flags, not_flags field.
+ (lang_map{,_flags}): Print attribute flags in memory map.
+ (lang_size_sections): Call lang_memory_default to get default
+ memory region.
+ (lang_set_flags): Implement attribute flags for real. Take new
+ argument to give the flags we are to skip for this region.
+
+ * ldlang.h (memory_region_struct): Add not_flags field, make both
+ flags fields flagword type.
+ (lang_output_section_state): Make flags field flagword type.
+ (lang_set_flags): Update prototype to match new calling sequence.
+ (lang_memory_region_default): Add prototype.
+
+Thu Jan 1 18:04:51 1998 Jeffrey A Law (law@cygnus.com)
+
+ * scripttempl/h8300h.sc: Fix typo.
+ * scripttempl/h8300s.sc: Likewise.
+
+Sun Dec 21 12:51:49 1997 Ian Lance Taylor <ian@cygnus.com>
+
+ * ldexp.c (fold_name): Don't crash if the symbol is defined in a
+ section with no output section, such as a shared library section.
+
+Wed Dec 17 12:14:11 1997 Ian Lance Taylor <ian@cygnus.com>
+
+ * lexsup.c (parse_args): Keep track of where we are in the option
+ parsing before calling ldemul_parse_args, so that we don't call it
+ multiple times on the same argument and confuse the getopt
+ internals.
+
+Wed Dec 10 17:40:08 1997 Nick Clifton <nickc@cygnus.com>
+
+ * scripttempl/armcoff.sc: Add glue sections (code taken from Arm
+ branch).
+
+ * emulparams/armcoff.sh (TEMPLATE_NAME): Set to armcoff.
+
+ * emultempl/armcoff.em: New file, imported from Arm branch.
+
+Tue Dec 9 15:28:17 1997 Michael Meissner <meissner@cygnus.com>
+
+ * Makefile.am: Add Oct 23 changes to Makefile.in here.
+
+ * Makefile.{am,in}: (ALL_EMULATIONS): Add ed10velf.o.
+
+
+
+Tue Dec 2 10:14:47 1997 Nick Clifton <nickc@cygnus.com>
+
+ * configure.tgt (targ_extra_emuls): Add support for Thumb target.
+
+Sat Nov 22 15:23:19 1997 Ian Lance Taylor <ian@cygnus.com>
+
+ * ldlex.l: Don't define hex_mode. Correct number regexp to not
+ accept hex digits without a leading $ or 0x. Handle leading $
+ correctly. Pass 0 rather than hex_mode to bfd_scan_vma.
+ * ldlex.h (hex_mode): Don't declare.
+
+Thu Nov 13 13:45:00 1997 Andrew Cagney <cagney@b1.cygnus.com>
+
+ * configure.tgt (targ_extra_emuls): Make FreeBSD a i386bsd
+ variant.
+
+Sun Nov 2 14:51:36 1997 H.J. Lu <hjl@gnu.ai.mit.edu>
+
+ * configure.host (alpha*-*-linux*): Correct HOSTING_CRT0. Set
+ HOSTING_LIBS.
+
+Thu Oct 30 12:25:55 1997 Ian Lance Taylor <ian@cygnus.com>
+
+ * ld.h (args_type): Add warn_mismatch field.
+ * ldmain.c (main): Initialize warn_mismatch field.
+ * lexsup.c (parse_args): Handle --no-warn-mismatch option.
+ * ldlang.c (ignore_bfd_error): New static function.
+ (lang_check): If warn_mismatch is false, don't warn about
+ mismatched input files.
+ * ld.texinfo, ld.1: Document new option.
+
+Thu Oct 23 14:38:18 1997 Nick Clifton <nickc@cygnus.com>
+
+ * scripttempl/v850.sc: Rename linker symbol '_stack' to '__stack'
+ to avoid conflicts with C code which is defining a variable called
+ 'stack'.
+
+Thu Oct 23 00:57:45 1997 Richard Henderson <rth@dot.cygnus.com>
+
+ * Makefile.in (ALL_EMULATIONS): Move eelf64_sparc.o ...
+ (ALL_64_EMULATIONS): ... here.
+ (eelf64_sparc.c): Template should be elf32 not generic.
+ * emulparams/elf64_sparc.sh (TEMPLATE_NAME): New definition.
+
+Thu Oct 23 00:44:20 1997 Richard Henderson <rth@dot.cygnus.com>
+
+ * configure.tgt: Add sparc64-*-linux*.
+ * emulparams/elf64_sparc.sh (GENERATE_SHLIB_SCRIPT, NOP): New.
+
+Wed Oct 22 11:29:25 1997 Ian Lance Taylor <ian@cygnus.com>
+
+ * scripttempl/pe.sc: Put .eh_frame in .rdata.
+
+Fri Oct 17 00:00:13 1997 Richard Henderson <rth@cygnus.com>
+
+ * ldlang.c (lang_register_vers_node): Only check globals<=>locals,
+ since we need to be able to export different versions of the same
+ symbol.
+
+Wed Oct 15 14:52:36 1997 Ian Lance Taylor <ian@cygnus.com>
+
+ * scripttempl/pe.sc: Put .stab and .stabstr sections at end.
+
+Wed Oct 8 12:37:05 1997 Richard Henderson <rth@cygnus.com>
+
+ * configure.tgt, configure.host: Change alpha-*-* to alpha*-*-*;
+ config.guess now recognizes alphaev5 etc.
+
+Fri Oct 3 14:23:02 1997 Ian Lance Taylor <ian@cygnus.com>
+
+ * emultempl/aix.em (gld${EMULATION_NAME}_parse_args): Don't treat
+ -s and -u as -static and -unix.
+
+Thu Oct 2 18:40:28 1997 Ian Lance Taylor <ian@cygnus.com>
+
+ * ldlang.c (wild_doit): Rewrite flag handling for clarity. If we
+ are not adding the first input section, and SEC_READONLY is clear
+ on the output section, then don't copy it from the input section.
+ If SEC_READONLY is not set on the input section, then clear it on
+ the output section.
+
+ * configure.tgt (mips*-sgi-irix[56]*): Use elf32bsmip rather than
+ elf32bmip.
+ (mips*el-*-linux*): Change elf32lmip to elf32lsmip and elf32bmip
+ to elf32bsmip.
+ (mips*-*-linux*): Likewise.
+ * emulparams/elf32bsmip.sh: New file; just like elf32bmip.sh, but
+ setting ENTRY to __start.
+ * emulparams/elf32lsmip.sh: New file; just like elf32lmip.sh, but
+ setting ENTRY to __start.
+ * scripttempl/elf.sc: Always set ENTRY to _start if it was not
+ already set.
+
+Wed Oct 1 16:41:00 1997 Nick Clifton <nickc@cygnus.com>
+
+ * emulparams/v850.sh (ROZDATA_START_ADDR, ROSDATA_START_ADDR): New
+ Variables.
+
+ * scripttempl/v850.sc: Move read only areas out of zero and small
+ data sections and into their own sections.
+
+Wed Sep 24 16:59:15 1997 Joel Sherrill <joel@oarcorp.com>
+
+ * configure.tgt (sh*-*-rtems*): New target, like sh-*-elf*.
+
+Wed Sep 24 11:33:14 1997 Ian Lance Taylor <ian@cygnus.com>
+
+ * ld.texinfo (Section Options): Improve documentation of NOLOAD
+ directive.
+
+ * aclocal.m4: Rebuild with new libtool.
+ * configure: Rebuild.
+
+Mon Sep 22 17:24:06 1997 Ian Lance Taylor <ian@cygnus.com>
+
+ * ldlang.c (wild_doit): Revert patch of September 3.
+
+Wed Sep 17 16:45:34 1997 Nick Clifton <nickc@cygnus.com>
+
+ * Makefile.am, Makefile.in: Add rule for ev850.c
+ * configure.tgt (targ_extra_emuls): Add v850 target.
+
+Tue Sep 9 07:49:56 1997 Fred Fish <fnf@ninemoons.com>
+
+ * ldlang.c (lang_memory_region_lookup): Remove extraneous
+ initialization of p.
+
+Thu Sep 4 09:03:33 1997 Ian Lance Taylor <ian@cygnus.com>
+
+ * emultempl/aix.em (gld${EMULATION_NAME}_parse_args): In
+ expression produced for -bpT and -bpD options, align to a 32 byte
+ boundary rather than an 8 byte boundary.
+ * scripttempl/aix.sc: Put .tocbss at start of .bss section.
+
+ * ldmisc.h, ldmisc.c, ldcref.c: Rename finfo to lfinfo, to avoid
+ function name conflict with AIX 4.2 unistd.h header file.
+
+Wed Sep 3 15:12:32 1997 Ian Lance Taylor <ian@cygnus.com>
+
+ * ldlang.c (wild_doit): Clear SEC_HAS_CONTENTS from a
+ noload_section.
+
+Fri Aug 29 00:32:31 1997 Ian Lance Taylor <ian@cygnus.com>
+
+ * Makefile.am (ld_new_DEPENDENCIES): Remove @LEXLIB@.
+ * Makefile.in: Rebuild.
+
+Thu Aug 28 10:12:10 1997 Doug Evans <dje@canuck.cygnus.com>
+
+ * configure.tgt (arc-*-elf*): Recognize.
+ * Makefile.am (ALL_EMULATIONS): Add earcelf.o.
+ * Makefile.in: Regenerate.
+ * emulparams/arcelf.sh: New file.
+
+Wed Aug 20 11:14:13 1997 Ian Lance Taylor <ian@cygnus.com>
+
+ * ldlang.c (wildcardp): Don't let a backslash by itself cause a
+ pattern to be treated as a wildcard pattern.
+
+ * ldgram.y (atype): Accept parentheses with no type.
+
+ * ld.texinfo (Section Definition): Clarify use of whitespace.
+ (Section Placement): Likewise.
+
+
+Sat Aug 9 00:42:27 1997 Ian Lance Taylor <ian@cygnus.com>
+
+ * Makefile.am (ld.info): Change dependency from
+ $(BFDDIR)/doc/bfdsumm.texi to bfdsumm.texi.
+ (ld.dvi): Likewise.
+ (bfdsumm.texi): New target.
+ (CLEANFILES): Add bfdsumm.texi.
+ * Makefile.in: Rebuild.
+
+ * Makefile.am: New file, based on old Makefile.in.
+ * acinclude.m4: New file, from old aclocal.m4.
+ * configure.in: Call AM_INIT_AUTOMAKE and AM_PROG_LIBTOOL. Remove
+ shared library handling; now handled by libtool. Replace
+ AC_CONFIG_HEADER with AM_CONFIG_HEADER. Call AC_PROG_YACC,
+ AC_PROG_LEX, and AC_DECL_YYTEXT. Call AM_MAINTAINER_MODE,
+ AM_CYGWIN32, and AM_EXEEXT. Don't call CY_CYGWIN32 or CY_EXEEXT.
+ * configure.host: Don't set HLDFLAGS, HLDENV, or RPATH_ENVVAR.
+ * acconfig.h: Mention PACKAGE and VERSION.
+ * stamp-h.in: New file.
+ * ldver.c (ld_program_version): Set ld_program_version from
+ VERSION.
+ * ldgram.y, ldlex.l: Replace VERSION with VERSIONK.
+ * Makefile.in: Now built with automake.
+ * aclocal.m4: Now built with aclocal.
+ * configure, config.in: Rebuild.
+
+Mon Jul 28 19:04:50 1997 Rob Savoye <rob@chinadoll.cygnus.com>
+
+ * configure.in: Use CYGWIN and EXEEXT autoconf macro to look for
+ win32 dependencies.
+ * configure: Regenerated with autoconf 2.12.
+ * Makefile.in: Add $(EXEEXT) to executable.
+
+Tue Jul 22 18:50:38 1997 Robert Hoehne <robert.hoehne@Mathematik.TU-Chemnitz.DE>
+
+ * emulparams/i386go32.sh (OUTPUT_FORMAT): Set to "coff-go32".
+ (SEGMENT_SIZE): Set to 0x200.
+ * scripttempl/i386go32.sc: Rewrite.
+ * configure.tgt (i[3456]86-*-msdosdjgpp*): New target.
+
+Mon Jul 7 12:39:42 1997 Ian Lance Taylor <ian@cygnus.com>
+
+ From Manfred Hollstein <manfred@s-direktnet.de>:
+ * configure.host (i[3456]86-*-linux*libc1*): Renamed from
+ i[3456]86-*-linux*.
+ (i[3456]86-*-linux*): New host.
+
+Thu Jun 26 13:54:03 1997 Ian Lance Taylor <ian@cygnus.com>
+
+ * scripttempl/pe.sc: Put .rsrc after .reloc. Put input .rsrc
+ sections in the output .rsrc section.
+
+Wed Jun 25 12:48:41 1997 Andreas Schwab <schwab@issan.informatik.uni-dortmund.de>
+
+ * configure.host (m68*-*-linux*libc1*): Renamed from
+ `m68*-*-linux*'.
+ (m68*-*-linux*): New configuration for use with GNU libc 2.
+
+Mon Jun 16 19:18:21 1997 Geoff Keating <geoffk@ozemail.com.au>
+
+ * scripttempl/elfppc.sc: Correct .rela.sdata entries.
+
+ * scripttempl/elfppc.sc: Put the PLT between the small and large
+ BSS segments.
+ * emulparams/elf32ppc.sh (TEXT_START_ADDR): The ABI says `A
+ program base of 0x02000000 is recommended...' because otherwise
+ shared libraries are less efficient. We use 0x01800000 because
+ otherwise it's impossible to branch to location 0, for instance if
+ you have an undefined weak symbol.
+
+Mon Jun 16 12:49:36 1997 H.J. Lu <hjl@gnu.ai.mit.edu>
+
+ * ldlang.c (lang_place_undefineds): Add \n in einfo call.
+ (lang_size_sections): Likewise.
+ * ldlex.l: Likewise.
+ * emultempl/aix.em (gld${EMULATION_NAME}_read_file): Likewise.
+ * emultempl/mipsecoff.em (gld${EMULATION_NAME}_after_open):
+ Likewise.
+ (check_sections): Likewise.
+ (gld${EMULATION_NAME}_after_allocation): Likewise.
+ * emultempl/pe.em (gld_$${EMULATION_NAME}_before_allocation):
+ Likewise.
+ * mpw-eppcmac.c (gldppcmacos_read_file): Likewise.
+ * mpw-idtmips.c (gldmipsidt_after_open): Likewise.
+ (check_sections): Likewise.
+ (gldmipsidt_after_allocation): Likewise.
+
+ * ldemul.c (ldemul_choose_mode): Remove unused einfo argument.
+
+Fri Jun 6 23:47:42 1997 Ian Lance Taylor <ian@cygnus.com>
+
+ * scripttempl/pe.sc: Add zeroes after .idata$3 to mark the end of
+ the import list.
+
+Thu May 29 13:13:22 1997 Ian Lance Taylor <ian@cygnus.com>
+
+ * emultempl/elf32.em (gld${EMULATION_NAME}_place_section): Don't
+ crash if an output section has no BFD section.
+
+Fri May 23 15:23:25 1997 Fred Fish <fnf@cygnus.com>
+
+ * lexsup.c (ld_options): Add entry for the new "task-link" option.
+ (parse_args): Handle the "task-link" option.
+ (OPTION_TASK_LINK): Add define.
+
Wed May 21 17:44:15 1997 Ian Lance Taylor <ian@cygnus.com>
* ldmain.c (main): Correct check of fclose return value when
handling --force-exe-suffix.
-Tue May 13 10:43:26 1997 Ian Lance Taylor <ian@cygnus.com>
-
- * ldver.c: Set to "2.8.1".
+Thu May 15 11:35:29 1997 Nick Clifton <nickc@cygnus.com>
+
+ * ldlang.c (lang_check): Add test of the return value from the
+ call to bfd_merge_private_bfd_data().
+
+Mon May 12 23:22:58 1997 Ian Lance Taylor <ian@cygnus.com>
+
+ * scripttempl/elfmips.sc: Remove.
+ * scripttempl/elf.sc: Set ENTRY based on target. Permit
+ TEXT_DYNAMIC to control .dynamic segment. Permit
+ SHLIB_TEXT_START_ADDR to set start of shared object. Support
+ INITIAL_READONLY_SECTIONS. Put .stub in .text. Only put
+ .gnu.linkonce.t* in .text when relocating. Support
+ OTHER_TEXT_SECTIONS. Support SHLIB_DATA_ADDR as well as
+ DATA_ADDR. Support OTHER_GOT_SYMBOLS and OTHER_GOT_SECTIONS.
+ * emulparams/elf32b4300.sh (SCRIPT_NAME): Set to elf.
+ (DATA_ADDR): Don't set.
+ (INITIAL_READONLY_SECTIONS): Rename from OTHER_READONLY_SECTIONS.
+ (OTHER_TEXT_SECTIONS): Set.
+ (OTHER_GOT_SECTIONS): Rename from OTHER_READWRITE_SECTIONS.
+ (MACHINE): Set to empty string.
+ * emulparams/elf32l4300.sh: Likewise.
+ * emulparams/elf32ebmip.sh: Likewise.
+ * emulparams/elf32elmip.sh: Likewise.
+ * emulparams/elf32bmip.sh: Likewise. Also:
+ (TEXT_DYNAMIC): Set.
+ * emulparams/elf32lmips.sh: Likewise.
+ * Makefile.in (eelf32bmips.c): Depend upon elf.sc rather than
+ elfmips.sc.
+ (eelf32ebmips.c, eelf32elmips.c, eelf32lmip.c): Likewise.
Mon May 12 11:11:06 1997 Andreas Schwab <schwab@issan.informatik.uni-dortmund.de>
@@ -13,6 +664,10 @@ Mon May 12 11:11:06 1997 Andreas Schwab <schwab@issan.informatik.uni-dortmund.
byte boundary, instead let the linker use whatever the individual
sections require.
+Fri May 9 17:45:46 1997 Ian Lance Taylor <ian@cygnus.com>
+
+ * configure.tgt (i[3456]86-*-gnu*): Don't include Mach support.
+
Tue May 6 13:21:19 1997 Ian Lance Taylor <ian@cygnus.com>
From Sean McNeil <sean@mcneil.com>:
@@ -31,8 +686,25 @@ Wed Apr 30 12:23:21 1997 Manfred Hollstein <manfred@s-direktnet.de>
* scripttempl/m88kbcs.sc (__.initp.end, _etext): Added whitespace
around assignment of current location pointer.
+Thu Apr 17 13:07:18 1997 Ian Lance Taylor <ian@cygnus.com>
+
+ * ldctor.c (ldctor_build_sets): Make sure the set is aligned
+ appropriately.
+
+Tue Apr 15 13:19:26 1997 Ian Lance Taylor <ian@cygnus.com>
+
+ * Makefile.in (INSTALL): Set to @INSTALL@.
+ (INSTALL_XFORM, INSTALL_XFORM1): Remove.
+ (install): Depend upon ld.new and installdirs. Use
+ $(program_transform_name) directly, rather than using
+ $(INSTALL_XFORM) and $(INSTALL_XFORM1).
+ (installdirs): New target.
+ (install-info): Run mkinstalldirs.
+
Mon Apr 14 12:06:15 1997 Ian Lance Taylor <ian@cygnus.com>
+ * Makefile.in (INSTALL): Change install.sh to install-sh.
+
From Thomas Graichen <graichen@rzpd.de>:
* configure.in: Use ${CONFIG_SHELL} when running $ac_config_sub.
* configure: Rebuild.
@@ -42,9 +714,21 @@ Fri Apr 4 11:42:41 1997 Ian Lance Taylor <ian@cygnus.com>
* emultempl/pe.em: Include "libiberty.h".
(sort_sections_1): Use xmalloc rather than alloca.
-Thu Apr 3 18:54:20 1997 Ian Lance Taylor <ian@cygnus.com>
+ * ldlex.l: Recognize SQUAD.
+ * ldgram.y (length): Add SQUAD.
+ * ldctor.c (ldctor_build_sets): Use SQUAD for a signed 8 byte
+ reloc.
+ * ldlang.c (print_data_statement): Handle SQUAD.
+ (lang_size_sections, lang_do_assignments): Likewise.
+ * ldexp.c (exp_print_token): Add SQUAD to table.
+ * ldwrite.c (build_link_order): Handle SQUAD.
+ * ld.texinfo (Section Data Expressions): Document SQUAD.
+
+Thu Apr 3 13:19:40 1997 Ian Lance Taylor <ian@cygnus.com>
- * ldver.c (ld_program_version): Set to "2.8".
+ * ldver.c (ld_program_version): Set to 2.8.1.
+
+ * Branched binutils 2.8.
Wed Apr 2 11:55:27 1997 Ian Lance Taylor <ian@cygnus.com>
@@ -321,6 +1005,11 @@ Fri Jan 3 14:04:40 1997 Ian Lance Taylor <ian@cygnus.com>
* ld.texinfo (Operators): Remove '@' from @smallexmple in comment
to avoid confusing texi2roff.
+Fri Jan 3 11:27:02 1997 Michael Meissner <meissner@tiktok.cygnus.com>
+
+ * scripttempl/v850.sc (.zdata): Add .zcommon section.
+ (.tdata): Add .tcommon and .tcommon_byte sections.
+
Thu Jan 2 18:14:32 1997 Ian Lance Taylor <ian@cygnus.com>
* configure.tgt (mips*el-*-linux*, mips*-*-linux*): New targets.
@@ -340,10 +1029,24 @@ Tue Dec 31 14:48:30 1996 Ian Lance Taylor <ian@cygnus.com>
size_dynamic_sections.
* ld.texinfo, ld.1: Document --filter/-F and --auxiliary/-f.
+Mon Dec 30 13:55:57 1996 Michael Meissner <meissner@tiktok.cygnus.com>
+
+ * scripttempl/v850.sc (.tdata) Add .tbss and .tbyte sections.
+
Wed Dec 18 22:57:35 1996 Stan Shebs <shebs@andros.cygnus.com>
* mpw-make.sed: Use NewFolderRecursive for installation.
+Fri Dec 13 14:08:50 1996 Michael Meissner <meissner@tiktok.cygnus.com>
+
+ * scripttempl/v850.sc: Make sure __{e,g}p start relative to the
+ {s,t}data sections. Do not emit any linker generated symbols if
+ -r. Use {TEXT,{Z,S,T}DATA}_START_ADDR variables to initialize
+ where the different sections go. Change some whitespace.
+
+ * emulparams/v850.sh ({TEXT,{Z,S,T}DATA}_START_ADDR): Define
+ appropriately. Remove crud not used anymore.
+
Fri Dec 13 10:19:57 1996 Jeffrey A Law (law@cygnus.com)
* Makefile.in (emn10200.c): Add dependencies.
@@ -378,8 +1081,8 @@ Mon Dec 2 11:43:50 1996 Ian Lance Taylor <ian@cygnus.com>
Wed Nov 27 03:22:05 1996 Jason Merrill <jason@yorick.cygnus.com>
* scripttempl/elf{,mips,ppc}.sc: Add the remaining DWARF sections.
-
* scripttempl/elfd10v.sc: Likewise.
+ * scripttempl/v850.sc: Likewise.
Tue Nov 26 16:58:33 1996 Ian Lance Taylor <ian@cygnus.com>
@@ -413,6 +1116,11 @@ Fri Nov 1 10:01:27 1996 Ian Lance Taylor <ian@cygnus.com>
* scripttempl/m68kcoff.sc: Make sure the etext and __CTOR_LIST__
symbols are correctly aligned.
+Thu Oct 31 09:28:59 1996 Jeffrey A Law (law@cygnus.com)
+
+ * scriptempl/v850.sc (zdata): Handle reszdata, romzdata and
+ romzbss too.
+
Tue Oct 29 12:33:05 1996 Martin M. Hunt <hunt@pizza.cygnus.com>
* emulparams/d10velf.sh: Changes needed for D10V-EVA board.
@@ -426,6 +1134,21 @@ Mon Oct 28 15:37:00 1996 Doug Evans <dje@canuck.cygnus.com>
* configure.tgt (sparclet*-*-aout*): Delete, use sparc*-*-aout*.
+Wed Oct 23 16:17:22 1996 Jeffrey A Law (law@cygnus.com)
+
+ * scriptempl/v850.sc (zdata): Fix typo "zrodata" -> "rozdata".
+
+ * scriptempl/v850.sc (zdata): Make sure this stays
+ in lo-memory.
+
+Tue Oct 22 11:36:47 1996 Jeffrey A Law (law@cygnus.com)
+
+ * scripttempl/v850.sc (__ep): Put it at the start
+ of the tda section.
+
+ * scriptempl/v850.sc: Move all "normal" sections into
+ the external memory region (0x100000 - 0x200000).
+
Mon Oct 21 17:16:59 1996 Michael Meissner <meissner@wogglebug.tiac.net>
* scripttempl/elfd10v.sc: Clone from elf.sc, move .text to
@@ -450,6 +1173,10 @@ Fri Oct 18 15:43:38 1996 Ian Lance Taylor <ian@cygnus.com>
EMULATION_OFILES.
* configure: Rebuild.
+Fri Oct 18 12:58:35 1996 Jeffrey A Law (law@cygnus.com)
+
+ * scripttempl/v850.sc (__gp, __ep): Define.
+
Thu Oct 17 18:14:07 1996 Ian Lance Taylor <ian@cygnus.com>
* ld.texinfo: Try to consistently use a single or a double dash
@@ -459,6 +1186,20 @@ Thu Oct 17 10:17:20 1996 Doug Evans <dje@canuck.cygnus.com>
* emulparams/m32relf.sh (EMBEDDED): Define.
+Thu Oct 17 10:56:49 1996 Jeffrey A Law (law@cygnus.com)
+
+ * scripttempl/v850.sc (.zdata): Add this before .text.
+ (.sdata): Also include .rosdata as part of the .sdata.
+ (.tdata): Include this just before .sdata.
+
+ * emulparms/v850.sh (SCRIPT_NAME): Use "v850" not "elf".
+ * scripttempl/v850.sc: Wrap script with a "cat << EOF".
+
+Wed Oct 16 23:10:01 1996 Jeffrey A Law (law@cygnus.com)
+
+ * scripttempl/v850.sc: New linker script for the V850.
+ * Makefile.in: Use it.
+
Thu Oct 10 17:57:00 1996 Ian Lance Taylor <ian@cygnus.com>
* emulparams/elf32b4300.sh: Define _gp in OTHER_GOT_SYMBOLS, not
@@ -575,6 +1316,10 @@ Mon Sep 16 17:55:21 1996 Ian Lance Taylor <ian@cygnus.com>
* scripttempl/armcoff.sc: For -N or -n, don't align .data. From
Chris Hadley <Christopher.Hadley@cl.cam.ac.uk>
+Sun Sep 15 22:09:56 1996 Jeffrey A Law (law@cygnus.com)
+
+ * emulparms/v850.sh: Fix OTHER_RELOCATING_SECTIONS.
+
Sun Sep 15 10:38:16 1996 Mark Alexander <marka@cygnus.com>
* emulparms/d10v.sh: Set OTHER_RELOCATING_SECTIONS to put
@@ -600,6 +1345,19 @@ Wed Sep 4 15:53:43 1996 Ian Lance Taylor <ian@cygnus.com>
* configure.tgt (alpha-*-gnu*): New target. From Fila Kolodny
<fila@ibi.com>.
+Tue Sep 3 00:52:54 1996 Jeffrey A Law (law@cygnus.com)
+
+ * emulparms/v850.sh: Set OTHER_RELOCATING_SECTIONS
+
+Sun Sep 1 21:48:58 1996 Jeffrey A Law (law@cygnus.com)
+
+ * emulparms/v850.sh: Set EMBEDDED.
+
+Fri Aug 30 22:30:30 1996 Jeffrey A Law (law@cygnus.com)
+
+ * emulparms/v850.sh: Entry symbol is "_start", tweak
+ ctor/dtor support.
+
Fri Aug 30 18:32:31 1996 Ian Lance Taylor <ian@cygnus.com>
* configure.tgt (sh-*-elf*): New target.
@@ -640,6 +1398,12 @@ Thu Aug 22 17:10:40 1996 Ian Lance Taylor <ian@cygnus.com>
* Makefile.in (HLDENV): New variable.
($(LD_PROG)): Use $(HLDENV).
+Thu Aug 22 16:29:28 1996 Jeffrey A Law (law@cygnus.com)
+
+ * Makefile.in (ev850.c): New target.
+ * configure.tgt (v850-*-*): New target.
+ * emulparams/v850.sh: New file.
+
Thu Aug 22 11:16:02 1996 Stan Shebs <shebs@andros.cygnus.com>
* mpw-make.sed: Add @DASH_C_FLAG@ to compiler edit.
@@ -2992,7 +3756,6 @@ Tue Apr 11 12:02:03 1995 Stan Shebs <shebs@andros.cygnus.com>
* ldlex.l (TRUE_FALSE_ALREADY_DEFINED): If MPW, set this to
prevent redefinition errors.
-
Tue Apr 4 17:55:18 1995 Steve Chamberlain <sac@bang.hack.com>
* ldwrite.c (clone_section): Align clone sections on even
@@ -3081,7 +3844,6 @@ Thu Mar 9 12:21:51 1995 Michael Meissner <meissner@tiktok.cygnus.com>
bfd_merge_private_bfd_data to let the backend do additional
checks.
-
Tue Mar 7 00:53:08 1995 Ian Lance Taylor <ian@cygnus.com>
* ldemul.c (ldemul_choose_mode): If emulation not recognized, list
@@ -3138,7 +3900,6 @@ Fri Feb 17 13:06:47 1995 Michael Meissner <meissner@cygnus.com>
Offset _GLOBAL_OFFSET_TABLE_ 32768 from the start of the GOT area
to double the size of the table.
-
Thu Feb 9 18:29:43 1995 Ken Raeburn <raeburn@cujo.cygnus.com>
* Makefile.in (distclean): Do recursive deletion, since ldscripts
@@ -3272,7 +4033,6 @@ Mon Dec 19 14:02:13 1994 Steve Chamberlain (sac@jonny.cygnus.com)
* ldwrite.c (clone_section, split_sections): New functions.
* lexsup.c (parse_args): Understand new split options.
-
Fri Dec 9 17:22:55 1994 Ian Lance Taylor <ian@sanguine.cygnus.com>
* scripttempl/elf.sc: Move .ctors and .dtors from .text segment to
diff --git a/contrib/binutils/ld/Makefile.am b/contrib/binutils/ld/Makefile.am
new file mode 100644
index 0000000..e5be23d
--- /dev/null
+++ b/contrib/binutils/ld/Makefile.am
@@ -0,0 +1,778 @@
+## Process this file with automake to generate Makefile.in
+
+AUTOMAKE_OPTIONS = cygnus dejagnu
+
+tooldir = $(exec_prefix)/$(target_alias)
+
+YACC = `if [ -f ../bison/bison ] ; then echo ../bison/bison -y -L../bison/bison ; else echo bison -y ; fi`
+YFLAGS = -d
+LEX = `if [ -f ../flex/flex ] ; then echo ../flex/flex ; else echo flex ; fi`
+
+# We put the scripts in the directory $(scriptdir)/ldscripts.
+# We can't put the scripts in $(datadir) because the SEARCH_DIR
+# directives need to be different for native and cross linkers.
+scriptdir = $(tooldir)/lib
+
+EMUL = @EMUL@
+EMULATION_OFILES = @EMULATION_OFILES@
+
+# Search path to override the default search path for -lfoo libraries.
+# If LIB_PATH is empty, the ones in the script (if any) are left alone.
+# (The default is usually /lib:/usr/lib:/usr/local/lib, unless building
+# a cross-linker, in which case the default is empty. See genscripts.sh.)
+# Otherwise, they are replaced with the ones given in LIB_PATH,
+# which may have the form: LIB_PATH=/lib:/usr/local/lib
+LIB_PATH =
+
+BASEDIR = $(srcdir)/..
+BFDDIR = $(BASEDIR)/bfd
+INCDIR = $(BASEDIR)/include
+DEP = mkdep
+
+# What version of the manual to build
+DOCVER = gen
+
+#stuff for self hosting (can be overridden in config file).
+HOSTING_CRT0 = @HOSTING_CRT0@
+HOSTING_LIBS = @HOSTING_LIBS@
+HOSTING_EMU = -m $(EMUL)
+
+# Setup the testing framework, if you have one
+EXPECT = `if [ -f $$r/../expect/expect ] ; \
+ then echo $$r/../expect/expect ; \
+ else echo expect ; fi`
+
+RUNTEST = `if [ -f $${srcroot}/../dejagnu/runtest ] ; \
+ then echo $${srcroot}/../dejagnu/runtest ; \
+ else echo runtest ; fi`
+
+RUNTESTFLAGS =
+
+CC_FOR_TARGET = ` \
+ if [ -f $$r/../gcc/xgcc ] ; then \
+ if [ -f $$r/../newlib/Makefile ] ; then \
+ echo $$r/../gcc/xgcc -B$$r/../gcc/ -idirafter $$r/../newlib/targ-include -idirafter $${srcroot}/../newlib/libc/include -nostdinc; \
+ else \
+ echo $$r/../gcc/xgcc -B$$r/../gcc/; \
+ fi; \
+ else \
+ if [ "@host@" = "@target@" ] ; then \
+ echo $(CC); \
+ else \
+ echo gcc | sed '$(transform)'; \
+ fi; \
+ fi`
+
+CXX = gcc
+CXX_FOR_TARGET = ` \
+ if [ -f $$r/../gcc/xgcc ] ; then \
+ if [ -f $$r/../newlib/Makefile ] ; then \
+ echo $$r/../gcc/xgcc -B$$r/../gcc/ -idirafter $$r/../newlib/targ-include -idirafter $${srcroot}/../newlib/libc/include -nostdinc; \
+ else \
+ echo $$r/../gcc/xgcc -B$$r/../gcc/; \
+ fi; \
+ else \
+ if [ "@host@" = "@target@" ] ; then \
+ echo $(CXX); \
+ else \
+ echo gcc | sed '$(transform)'; \
+ fi; \
+ fi`
+
+noinst_PROGRAMS = ld-new
+info_TEXINFOS = ld.texinfo
+noinst_TEXINFOS = ldint.texinfo
+man_MANS = ld.1
+
+INCLUDES = -D_GNU_SOURCE -I. -I$(srcdir) -I../bfd -I$(BFDDIR) -I$(INCDIR) $(HDEFINES) $(CFLAGS)
+
+BFDLIB = ../bfd/libbfd.la
+LIBIBERTY = ../libiberty/libiberty.a
+
+ALL_EMULATIONS = \
+ ea29k.o \
+ eaixppc.o \
+ eaixrs6.o \
+ ealpha.o \
+ earcelf.o \
+ earmaoutb.o \
+ earmaoutl.o \
+ earmcoff.o \
+ earmpe.o \
+ ecoff_sparc.o \
+ ed10velf.o \
+ edelta68.o \
+ eebmon29k.o \
+ eelf32_sparc.o \
+ eelf32b4300.o \
+ eelf32bmip.o \
+ eelf32ebmip.o \
+ eelf32elmip.o \
+ eelf32l4300.o \
+ eelf32lmip.o \
+ eelf32lppc.o \
+ eelf32ppc.o \
+ eelf_i386.o \
+ egld960.o \
+ egld960coff.o \
+ ego32.o \
+ eh8300.o \
+ eh8300h.o \
+ eh8300s.o \
+ eh8500.o \
+ eh8500b.o \
+ eh8500c.o \
+ eh8500m.o \
+ eh8500s.o \
+ ehp300bsd.o \
+ ehp3hpux.o \
+ ehppaelf.o \
+ ei386aout.o \
+ ei386bsd.o \
+ ei386coff.o \
+ ei386go32.o \
+ ei386linux.o \
+ ei386lynx.o \
+ ei386mach.o \
+ ei386moss.o \
+ ei386msdos.o \
+ ei386nbsd.o \
+ ei386nw.o \
+ ei386pe.o \
+ elnk960.o \
+ em68k4knbsd.o \
+ em68kaout.o \
+ em68kaux.o \
+ em68kcoff.o \
+ em68kelf.o \
+ em68klinux.o \
+ em68klynx.o \
+ em68knbsd.o \
+ em68kpsos.o \
+ em88kbcs.o \
+ emipsbig.o \
+ emipsbsd.o \
+ emipsidt.o \
+ emipsidtl.o \
+ emipslit.o \
+ emipslnews.o \
+ enews.o \
+ ens32knbsd.o \
+ epc532macha.o \
+ eppcmacos.o \
+ eppcnw.o \
+ eppcpe.o \
+ eriscix.o \
+ esa29200.o \
+ esh.o \
+ eshelf.o \
+ eshlelf.o \
+ eshl.o \
+ esparcaout.o \
+ esparclinux.o \
+ esparclynx.o \
+ esparcnbsd.o \
+ est2000.o \
+ esun3.o \
+ esun4.o \
+ etic30aout.o \
+ etic30coff.o \
+ evanilla.o \
+ evax.o \
+ evsta.o \
+ ew65.o \
+ ez8001.o \
+ ez8002.o
+
+ALL_64_EMULATIONS = \
+ eelf64_sparc.o \
+ eelf64alpha.o
+
+CFILES = ldctor.c ldemul.c ldexp.c ldfile.c ldlang.c \
+ ldmain.c ldmisc.c ldver.c ldwrite.c lexsup.c \
+ mri.c ldcref.c
+
+HFILES = config.h ld.h ldctor.h ldemul.h ldexp.h ldfile.h \
+ ldlang.h ldlex.h ldmain.h ldmisc.h ldver.h \
+ ldwrite.h mri.h
+
+GENERATED_CFILES = ldgram.c ldlex.c
+GENERATED_HFILES = ldgram.h ldemul-list.h
+
+OFILES = ldgram.o ldlex.o lexsup.o ldlang.o mri.o ldctor.o ldmain.o \
+ ldwrite.o ldexp.o ldemul.o ldver.o ldmisc.o \
+ ldfile.o ldcref.o ${EMULATION_OFILES}
+
+STAGESTUFF = *.o ldscripts/* e*.c
+
+ldmain.o: ldmain.c config.status
+ $(COMPILE) -c -DDEFAULT_EMULATION='"$(EMUL)"' -DSCRIPTDIR='"$(scriptdir)"' -DTARGET='"@target@"' $(srcdir)/ldmain.c
+
+ldemul-list.h: Makefile
+ (echo "/* This file is automatically generated. DO NOT EDIT! */";\
+ for f in `echo " " ${EMULATION_OFILES} "" \
+ | sed -e 's/ e/ ld/g' -e 's/ ld/ /g' -e 's/[.]o//g'`; do \
+ echo "extern ld_emulation_xfer_type ld_$${f}_emulation;"; \
+ done;\
+ echo "";\
+ echo "#define EMULATION_LIST \\";\
+ for f in `echo " " ${EMULATION_OFILES} "" \
+ | sed -e 's/ e/ ld/g' -e 's/ ld/ /g' -e 's/[.]o//g'`; do \
+ echo " &ld_$${f}_emulation, \\"; \
+ done;\
+ echo " 0") >ldemul-tmp.h
+ mv ldemul-tmp.h ldemul-list.h
+
+# These all start with e so 'make clean' can find them.
+
+GENSCRIPTS = $(SHELL) $(srcdir)/genscripts.sh ${srcdir} ${libdir} @host@ @target@ @target_alias@ ${EMUL} "@NATIVE_LIB_DIRS@"
+GEN_DEPENDS = $(srcdir)/genscripts.sh $(srcdir)/emultempl/stringify.sed
+@TDIRS@
+
+ea29k.c: $(srcdir)/emulparams/a29k.sh \
+ $(srcdir)/emultempl/generic.em $(srcdir)/scripttempl/a29k.sc ${GEN_DEPENDS}
+ ${GENSCRIPTS} a29k "$(tdir_a29k)"
+eaixppc.c: $(srcdir)/emulparams/aixppc.sh \
+ $(srcdir)/emultempl/aix.em $(srcdir)/scripttempl/aix.sc ${GEN_DEPENDS}
+ ${GENSCRIPTS} aixppc "$(tdir_aixppc)"
+eaixrs6.c: $(srcdir)/emulparams/aixrs6.sh \
+ $(srcdir)/emultempl/aix.em $(srcdir)/scripttempl/aix.sc ${GEN_DEPENDS}
+ ${GENSCRIPTS} aixrs6 "$(tdir_aixrs6)"
+ealpha.c: $(srcdir)/emulparams/alpha.sh \
+ $(srcdir)/emultempl/generic.em $(srcdir)/scripttempl/alpha.sc ${GEN_DEPENDS}
+ ${GENSCRIPTS} alpha "$(tdir_alpha)"
+earcelf.c: $(srcdir)/emulparams/arcelf.sh \
+ $(srcdir)/emultempl/generic.em $(srcdir)/scripttempl/elf.sc ${GEN_DEPENDS}
+ ${GENSCRIPTS} arcelf "$(tdir_arcelf)"
+earmaoutb.c: $(srcdir)/emulparams/armaoutb.sh \
+ $(srcdir)/emultempl/generic.em $(srcdir)/scripttempl/armaout.sc ${GEN_DEPENDS}
+ ${GENSCRIPTS} armaoutb "$(tdir_armaoutb)"
+earmaoutl.c: $(srcdir)/emulparams/armaoutl.sh \
+ $(srcdir)/emultempl/generic.em $(srcdir)/scripttempl/armaout.sc ${GEN_DEPENDS}
+ ${GENSCRIPTS} armaoutl "$(tdir_armaoutl)"
+earmcoff.c: $(srcdir)/emulparams/armcoff.sh \
+ $(srcdir)/emultempl/generic.em $(srcdir)/scripttempl/armcoff.sc ${GEN_DEPENDS}
+ ${GENSCRIPTS} armcoff "$(tdir_armcoff)"
+earmpe.c: $(srcdir)/emulparams/armpe.sh \
+ $(srcdir)/emultempl/pe.em $(srcdir)/scripttempl/pe.sc ${GEN_DEPENDS}
+ ${GENSCRIPTS} armpe "$(tdir_armpe)"
+ecoff_sparc.c: $(srcdir)/emulparams/coff_sparc.sh \
+ $(srcdir)/emultempl/generic.em $(srcdir)/scripttempl/sparccoff.sc ${GEN_DEPENDS}
+ ${GENSCRIPTS} coff_sparc "$(tdir_coff_sparc)"
+ed10velf.c: $(srcdir)/emulparams/d10velf.sh \
+ $(srcdir)/emultempl/generic.em $(srcdir)/scripttempl/elfd10v.sc ${GEN_DEPENDS}
+ ${GENSCRIPTS} d10velf "$(tdir_d10v)"
+edelta68.c: $(srcdir)/emulparams/delta68.sh \
+ $(srcdir)/emultempl/generic.em $(srcdir)/scripttempl/delta68.sc ${GEN_DEPENDS}
+ ${GENSCRIPTS} delta68 "$(tdir_delta68)"
+eebmon29k.c: $(srcdir)/emulparams/ebmon29k.sh \
+ $(srcdir)/emultempl/generic.em $(srcdir)/scripttempl/ebmon29k.sc ${GEN_DEPENDS}
+ ${GENSCRIPTS} ebmon29k "$(tdir_ebmon29k)"
+em32relf.c: $(srcdir)/emulparams/m32relf.sh \
+ $(srcdir)/emultempl/generic.em $(srcdir)/scripttempl/elf.sc ${GEN_DEPENDS}
+ ${GENSCRIPTS} m32relf "$(tdir_m32r)"
+eelf32_sparc.c: $(srcdir)/emulparams/elf32_sparc.sh \
+ $(srcdir)/emultempl/elf32.em $(srcdir)/scripttempl/elf.sc ${GEN_DEPENDS}
+ ${GENSCRIPTS} elf32_sparc "$(tdir_elf32_sparc)"
+eelf32b4300.c: $(srcdir)/emulparams/elf32b4300.sh \
+ $(srcdir)/emultempl/elf32.em $(srcdir)/scripttempl/elf.sc ${GEN_DEPENDS}
+ ${GENSCRIPTS} elf32b4300 "$(tdir_elf32b4300)"
+eelf32bmip.c: $(srcdir)/emulparams/elf32bmip.sh \
+ $(srcdir)/emultempl/elf32.em $(srcdir)/scripttempl/elf.sc ${GEN_DEPENDS}
+ ${GENSCRIPTS} elf32bmip "$(tdir_elf32bmip)"
+eelf32bsmip.c: $(srcdir)/emulparams/elf32bsmip.sh \
+ $(srcdir)/emultempl/elf32.em $(srcdir)/scripttempl/elf.sc ${GEN_DEPENDS}
+ ${GENSCRIPTS} elf32bsmip "$(tdir_elf32bsmip)"
+eelf32ebmip.c: $(srcdir)/emulparams/elf32ebmip.sh \
+ $(srcdir)/emultempl/elf32.em $(srcdir)/scripttempl/elf.sc ${GEN_DEPENDS}
+ ${GENSCRIPTS} elf32ebmip "$(tdir_elf32ebmip)"
+eelf32elmip.c: $(srcdir)/emulparams/elf32elmip.sh \
+ $(srcdir)/emultempl/elf32.em $(srcdir)/scripttempl/elf.sc ${GEN_DEPENDS}
+ ${GENSCRIPTS} elf32elmip "$(tdir_elf32elmip)"
+eelf32l4300.c: $(srcdir)/emulparams/elf32l4300.sh \
+ $(srcdir)/emultempl/elf32.em $(srcdir)/scripttempl/elf.sc ${GEN_DEPENDS}
+ ${GENSCRIPTS} elf32l4300 "$(tdir_elf32l4300)"
+eelf32lmip.c: $(srcdir)/emulparams/elf32lmip.sh \
+ $(srcdir)/emultempl/elf32.em $(srcdir)/scripttempl/elf.sc ${GEN_DEPENDS}
+ ${GENSCRIPTS} elf32lmip "$(tdir_elf32lmip)"
+eelf32lppc.c: $(srcdir)/emulparams/elf32lppc.sh \
+ $(srcdir)/emultempl/elf32.em $(srcdir)/scripttempl/elfppc.sc ${GEN_DEPENDS}
+ ${GENSCRIPTS} elf32lppc "$(tdir_elf32lppc)"
+eelf32lsmip.c: $(srcdir)/emulparams/elf32lsmip.sh \
+ $(srcdir)/emultempl/elf32.em $(srcdir)/scripttempl/elf.sc ${GEN_DEPENDS}
+ ${GENSCRIPTS} elf32lsmip "$(tdir_elf32lsmip)"
+eelf32ppc.c: $(srcdir)/emulparams/elf32ppc.sh \
+ $(srcdir)/emultempl/elf32.em $(srcdir)/scripttempl/elfppc.sc ${GEN_DEPENDS}
+ ${GENSCRIPTS} elf32ppc "$(tdir_elf32ppc)"
+eelf64alpha.c: $(srcdir)/emulparams/elf64alpha.sh \
+ $(srcdir)/emultempl/elf32.em $(srcdir)/scripttempl/elf.sc ${GEN_DEPENDS}
+ ${GENSCRIPTS} elf64alpha "$(tdir_elf64alpha)"
+eelf64_sparc.c: $(srcdir)/emulparams/elf64_sparc.sh \
+ $(srcdir)/emultempl/elf32.em $(srcdir)/scripttempl/elf.sc ${GEN_DEPENDS}
+ ${GENSCRIPTS} elf64_sparc "$(tdir_elf64_sparc)"
+eelf_i386.c: $(srcdir)/emulparams/elf_i386.sh \
+ $(srcdir)/emultempl/elf32.em $(srcdir)/scripttempl/elf.sc ${GEN_DEPENDS}
+ ${GENSCRIPTS} elf_i386 "$(tdir_elf_i386)"
+egld960.c: $(srcdir)/emulparams/gld960.sh \
+ $(srcdir)/emultempl/gld960.em $(srcdir)/scripttempl/i960.sc ${GEN_DEPENDS}
+ ${GENSCRIPTS} gld960 "$(tdir_gld960)"
+egld960coff.c: $(srcdir)/emulparams/gld960coff.sh \
+ $(srcdir)/emultempl/gld960c.em $(srcdir)/scripttempl/i960.sc ${GEN_DEPENDS}
+ ${GENSCRIPTS} gld960coff "$(tdir_gld960coff)"
+ego32.c: $(srcdir)/emulparams/go32.sh \
+ $(srcdir)/emultempl/generic.em $(srcdir)/scripttempl/aout.sc ${GEN_DEPENDS}
+ ${GENSCRIPTS} go32 "$(tdir_go32)"
+eh8300.c: $(srcdir)/emulparams/h8300.sh \
+ $(srcdir)/emultempl/generic.em $(srcdir)/scripttempl/h8300.sc ${GEN_DEPENDS}
+ ${GENSCRIPTS} h8300 "$(tdir_h8300)"
+eh8300h.c: $(srcdir)/emulparams/h8300h.sh \
+ $(srcdir)/emultempl/generic.em $(srcdir)/scripttempl/h8300h.sc ${GEN_DEPENDS}
+ ${GENSCRIPTS} h8300h "$(tdir_h8300h)"
+eh8300s.c: $(srcdir)/emulparams/h8300s.sh \
+ $(srcdir)/emultempl/generic.em $(srcdir)/scripttempl/h8300s.sc ${GEN_DEPENDS}
+ ${GENSCRIPTS} h8300s "$(tdir_h8300s)"
+eh8500.c: $(srcdir)/emulparams/h8500.sh \
+ $(srcdir)/emultempl/generic.em $(srcdir)/scripttempl/h8500.sc ${GEN_DEPENDS}
+ ${GENSCRIPTS} h8500 "$(tdir_h8500)"
+eh8500b.c: $(srcdir)/emulparams/h8500b.sh \
+ $(srcdir)/emultempl/generic.em $(srcdir)/scripttempl/h8500b.sc ${GEN_DEPENDS}
+ ${GENSCRIPTS} h8500b "$(tdir_h8500b)"
+eh8500c.c: $(srcdir)/emulparams/h8500c.sh \
+ $(srcdir)/emultempl/generic.em $(srcdir)/scripttempl/h8500c.sc ${GEN_DEPENDS}
+ ${GENSCRIPTS} h8500c "$(tdir_h8500c)"
+eh8500m.c: $(srcdir)/emulparams/h8500m.sh \
+ $(srcdir)/emultempl/generic.em $(srcdir)/scripttempl/h8500m.sc ${GEN_DEPENDS}
+ ${GENSCRIPTS} h8500m "$(tdir_h8500m)"
+eh8500s.c: $(srcdir)/emulparams/h8500s.sh \
+ $(srcdir)/emultempl/generic.em $(srcdir)/scripttempl/h8500s.sc ${GEN_DEPENDS}
+ ${GENSCRIPTS} h8500s "$(tdir_h8500s)"
+ehp300bsd.c: $(srcdir)/emulparams/hp300bsd.sh \
+ $(srcdir)/emultempl/generic.em $(srcdir)/scripttempl/aout.sc ${GEN_DEPENDS}
+ ${GENSCRIPTS} hp300bsd "$(tdir_hp300bsd)"
+ehp3hpux.c: $(srcdir)/emulparams/hp3hpux.sh \
+ $(srcdir)/emultempl/generic.em $(srcdir)/scripttempl/aout.sc ${GEN_DEPENDS}
+ ${GENSCRIPTS} hp3hpux "$(tdir_hp3hpux)"
+ehppaelf.c: $(srcdir)/emulparams/hppaelf.sh \
+ $(srcdir)/emultempl/hppaelf.em $(srcdir)/scripttempl/hppaelf.sc ${GEN_DEPENDS}
+ ${GENSCRIPTS} hppaelf "$(tdir_hppaelf)"
+ei386aout.c: $(srcdir)/emulparams/i386aout.sh \
+ $(srcdir)/emultempl/generic.em $(srcdir)/scripttempl/aout.sc ${GEN_DEPENDS}
+ ${GENSCRIPTS} i386aout "$(tdir_i386aout)"
+ei386bsd.c: $(srcdir)/emulparams/i386bsd.sh \
+ $(srcdir)/emultempl/generic.em $(srcdir)/scripttempl/aout.sc ${GEN_DEPENDS}
+ ${GENSCRIPTS} i386bsd "$(tdir_i386bsd)"
+ei386coff.c: $(srcdir)/emulparams/i386coff.sh \
+ $(srcdir)/emultempl/generic.em $(srcdir)/scripttempl/i386coff.sc ${GEN_DEPENDS}
+ ${GENSCRIPTS} i386coff "$(tdir_i386coff)"
+ei386go32.c: $(srcdir)/emulparams/i386go32.sh \
+ $(srcdir)/emultempl/generic.em $(srcdir)/scripttempl/i386go32.sc ${GEN_DEPENDS}
+ ${GENSCRIPTS} i386go32 "$(tdir_i386go32)"
+ei386linux.c: $(srcdir)/emulparams/i386linux.sh \
+ $(srcdir)/emultempl/linux.em $(srcdir)/scripttempl/aout.sc ${GEN_DEPENDS}
+ ${GENSCRIPTS} i386linux "$(tdir_i386linux)"
+ei386lynx.c: $(srcdir)/emulparams/i386lynx.sh \
+ $(srcdir)/emultempl/generic.em $(srcdir)/scripttempl/i386lynx.sc ${GEN_DEPENDS}
+ ${GENSCRIPTS} i386lynx "$(tdir_i386lynx)"
+ei386mach.c: $(srcdir)/emulparams/i386mach.sh \
+ $(srcdir)/emultempl/generic.em $(srcdir)/scripttempl/aout.sc ${GEN_DEPENDS}
+ ${GENSCRIPTS} i386mach "$(tdir_i386mach)"
+ei386moss.c: $(srcdir)/emulparams/i386moss.sh \
+ $(srcdir)/emultempl/generic.em $(srcdir)/scripttempl/elf.sc ${GEN_DEPENDS}
+ ${GENSCRIPTS} i386moss "$(tdir_i386moss)"
+ei386msdos.c: $(srcdir)/emulparams/i386msdos.sh \
+ $(srcdir)/emultempl/generic.em $(srcdir)/scripttempl/i386msdos.sc ${GEN_DEPENDS}
+ ${GENSCRIPTS} i386msdos "$(tdir_i386msdos)"
+ei386nbsd.c: $(srcdir)/emulparams/i386nbsd.sh \
+ $(srcdir)/emultempl/generic.em $(srcdir)/scripttempl/aout.sc ${GEN_DEPENDS}
+ ${GENSCRIPTS} i386nbsd "$(tdir_i386nbsd)"
+ei386nw.c: $(srcdir)/emulparams/i386nw.sh \
+ $(srcdir)/emultempl/elf32.em $(srcdir)/scripttempl/nw.sc ${GEN_DEPENDS}
+ ${GENSCRIPTS} i386nw "$(tdir_i386nw)"
+ei386pe.c: $(srcdir)/emulparams/i386pe.sh \
+ $(srcdir)/emultempl/pe.em $(srcdir)/scripttempl/pe.sc ${GEN_DEPENDS}
+ ${GENSCRIPTS} i386pe "$(tdir_i386pe)"
+elnk960.c: $(srcdir)/emulparams/lnk960.sh \
+ $(srcdir)/emultempl/lnk960.em $(srcdir)/scripttempl/i960.sc ${GEN_DEPENDS}
+ ${GENSCRIPTS} lnk960 "$(tdir_lnk960)"
+em68k4knbsd.c: $(srcdir)/emulparams/m68k4knbsd.sh \
+ $(srcdir)/emultempl/generic.em $(srcdir)/scripttempl/aout.sc ${GEN_DEPENDS}
+ ${GENSCRIPTS} m68k4knbsd "$(tdir_m68k4knbsd)"
+em68kaout.c: $(srcdir)/emulparams/m68kaout.sh \
+ $(srcdir)/emultempl/generic.em $(srcdir)/scripttempl/aout.sc ${GEN_DEPENDS}
+ ${GENSCRIPTS} m68kaout "$(tdir_m68kaout)"
+em68kaux.c: $(srcdir)/emulparams/m68kaux.sh \
+ $(srcdir)/emultempl/generic.em $(srcdir)/scripttempl/m68kaux.sc ${GEN_DEPENDS}
+ ${GENSCRIPTS} m68kaux "$(tdir_m68kaux)"
+em68kcoff.c: $(srcdir)/emulparams/m68kcoff.sh \
+ $(srcdir)/emultempl/generic.em $(srcdir)/scripttempl/m68kcoff.sc ${GEN_DEPENDS}
+ ${GENSCRIPTS} m68kcoff "$(tdir_m68kcoff)"
+em68kelf.c: $(srcdir)/emulparams/m68kelf.sh \
+ $(srcdir)/emultempl/elf32.em $(srcdir)/scripttempl/elf.sc ${GEN_DEPENDS}
+ ${GENSCRIPTS} m68kelf "$(tdir_m68kelf)"
+em68klinux.c: $(srcdir)/emulparams/m68klinux.sh \
+ $(srcdir)/emultempl/linux.em $(srcdir)/scripttempl/aout.sc ${GEN_DEPENDS}
+ ${GENSCRIPTS} m68klinux "$(tdir_m68klinux)"
+em68klynx.c: $(srcdir)/emulparams/m68klynx.sh \
+ $(srcdir)/emultempl/generic.em $(srcdir)/scripttempl/m68klynx.sc ${GEN_DEPENDS}
+ ${GENSCRIPTS} m68klynx "$(tdir_m68klynx)"
+em68knbsd.c: $(srcdir)/emulparams/m68knbsd.sh \
+ $(srcdir)/emultempl/generic.em $(srcdir)/scripttempl/aout.sc ${GEN_DEPENDS}
+ ${GENSCRIPTS} m68knbsd "$(tdir_m68knbsd)"
+em68kpsos.c: $(srcdir)/emulparams/m68kpsos.sh \
+ $(srcdir)/emultempl/elf32.em $(srcdir)/scripttempl/psos.sc ${GEN_DEPENDS}
+ ${GENSCRIPTS} m68kpsos "$(tdir_m68kpsos)"
+em88kbcs.c: $(srcdir)/emulparams/m88kbcs.sh \
+ $(srcdir)/emultempl/generic.em $(srcdir)/scripttempl/m88kbcs.sc ${GEN_DEPENDS}
+ ${GENSCRIPTS} m88kbcs "$(tdir_m88kbcs)"
+emipsbig.c: $(srcdir)/emulparams/mipsbig.sh \
+ $(srcdir)/emultempl/generic.em $(srcdir)/scripttempl/mips.sc ${GEN_DEPENDS}
+ ${GENSCRIPTS} mipsbig
+emipsbsd.c: $(srcdir)/emulparams/mipsbsd.sh \
+ $(srcdir)/emultempl/generic.em $(srcdir)/scripttempl/mipsbsd.sc ${GEN_DEPENDS}
+ ${GENSCRIPTS} mipsbsd
+emipsidt.c: $(srcdir)/emulparams/mipsidt.sh \
+ $(srcdir)/emultempl/mipsecoff.em $(srcdir)/scripttempl/mips.sc ${GEN_DEPENDS}
+ ${GENSCRIPTS} mipsidt "$(tdir_mipsidt)"
+emipsidtl.c: $(srcdir)/emulparams/mipsidtl.sh \
+ $(srcdir)/emultempl/mipsecoff.em $(srcdir)/scripttempl/mips.sc ${GEN_DEPENDS}
+ ${GENSCRIPTS} mipsidtl "$(tdir_mipsidtl)"
+emipslit.c: $(srcdir)/emulparams/mipslit.sh \
+ $(srcdir)/emultempl/generic.em $(srcdir)/scripttempl/mips.sc ${GEN_DEPENDS}
+ ${GENSCRIPTS} mipslit "$(tdir_mipslit)"
+emipslnews.c: $(srcdir)/emulparams/mipslnews.sh \
+ $(srcdir)/emultempl/generic.em $(srcdir)/scripttempl/mips.sc ${GEN_DEPENDS}
+ ${GENSCRIPTS} mipslnews
+emn10300.c: $(srcdir)/emulparams/mn10300.sh \
+ $(srcdir)/emultempl/elf32.em $(srcdir)/scripttempl/elf.sc ${GEN_DEPENDS}
+ ${GENSCRIPTS} mn10300 "$(tdir_mn10300)"
+emn10200.c: $(srcdir)/emulparams/mn10200.sh \
+ $(srcdir)/emultempl/elf32.em $(srcdir)/scripttempl/elf.sc ${GEN_DEPENDS}
+ ${GENSCRIPTS} mn10200 "$(tdir_mn10200)"
+enews.c: $(srcdir)/emulparams/news.sh \
+ $(srcdir)/emultempl/generic.em $(srcdir)/scripttempl/aout.sc ${GEN_DEPENDS}
+ ${GENSCRIPTS} news "$(tdir_news)"
+ens32knbsd.c: $(srcdir)/emulparams/ns32knbsd.sh \
+ $(srcdir)/emultempl/generic.em $(srcdir)/scripttempl/aout.sc ${GEN_DEPENDS}
+ ${GENSCRIPTS} ns32knbsd "$(tdir_ns32knbsd)"
+epc532macha.c: $(srcdir)/emulparams/pc532macha.sh \
+ $(srcdir)/emultempl/generic.em $(srcdir)/scripttempl/aout.sc ${GEN_DEPENDS}
+ ${GENSCRIPTS} pc532macha "$(tdir_pc532macha)"
+eppcmacos.c: $(srcdir)/emulparams/ppcmacos.sh \
+ $(srcdir)/emultempl/aix.em $(srcdir)/scripttempl/aix.sc ${GEN_DEPENDS}
+ ${GENSCRIPTS} ppcmacos "$(tdir_ppcmacos)"
+eppcnw.c: $(srcdir)/emulparams/ppcnw.sh \
+ $(srcdir)/emultempl/elf32.em $(srcdir)/scripttempl/nw.sc ${GEN_DEPENDS}
+ ${GENSCRIPTS} ppcnw "$(tdir_ppcnw)"
+eppcpe.c: $(srcdir)/emulparams/ppcpe.sh \
+ $(srcdir)/emultempl/pe.em $(srcdir)/scripttempl/ppcpe.sc ${GEN_DEPENDS}
+ ${GENSCRIPTS} ppcpe "$(tdir_ppcpe)"
+eriscix.c: $(srcdir)/emulparams/riscix.sh \
+ $(srcdir)/emultempl/generic.em $(srcdir)/scripttempl/aout.sc ${GEN_DEPENDS}
+ ${GENSCRIPTS} riscix "$(tdir_riscix)"
+esa29200.c: $(srcdir)/emulparams/sa29200.sh \
+ $(srcdir)/emultempl/generic.em $(srcdir)/scripttempl/sa29200.sc ${GEN_DEPENDS}
+ ${GENSCRIPTS} sa29200 "$(tdir_sa29200)"
+esh.c: $(srcdir)/emulparams/sh.sh \
+ $(srcdir)/emultempl/generic.em $(srcdir)/scripttempl/sh.sc ${GEN_DEPENDS}
+ ${GENSCRIPTS} sh "$(tdir_sh)"
+eshelf.c: $(srcdir)/emulparams/shelf.sh \
+ $(srcdir)/emultempl/elf32.em $(srcdir)/scripttempl/elf.sc ${GEN_DEPENDS}
+ ${GENSCRIPTS} shelf "$(tdir_shelf)"
+eshlelf.c: $(srcdir)/emulparams/shlelf.sh \
+ $(srcdir)/emultempl/elf32.em $(srcdir)/scripttempl/elf.sc ${GEN_DEPENDS}
+ ${GENSCRIPTS} shlelf "$(tdir_shlelf)"
+eshl.c: $(srcdir)/emulparams/shl.sh \
+ $(srcdir)/emultempl/generic.em $(srcdir)/scripttempl/sh.sc ${GEN_DEPENDS}
+ ${GENSCRIPTS} shl "$(tdir_shl)"
+esparcaout.c: $(srcdir)/emulparams/sparcaout.sh \
+ $(srcdir)/emultempl/generic.em $(srcdir)/scripttempl/aout.sc ${GEN_DEPENDS}
+ ${GENSCRIPTS} sparcaout "$(tdir_sparcaout)"
+esparclinux.c: $(srcdir)/emulparams/sparclinux.sh \
+ $(srcdir)/emultempl/linux.em $(srcdir)/scripttempl/aout.sc ${GEN_DEPENDS}
+ ${GENSCRIPTS} sparclinux "$(tdir_sparclinux)"
+esparclynx.c: $(srcdir)/emulparams/sparclynx.sh \
+ $(srcdir)/emultempl/generic.em $(srcdir)/scripttempl/sparclynx.sc ${GEN_DEPENDS}
+ ${GENSCRIPTS} sparclynx "$(tdir_sparclynx)"
+esparcnbsd.c: $(srcdir)/emulparams/sparcnbsd.sh \
+ $(srcdir)/emultempl/generic.em $(srcdir)/scripttempl/aout.sc ${GEN_DEPENDS}
+ ${GENSCRIPTS} sparcnbsd "$(tdir_sparcnbsd)"
+est2000.c: $(srcdir)/emulparams/st2000.sh \
+ $(srcdir)/emultempl/generic.em $(srcdir)/scripttempl/st2000.sc ${GEN_DEPENDS}
+ ${GENSCRIPTS} st2000 "$(tdir_st2000)"
+esun3.c: $(srcdir)/emulparams/sun3.sh \
+ $(srcdir)/emultempl/sunos.em $(srcdir)/scripttempl/aout.sc ${GEN_DEPENDS}
+ ${GENSCRIPTS} sun3 "$(tdir_sun3)"
+esun4.c: $(srcdir)/emulparams/sun4.sh \
+ $(srcdir)/emultempl/sunos.em $(srcdir)/scripttempl/aout.sc ${GEN_DEPENDS}
+ ${GENSCRIPTS} sun4 "$(tdir_sun4)"
+etic30aout.c: $(srcdir)/emulparams/tic30aout.sh \
+ $(srcdir)/emultempl/generic.em $(srcdir)/scripttempl/tic30aout.sc ${GEN_DEPENDS}
+ ${GENSCRIPTS} tic30aout "$(tdir_tic30aout)"
+etic30coff.c: $(srcdir)/emulparams/tic30coff.sh \
+ $(srcdir)/emultempl/generic.em $(srcdir)/scripttempl/tic30coff.sc ${GEN_DEPENDS}
+ ${GENSCRIPTS} tic30coff "$(tdir_tic30coff)"
+evanilla.c: $(srcdir)/emulparams/vanilla.sh \
+ $(srcdir)/emultempl/vanilla.em $(srcdir)/scripttempl/vanilla.sc ${GEN_DEPENDS}
+ ${GENSCRIPTS} vanilla "$(tdir_vanilla)"
+evax.c: $(srcdir)/emulparams/vax.sh \
+ $(srcdir)/emultempl/generic.em $(srcdir)/scripttempl/aout.sc ${GEN_DEPENDS}
+ ${GENSCRIPTS} vax "$(tdir_vax)"
+evsta.c: $(srcdir)/emulparams/vsta.sh \
+ $(srcdir)/emultempl/generic.em $(srcdir)/scripttempl/aout.sc ${GEN_DEPENDS}
+ ${GENSCRIPTS} vsta "$(tdir_vsta)"
+ev850.c: $(srcdir)/emulparams/v850.sh \
+ $(srcdir)/emultempl/elf32.em $(srcdir)/scripttempl/v850.sc ${GEN_DEPENDS}
+ ${GENSCRIPTS} v850 "$(tdir_v850)"
+ew65.c: $(srcdir)/emulparams/w65.sh \
+ $(srcdir)/emultempl/generic.em $(srcdir)/scripttempl/w65.sc ${GEN_DEPENDS}
+ ${GENSCRIPTS} w65 "$(tdir_w65)"
+ez8001.c: $(srcdir)/emulparams/z8001.sh \
+ $(srcdir)/emultempl/generic.em $(srcdir)/scripttempl/z8000.sc ${GEN_DEPENDS}
+ ${GENSCRIPTS} z8001 "$(tdir_z8001)"
+ez8002.c: $(srcdir)/emulparams/z8002.sh \
+ $(srcdir)/emultempl/generic.em $(srcdir)/scripttempl/z8000.sc ${GEN_DEPENDS}
+ ${GENSCRIPTS} z8002 "$(tdir_z8002)"
+
+ld_new_SOURCES = ldgram.y ldlex.l lexsup.c ldlang.c mri.c ldctor.c ldmain.c \
+ ldwrite.c ldexp.c ldemul.c ldver.c ldmisc.c ldfile.c ldcref.c
+ld_new_DEPENDENCIES = $(EMULATION_OFILES) $(BFDLIB) $(LIBIBERTY)
+ld_new_LDADD = $(EMULATION_OFILES) $(BFDLIB) $(LIBIBERTY)
+
+# The generated emulation files mostly have the same dependencies.
+$(EMULATION_OFILES): ../bfd/bfd.h sysdep.h config.h $(INCDIR)/bfdlink.h \
+ ld.h ldmain.h ldemul.h ldfile.h ldmisc.h ldexp.h ldlang.h \
+ ldctor.h ldexp.h ldlang.h ldgram.h
+
+# This is the real libbfd.a created by libtool.
+TESTBFDLIB = @TESTBFDLIB@
+
+check-DEJAGNU: site.exp
+ srcroot=`cd $(srcdir) && pwd`; export srcroot; \
+ r=`pwd`; export r; \
+ EXPECT=$(EXPECT); export EXPECT; \
+ if [ -f $(top_builddir)/../expect/expect ]; then \
+ TCL_LIBRARY=`cd $(top_srcdir)/../tcl/library && pwd`; \
+ export TCL_LIBRARY; \
+ fi; \
+ runtest=$(RUNTEST); \
+ if $(SHELL) -c "$$runtest --version" > /dev/null 2>&1; then \
+ $$runtest --tool $(DEJATOOL) --srcdir $${srcroot}/testsuite \
+ CC="$(CC_FOR_TARGET)" CFLAGS="$(CFLAGS)" \
+ CXX="$(CXX_FOR_TARGET)" CXXFLAGS="$(CXXFLAGS)" \
+ CC_FOR_HOST="$(CC)" CFLAGS_FOR_HOST="$(CFLAGS)" \
+ OFILES="$(OFILES)" BFDLIB="$(TESTBFDLIB)" \
+ LIBIBERTY="$(LIBIBERTY)" HOSTING_EMU="$(HOSTING_EMU)" \
+ HOSTING_CRT0="$(HOSTING_CRT0)" HOSTING_LIBS="$(HOSTING_LIBS)" \
+ $(RUNTESTFLAGS); \
+ else echo "WARNING: could not find \`runtest'" 1>&2; :;\
+ fi
+
+# Rules for testing by relinking ld itself.
+# A similar test is in the testsuite. This target is for ease of use
+# when porting ld.
+
+ld-partial.o: ld-new$(EXEEXT)
+ ./ld-new$(EXEEXT) $(HOSTING_EMU) -o ld-partial.o -r $(OFILES)
+ld1$(EXEEXT): ld-partial.o
+ ./ld-new$(EXEEXT) $(HOSTING_EMU) -o ld1$(EXEEXT) $(HOSTING_CRT0) ld-partial.o $(TESTBFDLIB) $(LIBIBERTY) $(HOSTING_LIBS)
+
+ld1-full$(EXEEXT): ld-new
+ ./ld-new$(EXEEXT) $(HOSTING_EMU) -o ld1-full$(EXEEXT) $(HOSTING_CRT0) $(OFILES) $(TESTBFDLIB) $(LIBIBERTY) $(HOSTING_LIBS)
+
+ld2$(EXEEXT): ld1$(EXEEXT)
+ ./ld1$(EXEEXT) $(HOSTING_EMU) -o ld2$(EXEEXT) $(HOSTING_CRT0) $(OFILES) $(TESTBFDLIB) $(LIBIBERTY) $(HOSTING_LIBS)
+
+ld3$(EXEEXT): ld2$(EXEEXT)
+ ./ld2$(EXEEXT) $(HOSTING_EMU) -o ld3$(EXEEXT) $(HOSTING_CRT0) $(OFILES) $(TESTBFDLIB) $(LIBIBERTY) $(HOSTING_LIBS)
+
+bootstrap: ld3$(EXEEXT)
+ cmp ld2$(EXEEXT) ld3$(EXEEXT)
+
+.PHONY: bootstrap
+
+# A test program for C++ constructors and destructors.
+# This test is now in the testsuite.
+#
+#cdtest: cdtest-main.o cdtest-bar.o cdtest-foo.o ld.new
+# ./ld.new $(HOSTING_EMU) -o cdtest $(HOSTING_CRT0) \
+# cdtest-main.o cdtest-bar.o cdtest-foo.o $(HOSTING_LIBS)
+#
+#cdtest.out: cdtest
+# ./cdtest > cdtest.tmp
+# mv cdtest.tmp cdtest.out
+#
+#cdtest-ur.o: cdtest-main.o cdtest-bar.o cdtest-foo.o ld.new
+# ./ld.new $(HOSTING_EMU) -o cdtest-ur.o -Ur cdtest-main.o \
+# cdtest-bar.o cdtest-foo.o
+#
+#cdtest-ur: cdtest-ur.o
+# ./ld.new $(HOSTING_EMU) -o cdtest-ur $(HOSTING_CRT0) cdtest-ur.o \
+# $(HOSTING_LIBS)
+#
+#cdtest-ur.out: cdtest-ur
+# ./cdtest-ur > cdtest-ur.tmp
+# mv cdtest-ur.tmp cdtest-ur.out
+#
+#check-cdtest: cdtest.out cdtest-ur.out $(srcdir)/cdtest.exp
+# diff $(srcdir)/cdtest.exp cdtest.out
+# diff $(srcdir)/cdtest.exp cdtest-ur.out
+#
+#.PHONY: check-cdtest
+
+# END OF CHECK TARGETS
+
+# DOCUMENTATION TARGETS
+# Manual configuration file; not usually attached to normal configuration,
+# because almost all configs use "gen" version of manual.
+# Set DOCVER above to change.
+configdoc.texi: ${DOCVER}-doc.texi
+ ln -s ${srcdir}/${DOCVER}-doc.texi ./configdoc.texi >/dev/null 2>&1 \
+ || ln ${srcdir}/${DOCVER}-doc.texi ./configdoc.texi >/dev/null 2>&1 \
+ || cp ${srcdir}/${DOCVER}-doc.texi ./configdoc.texi
+
+ld.info: $(srcdir)/ld.texinfo configdoc.texi
+ @rm -f $@ $@-[0-9] $@-[0-9][0-9]
+ $(MAKEINFO) -I $(srcdir) -I $(BFDDIR)/doc $(srcdir)/ld.texinfo
+
+ld.dvi: $(srcdir)/ld.texinfo configdoc.texi
+ TEXINPUTS=$(top_srcdir)/../texinfo:$$TEXINPUTS \
+ MAKEINFO='$(MAKEINFO) -I $(srcdir) -I $(BFDDIR)/doc' $(TEXI2DVI) $(srcdir)/ld.texinfo
+
+# We want to reconfigure if configure.host or configure.tgt changes.
+Makefile: configure.host configure.tgt
+
+MOSTLYCLEANFILES = $(STAGESTUFF) ld1$(EXEEXT) ld2$(EXEEXT) ld3$(EXEEXT) \
+ ldemul-list.h crtbegin.o crtend.o ld.log ld.sum
+mostlyclean-local:
+ -rm -rf tmpdir
+CLEANFILES = dep.sed .dep .dep1
+
+.PHONY: install-exec-local install-data-local
+
+install-exec-local: ld-new$(EXEEXT)
+ $(mkinstalldirs) $(bindir) $(tooldir)/bin
+ @list='$(noinst_PROGRAMS)'; for p in $$list; do \
+ if test -f $$p; then \
+ echo " $(LIBTOOL) --mode=install $(INSTALL_PROGRAM) $$p $(bindir)/`echo $$p|sed -e 's/-new//'|sed '$(transform)'`"; \
+ $(LIBTOOL) --mode=install $(INSTALL_PROGRAM) $$p $(bindir)/`echo $$p|sed -e 's/-new//'|sed '$(transform)'`; \
+ else :; fi; \
+ done
+ rm -f $(tooldir)/bin/ld$(EXEEXT)
+ n=`echo ld | sed '$(transform)'`; \
+ if [ "$(bindir)/$$n$(EXEEXT)" != "$(tooldir)/bin/ld$(EXEEXT)" ]; then \
+ ln $(bindir)/$$n$(EXEEXT) $(tooldir)/bin/ld$(EXEEXT) >/dev/null 2>/dev/null \
+ || $(LIBTOOL) --mode=install $(INSTALL_PROGRAM) ld-new$(EXEEXT) $(tooldir)/bin/ld$(EXEEXT); \
+ fi
+
+install-data-local:
+ $(mkinstalldirs) $(scriptdir)
+ for f in ldscripts/*; do \
+ $(INSTALL_DATA) $$f $(scriptdir)/$$f ; \
+ done
+
+# Stuff that should be included in a distribution. The diststuff
+# target is run by the taz target in ../Makefile.in.
+LDDISTSTUFF = ldgram.c ldgram.h ldlex.c
+diststuff: $(LDDISTSTUFF) info
+
+DISTCLEANFILES = site.exp site.bak
+
+distclean-local:
+ rm -rf ldscripts
+
+# Targets to rebuild dependencies in this Makefile.
+# Have to get rid of .dep1 here so that "$?" later includes all of $(CFILES).
+.dep: dep.sed $(CFILES) $(HFILES) $(GENERATED_CFILES) $(GENERATED_HFILES) config.h
+ rm -f .dep1
+ $(MAKE) DEP=$(DEP) .dep1
+ sed -f dep.sed <.dep1 >.dep
+
+# This rule really wants a mkdep that runs "gcc -MM".
+.dep1: $(CFILES) $(GENERATED_CFILES)
+ rm -f .dep2
+ echo '# DO NOT DELETE THIS LINE -- mkdep uses it.' > .dep2
+ $(DEP) -f .dep2 $(INCLUDES) $?
+ $(srcdir)/../move-if-change .dep2 .dep1
+
+dep.sed: dep-in.sed config.status
+ sed <$(srcdir)/dep-in.sed >dep.sed \
+ -e 's!@INCDIR@!$(INCDIR)!' \
+ -e 's!@SRCDIR@!$(srcdir)!'
+
+dep: .dep
+ sed -e '/^..DO NOT DELETE THIS LINE/,$$d' < Makefile > tmp-Makefile
+ cat .dep >> tmp-Makefile
+ $(srcdir)/../move-if-change tmp-Makefile Makefile
+
+dep-in: .dep
+ sed -e '/^..DO NOT DELETE THIS LINE/,$$d' < $(srcdir)/Makefile.in > tmp-Makefile.in
+ cat .dep >> tmp-Makefile.in
+ $(srcdir)/../move-if-change tmp-Makefile.in $(srcdir)/Makefile.in
+
+dep-am: .dep
+ sed -e '/^..DO NOT DELETE THIS LINE/,$$d' < $(srcdir)/Makefile.am > tmp-Makefile.am
+ cat .dep >> tmp-Makefile.am
+ $(srcdir)/../move-if-change tmp-Makefile.am $(srcdir)/Makefile.am
+
+.PHONY: dep dep-in dep-am
+
+# What appears below is generated by a hacked mkdep using gcc -MM.
+
+# DO NOT DELETE THIS LINE -- mkdep uses it.
+# DO NOT PUT ANYTHING AFTER THIS LINE, IT WILL GO AWAY.
+
+ldctor.o: ldctor.c ../bfd/bfd.h $(INCDIR)/ansidecl.h \
+ sysdep.h config.h $(INCDIR)/fopen-same.h $(INCDIR)/bfdlink.h \
+ ld.h ldexp.h ldlang.h ldmisc.h ldgram.h ldmain.h ldctor.h
+ldemul.o: ldemul.c ../bfd/bfd.h $(INCDIR)/ansidecl.h \
+ sysdep.h config.h $(INCDIR)/fopen-same.h ld.h ldemul.h \
+ ldmisc.h ldexp.h ldlang.h ldfile.h ldmain.h ldemul-list.h
+ldexp.o: ldexp.c ../bfd/bfd.h $(INCDIR)/ansidecl.h \
+ sysdep.h config.h $(INCDIR)/fopen-same.h $(INCDIR)/bfdlink.h \
+ ld.h ldmain.h ldmisc.h ldexp.h ldgram.h ldlang.h
+ldfile.o: ldfile.c ../bfd/bfd.h $(INCDIR)/ansidecl.h \
+ sysdep.h config.h $(INCDIR)/fopen-same.h $(INCDIR)/bfdlink.h \
+ ld.h ldmisc.h ldexp.h ldlang.h ldfile.h ldmain.h ldgram.h \
+ ldlex.h ldemul.h
+ldlang.o: ldlang.c ../bfd/bfd.h $(INCDIR)/ansidecl.h \
+ sysdep.h config.h $(INCDIR)/fopen-same.h $(INCDIR)/libiberty.h \
+ $(INCDIR)/obstack.h $(INCDIR)/bfdlink.h ld.h ldmain.h \
+ ldgram.h ldexp.h ldlang.h ldemul.h ldlex.h ldmisc.h \
+ ldctor.h ldfile.h $(INCDIR)/fnmatch.h
+ldmain.o: ldmain.c ../bfd/bfd.h $(INCDIR)/ansidecl.h \
+ sysdep.h config.h $(INCDIR)/fopen-same.h $(INCDIR)/libiberty.h \
+ $(INCDIR)/progress.h $(INCDIR)/bfdlink.h ld.h ldmain.h \
+ ldmisc.h ldwrite.h ldgram.h ldexp.h ldlang.h ldemul.h \
+ ldlex.h ldfile.h ldctor.h
+ldmisc.o: ldmisc.c ../bfd/bfd.h $(INCDIR)/ansidecl.h \
+ sysdep.h config.h $(INCDIR)/fopen-same.h $(INCDIR)/libiberty.h \
+ $(INCDIR)/demangle.h ld.h ldmisc.h ldexp.h ldlang.h \
+ ldgram.h ldlex.h ldmain.h ldfile.h
+ldver.o: ldver.c ../bfd/bfd.h $(INCDIR)/ansidecl.h \
+ sysdep.h config.h $(INCDIR)/fopen-same.h ld.h ldver.h \
+ ldemul.h ldmain.h
+ldwrite.o: ldwrite.c ../bfd/bfd.h $(INCDIR)/ansidecl.h \
+ sysdep.h config.h $(INCDIR)/fopen-same.h $(INCDIR)/bfdlink.h \
+ $(INCDIR)/libiberty.h ld.h ldexp.h ldlang.h ldwrite.h \
+ ldmisc.h ldgram.h ldmain.h
+lexsup.o: lexsup.c ../bfd/bfd.h $(INCDIR)/ansidecl.h \
+ sysdep.h config.h $(INCDIR)/fopen-same.h $(INCDIR)/libiberty.h \
+ $(INCDIR)/getopt.h $(INCDIR)/bfdlink.h ld.h ldmain.h \
+ ldmisc.h ldexp.h ldlang.h ldgram.h ldlex.h ldfile.h \
+ ldver.h ldemul.h
+mri.o: mri.c ../bfd/bfd.h $(INCDIR)/ansidecl.h sysdep.h \
+ config.h $(INCDIR)/fopen-same.h ld.h ldexp.h ldlang.h \
+ ldmisc.h mri.h ldgram.h $(INCDIR)/libiberty.h
+ldcref.o: ldcref.c ../bfd/bfd.h $(INCDIR)/ansidecl.h \
+ sysdep.h config.h $(INCDIR)/fopen-same.h $(INCDIR)/bfdlink.h \
+ $(INCDIR)/libiberty.h ld.h ldmain.h ldmisc.h ldexp.h \
+ ldlang.h
+ldgram.o: ldgram.c ../bfd/bfd.h $(INCDIR)/ansidecl.h \
+ sysdep.h config.h $(INCDIR)/fopen-same.h $(INCDIR)/bfdlink.h \
+ ld.h ldexp.h ldver.h ldlang.h ldemul.h ldfile.h ldmisc.h \
+ ldmain.h mri.h ldlex.h
+ldlex.o: ldlex.c ../bfd/bfd.h sysdep.h config.h $(INCDIR)/fopen-same.h \
+ ld.h ldgram.h ldmisc.h ldexp.h ldlang.h ldfile.h ldlex.h \
+ ldmain.h
+
+# IF YOU PUT ANYTHING HERE IT WILL GO AWAY
diff --git a/contrib/binutils/ld/Makefile.in b/contrib/binutils/ld/Makefile.in
index d327206..c37aab3 100644
--- a/contrib/binutils/ld/Makefile.in
+++ b/contrib/binutils/ld/Makefile.in
@@ -1,76 +1,93 @@
-# Makefile for the GNU linker ld (version 2)
-# Copyright (C) 1989, 90, 91, 92, 93, 94, 95, 96, 1997
-# Free Software Foundation, Inc.
+# Makefile.in generated automatically by automake 1.2e from Makefile.am
-# This file is part of GNU ld.
+# Copyright (C) 1994, 1995, 1996, 1997, 1998 Free Software Foundation, Inc.
+# This Makefile.in is free software; the Free Software Foundation
+# gives unlimited permission to copy and/or distribute it,
+# with or without modifications, as long as this notice is preserved.
-# This program is free software; you can redistribute it and/or modify
-# it under the terms of the GNU General Public License as published by
-# the Free Software Foundation; either version 2 of the License, or
-# (at your option) any later version.
-#
# This program is distributed in the hope that it will be useful,
-# but WITHOUT ANY WARRANTY; without even the implied warranty of
-# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
-# GNU General Public License for more details.
-#
-# You should have received a copy of the GNU General Public License
-# along with this program; if not, write to the Free Software
-# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
+# but WITHOUT ANY WARRANTY, to the extent permitted by law; without
+# even the implied warranty of MERCHANTABILITY or FITNESS FOR A
+# PARTICULAR PURPOSE.
-VPATH = @srcdir@
-srcdir = @srcdir@
-objdir = .
+SHELL = @SHELL@
-target_alias = @target_alias@
+srcdir = @srcdir@
+top_srcdir = @top_srcdir@
+VPATH = @srcdir@
prefix = @prefix@
-
-program_transform_name = @program_transform_name@
exec_prefix = @exec_prefix@
+
bindir = @bindir@
-libdir = @libdir@
-tooldir = $(exec_prefix)/$(target_alias)
+sbindir = @sbindir@
+libexecdir = @libexecdir@
datadir = @datadir@
-mandir = @mandir@
-man1dir = $(mandir)/man1
-man2dir = $(mandir)/man2
-man3dir = $(mandir)/man3
-man4dir = $(mandir)/man4
-man5dir = $(mandir)/man5
-man6dir = $(mandir)/man6
-man7dir = $(mandir)/man7
-man8dir = $(mandir)/man8
-man9dir = $(mandir)/man9
+sysconfdir = @sysconfdir@
+sharedstatedir = @sharedstatedir@
+localstatedir = @localstatedir@
+libdir = @libdir@
infodir = @infodir@
+mandir = @mandir@
includedir = @includedir@
+oldincludedir = /usr/include
-# We put the scripts in the directory $(scriptdir)/ldscripts.
-# We can't put the scripts in $(datadir) because the SEARCH_DIR
-# directives need to be different for native and cross linkers.
-scriptdir = $(tooldir)/lib
+pkgdatadir = $(datadir)/@PACKAGE@
+pkglibdir = $(libdir)/@PACKAGE@
+pkgincludedir = $(includedir)/@PACKAGE@
+
+top_builddir = .
-SHELL = /bin/sh
+ACLOCAL = @ACLOCAL@
+AUTOCONF = @AUTOCONF@
+AUTOMAKE = @AUTOMAKE@
+AUTOHEADER = @AUTOHEADER@
-INSTALL = `cd $(srcdir); pwd`/../install.sh -c
+INSTALL = @INSTALL@
INSTALL_PROGRAM = @INSTALL_PROGRAM@
INSTALL_DATA = @INSTALL_DATA@
-INSTALL_XFORM = $(INSTALL) -t='$(program_transform_name)'
-INSTALL_XFORM1 = $(INSTALL_XFORM) -b=.1
-
-AR = ar
-AR_FLAGS = qv
+INSTALL_SCRIPT = @INSTALL_SCRIPT@
+transform = @program_transform_name@
+
+NORMAL_INSTALL = :
+PRE_INSTALL = :
+POST_INSTALL = :
+NORMAL_UNINSTALL = :
+PRE_UNINSTALL = :
+POST_UNINSTALL = :
+build_alias = @build_alias@
+build_triplet = @build@
+host_alias = @host_alias@
+host_triplet = @host@
+target_alias = @target_alias@
+target_triplet = @target@
CC = @CC@
-CFLAGS = @CFLAGS@
-LDFLAGS = @LDFLAGS@
-HLDFLAGS = @HLDFLAGS@
-HLDENV = @HLDENV@
-RPATH_ENVVAR = @RPATH_ENVVAR@
-MAKEINFO = makeinfo
-TEXI2DVI = texi2dvi
-RANLIB = ranlib
-BISON = bison -y
-LEX = `if [ -f ../flex/flex ] ; then echo ../flex/flex ; else echo flex ; fi`
+EXEEXT = @EXEEXT@
+HDEFINES = @HDEFINES@
+LD = @LD@
+LIBTOOL = @LIBTOOL@
+LN_S = @LN_S@
+MAINT = @MAINT@
+MAKEINFO = @MAKEINFO@
+NATIVE_LIB_DIRS = @NATIVE_LIB_DIRS@
+NM = @NM@
+PACKAGE = @PACKAGE@
+RANLIB = @RANLIB@
+TDIRS = @TDIRS@
+VERSION = @VERSION@
+
+AUTOMAKE_OPTIONS = cygnus dejagnu
+
+tooldir = $(exec_prefix)/$(target_alias)
+
+YACC = `if [ -f ../bison/bison ] ; then echo ../bison/bison -y -L../bison/bison ; else echo bison -y ; fi`
+YFLAGS = -d
+LEX = `if [ -f ../flex/flex ] ; then echo ../flex/flex ; else echo flex ; fi`
+
+# We put the scripts in the directory $(scriptdir)/ldscripts.
+# We can't put the scripts in $(datadir) because the SEARCH_DIR
+# directives need to be different for native and cross linkers.
+scriptdir = $(tooldir)/lib
EMUL = @EMUL@
EMULATION_OFILES = @EMULATION_OFILES@
@@ -86,44 +103,16 @@ LIB_PATH =
BASEDIR = $(srcdir)/..
BFDDIR = $(BASEDIR)/bfd
INCDIR = $(BASEDIR)/include
-INCLUDES = -I. -I$(srcdir) -I../bfd -I$(BFDDIR) -I$(INCDIR)
DEP = mkdep
# What version of the manual to build
DOCVER = gen
-# Where to find texinfo.tex to format docn with TeX
-TEXIDIR = $(srcdir)/../texinfo
-
-# Where to find other docs needed to format with TeX
-TEXINPUTS = $(TEXIDIR):$(BFDDIR)/doc:$(srcdir)
-
-# Whether to get roff to put indexing entries on stderr
-TEXI2OPT =
-# You neeed this to generate ld-index.ms (or .mm or .me)
-# TEXI2OPT = -i
-
-TEXI2ROFF=texi2roff
-
-# Which roff program to use to generate index for texi2roff'd doc
-ROFF = groff
-
#stuff for self hosting (can be overridden in config file).
HOSTING_CRT0 = @HOSTING_CRT0@
HOSTING_LIBS = @HOSTING_LIBS@
HOSTING_EMU = -m $(EMUL)
-# These were used by `make check-cdtest'
-#
-#CXX = `if [ -f ../gcc/xgcc ] ; then \
-# echo ../gcc/xgcc -B../gcc/; \
-# else echo gcc; \
-# fi`
-#CXXFLAGS = -fgnu-linker
-#
-# FIX_ME: using ../gcc/xgcc breaks the cdtest.
-#CXX = g++
-
# Setup the testing framework, if you have one
EXPECT = `if [ -f $$r/../expect/expect ] ; \
then echo $$r/../expect/expect ; \
@@ -146,7 +135,7 @@ CC_FOR_TARGET = ` \
if [ "@host@" = "@target@" ] ; then \
echo $(CC); \
else \
- echo gcc | sed '$(program_transform_name)'; \
+ echo gcc | sed '$(transform)'; \
fi; \
fi`
@@ -162,37 +151,18 @@ CXX_FOR_TARGET = ` \
if [ "@host@" = "@target@" ] ; then \
echo $(CXX); \
else \
- echo gcc | sed '$(program_transform_name)'; \
+ echo gcc | sed '$(transform)'; \
fi; \
fi`
-# go directly to ld.new in case this ld isn't capable of
-# linking native object on this host. It can be renamed on
-# install.
-LD_PROG = ld.new
-
-all: $(LD_PROG)
-.PHONY: all
-
-LINTFLAGS = $(INCLUDES) $(EXTRA_DEF)
-
-# The .cc suffix was used by `make check-cdtest'.
-
-.SUFFIXES: .y $(SUFFIXES) .cc
-
-# Suppress smart makes who think they know how to automake Yacc files
-.y.c:
-
-# This rule was used for the check-cdtest target.
-#.cc.o:
-# $(CXX) -c -I$(srcdir) $(CXXFLAGS) $(CFLAGS) $<
+noinst_PROGRAMS = ld-new
+info_TEXINFOS = ld.texinfo
+noinst_TEXINFOS = ldint.texinfo
+man_MANS = ld.1
-ALL_CFLAGS = -D_GNU_SOURCE $(INCLUDES) @HDEFINES@ $(CFLAGS)
-.c.o:
- $(CC) -c $(ALL_CFLAGS) $<
+INCLUDES = -D_GNU_SOURCE -I. -I$(srcdir) -I../bfd -I$(BFDDIR) -I$(INCDIR) $(HDEFINES) $(CFLAGS)
-BFDDEP = ../bfd/libbfd.a
-BFDLIB = @BFDLIB@
+BFDLIB = ../bfd/libbfd.la
LIBIBERTY = ../libiberty/libiberty.a
ALL_EMULATIONS = \
@@ -200,11 +170,13 @@ ALL_EMULATIONS = \
eaixppc.o \
eaixrs6.o \
ealpha.o \
+ earcelf.o \
earmaoutb.o \
earmaoutl.o \
earmcoff.o \
earmpe.o \
ecoff_sparc.o \
+ ed10velf.o \
edelta68.o \
eebmon29k.o \
eelf32_sparc.o \
@@ -216,7 +188,6 @@ ALL_EMULATIONS = \
eelf32lmip.o \
eelf32lppc.o \
eelf32ppc.o \
- eelf64_sparc.o \
eelf_i386.o \
egld960.o \
egld960coff.o \
@@ -280,6 +251,8 @@ ALL_EMULATIONS = \
est2000.o \
esun3.o \
esun4.o \
+ etic30aout.o \
+ etic30coff.o \
evanilla.o \
evax.o \
evsta.o \
@@ -288,6 +261,7 @@ ALL_EMULATIONS = \
ez8002.o
ALL_64_EMULATIONS = \
+ eelf64_sparc.o \
eelf64alpha.o
CFILES = ldctor.c ldemul.c ldexp.c ldfile.c ldlang.c \
@@ -305,24 +279,449 @@ OFILES = ldgram.o ldlex.o lexsup.o ldlang.o mri.o ldctor.o ldmain.o \
ldwrite.o ldexp.o ldemul.o ldver.o ldmisc.o \
ldfile.o ldcref.o ${EMULATION_OFILES}
-LINTSOURCES = $(CFILES) $(GENERATED_CFILES) e*.c
-
STAGESTUFF = *.o ldscripts/* e*.c
-info: ld.info
-.PHONY: info
+# These all start with e so 'make clean' can find them.
+
+GENSCRIPTS = $(SHELL) $(srcdir)/genscripts.sh ${srcdir} ${libdir} @host@ @target@ @target_alias@ ${EMUL} "@NATIVE_LIB_DIRS@"
+GEN_DEPENDS = $(srcdir)/genscripts.sh $(srcdir)/emultempl/stringify.sed
+
+ld_new_SOURCES = ldgram.y ldlex.l lexsup.c ldlang.c mri.c ldctor.c ldmain.c \
+ ldwrite.c ldexp.c ldemul.c ldver.c ldmisc.c ldfile.c ldcref.c
+ld_new_DEPENDENCIES = $(EMULATION_OFILES) $(BFDLIB) $(LIBIBERTY)
+ld_new_LDADD = $(EMULATION_OFILES) $(BFDLIB) $(LIBIBERTY)
+
+# This is the real libbfd.a created by libtool.
+TESTBFDLIB = @TESTBFDLIB@
+
+MOSTLYCLEANFILES = $(STAGESTUFF) ld1$(EXEEXT) ld2$(EXEEXT) ld3$(EXEEXT) \
+ ldemul-list.h crtbegin.o crtend.o ld.log ld.sum
+CLEANFILES = dep.sed .dep .dep1
+
+# Stuff that should be included in a distribution. The diststuff
+# target is run by the taz target in ../Makefile.in.
+LDDISTSTUFF = ldgram.c ldgram.h ldlex.c
+
+DISTCLEANFILES = site.exp site.bak
+ACLOCAL_M4 = $(top_srcdir)/aclocal.m4
+mkinstalldirs = $(SHELL) $(top_srcdir)/../mkinstalldirs
+CONFIG_HEADER = config.h
+CONFIG_CLEAN_FILES =
+noinst_PROGRAMS = ld-new$(EXEEXT)
+PROGRAMS = $(noinst_PROGRAMS)
+
+
+DEFS = @DEFS@ -I. -I$(srcdir) -I.
+CPPFLAGS = @CPPFLAGS@
+LDFLAGS = @LDFLAGS@
+LIBS = @LIBS@
+ld_new_OBJECTS = ldgram.o ldlex.o lexsup.o ldlang.o mri.o ldctor.o \
+ldmain.o ldwrite.o ldexp.o ldemul.o ldver.o ldmisc.o ldfile.o ldcref.o
+ld_new_LDFLAGS =
+LEX_OUTPUT_ROOT = @LEX_OUTPUT_ROOT@
+LEXLIB = @LEXLIB@
+CFLAGS = @CFLAGS@
+COMPILE = $(CC) $(DEFS) $(INCLUDES) $(CPPFLAGS) $(CFLAGS)
+LTCOMPILE = $(LIBTOOL) --mode=compile $(CC) $(DEFS) $(INCLUDES) $(CPPFLAGS) $(CFLAGS)
+LINK = $(LIBTOOL) --mode=link $(CC) $(CFLAGS) $(LDFLAGS) -o $@
+TEXI2DVI = `if test -f $(top_srcdir)/../texinfo/util/texi2dvi; then echo $(top_srcdir)/../texinfo/util/texi2dvi; else echo texi2dvi; fi`
+TEXINFO_TEX = $(top_srcdir)/../texinfo/texinfo.tex
+INFO_DEPS = ld.info
+DVIS = ld.dvi
+TEXINFOS = ld.texinfo
+MANS = ld.1
+
+NROFF = nroff
+DIST_COMMON = README ChangeLog Makefile.am Makefile.in NEWS TODO \
+acconfig.h acinclude.m4 aclocal.m4 config.in configure configure.in \
+ldgram.c ldlex.c stamp-h.in
+
+
+DISTFILES = $(DIST_COMMON) $(SOURCES) $(HEADERS) $(TEXINFOS) $(EXTRA_DIST)
+
+TAR = tar
+GZIP = --best
+SOURCES = $(ld_new_SOURCES)
+OBJECTS = $(ld_new_OBJECTS)
+
+default: all
+
+.SUFFIXES:
+.SUFFIXES: .S .c .dvi .info .l .lo .o .ps .s .texi .texinfo .y
+$(srcdir)/Makefile.in: @MAINT@ Makefile.am $(top_srcdir)/configure.in $(ACLOCAL_M4)
+ cd $(top_srcdir) && $(AUTOMAKE) --cygnus Makefile
+
+Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status
+ cd $(top_builddir) \
+ && CONFIG_FILES=$@ CONFIG_HEADERS= $(SHELL) ./config.status
+
+$(ACLOCAL_M4): @MAINT@ configure.in acinclude.m4
+ cd $(srcdir) && $(ACLOCAL)
+
+config.status: $(srcdir)/configure
+ $(SHELL) ./config.status --recheck
+$(srcdir)/configure: @MAINT@$(srcdir)/configure.in $(ACLOCAL_M4) $(CONFIGURE_DEPENDENCIES)
+ cd $(srcdir) && $(AUTOCONF)
+
+config.h: stamp-h
+ @:
+stamp-h: $(srcdir)/config.in $(top_builddir)/config.status
+ cd $(top_builddir) \
+ && CONFIG_FILES= CONFIG_HEADERS=config.h:config.in \
+ $(SHELL) ./config.status
+ @echo timestamp > stamp-h
+$(srcdir)/config.in: @MAINT@$(srcdir)/stamp-h.in
+$(srcdir)/stamp-h.in: $(top_srcdir)/configure.in $(ACLOCAL_M4) acconfig.h
+ cd $(top_srcdir) && $(AUTOHEADER)
+ @echo timestamp > $(srcdir)/stamp-h.in
+
+mostlyclean-hdr:
+
+clean-hdr:
+
+distclean-hdr:
+ -rm -f config.h
+
+maintainer-clean-hdr:
+
+mostlyclean-noinstPROGRAMS:
+
+clean-noinstPROGRAMS:
+ -test -z "$(noinst_PROGRAMS)" || rm -f $(noinst_PROGRAMS)
+
+distclean-noinstPROGRAMS:
+
+maintainer-clean-noinstPROGRAMS:
+
+.c.o:
+ $(COMPILE) -c $<
+
+.s.o:
+ $(COMPILE) -c $<
+
+.S.o:
+ $(COMPILE) -c $<
+
+mostlyclean-compile:
+ -rm -f *.o core *.core
+
+clean-compile:
+
+distclean-compile:
+ -rm -f *.tab.c
-ldgram.c: ldgram.y
- $(BISON) $(BISONFLAGS) -d $(srcdir)/ldgram.y
- mv -f y.tab.c ldgram.c
- mv -f y.tab.h ldgram.h
+maintainer-clean-compile:
-# Separate from ldgram.c so that a parallel make doesn't try to build
-# both ldgram.c and ldgram.h simultaneously.
+.c.lo:
+ $(LIBTOOL) --mode=compile $(COMPILE) -c $<
+
+.s.lo:
+ $(LIBTOOL) --mode=compile $(COMPILE) -c $<
+
+.S.lo:
+ $(LIBTOOL) --mode=compile $(COMPILE) -c $<
+
+mostlyclean-libtool:
+ -rm -f *.lo
+
+clean-libtool:
+ -rm -rf .libs _libs
+
+distclean-libtool:
+
+maintainer-clean-libtool:
+
+ld-new$(EXEEXT): $(ld_new_OBJECTS) $(ld_new_DEPENDENCIES)
+ @rm -f ld-new$(EXEEXT)
+ $(LINK) $(ld_new_LDFLAGS) $(ld_new_OBJECTS) $(ld_new_LDADD) $(LIBS)
+.y.c:
+ $(YACC) $(YFLAGS) $< && mv y.tab.c $*.c
+ if test -f y.tab.h; then \
+ if cmp -s y.tab.h $*.h; then rm -f y.tab.h; else mv y.tab.h $*.h; fi; \
+ else :; fi
ldgram.h: ldgram.c
+.l.c:
+ $(LEX) $(LFLAGS) $< && mv $(LEX_OUTPUT_ROOT).c $@
+
+ld.info: ld.texinfo
+ld.dvi: ld.texinfo
+
+
+DVIPS = dvips
+
+.texi.info:
+ @rm -f $@ $@-[0-9] $@-[0-9][0-9]
+ $(MAKEINFO) -I $(srcdir) $<
+
+.texi.dvi:
+ TEXINPUTS=$(top_srcdir)/../texinfo:$$TEXINPUTS \
+ MAKEINFO='$(MAKEINFO) -I $(srcdir)' $(TEXI2DVI) $<
+
+.texi:
+ @rm -f $@ $@-[0-9] $@-[0-9][0-9]
+ $(MAKEINFO) -I $(srcdir) $<
+
+.texinfo.info:
+ @rm -f $@ $@-[0-9] $@-[0-9][0-9]
+ $(MAKEINFO) -I $(srcdir) $<
+
+.texinfo:
+ @rm -f $@ $@-[0-9] $@-[0-9][0-9]
+ $(MAKEINFO) -I $(srcdir) $<
+
+.texinfo.dvi:
+ TEXINPUTS=$(top_srcdir)/../texinfo:$$TEXINPUTS \
+ MAKEINFO='$(MAKEINFO) -I $(srcdir)' $(TEXI2DVI) $<
+.dvi.ps:
+ $(DVIPS) $< -o $@
+
+install-info-am: $(INFO_DEPS)
+ @$(NORMAL_INSTALL)
+ $(mkinstalldirs) $(infodir)
+ @for file in $(INFO_DEPS); do \
+ if test -f $$file; then d=.; else d=$(srcdir); fi; \
+ for ifile in `cd $$d && echo $$file $$file-[0-9] $$file-[0-9][0-9]`; do \
+ if test -f $$d/$$ifile; then \
+ echo " $(INSTALL_DATA) $$d/$$ifile $(infodir)/$$ifile"; \
+ $(INSTALL_DATA) $$d/$$ifile $(infodir)/$$ifile; \
+ else : ; fi; \
+ done; \
+ done
+ @$(POST_INSTALL)
+ @if $(SHELL) -c 'install-info --version | sed 1q | fgrep -s -v -i debian' >/dev/null 2>&1; then \
+ for file in $(INFO_DEPS); do \
+ echo " install-info --info-dir=$(infodir) $(infodir)/$$file";\
+ install-info --info-dir=$(infodir) $(infodir)/$$file || :;\
+ done; \
+ else : ; fi
+
+uninstall-info:
+ $(PRE_UNINSTALL)
+ @if $(SHELL) -c 'install-info --version | sed 1q | fgrep -s -v -i debian' >/dev/null 2>&1; then \
+ ii=yes; \
+ else ii=; fi; \
+ for file in $(INFO_DEPS); do \
+ test -z "$ii" \
+ || install-info --info-dir=$(infodir) --remove $$file; \
+ done
+ $(NORMAL_UNINSTALL)
+ for file in $(INFO_DEPS); do \
+ (cd $(infodir) && rm -f $$file $$file-[0-9] $$file-[0-9][0-9]); \
+ done
+
+dist-info: $(INFO_DEPS)
+ for base in $(INFO_DEPS); do \
+ if test -f $$base; then d=.; else d=$(srcdir); fi; \
+ for file in `cd $$d && eval echo $$base*`; do \
+ test -f $(distdir)/$$file \
+ || ln $$d/$$file $(distdir)/$$file 2> /dev/null \
+ || cp -p $$d/$$file $(distdir)/$$file; \
+ done; \
+ done
+
+mostlyclean-aminfo:
+ -rm -f ld.aux ld.cp ld.cps ld.dvi ld.fn ld.fns ld.ky ld.kys ld.ps \
+ ld.log ld.pg ld.toc ld.tp ld.tps ld.vr ld.vrs ld.op ld.tr \
+ ld.cv ld.cn
+
+clean-aminfo:
+
+distclean-aminfo:
+
+maintainer-clean-aminfo:
+ for i in $(INFO_DEPS); do \
+ rm -f $$i; \
+ if test "`echo $$i-[0-9]*`" != "$$i-[0-9]*"; then \
+ rm -f $$i-[0-9]*; \
+ fi; \
+ done
+clean-info: mostlyclean-aminfo
+install-man: $(MANS)
+ $(NORMAL_INSTALL)
+ $(mkinstalldirs) $(mandir)/man1
+ @sect=1; \
+ inst=`echo "ld" | sed '$(transform)'`.1; \
+ if test -f $(srcdir)/ld.1; then file=$(srcdir)/ld.1; \
+ else file=ld.1; fi; \
+ echo " $(INSTALL_DATA) $$file $(mandir)/man$$sect/$$inst"; \
+ $(INSTALL_DATA) $$file $(mandir)/man$$sect/$$inst
+
+uninstall-man:
+ $(NORMAL_UNINSTALL)
+ -inst=`echo "ld" | sed '$(transform)'`.1; \
+ rm -f $(mandir)/man1/$$inst
+
+
+tags: TAGS
+
+ID: $(HEADERS) $(SOURCES) $(LISP)
+ here=`pwd` && cd $(srcdir) \
+ && mkid -f$$here/ID $(SOURCES) $(HEADERS) $(LISP)
+
+TAGS: $(HEADERS) $(SOURCES) config.in $(TAGS_DEPENDENCIES) $(LISP)
+ tags=; \
+ here=`pwd`; \
+ list='$(SOURCES) $(HEADERS)'; \
+ unique=`for i in $$list; do echo $$i; done | \
+ awk ' { files[$$0] = 1; } \
+ END { for (i in files) print i; }'`; \
+ test -z "$(ETAGS_ARGS)config.in$$unique$(LISP)$$tags" \
+ || (cd $(srcdir) && etags $(ETAGS_ARGS) $$tags config.in $$unique $(LISP) -o $$here/TAGS)
+
+mostlyclean-tags:
+
+clean-tags:
+
+distclean-tags:
+ -rm -f TAGS ID
+
+maintainer-clean-tags:
+
+distdir = $(PACKAGE)-$(VERSION)
+top_distdir = $(distdir)
+
+# This target untars the dist file and tries a VPATH configuration. Then
+# it guarantees that the distribution is self-contained by making another
+# tarfile.
+distcheck: dist
+ -rm -rf $(distdir)
+ GZIP=$(GZIP) $(TAR) zxf $(distdir).tar.gz
+ mkdir $(distdir)/=build
+ mkdir $(distdir)/=inst
+ dc_install_base=`cd $(distdir)/=inst && pwd`; \
+ cd $(distdir)/=build \
+ && ../configure --srcdir=.. --prefix=$$dc_install_base \
+ && $(MAKE) \
+ && $(MAKE) dvi \
+ && $(MAKE) check \
+ && $(MAKE) install \
+ && $(MAKE) installcheck \
+ && $(MAKE) dist
+ -rm -rf $(distdir)
+ @echo "========================"; \
+ echo "$(distdir).tar.gz is ready for distribution"; \
+ echo "========================"
+dist: distdir
+ -chmod -R a+r $(distdir)
+ GZIP=$(GZIP) $(TAR) chozf $(distdir).tar.gz $(distdir)
+ -rm -rf $(distdir)
+dist-all: distdir
+ -chmod -R a+r $(distdir)
+ GZIP=$(GZIP) $(TAR) chozf $(distdir).tar.gz $(distdir)
+ -rm -rf $(distdir)
+distdir: $(DISTFILES)
+ -rm -rf $(distdir)
+ mkdir $(distdir)
+ -chmod 777 $(distdir)
+ @for file in $(DISTFILES); do \
+ if test -f $$file; then d=.; else d=$(srcdir); fi; \
+ test -f $(distdir)/$$file \
+ || ln $$d/$$file $(distdir)/$$file 2> /dev/null \
+ || cp -p $$d/$$file $(distdir)/$$file; \
+ done
+ $(MAKE) top_distdir="$(top_distdir)" distdir="$(distdir)" dist-info
+
+DEJATOOL = $(PACKAGE)
+
+RUNTESTDEFAULTFLAGS = --tool $(DEJATOOL) --srcdir $$srcdir
+site.exp: Makefile
+ @echo 'Making a new site.exp file...'
+ -@rm -f site.bak
+ @echo '## these variables are automatically generated by make ##' > $@-t
+ @echo '# Do not edit here. If you wish to override these values' >> $@-t
+ @echo '# edit the last section' >> $@-t
+ @echo 'set tool $(DEJATOOL)' >> $@-t
+ @echo 'set srcdir $(srcdir)' >> $@-t
+ @echo 'set objdir' `pwd` >> $@-t
+ @echo 'set host_alias $(host_alias)' >> $@-t
+ @echo 'set host_triplet $(host_triplet)' >> $@-t
+ @echo 'set target_alias $(target_alias)' >> $@-t
+ @echo 'set target_triplet $(target_triplet)' >> $@-t
+ @echo 'set build_alias $(build_alias)' >> $@-t
+ @echo 'set build_triplet $(build_triplet)' >> $@-t
+ @echo '## All variables above are generated by configure. Do Not Edit ##' >> $@-t
+ -@sed '1,/^## All variables above are.*##/ d' site.bak >> $@-t
+ -@mv site.exp site.bak
+ @mv $@-t site.exp
+info: $(INFO_DEPS)
+dvi: $(DVIS)
+check:
+ $(MAKE) check-DEJAGNU
+installcheck:
+install-info: install-info-am
+install-exec: install-exec-local
+ @$(NORMAL_INSTALL)
+
+install-data: install-man install-data-local
+ @$(NORMAL_INSTALL)
+
+install: install-exec install-data all
+ @:
+
+uninstall: uninstall-man
+
+all: Makefile $(PROGRAMS) $(MANS) config.h
+
+install-strip:
+ $(MAKE) INSTALL_PROGRAM='$(INSTALL_PROGRAM) -s' INSTALL_SCRIPT='$(INSTALL_PROGRAM)' install
+installdirs:
+ $(mkinstalldirs) $(mandir)/man1
+
+
+mostlyclean-generic:
+ -test -z "$(MOSTLYCLEANFILES)" || rm -f $(MOSTLYCLEANFILES)
+
+clean-generic:
+ -test -z "$(CLEANFILES)" || rm -f $(CLEANFILES)
+
+distclean-generic:
+ -rm -f Makefile $(DISTCLEANFILES)
+ -rm -f config.cache config.log stamp-h stamp-h[0-9]*
+ -test -z "$(CONFIG_CLEAN_FILES)" || rm -f $(CONFIG_CLEAN_FILES)
+
+maintainer-clean-generic:
+ -test -z "$(MAINTAINERCLEANFILES)" || rm -f $(MAINTAINERCLEANFILES)
+ -test -z "$(BUILT_SOURCES)" || rm -f $(BUILT_SOURCES)
+mostlyclean: mostlyclean-hdr mostlyclean-noinstPROGRAMS \
+ mostlyclean-compile mostlyclean-libtool \
+ mostlyclean-aminfo mostlyclean-tags mostlyclean-generic \
+ mostlyclean-local
+
+clean: clean-hdr clean-noinstPROGRAMS clean-compile clean-libtool \
+ clean-aminfo clean-tags clean-generic mostlyclean
+
+distclean: distclean-hdr distclean-noinstPROGRAMS distclean-compile \
+ distclean-libtool distclean-aminfo distclean-tags \
+ distclean-generic clean distclean-local
+ -rm -f config.status
+ -rm -f libtool
+
+maintainer-clean: maintainer-clean-hdr maintainer-clean-noinstPROGRAMS \
+ maintainer-clean-compile maintainer-clean-libtool \
+ maintainer-clean-aminfo maintainer-clean-tags \
+ maintainer-clean-generic distclean
+ @echo "This command is intended for maintainers to use;"
+ @echo "it deletes files that may require special tools to rebuild."
+ -rm -f config.status
+
+.PHONY: default mostlyclean-hdr distclean-hdr clean-hdr \
+maintainer-clean-hdr mostlyclean-noinstPROGRAMS \
+distclean-noinstPROGRAMS clean-noinstPROGRAMS \
+maintainer-clean-noinstPROGRAMS mostlyclean-compile distclean-compile \
+clean-compile maintainer-clean-compile mostlyclean-libtool \
+distclean-libtool clean-libtool maintainer-clean-libtool \
+install-info-am uninstall-info mostlyclean-aminfo distclean-aminfo \
+clean-aminfo maintainer-clean-aminfo install-man uninstall-man tags \
+mostlyclean-tags distclean-tags clean-tags maintainer-clean-tags \
+distdir check-DEJAGNU info dvi installcheck install-info install-exec \
+install-data install uninstall all installdirs mostlyclean-generic \
+distclean-generic clean-generic maintainer-clean-generic clean \
+mostlyclean distclean maintainer-clean
+
+
ldmain.o: ldmain.c config.status
- $(CC) -c -DDEFAULT_EMULATION='"$(EMUL)"' -DSCRIPTDIR='"$(scriptdir)"' -DTARGET='"@target@"' $(ALL_CFLAGS) $<
+ $(COMPILE) -c -DDEFAULT_EMULATION='"$(EMUL)"' -DSCRIPTDIR='"$(scriptdir)"' -DTARGET='"@target@"' $(srcdir)/ldmain.c
ldemul-list.h: Makefile
(echo "/* This file is automatically generated. DO NOT EDIT! */";\
@@ -338,20 +737,6 @@ ldemul-list.h: Makefile
done;\
echo " 0") >ldemul-tmp.h
mv ldemul-tmp.h ldemul-list.h
-
-ldlex.c: ldlex.l
- $(LEX) $(srcdir)/ldlex.l
- -sed -e '/^int.*free();/d' \
- -e '/^char.*malloc();/d' \
- -e 's/malloc/xmalloc/g' \
- < lex.yy.c > ldlex.c.new
- -rm lex.yy.c
- mv ldlex.c.new ./ldlex.c
-
-# These all start with e so 'make clean' can find them.
-
-GENSCRIPTS = $(SHELL) $(srcdir)/genscripts.sh ${srcdir} ${libdir} @host@ @target@ @target_alias@ ${EMUL} "@NATIVE_LIB_DIRS@"
-GEN_DEPENDS = $(srcdir)/genscripts.sh $(srcdir)/emultempl/stringify.sed
@TDIRS@
ea29k.c: $(srcdir)/emulparams/a29k.sh \
@@ -366,6 +751,9 @@ eaixrs6.c: $(srcdir)/emulparams/aixrs6.sh \
ealpha.c: $(srcdir)/emulparams/alpha.sh \
$(srcdir)/emultempl/generic.em $(srcdir)/scripttempl/alpha.sc ${GEN_DEPENDS}
${GENSCRIPTS} alpha "$(tdir_alpha)"
+earcelf.c: $(srcdir)/emulparams/arcelf.sh \
+ $(srcdir)/emultempl/generic.em $(srcdir)/scripttempl/elf.sc ${GEN_DEPENDS}
+ ${GENSCRIPTS} arcelf "$(tdir_arcelf)"
earmaoutb.c: $(srcdir)/emulparams/armaoutb.sh \
$(srcdir)/emultempl/generic.em $(srcdir)/scripttempl/armaout.sc ${GEN_DEPENDS}
${GENSCRIPTS} armaoutb "$(tdir_armaoutb)"
@@ -400,23 +788,29 @@ eelf32b4300.c: $(srcdir)/emulparams/elf32b4300.sh \
$(srcdir)/emultempl/elf32.em $(srcdir)/scripttempl/elf.sc ${GEN_DEPENDS}
${GENSCRIPTS} elf32b4300 "$(tdir_elf32b4300)"
eelf32bmip.c: $(srcdir)/emulparams/elf32bmip.sh \
- $(srcdir)/emultempl/elf32.em $(srcdir)/scripttempl/elfmips.sc ${GEN_DEPENDS}
+ $(srcdir)/emultempl/elf32.em $(srcdir)/scripttempl/elf.sc ${GEN_DEPENDS}
${GENSCRIPTS} elf32bmip "$(tdir_elf32bmip)"
+eelf32bsmip.c: $(srcdir)/emulparams/elf32bsmip.sh \
+ $(srcdir)/emultempl/elf32.em $(srcdir)/scripttempl/elf.sc ${GEN_DEPENDS}
+ ${GENSCRIPTS} elf32bsmip "$(tdir_elf32bsmip)"
eelf32ebmip.c: $(srcdir)/emulparams/elf32ebmip.sh \
- $(srcdir)/emultempl/elf32.em $(srcdir)/scripttempl/elfmips.sc ${GEN_DEPENDS}
+ $(srcdir)/emultempl/elf32.em $(srcdir)/scripttempl/elf.sc ${GEN_DEPENDS}
${GENSCRIPTS} elf32ebmip "$(tdir_elf32ebmip)"
eelf32elmip.c: $(srcdir)/emulparams/elf32elmip.sh \
- $(srcdir)/emultempl/elf32.em $(srcdir)/scripttempl/elfmips.sc ${GEN_DEPENDS}
+ $(srcdir)/emultempl/elf32.em $(srcdir)/scripttempl/elf.sc ${GEN_DEPENDS}
${GENSCRIPTS} elf32elmip "$(tdir_elf32elmip)"
eelf32l4300.c: $(srcdir)/emulparams/elf32l4300.sh \
$(srcdir)/emultempl/elf32.em $(srcdir)/scripttempl/elf.sc ${GEN_DEPENDS}
${GENSCRIPTS} elf32l4300 "$(tdir_elf32l4300)"
eelf32lmip.c: $(srcdir)/emulparams/elf32lmip.sh \
- $(srcdir)/emultempl/elf32.em $(srcdir)/scripttempl/elfmips.sc ${GEN_DEPENDS}
+ $(srcdir)/emultempl/elf32.em $(srcdir)/scripttempl/elf.sc ${GEN_DEPENDS}
${GENSCRIPTS} elf32lmip "$(tdir_elf32lmip)"
eelf32lppc.c: $(srcdir)/emulparams/elf32lppc.sh \
$(srcdir)/emultempl/elf32.em $(srcdir)/scripttempl/elfppc.sc ${GEN_DEPENDS}
${GENSCRIPTS} elf32lppc "$(tdir_elf32lppc)"
+eelf32lsmip.c: $(srcdir)/emulparams/elf32lsmip.sh \
+ $(srcdir)/emultempl/elf32.em $(srcdir)/scripttempl/elf.sc ${GEN_DEPENDS}
+ ${GENSCRIPTS} elf32lsmip "$(tdir_elf32lsmip)"
eelf32ppc.c: $(srcdir)/emulparams/elf32ppc.sh \
$(srcdir)/emultempl/elf32.em $(srcdir)/scripttempl/elfppc.sc ${GEN_DEPENDS}
${GENSCRIPTS} elf32ppc "$(tdir_elf32ppc)"
@@ -424,7 +818,7 @@ eelf64alpha.c: $(srcdir)/emulparams/elf64alpha.sh \
$(srcdir)/emultempl/elf32.em $(srcdir)/scripttempl/elf.sc ${GEN_DEPENDS}
${GENSCRIPTS} elf64alpha "$(tdir_elf64alpha)"
eelf64_sparc.c: $(srcdir)/emulparams/elf64_sparc.sh \
- $(srcdir)/emultempl/generic.em $(srcdir)/scripttempl/elf.sc ${GEN_DEPENDS}
+ $(srcdir)/emultempl/elf32.em $(srcdir)/scripttempl/elf.sc ${GEN_DEPENDS}
${GENSCRIPTS} elf64_sparc "$(tdir_elf64_sparc)"
eelf_i386.c: $(srcdir)/emulparams/elf_i386.sh \
$(srcdir)/emultempl/elf32.em $(srcdir)/scripttempl/elf.sc ${GEN_DEPENDS}
@@ -621,6 +1015,12 @@ esun3.c: $(srcdir)/emulparams/sun3.sh \
esun4.c: $(srcdir)/emulparams/sun4.sh \
$(srcdir)/emultempl/sunos.em $(srcdir)/scripttempl/aout.sc ${GEN_DEPENDS}
${GENSCRIPTS} sun4 "$(tdir_sun4)"
+etic30aout.c: $(srcdir)/emulparams/tic30aout.sh \
+ $(srcdir)/emultempl/generic.em $(srcdir)/scripttempl/tic30aout.sc ${GEN_DEPENDS}
+ ${GENSCRIPTS} tic30aout "$(tdir_tic30aout)"
+etic30coff.c: $(srcdir)/emulparams/tic30coff.sh \
+ $(srcdir)/emultempl/generic.em $(srcdir)/scripttempl/tic30coff.sc ${GEN_DEPENDS}
+ ${GENSCRIPTS} tic30coff "$(tdir_tic30coff)"
evanilla.c: $(srcdir)/emulparams/vanilla.sh \
$(srcdir)/emultempl/vanilla.em $(srcdir)/scripttempl/vanilla.sc ${GEN_DEPENDS}
${GENSCRIPTS} vanilla "$(tdir_vanilla)"
@@ -630,6 +1030,9 @@ evax.c: $(srcdir)/emulparams/vax.sh \
evsta.c: $(srcdir)/emulparams/vsta.sh \
$(srcdir)/emultempl/generic.em $(srcdir)/scripttempl/aout.sc ${GEN_DEPENDS}
${GENSCRIPTS} vsta "$(tdir_vsta)"
+ev850.c: $(srcdir)/emulparams/v850.sh \
+ $(srcdir)/emultempl/elf32.em $(srcdir)/scripttempl/v850.sc ${GEN_DEPENDS}
+ ${GENSCRIPTS} v850 "$(tdir_v850)"
ew65.c: $(srcdir)/emulparams/w65.sh \
$(srcdir)/emultempl/generic.em $(srcdir)/scripttempl/w65.sc ${GEN_DEPENDS}
${GENSCRIPTS} w65 "$(tdir_w65)"
@@ -640,91 +1043,52 @@ ez8002.c: $(srcdir)/emulparams/z8002.sh \
$(srcdir)/emultempl/generic.em $(srcdir)/scripttempl/z8000.sc ${GEN_DEPENDS}
${GENSCRIPTS} z8002 "$(tdir_z8002)"
-$(LD_PROG): $(OFILES) $(BFDDEP) $(LIBIBERTY)
- $(HLDENV) $(CC) $(HLDFLAGS) $(CFLAGS) $(LDFLAGS) -o $(LD_PROG) $(OFILES) $(BFDLIB) $(LIBIBERTY) $(EXTRALIBS)
-
# The generated emulation files mostly have the same dependencies.
$(EMULATION_OFILES): ../bfd/bfd.h sysdep.h config.h $(INCDIR)/bfdlink.h \
ld.h ldmain.h ldemul.h ldfile.h ldmisc.h ldexp.h ldlang.h \
ldctor.h ldexp.h ldlang.h ldgram.h
-# These targets are for the dejagnu testsuites. The file site.exp
-# contains global variables that all the testsuites will use.
-
-site.exp: ./config.status Makefile
- @echo "Making a new config file..."
- @rm -f ./tmp?
- @touch site.exp
- @mv site.exp site.bak
- @echo "## variables are automatically generated by make ##" > ./tmp0
- @echo "# Do not edit here. If you wish to override these" >> ./tmp0
- @echo "# values, add them to the last section" >> ./tmp0
- @echo "# HOST AND TARGET INFO" >> ./tmp0
- @echo "set host_os @host_os@" >> ./tmp0
- @echo "set host_alias @host_alias@" >> ./tmp0
- @echo "set host_cpu @host_cpu@" >> ./tmp0
- @echo "set host_vendor @host_vendor@" >> ./tmp0
- @echo "set target_os @target_os@" >> ./tmp0
- @echo "set target_alias @target_alias@" >> ./tmp0
- @echo "set target_cpu @target_cpu@" >> ./tmp0
- @echo "set target_vendor @target_vendor@" >> ./tmp0
- @echo "set host_triplet @host@" >> ./tmp0
- @echo "set target_triplet @target@" >> ./tmp0
- @echo "# DIRECTORY INFO" >> ./tmp0
- @echo "set objdir `pwd`" >> ./tmp0
- @echo "" >> ./tmp0
- @echo "# LD DEPENDENCIES" >> ./tmp0
- @echo "set OFILES \"$(OFILES)\"" >> ./tmp0
- @echo "set BFDLIB \"$(BFDLIB)\"" >> ./tmp0
- @echo "set LIBIBERTY \"$(LIBIBERTY)\"" >> ./tmp0
- @echo "set HOSTING_EMU \"$(HOSTING_EMU)\"" >> ./tmp0
- @echo "set HOSTING_CRT0 \"$(HOSTING_CRT0)\"" >> ./tmp0
- @echo "set HOSTING_LIBS \"$(HOSTING_LIBS)\"" >> ./tmp0
- @echo "" >> ./tmp0
- @echo "## Variables generated by configure. Do Not Edit ##" >> ./tmp0
- @cat ./tmp0 > site.exp
- @cat site.bak | sed \
- -e '1,/^## Variables generated by.*##/ d' >> site.exp
- -@rm -f ./tmp?
-
-check: site.exp
+check-DEJAGNU: site.exp
+ srcroot=`cd $(srcdir) && pwd`; export srcroot; \
r=`pwd`; export r; \
- srcroot=`cd ${srcdir}; pwd` ; export srcroot ; \
- EXPECT=${EXPECT} ; export EXPECT ; \
- $(RPATH_ENVVAR)=$$r/../bfd:$$r/../opcodes:$$$(RPATH_ENVVAR); \
- export $(RPATH_ENVVAR); \
- if [ -f $$r/../expect/expect ] ; then \
- TCL_LIBRARY=$${srcroot}/../tcl/library ; \
- export TCL_LIBRARY ; \
- else true ; fi ; \
- $(RUNTEST) --tool ld --srcdir $(srcdir)/testsuite $(RUNTESTFLAGS) \
- CC="$(CC_FOR_TARGET)" CFLAGS="$(CFLAGS)" \
- CXX="$(CXX_FOR_TARGET)" CXXFLAGS="$(CXXFLAGS)" \
- CC_FOR_HOST="$(CC)" CFLAGS_FOR_HOST="$(CFLAGS)"
-
-installcheck:
-.PHONY: check installcheck
+ EXPECT=$(EXPECT); export EXPECT; \
+ if [ -f $(top_builddir)/../expect/expect ]; then \
+ TCL_LIBRARY=`cd $(top_srcdir)/../tcl/library && pwd`; \
+ export TCL_LIBRARY; \
+ fi; \
+ runtest=$(RUNTEST); \
+ if $(SHELL) -c "$$runtest --version" > /dev/null 2>&1; then \
+ $$runtest --tool $(DEJATOOL) --srcdir $${srcroot}/testsuite \
+ CC="$(CC_FOR_TARGET)" CFLAGS="$(CFLAGS)" \
+ CXX="$(CXX_FOR_TARGET)" CXXFLAGS="$(CXXFLAGS)" \
+ CC_FOR_HOST="$(CC)" CFLAGS_FOR_HOST="$(CFLAGS)" \
+ OFILES="$(OFILES)" BFDLIB="$(TESTBFDLIB)" \
+ LIBIBERTY="$(LIBIBERTY)" HOSTING_EMU="$(HOSTING_EMU)" \
+ HOSTING_CRT0="$(HOSTING_CRT0)" HOSTING_LIBS="$(HOSTING_LIBS)" \
+ $(RUNTESTFLAGS); \
+ else echo "WARNING: could not find \`runtest'" 1>&2; :;\
+ fi
# Rules for testing by relinking ld itself.
# A similar test is in the testsuite. This target is for ease of use
# when porting ld.
-ld-partial.o: ld.new
- ./ld.new $(HOSTING_EMU) -o ld-partial.o -r $(OFILES)
-ld1: ld-partial.o
- ./ld.new $(HOSTING_EMU) -o ld1 $(HOSTING_CRT0) ld-partial.o $(BFDLIB) $(LIBIBERTY) $(HOSTING_LIBS)
+ld-partial.o: ld-new$(EXEEXT)
+ ./ld-new$(EXEEXT) $(HOSTING_EMU) -o ld-partial.o -r $(OFILES)
+ld1$(EXEEXT): ld-partial.o
+ ./ld-new$(EXEEXT) $(HOSTING_EMU) -o ld1$(EXEEXT) $(HOSTING_CRT0) ld-partial.o $(TESTBFDLIB) $(LIBIBERTY) $(HOSTING_LIBS)
-ld1-full: ld.new
- ./ld.new $(HOSTING_EMU) -o ld1-full $(HOSTING_CRT0) $(OFILES) $(BFDLIB) $(LIBIBERTY) $(HOSTING_LIBS)
+ld1-full$(EXEEXT): ld-new
+ ./ld-new$(EXEEXT) $(HOSTING_EMU) -o ld1-full$(EXEEXT) $(HOSTING_CRT0) $(OFILES) $(TESTBFDLIB) $(LIBIBERTY) $(HOSTING_LIBS)
-ld2: ld1
- ./ld1 $(HOSTING_EMU) -o ld2 $(HOSTING_CRT0) $(OFILES) $(BFDLIB) $(LIBIBERTY) $(HOSTING_LIBS)
+ld2$(EXEEXT): ld1$(EXEEXT)
+ ./ld1$(EXEEXT) $(HOSTING_EMU) -o ld2$(EXEEXT) $(HOSTING_CRT0) $(OFILES) $(TESTBFDLIB) $(LIBIBERTY) $(HOSTING_LIBS)
-ld3: ld2
- ./ld2 $(HOSTING_EMU) -o ld3 $(HOSTING_CRT0) $(OFILES) $(BFDLIB) $(LIBIBERTY) $(HOSTING_LIBS)
+ld3$(EXEEXT): ld2$(EXEEXT)
+ ./ld2$(EXEEXT) $(HOSTING_EMU) -o ld3$(EXEEXT) $(HOSTING_CRT0) $(OFILES) $(TESTBFDLIB) $(LIBIBERTY) $(HOSTING_LIBS)
-bootstrap: ld3
- cmp ld2 ld3
+bootstrap: ld3$(EXEEXT)
+ cmp ld2$(EXEEXT) ld3$(EXEEXT)
.PHONY: bootstrap
@@ -764,206 +1128,49 @@ bootstrap: ld3
# because almost all configs use "gen" version of manual.
# Set DOCVER above to change.
configdoc.texi: ${DOCVER}-doc.texi
- ln -s ${srcdir}/${DOCVER}-doc.texi ./configdoc.texi || \
- ln ${srcdir}/${DOCVER}-doc.texi ./configdoc.texi || \
- cp ${srcdir}/${DOCVER}-doc.texi ./configdoc.texi
-
-# TeX output
-dvi: ld.dvi
-ld.dvi: $(srcdir)/ld.texinfo configdoc.texi $(BFDDIR)/doc/bfdsumm.texi
- TEXINPUTS=$(BFDDIR)/doc:$$TEXINPUTS MAKEINFO='$(MAKEINFO) -I$(BFDDIR)/doc -I$(srcdir)' \
- $(TEXI2DVI) $(srcdir)/ld.texinfo
-
-ldint.dvi: $(srcdir)/ldint.texinfo
- $(TEXI2DVI) $(srcdir)/ldint.texinfo
-
-# info file for online browsing
-ld.info: $(srcdir)/ld.texinfo configdoc.texi $(BFDDIR)/doc/bfdsumm.texi
- $(MAKEINFO) -I$(BFDDIR)/doc -I$(srcdir) -o ld.info $(srcdir)/ld.texinfo
-
-ldint.info: $(srcdir)/ldint.texinfo
- $(MAKEINFO) -o ldint.info $(srcdir)/ldint.texinfo
-
-.PHONY: dvi
-
-#separate targets for "ms", "me", and "mm" forms of roff doc
-# Try to use a recent texi2roff. v2 was put on prep in jan91.
-# If you want an index, see texi2roff doc for postprocessing
-# and add -i to texi2roff invocations below.
-# Workarounds for texi2roff-2 (probably fixed in later texi2roff's, delete
-# correspondint -e lines when later texi2roff's are current)
-# + @ifinfo's deleted explicitly due to texi2roff-2 bug w nested constructs.
-# + @c's deleted explicitly because texi2roff sees texinfo commands in them
-# + @ (that's at-BLANK) not recognized by texi2roff, turned into blank
-# + @alphaenumerate is ridiculously new, turned into @enumerate
-
-ld.ms: $(srcdir)/ld.texinfo
- sed -e '/\\input texinfo/d' \
- -e '/@c TEXI2ROFF-KILL/,/@c END TEXI2ROFF-KILL/d' \
- -e '/^@ifinfo/,/^@end ifinfo/d' \
- -e '/^@c/d' \
- -e 's/{.*,,/{/' \
- -e 's/@ / /g' \
- -e 's/^@alphaenumerate/@enumerate/g' \
- -e 's/^@end alphaenumerate/@end enumerate/g' \
- $(srcdir)/ld.texinfo | \
- $(TEXI2ROFF) $(TEXI2OPT) -ms | \
- sed -e 's/---/\\(em/g' \
- >>ld.ms
-
-# index for roff output
-ld-index.ms: ld.ms
- $(ROFF) -ms ld.ms 2>&1 1>/dev/null | \
- sed -e '/: warning:/d' | \
- texi2index >ld-index.ms
-
-# roff output (-mm)
-ld.mm: $(srcdir)/ld.texinfo
- sed -e '/\\input texinfo/d' \
- -e '/@c TEXI2ROFF-KILL/,/@c END TEXI2ROFF-KILL/d' \
- -e '/^@ifinfo/,/^@end ifinfo/d' \
- -e '/^@c/d' \
- -e 's/{.*,,/{/' \
- -e '/@noindent/d' \
- -e 's/@ / /g' \
- -e 's/^@alphaenumerate/@enumerate/g' \
- -e 's/^@end alphaenumerate/@end enumerate/g' \
- $(srcdir)/ld.texinfo | \
- $(TEXI2ROFF) $(TEXI2OPT) -mm | \
- sed -e 's/---/\\(em/g' \
- >ld.mm
-
-# index for roff output
-ld-index.mm: ld.mm
- $(ROFF) -mm ld.mm 2>&1 1>/dev/null | \
- sed -e '/: warning:/d' | \
- texi2index >ld-index.mm
-
-# roff output (-me)
-ld.me: $(srcdir)/ld.texinfo
- sed -e '/\\input texinfo/d' \
- -e '/@c TEXI2ROFF-KILL/,/@c END TEXI2ROFF-KILL/d' \
- -e '/^@ifinfo/,/^@end ifinfo/d' \
- -e '/^@c/d' \
- -e 's/{.*,,/{/' \
- -e 's/@ / /g' \
- -e 's/^@alphaenumerate/@enumerate/g' \
- -e 's/^@end alphaenumerate/@end enumerate/g' \
- $(srcdir)/ld.texinfo | \
- $(TEXI2ROFF) $(TEXI2OPT) -me | \
- sed -e 's/---/\\(em/g' \
- >>ld.me
-
-# index for roff output
-ld-index.me: ld.me
- $(ROFF) -me ld.me 2>&1 1>/dev/null | \
- sed -e '/: warning:/d' | \
- texi2index >ld-index.me
-
-stage1: force
- -mkdir stage1
- -mv -f $(STAGESTUFF) $(LD_PROG) stage1
- -(cd stage1 ; ln -s $(LD_PROG) ld)
-
-stage2: force
- -mkdir stage2
- -mv -f $(STAGESTUFF) $(LD_PROG) stage2
- -(cd stage2 ; ln -s $(LD_PROG) ld)
-
-stage3: force
- -mkdir stage3
- -mv -f $(STAGESTUFF) $(LD_PROG) stage3
- -(cd stage3 ; ln -s $(LD_PROG) ld)
-
-against = stage2
-
-comparison: force
- for i in $(STAGESTUFF) $(LD_PROG) ; do cmp $$i $(against)/$$i ; done
-
-de-stage1: force
- -(cd stage1 ; mv -f * ..)
- -rm ld
- -rmdir stage1
-
-de-stage2: force
- -(cd stage2 ; mv -f * ..)
- -rm ld
- -rmdir stage2
-
-de-stage3: force
- -(cd stage3 ; mv -f * ..)
- -rm ld
- -rmdir stage3
-
-.PHONY: stage1 stage2 stage3 comparison de-stage1 de-stage2 de-stage3
-
-# Stuff that should be included in a distribution:
-LDDISTSTUFF = ldgram.c ldgram.h ldlex.c
-diststuff: $(LDDISTSTUFF) info
-
-mostlyclean:
- -rm -f $(STAGESTUFF) ld.?? ld.??? ldlex.[qp]
- -rm -f ld ld1 ld2 ld3 *.o y.output cdtest cdtest.out cdtest.tmp
- -rm -f cdtest-ur cdtest-ur.out cdtest-ur.tmp crtbegin.o crtend.o
- -rm -f ldemul-list.h
- -rm -fr tmpdir
-clean: mostlyclean
- -rm -f $(LD_PROG)
-distclean: clean
- -rm -f Makefile config.status TAGS site.exp site.bak config.cache
- -rm -f config.h stamp-h config.log
- -rm -rf ldscripts
-maintainer-clean realclean: clean distclean
- @echo "This command is intended for maintainers to use;"
- @echo "it deletes files that may require special tools to rebuild."
- -rm -f $(GENERATED_CFILES) $(GENERATED_HFILES)
- -rm -f $(LDDISTSTUFF) *.info* configdoc.texi
-
-.PHONY: diststuff mostlyclean clean distclean realclean
-
-lintlog:$(LINTSOURCES) Makefile
- $(LINT) -abhxzn $(LINTFLAGS) $(LINTSOURCES) \
-| grep -v "pointer casts may be troublesome" \
-| grep -v "possible pointer alignment problem" \
-| grep -v "ignore" \
-| grep -v "conversion from long may lose accuracy" \
-| grep -v "warning: constant argument to NOT" \
-| grep -v "enumeration type clash, operator CAST" \
-| grep -v "warning: constant in conditional context"\
-| grep -v "archive\.c"
-
-
-TAGS:
- etags -t $(srcdir)/*.[chly] *.[chly]
-
-
-install:
- $(INSTALL_XFORM) ld.new $(bindir)/ld
- $(INSTALL_XFORM1) $(srcdir)/ld.1 $(man1dir)/ld.1
+ ln -s ${srcdir}/${DOCVER}-doc.texi ./configdoc.texi >/dev/null 2>&1 \
+ || ln ${srcdir}/${DOCVER}-doc.texi ./configdoc.texi >/dev/null 2>&1 \
+ || cp ${srcdir}/${DOCVER}-doc.texi ./configdoc.texi
+
+ld.info: $(srcdir)/ld.texinfo configdoc.texi
+ @rm -f $@ $@-[0-9] $@-[0-9][0-9]
+ $(MAKEINFO) -I $(srcdir) -I $(BFDDIR)/doc $(srcdir)/ld.texinfo
+
+ld.dvi: $(srcdir)/ld.texinfo configdoc.texi
+ TEXINPUTS=$(top_srcdir)/../texinfo:$$TEXINPUTS \
+ MAKEINFO='$(MAKEINFO) -I $(srcdir) -I $(BFDDIR)/doc' $(TEXI2DVI) $(srcdir)/ld.texinfo
+
+# We want to reconfigure if configure.host or configure.tgt changes.
+Makefile: configure.host configure.tgt
+mostlyclean-local:
+ -rm -rf tmpdir
+
+.PHONY: install-exec-local install-data-local
+
+install-exec-local: ld-new$(EXEEXT)
+ $(mkinstalldirs) $(bindir) $(tooldir)/bin
+ @list='$(noinst_PROGRAMS)'; for p in $$list; do \
+ if test -f $$p; then \
+ echo " $(LIBTOOL) --mode=install $(INSTALL_PROGRAM) $$p $(bindir)/`echo $$p|sed -e 's/-new//'|sed '$(transform)'`"; \
+ $(LIBTOOL) --mode=install $(INSTALL_PROGRAM) $$p $(bindir)/`echo $$p|sed -e 's/-new//'|sed '$(transform)'`; \
+ else :; fi; \
+ done
+ rm -f $(tooldir)/bin/ld$(EXEEXT)
+ n=`echo ld | sed '$(transform)'`; \
+ if [ "$(bindir)/$$n$(EXEEXT)" != "$(tooldir)/bin/ld$(EXEEXT)" ]; then \
+ ln $(bindir)/$$n$(EXEEXT) $(tooldir)/bin/ld$(EXEEXT) >/dev/null 2>/dev/null \
+ || $(LIBTOOL) --mode=install $(INSTALL_PROGRAM) ld-new$(EXEEXT) $(tooldir)/bin/ld$(EXEEXT); \
+ fi
+
+install-data-local:
+ $(mkinstalldirs) $(scriptdir)
for f in ldscripts/*; do \
$(INSTALL_DATA) $$f $(scriptdir)/$$f ; \
done
- test -d $(tooldir) || mkdir $(tooldir)
- test -d $(tooldir)/bin || mkdir $(tooldir)/bin
- -n=`echo ld | sed '$(program_transform_name)'`; \
- rm -f $(tooldir)/bin/ld; \
- ln $(bindir)/$$n $(tooldir)/bin/ld >/dev/null 2>/dev/null \
- || $(INSTALL_PROGRAM) ld.new $(tooldir)/bin/ld
-
-install-info: ld.info
- if [ -r ld.info ]; then \
- dir=. ; \
- else \
- dir=$(srcdir) ; \
- fi ; \
- for i in `cd $$dir ; echo ld.info*` ; do \
- $(INSTALL_DATA) $$dir/$$i $(infodir)/$$i ; \
- done
-
-clean-info:
- -rm -rf *.info*
+diststuff: $(LDDISTSTUFF) info
-.PHONY: install install-info clean-info
+distclean-local:
+ rm -rf ldscripts
# Targets to rebuild dependencies in this Makefile.
# Have to get rid of .dep1 here so that "$?" later includes all of $(CFILES).
@@ -976,7 +1183,7 @@ clean-info:
.dep1: $(CFILES) $(GENERATED_CFILES)
rm -f .dep2
echo '# DO NOT DELETE THIS LINE -- mkdep uses it.' > .dep2
- $(DEP) -f .dep2 $(ALL_CFLAGS) $?
+ $(DEP) -f .dep2 $(INCLUDES) $?
$(srcdir)/../move-if-change .dep2 .dep1
dep.sed: dep-in.sed config.status
@@ -994,23 +1201,12 @@ dep-in: .dep
cat .dep >> tmp-Makefile.in
$(srcdir)/../move-if-change tmp-Makefile.in $(srcdir)/Makefile.in
-.PHONY: dep dep-in
-
-# Dummy target to force execution of dependent targets.
-#
-force:
-
-.PHONY: force
-
-Makefile: Makefile.in config.status
- CONFIG_FILES=Makefile CONFIG_HEADERS= $(SHELL) ./config.status
+dep-am: .dep
+ sed -e '/^..DO NOT DELETE THIS LINE/,$$d' < $(srcdir)/Makefile.am > tmp-Makefile.am
+ cat .dep >> tmp-Makefile.am
+ $(srcdir)/../move-if-change tmp-Makefile.am $(srcdir)/Makefile.am
-config.h: stamp-h ; @true
-stamp-h: config.in config.status
- CONFIG_FILES= CONFIG_HEADERS=config.h:config.in $(SHELL) ./config.status
-
-config.status: configure configure.host configure.tgt
- $(SHELL) ./config.status --recheck
+.PHONY: dep dep-in dep-am
# What appears below is generated by a hacked mkdep using gcc -MM.
@@ -1072,3 +1268,7 @@ ldlex.o: ldlex.c ../bfd/bfd.h sysdep.h config.h $(INCDIR)/fopen-same.h \
ldmain.h
# IF YOU PUT ANYTHING HERE IT WILL GO AWAY
+
+# Tell versions [3.59,3.63) of GNU make to not export all variables.
+# Otherwise a system limit (for SysV at least) may be exceeded.
+.NOEXPORT:
diff --git a/contrib/binutils/ld/NEWS b/contrib/binutils/ld/NEWS
index b2449c4..ba32596 100644
--- a/contrib/binutils/ld/NEWS
+++ b/contrib/binutils/ld/NEWS
@@ -1,5 +1,14 @@
-*- text -*-
+Changes in version 2.9:
+
+* Added SQUAD to the linker script language.
+
+* New option --no-warn-mismatch.
+
+* The MEMORY command now parses the attributes to determine where sections that
+are not placed in a specific memory region are placed.
+
Changes in version 2.8:
* Linker scripts may now contain shell wildcard characters for file and section
diff --git a/contrib/binutils/ld/README b/contrib/binutils/ld/README
index 4efa989..8947d04 100644
--- a/contrib/binutils/ld/README
+++ b/contrib/binutils/ld/README
@@ -1,21 +1,20 @@
-This is a BETA release of a completely rewritten GNU linker.
-It is distributed with other "binary utilities" which should
-be in ../binutils. See ../binutils/README for more general notes,
-including where to send bug reports.
+This is the GNU linker. It is distributed with other "binary
+utilities" which should be in ../binutils. See ../binutils/README for
+more general notes, including where to send bug reports.
-There are many new features of the linker:
+There are many features of the linker:
* The linker uses a Binary File Descriptor library (../bfd)
that it uses to read and write object files. This helps
insulate the linker itself from the format of object files.
-* The linker support a number of different object file
+* The linker supports a number of different object file
formats. It can even handle multiple formats at once:
Read two input formats and write a third.
* The linker can be configured for cross-linking.
-* The linker contains a control language.
+* The linker supports a control language.
* There is a user manual (ld.texinfo), as well as the
beginnings of an internals manual (ldint.texinfo).
@@ -29,7 +28,8 @@ If you want to make a cross-linker, you may want to specify
a different search path of -lfoo libraries than the default.
You can do this by setting the LIB_PATH variable in ./Makefile.
-To build just the linker, make the target all-ld.
+To build just the linker, make the target all-ld from the top level
+directory (one directory above this one).
Porting to a new target
=======================
@@ -38,11 +38,21 @@ See the ldint.texinfo manual.
Reporting bugs etc
===========================
+
See ../binutils/README.
Known problems
==============
+The Solaris linker normally exports all dynamic symbols from an
+executable. The GNU linker does not do this by default. This is
+because the GNU linker tries to present the same interface for all
+similar targets (in this case, all native ELF targets). This does not
+matter for normal programs, but it can make a difference for programs
+which try to dlopen an executable, such as PERL or Tcl. You can make
+the GNU linker export all dynamic symbols with the -E or
+--export-dynamic command line option.
+
HP/UX 9.01 has a shell bug that causes the linker scripts to be
generated incorrectly. The symptom of this appears to be "fatal error
- scanner input buffer overflow" error messages. There are various
diff --git a/contrib/binutils/ld/acconfig.h b/contrib/binutils/ld/acconfig.h
index 6034cad..c627d7f 100644
--- a/contrib/binutils/ld/acconfig.h
+++ b/contrib/binutils/ld/acconfig.h
@@ -1,4 +1,10 @@
+/* Name of package. */
+#undef PACKAGE
+
+/* Version of package. */
+#undef VERSION
+
/* Whether strstr must be declared even if <string.h> is included. */
#undef NEED_DECLARATION_STRSTR
diff --git a/contrib/binutils/ld/acinclude.m4 b/contrib/binutils/ld/acinclude.m4
new file mode 100644
index 0000000..71b09b9
--- /dev/null
+++ b/contrib/binutils/ld/acinclude.m4
@@ -0,0 +1 @@
+sinclude(../bfd/acinclude.m4)
diff --git a/contrib/binutils/ld/aclocal.m4 b/contrib/binutils/ld/aclocal.m4
index 7adc004..cbf8bd1 100644
--- a/contrib/binutils/ld/aclocal.m4
+++ b/contrib/binutils/ld/aclocal.m4
@@ -1 +1,460 @@
-sinclude(../bfd/aclocal.m4)
+dnl aclocal.m4 generated automatically by aclocal 1.2e
+
+dnl Copyright (C) 1994, 1995, 1996, 1997, 1998 Free Software Foundation, Inc.
+dnl This Makefile.in is free software; the Free Software Foundation
+dnl gives unlimited permission to copy and/or distribute it,
+dnl with or without modifications, as long as this notice is preserved.
+
+dnl This program is distributed in the hope that it will be useful,
+dnl but WITHOUT ANY WARRANTY, to the extent permitted by law; without
+dnl even the implied warranty of MERCHANTABILITY or FITNESS FOR A
+dnl PARTICULAR PURPOSE.
+
+sinclude(../bfd/acinclude.m4)
+
+# Do all the work for Automake. This macro actually does too much --
+# some checks are only needed if your package does certain things.
+# But this isn't really a big deal.
+
+# serial 1
+
+dnl Usage:
+dnl AM_INIT_AUTOMAKE(package,version, [no-define])
+
+AC_DEFUN(AM_INIT_AUTOMAKE,
+[AC_REQUIRE([AM_PROG_INSTALL])
+PACKAGE=[$1]
+AC_SUBST(PACKAGE)
+VERSION=[$2]
+AC_SUBST(VERSION)
+dnl test to see if srcdir already configured
+if test "`cd $srcdir && pwd`" != "`pwd`" && test -f $srcdir/config.status; then
+ AC_MSG_ERROR([source directory already configured; run "make distclean" there first])
+fi
+ifelse([$3],,
+AC_DEFINE_UNQUOTED(PACKAGE, "$PACKAGE")
+AC_DEFINE_UNQUOTED(VERSION, "$VERSION"))
+AC_REQUIRE([AM_SANITY_CHECK])
+AC_REQUIRE([AC_ARG_PROGRAM])
+dnl FIXME This is truly gross.
+missing_dir=`cd $ac_aux_dir && pwd`
+AM_MISSING_PROG(ACLOCAL, aclocal, $missing_dir)
+AM_MISSING_PROG(AUTOCONF, autoconf, $missing_dir)
+AM_MISSING_PROG(AUTOMAKE, automake, $missing_dir)
+AM_MISSING_PROG(AUTOHEADER, autoheader, $missing_dir)
+AM_MISSING_PROG(MAKEINFO, makeinfo, $missing_dir)
+AC_REQUIRE([AC_PROG_MAKE_SET])])
+
+
+# serial 1
+
+AC_DEFUN(AM_PROG_INSTALL,
+[AC_REQUIRE([AC_PROG_INSTALL])
+test -z "$INSTALL_SCRIPT" && INSTALL_SCRIPT='${INSTALL_PROGRAM}'
+AC_SUBST(INSTALL_SCRIPT)dnl
+])
+
+#
+# Check to make sure that the build environment is sane.
+#
+
+AC_DEFUN(AM_SANITY_CHECK,
+[AC_MSG_CHECKING([whether build environment is sane])
+# Just in case
+sleep 1
+echo timestamp > conftestfile
+# Do `set' in a subshell so we don't clobber the current shell's
+# arguments. Must try -L first in case configure is actually a
+# symlink; some systems play weird games with the mod time of symlinks
+# (eg FreeBSD returns the mod time of the symlink's containing
+# directory).
+if (
+ set X `ls -Lt $srcdir/configure conftestfile 2> /dev/null`
+ if test "[$]*" = "X"; then
+ # -L didn't work.
+ set X `ls -t $srcdir/configure conftestfile`
+ fi
+ if test "[$]*" != "X $srcdir/configure conftestfile" \
+ && test "[$]*" != "X conftestfile $srcdir/configure"; then
+
+ # If neither matched, then we have a broken ls. This can happen
+ # if, for instance, CONFIG_SHELL is bash and it inherits a
+ # broken ls alias from the environment. This has actually
+ # happened. Such a system could not be considered "sane".
+ AC_MSG_ERROR([ls -t appears to fail. Make sure there is not a broken
+alias in your environment])
+ fi
+
+ test "[$]2" = conftestfile
+ )
+then
+ # Ok.
+ :
+else
+ AC_MSG_ERROR([newly created file is older than distributed files!
+Check your system clock])
+fi
+rm -f conftest*
+AC_MSG_RESULT(yes)])
+
+dnl AM_MISSING_PROG(NAME, PROGRAM, DIRECTORY)
+dnl The program must properly implement --version.
+AC_DEFUN(AM_MISSING_PROG,
+[AC_MSG_CHECKING(for working $2)
+# Run test in a subshell; some versions of sh will print an error if
+# an executable is not found, even if stderr is redirected.
+# Redirect stdin to placate older versions of autoconf. Sigh.
+if ($2 --version) < /dev/null > /dev/null 2>&1; then
+ $1=$2
+ AC_MSG_RESULT(found)
+else
+ $1="$3/missing $2"
+ AC_MSG_RESULT(missing)
+fi
+AC_SUBST($1)])
+
+
+# serial 24 AM_PROG_LIBTOOL
+AC_DEFUN(AM_PROG_LIBTOOL,
+[AC_REQUIRE([AM_ENABLE_SHARED])dnl
+AC_REQUIRE([AM_ENABLE_STATIC])dnl
+AC_REQUIRE([AC_CANONICAL_HOST])dnl
+AC_REQUIRE([AC_PROG_RANLIB])dnl
+AC_REQUIRE([AC_PROG_CC])dnl
+AC_REQUIRE([AM_PROG_LD])dnl
+AC_REQUIRE([AM_PROG_NM])dnl
+AC_REQUIRE([AC_PROG_LN_S])dnl
+dnl
+# Always use our own libtool.
+LIBTOOL='$(SHELL) $(top_builddir)/libtool'
+AC_SUBST(LIBTOOL)dnl
+
+# Check for any special flags to pass to ltconfig.
+libtool_flags=
+test "$enable_shared" = no && libtool_flags="$libtool_flags --disable-shared"
+test "$enable_static" = no && libtool_flags="$libtool_flags --disable-static"
+test "$silent" = yes && libtool_flags="$libtool_flags --silent"
+test "$ac_cv_prog_gcc" = yes && libtool_flags="$libtool_flags --with-gcc"
+test "$ac_cv_prog_gnu_ld" = yes && libtool_flags="$libtool_flags --with-gnu-ld"
+
+# Some flags need to be propagated to the compiler or linker for good
+# libtool support.
+case "$host" in
+*-*-irix6*)
+ # Find out which ABI we are using.
+ echo '[#]line __oline__ "configure"' > conftest.$ac_ext
+ if AC_TRY_EVAL(ac_compile); then
+ case "`/usr/bin/file conftest.o`" in
+ *32-bit*)
+ LD="${LD-ld} -32"
+ ;;
+ *N32*)
+ LD="${LD-ld} -n32"
+ ;;
+ *64-bit*)
+ LD="${LD-ld} -64"
+ ;;
+ esac
+ fi
+ rm -rf conftest*
+ ;;
+
+*-*-sco3.2v5*)
+ # On SCO OpenServer 5, we need -belf to get full-featured binaries.
+ CFLAGS="$CFLAGS -belf"
+ ;;
+esac
+
+# Actually configure libtool. ac_aux_dir is where install-sh is found.
+CC="$CC" CFLAGS="$CFLAGS" CPPFLAGS="$CPPFLAGS" \
+LD="$LD" NM="$NM" RANLIB="$RANLIB" LN_S="$LN_S" \
+${CONFIG_SHELL-/bin/sh} $ac_aux_dir/ltconfig \
+$libtool_flags --no-verify $ac_aux_dir/ltmain.sh $host \
+|| AC_MSG_ERROR([libtool configure failed])
+])
+
+# AM_ENABLE_SHARED - implement the --enable-shared flag
+# Usage: AM_ENABLE_SHARED[(DEFAULT)]
+# Where DEFAULT is either `yes' or `no'. If omitted, it defaults to
+# `yes'.
+AC_DEFUN(AM_ENABLE_SHARED,
+[define([AM_ENABLE_SHARED_DEFAULT], ifelse($1, no, no, yes))dnl
+AC_ARG_ENABLE(shared,
+changequote(<<, >>)dnl
+<< --enable-shared build shared libraries [default=>>AM_ENABLE_SHARED_DEFAULT]
+changequote([, ])dnl
+[ --enable-shared=PKGS only build shared libraries if the current package
+ appears as an element in the PKGS list],
+[p=${PACKAGE-default}
+case "$enableval" in
+yes) enable_shared=yes ;;
+no) enable_shared=no ;;
+*)
+ enable_shared=no
+ # Look at the argument we got. We use all the common list separators.
+ IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS="${IFS}:,"
+ for pkg in $enableval; do
+ if test "X$pkg" = "X$p"; then
+ enable_shared=yes
+ fi
+ done
+ IFS="$ac_save_ifs"
+ ;;
+esac],
+enable_shared=AM_ENABLE_SHARED_DEFAULT)dnl
+])
+
+# AM_DISABLE_SHARED - set the default shared flag to --disable-shared
+AC_DEFUN(AM_DISABLE_SHARED,
+[AM_ENABLE_SHARED(no)])
+
+# AM_DISABLE_STATIC - set the default static flag to --disable-static
+AC_DEFUN(AM_DISABLE_STATIC,
+[AM_ENABLE_STATIC(no)])
+
+# AM_ENABLE_STATIC - implement the --enable-static flag
+# Usage: AM_ENABLE_STATIC[(DEFAULT)]
+# Where DEFAULT is either `yes' or `no'. If omitted, it defaults to
+# `yes'.
+AC_DEFUN(AM_ENABLE_STATIC,
+[define([AM_ENABLE_STATIC_DEFAULT], ifelse($1, no, no, yes))dnl
+AC_ARG_ENABLE(static,
+changequote(<<, >>)dnl
+<< --enable-static build static libraries [default=>>AM_ENABLE_STATIC_DEFAULT]
+changequote([, ])dnl
+[ --enable-static=PKGS only build shared libraries if the current package
+ appears as an element in the PKGS list],
+[p=${PACKAGE-default}
+case "$enableval" in
+yes) enable_static=yes ;;
+no) enable_static=no ;;
+*)
+ enable_static=no
+ # Look at the argument we got. We use all the common list separators.
+ IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS="${IFS}:,"
+ for pkg in $enableval; do
+ if test "X$pkg" = "X$p"; then
+ enable_static=yes
+ fi
+ done
+ IFS="$ac_save_ifs"
+ ;;
+esac],
+enable_static=AM_ENABLE_STATIC_DEFAULT)dnl
+])
+
+
+# AM_PROG_LD - find the path to the GNU or non-GNU linker
+AC_DEFUN(AM_PROG_LD,
+[AC_ARG_WITH(gnu-ld,
+[ --with-gnu-ld assume the C compiler uses GNU ld [default=no]],
+test "$withval" = no || with_gnu_ld=yes, with_gnu_ld=no)
+AC_REQUIRE([AC_PROG_CC])
+ac_prog=ld
+if test "$ac_cv_prog_gcc" = yes; then
+ # Check if gcc -print-prog-name=ld gives a path.
+ AC_MSG_CHECKING([for ld used by GCC])
+ ac_prog=`($CC -print-prog-name=ld) 2>&5`
+ case "$ac_prog" in
+ # Accept absolute paths.
+changequote(,)dnl
+ /* | [A-Za-z]:\\*)
+changequote([,])dnl
+ test -z "$LD" && LD="$ac_prog"
+ ;;
+ "")
+ # If it fails, then pretend we aren't using GCC.
+ ac_prog=ld
+ ;;
+ *)
+ # If it is relative, then search for the first ld in PATH.
+ with_gnu_ld=unknown
+ ;;
+ esac
+elif test "$with_gnu_ld" = yes; then
+ AC_MSG_CHECKING([for GNU ld])
+else
+ AC_MSG_CHECKING([for non-GNU ld])
+fi
+AC_CACHE_VAL(ac_cv_path_LD,
+[if test -z "$LD"; then
+ IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS="${IFS}:"
+ for ac_dir in $PATH; do
+ test -z "$ac_dir" && ac_dir=.
+ if test -f "$ac_dir/$ac_prog"; then
+ ac_cv_path_LD="$ac_dir/$ac_prog"
+ # Check to see if the program is GNU ld. I'd rather use --version,
+ # but apparently some GNU ld's only accept -v.
+ # Break only if it was the GNU/non-GNU ld that we prefer.
+ if "$ac_cv_path_LD" -v 2>&1 < /dev/null | egrep '(GNU|with BFD)' > /dev/null; then
+ test "$with_gnu_ld" != no && break
+ else
+ test "$with_gnu_ld" != yes && break
+ fi
+ fi
+ done
+ IFS="$ac_save_ifs"
+else
+ ac_cv_path_LD="$LD" # Let the user override the test with a path.
+fi])
+LD="$ac_cv_path_LD"
+if test -n "$LD"; then
+ AC_MSG_RESULT($LD)
+else
+ AC_MSG_RESULT(no)
+fi
+test -z "$LD" && AC_MSG_ERROR([no acceptable ld found in \$PATH])
+AC_SUBST(LD)
+AM_PROG_LD_GNU
+])
+
+AC_DEFUN(AM_PROG_LD_GNU,
+[AC_CACHE_CHECK([if the linker ($LD) is GNU ld], ac_cv_prog_gnu_ld,
+[# I'd rather use --version here, but apparently some GNU ld's only accept -v.
+if $LD -v 2>&1 </dev/null | egrep '(GNU|with BFD)' 1>&5; then
+ ac_cv_prog_gnu_ld=yes
+else
+ ac_cv_prog_gnu_ld=no
+fi])
+])
+
+# AM_PROG_NM - find the path to a BSD-compatible name lister
+AC_DEFUN(AM_PROG_NM,
+[AC_MSG_CHECKING([for BSD-compatible nm])
+AC_CACHE_VAL(ac_cv_path_NM,
+[case "$NM" in
+changequote(,)dnl
+/* | [A-Za-z]:\\*)
+changequote([,])dnl
+ ac_cv_path_NM="$NM" # Let the user override the test with a path.
+ ;;
+*)
+ IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS="${IFS}:"
+ for ac_dir in /usr/ucb /usr/ccs/bin $PATH /bin; do
+ test -z "$ac_dir" && ac_dir=.
+ if test -f $ac_dir/nm; then
+ # Check to see if the nm accepts a BSD-compat flag.
+ # Adding the `sed 1q' prevents false positives on HP-UX, which says:
+ # nm: unknown option "B" ignored
+ if ($ac_dir/nm -B /dev/null 2>&1 | sed '1q'; exit 0) | egrep /dev/null >/dev/null; then
+ ac_cv_path_NM="$ac_dir/nm -B"
+ elif ($ac_dir/nm -p /dev/null 2>&1 | sed '1q'; exit 0) | egrep /dev/null >/dev/null; then
+ ac_cv_path_NM="$ac_dir/nm -p"
+ else
+ ac_cv_path_NM="$ac_dir/nm"
+ fi
+ break
+ fi
+ done
+ IFS="$ac_save_ifs"
+ test -z "$ac_cv_path_NM" && ac_cv_path_NM=nm
+ ;;
+esac])
+NM="$ac_cv_path_NM"
+AC_MSG_RESULT([$NM])
+AC_SUBST(NM)
+])
+
+# Like AC_CONFIG_HEADER, but automatically create stamp file.
+
+AC_DEFUN(AM_CONFIG_HEADER,
+[AC_PREREQ([2.12])
+AC_CONFIG_HEADER([$1])
+dnl When config.status generates a header, we must update the stamp-h file.
+dnl This file resides in the same directory as the config header
+dnl that is generated. We must strip everything past the first ":",
+dnl and everything past the last "/".
+AC_OUTPUT_COMMANDS(changequote(<<,>>)dnl
+ifelse(patsubst(<<$1>>, <<[^ ]>>, <<>>), <<>>,
+<<test -z "<<$>>CONFIG_HEADERS" || echo timestamp > patsubst(<<$1>>, <<^\([^:]*/\)?.*>>, <<\1>>)stamp-h<<>>dnl>>,
+<<am_indx=1
+for am_file in <<$1>>; do
+ case " <<$>>CONFIG_HEADERS " in
+ *" <<$>>am_file "*<<)>>
+ echo timestamp > `echo <<$>>am_file | sed -e 's%:.*%%' -e 's%[^/]*$%%'`stamp-h$am_indx
+ ;;
+ esac
+ am_indx=`expr "<<$>>am_indx" + 1`
+done<<>>dnl>>)
+changequote([,]))])
+
+# Check to see if we're running under Cygwin32, without using
+# AC_CANONICAL_*. If so, set output variable CYGWIN32 to "yes".
+# Otherwise set it to "no".
+
+dnl AM_CYGWIN32()
+AC_DEFUN(AM_CYGWIN32,
+[AC_CACHE_CHECK(for Cygwin32 environment, am_cv_cygwin32,
+[AC_TRY_COMPILE(,[return __CYGWIN32__;],
+am_cv_cygwin32=yes, am_cv_cygwin32=no)
+rm -f conftest*])
+CYGWIN32=
+test "$am_cv_cygwin32" = yes && CYGWIN32=yes])
+
+# Check to see if we're running under Win32, without using
+# AC_CANONICAL_*. If so, set output variable EXEEXT to ".exe".
+# Otherwise set it to "".
+
+dnl AM_EXEEXT()
+dnl This knows we add .exe if we're building in the Cygwin32
+dnl environment. But if we're not, then it compiles a test program
+dnl to see if there is a suffix for executables.
+AC_DEFUN(AM_EXEEXT,
+[AC_REQUIRE([AM_CYGWIN32])
+AC_REQUIRE([AM_MINGW32])
+AC_MSG_CHECKING([for executable suffix])
+AC_CACHE_VAL(am_cv_exeext,
+[if test "$CYGWIN32" = yes || test "$MINGW32" = yes; then
+am_cv_exeext=.exe
+else
+cat > am_c_test.c << 'EOF'
+int main() {
+/* Nothing needed here */
+}
+EOF
+${CC-cc} -o am_c_test $CFLAGS $CPPFLAGS $LDFLAGS am_c_test.c $LIBS 1>&5
+am_cv_exeext=`echo am_c_test.* | grep -v am_c_test.c | sed -e s/am_c_test//`
+rm -f am_c_test*])
+test x"${am_cv_exeext}" = x && am_cv_exeext=no
+fi
+EXEEXT=""
+test x"${am_cv_exeext}" != xno && EXEEXT=${am_cv_exeext}
+AC_MSG_RESULT(${am_cv_exeext})
+AC_SUBST(EXEEXT)])
+
+# Check to see if we're running under Mingw, without using
+# AC_CANONICAL_*. If so, set output variable MINGW32 to "yes".
+# Otherwise set it to "no".
+
+dnl AM_MINGW32()
+AC_DEFUN(AM_MINGW32,
+[AC_CACHE_CHECK(for Mingw32 environment, am_cv_mingw32,
+[AC_TRY_COMPILE(,[return __MINGW32__;],
+am_cv_mingw32=yes, am_cv_mingw32=no)
+rm -f conftest*])
+MINGW32=
+test "$am_cv_mingw32" = yes && MINGW32=yes])
+
+# Add --enable-maintainer-mode option to configure.
+# From Jim Meyering
+
+# serial 1
+
+AC_DEFUN(AM_MAINTAINER_MODE,
+[AC_MSG_CHECKING([whether to enable maintainer-specific portions of Makefiles])
+ dnl maintainer-mode is disabled by default
+ AC_ARG_ENABLE(maintainer-mode,
+[ --enable-maintainer-mode enable make rules and dependencies not useful
+ (and sometimes confusing) to the casual installer],
+ USE_MAINTAINER_MODE=$enableval,
+ USE_MAINTAINER_MODE=no)
+ AC_MSG_RESULT($USE_MAINTAINER_MODE)
+ if test $USE_MAINTAINER_MODE = yes; then
+ MAINT=
+ else
+ MAINT='#M#'
+ fi
+ AC_SUBST(MAINT)dnl
+]
+)
+
diff --git a/contrib/binutils/ld/config.in b/contrib/binutils/ld/config.in
index 4313165..a9de5b8 100644
--- a/contrib/binutils/ld/config.in
+++ b/contrib/binutils/ld/config.in
@@ -1,5 +1,11 @@
/* config.in. Generated automatically from configure.in by autoheader. */
+/* Name of package. */
+#undef PACKAGE
+
+/* Version of package. */
+#undef VERSION
+
/* Whether strstr must be declared even if <string.h> is included. */
#undef NEED_DECLARATION_STRSTR
@@ -12,6 +18,9 @@
/* Whether getenv must be declared even if <stdlib.h> is included. */
#undef NEED_DECLARATION_GETENV
+/* Define if lex declares yytext as a char * by default, not a char[]. */
+#undef YYTEXT_POINTER
+
/* Do we need to use the b modifier when opening binary files? */
#undef USE_BINARY_FOPEN
diff --git a/contrib/binutils/ld/configure b/contrib/binutils/ld/configure
index f0d151e..d15e3d2 100755
--- a/contrib/binutils/ld/configure
+++ b/contrib/binutils/ld/configure
@@ -1,7 +1,7 @@
#! /bin/sh
# Guess values for system-dependent variables and create Makefiles.
-# Generated automatically using autoconf version 2.12
+# Generated automatically using autoconf version 2.12.1
# Copyright (C) 1992, 93, 94, 95, 96 Free Software Foundation, Inc.
#
# This configure script is free software; the Free Software Foundation
@@ -12,11 +12,22 @@ ac_help=
ac_default_prefix=/usr/local
# Any additions from configure.in:
ac_help="$ac_help
- --enable-targets alternative target configurations"
+ --enable-shared build shared libraries [default=yes]
+ --enable-shared=PKGS only build shared libraries if the current package
+ appears as an element in the PKGS list"
+ac_help="$ac_help
+ --enable-static build static libraries [default=yes]
+ --enable-static=PKGS only build shared libraries if the current package
+ appears as an element in the PKGS list"
ac_help="$ac_help
- --enable-shared build shared BFD library"
+ --with-gnu-ld assume the C compiler uses GNU ld [default=no]"
+ac_help="$ac_help
+ --enable-targets alternative target configurations"
ac_help="$ac_help
--enable-64-bit-bfd 64-bit support (on hosts with narrower word sizes)"
+ac_help="$ac_help
+ --enable-maintainer-mode enable make rules and dependencies not useful
+ (and sometimes confusing) to the casual installer"
# Initialize some variables set by options.
# The variables have the same names as the options, with
@@ -55,6 +66,7 @@ mandir='${prefix}/man'
# Initialize some other variables.
subdirs=
MFLAGS= MAKEFLAGS=
+SHELL=${CONFIG_SHELL-/bin/sh}
# Maximum number of lines to put in a shell here document.
ac_max_here_lines=12
@@ -338,7 +350,7 @@ EOF
verbose=yes ;;
-version | --version | --versio | --versi | --vers)
- echo "configure generated by autoconf version 2.12"
+ echo "configure generated by autoconf version 2.12.1"
exit 0 ;;
-with-* | --with-*)
@@ -525,42 +537,8 @@ fi
-# Check whether --enable-targets or --disable-targets was given.
-if test "${enable_targets+set}" = set; then
- enableval="$enable_targets"
- case "${enableval}" in
- yes | "") { echo "configure: error: enable-targets option must specify target names or 'all'" 1>&2; exit 1; }
- ;;
- no) enable_targets= ;;
- *) enable_targets=$enableval ;;
-esac
-fi
-# Check whether --enable-shared or --disable-shared was given.
-if test "${enable_shared+set}" = set; then
- enableval="$enable_shared"
- case "${enableval}" in
- yes) shared=true ;;
- no) shared=false ;;
- *bfd*) shared=true ;;
- *) shared=false ;;
-esac
-fi
-# Check whether --enable-64-bit-bfd or --disable-64-bit-bfd was given.
-if test "${enable_64_bit_bfd+set}" = set; then
- enableval="$enable_64_bit_bfd"
- case "${enableval}" in
- yes) want64=true ;;
- no) want64=false ;;
- *) { echo "configure: error: bad value ${enableval} for 64-bit-bfd option" 1>&2; exit 1; } ;;
-esac
-else
- want64=false
-fi
-
-
-
ac_aux_dir=
-for ac_dir in `cd $srcdir/..; pwd` $srcdir/`cd $srcdir/..; pwd`; do
+for ac_dir in $srcdir $srcdir/.. $srcdir/../..; do
if test -f $ac_dir/install-sh; then
ac_aux_dir=$ac_dir
ac_install_sh="$ac_aux_dir/install-sh -c"
@@ -572,7 +550,7 @@ for ac_dir in `cd $srcdir/..; pwd` $srcdir/`cd $srcdir/..; pwd`; do
fi
done
if test -z "$ac_aux_dir"; then
- { echo "configure: error: can not find install-sh or install.sh in `cd $srcdir/..; pwd` $srcdir/`cd $srcdir/..; pwd`" 1>&2; exit 1; }
+ { echo "configure: error: can not find install-sh or install.sh in $srcdir $srcdir/.. $srcdir/../.." 1>&2; exit 1; }
fi
ac_config_guess=$ac_aux_dir/config.guess
ac_config_sub=$ac_aux_dir/config.sub
@@ -601,33 +579,33 @@ esac
# Make sure we can run config.sub.
-if $ac_config_sub sun4 >/dev/null 2>&1; then :
+if ${CONFIG_SHELL-/bin/sh} $ac_config_sub sun4 >/dev/null 2>&1; then :
else { echo "configure: error: can not run $ac_config_sub" 1>&2; exit 1; }
fi
echo $ac_n "checking host system type""... $ac_c" 1>&6
-echo "configure:610: checking host system type" >&5
+echo "configure:588: checking host system type" >&5
host_alias=$host
case "$host_alias" in
NONE)
case $nonopt in
NONE)
- if host_alias=`$ac_config_guess`; then :
+ if host_alias=`${CONFIG_SHELL-/bin/sh} $ac_config_guess`; then :
else { echo "configure: error: can not guess host type; you must specify one" 1>&2; exit 1; }
fi ;;
*) host_alias=$nonopt ;;
esac ;;
esac
-host=`$ac_config_sub $host_alias`
+host=`${CONFIG_SHELL-/bin/sh} $ac_config_sub $host_alias`
host_cpu=`echo $host | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\1/'`
host_vendor=`echo $host | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\2/'`
host_os=`echo $host | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\3/'`
echo "$ac_t""$host" 1>&6
echo $ac_n "checking target system type""... $ac_c" 1>&6
-echo "configure:631: checking target system type" >&5
+echo "configure:609: checking target system type" >&5
target_alias=$target
case "$target_alias" in
@@ -638,14 +616,14 @@ NONE)
esac ;;
esac
-target=`$ac_config_sub $target_alias`
+target=`${CONFIG_SHELL-/bin/sh} $ac_config_sub $target_alias`
target_cpu=`echo $target | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\1/'`
target_vendor=`echo $target | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\2/'`
target_os=`echo $target | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\3/'`
echo "$ac_t""$target" 1>&6
echo $ac_n "checking build system type""... $ac_c" 1>&6
-echo "configure:649: checking build system type" >&5
+echo "configure:627: checking build system type" >&5
build_alias=$build
case "$build_alias" in
@@ -656,7 +634,7 @@ NONE)
esac ;;
esac
-build=`$ac_config_sub $build_alias`
+build=`${CONFIG_SHELL-/bin/sh} $ac_config_sub $build_alias`
build_cpu=`echo $build | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\1/'`
build_vendor=`echo $build | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\2/'`
build_os=`echo $build | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\3/'`
@@ -667,12 +645,110 @@ test "$host_alias" != "$target_alias" &&
NONENONEs,x,x, &&
program_prefix=${target_alias}-
-if test -z "$target" ; then
- { echo "configure: error: Unrecognized target system type; please check config.sub." 1>&2; exit 1; }
+
+# Find a good install program. We prefer a C program (faster),
+# so one script is as good as another. But avoid the broken or
+# incompatible versions:
+# SysV /etc/install, /usr/sbin/install
+# SunOS /usr/etc/install
+# IRIX /sbin/install
+# AIX /bin/install
+# AIX 4 /usr/bin/installbsd, which doesn't work without a -g flag
+# AFS /usr/afsws/bin/install, which mishandles nonexistent args
+# SVR4 /usr/ucb/install, which tries to use the nonexistent group "staff"
+# ./install, which can be erroneously created by make from ./install.sh.
+echo $ac_n "checking for a BSD compatible install""... $ac_c" 1>&6
+echo "configure:662: checking for a BSD compatible install" >&5
+if test -z "$INSTALL"; then
+if eval "test \"`echo '$''{'ac_cv_path_install'+set}'`\" = set"; then
+ echo $ac_n "(cached) $ac_c" 1>&6
+else
+ IFS="${IFS= }"; ac_save_IFS="$IFS"; IFS="${IFS}:"
+ for ac_dir in $PATH; do
+ # Account for people who put trailing slashes in PATH elements.
+ case "$ac_dir/" in
+ /|./|.//|/etc/*|/usr/sbin/*|/usr/etc/*|/sbin/*|/usr/afsws/bin/*|/usr/ucb/*) ;;
+ *)
+ # OSF1 and SCO ODT 3.0 have their own names for install.
+ # Don't use installbsd from OSF since it installs stuff as root
+ # by default.
+ for ac_prog in ginstall scoinst install; do
+ if test -f $ac_dir/$ac_prog; then
+ if test $ac_prog = install &&
+ grep dspmsg $ac_dir/$ac_prog >/dev/null 2>&1; then
+ # AIX install. It has an incompatible calling convention.
+ :
+ else
+ ac_cv_path_install="$ac_dir/$ac_prog -c"
+ break 2
+ fi
+ fi
+ done
+ ;;
+ esac
+ done
+ IFS="$ac_save_IFS"
+
fi
-if test -z "$host" ; then
- { echo "configure: error: Unrecognized host system type; please check config.sub." 1>&2; exit 1; }
+ if test "${ac_cv_path_install+set}" = set; then
+ INSTALL="$ac_cv_path_install"
+ else
+ # As a last resort, use the slow shell script. We don't cache a
+ # path for INSTALL within a source directory, because that will
+ # break other packages using the cache if that directory is
+ # removed, or if the path is relative.
+ INSTALL="$ac_install_sh"
+ fi
+fi
+echo "$ac_t""$INSTALL" 1>&6
+
+# Use test -z because SunOS4 sh mishandles braces in ${var-val}.
+# It thinks the first close brace ends the variable substitution.
+test -z "$INSTALL_PROGRAM" && INSTALL_PROGRAM='${INSTALL}'
+
+test -z "$INSTALL_DATA" && INSTALL_DATA='${INSTALL} -m 644'
+
+
+test -z "$INSTALL_SCRIPT" && INSTALL_SCRIPT='${INSTALL_PROGRAM}'
+
+echo $ac_n "checking whether build environment is sane""... $ac_c" 1>&6
+echo "configure:716: checking whether build environment is sane" >&5
+# Just in case
+sleep 1
+echo timestamp > conftestfile
+# Do `set' in a subshell so we don't clobber the current shell's
+# arguments. Must try -L first in case configure is actually a
+# symlink; some systems play weird games with the mod time of symlinks
+# (eg FreeBSD returns the mod time of the symlink's containing
+# directory).
+if (
+ set X `ls -Lt $srcdir/configure conftestfile 2> /dev/null`
+ if test "$*" = "X"; then
+ # -L didn't work.
+ set X `ls -t $srcdir/configure conftestfile`
+ fi
+ if test "$*" != "X $srcdir/configure conftestfile" \
+ && test "$*" != "X conftestfile $srcdir/configure"; then
+
+ # If neither matched, then we have a broken ls. This can happen
+ # if, for instance, CONFIG_SHELL is bash and it inherits a
+ # broken ls alias from the environment. This has actually
+ # happened. Such a system could not be considered "sane".
+ { echo "configure: error: ls -t appears to fail. Make sure there is not a broken
+alias in your environment" 1>&2; exit 1; }
+ fi
+
+ test "$2" = conftestfile
+ )
+then
+ # Ok.
+ :
+else
+ { echo "configure: error: newly created file is older than distributed files!
+Check your system clock" 1>&2; exit 1; }
fi
+rm -f conftest*
+echo "$ac_t""yes" 1>&6
if test "$program_transform_name" = s,x,x,; then
program_transform_name=
else
@@ -692,13 +768,198 @@ test "$program_suffix" != NONE &&
# sed with no file args requires a program.
test "$program_transform_name" = "" && program_transform_name="s,x,x,"
+echo $ac_n "checking whether ${MAKE-make} sets \${MAKE}""... $ac_c" 1>&6
+echo "configure:773: checking whether ${MAKE-make} sets \${MAKE}" >&5
+set dummy ${MAKE-make}; ac_make=`echo "$2" | sed 'y%./+-%__p_%'`
+if eval "test \"`echo '$''{'ac_cv_prog_make_${ac_make}_set'+set}'`\" = set"; then
+ echo $ac_n "(cached) $ac_c" 1>&6
+else
+ cat > conftestmake <<\EOF
+all:
+ @echo 'ac_maketemp="${MAKE}"'
+EOF
+# GNU make sometimes prints "make[1]: Entering...", which would confuse us.
+eval `${MAKE-make} -f conftestmake 2>/dev/null | grep temp=`
+if test -n "$ac_maketemp"; then
+ eval ac_cv_prog_make_${ac_make}_set=yes
+else
+ eval ac_cv_prog_make_${ac_make}_set=no
+fi
+rm -f conftestmake
+fi
+if eval "test \"`echo '$ac_cv_prog_make_'${ac_make}_set`\" = yes"; then
+ echo "$ac_t""yes" 1>&6
+ SET_MAKE=
+else
+ echo "$ac_t""no" 1>&6
+ SET_MAKE="MAKE=${MAKE-make}"
+fi
+
-# host-specific stuff:
+PACKAGE=ld
+
+VERSION=2.9.1
+
+if test "`cd $srcdir && pwd`" != "`pwd`" && test -f $srcdir/config.status; then
+ { echo "configure: error: source directory already configured; run "make distclean" there first" 1>&2; exit 1; }
+fi
+cat >> confdefs.h <<EOF
+#define PACKAGE "$PACKAGE"
+EOF
+
+cat >> confdefs.h <<EOF
+#define VERSION "$VERSION"
+EOF
+
+
+
+missing_dir=`cd $ac_aux_dir && pwd`
+echo $ac_n "checking for working aclocal""... $ac_c" 1>&6
+echo "configure:819: checking for working aclocal" >&5
+# Run test in a subshell; some versions of sh will print an error if
+# an executable is not found, even if stderr is redirected.
+# Redirect stdin to placate older versions of autoconf. Sigh.
+if (aclocal --version) < /dev/null > /dev/null 2>&1; then
+ ACLOCAL=aclocal
+ echo "$ac_t""found" 1>&6
+else
+ ACLOCAL="$missing_dir/missing aclocal"
+ echo "$ac_t""missing" 1>&6
+fi
+
+echo $ac_n "checking for working autoconf""... $ac_c" 1>&6
+echo "configure:832: checking for working autoconf" >&5
+# Run test in a subshell; some versions of sh will print an error if
+# an executable is not found, even if stderr is redirected.
+# Redirect stdin to placate older versions of autoconf. Sigh.
+if (autoconf --version) < /dev/null > /dev/null 2>&1; then
+ AUTOCONF=autoconf
+ echo "$ac_t""found" 1>&6
+else
+ AUTOCONF="$missing_dir/missing autoconf"
+ echo "$ac_t""missing" 1>&6
+fi
+
+echo $ac_n "checking for working automake""... $ac_c" 1>&6
+echo "configure:845: checking for working automake" >&5
+# Run test in a subshell; some versions of sh will print an error if
+# an executable is not found, even if stderr is redirected.
+# Redirect stdin to placate older versions of autoconf. Sigh.
+if (automake --version) < /dev/null > /dev/null 2>&1; then
+ AUTOMAKE=automake
+ echo "$ac_t""found" 1>&6
+else
+ AUTOMAKE="$missing_dir/missing automake"
+ echo "$ac_t""missing" 1>&6
+fi
+
+echo $ac_n "checking for working autoheader""... $ac_c" 1>&6
+echo "configure:858: checking for working autoheader" >&5
+# Run test in a subshell; some versions of sh will print an error if
+# an executable is not found, even if stderr is redirected.
+# Redirect stdin to placate older versions of autoconf. Sigh.
+if (autoheader --version) < /dev/null > /dev/null 2>&1; then
+ AUTOHEADER=autoheader
+ echo "$ac_t""found" 1>&6
+else
+ AUTOHEADER="$missing_dir/missing autoheader"
+ echo "$ac_t""missing" 1>&6
+fi
+
+echo $ac_n "checking for working makeinfo""... $ac_c" 1>&6
+echo "configure:871: checking for working makeinfo" >&5
+# Run test in a subshell; some versions of sh will print an error if
+# an executable is not found, even if stderr is redirected.
+# Redirect stdin to placate older versions of autoconf. Sigh.
+if (makeinfo --version) < /dev/null > /dev/null 2>&1; then
+ MAKEINFO=makeinfo
+ echo "$ac_t""found" 1>&6
+else
+ MAKEINFO="$missing_dir/missing makeinfo"
+ echo "$ac_t""missing" 1>&6
+fi
+
+
+
+# Check whether --enable-shared or --disable-shared was given.
+if test "${enable_shared+set}" = set; then
+ enableval="$enable_shared"
+ p=${PACKAGE-default}
+case "$enableval" in
+yes) enable_shared=yes ;;
+no) enable_shared=no ;;
+*)
+ enable_shared=no
+ # Look at the argument we got. We use all the common list separators.
+ IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS="${IFS}:,"
+ for pkg in $enableval; do
+ if test "X$pkg" = "X$p"; then
+ enable_shared=yes
+ fi
+ done
+ IFS="$ac_save_ifs"
+ ;;
+esac
+else
+ enable_shared=yes
+fi
+
+# Check whether --enable-static or --disable-static was given.
+if test "${enable_static+set}" = set; then
+ enableval="$enable_static"
+ p=${PACKAGE-default}
+case "$enableval" in
+yes) enable_static=yes ;;
+no) enable_static=no ;;
+*)
+ enable_static=no
+ # Look at the argument we got. We use all the common list separators.
+ IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS="${IFS}:,"
+ for pkg in $enableval; do
+ if test "X$pkg" = "X$p"; then
+ enable_static=yes
+ fi
+ done
+ IFS="$ac_save_ifs"
+ ;;
+esac
+else
+ enable_static=yes
+fi
+
+# Extract the first word of "ranlib", so it can be a program name with args.
+set dummy ranlib; ac_word=$2
+echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
+echo "configure:934: checking for $ac_word" >&5
+if eval "test \"`echo '$''{'ac_cv_prog_RANLIB'+set}'`\" = set"; then
+ echo $ac_n "(cached) $ac_c" 1>&6
+else
+ if test -n "$RANLIB"; then
+ ac_cv_prog_RANLIB="$RANLIB" # Let the user override the test.
+else
+ IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS="${IFS}:"
+ for ac_dir in $PATH; do
+ test -z "$ac_dir" && ac_dir=.
+ if test -f $ac_dir/$ac_word; then
+ ac_cv_prog_RANLIB="ranlib"
+ break
+ fi
+ done
+ IFS="$ac_save_ifs"
+ test -z "$ac_cv_prog_RANLIB" && ac_cv_prog_RANLIB=":"
+fi
+fi
+RANLIB="$ac_cv_prog_RANLIB"
+if test -n "$RANLIB"; then
+ echo "$ac_t""$RANLIB" 1>&6
+else
+ echo "$ac_t""no" 1>&6
+fi
# Extract the first word of "gcc", so it can be a program name with args.
set dummy gcc; ac_word=$2
echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
-echo "configure:702: checking for $ac_word" >&5
+echo "configure:963: checking for $ac_word" >&5
if eval "test \"`echo '$''{'ac_cv_prog_CC'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
@@ -727,7 +988,7 @@ if test -z "$CC"; then
# Extract the first word of "cc", so it can be a program name with args.
set dummy cc; ac_word=$2
echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
-echo "configure:731: checking for $ac_word" >&5
+echo "configure:992: checking for $ac_word" >&5
if eval "test \"`echo '$''{'ac_cv_prog_CC'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
@@ -775,7 +1036,7 @@ fi
fi
echo $ac_n "checking whether the C compiler ($CC $CFLAGS $LDFLAGS) works""... $ac_c" 1>&6
-echo "configure:779: checking whether the C compiler ($CC $CFLAGS $LDFLAGS) works" >&5
+echo "configure:1040: checking whether the C compiler ($CC $CFLAGS $LDFLAGS) works" >&5
ac_ext=c
# CFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options.
@@ -785,11 +1046,11 @@ ac_link='${CC-cc} -o conftest $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS
cross_compiling=$ac_cv_prog_cc_cross
cat > conftest.$ac_ext <<EOF
-#line 789 "configure"
+#line 1050 "configure"
#include "confdefs.h"
main(){return(0);}
EOF
-if { (eval echo configure:793: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
+if { (eval echo configure:1054: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
ac_cv_prog_cc_works=yes
# If we can't run a trivial program, we are probably using a cross compiler.
if (./conftest; exit) 2>/dev/null; then
@@ -809,12 +1070,12 @@ if test $ac_cv_prog_cc_works = no; then
{ echo "configure: error: installation or configuration problem: C compiler cannot create executables." 1>&2; exit 1; }
fi
echo $ac_n "checking whether the C compiler ($CC $CFLAGS $LDFLAGS) is a cross-compiler""... $ac_c" 1>&6
-echo "configure:813: checking whether the C compiler ($CC $CFLAGS $LDFLAGS) is a cross-compiler" >&5
+echo "configure:1074: checking whether the C compiler ($CC $CFLAGS $LDFLAGS) is a cross-compiler" >&5
echo "$ac_t""$ac_cv_prog_cc_cross" 1>&6
cross_compiling=$ac_cv_prog_cc_cross
echo $ac_n "checking whether we are using GNU C""... $ac_c" 1>&6
-echo "configure:818: checking whether we are using GNU C" >&5
+echo "configure:1079: checking whether we are using GNU C" >&5
if eval "test \"`echo '$''{'ac_cv_prog_gcc'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
@@ -823,7 +1084,7 @@ else
yes;
#endif
EOF
-if { ac_try='${CC-cc} -E conftest.c'; { (eval echo configure:827: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }; } | egrep yes >/dev/null 2>&1; then
+if { ac_try='${CC-cc} -E conftest.c'; { (eval echo configure:1088: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }; } | egrep yes >/dev/null 2>&1; then
ac_cv_prog_gcc=yes
else
ac_cv_prog_gcc=no
@@ -838,7 +1099,7 @@ if test $ac_cv_prog_gcc = yes; then
ac_save_CFLAGS="$CFLAGS"
CFLAGS=
echo $ac_n "checking whether ${CC-cc} accepts -g""... $ac_c" 1>&6
-echo "configure:842: checking whether ${CC-cc} accepts -g" >&5
+echo "configure:1103: checking whether ${CC-cc} accepts -g" >&5
if eval "test \"`echo '$''{'ac_cv_prog_cc_g'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
@@ -865,106 +1126,602 @@ else
test "${CFLAGS+set}" = set || CFLAGS="-g"
fi
-# Find a good install program. We prefer a C program (faster),
-# so one script is as good as another. But avoid the broken or
-# incompatible versions:
-# SysV /etc/install, /usr/sbin/install
-# SunOS /usr/etc/install
-# IRIX /sbin/install
-# AIX /bin/install
-# AFS /usr/afsws/bin/install, which mishandles nonexistent args
-# SVR4 /usr/ucb/install, which tries to use the nonexistent group "staff"
-# ./install, which can be erroneously created by make from ./install.sh.
-echo $ac_n "checking for a BSD compatible install""... $ac_c" 1>&6
-echo "configure:880: checking for a BSD compatible install" >&5
-if test -z "$INSTALL"; then
-if eval "test \"`echo '$''{'ac_cv_path_install'+set}'`\" = set"; then
+# Check whether --with-gnu-ld or --without-gnu-ld was given.
+if test "${with_gnu_ld+set}" = set; then
+ withval="$with_gnu_ld"
+ test "$withval" = no || with_gnu_ld=yes
+else
+ with_gnu_ld=no
+fi
+
+
+ac_prog=ld
+if test "$ac_cv_prog_gcc" = yes; then
+ # Check if gcc -print-prog-name=ld gives a path.
+ echo $ac_n "checking for ld used by GCC""... $ac_c" 1>&6
+echo "configure:1143: checking for ld used by GCC" >&5
+ ac_prog=`($CC -print-prog-name=ld) 2>&5`
+ case "$ac_prog" in
+ # Accept absolute paths.
+ /* | [A-Za-z]:\\*)
+ test -z "$LD" && LD="$ac_prog"
+ ;;
+ "")
+ # If it fails, then pretend we aren't using GCC.
+ ac_prog=ld
+ ;;
+ *)
+ # If it is relative, then search for the first ld in PATH.
+ with_gnu_ld=unknown
+ ;;
+ esac
+elif test "$with_gnu_ld" = yes; then
+ echo $ac_n "checking for GNU ld""... $ac_c" 1>&6
+echo "configure:1161: checking for GNU ld" >&5
+else
+ echo $ac_n "checking for non-GNU ld""... $ac_c" 1>&6
+echo "configure:1164: checking for non-GNU ld" >&5
+fi
+if eval "test \"`echo '$''{'ac_cv_path_LD'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
- IFS="${IFS= }"; ac_save_IFS="$IFS"; IFS="${IFS}:"
+ if test -z "$LD"; then
+ IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS="${IFS}:"
for ac_dir in $PATH; do
- # Account for people who put trailing slashes in PATH elements.
- case "$ac_dir/" in
- /|./|.//|/etc/*|/usr/sbin/*|/usr/etc/*|/sbin/*|/usr/afsws/bin/*|/usr/ucb/*) ;;
- *)
- # OSF1 and SCO ODT 3.0 have their own names for install.
- for ac_prog in ginstall installbsd scoinst install; do
- if test -f $ac_dir/$ac_prog; then
- if test $ac_prog = install &&
- grep dspmsg $ac_dir/$ac_prog >/dev/null 2>&1; then
- # AIX install. It has an incompatible calling convention.
- # OSF/1 installbsd also uses dspmsg, but is usable.
- :
- else
- ac_cv_path_install="$ac_dir/$ac_prog -c"
- break 2
- fi
- fi
- done
+ test -z "$ac_dir" && ac_dir=.
+ if test -f "$ac_dir/$ac_prog"; then
+ ac_cv_path_LD="$ac_dir/$ac_prog"
+ # Check to see if the program is GNU ld. I'd rather use --version,
+ # but apparently some GNU ld's only accept -v.
+ # Break only if it was the GNU/non-GNU ld that we prefer.
+ if "$ac_cv_path_LD" -v 2>&1 < /dev/null | egrep '(GNU|with BFD)' > /dev/null; then
+ test "$with_gnu_ld" != no && break
+ else
+ test "$with_gnu_ld" != yes && break
+ fi
+ fi
+ done
+ IFS="$ac_save_ifs"
+else
+ ac_cv_path_LD="$LD" # Let the user override the test with a path.
+fi
+fi
+
+LD="$ac_cv_path_LD"
+if test -n "$LD"; then
+ echo "$ac_t""$LD" 1>&6
+else
+ echo "$ac_t""no" 1>&6
+fi
+test -z "$LD" && { echo "configure: error: no acceptable ld found in \$PATH" 1>&2; exit 1; }
+
+echo $ac_n "checking if the linker ($LD) is GNU ld""... $ac_c" 1>&6
+echo "configure:1200: checking if the linker ($LD) is GNU ld" >&5
+if eval "test \"`echo '$''{'ac_cv_prog_gnu_ld'+set}'`\" = set"; then
+ echo $ac_n "(cached) $ac_c" 1>&6
+else
+ # I'd rather use --version here, but apparently some GNU ld's only accept -v.
+if $LD -v 2>&1 </dev/null | egrep '(GNU|with BFD)' 1>&5; then
+ ac_cv_prog_gnu_ld=yes
+else
+ ac_cv_prog_gnu_ld=no
+fi
+fi
+
+echo "$ac_t""$ac_cv_prog_gnu_ld" 1>&6
+
+
+echo $ac_n "checking for BSD-compatible nm""... $ac_c" 1>&6
+echo "configure:1216: checking for BSD-compatible nm" >&5
+if eval "test \"`echo '$''{'ac_cv_path_NM'+set}'`\" = set"; then
+ echo $ac_n "(cached) $ac_c" 1>&6
+else
+ case "$NM" in
+/* | [A-Za-z]:\\*)
+ ac_cv_path_NM="$NM" # Let the user override the test with a path.
+ ;;
+*)
+ IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS="${IFS}:"
+ for ac_dir in /usr/ucb /usr/ccs/bin $PATH /bin; do
+ test -z "$ac_dir" && ac_dir=.
+ if test -f $ac_dir/nm; then
+ # Check to see if the nm accepts a BSD-compat flag.
+ # Adding the `sed 1q' prevents false positives on HP-UX, which says:
+ # nm: unknown option "B" ignored
+ if ($ac_dir/nm -B /dev/null 2>&1 | sed '1q'; exit 0) | egrep /dev/null >/dev/null; then
+ ac_cv_path_NM="$ac_dir/nm -B"
+ elif ($ac_dir/nm -p /dev/null 2>&1 | sed '1q'; exit 0) | egrep /dev/null >/dev/null; then
+ ac_cv_path_NM="$ac_dir/nm -p"
+ else
+ ac_cv_path_NM="$ac_dir/nm"
+ fi
+ break
+ fi
+ done
+ IFS="$ac_save_ifs"
+ test -z "$ac_cv_path_NM" && ac_cv_path_NM=nm
+ ;;
+esac
+fi
+
+NM="$ac_cv_path_NM"
+echo "$ac_t""$NM" 1>&6
+
+
+echo $ac_n "checking whether ln -s works""... $ac_c" 1>&6
+echo "configure:1253: checking whether ln -s works" >&5
+if eval "test \"`echo '$''{'ac_cv_prog_LN_S'+set}'`\" = set"; then
+ echo $ac_n "(cached) $ac_c" 1>&6
+else
+ rm -f conftestdata
+if ln -s X conftestdata 2>/dev/null
+then
+ rm -f conftestdata
+ ac_cv_prog_LN_S="ln -s"
+else
+ ac_cv_prog_LN_S=ln
+fi
+fi
+LN_S="$ac_cv_prog_LN_S"
+if test "$ac_cv_prog_LN_S" = "ln -s"; then
+ echo "$ac_t""yes" 1>&6
+else
+ echo "$ac_t""no" 1>&6
+fi
+
+# Always use our own libtool.
+LIBTOOL='$(SHELL) $(top_builddir)/libtool'
+
+# Check for any special flags to pass to ltconfig.
+libtool_flags=
+test "$enable_shared" = no && libtool_flags="$libtool_flags --disable-shared"
+test "$enable_static" = no && libtool_flags="$libtool_flags --disable-static"
+test "$silent" = yes && libtool_flags="$libtool_flags --silent"
+test "$ac_cv_prog_gcc" = yes && libtool_flags="$libtool_flags --with-gcc"
+test "$ac_cv_prog_gnu_ld" = yes && libtool_flags="$libtool_flags --with-gnu-ld"
+
+# Some flags need to be propagated to the compiler or linker for good
+# libtool support.
+case "$host" in
+*-*-irix6*)
+ # Find out which ABI we are using.
+ echo '#line 1289 "configure"' > conftest.$ac_ext
+ if { (eval echo configure:1290: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
+ case "`/usr/bin/file conftest.o`" in
+ *32-bit*)
+ LD="${LD-ld} -32"
+ ;;
+ *N32*)
+ LD="${LD-ld} -n32"
+ ;;
+ *64-bit*)
+ LD="${LD-ld} -64"
;;
esac
+ fi
+ rm -rf conftest*
+ ;;
+
+*-*-sco3.2v5*)
+ # On SCO OpenServer 5, we need -belf to get full-featured binaries.
+ CFLAGS="$CFLAGS -belf"
+ ;;
+esac
+
+# Actually configure libtool. ac_aux_dir is where install-sh is found.
+CC="$CC" CFLAGS="$CFLAGS" CPPFLAGS="$CPPFLAGS" \
+LD="$LD" NM="$NM" RANLIB="$RANLIB" LN_S="$LN_S" \
+${CONFIG_SHELL-/bin/sh} $ac_aux_dir/ltconfig \
+$libtool_flags --no-verify $ac_aux_dir/ltmain.sh $host \
+|| { echo "configure: error: libtool configure failed" 1>&2; exit 1; }
+
+
+# Check whether --enable-targets or --disable-targets was given.
+if test "${enable_targets+set}" = set; then
+ enableval="$enable_targets"
+ case "${enableval}" in
+ yes | "") { echo "configure: error: enable-targets option must specify target names or 'all'" 1>&2; exit 1; }
+ ;;
+ no) enable_targets= ;;
+ *) enable_targets=$enableval ;;
+esac
+fi
+# Check whether --enable-64-bit-bfd or --disable-64-bit-bfd was given.
+if test "${enable_64_bit_bfd+set}" = set; then
+ enableval="$enable_64_bit_bfd"
+ case "${enableval}" in
+ yes) want64=true ;;
+ no) want64=false ;;
+ *) { echo "configure: error: bad value ${enableval} for 64-bit-bfd option" 1>&2; exit 1; } ;;
+esac
+else
+ want64=false
+fi
+
+
+
+
+
+if test -z "$target" ; then
+ { echo "configure: error: Unrecognized target system type; please check config.sub." 1>&2; exit 1; }
+fi
+if test -z "$host" ; then
+ { echo "configure: error: Unrecognized host system type; please check config.sub." 1>&2; exit 1; }
+fi
+
+# host-specific stuff:
+
+# Extract the first word of "gcc", so it can be a program name with args.
+set dummy gcc; ac_word=$2
+echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
+echo "configure:1358: checking for $ac_word" >&5
+if eval "test \"`echo '$''{'ac_cv_prog_CC'+set}'`\" = set"; then
+ echo $ac_n "(cached) $ac_c" 1>&6
+else
+ if test -n "$CC"; then
+ ac_cv_prog_CC="$CC" # Let the user override the test.
+else
+ IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS="${IFS}:"
+ for ac_dir in $PATH; do
+ test -z "$ac_dir" && ac_dir=.
+ if test -f $ac_dir/$ac_word; then
+ ac_cv_prog_CC="gcc"
+ break
+ fi
done
- IFS="$ac_save_IFS"
+ IFS="$ac_save_ifs"
+fi
+fi
+CC="$ac_cv_prog_CC"
+if test -n "$CC"; then
+ echo "$ac_t""$CC" 1>&6
+else
+ echo "$ac_t""no" 1>&6
+fi
+
+if test -z "$CC"; then
+ # Extract the first word of "cc", so it can be a program name with args.
+set dummy cc; ac_word=$2
+echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
+echo "configure:1387: checking for $ac_word" >&5
+if eval "test \"`echo '$''{'ac_cv_prog_CC'+set}'`\" = set"; then
+ echo $ac_n "(cached) $ac_c" 1>&6
+else
+ if test -n "$CC"; then
+ ac_cv_prog_CC="$CC" # Let the user override the test.
+else
+ IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS="${IFS}:"
+ ac_prog_rejected=no
+ for ac_dir in $PATH; do
+ test -z "$ac_dir" && ac_dir=.
+ if test -f $ac_dir/$ac_word; then
+ if test "$ac_dir/$ac_word" = "/usr/ucb/cc"; then
+ ac_prog_rejected=yes
+ continue
+ fi
+ ac_cv_prog_CC="cc"
+ break
+ fi
+ done
+ IFS="$ac_save_ifs"
+if test $ac_prog_rejected = yes; then
+ # We found a bogon in the path, so make sure we never use it.
+ set dummy $ac_cv_prog_CC
+ shift
+ if test $# -gt 0; then
+ # We chose a different compiler from the bogus one.
+ # However, it has the same basename, so the bogon will be chosen
+ # first if we set CC to just the basename; use the full file name.
+ shift
+ set dummy "$ac_dir/$ac_word" "$@"
+ shift
+ ac_cv_prog_CC="$@"
+ fi
+fi
+fi
+fi
+CC="$ac_cv_prog_CC"
+if test -n "$CC"; then
+ echo "$ac_t""$CC" 1>&6
+else
+ echo "$ac_t""no" 1>&6
+fi
+ test -z "$CC" && { echo "configure: error: no acceptable cc found in \$PATH" 1>&2; exit 1; }
fi
- if test "${ac_cv_path_install+set}" = set; then
- INSTALL="$ac_cv_path_install"
+
+echo $ac_n "checking whether the C compiler ($CC $CFLAGS $LDFLAGS) works""... $ac_c" 1>&6
+echo "configure:1435: checking whether the C compiler ($CC $CFLAGS $LDFLAGS) works" >&5
+
+ac_ext=c
+# CFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options.
+ac_cpp='$CPP $CPPFLAGS'
+ac_compile='${CC-cc} -c $CFLAGS $CPPFLAGS conftest.$ac_ext 1>&5'
+ac_link='${CC-cc} -o conftest $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5'
+cross_compiling=$ac_cv_prog_cc_cross
+
+cat > conftest.$ac_ext <<EOF
+#line 1445 "configure"
+#include "confdefs.h"
+main(){return(0);}
+EOF
+if { (eval echo configure:1449: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
+ ac_cv_prog_cc_works=yes
+ # If we can't run a trivial program, we are probably using a cross compiler.
+ if (./conftest; exit) 2>/dev/null; then
+ ac_cv_prog_cc_cross=no
else
- # As a last resort, use the slow shell script. We don't cache a
- # path for INSTALL within a source directory, because that will
- # break other packages using the cache if that directory is
- # removed, or if the path is relative.
- INSTALL="$ac_install_sh"
+ ac_cv_prog_cc_cross=yes
fi
+else
+ echo "configure: failed program was:" >&5
+ cat conftest.$ac_ext >&5
+ ac_cv_prog_cc_works=no
fi
-echo "$ac_t""$INSTALL" 1>&6
+rm -fr conftest*
-# Use test -z because SunOS4 sh mishandles braces in ${var-val}.
-# It thinks the first close brace ends the variable substitution.
-test -z "$INSTALL_PROGRAM" && INSTALL_PROGRAM='${INSTALL}'
+echo "$ac_t""$ac_cv_prog_cc_works" 1>&6
+if test $ac_cv_prog_cc_works = no; then
+ { echo "configure: error: installation or configuration problem: C compiler cannot create executables." 1>&2; exit 1; }
+fi
+echo $ac_n "checking whether the C compiler ($CC $CFLAGS $LDFLAGS) is a cross-compiler""... $ac_c" 1>&6
+echo "configure:1469: checking whether the C compiler ($CC $CFLAGS $LDFLAGS) is a cross-compiler" >&5
+echo "$ac_t""$ac_cv_prog_cc_cross" 1>&6
+cross_compiling=$ac_cv_prog_cc_cross
-test -z "$INSTALL_DATA" && INSTALL_DATA='${INSTALL} -m 644'
+echo $ac_n "checking whether we are using GNU C""... $ac_c" 1>&6
+echo "configure:1474: checking whether we are using GNU C" >&5
+if eval "test \"`echo '$''{'ac_cv_prog_gcc'+set}'`\" = set"; then
+ echo $ac_n "(cached) $ac_c" 1>&6
+else
+ cat > conftest.c <<EOF
+#ifdef __GNUC__
+ yes;
+#endif
+EOF
+if { ac_try='${CC-cc} -E conftest.c'; { (eval echo configure:1483: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }; } | egrep yes >/dev/null 2>&1; then
+ ac_cv_prog_gcc=yes
+else
+ ac_cv_prog_gcc=no
+fi
+fi
+echo "$ac_t""$ac_cv_prog_gcc" 1>&6
-. ${srcdir}/configure.host
+if test $ac_cv_prog_gcc = yes; then
+ GCC=yes
+ ac_test_CFLAGS="${CFLAGS+set}"
+ ac_save_CFLAGS="$CFLAGS"
+ CFLAGS=
+ echo $ac_n "checking whether ${CC-cc} accepts -g""... $ac_c" 1>&6
+echo "configure:1498: checking whether ${CC-cc} accepts -g" >&5
+if eval "test \"`echo '$''{'ac_cv_prog_cc_g'+set}'`\" = set"; then
+ echo $ac_n "(cached) $ac_c" 1>&6
+else
+ echo 'void f(){}' > conftest.c
+if test -z "`${CC-cc} -g -c conftest.c 2>&1`"; then
+ ac_cv_prog_cc_g=yes
+else
+ ac_cv_prog_cc_g=no
+fi
+rm -f conftest*
+
+fi
+
+echo "$ac_t""$ac_cv_prog_cc_g" 1>&6
+ if test "$ac_test_CFLAGS" = set; then
+ CFLAGS="$ac_save_CFLAGS"
+ elif test $ac_cv_prog_cc_g = yes; then
+ CFLAGS="-g -O2"
+ else
+ CFLAGS="-O2"
+ fi
+else
+ GCC=
+ test "${CFLAGS+set}" = set || CFLAGS="-g"
+fi
+
+
+test -z "$INSTALL_SCRIPT" && INSTALL_SCRIPT='${INSTALL_PROGRAM}'
+
+echo $ac_n "checking for Cygwin32 environment""... $ac_c" 1>&6
+echo "configure:1529: checking for Cygwin32 environment" >&5
+if eval "test \"`echo '$''{'am_cv_cygwin32'+set}'`\" = set"; then
+ echo $ac_n "(cached) $ac_c" 1>&6
+else
+ cat > conftest.$ac_ext <<EOF
+#line 1534 "configure"
+#include "confdefs.h"
+
+int main() {
+return __CYGWIN32__;
+; return 0; }
+EOF
+if { (eval echo configure:1541: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
+ rm -rf conftest*
+ am_cv_cygwin32=yes
+else
+ echo "configure: failed program was:" >&5
+ cat conftest.$ac_ext >&5
+ rm -rf conftest*
+ am_cv_cygwin32=no
+fi
+rm -f conftest*
+rm -f conftest*
+fi
+echo "$ac_t""$am_cv_cygwin32" 1>&6
+CYGWIN32=
+test "$am_cv_cygwin32" = yes && CYGWIN32=yes
+echo $ac_n "checking for Mingw32 environment""... $ac_c" 1>&6
+echo "configure:1558: checking for Mingw32 environment" >&5
+if eval "test \"`echo '$''{'am_cv_mingw32'+set}'`\" = set"; then
+ echo $ac_n "(cached) $ac_c" 1>&6
+else
+ cat > conftest.$ac_ext <<EOF
+#line 1563 "configure"
+#include "confdefs.h"
+int main() {
+return __MINGW32__;
+; return 0; }
+EOF
+if { (eval echo configure:1570: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
+ rm -rf conftest*
+ am_cv_mingw32=yes
+else
+ echo "configure: failed program was:" >&5
+ cat conftest.$ac_ext >&5
+ rm -rf conftest*
+ am_cv_mingw32=no
+fi
+rm -f conftest*
+rm -f conftest*
+fi
+echo "$ac_t""$am_cv_mingw32" 1>&6
+MINGW32=
+test "$am_cv_mingw32" = yes && MINGW32=yes
+echo $ac_n "checking for executable suffix""... $ac_c" 1>&6
+echo "configure:1589: checking for executable suffix" >&5
+if eval "test \"`echo '$''{'am_cv_exeext'+set}'`\" = set"; then
+ echo $ac_n "(cached) $ac_c" 1>&6
+else
+ if test "$CYGWIN32" = yes || test "$MINGW32" = yes; then
+am_cv_exeext=.exe
+else
+cat > am_c_test.c << 'EOF'
+int main() {
+/* Nothing needed here */
+}
+EOF
+${CC-cc} -o am_c_test $CFLAGS $CPPFLAGS $LDFLAGS am_c_test.c $LIBS 1>&5
+am_cv_exeext=`echo am_c_test.* | grep -v am_c_test.c | sed -e s/am_c_test//`
+rm -f am_c_test*
+fi
+test x"${am_cv_exeext}" = x && am_cv_exeext=no
+fi
+EXEEXT=""
+test x"${am_cv_exeext}" != xno && EXEEXT=${am_cv_exeext}
+echo "$ac_t""${am_cv_exeext}" 1>&6
+for ac_prog in 'bison -y' byacc
+do
+# Extract the first word of "$ac_prog", so it can be a program name with args.
+set dummy $ac_prog; ac_word=$2
+echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
+echo "configure:1618: checking for $ac_word" >&5
+if eval "test \"`echo '$''{'ac_cv_prog_YACC'+set}'`\" = set"; then
+ echo $ac_n "(cached) $ac_c" 1>&6
+else
+ if test -n "$YACC"; then
+ ac_cv_prog_YACC="$YACC" # Let the user override the test.
+else
+ IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS="${IFS}:"
+ for ac_dir in $PATH; do
+ test -z "$ac_dir" && ac_dir=.
+ if test -f $ac_dir/$ac_word; then
+ ac_cv_prog_YACC="$ac_prog"
+ break
+ fi
+ done
+ IFS="$ac_save_ifs"
+fi
+fi
+YACC="$ac_cv_prog_YACC"
+if test -n "$YACC"; then
+ echo "$ac_t""$YACC" 1>&6
+else
+ echo "$ac_t""no" 1>&6
+fi
-# For most hosts we can use a simple definition to pick up the BFD and
-# opcodes libraries. However, if we are building shared libraries, we
-# need to handle some hosts specially.
-BFDLIB='-L../bfd -lbfd'
-case "${host}" in
-*-*-sunos*)
- # On SunOS, we must link against the name we are going to install,
- # not -lbfd, since SunOS does not support SONAME.
- if test "${shared}" = "true"; then
- BFDLIB='-L../bfd -l`echo bfd | sed '"'"'$(program_transform_name)'"'"'`'
- fi
- ;;
-alpha*-*-osf*)
- # On Alpha OSF/1, the native linker searches all the -L
- # directories for any LIB.so files, and only then searches for any
- # LIB.a files. That means that if there is an installed
- # libbfd.so, but this build is not done with --enable-shared, the
- # link will wind up being against the install libbfd.so rather
- # than the newly built libbfd. To avoid this, we must explicitly
- # link against libbfd.a when --enable-shared is not used.
- if test "${shared}" != "true"; then
- BFDLIB='../bfd/libbfd.a'
- fi
- ;;
-esac
+test -n "$YACC" && break
+done
+test -n "$YACC" || YACC="yacc"
+# Extract the first word of "flex", so it can be a program name with args.
+set dummy flex; ac_word=$2
+echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
+echo "configure:1650: checking for $ac_word" >&5
+if eval "test \"`echo '$''{'ac_cv_prog_LEX'+set}'`\" = set"; then
+ echo $ac_n "(cached) $ac_c" 1>&6
+else
+ if test -n "$LEX"; then
+ ac_cv_prog_LEX="$LEX" # Let the user override the test.
+else
+ IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS="${IFS}:"
+ for ac_dir in $PATH; do
+ test -z "$ac_dir" && ac_dir=.
+ if test -f $ac_dir/$ac_word; then
+ ac_cv_prog_LEX="flex"
+ break
+ fi
+ done
+ IFS="$ac_save_ifs"
+ test -z "$ac_cv_prog_LEX" && ac_cv_prog_LEX="lex"
+fi
+fi
+LEX="$ac_cv_prog_LEX"
+if test -n "$LEX"; then
+ echo "$ac_t""$LEX" 1>&6
+else
+ echo "$ac_t""no" 1>&6
+fi
+
+if test -z "$LEXLIB"
+then
+ case "$LEX" in
+ flex*) ac_lib=fl ;;
+ *) ac_lib=l ;;
+ esac
+ echo $ac_n "checking for yywrap in -l$ac_lib""... $ac_c" 1>&6
+echo "configure:1683: checking for yywrap in -l$ac_lib" >&5
+ac_lib_var=`echo $ac_lib'_'yywrap | sed 'y%./+-%__p_%'`
+if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
+ echo $ac_n "(cached) $ac_c" 1>&6
+else
+ ac_save_LIBS="$LIBS"
+LIBS="-l$ac_lib $LIBS"
+cat > conftest.$ac_ext <<EOF
+#line 1691 "configure"
+#include "confdefs.h"
+/* Override any gcc2 internal prototype to avoid an error. */
+/* We use char because int might match the return type of a gcc2
+ builtin and then its argument prototype would still apply. */
+char yywrap();
+
+int main() {
+yywrap()
+; return 0; }
+EOF
+if { (eval echo configure:1702: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
+ rm -rf conftest*
+ eval "ac_cv_lib_$ac_lib_var=yes"
+else
+ echo "configure: failed program was:" >&5
+ cat conftest.$ac_ext >&5
+ rm -rf conftest*
+ eval "ac_cv_lib_$ac_lib_var=no"
+fi
+rm -f conftest*
+LIBS="$ac_save_LIBS"
+
+fi
+if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
+ echo "$ac_t""yes" 1>&6
+ LEXLIB="-l$ac_lib"
+else
+ echo "$ac_t""no" 1>&6
+fi
+
+fi
echo $ac_n "checking how to run the C preprocessor""... $ac_c" 1>&6
-echo "configure:968: checking how to run the C preprocessor" >&5
+echo "configure:1725: checking how to run the C preprocessor" >&5
# On Suns, sometimes $CPP names a directory.
if test -n "$CPP" && test -d "$CPP"; then
CPP=
@@ -979,13 +1736,13 @@ else
# On the NeXT, cc -E runs the code through the compiler's parser,
# not just through cpp.
cat > conftest.$ac_ext <<EOF
-#line 983 "configure"
+#line 1740 "configure"
#include "confdefs.h"
#include <assert.h>
Syntax Error
EOF
ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
-{ (eval echo configure:989: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
+{ (eval echo configure:1746: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
ac_err=`grep -v '^ *+' conftest.out`
if test -z "$ac_err"; then
:
@@ -996,13 +1753,13 @@ else
rm -rf conftest*
CPP="${CC-cc} -E -traditional-cpp"
cat > conftest.$ac_ext <<EOF
-#line 1000 "configure"
+#line 1757 "configure"
#include "confdefs.h"
#include <assert.h>
Syntax Error
EOF
ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
-{ (eval echo configure:1006: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
+{ (eval echo configure:1763: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
ac_err=`grep -v '^ *+' conftest.out`
if test -z "$ac_err"; then
:
@@ -1024,21 +1781,110 @@ else
fi
echo "$ac_t""$CPP" 1>&6
+echo $ac_n "checking lex output file root""... $ac_c" 1>&6
+echo "configure:1786: checking lex output file root" >&5
+if eval "test \"`echo '$''{'ac_cv_prog_lex_root'+set}'`\" = set"; then
+ echo $ac_n "(cached) $ac_c" 1>&6
+else
+ # The minimal lex program is just a single line: %%. But some broken lexes
+# (Solaris, I think it was) want two %% lines, so accommodate them.
+echo '%%
+%%' | $LEX
+if test -f lex.yy.c; then
+ ac_cv_prog_lex_root=lex.yy
+elif test -f lexyy.c; then
+ ac_cv_prog_lex_root=lexyy
+else
+ { echo "configure: error: cannot find output from $LEX; giving up" 1>&2; exit 1; }
+fi
+fi
+
+echo "$ac_t""$ac_cv_prog_lex_root" 1>&6
+LEX_OUTPUT_ROOT=$ac_cv_prog_lex_root
+
+echo $ac_n "checking whether yytext is a pointer""... $ac_c" 1>&6
+echo "configure:1807: checking whether yytext is a pointer" >&5
+if eval "test \"`echo '$''{'ac_cv_prog_lex_yytext_pointer'+set}'`\" = set"; then
+ echo $ac_n "(cached) $ac_c" 1>&6
+else
+ # POSIX says lex can declare yytext either as a pointer or an array; the
+# default is implementation-dependent. Figure out which it is, since
+# not all implementations provide the %pointer and %array declarations.
+ac_cv_prog_lex_yytext_pointer=no
+echo 'extern char *yytext;' >>$LEX_OUTPUT_ROOT.c
+ac_save_LIBS="$LIBS"
+LIBS="$LIBS $LEXLIB"
+cat > conftest.$ac_ext <<EOF
+#line 1819 "configure"
+#include "confdefs.h"
+`cat $LEX_OUTPUT_ROOT.c`
+int main() {
+
+; return 0; }
+EOF
+if { (eval echo configure:1826: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
+ rm -rf conftest*
+ ac_cv_prog_lex_yytext_pointer=yes
+else
+ echo "configure: failed program was:" >&5
+ cat conftest.$ac_ext >&5
+fi
+rm -f conftest*
+LIBS="$ac_save_LIBS"
+rm -f "${LEX_OUTPUT_ROOT}.c"
+
+fi
+
+echo "$ac_t""$ac_cv_prog_lex_yytext_pointer" 1>&6
+if test $ac_cv_prog_lex_yytext_pointer = yes; then
+ cat >> confdefs.h <<\EOF
+#define YYTEXT_POINTER 1
+EOF
+
+fi
+
+
+echo $ac_n "checking whether to enable maintainer-specific portions of Makefiles""... $ac_c" 1>&6
+echo "configure:1849: checking whether to enable maintainer-specific portions of Makefiles" >&5
+ # Check whether --enable-maintainer-mode or --disable-maintainer-mode was given.
+if test "${enable_maintainer_mode+set}" = set; then
+ enableval="$enable_maintainer_mode"
+ USE_MAINTAINER_MODE=$enableval
+else
+ USE_MAINTAINER_MODE=no
+fi
+
+ echo "$ac_t""$USE_MAINTAINER_MODE" 1>&6
+ if test $USE_MAINTAINER_MODE = yes; then
+ MAINT=
+ else
+ MAINT='#M#'
+ fi
+
+
+
+. ${srcdir}/configure.host
+
+
+
+
+
+
for ac_hdr in string.h strings.h stdlib.h unistd.h
do
ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
-echo "configure:1032: checking for $ac_hdr" >&5
+echo "configure:1878: checking for $ac_hdr" >&5
if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
cat > conftest.$ac_ext <<EOF
-#line 1037 "configure"
+#line 1883 "configure"
#include "confdefs.h"
#include <$ac_hdr>
EOF
ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
-{ (eval echo configure:1042: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
+{ (eval echo configure:1888: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
ac_err=`grep -v '^ *+' conftest.out`
if test -z "$ac_err"; then
rm -rf conftest*
@@ -1067,12 +1913,12 @@ done
for ac_func in sbrk
do
echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
-echo "configure:1071: checking for $ac_func" >&5
+echo "configure:1917: checking for $ac_func" >&5
if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
cat > conftest.$ac_ext <<EOF
-#line 1076 "configure"
+#line 1922 "configure"
#include "confdefs.h"
/* System header to define __stub macros and hopefully few prototypes,
which can conflict with char $ac_func(); below. */
@@ -1095,7 +1941,7 @@ $ac_func();
; return 0; }
EOF
-if { (eval echo configure:1099: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
+if { (eval echo configure:1945: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
rm -rf conftest*
eval "ac_cv_func_$ac_func=yes"
else
@@ -1124,12 +1970,12 @@ for ac_hdr in dirent.h sys/ndir.h sys/dir.h ndir.h
do
ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
echo $ac_n "checking for $ac_hdr that defines DIR""... $ac_c" 1>&6
-echo "configure:1128: checking for $ac_hdr that defines DIR" >&5
+echo "configure:1974: checking for $ac_hdr that defines DIR" >&5
if eval "test \"`echo '$''{'ac_cv_header_dirent_$ac_safe'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
cat > conftest.$ac_ext <<EOF
-#line 1133 "configure"
+#line 1979 "configure"
#include "confdefs.h"
#include <sys/types.h>
#include <$ac_hdr>
@@ -1137,7 +1983,7 @@ int main() {
DIR *dirp = 0;
; return 0; }
EOF
-if { (eval echo configure:1141: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
+if { (eval echo configure:1987: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
rm -rf conftest*
eval "ac_cv_header_dirent_$ac_safe=yes"
else
@@ -1162,7 +2008,7 @@ done
# Two versions of opendir et al. are in -ldir and -lx on SCO Xenix.
if test $ac_header_dirent = dirent.h; then
echo $ac_n "checking for opendir in -ldir""... $ac_c" 1>&6
-echo "configure:1166: checking for opendir in -ldir" >&5
+echo "configure:2012: checking for opendir in -ldir" >&5
ac_lib_var=`echo dir'_'opendir | sed 'y%./+-%__p_%'`
if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
@@ -1170,7 +2016,7 @@ else
ac_save_LIBS="$LIBS"
LIBS="-ldir $LIBS"
cat > conftest.$ac_ext <<EOF
-#line 1174 "configure"
+#line 2020 "configure"
#include "confdefs.h"
/* Override any gcc2 internal prototype to avoid an error. */
/* We use char because int might match the return type of a gcc2
@@ -1181,7 +2027,7 @@ int main() {
opendir()
; return 0; }
EOF
-if { (eval echo configure:1185: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
+if { (eval echo configure:2031: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
rm -rf conftest*
eval "ac_cv_lib_$ac_lib_var=yes"
else
@@ -1203,7 +2049,7 @@ fi
else
echo $ac_n "checking for opendir in -lx""... $ac_c" 1>&6
-echo "configure:1207: checking for opendir in -lx" >&5
+echo "configure:2053: checking for opendir in -lx" >&5
ac_lib_var=`echo x'_'opendir | sed 'y%./+-%__p_%'`
if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
@@ -1211,7 +2057,7 @@ else
ac_save_LIBS="$LIBS"
LIBS="-lx $LIBS"
cat > conftest.$ac_ext <<EOF
-#line 1215 "configure"
+#line 2061 "configure"
#include "confdefs.h"
/* Override any gcc2 internal prototype to avoid an error. */
/* We use char because int might match the return type of a gcc2
@@ -1222,7 +2068,7 @@ int main() {
opendir()
; return 0; }
EOF
-if { (eval echo configure:1226: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
+if { (eval echo configure:2072: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
rm -rf conftest*
eval "ac_cv_lib_$ac_lib_var=yes"
else
@@ -1247,7 +2093,7 @@ fi
case "${host}" in
-i[345]86-*-msdos* | i[345]86-*-go32* | *-*-cygwin32 | *-*-windows)
+i[345]86-*-msdos* | i[345]86-*-go32* | i[345]86-*-mingw32* | *-*-cygwin32* | *-*-windows)
cat >> confdefs.h <<\EOF
#define USE_BINARY_FOPEN 1
EOF
@@ -1255,12 +2101,12 @@ EOF
esac
echo $ac_n "checking whether strstr must be declared""... $ac_c" 1>&6
-echo "configure:1259: checking whether strstr must be declared" >&5
+echo "configure:2105: checking whether strstr must be declared" >&5
if eval "test \"`echo '$''{'bfd_cv_decl_needed_strstr'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
cat > conftest.$ac_ext <<EOF
-#line 1264 "configure"
+#line 2110 "configure"
#include "confdefs.h"
#include <stdio.h>
@@ -1281,7 +2127,7 @@ int main() {
char *(*pfn) = (char *(*)) strstr
; return 0; }
EOF
-if { (eval echo configure:1285: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
+if { (eval echo configure:2131: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
rm -rf conftest*
bfd_cv_decl_needed_strstr=no
else
@@ -1303,12 +2149,12 @@ EOF
fi
echo $ac_n "checking whether free must be declared""... $ac_c" 1>&6
-echo "configure:1307: checking whether free must be declared" >&5
+echo "configure:2153: checking whether free must be declared" >&5
if eval "test \"`echo '$''{'bfd_cv_decl_needed_free'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
cat > conftest.$ac_ext <<EOF
-#line 1312 "configure"
+#line 2158 "configure"
#include "confdefs.h"
#include <stdio.h>
@@ -1329,7 +2175,7 @@ int main() {
char *(*pfn) = (char *(*)) free
; return 0; }
EOF
-if { (eval echo configure:1333: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
+if { (eval echo configure:2179: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
rm -rf conftest*
bfd_cv_decl_needed_free=no
else
@@ -1351,12 +2197,12 @@ EOF
fi
echo $ac_n "checking whether sbrk must be declared""... $ac_c" 1>&6
-echo "configure:1355: checking whether sbrk must be declared" >&5
+echo "configure:2201: checking whether sbrk must be declared" >&5
if eval "test \"`echo '$''{'bfd_cv_decl_needed_sbrk'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
cat > conftest.$ac_ext <<EOF
-#line 1360 "configure"
+#line 2206 "configure"
#include "confdefs.h"
#include <stdio.h>
@@ -1377,7 +2223,7 @@ int main() {
char *(*pfn) = (char *(*)) sbrk
; return 0; }
EOF
-if { (eval echo configure:1381: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
+if { (eval echo configure:2227: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
rm -rf conftest*
bfd_cv_decl_needed_sbrk=no
else
@@ -1399,12 +2245,12 @@ EOF
fi
echo $ac_n "checking whether getenv must be declared""... $ac_c" 1>&6
-echo "configure:1403: checking whether getenv must be declared" >&5
+echo "configure:2249: checking whether getenv must be declared" >&5
if eval "test \"`echo '$''{'bfd_cv_decl_needed_getenv'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
cat > conftest.$ac_ext <<EOF
-#line 1408 "configure"
+#line 2254 "configure"
#include "confdefs.h"
#include <stdio.h>
@@ -1425,7 +2271,7 @@ int main() {
char *(*pfn) = (char *(*)) getenv
; return 0; }
EOF
-if { (eval echo configure:1429: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
+if { (eval echo configure:2275: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
rm -rf conftest*
bfd_cv_decl_needed_getenv=no
else
@@ -1502,6 +2348,13 @@ else
fi
+if test x${enable_static} = xno; then
+ TESTBFDLIB="--rpath ../bfd/.libs ../bfd/.libs/libbfd.so"
+else
+ TESTBFDLIB="../bfd/.libs/libbfd.a"
+fi
+
+
trap '' 1 2 15
cat > confcache <<\EOF
# This file is a shell script that caches the results of configure
@@ -1525,7 +2378,7 @@ EOF
# Ultrix sh set writes to stderr and can't be redirected directly,
# and sets the high bit in the cache file unless we assign to the vars.
(set) 2>&1 |
- case `(ac_space=' '; set) 2>&1` in
+ case `(ac_space=' '; set) 2>&1 | grep ac_space` in
*ac_space=\ *)
# `set' does not quote correctly, so add quotes (double-quote substitution
# turns \\\\ into \\, and sed turns \\ into \).
@@ -1592,7 +2445,7 @@ do
echo "running \${CONFIG_SHELL-/bin/sh} $0 $ac_configure_args --no-create --no-recursion"
exec \${CONFIG_SHELL-/bin/sh} $0 $ac_configure_args --no-create --no-recursion ;;
-version | --version | --versio | --versi | --vers | --ver | --ve | --v)
- echo "$CONFIG_STATUS generated by autoconf version 2.12"
+ echo "$CONFIG_STATUS generated by autoconf version 2.12.1"
exit 0 ;;
-help | --help | --hel | --he | --h)
echo "\$ac_cs_usage"; exit 0 ;;
@@ -1612,6 +2465,7 @@ sed 's/%@/@@/; s/@%/@@/; s/%g\$/@g/; /@g\$/s/[\\\\&%]/\\\\&/g;
s/@@/%@/; s/@@/@%/; s/@g\$/%g/' > conftest.subs <<\\CEOF
$ac_vpsub
$extrasub
+s%@SHELL@%$SHELL%g
s%@CFLAGS@%$CFLAGS%g
s%@CPPFLAGS@%$CPPFLAGS%g
s%@CXXFLAGS@%$CXXFLAGS%g
@@ -1648,21 +2502,38 @@ s%@build_alias@%$build_alias%g
s%@build_cpu@%$build_cpu%g
s%@build_vendor@%$build_vendor%g
s%@build_os@%$build_os%g
-s%@CC@%$CC%g
s%@INSTALL_PROGRAM@%$INSTALL_PROGRAM%g
s%@INSTALL_DATA@%$INSTALL_DATA%g
-s%@HLDFLAGS@%$HLDFLAGS%g
-s%@HLDENV@%$HLDENV%g
-s%@RPATH_ENVVAR@%$RPATH_ENVVAR%g
+s%@INSTALL_SCRIPT@%$INSTALL_SCRIPT%g
+s%@PACKAGE@%$PACKAGE%g
+s%@VERSION@%$VERSION%g
+s%@ACLOCAL@%$ACLOCAL%g
+s%@AUTOCONF@%$AUTOCONF%g
+s%@AUTOMAKE@%$AUTOMAKE%g
+s%@AUTOHEADER@%$AUTOHEADER%g
+s%@MAKEINFO@%$MAKEINFO%g
+s%@SET_MAKE@%$SET_MAKE%g
+s%@RANLIB@%$RANLIB%g
+s%@CC@%$CC%g
+s%@LD@%$LD%g
+s%@NM@%$NM%g
+s%@LN_S@%$LN_S%g
+s%@LIBTOOL@%$LIBTOOL%g
+s%@EXEEXT@%$EXEEXT%g
+s%@YACC@%$YACC%g
+s%@LEX@%$LEX%g
+s%@LEXLIB@%$LEXLIB%g
+s%@CPP@%$CPP%g
+s%@LEX_OUTPUT_ROOT@%$LEX_OUTPUT_ROOT%g
+s%@MAINT@%$MAINT%g
s%@HDEFINES@%$HDEFINES%g
s%@HOSTING_CRT0@%$HOSTING_CRT0%g
s%@HOSTING_LIBS@%$HOSTING_LIBS%g
s%@NATIVE_LIB_DIRS@%$NATIVE_LIB_DIRS%g
-s%@BFDLIB@%$BFDLIB%g
-s%@CPP@%$CPP%g
s%@EMUL@%$EMUL%g
s%@TDIRS@%$TDIRS%g
s%@EMULATION_OFILES@%$EMULATION_OFILES%g
+s%@TESTBFDLIB@%$TESTBFDLIB%g
CEOF
EOF
@@ -1873,9 +2744,11 @@ fi; done
EOF
cat >> $CONFIG_STATUS <<EOF
+
EOF
cat >> $CONFIG_STATUS <<\EOF
-case x$CONFIG_HEADERS in xconfig.h:config.in) echo > stamp-h ;; esac
+test -z "$CONFIG_HEADERS" || echo timestamp > stamp-h
+
exit 0
EOF
chmod +x $CONFIG_STATUS
diff --git a/contrib/binutils/ld/configure.host b/contrib/binutils/ld/configure.host
index 6f71858..883ce67 100644
--- a/contrib/binutils/ld/configure.host
+++ b/contrib/binutils/ld/configure.host
@@ -8,9 +8,6 @@
# HOSTING_CRT0 crt0.o file used for bootstrapping
# HOSTING_LIBS libraries used for bootstrapping
# NATIVE_LIB_DIRS library directories to search on this host
-# HLDFLAGS link flags to use on this host
-# HLDENV environment variable to set when linking for the host
-# RPATH_ENVVAR environment variable used to find shared libraries
HDEFINES=
HOSTING_CRT0=/lib/crt0.o
@@ -19,11 +16,21 @@ NATIVE_LIB_DIRS=
case "${host}" in
-alpha-*-linux*)
+alpha*-*-linux-gnu*)
+ HOSTING_CRT0='-dynamic-linker `egrep "ld[^ ]*\.so" \`gcc --print-file-name=specs\` | sed -e "s,.*-dynamic-linker[ ][ ]*\(.*/ld[^ ]*.so..\).*,\1,"` `gcc --print-file-name=crt1.o` `gcc --print-file-name=crti.o` `if [ -f ../gcc/crtbegin.o ]; then echo ../gcc/crtbegin.o; else gcc --print-file-name=crtbegin.o; fi`'
+ HOSTING_LIBS='`if [ -f ../gcc/libgcc.a ] ; then echo ../gcc/libgcc.a ; else gcc -print-libgcc-file-name; fi` -L`dirname \`gcc --print-file-name=libc.so\`` -lc `if [ -f ../gcc/libgcc.a ] ; then echo ../gcc/libgcc.a ; else gcc -print-libgcc-file-name; fi` `if [ -f ../gcc/crtend.o ]; then echo ../gcc/crtend.o; else gcc --print-file-name=crtend.o; fi` `gcc --print-file-name=crtn.o`'
+ ;;
+
+alpha*-*-netbsd*)
+ # The new BSD `make' has a bug: it doesn't pass empty arguments in
+ # shell commands. So we need to make this value non-empty in order
+ # for the genscripts.sh call to work. There's nothing magic about
+ # the value `/lib'; it's just a dummy.
+ NATIVE_LIB_DIRS=/lib
HOSTING_CRT0=/usr/lib/crt0.o
;;
-alpha-*-*)
+alpha*-*-*)
HOSTING_CRT0=/usr/ccs/lib/crt0.o
NATIVE_LIB_DIRS=/usr/ccs/lib
;;
@@ -78,11 +85,16 @@ i[3456]86-*-linux*aout* | i[3456]86-*-linuxoldld)
HOSTING_CRT0=/usr/lib/crt0.o
;;
-i[3456]86-*-linux*)
+i[3456]86-*-linux*libc1*)
HOSTING_CRT0='-dynamic-linker /lib/ld-linux.so.1 /usr/lib/crt1.o /usr/lib/crti.o `if [ -f ../gcc/crtbegin.o ]; then echo ../gcc/crtbegin.o; elif [ -f /usr/lib/crtbegin.o ]; then echo /usr/lib/crtbegin.o; else gcc --print-file-name=crtbegin.o; fi`'
HOSTING_LIBS='`if [ -f ../gcc/libgcc.a ] ; then echo ../gcc/libgcc.a ; else gcc -print-libgcc-file-name; fi` -lc `if [ -f ../gcc/libgcc.a ] ; then echo ../gcc/libgcc.a ; else gcc -print-libgcc-file-name; fi` `if [ -f ../gcc/crtend.o ]; then echo ../gcc/crtend.o; elif [ -f /usr/lib/crtend.o ]; then echo /usr/lib/crtend.o; else gcc --print-file-name=crtend.o; fi` /usr/lib/crtn.o'
;;
+i[3456]86-*-linux-gnu*)
+ HOSTING_CRT0='-dynamic-linker `fgrep ld-linux.so \`gcc --print-file-name=specs\` | sed -e "s,.*-dynamic-linker[ ][ ]*\(.*/ld-linux.so..\).*,\1,"` `gcc --print-file-name=crt1.o` `gcc --print-file-name=crti.o` `if [ -f ../gcc/crtbegin.o ]; then echo ../gcc/crtbegin.o; else gcc --print-file-name=crtbegin.o; fi`'
+ HOSTING_LIBS='`if [ -f ../gcc/libgcc.a ] ; then echo ../gcc/libgcc.a ; else gcc -print-libgcc-file-name; fi` -L`dirname \`gcc --print-file-name=libc.so\`` -lc `if [ -f ../gcc/libgcc.a ] ; then echo ../gcc/libgcc.a ; else gcc -print-libgcc-file-name; fi` `if [ -f ../gcc/crtend.o ]; then echo ../gcc/crtend.o; else gcc --print-file-name=crtend.o; fi` `gcc --print-file-name=crtn.o`'
+ ;;
+
i[3456]86-*-lynxos*)
HOSTING_CRT0=/lib/init1.o
HOSTING_LIBS='`if [ -f ../gcc/libgcc.a ] ; then echo ../gcc/libgcc.a ; else gcc -print-libgcc-file-name; fi` -lc -lm /lib/initn.o'
@@ -106,11 +118,16 @@ m68*-*-linux*aout*)
HOSTING_CRT0=/usr/lib/crt0.o
;;
-m68*-*-linux*)
+m68*-*-linux*libc1*)
HOSTING_CRT0='-dynamic-linker /lib/ld-linux.so.1 /usr/lib/crt1.o /usr/lib/crti.o `if [ -f ../gcc/crtbegin.o ]; then echo ../gcc/crtbegin.o; elif [ -f /usr/lib/crtbegin.o ]; then echo /usr/lib/crtbegin.o; else gcc --print-file-name=crtbegin.o; fi`'
HOSTING_LIBS='`if [ -f ../gcc/libgcc.a ] ; then echo ../gcc/libgcc.a ; else gcc -print-libgcc-file-name; fi` -lc `if [ -f ../gcc/libgcc.a ] ; then echo ../gcc/libgcc.a ; else gcc -print-libgcc-file-name; fi` `if [ -f ../gcc/crtend.o ]; then echo ../gcc/crtend.o; elif [ -f /usr/lib/crtend.o ]; then echo /usr/lib/crtend.o; else gcc --print-file-name=crtend.o; fi` /usr/lib/crtn.o'
;;
+m68*-*-linux-gnu*)
+ HOSTING_CRT0='-dynamic-linker /lib/ld.so.1 /usr/lib/crt1.o /usr/lib/crti.o `if [ -f ../gcc/crtbegin.o ]; then echo ../gcc/crtbegin.o; else gcc --print-file-name=crtbegin.o; fi`'
+ HOSTING_LIBS='`if [ -f ../gcc/libgcc.a ] ; then echo ../gcc/libgcc.a ; else gcc -print-libgcc-file-name; fi` -lc `if [ -f ../gcc/libgcc.a ] ; then echo ../gcc/libgcc.a ; else gcc -print-libgcc-file-name; fi` `if [ -f ../gcc/crtend.o ]; then echo ../gcc/crtend.o; else gcc --print-file-name=crtend.o; fi` /usr/lib/crtn.o'
+ ;;
+
m68*-*-lynxos*)
HOSTING_CRT0=/lib/init1.o
HOSTING_LIBS='`if [ -f ../gcc/libgcc.a ] ; then echo ../gcc/libgcc.a ; else gcc -print-libgcc-file-name; fi` -lc -lm /lib/initn.o'
@@ -147,52 +164,3 @@ sparc*-*-solaris2*)
;;
esac
-
-HLDFLAGS=
-HLDENV=
-RPATH_ENVVAR=LD_LIBRARY_PATH
-# If we have shared libraries, try to set rpath reasonably.
-if test "${shared}" = "true"; then
- case "${host}" in
- *-*-hpux*)
- HLDFLAGS='-Wl,+s,+b,$(libdir)'
- RPATH_ENVVAR=SHLIB_PATH
- ;;
- *-*-irix[56]*)
- HLDFLAGS='-Wl,-rpath,$(libdir)'
- ;;
- *-*-linux*aout*)
- ;;
- *-*-linux*)
- HLDFLAGS='-Wl,-rpath,$(libdir)'
- ;;
- *-*-solaris*)
- HLDFLAGS='-R $(libdir)'
- ;;
- *-*-sysv4*)
- HLDENV='if test -z "$${LD_RUN_PATH}"; then LD_RUN_PATH=$(libdir); else LD_RUN_PATH=$${LD_RUN_PATH}:$(libdir); fi; export LD_RUN_PATH;'
- ;;
- esac
-fi
-
-# On SunOS, if the linker supports the -rpath option, use it to
-# prevent ../bfd and ../opcodes from being included in the run time
-# search path.
-case "${host}" in
- *-*-sunos*)
- echo 'main () { }' > conftest.c
- ${CC} -o conftest -Wl,-rpath= conftest.c >/dev/null 2>conftest.t
- if grep 'unrecognized' conftest.t >/dev/null 2>&1; then
- :
- elif grep 'No such file' conftest.t >/dev/null 2>&1; then
- :
- elif grep 'do not mix' conftest.t >/dev/null 2>&1; then
- :
- elif test "${shared}" = "true"; then
- HLDFLAGS='-Wl,-rpath=$(libdir)'
- else
- HLDFLAGS='-Wl,-rpath='
- fi
- rm -f conftest.t conftest.c conftest
- ;;
-esac
diff --git a/contrib/binutils/ld/configure.in b/contrib/binutils/ld/configure.in
index 3646e2f..dbadbe0 100644
--- a/contrib/binutils/ld/configure.in
+++ b/contrib/binutils/ld/configure.in
@@ -3,6 +3,12 @@ dnl
AC_PREREG(2.5)
AC_INIT(ldmain.c)
+AC_CANONICAL_SYSTEM
+
+AM_INIT_AUTOMAKE(ld, 2.9.1)
+
+AM_PROG_LIBTOOL
+
AC_ARG_ENABLE(targets,
[ --enable-targets alternative target configurations],
[case "${enableval}" in
@@ -11,14 +17,6 @@ AC_ARG_ENABLE(targets,
no) enable_targets= ;;
*) enable_targets=$enableval ;;
esac])dnl
-AC_ARG_ENABLE(shared,
-[ --enable-shared build shared BFD library],
-[case "${enableval}" in
- yes) shared=true ;;
- no) shared=false ;;
- *bfd*) shared=true ;;
- *) shared=false ;;
-esac])dnl
AC_ARG_ENABLE(64-bit-bfd,
[ --enable-64-bit-bfd 64-bit support (on hosts with narrower word sizes)],
[case "${enableval}" in
@@ -27,60 +25,35 @@ AC_ARG_ENABLE(64-bit-bfd,
*) AC_MSG_ERROR(bad value ${enableval} for 64-bit-bfd option) ;;
esac],[want64=false])dnl
-AC_CONFIG_HEADER(config.h:config.in)
+AM_CONFIG_HEADER(config.h:config.in)
-AC_CONFIG_AUX_DIR(`cd $srcdir/..; pwd`)
-AC_CANONICAL_SYSTEM
if test -z "$target" ; then
AC_MSG_ERROR(Unrecognized target system type; please check config.sub.)
fi
if test -z "$host" ; then
AC_MSG_ERROR(Unrecognized host system type; please check config.sub.)
fi
-AC_ARG_PROGRAM
# host-specific stuff:
AC_PROG_CC
-AC_PROG_INSTALL
+AM_PROG_INSTALL
+AM_CYGWIN32
+AM_EXEEXT
+
+AC_PROG_YACC
+AC_PROG_LEX
+AC_DECL_YYTEXT
+
+AM_MAINTAINER_MODE
. ${srcdir}/configure.host
-AC_SUBST(HLDFLAGS)
-AC_SUBST(HLDENV)
-AC_SUBST(RPATH_ENVVAR)
AC_SUBST(HDEFINES)
AC_SUBST(HOSTING_CRT0)
AC_SUBST(HOSTING_LIBS)
AC_SUBST(NATIVE_LIB_DIRS)
-# For most hosts we can use a simple definition to pick up the BFD and
-# opcodes libraries. However, if we are building shared libraries, we
-# need to handle some hosts specially.
-BFDLIB='-L../bfd -lbfd'
-case "${host}" in
-*-*-sunos*)
- # On SunOS, we must link against the name we are going to install,
- # not -lbfd, since SunOS does not support SONAME.
- if test "${shared}" = "true"; then
- BFDLIB='-L../bfd -l`echo bfd | sed '"'"'$(program_transform_name)'"'"'`'
- fi
- ;;
-alpha*-*-osf*)
- # On Alpha OSF/1, the native linker searches all the -L
- # directories for any LIB.so files, and only then searches for any
- # LIB.a files. That means that if there is an installed
- # libbfd.so, but this build is not done with --enable-shared, the
- # link will wind up being against the install libbfd.so rather
- # than the newly built libbfd. To avoid this, we must explicitly
- # link against libbfd.a when --enable-shared is not used.
- if test "${shared}" != "true"; then
- BFDLIB='../bfd/libbfd.a'
- fi
- ;;
-esac
-AC_SUBST(BFDLIB)
-
AC_CHECK_HEADERS(string.h strings.h stdlib.h unistd.h)
AC_CHECK_FUNCS(sbrk)
AC_HEADER_DIRENT
@@ -150,5 +123,11 @@ else
fi
AC_SUBST(EMULATION_OFILES)
-AC_OUTPUT(Makefile,
-[case x$CONFIG_HEADERS in xconfig.h:config.in) echo > stamp-h ;; esac])
+if test x${enable_static} = xno; then
+ TESTBFDLIB="--rpath ../bfd/.libs ../bfd/.libs/libbfd.so"
+else
+ TESTBFDLIB="../bfd/.libs/libbfd.a"
+fi
+AC_SUBST(TESTBFDLIB)
+
+AC_OUTPUT(Makefile)
diff --git a/contrib/binutils/ld/configure.tgt b/contrib/binutils/ld/configure.tgt
index 9539e1f..18c74c4 100644
--- a/contrib/binutils/ld/configure.tgt
+++ b/contrib/binutils/ld/configure.tgt
@@ -12,10 +12,12 @@ targ_extra_emuls=
case "${targ}" in
arm-*-pe) targ_emul=armpe ;;
+arc-*-elf*) targ_emul=arcelf ;;
d10v-*-*) targ_emul=d10velf ;;
sparc64-*-aout*) targ_emul=sparcaout ;;
sparc64-*-elf*) targ_emul=elf64_sparc ;;
sparc-sun-sunos4*) targ_emul=sun4 ;;
+sparclite*-*-elf) targ_emul=elf32_sparc ;;
sparclite*-*-coff) targ_emul=coff_sparc ;;
sparclite*-fujitsu-*) targ_emul=sparcaout ;;
sparc*-*-aout) targ_emul=sparcaout ;;
@@ -27,7 +29,13 @@ sparc*-*-linux*aout*) targ_emul=sparclinux
tdir_elf32_sparc=`echo ${targ_alias} | sed -e 's/aout//'`
tdir_sun4=sparc-sun-sunos4
;;
-sparc*-*-linux*) targ_emul=elf32_sparc
+sparc64-*-linux-gnu*) targ_emul=elf64_sparc
+ targ_extra_emuls="elf32_sparc sparclinux sun4"
+ tdir_elf32_sparc=`echo ${targ_alias} | sed -e 's/64//'`
+ tdir_sparclinux=${tdir_elf32_sparc}aout
+ tdir_sun4=sparc-sun-sunos4
+ ;;
+sparc*-*-linux-gnu*) targ_emul=elf32_sparc
targ_extra_emuls="sparclinux sun4"
tdir_sparclinux=${targ_alias}aout
tdir_sun4=sparc-sun-sunos4
@@ -52,6 +60,7 @@ m68*-apple-aux*) targ_emul=m68kaux ;;
i[3456]86-*-vsta) targ_emul=vsta ;;
i[3456]86-go32-rtems*) targ_emul=i386go32 ;;
i[3456]86-*-go32) targ_emul=i386go32 ;;
+i[3456]86-*-msdosdjgpp*) targ_emul=i386go32 ;;
i[3456]86-*-aix*) targ_emul=i386coff ;;
i[3456]86-*-sco*) targ_emul=i386coff ;;
i[3456]86-*-isc*) targ_emul=i386coff ;;
@@ -67,7 +76,7 @@ i[3456]86-*-linux*aout*) targ_emul=i386linux
tdir_elf_i386=`echo ${targ_alias} | sed -e 's/aout//'`
;;
i[3456]86-*-linuxoldld) targ_emul=i386linux; targ_extra_emuls=elf_i386 ;;
-i[3456]86-*-linux*) targ_emul=elf_i386
+i[3456]86-*-linux-gnu*) targ_emul=elf_i386
targ_extra_emuls=i386linux
tdir_i386linux=${targ_alias}aout
;;
@@ -77,15 +86,17 @@ i[3456]86-*-netbsd*) targ_emul=i386nbsd ;;
i[3456]86-*-netware) targ_emul=i386nw ;;
i[3456]86-*-elf*) targ_emul=elf_i386 ;;
i[3456]86-*-freebsdelf*) targ_emul=elf_i386 ;;
+i[3456]86-*-freebsd*) targ_emul=i386bsd ;;
i[3456]86-*-sysv*) targ_emul=i386coff ;;
i[3456]86-*-ptx*) targ_emul=i386coff ;;
i[3456]86-*-mach*) targ_emul=i386mach ;;
-i[3456]86-*-gnu*) targ_emul=elf_i386; targ_extra_emuls=i386mach ;;
+i[3456]86-*-gnu*) targ_emul=elf_i386 ;;
i[3456]86-*-msdos*) targ_emul=i386msdos; targ_extra_emuls=i386aout ;;
i[3456]86-*-moss*) targ_emul=i386moss; targ_extra_emuls=i386msdos ;;
-i[3456]86-*-winnt) targ_emul=i386pe ;;
+i[3456]86-*-winnt*) targ_emul=i386pe ;;
i[3456]86-*-pe) targ_emul=i386pe ;;
-i[3456]86-*-cygwin32) targ_emul=i386pe ;;
+i[3456]86-*-cygwin32*) targ_emul=i386pe ;;
+i[3456]86-*-mingw32*) targ_emul=i386pe ;;
m8*-*-*) targ_emul=m88kbcs ;;
a29k-*-udi) targ_emul=sa29200 ;;
a29k-*-ebmon) targ_emul=ebmon29k ;;
@@ -94,6 +105,8 @@ a29k-*-*) targ_emul=a29k ;;
arm-*-aout | armel-*-aout) targ_emul=armaoutl ;;
armeb-*-aout) targ_emul=armaoutb ;;
arm-*-coff) targ_emul=armcoff ;;
+thumb-*-coff) targ_emul=armcoff ;;
+thumb-*-pe) targ_emul=armpe ;;
h8300-*-hms) targ_emul=h8300; targ_extra_emuls="h8300h h8300s"
;;
h8500-*-hms) targ_emul=h8500
@@ -102,7 +115,7 @@ h8500-*-hms) targ_emul=h8500
sh-*-elf*) targ_emul=shelf
targ_extra_emuls="shlelf sh shl"
;;
-sh-*-*) targ_emul=sh; targ_extra_emuls=shl ;;
+sh-*-*|sh-*-rtems*) targ_emul=sh; targ_extra_emuls=shl ;;
m68k-sony-*) targ_emul=news ;;
m68k-hp-bsd*) targ_emul=hp300bsd ;;
m68*-motorola-sysv*) targ_emul=delta68 ;;
@@ -114,7 +127,7 @@ m68k-*-linux*aout*) targ_emul=m68klinux
targ_extra_emuls=m68kelf
tdir_m68kelf=`echo ${targ_alias} | sed -e 's/aout//'`
;;
-m68k-*-linux*) targ_emul=m68kelf
+m68k-*-linux-gnu*) targ_emul=m68kelf
targ_extra_emuls=m68klinux
tdir_m68klinux=`echo ${targ_alias} | sed -e 's/linux/linuxaout/'`
;;
@@ -129,7 +142,7 @@ hppa*-*-rtems*) targ_emul=hppaelf ;;
vax-dec-ultrix* | vax-dec-bsd*) targ_emul=vax ;;
mips*-dec-ultrix*) targ_emul=mipslit ;;
mips*-dec-osf*) targ_emul=mipslit ;;
-mips*-sgi-irix[56]*) targ_emul=elf32bmip ;;
+mips*-sgi-irix[56]*) targ_emul=elf32bsmip ;;
mips*-sgi-irix*) targ_emul=mipsbig ;;
mips*el-*-ecoff*) targ_emul=mipsidtl ;;
mips*-*-ecoff*) targ_emul=mipsidt ;;
@@ -145,28 +158,30 @@ mips*vr5000-*-elf*) targ_emul=elf32b4300 ;;
mips*el-*-elf*) targ_emul=elf32elmip ;;
mips*-*-elf*) targ_emul=elf32ebmip ;;
mips*-*-rtems*) targ_emul=elf32ebmip ;;
-mips*el-*-linux*) targ_emul=elf32lmip
- targ_extra_emuls="elf32bmip mipslit mipsbig"
+mips*el-*-linux-gnu*) targ_emul=elf32lsmip
+ targ_extra_emuls="elf32bsmip mipslit mipsbig"
;;
-mips*-*-linux*) targ_emul=elf32bmip
- targ_extra_emuls="elf32lmip mipsbig mipslit"
+mips*-*-linux-gnu*) targ_emul=elf32bsmip
+ targ_extra_emuls="elf32lsmip mipsbig mipslit"
;;
mips*-*-lnews*) targ_emul=mipslnews ;;
mn10200-*-*) targ_emul=mn10200 ;;
mn10300-*-*) targ_emul=mn10300 ;;
-alpha-*-linuxecoff*) targ_emul=alpha targ_extra_emuls=elf64alpha
+alpha*-*-linuxecoff*) targ_emul=alpha targ_extra_emuls=elf64alpha
tdir_elf64alpha=`echo ${targ_alias} | sed -e 's/ecoff//'`
;;
-alpha-*-linux*) targ_emul=elf64alpha targ_extra_emuls=alpha
+alpha*-*-linux-gnu*) targ_emul=elf64alpha targ_extra_emuls=alpha
tdir_alpha=`echo ${targ_alias} | sed -e 's/linux/linuxecoff/'`
;;
-alpha-*-osf*) targ_emul=alpha ;;
-alpha-*-gnu*) targ_emul=elf64alpha ;;
-alpha-*-netware*) targ_emul=alpha ;;
+alpha*-*-osf*) targ_emul=alpha ;;
+alpha*-*-gnu*) targ_emul=elf64alpha ;;
+alpha*-*-netware*) targ_emul=alpha ;;
+alpha*-*-netbsd*) targ_emul=elf64alpha ;;
z8k-*-coff) targ_emul=z8002; targ_extra_emuls=z8001 ;;
ns32k-pc532-mach* | ns32k-pc532-ux*) targ_emul=pc532macha ;;
ns32k-pc532-netbsd* | ns32k-pc532-lites*) targ_emul=ns32knbsd ;;
-powerpc-*-elf* | powerpc-*-eabi* | powerpc-*-linux* | powerpc-*-sysv*)
+powerpc-*-elf* | powerpc-*-eabi* | powerpc-*-linux-gnu* | powerpc-*-sysv* \
+ | powerpc-*-netbsd*)
targ_emul=elf32ppc ;;
powerpcle-*-elf* | powerpcle-*-eabi* | powerpcle-*-solaris* | powerpcle-*-sysv*) targ_emul=elf32lppc ;;
powerpc-*-rtems*) targ_emul=elf32ppc ;;
@@ -178,6 +193,9 @@ powerpcle-*-cygwin32) targ_emul=ppcpe ;;
powerpc-*-aix*) targ_emul=aixppc ;;
powerpc-*-beos*) targ_emul=aixppc ;;
rs6000-*-aix*) targ_emul=aixrs6 ;;
+tic30-*-*aout*) targ_emul=tic30aout ;;
+tic30-*-*coff*) targ_emul=tic30coff ;;
+v850-*-*) targ_emul=v850 ;;
w65-*-*) targ_emul=w65 ;;
*-*-aout) targ_emul=${target_cpu}-${target_vendor} ;;
*-*-coff) targ_emul=${target_cpu}-${target_vendor} ;;
diff --git a/contrib/binutils/ld/emulparams/arcelf.sh b/contrib/binutils/ld/emulparams/arcelf.sh
new file mode 100644
index 0000000..b1c9c17
--- /dev/null
+++ b/contrib/binutils/ld/emulparams/arcelf.sh
@@ -0,0 +1,11 @@
+SCRIPT_NAME=elf
+OUTPUT_FORMAT="elf32-littlearc"
+LITTLE_OUTPUT_FORMAT="elf32-littlearc"
+BIG_OUTPUT_FORMAT="elf32-bigarc"
+TEXT_START_ADDR=0x0
+MAXPAGESIZE=0x1000
+NONPAGED_TEXT_START_ADDR=0x0
+ARCH=arc
+MACHINE=
+ENTRY=start
+#TEMPLATE_NAME=elf32
diff --git a/contrib/binutils/ld/emulparams/elf32b4300.sh b/contrib/binutils/ld/emulparams/elf32b4300.sh
index 147ec2d..24f8d98 100644
--- a/contrib/binutils/ld/emulparams/elf32b4300.sh
+++ b/contrib/binutils/ld/emulparams/elf32b4300.sh
@@ -1,15 +1,15 @@
-SCRIPT_NAME=elfmips
+SCRIPT_NAME=elf
OUTPUT_FORMAT="elf32-bigmips"
BIG_OUTPUT_FORMAT="elf32-bigmips"
LITTLE_OUTPUT_FORMAT="elf32-littlemips"
TEXT_START_ADDR=0xa0020000
-DATA_ADDR=.
MAXPAGESIZE=0x40000
-OTHER_READONLY_SECTIONS='.reginfo : { *(.reginfo) }'
+INITIAL_READONLY_SECTIONS='.reginfo : { *(.reginfo) }'
+OTHER_TEXT_SECTIONS='*(.mips16.fn.*) *(.mips16.call.*)'
OTHER_GOT_SYMBOLS='
_gp = ALIGN(16) + 0x7ff0;
'
-OTHER_READWRITE_SECTIONS='
+OTHER_GOT_SECTIONS='
.lit8 : { *(.lit8) }
.lit4 : { *(.lit4) }
'
@@ -22,7 +22,7 @@ OTHER_SECTIONS='
.gptab.sbss : { *(.gptab.bss) *(.gptab.sbss) }
'
ARCH=mips
-MACHINE=4000
+MACHINE=
TEMPLATE_NAME=elf32
GENERATE_SHLIB_SCRIPT=yes
DYNAMIC_LINK=false
diff --git a/contrib/binutils/ld/emulparams/elf32l4300.sh b/contrib/binutils/ld/emulparams/elf32l4300.sh
index fdf31b1..690de88 100644
--- a/contrib/binutils/ld/emulparams/elf32l4300.sh
+++ b/contrib/binutils/ld/emulparams/elf32l4300.sh
@@ -1,15 +1,15 @@
-SCRIPT_NAME=elfmips
+SCRIPT_NAME=elf
OUTPUT_FORMAT="elf32-littlemips"
BIG_OUTPUT_FORMAT="elf32-bigmips"
LITTLE_OUTPUT_FORMAT="elf32-littlemips"
TEXT_START_ADDR=0xa0020000
-DATA_ADDR=.
MAXPAGESIZE=0x40000
-OTHER_READONLY_SECTIONS='.reginfo : { *(.reginfo) }'
+INITIAL_READONLY_SECTIONS='.reginfo : { *(.reginfo) }'
+OTHER_TEXT_SECTIONS='*(.mips16.fn.*) *(.mips16.call.*)'
OTHER_GOT_SYMBOLS='
_gp = ALIGN(16) + 0x7ff0;
'
-OTHER_READWRITE_SECTIONS='
+OTHER_GOT_SECTIONS='
.lit8 : { *(.lit8) }
.lit4 : { *(.lit4) }
'
@@ -22,7 +22,7 @@ OTHER_SECTIONS='
.gptab.sbss : { *(.gptab.bss) *(.gptab.sbss) }
'
ARCH=mips
-MACHINE=4000
+MACHINE=
TEMPLATE_NAME=elf32
GENERATE_SHLIB_SCRIPT=yes
DYNAMIC_LINK=false
diff --git a/contrib/binutils/ld/emulparams/i386pe.sh b/contrib/binutils/ld/emulparams/i386pe.sh
index 1249064..188a8ad 100644
--- a/contrib/binutils/ld/emulparams/i386pe.sh
+++ b/contrib/binutils/ld/emulparams/i386pe.sh
@@ -1,5 +1,5 @@
ARCH=i386
SCRIPT_NAME=pe
OUTPUT_FORMAT="pei-i386"
+RELOCATEABLE_OUTPUT_FORMAT="pe-i386"
TEMPLATE_NAME=pe
-
diff --git a/contrib/binutils/ld/emulparams/tic30aout.sh b/contrib/binutils/ld/emulparams/tic30aout.sh
new file mode 100755
index 0000000..2a4c13f
--- /dev/null
+++ b/contrib/binutils/ld/emulparams/tic30aout.sh
@@ -0,0 +1,7 @@
+SCRIPT_NAME=tic30aout
+OUTPUT_FORMAT="a.out-tic30"
+OUTPUT_ARCH="tms320c30"
+TEXT_START_ADDR=0x0
+TARGET_PAGE_SIZE=128
+ARCH=tms320c30
+BIG=1
diff --git a/contrib/binutils/ld/emulparams/tic30coff.sh b/contrib/binutils/ld/emulparams/tic30coff.sh
new file mode 100755
index 0000000..df77943
--- /dev/null
+++ b/contrib/binutils/ld/emulparams/tic30coff.sh
@@ -0,0 +1,7 @@
+SCRIPT_NAME=tic30coff
+OUTPUT_FORMAT="coff-tic30"
+OUTPUT_ARCH="tms320c30"
+TEXT_START_ADDR=0x0
+TARGET_PAGE_SIZE=128
+ARCH=tms320c30
+BIG=1
diff --git a/contrib/binutils/ld/emulparams/v850.sh b/contrib/binutils/ld/emulparams/v850.sh
new file mode 100644
index 0000000..78bfbd3
--- /dev/null
+++ b/contrib/binutils/ld/emulparams/v850.sh
@@ -0,0 +1,14 @@
+MACHINE=
+SCRIPT_NAME=v850
+OUTPUT_FORMAT="elf32-v850"
+TEXT_START_ADDR=0x100000
+ZDATA_START_ADDR=0x160
+ROZDATA_START_ADDR="ALIGN (4)"
+SDATA_START_ADDR="ALIGN (4)"
+ROSDATA_START_ADDR="ALIGN (4)"
+TDATA_START_ADDR="ALIGN (4)"
+CALL_TABLE_START_ADDR="ALIGN (4)"
+ARCH=v850
+MAXPAGESIZE=256
+ENTRY=_start
+EMBEDDED=yes
diff --git a/contrib/binutils/ld/emultempl/elf32.em b/contrib/binutils/ld/emultempl/elf32.em
index f02775e..c4debe2 100644
--- a/contrib/binutils/ld/emultempl/elf32.em
+++ b/contrib/binutils/ld/emultempl/elf32.em
@@ -7,7 +7,7 @@ cat >e${EMULATION_NAME}.c <<EOF
/* This file is is generated by a shell script. DO NOT EDIT! */
/* ${ELFSIZE} bit ELF emulation code for ${EMULATION_NAME}
- Copyright (C) 1991, 93, 94, 95, 96, 1997 Free Software Foundation, Inc.
+ Copyright (C) 1991, 93, 94, 95, 96, 97, 1998 Free Software Foundation, Inc.
Written by Steve Chamberlain <sac@cygnus.com>
ELF support by Ian Lance Taylor <ian@cygnus.com>
@@ -54,8 +54,10 @@ static void gld${EMULATION_NAME}_check_needed
static void gld${EMULATION_NAME}_stat_needed
PARAMS ((lang_input_statement_type *));
static boolean gld${EMULATION_NAME}_search_needed
- PARAMS ((const char *, const char *));
-static boolean gld${EMULATION_NAME}_try_needed PARAMS ((const char *));
+ PARAMS ((const char *, const char *, int));
+static boolean gld${EMULATION_NAME}_try_needed PARAMS ((const char *, int));
+static void gld${EMULATION_NAME}_vercheck
+ PARAMS ((lang_input_statement_type *));
static void gld${EMULATION_NAME}_before_allocation PARAMS ((void));
static void gld${EMULATION_NAME}_find_statement_assignment
PARAMS ((lang_statement_union_type *));
@@ -143,11 +145,13 @@ cat >>e${EMULATION_NAME}.c <<EOF
in which we may find shared libraries. /etc/ld.so.conf is really
only meaningful on Linux, but we check it on other systems anyhow. */
-static boolean gld${EMULATION_NAME}_check_ld_so_conf PARAMS ((const char *));
+static boolean gld${EMULATION_NAME}_check_ld_so_conf
+ PARAMS ((const char *, int));
static boolean
-gld${EMULATION_NAME}_check_ld_so_conf (name)
+gld${EMULATION_NAME}_check_ld_so_conf (name, force)
const char *name;
+ int force;
{
static boolean initialized;
static char *ld_so_conf;
@@ -215,7 +219,7 @@ gld${EMULATION_NAME}_check_ld_so_conf (name)
if (ld_so_conf == NULL)
return false;
- return gld${EMULATION_NAME}_search_needed (ld_so_conf, name);
+ return gld${EMULATION_NAME}_search_needed (ld_so_conf, name, force);
}
EOF
@@ -224,11 +228,13 @@ fi
cat >>e${EMULATION_NAME}.c <<EOF
/* These variables are required to pass information back and forth
- between after_open and check_needed and stat_needed. */
+ between after_open and check_needed and stat_needed and vercheck. */
static struct bfd_link_needed_list *global_needed;
static struct stat global_stat;
static boolean global_found;
+static struct bfd_link_needed_list *global_vercheck_needed;
+static boolean global_vercheck_failed;
/* This is called after all the input files have been opened. */
@@ -254,9 +260,7 @@ gld${EMULATION_NAME}_after_open ()
for (l = needed; l != NULL; l = l->next)
{
struct bfd_link_needed_list *ll;
- const char *lib_path;
- size_t len;
- search_dirs_type *search;
+ int force;
/* If we've already seen this file, skip it. */
for (ll = needed; ll != l; ll = ll->next)
@@ -277,55 +281,71 @@ gld${EMULATION_NAME}_after_open ()
linker will search. That means that we want to use
rpath_link, rpath, then the environment variable
LD_LIBRARY_PATH (native only), then the linker script
- LIB_SEARCH_DIRS. We do not search using the -L arguments. */
- if (gld${EMULATION_NAME}_search_needed (command_line.rpath_link,
- l->name))
- continue;
- if (gld${EMULATION_NAME}_search_needed (command_line.rpath, l->name))
- continue;
- if (command_line.rpath_link == NULL
- && command_line.rpath == NULL)
+ LIB_SEARCH_DIRS. We do not search using the -L arguments.
+
+ We search twice. The first time, we skip objects which may
+ introduce version mismatches. The second time, we force
+ their use. See gld${EMULATION_NAME}_vercheck comment. */
+ for (force = 0; force < 2; force++)
{
- lib_path = (const char *) getenv ("LD_RUN_PATH");
- if (gld${EMULATION_NAME}_search_needed (lib_path, l->name))
- continue;
- }
+ const char *lib_path;
+ size_t len;
+ search_dirs_type *search;
+
+ if (gld${EMULATION_NAME}_search_needed (command_line.rpath_link,
+ l->name, force))
+ break;
+ if (gld${EMULATION_NAME}_search_needed (command_line.rpath,
+ l->name, force))
+ break;
+ if (command_line.rpath_link == NULL
+ && command_line.rpath == NULL)
+ {
+ lib_path = (const char *) getenv ("LD_RUN_PATH");
+ if (gld${EMULATION_NAME}_search_needed (lib_path, l->name,
+ force))
+ break;
+ }
EOF
if [ "x${host}" = "x${target}" ] ; then
if [ "x${DEFAULT_EMULATION}" = "x${EMULATION_NAME}" ] ; then
cat >>e${EMULATION_NAME}.c <<EOF
- lib_path = (const char *) getenv ("LD_LIBRARY_PATH");
- if (gld${EMULATION_NAME}_search_needed (lib_path, l->name))
- continue;
+ lib_path = (const char *) getenv ("LD_LIBRARY_PATH");
+ if (gld${EMULATION_NAME}_search_needed (lib_path, l->name, force))
+ break;
EOF
fi
fi
cat >>e${EMULATION_NAME}.c <<EOF
- len = strlen (l->name);
- for (search = search_head; search != NULL; search = search->next)
- {
- char *filename;
-
- if (search->cmdline)
- continue;
- filename = (char *) xmalloc (strlen (search->name) + len + 2);
- sprintf (filename, "%s/%s", search->name, l->name);
- if (gld${EMULATION_NAME}_try_needed (filename))
+ len = strlen (l->name);
+ for (search = search_head; search != NULL; search = search->next)
+ {
+ char *filename;
+
+ if (search->cmdline)
+ continue;
+ filename = (char *) xmalloc (strlen (search->name) + len + 2);
+ sprintf (filename, "%s/%s", search->name, l->name);
+ if (gld${EMULATION_NAME}_try_needed (filename, force))
+ break;
+ free (filename);
+ }
+ if (search != NULL)
break;
- free (filename);
- }
- if (search != NULL)
- continue;
EOF
if [ "x${host}" = "x${target}" ] ; then
if [ "x${DEFAULT_EMULATION}" = "x${EMULATION_NAME}" ] ; then
cat >>e${EMULATION_NAME}.c <<EOF
- if (gld${EMULATION_NAME}_check_ld_so_conf (l->name))
- continue;
+ if (gld${EMULATION_NAME}_check_ld_so_conf (l->name, force))
+ break;
EOF
fi
fi
cat >>e${EMULATION_NAME}.c <<EOF
+ }
+
+ if (force < 2)
+ continue;
einfo ("%P: warning: %s, needed by %B, not found (try using --rpath)\n",
l->name, l->by);
@@ -335,9 +355,10 @@ cat >>e${EMULATION_NAME}.c <<EOF
/* Search for a needed file in a path. */
static boolean
-gld${EMULATION_NAME}_search_needed (path, name)
+gld${EMULATION_NAME}_search_needed (path, name, force)
const char *path;
const char *name;
+ int force;
{
const char *s;
size_t len;
@@ -364,7 +385,7 @@ gld${EMULATION_NAME}_search_needed (path, name)
}
strcpy (sset, name);
- if (gld${EMULATION_NAME}_try_needed (filename))
+ if (gld${EMULATION_NAME}_try_needed (filename, force))
return true;
free (filename);
@@ -378,11 +399,13 @@ gld${EMULATION_NAME}_search_needed (path, name)
}
/* This function is called for each possible name for a dynamic object
- named by a DT_NEEDED entry. */
+ named by a DT_NEEDED entry. The FORCE parameter indicates whether
+ to skip the check for a conflicting version. */
static boolean
-gld${EMULATION_NAME}_try_needed (name)
+gld${EMULATION_NAME}_try_needed (name, force)
const char *name;
+ int force;
{
bfd *abfd;
@@ -400,6 +423,62 @@ gld${EMULATION_NAME}_try_needed (name)
return false;
}
+ /* Check whether this object would include any conflicting library
+ versions. If FORCE is set, then we skip this check; we use this
+ the second time around, if we couldn't find any compatible
+ instance of the shared library. */
+
+ if (! force)
+ {
+ struct bfd_link_needed_list *needed;
+
+ if (! bfd_elf_get_bfd_needed_list (abfd, &needed))
+ einfo ("%F%P:%B: bfd_elf_get_bfd_needed_list failed: %E\n", abfd);
+
+ if (needed != NULL)
+ {
+ global_vercheck_needed = needed;
+ global_vercheck_failed = false;
+ lang_for_each_input_file (gld${EMULATION_NAME}_vercheck);
+ if (global_vercheck_failed)
+ {
+ (void) bfd_close (abfd);
+ /* Return false to force the caller to move on to try
+ another file on the search path. */
+ return false;
+ }
+
+ /* But wait! It gets much worse. On Linux, if a shared
+ library does not use libc at all, we are supposed to skip
+ it the first time around in case we encounter a shared
+ library later on with the same name which does use the
+ version of libc that we want. This is much too horrible
+ to use on any system other than Linux. */
+
+EOF
+case ${target} in
+ *-*-linux-gnu*)
+ cat >>e${EMULATION_NAME}.c <<EOF
+ {
+ struct bfd_link_needed_list *l;
+
+ for (l = needed; l != NULL; l = l->next)
+ if (strncmp (l->name, "libc.so", 7) == 0)
+ break;
+ if (l == NULL)
+ {
+ (void) bfd_close (abfd);
+ return false;
+ }
+ }
+
+EOF
+ ;;
+esac
+cat >>e${EMULATION_NAME}.c <<EOF
+ }
+ }
+
/* We've found a dynamic object matching the DT_NEEDED entry. */
/* We have already checked that there is no other input file of the
@@ -538,6 +617,78 @@ gld${EMULATION_NAME}_stat_needed (s)
global_needed->name, global_needed->by, f);
}
+/* On Linux, it's possible to have different versions of the same
+ shared library linked against different versions of libc. The
+ dynamic linker somehow tags which libc version to use in
+ /etc/ld.so.cache, and, based on the libc that it sees in the
+ executable, chooses which version of the shared library to use.
+
+ We try to do a similar check here by checking whether this shared
+ library needs any other shared libraries which may conflict with
+ libraries we have already included in the link. If it does, we
+ skip it, and try to find another shared library farther on down the
+ link path.
+
+ This is called via lang_for_each_input_file.
+ GLOBAL_VERCHECK_NEEDED is the list of objects needed by the object
+ which we ar checking. This sets GLOBAL_VERCHECK_FAILED if we find
+ a conflicting version. */
+
+static void
+gld${EMULATION_NAME}_vercheck (s)
+ lang_input_statement_type *s;
+{
+ const char *soname, *f;
+ struct bfd_link_needed_list *l;
+
+ if (global_vercheck_failed)
+ return;
+ if (s->the_bfd == NULL
+ || (bfd_get_file_flags (s->the_bfd) & DYNAMIC) == 0)
+ return;
+
+ soname = bfd_elf_get_dt_soname (s->the_bfd);
+ if (soname == NULL)
+ soname = bfd_get_filename (s->the_bfd);
+
+ f = strrchr (soname, '/');
+ if (f != NULL)
+ ++f;
+ else
+ f = soname;
+
+ for (l = global_vercheck_needed; l != NULL; l = l->next)
+ {
+ const char *suffix;
+
+ if (strcmp (f, l->name) == 0)
+ {
+ /* Probably can't happen, but it's an easy check. */
+ continue;
+ }
+
+ if (strchr (l->name, '/') != NULL)
+ continue;
+
+ suffix = strstr (l->name, ".so.");
+ if (suffix == NULL)
+ continue;
+
+ suffix += sizeof ".so." - 1;
+
+ if (strncmp (f, l->name, suffix - l->name) == 0)
+ {
+ /* Here we know that S is a dynamic object FOO.SO.VER1, and
+ the object we are considering needs a dynamic object
+ FOO.SO.VER2, and VER1 and VER2 are different. This
+ appears to be a version mismatch, so we tell the caller
+ to try a different version of this library. */
+ global_vercheck_failed = true;
+ return;
+ }
+ }
+}
+
/* This is called after the sections have been attached to output
sections, but before any sizes or addresses have been set. */
@@ -844,7 +995,7 @@ gld${EMULATION_NAME}_place_orphan (file, s)
/* If the name of the section is representable in C, then create
symbols to mark the start and the end of the section. */
for (ps = outsecname; *ps != '\0'; ps++)
- if (! isalnum (*ps) && *ps != '_')
+ if (! isalnum ((unsigned char) *ps) && *ps != '_')
break;
if (*ps == '\0' && config.build_constructors)
{
@@ -907,6 +1058,7 @@ gld${EMULATION_NAME}_place_section (s)
os = &s->output_section_statement;
if (strcmp (os->name, hold_section->name) == 0
+ && os->bfd_section != NULL
&& ((hold_section->flags & (SEC_LOAD | SEC_ALLOC))
== (os->bfd_section->flags & (SEC_LOAD | SEC_ALLOC))))
hold_use = os;
diff --git a/contrib/binutils/ld/emultempl/pe.em b/contrib/binutils/ld/emultempl/pe.em
index 8f0913e..fcabcbd 100644
--- a/contrib/binutils/ld/emultempl/pe.em
+++ b/contrib/binutils/ld/emultempl/pe.em
@@ -2,7 +2,7 @@
# It does some substitutions.
cat >e${EMULATION_NAME}.c <<EOF
/* This file is part of GLD, the Gnu Linker.
- Copyright 1995, 96, 1997 Free Software Foundation, Inc.
+ Copyright 1995, 96, 97, 1998 Free Software Foundation, Inc.
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
@@ -364,6 +364,9 @@ gld_${EMULATION_NAME}_parse_args(argc, argv)
return 1;
}
+/* Assign values to the special symbols before the linker script is
+ read. */
+
static void
gld_${EMULATION_NAME}_set_symbols()
{
@@ -373,8 +376,18 @@ gld_${EMULATION_NAME}_set_symbols()
lang_statement_list_type *save;
if (!init[IMAGEBASEOFF].inited)
- init[IMAGEBASEOFF].value = init[DLLOFF].value
- ? NT_DLL_IMAGE_BASE : NT_EXE_IMAGE_BASE;
+ {
+ if (link_info.relocateable)
+ init[IMAGEBASEOFF].value = 0;
+ else if (init[DLLOFF].value)
+ init[IMAGEBASEOFF].value = NT_DLL_IMAGE_BASE;
+ else
+ init[IMAGEBASEOFF].value = NT_EXE_IMAGE_BASE;
+ }
+
+ /* Don't do any symbol assignments if this is a relocateable link. */
+ if (link_info.relocateable)
+ return;
/* Glue the assignments into the abs section */
save = stat_ptr;
@@ -551,15 +564,18 @@ sort_sections (s)
}
/* If this is a collection of grouped sections, sort them.
- The linker script must explicitly mention "*(.foo\$)".
- Don't sort them if \$ is not the last character (not sure if
- this is really useful, but it allows explicitly mentioning
- some \$ sections and letting the linker handle the rest). */
+ The linker script must explicitly mention "*(.foo\$)" or
+ "*(.foo\$*)". Don't sort them if \$ is not the last
+ character (not sure if this is really useful, but it
+ allows explicitly mentioning some \$ sections and letting
+ the linker handle the rest). */
if (s->wild_statement.section_name != NULL)
{
char *q = strchr (s->wild_statement.section_name, '\$');
- if (q && q[1] == 0)
+ if (q != NULL
+ && (q[1] == '\0'
+ || (q[1] == '*' && q[2] == '\0')))
{
lang_statement_union_type *end;
int count;
@@ -593,14 +609,35 @@ gld_${EMULATION_NAME}_before_allocation()
{
if (!ppc_process_before_allocation(is->the_bfd, &link_info))
{
- einfo("Errors encountered processing file %s", is->filename);
+ einfo("Errors encountered processing file %s\n", is->filename);
}
}
}
/* We have seen it all. Allocate it, and carry on */
ppc_allocate_toc_section (&link_info);
-#endif
+#else
+#ifdef TARGET_IS_armpe
+ /* FIXME: we should be able to set the size of the interworking stub
+ section.
+
+ Here we rummage through the found bfds to collect glue
+ information. FIXME: should this be based on a command line
+ option? krk@cygnus.com */
+ {
+ LANG_FOR_EACH_INPUT_STATEMENT (is)
+ {
+ if (!arm_process_before_allocation (is->the_bfd, & link_info))
+ {
+ einfo ("Errors encountered processing file %s", is->filename);
+ }
+ }
+ }
+
+ /* We have seen it all. Allocate it, and carry on */
+ arm_allocate_interworking_sections (& link_info);
+#endif /* TARGET_IS_armpe */
+#endif /* TARGET_IS_ppcpe */
sort_sections (stat_ptr->head);
}
@@ -610,7 +647,11 @@ gld_${EMULATION_NAME}_before_allocation()
gets mapped to the output section with everything from the '\$' on stripped
(e.g. .text).
See the Microsoft Portable Executable and Common Object File Format
- Specification 4.1, section 4.2, Grouped Sections. */
+ Specification 4.1, section 4.2, Grouped Sections.
+
+ FIXME: This is now handled by the linker script using wildcards,
+ but I'm leaving this here in case we want to enable it for sections
+ which are not mentioned in the linker script. */
/*ARGSUSED*/
static boolean
diff --git a/contrib/binutils/ld/ld.1 b/contrib/binutils/ld/ld.1
index 610f046..79c9f10 100644
--- a/contrib/binutils/ld/ld.1
+++ b/contrib/binutils/ld/ld.1
@@ -1,4 +1,4 @@
-.\" Copyright (c) 1991, 92, 93, 94, 95, 1996 Free Software Foundation
+.\" Copyright (c) 1991, 92, 93, 94, 95, 96, 1997 Free Software Foundation
.\" See section COPYING for conditions for redistribution
.TH ld 1 "17 August 1992" "cygnus support" "GNU Development Tools"
.de BP
@@ -91,6 +91,7 @@ ld \- the GNU linker
.RB "[\|" \-n | \-N "\|]"
.RB "[\|" \-noinhibit-exec "\|]"
.RB "[\|" \-no\-keep\-memory "\|]"
+.RB "[\|" \-no\-warn\-mismatch "\|]"
.RB "[\|" "\-oformat\ "\c
.I output-format\c
\&\|]
@@ -666,6 +667,16 @@ tables as necessary. This may be required if the linker runs out of
memory space while linking a large executable.
.TP
+.B \-no\-warn\-mismatch
+Normally the linker will give an error if you try to link together
+input files that are mismatched for some reason, perhaps because they
+have been compiled for different processors or for different
+endiannesses. This option tells the linker that it should silently
+permit such possible errors. This option should only be used with
+care, in cases when you have taken some special action that ensures
+that the linker errors are inappropriate.
+
+.TP
.BI "\-o " "output"
.I output\c
\& is a name for the program produced by \c
diff --git a/contrib/binutils/ld/ld.h b/contrib/binutils/ld/ld.h
index d504a2e..e0e2a4d 100644
--- a/contrib/binutils/ld/ld.h
+++ b/contrib/binutils/ld/ld.h
@@ -91,6 +91,10 @@ typedef struct
/* If true, generate a cross reference report. */
boolean cref;
+ /* If true (which is the default), warn about mismatched input
+ files. */
+ boolean warn_mismatch;
+
/* Name of shared object whose symbol table should be filtered with
this shared object. From the --filter option. */
char *filter_shlib;
diff --git a/contrib/binutils/ld/ld.texinfo b/contrib/binutils/ld/ld.texinfo
index 0a5d17a..05f3984 100644
--- a/contrib/binutils/ld/ld.texinfo
+++ b/contrib/binutils/ld/ld.texinfo
@@ -17,7 +17,7 @@ END-INFO-DIR-ENTRY
@ifinfo
This file documents the @sc{gnu} linker LD.
-Copyright (C) 1991, 92, 93, 94, 95, 96, 1997 Free Software Foundation, Inc.
+Copyright (C) 1991, 92, 93, 94, 95, 96, 97, 1998 Free Software Foundation, Inc.
Permission is granted to make and distribute verbatim copies of
this manual provided the copyright notice and this permission notice
@@ -64,7 +64,7 @@ notice identical to this one except for the removal of this paragraph
@end tex
@vskip 0pt plus 1filll
-Copyright @copyright{} 1991, 92, 93, 94, 95, 96, 1997 Free Software Foundation, Inc.
+Copyright @copyright{} 1991, 92, 93, 94, 95, 96, 97, 1998 Free Software Foundation, Inc.
Permission is granted to make and distribute verbatim copies of
this manual provided the copyright notice and this permission notice
@@ -328,9 +328,17 @@ entry point.
@item -E
@itemx --export-dynamic
When creating a dynamically linked executable, add all symbols to the
-dynamic symbol table. Normally, the dynamic symbol table contains only
-symbols which are used by a dynamic object. This option is needed for
-some uses of @code{dlopen}.
+dynamic symbol table. The dynamic symbol table is the set of symbols
+which are visible from dynamic objects at run time.
+
+If you do not use this option, the dynamic symbol table will normally
+contain only those symbols which are referenced by some dynamic object
+mentioned in the link.
+
+If you use @code{dlopen} to load a dynamic object which needs to refer
+back to the symbols defined by the program, rather than some other
+dynamic object, then you will probably need to use this option when
+linking the program itself.
@kindex -f
@kindex --auxiliary
@@ -482,17 +490,31 @@ at the point in which the linker script appears in the command line.
@kindex -m @var{emulation}
@item -m@var{emulation}
Emulate the @var{emulation} linker. You can list the available
-emulations with the @samp{--verbose} or @samp{-V} options. The default
-depends on how your @code{ld} was configured.
+emulations with the @samp{--verbose} or @samp{-V} options.
+
+If the @samp{-m} option is not used, the emulation is taken from the
+@code{LDEMULATION} environment variable, if that is defined.
+
+Otherwise, the default emulation depends upon how the linker was
+configured.
@cindex link map
@kindex -M
@kindex --print-map
@item -M
@itemx --print-map
-Print (to the standard output) a link map---diagnostic information about
-where symbols are mapped by @code{ld}, and information on global common
-storage allocation.
+Print a link map to the standard output. A link map provides
+information about the link, including the following:
+
+@itemize @bullet
+@item
+Where object files and symbols are mapped into memory.
+@item
+How common symbols are allocated.
+@item
+All archive members included in the link, with a mention of the symbol
+which caused the archive member to be brought in.
+@end itemize
@kindex -n
@cindex read-only text
@@ -770,12 +792,10 @@ values. See the code in testsuite/ld-empic for details.
@item --help
Print a summary of the command-line options on the standard output and exit.
-@cindex link map
@kindex -Map
@item -Map @var{mapfile}
-Print to the file @var{mapfile} a link map---diagnostic information
-about where symbols are mapped by @code{ld}, and information on global
-common storage allocation.
+Print a link map to the file @var{mapfile}. See the description of the
+@samp{-M} option, above.
@cindex memory usage
@kindex --no-keep-memory
@@ -786,6 +806,16 @@ instead optimize for memory usage, by rereading the symbol tables as
necessary. This may be required if @code{ld} runs out of memory space
while linking a large executable.
+@kindex --no-warn-mismatch
+@item --no-warn-mismatch
+Normally @code{ld} will give an error if you try to link together input
+files that are mismatched for some reason, perhaps because they have
+been compiled for different processors or for different endiannesses.
+This option tells @code{ld} that it should silently permit such possible
+errors. This option should only be used with care, in cases when you
+have taken some special action that ensures that the linker errors are
+inappropriate.
+
@kindex --no-whole-archive
@item --no-whole-archive
Turn off the effect of the @code{--whole-archive} option for subsequent
@@ -1209,8 +1239,8 @@ call before the linker has a chance to wrap it to @code{malloc}.
@node Environment
@section Environment Variables
-You can change the behavior of @code{ld} with the environment
-variable @code{GNUTARGET}.
+You can change the behavior of @code{ld} with the environment variables
+@code{GNUTARGET} and @code{LDEMULATION}.
@kindex GNUTARGET
@cindex default input format
@@ -1225,6 +1255,17 @@ there is no method of ensuring that the magic number used to specify
object-file formats is unique. However, the configuration procedure for
BFD on each system places the conventional format for that system first
in the search-list, so ambiguities are resolved in favor of convention.
+
+@kindex LDEMULATION
+@cindex default emulation
+@cindex emulation, default
+@code{LDEMULATION} determines the default emulation if you don't use the
+@samp{-m} option. The emulation can affect various aspects of linker
+behaviour, particularly the default linker script. You can list the
+available emulations with the @samp{--verbose} or @samp{-V} options. If
+the @samp{-m} option is not used, and the @code{LDEMULATION} environment
+variable is not defined, the default emulation depends upon how the
+linker was configured.
@end ifset
@node Commands
@@ -1838,11 +1879,38 @@ names. Use distinct names to specify multiple regions.
@cindex memory region attributes
@item (@var{attr})
-is an optional list of attributes, permitted for compatibility with the
-AT&T linker but not used by @code{ld} beyond checking that the
-attribute list is valid. Valid attribute lists must be made up of the
-characters ``@code{LIRWX}''. If you omit the attribute list, you may
-omit the parentheses around it as well.
+is an optional list of attributes that specify whether to use a
+particular memory to place sections that are not listed in the linker
+script. Valid attribute lists must be made up of the characters
+``@code{ALIRWX}'' that match section attributes. If you omit the
+attribute list, you may omit the parentheses around it as well. The
+attributes currently supported are:
+
+@table @samp
+@item @code{Letter}
+@code{Section Attribute}
+
+@item @code{R}
+Read-only sections.
+
+@item @code{W}
+Read/write sections.
+
+@item @code{X}
+Sections containing executable code.
+
+@item @code{A}
+Allocated sections.
+
+@item @code{I}
+Initialized sections.
+
+@item @code{L}
+Same as @code{I}.
+
+@item @code{!}
+Invert the sense of any of the following attributes.
+@end table
@kindex ORIGIN =
@kindex o =
@@ -1862,15 +1930,18 @@ The keyword @code{LENGTH} may be abbreviated to @code{len} or @code{l}.
@end table
For example, to specify that memory has two regions available for
-allocation---one starting at 0 for 256 kilobytes, and the other
-starting at @code{0x40000000} for four megabytes:
+allocation---one starting at 0 for 256 kilobytes, and the other starting
+at @code{0x40000000} for four megabytes. The @code{rom} memory region
+will get all sections without an explicit memory register that are
+either read-only or contain code, while the @code{ram} memory region
+will get the sections.
@smallexample
@group
MEMORY
@{
- rom : ORIGIN = 0, LENGTH = 256K
- ram : org = 0x40000000, l = 4M
+ rom (rx) : ORIGIN = 0, LENGTH = 256K
+ ram (!rx) : org = 0x40000000, l = 4M
@}
@end group
@end smallexample
@@ -1945,9 +2016,10 @@ SECTIONS @{ @dots{}
@noindent
@var{secname} is the name of the output section, and @var{contents} a
specification of what goes there---for example, a list of input files or
-sections of input files (@pxref{Section Placement}). As you might
-assume, the whitespace shown is optional. You do need the colon
-@samp{:} and the braces @samp{@{@}}, however.
+sections of input files (@pxref{Section Placement}). The whitespace
+around @var{secname} is required, so that the section name is
+unambiguous. The other whitespace shown is optional. You do need the
+colon @samp{:} and the braces @samp{@{@}}, however.
@var{secname} must meet the constraints of your output format. In
formats which only support a limited number of sections, such as
@@ -2013,10 +2085,10 @@ statement.
@item @var{filename}( @var{section} )
@itemx @var{filename}( @var{section} , @var{section}, @dots{} )
@itemx @var{filename}( @var{section} @var{section} @dots{} )
-You can name one or more sections from your input files, for
-insertion in the current output section. If you wish to specify a list
-of input-file sections inside the parentheses, you may separate the
-section names by either commas or whitespace.
+You can name one or more sections from your input files, for insertion
+in the current output section. If you wish to specify a list of
+input-file sections inside the parentheses, separate the section names
+with whitespace.
@cindex input sections to output section
@kindex *(@var{section})
@@ -2267,15 +2339,20 @@ same value as @code{abs2}.
@kindex SHORT(@var{expression})
@kindex LONG(@var{expression})
@kindex QUAD(@var{expression})
+@kindex SQUAD(@var{expression})
@cindex direct output
@item BYTE(@var{expression})
@itemx SHORT(@var{expression})
@itemx LONG(@var{expression})
@itemx QUAD(@var{expression})
+@itemx SQUAD(@var{expression})
By including one of these four statements in a section definition, you
-can explicitly place one, two, four, or eight bytes (respectively) at
-the current address of that section. @code{QUAD} is only supported when
-using a 64 bit host or target.
+can explicitly place one, two, four, eight unsigned, or eight signed
+bytes (respectively) at the current address of that section. When using
+a 64 bit host or target, @code{QUAD} and @code{SQUAD} are the same.
+When both host and target are 32 bits, @code{QUAD} uses an unsigned 32
+bit value, and @code{SQUAD} sign extends the value. Both will use the
+correct endianness when writing out the value.
@ifclear SingleFormat
Multiple-byte quantities are represented in whatever byte order is
@@ -2356,10 +2433,13 @@ an expression.
@cindex prevent unnecessary loading
@cindex loading, preventing
@item (NOLOAD)
-Use @samp{(NOLOAD)} to prevent a section from being loaded into memory
-each time it is accessed. For example, in the script sample below, the
-@code{ROM} segment is addressed at memory location @samp{0} and does not
-need to be loaded into each object file:
+The @samp{(NOLOAD)} directive will mark a section to not be loaded at
+run time. The linker will process the section normally, but will mark
+it so that a program loader will not load it into memory. For example,
+in the script sample below, the @code{ROM} section is addressed at
+memory location @samp{0} and does not need to be loaded when the program
+is run. The contents of the @code{ROM} section will appear in the
+linker output file as usual.
@smallexample
@group
@@ -3314,7 +3394,7 @@ individuals in the file @file{etc/SERVICE} in the @sc{gnu} Emacs
distribution.
In any event, we also recommend that you send bug reports for @code{ld}
-to @samp{bug-gnu-utils@@prep.ai.mit.edu}.
+to @samp{bug-gnu-utils@@gnu.org}.
The fundamental principle of reporting bugs usefully is this:
@strong{report all the facts}. If you are not sure whether to state a
diff --git a/contrib/binutils/ld/ldcref.c b/contrib/binutils/ld/ldcref.c
index d9e6ebb..7022daf 100644
--- a/contrib/binutils/ld/ldcref.c
+++ b/contrib/binutils/ld/ldcref.c
@@ -1,5 +1,5 @@
/* ldcref.c -- output a cross reference table
- Copyright (C) 1996 Free Software Foundation, Inc.
+ Copyright (C) 1996, 1997, 1998 Free Software Foundation, Inc.
Written by Ian Lance Taylor <ian@cygnus.com>
This file is part of GLD, the Gnu Linker.
@@ -256,7 +256,7 @@ output_cref (fp)
csym_fill = csyms;
cref_hash_traverse (&cref_table, cref_fill_array, &csym_fill);
- ASSERT (csym_fill - csyms == cref_symcount);
+ ASSERT ((size_t) (csym_fill - csyms) == cref_symcount);
qsort (csyms, cref_symcount, sizeof (*csyms), cref_sort_array);
@@ -313,7 +313,7 @@ output_one_cref (fp, h)
putc (' ', fp);
++len;
}
- finfo (fp, "%B\n", r->abfd);
+ lfinfo (fp, "%B\n", r->abfd);
len = 0;
}
}
@@ -327,7 +327,7 @@ output_one_cref (fp, h)
putc (' ', fp);
++len;
}
- finfo (fp, "%B\n", r->abfd);
+ lfinfo (fp, "%B\n", r->abfd);
len = 0;
}
}
diff --git a/contrib/binutils/ld/ldctor.c b/contrib/binutils/ld/ldctor.c
index d986f32..6e40938 100644
--- a/contrib/binutils/ld/ldctor.c
+++ b/contrib/binutils/ld/ldctor.c
@@ -139,7 +139,7 @@ ldctor_build_sets ()
{
struct set_element *e;
reloc_howto_type *howto;
- int size;
+ int reloc_size, size;
/* If the symbol is defined, we may have been invoked from
collect, and the sets may already have been built, so we do
@@ -184,12 +184,18 @@ ldctor_build_sets ()
}
}
- switch (bfd_get_reloc_size (howto))
+ reloc_size = bfd_get_reloc_size (howto);
+ switch (reloc_size)
{
case 1: size = BYTE; break;
case 2: size = SHORT; break;
case 4: size = LONG; break;
- case 8: size = QUAD; break;
+ case 8:
+ if (howto->complain_on_overflow == complain_overflow_signed)
+ size = SQUAD;
+ else
+ size = QUAD;
+ break;
default:
einfo ("%P%X: Unsupported size %d for set %s\n",
bfd_get_reloc_size (howto), p->h->root.string);
@@ -197,6 +203,9 @@ ldctor_build_sets ()
break;
}
+ lang_add_assignment (exp_assop ('=', ".",
+ exp_unop (ALIGN_K,
+ exp_intop (reloc_size))));
lang_add_assignment (exp_assop ('=', p->h->root.string,
exp_nameop (NAME, ".")));
lang_add_data (size, exp_intop ((bfd_vma) p->count));
diff --git a/contrib/binutils/ld/ldemul.c b/contrib/binutils/ld/ldemul.c
index c6fe25b..41cc544 100644
--- a/contrib/binutils/ld/ldemul.c
+++ b/contrib/binutils/ld/ldemul.c
@@ -239,7 +239,7 @@ ldemul_choose_mode(target)
}
}
einfo ("%P: unrecognised emulation mode: %s\n", target);
- einfo ("Supported emulations: ", program_name);
+ einfo ("Supported emulations: ");
ldemul_list_emulations (stderr);
einfo ("%F\n");
}
diff --git a/contrib/binutils/ld/ldexp.c b/contrib/binutils/ld/ldexp.c
index f24ce79..3471621 100644
--- a/contrib/binutils/ld/ldexp.c
+++ b/contrib/binutils/ld/ldexp.c
@@ -1,5 +1,5 @@
/* This module handles expression trees.
-Copyright (C) 1991, 1993, 1994, 1995, 1996 Free Software Foundation, Inc.
+Copyright (C) 1991, 92, 93, 94, 95, 96, 1997 Free Software Foundation, Inc.
Written by Steve Chamberlain of Cygnus Support (sac@cygnus.com).
This file is part of GLD, the Gnu Linker.
@@ -15,8 +15,9 @@ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU General Public License for more details.
You should have received a copy of the GNU General Public License
-along with GLD; see the file COPYING. If not, write to
-the Free Software Foundation, 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */
+along with GLD; see the file COPYING. If not, write to the Free
+Software Foundation, 59 Temple Place - Suite 330, Boston, MA
+02111-1307, USA. */
/*
This module is in charge of working out the contents of expressions.
@@ -106,6 +107,7 @@ exp_print_token (code)
{ SEARCH_DIR,"SEARCH_DIR" },
{ MAP,"MAP" },
{ QUAD,"QUAD" },
+ { SQUAD,"SQUAD" },
{ LONG,"LONG" },
{ SHORT,"SHORT" },
{ BYTE,"BYTE" },
@@ -391,16 +393,26 @@ fold_name (tree, current_section, allocation_done, dot)
else if (allocation_done == lang_final_phase_enum
|| allocation_done == lang_allocating_phase_enum)
{
- lang_output_section_statement_type *os;
-
- os = (lang_output_section_statement_lookup
- (h->u.def.section->output_section->name));
-
- /* FIXME: Is this correct if this section is being
- linked with -R? */
- result = new_rel ((h->u.def.value
- + h->u.def.section->output_offset),
- os);
+ asection *output_section;
+
+ output_section = h->u.def.section->output_section;
+ if (output_section == NULL)
+ einfo ("%X%S: unresolvable symbol `%s' referenced in expression\n",
+ tree->name.name);
+ else
+ {
+ lang_output_section_statement_type *os;
+
+ os = (lang_output_section_statement_lookup
+ (bfd_get_section_name (output_bfd,
+ output_section)));
+
+ /* FIXME: Is this correct if this section is
+ being linked with -R? */
+ result = new_rel ((h->u.def.value
+ + h->u.def.section->output_offset),
+ os);
+ }
}
}
else if (allocation_done == lang_final_phase_enum)
diff --git a/contrib/binutils/ld/ldfile.c b/contrib/binutils/ld/ldfile.c
index a1f2b49..3597c4e 100644
--- a/contrib/binutils/ld/ldfile.c
+++ b/contrib/binutils/ld/ldfile.c
@@ -1,4 +1,4 @@
-/* Copyright (C) 1991, 92, 93, 94 Free Software Foundation, Inc.
+/* Copyright (C) 1991, 92, 93, 94, 95, 1998 Free Software Foundation, Inc.
This file is part of GLD, the Gnu Linker.
@@ -13,8 +13,9 @@ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU General Public License for more details.
You should have received a copy of the GNU General Public License
-along with GLD; see the file COPYING. If not, write to
-the Free Software Foundation, 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */
+along with GLD; see the file COPYING. If not, write to the Free
+Software Foundation, 59 Temple Place - Suite 330, Boston, MA
+02111-1307, USA. */
/*
ldfile.c
@@ -49,8 +50,12 @@ search_dirs_type *search_head;
#ifdef VMS
char *slash = "";
#else
+#if defined (_WIN32) && ! defined (__CYGWIN32__)
+char *slash = "\\";
+#else
char *slash = "/";
#endif
+#endif
#else /* MPW */
/* The MPW path char is a colon. */
char *slash = ":";
@@ -155,7 +160,13 @@ ldfile_open_file_search (arch, entry, lib, suffix)
if (entry->is_archive)
sprintf (string, "%s%s%s%s%s%s", search->name, slash,
lib, entry->filename, arch, suffix);
- else if (entry->filename[0] == '/' || entry->filename[0] == '.')
+ else if (entry->filename[0] == '/' || entry->filename[0] == '.'
+#if defined (__MSDOS__) || defined (_WIN32)
+ || entry->filename[0] == '\\'
+ || (isalpha (entry->filename[0])
+ && entry->filename[1] == ':')
+#endif
+ )
strcpy (string, entry->filename);
else
sprintf (string, "%s%s%s", search->name, slash, entry->filename);
@@ -266,7 +277,7 @@ ldfile_find_command_file (name, extend)
for (search = search_head;
search != (search_dirs_type *)NULL;
search = search->next) {
- sprintf(buffer,"%s/%s", search->name, name);
+ sprintf(buffer,"%s%s%s", search->name, slash, name);
result = try_open(buffer, extend);
if (result)break;
}
@@ -369,10 +380,12 @@ ldfile_add_arch (in_name)
new->name = name;
new->next = (search_arch_type*)NULL;
- while (*name) {
- if (isupper(*name)) *name = tolower(*name);
- name++;
- }
+ while (*name)
+ {
+ if (isupper ((unsigned char) *name))
+ *name = tolower ((unsigned char) *name);
+ name++;
+ }
*search_arch_tail_ptr = new;
search_arch_tail_ptr = &new->next;
diff --git a/contrib/binutils/ld/ldgram.y b/contrib/binutils/ld/ldgram.y
index 87bf928..4023770 100644
--- a/contrib/binutils/ld/ldgram.y
+++ b/contrib/binutils/ld/ldgram.y
@@ -111,7 +111,7 @@ static int error_index;
%right UNARY
%token END
%left <token> '('
-%token <token> ALIGN_K BLOCK BIND QUAD LONG SHORT BYTE
+%token <token> ALIGN_K BLOCK BIND QUAD SQUAD LONG SHORT BYTE
%token SECTIONS PHDRS
%token '{' '}'
%token SIZEOF_HEADERS OUTPUT_FORMAT FORCE_COMMON_ALLOCATION OUTPUT_ARCH
@@ -132,7 +132,7 @@ static int error_index;
%token FORMAT PUBLIC DEFSYMEND BASE ALIAS TRUNCATE REL
%token INPUT_SCRIPT INPUT_MRI_SCRIPT INPUT_DEFSYM CASE EXTERN START
%token <name> VERS_TAG VERS_IDENTIFIER
-%token GLOBAL LOCAL VERSION INPUT_VERSION_SCRIPT
+%token GLOBAL LOCAL VERSIONK INPUT_VERSION_SCRIPT
%type <versyms> vers_defns
%type <versnode> vers_tag
%type <deflist> verdep
@@ -447,6 +447,8 @@ statement_list_opt:
length:
QUAD
{ $$ = $1; }
+ | SQUAD
+ { $$ = $1; }
| LONG
{ $$ = $1; }
| SHORT
@@ -538,7 +540,9 @@ memory_spec: NAME
region->origin =
exp_get_vma($3, 0L,"origin", lang_first_phase_enum);
}
- ; length_spec:
+ ;
+
+length_spec:
LENGTH '=' mustbe_exp
{ region->length = exp_get_vma($3,
~((bfd_vma)0),
@@ -550,7 +554,7 @@ memory_spec: NAME
attributes_opt:
'(' NAME ')'
{
- lang_set_flags(&region->flags, $2);
+ lang_set_flags(region, $2);
}
|
@@ -763,6 +767,7 @@ type:
atype:
'(' type ')'
| /* EMPTY */ { sectype = normal_section; }
+ | '(' ')' { sectype = normal_section; }
;
opt_exp_with_type:
@@ -935,7 +940,7 @@ version:
{
ldlex_version_script ();
}
- VERSION '{' vers_nodes '}'
+ VERSIONK '{' vers_nodes '}'
{
ldlex_popstate ();
}
diff --git a/contrib/binutils/ld/ldlang.c b/contrib/binutils/ld/ldlang.c
index 19aedf4..6cdab2b 100644
--- a/contrib/binutils/ld/ldlang.c
+++ b/contrib/binutils/ld/ldlang.c
@@ -1,5 +1,6 @@
/* Linker command language support.
- Copyright (C) 1991, 92, 93, 94, 95, 96, 1997 Free Software Foundation, Inc.
+ Copyright (C) 1991, 92, 93, 94, 95, 96, 97, 1998
+ Free Software Foundation, Inc.
This file is part of GLD, the Gnu Linker.
@@ -128,6 +129,7 @@ static bfd_vma size_input_section
lang_output_section_statement_type *output_section_statement,
fill_type fill, bfd_vma dot, boolean relax));
static void lang_finish PARAMS ((void));
+static void ignore_bfd_errors PARAMS ((const char *, ...));
static void lang_check PARAMS ((void));
static void lang_common PARAMS ((void));
static boolean lang_one_common PARAMS ((struct bfd_link_hash_entry *, PTR));
@@ -412,8 +414,7 @@ lang_memory_region_type *
lang_memory_region_lookup (name)
CONST char *CONST name;
{
-
- lang_memory_region_type *p = lang_memory_region_list;
+ lang_memory_region_type *p;
for (p = lang_memory_region_list;
p != (lang_memory_region_type *) NULL;
@@ -451,6 +452,8 @@ lang_memory_region_lookup (name)
*lang_memory_region_list_tail = new;
lang_memory_region_list_tail = &new->next;
new->origin = 0;
+ new->flags = 0;
+ new->not_flags = 0;
new->length = ~(bfd_size_type)0;
new->current = 0;
new->had_full_message = false;
@@ -460,6 +463,31 @@ lang_memory_region_lookup (name)
}
+lang_memory_region_type *
+lang_memory_default (section)
+ asection *section;
+{
+ lang_memory_region_type *p;
+
+ flagword sec_flags = section->flags;
+
+ /* Override SEC_DATA to mean a writable section. */
+ if ((sec_flags & (SEC_ALLOC | SEC_READONLY | SEC_CODE)) == SEC_ALLOC)
+ sec_flags |= SEC_DATA;
+
+ for (p = lang_memory_region_list;
+ p != (lang_memory_region_type *) NULL;
+ p = p->next)
+ {
+ if ((p->flags & sec_flags) != 0
+ && (p->not_flags & sec_flags) == 0)
+ {
+ return p;
+ }
+ }
+ return lang_memory_region_lookup ("*default*");
+}
+
lang_output_section_statement_type *
lang_output_section_find (name)
CONST char *CONST name;
@@ -518,14 +546,34 @@ lang_output_section_statement_lookup (name)
return lookup;
}
+static void
+lang_map_flags (flag)
+ flagword flag;
+{
+ if (flag & SEC_ALLOC)
+ minfo ("a");
+
+ if (flag & SEC_CODE)
+ minfo ("x");
+
+ if (flag & SEC_READONLY)
+ minfo ("r");
+
+ if (flag & SEC_DATA)
+ minfo ("w");
+
+ if (flag & SEC_LOAD)
+ minfo ("l");
+}
+
void
lang_map ()
{
lang_memory_region_type *m;
minfo ("\nMemory Configuration\n\n");
- fprintf (config.map_file, "%-16s %-18s %-18s\n",
- "Name", "Origin", "Length");
+ fprintf (config.map_file, "%-16s %-18s %-18s %s\n",
+ "Name", "Origin", "Length", "Attributes");
for (m = lang_memory_region_list;
m != (lang_memory_region_type *) NULL;
@@ -545,7 +593,26 @@ lang_map ()
++len;
}
- minfo ("0x%V\n", m->length);
+ minfo ("0x%V", m->length);
+ if (m->flags || m->not_flags)
+ {
+#ifndef BFD64
+ minfo (" ");
+#endif
+ if (m->flags)
+ {
+ print_space ();
+ lang_map_flags (m->flags);
+ }
+
+ if (m->not_flags)
+ {
+ minfo (" !");
+ lang_map_flags (m->not_flags);
+ }
+ }
+
+ print_nl ();
}
fprintf (config.map_file, "\nLinker script and memory map\n\n");
@@ -737,7 +804,11 @@ section_already_linked (abfd, sec, data)
explicit actions, like foo.o(.text), bar.o(.text) and
foo.o(.text, .data). */
-/* Return true if the PATTERN argument is a wildcard pattern. */
+/* Return true if the PATTERN argument is a wildcard pattern.
+ Although backslashes are treated specially if a pattern contains
+ wildcards, we do not consider the mere presence of a backslash to
+ be enough to cause the the pattern to be treated as a wildcard.
+ That lets us handle DOS filenames more naturally. */
static boolean
wildcardp (pattern)
@@ -747,7 +818,6 @@ wildcardp (pattern)
for (s = pattern; *s != '\0'; ++s)
if (*s == '?'
- || *s == '\\'
|| *s == '*'
|| *s == '[')
return true;
@@ -801,10 +871,17 @@ wild_doit (ptr, section, output, file)
if (section->output_section == NULL)
{
+ boolean first;
lang_input_section_type *new;
+ flagword flags;
if (output->bfd_section == NULL)
- init_os (output);
+ {
+ init_os (output);
+ first = true;
+ }
+ else
+ first = false;
/* Add a section reference to the list */
new = new_stat (lang_input_section, ptr);
@@ -813,23 +890,38 @@ wild_doit (ptr, section, output, file)
new->ifile = file;
section->output_section = output->bfd_section;
+ flags = section->flags;
+
/* We don't copy the SEC_NEVER_LOAD flag from an input section
to an output section, because we want to be able to include a
SEC_NEVER_LOAD section in the middle of an otherwise loaded
section (I don't know why we want to do this, but we do).
build_link_order in ldwrite.c handles this case by turning
- the embedded SEC_NEVER_LOAD section into a fill.
+ the embedded SEC_NEVER_LOAD section into a fill. */
+
+ flags &= ~ SEC_NEVER_LOAD;
+
+ /* If final link, don't copy the SEC_LINK_ONCE flags, they've
+ already been processed. One reason to do this is that on pe
+ format targets, .text$foo sections go into .text and it's odd
+ to see .text with SEC_LINK_ONCE set. */
+
+ if (! link_info.relocateable)
+ flags &= ~ (SEC_LINK_ONCE | SEC_LINK_DUPLICATES);
+
+ /* If this is not the first input section, and the SEC_READONLY
+ flag is not currently set, then don't set it just because the
+ input section has it set. */
+
+ if (! first && (section->output_section->flags & SEC_READONLY) == 0)
+ flags &= ~ SEC_READONLY;
- If final link, don't copy the SEC_LINK_ONCE flags, they've already
- been processed. One reason to do this is that on pe format targets,
- .text$foo sections go into .text and it's odd to see .text with
- SEC_LINK_ONCE set. */
+ section->output_section->flags |= flags;
- section->output_section->flags |=
- section->flags & (flagword) (~ (SEC_NEVER_LOAD
- | (! link_info.relocateable
- ? SEC_LINK_ONCE | SEC_LINK_DUPLICATES
- : 0)));
+ /* If SEC_READONLY is not set in the input section, then clear
+ it from the output section. */
+ if ((section->flags & SEC_READONLY) == 0)
+ section->output_section->flags &= ~SEC_READONLY;
switch (output->sectype)
{
@@ -1367,7 +1459,7 @@ lang_place_undefineds ()
h = bfd_link_hash_lookup (link_info.hash, ptr->name, true, false, true);
if (h == (struct bfd_link_hash_entry *) NULL)
- einfo ("%P%F: bfd_link_hash_lookup failed: %E");
+ einfo ("%P%F: bfd_link_hash_lookup failed: %E\n");
if (h->type == bfd_link_hash_new)
{
h->type = bfd_link_hash_undefined;
@@ -1672,6 +1764,10 @@ print_data_statement (data)
size = QUAD_SIZE;
name = "QUAD";
break;
+ case SQUAD:
+ size = QUAD_SIZE;
+ name = "SQUAD";
+ break;
}
minfo ("0x%V %W %s 0x%v", addr, size, name, data->value);
@@ -2047,7 +2143,7 @@ lang_size_sections (s, output_section_statement, prev, fill, dot, relax)
if (os->children.head == NULL
|| os->children.head->next != NULL
|| os->children.head->header.type != lang_input_section_enum)
- einfo ("%P%X: Internal error on COFF shared library section %s",
+ einfo ("%P%X: Internal error on COFF shared library section %s\n",
os->name);
input = os->children.head->input_section.section;
@@ -2070,10 +2166,28 @@ lang_size_sections (s, output_section_statement, prev, fill, dot, relax)
/* No address specified for this section, get one
from the region specification
*/
- if (os->region == (lang_memory_region_type *) NULL)
+ if (os->region == (lang_memory_region_type *) NULL
+ || (((bfd_get_section_flags (output_bfd, os->bfd_section)
+ & (SEC_ALLOC | SEC_LOAD)) != 0)
+ && os->region->name[0] == '*'
+ && strcmp (os->region->name, "*default*") == 0))
{
- os->region = lang_memory_region_lookup ("*default*");
+ os->region = lang_memory_default (os->bfd_section);
}
+
+ /* If a loadable section is using the default memory
+ region, and some non default memory regions were
+ defined, issue a warning. */
+ if ((bfd_get_section_flags (output_bfd, os->bfd_section)
+ & (SEC_ALLOC | SEC_LOAD)) != 0
+ && ! link_info.relocateable
+ && strcmp (os->region->name, "*default*") == 0
+ && lang_memory_region_list != NULL
+ && (strcmp (lang_memory_region_list->name, "*default*") != 0
+ || lang_memory_region_list->next != NULL))
+ einfo ("%P: warning: no memory region specified for section `%s'\n",
+ bfd_get_section_name (output_bfd, os->bfd_section));
+
dot = os->region->current;
if (os->section_alignment == -1)
{
@@ -2177,21 +2291,22 @@ lang_size_sections (s, output_section_statement, prev, fill, dot, relax)
output_section_statement->bfd_section;
switch (s->data_statement.type)
- {
- case QUAD:
- size = QUAD_SIZE;
- break;
- case LONG:
- size = LONG_SIZE;
- break;
- case SHORT:
- size = SHORT_SIZE;
- break;
- case BYTE:
- size = BYTE_SIZE;
- break;
+ {
+ case QUAD:
+ case SQUAD:
+ size = QUAD_SIZE;
+ break;
+ case LONG:
+ size = LONG_SIZE;
+ break;
+ case SHORT:
+ size = SHORT_SIZE;
+ break;
+ case BYTE:
+ size = BYTE_SIZE;
+ break;
+ }
- }
dot += size;
output_section_statement->bfd_section->_raw_size += size;
/* The output section gets contents, and then we inspect for
@@ -2415,6 +2530,7 @@ lang_do_assignments (s, output_section_statement, fill, dot)
switch (s->data_statement.type)
{
case QUAD:
+ case SQUAD:
dot += QUAD_SIZE;
break;
case LONG:
@@ -2599,6 +2715,20 @@ lang_finish ()
}
}
+/* This is a small function used when we want to ignore errors from
+ BFD. */
+
+static void
+#ifdef ANSI_PROTOTYPES
+ignore_bfd_errors (const char *s, ...)
+#else
+ignore_bfd_errors (s)
+ const char *s;
+#endif
+{
+ /* Don't do anything. */
+}
+
/* Check that the architecture of all the input files is compatible
with the output file. Also call the backend to let it do any
other checking that is needed. */
@@ -2618,12 +2748,32 @@ lang_check ()
compatible = bfd_arch_get_compatible (input_bfd,
output_bfd);
if (compatible == NULL)
- einfo ("%P: warning: %s architecture of input file `%B' is incompatible with %s output\n",
- bfd_printable_name (input_bfd), input_bfd,
- bfd_printable_name (output_bfd));
-
+ {
+ if (command_line.warn_mismatch)
+ einfo ("%P: warning: %s architecture of input file `%B' is incompatible with %s output\n",
+ bfd_printable_name (input_bfd), input_bfd,
+ bfd_printable_name (output_bfd));
+ }
else
- bfd_merge_private_bfd_data (input_bfd, output_bfd);
+ {
+ bfd_error_handler_type pfn = NULL;
+
+ /* If we aren't supposed to warn about mismatched input
+ files, temporarily set the BFD error handler to a
+ function which will do nothing. We still want to call
+ bfd_merge_private_bfd_data, since it may set up
+ information which is needed in the output file. */
+ if (! command_line.warn_mismatch)
+ pfn = bfd_set_error_handler (ignore_bfd_errors);
+ if (! bfd_merge_private_bfd_data (input_bfd, output_bfd))
+ {
+ if (command_line.warn_mismatch)
+ einfo ("%E%X: failed to merge target specific data of file %B\n",
+ input_bfd);
+ }
+ if (! command_line.warn_mismatch)
+ bfd_set_error_handler (pfn);
+ }
}
}
@@ -2820,36 +2970,41 @@ lang_place_orphans ()
void
lang_set_flags (ptr, flags)
- int *ptr;
+ lang_memory_region_type *ptr;
CONST char *flags;
{
- boolean state = false;
+ flagword *ptr_flags = &ptr->flags;
- *ptr = 0;
+ ptr->flags = ptr->not_flags = 0;
while (*flags)
{
- if (*flags == '!')
- {
- state = false;
- flags++;
- }
- else
- state = true;
switch (*flags)
{
- case 'R':
- /* ptr->flag_read = state; */
+ case '!':
+ ptr_flags = (ptr_flags == &ptr->flags) ? &ptr->not_flags : &ptr->flags;
+ break;
+
+ case 'A': case 'a':
+ *ptr_flags |= SEC_ALLOC;
+ break;
+
+ case 'R': case 'r':
+ *ptr_flags |= SEC_READONLY;
break;
- case 'W':
- /* ptr->flag_write = state; */
+
+ case 'W': case 'w':
+ *ptr_flags |= SEC_DATA;
break;
- case 'X':
- /* ptr->flag_executable= state;*/
+
+ case 'X': case 'x':
+ *ptr_flags |= SEC_CODE;
break;
- case 'L':
- case 'I':
- /* ptr->flag_loadable= state;*/
+
+ case 'L': case 'l':
+ case 'I': case 'i':
+ *ptr_flags |= SEC_LOAD;
break;
+
default:
einfo ("%P%F: invalid syntax in flags\n");
break;
@@ -3757,7 +3912,7 @@ lang_leave_overlay_section (fill, phdrs)
clean = xmalloc (strlen (name) + 1);
s2 = clean;
for (s1 = name; *s1 != '\0'; s1++)
- if (isalnum (*s1) || *s1 == '_')
+ if (isalnum ((unsigned char) *s1) || *s1 == '_')
*s2++ = *s1;
*s2 = '\0';
@@ -3910,11 +4065,6 @@ lang_register_vers_node (name, version, deps)
{
struct bfd_elf_version_expr *e2;
- for (e2 = t->globals; e2 != NULL; e2 = e2->next)
- if (strcmp (e1->match, e2->match) == 0)
- einfo ("%X%P: duplicate expression `%s' in version information\n",
- e1->match);
-
for (e2 = t->locals; e2 != NULL; e2 = e2->next)
if (strcmp (e1->match, e2->match) == 0)
einfo ("%X%P: duplicate expression `%s' in version information\n",
@@ -3932,11 +4082,6 @@ lang_register_vers_node (name, version, deps)
if (strcmp (e1->match, e2->match) == 0)
einfo ("%X%P: duplicate expression `%s' in version information\n",
e1->match);
-
- for (e2 = t->locals; e2 != NULL; e2 = e2->next)
- if (strcmp (e1->match, e2->match) == 0)
- einfo ("%X%P: duplicate expression `%s' in version information\n",
- e1->match);
}
}
diff --git a/contrib/binutils/ld/ldlang.h b/contrib/binutils/ld/ldlang.h
index 492351d..60edc0f 100644
--- a/contrib/binutils/ld/ldlang.h
+++ b/contrib/binutils/ld/ldlang.h
@@ -47,7 +47,8 @@ typedef struct memory_region_struct
bfd_size_type length;
bfd_vma current;
bfd_size_type old_length;
- int flags;
+ flagword flags;
+ flagword not_flags;
boolean had_full_message;
} lang_memory_region_type ;
@@ -131,7 +132,7 @@ typedef struct lang_output_section_statement_struct
boolean processed;
asection *bfd_section;
- int flags; /* Or together of all input sections */
+ flagword flags; /* Or together of all input sections */
enum section_type sectype;
struct memory_region_struct *region;
size_t block_value;
@@ -375,8 +376,10 @@ extern boolean entry_from_cmdline;
extern void lang_init PARAMS ((void));
extern struct memory_region_struct *lang_memory_region_lookup
PARAMS ((const char *const));
+extern struct memory_region_struct *lang_memory_region_default
+ PARAMS ((asection *));
extern void lang_map PARAMS ((void));
-extern void lang_set_flags PARAMS ((int *, const char *));
+extern void lang_set_flags PARAMS ((lang_memory_region_type *, const char *));
extern void lang_add_output PARAMS ((const char *, int from_script));
extern void lang_enter_output_section_statement
PARAMS ((const char *output_section_statement_name,
diff --git a/contrib/binutils/ld/ldlex.h b/contrib/binutils/ld/ldlex.h
index f824ec8..53444ca 100644
--- a/contrib/binutils/ld/ldlex.h
+++ b/contrib/binutils/ld/ldlex.h
@@ -14,8 +14,9 @@
GNU General Public License for more details.
You should have received a copy of the GNU General Public License
- along with GLD; see the file COPYING. If not, write to
- the Free Software Foundation, 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */
+ along with GLD; see the file COPYING. If not, write to the Free
+ Software Foundation, 59 Temple Place - Suite 330, Boston, MA
+ 02111-1307, USA. */
#ifndef LDLEX_H
#define LDLEX_H
@@ -33,7 +34,6 @@ typedef enum input_enum {
extern input_type parser_input;
-extern int hex_mode;
extern unsigned int lineno;
extern const char *lex_string;
diff --git a/contrib/binutils/ld/ldlex.l b/contrib/binutils/ld/ldlex.l
index 60089c6..dfdf737 100644
--- a/contrib/binutils/ld/ldlex.l
+++ b/contrib/binutils/ld/ldlex.l
@@ -1,6 +1,7 @@
%{
-/* Copyright (C) 1991, 92, 93, 94, 95, 96, 1997 Free Software Foundation, Inc.
+/* Copyright (C) 1991, 92, 93, 94, 95, 96, 97, 1998
+ Free Software Foundation, Inc.
This file is part of GLD, the Gnu Linker.
@@ -15,8 +16,9 @@ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU General Public License for more details.
You should have received a copy of the GNU General Public License
-along with GLD; see the file COPYING. If not, write to
-the Free Software Foundation, 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */
+along with GLD; see the file COPYING. If not, write to the Free
+Software Foundation, 59 Temple Place - Suite 330, Boston, MA
+02111-1307, USA. */
/*
This was written by steve chamberlain
@@ -48,9 +50,6 @@ This was written by steve chamberlain
yylex and yyparse (indirectly) both check this. */
input_type parser_input;
-/* Radix to use for bfd_scan_vma -- 0 (default to base 10) or 16. */
-int hex_mode;
-
/* Line number in the current input file.
(FIXME Actually, it doesn't appear to get reset for each file?) */
unsigned int lineno = 1;
@@ -115,7 +114,7 @@ WHITE [ \t\n\r]+
NOCFILENAMECHAR [_a-zA-Z0-9\/\.\-\_\+\$\:\[\]\\\~]
V_TAG [.$_a-zA-Z][._a-zA-Z0-9]*
-V_IDENTIFIER [*?$_a-zA-Z][*?_a-zA-Z0-9]*
+V_IDENTIFIER [*?.$_a-zA-Z][*?_a-zA-Z0-9]*
%s SCRIPT
%s EXPRESSION
@@ -179,17 +178,18 @@ V_IDENTIFIER [*?$_a-zA-Z][*?_a-zA-Z0-9]*
ibase);
return INT;
}
-<SCRIPT,DEFSYMEXP,MRI,BOTH,EXPRESSION>"$"?"0x"?([0-9A-Fa-f])+(M|K|m|k)? {
- yylval.integer = bfd_scan_vma (yytext, 0,
- hex_mode);
- if (yytext[yyleng-1]=='M'
- || yytext[yyleng-1] == 'm') {
- yylval.integer *= 1024*1024;
- }
- if (yytext[yyleng-1]=='K'
- || yytext[yyleng-1]=='k') {
- yylval.integer *= 1024;
- }
+<SCRIPT,DEFSYMEXP,MRI,BOTH,EXPRESSION>((("$"|"0x")([0-9A-Fa-f])+)|(([0-9])+))(M|K|m|k)? {
+ char *s = yytext;
+
+ if (*s == '$')
+ ++s;
+ yylval.integer = bfd_scan_vma (s, 0, 0);
+ if (yytext[yyleng-1] == 'M'
+ || yytext[yyleng-1] == 'm')
+ yylval.integer *= 1024 * 1024;
+ if (yytext[yyleng-1] == 'K'
+ || yytext[yyleng-1]=='k')
+ yylval.integer *= 1024;
return INT;
}
<BOTH,SCRIPT,EXPRESSION,MRI>"]" { RTOKEN(']');}
@@ -232,7 +232,7 @@ V_IDENTIFIER [*?$_a-zA-Z][*?_a-zA-Z0-9]*
<BOTH,SCRIPT,EXPRESSION,MRI>";" { RTOKEN(';');}
<BOTH,SCRIPT>"MEMORY" { RTOKEN(MEMORY);}
<BOTH,SCRIPT>"ORIGIN" { RTOKEN(ORIGIN);}
-<BOTH,SCRIPT>"VERSION" { RTOKEN(VERSION);}
+<BOTH,SCRIPT>"VERSION" { RTOKEN(VERSIONK);}
<EXPRESSION,BOTH,SCRIPT>"BLOCK" { RTOKEN(BLOCK);}
<EXPRESSION,BOTH,SCRIPT>"BIND" { RTOKEN(BIND);}
<BOTH,SCRIPT>"LENGTH" { RTOKEN(LENGTH);}
@@ -265,6 +265,7 @@ V_IDENTIFIER [*?$_a-zA-Z][*?_a-zA-Z0-9]*
<BOTH,SCRIPT>"SYSLIB" { RTOKEN(SYSLIB);}
<BOTH,SCRIPT>"FLOAT" { RTOKEN(FLOAT);}
<BOTH,SCRIPT>"QUAD" { RTOKEN( QUAD);}
+<BOTH,SCRIPT>"SQUAD" { RTOKEN( SQUAD);}
<BOTH,SCRIPT>"LONG" { RTOKEN( LONG);}
<BOTH,SCRIPT>"SHORT" { RTOKEN( SHORT);}
<BOTH,SCRIPT>"BYTE" { RTOKEN( BYTE);}
@@ -284,9 +285,8 @@ V_IDENTIFIER [*?$_a-zA-Z][*?_a-zA-Z0-9]*
<BOTH,SCRIPT>"PHDRS" { RTOKEN (PHDRS); }
<EXPRESSION,BOTH,SCRIPT>"AT" { RTOKEN(AT);}
<EXPRESSION,BOTH,SCRIPT>"PROVIDE" { RTOKEN(PROVIDE); }
-<MRI>"#".*\n?\r? { ++ lineno; }
+<MRI>"#".*\n? { ++ lineno; }
<MRI>"\n" { ++ lineno; RTOKEN(NEWLINE); }
-<MRI>"\r" { ++ lineno; RTOKEN(NEWLINE); }
<MRI>"*".* { /* Mri comment line */ }
<MRI>";".* { /* Mri comment line */ }
<MRI>"END" { RTOKEN(ENDWORD); }
@@ -341,7 +341,22 @@ V_IDENTIFIER [*?$_a-zA-Z][*?_a-zA-Z0-9]*
yylval.name = buystring (yytext + 2);
return LNAME;
}
-<SCRIPT>{WILDCHAR}* { yylval.name = buystring(yytext); return NAME; }
+<SCRIPT>{WILDCHAR}* {
+ /* Annoyingly, this pattern can match comments, and we have
+ longest match issues to consider. So if the first two
+ characters are a comment opening, put the input back and
+ try again. */
+ if (yytext[0] == '/' && yytext[1] == '*')
+ {
+ yyless(2);
+ comment ();
+ }
+ else
+ {
+ yylval.name = buystring(yytext);
+ return NAME;
+ }
+ }
<EXPRESSION,BOTH,SCRIPT>"\""[^\"]*"\"" {
/* No matter the state, quotes
@@ -351,8 +366,7 @@ V_IDENTIFIER [*?$_a-zA-Z][*?_a-zA-Z0-9]*
return NAME;
}
<BOTH,SCRIPT,EXPRESSION>"\n" { lineno++;}
-<BOTH,SCRIPT,EXPRESSION>"\r" { lineno++;}
-<MRI,BOTH,SCRIPT,EXPRESSION>[ \t]
+<MRI,BOTH,SCRIPT,EXPRESSION>[ \t\r]+ { }
<VERS_NODE,VERS_SCRIPT>[:,;] { return *yytext; }
@@ -371,11 +385,11 @@ V_IDENTIFIER [*?$_a-zA-Z][*?_a-zA-Z0-9]*
<VERS_SCRIPT>"{" { BEGIN(VERS_NODE); return *yytext; }
<VERS_SCRIPT,VERS_NODE>"}" { BEGIN(VERS_SCRIPT); return *yytext; }
-<VERS_START,VERS_NODE,VERS_SCRIPT>[\n\r] { lineno++; }
+<VERS_START,VERS_NODE,VERS_SCRIPT>[\n] { lineno++; }
<VERS_START,VERS_NODE,VERS_SCRIPT>#.* { /* Eat up comments */ }
-<VERS_START,VERS_NODE,VERS_SCRIPT>[ \t]+ { /* Eat up whitespace */ }
+<VERS_START,VERS_NODE,VERS_SCRIPT>[ \t\r]+ { /* Eat up whitespace */ }
<<EOF>> {
include_stack_ptr--;
@@ -562,7 +576,7 @@ yy_input (buf, result, max_size)
{
*result = read (fileno (yyin), (char *) buf, max_size);
if (*result < 0)
- einfo ("%F%P: read in flex scanner failed");
+ einfo ("%F%P: read in flex scanner failed\n");
}
}
}
@@ -579,7 +593,7 @@ comment ()
c = input();
while (c != '*' && c != EOF)
{
- if (c == '\n' || c == '\r')
+ if (c == '\n')
lineno++;
c = input();
}
@@ -593,7 +607,7 @@ comment ()
break; /* found the end */
}
- if (c == '\n' || c == '\r')
+ if (c == '\n')
lineno++;
if (c == EOF)
diff --git a/contrib/binutils/ld/ldmain.c b/contrib/binutils/ld/ldmain.c
index 94b9b57..97fed9d 100644
--- a/contrib/binutils/ld/ldmain.c
+++ b/contrib/binutils/ld/ldmain.c
@@ -191,6 +191,7 @@ main (argc, argv)
command_line.force_common_definition = false;
command_line.interpreter = NULL;
command_line.rpath = NULL;
+ command_line.warn_mismatch = true;
link_info.callbacks = &link_callbacks;
link_info.relocateable = false;
diff --git a/contrib/binutils/ld/ldmisc.c b/contrib/binutils/ld/ldmisc.c
index 282ce22..a292d40 100644
--- a/contrib/binutils/ld/ldmisc.c
+++ b/contrib/binutils/ld/ldmisc.c
@@ -244,10 +244,10 @@ vfinfo (fp, fmt, arg)
{
arelent *relent = va_arg (arg, arelent *);
- finfo (fp, "%s+0x%v (type %s)",
- (*(relent->sym_ptr_ptr))->name,
- relent->addend,
- relent->howto->name);
+ lfinfo (fp, "%s+0x%v (type %s)",
+ (*(relent->sym_ptr_ptr))->name,
+ relent->addend,
+ relent->howto->name);
}
break;
@@ -305,11 +305,11 @@ vfinfo (fp, fmt, arg)
{
if (functionname != NULL && fmt[-1] == 'G')
{
- finfo (fp, "%B:", abfd);
+ lfinfo (fp, "%B:", abfd);
if (filename != NULL
&& strcmp (filename, bfd_get_filename (abfd)) != 0)
fprintf (fp, "%s:", filename);
- finfo (fp, "%T", functionname);
+ lfinfo (fp, "%T", functionname);
}
else if (functionname != NULL && fmt[-1] == 'C')
{
@@ -326,8 +326,8 @@ vfinfo (fp, fmt, arg)
/* We use abfd->filename in this initial line,
in case filename is a .h file or something
similarly unhelpful. */
- finfo (fp, "%B: In function `%T':\n",
- abfd, functionname);
+ lfinfo (fp, "%B: In function `%T':\n",
+ abfd, functionname);
last_bfd = abfd;
if (last_file != NULL)
@@ -341,24 +341,25 @@ vfinfo (fp, fmt, arg)
if (linenumber != 0)
fprintf (fp, "%s:%u", filename, linenumber);
else
- finfo (fp, "%s(%s+0x%v)", filename, section->name,
- offset);
+ lfinfo (fp, "%s(%s+0x%v)", filename, section->name,
+ offset);
}
else if (filename == NULL
|| strcmp (filename, abfd->filename) == 0)
{
- finfo (fp, "%B(%s+0x%v)", abfd, section->name, offset);
+ lfinfo (fp, "%B(%s+0x%v)", abfd, section->name,
+ offset);
if (linenumber != 0)
- finfo (fp, ":%u", linenumber);
+ lfinfo (fp, ":%u", linenumber);
}
else if (linenumber != 0)
- finfo (fp, "%B:%s:%u", abfd, filename, linenumber);
+ lfinfo (fp, "%B:%s:%u", abfd, filename, linenumber);
else
- finfo (fp, "%B(%s+0x%v):%s", abfd, section->name, offset,
- filename);
+ lfinfo (fp, "%B(%s+0x%v):%s", abfd, section->name,
+ offset, filename);
}
else
- finfo (fp, "%B(%s+0x%v)", abfd, section->name, offset);
+ lfinfo (fp, "%B(%s+0x%v)", abfd, section->name, offset);
if (discard_last)
{
@@ -496,9 +497,9 @@ minfo (va_alist)
void
#if USE_STDARG
-finfo (FILE *file, const char *fmt, ...)
+lfinfo (FILE *file, const char *fmt, ...)
#else
-finfo (va_alist)
+lfinfo (va_alist)
va_dcl
#endif
{
diff --git a/contrib/binutils/ld/ldmisc.h b/contrib/binutils/ld/ldmisc.h
index f0073a7..f5b3b4f 100644
--- a/contrib/binutils/ld/ldmisc.h
+++ b/contrib/binutils/ld/ldmisc.h
@@ -24,7 +24,7 @@
extern void einfo PARAMS ((const char *, ...));
extern void minfo PARAMS ((const char *, ...));
extern void info_msg PARAMS ((const char *, ...));
-extern void finfo PARAMS ((FILE *, const char *, ...));
+extern void lfinfo PARAMS ((FILE *, const char *, ...));
#else
/* VARARGS*/
extern void einfo ();
@@ -33,7 +33,7 @@ extern void minfo ();
/* VARARGS*/
extern void info_msg ();
/*VARARGS*/
-extern void finfo ();
+extern void lfinfo ();
#endif
extern void info_assert PARAMS ((const char *, unsigned int));
diff --git a/contrib/binutils/ld/ldver.c b/contrib/binutils/ld/ldver.c
index e8dc0b8..6a5137b 100644
--- a/contrib/binutils/ld/ldver.c
+++ b/contrib/binutils/ld/ldver.c
@@ -26,7 +26,7 @@ Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */
#include "ldemul.h"
#include "ldmain.h"
-const char *ld_program_version = "2.8.1";
+const char *ld_program_version = VERSION;
void
ldversion (noisy)
diff --git a/contrib/binutils/ld/ldwrite.c b/contrib/binutils/ld/ldwrite.c
index b4d47a0..0a18476 100644
--- a/contrib/binutils/ld/ldwrite.c
+++ b/contrib/binutils/ld/ldwrite.c
@@ -1,5 +1,6 @@
/* ldwrite.c -- write out the linked file
- Copyright (C) 1991, 92, 93, 94, 95, 96, 1997 Free Software Foundation, Inc.
+ Copyright (C) 1991, 92, 93, 94, 95, 96, 97, 1998
+ Free Software Foundation, Inc.
Written by Steve Chamberlain sac@cygnus.com
This file is part of GLD, the Gnu Linker.
@@ -48,6 +49,7 @@ build_link_order (statement)
asection *output_section;
struct bfd_link_order *link_order;
bfd_vma value;
+ boolean big_endian = false;
output_section = statement->data_statement.output_section;
ASSERT (output_section->owner == output_bfd);
@@ -67,25 +69,39 @@ build_link_order (statement)
By convention, the bfd_put routines for an unknown
endianness are big endian, so we must swap here if the
input file is little endian. */
- if (! bfd_big_endian (output_bfd)
- && ! bfd_little_endian (output_bfd))
+ if (bfd_big_endian (output_bfd))
+ big_endian = true;
+ else if (bfd_little_endian (output_bfd))
+ big_endian = false;
+ else
{
boolean swap;
swap = false;
- if (command_line.endian == ENDIAN_LITTLE)
- swap = true;
+ if (command_line.endian == ENDIAN_BIG)
+ big_endian = true;
+ else if (command_line.endian == ENDIAN_LITTLE)
+ {
+ big_endian = false;
+ swap = true;
+ }
else if (command_line.endian == ENDIAN_UNSET)
{
- LANG_FOR_EACH_INPUT_STATEMENT (s)
- {
- if (s->the_bfd != NULL)
- {
- if (bfd_little_endian (s->the_bfd))
- swap = true;
- break;
- }
- }
+ big_endian = true;
+ {
+ LANG_FOR_EACH_INPUT_STATEMENT (s)
+ {
+ if (s->the_bfd != NULL)
+ {
+ if (bfd_little_endian (s->the_bfd))
+ {
+ big_endian = false;
+ swap = true;
+ }
+ break;
+ }
+ }
+ }
}
if (swap)
@@ -95,9 +111,14 @@ build_link_order (statement)
switch (statement->data_statement.type)
{
case QUAD:
- bfd_putl64 (value, buffer);
- value = bfd_getb64 (buffer);
- break;
+ case SQUAD:
+ if (sizeof (bfd_vma) >= QUAD_SIZE)
+ {
+ bfd_putl64 (value, buffer);
+ value = bfd_getb64 (buffer);
+ break;
+ }
+ /* Fall through. */
case LONG:
bfd_putl32 (value, buffer);
value = bfd_getb32 (buffer);
@@ -118,7 +139,26 @@ build_link_order (statement)
switch (statement->data_statement.type)
{
case QUAD:
- bfd_put_64 (output_bfd, value, link_order->u.data.contents);
+ case SQUAD:
+ if (sizeof (bfd_vma) >= QUAD_SIZE)
+ bfd_put_64 (output_bfd, value, link_order->u.data.contents);
+ else
+ {
+ bfd_vma high;
+
+ if (statement->data_statement.type == QUAD)
+ high = 0;
+ else if ((value & 0x80000000) == 0)
+ high = 0;
+ else
+ high = (bfd_vma) -1;
+ bfd_put_32 (output_bfd, high,
+ (link_order->u.data.contents
+ + (big_endian ? 0 : 4)));
+ bfd_put_32 (output_bfd, value,
+ (link_order->u.data.contents
+ + (big_endian ? 4 : 0)));
+ }
link_order->size = QUAD_SIZE;
break;
case LONG:
diff --git a/contrib/binutils/ld/lexsup.c b/contrib/binutils/ld/lexsup.c
index 2ca3d23..257c2f8 100644
--- a/contrib/binutils/ld/lexsup.c
+++ b/contrib/binutils/ld/lexsup.c
@@ -1,5 +1,6 @@
/* Parse options for the GNU linker.
- Copyright (C) 1991, 92, 93, 94, 95, 96, 1997 Free Software Foundation, Inc.
+ Copyright (C) 1991, 92, 93, 94, 95, 96, 97, 1998
+ Free Software Foundation, Inc.
This file is part of GLD, the Gnu Linker.
@@ -14,8 +15,9 @@ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU General Public License for more details.
You should have received a copy of the GNU General Public License
-along with GLD; see the file COPYING. If not, write to
-the Free Software Foundation, 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */
+along with GLD; see the file COPYING. If not, write to the Free
+Software Foundation, 59 Temple Place - Suite 330, Boston, MA
+02111-1307, USA. */
#include "bfd.h"
#include "sysdep.h"
@@ -36,6 +38,14 @@ the Free Software Foundation, 59 Temple Place - Suite 330, Boston, MA 02111-1307
#include "ldver.h"
#include "ldemul.h"
+#ifndef PATH_SEPARATOR
+#if defined (__MSDOS__) || (defined (_WIN32) && ! defined (__CYGWIN32__))
+#define PATH_SEPARATOR ';'
+#else
+#define PATH_SEPARATOR ':'
+#endif
+#endif
+
/* Somewhere above, sys/stat.h got included . . . . */
#if !defined(S_ISDIR) && defined(S_IFDIR)
#define S_ISDIR(m) (((m) & S_IFMT) == S_IFDIR)
@@ -68,7 +78,8 @@ int parsing_defsym = 0;
#define OPTION_IGNORE (OPTION_HELP + 1)
#define OPTION_MAP (OPTION_IGNORE + 1)
#define OPTION_NO_KEEP_MEMORY (OPTION_MAP + 1)
-#define OPTION_NOINHIBIT_EXEC (OPTION_NO_KEEP_MEMORY + 1)
+#define OPTION_NO_WARN_MISMATCH (OPTION_NO_KEEP_MEMORY + 1)
+#define OPTION_NOINHIBIT_EXEC (OPTION_NO_WARN_MISMATCH + 1)
#define OPTION_NON_SHARED (OPTION_NOINHIBIT_EXEC + 1)
#define OPTION_NO_WHOLE_ARCHIVE (OPTION_NON_SHARED + 1)
#define OPTION_OFORMAT (OPTION_NO_WHOLE_ARCHIVE + 1)
@@ -81,7 +92,8 @@ int parsing_defsym = 0;
#define OPTION_SORT_COMMON (OPTION_SONAME + 1)
#define OPTION_STATS (OPTION_SORT_COMMON + 1)
#define OPTION_SYMBOLIC (OPTION_STATS + 1)
-#define OPTION_TBSS (OPTION_SYMBOLIC + 1)
+#define OPTION_TASK_LINK (OPTION_SYMBOLIC + 1)
+#define OPTION_TBSS (OPTION_TASK_LINK + 1)
#define OPTION_TDATA (OPTION_TBSS + 1)
#define OPTION_TTEXT (OPTION_TDATA + 1)
#define OPTION_TRADITIONAL_FORMAT (OPTION_TTEXT + 1)
@@ -246,6 +258,8 @@ static const struct ld_option ld_options[] =
'\0', "FILE", "Write a map file", ONE_DASH },
{ {"no-keep-memory", no_argument, NULL, OPTION_NO_KEEP_MEMORY},
'\0', NULL, "Use less memory and more disk I/O", TWO_DASHES },
+ { {"no-warn-mismatch", no_argument, NULL, OPTION_NO_WARN_MISMATCH},
+ '\0', NULL, "Don't warn about mismatched input files", TWO_DASHES},
{ {"no-whole-archive", no_argument, NULL, OPTION_NO_WHOLE_ARCHIVE},
'\0', NULL, "Turn off --whole-archive", TWO_DASHES },
{ {"noinhibit-exec", no_argument, NULL, OPTION_NOINHIBIT_EXEC},
@@ -281,6 +295,8 @@ static const struct ld_option ld_options[] =
'\0', "COUNT", "Split output sections every COUNT relocs", TWO_DASHES },
{ {"stats", no_argument, NULL, OPTION_STATS},
'\0', NULL, "Print memory usage statistics", TWO_DASHES },
+ { {"task-link", required_argument, NULL, OPTION_TASK_LINK},
+ '\0', "SYMBOL", "Do task level linking", TWO_DASHES },
{ {"traditional-format", no_argument, NULL, OPTION_TRADITIONAL_FORMAT},
'\0', NULL, "Use same format as native linker", TWO_DASHES },
{ {"Tbss", required_argument, NULL, OPTION_TBSS},
@@ -315,7 +331,7 @@ static const struct ld_option ld_options[] =
'\0', "SYMBOL", "Use wrapper functions for SYMBOL", TWO_DASHES }
};
-#define OPTION_COUNT (sizeof ld_options / sizeof ld_options[0])
+#define OPTION_COUNT ((int) (sizeof ld_options / sizeof ld_options[0]))
void
parse_args (argc, argv)
@@ -327,6 +343,7 @@ parse_args (argc, argv)
char *default_dirlist = NULL;
char shortopts[OPTION_COUNT * 3 + 2];
struct option longopts[OPTION_COUNT + 1];
+ int last_optind;
/* Starting the short option string with '-' is for programs that
expect options and other ARGV-elements in any order and that care about
@@ -376,9 +393,10 @@ parse_args (argc, argv)
for (i = 1; i < argc; i++)
if (strcmp (argv[i], "-G") == 0
&& (i + 1 >= argc
- || ! isdigit (argv[i + 1][0])))
+ || ! isdigit ((unsigned char) argv[i + 1][0])))
argv[i] = (char *) "--shared";
+ last_optind = -1;
while (1)
{
/* getopt_long_only is like getopt_long, but '-' as well as '--' can
@@ -386,8 +404,18 @@ parse_args (argc, argv)
int longind;
int optc;
- if (ldemul_parse_args (argc, argv))
- continue;
+ /* Using last_optind lets us avoid calling ldemul_parse_args
+ multiple times on a single option, which would lead to
+ confusion in the internal static variables maintained by
+ getopt. This could otherwise happen for an argument like
+ -nx, in which the -n is parsed as a single option, and we
+ loop around to pick up the -x. */
+ if (optind != last_optind)
+ {
+ if (ldemul_parse_args (argc, argv))
+ continue;
+ last_optind = optind;
+ }
optc = getopt_long_only (argc, argv, shortopts, longopts, &longind);
@@ -553,6 +581,9 @@ parse_args (argc, argv)
case OPTION_NO_KEEP_MEMORY:
link_info.keep_memory = false;
break;
+ case OPTION_NO_WARN_MISMATCH:
+ command_line.warn_mismatch = false;
+ break;
case OPTION_NOINHIBIT_EXEC:
force_make_executable = true;
break;
@@ -679,6 +710,9 @@ parse_args (argc, argv)
case OPTION_TRADITIONAL_FORMAT:
link_info.traditional_format = true;
break;
+ case OPTION_TASK_LINK:
+ link_info.task_link = true;
+ /* Fall through - do an implied -r option. */
case OPTION_UR:
link_info.relocateable = true;
config.build_constructors = true;
@@ -826,7 +860,7 @@ set_default_dirlist (dirlist_ptr)
while (1)
{
- p = strchr (dirlist_ptr, ':');
+ p = strchr (dirlist_ptr, PATH_SEPARATOR);
if (p != NULL)
*p = '\0';
if (*dirlist_ptr != '\0')
@@ -944,5 +978,5 @@ help ()
printf ("%s: supported emulations: ", program_name);
ldemul_list_emulations (stdout);
printf ("\n");
- printf ("\nReport bugs to bug-gnu-utils@prep.ai.mit.edu\n");
+ printf ("\nReport bugs to bug-gnu-utils@gnu.org\n");
}
diff --git a/contrib/binutils/ld/scripttempl/elf.sc b/contrib/binutils/ld/scripttempl/elf.sc
index 27f2e9d..83e589a 100644
--- a/contrib/binutils/ld/scripttempl/elf.sc
+++ b/contrib/binutils/ld/scripttempl/elf.sc
@@ -2,8 +2,10 @@
# Unusual variables checked by this code:
# NOP - two byte opcode for no-op (defaults to 0)
# DATA_ADDR - if end-of-text-plus-one-page isn't right for data start
+# INITIAL_READONLY_SECTIONS - at start of text segment
# OTHER_READONLY_SECTIONS - other than .text .init .rodata ...
# (e.g., .PARISC.milli)
+# OTHER_TEXT_SECTIONS - these get put in .text when relocating
# OTHER_READWRITE_SECTIONS - other than .data .bss .ctors .sdata ...
# (e.g., .PARISC.global)
# OTHER_SECTIONS - at the end
@@ -13,21 +15,29 @@
# .text section.
# DATA_START_SYMBOLS - symbols that appear at the start of the
# .data section.
+# OTHER_GOT_SYMBOLS - symbols defined just before .got.
+# OTHER_GOT_SECTIONS - sections just after .got and .sdata.
# OTHER_BSS_SYMBOLS - symbols that appear at the start of the
# .bss section besides __bss_start.
# DATA_PLT - .plt should be in data segment, not text segment.
+# TEXT_DYNAMIC - .dynamic in text segment, not data segment.
# EMBEDDED - whether this is for an embedded system.
+# SHLIB_TEXT_START_ADDR - if set, add to SIZEOF_HEADERS to set
+# start address of shared library.
#
# When adding sections, do note that the names of some sections are used
# when specifying the start address of the next.
#
+
test -z "$ENTRY" && ENTRY=_start
test -z "${BIG_OUTPUT_FORMAT}" && BIG_OUTPUT_FORMAT=${OUTPUT_FORMAT}
test -z "${LITTLE_OUTPUT_FORMAT}" && LITTLE_OUTPUT_FORMAT=${OUTPUT_FORMAT}
if [ -z "$MACHINE" ]; then OUTPUT_ARCH=${ARCH}; else OUTPUT_ARCH=${ARCH}:${MACHINE}; fi
+test -z "${ELFSIZE}" && ELFSIZE=32
test "$LD_FLAG" = "N" && DATA_ADDR=.
INTERP=".interp ${RELOCATING-0} : { *(.interp) }"
PLT=".plt ${RELOCATING-0} : { *(.plt) }"
+DYNAMIC=".dynamic ${RELOCATING-0} : { *(.dynamic) }"
# if this is for an embedded system, don't add SIZEOF_HEADERS.
if [ -z "$EMBEDDED" ]; then
@@ -54,8 +64,10 @@ SECTIONS
{
/* Read-only sections, merged into text segment: */
${CREATE_SHLIB-${RELOCATING+. = ${TEXT_BASE_ADDRESS};}}
- ${CREATE_SHLIB+${RELOCATING+. = SIZEOF_HEADERS;}}
+ ${CREATE_SHLIB+${RELOCATING+. = ${SHLIB_TEXT_START_ADDR:-0} + SIZEOF_HEADERS;}}
${CREATE_SHLIB-${INTERP}}
+ ${INITIAL_READONLY_SECTIONS}
+ ${TEXT_DYNAMIC+${DYNAMIC}}
.hash ${RELOCATING-0} : { *(.hash) }
.dynsym ${RELOCATING-0} : { *(.dynsym) }
.dynstr ${RELOCATING-0} : { *(.dynstr) }
@@ -63,17 +75,17 @@ SECTIONS
.gnu.version_d ${RELOCATING-0} : { *(.gnu.version_d) }
.gnu.version_r ${RELOCATING-0} : { *(.gnu.version_r) }
.rel.text ${RELOCATING-0} :
- { *(.rel.text) *(.rel.gnu.linkonce.t*) }
+ { *(.rel.text) ${RELOCATING+*(.rel.gnu.linkonce.t*)} }
.rela.text ${RELOCATING-0} :
- { *(.rela.text) *(.rela.gnu.linkonce.t*) }
+ { *(.rela.text) ${RELOCATING+*(.rela.gnu.linkonce.t*)} }
.rel.data ${RELOCATING-0} :
- { *(.rel.data) *(.rel.gnu.linkonce.d*) }
+ { *(.rel.data) ${RELOCATING+*(.rel.gnu.linkonce.d*)} }
.rela.data ${RELOCATING-0} :
- { *(.rela.data) *(.rela.gnu.linkonce.d*) }
+ { *(.rela.data) ${RELOCATING+*(.rela.gnu.linkonce.d*)} }
.rel.rodata ${RELOCATING-0} :
- { *(.rel.rodata) *(.rel.gnu.linkonce.r*) }
+ { *(.rel.rodata) ${RELOCATING+*(.rel.gnu.linkonce.r*)} }
.rela.rodata ${RELOCATING-0} :
- { *(.rela.rodata) *(.rela.gnu.linkonce.r*) }
+ { *(.rela.rodata) ${RELOCATING+*(.rela.gnu.linkonce.r*)} }
.rel.got ${RELOCATING-0} : { *(.rel.got) }
.rela.got ${RELOCATING-0} : { *(.rela.got) }
.rel.ctors ${RELOCATING-0} : { *(.rel.ctors) }
@@ -94,26 +106,29 @@ SECTIONS
{
${RELOCATING+${TEXT_START_SYMBOLS}}
*(.text)
+ *(.stub)
/* .gnu.warning sections are handled specially by elf32.em. */
*(.gnu.warning)
- *(.gnu.linkonce.t*)
+ ${RELOCATING+*(.gnu.linkonce.t*)}
+ ${RELOCATING+${OTHER_TEXT_SECTIONS}}
} =${NOP-0}
${RELOCATING+_etext = .;}
${RELOCATING+PROVIDE (etext = .);}
.fini ${RELOCATING-0} : { *(.fini) } =${NOP-0}
- .rodata ${RELOCATING-0} : { *(.rodata) *(.gnu.linkonce.r*) }
+ .rodata ${RELOCATING-0} : { *(.rodata) ${RELOCATING+*(.gnu.linkonce.r*)} }
.rodata1 ${RELOCATING-0} : { *(.rodata1) }
${RELOCATING+${OTHER_READONLY_SECTIONS}}
/* Adjust the address for the data segment. We want to adjust up to
the same address within the page on the next page up. */
- ${RELOCATING+. = ${DATA_ADDR-ALIGN(${MAXPAGESIZE}) + (. & (${MAXPAGESIZE} - 1))};}
+ ${CREATE_SHLIB-${RELOCATING+. = ${DATA_ADDR-ALIGN(${MAXPAGESIZE}) + (. & (${MAXPAGESIZE} - 1))};}}
+ ${CREATE_SHLIB+${RELOCATING+. = ${SHLIB_DATA_ADDR-ALIGN(${MAXPAGESIZE}) + (. & (${MAXPAGESIZE} - 1))};}}
.data ${RELOCATING-0} :
{
${RELOCATING+${DATA_START_SYMBOLS}}
*(.data)
- *(.gnu.linkonce.d*)
+ ${RELOCATING+*(.gnu.linkonce.d*)}
${CONSTRUCTING+CONSTRUCTORS}
}
.data1 ${RELOCATING-0} : { *(.data1) }
@@ -131,12 +146,14 @@ SECTIONS
${CONSTRUCTING+${DTOR_END}}
}
${DATA_PLT+${PLT}}
+ ${RELOCATING+${OTHER_GOT_SYMBOLS}}
.got ${RELOCATING-0} : { *(.got.plt) *(.got) }
- .dynamic ${RELOCATING-0} : { *(.dynamic) }
+ ${TEXT_DYNAMIC-${DYNAMIC}}
/* We want the small data sections together, so single-instruction offsets
can access them all, and initialized data all before uninitialized, so
we can shorten the on-disk segment size. */
.sdata ${RELOCATING-0} : { *(.sdata) }
+ ${RELOCATING+${OTHER_GOT_SECTIONS}}
${RELOCATING+_edata = .;}
${RELOCATING+PROVIDE (edata = .);}
${RELOCATING+__bss_start = .;}
@@ -148,6 +165,7 @@ SECTIONS
*(.bss)
*(COMMON)
}
+ ${RELOCATING+. = ALIGN(${ELFSIZE} / 8);}
${RELOCATING+_end = . ;}
${RELOCATING+PROVIDE (end = .);}
diff --git a/contrib/binutils/ld/scripttempl/pe.sc b/contrib/binutils/ld/scripttempl/pe.sc
index 2adc3db..f5cfc70 100644
--- a/contrib/binutils/ld/scripttempl/pe.sc
+++ b/contrib/binutils/ld/scripttempl/pe.sc
@@ -1,7 +1,39 @@
# Linker script for PE.
+if test -z "${RELOCATEABLE_OUTPUT_FORMAT}"; then
+ RELOCATEABLE_OUTPUT_FORMAT=${OUTPUT_FORMAT}
+fi
+
+# We can't easily and portably get an unquoted $ in a shell
+# substitution, so we do this instead.
+if test "${RELOCATING}"; then
+ R_TEXT='*(.text$*)'
+ R_DATA='*(.data$*)'
+ R_RDATA='*(.rdata$*)'
+ R_IDATA='
+ *(.idata$2)
+ *(.idata$3)
+ /* These zeroes mark the end of the import list. */
+ LONG (0); LONG (0); LONG (0); LONG (0); LONG (0);
+ *(.idata$4)
+ *(.idata$5)
+ *(.idata$6)
+ *(.idata$7)'
+ R_CRT='*(.CRT$*)'
+ R_RSRC='*(.rsrc$*)'
+else
+ R_TEXT=
+ R_DATA=
+ R_RDATA=
+ R_IDATA=
+ R_CRT=
+ R_RSRC=
+fi
+
cat <<EOF
-OUTPUT_FORMAT(${OUTPUT_FORMAT})
+${RELOCATING+OUTPUT_FORMAT(${OUTPUT_FORMAT})}
+${RELOCATING-OUTPUT_FORMAT(${RELOCATEABLE_OUTPUT_FORMAT})}
+
${LIB_SEARCH_DIRS}
ENTRY(_mainCRTStartup)
@@ -12,6 +44,9 @@ SECTIONS
{
${RELOCATING+ *(.init)}
*(.text)
+ ${R_TEXT}
+ *(.glue_7t)
+ *(.glue_7)
${CONSTRUCTING+ ___CTOR_LIST__ = .; __CTOR_LIST__ = . ;
LONG (-1); *(.ctors); *(.ctor); LONG (0); }
${CONSTRUCTING+ ___DTOR_LIST__ = .; __DTOR_LIST__ = . ;
@@ -20,44 +55,46 @@ SECTIONS
/* ??? Why is .gcc_exc here? */
${RELOCATING+ *(.gcc_exc)}
${RELOCATING+ etext = .;}
- /* Grouped section support currently must be explicitly provided for
- in the linker script. */
- *(.text\$)
*(.gcc_except_table)
}
- .bss BLOCK(__section_alignment__) :
- {
- __bss_start__ = . ;
- *(.bss)
- *(COMMON)
- __bss_end__ = . ;
- }
- .data BLOCK(__section_alignment__) :
+ /* The Cygwin32 library uses a section to avoid copying certain data
+ on fork. This used to be named ".data$nocopy". The linker used
+ to include this between __data_start__ and __data_end__, but that
+ breaks building the cygwin32 dll. Instead, we name the section
+ ".data_cygwin_nocopy" and explictly include it after __data_end__. */
+
+ .data ${RELOCATING+BLOCK(__section_alignment__)} :
{
- __data_start__ = . ;
+ ${RELOCATING+__data_start__ = . ;}
*(.data)
*(.data2)
- __data_end__ = . ;
- /* Grouped section support currently must be explicitly provided for
- in the linker script. */
- *(.data\$)
+ ${R_DATA}
+ ${RELOCATING+__data_end__ = . ;}
+ ${RELOCATING+*(.data_cygwin_nocopy)}
+ }
+
+ .bss ${RELOCATING+BLOCK(__section_alignment__)} :
+ {
+ ${RELOCATING+__bss_start__ = . ;}
+ *(.bss)
+ *(COMMON)
+ ${RELOCATING+__bss_end__ = . ;}
}
- .rdata BLOCK(__section_alignment__) :
+ .rdata ${RELOCATING+BLOCK(__section_alignment__)} :
{
*(.rdata)
- /* Grouped section support currently must be explicitly provided for
- in the linker script. */
- *(.rdata\$)
+ ${R_RDATA}
+ *(.eh_frame)
}
- .edata BLOCK(__section_alignment__) :
+ .edata ${RELOCATING+BLOCK(__section_alignment__)} :
{
*(.edata)
}
- /DISCARD/ BLOCK(__section_alignment__) :
+ /DISCARD/ :
{
*(.debug\$S)
*(.debug\$T)
@@ -65,48 +102,44 @@ SECTIONS
*(.drectve)
}
- .idata BLOCK(__section_alignment__) :
+ .idata ${RELOCATING+BLOCK(__section_alignment__)} :
{
/* This cannot currently be handled with grouped sections.
See pe.em:sort_sections. */
- *(.idata\$2)
- *(.idata\$3)
- *(.idata\$4)
- *(.idata\$5)
- *(.idata\$6)
- *(.idata\$7)
+ ${R_IDATA}
}
- .CRT BLOCK(__section_alignment__) :
+ .CRT ${RELOCATING+BLOCK(__section_alignment__)} :
{
- /* Grouped sections are used to handle .CRT\$foo. */
- *(.CRT\$)
- }
- .rsrc BLOCK(__section_alignment__) :
- {
- /* Grouped sections are used to handle .rsrc\$0[12]. */
- *(.rsrc\$)
+ ${R_CRT}
}
- .endjunk BLOCK(__section_alignment__) :
+ .endjunk ${RELOCATING+BLOCK(__section_alignment__)} :
{
/* end is deprecated, don't use it */
${RELOCATING+ end = .;}
${RELOCATING+ __end__ = .;}
}
- .stab BLOCK(__section_alignment__) ${RELOCATING+(NOLOAD)} :
+ .reloc ${RELOCATING+BLOCK(__section_alignment__)} :
+ {
+ *(.reloc)
+ }
+
+ .rsrc ${RELOCATING+BLOCK(__section_alignment__)} :
+ {
+ *(.rsrc)
+ ${R_RSRC}
+ }
+
+ .stab ${RELOCATING+BLOCK(__section_alignment__)} ${RELOCATING+(NOLOAD)} :
{
[ .stab ]
}
- .stabstr BLOCK(__section_alignment__) ${RELOCATING+(NOLOAD)} :
+ .stabstr ${RELOCATING+BLOCK(__section_alignment__)} ${RELOCATING+(NOLOAD)} :
{
[ .stabstr ]
}
- .reloc BLOCK(__section_alignment__) :
- {
- *(.reloc)
- }
}
EOF
diff --git a/contrib/binutils/ld/scripttempl/tic30aout.sc b/contrib/binutils/ld/scripttempl/tic30aout.sc
new file mode 100644
index 0000000..28baed3
--- /dev/null
+++ b/contrib/binutils/ld/scripttempl/tic30aout.sc
@@ -0,0 +1,34 @@
+cat <<EOF
+OUTPUT_FORMAT("${OUTPUT_FORMAT}")
+OUTPUT_ARCH(${ARCH})
+
+${STACKZERO+${RELOCATING+${STACKZERO}}}
+${RELOCATING+PROVIDE (__stack = 0);}
+SECTIONS
+{
+ ${RELOCATING+. = ${TEXT_START_ADDR};}
+ .text :
+ {
+ CREATE_OBJECT_SYMBOLS
+ *(.text)
+ ${RELOCATING+_etext = .;}
+ ${RELOCATING+__etext = .;}
+ ${PAD_TEXT+${RELOCATING+. = ${DATA_ALIGNMENT};}}
+ }
+ ${RELOCATING+. = ${DATA_ALIGNMENT};}
+ .data :
+ {
+ *(.data)
+ ${RELOCATING+_edata = .;}
+ ${RELOCATING+__edata = .;}
+ }
+ .bss :
+ {
+ ${RELOCATING+ __bss_start = .};
+ *(.bss)
+ *(COMMON)
+ ${RELOCATING+_end = ALIGN(4) };
+ ${RELOCATING+__end = ALIGN(4) };
+ }
+}
+EOF
diff --git a/contrib/binutils/ld/scripttempl/tic30coff.sc b/contrib/binutils/ld/scripttempl/tic30coff.sc
new file mode 100644
index 0000000..df2d4f7
--- /dev/null
+++ b/contrib/binutils/ld/scripttempl/tic30coff.sc
@@ -0,0 +1,58 @@
+cat <<EOF
+OUTPUT_FORMAT("${OUTPUT_FORMAT}")
+OUTPUT_ARCH("${OUTPUT_ARCH}")
+
+MEMORY
+{
+ rom : ORIGIN = 0x00000300, LENGTH = 16k
+ ram : ORIGIN = 0x00000300 + 16k, LENGTH = 16k
+ ramblk0 : ORIGIN = 0x02026000, LENGTH = 0x1000
+ ramblk1 : ORIGIN = 0x02027000, LENGTH = 0x1000
+}
+
+SECTIONS
+{
+.vectors 0x00000000 :
+{
+ *(vectors)
+}
+
+.text :
+{
+ *(.text)
+} > rom
+
+.const :
+{
+ *(.const)
+ __etext = . ;
+} > rom
+
+.mdata : AT( ADDR(.const) + SIZEOF(.const) )
+{
+ __data = . ;
+ *(.data);
+ __edata = . ;
+} > ram
+
+.bss :
+{
+ __bss = . ;
+ *(.bss);
+ *(COMMON);
+ __ebss = . ;
+} > ram
+
+.ram0 :
+{
+ *(ram0)
+} > ramblk0
+
+.ram1 :
+{
+ *(ram1)
+} > ramblk1
+
+}
+
+EOF
diff --git a/contrib/binutils/ld/scripttempl/v850.sc b/contrib/binutils/ld/scripttempl/v850.sc
new file mode 100644
index 0000000..6f3844e
--- /dev/null
+++ b/contrib/binutils/ld/scripttempl/v850.sc
@@ -0,0 +1,183 @@
+cat << EOF
+OUTPUT_FORMAT("elf32-v850", "elf32-v850",
+ "elf32-v850")
+OUTPUT_ARCH(v850)
+ENTRY(_start)
+SEARCH_DIR(.);
+/*/critters/slug/grossman/install/sun4/v850-elf/lib*/
+SECTIONS
+{
+ /* This saves a little space in the ELF file, since the zda starts
+ at a higher location that the ELF headers take up. */
+
+ .zdata ${ZDATA_START_ADDR} : {
+ *(.zdata)
+ *(.zbss)
+ *(reszdata)
+ *(.zcommon)
+ }
+
+ /* This is the read only part of the zero data area.
+ Having it as a seperate section prevents its
+ attributes from being inherited by the zdata
+ section. Specifically it prevents the zdata
+ section from being marked READONLY. */
+
+ .rozdata ${ROZDATA_START_ADDR} : {
+ *(.rozdata)
+ *(romzdata)
+ *(romzbss)
+ }
+
+ /* Read-only sections, merged into text segment: */
+ . = ${TEXT_START_ADDR};
+ .interp : { *(.interp) }
+ .hash : { *(.hash) }
+ .dynsym : { *(.dynsym) }
+ .dynstr : { *(.dynstr) }
+ .rel.text : { *(.rel.text) }
+ .rela.text : { *(.rela.text) }
+ .rel.data : { *(.rel.data) }
+ .rela.data : { *(.rela.data) }
+ .rel.rodata : { *(.rel.rodata) }
+ .rela.rodata : { *(.rela.rodata) }
+ .rel.got : { *(.rel.got) }
+ .rela.got : { *(.rela.got) }
+ .rel.ctors : { *(.rel.ctors) }
+ .rela.ctors : { *(.rela.ctors) }
+ .rel.dtors : { *(.rel.dtors) }
+ .rela.dtors : { *(.rela.dtors) }
+ .rel.init : { *(.rel.init) }
+ .rela.init : { *(.rela.init) }
+ .rel.fini : { *(.rel.fini) }
+ .rela.fini : { *(.rela.fini) }
+ .rel.bss : { *(.rel.bss) }
+ .rela.bss : { *(.rela.bss) }
+ .rel.plt : { *(.rel.plt) }
+ .rela.plt : { *(.rela.plt) }
+ .init : { *(.init) } =0
+ .plt : { *(.plt) }
+
+ .text : {
+ *(.text)
+ /* .gnu.warning sections are handled specially by elf32.em. */
+ *(.gnu.warning)
+ *(.gnu.linkonce.t*)
+ } =0
+
+ ${RELOCATING+_etext = .;}
+ ${RELOCATING+PROVIDE (etext = .);}
+
+
+ .fini : { *(.fini) } =0
+ .rodata : { *(.rodata) *(.gnu.linkonce.r*) }
+ .rodata1 : { *(.rodata1) }
+
+ .data : {
+ *(.data)
+ *(.gnu.linkonce.d*)
+ CONSTRUCTORS
+ }
+ .data1 : { *(.data1) }
+ .ctors : {
+ ${RELOCATING+___ctors = .;}
+ *(.ctors)
+ ${RELOCATING+___ctors_end = .;}
+ }
+
+ .dtors : {
+ ${RELOCATING+___dtors = .;}
+ *(.dtors)
+ ${RELOCATING+___dtors_end = .;}
+ }
+
+ .got : { *(.got.plt) *(.got) }
+ .dynamic : { *(.dynamic) }
+
+ .tdata ${TDATA_START_ADDR} : {
+ ${RELOCATING+PROVIDE (__ep = .);}
+ *(.tbyte)
+ *(.tcommon_byte)
+ *(.tdata)
+ *(.tbss)
+ *(.tcommon)
+ }
+
+ /* We want the small data sections together, so single-instruction offsets
+ can access them all, and initialized data all before uninitialized, so
+ we can shorten the on-disk segment size. */
+ .sdata ${SDATA_START_ADDR} : {
+ ${RELOCATING+PROVIDE (__gp = . + 0x8000);}
+ *(.sdata)
+ ${RELOCATING+__sbss_start = .;}
+ *(.sbss)
+ *(.scommon)
+ }
+
+ /* See comment about .rozdata */
+ .rosdata ${ROSDATA_START_ADDR} : {
+ *(.rosdata)
+ }
+
+ ${RELOCATING+_edata = DEFINED (__sbss_start) ? __sbss_start : . ;}
+ ${RELOCATING+PROVIDE (edata = _edata);}
+
+ .bss :
+ {
+ ${RELOCATING+__bss_start = DEFINED (__sbss_start) ? __sbss_start : . ;}
+ *(.dynbss)
+ *(.bss)
+ *(COMMON)
+ }
+
+ ${RELOCATING+_end = . ;}
+ ${RELOCATING+PROVIDE (end = .);}
+
+ /* Stabs debugging sections. */
+ .stab 0 : { *(.stab) }
+ .stabstr 0 : { *(.stabstr) }
+ .stab.excl 0 : { *(.stab.excl) }
+ .stab.exclstr 0 : { *(.stab.exclstr) }
+ .stab.index 0 : { *(.stab.index) }
+ .stab.indexstr 0 : { *(.stab.indexstr) }
+ .comment 0 : { *(.comment) }
+
+ /* DWARF debug sections.
+ Symbols in the DWARF debugging sections are relative to the beginning
+ of the section so we begin them at 0. */
+
+ /* DWARF 1 */
+ .debug 0 : { *(.debug) }
+ .line 0 : { *(.line) }
+
+ /* GNU DWARF 1 extensions */
+ .debug_srcinfo 0 : { *(.debug_srcinfo) }
+ .debug_sfnames 0 : { *(.debug_sfnames) }
+
+ /* DWARF 1.1 and DWARF 2 */
+ .debug_aranges 0 : { *(.debug_aranges) }
+ .debug_pubnames 0 : { *(.debug_pubnames) }
+
+ /* DWARF 2 */
+ .debug_info 0 : { *(.debug_info) }
+ .debug_abbrev 0 : { *(.debug_abbrev) }
+ .debug_line 0 : { *(.debug_line) }
+ .debug_frame 0 : { *(.debug_frame) }
+ .debug_str 0 : { *(.debug_str) }
+ .debug_loc 0 : { *(.debug_loc) }
+ .debug_macinfo 0 : { *(.debug_macinfo) }
+
+ /* SGI/MIPS DWARF 2 extensions */
+ .debug_weaknames 0 : { *(.debug_weaknames) }
+ .debug_funcnames 0 : { *(.debug_funcnames) }
+ .debug_typenames 0 : { *(.debug_typenames) }
+ .debug_varnames 0 : { *(.debug_varnames) }
+
+ /* User stack */
+ .stack 0x200000 : {
+ ${RELOCATING+__stack = .;}
+ *(.stack)
+ }
+ /* These must appear regardless of . */
+}
+EOF
diff --git a/contrib/binutils/ld/stamp-h.in b/contrib/binutils/ld/stamp-h.in
new file mode 100644
index 0000000..9788f70
--- /dev/null
+++ b/contrib/binutils/ld/stamp-h.in
@@ -0,0 +1 @@
+timestamp
OpenPOWER on IntegriCloud