summaryrefslogtreecommitdiffstats
path: root/contrib/binutils/ld
diff options
context:
space:
mode:
authordim <dim@FreeBSD.org>2011-02-18 20:54:12 +0000
committerdim <dim@FreeBSD.org>2011-02-18 20:54:12 +0000
commit58abb279f50d5ad9fbad30a39da04296664ec6cb (patch)
tree50e46c29de9d928e0d098104d28f1c1e0e628384 /contrib/binutils/ld
parente1012e9afb73b834c089b15373d264e45a7b03f0 (diff)
parenta3786f65f1e2fa3a4e925fdb4b2b5544b9021bf9 (diff)
downloadFreeBSD-src-58abb279f50d5ad9fbad30a39da04296664ec6cb.zip
FreeBSD-src-58abb279f50d5ad9fbad30a39da04296664ec6cb.tar.gz
Merge binutils 2.17.50 to head. This brings a number of improvements to
x86 CPU support, better support for powerpc64, some new directives, and many other things. Bump __FreeBSD_version, and add a note to UPDATING. Thanks to the many people that have helped to test this. Obtained from: projects/binutils-2.17
Diffstat (limited to 'contrib/binutils/ld')
-rw-r--r--contrib/binutils/ld/ChangeLog868
-rw-r--r--contrib/binutils/ld/ChangeLog-20061364
-rw-r--r--contrib/binutils/ld/Makefile.am1105
-rw-r--r--contrib/binutils/ld/Makefile.in2252
-rw-r--r--contrib/binutils/ld/NEWS112
-rw-r--r--contrib/binutils/ld/acinclude.m416
-rw-r--r--contrib/binutils/ld/aclocal.m4997
-rw-r--r--contrib/binutils/ld/config.in219
-rwxr-xr-xcontrib/binutils/ld/configure17800
-rw-r--r--contrib/binutils/ld/configure.host81
-rw-r--r--contrib/binutils/ld/configure.in95
-rw-r--r--contrib/binutils/ld/configure.tgt803
-rw-r--r--contrib/binutils/ld/deffile.h6
-rw-r--r--contrib/binutils/ld/deffilep.y53
-rw-r--r--contrib/binutils/ld/dep-in.sed1
-rw-r--r--contrib/binutils/ld/emulparams/arcelf.sh5
-rw-r--r--contrib/binutils/ld/emulparams/arm_wince_pe.sh14
-rw-r--r--contrib/binutils/ld/emulparams/armelf.sh13
-rw-r--r--contrib/binutils/ld/emulparams/armelf_fbsd.sh1
-rw-r--r--contrib/binutils/ld/emulparams/armelf_linux.sh11
-rw-r--r--contrib/binutils/ld/emulparams/armelf_nbsd.sh3
-rw-r--r--contrib/binutils/ld/emulparams/armelf_oabi.sh23
-rw-r--r--contrib/binutils/ld/emulparams/armpe.sh2
-rw-r--r--contrib/binutils/ld/emulparams/avr6.sh11
-rw-r--r--contrib/binutils/ld/emulparams/elf32_sparc.sh7
-rw-r--r--contrib/binutils/ld/emulparams/elf32_spu.sh20
-rw-r--r--contrib/binutils/ld/emulparams/elf32bmip.sh34
-rw-r--r--contrib/binutils/ld/emulparams/elf32bmipn32-defs.sh23
-rwxr-xr-xcontrib/binutils/ld/emulparams/elf32bmipn32.sh2
-rw-r--r--contrib/binutils/ld/emulparams/elf32btsmip.sh1
-rw-r--r--contrib/binutils/ld/emulparams/elf32btsmipn32.sh2
-rw-r--r--contrib/binutils/ld/emulparams/elf32cr16.sh6
-rwxr-xr-xcontrib/binutils/ld/emulparams/elf32mep.sh55
-rw-r--r--contrib/binutils/ld/emulparams/elf32ppc.sh51
-rw-r--r--contrib/binutils/ld/emulparams/elf32ppccommon.sh49
-rw-r--r--contrib/binutils/ld/emulparams/elf32ppclinux.sh4
-rw-r--r--contrib/binutils/ld/emulparams/elf64_ia64.sh8
-rw-r--r--contrib/binutils/ld/emulparams/elf64_ia64_fbsd.sh3
-rw-r--r--contrib/binutils/ld/emulparams/elf64_s390.sh3
-rw-r--r--contrib/binutils/ld/emulparams/elf64_sparc.sh4
-rw-r--r--contrib/binutils/ld/emulparams/elf64_sparc_fbsd.sh2
-rw-r--r--contrib/binutils/ld/emulparams/elf64alpha.sh12
-rw-r--r--contrib/binutils/ld/emulparams/elf64bmip-defs.sh3
-rwxr-xr-xcontrib/binutils/ld/emulparams/elf64bmip.sh2
-rw-r--r--contrib/binutils/ld/emulparams/elf64btsmip.sh2
-rw-r--r--contrib/binutils/ld/emulparams/elf64ppc.sh13
-rw-r--r--contrib/binutils/ld/emulparams/elf_i386.sh5
-rw-r--r--contrib/binutils/ld/emulparams/elf_i386_chaos.sh2
-rw-r--r--contrib/binutils/ld/emulparams/elf_i386_ldso.sh2
-rw-r--r--contrib/binutils/ld/emulparams/elf_s390.sh3
-rw-r--r--contrib/binutils/ld/emulparams/elf_x86_64.sh14
-rw-r--r--contrib/binutils/ld/emulparams/elf_x86_64_fbsd.sh1
-rw-r--r--contrib/binutils/ld/emulparams/i386freebsd.sh6
-rw-r--r--contrib/binutils/ld/emulparams/i386moss.sh2
-rw-r--r--contrib/binutils/ld/emulparams/i386nto.sh2
-rw-r--r--contrib/binutils/ld/emulparams/i386nw.sh2
-rw-r--r--contrib/binutils/ld/emulparams/i386pe.sh1
-rw-r--r--contrib/binutils/ld/emulparams/i386pe_posix.sh1
-rw-r--r--contrib/binutils/ld/emulparams/i386pep.sh9
-rw-r--r--contrib/binutils/ld/emulparams/mipsidt.sh3
-rw-r--r--contrib/binutils/ld/emulparams/mipsidtl.sh3
-rw-r--r--contrib/binutils/ld/emulparams/mipspe.sh1
-rw-r--r--contrib/binutils/ld/emulparams/ppcnw.sh2
-rw-r--r--contrib/binutils/ld/emulparams/ppcpe.sh1
-rw-r--r--contrib/binutils/ld/emulparams/scoreelf.sh31
-rw-r--r--contrib/binutils/ld/emulparams/shelf_uclinux.sh4
-rw-r--r--contrib/binutils/ld/emulparams/shelf_vxworks.sh19
-rw-r--r--contrib/binutils/ld/emulparams/shlelf_vxworks.sh2
-rw-r--r--contrib/binutils/ld/emultempl/alphaelf.em95
-rw-r--r--contrib/binutils/ld/emultempl/armcoff.em85
-rw-r--r--contrib/binutils/ld/emultempl/armelf.em210
-rw-r--r--contrib/binutils/ld/emultempl/armelf_oabi.em176
-rw-r--r--contrib/binutils/ld/emultempl/avrelf.em269
-rw-r--r--contrib/binutils/ld/emultempl/cr16elf.em92
-rw-r--r--contrib/binutils/ld/emultempl/elf-generic.em81
-rw-r--r--contrib/binutils/ld/emultempl/elf32.em1194
-rw-r--r--contrib/binutils/ld/emultempl/genelf.em39
-rw-r--r--contrib/binutils/ld/emultempl/generic.em10
-rw-r--r--contrib/binutils/ld/emultempl/ia64elf.em4
-rw-r--r--contrib/binutils/ld/emultempl/linux.em12
-rw-r--r--contrib/binutils/ld/emultempl/mipsecoff.em255
-rw-r--r--contrib/binutils/ld/emultempl/mipself.em166
-rw-r--r--contrib/binutils/ld/emultempl/needrelax.em2
-rw-r--r--contrib/binutils/ld/emultempl/pe.em915
-rw-r--r--contrib/binutils/ld/emultempl/pep.em1706
-rw-r--r--contrib/binutils/ld/emultempl/ppc32elf.em140
-rw-r--r--contrib/binutils/ld/emultempl/ppc64elf.em226
-rw-r--r--contrib/binutils/ld/emultempl/scoreelf.em74
-rw-r--r--contrib/binutils/ld/emultempl/spu_ovl.S294
-rw-r--r--contrib/binutils/ld/emultempl/spu_ovl.obin0 -> 1432 bytes
-rw-r--r--contrib/binutils/ld/emultempl/spuelf.em504
-rw-r--r--contrib/binutils/ld/emultempl/sunos.em38
-rw-r--r--contrib/binutils/ld/emultempl/ticoff.em9
-rw-r--r--contrib/binutils/ld/emultempl/vanilla.em9
-rw-r--r--contrib/binutils/ld/fdl.texi4
-rw-r--r--contrib/binutils/ld/gen-doc.texi9
-rwxr-xr-xcontrib/binutils/ld/genscripts.sh71
-rw-r--r--contrib/binutils/ld/ld.11929
-rw-r--r--contrib/binutils/ld/ld.h185
-rw-r--r--contrib/binutils/ld/ld.texinfo1597
-rw-r--r--contrib/binutils/ld/ldcref.c236
-rw-r--r--contrib/binutils/ld/ldctor.c12
-rw-r--r--contrib/binutils/ld/ldctor.h4
-rw-r--r--contrib/binutils/ld/ldemul.c31
-rw-r--r--contrib/binutils/ld/ldemul.h11
-rw-r--r--contrib/binutils/ld/ldexp.c899
-rw-r--r--contrib/binutils/ld/ldexp.h92
-rw-r--r--contrib/binutils/ld/ldfile.c109
-rw-r--r--contrib/binutils/ld/ldfile.h6
-rw-r--r--contrib/binutils/ld/ldgram.y348
-rw-r--r--contrib/binutils/ld/ldint.texinfo48
-rw-r--r--contrib/binutils/ld/ldlang.c3722
-rw-r--r--contrib/binutils/ld/ldlang.h171
-rw-r--r--contrib/binutils/ld/ldlex.h5
-rw-r--r--contrib/binutils/ld/ldlex.l137
-rw-r--r--contrib/binutils/ld/ldmain.c331
-rw-r--r--contrib/binutils/ld/ldmain.h11
-rw-r--r--contrib/binutils/ld/ldmisc.c320
-rw-r--r--contrib/binutils/ld/ldmisc.h8
-rw-r--r--contrib/binutils/ld/ldver.c35
-rw-r--r--contrib/binutils/ld/ldver.h5
-rw-r--r--contrib/binutils/ld/ldver.texi1
-rw-r--r--contrib/binutils/ld/ldwrite.c118
-rw-r--r--contrib/binutils/ld/ldwrite.h4
-rw-r--r--contrib/binutils/ld/lexsup.c617
-rw-r--r--contrib/binutils/ld/mri.c46
-rw-r--r--contrib/binutils/ld/mri.h4
-rw-r--r--contrib/binutils/ld/pe-dll.c667
-rw-r--r--contrib/binutils/ld/pe-dll.h12
-rw-r--r--contrib/binutils/ld/pep-dll.c58
-rw-r--r--contrib/binutils/ld/pep-dll.h54
-rw-r--r--contrib/binutils/ld/po/Make-in33
-rw-r--r--contrib/binutils/ld/po/POTFILES.in5
-rw-r--r--contrib/binutils/ld/po/ld.pot1208
-rw-r--r--contrib/binutils/ld/scripttempl/elf.sc235
-rw-r--r--contrib/binutils/ld/scripttempl/elf32cr16.sc175
-rw-r--r--contrib/binutils/ld/scripttempl/mep.sc446
-rw-r--r--contrib/binutils/ld/scripttempl/mips.sc3
-rw-r--r--contrib/binutils/ld/scripttempl/pe.sc119
-rw-r--r--contrib/binutils/ld/scripttempl/pep.sc272
-rw-r--r--contrib/binutils/ld/sysdep.h12
141 files changed, 33486 insertions, 13821 deletions
diff --git a/contrib/binutils/ld/ChangeLog b/contrib/binutils/ld/ChangeLog
index 4b3c1f9..25bfcd4 100644
--- a/contrib/binutils/ld/ChangeLog
+++ b/contrib/binutils/ld/ChangeLog
@@ -1,319 +1,705 @@
-2004-05-13 Joel Sherrill <joel@oarcorp.com>
+2007-07-03 Matthias Klose <doko@ubuntu.com>
- * configure.tgt (or32-*-rtems*): Switch to elf and
- support versioned targets.
+ * emultempl/spuelf.em (base_name): Correct backslash quoting.
-2004-05-13 Nick Clifton <nickc@redhat.com>
+2007-07-02 Alan Modra <amodra@bigpond.net.au>
- * po/fr.po: Updated French translation.
+ * Makefile.in: Regenerate.
+ * aclocal.m4: Regenerate.
+ * config.in: Regenerate.
+ * po/ld.pot: Regenerate.
+
+2007-06-30 H.J. Lu <hongjiu.lu@intel.com>
-2004-05-05 Alexandre Oliva <aoliva@redhat.com>
+ * aclocal.m4: Regenerated.
+ * Makefile.in: Likewise.
- * emulparams/elf32frvfd.sh (OUTPUT_FORMAT): Switch to new
- elf32-frvfdpic.
+2007-06-29 H.J. Lu <hongjiu.lu@intel.com>
-2004-04-29 Alan Modra <amodra@bigpond.net.au>
+ * NEWS: Remove a line with '*' only.
- * pe-dll.c: Revert changes accidentally committed 2004-03-08.
- (fill_edata): Correct pointer arithmetic.
+2007-06-29 Joseph Myers <joseph@codesourcery.com>
-2004-04-21 Hans-Peter Nilsson <hp@axis.com>
+ * emulparams/armelf.sh (OTHER_SECTIONS): Remove .ARM.attributes.
+ (ATTRS_SECTIONS): Define.
+ * scripttempl/elf.sc, scripttempl/elf32sh-symbian.sc,
+ scripttempl/elf_chaos.sc, scripttempl/elfi370.sc,
+ scripttempl/elfxtensa.sc: Handle ATTRS_SECTIONS.
- * NEWS: Mention change in DEFINED semantics.
+2006-06-29 M R Swami Reddy <MR.Swami.Reddy@nsc.com>
-2004-04-20 Chris Demetriou <cgd@broadcom.com>
+ * scripttemp/elf32cr16.sc: Default linker script.
+ * emulparams/elf32cr16.sh: Emulation script.
+ * emultempl/cr16elf.em: Emulation script.
+ * Makefile.am: Add entry to make cr16 target.
+ * Makefile.in: Regenerate.
+ * configure.tgt: Specify default and other emulation parameters
+ for cr16.
+ * ChangeLog: Added CR16 target entry.
+ * NEWS: Announce the support for the CR16 new target.
- * NEWS: Note that MIPS --embedded-relocs option is deprecated.
+2007-06-27 Alan Modra <amodra@bigpond.net.au>
-2004-04-11 Thiemo Seufer <seufer@csv.ica.uni-stuttgart.de>
+ * pe-dll.c: Rename uses of bfd.next to bfd.archive_next throughout.
- * configure.host: Remove mips*-dec-bsd* target.
- * configure.tgt: Likewise.
+2007-06-20 Alan Modra <amodra@bigpond.net.au>
-2004-04-09 Daniel Jacobowitz <drow@mvista.com>
+ * emulparams/elf32_spu.sh (OTHER_SECTIONS): KEEP .note.spu_name.
- Merge from mainline:
- 2004-03-30 Nick Clifton <nickc@redhat.com>
- * po/sv.po: Updated Swedish translation.
+2007-06-18 Nathan Sidwell <nathan@codesourcery.com>
- 2004-03-20 Alexandre Oliva <aoliva@redhat.com>
- * emulparams/elf32frvfd.sh (MAXPAGESIZE): Change to 16Kb.
+ * ldlex.l, ldgram.y: Add ALIGNOF.
+ * ldexp.c (exp_print_token, foldname): Likewise.
+ * ld.texinfo: Likewise.
- 2004-03-08 Danny Smith <dannysmith@users.sourceforge.net>
- * pe-dll.c (pe_dll_generate_implib): Skip sections marked as
- private when building implib.
+2007-06-18 Alan Modra <amodra@bigpond.net.au>
- 2004-03-01 Andreas Schwab <schwab@suse.de>
- * ld.texinfo (Options): Fix example for --wrap.
+ * Makefile.am: Add eelf32_spu.o rule.
+ * Makefile.in: Regenerate.
+ * emultempl/spuelf.em: Revert last change. Instead use EMBEDSPU
+ defined in Makefile for embedspu name.
- 2004-02-25 Danny Smith <dannysmith@users.sourceforge.net>
- * pe-dll.c (fill_edata): Check that exported_symbol_sections is
- not NULL.
+2007-06-18 Alan Modra <amodra@bigpond.net.au>
- 2004-02-23 Ian Lance Taylor <ian@wasabisystems.com>
- * ldlang.c (lang_check): Use %P, not %E, in error message.
+ * emultempl/spuelf.em (embedded_spu_file): Deduce embedspu program
+ name prefix from that of ld.
-2004-04-08 Richard Sandiford <rsandifo@redhat.com>
+2007-06-14 H.J. Lu <hongjiu.lu@intel.com>
- * emulparams/elf32bsmip.sh (EXTRA_EM_FILE): Define to irix.
- * emulparams/elf64bmip.sh (EXTRA_EM_FILE): Likewise.
- * emulparams/elf32bmipn32.sh (EXTRA_EM_FILE): Likewise.
- * emultempl/irix.em: New file.
- * Makefile.am (eelf32bsmip.c, eelf32bmipn32.c, eelf64bmip.c): Update
- dependencies.
- * Makefile.in: Regenerate.
+ * Makefile.am (ACLOCAL_AMFLAGS): Add -I ../config -I ../bfd.
+
+ * acinclude.m4: Removed.
+
+ * Makefile.in: Regenerated.
+ * aclocal.m4: Likewise.
+ * configure: Likewise.
+
+2007-06-14 Alan Modra <amodra@bigpond.net.au>
+
+ * emultempl/spu_ovl.S: Don't trash lr on tail call from one
+ overlay to another.
+ * emultempl/spu_ovl.o: Regenerate.
+
+2007-06-11 Bob Wilson <bob.wilson@acm.org>
+
+ * emulparams/elf32xtensa.sh (OTHER_READONLY_SECTIONS): Add ONLY_IF_RO
+ for .xt_except_table.
+ (OTHER_RELRO_SECTIONS): New.
+
+2007-06-11 Sterling Augustine <sterling@tensilica.com>
+ Bob Wilson <bob.wilson@acm.org>
+
+ * emultempl/xtensaelf.em (replace_insn_sec_with_prop_sec): Use renamed
+ XTENSA_PROP_NO_TRANSFORM flag instead of XTENSA_PROP_INSN_NO_TRANSFORM.
+
+2007-06-01 Noah Misch <noah@cs.caltech.edu>
+ Alan Modra <amodra@bigpond.net.au>
+
+ * ldlang.c (ldlang_add_file): Use input_bfds_tail.
+ * ldmain.c (main): Init input_bfds_tail. Sort link_info
+ initialization.
+
+2007-05-29 Alan Modra <amodra@bigpond.net.au>
+
+ * emultempl/spuelf.em (base_name): New function, split out from..
+ (embedded_spu_file) ..here. Pass -fPIC or -fpie to embedspu
+ invocation if we deduce a shared lib or position independent
+ executable build by looking at ctrbegin* linker input files.
-2004-04-08 Alan Modra <amodra@bigpond.net.au>
+2007-05-29 Alan Modra <amodra@bigpond.net.au>
- Apply from mainline.
- 2004-03-27 Alan Modra <amodra@bigpond.net.au>
- * emultempl/elf32.em: Update new bfd_elf_discard_info name.
- * emultempl/hppaelf.em: Likewise.
- * emultempl/ppc64elf.em: Likewise.
- * emultempl/sh64elf.em: Likewise.
+ * emultempl/spu_ovl.S (__rv_pattern, __cg_pattern): Set symbol
+ types and sizes.
+ * emultempl/spu_ovl.o: Regenerate.
- 2004-03-25 Alan Modra <amodra@bigpond.net.au>
- * emultempl/elf32.em (gld${EMULATION_NAME}_before_allocation): Update
- size_dynamic_sections call.
+2007-05-24 Steve Ellcey <sje@cup.hp.com>
- 2004-03-20 H.J. Lu <hongjiu.lu@intel.com>
- * lexsup.c (parse_args): Don't set unresolved_syms_in_objects
- or unresolved_syms_in_shared_libs for -Bdynamic and -Bstatic.
+ * Makefile.in: Regnerate.
+ * configure: Regenerate.
+ * aclocal.m4: Regenerate.
- 2004-03-18 Alan Modra <amodra@bigpond.net.au>
- * ld.texinfo: Add --as-needed doco.
- * ldmain.c (as_needed): New global var.
- * ldmain.h (as_needed): Declare.
- * lexsup.c (option_values): Add OPTION_AS_NEEDED and
- OPTION_NO_AS_NEEDED.
- (ld_options): Likewise.
- (parse_args): Handle them.
- * ldlang.h (lang_input_statement_type): Add as_needed field.
- * ldlang.c (new_afile): Set p->as_needed.
- * emultempl/elf32.em (gld${EMULATION_NAME}_load_symbols): New function.
- (gld${EMULATION_NAME}_try_needed): Use bfd_elf_set_dyn_lib_class.
- (ld_${EMULATION_NAME}_emulation): Set LDEMUL_RECOGNIZED_FILE entry.
- * ldlang.c (open_input_bfds): Remove useless cast.
- (lang_do_assignments_1): Likewise.
- (lang_for_each_input_section): Delete.
+2007-05-24 Nathan Sidwell <nathan@codesourcery.com>
-2004-03-23 Alan Modra <amodra@bigpond.net.au>
+ * ldlex.l: ASSERT is recognized in SCRIPT env. NAMES cannot
+ contain commas in EXP env.
+ * ldgram.y (extern_name_list): Push to EXP env, move body to ...
+ (extern_name_list_body): ... here.
+ (script_file, ifile_list): Reformat.
+ (statement): Add ASSERT.
- PR 51.
- * emultempl/ppc64elf.em (ppc_create_output_section_statements): Set
- link_info.wrap_char.
+2007-05-22 Nick Clifton <nickc@redhat.com>
-2004-03-17 Ralf Corsepius <corsepiu@faw.uni-ulm.de>
+ * ld.texinfo: Use @copying around the copyright notice.
+ * ldint.texinfo: Likewise.
- * configure.tgt: Switch sh-*-rtems* to ELF. Add sh-*-rtemscoff*.
+2007-05-18 Richard Sandiford <richard@codesourcery.com>
-2004-03-05 Nathan Sidwell <nathan@codesourcery.com>
+ * emulparams/elf32ebmipvxworks.sh (OTHER_READONLY_SECTIONS)
+ (OTHER_READWRITE_SECTIONS): Define. Add .rdata sections.
- * ldlang.c (lang_add_section): Don't force SEC_LOAD on
- SEC_THREAD_LOCAL.
- (IGNORE_SECTION): Ignore .tbss sections too.
- (lang_size_sections_1): .tbss sections do not advance dot.
+2007-05-16 Richard Sandiford <richard@codesourcery.com>
-2004-02-23 Nathan Sidwell <nathan@codesourcery.com>
+ * configure.in: Allow sysroots to be relocated under $prefix as
+ well as $exec_prefix.
+ * configure: Regenerate.
- * ldlang.h (struct lang_output_section_state): Change processed
- field's type.
- * ldexp.c (check, invalid): Remove.
- (fold_name): Move valid_p assignments. Create undefined symbol
- when needed. Directly exampine section's processd flag.
- * ldlang.c (lang_output_section_statement_lookup): Adjust
- processed field init.
- (lang_size_sections_1): Allow LOADADDR when determining section's
- VMA. Adjust error message. Fold data statement's expr.
- (lang_size_sections): Correctly increment lang_statement_iteration.
+2007-05-14 Andreas Schwab <schwab@suse.de>
-2004-02-23 Alan Modra <amodra@bigpond.net.au>
+ * emultempl/ppc64elf.em (gld${EMULATION_NAME}_new_vers_pattern):
+ Handle null pattern.
- * ldexp.c (fold_tree): Follow indirect symbols.
+2007-05-11 Alan Modra <amodra@bigpond.net.au>
-2004-02-20 Nathan Sidwell <nathan@codesourcery.com>
+ * emultempl/ppc32elf.em (plt_style): New variable.
+ (old_plt): Delete.
+ (ppc_after_open): Adjust ppc_elf_select_plt_layout call.
+ (PARSE_AND_LIST_PROLOGUE): Define OPTION_NEW_PLT, renumber
+ OPTION_OLD_PLT, OPTION_OLD_GOT and OPTION_STUBSYMS.
+ (PARSE_AND_LIST_LONGOPTS, PARSE_AND_LIST_OPTIONS): Add secure-plt.
+ (PARSE_AND_LIST_ARGS_CASES): Handle OPTION_NEW_PLT.
+ * ld.texinfo (--secure-plt): Document.
- * ldgram.y (exp): Add two operand ALIGN.
- * ldexp.c (fold_binary): Add ALIGN_K case.
- * ld.texinfo (ALIGN): Document two operand version.
+2007-05-08 Alan Modra <amodra@bigpond.net.au>
-2004-02-19 Nathan Sidwell <nathan@codesourcery.com>
+ * ld.h (args_type, ld_config_type): Reorder fields.
+ * ldmain.c (main): Don't initialise a bunch of vars we know are
+ zero already.
- * ldlang.c (map_input_to_output_sections): Initialize sections
- mentioned in a data statement expression.
- (lang_do_assignments_1): Add data statement's expression's
- section's vma.
+2007-05-05 Anatoly Sokolov <aesok@post.ru>
-2004-02-18 Nathan Sidwell <nathan@codesourcery.com>
+ * multempl/avrelf.em (PARSE_AND_LIST_ARGS_CASES): Add new value for
+ "--pmem-wrap-around".
+ (PARSE_AND_LIST_OPTIONS): Describe new value for "--pmem-wrap-around".
- * ldgram.y (statement_anywhere): Add assert rule.
- * ldlang.c (exp_init_os): Add assert case.
+2007-05-03 Bob Wilson <bob.wilson@acm.org>
-2004-02-14 Andrew Cagney <cagney@redhat.com>
+ * scripttempl/elfxtensa.sc: Merge changes from elf.sc.
- * ldmain.c (remove_output): Call bfd_cache_close.
+2007-05-03 Alan Modra <amodra@bigpond.net.au>
-2004-02-14 Richard Sandiford <rsandifo@redhat.com>
+ * ld.texinfo (--no-warn-search-mismatch): Document.
+ * ldfile.c (ldfile_try_open_bfd): Don't warn about skipping
+ incompatible libraries if --no-warn-search-mismatch.
+ * ld.h (args_type): Add warn_search_mismatch.
+ * ldmain.c (main): Init it.
+ * lexsup.c (enum option_values): Add OPTION_NO_WARN_SEARCH_MISMATCH.
+ (ld_options): Add entry for --no-warn-search-mismatch.
+ (parse_args): Handle OPTION_NO_WARN_SEARCH_MISMATCH.
- * emulparams/elf32bmipn32-defs.sh (OTHER_SECTIONS): Discard
- .MIPS.content* and .MIPS.events* sections.
+2007-05-03 Alan Modra <amodra@bigpond.net.au>
-2004-02-09 Daniel Jacobowitz <drow@mvista.com>
+ * scripttempl/elf.sc: Add .debug_pubtypes and .debug_ranges.
- * emulparams/armelf.sh, emulparams/armelf_linux.sh: Move
- .note.gnu.arm.ident to after allocated sections. Mark its
- address as 0.
+2007-05-01 Robert Millan <rmh@aybabtu.com>
-2004-02-09 Daniel Jacobowitz <drow@mvista.com>
+ * ldlang.c (lang_check): Error on architecture mismatch.
- * emulparams/armelf_linux.sh (COMMONPAGESIZE): Set to 4KB.
- * emulparams/elf32bmip.sh (COMMONPAGESIZE): Likewise.
- * emulparams/elf32bmipn32.sh (COMMONPAGESIZE): Likewise.
- * emulparams/elf32btsmipn32.sh (COMMONPAGESIZE): Likewise.
- * emulparams/shlelf_linux.sh (COMMONPAGESIZE): Likewise.
+2007-04-30 Alan Modra <amodra@bigpond.net.au>
-2004-02-05 Nick Clifton <nickc@redhat.com>
+ * ldmain.c (link_callbacks): Init info and minfo fields.
+ * ldmisc.c (minfo): Do nothing if no map file.
+ * emultempl/spuelf.em (stack_analysis, emit_stack_syms): New vars.
+ (spu_after_open): Adjust spu_elf_create_sections call.
+ (spu_before_allocation): Likewise for spu_elf_size_stubs.
+ (OPTION_SPU_STACK_ANALYSIS, OPTION_SPU_STACK_SYMS): Define.
+ (PARSE_AND_LIST_LONGOPTS): Add new entries.
+ (PARSE_AND_LIST_OPTIONS, PARSE_AND_LIST_ARGS_CASES): Likewise.
+ * gen-doc.texi: Add @set for SPU and other missing targets.
+ * ld.texinfo: Update man page selection to match gen-doc.texi.
+ Document SPU features.
- * emultempl/pe.em (_after_open): Fix typo in previous delta.
+2007-04-28 Alan Modra <amodra@bigpond.net.au>
-2004-02-04 Danny Smith <dannysmith@users.sourceforge.net>
+ * ldcref.c (struct cref_hash_entry): Make "demangled" const.
+ (cref_fill_array): Adjust for changed demangler.
+ * ldlang.c (lang_one_common): Likewise.
- * emultempl/pe.em (_after_open): Fix thinko in 2003-12-18 patch.
+2007-04-27 Nathan Froyd <froydnj@codesourcery.com>
-2004-01-28 Alan Modra <amodra@bigpond.net.au>
+ * emulparams/elf32_sparc.sh: Update comments.
+ * emulparams/elf32bmip.sh: Likewise.
+ * emulparams/elf32ppc.sh: Likewise.
+ * emulparams/vxworks.sh: Likewise.
- * genscripts.sh: Fix typo.
+2007-04-27 Alan Modra <amodra@bigpond.net.au>
+
+ Many files: Include sysdep.h first. Remove duplicate headers.
+ * Makefile.am: Run "make dep-am".
+ * Makefile.in: Regenerate.
+
+2007-04-24 Alan Modra <amodra@bigpond.net.au>
+
+ * Makefile.in: Regenerate.
+
+2007-04-19 Alan Modra <amodra@bigpond.net.au>
+
+ * ldcref.c (cref_fill_array): Call bfd_demangle rather than demangle.
+ * ldlang.c (lang_one_common): Likewise.
+ * ldmisc.c (vfinfo): Likewise.
+ (demangle): Delete.
+ * ldmisc.h (demangle): Delete.
+ * Makefile.am: Run "make dep-am".
+ * Makefile.in: Regenerate.
+
+2007-04-18 Alan Modra <amodra@bigpond.net.au>
+
+ * ldlang.h (enum section_type): Add overlay_section.
+ * ldlang.c (lang_add_section): Handle flags for overlay_section
+ as per normal_section.
+ (lang_size_sections_1): When setting lma, detect overlays by
+ os->sectype rather than by looking for overlapping vmas.
+ (lang_enter_overlay_section): Use overlay_section type.
+ (lang_leave_overlay): Set first overlay section to normal.
+
+2007-04-14 Steve Ellcey <sje@cup.hp.com>
+
+ * Makefile.am: Add ACLOCAL_AMFLAGS.
+ * Makefile.in: Regenerate.
+
+2007-04-12 Bob Wilson <bob.wilson@acm.org>
+
+ * emulparams/elf32xtensa.sh (OTHER_SECTIONS): KEEP property sections.
+
+2007-04-10 Richard Henderson <rth@redhat.com>
+
+ * ldlang.c (relax_sections): Initialize and increment
+ link_info.relax_trip.
+
+2007-04-04 Paul Brook <paul@codesourcery.com>
+
+ * configure.tgt: Loosen checks for arm uclinux eabi targets.
+
+2007-04-02 H.J. Lu <hongjiu.lu@intel.com>
+
+ PR ld/4090
+ * ldexp.h (node_type): Add lineno.
+ * ldexp.c: Include "ldlex.h".
+ (exp_intop): Set the lineno field from lineno.
+ (exp_bigintop): Likewise.
+ (exp_relop): Likewise.
+ (exp_nameop): Likewise.
+ (exp_binop): Set the lineno field from lineno of lhs.
+ (exp_trinop): Likewise.
+ (exp_unop): Set the lineno field from lineno of child.
+ (exp_assop): Set the lineno field from lineno of src.
+ (exp_provide): Likewise.
+ (exp_assert): Set the lineno field from lineno of exp.
+ (exp_get_abs_int): Set lineno from lineno of nonconstant
+ expression when report problem.
+
+2007-03-29 Richard Sandiford <richard@codesourcery.com>
+ Daniel Jacobowitz <dan@codesourcery.com>
+
+ * NEWS: Mention -l:foo.
+ * ld.texinfo: Document it.
+ * ldlang.c (new_afile): If a lang_input_file_is_l_enum
+ entry as a name beginning with a coloh, convert it to a
+ lang_input_file_is_search_file_enum entry without the colon.
+
+2007-03-28 Richard Sandiford <richard@codesourcery.com>
+
+ * ld.h (ld_config_type): Add rpath_separator.
+ * ldmain.c (main): Initialize it.
+ * lexsup.c (parse_args): Honor config.rpath_separator.
+ * emultempl/elf32.em (gld${EMULATION_NAME}_search_needed): Likewise.
+ (gld${EMULATION_NAME}_add_sysroot): Likewise.
+ (gld${EMULATION_NAME}_parse_ld_so_conf): Use config.rpath_separator
+ rather than ':' when building the path.
+ * emultempl/vxworks.em (vxworks_before_parse): New function.
+ Override config.rpath_separator.
+ (LDEMUL_AFTER_OPEN): Do not change if EXTRA_EM_FILE has been
+ set to gld${EMULATION_NAME}_after_open; #define that identifier
+ to vxworks_foo instead.
+ (LDEMUL_BEFORE_PARSE): Override in the same way as LDEMUL_AFTER_OPEN.
+
+2007-03-28 Richard Sandiford <richard@codesourcery.com>
+ Phil Edwards <phil@codesourcery.com>
+
+ * ld.texinfo: Put the contents after the title page rather
+ than at the end of the document.
+
+2007-03-26 Alan Modra <amodra@bigpond.net.au>
+
+ * Makefile.am: Add dependency on ldemul-list.h for powerpc and
+ spu target emul files.
+ * configure.in: Check for mkstemp and waitpid.
+ * Makefile.in: Regenerate.
+ * configure: Regenerate.
+ * config.in: Regenerate.
+ * ldlang.c (input_file_chain): Make global.
+ (lang_add_input_file): Don't set lang_has_input_file here.
+ * ldlang.h (input_file_chain): Declare.
+ * emultempl/ppc32elf.em (ppc_recognized_file): New function.
+ (LDEMUL_RECOGNIZED_FILE): Define.
+ * emultempl/ppc64elf.em (ppc64_recognized_file): New function.
+ (LDEMUL_RECOGNIZED_FILE): Define.
+ * emultempl/spuelf.em (struct tflist): New.
+ (tmp_file_list): New var.
+ (clean_tmp, embedded_spu_file): New functions.
- * genscripts.sh: Apply $LIBPATH_SUFFIX to $tool_lib and $libdir too.
+2007-03-24 Alan Modra <amodra@bigpond.net.au>
-2004-01-24 Jakub Jelinek <jakub@redhat.com>
+ * ldlang.c (lang_insert_orphan): Provide start/stop loadaddr syms
+ rather than defining unconditionally.
+ (lang_leave_overlay_section): Likewise.
+ * ld.texinfo (Overlay Description): Update description and examples
+ for start/stop syms.
- * emulparams/elf64_ia64.sh: Put .rela.opd into
- OTHER_GOT_RELOC_SECTIONS instead of OTHER_PLT_RELOC_SECTIONS.
+2007-03-22 Joseph Myers <joseph@codesourcery.com>
-2004-01-20 Danny Smith <dannysmith@users.sourceforge.net>
+ * ld.texinfo: Include VERSION_PACKAGE when reporting version.
- * pe-dll.c (pe_create_import_fixup): Clear WP_TEXT flag.
- * ld.texinfo (--omagic): Note that writable text section
- does not conform to published PE-COFF specs.
- (--enable-auto-import): Likewise.
+2007-03-20 Paul Brook <paul@codesourcery.com>
-2004-01-15 Alan Modra <amodra@bigpond.net.au>
+ * emultempl/armelf.em (pic_veneer): New variable.
+ (PARSE_AND_LIST_PROLOGUE): Add OPTION_PIC_VENEER.
+ (PARSE_AND_LIST_ARGS_CASES): Ditto.
+ (PARSE_AND_LIST_LONGOPTS): Add "pic-veneer".
+ (PARSE_AND_LIST_OPTIONS): Ditto.
+ * ld.texinfo: Document --pic-veneer.
- * emulparams/elf32ppc.sh (COMMONPAGESIZE): Define.
+2007-03-18 Mark Shinwell <shinwell@codesourcery.com>
-2004-01-13 Nick Clifton <nickc@redhat.com>
+ * ld.texinfo: Document --no-enum-size-warning.
+ * emultempl/armelf.em (no_enum_size_warning): New.
+ (arm_elf_create_output_section_statements): Correct typo
+ in comment. Pass no_enum_size_warning to
+ bfd_elf32_arm_set_target_relocs.
+ (PARSE_AND_LIST_PROLOGUE): Define OPTION_NO_ENUM_SIZE_WARNING.
+ (PARSE_AND_LIST_OPTIONS): Document --no-enum-size-warning.
+ (PARSE_AND_LIST_ARGS_CASES): Add OPTION_NO_ENUM_SIZE_WARNING
+ case.
- * ldlang.c (lang_get_regions): Add extra parameter 'have_vma'
- which if true will prevent the LMA region being used as a
- replacement for a default VMA region.
- (lang_leave_output_section_statement): Pass extra parameter.
- (lang_leave_overlay): Likewise.
- * ld.texinfo (Output Section LMA): Document that the LMA
- region can be set to the VMA region if no VMA has been set.
- * ldlang.h (struct lang_output_section_phdr_list): Create a
- typedef for this type. Minor formatting fixes.
+2007-03-19 Bernd Schmidt <bernd.schmidt@analog.com>
-2004-01-13 Nick Clifton <nickc@redhat.com>
+ * configure.tgt (bfin-*-elf, bfin-*-uclinux*): Add targ_extra_libpath.
+ (bfin-*-linux-uclibc*): New target.
- * ldlang.c (lang_size_sections_1): If dot is advanced, then
- assume that the section should be allocated.
+2007-03-16 Kai Tietz <Kai.Tietz@onevision.com>
-2004-01-13 Alan Modra <amodra@bigpond.net.au>
+ * pe-dll.c (make_one): Use pc-relative relocation instead of an
+ absolute relocation for x86_64-pc-mingw32 target.
- * ldlang.c (IGNORE_SECTION): Don't ignore SEC_ALLOC && !SEC_LOAD
- sections. Do ignore SEC_NEVER_LOAD sections.
- (lang_size_sections_1): Remove test made redundant with the above.
+2007-03-15 H.J. Lu <hongjiu.lu@intel.com>
-2004-01-09 Alan Modra <amodra@bigpond.net.au>
+ * Makefile.am (ld_TEXINFOS): Remove ldver.texi.
+ (AM_MAKEINFOFLAGS): Add -I ../../bfd/doc.
+ (TEXI2DVI): Likewise.
+ (REPORT_BUGS_TO): Removed.
+ (INCLUDES): Remove -DREPORT_BUGS_TO.
+ (ldver.texi): Likewise.
+ (ld.1): Don't depend on ldver.texi.
+ (MOSTLYCLEANFILES): Remove ldver.texi.
+ * Makefile.in: Regenerated.
- * emultempl/ppc64elf.em (ppc_before_allocation): Clear cached
- program_header_size.
+ * configure.in (--with-bugurl): Removed.
+ * configure: Regenerated.
-2004-01-06 Alexandre Oliva <aoliva@redhat.com>
+ * lexsup.c: Include bfdver.h.
- 2003-11-28 Alexandre Oliva <aoliva@redhat.com>
- * emulparams/elf32frvfd.sh (EMBEDDED): Clear.
- 2003-11-05 Alexandre Oliva <aoliva@redhat.com>
- * emulparams/elf32frvfd.sh (STACK_ADDR): Unset.
- (MAXPAGESIZE): Set to 64Kb.
- (OTHER_READONLY_SECTIONS): Define __ROFIXUP_LIST__ and
- __ROFIXUP_END__. Don't map .rofixup.got any more.
- * emulparams/elf32frv.sh (NOP): Set.
- 2003-10-31 Alexandre Oliva <aoliva@redhat.com>
- * configure.tgt: Add frv-*-*linux*.
- 2003-09-30 Alexandre Oliva <aoliva@redhat.com>
- * Makefile.am (ALL_EMULATIONS): Added eelf32frvfd.o.
- (eelf32frvfd.c): New.
- * configure.tgt <frv-*-*>: Added it to targ_extra_emuls.
- * emulparams/elf32frv.sh: Reverted previous two patches.
- * emulparams/elf32frvfd.sh: New.
+ * ld.texinfo: Include bfdver.texi instead of ldver.texi.
+
+2007-03-11 Hans-Peter Nilsson <hp@bitrange.com>
+
+ * emultempl/mmixelf.em: Remove incorrect '#line' directive.
+
+2007-03-08 Alan Modra <amodra@bigpond.net.au>
+
+ * ldlang.c (lang_size_sections_1): Correct backwards dot move
+ test to not trigger on overlays. Only warn on backwards move
+ if non-default lma.
+
+2007-03-07 Joseph Myers <joseph@codesourcery.com>
+
+ * configure.in (REPORT_BUGS_TEXI): Define to Texinfo version of
+ bug-reporting URL.
+ * Makefile.am (ldver.texi): Define BUGURL.
+ * ld.texinfo: Use BUGURL.
+ * Makefile.in, configure: Regenerate.
+
+2007-03-07 Nick Clifton <nickc@redhat.com>
+
+ PR ld/4023
+ * emultempl/aix.em (..._before_allocation): Strip sysroot prefix
+ from any paths being inserted into the output binary's DT_RPATH.
+
+2007-03-02 Nathan Sidwell <nathan@codesourcery.com>
+
+ * emulparams/shelf_uclinux.sh: New. Missed in 2007-02-28 commit.
+
+2007-03-01 Joseph Myers <joseph@codesourcery.com>
+
+ * ldver.c (ldversion): Remove word "version" from output. Update
+ copyright date.
+
+2007-02-28 Nathan Sidwell <nathan@codesourcery.com>
+
+ * Makefile.am (ALL_EMULATIONS): Add eshelf_uclinux.o
+ (eshelf_uclinux.c): New target.
* Makefile.in: Rebuilt.
- 2003-09-18 Alexandre Oliva <aoliva@redhat.com>
- * emulparams/elf32frv.sh (OTHER_READONLY_SECTIONS): Added
- .rofixup.got to .rofixup.
- 2003-09-15 Alexandre Oliva <aoliva@redhat.com>
- * emulparams/elf32frv.sh (MAXPAGESIZE): Make it 256KiB, not 256B.
- (TEMPLATE_NAME, GENERATE_SHLIB_SCRIPT): Set.
-
-2004-01-05 Jakub Jelinek <jakub@redhat.com>
-
- * emulparams/elf_s390.sh (NO_SMALL_DATA): Set to yes.
- * emulparams/elf64_s390.sh (NO_SMALL_DATA): Set to yes.
-
-2004-01-03 Alan Modra <amodra@bigpond.net.au>
-
- * ldexp.c (align_n): Make static.
- * ldexp.h (align_n): Delete declaration.
- * ldlang.h (lang_enter_output_section_statement): Remove
- block_value param.
- * ldlang.c (lang_enter_output_section_statement): Likewise.
- (TO_ADDR, TO_SIZE): Define.
- (opb_shift): New var.
- (init_opb): New function.
- (print_input_section): Call init_opb and use TO_ADDR.
- (print_data_statement, print_reloc_statement): Likewise.
- (print_padding_statement): Likewise.
- (size_input_section): Use TO_SIZE and TO_ADDR, and global opb_shift.
- (lang_check_section_addresses): Likewise.
- (lang_size_sections_1): Likewise.
- (lang_do_assignments_1): Likewise.
- (lang_set_startof): Likewise.
- (lang_one_common): Likewise. Combine power_of_two and opb_shift align.
- (lang_process): Call init_opb.
- (lang_abs_symbol_at_end_of): Use TO_ADDR and global opb_shift.
- (lang_enter_overlay_section): Adjust
- lang_enter_output_section_statement call.
- * ldgram.y: Likewise.
- * mri.c (mri_draw_tree): Likewise.
- * emultempl/elf32.em (gld${EMULATION_NAME}_place_orphan): Likewise.
- * emultempl/mmo.em (mmo_place_orphan): Likewise.
- * emultempl/pe.em (gld${EMULATION_NAME}_place_orphan): Likewise.
-
- * ldfile.c (ldfile_set_output_arch): Add defarch param.
- * ldfile.h (ldfile_set_output_arch): Ditto.
- * emultempl/aix.em (gld${EMULATION_NAME}_before_parse): Use
- ldfile_set_output_arch.
- * emultempl/beos.em (gld${EMULATION_NAME}_before_parse): Ditto.
- * emultempl/elf32.em (gld${EMULATION_NAME}_before_parse): Ditto.
- * emultempl/linux.em (gld${EMULATION_NAME}_before_parse): Ditto.
- * emultempl/mipsecoff.em (gld${EMULATION_NAME}_before_parse): Ditto.
- * emultempl/pe.em (gld${EMULATION_NAME}_before_parse): Ditto.
- * emultempl/sunos.em (gld${EMULATION_NAME}_before_parse): Ditto.
- * ldgram.y: Adjust ldfile_set_output_arch call.
- * emultempl/armcoff.em (gld${EMULATION_NAME}_before_parse): Ditto.
- * emultempl/armelf.em (gld${EMULATION_NAME}_before_parse): Ditto.
- * emultempl/armelf_oabi.em (gld${EMULATION_NAME}_before_parse): Ditto.
- * emultempl/generic.em (gld${EMULATION_NAME}_before_parse): Ditto.
- * emultempl/gld960c.em (gld960_set_output_arch): Ditto.
- * emultempl/m68kcoff.em (gld${EMULATION_NAME}_before_parse): Ditto.
- * emultempl/ticoff.em (gld${EMULATION_NAME}_before_parse): Ditto.
-
-2004-01-02 Bernardo Innocenti <bernie@develer.com>
-
- * configure.tgt: Add m68k-uClinux target.
-
-For older changes see ChangeLog-0203
+ * configure.tgt (sh-*-uclinux* | sh[12]-*-uclinux*): New stanza.
+ * emulparams/shelf_uclinux.sh: New.
+
+2007-02-28 Alan Modra <amodra@bigpond.net.au>
+
+ * configure.tgt: Fix type last change.
+ * configure.tgt (spu-*-elf*): Delete targ_extra_ofiles.
+
+2007-02-27 Alan Modra <amodra@bigpond.net.au>
+
+ * Makefile.am (ALL_EMUL_EXTRA_OFILES): Remove spu_inc.o.
+ (eelf32_spu.c): Adjust dependencies.
+ * Makefile.in: Regenerate.
+ * emultempl/spuelf.em (ovl_mgr): New array. Insert spu_ovl.o
+ code using bin2c.
+ (_binary_spu_ovl_o_start, _binary_spu_ovl_o_end): Delete.
+ (ovl_mgr_stream): Update.
+ * emultempl/spu_inc.s: Delete.
+ * emultempl/spu_none.s: Delete.
+
+2007-02-26 Alan Modra <amodra@bigpond.net.au>
+
+ * emultempl/spuelf.em (_binary_builtin_ovl_mgr_start): Rename
+ to _binary_spu_ovl_o_start.
+ (_binary_builtin_ovl_mgr_end): Rename to _binary_spu_ovl_o_end.
+ (spu_elf_load_ovl_mgr): Fatal error on missing overlay manager.
+ * emultempl/spu_inc.s: Rename symbols.
+ * emultempl/spu_none.s: New file.
+ * emultempl/spu_ovl.S: Update copyright.
+ * Makefile.am (spu_inc.o): Try building with ld -r first, then
+ gas incbin, then build without overlay manager.
+ * Makefile.in: Regenerate.
+
+2007-02-22 Joseph Myers <joseph@codesourcery.com>
+
+ * configure.tgt (mips64*el-*-linux-*, mips64*-*-linux-*,
+ mips*el-*-linux-*, mips*-*-linux-*): Set
+ targ_extra_libpath=$targ_extra_emuls.
+
+2007-02-21 Nick Clifton <nickc@redhat.com>
+
+ * ldlang.c (ldlang_override_segment_assignment): New function.
+ * ldlang.h (ldlang_override_segment_assignment): Prototype.
+ * ldmain.c (link_callbacks): Add
+ ldlang_override_segment_assignment.
+
+2007-02-20 Alan Modra <amodra@bigpond.net.au>
+
+ * ldexp.c (fold_name <LOADADDR>): Ensure result is always absolute.
+
+2007-02-17 Mark Mitchell <mark@codesourcery.com>
+ Nathan Sidwell <nathan@codesourcery.com>
+ Vladimir Prus <vladimir@codesourcery.com
+ Joseph Myers <joseph@codesourcery.com>
+
+ * configure.in (--with-bugurl): New option.
+ * configure: Regenerate.
+ * Makefile.am (REPORT_BUGS_TO): Define.
+ (INCLUDES): Define REPORT_BUGS_TO.
+ Regenerate dependencies.
+ * Makefile.in: Regenerate.
+ * ld.h: Remove include of bin-bugs.h.
+ * lexsup.c (help): Don't print empty REPORT_BUGS_TO.
+
+2007-02-17 Alan Modra <amodra@bigpond.net.au>
+
+ * ldcref.c (check_reloc_refs): Compare section for local syms.
+
+2007-02-13 Alan Modra <amodra@bigpond.net.au>
+
+ * emultempl/spu_ovl.S (__ovly_return, __ovly_load): Set sym size.
+ (__ovly_load_event): Define.
+ (size): Rename to osize.
+ * emultempl/spu_ovl.o: Regenerate.
+
+2007-02-13 Alan Modra <amodra@bigpond.net.au>
+
+ * emulparams/elf64ppc.sh (OTHER_READWRITE_SECTIONS): Add ".branch_lt".
+ * emultempl/ppc64elf.em (ppc_add_stub_section): Create without
+ SEC_RELOC flag set.
+
+2007-02-09 H.J. Lu <hongjiu.lu@intel.com>
+
+ * configure.in (targ_extra_emuls): Add $targ64_extra_emuls if
+ want64 is true.
+ (targ_extra_libpath): Add $targ64_extra_libpath if want64 is
+ true
+ * configure: Regenerated.
+
+ * configure.tgt (targ_extra_libpath): Initialize.
+ (targ64_extra_emuls): New. Document. Initialize.
+ (targ64_extra_libpath): Likewise.
+ (i[3-7]86-*-linux-*): Set targ64_extra_emuls and
+ targ64_extra_libpath.
+ (powerpc*-*-linux*): Likewise.
+ (s390-*-linux*): Likewise.
+
+2007-02-07 Paul Brook <paul@codesourcery.com>
+
+ * configure.tgt: Add arm*-*-uclinux-*eabi.
+
+2007-02-06 H.J. Lu <hongjiu.lu@intel.com>
+
+ * ldlang.c (lang_size_sections_1): Add a missing `)'.
+
+2007-02-06 Alan Modra <amodra@bigpond.net.au>
+
+ PR ld/3966
+ * ldlang.c (lang_size_sections_1): Don't warn on backwards dot
+ move unless section size is non-zero.
+
+2007-02-05 Dave Brolley <brolley@redhat.com>
+
+ * Makefile.am (ALL_EMULATIONS): Add support for Toshiba MeP.
+ * configure.tgt: Likewise.
+ * scripttempl/mep.sc: New file.
+ * emulparams/elf32mep.sh: New file.
+ * Makefile.in: Regenerate.
+
+2006-01-29 Julian Brown <julian@codesourcery.com>
+
+ * NEWS: Mention --vfp11-denorm-fix option.
+ * ld.texinfo: Document above.
+ * emulparams/armelf_linux.sh (OTHER_TEXT_SECTIONS): Add
+ .vfp11_veneer section.
+ * emulparams/armelf.sh (OTHER_TEXT_SECTIONS): Likewise.
+ * emultempl/armelf.em (vfp11_denorm_fix): New static variable.
+ (arm_elf_before_allocation): Call bfd_elf32_arm_set_vfp11_fix,
+ bfd_elf32_arm_init_maps and bfd_elf32_arm_vfp11_erratum_scan.
+ (arm_elf_after_allocation): New function. Call
+ bfd_elf32_arm_vfp11_fix_veneer_locations for all input statements.
+ (arm_elf_create_output_section_statements): Pass vfp11 fix command
+ line option to BFD.
+ (OPTION_VFP11_DENORM_FIX): New option.
+ (PARSE_AND_LIST_LONGOPTS): Handle new option.
+ (PARSE_AND_LIST_OPTIONS): Likewise.
+ (PARSE_AND_LIST_ARGS_CASES): Likewise.
+ (LDEMUL_AFTER_ALLOCATION): Define.
+
+2007-01-24 H.J. Lu <hongjiu.lu@intel.com>
+
+ * ldgram.y (SIZEOF_HEADERS): Remove duplicated one.
+ (DEFSYMEND): Likewise.
+ (NAME): Likewise.
+ (LNAME): Likewise.
+
+2007-01-19 Murali Vemulapati <murali.vemulapati@gmail.com>
+
+ * pe-dll.c: (make_one) Conditionally include jump stubs.
+ * emultempl/pe.em (gld_${EMULATION_NAME}_after_open): Identify
+ redundant jump stubs from import libraries and exclude them from
+ link.
+
+2007-01-19 H.J. Lu <hongjiu.lu@intel.com>
+
+ * ld.h (args_type): Add new symbolic and dynamic_list fields.
+
+ * ld.texinfo: Update -Bsymbolic-functions.
+
+ * ldmain.c (main): Initialize command_line.symbolic to
+ symbolic_unset and command_line.dynamic_list to
+ dynamic_list_unset. Check -Bsymbolic, -Bsymbolic-functions and
+ --dynamic-list* before setting link_info.symbolic,
+ link_info.dynamic and link_info.dynamic_data.
+
+ * lexsup.c (option_values): Add OPTION_SYMBOLIC_FUNCTIONS.
+ (ld_options): Use OPTION_SYMBOLIC_FUNCTIONS with
+ -Bsymbolic-functions.
+ (parse_args): Handle -Bsymbolic-functions. Don't set
+ link_info.dynamic, link_info.dynamic_data and link_info.symbolic
+ here. Set command_line.symbolic for -Bsymbolic. Set
+ command_line.dynamic_list and command_line.symbolic for
+ --dynamic-list-data, --dynamic-list-cpp-new,
+ --dynamic-list-cpp-typeinfo and --dynamic-list.
+
+2007-01-19 Jakub Jelinek <jakub@redhat.com>
+ H.J. Lu <hongjiu.lu@intel.com>
+
+ * emultempl/elf32.em (handle_option): Make sure -z max-page-size
+ or -z common-page-size argument is a power of 2. Call
+ bfd_emul_set_maxpagesize and bfd_emul_set_commonpagesize.
+
+2007-01-19 H.J. Lu <hongjiu.lu@intel.com>
+
+ * ldmain.c (main): Don't call bfd_emul_set_maxpagesize nor
+ bfd_emul_set_commonpagesize.
+
+2007-01-19 H.J. Lu <hongjiu.lu@intel.com>
+
+ * NEWS: Mention --default-script/-dT.
+
+ * ld.h (args_type): Add a default_script field.
+
+ * ld.texinfo: Document --default-script/-dT.
+
+ * ldmain.c (main): Handle command_line.default_script.
+
+ * lexsup.c (option_values): Add OPTION_DEFAULT_SCRIPT.
+ (ld_options): Add entries for --default-script and -dT.
+ (parse_args): Handle --default-script/-dT.
+
+2007-01-16 H.J. Lu <hongjiu.lu@intel.com>
+
+ PR ld/3831
+ * NEWS: Mention -Bsymbolic-functions, --dynamic-list-data and
+ --dynamic-list-cpp-new.
+
+ * ld.texinfo: Document -Bsymbolic-functions, --dynamic-list-data
+ and --dynamic-list-cpp-new.
+
+ * ldlang.c (lang_append_dynamic_list_cpp_new): New.
+ (lang_process): Change link_info.dynamic to
+ link_info.dynamic_list.
+ (lang_append_dynamic_list): Likewise.
+ * ldmain.c (main): Likewise. Initialize link_info.dynamic and
+ link_info.dynamic_data to FALSE.
+
+ * ldlang.h (lang_append_dynamic_list_cpp_new): New.
+
+ * lexsup.c (option_values): Add OPTION_DYNAMIC_LIST_DATA and
+ OPTION_DYNAMIC_LIST_CPP_NEW.
+ (ld_options): Add entries for -Bsymbolic-functions,
+ --dynamic-list-data and --dynamic-list-cpp-new. Make
+ -Bsymbolic-functions an alias of --dynamic-list-data.
+ (parse_args): Change link_info.dynamic to link_info.dynamic_list.
+ Set link_info.dynamic to TRUE for --dynamic-list and
+ --dynamic-list-cpp-typeinfo. Handle --dynamic-list-data and
+ --dynamic-list-cpp-new.
+
+2007-01-11 Nathan Sidwell <nathan@codesourcery.com>
+
+ * emultempl/elf-generic.em (gdl_map_segments): Only allow header
+ shrinkage for the first few iterations.
+
+2007-01-08 Kai Tietz <kai.tietz@onevision.com>
+
+ * configure.tgt: Renamed target x86_64-*-mingw64 to
+ x86_64-*-mingw*.
+
+2007-01-08 Pedro Alves <pedro_alves@portugalmail.pt>
+
+ * configure.host: Add i[3-7]86-*-mingw* case.
+
+2007-01-08 Nick Clifton <nickc@redhat.com>
+
+ * pep-dll.h (pep_bfd_is_dll): Add prototype.
+
+2007-01-08 Aurelien Jarno <aurelien@aurel32.net>
+
+ PR ld/3843
+ * configure.tgt (x86_64_[k]freebsd*): Add targ_extra_libpath and
+ tdir_elf_i386_fbsd.
+
+2007-01-06 Nathan Sidwell <nathan@codesourcery.com>
+
+ * ldexp.c (fold_name): Issue error on undefined sections.
+
+2007-01-02 Alan Modra <amodra@bigpond.net.au>
+
+ * pe-dll.c: Include pe-dll.h.
+ * pep-dll.c (pe_bfd_is_dll): Define.
+
+For older changes see ChangeLog-2006
Local Variables:
mode: change-log
diff --git a/contrib/binutils/ld/ChangeLog-2006 b/contrib/binutils/ld/ChangeLog-2006
new file mode 100644
index 0000000..c28addf
--- /dev/null
+++ b/contrib/binutils/ld/ChangeLog-2006
@@ -0,0 +1,1364 @@
+2006-12-23 Kazu Hirata <kazu@codesourcery.com>
+
+ * configure.tgt: Recognize fido.
+
+2006-12-18 Pedro Alves <pedro_alves@portugalmail.pt>
+
+ * pe-dll.c (pe_bfd_is_dll): New function.
+ * pe-dll.h (pe_bfd_is_dll): Declare.
+ * emultempl/pe.em (gld_${EMULATION_NAME}_recognized_file): Recognize
+ dlls using pe_bfd_is_dll instead of using the filename extension.
+
+2006-12-15 Ulrich Weigand <uweigand@de.ibm.com>
+
+ * configure.tgt (NATIVE_LIB_DIRS): Specify for spu-*-elf*.
+
+2006-12-12 Daniel Jacobowitz <dan@codesourcery.com>
+
+ * Makefile.am (ld_TEXINFOS): Set.
+ (ld.info ld.dvi ld.html): Delete rule.
+ * Makefile.in: Regenerated.
+
+2006-12-12 Ina Pandit <inap@kpitcummins.com>
+
+ * ldlang.c (print_output_section_statement): Print load address
+ when lma differs from vma.
+
+2006-12-11 Daniel Jacobowitz <dan@codesourcery.com>
+
+ * configure.in: Define GENINSRC_NEVER.
+ * doc/Makefile.am (ld.info): Remove srcdir prefix.
+ (MAINTAINERCLEANFILES): Add info file.
+ (DISTCLEANFILES): Pretend to add info file.
+ * po/Make-in (.po.gmo): Put gmo files in objdir.
+ * configure, Makefile.in: Regenerated.
+
+2006-12-04 Jan Beulich <jbeulich@novell.com>
+
+ * emultempl/elf32.em (gld${EMULATION_NAME}_after_open): Create
+ .eh_frame_hdr section here.
+
+2006-11-27 Ian Lance Taylor <ian@airs.com>
+
+ * Makefile.am (EXTRA_DIST): Put spu_ovl.o in the emultempl
+ subdirectory.
+ * Makefile.in: Regenerate.
+
+2006-11-27 Bob Wilson <bob.wilson@acm.org>
+
+ * emultempl/xtensaelf.em (XSHAL_ABI): Add default definition.
+ (replace_insn_sec_with_prop_sec): Use bfd_make_section_with_flags.
+ Delete redundant code to set sections flags and alignment.
+ (xt_config_info_unpack_and_check, check_xtensa_info): New.
+ (elf_xtensa_after_open): Iterate over input statements instead of
+ link_info.input_bfds.
+ (elf_xtensa_before_allocation): Likewise. Call check_xtensa_info for
+ each input, and write a new .xtensa.info section in the output.
+
+2006-11-22 Nick Clifton <nickc@redhat.com>
+
+ * configure.in (LINGUAS): Add ga.
+ * po/ga.po: New Irish translation.
+
+2006-11-20 H.J. Lu <hongjiu.lu@intel.com>
+
+ * ld.texinfo: Fix a typo.
+
+2006-11-20 Alan Modra <amodra@bigpond.net.au>
+
+ * emulparams/elf32_spu.sh (OTHER_SECTIONS): Define.
+
+2006-11-13 Daniel Jacobowitz <dan@codesourcery.com>
+
+ * emultempl/armelf.em (arm_elf_before_allocation): Only call
+ bfd_elf32_arm_process_before_allocation if no dynamic sections.
+
+2006-11-08 Alan Modra <amodra@bigpond.net.au>
+
+ * emultempl/elf32.em (gld*_before_allocation): Adjust output section
+ size for warning sections.
+
+2006-11-06 Vladimir Prus <vladimir@codesourcery.com>
+
+ * emultempl/elf32.em (gld*_before_allocation): Don't prepend
+ "warning" to the message.
+
+2006-10-31 Pedro Alves <pedro_alves@portugalmail.pt>
+
+ * pe-dll.c (autofilter_entry_type): Change name to const.
+ (pe_details_type) : Change target_name, object_target and
+ autofilter_symbollist to const.
+ (autofilter_symbollist_generic): Change to const.
+ (autofilter_symbollist_i386, pe_detail_list, pe_details,
+ autofilter_liblist, autofilter_objlist autofilter_symbolprefixlist,
+ autofilter_symbolsuffixlist): Likewise.
+ (is_import): Fix indentation.
+ (auto_export): Change afptr to const. Move name declaration to
+ beginning of scope.
+ (make_tail): Clear undefined byte.
+ (jmp_ix86_bytes, jmp_sh_bytes, jmp_mips_bytes, jmp_arm_bytes): Change
+ to const.
+ (make_one): Change jmp_bytes to const. Make idata$6 member size
+ arithmetic explicit and add comment.
+
+2006-10-30 H.J. Lu <hongjiu.lu@intel.com>
+
+ PR ld/3111
+ * ld.h (args_type): Remove reduce_memory_overheads.
+
+ * ldlang.c (lang_map): Updated.
+ (section_already_linked): Likewise.
+ (print_input_section): Likewise.
+ * ldmain.c (main): Likewise.
+ * lexsup.c (parse_args): Likewise.
+
+2006-10-29 Pedro Alves <pedro_alves@portugalmail.pt>
+
+ * pe-dll.c (make_singleton_name_thunk): Re-add the NULL terminator.
+
+2006-10-27 Alan Modra <amodra@bigpond.net.au>
+
+ * ldlang.c (lang_map): Don't say SEC_LINKER_CREATED and SEC_KEEP
+ sections have been discarded.
+ (lang_do_version_exports_section): Set SEC_KEEP on export section.
+ * emultempl/elf32.em (before_allocation): Set SEC_KEEP on warning
+ sections.
+
+2006-10-26 Joseph S. Myers <joseph@codesourcery.com>
+ Mark Mitchell <mark@codesourcery.com>
+
+ * configure.tgt (arm*linux*): Support both big- and little-endian.
+
+2006-10-25 H.J. Lu <hongjiu.lu@intel.com>
+
+ * emulparams/hppa64linux.sh (LARGE_SECTIONS): Renamed to ...
+ (OTHER_BSS_SECTIONS): This.
+ * scripttempl/elf.sc (OTHER_BSS_SECTIONS): Support LARGE_SECTIONS.
+ (LARGE_SECTIONS): Move .lbss sections to OTHER_BSS_SECTIONS.
+
+2006-10-25 Alan Modra <amodra@bigpond.net.au>
+ Trevor Smigiel <Trevor_Smigiel@playstation.sony.com>
+ Yukishige Shibata <shibata@rd.scei.sony.co.jp>
+ Nobuhisa Fujinami <fnami@rd.scei.sony.co.jp>
+ Takeaki Fukuoka <fukuoka@rd.scei.sony.co.jp>
+
+ * emulparams/elf32_spu.sh: New file.
+ * emultempl/spu_inc.s: New file.
+ * emultempl/spu_ovl.S: New file.
+ * emultempl/spu_ovl.o: New file.
+ * emultempl/spuelf.em: New file.
+ * Makefile.am: Add SPU support.
+ * configure.tgt: Likewise.
+ * ldlang.c (load_symbols): Make global.
+ * ldlang.h (load_symbols): Declare.
+ * scripttempl/elf.sc (OTHER_BSS_SECTIONS): Add.
+ * Makefile.in: Regenerate.
+
+2006-10-24 Ben Elliston <bje@au.ibm.com>
+
+ * lexsup.c (parse_args): Add a comment noting a fall-through.
+
+2006-10-24 H.J. Lu <hongjiu.lu@intel.com>
+
+ * configure.in (AC_CHECK_HEADERS): Add limits.h and sys/param.h.
+ * configure: Regenerated.
+ * config.in: Likewise.
+
+2006-10-23 Alan Modra <amodra@bigpond.net.au>
+
+ * emulparams/h8300elf.sh (TINY_DATA_SECTION, TINY_BSS_SECTION): Don't
+ set section address on a relocatable link.
+
+ * ld.texinfo (Output Section Discarding): Fix xref.
+
+2006-10-21 Kaz Kojima <kkojima@rr.iij4u.or.jp>
+
+ * emulparams/shelf32.sh: Set default stack to 0x80000.
+ * emulparams/shelf64.sh: Likewise.
+
+2006-10-20 Richard Sandiford <richard@codesourcery.com>
+
+ * emulparams/elf32bmip.sh (OTHER_GOT_RELOC_SECTIONS): Define.
+ * emulparams/elf32bmipn32-defs.sh (OTHER_GOT_RELOC_SECTIONS): Likewise.
+
+2006-10-19 Alan Modra <amodra@bigpond.net.au>
+
+ * emultempl/armelf.em (arm_elf_before_allocation): Run
+ gld${EMULATION_NAME}_before_allocation later.
+ * ldlang.c (lang_size_sections_1): Revert 2006-09-15 change.
+
+2006-10-18 Roy Marples <uberlord@gentoo.org>
+
+ * emulparams/elf64_sparc_fbsd.sh (OUTPUT_FORMAT): Define as
+ elf64-sparc-freebsd.
+
+2006-10-18 Joseph Myers <joseph@codesourcery.com>
+
+ * configure.tgt (i[3-7]86-*-linux-*): Also define
+ targ_extra_libpath in want64 case.
+ * emulparams/elf_x86_64.sh: Handle i[3-7]86-*-linux-* the same as
+ x86_64*-linux*.
+
+2006-10-17 Alan Modra <amodra@bigpond.net.au>
+
+ * scripttempl/elf.sc (INTERP): Delete. Move definition to..
+ (INITIAL_READONLY_SECTIONS): ..here.
+ * emulparams/criself.sh (INITIAL_READONLY_SECTIONS): Include .interp.
+ * emulparams/elf32bmip.sh (INITIAL_READONLY_SECTIONS): Ditto.
+ * emulparams/elf32bmipn32-defs.sh (INITIAL_READONLY_SECTIONS): Ditto.
+
+2006-10-17 Alan Modra <amodra@bigpond.net.au>
+
+ * ldlang.c (strip_excluded_output_sections): Do strip sections
+ that define syms, but don't ignore them.
+ * ld.texinfo (Output Section Discarding): Revise.
+ * emultempl/armcoff.em (gld${EMULATION_NAME}_finish): Always call
+ finish_default.
+
+2006-10-16 Richard Sandiford <richard@codesourcery.com>
+
+ * Makefile.am (eelf64bmip.c): Depend on emulparams/elf64bmip-defs.sh.
+ (eelf64btsmip.c, eelf64ltsmip.c): Likewise.
+ * Makefile.in: Regenerate.
+ * emulparams/elf32bmipn32-defs.sh (INITIAL_READONLY_SECTIONS): Include
+ .reginfo rather than .MIPS.options.
+ * emulparams/elf64bmip-defs.sh: New file.
+ * emulparams/elf64bmip.sh: Include it.
+ (COMMONPAGESIZE): Delete.
+ * emulparams/elf64btsmip.sh: As for elf64bmip.sh.
+
+2006-10-12 Bob Wilson <bob.wilson@acm.org>
+
+ * emultempl/xtensaelf.em (is_inconsistent_linkonce_section): Check
+ for linkonce XCC exception tables (".e" and ".h").
+
+2006-10-11 Bob Wilson <bob.wilson@acm.org>
+
+ * emulparams/elf32xtensa.sh (TEXT_PLT): Enable.
+ (OTHER_READONLY_SECTIONS): Add linkonce .xt_except_table sections.
+ (OTHER_READWRITE_SECTIONS): Add linkonce .xt_except_desc sections.
+ (OTHER_SDATA_SECTIONS): New.
+ * scripttempl/elfxtensa.sc: Import changes from elf.sc.
+
+2006-10-11 Jakub Jelinek <jakub@redhat.com>
+
+ * ldlang.c (lang_append_dynamic_list): When appending, add all elements
+ of the dynamic list rather than just the first entry.
+
+2006-10-10 Bob Wilson <bob.wilson@acm.org>
+
+ * emulparams/elf32xtensa.sh (GENERATE_PIE_SCRIPT): Enable.
+
+2006-10-06 Mike Frysinger <vapier@gentoo.org>
+
+ * genscripts.sh: Respect LIBPATH_SUFFIX when not using sysroot.
+
+2006-10-04 Bob Wilson <bob.wilson@acm.org>
+
+ * emulparams/xtensa-config.sh: Delete file.
+ * emulparams/elf32xtensa.sh: Set MAXPAGESIZE here instead of including
+ xtensa-config.sh.
+ * Makefile.am (eelf32xtensa.c): Remove dependency on xtensa-config.sh.
+ * Makefile.in: Regenerate.
+
+2006-10-03 Pedro Alves <pedro_alves@portugalmail.pt>
+
+ * pe-dll.c : Fix typo.
+ (autofilter_symbolprefixlist) : Remove __imp_.
+ (is_import) : New.
+ (auto-export) : Remove re-import check. Moved to callers.
+ (process_def_file) : Check is symbol is an import. Always
+ underscore __imp_.
+ Only skip underscore on underscored targets.
+ (make_one) : Always underscore __imp_.
+ (pe_create_runtime_relocator_reference) : Only underscore
+ _pei386_runtime_relocator on underscored targets.
+ (pe_process_import_defs) : Always underscore __imp_.
+ * pe.em (U) : New macro.
+ (set_pe_subsystem) : Remove underscore from _WinMainCRTStartup
+ on wince subsystem case.
+ (pe_find_data_imports) : Use U on "_head_".
+ (gld_${EMULATION_NAME}_unrecognized_file) : Use U.
+
+2006-09-26 H.J. Lu <hongjiu.lu@intel.com>
+
+ PR ld/3223
+ PR ld/3267
+ * ld.texinfo: Updated Output Section Discarding.
+
+ * ldlang.h (lang_output_section_statement_type): Add
+ section_relative_symbol.
+ * ldlang.c (strip_excluded_output_sections): Don't strip a
+ section with a symbol relative to it.
+ (lang_size_sections_1): Mark if an output section has a symbol
+ symbol relative to it.
+
+2006-09-25 Bob Wilson <bob.wilson@acm.org>
+
+ * ld.texinfo (Options): Update description of local symbols for -X.
+
+2006-09-23 H.J. Lu <hongjiu.lu@intel.com>
+
+ PR ld/3249
+ * scripttempl/elf.sc: Don't combine .gnu.linkonce.d.*personality*
+ and .gnu.linkonce.wi.* sections with .data and .debug_info for
+ relocatable link.
+
+2006-09-20 Kai Tietz <Kai.Tietz@onevision.com>
+
+ * configure.in: Add new target x86_64-pc-mingw64.
+ * configure: Regenerate.
+ * configure.tgt: Add definition of target emulation i386pep.
+ * Makefile.am: Add new target files for target-all.
+ * Makefile.in: Regenerate.
+ * pe-dll.c: Adjust to be inheritable by pep_dll.c as include.
+ Fix memory out of bounds excess for idata relocation section data.
+ * pep-dll.c: Add target specific shared object handling.
+ * pep-dll.h: Add target specific definitions for shared object handling.
+ * emulparams/i386pep.sh: Add new emulation params for target x86_64 coff.
+ * emultempl/pep.em: Add new emulation file for target x86_64 coff.
+ * po/POTFILES.in: Regenerate.
+ * scripttempl/pep.sc: Add linker script template for target x86_64 coff.
+ * NEWS: Mention new target.
+
+2006-09-18 Thiemo Seufer <ths@networkno.de>
+
+ * configure.tgt: Add mips*el-sde-elf* and mips*-sde-elf*
+ configurations.
+
+2006-09-17 Mei Ligang <ligang@sunnorth.com.cn>
+
+ * emulparams/scoreelf.sh: New file.
+ * emultempl/scoreelf.em: New file.
+ * Makefile.am: Add Score files.
+ * Makefile.in: Regenerate.
+ * configure.tgt: Add Score target.
+ * NEWS: Mention new target support.
+
+2006-09-16 Nick Clifton <nickc@redhat.com>
+ Pedro Alves <pedro_alves@portugalmail.pt>
+
+ * ldctor.c: Make use of new STRING_COMMA_LEN and CONST_STRNEQ
+ macros defined in bfd.h.
+ * ldmain.c: Likewise.
+ * ldwrite.c: Likewise.
+ * lexsup.c: Likewise.
+ * pe-dll.c: Likewise.
+ * emultempl/aix.em: Likewise.
+ * emultempl/beos.em: Likewise.
+ * emultempl/elf32.em: Likewise.
+ * emultempl/pe.em: Likewise.
+ * emultempl/sunos.em: Likewise.
+ * emultempl/xtensaelf.em: Likewise.
+
+2006-09-15 Nick Clifton <nickc@redhat.com>
+
+ PR ld/3107
+ * ldlang.c (lang_size_sections_1): Do not abort when encountering
+ a non-empty section that is ignored. Instead produce a warning
+ message.
+
+2006-09-08 H.J. Lu <hongjiu.lu@intel.com>
+
+ * ld.texinfo: Document --dynamic-list-cpp-typeinfo.
+
+2006-09-07 H.J. Lu <hongjiu.lu@intel.com>
+
+ * Makefile.am (CXX): Set to g++.
+ (CXX_FOR_TARGET): Likewise.
+ * Makefile.in: Regenerated.
+
+ * NEWS: Mention --dynamic-list.
+
+ * ld.texinfo: Document --dynamic-list.
+
+ * ldgram.y: Support dynamic list.
+
+ * ldlang.c (lang_process): Call lang_finalize_version_expr_head
+ on link_info.dynamic if needed.
+ (lang_append_dynamic_list): New.
+ (lang_append_dynamic_list_cpp_typeinfo): New.
+ * ldlang.h (lang_append_dynamic_list): Likewise.
+ * ldlang.h (lang_append_dynamic_list_cpp_typeinfo): Likewise.
+
+ * ldlex.h (input_enum): Add input_dynamic_list.
+ * ldlex.l: Handle it.
+
+ * ldmain.c (main): Initialize link_info.dynamic.
+
+ * lexsup.c (option_values): Add OPTION_DYNAMIC_LIST and
+ OPTION_DYNAMIC_LIST_CPP_TYPEINFO.
+ (ld_options): Add entries for OPTION_DYNAMIC_LIST and
+ OPTION_DYNAMIC_LIST_CPP_TYPEINFO.
+ (parse_args): Handle OPTION_DYNAMIC_LIST and
+ OPTION_DYNAMIC_LIST_CPP_TYPEINFO.
+
+2006-09-07 Joel Sherrill <joel.sherrill@oarcorp.com>
+
+ * emulparams/h8300elf.sh: _tinydata should not be placed in
+ relocatables.
+ * emulparams/h8300.sh: Likewise.
+ * emulparams/h8300sxelf.sh: Likewise.
+
+2006-09-05 H.J. Lu <hongjiu.lu@intel.com>
+
+ PR ld/3015
+ * emultempl/elf32.em: Enable "-z relro" only if $COMMONPAGESIZE
+ is defined.
+
+2006-08-29 Nathan Sidwell <nathan@codesourcery.com>
+
+ * ldlang.c (walk_wild): Allow * to glob '/' in wildcarded match.
+
+2006-08-28 Alan Modra <amodra@bigpond.net.au>
+
+ * scripttempl/elf.sc: Ensure that crtbegin and crtend entries will
+ not match random object files in a path containing "crtbegin" or
+ "crtend" as part of a directory name.
+ * scripttempl/armbpabi.sc: Likewise.
+ * scripttempl/crisaout.sc: Likewise.
+ * scripttempl/elf32crx.sc: Likewise.
+ * scripttempl/elf32sh-symbian.sc: Likewise.
+ * scripttempl/elf_chaos.sc: Likewise.
+ * scripttempl/elfd10v.sc: Likewise.
+ * scripttempl/elfd30v.sc: Likewise.
+ * scripttempl/elfxtensa.sc: Likewise.
+ * scripttempl/iq2000.sc: Likewise.
+ * scripttempl/mmo.sc: Likewise.
+ * scripttempl/xstormy16.sc: Likewise.
+
+2006-08-24 Bob Wilson <bob.wilson@acm.org>
+
+ * emulparams/elf32xtensa.sh (.xt.prop): Add .xt.prop.*.
+ * scripttempl/elfxtensa.sc (.text): Add .literal.*.
+
+2006-08-24 Pedro Alves <pedro_alves@portugalmail.pt>
+
+ * ldlang.c (lang_size_sections_1, lang_assignment_statement_enum):
+ Adjust the current address of DEFAULT_MEMORY_REGION even
+ when dot hasn't changed.
+
+2006-08-23 Alan Modra <amodra@bigpond.net.au>
+
+ * ldexp.c (fold_name <LOADADDR>): Return an absolute value
+ rather than a section relative value.
+
+2006-08-22 Alan Modra <amodra@bigpond.net.au>
+
+ * NEWS: Mention LMA default change.
+ * ld.texinfo (Output Section LMA): Update default description.
+ (Location Counter): Clarify backward movement.
+ * ldlang.c (lang_size_sections_1): Leave non-alloc sections with
+ default lma equal to vma. Warn on backward movement of dot.
+
+2006-08-22 Pedro Alves <pedro_alves@portugalmail.pt>
+
+ * configure.tgt: Set targ_emul to arm_wince_pe for ARM
+ Windows CE targets.
+
+2006-08-22 Pedro Alves <pedro_alves@portugalmail.pt>
+
+ * Makefile.am: Split arm-wince into its own emulation.
+ * Makefile.in: Regenerate.
+ * pe-dll.c : Define PE_ARCH_arm_wince.
+ (pe_detail_list): Add PE_ARCH_arm_wince case.
+ (make_one): Handle PE_ARCH_arm_epoc and PE_ARCH_arm_wince cases.
+ * emulparams/arm_wince_pe.sh: New file.
+ * emultempl/pe.em: Handle new TARGET_IS_arm_wince_pe define.
+ Remap bfd_arm_allocate_interworking_sections,
+ bfd_arm_get_bfd_for_interworking and
+ bfd_arm_process_before_allocation for arm-pe and arm-wince-pe
+ targets too.
+ (gld_${EMULATION_NAME}_recognized_file): Handle arm-wince and
+ arm-epoc bfd format names.
+
+2006-08-18 Paul Brook <paul@codesourcery.com>
+
+ * emultempl/armelf.em (arm_elf_before_allocation): Call
+ gld${EMULATION_NAME}_before_allocation after setting interworking bfd.
+
+2006-08-17 Pedro Alves <pedro_alves@portugalmail.pt>
+
+ * pe-dll.c (autofilter_symbolprefixlist): Remove .idata$.
+ (generate_reloc): Revert to skipping sections without a SEC_LOAD flag,
+ and to not skipping .idata* sections.
+
+2006-08-16 Alan Modra <amodra@bigpond.net.au>
+
+ PR 3052
+ * ldlang.h (lang_output_section_statement_type): Replace
+ "processed" field with "processed_vma" and "processed_lma".
+ * ldlang.c (lang_do_assignments_1): Move lma setting code..
+ (lang_size_sections_1): ..to here.
+ (lang_reset_memory_regions): Adjust for
+ lang_output_section_statement_type change.
+ * ldexp.c (fold_name): Likewise.
+
+2006-08-08 Peter S. Mazinger <ps.m@gmx.net>
+
+ * emulparams/armelf.sh (MAXPAGESIZE): Changed to
+ "CONSTANT (MAXPAGESIZE)".
+
+2006-08-08 H.J. Lu <hongjiu.lu@intel.com>
+
+ PR ld/3006
+ * ldlang.c (lang_section_bst_type): Moved to ...
+ * ldlang.h: Here.
+
+ * ldlang.h (lang_wild_statement_struct): Add a tree field.
+
+ * ldlang.c (wild_sort_fast): Use the tree field for BST.
+ (wild): Likeise.
+ (analyze_walk_wild_section_handler): Initialize the tree field.
+
+2006-08-08 H.J. Lu <hongjiu.lu@intel.com>
+
+ PR ld/3009
+ * ldlang.c (update_wild_statements): Update the whole wild
+ section list.
+
+2006-08-04 Nick Clifton <nickc@redhat.com>
+ Mike Frysinger <michael.frysinger@analog.com>
+
+ * scripttempl/elf.sc (USER_LABEL_PREFIX): Define.
+ (__preinit_array_start, __preinit_array_end, __init_array_start,
+ __init_array_end, __fini_array_start, __fini_array_end, edata, end):
+ Use ${USER_LABEL_PREFIX}.
+ * emulparams/bfin.sh (DATA_END_SYMBOLS,END_SYMBOLS): Unset.
+ (USER_LABEL_PREFIX): Set.
+
+2006-08-04 Marcelo Tosatti <marcelo@kvack.org>
+
+ * ldmain.c (main): Initialise print_gc_sections field of link_info
+ structure.
+ * lexsup.c: Add --print-gc-sections and --no-print-gc-sections
+ switches.
+ * ld.texinfo: Document new switches.
+ * NEWS: Mention new switches.
+
+2006-08-04 Richard Sandiford <richard@codesourcery.com>
+ Kazu Hirata <kazu@codesourcery.com>
+ Phil Edwards <phil@codesourcery.com>
+
+ * Makefile.am (ALL_EMULATIONS): Add eshelf_vxworks.o and
+ eshlelf_vxworks.o.
+ (eshelf_vxworks.c, eshlelf_vxworks.c): New rules.
+ * Makefile.in: Regenerate.
+ * configure.tgt (sh-*-vxworks): Use shelf_vxworks and
+ shlelf_vxworks.
+ * emulparams/shelf_vxworks.sh: New file.
+ * emulparams/shlelf_vxworks.sh: Likewise.
+ * emulparams/vxworks.sh (FINI): Prefix _etext with ${SYMPREFIX}.
+ (OTHER_END_SYMBOLS): Likewise _ehdr.
+ (DATA_END_SYMBOLS): Likewise _edata.
+ * emultempl/vxworks.em (vxworks_after_open): Check whether output_bfd
+ is indeed an ELF file before dealing with --force-dynamic.
+
+2006-08-02 Petr Salinger <Petr.Salinger@seznam.cz>
+
+ PR binutils/2983
+ * emulparams/elf_x86_64_fbsd.sh (OUTPUT_FORMAT): Define as
+ elf64-x86-64-freebsd.
+
+2006-08-01 H.J. Lu <hongjiu.lu@intel.com>
+
+ * ldlang.c (init_os): Add flags. Replace bfd_make_section with
+ bfd_make_section_with_flags.
+ (exp_init_os): Updated.
+ (lang_add_section): Call init_os with flags.
+ (map_input_to_output_sections): Likewise.
+
+2006-07-29 Richard Sandiford <richard@codesourcery.com>
+
+ * Makefile.am (eelf32b4300.c): Update dependencies.
+ (eelf32bmip.c): Likewise.
+ (eelf32bsmip.c): Likewise.
+ (eelf32btsmip.c): Likewise.
+ (eelf32btsmipn32.c): Likewise.
+ (eelf32ltsmip.c): Likewise.
+ (eelf32ltsmipn32.c): Likewise.
+ (eelf32ebmip.c): Likewise.
+ (eelf32ebmipvxworks.c): Likewise.
+ (eelf32elmip.c): Likewise.
+ (eelf32elmipvxworks.c): Likewise.
+ (eelf32bmipn32.c): Likewise.
+ (eelf32lmip.c): Likewise.
+ (eelf32mipswindiss.c): Likewise.
+ (eelf32lsmip.c): Likewise.
+ (eelf64bmip.c): Likewise.
+ (eelf64btsmip.c): Likewise.
+ (eelf64ltsmip.c): Likewise.
+ (emipsbig.c): Likewise. Canonicalize ${GENSCRIPTS} line.
+ (emipsbsd.c): Likewise.
+ (emipsidt.c): Update dependencies.
+ (emipsidtl.c): Likewise.
+ (emipslit.c): Likewise.
+ (emipslnews.c): Likewise.
+ (emipspe.c): Likewise. Fix ${GENSCRIPTS} invocation.
+ * Makefile.in: Regenerate.
+ * emulparams/elf32bmip.sh (EXTRA_EM_FILE): Define.
+ * emulparams/elf32bmipn32-defs.sh (EXTRA_EM_FILE): Likewise.
+ * emultempl/irix.em: Include emultempl/mipself.em.
+ * emultempl/mipself.em: New file.
+
+2006-07-26 Alan Modra <amodra@bigpond.net.au>
+
+ * emultempl/elf-generic.em (map_segments): Reorganise loop so that
+ layout happens before segment map. Don't do segment map on
+ relocatable link.
+
+2006-07-26 Alan Modra <amodra@bigpond.net.au>
+
+ * ldexp.c (fold_name <LOADADDR>): Use the lma.
+ * ldlang.h (lang_memory_region_type): Delete old_length. Add
+ last_os.
+ * ldlang.c (lang_memory_region_lookup): Init new field.
+ (lang_reset_memory_regions): Reset new field.
+ (lang_insert_orphan): Don't set load_base.
+ (lang_leave_overlay): Likewise.
+ (lang_size_sections_1): Delete unnecessary code setting lma_region
+ to region. Correct lma region check.
+ (lang_do_assignments_1): Rename output_section_statement parm
+ to current_os. Set lma from previous section in region.
+
+ * ldlang.c: Formatting.
+
+2006-07-25 Bob Wilson <bob.wilson@acm.org>
+
+ * emultempl/xtensaelf.em (xtensa_strip_inconsistent_linkonce_sections):
+ Set discarded section's output_section to bfd_abs_section_ptr.
+
+2006-07-26 Alan Modra <amodra@bigpond.net.au>
+
+ * ldlang.c (analyze_walk_wild_section_handler): Init handler_data
+ earlier.
+
+2006-07-24 Bob Wilson <bob.wilson@acm.org>
+
+ * emultempl/xtensaelf.em (is_inconsistent_linkonce_section): Add space
+ in dep_sec_name for null terminator. Make sure dep_sec_name has a
+ ".t" linkonce tag.
+
+2006-07-14 Michael Wetherell <mike.wetherell@ntlworld.com>
+
+ * emulparams/elf_x86_64.sh (LIBPATH_SUFFIX, ELF_INTERPRETER_NAME):
+ Set for *-*-solaris2*.
+
+2006-07-24 Ralk Wildenhues <Ralf.Wildenhues@gmx.de>
+
+ * ld.texinfo: Fix spelling mistakes.
+ * ldint.texinfo: Likewise.
+
+2006-07-23 Sonal Santan <sonal.santan@xilinx.com>
+
+ * ldlang.c (lang_section_bst): New structure for sorting sections
+ by name.
+ (wild_sort_fast): New function: Insert a section into a binary
+ search tree.
+ (output_section_callback_fast): New function: Store a section in
+ BST.
+ (output_section_callback_tree_to_list): New function: Convert a
+ BST into a list.
+ (analyze_walk_wild_section_handler): Initialize handler_data
+ elements.
+ (wild): If the data is sorted by name use the BST method to sort
+ the names.
+
+2006-07-19 Alan Modra <amodra@bigpond.net.au>
+
+ * ld.h (handle_asneeded_cref): Declare.
+ * ldcref.c: Include objalloc.h.
+ (old_table, old_count, old_tab, alloc_mark): New variables.
+ (tabsize, entsize, refsize, old_symcount): Likewise.
+ (add_cref): Use bfd_hash_allocate for refs.
+ (handle_asneeded_cref): New function.
+ * ldmain.c (notice): Call handle_asneeded_cref for NULL name.
+
+2006-07-14 Michael Wetherell <mike.wetherell@ntlworld.com>
+
+ * configure.tgt (i[3-7]86-*-solaris2*, i[3-7]86-*-solaris*): Correct
+ typo setting targ_extra_libpath.
+
+2006-07-10 Jakub Jelinek <jakub@redhat.com>
+
+ * scripttempl/elf.sc: Add .gnu.hash section.
+ * emultempl/elf32.em (OPTION_HASH_STYLE): Define.
+ (gld${EMULATION_NAME}_add_options): Register --hash-style option.
+ (gld${EMULATION_NAME}_handle_option): Handle it.
+ (gld${EMULATION_NAME}_list_options): Document it.
+ * ldmain.c (main): Initialize emit_hash and emit_gnu_hash.
+ * ld.texinfo: Document --hash-style option.
+
+2006-07-10 Nick Clifton <nickc@redhat.com>
+
+ * po/zh_TW.po: New Chinese (traditional) translation.
+ * configure.in (ALL_LINGUAS): Add zh_TW.
+ * configure: Regenerate.
+
+2006-07-07 Nick Clifton <nickc@redhat.com>
+
+ PR ld/2874
+ * ld.texinfo: Remove "Using LD" from the title since it is
+ redundant.
+
+2006-07-06 Mohammed Adnène Trojette <adn@diwi.org>
+
+ PR ld/2877
+ * ld.texinfo: Fix spelling mistakes.
+
+2006-06-27 Pedro Alves <pedro_alves@portugalmail.pt>
+ Nick Clifton <nickc@redhat.com>
+
+ * emultempl/pe.em (gld_$_open_dynamic_archive): Compute maximum
+ length of format strings in the libname_fmt[] array, rather than
+ relying upon a statically chosen value. Adjust xmalloc call to
+ use this longest length.
+
+2006-06-27 Nick Clifton <nickc@redhat.com>
+
+ * ld.texinfo (-rpath-link): Clarify distinction between -rpath and
+ -rpath-link.
+
+2006-06-23 Daniel Jacobowitz <dan@codesourcery.com>
+
+ * configure.tgt (i[3-7]86-*-solaris2*, i[3-7]86-*-solaris*): Set
+ targ_extra_libpath.
+
+2006-06-23 Pedro Alves <pedro_alves@portugalmail.pt>
+
+ * pe-dll.c (pe_details_type): Add new pointer for symbols list
+ autofilter.
+ (autofilter_symbollist): Split into autofilter_symbollist_generic
+ and autofilter_symbollist_i386.
+ (pe_detail_list): Add autofilter_symbollist_i386 to i386 case and
+ autofilter_symbollist_generic for all the others.
+ (autofilter_symbolprefixlist): Moved _fmode, _impure_ptr, cygwin_attach_dll,
+ cygwin_premain0, cygwin_premain1, cygwin_premain2, cygwin_premain3, environ,
+ into autofilter_symbollist_i386.
+ (auto_export): Get autofilter_symbollist from pe_details.
+
+2006-06-22 Nick Clifton <nickc@redhat.com>
+
+ PR ld/2757
+ * emultempl/pe.em (gld_$_after_open): When reporting non PE format
+ output files mention the file name and the fact that it is an
+ output file.
+
+2006-06-22 Danny Smith <dannysmith@users.sourceforge.net>
+
+ * emultempl/pe.em (gld_${EMULATION_NAME}_open_dynamic_archive):
+ Restructure. Add native "%s.lib" format to search list
+ * ld.texinfo (node WIN32): Update documentation on dynamic lib
+ search order. Add another reason for using import libs.
+
+2006-06-21 Mark Shinwell <shinwell@codesourcery.com>
+
+ * ldlang.c (lang_insert_orphan): Correctly handle the case where
+ the section is to end up after the section currently at the end
+ of the list in output_bfd.
+
+2006-06-21 Hans-Peter Nilsson <hp@bitrange.com>
+
+ * emultempl/mmo.em: Improve comments. Explain why there's
+ ELF-stuff here.
+
+2006-06-21 Alan Modra <amodra@bigpond.net.au>
+
+ * emultempl/elf-generic.em (gld${EMULATION_NAME}_map_segments): Limit
+ loop to ten iterations. Throw away any previous linker generated
+ segment map.
+ * ldlang.c (lang_phdr_list): Make global.
+ * ldlang.h (lang_phdr_list): Declare.
+ * Makefile.am (ELF_GEN_DEPS): Define. Use in emul deps.
+ * Makefile.in: Regenerate.
+
+2006-06-20 Alan Modra <amodra@bigpond.net.au>
+
+ * Makefile.am (ELF_DEPS): Define. Use in emul file deps. Fix
+ many ELF emul file deps that incorrectly said they needed elf32.em
+ instead of generic.em. Add genelf.em as required.
+ * Makefile.in: Regenerate.
+ * ldlang.c (lang_process): Call ldemul_finish before
+ lang_check_section_addresses.
+ * emulparams/arcelf.sh: Generic elf target needs genelf.
+ * emulparams/d30v_e.sh: Likewise.
+ * emulparams/d30v_o.sh: Likewise.
+ * emulparams/d30velf.sh: Likewise.
+ * emulparams/elf32_dlx.sh: Likewise.
+ * emulparams/elf32_i860.sh: Likewise.
+ * emulparams/elf32fr30.sh: Likewise.
+ * emulparams/elf32frv.sh: Likewise.
+ * emulparams/elf32iq10.sh: Likewise.
+ * emulparams/elf32iq2000.sh: Likewise.
+ * emulparams/elf32mt.sh: Likewise.
+ * emulparams/mn10200.sh: Likewise.
+ * emulparams/or32.sh: Likewise.
+ * emulparams/or32elf.sh: Likewise.
+ * emulparams/pjelf.sh: Likewise.
+ * emulparams/msp430all.sh: Likewise. Extract common entries.
+ * emulparams/pjlelf.sh: Include pjelf.sh.
+ * emulparams/elf32frvfd.sh (EXTRA_EM_FILE): Unset.
+ * emulparams/mn10300.sh (EXTRA_EM_FILE): Unset.
+ * emultempl/elf-generic.em: New file.
+ * emultempl/genelf.em: New file.
+ * emultempl/elf32.em: Include elf-generic.em.
+ (gld${EMULATION_NAME}_layout_sections_again): Delete.
+ (gld${EMULATION_NAME}_finish): Call gld${EMULATION_NAME}_map_segments.
+ * emultempl/hppaelf.em (hppaelf_layout_sections_again): Likewise.
+ (gld${EMULATION_NAME}_finish): Rename from hppaelf_finish. Call
+ gld${EMULATION_NAME}_map_segments.
+ (LDEMUL_FINISH): Update.
+ * emultempl/mmo.em: Correct comment. Include elf-bfd.h and
+ source elf-generic.em.
+ (mmo_finish): Call gld${EMULATION_NAME}_map_segments.
+ * emultempl/ppc64elf.em (ppc_layout_sections_again): Likewise.
+ (gld${EMULATION_NAME}_finish): Rename from ppc_finish. Call
+ gld${EMULATION_NAME}_map_segments.
+ (LDEMUL_FINISH): Update.
+
+2006-06-19 Alan Modra <amodra@bigpond.net.au>
+
+ * ldexp.c (fold_name): Adjust bfd_sizeof_headers call.
+
+2006-06-14 Kevin F. Quinn <kevquinn@gentoo.org>
+
+ * ld.texinfo: Document new -z lazy option.
+ * emultempl/elf32.em (gld${EMULATION_NAME}_handle_option): Handle
+ new option.
+ (gld${EMULATION_NAME}_list_options): Update help text.
+
+2006-06-12 Fred Fish <fnf@specifix.com>
+
+ * emulparams/elf32bmip.sh (OTHER_SECTIONS): Keep the
+ ".mdebug.<abi>" and ".gcc_compiled_long<size>" sections
+ generated by mips gcc.
+
+2006-06-12 Thiemo Seufer <ths@mips.com>
+
+ * emulparams/elf64bmip.sh, emulparams/elf64btsmip.sh (COMMONPAGESIZE):
+ Define.
+
+2006-06-09 Alan Modra <amodra@bigpond.net.au>
+
+ * ldlang.h (lang_input_statement_type): Use bitfields for booleans.
+ * ldlang.c (struct out_section_hash_entry): Rename from
+ output_statement_hash_entry. Delete output_section_statement_type
+ entry. Add statement_union_type entry. Adjust all users.
+ (output_section_statement_table): Rename from output_statement_table.
+ Adjust all users.
+ (output_section_statement_newfunc): Rename from
+ output_statement_newfunc. Adjust all users.
+ (output_section_statement_table_init): Rename from
+ output_statement_table_init. Adjust all users.
+ (output_section_statement_table_free): Rename from
+ output_statement_table_free. Adjust all users.
+
+2006-06-07 Joseph S. Myers <joseph@codesourcery.com>
+
+ * po/Make-in (pdf, ps): New dummy targets.
+
+2006-06-07 Alan Modra <amodra@bigpond.net.au>
+
+ * ldlang.h (enum section_type): Delete dsect_section, copy_section,
+ info_section and overlay_section. Add noalloc_section.
+ * ldlang.c (lang_add_section): Adjust.
+ * ldgram.y (type): Adjust.
+
+2006-06-06 Alan Modra <amodra@bigpond.net.au>
+
+ * ldlang.c (init_os): Whitespace.
+ (map_input_to_output_sections): Don't init_os for lang_input_section.
+ (print_all_symbols): Remove forward declaration. Convert to ISO C.
+
+2006-06-05 Daniel Jacobowitz <dan@codesourcery.com>
+
+ * po/Make-in (top_builddir): Define.
+
+2006-06-05 Alan Modra <amodra@bigpond.net.au>
+
+ * ldexp.c (exp_get_abs_int): Make error message the same as
+ others emitted in this file.
+
+2006-06-05 Alan Modra <amodra@bigpond.net.au>
+
+ * config.in: Regenerate.
+
+2006-06-05 Alan Modra <amodra@bigpond.net.au>
+
+ * ldlang.c (lookup_name): Delete dead code. Remove FIXMEs.
+
+2006-06-03 Alan Modra <amodra@bigpond.net.au>
+
+ * emultempl/elf32.em (global_found): Make it a pointer.
+ (stat_needed, try_needed): Adjust.
+ (check_needed): Don't skip non-loaded as-needed entries. Only
+ consider entries with both filename and the_bfd non-null.
+ (after_open): Try loading non-loaded as-needed libs to satisfy
+ DT_NEEDED libs.
+
+2006-06-02 Joseph S. Myers <joseph@codesourcery.com>
+
+ * Makefile.am (TEXI2DVI): Add -I $(top_srcdir)/../libiberty.
+ * Makefile.in: Regenerate.
+
+2006-05-31 Daniel Jacobowitz <dan@codesourcery.com>
+
+ * Makefile.am: Replace INTLLIBS and INTLDEPS with LIBINTL
+ and LIBINTL_DEP everywhere.
+ (INTLLIBS): Remove.
+ (INCLUDES): Use @INCINTL@.
+ * configure.in: Use ZW_GNU_GETTEXT_SISTER_DIR and AM_PO_SUBDIRS.
+ Remove local code for po/Makefile.
+ * Makefile.in, configure: Regenerated.
+
+2006-05-30 H.J. Lu <hongjiu.lu@intel.com>
+
+ * emulparams/arcelf.sh (MAXPAGESIZE): Changed to
+ "CONSTANT (MAXPAGESIZE)".
+ * emulparams/armelf_nbsd.sh: Likewise.
+ * emulparams/armelf_vxworks.sh: Likewise.
+ * emulparams/armnto.sh: Likewise.
+ * emulparams/armsymbian.sh: Likewise.
+ * emulparams/crislinux.sh: Likewise.
+ * emulparams/elf32_i860.sh: Likewise.
+ * emulparams/elf32_i960.sh: Likewise.
+ * emulparams/elf32am33lin.sh: Likewise.
+ * emulparams/elf32bfinfd.sh: Likewise.
+ * emulparams/elf32bmipn32-defs.sh: Likewise.
+ * emulparams/elf32frvfd.sh: Likewise.
+ * emulparams/elf32i370.sh: Likewise.
+ * emulparams/elf32lppcnto.sh: Likewise.
+ * emulparams/elf32mcore.sh: Likewise.
+ * emulparams/elf32openrisc.sh: Likewise.
+ * emulparams/elf32ppcnto.sh: Likewise.
+ * emulparams/elf32ppcwindiss.sh: Likewise.
+ * emulparams/elf32vax.sh: Likewise.
+ * emulparams/elf32xc16x.sh: Likewise.
+ * emulparams/elf32xc16xl.sh: Likewise.
+ * emulparams/elf32xc16xs.sh: Likewise.
+ * emulparams/elf64_aix.sh: Likewise.
+ * emulparams/elf64hppa.sh: Likewise.
+ * emulparams/elf64mmix.sh: Likewise.
+ * emulparams/elf_i386_be.sh: Likewise.
+ * emulparams/elf_i386_chaos.sh: Likewise.
+ * emulparams/elf_i386_ldso.sh: Likewise.
+ * emulparams/hppa64linux.sh: Likewise.
+ * emulparams/hppalinux.sh: Likewise.
+ * emulparams/hppaobsd.sh: Likewise.
+ * emulparams/i386lynx.sh: Likewise.
+ * emulparams/i386moss.sh: Likewise.
+ * emulparams/i386nto.sh: Likewise.
+ * emulparams/i386nw.sh: Likewise.
+ * emulparams/m32relf_linux.sh: Likewise.
+ * emulparams/m68kpsos.sh: Likewise.
+ * emulparams/or32elf.sh: Likewise.
+ * emulparams/pjelf.sh: Likewise.
+ * emulparams/pjlelf.sh: Likewise.
+ * emulparams/ppclynx.sh: Likewise.
+ * emulparams/ppcnw.sh: Likewise.
+ * emulparams/shelf32_nbsd.sh : Likewise.
+ * emulparams/shelf_nbsd.sh: Likewise.
+ * emulparams/shelf_nto.sh: Likewise.
+ * emulparams/shlelf_nto.sh: Likewise.
+ * emulparams/xtensa-config.sh: Likewise.
+
+ * emulparams/armelf_linux.sh (MAXPAGESIZE): Changed to
+ "CONSTANT (MAXPAGESIZE)".
+ (COMMONPAGESIZE): Changed to "CONSTANT (COMMONPAGESIZE)".
+ * emulparams/elf32_sparc.sh: Likewise.
+ * emulparams/elf32bmip.sh: Likewise.
+ * emulparams/elf32ppccommon.sh: Likewise.
+ * emulparams/elf64_ia64.sh: Likewise.
+ * emulparams/elf64_s390.sh: Likewise.
+ * emulparams/elf64_sparc.sh: Likewise.
+ * emulparams/elf64alpha.sh: Likewise.
+ * emulparams/elf64ppc.sh: Likewise.
+ * emulparams/elf_i386.sh: Likewise.
+ * emulparams/elf_i386_vxworks.sh: Likewise.
+ * emulparams/elf_s390.sh: Likewise.
+ * emulparams/elf_x86_64.sh: Likewise.
+ * emulparams/shlelf32_linux.sh: Likewise.
+ * emulparams/shlelf_linux.sh: Likewise.
+
+ * emulparams/elf32bmipn32.sh (COMMONPAGESIZE): Changed to
+ "CONSTANT (COMMONPAGESIZE)".
+ * emulparams/elf32btsmipn32.sh: Likewise.
+
+ * emultempl/elf32.em (gld${EMULATION_NAME}_handle_option): Add
+ "-z max-page-size=" and "-z common-page-size=".
+ (gld${EMULATION_NAME}_list_options): Likewise.
+
+ * ld.h (ld_config_type): Add maxpagesize and commonpagesize.
+
+ * ld.texinfo: Document "-z max-page-size=" and
+ "-z common-page-size=".
+
+ * ldexp.c (exp_print_token): Handle CONSTANT.
+ (fold_name): Likewise.
+ * ldgram.y: Likewise.
+ * ldlex.l: Likewise.
+
+ * ldmain.c (main): Initiliaze config.maxpagesize and
+ config.commonpagesize. Call bfd_emul_set_maxpagesize if
+ config.maxpagesize isn't 0. Call bfd_emul_set_commonpagesize if
+ config.commonpagesize config.maxpagesize isn't 0.
+
+2006-05-30 Nick Clifton <nickc@redhat.com>
+
+ * po/es.po: Updated Spanish translation.
+
+2006-05-25 H.J. Lu <hongjiu.lu@intel.com>
+
+ * emulparams/elf_x86_64.sh (MAXPAGESIZE): Updated to 0x200000.
+
+2006-05-24 H.J. Lu <hongjiu.lu@intel.com>
+
+ PR ld/1485
+ * configure.in: Use ${srcdir}/../bfd/config.bfd to check 64bit
+ bfd. Support 64bit host for --enable-targets=all.
+ * configure: Regenerated.
+
+2006-05-24 Nick Clifton <nickc@redhat.com>
+
+ * po/vi.po: Updated Vietnamese translation.
+
+2006-05-24 Bjoern Haase <bjoern.m.haase@web.de>
+
+ * configure.tgt: Add avr6 to emulation list.
+ * Makefile.am: Add eavr6.o and corresponding rule.
+ * Makefile.in: Regenerate.
+ * emulparams/avr6.sh: New file.
+ * emulparams/avrX.sh (TEMPLATE_NAME): Use elf32 instead of generic
+ for target option support.
+ (EXTRA_EM_FILE): Add reference to new em template file avrelf.
+ * scripttempl/avr.sc: Add ".trampolines" section.
+ * emultempl/avrelf.em: Add new file for target specific options.
+
+2006-05-22 Nick Clifton <nickc@redhat.com>
+
+ * scripttempl/elf32crx.sc (.rdata): Add .rodata.*.
+
+2006-05-19 Alan Modra <amodra@bigpond.net.au>
+
+ * ldlang.c (lang_size_sections_1): Don't check mem regions for
+ os->ignored sections.
+
+2005-05-17 Daniel Jacobowitz <dan@codesourcery.com>
+
+ * ldlang.c (lang_size_sections): Call lang_reset_memory_regions
+ before redoing one_lang_size_sections_pass.
+
+2006-05-11 Carlos O'Donell <carlos@codesourcery.com>
+
+ * ld.texinfo: Rename "Index" to "LD Index"
+
+2006-05-11 Pedro Alves <pedro_alves@portugalmail.pt>
+
+ * pe-dll.c (autofilter_symbollist): Add Dllmain,
+ DllMainCRTStartup, _DllMainCRTStartup and .text.
+ (autofilter_liblist): Add libcegcc.
+ (autofilter_symbolprefixlist): Add __imp_ and .idata$.
+ (generate_reloc): Do not skip sections without a SEC_LOAD flag,
+ they can still contain relocs that need processing.
+ Skip the .idata$6 section.
+ (jmp_arm_bytes): New array: Contains byte codes for an ARM jump.
+ (make_one): Use the new array.
+ (make_import_fixup_entry): Use .idata$2 instead of .idata$3.
+ * emultempl/pe.em (MajorSubsystemVersion): Set to 3 for armpe.
+
+2006-05-05 Alan Modra <amodra@bigpond.net.au>
+
+ * ld.texinfo: Document PowerPC and PowerPC64 options.
+ * gen-doc.texi: Enable.
+
+2006-05-02 Daniel Jacobowitz <dan@codesourcery.com>
+
+ * Makefile.am (AM_MAKEINFOFLAGS): Add libiberty.
+ (TEXI2POD): Use AM_MAKEINFOFLAGS.
+ (configdoc.texi): Don't set top_srcdir.
+ * ld.texinfo: Don't use top_srcdir.
+ * aclocal.m4, Makefile.in: Regenerated.
+
+2006-04-19 Alan Modra <amodra@bigpond.net.au>
+
+ * ldlang.c (wild): Tidy default_common_section loop.
+ (print_input_section): Format.
+
+ * configure: Regenerate.
+
+2006-04-16 Daniel Jacobowitz <dan@codesourcery.com>
+
+ * po/POTFILES.in: Regenerated.
+
+2006-04-16 Daniel Jacobowitz <dan@codesourcery.com>
+
+ * config.in: Regenerated.
+
+2006-04-14 David Heine <dlheine@tensilica.com>
+ Bob Wilson <bob.wilson@acm.org>
+
+ * emultempl/xtensaelf.em (elf_xtensa_before_allocation): Call new
+ function to strip inconsistent linkonce sections.
+ (input_section_linked_worker, input_section_linked): New.
+ (is_inconsistent_linkonce_section): New.
+ (xtensa_strip_inconsistent_linkonce_sections): New.
+
+2006-04-11 Diego Pettenò <flameeyes@gentoo.org>
+
+ * emultempl/elf32.em: Add support for elf-hints.h on FreeBSD
+ and Dragonfly targets.
+ * configure.in (AC_CHECK_HEADERS): Add elf-hints.h.
+ * Makefile.am (HFILES): Add elf-hints-local.h.
+ * elf-hints-local.h: New file.
+ * Makefile.in: Regenerate.
+ * configure: Regenerate.
+
+2006-04-07 Bernhard Fischer <aldot@gcc.gnu.org>
+
+ * ld.texinfo: Fix typo in documentation of --check-sections.
+
+2006-04-07 Kaz Kojima <kkojima@rr.iij4u.or.jp>
+
+ * ldlang.c (load_symbols): Set as_needed and add_needed according
+ to the corresponding script's fields while processing it.
+
+2006-04-06 Carlos O'Donell <carlos@codesourcery.com>
+
+ * Makefile.am: Add install-html, install-html-am, and
+ install-html-recursive targets.
+ * Makefile.in: Regenerate.
+ * configure.in: AC_SUBST datarootdir, docdir, htmldir.
+ * configure: Regenerate.
+ * po/Make-in: Add install-html target.
+
+2006-04-06 H.J. Lu <hongjiu.lu@intel.com>
+
+ * emultempl/ia64elf.em: Set link_info.relax_pass to 2. Remove
+ link_info.need_relax_finalize.
+
+ * ldlang.c (relax_sections): New.
+ (lang_process): Use. Call relax_sections link_info.relax_pass
+ times.
+
+ * ldmain.c (main): Set link_info.relax_pass to 1. Remove
+ link_info.need_relax_finalize.
+
+2006-04-05 Alan Modra <amodra@bigpond.net.au>
+
+ * Makefile.am (GENSCRIPTS): Pass prefix.
+ * Makefile.in: Regenerate.
+ * genscripts.sh: Adjust for extra parameter.
+ * emultempl/elf32.em (parse_ld_so_conf): Return true iff file
+ exists.
+ (check_ld_so_conf): Use ${prefix}/etc/ld.so.conf if it exists.
+ * NEWS: Update.
+
+2006-04-05 Richard Sandiford <richard@codesourcery.com>
+ Daniel Jacobowitz <dan@codesourcery.com>
+
+ * configure.tgt (sparc*-*-vxworks*): New stanza.
+ * emulparams/elf32_sparc_vxworks.sh: New file.
+ * Makefile.am (ALL_EMULATIONS): Add eelf32_sparc_vxworks.o.
+ (eelf32_sparc_vxworks.c): New rule.
+ * Makefile.in: Regenerate.
+
+2006-04-04 Eric Botcazou <ebotcazou@adacore.com>
+
+ * ldlang.c (lang_map): Print the list of discarded input sections.
+ (print_input_section): Change parameter and print zero-sized sections.
+ (print_statement): Adjust call to print_input_section.
+
+2006-04-01 Danny Smith <dannysmith@users.sourceforge.net>
+
+ * deffilep.y (def_image_name): If LIBRARY or NAME statement
+ specifies an empty string, retain the name specified on command
+ line.
+ * ld.texinfo: Document above.
+
+2006-03-31 Jakub Jelinek <jakub@redhat.com>
+
+ * ldmisc.c (vfinfo): Revert 2005-10-05 changes. If
+ bfd_find_nearest_line succeeded for %C or %D, but filename
+ is NULL, print section+offset at the end.
+
+2006-03-25 Bernd Schmidt <bernd.schmidt@analog.com>
+
+ * emulparams/elf32bfinfd.sh: New file.
+ * emultempl/bfin.em: Delete.
+ * emulparams/bfin.sh: Lose reference to bfin.em.
+ * Makefile.am (eelf32bfin.c): Likewise.
+ (eelf32bfinfd.c): New.
+ * Makefile.in: Regenerate.
+ * configure.tgt (bfin-*-elf, bfin-*-uclinux): Add elf32bfinfd to
+ targ_extra_emuls.
+
+2006-03-22 Richard Sandiford <richard@codesourcery.com>
+ Daniel Jacobowitz <dan@codesourcery.com>
+ Phil Edwards <phil@codesourcery.com>
+ Zack Weinberg <zack@codesourcery.com>
+ Mark Mitchell <mark@codesourcery.com>
+ Nathan Sidwell <nathan@codesourcery.com>
+
+ * configure.tgt (mips*el-*-vxworks*, mips*-*-vxworks*): Use
+ separate VxWorks emulations.
+ * emulparams/elf32ebmipvxworks.sh: New file.
+ * emulparams/elf32elmipvxworks.sh: New file.
+ * Makefile.am (ALL_EMULATIONS): Add eelf32ebmipvxworks.o and
+ eelf32elmipvxworks.o.
+ (eelf32ebmipvxworks.c, eelf32elmipvxworks.c): New rules.
+ * Makefile.in: Regenerate.
+
+2006-03-16 Alan Modra <amodra@bigpond.net.au>
+
+ PR 2434
+ * ldcref.c (add_cref): Adjust bfd_hash_table_init calls.
+ * ldlang.c (output_statement_table_init, lang_init): Likewise.
+ * ldmain.c (add_ysym, add_wrap, add_keepsyms_file): Likewise.
+ (undefined_symbol): Likewise.
+
+2006-03-07 Richard Sandiford <richard@codesourcery.com>
+ Daniel Jacobowitz <dan@codesourcery.com>
+ Zack Weinberg <zack@codesourcery.com>
+ Nathan Sidwell <nathan@codesourcery.com>
+ Paul Brook <paul@codesourcery.com>
+ Ricardo Anguiano <anguiano@codesourcery.com>
+ Phil Edwards <phil@codesourcery.com>
+
+ * emulparams/armelf_vxworks.sh: Include vxworks.sh.
+ (MAXPAGESIZE): Define.
+ * emulparams/vxworks.sh: Undefine EMBEDDED.
+ * Makefile.am (earmelf_vxworks.c): Depend on vxworks.sh and vxworks.em.
+ * Makefile.in: Regenerate.
+
+2006-03-03 Bjoern Haase <bjoern.m.haase@web.de>
+
+ * scripttempl/avr.sc: Add *(.jumptables) *(.lowtext) sections.
+ Add KEEP() directives.
+ Add *(.data*) *(.rodata) and *(.rodata*) and *(.bss*) to .data and
+ .bss output sections.
+
+2006-03-03 Richard Sandiford <richard@codesourcery.com>
+
+ * emulparams/vxworks.sh (VXWORKS_BASE_EM_FILE): New variable.
+ (EXTRA_EM_FILE): Define.
+ * emultempl/vxworks.em: New file.
+ * ld.texinfo (--force-dynamic): Document.
+ * Makefile.am (eelf32ppcvxworks.cm, eelf_i386_vxworks.c): Depend
+ on vxworks.em.
+ * Makefile.in: Regenerate.
+
+2006-03-02 Richard Sandiford <richard@codesourcery.com>
+
+ * emulparams/elf32ppccommon.sh: New file, extracted from...
+ * emulparams/elf32ppc.sh: ...here.
+ * emulparams/elf32ppcvxworks.sh: Include elf32ppccommon.sh
+ instead of elf32ppc.sh.
+ (BSS_PLT): Remove override.
+ * Makefile.am (eelf32lppc.c): Depend on elf32ppccommons.h.
+ (eelf32lppcnto.c, eelf32lppcsim.c, eelf32ppcnto.c): Likewise.
+ (eelf32ppc.c, eelf32ppc_fbsd.c, eelf32ppcsimm): Likewise.
+ (eelf32ppclinux.c): Likewise.
+ (eelf32ppcvxworks.c): Likewise. Add missing vxworks.sh dependency.
+ * Makefile.in: Regenerate.
+
+2006-02-27 Carlos O'Donell <carlos@codesourcery.com>
+
+ * Makefile.am: Add html target.
+ * Makefile.in: Regenerate.
+ * po/Make-in: Add html target.
+
+2006-02-17 Shrirang Khisti <shrirangk@kpitcummins.com>
+ Anil Paranjape <anilp1@kpitcummins.com>
+ Shilin Shakti <shilins@kpitcummins.com>
+
+ * scripttemp/elf32xc16x.sc: Default linker script for tiny model.
+ * scripttemp/elf32xc16xl.sc: Default linker script for large model.
+ * scripttemp/elf32xc16xs.sc: Default linker script for small model.
+ * emulparams/elf32xc16x.sh: Emulation script for tiny model.
+ * emulparams/elf32xc16xl.sh: Emulation script for large model.
+ * emulparams/elf32xc16xs.sh: Emulation script for small model.
+ * Makefile.am: Add entry to make xc16x target.
+ * Makefile.in: Regenerate.
+ * configure.tgt: Specify default and other emulation parameters
+ for xc16x.
+ * NEWS: Announce the support for the new target.
+
+2006-02-16 Nick Hudson <nick.hudson@dsl.pipex.com>
+
+ * configure.tgt (mips*el-*-netbsd*, mips*-*-netbsd*):
+ Use the traditional target.
+
+2006-02-13 Joseph S. Myers <joseph@codesourcery.com>
+
+ * configure.tgt (arm*b-*-linux-gnueabi): Change to
+ arm*b-*-linux-*eabi.
+ (arm*-*-linux-gnueabi): Change to arm*-*-linux-*eabi.
+
+2006-02-08 H.J. Lu <hongjiu.lu@intel.com>
+
+ PR ld/2290
+ * NEWS: Updated for the Linux linker search order change.
+
+ * emultempl/elf32.em (gld${EMULATION_NAME}_after_open): Call
+ gld${EMULATION_NAME}_check_ld_so_conf before checking default
+ search directories for DT_NEEDED entries.
+
+2006-02-07 Paul Brook <paul@codesourcery.com>
+
+ * emultempl/armelf.em: Include elf/arm.h.
+ (arm_elf_finish): Set low address bit if enty point is a Thumb
+ function.
+
+2006-02-01 Danny Smith <dannysmith@users.sourceforge.net>
+
+ * deffilep.y (def_image_name): If the image name does not have
+ a suffix, append the default.
+ * ld.texinfo: Document NAME, LIBRARY usage in PE-COFF .def files.
+
+2006-01-31 Danny Smith dannysmith@users.sourceforge.net
+
+ * NEWS: Mention support for forward exports in PE-COFF dll's.
+ * ld.texinfo: Expand documentation of EXPORT statements in
+ PE-COFF .def files.
+
+2006-01-31 Filip Navara <navaraf@reactos.com>
+
+ * deffile.h (struct def_file_export): Add field flag_forward.
+ * pe-dll.c (process_def_file): Check for forward exports.
+ (generate_edata): Generate forward export symbols.
+ (fill_edata): Emit them.
+
+ * pe-dll.c (process_def_file): Don't crash on malformed
+ fastcall symbol names in .def file.
+
+2006-01-30 Nick Clifton <nickc@redhat.com>
+
+ * po/vi.po: Updated Vietnamese translation.
+
+2006-01-27 Yitzchak Scott-Thoennes <sthoenna@efn.org>
+
+ * pe-dll.c (pe_dll_generate_implib): Issue "Creating library
+ file:" as informational message, not a warning.
+
+2006-01-18 Roger Sayle <roger@eyesopen.com>
+
+ * emultempl/irix.em: Use lbasename instead of basename.
+
+2006-01-16 Nick Clifton <nickc@redhat.com>
+
+ * po/zh_CN.po: New Chinese (simplified) translation.
+ * configure.in (ALL_LINGUAS): Add "zh_CH".
+ * configure: Regenerate.
+
+2006-01-16 Bernhard Fischer <aldot@gcc.gnu.org>
+
+ * ld.texinfo (Options): Fix typo.
+
+For older changes see ChangeLog-2005
+
+Local Variables:
+mode: change-log
+left-margin: 8
+fill-column: 74
+version-control: never
+End:
diff --git a/contrib/binutils/ld/Makefile.am b/contrib/binutils/ld/Makefile.am
index a2f1ac1..72dd649 100644
--- a/contrib/binutils/ld/Makefile.am
+++ b/contrib/binutils/ld/Makefile.am
@@ -1,9 +1,7 @@
## Process this file with automake to generate Makefile.in
-## FIXME: work around apparent automake bug.
-INTLLIBS = @INTLLIBS@
-
AUTOMAKE_OPTIONS = cygnus dejagnu
+ACLOCAL_AMFLAGS = -I .. -I ../config -I ../bfd
SUBDIRS = po
@@ -14,6 +12,7 @@ YFLAGS = -d
LEX = `if [ -f ../flex/flex ]; then echo ../flex/flex; else echo @LEX@; fi`
WARN_CFLAGS = @WARN_CFLAGS@
+NO_WERROR = @NO_WERROR@
AM_CFLAGS = $(WARN_CFLAGS)
# We put the scripts in the directory $(scriptdir)/ldscripts.
@@ -45,7 +44,7 @@ DOCVER = gen
# Options to extract the man page from ld.texinfo
MANCONF = -Dman
-TEXI2POD = perl $(BASEDIR)/etc/texi2pod.pl
+TEXI2POD = perl $(BASEDIR)/etc/texi2pod.pl $(AM_MAKEINFOFLAGS)
POD2MAN = pod2man --center="GNU Development Tools" \
--release="binutils-$(VERSION)" --section=1
@@ -56,14 +55,8 @@ 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`
-
+EXPECT = expect
+RUNTEST = runtest
RUNTESTFLAGS =
CC_FOR_TARGET = ` \
@@ -81,39 +74,47 @@ CC_FOR_TARGET = ` \
fi; \
fi`
-CXX = gcc
+CXX = g++
CXX_FOR_TARGET = ` \
- if [ -f $$r/../gcc/xgcc ] ; then \
+ if [ -f $$r/../gcc/g++ ] ; 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; \
+ echo $$r/../gcc/g++ -B$$r/../gcc/ -idirafter $$r/../newlib/targ-include -idirafter $${srcroot}/../newlib/libc/include -nostdinc; \
else \
- echo $$r/../gcc/xgcc -B$$r/../gcc/; \
+ echo $$r/../gcc/g++ -B$$r/../gcc/; \
fi; \
else \
if [ "@host@" = "@target@" ] ; then \
echo $(CXX); \
else \
- echo gcc | sed '$(transform)'; \
+ echo g++ | sed '$(transform)'; \
fi; \
fi`
noinst_PROGRAMS = ld-new
info_TEXINFOS = ld.texinfo
+ld_TEXINFOS = configdoc.texi
noinst_TEXINFOS = ldint.texinfo
man_MANS = ld.1
-INCLUDES = -D_GNU_SOURCE -I. -I$(srcdir) -I../bfd -I$(BFDDIR) -I$(INCDIR) -I$(top_srcdir)/../intl -I../intl $(HDEFINES) $(CFLAGS) -DLOCALEDIR="\"$(prefix)/share/locale\""
+AM_MAKEINFOFLAGS = -I $(srcdir) -I $(BFDDIR)/doc -I ../bfd/doc \
+ -I $(top_srcdir)/../libiberty
+TEXI2DVI = texi2dvi -I $(srcdir) -I $(BFDDIR)/doc -I ../bfd/doc \
+ -I $(top_srcdir)/../libiberty
+
+INCLUDES = -D_GNU_SOURCE -I. -I$(srcdir) -I../bfd -I$(BFDDIR) -I$(INCDIR) \
+ @INCINTL@ $(HDEFINES) $(CFLAGS) \
+ -DLOCALEDIR="\"$(datadir)/locale\""
BFDLIB = ../bfd/libbfd.la
LIBIBERTY = ../libiberty/libiberty.a
ALL_EMULATIONS = \
- ea29k.o \
eaixppc.o \
eaixrs6.o \
ealpha.o \
earcelf.o \
earm_epoc_pe.o \
+ earm_wince_pe.o \
earmaoutb.o \
earmaoutl.o \
earmcoff.o \
@@ -121,20 +122,25 @@ ALL_EMULATIONS = \
earmelfb.o \
earmelf_fbsd.o \
earmelf_linux.o \
+ earmelf_linux_eabi.o \
earmelfb_linux.o \
+ earmelfb_linux_eabi.o \
earmelf_nbsd.o \
earmelfb_nbsd.o \
- earmelf_oabi.o \
+ earmelf_vxworks.o \
earmnto.o \
earmnbsd.o \
earmpe.o \
+ earmsymbian.o \
eavr2.o \
eavr1.o \
eavr3.o \
eavr4.o \
eavr5.o \
+ eavr6.o \
ecoff_i860.o \
ecoff_sparc.o \
+ eelf32_spu.o \
ecrisaout.o \
ecriself.o \
ecrislinux.o \
@@ -144,19 +150,26 @@ ALL_EMULATIONS = \
ed30velf.o \
edelta68.o \
eelf32_dlx.o \
- eebmon29k.o \
eelf32_i960.o \
eelf32_i860.o \
eelf32_sparc.o \
+ eelf32_sparc_vxworks.o \
eelf32b4300.o \
+ eelf32bfin.o \
+ eelf32bfinfd.o \
+ eelf32cr16.o \
+ eelf32cr16c.o \
eelf32bmip.o \
eelf32bmipn32.o \
eelf32btsmip.o \
+ eelf32crx.o \
eelf32btsmipn32.o \
eelf32ltsmip.o \
eelf32ltsmipn32.o \
eelf32ebmip.o \
+ eelf32ebmipvxworks.o \
eelf32elmip.o \
+ eelf32elmipvxworks.o \
eelf32fr30.o \
eelf32frv.o \
eelf32i370.o \
@@ -168,8 +181,11 @@ ALL_EMULATIONS = \
eelf32lppc.o \
eelf32lppcnto.o \
eelf32lppcsim.o \
+ eelf32m32c.o \
eelf32mcore.o \
+ eelf32mep.o \
eelf32mipswindiss.o \
+ eelf32mt.o \
eelf32openrisc.o \
eelf32ppc.o \
eelf32ppc_fbsd.o \
@@ -177,7 +193,11 @@ ALL_EMULATIONS = \
eelf32ppcnto.o \
eelf32ppcsim.o \
eelf32ppcwindiss.o \
+ eelf32ppcvxworks.o \
eelf32vax.o \
+ eelf32xc16x.o \
+ eelf32xc16xl.o \
+ eelf32xc16xs.o \
eelf32xstormy16.o \
eelf32xtensa.o \
eelf_i386.o \
@@ -185,6 +205,7 @@ ALL_EMULATIONS = \
eelf_i386_chaos.o \
eelf_i386_fbsd.o \
eelf_i386_ldso.o \
+ eelf_i386_vxworks.o \
eelf_s390.o \
egld960.o \
egld960coff.o \
@@ -228,6 +249,7 @@ ALL_EMULATIONS = \
ei386nw.o \
ei386pe.o \
ei386pe_posix.o \
+ ei386pep.o \
elnk960.o \
em32relf.o \
em32rlelf.o \
@@ -244,10 +266,10 @@ ALL_EMULATIONS = \
em68kelf.o \
em68kelfnbsd.o \
em68klinux.o \
- em68klynx.o \
em68knbsd.o \
em68kpsos.o \
em88kbcs.o \
+ emaxqcoff.o \
emcorepe.o \
emipsbig.o \
emipsbsd.o \
@@ -280,6 +302,13 @@ ALL_EMULATIONS = \
emsp430x167.o \
emsp430x168.o \
emsp430x169.o \
+ emsp430x1610.o \
+ emsp430x1611.o \
+ emsp430x1612.o \
+ emsp430x2101.o \
+ emsp430x2111.o \
+ emsp430x2121.o \
+ emsp430x2131.o \
emsp430x311.o \
emsp430x312.o \
emsp430x313.o \
@@ -291,12 +320,17 @@ ALL_EMULATIONS = \
emsp430x337.o \
emsp430x412.o \
emsp430x413.o \
+ emsp430x415.o \
+ emsp430x417.o \
emsp430xE423.o \
emsp430xE425.o \
emsp430xE427.o \
emsp430xW423.o \
emsp430xW425.o \
emsp430xW427.o \
+ emsp430xG437.o \
+ emsp430xG438.o \
+ emsp430xG439.o \
emsp430x435.o \
emsp430x436.o \
emsp430x437.o \
@@ -314,8 +348,9 @@ ALL_EMULATIONS = \
eppcmacos.o \
eppcnw.o \
eppcpe.o \
+ eppclynx.o \
eriscix.o \
- esa29200.o \
+ escoreelf.o \
esh.o \
eshelf32.o \
eshlelf32.o \
@@ -330,12 +365,15 @@ ALL_EMULATIONS = \
eshlelf_nbsd.o \
eshelf_nto.o \
eshlelf_nto.o \
+ eshelf_uclinux.o \
+ eshelf_vxworks.o \
+ eshlelf_vxworks.o \
eshl.o \
eshlelf.o \
+ eshlsymbian.o \
eshpe.o \
esparcaout.o \
esparclinux.o \
- esparclynx.o \
esparcnbsd.o \
est2000.o \
esun3.o \
@@ -353,7 +391,8 @@ ALL_EMULATIONS = \
evsta.o \
ew65.o \
ez8001.o \
- eelf32frvfd.o \
+ eelf32frvfd.o \
+ ez80.o \
ez8002.o
ALL_64_EMULATIONS = \
@@ -384,15 +423,16 @@ ALL_64_EMULATIONS = \
ALL_EMUL_EXTRA_OFILES = \
deffilep.o \
- pe-dll.o
+ pe-dll.o \
+ pep-dll.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 pe-dll.c
+ mri.c ldcref.c pe-dll.c pep-dll.c
HFILES = ld.h ldctor.h ldemul.h ldexp.h ldfile.h \
ldlang.h ldlex.h ldmain.h ldmisc.h ldver.h \
- ldwrite.h mri.h deffile.h pe-dll.h
+ ldwrite.h mri.h deffile.h pe-dll.h pep-dll.h elf-hints-local.h
GENERATED_CFILES = ldgram.c ldlex.c deffilep.c
GENERATED_HFILES = ldgram.h ldemul-list.h deffilep.h
@@ -403,6 +443,15 @@ OFILES = ldgram.o ldlex.o lexsup.o ldlang.o mri.o ldctor.o ldmain.o \
STAGESTUFF = *.o ldscripts/* e*.c
+# Disable -Werror, if it has been enabled, since old versions of bison/
+# yacc will produce working code which contain compile time warnings.
+ldgram.o:
+ $(COMPILE) -c $< $(NO_WERROR)
+ldlex.o:
+ $(COMPILE) -c $< $(NO_WERROR)
+deffilep.o:
+ $(COMPILE) -c $< $(NO_WERROR)
+
# At the moment this is just a list of those emulation template files
# that contain internationalised strings.
EMULATION_FILES = emultempl/pe.em emultempl/armcoff.em
@@ -420,6 +469,10 @@ ldmain.o: ldmain.c config.status
-DTARGET='"@target@"' @TARGET_SYSTEM_ROOT_DEFINE@ \
$(srcdir)/ldmain.c
+eelf32_spu.o: eelf32_spu.c
+ $(COMPILE) -c -DEMBEDSPU="\"`echo embedspu | sed '$(transform)'`\"" \
+ eelf32_spu.c
+
ldemul-list.h: Makefile
(echo "/* This file is automatically generated. DO NOT EDIT! */";\
for f in `echo " " ${EMULATION_OFILES} "" \
@@ -440,14 +493,13 @@ stringify.sed: ${srcdir}/emultempl/$(STRINGIFY)
# These all start with e so 'make clean' can find them.
-GENSCRIPTS = LIB_PATH='${LIB_PATH}' $(SHELL) $(srcdir)/genscripts.sh ${srcdir} ${libdir} "${exec_prefix}" @host@ @target@ @target_alias@ "@EMULATION_LIBPATH@" "@NATIVE_LIB_DIRS@" @use_sysroot@
+GENSCRIPTS = LIB_PATH='${LIB_PATH}' $(SHELL) $(srcdir)/genscripts.sh "${srcdir}" "${libdir}" "${prefix}" "${exec_prefix}" @host@ @target@ @target_alias@ "@EMULATION_LIBPATH@" "@NATIVE_LIB_DIRS@" @use_sysroot@
GEN_DEPENDS = $(srcdir)/genscripts.sh stringify.sed
+ELF_DEPS = $(srcdir)/emultempl/elf32.em $(srcdir)/emultempl/elf-generic.em
+ELF_GEN_DEPS = $(srcdir)/emultempl/generic.em $(srcdir)/emultempl/elf-generic.em $(srcdir)/emultempl/genelf.em
@TDIRS@
-ea29k.c: $(srcdir)/emulparams/a29k.sh \
- $(srcdir)/emultempl/generic.em $(srcdir)/scripttempl/a29k.sc ${GEN_DEPENDS}
- ${GENSCRIPTS} a29k "$(tdir_a29k)"
eaix5ppc.c: $(srcdir)/emulparams/aix5ppc.sh \
$(srcdir)/emultempl/aix.em $(srcdir)/scripttempl/aix.sc ${GEN_DEPENDS}
${GENSCRIPTS} aix5ppc "$(tdir_aixppc)"
@@ -464,44 +516,58 @@ 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}
+ $(ELF_GEN_DEPS) $(srcdir)/scripttempl/elf.sc ${GEN_DEPENDS}
${GENSCRIPTS} arcelf "$(tdir_arcelf)"
earmelf.c: $(srcdir)/emulparams/armelf.sh \
- $(srcdir)/emultempl/elf32.em $(srcdir)/emultempl/armelf.em \
+ $(ELF_DEPS) $(srcdir)/emultempl/armelf.em \
$(srcdir)/scripttempl/elf.sc ${GEN_DEPENDS}
${GENSCRIPTS} armelf "$(tdir_armelf)"
earmelfb.c: $(srcdir)/emulparams/armelfb.sh $(srcdir)/emulparams/armelf.sh \
- $(srcdir)/emultempl/elf32.em $(srcdir)/emultempl/armelf.em \
+ $(ELF_DEPS) $(srcdir)/emultempl/armelf.em \
$(srcdir)/scripttempl/elf.sc ${GEN_DEPENDS}
${GENSCRIPTS} armelfb "$(tdir_armelfb)"
-earmelf_oabi.c: $(srcdir)/emulparams/armelf_oabi.sh \
- $(srcdir)/emultempl/armelf_oabi.em $(srcdir)/scripttempl/elf.sc ${GEN_DEPENDS}
- ${GENSCRIPTS} armelf_oabi "$(tdir_armelf)"
earmelf_fbsd.c: $(srcdir)/emulparams/armelf_fbsd.sh \
$(srcdir)/emulparams/armelf.sh \
- $(srcdir)/emultempl/elf32.em $(srcdir)/emultempl/armelf.em \
+ $(ELF_DEPS) $(srcdir)/emultempl/armelf.em \
$(srcdir)/scripttempl/elf.sc ${GEN_DEPENDS}
${GENSCRIPTS} armelf_fbsd "$(tdir_armelf_fbsd)"
earmelf_linux.c: $(srcdir)/emulparams/armelf_linux.sh \
- $(srcdir)/emultempl/elf32.em $(srcdir)/emultempl/armelf.em \
+ $(ELF_DEPS) $(srcdir)/emultempl/armelf.em \
$(srcdir)/scripttempl/elf.sc ${GEN_DEPENDS}
${GENSCRIPTS} armelf_linux "$(tdir_armelf_linux)"
+earmelf_linux_eabi.c: $(srcdir)/emulparams/armelf_linux_eabi.sh \
+ $(srcdir)/emulparams/armelf_linux.sh \
+ $(ELF_DEPS) $(srcdir)/emultempl/armelf.em \
+ $(srcdir)/scripttempl/elf.sc ${GEN_DEPENDS}
+ ${GENSCRIPTS} armelf_linux_eabi "$(tdir_armelf_linux_abi)"
earmelfb_linux.c: $(srcdir)/emulparams/armelfb_linux.sh \
$(srcdir)/emulparams/armelf_linux.sh \
- $(srcdir)/emultempl/elf32.em $(srcdir)/emultempl/armelf.em \
+ $(ELF_DEPS) $(srcdir)/emultempl/armelf.em \
$(srcdir)/scripttempl/elf.sc ${GEN_DEPENDS}
${GENSCRIPTS} armelfb_linux "$(tdir_armelfb_linux)"
+earmelfb_linux_eabi.c: $(srcdir)/emulparams/armelfb_linux_eabi.sh \
+ $(srcdir)/emulparams/armelf_linux_eabi.sh \
+ $(srcdir)/emulparams/armelf_linux.sh \
+ $(ELF_DEPS) $(srcdir)/emultempl/armelf.em \
+ $(srcdir)/scripttempl/elf.sc ${GEN_DEPENDS}
+ ${GENSCRIPTS} armelfb_linux_eabi "$(tdir_armelfb_linux_abi)"
earmelf_nbsd.c: $(srcdir)/emulparams/armelf_nbsd.sh \
$(srcdir)/emulparams/armelf.sh \
- $(srcdir)/emultempl/elf32.em $(srcdir)/emultempl/armelf.em \
+ $(ELF_DEPS) $(srcdir)/emultempl/armelf.em \
$(srcdir)/scripttempl/elf.sc ${GEN_DEPENDS}
${GENSCRIPTS} armelf_nbsd "$(tdir_armelf_nbsd)"
earmelfb_nbsd.c: $(srcdir)/emulparams/armelfb_nbsd.sh \
$(srcdir)/emulparams/armelf_nbsd.sh \
$(srcdir)/emulparams/armelf.sh \
- $(srcdir)/emultempl/elf32.em $(srcdir)/emultempl/armelf.em \
+ $(ELF_DEPS) $(srcdir)/emultempl/armelf.em \
$(srcdir)/scripttempl/elf.sc ${GEN_DEPENDS}
${GENSCRIPTS} armelfb_nbsd "$(tdir_armelfb_nbsd)"
+earmelf_vxworks.c: $(srcdir)/emulparams/armelf_vxworks.sh \
+ $(srcdir)/emulparams/vxworks.sh $(srcdir)/emulparams/armelf.sh \
+ $(ELF_DEPS) $(srcdir)/emultempl/vxworks.em \
+ $(srcdir)/emultempl/armelf.em $(srcdir)/scripttempl/elf.sc \
+ ${GEN_DEPENDS}
+ ${GENSCRIPTS} armelf_vxworks "$(tdir_armelf)"
earmaoutb.c: $(srcdir)/emulparams/armaoutb.sh \
$(srcdir)/emultempl/generic.em $(srcdir)/scripttempl/armaout.sc ${GEN_DEPENDS}
${GENSCRIPTS} armaoutb "$(tdir_armaoutb)"
@@ -515,35 +581,47 @@ earmnbsd.c: $(srcdir)/emulparams/armnbsd.sh \
$(srcdir)/emultempl/generic.em $(srcdir)/scripttempl/aout.sc ${GEN_DEPENDS}
${GENSCRIPTS} armnbsd "$(tdir_armnbsd)"
earmnto.c: $(srcdir)/emulparams/armnto.sh \
- $(srcdir)/emultempl/elf32.em $(srcdir)/emultempl/armelf.em \
+ $(ELF_DEPS) $(srcdir)/emultempl/armelf.em \
$(srcdir)/scripttempl/elf.sc ${GEN_DEPENDS}
${GENSCRIPTS} armnto "$(tdir_armnto)"
earm_epoc_pe.c: $(srcdir)/emulparams/arm_epoc_pe.sh \
$(srcdir)/emultempl/pe.em $(srcdir)/scripttempl/epocpe.sc ${GEN_DEPENDS}
${GENSCRIPTS} arm_epoc_pe "$(tdir_armpe)"
+earm_wince_pe.c: $(srcdir)/emulparams/arm_wince_pe.sh \
+ $(srcdir)/emultempl/pe.em $(srcdir)/scripttempl/pe.sc ${GEN_DEPENDS}
+ ${GENSCRIPTS} arm_wince_pe "$(tdir_armpe)"
earmpe.c: $(srcdir)/emulparams/armpe.sh \
$(srcdir)/emultempl/pe.em $(srcdir)/scripttempl/pe.sc ${GEN_DEPENDS}
${GENSCRIPTS} armpe "$(tdir_armpe)"
-eavr2.c: $(srcdir)/emulparams/avr2.sh \
- $(srcdir)/emultempl/generic.em $(srcdir)/scripttempl/avr.sc \
+earmsymbian.c: $(srcdir)/emulparams/armsymbian.sh \
+ $(srcdir)/emulparams/armelf.sh $(ELF_DEPS) \
+ $(srcdir)/emultempl/armelf.em $(srcdir)/scripttempl/armbpabi.sc \
+ ${GEN_DEPENDS}
+ ${GENSCRIPTS} armsymbian "$(tdir_armelf)"
+eavr2.c: $(srcdir)/emulparams/avr2.sh $(srcdir)/emultempl/avrelf.em \
+ $(ELF_DEPS) $(srcdir)/scripttempl/avr.sc \
${GEN_DEPENDS}
${GENSCRIPTS} avr2 "$(tdir_avr2)"
-eavr1.c: $(srcdir)/emulparams/avr1.sh \
- $(srcdir)/emultempl/generic.em $(srcdir)/scripttempl/avr.sc \
+eavr1.c: $(srcdir)/emulparams/avr1.sh $(srcdir)/emultempl/avrelf.em \
+ $(ELF_DEPS) $(srcdir)/scripttempl/avr.sc \
${GEN_DEPENDS}
${GENSCRIPTS} avr1 "$(tdir_avr2)"
-eavr3.c: $(srcdir)/emulparams/avr3.sh \
- $(srcdir)/emultempl/generic.em $(srcdir)/scripttempl/avr.sc \
+eavr3.c: $(srcdir)/emulparams/avr3.sh $(srcdir)/emultempl/avrelf.em \
+ $(ELF_DEPS) $(srcdir)/scripttempl/avr.sc \
${GEN_DEPENDS}
${GENSCRIPTS} avr3 "$(tdir_avr2)"
-eavr4.c: $(srcdir)/emulparams/avr4.sh \
- $(srcdir)/emultempl/generic.em $(srcdir)/scripttempl/avr.sc \
+eavr4.c: $(srcdir)/emulparams/avr4.sh $(srcdir)/emultempl/avrelf.em \
+ $(ELF_DEPS) $(srcdir)/scripttempl/avr.sc \
${GEN_DEPENDS}
${GENSCRIPTS} avr4 "$(tdir_avr2)"
-eavr5.c: $(srcdir)/emulparams/avr5.sh \
- $(srcdir)/emultempl/generic.em $(srcdir)/scripttempl/avr.sc \
+eavr5.c: $(srcdir)/emulparams/avr5.sh $(srcdir)/emultempl/avrelf.em \
+ $(ELF_DEPS) $(srcdir)/scripttempl/avr.sc \
${GEN_DEPENDS}
${GENSCRIPTS} avr5 "$(tdir_avr2)"
+eavr6.c: $(srcdir)/emulparams/avr6.sh $(srcdir)/emultempl/avrelf.em \
+ $(ELF_DEPS) $(srcdir)/scripttempl/avr.sc \
+ ${GEN_DEPENDS}
+ ${GENSCRIPTS} avr6 "$(tdir_avr2)"
ecoff_i860.c: $(srcdir)/emulparams/coff_i860.sh \
$(srcdir)/emultempl/generic.em $(srcdir)/scripttempl/i860coff.sc ${GEN_DEPENDS}
${GENSCRIPTS} coff_i860 "$(tdir_coff_i860)"
@@ -554,278 +632,381 @@ ecrisaout.c: $(srcdir)/emulparams/crisaout.sh \
$(srcdir)/emultempl/generic.em $(srcdir)/scripttempl/crisaout.sc ${GEN_DEPENDS}
${GENSCRIPTS} crisaout "$(tdir_cris)"
ecriself.c: $(srcdir)/emulparams/criself.sh \
- $(srcdir)/emultempl/elf32.em $(srcdir)/scripttempl/elf.sc ${GEN_DEPENDS}
+ $(ELF_DEPS) $(srcdir)/scripttempl/elf.sc ${GEN_DEPENDS}
${GENSCRIPTS} criself "$(tdir_cris)"
ecrislinux.c: $(srcdir)/emulparams/crislinux.sh \
- $(srcdir)/emultempl/elf32.em $(srcdir)/scripttempl/elf.sc ${GEN_DEPENDS}
+ $(ELF_DEPS) $(srcdir)/scripttempl/elf.sc ${GEN_DEPENDS}
${GENSCRIPTS} crislinux "$(tdir_cris)"
ed10velf.c: $(srcdir)/emulparams/d10velf.sh \
- $(srcdir)/emultempl/elf32.em $(srcdir)/scripttempl/elfd10v.sc ${GEN_DEPENDS}
+ $(ELF_DEPS) $(srcdir)/scripttempl/elfd10v.sc ${GEN_DEPENDS}
${GENSCRIPTS} d10velf "$(tdir_d10v)"
ed30velf.c: $(srcdir)/emulparams/d30velf.sh \
- $(srcdir)/emultempl/generic.em $(srcdir)/scripttempl/elfd30v.sc ${GEN_DEPENDS}
+ $(ELF_GEN_DEPS) $(srcdir)/scripttempl/elfd30v.sc ${GEN_DEPENDS}
${GENSCRIPTS} d30velf "$(tdir_d30v)"
ed30v_o.c: $(srcdir)/emulparams/d30v_o.sh \
- $(srcdir)/emultempl/generic.em $(srcdir)/scripttempl/elfd30v.sc ${GEN_DEPENDS}
+ $(ELF_GEN_DEPS) $(srcdir)/scripttempl/elfd30v.sc ${GEN_DEPENDS}
${GENSCRIPTS} d30v_o "$(tdir_d30v)"
ed30v_e.c: $(srcdir)/emulparams/d30v_e.sh \
- $(srcdir)/emultempl/generic.em $(srcdir)/scripttempl/elfd30v.sc ${GEN_DEPENDS}
+ $(ELF_GEN_DEPS) $(srcdir)/scripttempl/elfd30v.sc ${GEN_DEPENDS}
${GENSCRIPTS} d30v_e "$(tdir_d30v)"
edelta68.c: $(srcdir)/emulparams/delta68.sh \
$(srcdir)/emultempl/generic.em $(srcdir)/scripttempl/delta68.sc ${GEN_DEPENDS}
${GENSCRIPTS} delta68 "$(tdir_delta68)"
+eelf32bfin.c: $(srcdir)/emulparams/bfin.sh \
+ $(ELF_DEPS) \
+ $(srcdir)/scripttempl/elf.sc ${GEN_DEPENDS}
+ ${GENSCRIPTS} elf32bfin "$(tdir_elf32bfin)" bfin
+eelf32bfinfd.c: $(srcdir)/emulparams/elf32bfinfd.sh $(srcdir)/emulparams/bfin.sh \
+ $(ELF_DEPS) \
+ $(srcdir)/scripttempl/elf.sc ${GEN_DEPENDS}
+ ${GENSCRIPTS} elf32bfinfd "$(tdir_elf32bfinfd)" elf32bfinfd
eelf32_dlx.c: $(srcdir)/emulparams/elf32_dlx.sh \
- $(srcdir)/emultempl/elf32.em $(srcdir)/scripttempl/dlx.sc ${GEN_DEPENDS}
+ $(ELF_GEN_DEPS) $(srcdir)/scripttempl/dlx.sc ${GEN_DEPENDS}
${GENSCRIPTS} elf32_dlx "$(tdir_elf32_dlx)"
-eebmon29k.c: $(srcdir)/emulparams/ebmon29k.sh \
- $(srcdir)/emultempl/generic.em $(srcdir)/scripttempl/ebmon29k.sc ${GEN_DEPENDS}
- ${GENSCRIPTS} ebmon29k "$(tdir_ebmon29k)"
-eelf32xstormy16.c: $(srcdir)/emulparams/elf32xstormy16.sh \
- $(srcdir)/emultempl/elf32.em $(srcdir)/emultempl/needrelax.em \
+eelf32xc16x.c: $(srcdir)/emulparams/elf32xc16x.sh \
+ $(ELF_DEPS) $(srcdir)/emultempl/needrelax.em \
+ $(srcdir)/scripttempl/elf.sc ${GEN_DEPENDS}
+ ${GENSCRIPTS} elf32xc16x "$(tdir_xc16x)"
+eelf32xc16xl.c: $(srcdir)/emulparams/elf32xc16xl.sh \
+ $(ELF_DEPS) $(srcdir)/emultempl/needrelax.em \
+ $(srcdir)/scripttempl/elf.sc ${GEN_DEPENDS}
+ ${GENSCRIPTS} elf32xc16xl "$(tdir_xc16xl)"
+eelf32xc16xs.c: $(srcdir)/emulparams/elf32xc16xs.sh \
+ $(ELF_DEPS) $(srcdir)/emultempl/needrelax.em \
$(srcdir)/scripttempl/elf.sc ${GEN_DEPENDS}
+ ${GENSCRIPTS} elf32xc16xs "$(tdir_xc16xs)"
+eelf32xstormy16.c: $(srcdir)/emulparams/elf32xstormy16.sh \
+ $(ELF_DEPS) $(srcdir)/emultempl/needrelax.em \
+ $(srcdir)/scripttempl/xstormy16.sc ${GEN_DEPENDS}
${GENSCRIPTS} elf32xstormy16 "$(tdir_xstormy16)"
eelf32am33lin.c: $(srcdir)/emulparams/elf32am33lin.sh \
- $(srcdir)/emultempl/elf32.em $(srcdir)/scripttempl/elf.sc ${GEN_DEPENDS}
+ $(ELF_DEPS) $(srcdir)/scripttempl/elf.sc ${GEN_DEPENDS}
${GENSCRIPTS} elf32am33lin "$(tdir_mn10300)"
eelf32vax.c: $(srcdir)/emulparams/elf32vax.sh \
- $(srcdir)/emultempl/elf32.em $(srcdir)/scripttempl/elf.sc ${GEN_DEPENDS}
+ $(ELF_DEPS) $(srcdir)/scripttempl/elf.sc ${GEN_DEPENDS}
${GENSCRIPTS} elf32vax "$(tdir_elf32vax)"
-eelf32xtensa.c: $(srcdir)/emulparams/elf32xtensa.sh \
- $(srcdir)/emulparams/xtensa-config.sh \
- $(srcdir)/emultempl/elf32.em $(srcdir)/emultempl/xtensaelf.em \
+eelf32xtensa.c: $(srcdir)/emulparams/elf32xtensa.sh $(ELF_DEPS) \
+ $(srcdir)/emultempl/xtensaelf.em $(INCDIR)/xtensa-config.h \
+ $(BFDDIR)/elf-bfd.h $(BFDDIR)/libbfd.h $(INCDIR)/elf/xtensa.h \
$(srcdir)/scripttempl/elfxtensa.sc ${GEN_DEPENDS}
${GENSCRIPTS} elf32xtensa "$(tdir_elf32xtensa)"
eelf32fr30.c: $(srcdir)/emulparams/elf32fr30.sh \
- $(srcdir)/emultempl/elf32.em $(srcdir)/scripttempl/elf.sc ${GEN_DEPENDS}
+ $(ELF_GEN_DEPS) $(srcdir)/scripttempl/elf.sc ${GEN_DEPENDS}
${GENSCRIPTS} elf32fr30 "$(tdir_fr30)"
eelf32frv.c: $(srcdir)/emulparams/elf32frv.sh \
- $(srcdir)/emultempl/elf32.em $(srcdir)/scripttempl/elf.sc ${GEN_DEPENDS}
+ $(ELF_GEN_DEPS) $(srcdir)/scripttempl/elf.sc ${GEN_DEPENDS}
${GENSCRIPTS} elf32frv "$(tdir_frv)"
+eelf32frvfd.c: $(srcdir)/emulparams/elf32frvfd.sh \
+ $(srcdir)/emulparams/elf32frv.sh \
+ $(ELF_DEPS) $(srcdir)/scripttempl/elf.sc ${GEN_DEPENDS}
+ ${GENSCRIPTS} elf32frvfd "$(tdir_frv)"
eelf32mcore.c: $(srcdir)/emulparams/elf32mcore.sh \
- $(srcdir)/emultempl/elf32.em $(srcdir)/scripttempl/elf.sc ${GEN_DEPENDS}
+ $(ELF_DEPS) $(srcdir)/scripttempl/elf.sc ${GEN_DEPENDS}
${GENSCRIPTS} elf32mcore "$(tdir_mcore)"
+eelf32mep.c: $(srcdir)/emulparams/elf32mep.sh \
+ $(srcdir)/emultempl/elf32.em $(srcdir)/scripttempl/mep.sc ${GEN_DEPENDS}
+ ${GENSCRIPTS} elf32mep "$(tdir_mep)"
em32relf.c: $(srcdir)/emulparams/m32relf.sh \
- $(srcdir)/emultempl/elf32.em $(srcdir)/scripttempl/elf.sc ${GEN_DEPENDS}
+ $(ELF_DEPS) $(srcdir)/scripttempl/elf.sc ${GEN_DEPENDS}
${GENSCRIPTS} m32relf "$(tdir_m32r)"
em32rlelf.c: $(srcdir)/emulparams/m32rlelf.sh \
- $(srcdir)/emultempl/elf32.em $(srcdir)/scripttempl/elf.sc ${GEN_DEPENDS}
+ $(ELF_DEPS) $(srcdir)/scripttempl/elf.sc ${GEN_DEPENDS}
${GENSCRIPTS} m32rlelf "$(tdir_m32rlelf)"
em32relf_linux.c: $(srcdir)/emulparams/m32relf_linux.sh \
- $(srcdir)/emultempl/elf32.em $(srcdir)/scripttempl/elf.sc ${GEN_DEPENDS}
+ $(ELF_DEPS) $(srcdir)/scripttempl/elf.sc ${GEN_DEPENDS}
${GENSCRIPTS} m32relf_linux "$(tdir_m32relf_linux)"
em32rlelf_linux.c: $(srcdir)/emulparams/m32rlelf_linux.sh \
- $(srcdir)/emultempl/elf32.em $(srcdir)/scripttempl/elf.sc ${GEN_DEPENDS}
+ $(ELF_DEPS) $(srcdir)/scripttempl/elf.sc ${GEN_DEPENDS}
${GENSCRIPTS} m32rlelf_linux "$(tdir_m32rlelf_linux)"
eelf32_sparc.c: $(srcdir)/emulparams/elf32_sparc.sh \
- $(srcdir)/emultempl/elf32.em $(srcdir)/scripttempl/elf.sc ${GEN_DEPENDS}
+ $(ELF_DEPS) $(srcdir)/scripttempl/elf.sc ${GEN_DEPENDS}
${GENSCRIPTS} elf32_sparc "$(tdir_elf32_sparc)"
+eelf32_sparc_vxworks.c: $(srcdir)/emulparams/elf32_sparc_vxworks.sh \
+ $(srcdir)/emulparams/vxworks.sh $(srcdir)/emulparams/elf32_sparc.sh \
+ $(srcdir)/emultempl/vxworks.em $(ELF_DEPS) \
+ $(srcdir)/scripttempl/elf.sc ${GEN_DEPENDS}
+ ${GENSCRIPTS} elf32_sparc_vxworks "$(tdir_elf32_sparc_vxworks)"
+eelf32_spu.c: $(srcdir)/emulparams/elf32_spu.sh $(srcdir)/emultempl/spuelf.em \
+ $(srcdir)/emultempl/spu_ovl.o \
+ ldemul-list.h \
+ $(ELF_DEPS) $(srcdir)/scripttempl/elf.sc ${GEN_DEPENDS}
+ ${GENSCRIPTS} elf32_spu "$(tdir_elf32_spu)"
+$(srcdir)/emultempl/spu_ovl.o: @MAINT@ $(srcdir)/emultempl/spu_ovl.S
+ cpp -DOVLY_IRQ_SAVE $(srcdir)/emultempl/spu_ovl.S spu_ovl.s
+ if ../gas/as-new --version \
+ | grep 'target.*spu' >/dev/null 2>/dev/null; then \
+ ../gas/as-new -o $@ spu_ovl.s; \
+ fi
eelf32_i860.c: $(srcdir)/emulparams/elf32_i860.sh \
- $(srcdir)/emultempl/elf32.em $(srcdir)/scripttempl/elf.sc ${GEN_DEPENDS}
+ $(ELF_GEN_DEPS) $(srcdir)/scripttempl/elf.sc ${GEN_DEPENDS}
${GENSCRIPTS} elf32_i860 "$(tdir_elf32_i860)"
eelf32_i960.c: $(srcdir)/emulparams/elf32_i960.sh \
- $(srcdir)/emultempl/elf32.em $(srcdir)/scripttempl/elf.sc ${GEN_DEPENDS}
+ $(ELF_DEPS) $(srcdir)/scripttempl/elf.sc ${GEN_DEPENDS}
${GENSCRIPTS} elf32_i960 "$(tdir_elf32_i960)"
eelf32b4300.c: $(srcdir)/emulparams/elf32b4300.sh \
- $(srcdir)/emulparams/elf32bmip.sh $(srcdir)/emultempl/mipself.em \
- $(srcdir)/emultempl/elf32.em $(srcdir)/scripttempl/elf.sc ${GEN_DEPENDS}
+ $(srcdir)/emulparams/elf32bmip.sh $(ELF_DEPS) \
+ $(srcdir)/emultempl/mipself.em $(srcdir)/scripttempl/elf.sc ${GEN_DEPENDS}
${GENSCRIPTS} elf32b4300 "$(tdir_elf32b4300)"
-eelf32bmip.c: $(srcdir)/emulparams/elf32bmip.sh \
- $(srcdir)/emultempl/mipself.em \
- $(srcdir)/emultempl/elf32.em $(srcdir)/scripttempl/elf.sc ${GEN_DEPENDS}
+eelf32cr16.c: $(srcdir)/emulparams/elf32cr16.sh \
+ $(srcdir)/emultempl/elf32.em $(srcdir)/emultempl/cr16elf.em \
+ $(srcdir)/scripttempl/elf32cr16.sc ${GEN_DEPENDS}
+ ${GENSCRIPTS} elf32cr16 "$(tdir_elf32crx)"
+eelf32cr16c.c: $(srcdir)/emulparams/elf32cr16c.sh \
+ $(ELF_DEPS) \
+ $(srcdir)/scripttempl/elf32cr16c.sc ${GEN_DEPENDS}
+ ${GENSCRIPTS} elf32cr16c "$(tdir_elf32cr16c)"
+eelf32bmip.c: $(srcdir)/emulparams/elf32bmip.sh $(ELF_DEPS) \
+ $(srcdir)/emultempl/mipself.em $(srcdir)/scripttempl/elf.sc ${GEN_DEPENDS}
${GENSCRIPTS} elf32bmip "$(tdir_elf32bmip)"
eelf32bsmip.c: $(srcdir)/emulparams/elf32bsmip.sh \
- $(srcdir)/emulparams/elf32bmip.sh $(srcdir)/emultempl/irix.em \
- $(srcdir)/emultempl/elf32.em $(srcdir)/scripttempl/elf.sc ${GEN_DEPENDS}
+ $(srcdir)/emulparams/elf32bmip.sh $(ELF_DEPS) $(srcdir)/emultempl/irix.em \
+ $(srcdir)/emultempl/mipself.em $(srcdir)/scripttempl/elf.sc ${GEN_DEPENDS}
${GENSCRIPTS} elf32bsmip "$(tdir_elf32bsmip)"
eelf32btsmip.c: $(srcdir)/emulparams/elf32btsmip.sh \
- $(srcdir)/emulparams/elf32bmip.sh $(srcdir)/emultempl/mipself.em \
- $(srcdir)/emultempl/elf32.em $(srcdir)/scripttempl/elf.sc ${GEN_DEPENDS}
+ $(srcdir)/emulparams/elf32bmip.sh $(ELF_DEPS) \
+ $(srcdir)/emultempl/mipself.em $(srcdir)/scripttempl/elf.sc ${GEN_DEPENDS}
${GENSCRIPTS} elf32btsmip "$(tdir_elf32btsmip)"
+eelf32crx.c: $(srcdir)/emulparams/elf32crx.sh \
+ $(ELF_DEPS) $(srcdir)/emultempl/crxelf.em \
+ $(srcdir)/scripttempl/elf32crx.sc ${GEN_DEPENDS}
+ ${GENSCRIPTS} elf32crx "$(tdir_elf32crx)"
eelf32btsmipn32.c: $(srcdir)/emulparams/elf32btsmipn32.sh \
- $(srcdir)/emulparams/elf32bmip.sh $(srcdir)/emultempl/mipself.em \
- $(srcdir)/emultempl/elf32.em $(srcdir)/scripttempl/elf.sc ${GEN_DEPENDS}
+ $(srcdir)/emulparams/elf32bmipn32-defs.sh $(ELF_DEPS) \
+ $(srcdir)/emultempl/mipself.em $(srcdir)/scripttempl/elf.sc ${GEN_DEPENDS}
${GENSCRIPTS} elf32btsmipn32 "$(tdir_elf32btsmipn32)"
eelf32ltsmip.c: $(srcdir)/emulparams/elf32ltsmip.sh \
$(srcdir)/emulparams/elf32btsmip.sh $(srcdir)/emulparams/elf32bmip.sh \
- $(srcdir)/emultempl/mipself.em \
- $(srcdir)/emultempl/elf32.em $(srcdir)/scripttempl/elf.sc ${GEN_DEPENDS}
+ $(ELF_DEPS) $(srcdir)/emultempl/mipself.em $(srcdir)/scripttempl/elf.sc \
+ ${GEN_DEPENDS}
${GENSCRIPTS} elf32ltsmip "$(tdir_elf32ltsmip)"
eelf32ltsmipn32.c: $(srcdir)/emulparams/elf32ltsmipn32.sh \
- $(srcdir)/emulparams/elf32btsmip.sh $(srcdir)/emulparams/elf32bmip.sh \
- $(srcdir)/emultempl/mipself.em \
- $(srcdir)/emultempl/elf32.em $(srcdir)/scripttempl/elf.sc ${GEN_DEPENDS}
+ $(srcdir)/emulparams/elf32btsmipn32.sh \
+ $(srcdir)/emulparams/elf32bmipn32-defs.sh $(ELF_DEPS) \
+ $(srcdir)/emultempl/mipself.em $(srcdir)/scripttempl/elf.sc ${GEN_DEPENDS}
${GENSCRIPTS} elf32ltsmipn32 "$(tdir_elf32ltsmipn32)"
eelf32ebmip.c: $(srcdir)/emulparams/elf32ebmip.sh \
- $(srcdir)/emulparams/elf32bmip.sh $(srcdir)/emultempl/mipself.em \
- $(srcdir)/emultempl/elf32.em $(srcdir)/scripttempl/elf.sc ${GEN_DEPENDS}
+ $(srcdir)/emulparams/elf32bmip.sh $(ELF_DEPS) \
+ $(srcdir)/emultempl/mipself.em $(srcdir)/scripttempl/elf.sc ${GEN_DEPENDS}
${GENSCRIPTS} elf32ebmip "$(tdir_elf32ebmip)"
+eelf32ebmipvxworks.c: $(srcdir)/emulparams/elf32ebmipvxworks.sh \
+ $(srcdir)/emulparams/elf32bmip.sh $(srcdir)/emulparams/vxworks.sh \
+ $(ELF_DEPS) $(srcdir)/emultempl/generic.em $(srcdir)/emultempl/mipself.em \
+ $(srcdir)/emultempl/vxworks.em $(srcdir)/scripttempl/elf.sc ${GEN_DEPENDS}
+ ${GENSCRIPTS} elf32ebmipvxworks "$(tdir_elf32ebmipvxworks)"
eelf32elmip.c: $(srcdir)/emulparams/elf32elmip.sh \
$(srcdir)/emulparams/elf32lmip.sh $(srcdir)/emulparams/elf32bmip.sh \
- $(srcdir)/emultempl/mipself.em \
- $(srcdir)/emultempl/elf32.em $(srcdir)/scripttempl/elf.sc ${GEN_DEPENDS}
+ $(ELF_DEPS) $(srcdir)/emultempl/mipself.em $(srcdir)/scripttempl/elf.sc \
+ ${GEN_DEPENDS}
${GENSCRIPTS} elf32elmip "$(tdir_elf32elmip)"
+eelf32elmipvxworks.c: $(srcdir)/emulparams/elf32elmipvxworks.sh \
+ $(srcdir)/emulparams/elf32bmip.sh $(srcdir)/emulparams/vxworks.sh \
+ $(ELF_DEPS) $(srcdir)/emultempl/generic.em $(srcdir)/emultempl/mipself.em \
+ $(srcdir)/emultempl/vxworks.em $(srcdir)/scripttempl/elf.sc ${GEN_DEPENDS}
+ ${GENSCRIPTS} elf32elmipvxworks "$(tdir_elf32elmipvxworks)"
eelf32bmipn32.c: $(srcdir)/emulparams/elf32bmipn32.sh \
- $(srcdir)/emultempl/irix.em \
- $(srcdir)/emultempl/elf32.em $(srcdir)/scripttempl/elf.sc ${GEN_DEPENDS}
+ $(srcdir)/emulparams/elf32bmipn32-defs.sh $(ELF_DEPS) \
+ $(srcdir)/emultempl/irix.em $(srcdir)/emultempl/mipself.em \
+ $(srcdir)/scripttempl/elf.sc ${GEN_DEPENDS}
${GENSCRIPTS} elf32bmipn32 "$(tdir_elf32bmipn32)"
eelf32l4300.c: $(srcdir)/emulparams/elf32l4300.sh \
$(srcdir)/emulparams/elf32b4300.sh $(srcdir)/emulparams/elf32bmip.sh \
- $(srcdir)/emultempl/mipself.em \
- $(srcdir)/emultempl/elf32.em $(srcdir)/scripttempl/elf.sc ${GEN_DEPENDS}
+ $(ELF_DEPS) $(srcdir)/emultempl/mipself.em $(srcdir)/scripttempl/elf.sc \
+ ${GEN_DEPENDS}
${GENSCRIPTS} elf32l4300 "$(tdir_elf32l4300)"
eelf32lmip.c: $(srcdir)/emulparams/elf32lmip.sh \
- $(srcdir)/emulparams/elf32bmip.sh $(srcdir)/emultempl/mipself.em \
- $(srcdir)/emultempl/elf32.em $(srcdir)/scripttempl/elf.sc ${GEN_DEPENDS}
+ $(srcdir)/emulparams/elf32bmip.sh $(ELF_DEPS) \
+ $(srcdir)/emultempl/mipself.em $(srcdir)/scripttempl/elf.sc ${GEN_DEPENDS}
${GENSCRIPTS} elf32lmip "$(tdir_elf32lmip)"
-eelf32mipswindiss.c: $(srcdir)/emulparams/elf32mipswindiss.sh \
- $(srcdir)/emultempl/elf32.em $(srcdir)/scripttempl/elf.sc ${GEN_DEPENDS}
+eelf32mipswindiss.c: $(srcdir)/emulparams/elf32mipswindiss.sh $(ELF_DEPS) \
+ $(srcdir)/scripttempl/elf.sc ${GEN_DEPENDS}
${GENSCRIPTS} elf32mipswindiss "$(tdir_elf32mipswindiss)"
+eelf32m32c.c: $(srcdir)/emulparams/elf32m32c.sh \
+ $(ELF_DEPS) $(srcdir)/emultempl/needrelax.em \
+ $(srcdir)/scripttempl/elf.sc ${GEN_DEPENDS}
+ ${GENSCRIPTS} elf32m32c "$(tdir_m32c)"
+eelf32mt.c: $(srcdir)/emulparams/elf32mt.sh \
+ $(ELF_GEN_DEPS) $(srcdir)/scripttempl/elf.sc ${GEN_DEPENDS}
+ ${GENSCRIPTS} elf32mt "$(tdir_mt)"
eelf32lppc.c: $(srcdir)/emulparams/elf32lppc.sh \
+ $(srcdir)/emulparams/elf32ppccommon.sh \
$(srcdir)/emulparams/elf32ppc.sh $(srcdir)/emultempl/ppc32elf.em \
- $(srcdir)/emultempl/elf32.em $(srcdir)/scripttempl/elf.sc ${GEN_DEPENDS}
+ ldemul-list.h \
+ $(ELF_DEPS) $(srcdir)/scripttempl/elf.sc ${GEN_DEPENDS}
${GENSCRIPTS} elf32lppc "$(tdir_elf32lppc)"
eelf32lppcnto.c: $(srcdir)/emulparams/elf32lppcnto.sh \
- $(srcdir)/emulparams/elf32ppc.sh $(srcdir)/emultempl/ppc32elf.em \
- $(srcdir)/emultempl/elf32.em $(srcdir)/scripttempl/elf.sc ${GEN_DEPENDS}
+ $(srcdir)/emulparams/elf32ppc.sh $(srcdir)/emulparams/elf32ppccommon.sh \
+ $(srcdir)/emultempl/ppc32elf.em $(ELF_DEPS) \
+ ldemul-list.h \
+ $(srcdir)/scripttempl/elf.sc ${GEN_DEPENDS}
${GENSCRIPTS} elf32lppcnto "$(tdir_elf32lppcnto)"
eelf32lppcsim.c: $(srcdir)/emulparams/elf32lppcsim.sh \
$(srcdir)/emulparams/elf32lppc.sh $(srcdir)/emulparams/elf32ppc.sh \
- $(srcdir)/emultempl/ppc32elf.em \
- $(srcdir)/emultempl/elf32.em $(srcdir)/scripttempl/elf.sc ${GEN_DEPENDS}
+ $(srcdir)/emulparams/elf32ppccommon.sh $(srcdir)/emultempl/ppc32elf.em \
+ ldemul-list.h \
+ $(ELF_DEPS) $(srcdir)/scripttempl/elf.sc ${GEN_DEPENDS}
${GENSCRIPTS} elf32lppcsim "$(tdir_elf32lppcsim)"
eelf32ppcnto.c: $(srcdir)/emulparams/elf32ppcnto.sh \
- $(srcdir)/emulparams/elf32ppc.sh $(srcdir)/emultempl/ppc32elf.em \
- $(srcdir)/emultempl/elf32.em $(srcdir)/scripttempl/elf.sc ${GEN_DEPENDS}
+ $(srcdir)/emulparams/elf32ppc.sh $(srcdir)/emulparams/elf32ppccommon.sh \
+ $(srcdir)/emultempl/ppc32elf.em $(ELF_DEPS) \
+ ldemul-list.h \
+ $(srcdir)/scripttempl/elf.sc ${GEN_DEPENDS}
${GENSCRIPTS} elf32ppcnto "$(tdir_elf32ppcnto)"
eelf32ppcwindiss.c: $(srcdir)/emulparams/elf32ppcwindiss.sh \
- $(srcdir)/emultempl/elf32.em $(srcdir)/scripttempl/elf.sc ${GEN_DEPENDS}
+ $(ELF_DEPS) $(srcdir)/scripttempl/elf.sc ${GEN_DEPENDS}
${GENSCRIPTS} elf32ppcwindiss "$(tdir_elf32ppcwindiss)"
+eelf32ppcvxworks.c: $(srcdir)/emulparams/elf32ppcvxworks.sh \
+ $(srcdir)/emulparams/elf32ppccommon.sh $(srcdir)/emulparams/vxworks.sh \
+ $(srcdir)/emultempl/vxworks.em $(ELF_DEPS) \
+ $(srcdir)/scripttempl/elf.sc ${GEN_DEPENDS}
+ ${GENSCRIPTS} elf32ppcvxworks "$(tdir_elf32ppcvxworks)"
eelf32lsmip.c: $(srcdir)/emulparams/elf32lsmip.sh \
$(srcdir)/emulparams/elf32lmip.sh $(srcdir)/emulparams/elf32bmip.sh \
- $(srcdir)/emultempl/mipself.em \
- $(srcdir)/emultempl/elf32.em $(srcdir)/scripttempl/elf.sc ${GEN_DEPENDS}
+ $(ELF_DEPS) $(srcdir)/emultempl/mipself.em $(srcdir)/scripttempl/elf.sc \
+ ${GEN_DEPENDS}
${GENSCRIPTS} elf32lsmip "$(tdir_elf32lsmip)"
eelf32openrisc.c: $(srcdir)/emulparams/elf32openrisc.sh \
- $(srcdir)/emultempl/elf32.em $(srcdir)/scripttempl/elf.sc ${GEN_DEPENDS}
+ $(ELF_DEPS) $(srcdir)/scripttempl/elf.sc ${GEN_DEPENDS}
${GENSCRIPTS} elf32openrisc "$(tdir_openrisc)"
-eelf32ppc.c: $(srcdir)/emulparams/elf32ppc.sh $(srcdir)/emultempl/ppc32elf.em \
- $(srcdir)/emultempl/elf32.em $(srcdir)/scripttempl/elf.sc ${GEN_DEPENDS}
+eelf32ppc.c: $(srcdir)/emulparams/elf32ppc.sh \
+ $(srcdir)/emulparams/elf32ppccommon.sh $(srcdir)/emultempl/ppc32elf.em \
+ ldemul-list.h \
+ $(ELF_DEPS) $(srcdir)/scripttempl/elf.sc ${GEN_DEPENDS}
${GENSCRIPTS} elf32ppc "$(tdir_elf32ppc)"
eelf32ppc_fbsd.c: $(srcdir)/emulparams/elf32ppc_fbsd.sh \
- $(srcdir)/emulparams/elf32ppc.sh $(srcdir)/emultempl/ppc32elf.em \
- $(srcdir)/emultempl/elf32.em $(srcdir)/scripttempl/elf.sc ${GEN_DEPENDS}
+ $(srcdir)/emulparams/elf32ppc.sh $(srcdir)/emulparams/elf32ppccommon.sh \
+ $(srcdir)/emultempl/ppc32elf.em $(ELF_DEPS) \
+ ldemul-list.h \
+ $(srcdir)/scripttempl/elf.sc ${GEN_DEPENDS}
${GENSCRIPTS} elf32ppc_fbsd "$(tdir_elf32ppc_fbsd)"
eelf32ppcsim.c: $(srcdir)/emulparams/elf32ppcsim.sh \
- $(srcdir)/emulparams/elf32ppc.sh $(srcdir)/emultempl/ppc32elf.em \
- $(srcdir)/emultempl/elf32.em $(srcdir)/scripttempl/elf.sc ${GEN_DEPENDS}
+ $(srcdir)/emulparams/elf32ppc.sh $(srcdir)/emulparams/elf32ppccommon.sh \
+ $(srcdir)/emultempl/ppc32elf.em $(ELF_DEPS) \
+ ldemul-list.h \
+ $(srcdir)/scripttempl/elf.sc ${GEN_DEPENDS}
${GENSCRIPTS} elf32ppcsim "$(tdir_elf32ppcsim)"
eelf32ppclinux.c: $(srcdir)/emulparams/elf32ppclinux.sh \
- $(srcdir)/emulparams/elf32ppc.sh $(srcdir)/emultempl/ppc32elf.em \
- $(srcdir)/emultempl/elf32.em $(srcdir)/scripttempl/elf.sc ${GEN_DEPENDS}
+ $(srcdir)/emulparams/elf32ppc.sh $(srcdir)/emulparams/elf32ppccommon.sh \
+ $(srcdir)/emultempl/ppc32elf.em $(ELF_DEPS) \
+ ldemul-list.h \
+ $(srcdir)/scripttempl/elf.sc ${GEN_DEPENDS}
${GENSCRIPTS} elf32ppclinux "$(tdir_elf32ppclinux)"
eelf64ppc.c: $(srcdir)/emulparams/elf64ppc.sh $(srcdir)/emultempl/ppc64elf.em \
- $(srcdir)/emultempl/elf32.em $(srcdir)/scripttempl/elf.sc ${GEN_DEPENDS}
+ ldemul-list.h \
+ $(ELF_DEPS) $(srcdir)/scripttempl/elf.sc ${GEN_DEPENDS}
${GENSCRIPTS} elf64ppc "$(tdir_elf64ppc)"
eelf64lppc.c: $(srcdir)/emulparams/elf64lppc.sh \
$(srcdir)/emulparams/elf64ppc.sh $(srcdir)/emultempl/ppc64elf.em \
- $(srcdir)/emultempl/elf32.em $(srcdir)/scripttempl/elf.sc ${GEN_DEPENDS}
+ ldemul-list.h \
+ $(ELF_DEPS) $(srcdir)/scripttempl/elf.sc ${GEN_DEPENDS}
${GENSCRIPTS} elf64lppc "$(tdir_elf64lppc)"
eelf32i370.c: $(srcdir)/emulparams/elf32i370.sh \
- $(srcdir)/emultempl/elf32.em $(srcdir)/scripttempl/elfi370.sc ${GEN_DEPENDS}
+ $(ELF_DEPS) $(srcdir)/scripttempl/elfi370.sc ${GEN_DEPENDS}
${GENSCRIPTS} elf32i370 "$(tdir_elf32i370)"
eelf32ip2k.c: $(srcdir)/emulparams/elf32ip2k.sh \
- $(srcdir)/emultempl/elf32.em $(srcdir)/scripttempl/ip2k.sc ${GEN_DEPENDS}
+ $(ELF_DEPS) $(srcdir)/scripttempl/ip2k.sc ${GEN_DEPENDS}
${GENSCRIPTS} elf32ip2k "$(tdir_ip2k)"
eelf32iq2000.c: $(srcdir)/emulparams/elf32iq2000.sh \
- $(srcdir)/emultempl/elf32.em $(srcdir)/scripttempl/iq2000.sc ${GEN_DEPENDS}
+ $(ELF_GEN_DEPS) $(srcdir)/scripttempl/iq2000.sc ${GEN_DEPENDS}
${GENSCRIPTS} elf32iq2000 "$(tdir_iq2000)"
eelf32iq10.c: $(srcdir)/emulparams/elf32iq10.sh \
- $(srcdir)/emultempl/elf32.em $(srcdir)/scripttempl/iq2000.sc ${GEN_DEPENDS}
+ $(ELF_GEN_DEPS) $(srcdir)/scripttempl/iq2000.sc ${GEN_DEPENDS}
${GENSCRIPTS} elf32iq10 "$(tdir_iq10)"
eelf64alpha.c: $(srcdir)/emulparams/elf64alpha.sh \
- $(srcdir)/emultempl/elf32.em $(srcdir)/scripttempl/elf.sc ${GEN_DEPENDS}
+ $(ELF_DEPS) $(srcdir)/emultempl/alphaelf.em \
+ $(srcdir)/scripttempl/elf.sc ${GEN_DEPENDS}
${GENSCRIPTS} elf64alpha "$(tdir_elf64alpha)"
eelf64alpha_fbsd.c: $(srcdir)/emulparams/elf64alpha_fbsd.sh \
$(srcdir)/emulparams/elf64alpha.sh \
- $(srcdir)/emultempl/elf32.em $(srcdir)/scripttempl/elf.sc ${GEN_DEPENDS}
+ $(ELF_DEPS) $(srcdir)/emultempl/alphaelf.em \
+ $(srcdir)/scripttempl/elf.sc ${GEN_DEPENDS}
${GENSCRIPTS} elf64alpha_fbsd "$(tdir_elf64alpha_fbsd)"
eelf64alpha_nbsd.c: $(srcdir)/emulparams/elf64alpha_nbsd.sh \
$(srcdir)/emulparams/elf64alpha.sh \
- $(srcdir)/emultempl/elf32.em $(srcdir)/scripttempl/elf.sc ${GEN_DEPENDS}
+ $(ELF_DEPS) $(srcdir)/emultempl/alphaelf.em \
+ $(srcdir)/scripttempl/elf.sc ${GEN_DEPENDS}
${GENSCRIPTS} elf64alpha_nbsd "$(tdir_elf64alpha_nbsd)"
eelf64hppa.c: $(srcdir)/emulparams/elf64hppa.sh \
$(srcdir)/emulparams/hppa64linux.sh \
- $(srcdir)/emultempl/elf32.em $(srcdir)/scripttempl/elf.sc ${GEN_DEPENDS}
+ $(ELF_DEPS) $(srcdir)/scripttempl/elf.sc ${GEN_DEPENDS}
${GENSCRIPTS} elf64hppa "$(tdir_elf64hppa)"
eelf64_aix.c: $(srcdir)/emulparams/elf64_aix.sh \
- $(srcdir)/emultempl/elf32.em $(srcdir)/scripttempl/elf.sc ${GEN_DEPENDS}
+ $(ELF_DEPS) $(srcdir)/scripttempl/elf.sc ${GEN_DEPENDS}
${GENSCRIPTS} elf64_aix "$(tdir_elf64_aix)"
eelf64_ia64.c: $(srcdir)/emulparams/elf64_ia64.sh \
- $(srcdir)/emultempl/elf32.em $(srcdir)/emultempl/ia64elf.em \
+ $(ELF_DEPS) $(srcdir)/emultempl/ia64elf.em \
$(srcdir)/emultempl/needrelax.em \
$(srcdir)/scripttempl/elf.sc ${GEN_DEPENDS}
${GENSCRIPTS} elf64_ia64 "$(tdir_elf64_ia64)"
eelf64_ia64_fbsd.c: $(srcdir)/emulparams/elf64_ia64_fbsd.sh \
$(srcdir)/emulparams/elf64_ia64.sh \
- $(srcdir)/emultempl/elf32.em $(srcdir)/emultempl/ia64elf.em \
+ $(ELF_DEPS) $(srcdir)/emultempl/ia64elf.em \
$(srcdir)/emultempl/needrelax.em \
$(srcdir)/scripttempl/elf.sc ${GEN_DEPENDS}
${GENSCRIPTS} elf64_ia64_fbsd "$(tdir_elf64_ia64_fbsd)"
eelf64_s390.c: $(srcdir)/emulparams/elf64_s390.sh \
- $(srcdir)/emultempl/elf32.em $(srcdir)/scripttempl/elf.sc ${GEN_DEPENDS}
+ $(ELF_DEPS) $(srcdir)/scripttempl/elf.sc ${GEN_DEPENDS}
${GENSCRIPTS} elf64_s390 "$(tdir_elf64_s390)"
eelf64_sparc.c: $(srcdir)/emulparams/elf64_sparc.sh \
- $(srcdir)/emultempl/elf32.em $(srcdir)/scripttempl/elf.sc ${GEN_DEPENDS}
+ $(ELF_DEPS) $(srcdir)/scripttempl/elf.sc ${GEN_DEPENDS}
${GENSCRIPTS} elf64_sparc "$(tdir_elf64_sparc)"
eelf64_sparc_fbsd.c: $(srcdir)/emulparams/elf64_sparc_fbsd.sh \
$(srcdir)/emulparams/elf64_sparc.sh \
- $(srcdir)/emultempl/elf32.em $(srcdir)/scripttempl/elf.sc ${GEN_DEPENDS}
+ $(ELF_DEPS) $(srcdir)/scripttempl/elf.sc ${GEN_DEPENDS}
${GENSCRIPTS} elf64_sparc_fbsd "$(tdir_elf64_sparc_fbsd)"
eelf64bmip.c: $(srcdir)/emulparams/elf64bmip.sh \
- $(srcdir)/emulparams/elf32bmipn32.sh $(srcdir)/emultempl/irix.em \
- $(srcdir)/emultempl/elf32.em $(srcdir)/scripttempl/elf.sc ${GEN_DEPENDS}
+ $(srcdir)/emulparams/elf64bmip-defs.sh \
+ $(srcdir)/emulparams/elf32bmipn32-defs.sh $(ELF_DEPS) \
+ $(srcdir)/emultempl/irix.em $(srcdir)/emultempl/mipself.em \
+ $(srcdir)/scripttempl/elf.sc ${GEN_DEPENDS}
${GENSCRIPTS} elf64bmip "$(tdir_elf64bmip)"
eelf64mmix.c: $(srcdir)/emulparams/elf64mmix.sh \
- $(srcdir)/emultempl/elf32.em $(srcdir)/emultempl/mmix-elfnmmo.em \
+ $(ELF_DEPS) $(srcdir)/emultempl/mmix-elfnmmo.em \
$(srcdir)/emultempl/mmixelf.em $(srcdir)/scripttempl/elf.sc ${GEN_DEPENDS}
${GENSCRIPTS} elf64mmix "$(tdir_elf64mmix)"
emmo.c: $(srcdir)/emulparams/mmo.sh $(srcdir)/emultempl/mmix-elfnmmo.em \
- $(srcdir)/emultempl/generic.em $(srcdir)/emultempl/mmo.em \
+ $(srcdir)/emultempl/generic.em $(srcdir)/emultempl/elf-generic.em \
+ $(srcdir)/emultempl/mmo.em \
$(srcdir)/scripttempl/mmo.sc ${GEN_DEPENDS}
${GENSCRIPTS} mmo "$(tdir_mmo)"
eelf64btsmip.c: $(srcdir)/emulparams/elf64btsmip.sh \
- $(srcdir)/emulparams/elf32bmipn32.sh \
- $(srcdir)/emultempl/elf32.em $(srcdir)/scripttempl/elf.sc ${GEN_DEPENDS}
+ $(srcdir)/emulparams/elf64bmip-defs.sh \
+ $(srcdir)/emulparams/elf32bmipn32-defs.sh $(ELF_DEPS) \
+ $(srcdir)/emultempl/mipself.em $(srcdir)/scripttempl/elf.sc ${GEN_DEPENDS}
${GENSCRIPTS} elf64btsmip "$(tdir_elf64btsmip)"
eelf64ltsmip.c: $(srcdir)/emulparams/elf64ltsmip.sh \
- $(srcdir)/emulparams/elf64btsmip.sh $(srcdir)/emulparams/elf32bmipn32.sh \
- $(srcdir)/emultempl/elf32.em $(srcdir)/scripttempl/elf.sc ${GEN_DEPENDS}
+ $(srcdir)/emulparams/elf64btsmip.sh $(srcdir)/emulparams/elf64bmip-defs.sh \
+ $(srcdir)/emulparams/elf32bmipn32-defs.sh $(ELF_DEPS) \
+ $(srcdir)/emultempl/mipself.em $(srcdir)/scripttempl/elf.sc ${GEN_DEPENDS}
${GENSCRIPTS} elf64ltsmip "$(tdir_elf64ltsmip)"
eelf_i386.c: $(srcdir)/emulparams/elf_i386.sh \
- $(srcdir)/emultempl/elf32.em $(srcdir)/scripttempl/elf.sc ${GEN_DEPENDS}
+ $(ELF_DEPS) $(srcdir)/scripttempl/elf.sc ${GEN_DEPENDS}
${GENSCRIPTS} elf_i386 "$(tdir_elf_i386)"
eelf_x86_64.c: $(srcdir)/emulparams/elf_x86_64.sh \
- $(srcdir)/emultempl/elf32.em $(srcdir)/scripttempl/elf.sc ${GEN_DEPENDS}
+ $(ELF_DEPS) $(srcdir)/scripttempl/elf.sc ${GEN_DEPENDS}
${GENSCRIPTS} elf_x86_64 "$(tdir_elf_x86_64)"
eelf_x86_64_fbsd.c: $(srcdir)/emulparams/elf_x86_64_fbsd.sh \
$(srcdir)/emulparams/elf_x86_64.sh \
- $(srcdir)/emultempl/elf32.em $(srcdir)/scripttempl/elf.sc ${GEN_DEPENDS}
+ $(ELF_DEPS) $(srcdir)/scripttempl/elf.sc ${GEN_DEPENDS}
${GENSCRIPTS} elf_x86_64_fbsd "$(tdir_elf_x86_64_fbsd)"
eelf_i386_be.c: $(srcdir)/emulparams/elf_i386_be.sh \
- $(srcdir)/emultempl/elf32.em $(srcdir)/scripttempl/elf.sc ${GEN_DEPENDS}
+ $(ELF_DEPS) $(srcdir)/scripttempl/elf.sc ${GEN_DEPENDS}
${GENSCRIPTS} elf_i386_be "$(tdir_elf_i386_be)"
eelf_i386_chaos.c: $(srcdir)/emulparams/elf_i386_chaos.sh \
- $(srcdir)/emultempl/elf32.em $(srcdir)/scripttempl/elf_chaos.sc ${GEN_DEPENDS}
+ $(ELF_DEPS) $(srcdir)/scripttempl/elf_chaos.sc ${GEN_DEPENDS}
${GENSCRIPTS} elf_i386_chaos "$(tdir_elf_i386_chaos)"
eelf_i386_fbsd.c: $(srcdir)/emulparams/elf_i386_fbsd.sh \
$(srcdir)/emulparams/elf_i386.sh \
- $(srcdir)/emultempl/elf32.em $(srcdir)/scripttempl/elf.sc ${GEN_DEPENDS}
+ $(ELF_DEPS) $(srcdir)/scripttempl/elf.sc ${GEN_DEPENDS}
${GENSCRIPTS} elf_i386_fbsd "$(tdir_elf_i386_fbsd)"
eelf_i386_ldso.c: $(srcdir)/emulparams/elf_i386_ldso.sh \
- $(srcdir)/emultempl/elf32.em $(srcdir)/scripttempl/elf.sc ${GEN_DEPENDS}
+ $(ELF_DEPS) $(srcdir)/scripttempl/elf.sc ${GEN_DEPENDS}
${GENSCRIPTS} elf_i386_ldso "$(tdir_elf_i386_ldso)"
+eelf_i386_vxworks.c: $(srcdir)/emulparams/elf_i386_vxworks.sh \
+ $(srcdir)/emulparams/vxworks.sh $(srcdir)/emultempl/vxworks.em \
+ $(ELF_DEPS) $(srcdir)/scripttempl/elf.sc ${GEN_DEPENDS}
+ ${GENSCRIPTS} elf_i386_vxworks "$(tdir_elf_i386_vxworks)"
eelf_s390.c: $(srcdir)/emulparams/elf_s390.sh \
- $(srcdir)/emultempl/elf32.em $(srcdir)/scripttempl/elf.sc ${GEN_DEPENDS}
+ $(ELF_DEPS) $(srcdir)/scripttempl/elf.sc ${GEN_DEPENDS}
${GENSCRIPTS} elf_s390 "$(tdir_elf_s390)"
egld960.c: $(srcdir)/emulparams/gld960.sh \
$(srcdir)/emultempl/gld960.em $(srcdir)/scripttempl/i960.sc ${GEN_DEPENDS}
@@ -855,31 +1036,31 @@ eh8300sxn.c: $(srcdir)/emulparams/h8300sxn.sh \
$(srcdir)/emultempl/generic.em $(srcdir)/scripttempl/h8300sxn.sc ${GEN_DEPENDS}
${GENSCRIPTS} h8300sxn "$(tdir_h8300sxn)"
eh8300elf.c: $(srcdir)/emulparams/h8300elf.sh \
- $(srcdir)/emultempl/elf32.em $(srcdir)/scripttempl/elf.sc ${GEN_DEPENDS}
+ $(ELF_DEPS) $(srcdir)/scripttempl/elf.sc ${GEN_DEPENDS}
${GENSCRIPTS} h8300elf "$(tdir_h8300elf)"
eh8300helf.c: $(srcdir)/emulparams/h8300helf.sh \
$(srcdir)/emulparams/h8300elf.sh \
- $(srcdir)/emultempl/elf32.em $(srcdir)/scripttempl/elf.sc ${GEN_DEPENDS}
+ $(ELF_DEPS) $(srcdir)/scripttempl/elf.sc ${GEN_DEPENDS}
${GENSCRIPTS} h8300helf "$(tdir_h8300helf)"
eh8300self.c: $(srcdir)/emulparams/h8300self.sh \
$(srcdir)/emulparams/h8300elf.sh \
- $(srcdir)/emultempl/elf32.em $(srcdir)/scripttempl/elf.sc ${GEN_DEPENDS}
+ $(ELF_DEPS) $(srcdir)/scripttempl/elf.sc ${GEN_DEPENDS}
${GENSCRIPTS} h8300self "$(tdir_h8300self)"
eh8300hnelf.c: $(srcdir)/emulparams/h8300hnelf.sh \
$(srcdir)/emulparams/h8300elf.sh \
- $(srcdir)/emultempl/elf32.em $(srcdir)/scripttempl/elf.sc ${GEN_DEPENDS}
+ $(ELF_DEPS) $(srcdir)/scripttempl/elf.sc ${GEN_DEPENDS}
${GENSCRIPTS} h8300hnelf "$(tdir_h8300hnelf)"
eh8300snelf.c: $(srcdir)/emulparams/h8300snelf.sh \
$(srcdir)/emulparams/h8300elf.sh \
- $(srcdir)/emultempl/elf32.em $(srcdir)/scripttempl/elf.sc ${GEN_DEPENDS}
+ $(ELF_DEPS) $(srcdir)/scripttempl/elf.sc ${GEN_DEPENDS}
${GENSCRIPTS} h8300snelf "$(tdir_h8300snelf)"
eh8300sxelf.c: $(srcdir)/emulparams/h8300sxelf.sh \
$(srcdir)/emulparams/h8300elf.sh \
- $(srcdir)/emultempl/elf32.em $(srcdir)/scripttempl/elf.sc ${GEN_DEPENDS}
+ $(ELF_DEPS) $(srcdir)/scripttempl/elf.sc ${GEN_DEPENDS}
${GENSCRIPTS} h8300sxelf "$(tdir_h8300sxelf)"
eh8300sxnelf.c: $(srcdir)/emulparams/h8300sxnelf.sh \
$(srcdir)/emulparams/h8300elf.sh \
- $(srcdir)/emultempl/elf32.em $(srcdir)/scripttempl/elf.sc ${GEN_DEPENDS}
+ $(ELF_DEPS) $(srcdir)/scripttempl/elf.sc ${GEN_DEPENDS}
${GENSCRIPTS} h8300sxnelf "$(tdir_h8300sxnelf)"
eh8500.c: $(srcdir)/emulparams/h8500.sh \
$(srcdir)/emultempl/generic.em $(srcdir)/scripttempl/h8500.sc ${GEN_DEPENDS}
@@ -903,24 +1084,24 @@ 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/elf32.em $(srcdir)/emultempl/hppaelf.em \
+ $(ELF_DEPS) $(srcdir)/emultempl/hppaelf.em \
$(srcdir)/scripttempl/hppaelf.sc ${GEN_DEPENDS}
${GENSCRIPTS} hppaelf "$(tdir_hppaelf)"
ehppalinux.c: $(srcdir)/emulparams/hppalinux.sh \
- $(srcdir)/emultempl/elf32.em $(srcdir)/emultempl/hppaelf.em \
+ $(ELF_DEPS) $(srcdir)/emultempl/hppaelf.em \
$(srcdir)/scripttempl/elf.sc ${GEN_DEPENDS}
${GENSCRIPTS} hppalinux "$(tdir_hppalinux)"
ehppanbsd.c: $(srcdir)/emulparams/hppanbsd.sh \
$(srcdir)/emulparams/hppaelf.sh \
- $(srcdir)/emultempl/elf32.em $(srcdir)/emultempl/hppaelf.em \
+ $(ELF_DEPS) $(srcdir)/emultempl/hppaelf.em \
$(srcdir)/scripttempl/elf.sc ${GEN_DEPENDS}
${GENSCRIPTS} hppanbsd "$(tdir_hppanbsd)"
ehppaobsd.c: $(srcdir)/emulparams/hppaobsd.sh \
- $(srcdir)/emultempl/elf32.em $(srcdir)/emultempl/hppaelf.em \
+ $(ELF_DEPS) $(srcdir)/emultempl/hppaelf.em \
$(srcdir)/scripttempl/elf.sc ${GEN_DEPENDS}
${GENSCRIPTS} hppaobsd "$(tdir_hppaobsd)"
ehppa64linux.c: $(srcdir)/emulparams/hppa64linux.sh \
- $(srcdir)/emultempl/elf32.em $(srcdir)/scripttempl/elf.sc ${GEN_DEPENDS}
+ $(ELF_DEPS) $(srcdir)/scripttempl/elf.sc ${GEN_DEPENDS}
${GENSCRIPTS} hppa64linux "$(tdir_hppa64linux)"
ei386aout.c: $(srcdir)/emulparams/i386aout.sh \
$(srcdir)/emultempl/generic.em $(srcdir)/scripttempl/aout.sc ${GEN_DEPENDS}
@@ -941,13 +1122,13 @@ 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}
+ $(ELF_DEPS) $(srcdir)/scripttempl/elf.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/elf32.em $(srcdir)/scripttempl/elf.sc ${GEN_DEPENDS}
+ $(ELF_DEPS) $(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}
@@ -956,10 +1137,10 @@ ei386nbsd.c: $(srcdir)/emulparams/i386nbsd.sh \
$(srcdir)/emultempl/generic.em $(srcdir)/scripttempl/aout.sc ${GEN_DEPENDS}
${GENSCRIPTS} i386nbsd "$(tdir_i386nbsd)"
ei386nto.c: $(srcdir)/emulparams/i386nto.sh \
- $(srcdir)/emultempl/elf32.em $(srcdir)/scripttempl/elf.sc ${GEN_DEPENDS}
+ $(ELF_DEPS) $(srcdir)/scripttempl/elf.sc ${GEN_DEPENDS}
${GENSCRIPTS} i386nto "$(tdir_i386nto)"
ei386nw.c: $(srcdir)/emulparams/i386nw.sh \
- $(srcdir)/emultempl/elf32.em $(srcdir)/scripttempl/nw.sc ${GEN_DEPENDS}
+ $(ELF_DEPS) $(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}
@@ -967,23 +1148,26 @@ ei386pe.c: $(srcdir)/emulparams/i386pe.sh \
ei386pe_posix.c: $(srcdir)/emulparams/i386pe_posix.sh \
$(srcdir)/emultempl/pe.em $(srcdir)/scripttempl/pe.sc ${GEN_DEPENDS}
${GENSCRIPTS} i386pe_posix "$(tdir_i386pe_posix)"
+ei386pep.c: $(srcdir)/emulparams/i386pep.sh \
+ $(srcdir)/emultempl/pep.em $(srcdir)/scripttempl/pep.sc ${GEN_DEPENDS}
+ ${GENSCRIPTS} i386pep "$(tdir_i386pe)"
elnk960.c: $(srcdir)/emulparams/lnk960.sh \
$(srcdir)/emultempl/lnk960.em $(srcdir)/scripttempl/i960.sc ${GEN_DEPENDS}
${GENSCRIPTS} lnk960 "$(tdir_lnk960)"
em68hc11elf.c: $(srcdir)/emulparams/m68hc11elf.sh \
- $(srcdir)/emultempl/m68hc1xelf.em $(srcdir)/emultempl/elf32.em \
+ $(srcdir)/emultempl/m68hc1xelf.em $(ELF_DEPS) \
$(srcdir)/scripttempl/elfm68hc11.sc ${GEN_DEPENDS}
${GENSCRIPTS} m68hc11elf "$(tdir_m68hc11)"
em68hc11elfb.c: $(srcdir)/emulparams/m68hc11elfb.sh \
- $(srcdir)/emultempl/m68hc1xelf.em $(srcdir)/emultempl/elf32.em \
+ $(srcdir)/emultempl/m68hc1xelf.em $(ELF_DEPS) \
$(srcdir)/scripttempl/elfm68hc11.sc ${GEN_DEPENDS}
${GENSCRIPTS} m68hc11elfb "$(tdir_m68hc11b)"
em68hc12elf.c: $(srcdir)/emulparams/m68hc12elf.sh \
- $(srcdir)/emultempl/m68hc1xelf.em $(srcdir)/emultempl/elf32.em \
+ $(srcdir)/emultempl/m68hc1xelf.em $(ELF_DEPS) \
$(srcdir)/scripttempl/elfm68hc12.sc ${GEN_DEPENDS}
${GENSCRIPTS} m68hc12elf "$(tdir_m68hc12)"
em68hc12elfb.c: $(srcdir)/emulparams/m68hc12elfb.sh \
- $(srcdir)/emultempl/m68hc1xelf.em $(srcdir)/emultempl/elf32.em \
+ $(srcdir)/emultempl/m68hc1xelf.em $(ELF_DEPS) \
$(srcdir)/scripttempl/elfm68hc12.sc ${GEN_DEPENDS}
${GENSCRIPTS} m68hc12elfb "$(tdir_m68hc12b)"
em68k4knbsd.c: $(srcdir)/emulparams/m68k4knbsd.sh \
@@ -999,246 +1183,296 @@ em68kcoff.c: $(srcdir)/emulparams/m68kcoff.sh \
$(srcdir)/emultempl/m68kcoff.em $(srcdir)/scripttempl/m68kcoff.sc ${GEN_DEPENDS}
${GENSCRIPTS} m68kcoff "$(tdir_m68kcoff)"
em68kelf.c: $(srcdir)/emulparams/m68kelf.sh \
- $(srcdir)/emultempl/elf32.em $(srcdir)/emultempl/m68kelf.em \
+ $(ELF_DEPS) $(srcdir)/emultempl/m68kelf.em \
$(srcdir)/scripttempl/elf.sc ${GEN_DEPENDS}
${GENSCRIPTS} m68kelf "$(tdir_m68kelf)"
em68kelfnbsd.c: $(srcdir)/emulparams/m68kelfnbsd.sh \
$(srcdir)/emulparams/m68kelf.sh \
- $(srcdir)/emultempl/elf32.em $(srcdir)/emultempl/m68kelf.em \
+ $(ELF_DEPS) $(srcdir)/emultempl/m68kelf.em \
$(srcdir)/scripttempl/elf.sc ${GEN_DEPENDS}
${GENSCRIPTS} m68kelfnbsd "$(tdir_m68kelfnbsd)"
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}
+ $(ELF_DEPS) $(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)"
+emaxqcoff.c: $(srcdir)/emulparams/maxqcoff.sh \
+ $(srcdir)/emultempl/generic.em $(srcdir)/scripttempl/maxqcoff.sc ${GEN_DEPENDS}
+ ${GENSCRIPTS} maxqcoff "$(tdir_maxqcoff)"
emcorepe.c: $(srcdir)/emulparams/mcorepe.sh \
$(srcdir)/emultempl/pe.em $(srcdir)/scripttempl/pe.sc ${GEN_DEPENDS}
${GENSCRIPTS} mcorepe "$(tdir_mcorepe)"
-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}
+emipsbig.c: $(srcdir)/emulparams/mipsbig.sh $(srcdir)/emultempl/generic.em \
+ $(srcdir)/scripttempl/mips.sc ${GEN_DEPENDS}
+ ${GENSCRIPTS} mipsbig "$(tdir_mipsbig)"
+emipsbsd.c: $(srcdir)/emulparams/mipsbsd.sh $(srcdir)/emultempl/generic.em \
+ $(srcdir)/scripttempl/mipsbsd.sc ${GEN_DEPENDS}
+ ${GENSCRIPTS} mipsbsd "$(tdir_mipsbsd)"
+emipsidt.c: $(srcdir)/emulparams/mipsidt.sh $(srcdir)/emultempl/generic.em \
+ $(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}
+emipsidtl.c: $(srcdir)/emulparams/mipsidtl.sh $(srcdir)/emultempl/generic.em \
+ $(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}
+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 \
+emipslnews.c: $(srcdir)/emulparams/mipslnews.sh \
$(srcdir)/emultempl/generic.em $(srcdir)/scripttempl/mips.sc ${GEN_DEPENDS}
- ${GENSCRIPTS} mipslnews
-emipspe.c: $(srcdir)/emulparams/mipspe.sh \
- $(srcdir)/emultempl/pe.em $(srcdir)/scripttempl/pe.sc ${GEN_DEPENDS}
- ${GENSCRIPTS} mipspe "$(tdir_mips)"
+ ${GENSCRIPTS} mipslnews "$(tdir_mipslnews)"
+emipspe.c: $(srcdir)/emulparams/mipspe.sh $(srcdir)/emultempl/pe.em \
+ $(srcdir)/scripttempl/pe.sc ${GEN_DEPENDS}
+ ${GENSCRIPTS} mipspe "$(tdir_mipspe)"
emn10300.c: $(srcdir)/emulparams/mn10300.sh \
$(srcdir)/emulparams/mn10200.sh \
- $(srcdir)/emultempl/elf32.em $(srcdir)/scripttempl/elf.sc ${GEN_DEPENDS}
+ $(ELF_DEPS) $(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}
+ $(ELF_GEN_DEPS) $(srcdir)/scripttempl/elf.sc ${GEN_DEPENDS}
${GENSCRIPTS} mn10200 "$(tdir_mn10200)"
emsp430x110.c: $(srcdir)/emulparams/msp430all.sh \
- $(srcdir)/emultempl/generic.em $(srcdir)/scripttempl/elf32msp430.sc \
+ $(ELF_GEN_DEPS) $(srcdir)/scripttempl/elf32msp430.sc \
${GEN_DEPENDS}
${GENSCRIPTS} msp430x110 "$(tdir_msp430x110)" msp430all
emsp430x112.c: $(srcdir)/emulparams/msp430all.sh \
- $(srcdir)/emultempl/generic.em $(srcdir)/scripttempl/elf32msp430.sc \
+ $(ELF_GEN_DEPS) $(srcdir)/scripttempl/elf32msp430.sc \
${GEN_DEPENDS}
${GENSCRIPTS} msp430x112 "$(tdir_msp430x112)" msp430all
emsp430x1101.c: $(srcdir)/emulparams/msp430all.sh \
- $(srcdir)/emultempl/generic.em $(srcdir)/scripttempl/elf32msp430.sc \
+ $(ELF_GEN_DEPS) $(srcdir)/scripttempl/elf32msp430.sc \
${GEN_DEPENDS}
${GENSCRIPTS} msp430x1101 "$(tdir_msp430x1101)" msp430all
emsp430x1111.c: $(srcdir)/emulparams/msp430all.sh \
- $(srcdir)/emultempl/generic.em $(srcdir)/scripttempl/elf32msp430.sc \
+ $(ELF_GEN_DEPS) $(srcdir)/scripttempl/elf32msp430.sc \
${GEN_DEPENDS}
${GENSCRIPTS} msp430x1111 "$(tdir_msp430x1111)" msp430all
emsp430x1121.c: $(srcdir)/emulparams/msp430all.sh \
- $(srcdir)/emultempl/generic.em $(srcdir)/scripttempl/elf32msp430.sc \
+ $(ELF_GEN_DEPS) $(srcdir)/scripttempl/elf32msp430.sc \
${GEN_DEPENDS}
${GENSCRIPTS} msp430x1121 "$(tdir_msp430x1121)" msp430all
emsp430x1122.c: $(srcdir)/emulparams/msp430all.sh \
- $(srcdir)/emultempl/generic.em $(srcdir)/scripttempl/elf32msp430.sc \
+ $(ELF_GEN_DEPS) $(srcdir)/scripttempl/elf32msp430.sc \
${GEN_DEPENDS}
${GENSCRIPTS} msp430x1122 "$(tdir_msp430x1122)" msp430all
emsp430x1132.c: $(srcdir)/emulparams/msp430all.sh \
- $(srcdir)/emultempl/generic.em $(srcdir)/scripttempl/elf32msp430.sc \
+ $(ELF_GEN_DEPS) $(srcdir)/scripttempl/elf32msp430.sc \
${GEN_DEPENDS}
${GENSCRIPTS} msp430x1132 "$(tdir_msp430x1132)" msp430all
emsp430x122.c: $(srcdir)/emulparams/msp430all.sh \
- $(srcdir)/emultempl/generic.em $(srcdir)/scripttempl/elf32msp430.sc \
+ $(ELF_GEN_DEPS) $(srcdir)/scripttempl/elf32msp430.sc \
${GEN_DEPENDS}
${GENSCRIPTS} msp430x122 "$(tdir_msp430x122)" msp430all
emsp430x123.c: $(srcdir)/emulparams/msp430all.sh \
- $(srcdir)/emultempl/generic.em $(srcdir)/scripttempl/elf32msp430.sc \
+ $(ELF_GEN_DEPS) $(srcdir)/scripttempl/elf32msp430.sc \
${GEN_DEPENDS}
${GENSCRIPTS} msp430x123 "$(tdir_msp430x123)" msp430all
emsp430x1222.c: $(srcdir)/emulparams/msp430all.sh \
- $(srcdir)/emultempl/generic.em $(srcdir)/scripttempl/elf32msp430.sc \
+ $(ELF_GEN_DEPS) $(srcdir)/scripttempl/elf32msp430.sc \
${GEN_DEPENDS}
${GENSCRIPTS} msp430x1222 "$(tdir_msp430x1222)" msp430all
emsp430x1232.c: $(srcdir)/emulparams/msp430all.sh \
- $(srcdir)/emultempl/generic.em $(srcdir)/scripttempl/elf32msp430.sc \
+ $(ELF_GEN_DEPS) $(srcdir)/scripttempl/elf32msp430.sc \
${GEN_DEPENDS}
${GENSCRIPTS} msp430x1232 "$(tdir_msp430x1232)" msp430all
emsp430x133.c: $(srcdir)/emulparams/msp430all.sh \
- $(srcdir)/emultempl/generic.em $(srcdir)/scripttempl/elf32msp430.sc \
+ $(ELF_GEN_DEPS) $(srcdir)/scripttempl/elf32msp430.sc \
${GEN_DEPENDS}
${GENSCRIPTS} msp430x133 "$(tdir_msp430x133)" msp430all
emsp430x135.c: $(srcdir)/emulparams/msp430all.sh \
- $(srcdir)/emultempl/generic.em $(srcdir)/scripttempl/elf32msp430.sc \
+ $(ELF_GEN_DEPS) $(srcdir)/scripttempl/elf32msp430.sc \
${GEN_DEPENDS}
${GENSCRIPTS} msp430x135 "$(tdir_msp430x135)" msp430all
emsp430x1331.c: $(srcdir)/emulparams/msp430all.sh \
- $(srcdir)/emultempl/generic.em $(srcdir)/scripttempl/elf32msp430.sc \
+ $(ELF_GEN_DEPS) $(srcdir)/scripttempl/elf32msp430.sc \
${GEN_DEPENDS}
${GENSCRIPTS} msp430x1331 "$(tdir_msp430x1331)" msp430all
emsp430x1351.c: $(srcdir)/emulparams/msp430all.sh \
- $(srcdir)/emultempl/generic.em $(srcdir)/scripttempl/elf32msp430.sc \
+ $(ELF_GEN_DEPS) $(srcdir)/scripttempl/elf32msp430.sc \
${GEN_DEPENDS}
${GENSCRIPTS} msp430x1351 "$(tdir_msp430x1351)" msp430all
emsp430x147.c: $(srcdir)/emulparams/msp430all.sh \
- $(srcdir)/emultempl/generic.em $(srcdir)/scripttempl/elf32msp430.sc \
+ $(ELF_GEN_DEPS) $(srcdir)/scripttempl/elf32msp430.sc \
${GEN_DEPENDS}
${GENSCRIPTS} msp430x147 "$(tdir_msp430x147)" msp430all
emsp430x148.c: $(srcdir)/emulparams/msp430all.sh \
- $(srcdir)/emultempl/generic.em $(srcdir)/scripttempl/elf32msp430.sc \
+ $(ELF_GEN_DEPS) $(srcdir)/scripttempl/elf32msp430.sc \
${GEN_DEPENDS}
${GENSCRIPTS} msp430x148 "$(tdir_msp430x148)" msp430all
emsp430x149.c: $(srcdir)/emulparams/msp430all.sh \
- $(srcdir)/emultempl/generic.em $(srcdir)/scripttempl/elf32msp430.sc \
+ $(ELF_GEN_DEPS) $(srcdir)/scripttempl/elf32msp430.sc \
${GEN_DEPENDS}
${GENSCRIPTS} msp430x149 "$(tdir_msp430x149)" msp430all
emsp430x155.c: $(srcdir)/emulparams/msp430all.sh \
- $(srcdir)/emultempl/generic.em $(srcdir)/scripttempl/elf32msp430.sc \
+ $(ELF_GEN_DEPS) $(srcdir)/scripttempl/elf32msp430.sc \
${GEN_DEPENDS}
${GENSCRIPTS} msp430x155 "$(tdir_msp430x155)" msp430all
emsp430x156.c: $(srcdir)/emulparams/msp430all.sh \
- $(srcdir)/emultempl/generic.em $(srcdir)/scripttempl/elf32msp430.sc \
+ $(ELF_GEN_DEPS) $(srcdir)/scripttempl/elf32msp430.sc \
${GEN_DEPENDS}
${GENSCRIPTS} msp430x156 "$(tdir_msp430x156)" msp430all
emsp430x157.c: $(srcdir)/emulparams/msp430all.sh \
- $(srcdir)/emultempl/generic.em $(srcdir)/scripttempl/elf32msp430.sc \
+ $(ELF_GEN_DEPS) $(srcdir)/scripttempl/elf32msp430.sc \
${GEN_DEPENDS}
${GENSCRIPTS} msp430x157 "$(tdir_msp430x157)" msp430all
emsp430x167.c: $(srcdir)/emulparams/msp430all.sh \
- $(srcdir)/emultempl/generic.em $(srcdir)/scripttempl/elf32msp430.sc \
+ $(ELF_GEN_DEPS) $(srcdir)/scripttempl/elf32msp430.sc \
${GEN_DEPENDS}
${GENSCRIPTS} msp430x167 "$(tdir_msp430x167)" msp430all
emsp430x168.c: $(srcdir)/emulparams/msp430all.sh \
- $(srcdir)/emultempl/generic.em $(srcdir)/scripttempl/elf32msp430.sc \
+ $(ELF_GEN_DEPS) $(srcdir)/scripttempl/elf32msp430.sc \
${GEN_DEPENDS}
${GENSCRIPTS} msp430x168 "$(tdir_msp430x168)" msp430all
emsp430x169.c: $(srcdir)/emulparams/msp430all.sh \
- $(srcdir)/emultempl/generic.em $(srcdir)/scripttempl/elf32msp430.sc \
+ $(ELF_GEN_DEPS) $(srcdir)/scripttempl/elf32msp430.sc \
${GEN_DEPENDS}
${GENSCRIPTS} msp430x169 "$(tdir_msp430x169)" msp430all
+emsp430x1610.c: $(srcdir)/emulparams/msp430all.sh \
+ $(ELF_GEN_DEPS) $(srcdir)/scripttempl/elf32msp430.sc \
+ ${GEN_DEPENDS}
+ ${GENSCRIPTS} msp430x1610 "$(tdir_msp430x1610)" msp430all
+emsp430x1611.c: $(srcdir)/emulparams/msp430all.sh \
+ $(ELF_GEN_DEPS) $(srcdir)/scripttempl/elf32msp430.sc \
+ ${GEN_DEPENDS}
+ ${GENSCRIPTS} msp430x1611 "$(tdir_msp430x1611)" msp430all
+emsp430x1612.c: $(srcdir)/emulparams/msp430all.sh \
+ $(ELF_GEN_DEPS) $(srcdir)/scripttempl/elf32msp430.sc \
+ ${GEN_DEPENDS}
+ ${GENSCRIPTS} msp430x1612 "$(tdir_msp430x1612)" msp430all
+emsp430x2101.c: $(srcdir)/emulparams/msp430all.sh \
+ $(ELF_GEN_DEPS) $(srcdir)/scripttempl/elf32msp430.sc \
+ ${GEN_DEPENDS}
+ ${GENSCRIPTS} msp430x2101 "$(tdir_msp430x2101)" msp430all
+emsp430x2111.c: $(srcdir)/emulparams/msp430all.sh \
+ $(ELF_GEN_DEPS) $(srcdir)/scripttempl/elf32msp430.sc \
+ ${GEN_DEPENDS}
+ ${GENSCRIPTS} msp430x2111 "$(tdir_msp430x2111)" msp430all
+emsp430x2121.c: $(srcdir)/emulparams/msp430all.sh \
+ $(ELF_GEN_DEPS) $(srcdir)/scripttempl/elf32msp430.sc \
+ ${GEN_DEPENDS}
+ ${GENSCRIPTS} msp430x2121 "$(tdir_msp430x2121)" msp430all
+emsp430x2131.c: $(srcdir)/emulparams/msp430all.sh \
+ $(ELF_GEN_DEPS) $(srcdir)/scripttempl/elf32msp430.sc \
+ ${GEN_DEPENDS}
+ ${GENSCRIPTS} msp430x2131 "$(tdir_msp430x2131)" msp430all
emsp430x311.c: $(srcdir)/emulparams/msp430all.sh \
- $(srcdir)/emultempl/generic.em $(srcdir)/scripttempl/elf32msp430_3.sc \
+ $(ELF_GEN_DEPS) $(srcdir)/scripttempl/elf32msp430_3.sc \
${GEN_DEPENDS}
${GENSCRIPTS} msp430x311 "$(tdir_msp430x311)" msp430all
emsp430x312.c: $(srcdir)/emulparams/msp430all.sh \
- $(srcdir)/emultempl/generic.em $(srcdir)/scripttempl/elf32msp430_3.sc \
+ $(ELF_GEN_DEPS) $(srcdir)/scripttempl/elf32msp430_3.sc \
${GEN_DEPENDS}
${GENSCRIPTS} msp430x312 "$(tdir_msp430x312)" msp430all
emsp430x313.c: $(srcdir)/emulparams/msp430all.sh \
- $(srcdir)/emultempl/generic.em $(srcdir)/scripttempl/elf32msp430_3.sc \
+ $(ELF_GEN_DEPS) $(srcdir)/scripttempl/elf32msp430_3.sc \
${GEN_DEPENDS}
${GENSCRIPTS} msp430x313 "$(tdir_msp430x313)" msp430all
emsp430x314.c: $(srcdir)/emulparams/msp430all.sh \
- $(srcdir)/emultempl/generic.em $(srcdir)/scripttempl/elf32msp430_3.sc \
+ $(ELF_GEN_DEPS) $(srcdir)/scripttempl/elf32msp430_3.sc \
${GEN_DEPENDS}
${GENSCRIPTS} msp430x314 "$(tdir_msp430x314)" msp430all
emsp430x315.c: $(srcdir)/emulparams/msp430all.sh \
- $(srcdir)/emultempl/generic.em $(srcdir)/scripttempl/elf32msp430_3.sc \
+ $(ELF_GEN_DEPS) $(srcdir)/scripttempl/elf32msp430_3.sc \
${GEN_DEPENDS}
${GENSCRIPTS} msp430x315 "$(tdir_msp430x315)" msp430all
emsp430x323.c: $(srcdir)/emulparams/msp430all.sh \
- $(srcdir)/emultempl/generic.em $(srcdir)/scripttempl/elf32msp430_3.sc \
+ $(ELF_GEN_DEPS) $(srcdir)/scripttempl/elf32msp430_3.sc \
${GEN_DEPENDS}
${GENSCRIPTS} msp430x323 "$(tdir_msp430x323)" msp430all
emsp430x325.c: $(srcdir)/emulparams/msp430all.sh \
- $(srcdir)/emultempl/generic.em $(srcdir)/scripttempl/elf32msp430_3.sc \
+ $(ELF_GEN_DEPS) $(srcdir)/scripttempl/elf32msp430_3.sc \
${GEN_DEPENDS}
${GENSCRIPTS} msp430x325 "$(tdir_msp430x325)" msp430all
emsp430x336.c: $(srcdir)/emulparams/msp430all.sh \
- $(srcdir)/emultempl/generic.em $(srcdir)/scripttempl/elf32msp430_3.sc \
+ $(ELF_GEN_DEPS) $(srcdir)/scripttempl/elf32msp430_3.sc \
${GEN_DEPENDS}
${GENSCRIPTS} msp430x336 "$(tdir_msp430x336)" msp430all
emsp430x337.c: $(srcdir)/emulparams/msp430all.sh \
- $(srcdir)/emultempl/generic.em $(srcdir)/scripttempl/elf32msp430_3.sc \
+ $(ELF_GEN_DEPS) $(srcdir)/scripttempl/elf32msp430_3.sc \
${GEN_DEPENDS}
${GENSCRIPTS} msp430x337 "$(tdir_msp430x337)" msp430all
emsp430x412.c: $(srcdir)/emulparams/msp430all.sh \
- $(srcdir)/emultempl/generic.em $(srcdir)/scripttempl/elf32msp430.sc \
+ $(ELF_GEN_DEPS) $(srcdir)/scripttempl/elf32msp430.sc \
${GEN_DEPENDS}
${GENSCRIPTS} msp430x412 "$(tdir_msp430x412)" msp430all
emsp430x413.c: $(srcdir)/emulparams/msp430all.sh \
- $(srcdir)/emultempl/generic.em $(srcdir)/scripttempl/elf32msp430.sc \
+ $(ELF_GEN_DEPS) $(srcdir)/scripttempl/elf32msp430.sc \
${GEN_DEPENDS}
${GENSCRIPTS} msp430x413 "$(tdir_msp430x413)" msp430all
+emsp430x415.c: $(srcdir)/emulparams/msp430all.sh \
+ $(ELF_GEN_DEPS) $(srcdir)/scripttempl/elf32msp430.sc \
+ ${GEN_DEPENDS}
+ ${GENSCRIPTS} msp430x415 "$(tdir_msp430x415)" msp430all
+emsp430x417.c: $(srcdir)/emulparams/msp430all.sh \
+ $(ELF_GEN_DEPS) $(srcdir)/scripttempl/elf32msp430.sc \
+ ${GEN_DEPENDS}
+ ${GENSCRIPTS} msp430x417 "$(tdir_msp430x417)" msp430all
emsp430xE423.c: $(srcdir)/emulparams/msp430all.sh \
- $(srcdir)/emultempl/generic.em $(srcdir)/scripttempl/elf32msp430.sc \
+ $(ELF_GEN_DEPS) $(srcdir)/scripttempl/elf32msp430.sc \
${GEN_DEPENDS}
${GENSCRIPTS} msp430xE423 "$(tdir_msp430xE423)" msp430all
emsp430xE425.c: $(srcdir)/emulparams/msp430all.sh \
- $(srcdir)/emultempl/generic.em $(srcdir)/scripttempl/elf32msp430.sc \
+ $(ELF_GEN_DEPS) $(srcdir)/scripttempl/elf32msp430.sc \
${GEN_DEPENDS}
${GENSCRIPTS} msp430xE425 "$(tdir_msp430xE425)" msp430all
emsp430xE427.c: $(srcdir)/emulparams/msp430all.sh \
- $(srcdir)/emultempl/generic.em $(srcdir)/scripttempl/elf32msp430.sc \
+ $(ELF_GEN_DEPS) $(srcdir)/scripttempl/elf32msp430.sc \
${GEN_DEPENDS}
${GENSCRIPTS} msp430xE427 "$(tdir_msp430xE427)" msp430all
emsp430xW423.c: $(srcdir)/emulparams/msp430all.sh \
- $(srcdir)/emultempl/generic.em $(srcdir)/scripttempl/elf32msp430.sc \
+ $(ELF_GEN_DEPS) $(srcdir)/scripttempl/elf32msp430.sc \
${GEN_DEPENDS}
${GENSCRIPTS} msp430xW423 "$(tdir_msp430xW423)" msp430all
emsp430xW425.c: $(srcdir)/emulparams/msp430all.sh \
- $(srcdir)/emultempl/generic.em $(srcdir)/scripttempl/elf32msp430.sc \
+ $(ELF_GEN_DEPS) $(srcdir)/scripttempl/elf32msp430.sc \
${GEN_DEPENDS}
${GENSCRIPTS} msp430xW425 "$(tdir_msp430xW425)" msp430all
emsp430xW427.c: $(srcdir)/emulparams/msp430all.sh \
- $(srcdir)/emultempl/generic.em $(srcdir)/scripttempl/elf32msp430.sc \
+ $(ELF_GEN_DEPS) $(srcdir)/scripttempl/elf32msp430.sc \
${GEN_DEPENDS}
${GENSCRIPTS} msp430xW427 "$(tdir_msp430xW427)" msp430all
+emsp430xG437.c: $(srcdir)/emulparams/msp430all.sh \
+ $(ELF_GEN_DEPS) $(srcdir)/scripttempl/elf32msp430.sc \
+ ${GEN_DEPENDS}
+ ${GENSCRIPTS} msp430xG437 "$(tdir_msp430xG437)" msp430all
+emsp430xG438.c: $(srcdir)/emulparams/msp430all.sh \
+ $(ELF_GEN_DEPS) $(srcdir)/scripttempl/elf32msp430.sc \
+ ${GEN_DEPENDS}
+ ${GENSCRIPTS} msp430xG438 "$(tdir_msp430xG438)" msp430all
+emsp430xG439.c: $(srcdir)/emulparams/msp430all.sh \
+ $(ELF_GEN_DEPS) $(srcdir)/scripttempl/elf32msp430.sc \
+ ${GEN_DEPENDS}
+ ${GENSCRIPTS} msp430xG439 "$(tdir_msp430xG439)" msp430all
emsp430x435.c: $(srcdir)/emulparams/msp430all.sh \
- $(srcdir)/emultempl/generic.em $(srcdir)/scripttempl/elf32msp430.sc \
+ $(ELF_GEN_DEPS) $(srcdir)/scripttempl/elf32msp430.sc \
${GEN_DEPENDS}
${GENSCRIPTS} msp430x435 "$(tdir_msp430x435)" msp430all
emsp430x436.c: $(srcdir)/emulparams/msp430all.sh \
- $(srcdir)/emultempl/generic.em $(srcdir)/scripttempl/elf32msp430.sc \
+ $(ELF_GEN_DEPS) $(srcdir)/scripttempl/elf32msp430.sc \
${GEN_DEPENDS}
${GENSCRIPTS} msp430x436 "$(tdir_msp430x436)" msp430all
emsp430x437.c: $(srcdir)/emulparams/msp430all.sh \
- $(srcdir)/emultempl/generic.em $(srcdir)/scripttempl/elf32msp430.sc \
+ $(ELF_GEN_DEPS) $(srcdir)/scripttempl/elf32msp430.sc \
${GEN_DEPENDS}
${GENSCRIPTS} msp430x437 "$(tdir_msp430x437)" msp430all
emsp430x447.c: $(srcdir)/emulparams/msp430all.sh \
- $(srcdir)/emultempl/generic.em $(srcdir)/scripttempl/elf32msp430.sc \
+ $(ELF_GEN_DEPS) $(srcdir)/scripttempl/elf32msp430.sc \
${GEN_DEPENDS}
${GENSCRIPTS} msp430x447 "$(tdir_msp430x447)" msp430all
emsp430x448.c: $(srcdir)/emulparams/msp430all.sh \
- $(srcdir)/emultempl/generic.em $(srcdir)/scripttempl/elf32msp430.sc \
+ $(ELF_GEN_DEPS) $(srcdir)/scripttempl/elf32msp430.sc \
${GEN_DEPENDS}
${GENSCRIPTS} msp430x448 "$(tdir_msp430x448)" msp430all
emsp430x449.c: $(srcdir)/emulparams/msp430all.sh \
- $(srcdir)/emultempl/generic.em $(srcdir)/scripttempl/elf32msp430.sc \
+ $(ELF_GEN_DEPS) $(srcdir)/scripttempl/elf32msp430.sc \
${GEN_DEPENDS}
${GENSCRIPTS} msp430x449 "$(tdir_msp430x449)" msp430all
enews.c: $(srcdir)/emulparams/news.sh \
@@ -1252,7 +1486,7 @@ eor32.c: $(srcdir)/emulparams/or32.sh \
$(srcdir)/emultempl/generic.em $(srcdir)/scripttempl/or32.sc ${GEN_DEPENDS}
${GENSCRIPTS} or32 "$(tdir_or32)"
eor32elf.c: $(srcdir)/emulparams/or32elf.sh \
- $(srcdir)/emultempl/generic.em $(srcdir)/scripttempl/elf.sc ${GEN_DEPENDS}
+ $(ELF_GEN_DEPS) $(srcdir)/scripttempl/elf.sc ${GEN_DEPENDS}
${GENSCRIPTS} or32elf "$(tdir_or32elf)"
epc532macha.c: $(srcdir)/emulparams/pc532macha.sh \
$(srcdir)/emultempl/generic.em $(srcdir)/scripttempl/aout.sc ${GEN_DEPENDS}
@@ -1261,107 +1495,127 @@ epdp11.c: $(srcdir)/emulparams/pdp11.sh \
$(srcdir)/emultempl/generic.em $(srcdir)/scripttempl/aout.sc ${GEN_DEPENDS}
${GENSCRIPTS} pdp11 "$(tdir_pdp11)"
epjelf.c: $(srcdir)/emulparams/pjelf.sh \
- $(srcdir)/emultempl/elf32.em $(srcdir)/scripttempl/elf.sc ${GEN_DEPENDS}
+ $(ELF_GEN_DEPS) $(srcdir)/scripttempl/elf.sc ${GEN_DEPENDS}
${GENSCRIPTS} pjelf "$(tdir_pjelf)"
-epjlelf.c: $(srcdir)/emulparams/pjlelf.sh \
- $(srcdir)/emultempl/elf32.em $(srcdir)/scripttempl/elf.sc ${GEN_DEPENDS}
+epjlelf.c: $(srcdir)/emulparams/pjlelf.sh $(srcdir)/emulparams/pjelf.sh \
+ $(ELF_GEN_DEPS) $(srcdir)/scripttempl/elf.sc ${GEN_DEPENDS}
${GENSCRIPTS} pjlelf "$(tdir_pjlelf)"
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}
+ $(ELF_DEPS) $(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)"
+eppclynx.c: $(srcdir)/emulparams/ppclynx.sh \
+ $(ELF_DEPS) $(srcdir)/scripttempl/elf.sc ${GEN_DEPENDS}
+ ${GENSCRIPTS} ppclynx "$(tdir_ppclynx)"
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)"
+escoreelf.c: $(srcdir)/emulparams/scoreelf.sh \
+ $(srcdir)/emultempl/elf32.em $(srcdir)/emultempl/scoreelf.em \
+ $(srcdir)/scripttempl/elf.sc ${GEN_DEPENDS}
+ ${GENSCRIPTS} scoreelf "$(tdir_scoreelf)"
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}
+ $(ELF_DEPS) $(srcdir)/scripttempl/elf.sc ${GEN_DEPENDS}
${GENSCRIPTS} shelf "$(tdir_shelf)"
eshelf32.c: $(srcdir)/emulparams/shelf32.sh \
$(BFDDIR)/libbfd.h $(INCDIR)/libiberty.h \
$(srcdir)/emultempl/sh64elf.em $(INCDIR)/elf/sh.h $(BFDDIR)/elf-bfd.h \
- $(srcdir)/emultempl/elf32.em $(srcdir)/scripttempl/elf.sc ${GEN_DEPENDS}
+ $(ELF_DEPS) $(srcdir)/scripttempl/elf.sc ${GEN_DEPENDS}
${GENSCRIPTS} shelf32 "$(tdir_shelf32)"
eshelf32_linux.c: $(srcdir)/emulparams/shelf32_linux.sh \
$(srcdir)/emulparams/shelf32.sh \
$(BFDDIR)/libbfd.h $(INCDIR)/libiberty.h \
$(srcdir)/emultempl/sh64elf.em $(INCDIR)/elf/sh.h $(BFDDIR)/elf-bfd.h \
- $(srcdir)/emultempl/elf32.em $(srcdir)/scripttempl/elf.sc ${GEN_DEPENDS}
+ $(ELF_DEPS) $(srcdir)/scripttempl/elf.sc ${GEN_DEPENDS}
${GENSCRIPTS} shelf32_linux "$(tdir_shelf32_linux)"
eshelf32_nbsd.c: $(srcdir)/emulparams/shelf32_nbsd.sh \
$(srcdir)/emulparams/shelf32.sh \
$(BFDDIR)/libbfd.h $(INCDIR)/libiberty.h \
$(srcdir)/emultempl/sh64elf.em $(INCDIR)/elf/sh.h $(BFDDIR)/elf-bfd.h \
- $(srcdir)/emultempl/elf32.em $(srcdir)/scripttempl/elf.sc ${GEN_DEPENDS}
+ $(ELF_DEPS) $(srcdir)/scripttempl/elf.sc ${GEN_DEPENDS}
${GENSCRIPTS} shelf32_nbsd "$(tdir_shelf32_nbsd)"
eshelf64.c: $(srcdir)/emulparams/shelf64.sh $(srcdir)/emulparams/shelf32.sh \
- $(srcdir)/emultempl/elf32.em $(srcdir)/scripttempl/elf.sc ${GEN_DEPENDS}
+ $(ELF_DEPS) $(srcdir)/scripttempl/elf.sc ${GEN_DEPENDS}
${GENSCRIPTS} shelf64 "$(tdir_shelf64)"
eshelf64_nbsd.c: $(srcdir)/emulparams/shelf64_nbsd.sh \
$(srcdir)/emulparams/shelf32_nbsd.sh $(srcdir)/emulparams/shelf32.sh \
- $(srcdir)/emultempl/elf32.em $(srcdir)/scripttempl/elf.sc ${GEN_DEPENDS}
+ $(ELF_DEPS) $(srcdir)/scripttempl/elf.sc ${GEN_DEPENDS}
${GENSCRIPTS} shelf64_nbsd "$(tdir_shelf64_nbsd)"
eshelf_linux.c: $(srcdir)/emulparams/shelf_linux.sh \
$(srcdir)/emulparams/shlelf_linux.sh \
- $(srcdir)/emultempl/elf32.em $(srcdir)/scripttempl/elf.sc ${GEN_DEPENDS}
+ $(ELF_DEPS) $(srcdir)/scripttempl/elf.sc ${GEN_DEPENDS}
${GENSCRIPTS} shelf_linux "$(tdir_shelf_linux)"
eshlelf_linux.c: $(srcdir)/emulparams/shlelf_linux.sh \
- $(srcdir)/emultempl/elf32.em $(srcdir)/scripttempl/elf.sc ${GEN_DEPENDS}
+ $(ELF_DEPS) $(srcdir)/scripttempl/elf.sc ${GEN_DEPENDS}
${GENSCRIPTS} shlelf_linux "$(tdir_shlelf_linux)"
eshelf_nbsd.c: $(srcdir)/emulparams/shelf_nbsd.sh \
$(srcdir)/emulparams/shelf.sh \
- $(srcdir)/emultempl/elf32.em $(srcdir)/scripttempl/elf.sc ${GEN_DEPENDS}
+ $(ELF_DEPS) $(srcdir)/scripttempl/elf.sc ${GEN_DEPENDS}
${GENSCRIPTS} shelf_nbsd "$(tdir_shelf_nbsd)"
eshelf_nto.c: $(srcdir)/emulparams/shelf_nto.sh \
- $(srcdir)/emultempl/elf32.em $(srcdir)/scripttempl/elf.sc ${GEN_DEPENDS}
+ $(ELF_DEPS) $(srcdir)/scripttempl/elf.sc ${GEN_DEPENDS}
${GENSCRIPTS} shelf_nto "$(tdir_shelf_nto)"
+eshelf_vxworks.c: $(srcdir)/emulparams/shelf_vxworks.sh \
+ $(srcdir)/emulparams/vxworks.sh $(ELF_DEPS) $(srcdir)/scripttempl/elf.sc \
+ $(srcdir)/emultempl/vxworks.em ${GEN_DEPENDS}
+ ${GENSCRIPTS} shelf_vxworks "$(tdir_shelf_vxworks)"
eshlelf_nbsd.c: $(srcdir)/emulparams/shlelf_nbsd.sh \
$(srcdir)/emulparams/shelf_nbsd.sh \
$(srcdir)/emulparams/shelf.sh \
- $(srcdir)/emultempl/elf32.em $(srcdir)/scripttempl/elf.sc ${GEN_DEPENDS}
+ $(ELF_DEPS) $(srcdir)/scripttempl/elf.sc ${GEN_DEPENDS}
${GENSCRIPTS} shlelf_nbsd "$(tdir_shlelf_nbsd)"
eshlelf_nto.c: $(srcdir)/emulparams/shlelf_nto.sh \
- $(srcdir)/emultempl/elf32.em $(srcdir)/scripttempl/elf.sc ${GEN_DEPENDS}
+ $(ELF_DEPS) $(srcdir)/scripttempl/elf.sc ${GEN_DEPENDS}
${GENSCRIPTS} shlelf_nto "$(tdir_shlelf_nto)"
+eshlelf_vxworks.c: $(srcdir)/emulparams/shlelf_vxworks.sh \
+ $(srcdir)/emulparams/shelf_vxworks.sh $(srcdir)/emulparams/vxworks.sh \
+ $(ELF_DEPS) $(srcdir)/scripttempl/elf.sc $(srcdir)/emultempl/vxworks.em \
+ ${GEN_DEPENDS}
+ ${GENSCRIPTS} shlelf_vxworks "$(tdir_shlelf_vxworks)"
+eshelf_uclinux.c: $(srcdir)/emulparams/shelf_uclinux.sh \
+ $(srcdir)/emultempl/elf32.em $(srcdir)/scripttempl/elf.sc ${GEN_DEPENDS}
+ ${GENSCRIPTS} shelf_uclinux "$(tdir_shelf_uclinux)"
eshlelf.c: $(srcdir)/emulparams/shlelf.sh \
$(srcdir)/emulparams/shelf.sh \
- $(srcdir)/emultempl/elf32.em $(srcdir)/scripttempl/elf.sc ${GEN_DEPENDS}
+ $(ELF_DEPS) $(srcdir)/scripttempl/elf.sc ${GEN_DEPENDS}
${GENSCRIPTS} shlelf "$(tdir_shlelf)"
+eshlsymbian.c: $(srcdir)/emulparams/shlsymbian.sh \
+ $(srcdir)/emulparams/shelf.sh \
+ $(ELF_DEPS) $(srcdir)/scripttempl/elf32sh-symbian.sc ${GEN_DEPENDS}
+ ${GENSCRIPTS} shlsymbian "$(tdir_shlelf)"
eshlelf32.c: $(srcdir)/emulparams/shlelf32.sh \
$(BFDDIR)/libbfd.h $(INCDIR)/libiberty.h $(srcdir)/emulparams/shelf32.sh \
$(srcdir)/emultempl/sh64elf.em $(INCDIR)/elf/sh.h $(BFDDIR)/elf-bfd.h \
- $(srcdir)/emultempl/elf32.em $(srcdir)/scripttempl/elf.sc ${GEN_DEPENDS}
+ $(ELF_DEPS) $(srcdir)/scripttempl/elf.sc ${GEN_DEPENDS}
${GENSCRIPTS} shlelf32 "$(tdir_shlelf32)"
eshlelf32_linux.c: $(srcdir)/emulparams/shlelf32_linux.sh \
$(srcdir)/emulparams/shelf32_linux.sh $(srcdir)/emulparams/shelf32.sh \
$(BFDDIR)/libbfd.h $(INCDIR)/libiberty.h \
$(srcdir)/emultempl/sh64elf.em $(INCDIR)/elf/sh.h $(BFDDIR)/elf-bfd.h \
- $(srcdir)/emultempl/elf32.em $(srcdir)/scripttempl/elf.sc ${GEN_DEPENDS}
+ $(ELF_DEPS) $(srcdir)/scripttempl/elf.sc ${GEN_DEPENDS}
${GENSCRIPTS} shlelf32_linux "$(tdir_shlelf32_linux)"
eshlelf32_nbsd.c: $(srcdir)/emulparams/shlelf32_nbsd.sh \
$(srcdir)/emulparams/shelf32_nbsd.sh $(srcdir)/emulparams/shelf32.sh \
$(BFDDIR)/libbfd.h $(INCDIR)/libiberty.h \
$(srcdir)/emultempl/sh64elf.em $(INCDIR)/elf/sh.h $(BFDDIR)/elf-bfd.h \
- $(srcdir)/emultempl/elf32.em $(srcdir)/scripttempl/elf.sc ${GEN_DEPENDS}
+ $(ELF_DEPS) $(srcdir)/scripttempl/elf.sc ${GEN_DEPENDS}
${GENSCRIPTS} shlelf32_nbsd "$(tdir_shlelf32_nbsd)"
eshlelf64.c: $(srcdir)/emulparams/shlelf64.sh \
$(srcdir)/emulparams/shelf64.sh $(srcdir)/emulparams/shelf32.sh \
- $(srcdir)/emultempl/elf32.em $(srcdir)/scripttempl/elf.sc ${GEN_DEPENDS}
+ $(ELF_DEPS) $(srcdir)/scripttempl/elf.sc ${GEN_DEPENDS}
${GENSCRIPTS} shlelf64 "$(tdir_shlelf64)"
eshlelf64_nbsd.c: $(srcdir)/emulparams/shlelf64_nbsd.sh \
$(srcdir)/emulparams/shelf64_nbsd.sh \
$(srcdir)/emulparams/shelf32_nbsd.sh $(srcdir)/emulparams/shelf32.sh \
- $(srcdir)/emultempl/elf32.em $(srcdir)/scripttempl/elf.sc ${GEN_DEPENDS}
+ $(ELF_DEPS) $(srcdir)/scripttempl/elf.sc ${GEN_DEPENDS}
${GENSCRIPTS} shlelf64_nbsd "$(tdir_shlelf64_nbsd)"
eshl.c: $(srcdir)/emulparams/shl.sh \
$(srcdir)/emulparams/sh.sh \
@@ -1376,9 +1630,6 @@ esparcaout.c: $(srcdir)/emulparams/sparcaout.sh \
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)"
@@ -1425,29 +1676,29 @@ 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}
+ $(ELF_DEPS) $(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)"
+ez80.c: $(srcdir)/emulparams/z80.sh \
+ $(srcdir)/emultempl/generic.em $(srcdir)/emultempl/z80.em \
+ $(srcdir)/scripttempl/z80.sc ${GEN_DEPENDS}
+ ${GENSCRIPTS} z80 "$(tdir_z80)"
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)"
-eelf32frvfd.c: $(srcdir)/emulparams/elf32frvfd.sh \
- $(srcdir)/emulparams/elf32frv.sh \
- $(srcdir)/emultempl/elf32.em $(srcdir)/scripttempl/elf.sc ${GEN_DEPENDS}
- ${GENSCRIPTS} elf32frvfd "$(tdir_frv)"
# We need this for automake to use YLWRAP.
EXTRA_ld_new_SOURCES = deffilep.y
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) $(EMUL_EXTRA_OFILES) $(BFDLIB) $(LIBIBERTY) $(INTLDEPS)
-ld_new_LDADD = $(EMULATION_OFILES) $(EMUL_EXTRA_OFILES) $(BFDLIB) $(LIBIBERTY) $(INTLLIBS)
+ld_new_DEPENDENCIES = $(EMULATION_OFILES) $(EMUL_EXTRA_OFILES) $(BFDLIB) $(LIBIBERTY) $(LIBINTL_DEP)
+ld_new_LDADD = $(EMULATION_OFILES) $(EMUL_EXTRA_OFILES) $(BFDLIB) $(LIBIBERTY) $(LIBINTL)
# The generated emulation files mostly have the same dependencies.
$(EMULATION_OFILES): ../bfd/bfd.h sysdep.h config.h $(INCDIR)/bfdlink.h \
@@ -1462,10 +1713,6 @@ check-DEJAGNU: site.exp
r=`pwd`; export r; \
LC_COLLATE=; LC_ALL=; LANG=; export LC_COLLATE LC_ALL LANG; \
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 \
@@ -1473,7 +1720,7 @@ check-DEJAGNU: site.exp
CXX="$(CXX_FOR_TARGET)" CXXFLAGS="$(CXXFLAGS)" \
CC_FOR_HOST="$(CC)" CFLAGS_FOR_HOST="$(CFLAGS)" \
OFILES="$(OFILES)" BFDLIB="$(TESTBFDLIB)" \
- LIBIBERTY="$(LIBIBERTY) $(INTLLIBS)" LIBS="$(LIBS)" \
+ LIBIBERTY="$(LIBIBERTY) $(LIBINTL)" LIBS="$(LIBS)" \
$(RUNTESTFLAGS); \
else echo "WARNING: could not find \`runtest'" 1>&2; :;\
fi
@@ -1537,26 +1784,13 @@ bootstrap: ld3$(EXEEXT)
# 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
-
-ldver.texi: Makefile
- rm -f $@
- echo '@set VERSION $(VERSION)' > $@
-
-ld.info: $(srcdir)/ld.texinfo configdoc.texi ldver.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 ldver.texi
- TEXINPUTS=$(top_srcdir)/../texinfo:$$TEXINPUTS \
- MAKEINFO="$(MAKEINFO) -I $(srcdir) -I $(BFDDIR)/doc" $(TEXI2DVI) -I $(BFDDIR)/doc $(srcdir)/ld.texinfo
+ cp ${srcdir}/${DOCVER}-doc.texi ./configdoc.texi
+ chmod u+w ./configdoc.texi
# Build the man page from the texinfo file
# The sed command removes the no-adjust Nroff command so that
# the man output looks standard.
-ld.1: $(srcdir)/ld.texinfo configdoc.texi ldver.texi
+ld.1: $(srcdir)/ld.texinfo configdoc.texi
touch $@
-$(TEXI2POD) $(MANCONF) < $(srcdir)/ld.texinfo > ld.pod
-($(POD2MAN) ld.pod | \
@@ -1565,16 +1799,66 @@ ld.1: $(srcdir)/ld.texinfo configdoc.texi ldver.texi
(rm -f $@.T$$$$ && exit 1)
rm -f ld.pod
-MAINTAINERCLEANFILES = ldver.texi
+MAINTAINERCLEANFILES = configdoc.texi
-# We want to reconfigure if configure.host or configure.tgt changes.
-CONFIG_STATUS_DEPENDENCIES = $(srcdir)/configure.host $(srcdir)/configure.tgt
+# We want to reconfigure if configure.host or configure.tgt changes. We
+# extract version from bfd/configure.in, so we must depend on that also.
+CONFIG_STATUS_DEPENDENCIES = $(srcdir)/configure.host $(srcdir)/configure.tgt \
+ $(srcdir)/../bfd/configure.in
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 DEPA DEP1 DEP2
+CLEANFILES = dep.sed DEP DEPA DEP1 DEP2 spu_ovl.s
+
+.PHONY: install-html install-html-am install-html-recursive
+
+html__strip_dir = `echo $$p | sed -e 's|^.*/||'`;
+
+install-html: install-html-recursive install-html-am
+
+install-html-am: $(HTMLS)
+ @$(NORMAL_INSTALL)
+ test -z "$(htmldir)" || $(mkdir_p) "$(DESTDIR)$(htmldir)"
+ @list='$(HTMLS)'; for p in $$list; do \
+ if test -f "$$p" || test -d "$$p"; then d=""; else d="$(srcdir)/"; fi; \
+ f=$(html__strip_dir) \
+ if test -d "$$d$$p"; then \
+ echo " $(mkdir_p) '$(DESTDIR)$(htmldir)/$$f'"; \
+ $(mkdir_p) "$(DESTDIR)$(htmldir)/$$f" || exit 1; \
+ echo " $(INSTALL_DATA) '$$d$$p'/* '$(DESTDIR)$(htmldir)/$$f'"; \
+ $(INSTALL_DATA) "$$d$$p"/* "$(DESTDIR)$(htmldir)/$$f"; \
+ else \
+ echo " $(INSTALL_DATA) '$$d$$p' '$(DESTDIR)$(htmldir)/$$f'"; \
+ $(INSTALL_DATA) "$$d$$p" "$(DESTDIR)$(htmldir)/$$f"; \
+ fi; \
+ done
+
+install-html-recursive:
+ @failcom='exit 1'; \
+ for f in x $$MAKEFLAGS; do \
+ case $$f in \
+ *=* | --[!k]*);; \
+ *k*) failcom='fail=yes';; \
+ esac; \
+ done; \
+ dot_seen=no; \
+ target=`echo $@ | sed s/-recursive//`; \
+ list='$(SUBDIRS)'; for subdir in $$list; do \
+ echo "Making $$target in $$subdir"; \
+ if test "$$subdir" = "."; then \
+ dot_seen=yes; \
+ local_target="$$target-am"; \
+ else \
+ local_target="$$target"; \
+ fi; \
+ (cd $$subdir && $(MAKE) $(AM_MAKEFLAGS) $$local_target) \
+ || eval $$failcom; \
+ done; \
+ if test "$$dot_seen" = "no"; then \
+ $(MAKE) $(AM_MAKEFLAGS) "$$target-am" || exit 1; \
+ fi; test -z "$$fail"
.PHONY: install-exec-local install-data-local
@@ -1601,18 +1885,31 @@ install-data-local:
# We want install to imply install-info as per GNU standards, despite the
# cygnus option.
-install: install-info
+install-data-local: install-info
# Stuff that should be included in a distribution. The diststuff
# target is run by the taz target in ../Makefile.in.
-EXTRA_DIST = ldgram.c ldgram.h ldlex.c $(man_MANS)
+EXTRA_DIST = ldgram.c ldgram.h ldlex.c emultempl/spu_ovl.o $(man_MANS)
diststuff: info $(EXTRA_DIST)
+all: info ld.1
+
+# Both info (ld.info) and ld.1 depend on configdoc.texi.
+# But info isn't a direct target. Make info-recursive to depend on
+# ld.1 to support parallel build.
+info-recursive: ld.1
DISTCLEANFILES = tdirs site.exp site.bak stringify.sed
distclean-local:
rm -rf ldscripts
-Makefile: $(BFDDIR)/configure.in
+MAINTAINERCLEANFILES += ld.info
+
+# Automake 1.9 will only build info files in the objdir if they are
+# mentioned in DISTCLEANFILES. It doesn't have to be unconditional,
+# though, so we use a bogus condition.
+if GENINSRC_NEVER
+DISTCLEANFILES += ld.info
+endif
# Targets to rebuild dependencies in this Makefile.
# Have to get rid of DEP1 here so that "$?" later includes all of $(CFILES).
@@ -1657,109 +1954,97 @@ dep-am: DEP
.PHONY: dep dep-in dep-am
-@MAINT@.PHONY: mpw
-@MAINT@mpw: $(srcdir)/mpw-ei386go32.c $(srcdir)/mpw-elfmips.c \
-@MAINT@ $(srcdir)/mpw-em68kcoff.c $(srcdir)/mpw-eppcmac.c \
-@MAINT@ $(srcdir)/mpw-esh.c $(srcdir)/mpw-idtmips.c
-@MAINT@
-@MAINT@$(srcdir)/mpw-ei386go32.c: ei386go32.c
-@MAINT@ $(srcdir)/../move-if-change $< $@
-@MAINT@
-@MAINT@$(srcdir)/mpw-elfmips.c: eelf32ebmip.c
-@MAINT@ $(srcdir)/../move-if-change $< $@
-@MAINT@
-@MAINT@$(srcdir)/mpw-em68kcoff.c: em68kcoff.c
-@MAINT@ $(srcdir)/../move-if-change $< $@
-@MAINT@
-@MAINT@$(srcdir)/mpw-eppcmac.c: eppcmacos.c
-@MAINT@ $(srcdir)/../move-if-change $< $@
-@MAINT@
-@MAINT@$(srcdir)/mpw-esh.c: esh.c
-@MAINT@ $(srcdir)/../move-if-change $< $@
-@MAINT@
-@MAINT@$(srcdir)/mpw-idtmips.c: emipsidt.c
-@MAINT@ $(srcdir)/../move-if-change $< $@
-
# 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 \
- $(INCDIR)/symcat.h sysdep.h config.h $(INCDIR)/fopen-same.h \
- $(INCDIR)/bfdlink.h $(INCDIR)/safe-ctype.h ld.h $(INCDIR)/bin-bugs.h \
- ldexp.h ldlang.h ldmisc.h ldgram.h ldmain.h ldctor.h
-ldemul.o: ldemul.c ../bfd/bfd.h $(INCDIR)/ansidecl.h \
- $(INCDIR)/symcat.h sysdep.h config.h $(INCDIR)/fopen-same.h \
- ld.h $(INCDIR)/bin-bugs.h ldmisc.h ldexp.h ldlang.h \
+ldctor.o: ldctor.c sysdep.h config.h $(INCDIR)/fopen-same.h \
+ ../bfd/bfd.h $(INCDIR)/ansidecl.h $(INCDIR)/symcat.h \
+ $(INCDIR)/bfdlink.h $(INCDIR)/safe-ctype.h ld.h ldexp.h \
+ ldlang.h ldmisc.h ldgram.h ldmain.h ldctor.h
+ldemul.o: ldemul.c sysdep.h config.h $(INCDIR)/fopen-same.h \
+ ../bfd/bfd.h $(INCDIR)/ansidecl.h $(INCDIR)/symcat.h \
+ $(INCDIR)/bfdlink.h ld.h ldmisc.h ldexp.h ldlang.h \
ldfile.h ldemul.h ldmain.h ldemul-list.h
-ldexp.o: ldexp.c ../bfd/bfd.h $(INCDIR)/ansidecl.h \
- $(INCDIR)/symcat.h sysdep.h config.h $(INCDIR)/fopen-same.h \
- $(INCDIR)/bfdlink.h ld.h $(INCDIR)/bin-bugs.h ldmain.h \
- ldmisc.h ldexp.h ldgram.h ldlang.h $(INCDIR)/libiberty.h \
+ldexp.o: ldexp.c sysdep.h config.h $(INCDIR)/fopen-same.h \
+ ../bfd/bfd.h $(INCDIR)/ansidecl.h $(INCDIR)/symcat.h \
+ $(INCDIR)/bfdlink.h ld.h ldmain.h ldmisc.h ldexp.h \
+ ldlex.h ldgram.h ldlang.h $(INCDIR)/libiberty.h $(INCDIR)/ansidecl.h \
$(INCDIR)/safe-ctype.h
-ldfile.o: ldfile.c ../bfd/bfd.h $(INCDIR)/ansidecl.h \
- $(INCDIR)/symcat.h sysdep.h config.h $(INCDIR)/fopen-same.h \
- $(INCDIR)/bfdlink.h $(INCDIR)/safe-ctype.h ld.h $(INCDIR)/bin-bugs.h \
- ldmisc.h ldexp.h ldlang.h ldfile.h ldmain.h ldgram.h \
- ldlex.h ldemul.h $(INCDIR)/libiberty.h $(INCDIR)/filenames.h
-ldlang.o: ldlang.c ../bfd/bfd.h $(INCDIR)/ansidecl.h \
- $(INCDIR)/symcat.h sysdep.h config.h $(INCDIR)/fopen-same.h \
- $(INCDIR)/libiberty.h $(INCDIR)/safe-ctype.h $(INCDIR)/obstack.h \
- $(INCDIR)/bfdlink.h ld.h $(INCDIR)/bin-bugs.h ldmain.h \
+ldfile.o: ldfile.c sysdep.h config.h $(INCDIR)/fopen-same.h \
+ ../bfd/bfd.h $(INCDIR)/ansidecl.h $(INCDIR)/symcat.h \
+ $(INCDIR)/bfdlink.h $(INCDIR)/safe-ctype.h ld.h ldmisc.h \
+ ldexp.h ldlang.h ldfile.h ldmain.h ldgram.h ldlex.h \
+ ldemul.h $(INCDIR)/libiberty.h $(INCDIR)/ansidecl.h \
+ $(INCDIR)/filenames.h
+ldlang.o: ldlang.c sysdep.h config.h $(INCDIR)/fopen-same.h \
+ ../bfd/bfd.h $(INCDIR)/ansidecl.h $(INCDIR)/symcat.h \
+ $(INCDIR)/libiberty.h $(INCDIR)/ansidecl.h $(INCDIR)/safe-ctype.h \
+ $(INCDIR)/obstack.h $(INCDIR)/bfdlink.h ld.h ldmain.h \
ldexp.h ldlang.h ldgram.h ldlex.h ldmisc.h ldctor.h \
ldfile.h ldemul.h $(INCDIR)/fnmatch.h $(INCDIR)/demangle.h \
- $(INCDIR)/hashtab.h
-ldmain.o: ldmain.c ../bfd/bfd.h $(INCDIR)/ansidecl.h \
- $(INCDIR)/symcat.h sysdep.h config.h $(INCDIR)/fopen-same.h \
- $(INCDIR)/safe-ctype.h $(INCDIR)/libiberty.h $(INCDIR)/progress.h \
- $(INCDIR)/bfdlink.h $(INCDIR)/filenames.h ld.h $(INCDIR)/bin-bugs.h \
- ldmain.h ldmisc.h ldwrite.h ldexp.h ldlang.h ldgram.h \
+ $(INCDIR)/libiberty.h $(INCDIR)/hashtab.h
+ldmain.o: ldmain.c sysdep.h config.h $(INCDIR)/fopen-same.h \
+ ../bfd/bfd.h $(INCDIR)/ansidecl.h $(INCDIR)/symcat.h \
+ $(INCDIR)/safe-ctype.h $(INCDIR)/libiberty.h $(INCDIR)/ansidecl.h \
+ $(INCDIR)/progress.h $(INCDIR)/bfdlink.h $(INCDIR)/filenames.h \
+ ld.h ldmain.h ldmisc.h ldwrite.h ldexp.h ldlang.h ldgram.h \
ldlex.h ldfile.h ldemul.h ldctor.h
-ldmisc.o: ldmisc.c ../bfd/bfd.h $(INCDIR)/ansidecl.h \
- $(INCDIR)/symcat.h $(INCDIR)/bfdlink.h sysdep.h config.h \
- $(INCDIR)/fopen-same.h $(INCDIR)/libiberty.h $(INCDIR)/demangle.h \
- ld.h $(INCDIR)/bin-bugs.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 \
- $(INCDIR)/symcat.h ../bfd/bfdver.h sysdep.h config.h \
- $(INCDIR)/fopen-same.h ld.h $(INCDIR)/bin-bugs.h ldver.h \
- ldexp.h ldlang.h ldfile.h ldemul.h ldmain.h
-ldwrite.o: ldwrite.c ../bfd/bfd.h $(INCDIR)/ansidecl.h \
- $(INCDIR)/symcat.h sysdep.h config.h $(INCDIR)/fopen-same.h \
- $(INCDIR)/bfdlink.h $(INCDIR)/libiberty.h $(INCDIR)/safe-ctype.h \
- ld.h $(INCDIR)/bin-bugs.h ldexp.h ldlang.h ldwrite.h \
+ldmisc.o: ldmisc.c sysdep.h config.h $(INCDIR)/fopen-same.h \
+ ../bfd/bfd.h $(INCDIR)/ansidecl.h $(INCDIR)/symcat.h \
+ $(INCDIR)/bfdlink.h $(INCDIR)/libiberty.h $(INCDIR)/ansidecl.h \
+ $(INCDIR)/demangle.h $(INCDIR)/libiberty.h ld.h ldmisc.h \
+ ldexp.h ldlang.h ldgram.h ldlex.h ldmain.h ldfile.h \
+ $(BFDDIR)/elf-bfd.h $(INCDIR)/elf/common.h $(INCDIR)/elf/internal.h \
+ $(INCDIR)/elf/external.h $(INCDIR)/bfdlink.h
+ldver.o: ldver.c sysdep.h config.h $(INCDIR)/fopen-same.h \
+ ../bfd/bfd.h $(INCDIR)/ansidecl.h $(INCDIR)/symcat.h \
+ ../bfd/bfdver.h ld.h ldver.h ldexp.h ldlang.h ldfile.h \
+ ldemul.h ldmain.h
+ldwrite.o: ldwrite.c sysdep.h config.h $(INCDIR)/fopen-same.h \
+ ../bfd/bfd.h $(INCDIR)/ansidecl.h $(INCDIR)/symcat.h \
+ $(INCDIR)/bfdlink.h $(INCDIR)/libiberty.h $(INCDIR)/ansidecl.h \
+ $(INCDIR)/safe-ctype.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 \
- $(INCDIR)/symcat.h sysdep.h config.h $(INCDIR)/fopen-same.h \
- $(INCDIR)/libiberty.h $(INCDIR)/safe-ctype.h $(INCDIR)/bfdlink.h \
- ld.h $(INCDIR)/bin-bugs.h ldmain.h ldmisc.h ldexp.h \
- ldlang.h ldgram.h ldlex.h ldfile.h ldver.h ldemul.h \
- $(INCDIR)/demangle.h
-mri.o: mri.c ../bfd/bfd.h $(INCDIR)/ansidecl.h $(INCDIR)/symcat.h \
- sysdep.h config.h $(INCDIR)/fopen-same.h ld.h $(INCDIR)/bin-bugs.h \
- ldexp.h ldlang.h ldmisc.h mri.h ldgram.h $(INCDIR)/libiberty.h
-ldcref.o: ldcref.c ../bfd/bfd.h $(INCDIR)/ansidecl.h \
- $(INCDIR)/symcat.h sysdep.h config.h $(INCDIR)/fopen-same.h \
- $(INCDIR)/bfdlink.h $(INCDIR)/libiberty.h ld.h $(INCDIR)/bin-bugs.h \
- ldmain.h ldmisc.h ldexp.h ldlang.h
-pe-dll.o: pe-dll.c ../bfd/bfd.h $(INCDIR)/ansidecl.h \
- $(INCDIR)/symcat.h sysdep.h config.h $(INCDIR)/fopen-same.h \
- $(INCDIR)/bfdlink.h $(INCDIR)/libiberty.h $(INCDIR)/safe-ctype.h \
- ld.h $(INCDIR)/bin-bugs.h ldexp.h ldlang.h ldwrite.h \
+lexsup.o: lexsup.c sysdep.h config.h $(INCDIR)/fopen-same.h \
+ ../bfd/bfd.h $(INCDIR)/ansidecl.h $(INCDIR)/symcat.h \
+ ../bfd/bfdver.h $(INCDIR)/libiberty.h $(INCDIR)/ansidecl.h \
+ $(INCDIR)/safe-ctype.h $(INCDIR)/bfdlink.h ld.h ldmain.h \
+ ldmisc.h ldexp.h ldlang.h ldgram.h ldlex.h ldfile.h \
+ ldver.h ldemul.h $(INCDIR)/demangle.h $(INCDIR)/libiberty.h
+mri.o: mri.c sysdep.h config.h $(INCDIR)/fopen-same.h \
+ ../bfd/bfd.h $(INCDIR)/ansidecl.h $(INCDIR)/symcat.h \
+ ld.h ldexp.h ldlang.h ldmisc.h mri.h ldgram.h $(INCDIR)/libiberty.h \
+ $(INCDIR)/ansidecl.h
+ldcref.o: ldcref.c sysdep.h config.h $(INCDIR)/fopen-same.h \
+ ../bfd/bfd.h $(INCDIR)/ansidecl.h $(INCDIR)/symcat.h \
+ $(INCDIR)/bfdlink.h $(INCDIR)/libiberty.h $(INCDIR)/ansidecl.h \
+ $(INCDIR)/demangle.h $(INCDIR)/libiberty.h $(INCDIR)/objalloc.h \
+ ld.h ldmain.h ldmisc.h ldexp.h ldlang.h
+pe-dll.o: pe-dll.c sysdep.h config.h $(INCDIR)/fopen-same.h \
+ ../bfd/bfd.h $(INCDIR)/ansidecl.h $(INCDIR)/symcat.h \
+ $(INCDIR)/bfdlink.h $(INCDIR)/libiberty.h $(INCDIR)/ansidecl.h \
+ $(INCDIR)/safe-ctype.h ld.h ldexp.h ldlang.h ldwrite.h \
+ ldmisc.h ldgram.h ldmain.h ldfile.h ldemul.h $(INCDIR)/coff/internal.h \
+ $(BFDDIR)/libcoff.h $(INCDIR)/bfdlink.h deffile.h pe-dll.h
+pep-dll.o: pep-dll.c pe-dll.c sysdep.h config.h $(INCDIR)/fopen-same.h \
+ ../bfd/bfd.h $(INCDIR)/ansidecl.h $(INCDIR)/symcat.h \
+ $(INCDIR)/bfdlink.h $(INCDIR)/libiberty.h $(INCDIR)/ansidecl.h \
+ $(INCDIR)/safe-ctype.h ld.h ldexp.h ldlang.h ldwrite.h \
ldmisc.h ldgram.h ldmain.h ldfile.h ldemul.h $(INCDIR)/coff/internal.h \
- $(BFDDIR)/libcoff.h deffile.h pe-dll.h
-ldgram.o: ldgram.c ../bfd/bfd.h $(INCDIR)/ansidecl.h \
- $(INCDIR)/symcat.h sysdep.h config.h $(INCDIR)/fopen-same.h \
- $(INCDIR)/bfdlink.h ld.h $(INCDIR)/bin-bugs.h ldexp.h \
- ldver.h ldlang.h ldfile.h ldemul.h ldmisc.h ldmain.h \
- mri.h ldctor.h ldlex.h
-ldlex.o: ldlex.c ../bfd/bfd.h $(INCDIR)/ansidecl.h \
- $(INCDIR)/symcat.h sysdep.h config.h $(INCDIR)/fopen-same.h \
- $(INCDIR)/safe-ctype.h $(INCDIR)/bfdlink.h ld.h $(INCDIR)/bin-bugs.h \
- ldmisc.h ldexp.h ldlang.h ldgram.h ldfile.h ldlex.h \
- ldmain.h $(INCDIR)/libiberty.h
-deffilep.o: deffilep.c $(INCDIR)/libiberty.h $(INCDIR)/ansidecl.h \
- $(INCDIR)/safe-ctype.h ../bfd/bfd.h $(INCDIR)/symcat.h \
- sysdep.h config.h $(INCDIR)/fopen-same.h ld.h $(INCDIR)/bin-bugs.h \
- ldmisc.h deffile.h
+ $(BFDDIR)/libcoff.h $(INCDIR)/bfdlink.h deffile.h pe-dll.h \
+ pep-dll.h
+ldgram.o: ldgram.c sysdep.h config.h $(INCDIR)/fopen-same.h \
+ ../bfd/bfd.h $(INCDIR)/ansidecl.h $(INCDIR)/symcat.h \
+ $(INCDIR)/bfdlink.h ld.h ldexp.h ldver.h ldlang.h ldfile.h \
+ ldemul.h ldmisc.h ldmain.h mri.h ldctor.h ldlex.h
+ldlex.o: ldlex.c sysdep.h config.h $(INCDIR)/fopen-same.h \
+ ../bfd/bfd.h $(INCDIR)/ansidecl.h $(INCDIR)/symcat.h \
+ $(INCDIR)/safe-ctype.h $(INCDIR)/bfdlink.h ld.h ldmisc.h \
+ ldexp.h ldlang.h ldgram.h ldfile.h ldlex.h ldmain.h \
+ $(INCDIR)/libiberty.h $(INCDIR)/ansidecl.h
+deffilep.o: deffilep.c sysdep.h config.h $(INCDIR)/fopen-same.h \
+ $(INCDIR)/libiberty.h $(INCDIR)/ansidecl.h $(INCDIR)/safe-ctype.h \
+ ../bfd/bfd.h $(INCDIR)/ansidecl.h $(INCDIR)/symcat.h \
+ ld.h ldmisc.h deffile.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 020064b..861822f 100644
--- a/contrib/binutils/ld/Makefile.in
+++ b/contrib/binutils/ld/Makefile.in
@@ -1,6 +1,8 @@
-# Makefile.in generated automatically by automake 1.4-p5 from Makefile.am
+# Makefile.in generated by automake 1.9.6 from Makefile.am.
+# @configure_input@
-# Copyright (C) 1994, 1995-8, 1999, 2001 Free Software Foundation, Inc.
+# Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002,
+# 2003, 2004, 2005 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.
@@ -10,142 +12,284 @@
# even the implied warranty of MERCHANTABILITY or FITNESS FOR A
# PARTICULAR PURPOSE.
-
# $FreeBSD$
-
-SHELL = @SHELL@
+@SET_MAKE@
srcdir = @srcdir@
top_srcdir = @top_srcdir@
VPATH = @srcdir@
-prefix = @prefix@
-exec_prefix = @exec_prefix@
-
-bindir = @bindir@
-sbindir = @sbindir@
-libexecdir = @libexecdir@
-datadir = @datadir@
-sysconfdir = @sysconfdir@
-sharedstatedir = @sharedstatedir@
-localstatedir = @localstatedir@
-libdir = @libdir@
-infodir = @infodir@
-mandir = @mandir@
-includedir = @includedir@
-oldincludedir = /usr/include
-
-DESTDIR =
-
pkgdatadir = $(datadir)/@PACKAGE@
pkglibdir = $(libdir)/@PACKAGE@
pkgincludedir = $(includedir)/@PACKAGE@
-
top_builddir = .
-
-ACLOCAL = @ACLOCAL@
-AUTOCONF = @AUTOCONF@
-AUTOMAKE = @AUTOMAKE@
-AUTOHEADER = @AUTOHEADER@
-
+am__cd = CDPATH="$${ZSH_VERSION+.}$(PATH_SEPARATOR)" && cd
INSTALL = @INSTALL@
-INSTALL_PROGRAM = @INSTALL_PROGRAM@ $(AM_INSTALL_PROGRAM_FLAGS)
-INSTALL_DATA = @INSTALL_DATA@
-INSTALL_SCRIPT = @INSTALL_SCRIPT@
-transform = @program_transform_name@
-
+install_sh_DATA = $(install_sh) -c -m 644
+install_sh_PROGRAM = $(install_sh) -c
+install_sh_SCRIPT = $(install_sh) -c
+INSTALL_HEADER = $(INSTALL_DATA)
+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@
-AS = @AS@
+noinst_PROGRAMS = ld-new$(EXEEXT)
+
+# Automake 1.9 will only build info files in the objdir if they are
+# mentioned in DISTCLEANFILES. It doesn't have to be unconditional,
+# though, so we use a bogus condition.
+@GENINSRC_NEVER_TRUE@am__append_1 = ld.info
+DIST_COMMON = $(srcdir)/../config.guess $(srcdir)/../config.sub NEWS \
+ README ChangeLog $(srcdir)/Makefile.in $(srcdir)/Makefile.am \
+ $(top_srcdir)/configure $(am__configure_deps) \
+ $(srcdir)/config.in $(srcdir)/../mkinstalldirs \
+ $(top_srcdir)/po/Make-in ldgram.h ldgram.c ldlex.c deffilep.h \
+ deffilep.c $(srcdir)/../ylwrap $(srcdir)/../ltmain.sh \
+ $(srcdir)/../config.guess $(srcdir)/../config.sub \
+ $(ld_TEXINFOS)
+subdir = .
+ACLOCAL_M4 = $(top_srcdir)/aclocal.m4
+am__aclocal_m4_deps = $(top_srcdir)/../bfd/acinclude.m4 \
+ $(top_srcdir)/../bfd/warning.m4 \
+ $(top_srcdir)/../config/depstand.m4 \
+ $(top_srcdir)/../config/gettext-sister.m4 \
+ $(top_srcdir)/../config/lead-dot.m4 \
+ $(top_srcdir)/../config/nls.m4 $(top_srcdir)/../config/po.m4 \
+ $(top_srcdir)/../config/progtest.m4 \
+ $(top_srcdir)/../libtool.m4 $(top_srcdir)/../ltoptions.m4 \
+ $(top_srcdir)/../ltsugar.m4 $(top_srcdir)/../ltversion.m4 \
+ $(top_srcdir)/configure.in
+am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \
+ $(ACLOCAL_M4)
+am__CONFIG_DISTCLEAN_FILES = config.status config.cache config.log \
+ configure.lineno configure.status.lineno
+mkinstalldirs = $(SHELL) $(top_srcdir)/../mkinstalldirs
+CONFIG_HEADER = config.h
+CONFIG_CLEAN_FILES = po/Makefile.in
+PROGRAMS = $(noinst_PROGRAMS)
+am_ld_new_OBJECTS = ldgram.$(OBJEXT) ldlex.$(OBJEXT) lexsup.$(OBJEXT) \
+ ldlang.$(OBJEXT) mri.$(OBJEXT) ldctor.$(OBJEXT) \
+ ldmain.$(OBJEXT) ldwrite.$(OBJEXT) ldexp.$(OBJEXT) \
+ ldemul.$(OBJEXT) ldver.$(OBJEXT) ldmisc.$(OBJEXT) \
+ ldfile.$(OBJEXT) ldcref.$(OBJEXT)
+ld_new_OBJECTS = $(am_ld_new_OBJECTS)
+am__DEPENDENCIES_1 =
+am__DEPENDENCIES_2 = ../bfd/libbfd.la
+am__DEPENDENCIES_3 = ../libiberty/libiberty.a
+DEFAULT_INCLUDES = -I. -I$(srcdir) -I.
+depcomp =
+am__depfiles_maybe =
+COMPILE = $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) \
+ $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS)
+LTCOMPILE = $(LIBTOOL) --tag=CC --mode=compile $(CC) $(DEFS) \
+ $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) \
+ $(AM_CFLAGS) $(CFLAGS)
+CCLD = $(CC)
+LINK = $(LIBTOOL) --tag=CC --mode=link $(CCLD) $(AM_CFLAGS) $(CFLAGS) \
+ $(AM_LDFLAGS) $(LDFLAGS) -o $@
+LEXCOMPILE = $(LEX) $(LFLAGS) $(AM_LFLAGS)
+LTLEXCOMPILE = $(LIBTOOL) --mode=compile $(LEX) $(LFLAGS) $(AM_LFLAGS)
+YACCCOMPILE = $(YACC) $(YFLAGS) $(AM_YFLAGS)
+LTYACCCOMPILE = $(LIBTOOL) --mode=compile $(YACC) $(YFLAGS) \
+ $(AM_YFLAGS)
+YLWRAP = $(top_srcdir)/../ylwrap
+SOURCES = $(ld_new_SOURCES) $(EXTRA_ld_new_SOURCES)
+INFO_DEPS = ld.info
+TEXINFO_TEX = $(top_srcdir)/../texinfo/texinfo.tex
+am__TEXINFO_TEX_DIR = $(top_srcdir)/../texinfo
+DVIS = ld.dvi
+PDFS = ld.pdf
+PSS = ld.ps
+HTMLS = ld.html
+TEXINFOS = ld.texinfo
+TEXI2PDF = $(TEXI2DVI) --pdf --batch
+MAKEINFOHTML = $(MAKEINFO) --html
+AM_MAKEINFOHTMLFLAGS = $(AM_MAKEINFOFLAGS)
+DVIPS = dvips
+RECURSIVE_TARGETS = all-recursive check-recursive dvi-recursive \
+ html-recursive info-recursive install-data-recursive \
+ install-exec-recursive install-info-recursive \
+ install-recursive installcheck-recursive installdirs-recursive \
+ pdf-recursive ps-recursive uninstall-info-recursive \
+ uninstall-recursive
+man1dir = $(mandir)/man1
+am__installdirs = "$(DESTDIR)$(man1dir)"
+NROFF = nroff
+MANS = $(man_MANS)
+ETAGS = etags
+CTAGS = ctags
+DEJATOOL = $(PACKAGE)
+RUNTESTDEFAULTFLAGS = --tool $$tool --srcdir $$srcdir
+DIST_SUBDIRS = $(SUBDIRS)
+ACLOCAL = @ACLOCAL@
+AMDEP_FALSE = @AMDEP_FALSE@
+AMDEP_TRUE = @AMDEP_TRUE@
+AMTAR = @AMTAR@
+AR = @AR@
+AUTOCONF = @AUTOCONF@
+AUTOHEADER = @AUTOHEADER@
+AUTOMAKE = @AUTOMAKE@
+AWK = @AWK@
CATALOGS = @CATALOGS@
CATOBJEXT = @CATOBJEXT@
CC = @CC@
-CC_FOR_BUILD = @CC_FOR_BUILD@
-CXXCPP = @CXXCPP@
+CCDEPMODE = @CCDEPMODE@
+CFLAGS = @CFLAGS@
+CPP = @CPP@
+CPPFLAGS = @CPPFLAGS@
+CYGPATH_W = @CYGPATH_W@
DATADIRNAME = @DATADIRNAME@
-DLLTOOL = @DLLTOOL@
+DEFS = @DEFS@
+DEPDIR = @DEPDIR@
+DUMPBIN = @DUMPBIN@
+ECHO_C = @ECHO_C@
+ECHO_N = @ECHO_N@
+ECHO_T = @ECHO_T@
+EGREP = @EGREP@
+EMUL = @EMUL@
EMULATION_LIBPATH = @EMULATION_LIBPATH@
+EMULATION_OFILES = @EMULATION_OFILES@
+EMUL_EXTRA_OFILES = @EMUL_EXTRA_OFILES@
EXEEXT = @EXEEXT@
-EXEEXT_FOR_BUILD = @EXEEXT_FOR_BUILD@
-GCJ = @GCJ@
-GCJFLAGS = @GCJFLAGS@
-GMOFILES = @GMOFILES@
+FGREP = @FGREP@
+GENCAT = @GENCAT@
+GENINSRC_NEVER_FALSE = @GENINSRC_NEVER_FALSE@
+GENINSRC_NEVER_TRUE = @GENINSRC_NEVER_TRUE@
GMSGFMT = @GMSGFMT@
-GT_NO = @GT_NO@
-GT_YES = @GT_YES@
+GREP = @GREP@
HDEFINES = @HDEFINES@
-INCLUDE_LOCALE_H = @INCLUDE_LOCALE_H@
+
+#stuff for self hosting (can be overridden in config file).
+HOSTING_CRT0 = @HOSTING_CRT0@
+HOSTING_LIBS = @HOSTING_LIBS@
+INCINTL = @INCINTL@
+INSTALL_DATA = @INSTALL_DATA@
+INSTALL_PROGRAM = @INSTALL_PROGRAM@
+INSTALL_SCRIPT = @INSTALL_SCRIPT@
+INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@
INSTOBJEXT = @INSTOBJEXT@
-INTLDEPS = @INTLDEPS@
-INTLOBJS = @INTLOBJS@
+LD = @LD@
+LDFLAGS = @LDFLAGS@
+LEX = `if [ -f ../flex/flex ]; then echo ../flex/flex; else echo @LEX@; fi`
+LEXLIB = @LEXLIB@
+LEX_OUTPUT_ROOT = @LEX_OUTPUT_ROOT@
+LIBINTL = @LIBINTL@
+LIBINTL_DEP = @LIBINTL_DEP@
+LIBOBJS = @LIBOBJS@
+LIBS = @LIBS@
LIBTOOL = @LIBTOOL@
+
+# 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. This can be set
+# when the linker is configured via the --with-lib-path configure switch.
+LIB_PATH = @LIB_PATH@
LN_S = @LN_S@
+LTLIBOBJS = @LTLIBOBJS@
MAINT = @MAINT@
+MAINTAINER_MODE_FALSE = @MAINTAINER_MODE_FALSE@
+MAINTAINER_MODE_TRUE = @MAINTAINER_MODE_TRUE@
MAKEINFO = @MAKEINFO@
MKINSTALLDIRS = @MKINSTALLDIRS@
MSGFMT = @MSGFMT@
+MSGMERGE = @MSGMERGE@
NATIVE_LIB_DIRS = @NATIVE_LIB_DIRS@
-OBJDUMP = @OBJDUMP@
+NM = @NM@
+NO_WERROR = @NO_WERROR@
OBJEXT = @OBJEXT@
PACKAGE = @PACKAGE@
-POFILES = @POFILES@
+PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@
+PACKAGE_NAME = @PACKAGE_NAME@
+PACKAGE_STRING = @PACKAGE_STRING@
+PACKAGE_TARNAME = @PACKAGE_TARNAME@
+PACKAGE_VERSION = @PACKAGE_VERSION@
+PATH_SEPARATOR = @PATH_SEPARATOR@
POSUB = @POSUB@
RANLIB = @RANLIB@
+SED = @SED@
+SET_MAKE = @SET_MAKE@
+SHELL = @SHELL@
STRINGIFY = @STRINGIFY@
STRIP = @STRIP@
TARGET_SYSTEM_ROOT = @TARGET_SYSTEM_ROOT@
TARGET_SYSTEM_ROOT_DEFINE = @TARGET_SYSTEM_ROOT_DEFINE@
-USE_INCLUDED_LIBINTL = @USE_INCLUDED_LIBINTL@
+
+# This is the real libbfd.a created by libtool.
+TESTBFDLIB = @TESTBFDLIB@
USE_NLS = @USE_NLS@
VERSION = @VERSION@
-bfdincludedir = @bfdincludedir@
-bfdlibdir = @bfdlibdir@
-l = @l@
+WARN_CFLAGS = @WARN_CFLAGS@
+XGETTEXT = @XGETTEXT@
+YACC = `if [ -f ../bison/bison ]; then echo ../bison/bison -y -L$(srcdir)/../bison/; else echo @YACC@; fi`
+ac_ct_AR = @ac_ct_AR@
+ac_ct_CC = @ac_ct_CC@
+ac_ct_DUMPBIN = @ac_ct_DUMPBIN@
+ac_ct_RANLIB = @ac_ct_RANLIB@
+ac_ct_STRIP = @ac_ct_STRIP@
+am__fastdepCC_FALSE = @am__fastdepCC_FALSE@
+am__fastdepCC_TRUE = @am__fastdepCC_TRUE@
+am__include = @am__include@
+am__leading_dot = @am__leading_dot@
+am__quote = @am__quote@
+am__tar = @am__tar@
+am__untar = @am__untar@
+bindir = @bindir@
+build = @build@
+build_alias = @build_alias@
+build_cpu = @build_cpu@
+build_os = @build_os@
+build_vendor = @build_vendor@
+datadir = @datadir@
+datarootdir = @datarootdir@
+docdir = @docdir@
+exec_prefix = @exec_prefix@
+host = @host@
+host_alias = @host_alias@
+host_cpu = @host_cpu@
+host_os = @host_os@
+host_vendor = @host_vendor@
+htmldir = @htmldir@
+includedir = @includedir@
+infodir = @infodir@
+install_sh = @install_sh@
+libdir = @libdir@
+libexecdir = @libexecdir@
+localstatedir = @localstatedir@
+lt_ECHO = @lt_ECHO@
+mandir = @mandir@
+mkdir_p = @mkdir_p@
+oldincludedir = @oldincludedir@
+prefix = @prefix@
+program_transform_name = @program_transform_name@
+sbindir = @sbindir@
+sharedstatedir = @sharedstatedir@
+sysconfdir = @sysconfdir@
+target = @target@
+target_alias = @target_alias@
+target_cpu = @target_cpu@
+target_os = @target_os@
+target_vendor = @target_vendor@
use_sysroot = @use_sysroot@
-
-INTLLIBS = @INTLLIBS@
-
AUTOMAKE_OPTIONS = cygnus dejagnu
-
+ACLOCAL_AMFLAGS = -I .. -I ../config -I ../bfd
SUBDIRS = po
-
tooldir = $(exec_prefix)/$(target_alias)
-
-YACC = `if [ -f ../bison/bison ]; then echo ../bison/bison -y -L$(srcdir)/../bison/; else echo @YACC@; fi`
YFLAGS = -d
-LEX = `if [ -f ../flex/flex ]; then echo ../flex/flex; else echo @LEX@; fi`
-
-WARN_CFLAGS = @WARN_CFLAGS@
AM_CFLAGS = $(WARN_CFLAGS)
# 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@
-EMUL_EXTRA_OFILES = @EMUL_EXTRA_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. This can be set
-# when the linker is configured via the --with-lib-path configure switch.
-LIB_PATH = @LIB_PATH@
-
BASEDIR = $(srcdir)/..
BFDDIR = $(BASEDIR)/bfd
INCDIR = $(BASEDIR)/include
@@ -156,31 +300,16 @@ DOCVER = gen
# Options to extract the man page from ld.texinfo
MANCONF = -Dman
-
-TEXI2POD = perl $(BASEDIR)/etc/texi2pod.pl
-
+TEXI2POD = perl $(BASEDIR)/etc/texi2pod.pl $(AM_MAKEINFOFLAGS)
POD2MAN = pod2man --center="GNU Development Tools" \
--release="binutils-$(VERSION)" --section=1
-
-#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`
-
-
+EXPECT = expect
+RUNTEST = runtest
RUNTESTFLAGS =
-
CC_FOR_TARGET = ` \
if [ -f $$r/../gcc/xgcc ] ; then \
if [ -f $$r/../newlib/Makefile ] ; then \
@@ -196,41 +325,45 @@ CC_FOR_TARGET = ` \
fi; \
fi`
-
-CXX = gcc
+CXX = g++
CXX_FOR_TARGET = ` \
- if [ -f $$r/../gcc/xgcc ] ; then \
+ if [ -f $$r/../gcc/g++ ] ; 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; \
+ echo $$r/../gcc/g++ -B$$r/../gcc/ -idirafter $$r/../newlib/targ-include -idirafter $${srcroot}/../newlib/libc/include -nostdinc; \
else \
- echo $$r/../gcc/xgcc -B$$r/../gcc/; \
+ echo $$r/../gcc/g++ -B$$r/../gcc/; \
fi; \
else \
if [ "@host@" = "@target@" ] ; then \
echo $(CXX); \
else \
- echo gcc | sed '$(transform)'; \
+ echo g++ | sed '$(transform)'; \
fi; \
fi`
-
-noinst_PROGRAMS = ld-new
info_TEXINFOS = ld.texinfo
+ld_TEXINFOS = configdoc.texi
noinst_TEXINFOS = ldint.texinfo
man_MANS = ld.1
+AM_MAKEINFOFLAGS = -I $(srcdir) -I $(BFDDIR)/doc -I ../bfd/doc \
+ -I $(top_srcdir)/../libiberty
-INCLUDES = -D_GNU_SOURCE -I. -I$(srcdir) -I../bfd -I$(BFDDIR) -I$(INCDIR) -I$(top_srcdir)/../intl -I../intl $(HDEFINES) $(CFLAGS) -DLOCALEDIR="\"$(prefix)/share/locale\""
+TEXI2DVI = texi2dvi -I $(srcdir) -I $(BFDDIR)/doc -I ../bfd/doc \
+ -I $(top_srcdir)/../libiberty
+
+INCLUDES = -D_GNU_SOURCE -I. -I$(srcdir) -I../bfd -I$(BFDDIR) -I$(INCDIR) \
+ @INCINTL@ $(HDEFINES) $(CFLAGS) \
+ -DLOCALEDIR="\"$(datadir)/locale\""
BFDLIB = ../bfd/libbfd.la
LIBIBERTY = ../libiberty/libiberty.a
-
ALL_EMULATIONS = \
- ea29k.o \
eaixppc.o \
eaixrs6.o \
ealpha.o \
earcelf.o \
earm_epoc_pe.o \
+ earm_wince_pe.o \
earmaoutb.o \
earmaoutl.o \
earmcoff.o \
@@ -238,20 +371,25 @@ ALL_EMULATIONS = \
earmelfb.o \
earmelf_fbsd.o \
earmelf_linux.o \
+ earmelf_linux_eabi.o \
earmelfb_linux.o \
+ earmelfb_linux_eabi.o \
earmelf_nbsd.o \
earmelfb_nbsd.o \
- earmelf_oabi.o \
+ earmelf_vxworks.o \
earmnto.o \
earmnbsd.o \
earmpe.o \
+ earmsymbian.o \
eavr2.o \
eavr1.o \
eavr3.o \
eavr4.o \
eavr5.o \
+ eavr6.o \
ecoff_i860.o \
ecoff_sparc.o \
+ eelf32_spu.o \
ecrisaout.o \
ecriself.o \
ecrislinux.o \
@@ -261,19 +399,26 @@ ALL_EMULATIONS = \
ed30velf.o \
edelta68.o \
eelf32_dlx.o \
- eebmon29k.o \
eelf32_i960.o \
eelf32_i860.o \
eelf32_sparc.o \
+ eelf32_sparc_vxworks.o \
eelf32b4300.o \
+ eelf32bfin.o \
+ eelf32bfinfd.o \
+ eelf32cr16.o \
+ eelf32cr16c.o \
eelf32bmip.o \
eelf32bmipn32.o \
eelf32btsmip.o \
+ eelf32crx.o \
eelf32btsmipn32.o \
eelf32ltsmip.o \
eelf32ltsmipn32.o \
eelf32ebmip.o \
+ eelf32ebmipvxworks.o \
eelf32elmip.o \
+ eelf32elmipvxworks.o \
eelf32fr30.o \
eelf32frv.o \
eelf32i370.o \
@@ -285,8 +430,11 @@ ALL_EMULATIONS = \
eelf32lppc.o \
eelf32lppcnto.o \
eelf32lppcsim.o \
+ eelf32m32c.o \
eelf32mcore.o \
+ eelf32mep.o \
eelf32mipswindiss.o \
+ eelf32mt.o \
eelf32openrisc.o \
eelf32ppc.o \
eelf32ppc_fbsd.o \
@@ -294,7 +442,11 @@ ALL_EMULATIONS = \
eelf32ppcnto.o \
eelf32ppcsim.o \
eelf32ppcwindiss.o \
+ eelf32ppcvxworks.o \
eelf32vax.o \
+ eelf32xc16x.o \
+ eelf32xc16xl.o \
+ eelf32xc16xs.o \
eelf32xstormy16.o \
eelf32xtensa.o \
eelf_i386.o \
@@ -302,6 +454,7 @@ ALL_EMULATIONS = \
eelf_i386_chaos.o \
eelf_i386_fbsd.o \
eelf_i386_ldso.o \
+ eelf_i386_vxworks.o \
eelf_s390.o \
egld960.o \
egld960coff.o \
@@ -346,6 +499,7 @@ ALL_EMULATIONS = \
ei386nw.o \
ei386pe.o \
ei386pe_posix.o \
+ ei386pep.o \
elnk960.o \
em32relf.o \
em32rlelf.o \
@@ -362,10 +516,10 @@ ALL_EMULATIONS = \
em68kelf.o \
em68kelfnbsd.o \
em68klinux.o \
- em68klynx.o \
em68knbsd.o \
em68kpsos.o \
em88kbcs.o \
+ emaxqcoff.o \
emcorepe.o \
emipsbig.o \
emipsbsd.o \
@@ -398,6 +552,13 @@ ALL_EMULATIONS = \
emsp430x167.o \
emsp430x168.o \
emsp430x169.o \
+ emsp430x1610.o \
+ emsp430x1611.o \
+ emsp430x1612.o \
+ emsp430x2101.o \
+ emsp430x2111.o \
+ emsp430x2121.o \
+ emsp430x2131.o \
emsp430x311.o \
emsp430x312.o \
emsp430x313.o \
@@ -409,12 +570,17 @@ ALL_EMULATIONS = \
emsp430x337.o \
emsp430x412.o \
emsp430x413.o \
+ emsp430x415.o \
+ emsp430x417.o \
emsp430xE423.o \
emsp430xE425.o \
emsp430xE427.o \
emsp430xW423.o \
emsp430xW425.o \
emsp430xW427.o \
+ emsp430xG437.o \
+ emsp430xG438.o \
+ emsp430xG439.o \
emsp430x435.o \
emsp430x436.o \
emsp430x437.o \
@@ -432,8 +598,9 @@ ALL_EMULATIONS = \
eppcmacos.o \
eppcnw.o \
eppcpe.o \
+ eppclynx.o \
eriscix.o \
- esa29200.o \
+ escoreelf.o \
esh.o \
eshelf32.o \
eshlelf32.o \
@@ -448,12 +615,15 @@ ALL_EMULATIONS = \
eshlelf_nbsd.o \
eshelf_nto.o \
eshlelf_nto.o \
+ eshelf_uclinux.o \
+ eshelf_vxworks.o \
+ eshlelf_vxworks.o \
eshl.o \
eshlelf.o \
+ eshlsymbian.o \
eshpe.o \
esparcaout.o \
esparclinux.o \
- esparclynx.o \
esparcnbsd.o \
est2000.o \
esun3.o \
@@ -471,10 +641,10 @@ ALL_EMULATIONS = \
evsta.o \
ew65.o \
ez8001.o \
- eelf32frvfd.o \
+ eelf32frvfd.o \
+ ez80.o \
ez8002.o
-
ALL_64_EMULATIONS = \
eelf64_aix.o \
eelf64_ia64.o \
@@ -501,204 +671,162 @@ ALL_64_EMULATIONS = \
eelf64lppc.o \
ehppa64linux.o
-
ALL_EMUL_EXTRA_OFILES = \
deffilep.o \
- pe-dll.o
-
+ pe-dll.o \
+ pep-dll.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 pe-dll.c
-
+ mri.c ldcref.c pe-dll.c pep-dll.c
HFILES = ld.h ldctor.h ldemul.h ldexp.h ldfile.h \
ldlang.h ldlex.h ldmain.h ldmisc.h ldver.h \
- ldwrite.h mri.h deffile.h pe-dll.h
-
+ ldwrite.h mri.h deffile.h pe-dll.h pep-dll.h elf-hints-local.h
GENERATED_CFILES = ldgram.c ldlex.c deffilep.c
GENERATED_HFILES = ldgram.h ldemul-list.h deffilep.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} ${EMUL_EXTRA_OFILES}
-
STAGESTUFF = *.o ldscripts/* e*.c
# At the moment this is just a list of those emulation template files
# that contain internationalised strings.
EMULATION_FILES = emultempl/pe.em emultempl/armcoff.em
-
POTFILES = $(CFILES) $(HFILES) $(EMULATION_FILES)
# These all start with e so 'make clean' can find them.
-
-GENSCRIPTS = LIB_PATH='${LIB_PATH}' $(SHELL) $(srcdir)/genscripts.sh ${srcdir} ${libdir} "${exec_prefix}" @host@ @target@ @target_alias@ "@EMULATION_LIBPATH@" "@NATIVE_LIB_DIRS@" @use_sysroot@
+GENSCRIPTS = LIB_PATH='${LIB_PATH}' $(SHELL) $(srcdir)/genscripts.sh "${srcdir}" "${libdir}" "${prefix}" "${exec_prefix}" @host@ @target@ @target_alias@ "@EMULATION_LIBPATH@" "@NATIVE_LIB_DIRS@" @use_sysroot@
GEN_DEPENDS = $(srcdir)/genscripts.sh stringify.sed
+ELF_DEPS = $(srcdir)/emultempl/elf32.em $(srcdir)/emultempl/elf-generic.em
+ELF_GEN_DEPS = $(srcdir)/emultempl/generic.em $(srcdir)/emultempl/elf-generic.em $(srcdir)/emultempl/genelf.em
# We need this for automake to use YLWRAP.
EXTRA_ld_new_SOURCES = deffilep.y
-
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) $(EMUL_EXTRA_OFILES) $(BFDLIB) $(LIBIBERTY) $(INTLDEPS)
-ld_new_LDADD = $(EMULATION_OFILES) $(EMUL_EXTRA_OFILES) $(BFDLIB) $(LIBIBERTY) $(INTLLIBS)
-
-# This is the real libbfd.a created by libtool.
-TESTBFDLIB = @TESTBFDLIB@
-
-MAINTAINERCLEANFILES = ldver.texi
+ld_new_DEPENDENCIES = $(EMULATION_OFILES) $(EMUL_EXTRA_OFILES) $(BFDLIB) $(LIBIBERTY) $(LIBINTL_DEP)
+ld_new_LDADD = $(EMULATION_OFILES) $(EMUL_EXTRA_OFILES) $(BFDLIB) $(LIBIBERTY) $(LIBINTL)
+MAINTAINERCLEANFILES = configdoc.texi ld.info
-# We want to reconfigure if configure.host or configure.tgt changes.
-CONFIG_STATUS_DEPENDENCIES = $(srcdir)/configure.host $(srcdir)/configure.tgt
+# We want to reconfigure if configure.host or configure.tgt changes. We
+# extract version from bfd/configure.in, so we must depend on that also.
+CONFIG_STATUS_DEPENDENCIES = $(srcdir)/configure.host $(srcdir)/configure.tgt \
+ $(srcdir)/../bfd/configure.in
MOSTLYCLEANFILES = $(STAGESTUFF) ld1$(EXEEXT) ld2$(EXEEXT) ld3$(EXEEXT) \
ldemul-list.h crtbegin.o crtend.o ld.log ld.sum
-CLEANFILES = dep.sed DEP DEPA DEP1 DEP2
+CLEANFILES = dep.sed DEP DEPA DEP1 DEP2 spu_ovl.s
+html__strip_dir = `echo $$p | sed -e 's|^.*/||'`;
# Stuff that should be included in a distribution. The diststuff
# target is run by the taz target in ../Makefile.in.
-EXTRA_DIST = ldgram.c ldgram.h ldlex.c $(man_MANS)
-
-DISTCLEANFILES = tdirs site.exp site.bak stringify.sed
-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.$(OBJEXT) ldlex.$(OBJEXT) lexsup.$(OBJEXT) \
-ldlang.$(OBJEXT) mri.$(OBJEXT) ldctor.$(OBJEXT) ldmain.$(OBJEXT) \
-ldwrite.$(OBJEXT) ldexp.$(OBJEXT) ldemul.$(OBJEXT) ldver.$(OBJEXT) \
-ldmisc.$(OBJEXT) ldfile.$(OBJEXT) ldcref.$(OBJEXT)
-ld_new_LDFLAGS =
-LEX_OUTPUT_ROOT = @LEX_OUTPUT_ROOT@
-LEXLIB = @LEXLIB@
-YLWRAP = $(top_srcdir)/../ylwrap
-CFLAGS = @CFLAGS@
-COMPILE = $(CC) $(DEFS) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS)
-LTCOMPILE = $(LIBTOOL) --mode=compile $(CC) $(DEFS) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS)
-CCLD = $(CC)
-LINK = $(LIBTOOL) --mode=link $(CCLD) $(AM_CFLAGS) $(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
-man1dir = $(mandir)/man1
-MANS = $(man_MANS)
-
-NROFF = nroff
-DIST_COMMON = README ./stamp-h.in ChangeLog Makefile.am Makefile.in \
-NEWS TODO acinclude.m4 aclocal.m4 config.in configure configure.in \
-deffilep.c ldgram.c ldlex.c
-
-
-DISTFILES = $(DIST_COMMON) $(SOURCES) $(HEADERS) $(TEXINFOS) $(EXTRA_DIST)
-
-TAR = gtar
-GZIP_ENV = --best
-SOURCES = $(ld_new_SOURCES) $(EXTRA_ld_new_SOURCES)
-OBJECTS = $(ld_new_OBJECTS)
+EXTRA_DIST = ldgram.c ldgram.h ldlex.c emultempl/spu_ovl.o $(man_MANS)
+DISTCLEANFILES = tdirs site.exp site.bak stringify.sed $(am__append_1)
+all: config.h
+ $(MAKE) $(AM_MAKEFLAGS) all-recursive
-all: all-redirect
.SUFFIXES:
-.SUFFIXES: .S .c .dvi .info .l .lo .o .obj .ps .s .texi .texinfo .txi .y
-$(srcdir)/Makefile.in: @MAINTAINER_MODE_TRUE@ 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): @MAINTAINER_MODE_TRUE@ configure.in acinclude.m4
- cd $(srcdir) && $(ACLOCAL)
-
-config.status: $(srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES)
+.SUFFIXES: .c .dvi .l .lo .o .obj .ps .y
+am--refresh:
+ @:
+$(srcdir)/Makefile.in: @MAINTAINER_MODE_TRUE@ $(srcdir)/Makefile.am $(am__configure_deps)
+ @for dep in $?; do \
+ case '$(am__configure_deps)' in \
+ *$$dep*) \
+ echo ' cd $(srcdir) && $(AUTOMAKE) --cygnus '; \
+ cd $(srcdir) && $(AUTOMAKE) --cygnus \
+ && exit 0; \
+ exit 1;; \
+ esac; \
+ done; \
+ echo ' cd $(top_srcdir) && $(AUTOMAKE) --cygnus Makefile'; \
+ cd $(top_srcdir) && \
+ $(AUTOMAKE) --cygnus Makefile
+.PRECIOUS: Makefile
+Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status
+ @case '$?' in \
+ *config.status*) \
+ echo ' $(SHELL) ./config.status'; \
+ $(SHELL) ./config.status;; \
+ *) \
+ echo ' cd $(top_builddir) && $(SHELL) ./config.status $@ $(am__depfiles_maybe)'; \
+ cd $(top_builddir) && $(SHELL) ./config.status $@ $(am__depfiles_maybe);; \
+ esac;
+
+$(top_builddir)/config.status: $(top_srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES)
$(SHELL) ./config.status --recheck
-$(srcdir)/configure: @MAINTAINER_MODE_TRUE@$(srcdir)/configure.in $(ACLOCAL_M4) $(CONFIGURE_DEPENDENCIES)
+
+$(top_srcdir)/configure: @MAINTAINER_MODE_TRUE@ $(am__configure_deps)
cd $(srcdir) && $(AUTOCONF)
+$(ACLOCAL_M4): @MAINTAINER_MODE_TRUE@ $(am__aclocal_m4_deps)
+ cd $(srcdir) && $(ACLOCAL) $(ACLOCAL_AMFLAGS)
-config.h: stamp-h
- @if test ! -f $@; then \
- rm -f stamp-h; \
- $(MAKE) stamp-h; \
- else :; fi
-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 2> /dev/null
-$(srcdir)/config.in: @MAINTAINER_MODE_TRUE@$(srcdir)/stamp-h.in
+config.h: stamp-h1
@if test ! -f $@; then \
- rm -f $(srcdir)/stamp-h.in; \
- $(MAKE) $(srcdir)/stamp-h.in; \
+ rm -f stamp-h1; \
+ $(MAKE) stamp-h1; \
else :; fi
-$(srcdir)/stamp-h.in: $(top_srcdir)/configure.in $(ACLOCAL_M4)
- cd $(top_srcdir) && $(AUTOHEADER)
- @echo timestamp > $(srcdir)/stamp-h.in 2> /dev/null
-mostlyclean-hdr:
-
-clean-hdr:
+stamp-h1: $(srcdir)/config.in $(top_builddir)/config.status
+ @rm -f stamp-h1
+ cd $(top_builddir) && $(SHELL) ./config.status config.h
+$(srcdir)/config.in: @MAINTAINER_MODE_TRUE@ $(am__configure_deps)
+ cd $(top_srcdir) && $(AUTOHEADER)
+ rm -f stamp-h1
+ touch $@
distclean-hdr:
- -rm -f config.h
-
-maintainer-clean-hdr:
-
-mostlyclean-noinstPROGRAMS:
+ -rm -f config.h stamp-h1
+po/Makefile.in: $(top_builddir)/config.status $(top_srcdir)/po/Make-in
+ cd $(top_builddir) && $(SHELL) ./config.status $@
clean-noinstPROGRAMS:
- -test -z "$(noinst_PROGRAMS)" || rm -f $(noinst_PROGRAMS)
-
-distclean-noinstPROGRAMS:
-
-maintainer-clean-noinstPROGRAMS:
-
-.c.o:
- $(COMPILE) -c $<
-
-# FIXME: We should only use cygpath when building on Windows,
-# and only if it is available.
-.c.obj:
- $(COMPILE) -c `cygpath -w $<`
-
-.s.o:
- $(COMPILE) -c $<
-
-.S.o:
- $(COMPILE) -c $<
+ @list='$(noinst_PROGRAMS)'; for p in $$list; do \
+ f=`echo $$p|sed 's/$(EXEEXT)$$//'`; \
+ echo " rm -f $$p $$f"; \
+ rm -f $$p $$f ; \
+ done
+ldgram.h: ldgram.c
+ @if test ! -f $@; then \
+ rm -f ldgram.c; \
+ $(MAKE) ldgram.c; \
+ else :; fi
+deffilep.h: deffilep.c
+ @if test ! -f $@; then \
+ rm -f deffilep.c; \
+ $(MAKE) deffilep.c; \
+ else :; fi
+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)
mostlyclean-compile:
- -rm -f *.o core *.core
-rm -f *.$(OBJEXT)
-clean-compile:
-
distclean-compile:
-rm -f *.tab.c
-maintainer-clean-compile:
+.c.o:
+ $(COMPILE) -c $<
+
+.c.obj:
+ $(COMPILE) -c `$(CYGPATH_W) '$<'`
.c.lo:
- $(LIBTOOL) --mode=compile $(COMPILE) -c $<
+ $(LTCOMPILE) -c -o $@ $<
-.s.lo:
- $(LIBTOOL) --mode=compile $(COMPILE) -c $<
+.l.c:
+ $(LEXCOMPILE) $<
+ sed '/^#/ s|$(LEX_OUTPUT_ROOT)\.c|$@|' $(LEX_OUTPUT_ROOT).c >$@
+ rm -f $(LEX_OUTPUT_ROOT).c
-.S.lo:
- $(LIBTOOL) --mode=compile $(COMPILE) -c $<
+.y.c:
+ $(SHELL) $(YLWRAP) $< y.tab.c $@ y.tab.h $*.h y.output $*.output -- $(YACCCOMPILE)
mostlyclean-libtool:
-rm -f *.lo
@@ -707,135 +835,108 @@ clean-libtool:
-rm -rf .libs _libs
distclean-libtool:
+ -rm -f 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)
-.l.c:
- $(LEX) $(AM_LFLAGS) $(LFLAGS) $< && mv $(LEX_OUTPUT_ROOT).c $@
-.y.c:
- $(SHELL) $(YLWRAP) "$(YACC)" $< y.tab.c $*.c y.tab.h $*.h -- $(AM_YFLAGS) $(YFLAGS)
-deffilep.h: deffilep.c
-ldgram.h: ldgram.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/texinfo.tex:$$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/texinfo.tex:$$TEXINPUTS \
- MAKEINFO='$(MAKEINFO) -I $(srcdir)' $(TEXI2DVI) $<
-
-.txi.info:
- @rm -f $@ $@-[0-9] $@-[0-9][0-9]
- $(MAKEINFO) -I $(srcdir) $<
-
-.txi.dvi:
- TEXINPUTS=$(top_srcdir)/../texinfo/texinfo.tex:$$TEXINPUTS \
- MAKEINFO='$(MAKEINFO) -I $(srcdir)' $(TEXI2DVI) $<
-
-.txi:
- @rm -f $@ $@-[0-9] $@-[0-9][0-9]
- $(MAKEINFO) -I $(srcdir) $<
+ld.info: ld.texinfo $(ld_TEXINFOS)
+ restore=: && backupdir="$(am__leading_dot)am$$$$" && \
+ rm -rf $$backupdir && mkdir $$backupdir && \
+ if ($(MAKEINFO) --version) >/dev/null 2>&1; then \
+ for f in $@ $@-[0-9] $@-[0-9][0-9] $(@:.info=).i[0-9] $(@:.info=).i[0-9][0-9]; do \
+ if test -f $$f; then mv $$f $$backupdir; restore=mv; else :; fi; \
+ done; \
+ else :; fi && \
+ if $(MAKEINFO) $(AM_MAKEINFOFLAGS) $(MAKEINFOFLAGS) -I $(srcdir) \
+ -o $@ `test -f 'ld.texinfo' || echo '$(srcdir)/'`ld.texinfo; \
+ then \
+ rc=0; \
+ else \
+ rc=$$?; \
+ $$restore $$backupdir/* `echo "./$@" | sed 's|[^/]*$$||'`; \
+ fi; \
+ rm -rf $$backupdir; exit $$rc
+
+ld.dvi: ld.texinfo $(ld_TEXINFOS)
+ TEXINPUTS="$(am__TEXINFO_TEX_DIR)$(PATH_SEPARATOR)$$TEXINPUTS" \
+ MAKEINFO='$(MAKEINFO) $(AM_MAKEINFOFLAGS) $(MAKEINFOFLAGS) -I $(srcdir)' \
+ $(TEXI2DVI) -o $@ `test -f 'ld.texinfo' || echo '$(srcdir)/'`ld.texinfo
+
+ld.pdf: ld.texinfo $(ld_TEXINFOS)
+ TEXINPUTS="$(am__TEXINFO_TEX_DIR)$(PATH_SEPARATOR)$$TEXINPUTS" \
+ MAKEINFO='$(MAKEINFO) $(AM_MAKEINFOFLAGS) $(MAKEINFOFLAGS) -I $(srcdir)' \
+ $(TEXI2PDF) -o $@ `test -f 'ld.texinfo' || echo '$(srcdir)/'`ld.texinfo
+
+ld.html: ld.texinfo $(ld_TEXINFOS)
+ rm -rf $(@:.html=.htp)
+ if $(MAKEINFOHTML) $(AM_MAKEINFOHTMLFLAGS) $(MAKEINFOFLAGS) -I $(srcdir) \
+ -o $(@:.html=.htp) `test -f 'ld.texinfo' || echo '$(srcdir)/'`ld.texinfo; \
+ then \
+ rm -rf $@; \
+ if test ! -d $(@:.html=.htp) && test -d $(@:.html=); then \
+ mv $(@:.html=) $@; else mv $(@:.html=.htp) $@; fi; \
+ else \
+ if test ! -d $(@:.html=.htp) && test -d $(@:.html=); then \
+ rm -rf $(@:.html=); else rm -Rf $(@:.html=.htp) $@; fi; \
+ exit 1; \
+ fi
.dvi.ps:
- $(DVIPS) $< -o $@
+ TEXINPUTS="$(am__TEXINFO_TEX_DIR)$(PATH_SEPARATOR)$$TEXINPUTS" \
+ $(DVIPS) -o $@ $<
-install-info-am: $(INFO_DEPS)
- @$(NORMAL_INSTALL)
- $(mkinstalldirs) $(DESTDIR)$(infodir)
- @list='$(INFO_DEPS)'; \
- for file in $$list; 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 $(DESTDIR)$(infodir)/$$ifile"; \
- $(INSTALL_DATA) $$d/$$ifile $(DESTDIR)$(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 \
+uninstall-info-am:
+ @$(PRE_UNINSTALL)
+ @if (install-info --version && \
+ install-info --version 2>&1 | sed 1q | grep -i -v debian) >/dev/null 2>&1; then \
list='$(INFO_DEPS)'; \
for file in $$list; do \
- echo " install-info --info-dir=$(DESTDIR)$(infodir) $(DESTDIR)$(infodir)/$$file";\
- install-info --info-dir=$(DESTDIR)$(infodir) $(DESTDIR)$(infodir)/$$file || :;\
+ relfile=`echo "$$file" | sed 's|^.*/||'`; \
+ echo " install-info --info-dir='$(DESTDIR)$(infodir)' --remove '$(DESTDIR)$(infodir)/$$relfile'"; \
+ install-info --info-dir="$(DESTDIR)$(infodir)" --remove "$(DESTDIR)$(infodir)/$$relfile"; \
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; \
- list='$(INFO_DEPS)'; \
- for file in $$list; do \
- test -z "$$ii" \
- || install-info --info-dir=$(DESTDIR)$(infodir) --remove $$file; \
- done
+ else :; fi
@$(NORMAL_UNINSTALL)
- list='$(INFO_DEPS)'; \
+ @list='$(INFO_DEPS)'; \
for file in $$list; do \
- (cd $(DESTDIR)$(infodir) && rm -f $$file $$file-[0-9] $$file-[0-9][0-9]); \
+ relfile=`echo "$$file" | sed 's|^.*/||'`; \
+ relfile_i=`echo "$$relfile" | sed 's|\.info$$||;s|$$|.i|'`; \
+ (if cd "$(DESTDIR)$(infodir)"; then \
+ echo " cd '$(DESTDIR)$(infodir)' && rm -f $$relfile $$relfile-[0-9] $$relfile-[0-9][0-9] $$relfile_i[0-9] $$relfile_i[0-9][0-9]"; \
+ rm -f $$relfile $$relfile-[0-9] $$relfile-[0-9][0-9] $$relfile_i[0-9] $$relfile_i[0-9][0-9]; \
+ else :; fi); \
done
dist-info: $(INFO_DEPS)
+ @srcdirstrip=`echo "$(srcdir)" | sed 's|.|.|g'`; \
list='$(INFO_DEPS)'; \
for base in $$list; do \
+ case $$base in \
+ $(srcdir)/*) base=`echo "$$base" | sed "s|^$$srcdirstrip/||"`;; \
+ esac; \
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; \
+ for file in $$d/$$base*; do \
+ relfile=`expr "$$file" : "$$d/\(.*\)"`; \
+ test -f $(distdir)/$$relfile || \
+ cp -p $$file $(distdir)/$$relfile; \
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:
+ -rm -rf ld.aux ld.cp ld.cps ld.fn ld.fns ld.ky ld.log ld.pg ld.pgs ld.tmp \
+ ld.toc ld.tp ld.tps ld.vr ld.vrs ld.dvi ld.pdf ld.ps ld.html
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; \
+ @list='$(INFO_DEPS)'; for i in $$list; do \
+ i_i=`echo "$$i" | sed 's|\.info$$||;s|$$|.i|'`; \
+ echo " rm -f $$i $$i-[0-9] $$i-[0-9][0-9] $$i_i[0-9] $$i_i[0-9][0-9]"; \
+ rm -f $$i $$i-[0-9] $$i-[0-9][0-9] $$i_i[0-9] $$i_i[0-9][0-9]; \
done
-clean-info: mostlyclean-aminfo
-install-man1:
- $(mkinstalldirs) $(DESTDIR)$(man1dir)
- @list='$(man1_MANS)'; \
- l2='$(man_MANS)'; for i in $$l2; do \
+clean-info: mostlyclean-aminfo
+install-man1: $(man1_MANS) $(man_MANS)
+ @$(NORMAL_INSTALL)
+ test -z "$(man1dir)" || $(mkdir_p) "$(DESTDIR)$(man1dir)"
+ @list='$(man1_MANS) $(dist_man1_MANS) $(nodist_man1_MANS)'; \
+ l2='$(man_MANS) $(dist_man_MANS) $(nodist_man_MANS)'; \
+ for i in $$l2; do \
case "$$i" in \
*.1*) list="$$list $$i" ;; \
esac; \
@@ -844,32 +945,37 @@ install-man1:
if test -f $(srcdir)/$$i; then file=$(srcdir)/$$i; \
else file=$$i; fi; \
ext=`echo $$i | sed -e 's/^.*\\.//'`; \
+ case "$$ext" in \
+ 1*) ;; \
+ *) ext='1' ;; \
+ esac; \
inst=`echo $$i | sed -e 's/\\.[0-9a-z]*$$//'`; \
+ inst=`echo $$inst | sed -e 's/^.*\///'`; \
inst=`echo $$inst | sed '$(transform)'`.$$ext; \
- echo " $(INSTALL_DATA) $$file $(DESTDIR)$(man1dir)/$$inst"; \
- $(INSTALL_DATA) $$file $(DESTDIR)$(man1dir)/$$inst; \
+ echo " $(INSTALL_DATA) '$$file' '$(DESTDIR)$(man1dir)/$$inst'"; \
+ $(INSTALL_DATA) "$$file" "$(DESTDIR)$(man1dir)/$$inst"; \
done
-
uninstall-man1:
- @list='$(man1_MANS)'; \
- l2='$(man_MANS)'; for i in $$l2; do \
+ @$(NORMAL_UNINSTALL)
+ @list='$(man1_MANS) $(dist_man1_MANS) $(nodist_man1_MANS)'; \
+ l2='$(man_MANS) $(dist_man_MANS) $(nodist_man_MANS)'; \
+ for i in $$l2; do \
case "$$i" in \
*.1*) list="$$list $$i" ;; \
esac; \
done; \
for i in $$list; do \
ext=`echo $$i | sed -e 's/^.*\\.//'`; \
+ case "$$ext" in \
+ 1*) ;; \
+ *) ext='1' ;; \
+ esac; \
inst=`echo $$i | sed -e 's/\\.[0-9a-z]*$$//'`; \
+ inst=`echo $$inst | sed -e 's/^.*\///'`; \
inst=`echo $$inst | sed '$(transform)'`.$$ext; \
- echo " rm -f $(DESTDIR)$(man1dir)/$$inst"; \
- rm -f $(DESTDIR)$(man1dir)/$$inst; \
+ echo " rm -f '$(DESTDIR)$(man1dir)/$$inst'"; \
+ rm -f "$(DESTDIR)$(man1dir)/$$inst"; \
done
-install-man: $(MANS)
- @$(NORMAL_INSTALL)
- $(MAKE) $(AM_MAKEFLAGS) install-man1
-uninstall-man:
- @$(NORMAL_UNINSTALL)
- $(MAKE) $(AM_MAKEFLAGS) uninstall-man1
# This directory's subdirectories are mostly independent; you can cd
# into them and run `make' without going through this Makefile.
@@ -877,13 +983,14 @@ uninstall-man:
# (1) if the variable is set in `config.status', edit `config.status'
# (which will cause the Makefiles to be regenerated when you run `make');
# (2) otherwise, pass the desired values on the `make' command line.
-
-@SET_MAKE@
-
-all-recursive install-data-recursive install-exec-recursive \
-installdirs-recursive install-recursive uninstall-recursive install-info-recursive \
-check-recursive installcheck-recursive info-recursive dvi-recursive:
- @set fnord $(MAKEFLAGS); amf=$$2; \
+$(RECURSIVE_TARGETS):
+ @failcom='exit 1'; \
+ for f in x $$MAKEFLAGS; do \
+ case $$f in \
+ *=* | --[!k]*);; \
+ *k*) failcom='fail=yes';; \
+ esac; \
+ done; \
dot_seen=no; \
target=`echo $@ | sed s/-recursive//`; \
list='$(SUBDIRS)'; for subdir in $$list; do \
@@ -895,7 +1002,7 @@ check-recursive installcheck-recursive info-recursive dvi-recursive:
local_target="$$target"; \
fi; \
(cd $$subdir && $(MAKE) $(AM_MAKEFLAGS) $$local_target) \
- || case "$$amf" in *=*) exit 1;; *k*) fail=yes;; *) exit 1;; esac; \
+ || eval $$failcom; \
done; \
if test "$$dot_seen" = "no"; then \
$(MAKE) $(AM_MAKEFLAGS) "$$target-am" || exit 1; \
@@ -903,13 +1010,24 @@ check-recursive installcheck-recursive info-recursive dvi-recursive:
mostlyclean-recursive clean-recursive distclean-recursive \
maintainer-clean-recursive:
- @set fnord $(MAKEFLAGS); amf=$$2; \
+ @failcom='exit 1'; \
+ for f in x $$MAKEFLAGS; do \
+ case $$f in \
+ *=* | --[!k]*);; \
+ *k*) failcom='fail=yes';; \
+ esac; \
+ done; \
dot_seen=no; \
- rev=''; list='$(SUBDIRS)'; for subdir in $$list; do \
- rev="$$subdir $$rev"; \
- test "$$subdir" != "." || dot_seen=yes; \
+ case "$@" in \
+ distclean-* | maintainer-clean-*) list='$(DIST_SUBDIRS)' ;; \
+ *) list='$(SUBDIRS)' ;; \
+ esac; \
+ rev=''; for subdir in $$list; do \
+ if test "$$subdir" = "."; then :; else \
+ rev="$$subdir $$rev"; \
+ fi; \
done; \
- test "$$dot_seen" = "no" && rev=". $$rev"; \
+ rev="$$rev ."; \
target=`echo $@ | sed s/-recursive//`; \
for subdir in $$rev; do \
echo "Making $$target in $$subdir"; \
@@ -919,163 +1037,125 @@ maintainer-clean-recursive:
local_target="$$target"; \
fi; \
(cd $$subdir && $(MAKE) $(AM_MAKEFLAGS) $$local_target) \
- || case "$$amf" in *=*) exit 1;; *k*) fail=yes;; *) exit 1;; esac; \
+ || eval $$failcom; \
done && test -z "$$fail"
tags-recursive:
list='$(SUBDIRS)'; for subdir in $$list; do \
test "$$subdir" = . || (cd $$subdir && $(MAKE) $(AM_MAKEFLAGS) tags); \
done
+ctags-recursive:
+ list='$(SUBDIRS)'; for subdir in $$list; do \
+ test "$$subdir" = . || (cd $$subdir && $(MAKE) $(AM_MAKEFLAGS) ctags); \
+ done
-tags: TAGS
-
-ID: $(HEADERS) $(SOURCES) $(LISP)
- list='$(SOURCES) $(HEADERS)'; \
- unique=`for i in $$list; do echo $$i; done | \
- awk ' { files[$$0] = 1; } \
+ID: $(HEADERS) $(SOURCES) $(LISP) $(TAGS_FILES)
+ list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \
+ unique=`for i in $$list; do \
+ if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \
+ done | \
+ $(AWK) ' { files[$$0] = 1; } \
END { for (i in files) print i; }'`; \
- here=`pwd` && cd $(srcdir) \
- && mkid -f$$here/ID $$unique $(LISP)
+ mkid -fID $$unique
+tags: TAGS
-TAGS: tags-recursive $(HEADERS) $(SOURCES) config.in $(TAGS_DEPENDENCIES) $(LISP)
+TAGS: tags-recursive $(HEADERS) $(SOURCES) config.in $(TAGS_DEPENDENCIES) \
+ $(TAGS_FILES) $(LISP)
tags=; \
here=`pwd`; \
+ if ($(ETAGS) --etags-include --version) >/dev/null 2>&1; then \
+ include_option=--etags-include; \
+ empty_fix=.; \
+ else \
+ include_option=--include; \
+ empty_fix=; \
+ fi; \
list='$(SUBDIRS)'; for subdir in $$list; do \
- if test "$$subdir" = .; then :; else \
- test -f $$subdir/TAGS && tags="$$tags -i $$here/$$subdir/TAGS"; \
- fi; \
+ if test "$$subdir" = .; then :; else \
+ test ! -f $$subdir/TAGS || \
+ tags="$$tags $$include_option=$$here/$$subdir/TAGS"; \
+ fi; \
done; \
- list='$(SOURCES) $(HEADERS)'; \
- unique=`for i in $$list; do echo $$i; done | \
- awk ' { files[$$0] = 1; } \
+ list='$(SOURCES) $(HEADERS) config.in $(LISP) $(TAGS_FILES)'; \
+ unique=`for i in $$list; do \
+ if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \
+ 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:
+ if test -z "$(ETAGS_ARGS)$$tags$$unique"; then :; else \
+ test -n "$$unique" || unique=$$empty_fix; \
+ $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \
+ $$tags $$unique; \
+ fi
+ctags: CTAGS
+CTAGS: ctags-recursive $(HEADERS) $(SOURCES) config.in $(TAGS_DEPENDENCIES) \
+ $(TAGS_FILES) $(LISP)
+ tags=; \
+ here=`pwd`; \
+ list='$(SOURCES) $(HEADERS) config.in $(LISP) $(TAGS_FILES)'; \
+ unique=`for i in $$list; do \
+ if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \
+ done | \
+ $(AWK) ' { files[$$0] = 1; } \
+ END { for (i in files) print i; }'`; \
+ test -z "$(CTAGS_ARGS)$$tags$$unique" \
+ || $(CTAGS) $(CTAGSFLAGS) $(AM_CTAGSFLAGS) $(CTAGS_ARGS) \
+ $$tags $$unique
-clean-tags:
+GTAGS:
+ here=`$(am__cd) $(top_builddir) && pwd` \
+ && cd $(top_srcdir) \
+ && gtags -i $(GTAGS_ARGS) $$here
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_ENV) $(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) $(AM_MAKEFLAGS) \
- && $(MAKE) $(AM_MAKEFLAGS) dvi \
- && $(MAKE) $(AM_MAKEFLAGS) check \
- && $(MAKE) $(AM_MAKEFLAGS) install \
- && $(MAKE) $(AM_MAKEFLAGS) installcheck \
- && $(MAKE) $(AM_MAKEFLAGS) dist
- -rm -rf $(distdir)
- @banner="$(distdir).tar.gz is ready for distribution"; \
- dashes=`echo "$$banner" | sed s/./=/g`; \
- echo "$$dashes"; \
- echo "$$banner"; \
- echo "$$dashes"
-dist: distdir
- -chmod -R a+r $(distdir)
- GZIP=$(GZIP_ENV) $(TAR) chozf $(distdir).tar.gz $(distdir)
- -rm -rf $(distdir)
-dist-all: distdir
- -chmod -R a+r $(distdir)
- GZIP=$(GZIP_ENV) $(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; \
- if test -d $$d/$$file; then \
- cp -pr $$d/$$file $(distdir)/$$file; \
- else \
- test -f $(distdir)/$$file \
- || ln $$d/$$file $(distdir)/$$file 2> /dev/null \
- || cp -p $$d/$$file $(distdir)/$$file || :; \
- fi; \
- done
- for subdir in $(SUBDIRS); do \
- if test "$$subdir" = .; then :; else \
- test -d $(distdir)/$$subdir \
- || mkdir $(distdir)/$$subdir \
- || exit 1; \
- chmod 777 $(distdir)/$$subdir; \
- (cd $$subdir && $(MAKE) $(AM_MAKEFLAGS) top_distdir=../$(distdir) distdir=../$(distdir)/$$subdir distdir) \
- || exit 1; \
- fi; \
- done
- $(MAKE) $(AM_MAKEFLAGS) top_distdir="$(top_distdir)" distdir="$(distdir)" dist-info
-
-DEJATOOL = $(PACKAGE)
-
-RUNTESTDEFAULTFLAGS = --tool $(DEJATOOL) --srcdir $$srcdir
+ -rm -f TAGS ID GTAGS GRTAGS GSYMS GPATH tags
site.exp: Makefile
@echo 'Making a new site.exp file...'
- @test ! -f site.bak || 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
- @test ! -f site.exp || sed '1,/^## All variables above are.*##/ d' site.exp >> $@-t
+ @echo '## these variables are automatically generated by make ##' >site.tmp
+ @echo '# Do not edit here. If you wish to override these values' >>site.tmp
+ @echo '# edit the last section' >>site.tmp
+ @echo 'set srcdir $(srcdir)' >>site.tmp
+ @echo "set objdir `pwd`" >>site.tmp
+ @echo 'set build_alias "$(build_alias)"' >>site.tmp
+ @echo 'set build_triplet $(build_triplet)' >>site.tmp
+ @echo 'set host_alias "$(host_alias)"' >>site.tmp
+ @echo 'set host_triplet $(host_triplet)' >>site.tmp
+ @echo 'set target_alias "$(target_alias)"' >>site.tmp
+ @echo 'set target_triplet $(target_triplet)' >>site.tmp
+ @echo '## All variables above are generated by configure. Do Not Edit ##' >>site.tmp
+ @test ! -f site.exp || \
+ sed '1,/^## All variables above are.*##/ d' site.exp >> site.tmp
+ @-rm -f site.bak
@test ! -f site.exp || mv site.exp site.bak
- @mv $@-t site.exp
-info-am: $(INFO_DEPS)
-info: info-recursive
-dvi-am: $(DVIS)
-dvi: dvi-recursive
+ @mv site.tmp site.exp
+
+distclean-DEJAGNU:
+ -rm -f site.exp site.bak
+ -l='$(DEJATOOL)'; for tool in $$l; do \
+ rm -f $$tool.sum $$tool.log; \
+ done
check-am:
$(MAKE) $(AM_MAKEFLAGS) check-DEJAGNU
check: check-recursive
-installcheck-am:
-installcheck: installcheck-recursive
-install-info-am:
-install-info: install-info-recursive
-all-recursive-am: config.h
- $(MAKE) $(AM_MAKEFLAGS) all-recursive
-
-install-exec-am: install-exec-local
+all-am: Makefile $(PROGRAMS) $(MANS) config.h
+installdirs: installdirs-recursive
+installdirs-am:
+ for dir in "$(DESTDIR)$(man1dir)"; do \
+ test -z "$$dir" || $(mkdir_p) "$$dir"; \
+ done
+install: install-recursive
install-exec: install-exec-recursive
-
-install-data-am: install-man install-data-local
install-data: install-data-recursive
+uninstall: uninstall-recursive
install-am: all-am
@$(MAKE) $(AM_MAKEFLAGS) install-exec-am install-data-am
-install: install-recursive
-uninstall-am: uninstall-man
-uninstall: uninstall-recursive
-all-am: Makefile $(PROGRAMS) $(MANS) config.h
-all-redirect: all-recursive-am
-install-strip:
- $(MAKE) $(AM_MAKEFLAGS) AM_INSTALL_PROGRAM_FLAGS=-s install
-installdirs: installdirs-recursive
-installdirs-am:
- $(mkinstalldirs) $(DESTDIR)$(mandir)/man1
-
+installcheck: installcheck-recursive
+install-strip:
+ $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \
+ install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \
+ `test -z '$(STRIP)' || \
+ echo "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'"` install
mostlyclean-generic:
-test -z "$(MOSTLYCLEANFILES)" || rm -f $(MOSTLYCLEANFILES)
@@ -1083,66 +1163,136 @@ clean-generic:
-test -z "$(CLEANFILES)" || rm -f $(CLEANFILES)
distclean-generic:
- -rm -f Makefile $(CONFIG_CLEAN_FILES)
- -rm -f config.cache config.log stamp-h stamp-h[0-9]*
+ -test -z "$(CONFIG_CLEAN_FILES)" || rm -f $(CONFIG_CLEAN_FILES)
-test -z "$(DISTCLEANFILES)" || rm -f $(DISTCLEANFILES)
maintainer-clean-generic:
- -test -z "ldlexldeffilephdeffilepcldgramhldgramc$(MAINTAINERCLEANFILES)" || rm -f ldlexl deffileph deffilepc ldgramh ldgramc $(MAINTAINERCLEANFILES)
-mostlyclean-am: mostlyclean-hdr mostlyclean-noinstPROGRAMS \
- mostlyclean-compile mostlyclean-libtool \
- mostlyclean-aminfo mostlyclean-tags mostlyclean-generic \
- mostlyclean-local
+ @echo "This command is intended for maintainers to use"
+ @echo "it deletes files that may require special tools to rebuild."
+ -rm -f deffilep.c
+ -rm -f deffilep.h
+ -rm -f ldgram.c
+ -rm -f ldgram.h
+ -rm -f ldlex.c
+ -test -z "$(MAINTAINERCLEANFILES)" || rm -f $(MAINTAINERCLEANFILES)
+clean: clean-recursive
-mostlyclean: mostlyclean-recursive
+clean-am: clean-generic clean-libtool clean-noinstPROGRAMS \
+ mostlyclean-am
-clean-am: clean-hdr clean-noinstPROGRAMS clean-compile clean-libtool \
- clean-aminfo clean-tags clean-generic mostlyclean-am
+distclean: distclean-recursive
+ -rm -f $(am__CONFIG_DISTCLEAN_FILES)
+ -rm -f Makefile
+distclean-am: clean-am distclean-DEJAGNU distclean-compile \
+ distclean-generic distclean-hdr distclean-libtool \
+ distclean-local distclean-tags
-clean: clean-recursive
+dvi: dvi-recursive
-distclean-am: distclean-hdr distclean-noinstPROGRAMS distclean-compile \
- distclean-libtool distclean-aminfo distclean-tags \
- distclean-generic clean-am distclean-local
- -rm -f libtool
+dvi-am: $(DVIS)
-distclean: distclean-recursive
- -rm -f config.status
-
-maintainer-clean-am: maintainer-clean-hdr \
- maintainer-clean-noinstPROGRAMS \
- maintainer-clean-compile maintainer-clean-libtool \
- maintainer-clean-aminfo maintainer-clean-tags \
- maintainer-clean-generic distclean-am
- @echo "This command is intended for maintainers to use;"
- @echo "it deletes files that may require special tools to rebuild."
+html: html-recursive
+
+html-am: $(HTMLS)
+
+info: info-recursive
+
+info-am: $(INFO_DEPS)
+
+install-data-am: install-data-local install-man
+
+install-exec-am: install-exec-local
+
+install-info: install-info-recursive
+
+install-info-am: $(INFO_DEPS)
+ @$(NORMAL_INSTALL)
+ test -z "$(infodir)" || $(mkdir_p) "$(DESTDIR)$(infodir)"
+ @srcdirstrip=`echo "$(srcdir)" | sed 's|.|.|g'`; \
+ list='$(INFO_DEPS)'; \
+ for file in $$list; do \
+ case $$file in \
+ $(srcdir)/*) file=`echo "$$file" | sed "s|^$$srcdirstrip/||"`;; \
+ esac; \
+ if test -f $$file; then d=.; else d=$(srcdir); fi; \
+ file_i=`echo "$$file" | sed 's|\.info$$||;s|$$|.i|'`; \
+ for ifile in $$d/$$file $$d/$$file-[0-9] $$d/$$file-[0-9][0-9] \
+ $$d/$$file_i[0-9] $$d/$$file_i[0-9][0-9] ; do \
+ if test -f $$ifile; then \
+ relfile=`echo "$$ifile" | sed 's|^.*/||'`; \
+ echo " $(INSTALL_DATA) '$$ifile' '$(DESTDIR)$(infodir)/$$relfile'"; \
+ $(INSTALL_DATA) "$$ifile" "$(DESTDIR)$(infodir)/$$relfile"; \
+ else : ; fi; \
+ done; \
+ done
+ @$(POST_INSTALL)
+ @if (install-info --version && \
+ install-info --version 2>&1 | sed 1q | grep -i -v debian) >/dev/null 2>&1; then \
+ list='$(INFO_DEPS)'; \
+ for file in $$list; do \
+ relfile=`echo "$$file" | sed 's|^.*/||'`; \
+ echo " install-info --info-dir='$(DESTDIR)$(infodir)' '$(DESTDIR)$(infodir)/$$relfile'";\
+ install-info --info-dir="$(DESTDIR)$(infodir)" "$(DESTDIR)$(infodir)/$$relfile" || :;\
+ done; \
+ else : ; fi
+install-man: install-man1
+
+installcheck-am:
maintainer-clean: maintainer-clean-recursive
- -rm -f config.status
-
-.PHONY: 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-man1 uninstall-man1 install-man \
-uninstall-man install-data-recursive uninstall-data-recursive \
-install-exec-recursive uninstall-exec-recursive installdirs-recursive \
-uninstalldirs-recursive all-recursive check-recursive \
-installcheck-recursive info-recursive dvi-recursive \
-mostlyclean-recursive distclean-recursive clean-recursive \
-maintainer-clean-recursive tags tags-recursive mostlyclean-tags \
-distclean-tags clean-tags maintainer-clean-tags distdir check-DEJAGNU \
-info-am info dvi-am dvi check check-am installcheck-am installcheck \
-install-info-am install-info all-recursive-am install-exec-local \
-install-exec-am install-exec install-data-local install-data-am \
-install-data install-am install uninstall-am uninstall all-redirect \
-all-am all installdirs-am installdirs mostlyclean-generic \
-distclean-generic clean-generic maintainer-clean-generic clean \
-mostlyclean distclean maintainer-clean
+ -rm -f $(am__CONFIG_DISTCLEAN_FILES)
+ -rm -rf $(top_srcdir)/autom4te.cache
+ -rm -f Makefile
+maintainer-clean-am: distclean-am maintainer-clean-aminfo \
+ maintainer-clean-generic
+
+mostlyclean: mostlyclean-recursive
+mostlyclean-am: mostlyclean-aminfo mostlyclean-compile \
+ mostlyclean-generic mostlyclean-libtool mostlyclean-local
+
+pdf: pdf-recursive
+
+pdf-am: $(PDFS)
+
+ps: ps-recursive
+
+ps-am: $(PSS)
+
+uninstall-am: uninstall-man
+
+uninstall-info: uninstall-info-recursive
+
+uninstall-man: uninstall-man1
+
+.PHONY: $(RECURSIVE_TARGETS) CTAGS GTAGS all all-am am--refresh check \
+ check-DEJAGNU check-am clean clean-generic clean-info \
+ clean-libtool clean-noinstPROGRAMS clean-recursive ctags \
+ ctags-recursive dist-info distclean distclean-DEJAGNU \
+ distclean-compile distclean-generic distclean-hdr \
+ distclean-libtool distclean-local distclean-recursive \
+ distclean-tags dvi dvi-am html html-am info info-am install \
+ install-am install-data install-data-am install-data-local \
+ install-exec install-exec-am install-exec-local install-info \
+ install-info-am install-man install-man1 install-strip \
+ installcheck installcheck-am installdirs installdirs-am \
+ maintainer-clean maintainer-clean-aminfo \
+ maintainer-clean-generic maintainer-clean-recursive \
+ mostlyclean mostlyclean-aminfo mostlyclean-compile \
+ mostlyclean-generic mostlyclean-libtool mostlyclean-local \
+ mostlyclean-recursive pdf pdf-am ps ps-am tags tags-recursive \
+ uninstall uninstall-am uninstall-info-am uninstall-man \
+ uninstall-man1
+
+
+# Disable -Werror, if it has been enabled, since old versions of bison/
+# yacc will produce working code which contain compile time warnings.
+ldgram.o:
+ $(COMPILE) -c $< $(NO_WERROR)
+ldlex.o:
+ $(COMPILE) -c $< $(NO_WERROR)
+deffilep.o:
+ $(COMPILE) -c $< $(NO_WERROR)
po/POTFILES.in: @MAINT@ Makefile
for f in $(POTFILES); do echo $$f; done | LC_COLLATE= sort > tmp \
@@ -1155,6 +1305,10 @@ ldmain.o: ldmain.c config.status
-DTARGET='"@target@"' @TARGET_SYSTEM_ROOT_DEFINE@ \
$(srcdir)/ldmain.c
+eelf32_spu.o: eelf32_spu.c
+ $(COMPILE) -c -DEMBEDSPU="\"`echo embedspu | sed '$(transform)'`\"" \
+ eelf32_spu.c
+
ldemul-list.h: Makefile
(echo "/* This file is automatically generated. DO NOT EDIT! */";\
for f in `echo " " ${EMULATION_OFILES} "" \
@@ -1175,9 +1329,6 @@ stringify.sed: ${srcdir}/emultempl/$(STRINGIFY)
@TDIRS@
-ea29k.c: $(srcdir)/emulparams/a29k.sh \
- $(srcdir)/emultempl/generic.em $(srcdir)/scripttempl/a29k.sc ${GEN_DEPENDS}
- ${GENSCRIPTS} a29k "$(tdir_a29k)"
eaix5ppc.c: $(srcdir)/emulparams/aix5ppc.sh \
$(srcdir)/emultempl/aix.em $(srcdir)/scripttempl/aix.sc ${GEN_DEPENDS}
${GENSCRIPTS} aix5ppc "$(tdir_aixppc)"
@@ -1194,44 +1345,58 @@ 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}
+ $(ELF_GEN_DEPS) $(srcdir)/scripttempl/elf.sc ${GEN_DEPENDS}
${GENSCRIPTS} arcelf "$(tdir_arcelf)"
earmelf.c: $(srcdir)/emulparams/armelf.sh \
- $(srcdir)/emultempl/elf32.em $(srcdir)/emultempl/armelf.em \
+ $(ELF_DEPS) $(srcdir)/emultempl/armelf.em \
$(srcdir)/scripttempl/elf.sc ${GEN_DEPENDS}
${GENSCRIPTS} armelf "$(tdir_armelf)"
earmelfb.c: $(srcdir)/emulparams/armelfb.sh $(srcdir)/emulparams/armelf.sh \
- $(srcdir)/emultempl/elf32.em $(srcdir)/emultempl/armelf.em \
+ $(ELF_DEPS) $(srcdir)/emultempl/armelf.em \
$(srcdir)/scripttempl/elf.sc ${GEN_DEPENDS}
${GENSCRIPTS} armelfb "$(tdir_armelfb)"
-earmelf_oabi.c: $(srcdir)/emulparams/armelf_oabi.sh \
- $(srcdir)/emultempl/armelf_oabi.em $(srcdir)/scripttempl/elf.sc ${GEN_DEPENDS}
- ${GENSCRIPTS} armelf_oabi "$(tdir_armelf)"
earmelf_fbsd.c: $(srcdir)/emulparams/armelf_fbsd.sh \
$(srcdir)/emulparams/armelf.sh \
- $(srcdir)/emultempl/elf32.em $(srcdir)/emultempl/armelf.em \
+ $(ELF_DEPS) $(srcdir)/emultempl/armelf.em \
$(srcdir)/scripttempl/elf.sc ${GEN_DEPENDS}
${GENSCRIPTS} armelf_fbsd "$(tdir_armelf_fbsd)"
earmelf_linux.c: $(srcdir)/emulparams/armelf_linux.sh \
- $(srcdir)/emultempl/elf32.em $(srcdir)/emultempl/armelf.em \
+ $(ELF_DEPS) $(srcdir)/emultempl/armelf.em \
$(srcdir)/scripttempl/elf.sc ${GEN_DEPENDS}
${GENSCRIPTS} armelf_linux "$(tdir_armelf_linux)"
+earmelf_linux_eabi.c: $(srcdir)/emulparams/armelf_linux_eabi.sh \
+ $(srcdir)/emulparams/armelf_linux.sh \
+ $(ELF_DEPS) $(srcdir)/emultempl/armelf.em \
+ $(srcdir)/scripttempl/elf.sc ${GEN_DEPENDS}
+ ${GENSCRIPTS} armelf_linux_eabi "$(tdir_armelf_linux_abi)"
earmelfb_linux.c: $(srcdir)/emulparams/armelfb_linux.sh \
$(srcdir)/emulparams/armelf_linux.sh \
- $(srcdir)/emultempl/elf32.em $(srcdir)/emultempl/armelf.em \
+ $(ELF_DEPS) $(srcdir)/emultempl/armelf.em \
$(srcdir)/scripttempl/elf.sc ${GEN_DEPENDS}
${GENSCRIPTS} armelfb_linux "$(tdir_armelfb_linux)"
+earmelfb_linux_eabi.c: $(srcdir)/emulparams/armelfb_linux_eabi.sh \
+ $(srcdir)/emulparams/armelf_linux_eabi.sh \
+ $(srcdir)/emulparams/armelf_linux.sh \
+ $(ELF_DEPS) $(srcdir)/emultempl/armelf.em \
+ $(srcdir)/scripttempl/elf.sc ${GEN_DEPENDS}
+ ${GENSCRIPTS} armelfb_linux_eabi "$(tdir_armelfb_linux_abi)"
earmelf_nbsd.c: $(srcdir)/emulparams/armelf_nbsd.sh \
$(srcdir)/emulparams/armelf.sh \
- $(srcdir)/emultempl/elf32.em $(srcdir)/emultempl/armelf.em \
+ $(ELF_DEPS) $(srcdir)/emultempl/armelf.em \
$(srcdir)/scripttempl/elf.sc ${GEN_DEPENDS}
${GENSCRIPTS} armelf_nbsd "$(tdir_armelf_nbsd)"
earmelfb_nbsd.c: $(srcdir)/emulparams/armelfb_nbsd.sh \
$(srcdir)/emulparams/armelf_nbsd.sh \
$(srcdir)/emulparams/armelf.sh \
- $(srcdir)/emultempl/elf32.em $(srcdir)/emultempl/armelf.em \
+ $(ELF_DEPS) $(srcdir)/emultempl/armelf.em \
$(srcdir)/scripttempl/elf.sc ${GEN_DEPENDS}
${GENSCRIPTS} armelfb_nbsd "$(tdir_armelfb_nbsd)"
+earmelf_vxworks.c: $(srcdir)/emulparams/armelf_vxworks.sh \
+ $(srcdir)/emulparams/vxworks.sh $(srcdir)/emulparams/armelf.sh \
+ $(ELF_DEPS) $(srcdir)/emultempl/vxworks.em \
+ $(srcdir)/emultempl/armelf.em $(srcdir)/scripttempl/elf.sc \
+ ${GEN_DEPENDS}
+ ${GENSCRIPTS} armelf_vxworks "$(tdir_armelf)"
earmaoutb.c: $(srcdir)/emulparams/armaoutb.sh \
$(srcdir)/emultempl/generic.em $(srcdir)/scripttempl/armaout.sc ${GEN_DEPENDS}
${GENSCRIPTS} armaoutb "$(tdir_armaoutb)"
@@ -1245,35 +1410,47 @@ earmnbsd.c: $(srcdir)/emulparams/armnbsd.sh \
$(srcdir)/emultempl/generic.em $(srcdir)/scripttempl/aout.sc ${GEN_DEPENDS}
${GENSCRIPTS} armnbsd "$(tdir_armnbsd)"
earmnto.c: $(srcdir)/emulparams/armnto.sh \
- $(srcdir)/emultempl/elf32.em $(srcdir)/emultempl/armelf.em \
+ $(ELF_DEPS) $(srcdir)/emultempl/armelf.em \
$(srcdir)/scripttempl/elf.sc ${GEN_DEPENDS}
${GENSCRIPTS} armnto "$(tdir_armnto)"
earm_epoc_pe.c: $(srcdir)/emulparams/arm_epoc_pe.sh \
$(srcdir)/emultempl/pe.em $(srcdir)/scripttempl/epocpe.sc ${GEN_DEPENDS}
${GENSCRIPTS} arm_epoc_pe "$(tdir_armpe)"
+earm_wince_pe.c: $(srcdir)/emulparams/arm_wince_pe.sh \
+ $(srcdir)/emultempl/pe.em $(srcdir)/scripttempl/pe.sc ${GEN_DEPENDS}
+ ${GENSCRIPTS} arm_wince_pe "$(tdir_armpe)"
earmpe.c: $(srcdir)/emulparams/armpe.sh \
$(srcdir)/emultempl/pe.em $(srcdir)/scripttempl/pe.sc ${GEN_DEPENDS}
${GENSCRIPTS} armpe "$(tdir_armpe)"
-eavr2.c: $(srcdir)/emulparams/avr2.sh \
- $(srcdir)/emultempl/generic.em $(srcdir)/scripttempl/avr.sc \
+earmsymbian.c: $(srcdir)/emulparams/armsymbian.sh \
+ $(srcdir)/emulparams/armelf.sh $(ELF_DEPS) \
+ $(srcdir)/emultempl/armelf.em $(srcdir)/scripttempl/armbpabi.sc \
+ ${GEN_DEPENDS}
+ ${GENSCRIPTS} armsymbian "$(tdir_armelf)"
+eavr2.c: $(srcdir)/emulparams/avr2.sh $(srcdir)/emultempl/avrelf.em \
+ $(ELF_DEPS) $(srcdir)/scripttempl/avr.sc \
${GEN_DEPENDS}
${GENSCRIPTS} avr2 "$(tdir_avr2)"
-eavr1.c: $(srcdir)/emulparams/avr1.sh \
- $(srcdir)/emultempl/generic.em $(srcdir)/scripttempl/avr.sc \
+eavr1.c: $(srcdir)/emulparams/avr1.sh $(srcdir)/emultempl/avrelf.em \
+ $(ELF_DEPS) $(srcdir)/scripttempl/avr.sc \
${GEN_DEPENDS}
${GENSCRIPTS} avr1 "$(tdir_avr2)"
-eavr3.c: $(srcdir)/emulparams/avr3.sh \
- $(srcdir)/emultempl/generic.em $(srcdir)/scripttempl/avr.sc \
+eavr3.c: $(srcdir)/emulparams/avr3.sh $(srcdir)/emultempl/avrelf.em \
+ $(ELF_DEPS) $(srcdir)/scripttempl/avr.sc \
${GEN_DEPENDS}
${GENSCRIPTS} avr3 "$(tdir_avr2)"
-eavr4.c: $(srcdir)/emulparams/avr4.sh \
- $(srcdir)/emultempl/generic.em $(srcdir)/scripttempl/avr.sc \
+eavr4.c: $(srcdir)/emulparams/avr4.sh $(srcdir)/emultempl/avrelf.em \
+ $(ELF_DEPS) $(srcdir)/scripttempl/avr.sc \
${GEN_DEPENDS}
${GENSCRIPTS} avr4 "$(tdir_avr2)"
-eavr5.c: $(srcdir)/emulparams/avr5.sh \
- $(srcdir)/emultempl/generic.em $(srcdir)/scripttempl/avr.sc \
+eavr5.c: $(srcdir)/emulparams/avr5.sh $(srcdir)/emultempl/avrelf.em \
+ $(ELF_DEPS) $(srcdir)/scripttempl/avr.sc \
${GEN_DEPENDS}
${GENSCRIPTS} avr5 "$(tdir_avr2)"
+eavr6.c: $(srcdir)/emulparams/avr6.sh $(srcdir)/emultempl/avrelf.em \
+ $(ELF_DEPS) $(srcdir)/scripttempl/avr.sc \
+ ${GEN_DEPENDS}
+ ${GENSCRIPTS} avr6 "$(tdir_avr2)"
ecoff_i860.c: $(srcdir)/emulparams/coff_i860.sh \
$(srcdir)/emultempl/generic.em $(srcdir)/scripttempl/i860coff.sc ${GEN_DEPENDS}
${GENSCRIPTS} coff_i860 "$(tdir_coff_i860)"
@@ -1284,278 +1461,381 @@ ecrisaout.c: $(srcdir)/emulparams/crisaout.sh \
$(srcdir)/emultempl/generic.em $(srcdir)/scripttempl/crisaout.sc ${GEN_DEPENDS}
${GENSCRIPTS} crisaout "$(tdir_cris)"
ecriself.c: $(srcdir)/emulparams/criself.sh \
- $(srcdir)/emultempl/elf32.em $(srcdir)/scripttempl/elf.sc ${GEN_DEPENDS}
+ $(ELF_DEPS) $(srcdir)/scripttempl/elf.sc ${GEN_DEPENDS}
${GENSCRIPTS} criself "$(tdir_cris)"
ecrislinux.c: $(srcdir)/emulparams/crislinux.sh \
- $(srcdir)/emultempl/elf32.em $(srcdir)/scripttempl/elf.sc ${GEN_DEPENDS}
+ $(ELF_DEPS) $(srcdir)/scripttempl/elf.sc ${GEN_DEPENDS}
${GENSCRIPTS} crislinux "$(tdir_cris)"
ed10velf.c: $(srcdir)/emulparams/d10velf.sh \
- $(srcdir)/emultempl/elf32.em $(srcdir)/scripttempl/elfd10v.sc ${GEN_DEPENDS}
+ $(ELF_DEPS) $(srcdir)/scripttempl/elfd10v.sc ${GEN_DEPENDS}
${GENSCRIPTS} d10velf "$(tdir_d10v)"
ed30velf.c: $(srcdir)/emulparams/d30velf.sh \
- $(srcdir)/emultempl/generic.em $(srcdir)/scripttempl/elfd30v.sc ${GEN_DEPENDS}
+ $(ELF_GEN_DEPS) $(srcdir)/scripttempl/elfd30v.sc ${GEN_DEPENDS}
${GENSCRIPTS} d30velf "$(tdir_d30v)"
ed30v_o.c: $(srcdir)/emulparams/d30v_o.sh \
- $(srcdir)/emultempl/generic.em $(srcdir)/scripttempl/elfd30v.sc ${GEN_DEPENDS}
+ $(ELF_GEN_DEPS) $(srcdir)/scripttempl/elfd30v.sc ${GEN_DEPENDS}
${GENSCRIPTS} d30v_o "$(tdir_d30v)"
ed30v_e.c: $(srcdir)/emulparams/d30v_e.sh \
- $(srcdir)/emultempl/generic.em $(srcdir)/scripttempl/elfd30v.sc ${GEN_DEPENDS}
+ $(ELF_GEN_DEPS) $(srcdir)/scripttempl/elfd30v.sc ${GEN_DEPENDS}
${GENSCRIPTS} d30v_e "$(tdir_d30v)"
edelta68.c: $(srcdir)/emulparams/delta68.sh \
$(srcdir)/emultempl/generic.em $(srcdir)/scripttempl/delta68.sc ${GEN_DEPENDS}
${GENSCRIPTS} delta68 "$(tdir_delta68)"
+eelf32bfin.c: $(srcdir)/emulparams/bfin.sh \
+ $(ELF_DEPS) \
+ $(srcdir)/scripttempl/elf.sc ${GEN_DEPENDS}
+ ${GENSCRIPTS} elf32bfin "$(tdir_elf32bfin)" bfin
+eelf32bfinfd.c: $(srcdir)/emulparams/elf32bfinfd.sh $(srcdir)/emulparams/bfin.sh \
+ $(ELF_DEPS) \
+ $(srcdir)/scripttempl/elf.sc ${GEN_DEPENDS}
+ ${GENSCRIPTS} elf32bfinfd "$(tdir_elf32bfinfd)" elf32bfinfd
eelf32_dlx.c: $(srcdir)/emulparams/elf32_dlx.sh \
- $(srcdir)/emultempl/elf32.em $(srcdir)/scripttempl/dlx.sc ${GEN_DEPENDS}
+ $(ELF_GEN_DEPS) $(srcdir)/scripttempl/dlx.sc ${GEN_DEPENDS}
${GENSCRIPTS} elf32_dlx "$(tdir_elf32_dlx)"
-eebmon29k.c: $(srcdir)/emulparams/ebmon29k.sh \
- $(srcdir)/emultempl/generic.em $(srcdir)/scripttempl/ebmon29k.sc ${GEN_DEPENDS}
- ${GENSCRIPTS} ebmon29k "$(tdir_ebmon29k)"
-eelf32xstormy16.c: $(srcdir)/emulparams/elf32xstormy16.sh \
- $(srcdir)/emultempl/elf32.em $(srcdir)/emultempl/needrelax.em \
+eelf32xc16x.c: $(srcdir)/emulparams/elf32xc16x.sh \
+ $(ELF_DEPS) $(srcdir)/emultempl/needrelax.em \
+ $(srcdir)/scripttempl/elf.sc ${GEN_DEPENDS}
+ ${GENSCRIPTS} elf32xc16x "$(tdir_xc16x)"
+eelf32xc16xl.c: $(srcdir)/emulparams/elf32xc16xl.sh \
+ $(ELF_DEPS) $(srcdir)/emultempl/needrelax.em \
+ $(srcdir)/scripttempl/elf.sc ${GEN_DEPENDS}
+ ${GENSCRIPTS} elf32xc16xl "$(tdir_xc16xl)"
+eelf32xc16xs.c: $(srcdir)/emulparams/elf32xc16xs.sh \
+ $(ELF_DEPS) $(srcdir)/emultempl/needrelax.em \
$(srcdir)/scripttempl/elf.sc ${GEN_DEPENDS}
+ ${GENSCRIPTS} elf32xc16xs "$(tdir_xc16xs)"
+eelf32xstormy16.c: $(srcdir)/emulparams/elf32xstormy16.sh \
+ $(ELF_DEPS) $(srcdir)/emultempl/needrelax.em \
+ $(srcdir)/scripttempl/xstormy16.sc ${GEN_DEPENDS}
${GENSCRIPTS} elf32xstormy16 "$(tdir_xstormy16)"
eelf32am33lin.c: $(srcdir)/emulparams/elf32am33lin.sh \
- $(srcdir)/emultempl/elf32.em $(srcdir)/scripttempl/elf.sc ${GEN_DEPENDS}
+ $(ELF_DEPS) $(srcdir)/scripttempl/elf.sc ${GEN_DEPENDS}
${GENSCRIPTS} elf32am33lin "$(tdir_mn10300)"
eelf32vax.c: $(srcdir)/emulparams/elf32vax.sh \
- $(srcdir)/emultempl/elf32.em $(srcdir)/scripttempl/elf.sc ${GEN_DEPENDS}
+ $(ELF_DEPS) $(srcdir)/scripttempl/elf.sc ${GEN_DEPENDS}
${GENSCRIPTS} elf32vax "$(tdir_elf32vax)"
-eelf32xtensa.c: $(srcdir)/emulparams/elf32xtensa.sh \
- $(srcdir)/emulparams/xtensa-config.sh \
- $(srcdir)/emultempl/elf32.em $(srcdir)/emultempl/xtensaelf.em \
+eelf32xtensa.c: $(srcdir)/emulparams/elf32xtensa.sh $(ELF_DEPS) \
+ $(srcdir)/emultempl/xtensaelf.em $(INCDIR)/xtensa-config.h \
+ $(BFDDIR)/elf-bfd.h $(BFDDIR)/libbfd.h $(INCDIR)/elf/xtensa.h \
$(srcdir)/scripttempl/elfxtensa.sc ${GEN_DEPENDS}
${GENSCRIPTS} elf32xtensa "$(tdir_elf32xtensa)"
eelf32fr30.c: $(srcdir)/emulparams/elf32fr30.sh \
- $(srcdir)/emultempl/elf32.em $(srcdir)/scripttempl/elf.sc ${GEN_DEPENDS}
+ $(ELF_GEN_DEPS) $(srcdir)/scripttempl/elf.sc ${GEN_DEPENDS}
${GENSCRIPTS} elf32fr30 "$(tdir_fr30)"
eelf32frv.c: $(srcdir)/emulparams/elf32frv.sh \
- $(srcdir)/emultempl/elf32.em $(srcdir)/scripttempl/elf.sc ${GEN_DEPENDS}
+ $(ELF_GEN_DEPS) $(srcdir)/scripttempl/elf.sc ${GEN_DEPENDS}
${GENSCRIPTS} elf32frv "$(tdir_frv)"
+eelf32frvfd.c: $(srcdir)/emulparams/elf32frvfd.sh \
+ $(srcdir)/emulparams/elf32frv.sh \
+ $(ELF_DEPS) $(srcdir)/scripttempl/elf.sc ${GEN_DEPENDS}
+ ${GENSCRIPTS} elf32frvfd "$(tdir_frv)"
eelf32mcore.c: $(srcdir)/emulparams/elf32mcore.sh \
- $(srcdir)/emultempl/elf32.em $(srcdir)/scripttempl/elf.sc ${GEN_DEPENDS}
+ $(ELF_DEPS) $(srcdir)/scripttempl/elf.sc ${GEN_DEPENDS}
${GENSCRIPTS} elf32mcore "$(tdir_mcore)"
+eelf32mep.c: $(srcdir)/emulparams/elf32mep.sh \
+ $(srcdir)/emultempl/elf32.em $(srcdir)/scripttempl/mep.sc ${GEN_DEPENDS}
+ ${GENSCRIPTS} elf32mep "$(tdir_mep)"
em32relf.c: $(srcdir)/emulparams/m32relf.sh \
- $(srcdir)/emultempl/elf32.em $(srcdir)/scripttempl/elf.sc ${GEN_DEPENDS}
+ $(ELF_DEPS) $(srcdir)/scripttempl/elf.sc ${GEN_DEPENDS}
${GENSCRIPTS} m32relf "$(tdir_m32r)"
em32rlelf.c: $(srcdir)/emulparams/m32rlelf.sh \
- $(srcdir)/emultempl/elf32.em $(srcdir)/scripttempl/elf.sc ${GEN_DEPENDS}
+ $(ELF_DEPS) $(srcdir)/scripttempl/elf.sc ${GEN_DEPENDS}
${GENSCRIPTS} m32rlelf "$(tdir_m32rlelf)"
em32relf_linux.c: $(srcdir)/emulparams/m32relf_linux.sh \
- $(srcdir)/emultempl/elf32.em $(srcdir)/scripttempl/elf.sc ${GEN_DEPENDS}
+ $(ELF_DEPS) $(srcdir)/scripttempl/elf.sc ${GEN_DEPENDS}
${GENSCRIPTS} m32relf_linux "$(tdir_m32relf_linux)"
em32rlelf_linux.c: $(srcdir)/emulparams/m32rlelf_linux.sh \
- $(srcdir)/emultempl/elf32.em $(srcdir)/scripttempl/elf.sc ${GEN_DEPENDS}
+ $(ELF_DEPS) $(srcdir)/scripttempl/elf.sc ${GEN_DEPENDS}
${GENSCRIPTS} m32rlelf_linux "$(tdir_m32rlelf_linux)"
eelf32_sparc.c: $(srcdir)/emulparams/elf32_sparc.sh \
- $(srcdir)/emultempl/elf32.em $(srcdir)/scripttempl/elf.sc ${GEN_DEPENDS}
+ $(ELF_DEPS) $(srcdir)/scripttempl/elf.sc ${GEN_DEPENDS}
${GENSCRIPTS} elf32_sparc "$(tdir_elf32_sparc)"
+eelf32_sparc_vxworks.c: $(srcdir)/emulparams/elf32_sparc_vxworks.sh \
+ $(srcdir)/emulparams/vxworks.sh $(srcdir)/emulparams/elf32_sparc.sh \
+ $(srcdir)/emultempl/vxworks.em $(ELF_DEPS) \
+ $(srcdir)/scripttempl/elf.sc ${GEN_DEPENDS}
+ ${GENSCRIPTS} elf32_sparc_vxworks "$(tdir_elf32_sparc_vxworks)"
+eelf32_spu.c: $(srcdir)/emulparams/elf32_spu.sh $(srcdir)/emultempl/spuelf.em \
+ $(srcdir)/emultempl/spu_ovl.o \
+ ldemul-list.h \
+ $(ELF_DEPS) $(srcdir)/scripttempl/elf.sc ${GEN_DEPENDS}
+ ${GENSCRIPTS} elf32_spu "$(tdir_elf32_spu)"
+$(srcdir)/emultempl/spu_ovl.o: @MAINT@ $(srcdir)/emultempl/spu_ovl.S
+ cpp -DOVLY_IRQ_SAVE $(srcdir)/emultempl/spu_ovl.S spu_ovl.s
+ if ../gas/as-new --version \
+ | grep 'target.*spu' >/dev/null 2>/dev/null; then \
+ ../gas/as-new -o $@ spu_ovl.s; \
+ fi
eelf32_i860.c: $(srcdir)/emulparams/elf32_i860.sh \
- $(srcdir)/emultempl/elf32.em $(srcdir)/scripttempl/elf.sc ${GEN_DEPENDS}
+ $(ELF_GEN_DEPS) $(srcdir)/scripttempl/elf.sc ${GEN_DEPENDS}
${GENSCRIPTS} elf32_i860 "$(tdir_elf32_i860)"
eelf32_i960.c: $(srcdir)/emulparams/elf32_i960.sh \
- $(srcdir)/emultempl/elf32.em $(srcdir)/scripttempl/elf.sc ${GEN_DEPENDS}
+ $(ELF_DEPS) $(srcdir)/scripttempl/elf.sc ${GEN_DEPENDS}
${GENSCRIPTS} elf32_i960 "$(tdir_elf32_i960)"
eelf32b4300.c: $(srcdir)/emulparams/elf32b4300.sh \
- $(srcdir)/emulparams/elf32bmip.sh $(srcdir)/emultempl/mipself.em \
- $(srcdir)/emultempl/elf32.em $(srcdir)/scripttempl/elf.sc ${GEN_DEPENDS}
+ $(srcdir)/emulparams/elf32bmip.sh $(ELF_DEPS) \
+ $(srcdir)/emultempl/mipself.em $(srcdir)/scripttempl/elf.sc ${GEN_DEPENDS}
${GENSCRIPTS} elf32b4300 "$(tdir_elf32b4300)"
-eelf32bmip.c: $(srcdir)/emulparams/elf32bmip.sh \
- $(srcdir)/emultempl/mipself.em \
- $(srcdir)/emultempl/elf32.em $(srcdir)/scripttempl/elf.sc ${GEN_DEPENDS}
+eelf32cr16.c: $(srcdir)/emulparams/elf32cr16.sh \
+ $(srcdir)/emultempl/elf32.em $(srcdir)/emultempl/cr16elf.em \
+ $(srcdir)/scripttempl/elf32cr16.sc ${GEN_DEPENDS}
+ ${GENSCRIPTS} elf32cr16 "$(tdir_elf32crx)"
+eelf32cr16c.c: $(srcdir)/emulparams/elf32cr16c.sh \
+ $(ELF_DEPS) \
+ $(srcdir)/scripttempl/elf32cr16c.sc ${GEN_DEPENDS}
+ ${GENSCRIPTS} elf32cr16c "$(tdir_elf32cr16c)"
+eelf32bmip.c: $(srcdir)/emulparams/elf32bmip.sh $(ELF_DEPS) \
+ $(srcdir)/emultempl/mipself.em $(srcdir)/scripttempl/elf.sc ${GEN_DEPENDS}
${GENSCRIPTS} elf32bmip "$(tdir_elf32bmip)"
eelf32bsmip.c: $(srcdir)/emulparams/elf32bsmip.sh \
- $(srcdir)/emulparams/elf32bmip.sh $(srcdir)/emultempl/irix.em \
- $(srcdir)/emultempl/elf32.em $(srcdir)/scripttempl/elf.sc ${GEN_DEPENDS}
+ $(srcdir)/emulparams/elf32bmip.sh $(ELF_DEPS) $(srcdir)/emultempl/irix.em \
+ $(srcdir)/emultempl/mipself.em $(srcdir)/scripttempl/elf.sc ${GEN_DEPENDS}
${GENSCRIPTS} elf32bsmip "$(tdir_elf32bsmip)"
eelf32btsmip.c: $(srcdir)/emulparams/elf32btsmip.sh \
- $(srcdir)/emulparams/elf32bmip.sh $(srcdir)/emultempl/mipself.em \
- $(srcdir)/emultempl/elf32.em $(srcdir)/scripttempl/elf.sc ${GEN_DEPENDS}
+ $(srcdir)/emulparams/elf32bmip.sh $(ELF_DEPS) \
+ $(srcdir)/emultempl/mipself.em $(srcdir)/scripttempl/elf.sc ${GEN_DEPENDS}
${GENSCRIPTS} elf32btsmip "$(tdir_elf32btsmip)"
+eelf32crx.c: $(srcdir)/emulparams/elf32crx.sh \
+ $(ELF_DEPS) $(srcdir)/emultempl/crxelf.em \
+ $(srcdir)/scripttempl/elf32crx.sc ${GEN_DEPENDS}
+ ${GENSCRIPTS} elf32crx "$(tdir_elf32crx)"
eelf32btsmipn32.c: $(srcdir)/emulparams/elf32btsmipn32.sh \
- $(srcdir)/emulparams/elf32bmip.sh $(srcdir)/emultempl/mipself.em \
- $(srcdir)/emultempl/elf32.em $(srcdir)/scripttempl/elf.sc ${GEN_DEPENDS}
+ $(srcdir)/emulparams/elf32bmipn32-defs.sh $(ELF_DEPS) \
+ $(srcdir)/emultempl/mipself.em $(srcdir)/scripttempl/elf.sc ${GEN_DEPENDS}
${GENSCRIPTS} elf32btsmipn32 "$(tdir_elf32btsmipn32)"
eelf32ltsmip.c: $(srcdir)/emulparams/elf32ltsmip.sh \
$(srcdir)/emulparams/elf32btsmip.sh $(srcdir)/emulparams/elf32bmip.sh \
- $(srcdir)/emultempl/mipself.em \
- $(srcdir)/emultempl/elf32.em $(srcdir)/scripttempl/elf.sc ${GEN_DEPENDS}
+ $(ELF_DEPS) $(srcdir)/emultempl/mipself.em $(srcdir)/scripttempl/elf.sc \
+ ${GEN_DEPENDS}
${GENSCRIPTS} elf32ltsmip "$(tdir_elf32ltsmip)"
eelf32ltsmipn32.c: $(srcdir)/emulparams/elf32ltsmipn32.sh \
- $(srcdir)/emulparams/elf32btsmip.sh $(srcdir)/emulparams/elf32bmip.sh \
- $(srcdir)/emultempl/mipself.em \
- $(srcdir)/emultempl/elf32.em $(srcdir)/scripttempl/elf.sc ${GEN_DEPENDS}
+ $(srcdir)/emulparams/elf32btsmipn32.sh \
+ $(srcdir)/emulparams/elf32bmipn32-defs.sh $(ELF_DEPS) \
+ $(srcdir)/emultempl/mipself.em $(srcdir)/scripttempl/elf.sc ${GEN_DEPENDS}
${GENSCRIPTS} elf32ltsmipn32 "$(tdir_elf32ltsmipn32)"
eelf32ebmip.c: $(srcdir)/emulparams/elf32ebmip.sh \
- $(srcdir)/emulparams/elf32bmip.sh $(srcdir)/emultempl/mipself.em \
- $(srcdir)/emultempl/elf32.em $(srcdir)/scripttempl/elf.sc ${GEN_DEPENDS}
+ $(srcdir)/emulparams/elf32bmip.sh $(ELF_DEPS) \
+ $(srcdir)/emultempl/mipself.em $(srcdir)/scripttempl/elf.sc ${GEN_DEPENDS}
${GENSCRIPTS} elf32ebmip "$(tdir_elf32ebmip)"
+eelf32ebmipvxworks.c: $(srcdir)/emulparams/elf32ebmipvxworks.sh \
+ $(srcdir)/emulparams/elf32bmip.sh $(srcdir)/emulparams/vxworks.sh \
+ $(ELF_DEPS) $(srcdir)/emultempl/generic.em $(srcdir)/emultempl/mipself.em \
+ $(srcdir)/emultempl/vxworks.em $(srcdir)/scripttempl/elf.sc ${GEN_DEPENDS}
+ ${GENSCRIPTS} elf32ebmipvxworks "$(tdir_elf32ebmipvxworks)"
eelf32elmip.c: $(srcdir)/emulparams/elf32elmip.sh \
$(srcdir)/emulparams/elf32lmip.sh $(srcdir)/emulparams/elf32bmip.sh \
- $(srcdir)/emultempl/mipself.em \
- $(srcdir)/emultempl/elf32.em $(srcdir)/scripttempl/elf.sc ${GEN_DEPENDS}
+ $(ELF_DEPS) $(srcdir)/emultempl/mipself.em $(srcdir)/scripttempl/elf.sc \
+ ${GEN_DEPENDS}
${GENSCRIPTS} elf32elmip "$(tdir_elf32elmip)"
+eelf32elmipvxworks.c: $(srcdir)/emulparams/elf32elmipvxworks.sh \
+ $(srcdir)/emulparams/elf32bmip.sh $(srcdir)/emulparams/vxworks.sh \
+ $(ELF_DEPS) $(srcdir)/emultempl/generic.em $(srcdir)/emultempl/mipself.em \
+ $(srcdir)/emultempl/vxworks.em $(srcdir)/scripttempl/elf.sc ${GEN_DEPENDS}
+ ${GENSCRIPTS} elf32elmipvxworks "$(tdir_elf32elmipvxworks)"
eelf32bmipn32.c: $(srcdir)/emulparams/elf32bmipn32.sh \
- $(srcdir)/emultempl/irix.em \
- $(srcdir)/emultempl/elf32.em $(srcdir)/scripttempl/elf.sc ${GEN_DEPENDS}
+ $(srcdir)/emulparams/elf32bmipn32-defs.sh $(ELF_DEPS) \
+ $(srcdir)/emultempl/irix.em $(srcdir)/emultempl/mipself.em \
+ $(srcdir)/scripttempl/elf.sc ${GEN_DEPENDS}
${GENSCRIPTS} elf32bmipn32 "$(tdir_elf32bmipn32)"
eelf32l4300.c: $(srcdir)/emulparams/elf32l4300.sh \
$(srcdir)/emulparams/elf32b4300.sh $(srcdir)/emulparams/elf32bmip.sh \
- $(srcdir)/emultempl/mipself.em \
- $(srcdir)/emultempl/elf32.em $(srcdir)/scripttempl/elf.sc ${GEN_DEPENDS}
+ $(ELF_DEPS) $(srcdir)/emultempl/mipself.em $(srcdir)/scripttempl/elf.sc \
+ ${GEN_DEPENDS}
${GENSCRIPTS} elf32l4300 "$(tdir_elf32l4300)"
eelf32lmip.c: $(srcdir)/emulparams/elf32lmip.sh \
- $(srcdir)/emulparams/elf32bmip.sh $(srcdir)/emultempl/mipself.em \
- $(srcdir)/emultempl/elf32.em $(srcdir)/scripttempl/elf.sc ${GEN_DEPENDS}
+ $(srcdir)/emulparams/elf32bmip.sh $(ELF_DEPS) \
+ $(srcdir)/emultempl/mipself.em $(srcdir)/scripttempl/elf.sc ${GEN_DEPENDS}
${GENSCRIPTS} elf32lmip "$(tdir_elf32lmip)"
-eelf32mipswindiss.c: $(srcdir)/emulparams/elf32mipswindiss.sh \
- $(srcdir)/emultempl/elf32.em $(srcdir)/scripttempl/elf.sc ${GEN_DEPENDS}
+eelf32mipswindiss.c: $(srcdir)/emulparams/elf32mipswindiss.sh $(ELF_DEPS) \
+ $(srcdir)/scripttempl/elf.sc ${GEN_DEPENDS}
${GENSCRIPTS} elf32mipswindiss "$(tdir_elf32mipswindiss)"
+eelf32m32c.c: $(srcdir)/emulparams/elf32m32c.sh \
+ $(ELF_DEPS) $(srcdir)/emultempl/needrelax.em \
+ $(srcdir)/scripttempl/elf.sc ${GEN_DEPENDS}
+ ${GENSCRIPTS} elf32m32c "$(tdir_m32c)"
+eelf32mt.c: $(srcdir)/emulparams/elf32mt.sh \
+ $(ELF_GEN_DEPS) $(srcdir)/scripttempl/elf.sc ${GEN_DEPENDS}
+ ${GENSCRIPTS} elf32mt "$(tdir_mt)"
eelf32lppc.c: $(srcdir)/emulparams/elf32lppc.sh \
+ $(srcdir)/emulparams/elf32ppccommon.sh \
$(srcdir)/emulparams/elf32ppc.sh $(srcdir)/emultempl/ppc32elf.em \
- $(srcdir)/emultempl/elf32.em $(srcdir)/scripttempl/elf.sc ${GEN_DEPENDS}
+ ldemul-list.h \
+ $(ELF_DEPS) $(srcdir)/scripttempl/elf.sc ${GEN_DEPENDS}
${GENSCRIPTS} elf32lppc "$(tdir_elf32lppc)"
eelf32lppcnto.c: $(srcdir)/emulparams/elf32lppcnto.sh \
- $(srcdir)/emulparams/elf32ppc.sh $(srcdir)/emultempl/ppc32elf.em \
- $(srcdir)/emultempl/elf32.em $(srcdir)/scripttempl/elf.sc ${GEN_DEPENDS}
+ $(srcdir)/emulparams/elf32ppc.sh $(srcdir)/emulparams/elf32ppccommon.sh \
+ $(srcdir)/emultempl/ppc32elf.em $(ELF_DEPS) \
+ ldemul-list.h \
+ $(srcdir)/scripttempl/elf.sc ${GEN_DEPENDS}
${GENSCRIPTS} elf32lppcnto "$(tdir_elf32lppcnto)"
eelf32lppcsim.c: $(srcdir)/emulparams/elf32lppcsim.sh \
$(srcdir)/emulparams/elf32lppc.sh $(srcdir)/emulparams/elf32ppc.sh \
- $(srcdir)/emultempl/ppc32elf.em \
- $(srcdir)/emultempl/elf32.em $(srcdir)/scripttempl/elf.sc ${GEN_DEPENDS}
+ $(srcdir)/emulparams/elf32ppccommon.sh $(srcdir)/emultempl/ppc32elf.em \
+ ldemul-list.h \
+ $(ELF_DEPS) $(srcdir)/scripttempl/elf.sc ${GEN_DEPENDS}
${GENSCRIPTS} elf32lppcsim "$(tdir_elf32lppcsim)"
eelf32ppcnto.c: $(srcdir)/emulparams/elf32ppcnto.sh \
- $(srcdir)/emulparams/elf32ppc.sh $(srcdir)/emultempl/ppc32elf.em \
- $(srcdir)/emultempl/elf32.em $(srcdir)/scripttempl/elf.sc ${GEN_DEPENDS}
+ $(srcdir)/emulparams/elf32ppc.sh $(srcdir)/emulparams/elf32ppccommon.sh \
+ $(srcdir)/emultempl/ppc32elf.em $(ELF_DEPS) \
+ ldemul-list.h \
+ $(srcdir)/scripttempl/elf.sc ${GEN_DEPENDS}
${GENSCRIPTS} elf32ppcnto "$(tdir_elf32ppcnto)"
eelf32ppcwindiss.c: $(srcdir)/emulparams/elf32ppcwindiss.sh \
- $(srcdir)/emultempl/elf32.em $(srcdir)/scripttempl/elf.sc ${GEN_DEPENDS}
+ $(ELF_DEPS) $(srcdir)/scripttempl/elf.sc ${GEN_DEPENDS}
${GENSCRIPTS} elf32ppcwindiss "$(tdir_elf32ppcwindiss)"
+eelf32ppcvxworks.c: $(srcdir)/emulparams/elf32ppcvxworks.sh \
+ $(srcdir)/emulparams/elf32ppccommon.sh $(srcdir)/emulparams/vxworks.sh \
+ $(srcdir)/emultempl/vxworks.em $(ELF_DEPS) \
+ $(srcdir)/scripttempl/elf.sc ${GEN_DEPENDS}
+ ${GENSCRIPTS} elf32ppcvxworks "$(tdir_elf32ppcvxworks)"
eelf32lsmip.c: $(srcdir)/emulparams/elf32lsmip.sh \
$(srcdir)/emulparams/elf32lmip.sh $(srcdir)/emulparams/elf32bmip.sh \
- $(srcdir)/emultempl/mipself.em \
- $(srcdir)/emultempl/elf32.em $(srcdir)/scripttempl/elf.sc ${GEN_DEPENDS}
+ $(ELF_DEPS) $(srcdir)/emultempl/mipself.em $(srcdir)/scripttempl/elf.sc \
+ ${GEN_DEPENDS}
${GENSCRIPTS} elf32lsmip "$(tdir_elf32lsmip)"
eelf32openrisc.c: $(srcdir)/emulparams/elf32openrisc.sh \
- $(srcdir)/emultempl/elf32.em $(srcdir)/scripttempl/elf.sc ${GEN_DEPENDS}
+ $(ELF_DEPS) $(srcdir)/scripttempl/elf.sc ${GEN_DEPENDS}
${GENSCRIPTS} elf32openrisc "$(tdir_openrisc)"
-eelf32ppc.c: $(srcdir)/emulparams/elf32ppc.sh $(srcdir)/emultempl/ppc32elf.em \
- $(srcdir)/emultempl/elf32.em $(srcdir)/scripttempl/elf.sc ${GEN_DEPENDS}
+eelf32ppc.c: $(srcdir)/emulparams/elf32ppc.sh \
+ $(srcdir)/emulparams/elf32ppccommon.sh $(srcdir)/emultempl/ppc32elf.em \
+ ldemul-list.h \
+ $(ELF_DEPS) $(srcdir)/scripttempl/elf.sc ${GEN_DEPENDS}
${GENSCRIPTS} elf32ppc "$(tdir_elf32ppc)"
eelf32ppc_fbsd.c: $(srcdir)/emulparams/elf32ppc_fbsd.sh \
- $(srcdir)/emulparams/elf32ppc.sh $(srcdir)/emultempl/ppc32elf.em \
- $(srcdir)/emultempl/elf32.em $(srcdir)/scripttempl/elf.sc ${GEN_DEPENDS}
+ $(srcdir)/emulparams/elf32ppc.sh $(srcdir)/emulparams/elf32ppccommon.sh \
+ $(srcdir)/emultempl/ppc32elf.em $(ELF_DEPS) \
+ ldemul-list.h \
+ $(srcdir)/scripttempl/elf.sc ${GEN_DEPENDS}
${GENSCRIPTS} elf32ppc_fbsd "$(tdir_elf32ppc_fbsd)"
eelf32ppcsim.c: $(srcdir)/emulparams/elf32ppcsim.sh \
- $(srcdir)/emulparams/elf32ppc.sh $(srcdir)/emultempl/ppc32elf.em \
- $(srcdir)/emultempl/elf32.em $(srcdir)/scripttempl/elf.sc ${GEN_DEPENDS}
+ $(srcdir)/emulparams/elf32ppc.sh $(srcdir)/emulparams/elf32ppccommon.sh \
+ $(srcdir)/emultempl/ppc32elf.em $(ELF_DEPS) \
+ ldemul-list.h \
+ $(srcdir)/scripttempl/elf.sc ${GEN_DEPENDS}
${GENSCRIPTS} elf32ppcsim "$(tdir_elf32ppcsim)"
eelf32ppclinux.c: $(srcdir)/emulparams/elf32ppclinux.sh \
- $(srcdir)/emulparams/elf32ppc.sh $(srcdir)/emultempl/ppc32elf.em \
- $(srcdir)/emultempl/elf32.em $(srcdir)/scripttempl/elf.sc ${GEN_DEPENDS}
+ $(srcdir)/emulparams/elf32ppc.sh $(srcdir)/emulparams/elf32ppccommon.sh \
+ $(srcdir)/emultempl/ppc32elf.em $(ELF_DEPS) \
+ ldemul-list.h \
+ $(srcdir)/scripttempl/elf.sc ${GEN_DEPENDS}
${GENSCRIPTS} elf32ppclinux "$(tdir_elf32ppclinux)"
eelf64ppc.c: $(srcdir)/emulparams/elf64ppc.sh $(srcdir)/emultempl/ppc64elf.em \
- $(srcdir)/emultempl/elf32.em $(srcdir)/scripttempl/elf.sc ${GEN_DEPENDS}
+ ldemul-list.h \
+ $(ELF_DEPS) $(srcdir)/scripttempl/elf.sc ${GEN_DEPENDS}
${GENSCRIPTS} elf64ppc "$(tdir_elf64ppc)"
eelf64lppc.c: $(srcdir)/emulparams/elf64lppc.sh \
$(srcdir)/emulparams/elf64ppc.sh $(srcdir)/emultempl/ppc64elf.em \
- $(srcdir)/emultempl/elf32.em $(srcdir)/scripttempl/elf.sc ${GEN_DEPENDS}
+ ldemul-list.h \
+ $(ELF_DEPS) $(srcdir)/scripttempl/elf.sc ${GEN_DEPENDS}
${GENSCRIPTS} elf64lppc "$(tdir_elf64lppc)"
eelf32i370.c: $(srcdir)/emulparams/elf32i370.sh \
- $(srcdir)/emultempl/elf32.em $(srcdir)/scripttempl/elfi370.sc ${GEN_DEPENDS}
+ $(ELF_DEPS) $(srcdir)/scripttempl/elfi370.sc ${GEN_DEPENDS}
${GENSCRIPTS} elf32i370 "$(tdir_elf32i370)"
eelf32ip2k.c: $(srcdir)/emulparams/elf32ip2k.sh \
- $(srcdir)/emultempl/elf32.em $(srcdir)/scripttempl/ip2k.sc ${GEN_DEPENDS}
+ $(ELF_DEPS) $(srcdir)/scripttempl/ip2k.sc ${GEN_DEPENDS}
${GENSCRIPTS} elf32ip2k "$(tdir_ip2k)"
eelf32iq2000.c: $(srcdir)/emulparams/elf32iq2000.sh \
- $(srcdir)/emultempl/elf32.em $(srcdir)/scripttempl/iq2000.sc ${GEN_DEPENDS}
+ $(ELF_GEN_DEPS) $(srcdir)/scripttempl/iq2000.sc ${GEN_DEPENDS}
${GENSCRIPTS} elf32iq2000 "$(tdir_iq2000)"
eelf32iq10.c: $(srcdir)/emulparams/elf32iq10.sh \
- $(srcdir)/emultempl/elf32.em $(srcdir)/scripttempl/iq2000.sc ${GEN_DEPENDS}
+ $(ELF_GEN_DEPS) $(srcdir)/scripttempl/iq2000.sc ${GEN_DEPENDS}
${GENSCRIPTS} elf32iq10 "$(tdir_iq10)"
eelf64alpha.c: $(srcdir)/emulparams/elf64alpha.sh \
- $(srcdir)/emultempl/elf32.em $(srcdir)/scripttempl/elf.sc ${GEN_DEPENDS}
+ $(ELF_DEPS) $(srcdir)/emultempl/alphaelf.em \
+ $(srcdir)/scripttempl/elf.sc ${GEN_DEPENDS}
${GENSCRIPTS} elf64alpha "$(tdir_elf64alpha)"
eelf64alpha_fbsd.c: $(srcdir)/emulparams/elf64alpha_fbsd.sh \
$(srcdir)/emulparams/elf64alpha.sh \
- $(srcdir)/emultempl/elf32.em $(srcdir)/scripttempl/elf.sc ${GEN_DEPENDS}
+ $(ELF_DEPS) $(srcdir)/emultempl/alphaelf.em \
+ $(srcdir)/scripttempl/elf.sc ${GEN_DEPENDS}
${GENSCRIPTS} elf64alpha_fbsd "$(tdir_elf64alpha_fbsd)"
eelf64alpha_nbsd.c: $(srcdir)/emulparams/elf64alpha_nbsd.sh \
$(srcdir)/emulparams/elf64alpha.sh \
- $(srcdir)/emultempl/elf32.em $(srcdir)/scripttempl/elf.sc ${GEN_DEPENDS}
+ $(ELF_DEPS) $(srcdir)/emultempl/alphaelf.em \
+ $(srcdir)/scripttempl/elf.sc ${GEN_DEPENDS}
${GENSCRIPTS} elf64alpha_nbsd "$(tdir_elf64alpha_nbsd)"
eelf64hppa.c: $(srcdir)/emulparams/elf64hppa.sh \
$(srcdir)/emulparams/hppa64linux.sh \
- $(srcdir)/emultempl/elf32.em $(srcdir)/scripttempl/elf.sc ${GEN_DEPENDS}
+ $(ELF_DEPS) $(srcdir)/scripttempl/elf.sc ${GEN_DEPENDS}
${GENSCRIPTS} elf64hppa "$(tdir_elf64hppa)"
eelf64_aix.c: $(srcdir)/emulparams/elf64_aix.sh \
- $(srcdir)/emultempl/elf32.em $(srcdir)/scripttempl/elf.sc ${GEN_DEPENDS}
+ $(ELF_DEPS) $(srcdir)/scripttempl/elf.sc ${GEN_DEPENDS}
${GENSCRIPTS} elf64_aix "$(tdir_elf64_aix)"
eelf64_ia64.c: $(srcdir)/emulparams/elf64_ia64.sh \
- $(srcdir)/emultempl/elf32.em $(srcdir)/emultempl/ia64elf.em \
+ $(ELF_DEPS) $(srcdir)/emultempl/ia64elf.em \
$(srcdir)/emultempl/needrelax.em \
$(srcdir)/scripttempl/elf.sc ${GEN_DEPENDS}
${GENSCRIPTS} elf64_ia64 "$(tdir_elf64_ia64)"
eelf64_ia64_fbsd.c: $(srcdir)/emulparams/elf64_ia64_fbsd.sh \
$(srcdir)/emulparams/elf64_ia64.sh \
- $(srcdir)/emultempl/elf32.em $(srcdir)/emultempl/ia64elf.em \
+ $(ELF_DEPS) $(srcdir)/emultempl/ia64elf.em \
$(srcdir)/emultempl/needrelax.em \
$(srcdir)/scripttempl/elf.sc ${GEN_DEPENDS}
${GENSCRIPTS} elf64_ia64_fbsd "$(tdir_elf64_ia64_fbsd)"
eelf64_s390.c: $(srcdir)/emulparams/elf64_s390.sh \
- $(srcdir)/emultempl/elf32.em $(srcdir)/scripttempl/elf.sc ${GEN_DEPENDS}
+ $(ELF_DEPS) $(srcdir)/scripttempl/elf.sc ${GEN_DEPENDS}
${GENSCRIPTS} elf64_s390 "$(tdir_elf64_s390)"
eelf64_sparc.c: $(srcdir)/emulparams/elf64_sparc.sh \
- $(srcdir)/emultempl/elf32.em $(srcdir)/scripttempl/elf.sc ${GEN_DEPENDS}
+ $(ELF_DEPS) $(srcdir)/scripttempl/elf.sc ${GEN_DEPENDS}
${GENSCRIPTS} elf64_sparc "$(tdir_elf64_sparc)"
eelf64_sparc_fbsd.c: $(srcdir)/emulparams/elf64_sparc_fbsd.sh \
$(srcdir)/emulparams/elf64_sparc.sh \
- $(srcdir)/emultempl/elf32.em $(srcdir)/scripttempl/elf.sc ${GEN_DEPENDS}
+ $(ELF_DEPS) $(srcdir)/scripttempl/elf.sc ${GEN_DEPENDS}
${GENSCRIPTS} elf64_sparc_fbsd "$(tdir_elf64_sparc_fbsd)"
eelf64bmip.c: $(srcdir)/emulparams/elf64bmip.sh \
- $(srcdir)/emulparams/elf32bmipn32.sh $(srcdir)/emultempl/irix.em \
- $(srcdir)/emultempl/elf32.em $(srcdir)/scripttempl/elf.sc ${GEN_DEPENDS}
+ $(srcdir)/emulparams/elf64bmip-defs.sh \
+ $(srcdir)/emulparams/elf32bmipn32-defs.sh $(ELF_DEPS) \
+ $(srcdir)/emultempl/irix.em $(srcdir)/emultempl/mipself.em \
+ $(srcdir)/scripttempl/elf.sc ${GEN_DEPENDS}
${GENSCRIPTS} elf64bmip "$(tdir_elf64bmip)"
eelf64mmix.c: $(srcdir)/emulparams/elf64mmix.sh \
- $(srcdir)/emultempl/elf32.em $(srcdir)/emultempl/mmix-elfnmmo.em \
+ $(ELF_DEPS) $(srcdir)/emultempl/mmix-elfnmmo.em \
$(srcdir)/emultempl/mmixelf.em $(srcdir)/scripttempl/elf.sc ${GEN_DEPENDS}
${GENSCRIPTS} elf64mmix "$(tdir_elf64mmix)"
emmo.c: $(srcdir)/emulparams/mmo.sh $(srcdir)/emultempl/mmix-elfnmmo.em \
- $(srcdir)/emultempl/generic.em $(srcdir)/emultempl/mmo.em \
+ $(srcdir)/emultempl/generic.em $(srcdir)/emultempl/elf-generic.em \
+ $(srcdir)/emultempl/mmo.em \
$(srcdir)/scripttempl/mmo.sc ${GEN_DEPENDS}
${GENSCRIPTS} mmo "$(tdir_mmo)"
eelf64btsmip.c: $(srcdir)/emulparams/elf64btsmip.sh \
- $(srcdir)/emulparams/elf32bmipn32.sh \
- $(srcdir)/emultempl/elf32.em $(srcdir)/scripttempl/elf.sc ${GEN_DEPENDS}
+ $(srcdir)/emulparams/elf64bmip-defs.sh \
+ $(srcdir)/emulparams/elf32bmipn32-defs.sh $(ELF_DEPS) \
+ $(srcdir)/emultempl/mipself.em $(srcdir)/scripttempl/elf.sc ${GEN_DEPENDS}
${GENSCRIPTS} elf64btsmip "$(tdir_elf64btsmip)"
eelf64ltsmip.c: $(srcdir)/emulparams/elf64ltsmip.sh \
- $(srcdir)/emulparams/elf64btsmip.sh $(srcdir)/emulparams/elf32bmipn32.sh \
- $(srcdir)/emultempl/elf32.em $(srcdir)/scripttempl/elf.sc ${GEN_DEPENDS}
+ $(srcdir)/emulparams/elf64btsmip.sh $(srcdir)/emulparams/elf64bmip-defs.sh \
+ $(srcdir)/emulparams/elf32bmipn32-defs.sh $(ELF_DEPS) \
+ $(srcdir)/emultempl/mipself.em $(srcdir)/scripttempl/elf.sc ${GEN_DEPENDS}
${GENSCRIPTS} elf64ltsmip "$(tdir_elf64ltsmip)"
eelf_i386.c: $(srcdir)/emulparams/elf_i386.sh \
- $(srcdir)/emultempl/elf32.em $(srcdir)/scripttempl/elf.sc ${GEN_DEPENDS}
+ $(ELF_DEPS) $(srcdir)/scripttempl/elf.sc ${GEN_DEPENDS}
${GENSCRIPTS} elf_i386 "$(tdir_elf_i386)"
eelf_x86_64.c: $(srcdir)/emulparams/elf_x86_64.sh \
- $(srcdir)/emultempl/elf32.em $(srcdir)/scripttempl/elf.sc ${GEN_DEPENDS}
+ $(ELF_DEPS) $(srcdir)/scripttempl/elf.sc ${GEN_DEPENDS}
${GENSCRIPTS} elf_x86_64 "$(tdir_elf_x86_64)"
eelf_x86_64_fbsd.c: $(srcdir)/emulparams/elf_x86_64_fbsd.sh \
$(srcdir)/emulparams/elf_x86_64.sh \
- $(srcdir)/emultempl/elf32.em $(srcdir)/scripttempl/elf.sc ${GEN_DEPENDS}
+ $(ELF_DEPS) $(srcdir)/scripttempl/elf.sc ${GEN_DEPENDS}
${GENSCRIPTS} elf_x86_64_fbsd "$(tdir_elf_x86_64_fbsd)"
eelf_i386_be.c: $(srcdir)/emulparams/elf_i386_be.sh \
- $(srcdir)/emultempl/elf32.em $(srcdir)/scripttempl/elf.sc ${GEN_DEPENDS}
+ $(ELF_DEPS) $(srcdir)/scripttempl/elf.sc ${GEN_DEPENDS}
${GENSCRIPTS} elf_i386_be "$(tdir_elf_i386_be)"
eelf_i386_chaos.c: $(srcdir)/emulparams/elf_i386_chaos.sh \
- $(srcdir)/emultempl/elf32.em $(srcdir)/scripttempl/elf_chaos.sc ${GEN_DEPENDS}
+ $(ELF_DEPS) $(srcdir)/scripttempl/elf_chaos.sc ${GEN_DEPENDS}
${GENSCRIPTS} elf_i386_chaos "$(tdir_elf_i386_chaos)"
eelf_i386_fbsd.c: $(srcdir)/emulparams/elf_i386_fbsd.sh \
$(srcdir)/emulparams/elf_i386.sh \
- $(srcdir)/emultempl/elf32.em $(srcdir)/scripttempl/elf.sc ${GEN_DEPENDS}
+ $(ELF_DEPS) $(srcdir)/scripttempl/elf.sc ${GEN_DEPENDS}
${GENSCRIPTS} elf_i386_fbsd "$(tdir_elf_i386_fbsd)"
eelf_i386_ldso.c: $(srcdir)/emulparams/elf_i386_ldso.sh \
- $(srcdir)/emultempl/elf32.em $(srcdir)/scripttempl/elf.sc ${GEN_DEPENDS}
+ $(ELF_DEPS) $(srcdir)/scripttempl/elf.sc ${GEN_DEPENDS}
${GENSCRIPTS} elf_i386_ldso "$(tdir_elf_i386_ldso)"
+eelf_i386_vxworks.c: $(srcdir)/emulparams/elf_i386_vxworks.sh \
+ $(srcdir)/emulparams/vxworks.sh $(srcdir)/emultempl/vxworks.em \
+ $(ELF_DEPS) $(srcdir)/scripttempl/elf.sc ${GEN_DEPENDS}
+ ${GENSCRIPTS} elf_i386_vxworks "$(tdir_elf_i386_vxworks)"
eelf_s390.c: $(srcdir)/emulparams/elf_s390.sh \
- $(srcdir)/emultempl/elf32.em $(srcdir)/scripttempl/elf.sc ${GEN_DEPENDS}
+ $(ELF_DEPS) $(srcdir)/scripttempl/elf.sc ${GEN_DEPENDS}
${GENSCRIPTS} elf_s390 "$(tdir_elf_s390)"
egld960.c: $(srcdir)/emulparams/gld960.sh \
$(srcdir)/emultempl/gld960.em $(srcdir)/scripttempl/i960.sc ${GEN_DEPENDS}
@@ -1585,31 +1865,31 @@ eh8300sxn.c: $(srcdir)/emulparams/h8300sxn.sh \
$(srcdir)/emultempl/generic.em $(srcdir)/scripttempl/h8300sxn.sc ${GEN_DEPENDS}
${GENSCRIPTS} h8300sxn "$(tdir_h8300sxn)"
eh8300elf.c: $(srcdir)/emulparams/h8300elf.sh \
- $(srcdir)/emultempl/elf32.em $(srcdir)/scripttempl/elf.sc ${GEN_DEPENDS}
+ $(ELF_DEPS) $(srcdir)/scripttempl/elf.sc ${GEN_DEPENDS}
${GENSCRIPTS} h8300elf "$(tdir_h8300elf)"
eh8300helf.c: $(srcdir)/emulparams/h8300helf.sh \
$(srcdir)/emulparams/h8300elf.sh \
- $(srcdir)/emultempl/elf32.em $(srcdir)/scripttempl/elf.sc ${GEN_DEPENDS}
+ $(ELF_DEPS) $(srcdir)/scripttempl/elf.sc ${GEN_DEPENDS}
${GENSCRIPTS} h8300helf "$(tdir_h8300helf)"
eh8300self.c: $(srcdir)/emulparams/h8300self.sh \
$(srcdir)/emulparams/h8300elf.sh \
- $(srcdir)/emultempl/elf32.em $(srcdir)/scripttempl/elf.sc ${GEN_DEPENDS}
+ $(ELF_DEPS) $(srcdir)/scripttempl/elf.sc ${GEN_DEPENDS}
${GENSCRIPTS} h8300self "$(tdir_h8300self)"
eh8300hnelf.c: $(srcdir)/emulparams/h8300hnelf.sh \
$(srcdir)/emulparams/h8300elf.sh \
- $(srcdir)/emultempl/elf32.em $(srcdir)/scripttempl/elf.sc ${GEN_DEPENDS}
+ $(ELF_DEPS) $(srcdir)/scripttempl/elf.sc ${GEN_DEPENDS}
${GENSCRIPTS} h8300hnelf "$(tdir_h8300hnelf)"
eh8300snelf.c: $(srcdir)/emulparams/h8300snelf.sh \
$(srcdir)/emulparams/h8300elf.sh \
- $(srcdir)/emultempl/elf32.em $(srcdir)/scripttempl/elf.sc ${GEN_DEPENDS}
+ $(ELF_DEPS) $(srcdir)/scripttempl/elf.sc ${GEN_DEPENDS}
${GENSCRIPTS} h8300snelf "$(tdir_h8300snelf)"
eh8300sxelf.c: $(srcdir)/emulparams/h8300sxelf.sh \
$(srcdir)/emulparams/h8300elf.sh \
- $(srcdir)/emultempl/elf32.em $(srcdir)/scripttempl/elf.sc ${GEN_DEPENDS}
+ $(ELF_DEPS) $(srcdir)/scripttempl/elf.sc ${GEN_DEPENDS}
${GENSCRIPTS} h8300sxelf "$(tdir_h8300sxelf)"
eh8300sxnelf.c: $(srcdir)/emulparams/h8300sxnelf.sh \
$(srcdir)/emulparams/h8300elf.sh \
- $(srcdir)/emultempl/elf32.em $(srcdir)/scripttempl/elf.sc ${GEN_DEPENDS}
+ $(ELF_DEPS) $(srcdir)/scripttempl/elf.sc ${GEN_DEPENDS}
${GENSCRIPTS} h8300sxnelf "$(tdir_h8300sxnelf)"
eh8500.c: $(srcdir)/emulparams/h8500.sh \
$(srcdir)/emultempl/generic.em $(srcdir)/scripttempl/h8500.sc ${GEN_DEPENDS}
@@ -1633,24 +1913,24 @@ 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/elf32.em $(srcdir)/emultempl/hppaelf.em \
+ $(ELF_DEPS) $(srcdir)/emultempl/hppaelf.em \
$(srcdir)/scripttempl/hppaelf.sc ${GEN_DEPENDS}
${GENSCRIPTS} hppaelf "$(tdir_hppaelf)"
ehppalinux.c: $(srcdir)/emulparams/hppalinux.sh \
- $(srcdir)/emultempl/elf32.em $(srcdir)/emultempl/hppaelf.em \
+ $(ELF_DEPS) $(srcdir)/emultempl/hppaelf.em \
$(srcdir)/scripttempl/elf.sc ${GEN_DEPENDS}
${GENSCRIPTS} hppalinux "$(tdir_hppalinux)"
ehppanbsd.c: $(srcdir)/emulparams/hppanbsd.sh \
$(srcdir)/emulparams/hppaelf.sh \
- $(srcdir)/emultempl/elf32.em $(srcdir)/emultempl/hppaelf.em \
+ $(ELF_DEPS) $(srcdir)/emultempl/hppaelf.em \
$(srcdir)/scripttempl/elf.sc ${GEN_DEPENDS}
${GENSCRIPTS} hppanbsd "$(tdir_hppanbsd)"
ehppaobsd.c: $(srcdir)/emulparams/hppaobsd.sh \
- $(srcdir)/emultempl/elf32.em $(srcdir)/emultempl/hppaelf.em \
+ $(ELF_DEPS) $(srcdir)/emultempl/hppaelf.em \
$(srcdir)/scripttempl/elf.sc ${GEN_DEPENDS}
${GENSCRIPTS} hppaobsd "$(tdir_hppaobsd)"
ehppa64linux.c: $(srcdir)/emulparams/hppa64linux.sh \
- $(srcdir)/emultempl/elf32.em $(srcdir)/scripttempl/elf.sc ${GEN_DEPENDS}
+ $(ELF_DEPS) $(srcdir)/scripttempl/elf.sc ${GEN_DEPENDS}
${GENSCRIPTS} hppa64linux "$(tdir_hppa64linux)"
ei386aout.c: $(srcdir)/emulparams/i386aout.sh \
$(srcdir)/emultempl/generic.em $(srcdir)/scripttempl/aout.sc ${GEN_DEPENDS}
@@ -1674,13 +1954,13 @@ 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}
+ $(ELF_DEPS) $(srcdir)/scripttempl/elf.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/elf32.em $(srcdir)/scripttempl/elf.sc ${GEN_DEPENDS}
+ $(ELF_DEPS) $(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}
@@ -1689,10 +1969,10 @@ ei386nbsd.c: $(srcdir)/emulparams/i386nbsd.sh \
$(srcdir)/emultempl/generic.em $(srcdir)/scripttempl/aout.sc ${GEN_DEPENDS}
${GENSCRIPTS} i386nbsd "$(tdir_i386nbsd)"
ei386nto.c: $(srcdir)/emulparams/i386nto.sh \
- $(srcdir)/emultempl/elf32.em $(srcdir)/scripttempl/elf.sc ${GEN_DEPENDS}
+ $(ELF_DEPS) $(srcdir)/scripttempl/elf.sc ${GEN_DEPENDS}
${GENSCRIPTS} i386nto "$(tdir_i386nto)"
ei386nw.c: $(srcdir)/emulparams/i386nw.sh \
- $(srcdir)/emultempl/elf32.em $(srcdir)/scripttempl/nw.sc ${GEN_DEPENDS}
+ $(ELF_DEPS) $(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}
@@ -1700,23 +1980,26 @@ ei386pe.c: $(srcdir)/emulparams/i386pe.sh \
ei386pe_posix.c: $(srcdir)/emulparams/i386pe_posix.sh \
$(srcdir)/emultempl/pe.em $(srcdir)/scripttempl/pe.sc ${GEN_DEPENDS}
${GENSCRIPTS} i386pe_posix "$(tdir_i386pe_posix)"
+ei386pep.c: $(srcdir)/emulparams/i386pep.sh \
+ $(srcdir)/emultempl/pep.em $(srcdir)/scripttempl/pep.sc ${GEN_DEPENDS}
+ ${GENSCRIPTS} i386pep "$(tdir_i386pe)"
elnk960.c: $(srcdir)/emulparams/lnk960.sh \
$(srcdir)/emultempl/lnk960.em $(srcdir)/scripttempl/i960.sc ${GEN_DEPENDS}
${GENSCRIPTS} lnk960 "$(tdir_lnk960)"
em68hc11elf.c: $(srcdir)/emulparams/m68hc11elf.sh \
- $(srcdir)/emultempl/m68hc1xelf.em $(srcdir)/emultempl/elf32.em \
+ $(srcdir)/emultempl/m68hc1xelf.em $(ELF_DEPS) \
$(srcdir)/scripttempl/elfm68hc11.sc ${GEN_DEPENDS}
${GENSCRIPTS} m68hc11elf "$(tdir_m68hc11)"
em68hc11elfb.c: $(srcdir)/emulparams/m68hc11elfb.sh \
- $(srcdir)/emultempl/m68hc1xelf.em $(srcdir)/emultempl/elf32.em \
+ $(srcdir)/emultempl/m68hc1xelf.em $(ELF_DEPS) \
$(srcdir)/scripttempl/elfm68hc11.sc ${GEN_DEPENDS}
${GENSCRIPTS} m68hc11elfb "$(tdir_m68hc11b)"
em68hc12elf.c: $(srcdir)/emulparams/m68hc12elf.sh \
- $(srcdir)/emultempl/m68hc1xelf.em $(srcdir)/emultempl/elf32.em \
+ $(srcdir)/emultempl/m68hc1xelf.em $(ELF_DEPS) \
$(srcdir)/scripttempl/elfm68hc12.sc ${GEN_DEPENDS}
${GENSCRIPTS} m68hc12elf "$(tdir_m68hc12)"
em68hc12elfb.c: $(srcdir)/emulparams/m68hc12elfb.sh \
- $(srcdir)/emultempl/m68hc1xelf.em $(srcdir)/emultempl/elf32.em \
+ $(srcdir)/emultempl/m68hc1xelf.em $(ELF_DEPS) \
$(srcdir)/scripttempl/elfm68hc12.sc ${GEN_DEPENDS}
${GENSCRIPTS} m68hc12elfb "$(tdir_m68hc12b)"
em68k4knbsd.c: $(srcdir)/emulparams/m68k4knbsd.sh \
@@ -1732,246 +2015,296 @@ em68kcoff.c: $(srcdir)/emulparams/m68kcoff.sh \
$(srcdir)/emultempl/m68kcoff.em $(srcdir)/scripttempl/m68kcoff.sc ${GEN_DEPENDS}
${GENSCRIPTS} m68kcoff "$(tdir_m68kcoff)"
em68kelf.c: $(srcdir)/emulparams/m68kelf.sh \
- $(srcdir)/emultempl/elf32.em $(srcdir)/emultempl/m68kelf.em \
+ $(ELF_DEPS) $(srcdir)/emultempl/m68kelf.em \
$(srcdir)/scripttempl/elf.sc ${GEN_DEPENDS}
${GENSCRIPTS} m68kelf "$(tdir_m68kelf)"
em68kelfnbsd.c: $(srcdir)/emulparams/m68kelfnbsd.sh \
$(srcdir)/emulparams/m68kelf.sh \
- $(srcdir)/emultempl/elf32.em $(srcdir)/emultempl/m68kelf.em \
+ $(ELF_DEPS) $(srcdir)/emultempl/m68kelf.em \
$(srcdir)/scripttempl/elf.sc ${GEN_DEPENDS}
${GENSCRIPTS} m68kelfnbsd "$(tdir_m68kelfnbsd)"
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}
+ $(ELF_DEPS) $(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)"
+emaxqcoff.c: $(srcdir)/emulparams/maxqcoff.sh \
+ $(srcdir)/emultempl/generic.em $(srcdir)/scripttempl/maxqcoff.sc ${GEN_DEPENDS}
+ ${GENSCRIPTS} maxqcoff "$(tdir_maxqcoff)"
emcorepe.c: $(srcdir)/emulparams/mcorepe.sh \
$(srcdir)/emultempl/pe.em $(srcdir)/scripttempl/pe.sc ${GEN_DEPENDS}
${GENSCRIPTS} mcorepe "$(tdir_mcorepe)"
-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}
+emipsbig.c: $(srcdir)/emulparams/mipsbig.sh $(srcdir)/emultempl/generic.em \
+ $(srcdir)/scripttempl/mips.sc ${GEN_DEPENDS}
+ ${GENSCRIPTS} mipsbig "$(tdir_mipsbig)"
+emipsbsd.c: $(srcdir)/emulparams/mipsbsd.sh $(srcdir)/emultempl/generic.em \
+ $(srcdir)/scripttempl/mipsbsd.sc ${GEN_DEPENDS}
+ ${GENSCRIPTS} mipsbsd "$(tdir_mipsbsd)"
+emipsidt.c: $(srcdir)/emulparams/mipsidt.sh $(srcdir)/emultempl/generic.em \
+ $(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}
+emipsidtl.c: $(srcdir)/emulparams/mipsidtl.sh $(srcdir)/emultempl/generic.em \
+ $(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}
+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 \
+emipslnews.c: $(srcdir)/emulparams/mipslnews.sh \
$(srcdir)/emultempl/generic.em $(srcdir)/scripttempl/mips.sc ${GEN_DEPENDS}
- ${GENSCRIPTS} mipslnews
-emipspe.c: $(srcdir)/emulparams/mipspe.sh \
- $(srcdir)/emultempl/pe.em $(srcdir)/scripttempl/pe.sc ${GEN_DEPENDS}
- ${GENSCRIPTS} mipspe "$(tdir_mips)"
+ ${GENSCRIPTS} mipslnews "$(tdir_mipslnews)"
+emipspe.c: $(srcdir)/emulparams/mipspe.sh $(srcdir)/emultempl/pe.em \
+ $(srcdir)/scripttempl/pe.sc ${GEN_DEPENDS}
+ ${GENSCRIPTS} mipspe "$(tdir_mipspe)"
emn10300.c: $(srcdir)/emulparams/mn10300.sh \
$(srcdir)/emulparams/mn10200.sh \
- $(srcdir)/emultempl/elf32.em $(srcdir)/scripttempl/elf.sc ${GEN_DEPENDS}
+ $(ELF_DEPS) $(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}
+ $(ELF_GEN_DEPS) $(srcdir)/scripttempl/elf.sc ${GEN_DEPENDS}
${GENSCRIPTS} mn10200 "$(tdir_mn10200)"
emsp430x110.c: $(srcdir)/emulparams/msp430all.sh \
- $(srcdir)/emultempl/generic.em $(srcdir)/scripttempl/elf32msp430.sc \
+ $(ELF_GEN_DEPS) $(srcdir)/scripttempl/elf32msp430.sc \
${GEN_DEPENDS}
${GENSCRIPTS} msp430x110 "$(tdir_msp430x110)" msp430all
emsp430x112.c: $(srcdir)/emulparams/msp430all.sh \
- $(srcdir)/emultempl/generic.em $(srcdir)/scripttempl/elf32msp430.sc \
+ $(ELF_GEN_DEPS) $(srcdir)/scripttempl/elf32msp430.sc \
${GEN_DEPENDS}
${GENSCRIPTS} msp430x112 "$(tdir_msp430x112)" msp430all
emsp430x1101.c: $(srcdir)/emulparams/msp430all.sh \
- $(srcdir)/emultempl/generic.em $(srcdir)/scripttempl/elf32msp430.sc \
+ $(ELF_GEN_DEPS) $(srcdir)/scripttempl/elf32msp430.sc \
${GEN_DEPENDS}
${GENSCRIPTS} msp430x1101 "$(tdir_msp430x1101)" msp430all
emsp430x1111.c: $(srcdir)/emulparams/msp430all.sh \
- $(srcdir)/emultempl/generic.em $(srcdir)/scripttempl/elf32msp430.sc \
+ $(ELF_GEN_DEPS) $(srcdir)/scripttempl/elf32msp430.sc \
${GEN_DEPENDS}
${GENSCRIPTS} msp430x1111 "$(tdir_msp430x1111)" msp430all
emsp430x1121.c: $(srcdir)/emulparams/msp430all.sh \
- $(srcdir)/emultempl/generic.em $(srcdir)/scripttempl/elf32msp430.sc \
+ $(ELF_GEN_DEPS) $(srcdir)/scripttempl/elf32msp430.sc \
${GEN_DEPENDS}
${GENSCRIPTS} msp430x1121 "$(tdir_msp430x1121)" msp430all
emsp430x1122.c: $(srcdir)/emulparams/msp430all.sh \
- $(srcdir)/emultempl/generic.em $(srcdir)/scripttempl/elf32msp430.sc \
+ $(ELF_GEN_DEPS) $(srcdir)/scripttempl/elf32msp430.sc \
${GEN_DEPENDS}
${GENSCRIPTS} msp430x1122 "$(tdir_msp430x1122)" msp430all
emsp430x1132.c: $(srcdir)/emulparams/msp430all.sh \
- $(srcdir)/emultempl/generic.em $(srcdir)/scripttempl/elf32msp430.sc \
+ $(ELF_GEN_DEPS) $(srcdir)/scripttempl/elf32msp430.sc \
${GEN_DEPENDS}
${GENSCRIPTS} msp430x1132 "$(tdir_msp430x1132)" msp430all
emsp430x122.c: $(srcdir)/emulparams/msp430all.sh \
- $(srcdir)/emultempl/generic.em $(srcdir)/scripttempl/elf32msp430.sc \
+ $(ELF_GEN_DEPS) $(srcdir)/scripttempl/elf32msp430.sc \
${GEN_DEPENDS}
${GENSCRIPTS} msp430x122 "$(tdir_msp430x122)" msp430all
emsp430x123.c: $(srcdir)/emulparams/msp430all.sh \
- $(srcdir)/emultempl/generic.em $(srcdir)/scripttempl/elf32msp430.sc \
+ $(ELF_GEN_DEPS) $(srcdir)/scripttempl/elf32msp430.sc \
${GEN_DEPENDS}
${GENSCRIPTS} msp430x123 "$(tdir_msp430x123)" msp430all
emsp430x1222.c: $(srcdir)/emulparams/msp430all.sh \
- $(srcdir)/emultempl/generic.em $(srcdir)/scripttempl/elf32msp430.sc \
+ $(ELF_GEN_DEPS) $(srcdir)/scripttempl/elf32msp430.sc \
${GEN_DEPENDS}
${GENSCRIPTS} msp430x1222 "$(tdir_msp430x1222)" msp430all
emsp430x1232.c: $(srcdir)/emulparams/msp430all.sh \
- $(srcdir)/emultempl/generic.em $(srcdir)/scripttempl/elf32msp430.sc \
+ $(ELF_GEN_DEPS) $(srcdir)/scripttempl/elf32msp430.sc \
${GEN_DEPENDS}
${GENSCRIPTS} msp430x1232 "$(tdir_msp430x1232)" msp430all
emsp430x133.c: $(srcdir)/emulparams/msp430all.sh \
- $(srcdir)/emultempl/generic.em $(srcdir)/scripttempl/elf32msp430.sc \
+ $(ELF_GEN_DEPS) $(srcdir)/scripttempl/elf32msp430.sc \
${GEN_DEPENDS}
${GENSCRIPTS} msp430x133 "$(tdir_msp430x133)" msp430all
emsp430x135.c: $(srcdir)/emulparams/msp430all.sh \
- $(srcdir)/emultempl/generic.em $(srcdir)/scripttempl/elf32msp430.sc \
+ $(ELF_GEN_DEPS) $(srcdir)/scripttempl/elf32msp430.sc \
${GEN_DEPENDS}
${GENSCRIPTS} msp430x135 "$(tdir_msp430x135)" msp430all
emsp430x1331.c: $(srcdir)/emulparams/msp430all.sh \
- $(srcdir)/emultempl/generic.em $(srcdir)/scripttempl/elf32msp430.sc \
+ $(ELF_GEN_DEPS) $(srcdir)/scripttempl/elf32msp430.sc \
${GEN_DEPENDS}
${GENSCRIPTS} msp430x1331 "$(tdir_msp430x1331)" msp430all
emsp430x1351.c: $(srcdir)/emulparams/msp430all.sh \
- $(srcdir)/emultempl/generic.em $(srcdir)/scripttempl/elf32msp430.sc \
+ $(ELF_GEN_DEPS) $(srcdir)/scripttempl/elf32msp430.sc \
${GEN_DEPENDS}
${GENSCRIPTS} msp430x1351 "$(tdir_msp430x1351)" msp430all
emsp430x147.c: $(srcdir)/emulparams/msp430all.sh \
- $(srcdir)/emultempl/generic.em $(srcdir)/scripttempl/elf32msp430.sc \
+ $(ELF_GEN_DEPS) $(srcdir)/scripttempl/elf32msp430.sc \
${GEN_DEPENDS}
${GENSCRIPTS} msp430x147 "$(tdir_msp430x147)" msp430all
emsp430x148.c: $(srcdir)/emulparams/msp430all.sh \
- $(srcdir)/emultempl/generic.em $(srcdir)/scripttempl/elf32msp430.sc \
+ $(ELF_GEN_DEPS) $(srcdir)/scripttempl/elf32msp430.sc \
${GEN_DEPENDS}
${GENSCRIPTS} msp430x148 "$(tdir_msp430x148)" msp430all
emsp430x149.c: $(srcdir)/emulparams/msp430all.sh \
- $(srcdir)/emultempl/generic.em $(srcdir)/scripttempl/elf32msp430.sc \
+ $(ELF_GEN_DEPS) $(srcdir)/scripttempl/elf32msp430.sc \
${GEN_DEPENDS}
${GENSCRIPTS} msp430x149 "$(tdir_msp430x149)" msp430all
emsp430x155.c: $(srcdir)/emulparams/msp430all.sh \
- $(srcdir)/emultempl/generic.em $(srcdir)/scripttempl/elf32msp430.sc \
+ $(ELF_GEN_DEPS) $(srcdir)/scripttempl/elf32msp430.sc \
${GEN_DEPENDS}
${GENSCRIPTS} msp430x155 "$(tdir_msp430x155)" msp430all
emsp430x156.c: $(srcdir)/emulparams/msp430all.sh \
- $(srcdir)/emultempl/generic.em $(srcdir)/scripttempl/elf32msp430.sc \
+ $(ELF_GEN_DEPS) $(srcdir)/scripttempl/elf32msp430.sc \
${GEN_DEPENDS}
${GENSCRIPTS} msp430x156 "$(tdir_msp430x156)" msp430all
emsp430x157.c: $(srcdir)/emulparams/msp430all.sh \
- $(srcdir)/emultempl/generic.em $(srcdir)/scripttempl/elf32msp430.sc \
+ $(ELF_GEN_DEPS) $(srcdir)/scripttempl/elf32msp430.sc \
${GEN_DEPENDS}
${GENSCRIPTS} msp430x157 "$(tdir_msp430x157)" msp430all
emsp430x167.c: $(srcdir)/emulparams/msp430all.sh \
- $(srcdir)/emultempl/generic.em $(srcdir)/scripttempl/elf32msp430.sc \
+ $(ELF_GEN_DEPS) $(srcdir)/scripttempl/elf32msp430.sc \
${GEN_DEPENDS}
${GENSCRIPTS} msp430x167 "$(tdir_msp430x167)" msp430all
emsp430x168.c: $(srcdir)/emulparams/msp430all.sh \
- $(srcdir)/emultempl/generic.em $(srcdir)/scripttempl/elf32msp430.sc \
+ $(ELF_GEN_DEPS) $(srcdir)/scripttempl/elf32msp430.sc \
${GEN_DEPENDS}
${GENSCRIPTS} msp430x168 "$(tdir_msp430x168)" msp430all
emsp430x169.c: $(srcdir)/emulparams/msp430all.sh \
- $(srcdir)/emultempl/generic.em $(srcdir)/scripttempl/elf32msp430.sc \
+ $(ELF_GEN_DEPS) $(srcdir)/scripttempl/elf32msp430.sc \
${GEN_DEPENDS}
${GENSCRIPTS} msp430x169 "$(tdir_msp430x169)" msp430all
+emsp430x1610.c: $(srcdir)/emulparams/msp430all.sh \
+ $(ELF_GEN_DEPS) $(srcdir)/scripttempl/elf32msp430.sc \
+ ${GEN_DEPENDS}
+ ${GENSCRIPTS} msp430x1610 "$(tdir_msp430x1610)" msp430all
+emsp430x1611.c: $(srcdir)/emulparams/msp430all.sh \
+ $(ELF_GEN_DEPS) $(srcdir)/scripttempl/elf32msp430.sc \
+ ${GEN_DEPENDS}
+ ${GENSCRIPTS} msp430x1611 "$(tdir_msp430x1611)" msp430all
+emsp430x1612.c: $(srcdir)/emulparams/msp430all.sh \
+ $(ELF_GEN_DEPS) $(srcdir)/scripttempl/elf32msp430.sc \
+ ${GEN_DEPENDS}
+ ${GENSCRIPTS} msp430x1612 "$(tdir_msp430x1612)" msp430all
+emsp430x2101.c: $(srcdir)/emulparams/msp430all.sh \
+ $(ELF_GEN_DEPS) $(srcdir)/scripttempl/elf32msp430.sc \
+ ${GEN_DEPENDS}
+ ${GENSCRIPTS} msp430x2101 "$(tdir_msp430x2101)" msp430all
+emsp430x2111.c: $(srcdir)/emulparams/msp430all.sh \
+ $(ELF_GEN_DEPS) $(srcdir)/scripttempl/elf32msp430.sc \
+ ${GEN_DEPENDS}
+ ${GENSCRIPTS} msp430x2111 "$(tdir_msp430x2111)" msp430all
+emsp430x2121.c: $(srcdir)/emulparams/msp430all.sh \
+ $(ELF_GEN_DEPS) $(srcdir)/scripttempl/elf32msp430.sc \
+ ${GEN_DEPENDS}
+ ${GENSCRIPTS} msp430x2121 "$(tdir_msp430x2121)" msp430all
+emsp430x2131.c: $(srcdir)/emulparams/msp430all.sh \
+ $(ELF_GEN_DEPS) $(srcdir)/scripttempl/elf32msp430.sc \
+ ${GEN_DEPENDS}
+ ${GENSCRIPTS} msp430x2131 "$(tdir_msp430x2131)" msp430all
emsp430x311.c: $(srcdir)/emulparams/msp430all.sh \
- $(srcdir)/emultempl/generic.em $(srcdir)/scripttempl/elf32msp430_3.sc \
+ $(ELF_GEN_DEPS) $(srcdir)/scripttempl/elf32msp430_3.sc \
${GEN_DEPENDS}
${GENSCRIPTS} msp430x311 "$(tdir_msp430x311)" msp430all
emsp430x312.c: $(srcdir)/emulparams/msp430all.sh \
- $(srcdir)/emultempl/generic.em $(srcdir)/scripttempl/elf32msp430_3.sc \
+ $(ELF_GEN_DEPS) $(srcdir)/scripttempl/elf32msp430_3.sc \
${GEN_DEPENDS}
${GENSCRIPTS} msp430x312 "$(tdir_msp430x312)" msp430all
emsp430x313.c: $(srcdir)/emulparams/msp430all.sh \
- $(srcdir)/emultempl/generic.em $(srcdir)/scripttempl/elf32msp430_3.sc \
+ $(ELF_GEN_DEPS) $(srcdir)/scripttempl/elf32msp430_3.sc \
${GEN_DEPENDS}
${GENSCRIPTS} msp430x313 "$(tdir_msp430x313)" msp430all
emsp430x314.c: $(srcdir)/emulparams/msp430all.sh \
- $(srcdir)/emultempl/generic.em $(srcdir)/scripttempl/elf32msp430_3.sc \
+ $(ELF_GEN_DEPS) $(srcdir)/scripttempl/elf32msp430_3.sc \
${GEN_DEPENDS}
${GENSCRIPTS} msp430x314 "$(tdir_msp430x314)" msp430all
emsp430x315.c: $(srcdir)/emulparams/msp430all.sh \
- $(srcdir)/emultempl/generic.em $(srcdir)/scripttempl/elf32msp430_3.sc \
+ $(ELF_GEN_DEPS) $(srcdir)/scripttempl/elf32msp430_3.sc \
${GEN_DEPENDS}
${GENSCRIPTS} msp430x315 "$(tdir_msp430x315)" msp430all
emsp430x323.c: $(srcdir)/emulparams/msp430all.sh \
- $(srcdir)/emultempl/generic.em $(srcdir)/scripttempl/elf32msp430_3.sc \
+ $(ELF_GEN_DEPS) $(srcdir)/scripttempl/elf32msp430_3.sc \
${GEN_DEPENDS}
${GENSCRIPTS} msp430x323 "$(tdir_msp430x323)" msp430all
emsp430x325.c: $(srcdir)/emulparams/msp430all.sh \
- $(srcdir)/emultempl/generic.em $(srcdir)/scripttempl/elf32msp430_3.sc \
+ $(ELF_GEN_DEPS) $(srcdir)/scripttempl/elf32msp430_3.sc \
${GEN_DEPENDS}
${GENSCRIPTS} msp430x325 "$(tdir_msp430x325)" msp430all
emsp430x336.c: $(srcdir)/emulparams/msp430all.sh \
- $(srcdir)/emultempl/generic.em $(srcdir)/scripttempl/elf32msp430_3.sc \
+ $(ELF_GEN_DEPS) $(srcdir)/scripttempl/elf32msp430_3.sc \
${GEN_DEPENDS}
${GENSCRIPTS} msp430x336 "$(tdir_msp430x336)" msp430all
emsp430x337.c: $(srcdir)/emulparams/msp430all.sh \
- $(srcdir)/emultempl/generic.em $(srcdir)/scripttempl/elf32msp430_3.sc \
+ $(ELF_GEN_DEPS) $(srcdir)/scripttempl/elf32msp430_3.sc \
${GEN_DEPENDS}
${GENSCRIPTS} msp430x337 "$(tdir_msp430x337)" msp430all
emsp430x412.c: $(srcdir)/emulparams/msp430all.sh \
- $(srcdir)/emultempl/generic.em $(srcdir)/scripttempl/elf32msp430.sc \
+ $(ELF_GEN_DEPS) $(srcdir)/scripttempl/elf32msp430.sc \
${GEN_DEPENDS}
${GENSCRIPTS} msp430x412 "$(tdir_msp430x412)" msp430all
emsp430x413.c: $(srcdir)/emulparams/msp430all.sh \
- $(srcdir)/emultempl/generic.em $(srcdir)/scripttempl/elf32msp430.sc \
+ $(ELF_GEN_DEPS) $(srcdir)/scripttempl/elf32msp430.sc \
${GEN_DEPENDS}
${GENSCRIPTS} msp430x413 "$(tdir_msp430x413)" msp430all
+emsp430x415.c: $(srcdir)/emulparams/msp430all.sh \
+ $(ELF_GEN_DEPS) $(srcdir)/scripttempl/elf32msp430.sc \
+ ${GEN_DEPENDS}
+ ${GENSCRIPTS} msp430x415 "$(tdir_msp430x415)" msp430all
+emsp430x417.c: $(srcdir)/emulparams/msp430all.sh \
+ $(ELF_GEN_DEPS) $(srcdir)/scripttempl/elf32msp430.sc \
+ ${GEN_DEPENDS}
+ ${GENSCRIPTS} msp430x417 "$(tdir_msp430x417)" msp430all
emsp430xE423.c: $(srcdir)/emulparams/msp430all.sh \
- $(srcdir)/emultempl/generic.em $(srcdir)/scripttempl/elf32msp430.sc \
+ $(ELF_GEN_DEPS) $(srcdir)/scripttempl/elf32msp430.sc \
${GEN_DEPENDS}
${GENSCRIPTS} msp430xE423 "$(tdir_msp430xE423)" msp430all
emsp430xE425.c: $(srcdir)/emulparams/msp430all.sh \
- $(srcdir)/emultempl/generic.em $(srcdir)/scripttempl/elf32msp430.sc \
+ $(ELF_GEN_DEPS) $(srcdir)/scripttempl/elf32msp430.sc \
${GEN_DEPENDS}
${GENSCRIPTS} msp430xE425 "$(tdir_msp430xE425)" msp430all
emsp430xE427.c: $(srcdir)/emulparams/msp430all.sh \
- $(srcdir)/emultempl/generic.em $(srcdir)/scripttempl/elf32msp430.sc \
+ $(ELF_GEN_DEPS) $(srcdir)/scripttempl/elf32msp430.sc \
${GEN_DEPENDS}
${GENSCRIPTS} msp430xE427 "$(tdir_msp430xE427)" msp430all
emsp430xW423.c: $(srcdir)/emulparams/msp430all.sh \
- $(srcdir)/emultempl/generic.em $(srcdir)/scripttempl/elf32msp430.sc \
+ $(ELF_GEN_DEPS) $(srcdir)/scripttempl/elf32msp430.sc \
${GEN_DEPENDS}
${GENSCRIPTS} msp430xW423 "$(tdir_msp430xW423)" msp430all
emsp430xW425.c: $(srcdir)/emulparams/msp430all.sh \
- $(srcdir)/emultempl/generic.em $(srcdir)/scripttempl/elf32msp430.sc \
+ $(ELF_GEN_DEPS) $(srcdir)/scripttempl/elf32msp430.sc \
${GEN_DEPENDS}
${GENSCRIPTS} msp430xW425 "$(tdir_msp430xW425)" msp430all
emsp430xW427.c: $(srcdir)/emulparams/msp430all.sh \
- $(srcdir)/emultempl/generic.em $(srcdir)/scripttempl/elf32msp430.sc \
+ $(ELF_GEN_DEPS) $(srcdir)/scripttempl/elf32msp430.sc \
${GEN_DEPENDS}
${GENSCRIPTS} msp430xW427 "$(tdir_msp430xW427)" msp430all
+emsp430xG437.c: $(srcdir)/emulparams/msp430all.sh \
+ $(ELF_GEN_DEPS) $(srcdir)/scripttempl/elf32msp430.sc \
+ ${GEN_DEPENDS}
+ ${GENSCRIPTS} msp430xG437 "$(tdir_msp430xG437)" msp430all
+emsp430xG438.c: $(srcdir)/emulparams/msp430all.sh \
+ $(ELF_GEN_DEPS) $(srcdir)/scripttempl/elf32msp430.sc \
+ ${GEN_DEPENDS}
+ ${GENSCRIPTS} msp430xG438 "$(tdir_msp430xG438)" msp430all
+emsp430xG439.c: $(srcdir)/emulparams/msp430all.sh \
+ $(ELF_GEN_DEPS) $(srcdir)/scripttempl/elf32msp430.sc \
+ ${GEN_DEPENDS}
+ ${GENSCRIPTS} msp430xG439 "$(tdir_msp430xG439)" msp430all
emsp430x435.c: $(srcdir)/emulparams/msp430all.sh \
- $(srcdir)/emultempl/generic.em $(srcdir)/scripttempl/elf32msp430.sc \
+ $(ELF_GEN_DEPS) $(srcdir)/scripttempl/elf32msp430.sc \
${GEN_DEPENDS}
${GENSCRIPTS} msp430x435 "$(tdir_msp430x435)" msp430all
emsp430x436.c: $(srcdir)/emulparams/msp430all.sh \
- $(srcdir)/emultempl/generic.em $(srcdir)/scripttempl/elf32msp430.sc \
+ $(ELF_GEN_DEPS) $(srcdir)/scripttempl/elf32msp430.sc \
${GEN_DEPENDS}
${GENSCRIPTS} msp430x436 "$(tdir_msp430x436)" msp430all
emsp430x437.c: $(srcdir)/emulparams/msp430all.sh \
- $(srcdir)/emultempl/generic.em $(srcdir)/scripttempl/elf32msp430.sc \
+ $(ELF_GEN_DEPS) $(srcdir)/scripttempl/elf32msp430.sc \
${GEN_DEPENDS}
${GENSCRIPTS} msp430x437 "$(tdir_msp430x437)" msp430all
emsp430x447.c: $(srcdir)/emulparams/msp430all.sh \
- $(srcdir)/emultempl/generic.em $(srcdir)/scripttempl/elf32msp430.sc \
+ $(ELF_GEN_DEPS) $(srcdir)/scripttempl/elf32msp430.sc \
${GEN_DEPENDS}
${GENSCRIPTS} msp430x447 "$(tdir_msp430x447)" msp430all
emsp430x448.c: $(srcdir)/emulparams/msp430all.sh \
- $(srcdir)/emultempl/generic.em $(srcdir)/scripttempl/elf32msp430.sc \
+ $(ELF_GEN_DEPS) $(srcdir)/scripttempl/elf32msp430.sc \
${GEN_DEPENDS}
${GENSCRIPTS} msp430x448 "$(tdir_msp430x448)" msp430all
emsp430x449.c: $(srcdir)/emulparams/msp430all.sh \
- $(srcdir)/emultempl/generic.em $(srcdir)/scripttempl/elf32msp430.sc \
+ $(ELF_GEN_DEPS) $(srcdir)/scripttempl/elf32msp430.sc \
${GEN_DEPENDS}
${GENSCRIPTS} msp430x449 "$(tdir_msp430x449)" msp430all
enews.c: $(srcdir)/emulparams/news.sh \
@@ -1985,7 +2318,7 @@ eor32.c: $(srcdir)/emulparams/or32.sh \
$(srcdir)/emultempl/generic.em $(srcdir)/scripttempl/or32.sc ${GEN_DEPENDS}
${GENSCRIPTS} or32 "$(tdir_or32)"
eor32elf.c: $(srcdir)/emulparams/or32elf.sh \
- $(srcdir)/emultempl/generic.em $(srcdir)/scripttempl/elf.sc ${GEN_DEPENDS}
+ $(ELF_GEN_DEPS) $(srcdir)/scripttempl/elf.sc ${GEN_DEPENDS}
${GENSCRIPTS} or32elf "$(tdir_or32elf)"
epc532macha.c: $(srcdir)/emulparams/pc532macha.sh \
$(srcdir)/emultempl/generic.em $(srcdir)/scripttempl/aout.sc ${GEN_DEPENDS}
@@ -1994,107 +2327,127 @@ epdp11.c: $(srcdir)/emulparams/pdp11.sh \
$(srcdir)/emultempl/generic.em $(srcdir)/scripttempl/aout.sc ${GEN_DEPENDS}
${GENSCRIPTS} pdp11 "$(tdir_pdp11)"
epjelf.c: $(srcdir)/emulparams/pjelf.sh \
- $(srcdir)/emultempl/elf32.em $(srcdir)/scripttempl/elf.sc ${GEN_DEPENDS}
+ $(ELF_GEN_DEPS) $(srcdir)/scripttempl/elf.sc ${GEN_DEPENDS}
${GENSCRIPTS} pjelf "$(tdir_pjelf)"
-epjlelf.c: $(srcdir)/emulparams/pjlelf.sh \
- $(srcdir)/emultempl/elf32.em $(srcdir)/scripttempl/elf.sc ${GEN_DEPENDS}
+epjlelf.c: $(srcdir)/emulparams/pjlelf.sh $(srcdir)/emulparams/pjelf.sh \
+ $(ELF_GEN_DEPS) $(srcdir)/scripttempl/elf.sc ${GEN_DEPENDS}
${GENSCRIPTS} pjlelf "$(tdir_pjlelf)"
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}
+ $(ELF_DEPS) $(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)"
+eppclynx.c: $(srcdir)/emulparams/ppclynx.sh \
+ $(ELF_DEPS) $(srcdir)/scripttempl/elf.sc ${GEN_DEPENDS}
+ ${GENSCRIPTS} ppclynx "$(tdir_ppclynx)"
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)"
+escoreelf.c: $(srcdir)/emulparams/scoreelf.sh \
+ $(srcdir)/emultempl/elf32.em $(srcdir)/emultempl/scoreelf.em \
+ $(srcdir)/scripttempl/elf.sc ${GEN_DEPENDS}
+ ${GENSCRIPTS} scoreelf "$(tdir_scoreelf)"
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}
+ $(ELF_DEPS) $(srcdir)/scripttempl/elf.sc ${GEN_DEPENDS}
${GENSCRIPTS} shelf "$(tdir_shelf)"
eshelf32.c: $(srcdir)/emulparams/shelf32.sh \
$(BFDDIR)/libbfd.h $(INCDIR)/libiberty.h \
$(srcdir)/emultempl/sh64elf.em $(INCDIR)/elf/sh.h $(BFDDIR)/elf-bfd.h \
- $(srcdir)/emultempl/elf32.em $(srcdir)/scripttempl/elf.sc ${GEN_DEPENDS}
+ $(ELF_DEPS) $(srcdir)/scripttempl/elf.sc ${GEN_DEPENDS}
${GENSCRIPTS} shelf32 "$(tdir_shelf32)"
eshelf32_linux.c: $(srcdir)/emulparams/shelf32_linux.sh \
$(srcdir)/emulparams/shelf32.sh \
$(BFDDIR)/libbfd.h $(INCDIR)/libiberty.h \
$(srcdir)/emultempl/sh64elf.em $(INCDIR)/elf/sh.h $(BFDDIR)/elf-bfd.h \
- $(srcdir)/emultempl/elf32.em $(srcdir)/scripttempl/elf.sc ${GEN_DEPENDS}
+ $(ELF_DEPS) $(srcdir)/scripttempl/elf.sc ${GEN_DEPENDS}
${GENSCRIPTS} shelf32_linux "$(tdir_shelf32_linux)"
eshelf32_nbsd.c: $(srcdir)/emulparams/shelf32_nbsd.sh \
$(srcdir)/emulparams/shelf32.sh \
$(BFDDIR)/libbfd.h $(INCDIR)/libiberty.h \
$(srcdir)/emultempl/sh64elf.em $(INCDIR)/elf/sh.h $(BFDDIR)/elf-bfd.h \
- $(srcdir)/emultempl/elf32.em $(srcdir)/scripttempl/elf.sc ${GEN_DEPENDS}
+ $(ELF_DEPS) $(srcdir)/scripttempl/elf.sc ${GEN_DEPENDS}
${GENSCRIPTS} shelf32_nbsd "$(tdir_shelf32_nbsd)"
eshelf64.c: $(srcdir)/emulparams/shelf64.sh $(srcdir)/emulparams/shelf32.sh \
- $(srcdir)/emultempl/elf32.em $(srcdir)/scripttempl/elf.sc ${GEN_DEPENDS}
+ $(ELF_DEPS) $(srcdir)/scripttempl/elf.sc ${GEN_DEPENDS}
${GENSCRIPTS} shelf64 "$(tdir_shelf64)"
eshelf64_nbsd.c: $(srcdir)/emulparams/shelf64_nbsd.sh \
$(srcdir)/emulparams/shelf32_nbsd.sh $(srcdir)/emulparams/shelf32.sh \
- $(srcdir)/emultempl/elf32.em $(srcdir)/scripttempl/elf.sc ${GEN_DEPENDS}
+ $(ELF_DEPS) $(srcdir)/scripttempl/elf.sc ${GEN_DEPENDS}
${GENSCRIPTS} shelf64_nbsd "$(tdir_shelf64_nbsd)"
eshelf_linux.c: $(srcdir)/emulparams/shelf_linux.sh \
$(srcdir)/emulparams/shlelf_linux.sh \
- $(srcdir)/emultempl/elf32.em $(srcdir)/scripttempl/elf.sc ${GEN_DEPENDS}
+ $(ELF_DEPS) $(srcdir)/scripttempl/elf.sc ${GEN_DEPENDS}
${GENSCRIPTS} shelf_linux "$(tdir_shelf_linux)"
eshlelf_linux.c: $(srcdir)/emulparams/shlelf_linux.sh \
- $(srcdir)/emultempl/elf32.em $(srcdir)/scripttempl/elf.sc ${GEN_DEPENDS}
+ $(ELF_DEPS) $(srcdir)/scripttempl/elf.sc ${GEN_DEPENDS}
${GENSCRIPTS} shlelf_linux "$(tdir_shlelf_linux)"
eshelf_nbsd.c: $(srcdir)/emulparams/shelf_nbsd.sh \
$(srcdir)/emulparams/shelf.sh \
- $(srcdir)/emultempl/elf32.em $(srcdir)/scripttempl/elf.sc ${GEN_DEPENDS}
+ $(ELF_DEPS) $(srcdir)/scripttempl/elf.sc ${GEN_DEPENDS}
${GENSCRIPTS} shelf_nbsd "$(tdir_shelf_nbsd)"
eshelf_nto.c: $(srcdir)/emulparams/shelf_nto.sh \
- $(srcdir)/emultempl/elf32.em $(srcdir)/scripttempl/elf.sc ${GEN_DEPENDS}
+ $(ELF_DEPS) $(srcdir)/scripttempl/elf.sc ${GEN_DEPENDS}
${GENSCRIPTS} shelf_nto "$(tdir_shelf_nto)"
+eshelf_vxworks.c: $(srcdir)/emulparams/shelf_vxworks.sh \
+ $(srcdir)/emulparams/vxworks.sh $(ELF_DEPS) $(srcdir)/scripttempl/elf.sc \
+ $(srcdir)/emultempl/vxworks.em ${GEN_DEPENDS}
+ ${GENSCRIPTS} shelf_vxworks "$(tdir_shelf_vxworks)"
eshlelf_nbsd.c: $(srcdir)/emulparams/shlelf_nbsd.sh \
$(srcdir)/emulparams/shelf_nbsd.sh \
$(srcdir)/emulparams/shelf.sh \
- $(srcdir)/emultempl/elf32.em $(srcdir)/scripttempl/elf.sc ${GEN_DEPENDS}
+ $(ELF_DEPS) $(srcdir)/scripttempl/elf.sc ${GEN_DEPENDS}
${GENSCRIPTS} shlelf_nbsd "$(tdir_shlelf_nbsd)"
eshlelf_nto.c: $(srcdir)/emulparams/shlelf_nto.sh \
- $(srcdir)/emultempl/elf32.em $(srcdir)/scripttempl/elf.sc ${GEN_DEPENDS}
+ $(ELF_DEPS) $(srcdir)/scripttempl/elf.sc ${GEN_DEPENDS}
${GENSCRIPTS} shlelf_nto "$(tdir_shlelf_nto)"
+eshlelf_vxworks.c: $(srcdir)/emulparams/shlelf_vxworks.sh \
+ $(srcdir)/emulparams/shelf_vxworks.sh $(srcdir)/emulparams/vxworks.sh \
+ $(ELF_DEPS) $(srcdir)/scripttempl/elf.sc $(srcdir)/emultempl/vxworks.em \
+ ${GEN_DEPENDS}
+ ${GENSCRIPTS} shlelf_vxworks "$(tdir_shlelf_vxworks)"
+eshelf_uclinux.c: $(srcdir)/emulparams/shelf_uclinux.sh \
+ $(srcdir)/emultempl/elf32.em $(srcdir)/scripttempl/elf.sc ${GEN_DEPENDS}
+ ${GENSCRIPTS} shelf_uclinux "$(tdir_shelf_uclinux)"
eshlelf.c: $(srcdir)/emulparams/shlelf.sh \
$(srcdir)/emulparams/shelf.sh \
- $(srcdir)/emultempl/elf32.em $(srcdir)/scripttempl/elf.sc ${GEN_DEPENDS}
+ $(ELF_DEPS) $(srcdir)/scripttempl/elf.sc ${GEN_DEPENDS}
${GENSCRIPTS} shlelf "$(tdir_shlelf)"
+eshlsymbian.c: $(srcdir)/emulparams/shlsymbian.sh \
+ $(srcdir)/emulparams/shelf.sh \
+ $(ELF_DEPS) $(srcdir)/scripttempl/elf32sh-symbian.sc ${GEN_DEPENDS}
+ ${GENSCRIPTS} shlsymbian "$(tdir_shlelf)"
eshlelf32.c: $(srcdir)/emulparams/shlelf32.sh \
$(BFDDIR)/libbfd.h $(INCDIR)/libiberty.h $(srcdir)/emulparams/shelf32.sh \
$(srcdir)/emultempl/sh64elf.em $(INCDIR)/elf/sh.h $(BFDDIR)/elf-bfd.h \
- $(srcdir)/emultempl/elf32.em $(srcdir)/scripttempl/elf.sc ${GEN_DEPENDS}
+ $(ELF_DEPS) $(srcdir)/scripttempl/elf.sc ${GEN_DEPENDS}
${GENSCRIPTS} shlelf32 "$(tdir_shlelf32)"
eshlelf32_linux.c: $(srcdir)/emulparams/shlelf32_linux.sh \
$(srcdir)/emulparams/shelf32_linux.sh $(srcdir)/emulparams/shelf32.sh \
$(BFDDIR)/libbfd.h $(INCDIR)/libiberty.h \
$(srcdir)/emultempl/sh64elf.em $(INCDIR)/elf/sh.h $(BFDDIR)/elf-bfd.h \
- $(srcdir)/emultempl/elf32.em $(srcdir)/scripttempl/elf.sc ${GEN_DEPENDS}
+ $(ELF_DEPS) $(srcdir)/scripttempl/elf.sc ${GEN_DEPENDS}
${GENSCRIPTS} shlelf32_linux "$(tdir_shlelf32_linux)"
eshlelf32_nbsd.c: $(srcdir)/emulparams/shlelf32_nbsd.sh \
$(srcdir)/emulparams/shelf32_nbsd.sh $(srcdir)/emulparams/shelf32.sh \
$(BFDDIR)/libbfd.h $(INCDIR)/libiberty.h \
$(srcdir)/emultempl/sh64elf.em $(INCDIR)/elf/sh.h $(BFDDIR)/elf-bfd.h \
- $(srcdir)/emultempl/elf32.em $(srcdir)/scripttempl/elf.sc ${GEN_DEPENDS}
+ $(ELF_DEPS) $(srcdir)/scripttempl/elf.sc ${GEN_DEPENDS}
${GENSCRIPTS} shlelf32_nbsd "$(tdir_shlelf32_nbsd)"
eshlelf64.c: $(srcdir)/emulparams/shlelf64.sh \
$(srcdir)/emulparams/shelf64.sh $(srcdir)/emulparams/shelf32.sh \
- $(srcdir)/emultempl/elf32.em $(srcdir)/scripttempl/elf.sc ${GEN_DEPENDS}
+ $(ELF_DEPS) $(srcdir)/scripttempl/elf.sc ${GEN_DEPENDS}
${GENSCRIPTS} shlelf64 "$(tdir_shlelf64)"
eshlelf64_nbsd.c: $(srcdir)/emulparams/shlelf64_nbsd.sh \
$(srcdir)/emulparams/shelf64_nbsd.sh \
$(srcdir)/emulparams/shelf32_nbsd.sh $(srcdir)/emulparams/shelf32.sh \
- $(srcdir)/emultempl/elf32.em $(srcdir)/scripttempl/elf.sc ${GEN_DEPENDS}
+ $(ELF_DEPS) $(srcdir)/scripttempl/elf.sc ${GEN_DEPENDS}
${GENSCRIPTS} shlelf64_nbsd "$(tdir_shlelf64_nbsd)"
eshl.c: $(srcdir)/emulparams/shl.sh \
$(srcdir)/emulparams/sh.sh \
@@ -2109,9 +2462,6 @@ esparcaout.c: $(srcdir)/emulparams/sparcaout.sh \
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)"
@@ -2158,21 +2508,21 @@ 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}
+ $(ELF_DEPS) $(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)"
+ez80.c: $(srcdir)/emulparams/z80.sh \
+ $(srcdir)/emultempl/generic.em $(srcdir)/emultempl/z80.em \
+ $(srcdir)/scripttempl/z80.sc ${GEN_DEPENDS}
+ ${GENSCRIPTS} z80 "$(tdir_z80)"
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)"
-eelf32frvfd.c: $(srcdir)/emulparams/elf32frvfd.sh \
- $(srcdir)/emulparams/elf32frv.sh \
- $(srcdir)/emultempl/elf32.em $(srcdir)/scripttempl/elf.sc ${GEN_DEPENDS}
- ${GENSCRIPTS} elf32frvfd "$(tdir_frv)"
# The generated emulation files mostly have the same dependencies.
$(EMULATION_OFILES): ../bfd/bfd.h sysdep.h config.h $(INCDIR)/bfdlink.h \
@@ -2184,10 +2534,6 @@ check-DEJAGNU: site.exp
r=`pwd`; export r; \
LC_COLLATE=; LC_ALL=; LANG=; export LC_COLLATE LC_ALL LANG; \
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 \
@@ -2195,7 +2541,7 @@ check-DEJAGNU: site.exp
CXX="$(CXX_FOR_TARGET)" CXXFLAGS="$(CXXFLAGS)" \
CC_FOR_HOST="$(CC)" CFLAGS_FOR_HOST="$(CFLAGS)" \
OFILES="$(OFILES)" BFDLIB="$(TESTBFDLIB)" \
- LIBIBERTY="$(LIBIBERTY) $(INTLLIBS)" LIBS="$(LIBS)" \
+ LIBIBERTY="$(LIBIBERTY) $(LIBINTL)" LIBS="$(LIBS)" \
$(RUNTESTFLAGS); \
else echo "WARNING: could not find \`runtest'" 1>&2; :;\
fi
@@ -2259,26 +2605,13 @@ bootstrap: ld3$(EXEEXT)
# 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
-
-ldver.texi: Makefile
- rm -f $@
- echo '@set VERSION $(VERSION)' > $@
-
-ld.info: $(srcdir)/ld.texinfo configdoc.texi ldver.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 ldver.texi
- TEXINPUTS=$(top_srcdir)/../texinfo:$$TEXINPUTS \
- MAKEINFO="$(MAKEINFO) -I $(srcdir) -I $(BFDDIR)/doc" $(TEXI2DVI) -I $(BFDDIR)/doc $(srcdir)/ld.texinfo
+ cp ${srcdir}/${DOCVER}-doc.texi ./configdoc.texi
+ chmod u+w ./configdoc.texi
# Build the man page from the texinfo file
# The sed command removes the no-adjust Nroff command so that
# the man output looks standard.
-ld.1: $(srcdir)/ld.texinfo configdoc.texi ldver.texi
+ld.1: $(srcdir)/ld.texinfo configdoc.texi
touch $@
-$(TEXI2POD) $(MANCONF) < $(srcdir)/ld.texinfo > ld.pod
-($(POD2MAN) ld.pod | \
@@ -2289,6 +2622,52 @@ ld.1: $(srcdir)/ld.texinfo configdoc.texi ldver.texi
mostlyclean-local:
-rm -rf tmpdir
+.PHONY: install-html install-html-am install-html-recursive
+
+install-html: install-html-recursive install-html-am
+
+install-html-am: $(HTMLS)
+ @$(NORMAL_INSTALL)
+ test -z "$(htmldir)" || $(mkdir_p) "$(DESTDIR)$(htmldir)"
+ @list='$(HTMLS)'; for p in $$list; do \
+ if test -f "$$p" || test -d "$$p"; then d=""; else d="$(srcdir)/"; fi; \
+ f=$(html__strip_dir) \
+ if test -d "$$d$$p"; then \
+ echo " $(mkdir_p) '$(DESTDIR)$(htmldir)/$$f'"; \
+ $(mkdir_p) "$(DESTDIR)$(htmldir)/$$f" || exit 1; \
+ echo " $(INSTALL_DATA) '$$d$$p'/* '$(DESTDIR)$(htmldir)/$$f'"; \
+ $(INSTALL_DATA) "$$d$$p"/* "$(DESTDIR)$(htmldir)/$$f"; \
+ else \
+ echo " $(INSTALL_DATA) '$$d$$p' '$(DESTDIR)$(htmldir)/$$f'"; \
+ $(INSTALL_DATA) "$$d$$p" "$(DESTDIR)$(htmldir)/$$f"; \
+ fi; \
+ done
+
+install-html-recursive:
+ @failcom='exit 1'; \
+ for f in x $$MAKEFLAGS; do \
+ case $$f in \
+ *=* | --[!k]*);; \
+ *k*) failcom='fail=yes';; \
+ esac; \
+ done; \
+ dot_seen=no; \
+ target=`echo $@ | sed s/-recursive//`; \
+ list='$(SUBDIRS)'; for subdir in $$list; do \
+ echo "Making $$target in $$subdir"; \
+ if test "$$subdir" = "."; then \
+ dot_seen=yes; \
+ local_target="$$target-am"; \
+ else \
+ local_target="$$target"; \
+ fi; \
+ (cd $$subdir && $(MAKE) $(AM_MAKEFLAGS) $$local_target) \
+ || eval $$failcom; \
+ done; \
+ if test "$$dot_seen" = "no"; then \
+ $(MAKE) $(AM_MAKEFLAGS) "$$target-am" || exit 1; \
+ fi; test -z "$$fail"
+
.PHONY: install-exec-local install-data-local
install-exec-local: ld-new$(EXEEXT)
@@ -2314,13 +2693,17 @@ install-data-local:
# We want install to imply install-info as per GNU standards, despite the
# cygnus option.
-install: install-info
+install-data-local: install-info
diststuff: info $(EXTRA_DIST)
+all: info ld.1
+
+# Both info (ld.info) and ld.1 depend on configdoc.texi.
+# But info isn't a direct target. Make info-recursive to depend on
+# ld.1 to support parallel build.
+info-recursive: ld.1
distclean-local:
rm -rf ldscripts
-Makefile: $(BFDDIR)/configure.in
-
# 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
@@ -2364,113 +2747,100 @@ dep-am: DEP
.PHONY: dep dep-in dep-am
-@MAINT@.PHONY: mpw
-@MAINT@mpw: $(srcdir)/mpw-ei386go32.c $(srcdir)/mpw-elfmips.c \
-@MAINT@ $(srcdir)/mpw-em68kcoff.c $(srcdir)/mpw-eppcmac.c \
-@MAINT@ $(srcdir)/mpw-esh.c $(srcdir)/mpw-idtmips.c
-@MAINT@
-@MAINT@$(srcdir)/mpw-ei386go32.c: ei386go32.c
-@MAINT@ $(srcdir)/../move-if-change $< $@
-@MAINT@
-@MAINT@$(srcdir)/mpw-elfmips.c: eelf32ebmip.c
-@MAINT@ $(srcdir)/../move-if-change $< $@
-@MAINT@
-@MAINT@$(srcdir)/mpw-em68kcoff.c: em68kcoff.c
-@MAINT@ $(srcdir)/../move-if-change $< $@
-@MAINT@
-@MAINT@$(srcdir)/mpw-eppcmac.c: eppcmacos.c
-@MAINT@ $(srcdir)/../move-if-change $< $@
-@MAINT@
-@MAINT@$(srcdir)/mpw-esh.c: esh.c
-@MAINT@ $(srcdir)/../move-if-change $< $@
-@MAINT@
-@MAINT@$(srcdir)/mpw-idtmips.c: emipsidt.c
-@MAINT@ $(srcdir)/../move-if-change $< $@
-
# 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 \
- $(INCDIR)/symcat.h sysdep.h config.h $(INCDIR)/fopen-same.h \
- $(INCDIR)/bfdlink.h $(INCDIR)/safe-ctype.h ld.h $(INCDIR)/bin-bugs.h \
- ldexp.h ldlang.h ldmisc.h ldgram.h ldmain.h ldctor.h
-ldemul.o: ldemul.c ../bfd/bfd.h $(INCDIR)/ansidecl.h \
- $(INCDIR)/symcat.h sysdep.h config.h $(INCDIR)/fopen-same.h \
- ld.h $(INCDIR)/bin-bugs.h ldmisc.h ldexp.h ldlang.h \
+ldctor.o: ldctor.c sysdep.h config.h $(INCDIR)/fopen-same.h \
+ ../bfd/bfd.h $(INCDIR)/ansidecl.h $(INCDIR)/symcat.h \
+ $(INCDIR)/bfdlink.h $(INCDIR)/safe-ctype.h ld.h ldexp.h \
+ ldlang.h ldmisc.h ldgram.h ldmain.h ldctor.h
+ldemul.o: ldemul.c sysdep.h config.h $(INCDIR)/fopen-same.h \
+ ../bfd/bfd.h $(INCDIR)/ansidecl.h $(INCDIR)/symcat.h \
+ $(INCDIR)/bfdlink.h ld.h ldmisc.h ldexp.h ldlang.h \
ldfile.h ldemul.h ldmain.h ldemul-list.h
-ldexp.o: ldexp.c ../bfd/bfd.h $(INCDIR)/ansidecl.h \
- $(INCDIR)/symcat.h sysdep.h config.h $(INCDIR)/fopen-same.h \
- $(INCDIR)/bfdlink.h ld.h $(INCDIR)/bin-bugs.h ldmain.h \
- ldmisc.h ldexp.h ldgram.h ldlang.h $(INCDIR)/libiberty.h \
+ldexp.o: ldexp.c sysdep.h config.h $(INCDIR)/fopen-same.h \
+ ../bfd/bfd.h $(INCDIR)/ansidecl.h $(INCDIR)/symcat.h \
+ $(INCDIR)/bfdlink.h ld.h ldmain.h ldmisc.h ldexp.h \
+ ldlex.h ldgram.h ldlang.h $(INCDIR)/libiberty.h $(INCDIR)/ansidecl.h \
$(INCDIR)/safe-ctype.h
-ldfile.o: ldfile.c ../bfd/bfd.h $(INCDIR)/ansidecl.h \
- $(INCDIR)/symcat.h sysdep.h config.h $(INCDIR)/fopen-same.h \
- $(INCDIR)/bfdlink.h $(INCDIR)/safe-ctype.h ld.h $(INCDIR)/bin-bugs.h \
- ldmisc.h ldexp.h ldlang.h ldfile.h ldmain.h ldgram.h \
- ldlex.h ldemul.h $(INCDIR)/libiberty.h $(INCDIR)/filenames.h
-ldlang.o: ldlang.c ../bfd/bfd.h $(INCDIR)/ansidecl.h \
- $(INCDIR)/symcat.h sysdep.h config.h $(INCDIR)/fopen-same.h \
- $(INCDIR)/libiberty.h $(INCDIR)/safe-ctype.h $(INCDIR)/obstack.h \
- $(INCDIR)/bfdlink.h ld.h $(INCDIR)/bin-bugs.h ldmain.h \
+ldfile.o: ldfile.c sysdep.h config.h $(INCDIR)/fopen-same.h \
+ ../bfd/bfd.h $(INCDIR)/ansidecl.h $(INCDIR)/symcat.h \
+ $(INCDIR)/bfdlink.h $(INCDIR)/safe-ctype.h ld.h ldmisc.h \
+ ldexp.h ldlang.h ldfile.h ldmain.h ldgram.h ldlex.h \
+ ldemul.h $(INCDIR)/libiberty.h $(INCDIR)/ansidecl.h \
+ $(INCDIR)/filenames.h
+ldlang.o: ldlang.c sysdep.h config.h $(INCDIR)/fopen-same.h \
+ ../bfd/bfd.h $(INCDIR)/ansidecl.h $(INCDIR)/symcat.h \
+ $(INCDIR)/libiberty.h $(INCDIR)/ansidecl.h $(INCDIR)/safe-ctype.h \
+ $(INCDIR)/obstack.h $(INCDIR)/bfdlink.h ld.h ldmain.h \
ldexp.h ldlang.h ldgram.h ldlex.h ldmisc.h ldctor.h \
ldfile.h ldemul.h $(INCDIR)/fnmatch.h $(INCDIR)/demangle.h \
- $(INCDIR)/hashtab.h
-ldmain.o: ldmain.c ../bfd/bfd.h $(INCDIR)/ansidecl.h \
- $(INCDIR)/symcat.h sysdep.h config.h $(INCDIR)/fopen-same.h \
- $(INCDIR)/safe-ctype.h $(INCDIR)/libiberty.h $(INCDIR)/progress.h \
- $(INCDIR)/bfdlink.h $(INCDIR)/filenames.h ld.h $(INCDIR)/bin-bugs.h \
- ldmain.h ldmisc.h ldwrite.h ldexp.h ldlang.h ldgram.h \
+ $(INCDIR)/libiberty.h $(INCDIR)/hashtab.h
+ldmain.o: ldmain.c sysdep.h config.h $(INCDIR)/fopen-same.h \
+ ../bfd/bfd.h $(INCDIR)/ansidecl.h $(INCDIR)/symcat.h \
+ $(INCDIR)/safe-ctype.h $(INCDIR)/libiberty.h $(INCDIR)/ansidecl.h \
+ $(INCDIR)/progress.h $(INCDIR)/bfdlink.h $(INCDIR)/filenames.h \
+ ld.h ldmain.h ldmisc.h ldwrite.h ldexp.h ldlang.h ldgram.h \
ldlex.h ldfile.h ldemul.h ldctor.h
-ldmisc.o: ldmisc.c ../bfd/bfd.h $(INCDIR)/ansidecl.h \
- $(INCDIR)/symcat.h $(INCDIR)/bfdlink.h sysdep.h config.h \
- $(INCDIR)/fopen-same.h $(INCDIR)/libiberty.h $(INCDIR)/demangle.h \
- ld.h $(INCDIR)/bin-bugs.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 \
- $(INCDIR)/symcat.h ../bfd/bfdver.h sysdep.h config.h \
- $(INCDIR)/fopen-same.h ld.h $(INCDIR)/bin-bugs.h ldver.h \
- ldexp.h ldlang.h ldfile.h ldemul.h ldmain.h
-ldwrite.o: ldwrite.c ../bfd/bfd.h $(INCDIR)/ansidecl.h \
- $(INCDIR)/symcat.h sysdep.h config.h $(INCDIR)/fopen-same.h \
- $(INCDIR)/bfdlink.h $(INCDIR)/libiberty.h $(INCDIR)/safe-ctype.h \
- ld.h $(INCDIR)/bin-bugs.h ldexp.h ldlang.h ldwrite.h \
+ldmisc.o: ldmisc.c sysdep.h config.h $(INCDIR)/fopen-same.h \
+ ../bfd/bfd.h $(INCDIR)/ansidecl.h $(INCDIR)/symcat.h \
+ $(INCDIR)/bfdlink.h $(INCDIR)/libiberty.h $(INCDIR)/ansidecl.h \
+ $(INCDIR)/demangle.h $(INCDIR)/libiberty.h ld.h ldmisc.h \
+ ldexp.h ldlang.h ldgram.h ldlex.h ldmain.h ldfile.h \
+ $(BFDDIR)/elf-bfd.h $(INCDIR)/elf/common.h $(INCDIR)/elf/internal.h \
+ $(INCDIR)/elf/external.h $(INCDIR)/bfdlink.h
+ldver.o: ldver.c sysdep.h config.h $(INCDIR)/fopen-same.h \
+ ../bfd/bfd.h $(INCDIR)/ansidecl.h $(INCDIR)/symcat.h \
+ ../bfd/bfdver.h ld.h ldver.h ldexp.h ldlang.h ldfile.h \
+ ldemul.h ldmain.h
+ldwrite.o: ldwrite.c sysdep.h config.h $(INCDIR)/fopen-same.h \
+ ../bfd/bfd.h $(INCDIR)/ansidecl.h $(INCDIR)/symcat.h \
+ $(INCDIR)/bfdlink.h $(INCDIR)/libiberty.h $(INCDIR)/ansidecl.h \
+ $(INCDIR)/safe-ctype.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 \
- $(INCDIR)/symcat.h sysdep.h config.h $(INCDIR)/fopen-same.h \
- $(INCDIR)/libiberty.h $(INCDIR)/safe-ctype.h $(INCDIR)/bfdlink.h \
- ld.h $(INCDIR)/bin-bugs.h ldmain.h ldmisc.h ldexp.h \
- ldlang.h ldgram.h ldlex.h ldfile.h ldver.h ldemul.h \
- $(INCDIR)/demangle.h
-mri.o: mri.c ../bfd/bfd.h $(INCDIR)/ansidecl.h $(INCDIR)/symcat.h \
- sysdep.h config.h $(INCDIR)/fopen-same.h ld.h $(INCDIR)/bin-bugs.h \
- ldexp.h ldlang.h ldmisc.h mri.h ldgram.h $(INCDIR)/libiberty.h
-ldcref.o: ldcref.c ../bfd/bfd.h $(INCDIR)/ansidecl.h \
- $(INCDIR)/symcat.h sysdep.h config.h $(INCDIR)/fopen-same.h \
- $(INCDIR)/bfdlink.h $(INCDIR)/libiberty.h ld.h $(INCDIR)/bin-bugs.h \
- ldmain.h ldmisc.h ldexp.h ldlang.h
-pe-dll.o: pe-dll.c ../bfd/bfd.h $(INCDIR)/ansidecl.h \
- $(INCDIR)/symcat.h sysdep.h config.h $(INCDIR)/fopen-same.h \
- $(INCDIR)/bfdlink.h $(INCDIR)/libiberty.h $(INCDIR)/safe-ctype.h \
- ld.h $(INCDIR)/bin-bugs.h ldexp.h ldlang.h ldwrite.h \
+lexsup.o: lexsup.c sysdep.h config.h $(INCDIR)/fopen-same.h \
+ ../bfd/bfd.h $(INCDIR)/ansidecl.h $(INCDIR)/symcat.h \
+ ../bfd/bfdver.h $(INCDIR)/libiberty.h $(INCDIR)/ansidecl.h \
+ $(INCDIR)/safe-ctype.h $(INCDIR)/bfdlink.h ld.h ldmain.h \
+ ldmisc.h ldexp.h ldlang.h ldgram.h ldlex.h ldfile.h \
+ ldver.h ldemul.h $(INCDIR)/demangle.h $(INCDIR)/libiberty.h
+mri.o: mri.c sysdep.h config.h $(INCDIR)/fopen-same.h \
+ ../bfd/bfd.h $(INCDIR)/ansidecl.h $(INCDIR)/symcat.h \
+ ld.h ldexp.h ldlang.h ldmisc.h mri.h ldgram.h $(INCDIR)/libiberty.h \
+ $(INCDIR)/ansidecl.h
+ldcref.o: ldcref.c sysdep.h config.h $(INCDIR)/fopen-same.h \
+ ../bfd/bfd.h $(INCDIR)/ansidecl.h $(INCDIR)/symcat.h \
+ $(INCDIR)/bfdlink.h $(INCDIR)/libiberty.h $(INCDIR)/ansidecl.h \
+ $(INCDIR)/demangle.h $(INCDIR)/libiberty.h $(INCDIR)/objalloc.h \
+ ld.h ldmain.h ldmisc.h ldexp.h ldlang.h
+pe-dll.o: pe-dll.c sysdep.h config.h $(INCDIR)/fopen-same.h \
+ ../bfd/bfd.h $(INCDIR)/ansidecl.h $(INCDIR)/symcat.h \
+ $(INCDIR)/bfdlink.h $(INCDIR)/libiberty.h $(INCDIR)/ansidecl.h \
+ $(INCDIR)/safe-ctype.h ld.h ldexp.h ldlang.h ldwrite.h \
ldmisc.h ldgram.h ldmain.h ldfile.h ldemul.h $(INCDIR)/coff/internal.h \
- $(BFDDIR)/libcoff.h deffile.h pe-dll.h
-ldgram.o: ldgram.c ../bfd/bfd.h $(INCDIR)/ansidecl.h \
- $(INCDIR)/symcat.h sysdep.h config.h $(INCDIR)/fopen-same.h \
- $(INCDIR)/bfdlink.h ld.h $(INCDIR)/bin-bugs.h ldexp.h \
- ldver.h ldlang.h ldfile.h ldemul.h ldmisc.h ldmain.h \
- mri.h ldctor.h ldlex.h
-ldlex.o: ldlex.c ../bfd/bfd.h $(INCDIR)/ansidecl.h \
- $(INCDIR)/symcat.h sysdep.h config.h $(INCDIR)/fopen-same.h \
- $(INCDIR)/safe-ctype.h $(INCDIR)/bfdlink.h ld.h $(INCDIR)/bin-bugs.h \
- ldmisc.h ldexp.h ldlang.h ldgram.h ldfile.h ldlex.h \
- ldmain.h $(INCDIR)/libiberty.h
-deffilep.o: deffilep.c $(INCDIR)/libiberty.h $(INCDIR)/ansidecl.h \
- $(INCDIR)/safe-ctype.h ../bfd/bfd.h $(INCDIR)/symcat.h \
- sysdep.h config.h $(INCDIR)/fopen-same.h ld.h $(INCDIR)/bin-bugs.h \
- ldmisc.h deffile.h
+ $(BFDDIR)/libcoff.h $(INCDIR)/bfdlink.h deffile.h pe-dll.h
+pep-dll.o: pep-dll.c pe-dll.c sysdep.h config.h $(INCDIR)/fopen-same.h \
+ ../bfd/bfd.h $(INCDIR)/ansidecl.h $(INCDIR)/symcat.h \
+ $(INCDIR)/bfdlink.h $(INCDIR)/libiberty.h $(INCDIR)/ansidecl.h \
+ $(INCDIR)/safe-ctype.h ld.h ldexp.h ldlang.h ldwrite.h \
+ ldmisc.h ldgram.h ldmain.h ldfile.h ldemul.h $(INCDIR)/coff/internal.h \
+ $(BFDDIR)/libcoff.h $(INCDIR)/bfdlink.h deffile.h pe-dll.h \
+ pep-dll.h
+ldgram.o: ldgram.c sysdep.h config.h $(INCDIR)/fopen-same.h \
+ ../bfd/bfd.h $(INCDIR)/ansidecl.h $(INCDIR)/symcat.h \
+ $(INCDIR)/bfdlink.h ld.h ldexp.h ldver.h ldlang.h ldfile.h \
+ ldemul.h ldmisc.h ldmain.h mri.h ldctor.h ldlex.h
+ldlex.o: ldlex.c sysdep.h config.h $(INCDIR)/fopen-same.h \
+ ../bfd/bfd.h $(INCDIR)/ansidecl.h $(INCDIR)/symcat.h \
+ $(INCDIR)/safe-ctype.h $(INCDIR)/bfdlink.h ld.h ldmisc.h \
+ ldexp.h ldlang.h ldgram.h ldfile.h ldlex.h ldmain.h \
+ $(INCDIR)/libiberty.h $(INCDIR)/ansidecl.h
+deffilep.o: deffilep.c sysdep.h config.h $(INCDIR)/fopen-same.h \
+ $(INCDIR)/libiberty.h $(INCDIR)/ansidecl.h $(INCDIR)/safe-ctype.h \
+ ../bfd/bfd.h $(INCDIR)/ansidecl.h $(INCDIR)/symcat.h \
+ ld.h ldmisc.h deffile.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 81512c4..5de0b5d 100644
--- a/contrib/binutils/ld/NEWS
+++ b/contrib/binutils/ld/NEWS
@@ -1,4 +1,114 @@
-*- text -*-
+* Added support for National Semicondutor CompactRISC (ie CR16) target.
+
+* -l:foo now searches the library path for a filename called foo,
+ without converting it to libfoo.a or libfoo.so.
+
+* Add a new command line option '--default-script=FILE' or '-dT FILE'
+ which specifies a replacement for the built in, default linker
+ script.
+
+* ELF: Add -Bsymbolic-functions, --dynamic-list-cpp-new, which puts C++
+ operator new and delete on the dynamic list, and --dynamic-list-data,
+ builtin list for --dynamic-list, which puts global data symbols on the
+ dynamic list.
+
+* Add support for x86_64 PE+ target.
+
+* Add support for Score target.
+
+* ELF: Add --dynamic-list option to specify a list of global symbols
+ whose references shouldn't be bound to the definition within the
+ shared library, or a list of symbols which should be added to the
+ symbol table in the executable.
+
+* The default output section LMA has changed for allocatable sections from
+ being equal to VMA, to keeping the difference between LMA and VMA the same as
+ the previous output section in the same region. This is a more useful
+ default when using overlays and other cases where you specify an LMA
+ differing from the VMA for some sections.
+
+* New switch: --print-gc-sections to list any sections removed by garabge
+ collection.
+
+* ARM: Added --vfp11-denorm-fix option to work around an erratum in current
+VFP11 coprocessors.
+
+Changes in 2.17:
+
+* Support for the Infineon XC16X has been added by KPIT Cummins Infosystems.
+
+* Modify the Linux linker search order to better match ld.so search order.
+ Look for DT_NEEDED libraries in paths specified by ld.so.conf before
+ searching the default directories, rather than vice versa.
+ Use $prefix/etc/ld.so.conf if it exists, otherwise /etc/ld.so.conf.
+
+* PE-COFF: Forward exports from DLL's can now be specified in .def files
+ passed directly to ld.
+
+* Support for the Z80 processor family has been added.
+
+* Add support for the "@<file>" syntax to the command line, so that extra
+ switches can be read from <file>.
+
+Changes in 2.16:
+
+* Support for the R_ARM_V4BX relocation as defined in the ARM AAELF
+ specification has been added via the --fix-v4bx command-line option.
+
+* New linker script construct AS_NEEDED(), which sets the --as-needed flag
+ for input files listed inside of it.
+
+* A new command-line option, --sysroot, can be used to override the
+ default sysroot location. It only applies to toolchains that were
+ configured using --with-sysroot.
+
+* New linker script functions: ORIGIN() and LENGTH() which return information
+ about a specified memory region.
+
+* Port to MAXQ processor contributed by HCL Tech.
+
+* Added SEGMENT_START to the linker script language to permit the user to
+ override the base address for a segment from the command-line.
+
+* ELF: --warn-shared-textrel option to warn if adding a DT_TEXTREL to a shared
+ object.
+
+* Added SORT_BY_NAME and SORT_BY_ALIGNMENT to the linker script
+ language to permit sorting sections by section name or section
+ maximum alignment.
+
+* Added a new linker command line switch, --sort-section name|alignment,
+ to sort sections by section name or maximum alignment.
+
+* ELF: --add-needed/--no-add-needed options to control if a DT_NEEDED tag
+ should be added when a shared library comes from DT_NEEDED tags.
+
+* Support for the crx-elf target added.
+
+* Support for the sh-symbianelf target added.
+
+* A new linker command line switch has been added which allows the hash table
+ size to be set to a suitable prime value near to its argument. This switch
+ is --hash-size=<NUMBER>. Also if the switch --reduce-memory-overheads is
+ used, and --hash-size has not been used, then the default value will be set
+ to 1021.
+
+* Linker map files are now generated with an O(N) algorithm for finding symbols
+ that are defined in each section. This uses about 40% more memory for
+ symbols than the old O(N^2) algorithm. You can use the new
+ --reduce-memory-overheads option to select the old algorithm; this option
+ might also be used in the future to select similar tradeoffs.
+
+Changes in 2.15:
+
+* ELF: --as-needed/--no-as-needed options to control if a DT_NEEDED tag should
+ be added only when a shared library is referenced.
+
+* PE: --large-address-aware option to indicate executables support virtual
+ addresses greater than 2 gigabytes.
+
+* DWARF 2 support for i386pe added.
* The linker script operator DEFINED() will now yield 1 only for a symbol that
is defined before the statement where DEFINED is used.
@@ -6,6 +116,8 @@
* The MIPS --embedded-relocs (used to embed relocations into binaries for
Embedded-PIC code) is deprecated and will be removed in a future release.
+* cr16c support added by NSC.
+
* m32r Linux (ELF) support added by Renesas.
* Improved linker's handling of unresolved symbols. The switch
diff --git a/contrib/binutils/ld/acinclude.m4 b/contrib/binutils/ld/acinclude.m4
deleted file mode 100644
index 403aa0e..0000000
--- a/contrib/binutils/ld/acinclude.m4
+++ /dev/null
@@ -1,16 +0,0 @@
-sinclude(../bfd/acinclude.m4)
-
-dnl sinclude(../libtool.m4) already included in bfd/acinclude.m4
-dnl The lines below arrange for aclocal not to bring libtool.m4
-dnl AM_PROG_LIBTOOL into aclocal.m4, while still arranging for automake
-dnl to add a definition of LIBTOOL to Makefile.in.
-ifelse(yes,no,[
-AC_DEFUN([AM_PROG_LIBTOOL],)
-AC_SUBST(LIBTOOL)
-])
-
-dnl sinclude(../gettext.m4) already included in bfd/acinclude.m4
-ifelse(yes,no,[
-AC_DEFUN([CY_WITH_NLS],)
-AC_SUBST(INTLLIBS)
-])
diff --git a/contrib/binutils/ld/aclocal.m4 b/contrib/binutils/ld/aclocal.m4
index 7b50bb9..ef6a062 100644
--- a/contrib/binutils/ld/aclocal.m4
+++ b/contrib/binutils/ld/aclocal.m4
@@ -1,105 +1,750 @@
-dnl aclocal.m4 generated automatically by aclocal 1.4-p5
-
-dnl Copyright (C) 1994, 1995-8, 1999, 2001 Free Software Foundation, Inc.
-dnl This file 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)
-
-dnl sinclude(../libtool.m4) already included in bfd/acinclude.m4
-dnl The lines below arrange for aclocal not to bring libtool.m4
-dnl AM_PROG_LIBTOOL into aclocal.m4, while still arranging for automake
-dnl to add a definition of LIBTOOL to Makefile.in.
-ifelse(yes,no,[
-AC_DEFUN([AM_PROG_LIBTOOL],)
-AC_SUBST(LIBTOOL)
+# generated automatically by aclocal 1.9.6 -*- Autoconf -*-
+
+# Copyright (C) 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004,
+# 2005 Free Software Foundation, Inc.
+# This file 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 distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY, to the extent permitted by law; without
+# even the implied warranty of MERCHANTABILITY or FITNESS FOR A
+# PARTICULAR PURPOSE.
+
+# Copyright (C) 2002, 2003, 2005 Free Software Foundation, Inc.
+#
+# This file 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.
+
+# AM_AUTOMAKE_VERSION(VERSION)
+# ----------------------------
+# Automake X.Y traces this macro to ensure aclocal.m4 has been
+# generated from the m4 files accompanying Automake X.Y.
+AC_DEFUN([AM_AUTOMAKE_VERSION], [am__api_version="1.9"])
+
+# AM_SET_CURRENT_AUTOMAKE_VERSION
+# -------------------------------
+# Call AM_AUTOMAKE_VERSION so it can be traced.
+# This function is AC_REQUIREd by AC_INIT_AUTOMAKE.
+AC_DEFUN([AM_SET_CURRENT_AUTOMAKE_VERSION],
+ [AM_AUTOMAKE_VERSION([1.9.6])])
+
+# AM_AUX_DIR_EXPAND -*- Autoconf -*-
+
+# Copyright (C) 2001, 2003, 2005 Free Software Foundation, Inc.
+#
+# This file 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.
+
+# For projects using AC_CONFIG_AUX_DIR([foo]), Autoconf sets
+# $ac_aux_dir to `$srcdir/foo'. In other projects, it is set to
+# `$srcdir', `$srcdir/..', or `$srcdir/../..'.
+#
+# Of course, Automake must honor this variable whenever it calls a
+# tool from the auxiliary directory. The problem is that $srcdir (and
+# therefore $ac_aux_dir as well) can be either absolute or relative,
+# depending on how configure is run. This is pretty annoying, since
+# it makes $ac_aux_dir quite unusable in subdirectories: in the top
+# source directory, any form will work fine, but in subdirectories a
+# relative path needs to be adjusted first.
+#
+# $ac_aux_dir/missing
+# fails when called from a subdirectory if $ac_aux_dir is relative
+# $top_srcdir/$ac_aux_dir/missing
+# fails if $ac_aux_dir is absolute,
+# fails when called from a subdirectory in a VPATH build with
+# a relative $ac_aux_dir
+#
+# The reason of the latter failure is that $top_srcdir and $ac_aux_dir
+# are both prefixed by $srcdir. In an in-source build this is usually
+# harmless because $srcdir is `.', but things will broke when you
+# start a VPATH build or use an absolute $srcdir.
+#
+# So we could use something similar to $top_srcdir/$ac_aux_dir/missing,
+# iff we strip the leading $srcdir from $ac_aux_dir. That would be:
+# am_aux_dir='\$(top_srcdir)/'`expr "$ac_aux_dir" : "$srcdir//*\(.*\)"`
+# and then we would define $MISSING as
+# MISSING="\${SHELL} $am_aux_dir/missing"
+# This will work as long as MISSING is not called from configure, because
+# unfortunately $(top_srcdir) has no meaning in configure.
+# However there are other variables, like CC, which are often used in
+# configure, and could therefore not use this "fixed" $ac_aux_dir.
+#
+# Another solution, used here, is to always expand $ac_aux_dir to an
+# absolute PATH. The drawback is that using absolute paths prevent a
+# configured tree to be moved without reconfiguration.
+
+AC_DEFUN([AM_AUX_DIR_EXPAND],
+[dnl Rely on autoconf to set up CDPATH properly.
+AC_PREREQ([2.50])dnl
+# expand $ac_aux_dir to an absolute path
+am_aux_dir=`cd $ac_aux_dir && pwd`
+])
+
+# AM_CONDITIONAL -*- Autoconf -*-
+
+# Copyright (C) 1997, 2000, 2001, 2003, 2004, 2005
+# Free Software Foundation, Inc.
+#
+# This file 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.
+
+# serial 7
+
+# AM_CONDITIONAL(NAME, SHELL-CONDITION)
+# -------------------------------------
+# Define a conditional.
+AC_DEFUN([AM_CONDITIONAL],
+[AC_PREREQ(2.52)dnl
+ ifelse([$1], [TRUE], [AC_FATAL([$0: invalid condition: $1])],
+ [$1], [FALSE], [AC_FATAL([$0: invalid condition: $1])])dnl
+AC_SUBST([$1_TRUE])
+AC_SUBST([$1_FALSE])
+if $2; then
+ $1_TRUE=
+ $1_FALSE='#'
+else
+ $1_TRUE='#'
+ $1_FALSE=
+fi
+AC_CONFIG_COMMANDS_PRE(
+[if test -z "${$1_TRUE}" && test -z "${$1_FALSE}"; then
+ AC_MSG_ERROR([[conditional "$1" was never defined.
+Usually this means the macro was only invoked conditionally.]])
+fi])])
+
+
+# Copyright (C) 1999, 2000, 2001, 2002, 2003, 2004, 2005
+# Free Software Foundation, Inc.
+#
+# This file 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.
+
+# serial 8
+
+# There are a few dirty hacks below to avoid letting `AC_PROG_CC' be
+# written in clear, in which case automake, when reading aclocal.m4,
+# will think it sees a *use*, and therefore will trigger all it's
+# C support machinery. Also note that it means that autoscan, seeing
+# CC etc. in the Makefile, will ask for an AC_PROG_CC use...
+
+
+# _AM_DEPENDENCIES(NAME)
+# ----------------------
+# See how the compiler implements dependency checking.
+# NAME is "CC", "CXX", "GCJ", or "OBJC".
+# We try a few techniques and use that to set a single cache variable.
+#
+# We don't AC_REQUIRE the corresponding AC_PROG_CC since the latter was
+# modified to invoke _AM_DEPENDENCIES(CC); we would have a circular
+# dependency, and given that the user is not expected to run this macro,
+# just rely on AC_PROG_CC.
+AC_DEFUN([_AM_DEPENDENCIES],
+[AC_REQUIRE([AM_SET_DEPDIR])dnl
+AC_REQUIRE([AM_OUTPUT_DEPENDENCY_COMMANDS])dnl
+AC_REQUIRE([AM_MAKE_INCLUDE])dnl
+AC_REQUIRE([AM_DEP_TRACK])dnl
+
+ifelse([$1], CC, [depcc="$CC" am_compiler_list=],
+ [$1], CXX, [depcc="$CXX" am_compiler_list=],
+ [$1], OBJC, [depcc="$OBJC" am_compiler_list='gcc3 gcc'],
+ [$1], GCJ, [depcc="$GCJ" am_compiler_list='gcc3 gcc'],
+ [depcc="$$1" am_compiler_list=])
+
+AC_CACHE_CHECK([dependency style of $depcc],
+ [am_cv_$1_dependencies_compiler_type],
+[if test -z "$AMDEP_TRUE" && test -f "$am_depcomp"; then
+ # We make a subdir and do the tests there. Otherwise we can end up
+ # making bogus files that we don't know about and never remove. For
+ # instance it was reported that on HP-UX the gcc test will end up
+ # making a dummy file named `D' -- because `-MD' means `put the output
+ # in D'.
+ mkdir conftest.dir
+ # Copy depcomp to subdir because otherwise we won't find it if we're
+ # using a relative directory.
+ cp "$am_depcomp" conftest.dir
+ cd conftest.dir
+ # We will build objects and dependencies in a subdirectory because
+ # it helps to detect inapplicable dependency modes. For instance
+ # both Tru64's cc and ICC support -MD to output dependencies as a
+ # side effect of compilation, but ICC will put the dependencies in
+ # the current directory while Tru64 will put them in the object
+ # directory.
+ mkdir sub
+
+ am_cv_$1_dependencies_compiler_type=none
+ if test "$am_compiler_list" = ""; then
+ am_compiler_list=`sed -n ['s/^#*\([a-zA-Z0-9]*\))$/\1/p'] < ./depcomp`
+ fi
+ for depmode in $am_compiler_list; do
+ # Setup a source with many dependencies, because some compilers
+ # like to wrap large dependency lists on column 80 (with \), and
+ # we should not choose a depcomp mode which is confused by this.
+ #
+ # We need to recreate these files for each test, as the compiler may
+ # overwrite some of them when testing with obscure command lines.
+ # This happens at least with the AIX C compiler.
+ : > sub/conftest.c
+ for i in 1 2 3 4 5 6; do
+ echo '#include "conftst'$i'.h"' >> sub/conftest.c
+ # Using `: > sub/conftst$i.h' creates only sub/conftst1.h with
+ # Solaris 8's {/usr,}/bin/sh.
+ touch sub/conftst$i.h
+ done
+ echo "${am__include} ${am__quote}sub/conftest.Po${am__quote}" > confmf
+
+ case $depmode in
+ nosideeffect)
+ # after this tag, mechanisms are not by side-effect, so they'll
+ # only be used when explicitly requested
+ if test "x$enable_dependency_tracking" = xyes; then
+ continue
+ else
+ break
+ fi
+ ;;
+ none) break ;;
+ esac
+ # We check with `-c' and `-o' for the sake of the "dashmstdout"
+ # mode. It turns out that the SunPro C++ compiler does not properly
+ # handle `-M -o', and we need to detect this.
+ if depmode=$depmode \
+ source=sub/conftest.c object=sub/conftest.${OBJEXT-o} \
+ depfile=sub/conftest.Po tmpdepfile=sub/conftest.TPo \
+ $SHELL ./depcomp $depcc -c -o sub/conftest.${OBJEXT-o} sub/conftest.c \
+ >/dev/null 2>conftest.err &&
+ grep sub/conftst6.h sub/conftest.Po > /dev/null 2>&1 &&
+ grep sub/conftest.${OBJEXT-o} sub/conftest.Po > /dev/null 2>&1 &&
+ ${MAKE-make} -s -f confmf > /dev/null 2>&1; then
+ # icc doesn't choke on unknown options, it will just issue warnings
+ # or remarks (even with -Werror). So we grep stderr for any message
+ # that says an option was ignored or not supported.
+ # When given -MP, icc 7.0 and 7.1 complain thusly:
+ # icc: Command line warning: ignoring option '-M'; no argument required
+ # The diagnosis changed in icc 8.0:
+ # icc: Command line remark: option '-MP' not supported
+ if (grep 'ignoring option' conftest.err ||
+ grep 'not supported' conftest.err) >/dev/null 2>&1; then :; else
+ am_cv_$1_dependencies_compiler_type=$depmode
+ break
+ fi
+ fi
+ done
+
+ cd ..
+ rm -rf conftest.dir
+else
+ am_cv_$1_dependencies_compiler_type=none
+fi
+])
+AC_SUBST([$1DEPMODE], [depmode=$am_cv_$1_dependencies_compiler_type])
+AM_CONDITIONAL([am__fastdep$1], [
+ test "x$enable_dependency_tracking" != xno \
+ && test "$am_cv_$1_dependencies_compiler_type" = gcc3])
])
-dnl sinclude(../gettext.m4) already included in bfd/acinclude.m4
-ifelse(yes,no,[
-AC_DEFUN([CY_WITH_NLS],)
-AC_SUBST(INTLLIBS)
+
+# AM_SET_DEPDIR
+# -------------
+# Choose a directory name for dependency files.
+# This macro is AC_REQUIREd in _AM_DEPENDENCIES
+AC_DEFUN([AM_SET_DEPDIR],
+[AC_REQUIRE([AM_SET_LEADING_DOT])dnl
+AC_SUBST([DEPDIR], ["${am__leading_dot}deps"])dnl
])
-#serial 1
-# This test replaces the one in autoconf.
-# Currently this macro should have the same name as the autoconf macro
-# because gettext's gettext.m4 (distributed in the automake package)
-# still uses it. Otherwise, the use in gettext.m4 makes autoheader
-# give these diagnostics:
-# configure.in:556: AC_TRY_COMPILE was called before AC_ISC_POSIX
-# configure.in:556: AC_TRY_RUN was called before AC_ISC_POSIX
-
-undefine([AC_ISC_POSIX])
-
-AC_DEFUN([AC_ISC_POSIX],
- [
- dnl This test replaces the obsolescent AC_ISC_POSIX kludge.
- AC_CHECK_LIB(cposix, strerror, [LIBS="$LIBS -lcposix"])
- ]
-)
-# 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.
+# AM_DEP_TRACK
+# ------------
+AC_DEFUN([AM_DEP_TRACK],
+[AC_ARG_ENABLE(dependency-tracking,
+[ --disable-dependency-tracking speeds up one-time build
+ --enable-dependency-tracking do not reject slow dependency extractors])
+if test "x$enable_dependency_tracking" != xno; then
+ am_depcomp="$ac_aux_dir/depcomp"
+ AMDEPBACKSLASH='\'
+fi
+AM_CONDITIONAL([AMDEP], [test "x$enable_dependency_tracking" != xno])
+AC_SUBST([AMDEPBACKSLASH])
+])
+
+# Generate code to set up dependency tracking. -*- Autoconf -*-
+
+# Copyright (C) 1999, 2000, 2001, 2002, 2003, 2004, 2005
+# Free Software Foundation, Inc.
+#
+# This file 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.
+
+#serial 3
-# serial 1
+# _AM_OUTPUT_DEPENDENCY_COMMANDS
+# ------------------------------
+AC_DEFUN([_AM_OUTPUT_DEPENDENCY_COMMANDS],
+[for mf in $CONFIG_FILES; do
+ # Strip MF so we end up with the name of the file.
+ mf=`echo "$mf" | sed -e 's/:.*$//'`
+ # Check whether this is an Automake generated Makefile or not.
+ # We used to match only the files named `Makefile.in', but
+ # some people rename them; so instead we look at the file content.
+ # Grep'ing the first line is not enough: some people post-process
+ # each Makefile.in and add a new line on top of each file to say so.
+ # So let's grep whole file.
+ if grep '^#.*generated by automake' $mf > /dev/null 2>&1; then
+ dirpart=`AS_DIRNAME("$mf")`
+ else
+ continue
+ fi
+ # Extract the definition of DEPDIR, am__include, and am__quote
+ # from the Makefile without running `make'.
+ DEPDIR=`sed -n 's/^DEPDIR = //p' < "$mf"`
+ test -z "$DEPDIR" && continue
+ am__include=`sed -n 's/^am__include = //p' < "$mf"`
+ test -z "am__include" && continue
+ am__quote=`sed -n 's/^am__quote = //p' < "$mf"`
+ # When using ansi2knr, U may be empty or an underscore; expand it
+ U=`sed -n 's/^U = //p' < "$mf"`
+ # Find all dependency output files, they are included files with
+ # $(DEPDIR) in their names. We invoke sed twice because it is the
+ # simplest approach to changing $(DEPDIR) to its actual value in the
+ # expansion.
+ for file in `sed -n "
+ s/^$am__include $am__quote\(.*(DEPDIR).*\)$am__quote"'$/\1/p' <"$mf" | \
+ sed -e 's/\$(DEPDIR)/'"$DEPDIR"'/g' -e 's/\$U/'"$U"'/g'`; do
+ # Make sure the directory exists.
+ test -f "$dirpart/$file" && continue
+ fdir=`AS_DIRNAME(["$file"])`
+ AS_MKDIR_P([$dirpart/$fdir])
+ # echo "creating $dirpart/$file"
+ echo '# dummy' > "$dirpart/$file"
+ done
+done
+])# _AM_OUTPUT_DEPENDENCY_COMMANDS
-dnl Usage:
-dnl AM_INIT_AUTOMAKE(package,version, [no-define])
+# AM_OUTPUT_DEPENDENCY_COMMANDS
+# -----------------------------
+# This macro should only be invoked once -- use via AC_REQUIRE.
+#
+# This code is only required when automatic dependency tracking
+# is enabled. FIXME. This creates each `.P' file that we will
+# need in order to bootstrap the dependency handling code.
+AC_DEFUN([AM_OUTPUT_DEPENDENCY_COMMANDS],
+[AC_CONFIG_COMMANDS([depfiles],
+ [test x"$AMDEP_TRUE" != x"" || _AM_OUTPUT_DEPENDENCY_COMMANDS],
+ [AMDEP_TRUE="$AMDEP_TRUE" ac_aux_dir="$ac_aux_dir"])
+])
+
+# Copyright (C) 1996, 1997, 2000, 2001, 2003, 2005
+# Free Software Foundation, Inc.
+#
+# This file 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.
+
+# serial 8
+
+# AM_CONFIG_HEADER is obsolete. It has been replaced by AC_CONFIG_HEADERS.
+AU_DEFUN([AM_CONFIG_HEADER], [AC_CONFIG_HEADERS($@)])
+
+# Do all the work for Automake. -*- Autoconf -*-
+
+# Copyright (C) 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004, 2005
+# Free Software Foundation, Inc.
+#
+# This file 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.
+
+# serial 12
+
+# 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.
+
+# AM_INIT_AUTOMAKE(PACKAGE, VERSION, [NO-DEFINE])
+# AM_INIT_AUTOMAKE([OPTIONS])
+# -----------------------------------------------
+# The call with PACKAGE and VERSION arguments is the old style
+# call (pre autoconf-2.50), which is being phased out. PACKAGE
+# and VERSION should now be passed to AC_INIT and removed from
+# the call to AM_INIT_AUTOMAKE.
+# We support both call styles for the transition. After
+# the next Automake release, Autoconf can make the AC_INIT
+# arguments mandatory, and then we can depend on a new Autoconf
+# release and drop the old call support.
AC_DEFUN([AM_INIT_AUTOMAKE],
-[AC_REQUIRE([AC_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_PREREQ([2.58])dnl
+dnl Autoconf wants to disallow AM_ names. We explicitly allow
+dnl the ones we care about.
+m4_pattern_allow([^AM_[A-Z]+FLAGS$])dnl
+AC_REQUIRE([AM_SET_CURRENT_AUTOMAKE_VERSION])dnl
+AC_REQUIRE([AC_PROG_INSTALL])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", [Name of package])
-AC_DEFINE_UNQUOTED(VERSION, "$VERSION", [Version number of package]))
-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])])
+# test whether we have cygpath
+if test -z "$CYGPATH_W"; then
+ if (cygpath --version) >/dev/null 2>/dev/null; then
+ CYGPATH_W='cygpath -w'
+ else
+ CYGPATH_W=echo
+ fi
+fi
+AC_SUBST([CYGPATH_W])
+
+# Define the identity of the package.
+dnl Distinguish between old-style and new-style calls.
+m4_ifval([$2],
+[m4_ifval([$3], [_AM_SET_OPTION([no-define])])dnl
+ AC_SUBST([PACKAGE], [$1])dnl
+ AC_SUBST([VERSION], [$2])],
+[_AM_SET_OPTIONS([$1])dnl
+ AC_SUBST([PACKAGE], ['AC_PACKAGE_TARNAME'])dnl
+ AC_SUBST([VERSION], ['AC_PACKAGE_VERSION'])])dnl
+
+_AM_IF_OPTION([no-define],,
+[AC_DEFINE_UNQUOTED(PACKAGE, "$PACKAGE", [Name of package])
+ AC_DEFINE_UNQUOTED(VERSION, "$VERSION", [Version number of package])])dnl
+
+# Some tools Automake needs.
+AC_REQUIRE([AM_SANITY_CHECK])dnl
+AC_REQUIRE([AC_ARG_PROGRAM])dnl
+AM_MISSING_PROG(ACLOCAL, aclocal-${am__api_version})
+AM_MISSING_PROG(AUTOCONF, autoconf)
+AM_MISSING_PROG(AUTOMAKE, automake-${am__api_version})
+AM_MISSING_PROG(AUTOHEADER, autoheader)
+AM_MISSING_PROG(MAKEINFO, makeinfo)
+AM_PROG_INSTALL_SH
+AM_PROG_INSTALL_STRIP
+AC_REQUIRE([AM_PROG_MKDIR_P])dnl
+# We need awk for the "check" target. The system "awk" is bad on
+# some platforms.
+AC_REQUIRE([AC_PROG_AWK])dnl
+AC_REQUIRE([AC_PROG_MAKE_SET])dnl
+AC_REQUIRE([AM_SET_LEADING_DOT])dnl
+_AM_IF_OPTION([tar-ustar], [_AM_PROG_TAR([ustar])],
+ [_AM_IF_OPTION([tar-pax], [_AM_PROG_TAR([pax])],
+ [_AM_PROG_TAR([v7])])])
+_AM_IF_OPTION([no-dependencies],,
+[AC_PROVIDE_IFELSE([AC_PROG_CC],
+ [_AM_DEPENDENCIES(CC)],
+ [define([AC_PROG_CC],
+ defn([AC_PROG_CC])[_AM_DEPENDENCIES(CC)])])dnl
+AC_PROVIDE_IFELSE([AC_PROG_CXX],
+ [_AM_DEPENDENCIES(CXX)],
+ [define([AC_PROG_CXX],
+ defn([AC_PROG_CXX])[_AM_DEPENDENCIES(CXX)])])dnl
+])
+])
+
+
+# When config.status generates a header, we must update the stamp-h file.
+# This file resides in the same directory as the config header
+# that is generated. The stamp files are numbered to have different names.
+
+# Autoconf calls _AC_AM_CONFIG_HEADER_HOOK (when defined) in the
+# loop where config.status creates the headers, so we can generate
+# our stamp files there.
+AC_DEFUN([_AC_AM_CONFIG_HEADER_HOOK],
+[# Compute $1's index in $config_headers.
+_am_stamp_count=1
+for _am_header in $config_headers :; do
+ case $_am_header in
+ $1 | $1:* )
+ break ;;
+ * )
+ _am_stamp_count=`expr $_am_stamp_count + 1` ;;
+ esac
+done
+echo "timestamp for $1" >`AS_DIRNAME([$1])`/stamp-h[]$_am_stamp_count])
+
+# Copyright (C) 2001, 2003, 2005 Free Software Foundation, Inc.
+#
+# This file 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.
+
+# AM_PROG_INSTALL_SH
+# ------------------
+# Define $install_sh.
+AC_DEFUN([AM_PROG_INSTALL_SH],
+[AC_REQUIRE([AM_AUX_DIR_EXPAND])dnl
+install_sh=${install_sh-"$am_aux_dir/install-sh"}
+AC_SUBST(install_sh)])
+
+# Copyright (C) 1998, 1999, 2000, 2001, 2002, 2003, 2005
+# Free Software Foundation, Inc.
+#
+# This file 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.
+
+# serial 5
+
+# AM_PROG_LEX
+# -----------
+# Autoconf leaves LEX=: if lex or flex can't be found. Change that to a
+# "missing" invocation, for better error output.
+AC_DEFUN([AM_PROG_LEX],
+[AC_PREREQ(2.50)dnl
+AC_REQUIRE([AM_MISSING_HAS_RUN])dnl
+AC_REQUIRE([AC_PROG_LEX])dnl
+if test "$LEX" = :; then
+ LEX=${am_missing_run}flex
+fi])
+
+# Add --enable-maintainer-mode option to configure. -*- Autoconf -*-
+# From Jim Meyering
+
+# Copyright (C) 1996, 1998, 2000, 2001, 2002, 2003, 2004, 2005
+# Free Software Foundation, Inc.
+#
+# This file 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.
+
+# serial 4
+
+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])
+ AM_CONDITIONAL(MAINTAINER_MODE, [test $USE_MAINTAINER_MODE = yes])
+ MAINT=$MAINTAINER_MODE_TRUE
+ AC_SUBST(MAINT)dnl
+]
+)
+
+AU_DEFUN([jm_MAINTAINER_MODE], [AM_MAINTAINER_MODE])
+
+# Check to see how 'make' treats includes. -*- Autoconf -*-
+
+# Copyright (C) 2001, 2002, 2003, 2005 Free Software Foundation, Inc.
+#
+# This file 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.
+
+# serial 3
+
+# AM_MAKE_INCLUDE()
+# -----------------
+# Check to see how make treats includes.
+AC_DEFUN([AM_MAKE_INCLUDE],
+[am_make=${MAKE-make}
+cat > confinc << 'END'
+am__doit:
+ @echo done
+.PHONY: am__doit
+END
+# If we don't find an include directive, just comment out the code.
+AC_MSG_CHECKING([for style of include used by $am_make])
+am__include="#"
+am__quote=
+_am_result=none
+# First try GNU make style include.
+echo "include confinc" > confmf
+# We grep out `Entering directory' and `Leaving directory'
+# messages which can occur if `w' ends up in MAKEFLAGS.
+# In particular we don't look at `^make:' because GNU make might
+# be invoked under some other name (usually "gmake"), in which
+# case it prints its new name instead of `make'.
+if test "`$am_make -s -f confmf 2> /dev/null | grep -v 'ing directory'`" = "done"; then
+ am__include=include
+ am__quote=
+ _am_result=GNU
+fi
+# Now try BSD make style include.
+if test "$am__include" = "#"; then
+ echo '.include "confinc"' > confmf
+ if test "`$am_make -s -f confmf 2> /dev/null`" = "done"; then
+ am__include=.include
+ am__quote="\""
+ _am_result=BSD
+ fi
+fi
+AC_SUBST([am__include])
+AC_SUBST([am__quote])
+AC_MSG_RESULT([$_am_result])
+rm -f confinc confmf
+])
+
+# Fake the existence of programs that GNU maintainers use. -*- Autoconf -*-
+
+# Copyright (C) 1997, 1999, 2000, 2001, 2003, 2005
+# Free Software Foundation, Inc.
+#
+# This file 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.
+
+# serial 4
+
+# AM_MISSING_PROG(NAME, PROGRAM)
+# ------------------------------
+AC_DEFUN([AM_MISSING_PROG],
+[AC_REQUIRE([AM_MISSING_HAS_RUN])
+$1=${$1-"${am_missing_run}$2"}
+AC_SUBST($1)])
+
+
+# AM_MISSING_HAS_RUN
+# ------------------
+# Define MISSING if not defined so far and test if it supports --run.
+# If it does, set am_missing_run to use it, otherwise, to nothing.
+AC_DEFUN([AM_MISSING_HAS_RUN],
+[AC_REQUIRE([AM_AUX_DIR_EXPAND])dnl
+test x"${MISSING+set}" = xset || MISSING="\${SHELL} $am_aux_dir/missing"
+# Use eval to expand $SHELL
+if eval "$MISSING --run true"; then
+ am_missing_run="$MISSING --run "
+else
+ am_missing_run=
+ AC_MSG_WARN([`missing' script is too old or missing])
+fi
+])
+
+# Copyright (C) 2003, 2004, 2005 Free Software Foundation, Inc.
+#
+# This file 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.
+
+# AM_PROG_MKDIR_P
+# ---------------
+# Check whether `mkdir -p' is supported, fallback to mkinstalldirs otherwise.
#
-# Check to make sure that the build environment is sane.
+# Automake 1.8 used `mkdir -m 0755 -p --' to ensure that directories
+# created by `make install' are always world readable, even if the
+# installer happens to have an overly restrictive umask (e.g. 077).
+# This was a mistake. There are at least two reasons why we must not
+# use `-m 0755':
+# - it causes special bits like SGID to be ignored,
+# - it may be too restrictive (some setups expect 775 directories).
+#
+# Do not use -m 0755 and let people choose whatever they expect by
+# setting umask.
+#
+# We cannot accept any implementation of `mkdir' that recognizes `-p'.
+# Some implementations (such as Solaris 8's) are not thread-safe: if a
+# parallel make tries to run `mkdir -p a/b' and `mkdir -p a/c'
+# concurrently, both version can detect that a/ is missing, but only
+# one can create it and the other will error out. Consequently we
+# restrict ourselves to GNU make (using the --version option ensures
+# this.)
+AC_DEFUN([AM_PROG_MKDIR_P],
+[if mkdir -p --version . >/dev/null 2>&1 && test ! -d ./--version; then
+ # We used to keeping the `.' as first argument, in order to
+ # allow $(mkdir_p) to be used without argument. As in
+ # $(mkdir_p) $(somedir)
+ # where $(somedir) is conditionally defined. However this is wrong
+ # for two reasons:
+ # 1. if the package is installed by a user who cannot write `.'
+ # make install will fail,
+ # 2. the above comment should most certainly read
+ # $(mkdir_p) $(DESTDIR)$(somedir)
+ # so it does not work when $(somedir) is undefined and
+ # $(DESTDIR) is not.
+ # To support the latter case, we have to write
+ # test -z "$(somedir)" || $(mkdir_p) $(DESTDIR)$(somedir),
+ # so the `.' trick is pointless.
+ mkdir_p='mkdir -p --'
+else
+ # On NextStep and OpenStep, the `mkdir' command does not
+ # recognize any option. It will interpret all options as
+ # directories to create, and then abort because `.' already
+ # exists.
+ for d in ./-p ./--version;
+ do
+ test -d $d && rmdir $d
+ done
+ # $(mkinstalldirs) is defined by Automake if mkinstalldirs exists.
+ if test -f "$ac_aux_dir/mkinstalldirs"; then
+ mkdir_p='$(mkinstalldirs)'
+ else
+ mkdir_p='$(install_sh) -d'
+ fi
+fi
+AC_SUBST([mkdir_p])])
+
+# Helper functions for option handling. -*- Autoconf -*-
+
+# Copyright (C) 2001, 2002, 2003, 2005 Free Software Foundation, Inc.
+#
+# This file 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.
+
+# serial 3
+
+# _AM_MANGLE_OPTION(NAME)
+# -----------------------
+AC_DEFUN([_AM_MANGLE_OPTION],
+[[_AM_OPTION_]m4_bpatsubst($1, [[^a-zA-Z0-9_]], [_])])
+
+# _AM_SET_OPTION(NAME)
+# ------------------------------
+# Set option NAME. Presently that only means defining a flag for this option.
+AC_DEFUN([_AM_SET_OPTION],
+[m4_define(_AM_MANGLE_OPTION([$1]), 1)])
+
+# _AM_SET_OPTIONS(OPTIONS)
+# ----------------------------------
+# OPTIONS is a space-separated list of Automake options.
+AC_DEFUN([_AM_SET_OPTIONS],
+[AC_FOREACH([_AM_Option], [$1], [_AM_SET_OPTION(_AM_Option)])])
+
+# _AM_IF_OPTION(OPTION, IF-SET, [IF-NOT-SET])
+# -------------------------------------------
+# Execute IF-SET if OPTION is set, IF-NOT-SET otherwise.
+AC_DEFUN([_AM_IF_OPTION],
+[m4_ifset(_AM_MANGLE_OPTION([$1]), [$2], [$3])])
+
+# Check to make sure that the build environment is sane. -*- Autoconf -*-
+
+# Copyright (C) 1996, 1997, 2000, 2001, 2003, 2005
+# Free Software Foundation, Inc.
#
+# This file 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.
+# serial 4
+
+# AM_SANITY_CHECK
+# ---------------
AC_DEFUN([AM_SANITY_CHECK],
[AC_MSG_CHECKING([whether build environment is sane])
# Just in case
sleep 1
-echo timestamp > conftestfile
+echo timestamp > conftest.file
# 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
+ set X `ls -Lt $srcdir/configure conftest.file 2> /dev/null`
+ if test "$[*]" = "X"; then
# -L didn't work.
- set X `ls -t $srcdir/configure conftestfile`
+ set X `ls -t $srcdir/configure conftest.file`
fi
- if test "[$]*" != "X $srcdir/configure conftestfile" \
- && test "[$]*" != "X conftestfile $srcdir/configure"; then
+ rm -f conftest.file
+ if test "$[*]" != "X $srcdir/configure conftest.file" \
+ && test "$[*]" != "X conftest.file $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
@@ -109,7 +754,7 @@ if (
alias in your environment])
fi
- test "[$]2" = conftestfile
+ test "$[2]" = conftest.file
)
then
# Ok.
@@ -118,87 +763,141 @@ 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)])
+# Copyright (C) 2001, 2003, 2005 Free Software Foundation, Inc.
+#
+# This file 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.
-# 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([,]))])
+# AM_PROG_INSTALL_STRIP
+# ---------------------
+# One issue with vendor `install' (even GNU) is that you can't
+# specify the program used to strip binaries. This is especially
+# annoying in cross-compiling environments, where the build's strip
+# is unlikely to handle the host's binaries.
+# Fortunately install-sh will honor a STRIPPROG variable, so we
+# always use install-sh in `make install-strip', and initialize
+# STRIPPROG with the value of the STRIP variable (set by the user).
+AC_DEFUN([AM_PROG_INSTALL_STRIP],
+[AC_REQUIRE([AM_PROG_INSTALL_SH])dnl
+# Installed binaries are usually stripped using `strip' when the user
+# run `make install-strip'. However `strip' might not be the right
+# tool to use in cross-compilation environments, therefore Automake
+# will honor the `STRIP' environment variable to overrule this program.
+dnl Don't test for $cross_compiling = yes, because it might be `maybe'.
+if test "$cross_compiling" != no; then
+ AC_CHECK_TOOL([STRIP], [strip], :)
+fi
+INSTALL_STRIP_PROGRAM="\${SHELL} \$(install_sh) -c -s"
+AC_SUBST([INSTALL_STRIP_PROGRAM])])
+# Check how to create a tarball. -*- Autoconf -*-
-dnl AM_PROG_LEX
-dnl Look for flex, lex or missing, then run AC_PROG_LEX and AC_DECL_YYTEXT
-AC_DEFUN([AM_PROG_LEX],
-[missing_dir=ifelse([$1],,`cd $ac_aux_dir && pwd`,$1)
-AC_CHECK_PROGS(LEX, flex lex, "$missing_dir/missing flex")
-AC_PROG_LEX
-AC_DECL_YYTEXT])
+# Copyright (C) 2004, 2005 Free Software Foundation, Inc.
+#
+# This file 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.
-# Add --enable-maintainer-mode option to configure.
-# From Jim Meyering
+# serial 2
-# serial 1
+# _AM_PROG_TAR(FORMAT)
+# --------------------
+# Check how to create a tarball in format FORMAT.
+# FORMAT should be one of `v7', `ustar', or `pax'.
+#
+# Substitute a variable $(am__tar) that is a command
+# writing to stdout a FORMAT-tarball containing the directory
+# $tardir.
+# tardir=directory && $(am__tar) > result.tar
+#
+# Substitute a variable $(am__untar) that extract such
+# a tarball read from stdin.
+# $(am__untar) < result.tar
+AC_DEFUN([_AM_PROG_TAR],
+[# Always define AMTAR for backward compatibility.
+AM_MISSING_PROG([AMTAR], [tar])
+m4_if([$1], [v7],
+ [am__tar='${AMTAR} chof - "$$tardir"'; am__untar='${AMTAR} xf -'],
+ [m4_case([$1], [ustar],, [pax],,
+ [m4_fatal([Unknown tar format])])
+AC_MSG_CHECKING([how to create a $1 tar archive])
+# Loop over all known methods to create a tar archive until one works.
+_am_tools='gnutar m4_if([$1], [ustar], [plaintar]) pax cpio none'
+_am_tools=${am_cv_prog_tar_$1-$_am_tools}
+# Do not fold the above two line into one, because Tru64 sh and
+# Solaris sh will not grok spaces in the rhs of `-'.
+for _am_tool in $_am_tools
+do
+ case $_am_tool in
+ gnutar)
+ for _am_tar in tar gnutar gtar;
+ do
+ AM_RUN_LOG([$_am_tar --version]) && break
+ done
+ am__tar="$_am_tar --format=m4_if([$1], [pax], [posix], [$1]) -chf - "'"$$tardir"'
+ am__tar_="$_am_tar --format=m4_if([$1], [pax], [posix], [$1]) -chf - "'"$tardir"'
+ am__untar="$_am_tar -xf -"
+ ;;
+ plaintar)
+ # Must skip GNU tar: if it does not support --format= it doesn't create
+ # ustar tarball either.
+ (tar --version) >/dev/null 2>&1 && continue
+ am__tar='tar chf - "$$tardir"'
+ am__tar_='tar chf - "$tardir"'
+ am__untar='tar xf -'
+ ;;
+ pax)
+ am__tar='pax -L -x $1 -w "$$tardir"'
+ am__tar_='pax -L -x $1 -w "$tardir"'
+ am__untar='pax -r'
+ ;;
+ cpio)
+ am__tar='find "$$tardir" -print | cpio -o -H $1 -L'
+ am__tar_='find "$tardir" -print | cpio -o -H $1 -L'
+ am__untar='cpio -i -H $1 -d'
+ ;;
+ none)
+ am__tar=false
+ am__tar_=false
+ am__untar=false
+ ;;
+ esac
-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)
- AM_CONDITIONAL(MAINTAINER_MODE, test $USE_MAINTAINER_MODE = yes)
- MAINT=$MAINTAINER_MODE_TRUE
- AC_SUBST(MAINT)dnl
-]
-)
+ # If the value was cached, stop now. We just wanted to have am__tar
+ # and am__untar set.
+ test -n "${am_cv_prog_tar_$1}" && break
-# Define a conditional.
+ # tar/untar a dummy directory, and stop if the command works
+ rm -rf conftest.dir
+ mkdir conftest.dir
+ echo GrepMe > conftest.dir/file
+ AM_RUN_LOG([tardir=conftest.dir && eval $am__tar_ >conftest.tar])
+ rm -rf conftest.dir
+ if test -s conftest.tar; then
+ AM_RUN_LOG([$am__untar <conftest.tar])
+ grep GrepMe conftest.dir/file >/dev/null 2>&1 && break
+ fi
+done
+rm -rf conftest.dir
-AC_DEFUN([AM_CONDITIONAL],
-[AC_SUBST($1_TRUE)
-AC_SUBST($1_FALSE)
-if $2; then
- $1_TRUE=
- $1_FALSE='#'
-else
- $1_TRUE='#'
- $1_FALSE=
-fi])
+AC_CACHE_VAL([am_cv_prog_tar_$1], [am_cv_prog_tar_$1=$_am_tool])
+AC_MSG_RESULT([$am_cv_prog_tar_$1])])
+AC_SUBST([am__tar])
+AC_SUBST([am__untar])
+]) # _AM_PROG_TAR
+m4_include([../bfd/acinclude.m4])
+m4_include([../bfd/warning.m4])
+m4_include([../config/depstand.m4])
+m4_include([../config/gettext-sister.m4])
+m4_include([../config/lead-dot.m4])
+m4_include([../config/nls.m4])
+m4_include([../config/po.m4])
+m4_include([../config/progtest.m4])
+m4_include([../libtool.m4])
+m4_include([../ltoptions.m4])
+m4_include([../ltsugar.m4])
+m4_include([../ltversion.m4])
diff --git a/contrib/binutils/ld/config.in b/contrib/binutils/ld/config.in
index f76bb42..cae19e7 100644
--- a/contrib/binutils/ld/config.in
+++ b/contrib/binutils/ld/config.in
@@ -1,177 +1,138 @@
-/* config.in. Generated automatically from configure.in by autoheader. */
+/* config.in. Generated from configure.in by autoheader. */
-/* Define if using alloca.c. */
-#undef C_ALLOCA
-
-/* Define to empty if the keyword does not work. */
-#undef const
-
-/* Define to one of _getb67, GETB67, getb67 for Cray-2 and Cray-YMP systems.
- This function is required for alloca.c support on those systems. */
-#undef CRAY_STACKSEG_END
-
-/* Define if you have alloca, as a function or macro. */
-#undef HAVE_ALLOCA
+/* Define to 1 if translation of program messages to the user's native
+ language is requested. */
+#undef ENABLE_NLS
-/* Define if you have <alloca.h> and it should be used (not on Ultrix). */
-#undef HAVE_ALLOCA_H
+/* Additional extension a shared object might have. */
+#undef EXTRA_SHLIB_EXTENSION
-/* Define if you have a working `mmap' system call. */
-#undef HAVE_MMAP
+/* Define to 1 if you have the declaration of `environ', and to 0 if you
+ don't. */
+#undef HAVE_DECL_ENVIRON
-/* Define as __inline if that's what the C compiler calls it. */
-#undef inline
+/* Define to 1 if you have the declaration of `free', and to 0 if you don't.
+ */
+#undef HAVE_DECL_FREE
-/* Define to `long' if <sys/types.h> doesn't define. */
-#undef off_t
+/* Define to 1 if you have the declaration of `getenv', and to 0 if you don't.
+ */
+#undef HAVE_DECL_GETENV
-/* Define if you need to in order for stat and other things to work. */
-#undef _POSIX_SOURCE
+/* Is the prototype for getopt in <unistd.h> in the expected format? */
+#undef HAVE_DECL_GETOPT
-/* Define to `unsigned' if <sys/types.h> doesn't define. */
-#undef size_t
+/* Define to 1 if you have the declaration of `sbrk', and to 0 if you don't.
+ */
+#undef HAVE_DECL_SBRK
-/* If using the C implementation of alloca, define if you know the
- direction of stack growth for your system; otherwise it will be
- automatically deduced at run-time.
- STACK_DIRECTION > 0 => grows toward higher addresses
- STACK_DIRECTION < 0 => grows toward lower addresses
- STACK_DIRECTION = 0 => direction of growth unknown
- */
-#undef STACK_DIRECTION
+/* Define to 1 if you have the declaration of `strstr', and to 0 if you don't.
+ */
+#undef HAVE_DECL_STRSTR
-/* Define if you have the ANSI C header files. */
-#undef STDC_HEADERS
-
-/* Define if lex declares yytext as a char * by default, not a char[]. */
-#undef YYTEXT_POINTER
+/* Define to 1 if you have the <dirent.h> header file, and it defines `DIR'.
+ */
+#undef HAVE_DIRENT_H
-/* Define if you have the __argz_count function. */
-#undef HAVE___ARGZ_COUNT
+/* Define to 1 if you have the <dlfcn.h> header file. */
+#undef HAVE_DLFCN_H
-/* Define if you have the __argz_next function. */
-#undef HAVE___ARGZ_NEXT
+/* Define to 1 if you have the <elf-hints.h> header file. */
+#undef HAVE_ELF_HINTS_H
-/* Define if you have the __argz_stringify function. */
-#undef HAVE___ARGZ_STRINGIFY
+/* Define to 1 if you have the `glob' function. */
+#undef HAVE_GLOB
-/* Define if you have the dcgettext function. */
-#undef HAVE_DCGETTEXT
+/* Define to 1 if you have the <inttypes.h> header file. */
+#undef HAVE_INTTYPES_H
-/* Define if you have the getcwd function. */
-#undef HAVE_GETCWD
+/* Define to 1 if you have the <limits.h> header file. */
+#undef HAVE_LIMITS_H
-/* Define if you have the getpagesize function. */
-#undef HAVE_GETPAGESIZE
+/* Define to 1 if you have the <memory.h> header file. */
+#undef HAVE_MEMORY_H
-/* Define if you have the munmap function. */
-#undef HAVE_MUNMAP
+/* Define to 1 if you have the `mkstemp' function. */
+#undef HAVE_MKSTEMP
-/* Define if you have the putenv function. */
-#undef HAVE_PUTENV
+/* Define to 1 if you have the <ndir.h> header file, and it defines `DIR'. */
+#undef HAVE_NDIR_H
-/* Define if you have the realpath function. */
+/* Define to 1 if you have the `realpath' function. */
#undef HAVE_REALPATH
-/* Define if you have the sbrk function. */
+/* Define to 1 if you have the `sbrk' function. */
#undef HAVE_SBRK
-/* Define if you have the setenv function. */
-#undef HAVE_SETENV
-
-/* Define if you have the setlocale function. */
-#undef HAVE_SETLOCALE
-
-/* Define if you have the stpcpy function. */
-#undef HAVE_STPCPY
-
-/* Define if you have the strcasecmp function. */
-#undef HAVE_STRCASECMP
-
-/* Define if you have the strchr function. */
-#undef HAVE_STRCHR
-
-/* Define if you have the <argz.h> header file. */
-#undef HAVE_ARGZ_H
-
-/* Define if you have the <dirent.h> header file. */
-#undef HAVE_DIRENT_H
-
-/* Define if you have the <limits.h> header file. */
-#undef HAVE_LIMITS_H
-
-/* Define if you have the <locale.h> header file. */
-#undef HAVE_LOCALE_H
-
-/* Define if you have the <malloc.h> header file. */
-#undef HAVE_MALLOC_H
-
-/* Define if you have the <ndir.h> header file. */
-#undef HAVE_NDIR_H
+/* Define to 1 if you have the <stdint.h> header file. */
+#undef HAVE_STDINT_H
-/* Define if you have the <nl_types.h> header file. */
-#undef HAVE_NL_TYPES_H
-
-/* Define if you have the <stdlib.h> header file. */
+/* Define to 1 if you have the <stdlib.h> header file. */
#undef HAVE_STDLIB_H
-/* Define if you have the <string.h> header file. */
-#undef HAVE_STRING_H
-
-/* Define if you have the <strings.h> header file. */
+/* Define to 1 if you have the <strings.h> header file. */
#undef HAVE_STRINGS_H
-/* Define if you have the <sys/dir.h> header file. */
+/* Define to 1 if you have the <string.h> header file. */
+#undef HAVE_STRING_H
+
+/* Define to 1 if you have the <sys/dir.h> header file, and it defines `DIR'.
+ */
#undef HAVE_SYS_DIR_H
-/* Define if you have the <sys/ndir.h> header file. */
+/* Define to 1 if you have the <sys/ndir.h> header file, and it defines `DIR'.
+ */
#undef HAVE_SYS_NDIR_H
-/* Define if you have the <sys/param.h> header file. */
+/* Define to 1 if you have the <sys/param.h> header file. */
#undef HAVE_SYS_PARAM_H
-/* Define if you have the <unistd.h> header file. */
-#undef HAVE_UNISTD_H
+/* Define to 1 if you have the <sys/stat.h> header file. */
+#undef HAVE_SYS_STAT_H
-/* Define if you have the <values.h> header file. */
-#undef HAVE_VALUES_H
+/* Define to 1 if you have the <sys/types.h> header file. */
+#undef HAVE_SYS_TYPES_H
-/* Name of package */
-#undef PACKAGE
+/* Define to 1 if you have the <unistd.h> header file. */
+#undef HAVE_UNISTD_H
-/* Version number of package */
-#undef VERSION
+/* Define to 1 if you have the `waitpid' function. */
+#undef HAVE_WAITPID
-/* Define if you have the stpcpy function */
-#undef HAVE_STPCPY
+/* Define to the sub-directory in which libtool stores uninstalled libraries.
+ */
+#undef LT_OBJDIR
-/* Define if your locale.h file contains LC_MESSAGES. */
-#undef HAVE_LC_MESSAGES
+/* Name of package */
+#undef PACKAGE
-/* Define to 1 if NLS is requested */
-#undef ENABLE_NLS
+/* Define to the address where bug reports for this package should be sent. */
+#undef PACKAGE_BUGREPORT
-/* Define as 1 if you have gettext and don't want to use GNU gettext. */
-#undef HAVE_GETTEXT
+/* Define to the full name of this package. */
+#undef PACKAGE_NAME
-/* Use b modifier when opening binary files? */
-#undef USE_BINARY_FOPEN
+/* Define to the full name and version of this package. */
+#undef PACKAGE_STRING
-/* Define if strstr is not declared in system header files. */
-#undef NEED_DECLARATION_STRSTR
+/* Define to the one symbol short name of this package. */
+#undef PACKAGE_TARNAME
-/* Define if free is not declared in system header files. */
-#undef NEED_DECLARATION_FREE
+/* Define to the version of this package. */
+#undef PACKAGE_VERSION
-/* Define if sbrk is not declared in system header files. */
-#undef NEED_DECLARATION_SBRK
+/* The size of a `long', as computed by sizeof. */
+#undef SIZEOF_LONG
-/* Define if getenv is not declared in system header files. */
-#undef NEED_DECLARATION_GETENV
+/* Define to 1 if you have the ANSI C header files. */
+#undef STDC_HEADERS
-/* Define if environ is not declared in system header files. */
-#undef NEED_DECLARATION_ENVIRON
+/* Use b modifier when opening binary files? */
+#undef USE_BINARY_FOPEN
-/* Additional extension a shared object might have. */
-#undef EXTRA_SHLIB_EXTENSION
+/* Version number of package */
+#undef VERSION
+/* Define to 1 if `lex' declares `yytext' as a `char *' by default, not a
+ `char[]'. */
+#undef YYTEXT_POINTER
diff --git a/contrib/binutils/ld/configure b/contrib/binutils/ld/configure
index 410f9c2..b317905 100755
--- a/contrib/binutils/ld/configure
+++ b/contrib/binutils/ld/configure
@@ -1,55 +1,474 @@
#! /bin/sh
-
# Guess values for system-dependent variables and create Makefiles.
-# Generated automatically using autoconf version 2.13
-# Copyright (C) 1992, 93, 94, 95, 96 Free Software Foundation, Inc.
+# Generated by GNU Autoconf 2.59.
#
+# Copyright (C) 2003 Free Software Foundation, Inc.
# This configure script is free software; the Free Software Foundation
# gives unlimited permission to copy, distribute and modify it.
+## --------------------- ##
+## M4sh Initialization. ##
+## --------------------- ##
+
+# Be Bourne compatible
+if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then
+ emulate sh
+ NULLCMD=:
+ # Zsh 3.x and 4.x performs word splitting on ${1+"$@"}, which
+ # is contrary to our usage. Disable this feature.
+ alias -g '${1+"$@"}'='"$@"'
+elif test -n "${BASH_VERSION+set}" && (set -o posix) >/dev/null 2>&1; then
+ set -o posix
+fi
+DUALCASE=1; export DUALCASE # for MKS sh
+
+# Support unset when possible.
+if ( (MAIL=60; unset MAIL) || exit) >/dev/null 2>&1; then
+ as_unset=unset
+else
+ as_unset=false
+fi
+
+
+# Work around bugs in pre-3.0 UWIN ksh.
+$as_unset ENV MAIL MAILPATH
+PS1='$ '
+PS2='> '
+PS4='+ '
+
+# NLS nuisances.
+for as_var in \
+ LANG LANGUAGE LC_ADDRESS LC_ALL LC_COLLATE LC_CTYPE LC_IDENTIFICATION \
+ LC_MEASUREMENT LC_MESSAGES LC_MONETARY LC_NAME LC_NUMERIC LC_PAPER \
+ LC_TELEPHONE LC_TIME
+do
+ if (set +x; test -z "`(eval $as_var=C; export $as_var) 2>&1`"); then
+ eval $as_var=C; export $as_var
+ else
+ $as_unset $as_var
+ fi
+done
+
+# Required to use basename.
+if expr a : '\(a\)' >/dev/null 2>&1; then
+ as_expr=expr
+else
+ as_expr=false
+fi
+
+if (basename /) >/dev/null 2>&1 && test "X`basename / 2>&1`" = "X/"; then
+ as_basename=basename
+else
+ as_basename=false
+fi
+
+
+# Name of the executable.
+as_me=`$as_basename "$0" ||
+$as_expr X/"$0" : '.*/\([^/][^/]*\)/*$' \| \
+ X"$0" : 'X\(//\)$' \| \
+ X"$0" : 'X\(/\)$' \| \
+ . : '\(.\)' 2>/dev/null ||
+echo X/"$0" |
+ sed '/^.*\/\([^/][^/]*\)\/*$/{ s//\1/; q; }
+ /^X\/\(\/\/\)$/{ s//\1/; q; }
+ /^X\/\(\/\).*/{ s//\1/; q; }
+ s/.*/./; q'`
+
+
+# PATH needs CR, and LINENO needs CR and PATH.
+# Avoid depending upon Character Ranges.
+as_cr_letters='abcdefghijklmnopqrstuvwxyz'
+as_cr_LETTERS='ABCDEFGHIJKLMNOPQRSTUVWXYZ'
+as_cr_Letters=$as_cr_letters$as_cr_LETTERS
+as_cr_digits='0123456789'
+as_cr_alnum=$as_cr_Letters$as_cr_digits
+
+# The user is always right.
+if test "${PATH_SEPARATOR+set}" != set; then
+ echo "#! /bin/sh" >conf$$.sh
+ echo "exit 0" >>conf$$.sh
+ chmod +x conf$$.sh
+ if (PATH="/nonexistent;."; conf$$.sh) >/dev/null 2>&1; then
+ PATH_SEPARATOR=';'
+ else
+ PATH_SEPARATOR=:
+ fi
+ rm -f conf$$.sh
+fi
+
+
+ as_lineno_1=$LINENO
+ as_lineno_2=$LINENO
+ as_lineno_3=`(expr $as_lineno_1 + 1) 2>/dev/null`
+ test "x$as_lineno_1" != "x$as_lineno_2" &&
+ test "x$as_lineno_3" = "x$as_lineno_2" || {
+ # Find who we are. Look in the path if we contain no path at all
+ # relative or not.
+ case $0 in
+ *[\\/]* ) as_myself=$0 ;;
+ *) as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
+for as_dir in $PATH
+do
+ IFS=$as_save_IFS
+ test -z "$as_dir" && as_dir=.
+ test -r "$as_dir/$0" && as_myself=$as_dir/$0 && break
+done
+
+ ;;
+ esac
+ # We did not find ourselves, most probably we were run as `sh COMMAND'
+ # in which case we are not to be found in the path.
+ if test "x$as_myself" = x; then
+ as_myself=$0
+ fi
+ if test ! -f "$as_myself"; then
+ { echo "$as_me: error: cannot find myself; rerun with an absolute path" >&2
+ { (exit 1); exit 1; }; }
+ fi
+ case $CONFIG_SHELL in
+ '')
+ as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
+for as_dir in /bin$PATH_SEPARATOR/usr/bin$PATH_SEPARATOR$PATH
+do
+ IFS=$as_save_IFS
+ test -z "$as_dir" && as_dir=.
+ for as_base in sh bash ksh sh5; do
+ case $as_dir in
+ /*)
+ if ("$as_dir/$as_base" -c '
+ as_lineno_1=$LINENO
+ as_lineno_2=$LINENO
+ as_lineno_3=`(expr $as_lineno_1 + 1) 2>/dev/null`
+ test "x$as_lineno_1" != "x$as_lineno_2" &&
+ test "x$as_lineno_3" = "x$as_lineno_2" ') 2>/dev/null; then
+ $as_unset BASH_ENV || test "${BASH_ENV+set}" != set || { BASH_ENV=; export BASH_ENV; }
+ $as_unset ENV || test "${ENV+set}" != set || { ENV=; export ENV; }
+ CONFIG_SHELL=$as_dir/$as_base
+ export CONFIG_SHELL
+ exec "$CONFIG_SHELL" "$0" ${1+"$@"}
+ fi;;
+ esac
+ done
+done
+;;
+ esac
+
+ # Create $as_me.lineno as a copy of $as_myself, but with $LINENO
+ # uniformly replaced by the line number. The first 'sed' inserts a
+ # line-number line before each line; the second 'sed' does the real
+ # work. The second script uses 'N' to pair each line-number line
+ # with the numbered line, and appends trailing '-' during
+ # substitution so that $LINENO is not a special case at line end.
+ # (Raja R Harinath suggested sed '=', and Paul Eggert wrote the
+ # second 'sed' script. Blame Lee E. McMahon for sed's syntax. :-)
+ sed '=' <$as_myself |
+ sed '
+ N
+ s,$,-,
+ : loop
+ s,^\(['$as_cr_digits']*\)\(.*\)[$]LINENO\([^'$as_cr_alnum'_]\),\1\2\1\3,
+ t loop
+ s,-$,,
+ s,^['$as_cr_digits']*\n,,
+ ' >$as_me.lineno &&
+ chmod +x $as_me.lineno ||
+ { echo "$as_me: error: cannot create $as_me.lineno; rerun with a POSIX shell" >&2
+ { (exit 1); exit 1; }; }
+
+ # Don't try to exec as it changes $[0], causing all sort of problems
+ # (the dirname of $[0] is not the place where we might find the
+ # original and so on. Autoconf is especially sensible to this).
+ . ./$as_me.lineno
+ # Exit status is that of the last command.
+ exit
+}
+
+
+case `echo "testing\c"; echo 1,2,3`,`echo -n testing; echo 1,2,3` in
+ *c*,-n*) ECHO_N= ECHO_C='
+' ECHO_T=' ' ;;
+ *c*,* ) ECHO_N=-n ECHO_C= ECHO_T= ;;
+ *) ECHO_N= ECHO_C='\c' ECHO_T= ;;
+esac
+
+if expr a : '\(a\)' >/dev/null 2>&1; then
+ as_expr=expr
+else
+ as_expr=false
+fi
+
+rm -f conf$$ conf$$.exe conf$$.file
+echo >conf$$.file
+if ln -s conf$$.file conf$$ 2>/dev/null; then
+ # We could just check for DJGPP; but this test a) works b) is more generic
+ # and c) will remain valid once DJGPP supports symlinks (DJGPP 2.04).
+ if test -f conf$$.exe; then
+ # Don't use ln at all; we don't have any links
+ as_ln_s='cp -p'
+ else
+ as_ln_s='ln -s'
+ fi
+elif ln conf$$.file conf$$ 2>/dev/null; then
+ as_ln_s=ln
+else
+ as_ln_s='cp -p'
+fi
+rm -f conf$$ conf$$.exe conf$$.file
+
+if mkdir -p . 2>/dev/null; then
+ as_mkdir_p=:
+else
+ test -d ./-p && rmdir ./-p
+ as_mkdir_p=false
+fi
+
+as_executable_p="test -f"
+
+# Sed expression to map a string onto a valid CPP name.
+as_tr_cpp="eval sed 'y%*$as_cr_letters%P$as_cr_LETTERS%;s%[^_$as_cr_alnum]%_%g'"
+
+# Sed expression to map a string onto a valid variable name.
+as_tr_sh="eval sed 'y%*+%pp%;s%[^_$as_cr_alnum]%_%g'"
+
+
+# IFS
+# We need space, tab and new line, in precisely that order.
+as_nl='
+'
+IFS=" $as_nl"
+
+# CDPATH.
+$as_unset CDPATH
+
+
+
+# Check that we are running under the correct shell.
+SHELL=${CONFIG_SHELL-/bin/sh}
+
+case X$lt_ECHO in
+X*--fallback-echo)
+ # Remove one level of quotation (which was required for Make).
+ ECHO=`echo "$lt_ECHO" | sed 's,\\\\\$\\$0,'$0','`
+ ;;
+esac
+
+ECHO=${lt_ECHO-echo}
+if test "X$1" = X--no-reexec; then
+ # Discard the --no-reexec flag, and continue.
+ shift
+elif test "X$1" = X--fallback-echo; then
+ # Avoid inline document here, it may be left over
+ :
+elif test "X`{ $ECHO '\t'; } 2>/dev/null`" = 'X\t' ; then
+ # Yippee, $ECHO works!
+ :
+else
+ # Restart under the correct shell.
+ exec $SHELL "$0" --no-reexec ${1+"$@"}
+fi
+
+if test "X$1" = X--fallback-echo; then
+ # used as fallback echo
+ shift
+ cat <<_LT_EOF
+$*
+_LT_EOF
+ exit 0
+fi
+
+# The HP-UX ksh and POSIX shell print the target directory to stdout
+# if CDPATH is set.
+(unset CDPATH) >/dev/null 2>&1 && unset CDPATH
+
+if test -z "$lt_ECHO"; then
+ if test "X${echo_test_string+set}" != Xset; then
+ # find a string as large as possible, as long as the shell can cope with it
+ for cmd in 'sed 50q "$0"' 'sed 20q "$0"' 'sed 10q "$0"' 'sed 2q "$0"' 'echo test'; do
+ # expected sizes: less than 2Kb, 1Kb, 512 bytes, 16 bytes, ...
+ if { echo_test_string=`eval $cmd`; } 2>/dev/null &&
+ { test "X$echo_test_string" = "X$echo_test_string"; } 2>/dev/null
+ then
+ break
+ fi
+ done
+ fi
-# Defaults:
-ac_help=
+ if test "X`{ $ECHO '\t'; } 2>/dev/null`" = 'X\t' &&
+ echo_testing_string=`{ $ECHO "$echo_test_string"; } 2>/dev/null` &&
+ test "X$echo_testing_string" = "X$echo_test_string"; then
+ :
+ else
+ # The Solaris, AIX, and Digital Unix default echo programs unquote
+ # backslashes. This makes it impossible to quote backslashes using
+ # echo "$something" | sed 's/\\/\\\\/g'
+ #
+ # So, first we look for a working echo in the user's PATH.
+
+ lt_save_ifs="$IFS"; IFS=$PATH_SEPARATOR
+ for dir in $PATH /usr/ucb; do
+ IFS="$lt_save_ifs"
+ if (test -f $dir/echo || test -f $dir/echo$ac_exeext) &&
+ test "X`($dir/echo '\t') 2>/dev/null`" = 'X\t' &&
+ echo_testing_string=`($dir/echo "$echo_test_string") 2>/dev/null` &&
+ test "X$echo_testing_string" = "X$echo_test_string"; then
+ ECHO="$dir/echo"
+ break
+ fi
+ done
+ IFS="$lt_save_ifs"
+
+ if test "X$ECHO" = Xecho; then
+ # We didn't find a better echo, so look for alternatives.
+ if test "X`{ print -r '\t'; } 2>/dev/null`" = 'X\t' &&
+ echo_testing_string=`{ print -r "$echo_test_string"; } 2>/dev/null` &&
+ test "X$echo_testing_string" = "X$echo_test_string"; then
+ # This shell has a builtin print -r that does the trick.
+ ECHO='print -r'
+ elif { test -f /bin/ksh || test -f /bin/ksh$ac_exeext; } &&
+ test "X$CONFIG_SHELL" != X/bin/ksh; then
+ # If we have ksh, try running configure again with it.
+ ORIGINAL_CONFIG_SHELL=${CONFIG_SHELL-/bin/sh}
+ export ORIGINAL_CONFIG_SHELL
+ CONFIG_SHELL=/bin/ksh
+ export CONFIG_SHELL
+ exec $CONFIG_SHELL "$0" --no-reexec ${1+"$@"}
+ else
+ # Try using printf.
+ ECHO='printf %s\n'
+ if test "X`{ $ECHO '\t'; } 2>/dev/null`" = 'X\t' &&
+ echo_testing_string=`{ $ECHO "$echo_test_string"; } 2>/dev/null` &&
+ test "X$echo_testing_string" = "X$echo_test_string"; then
+ # Cool, printf works
+ :
+ elif echo_testing_string=`($ORIGINAL_CONFIG_SHELL "$0" --fallback-echo '\t') 2>/dev/null` &&
+ test "X$echo_testing_string" = 'X\t' &&
+ echo_testing_string=`($ORIGINAL_CONFIG_SHELL "$0" --fallback-echo "$echo_test_string") 2>/dev/null` &&
+ test "X$echo_testing_string" = "X$echo_test_string"; then
+ CONFIG_SHELL=$ORIGINAL_CONFIG_SHELL
+ export CONFIG_SHELL
+ SHELL="$CONFIG_SHELL"
+ export SHELL
+ ECHO="$CONFIG_SHELL $0 --fallback-echo"
+ elif echo_testing_string=`($CONFIG_SHELL "$0" --fallback-echo '\t') 2>/dev/null` &&
+ test "X$echo_testing_string" = 'X\t' &&
+ echo_testing_string=`($CONFIG_SHELL "$0" --fallback-echo "$echo_test_string") 2>/dev/null` &&
+ test "X$echo_testing_string" = "X$echo_test_string"; then
+ ECHO="$CONFIG_SHELL $0 --fallback-echo"
+ else
+ # maybe with a smaller string...
+ prev=:
+
+ for cmd in 'echo test' 'sed 2q "$0"' 'sed 10q "$0"' 'sed 20q "$0"' 'sed 50q "$0"'; do
+ if { test "X$echo_test_string" = "X`eval $cmd`"; } 2>/dev/null
+ then
+ break
+ fi
+ prev="$cmd"
+ done
+
+ if test "$prev" != 'sed 50q "$0"'; then
+ echo_test_string=`eval $prev`
+ export echo_test_string
+ exec ${ORIGINAL_CONFIG_SHELL-${CONFIG_SHELL-/bin/sh}} "$0" ${1+"$@"}
+ else
+ # Oops. We lost completely, so just stick with echo.
+ ECHO=echo
+ fi
+ fi
+ fi
+ fi
+ fi
+fi
+
+# Copy echo and quote the copy suitably for passing to libtool from
+# the Makefile, instead of quoting the original, which is used later.
+lt_ECHO=$ECHO
+if test "X$lt_ECHO" = "X$CONFIG_SHELL $0 --fallback-echo"; then
+ lt_ECHO="$CONFIG_SHELL \\\$\$0 --fallback-echo"
+fi
+
+
+
+
+# Name of the host.
+# hostname on some systems (SVR3.2, Linux) returns a bogus exit status,
+# so uname gets run too.
+ac_hostname=`(hostname || uname -n) 2>/dev/null | sed 1q`
+
+exec 6>&1
+
+#
+# Initializations.
+#
ac_default_prefix=/usr/local
-# Any additions from configure.in:
-ac_help="$ac_help
- --enable-shared[=PKGS] build shared libraries [default=yes]"
-ac_help="$ac_help
- --enable-static[=PKGS] build static libraries [default=yes]"
-ac_help="$ac_help
- --enable-fast-install[=PKGS] optimize for fast installation [default=yes]"
-ac_help="$ac_help
- --with-gnu-ld assume the C compiler uses GNU ld [default=no]"
-ac_help="$ac_help
- --disable-libtool-lock avoid locking (might break parallel builds)"
-ac_help="$ac_help
- --with-pic try to use only PIC/non-PIC objects [default=use both]"
-ac_help="$ac_help
- --with-lib-path=dir1:dir2... set default LIB_PATH"
-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
- --with-sysroot[=DIR] Search for usr/lib et al within DIR."
-ac_help="$ac_help
- --enable-build-warnings enable build-time compiler warnings if gcc is used"
-ac_help="$ac_help
- --disable-nls do not use Native Language Support"
-ac_help="$ac_help
- --with-included-gettext use the GNU gettext library included here"
-ac_help="$ac_help
- --enable-maintainer-mode enable make rules and dependencies not useful
- (and sometimes confusing) to the casual installer"
+ac_config_libobj_dir=.
+cross_compiling=no
+subdirs=
+MFLAGS=
+MAKEFLAGS=
+SHELL=${CONFIG_SHELL-/bin/sh}
+
+# Maximum number of lines to put in a shell here document.
+# This variable seems obsolete. It should probably be removed, and
+# only ac_max_sed_lines should be used.
+: ${ac_max_here_lines=38}
+
+# Identity of this package.
+PACKAGE_NAME=
+PACKAGE_TARNAME=
+PACKAGE_VERSION=
+PACKAGE_STRING=
+PACKAGE_BUGREPORT=
+
+ac_unique_file="ldmain.c"
+# Factoring default headers for most tests.
+ac_includes_default="\
+#include <stdio.h>
+#if HAVE_SYS_TYPES_H
+# include <sys/types.h>
+#endif
+#if HAVE_SYS_STAT_H
+# include <sys/stat.h>
+#endif
+#if STDC_HEADERS
+# include <stdlib.h>
+# include <stddef.h>
+#else
+# if HAVE_STDLIB_H
+# include <stdlib.h>
+# endif
+#endif
+#if HAVE_STRING_H
+# if !STDC_HEADERS && HAVE_MEMORY_H
+# include <memory.h>
+# endif
+# include <string.h>
+#endif
+#if HAVE_STRINGS_H
+# include <strings.h>
+#endif
+#if HAVE_INTTYPES_H
+# include <inttypes.h>
+#else
+# if HAVE_STDINT_H
+# include <stdint.h>
+# endif
+#endif
+#if HAVE_UNISTD_H
+# include <unistd.h>
+#endif"
+
+ac_subst_vars='SHELL PATH_SEPARATOR PACKAGE_NAME PACKAGE_TARNAME PACKAGE_VERSION PACKAGE_STRING PACKAGE_BUGREPORT exec_prefix prefix program_transform_name bindir sbindir libexecdir datadir sysconfdir sharedstatedir localstatedir libdir includedir oldincludedir infodir mandir build_alias host_alias target_alias DEFS ECHO_C ECHO_N ECHO_T LIBS build build_cpu build_vendor build_os host host_cpu host_vendor host_os target target_cpu target_vendor target_os CC CFLAGS LDFLAGS CPPFLAGS ac_ct_CC EXEEXT OBJEXT INSTALL_PROGRAM INSTALL_SCRIPT INSTALL_DATA CYGPATH_W PACKAGE VERSION ACLOCAL AUTOCONF AUTOMAKE AUTOHEADER MAKEINFO install_sh STRIP ac_ct_STRIP INSTALL_STRIP_PROGRAM mkdir_p AWK SET_MAKE am__leading_dot AMTAR am__tar am__untar DEPDIR am__include am__quote AMDEP_TRUE AMDEP_FALSE AMDEPBACKSLASH CCDEPMODE am__fastdepCC_TRUE am__fastdepCC_FALSE LIBTOOL SED EGREP FGREP GREP LD DUMPBIN ac_ct_DUMPBIN NM LN_S AR ac_ct_AR RANLIB ac_ct_RANLIB lt_ECHO CPP use_sysroot TARGET_SYSTEM_ROOT TARGET_SYSTEM_ROOT_DEFINE WARN_CFLAGS NO_WERROR USE_NLS LIBINTL LIBINTL_DEP INCINTL XGETTEXT GMSGFMT POSUB CATALOGS DATADIRNAME INSTOBJEXT GENCAT CATOBJEXT MKINSTALLDIRS MSGFMT MSGMERGE YACC LEX LEXLIB LEX_OUTPUT_ROOT MAINTAINER_MODE_TRUE MAINTAINER_MODE_FALSE MAINT GENINSRC_NEVER_TRUE GENINSRC_NEVER_FALSE HDEFINES HOSTING_CRT0 HOSTING_LIBS NATIVE_LIB_DIRS STRINGIFY EMUL EMULATION_OFILES EMUL_EXTRA_OFILES LIB_PATH EMULATION_LIBPATH TESTBFDLIB datarootdir docdir htmldir LIBOBJS LTLIBOBJS'
+ac_subst_files='TDIRS'
# Initialize some variables set by options.
+ac_init_help=
+ac_init_version=false
# The variables have the same names as the options, with
# dashes changed to underlines.
-build=NONE
-cache_file=./config.cache
+cache_file=/dev/null
exec_prefix=NONE
-host=NONE
no_create=
-nonopt=NONE
no_recursion=
prefix=NONE
program_prefix=NONE
@@ -57,12 +476,16 @@ program_suffix=NONE
program_transform_name=s,x,x,
silent=
site=
-sitefile=
srcdir=
-target=NONE
verbose=
x_includes=NONE
x_libraries=NONE
+
+# Installation directory options.
+# These are left unexpanded so users can "make install exec_prefix=/foo"
+# and all the variables that are supposed to be based on exec_prefix
+# by default will actually change.
+# Use braces instead of parens because sh, perl, etc. also accept them.
bindir='${exec_prefix}/bin'
sbindir='${exec_prefix}/sbin'
libexecdir='${exec_prefix}/libexec'
@@ -76,17 +499,9 @@ oldincludedir='/usr/include'
infodir='${prefix}/info'
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
-
ac_prev=
for ac_option
do
-
# If the previous option needs an argument, assign it.
if test -n "$ac_prev"; then
eval "$ac_prev=\$ac_option"
@@ -94,59 +509,59 @@ do
continue
fi
- case "$ac_option" in
- -*=*) ac_optarg=`echo "$ac_option" | sed 's/[-_a-zA-Z0-9]*=//'` ;;
- *) ac_optarg= ;;
- esac
+ ac_optarg=`expr "x$ac_option" : 'x[^=]*=\(.*\)'`
# Accept the important Cygnus configure options, so we can diagnose typos.
- case "$ac_option" in
+ case $ac_option in
-bindir | --bindir | --bindi | --bind | --bin | --bi)
ac_prev=bindir ;;
-bindir=* | --bindir=* | --bindi=* | --bind=* | --bin=* | --bi=*)
- bindir="$ac_optarg" ;;
+ bindir=$ac_optarg ;;
-build | --build | --buil | --bui | --bu)
- ac_prev=build ;;
+ ac_prev=build_alias ;;
-build=* | --build=* | --buil=* | --bui=* | --bu=*)
- build="$ac_optarg" ;;
+ build_alias=$ac_optarg ;;
-cache-file | --cache-file | --cache-fil | --cache-fi \
| --cache-f | --cache- | --cache | --cach | --cac | --ca | --c)
ac_prev=cache_file ;;
-cache-file=* | --cache-file=* | --cache-fil=* | --cache-fi=* \
| --cache-f=* | --cache-=* | --cache=* | --cach=* | --cac=* | --ca=* | --c=*)
- cache_file="$ac_optarg" ;;
+ cache_file=$ac_optarg ;;
+
+ --config-cache | -C)
+ cache_file=config.cache ;;
-datadir | --datadir | --datadi | --datad | --data | --dat | --da)
ac_prev=datadir ;;
-datadir=* | --datadir=* | --datadi=* | --datad=* | --data=* | --dat=* \
| --da=*)
- datadir="$ac_optarg" ;;
+ datadir=$ac_optarg ;;
-disable-* | --disable-*)
- ac_feature=`echo $ac_option|sed -e 's/-*disable-//'`
+ ac_feature=`expr "x$ac_option" : 'x-*disable-\(.*\)'`
# Reject names that are not valid shell variable names.
- if test -n "`echo $ac_feature| sed 's/[-a-zA-Z0-9_]//g'`"; then
- { echo "configure: error: $ac_feature: invalid feature name" 1>&2; exit 1; }
- fi
- ac_feature=`echo $ac_feature| sed 's/-/_/g'`
- eval "enable_${ac_feature}=no" ;;
+ expr "x$ac_feature" : ".*[^-_$as_cr_alnum]" >/dev/null &&
+ { echo "$as_me: error: invalid feature name: $ac_feature" >&2
+ { (exit 1); exit 1; }; }
+ ac_feature=`echo $ac_feature | sed 's/-/_/g'`
+ eval "enable_$ac_feature=no" ;;
-enable-* | --enable-*)
- ac_feature=`echo $ac_option|sed -e 's/-*enable-//' -e 's/=.*//'`
+ ac_feature=`expr "x$ac_option" : 'x-*enable-\([^=]*\)'`
# Reject names that are not valid shell variable names.
- if test -n "`echo $ac_feature| sed 's/[-_a-zA-Z0-9]//g'`"; then
- { echo "configure: error: $ac_feature: invalid feature name" 1>&2; exit 1; }
- fi
- ac_feature=`echo $ac_feature| sed 's/-/_/g'`
- case "$ac_option" in
- *=*) ;;
+ expr "x$ac_feature" : ".*[^-_$as_cr_alnum]" >/dev/null &&
+ { echo "$as_me: error: invalid feature name: $ac_feature" >&2
+ { (exit 1); exit 1; }; }
+ ac_feature=`echo $ac_feature | sed 's/-/_/g'`
+ case $ac_option in
+ *=*) ac_optarg=`echo "$ac_optarg" | sed "s/'/'\\\\\\\\''/g"`;;
*) ac_optarg=yes ;;
esac
- eval "enable_${ac_feature}='$ac_optarg'" ;;
+ eval "enable_$ac_feature='$ac_optarg'" ;;
-exec-prefix | --exec_prefix | --exec-prefix | --exec-prefi \
| --exec-pref | --exec-pre | --exec-pr | --exec-p | --exec- \
@@ -155,96 +570,47 @@ do
-exec-prefix=* | --exec_prefix=* | --exec-prefix=* | --exec-prefi=* \
| --exec-pref=* | --exec-pre=* | --exec-pr=* | --exec-p=* | --exec-=* \
| --exec=* | --exe=* | --ex=*)
- exec_prefix="$ac_optarg" ;;
+ exec_prefix=$ac_optarg ;;
-gas | --gas | --ga | --g)
# Obsolete; use --with-gas.
with_gas=yes ;;
- -help | --help | --hel | --he)
- # Omit some internal or obsolete options to make the list less imposing.
- # This message is too long to be a string in the A/UX 3.1 sh.
- cat << EOF
-Usage: configure [options] [host]
-Options: [defaults in brackets after descriptions]
-Configuration:
- --cache-file=FILE cache test results in FILE
- --help print this message
- --no-create do not create output files
- --quiet, --silent do not print \`checking...' messages
- --site-file=FILE use FILE as the site file
- --version print the version of autoconf that created configure
-Directory and file names:
- --prefix=PREFIX install architecture-independent files in PREFIX
- [$ac_default_prefix]
- --exec-prefix=EPREFIX install architecture-dependent files in EPREFIX
- [same as prefix]
- --bindir=DIR user executables in DIR [EPREFIX/bin]
- --sbindir=DIR system admin executables in DIR [EPREFIX/sbin]
- --libexecdir=DIR program executables in DIR [EPREFIX/libexec]
- --datadir=DIR read-only architecture-independent data in DIR
- [PREFIX/share]
- --sysconfdir=DIR read-only single-machine data in DIR [PREFIX/etc]
- --sharedstatedir=DIR modifiable architecture-independent data in DIR
- [PREFIX/com]
- --localstatedir=DIR modifiable single-machine data in DIR [PREFIX/var]
- --libdir=DIR object code libraries in DIR [EPREFIX/lib]
- --includedir=DIR C header files in DIR [PREFIX/include]
- --oldincludedir=DIR C header files for non-gcc in DIR [/usr/include]
- --infodir=DIR info documentation in DIR [PREFIX/info]
- --mandir=DIR man documentation in DIR [PREFIX/man]
- --srcdir=DIR find the sources in DIR [configure dir or ..]
- --program-prefix=PREFIX prepend PREFIX to installed program names
- --program-suffix=SUFFIX append SUFFIX to installed program names
- --program-transform-name=PROGRAM
- run sed PROGRAM on installed program names
-EOF
- cat << EOF
-Host type:
- --build=BUILD configure for building on BUILD [BUILD=HOST]
- --host=HOST configure for HOST [guessed]
- --target=TARGET configure for TARGET [TARGET=HOST]
-Features and packages:
- --disable-FEATURE do not include FEATURE (same as --enable-FEATURE=no)
- --enable-FEATURE[=ARG] include FEATURE [ARG=yes]
- --with-PACKAGE[=ARG] use PACKAGE [ARG=yes]
- --without-PACKAGE do not use PACKAGE (same as --with-PACKAGE=no)
- --x-includes=DIR X include files are in DIR
- --x-libraries=DIR X library files are in DIR
-EOF
- if test -n "$ac_help"; then
- echo "--enable and --with options recognized:$ac_help"
- fi
- exit 0 ;;
+ -help | --help | --hel | --he | -h)
+ ac_init_help=long ;;
+ -help=r* | --help=r* | --hel=r* | --he=r* | -hr*)
+ ac_init_help=recursive ;;
+ -help=s* | --help=s* | --hel=s* | --he=s* | -hs*)
+ ac_init_help=short ;;
-host | --host | --hos | --ho)
- ac_prev=host ;;
+ ac_prev=host_alias ;;
-host=* | --host=* | --hos=* | --ho=*)
- host="$ac_optarg" ;;
+ host_alias=$ac_optarg ;;
-includedir | --includedir | --includedi | --included | --include \
| --includ | --inclu | --incl | --inc)
ac_prev=includedir ;;
-includedir=* | --includedir=* | --includedi=* | --included=* | --include=* \
| --includ=* | --inclu=* | --incl=* | --inc=*)
- includedir="$ac_optarg" ;;
+ includedir=$ac_optarg ;;
-infodir | --infodir | --infodi | --infod | --info | --inf)
ac_prev=infodir ;;
-infodir=* | --infodir=* | --infodi=* | --infod=* | --info=* | --inf=*)
- infodir="$ac_optarg" ;;
+ infodir=$ac_optarg ;;
-libdir | --libdir | --libdi | --libd)
ac_prev=libdir ;;
-libdir=* | --libdir=* | --libdi=* | --libd=*)
- libdir="$ac_optarg" ;;
+ libdir=$ac_optarg ;;
-libexecdir | --libexecdir | --libexecdi | --libexecd | --libexec \
| --libexe | --libex | --libe)
ac_prev=libexecdir ;;
-libexecdir=* | --libexecdir=* | --libexecdi=* | --libexecd=* | --libexec=* \
| --libexe=* | --libex=* | --libe=*)
- libexecdir="$ac_optarg" ;;
+ libexecdir=$ac_optarg ;;
-localstatedir | --localstatedir | --localstatedi | --localstated \
| --localstate | --localstat | --localsta | --localst \
@@ -253,19 +619,19 @@ EOF
-localstatedir=* | --localstatedir=* | --localstatedi=* | --localstated=* \
| --localstate=* | --localstat=* | --localsta=* | --localst=* \
| --locals=* | --local=* | --loca=* | --loc=* | --lo=*)
- localstatedir="$ac_optarg" ;;
+ localstatedir=$ac_optarg ;;
-mandir | --mandir | --mandi | --mand | --man | --ma | --m)
ac_prev=mandir ;;
-mandir=* | --mandir=* | --mandi=* | --mand=* | --man=* | --ma=* | --m=*)
- mandir="$ac_optarg" ;;
+ mandir=$ac_optarg ;;
-nfp | --nfp | --nf)
# Obsolete; use --without-fp.
with_fp=no ;;
-no-create | --no-create | --no-creat | --no-crea | --no-cre \
- | --no-cr | --no-c)
+ | --no-cr | --no-c | -n)
no_create=yes ;;
-no-recursion | --no-recursion | --no-recursio | --no-recursi \
@@ -279,26 +645,26 @@ EOF
-oldincludedir=* | --oldincludedir=* | --oldincludedi=* | --oldincluded=* \
| --oldinclude=* | --oldinclud=* | --oldinclu=* | --oldincl=* | --oldinc=* \
| --oldin=* | --oldi=* | --old=* | --ol=* | --o=*)
- oldincludedir="$ac_optarg" ;;
+ oldincludedir=$ac_optarg ;;
-prefix | --prefix | --prefi | --pref | --pre | --pr | --p)
ac_prev=prefix ;;
-prefix=* | --prefix=* | --prefi=* | --pref=* | --pre=* | --pr=* | --p=*)
- prefix="$ac_optarg" ;;
+ prefix=$ac_optarg ;;
-program-prefix | --program-prefix | --program-prefi | --program-pref \
| --program-pre | --program-pr | --program-p)
ac_prev=program_prefix ;;
-program-prefix=* | --program-prefix=* | --program-prefi=* \
| --program-pref=* | --program-pre=* | --program-pr=* | --program-p=*)
- program_prefix="$ac_optarg" ;;
+ program_prefix=$ac_optarg ;;
-program-suffix | --program-suffix | --program-suffi | --program-suff \
| --program-suf | --program-su | --program-s)
ac_prev=program_suffix ;;
-program-suffix=* | --program-suffix=* | --program-suffi=* \
| --program-suff=* | --program-suf=* | --program-su=* | --program-s=*)
- program_suffix="$ac_optarg" ;;
+ program_suffix=$ac_optarg ;;
-program-transform-name | --program-transform-name \
| --program-transform-nam | --program-transform-na \
@@ -315,7 +681,7 @@ EOF
| --program-transfo=* | --program-transf=* \
| --program-trans=* | --program-tran=* \
| --progr-tra=* | --program-tr=* | --program-t=*)
- program_transform_name="$ac_optarg" ;;
+ program_transform_name=$ac_optarg ;;
-q | -quiet | --quiet | --quie | --qui | --qu | --q \
| -silent | --silent | --silen | --sile | --sil)
@@ -325,7 +691,7 @@ EOF
ac_prev=sbindir ;;
-sbindir=* | --sbindir=* | --sbindi=* | --sbind=* | --sbin=* \
| --sbi=* | --sb=*)
- sbindir="$ac_optarg" ;;
+ sbindir=$ac_optarg ;;
-sharedstatedir | --sharedstatedir | --sharedstatedi \
| --sharedstated | --sharedstate | --sharedstat | --sharedsta \
@@ -336,63 +702,57 @@ EOF
| --sharedstated=* | --sharedstate=* | --sharedstat=* | --sharedsta=* \
| --sharedst=* | --shareds=* | --shared=* | --share=* | --shar=* \
| --sha=* | --sh=*)
- sharedstatedir="$ac_optarg" ;;
+ sharedstatedir=$ac_optarg ;;
-site | --site | --sit)
ac_prev=site ;;
-site=* | --site=* | --sit=*)
- site="$ac_optarg" ;;
-
- -site-file | --site-file | --site-fil | --site-fi | --site-f)
- ac_prev=sitefile ;;
- -site-file=* | --site-file=* | --site-fil=* | --site-fi=* | --site-f=*)
- sitefile="$ac_optarg" ;;
+ site=$ac_optarg ;;
-srcdir | --srcdir | --srcdi | --srcd | --src | --sr)
ac_prev=srcdir ;;
-srcdir=* | --srcdir=* | --srcdi=* | --srcd=* | --src=* | --sr=*)
- srcdir="$ac_optarg" ;;
+ srcdir=$ac_optarg ;;
-sysconfdir | --sysconfdir | --sysconfdi | --sysconfd | --sysconf \
| --syscon | --sysco | --sysc | --sys | --sy)
ac_prev=sysconfdir ;;
-sysconfdir=* | --sysconfdir=* | --sysconfdi=* | --sysconfd=* | --sysconf=* \
| --syscon=* | --sysco=* | --sysc=* | --sys=* | --sy=*)
- sysconfdir="$ac_optarg" ;;
+ sysconfdir=$ac_optarg ;;
-target | --target | --targe | --targ | --tar | --ta | --t)
- ac_prev=target ;;
+ ac_prev=target_alias ;;
-target=* | --target=* | --targe=* | --targ=* | --tar=* | --ta=* | --t=*)
- target="$ac_optarg" ;;
+ target_alias=$ac_optarg ;;
-v | -verbose | --verbose | --verbos | --verbo | --verb)
verbose=yes ;;
- -version | --version | --versio | --versi | --vers)
- echo "configure generated by autoconf version 2.13"
- exit 0 ;;
+ -version | --version | --versio | --versi | --vers | -V)
+ ac_init_version=: ;;
-with-* | --with-*)
- ac_package=`echo $ac_option|sed -e 's/-*with-//' -e 's/=.*//'`
+ ac_package=`expr "x$ac_option" : 'x-*with-\([^=]*\)'`
# Reject names that are not valid shell variable names.
- if test -n "`echo $ac_package| sed 's/[-_a-zA-Z0-9]//g'`"; then
- { echo "configure: error: $ac_package: invalid package name" 1>&2; exit 1; }
- fi
+ expr "x$ac_package" : ".*[^-_$as_cr_alnum]" >/dev/null &&
+ { echo "$as_me: error: invalid package name: $ac_package" >&2
+ { (exit 1); exit 1; }; }
ac_package=`echo $ac_package| sed 's/-/_/g'`
- case "$ac_option" in
- *=*) ;;
+ case $ac_option in
+ *=*) ac_optarg=`echo "$ac_optarg" | sed "s/'/'\\\\\\\\''/g"`;;
*) ac_optarg=yes ;;
esac
- eval "with_${ac_package}='$ac_optarg'" ;;
+ eval "with_$ac_package='$ac_optarg'" ;;
-without-* | --without-*)
- ac_package=`echo $ac_option|sed -e 's/-*without-//'`
+ ac_package=`expr "x$ac_option" : 'x-*without-\(.*\)'`
# Reject names that are not valid shell variable names.
- if test -n "`echo $ac_package| sed 's/[-a-zA-Z0-9_]//g'`"; then
- { echo "configure: error: $ac_package: invalid package name" 1>&2; exit 1; }
- fi
- ac_package=`echo $ac_package| sed 's/-/_/g'`
- eval "with_${ac_package}=no" ;;
+ expr "x$ac_package" : ".*[^-_$as_cr_alnum]" >/dev/null &&
+ { echo "$as_me: error: invalid package name: $ac_package" >&2
+ { (exit 1); exit 1; }; }
+ ac_package=`echo $ac_package | sed 's/-/_/g'`
+ eval "with_$ac_package=no" ;;
--x)
# Obsolete; use --with-x.
@@ -403,99 +763,110 @@ EOF
ac_prev=x_includes ;;
-x-includes=* | --x-includes=* | --x-include=* | --x-includ=* | --x-inclu=* \
| --x-incl=* | --x-inc=* | --x-in=* | --x-i=*)
- x_includes="$ac_optarg" ;;
+ x_includes=$ac_optarg ;;
-x-libraries | --x-libraries | --x-librarie | --x-librari \
| --x-librar | --x-libra | --x-libr | --x-lib | --x-li | --x-l)
ac_prev=x_libraries ;;
-x-libraries=* | --x-libraries=* | --x-librarie=* | --x-librari=* \
| --x-librar=* | --x-libra=* | --x-libr=* | --x-lib=* | --x-li=* | --x-l=*)
- x_libraries="$ac_optarg" ;;
+ x_libraries=$ac_optarg ;;
- -*) { echo "configure: error: $ac_option: invalid option; use --help to show usage" 1>&2; exit 1; }
+ -*) { echo "$as_me: error: unrecognized option: $ac_option
+Try \`$0 --help' for more information." >&2
+ { (exit 1); exit 1; }; }
;;
+ *=*)
+ ac_envvar=`expr "x$ac_option" : 'x\([^=]*\)='`
+ # Reject names that are not valid shell variable names.
+ expr "x$ac_envvar" : ".*[^_$as_cr_alnum]" >/dev/null &&
+ { echo "$as_me: error: invalid variable name: $ac_envvar" >&2
+ { (exit 1); exit 1; }; }
+ ac_optarg=`echo "$ac_optarg" | sed "s/'/'\\\\\\\\''/g"`
+ eval "$ac_envvar='$ac_optarg'"
+ export $ac_envvar ;;
+
*)
- if test -n "`echo $ac_option| sed 's/[-a-z0-9.]//g'`"; then
- echo "configure: warning: $ac_option: invalid host type" 1>&2
- fi
- if test "x$nonopt" != xNONE; then
- { echo "configure: error: can only configure for one host and one target at a time" 1>&2; exit 1; }
- fi
- nonopt="$ac_option"
+ # FIXME: should be removed in autoconf 3.0.
+ echo "$as_me: WARNING: you should use --build, --host, --target" >&2
+ expr "x$ac_option" : ".*[^-._$as_cr_alnum]" >/dev/null &&
+ echo "$as_me: WARNING: invalid host type: $ac_option" >&2
+ : ${build_alias=$ac_option} ${host_alias=$ac_option} ${target_alias=$ac_option}
;;
esac
done
if test -n "$ac_prev"; then
- { echo "configure: error: missing argument to --`echo $ac_prev | sed 's/_/-/g'`" 1>&2; exit 1; }
-fi
-
-trap 'rm -fr conftest* confdefs* core core.* *.core $ac_clean_files; exit 1' 1 2 15
-
-# File descriptor usage:
-# 0 standard input
-# 1 file creation
-# 2 errors and warnings
-# 3 some systems may open it to /dev/tty
-# 4 used on the Kubota Titan
-# 6 checking for... messages and results
-# 5 compiler messages saved in config.log
-if test "$silent" = yes; then
- exec 6>/dev/null
-else
- exec 6>&1
+ ac_option=--`echo $ac_prev | sed 's/_/-/g'`
+ { echo "$as_me: error: missing argument to $ac_option" >&2
+ { (exit 1); exit 1; }; }
fi
-exec 5>./config.log
-echo "\
-This file contains any messages produced by compilers while
-running configure, to aid debugging if configure makes a mistake.
-" 1>&5
+# Be sure to have absolute paths.
+for ac_var in exec_prefix prefix
+do
+ eval ac_val=$`echo $ac_var`
+ case $ac_val in
+ [\\/$]* | ?:[\\/]* | NONE | '' ) ;;
+ *) { echo "$as_me: error: expected an absolute directory name for --$ac_var: $ac_val" >&2
+ { (exit 1); exit 1; }; };;
+ esac
+done
-# Strip out --no-create and --no-recursion so they do not pile up.
-# Also quote any args containing shell metacharacters.
-ac_configure_args=
-for ac_arg
+# Be sure to have absolute paths.
+for ac_var in bindir sbindir libexecdir datadir sysconfdir sharedstatedir \
+ localstatedir libdir includedir oldincludedir infodir mandir
do
- case "$ac_arg" in
- -no-create | --no-create | --no-creat | --no-crea | --no-cre \
- | --no-cr | --no-c) ;;
- -no-recursion | --no-recursion | --no-recursio | --no-recursi \
- | --no-recurs | --no-recur | --no-recu | --no-rec | --no-re | --no-r) ;;
- *" "*|*" "*|*[\[\]\~\#\$\^\&\*\(\)\{\}\\\|\;\<\>\?]*)
- ac_configure_args="$ac_configure_args '$ac_arg'" ;;
- *) ac_configure_args="$ac_configure_args $ac_arg" ;;
+ eval ac_val=$`echo $ac_var`
+ case $ac_val in
+ [\\/$]* | ?:[\\/]* ) ;;
+ *) { echo "$as_me: error: expected an absolute directory name for --$ac_var: $ac_val" >&2
+ { (exit 1); exit 1; }; };;
esac
done
-# NLS nuisances.
-# Only set these to C if already set. These must not be set unconditionally
-# because not all systems understand e.g. LANG=C (notably SCO).
-# Fixing LC_MESSAGES prevents Solaris sh from translating var values in `set'!
-# Non-C LC_CTYPE values break the ctype check.
-if test "${LANG+set}" = set; then LANG=C; export LANG; fi
-if test "${LC_ALL+set}" = set; then LC_ALL=C; export LC_ALL; fi
-if test "${LC_MESSAGES+set}" = set; then LC_MESSAGES=C; export LC_MESSAGES; fi
-if test "${LC_CTYPE+set}" = set; then LC_CTYPE=C; export LC_CTYPE; fi
+# There might be people who depend on the old broken behavior: `$host'
+# used to hold the argument of --host etc.
+# FIXME: To remove some day.
+build=$build_alias
+host=$host_alias
+target=$target_alias
+
+# FIXME: To remove some day.
+if test "x$host_alias" != x; then
+ if test "x$build_alias" = x; then
+ cross_compiling=maybe
+ echo "$as_me: WARNING: If you wanted to set the --build type, don't use --host.
+ If a cross compiler is detected then cross compile mode will be used." >&2
+ elif test "x$build_alias" != "x$host_alias"; then
+ cross_compiling=yes
+ fi
+fi
-# confdefs.h avoids OS command line length limits that DEFS can exceed.
-rm -rf conftest* confdefs.h
-# AIX cpp loses on an empty file, so make sure it contains at least a newline.
-echo > confdefs.h
+ac_tool_prefix=
+test -n "$host_alias" && ac_tool_prefix=$host_alias-
+
+test "$silent" = yes && exec 6>/dev/null
-# A filename unique to this package, relative to the directory that
-# configure is in, which we can look for to find out if srcdir is correct.
-ac_unique_file=ldmain.c
# Find the source files, if location was not specified.
if test -z "$srcdir"; then
ac_srcdir_defaulted=yes
# Try the directory containing this script, then its parent.
- ac_prog=$0
- ac_confdir=`echo $ac_prog|sed 's%/[^/][^/]*$%%'`
- test "x$ac_confdir" = "x$ac_prog" && ac_confdir=.
+ ac_confdir=`(dirname "$0") 2>/dev/null ||
+$as_expr X"$0" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
+ X"$0" : 'X\(//\)[^/]' \| \
+ X"$0" : 'X\(//\)$' \| \
+ X"$0" : 'X\(/\)' \| \
+ . : '\(.\)' 2>/dev/null ||
+echo X"$0" |
+ sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ s//\1/; q; }
+ /^X\(\/\/\)[^/].*/{ s//\1/; q; }
+ /^X\(\/\/\)$/{ s//\1/; q; }
+ /^X\(\/\).*/{ s//\1/; q; }
+ s/.*/./; q'`
srcdir=$ac_confdir
if test ! -r $srcdir/$ac_unique_file; then
srcdir=..
@@ -505,123 +876,601 @@ else
fi
if test ! -r $srcdir/$ac_unique_file; then
if test "$ac_srcdir_defaulted" = yes; then
- { echo "configure: error: can not find sources in $ac_confdir or .." 1>&2; exit 1; }
+ { echo "$as_me: error: cannot find sources ($ac_unique_file) in $ac_confdir or .." >&2
+ { (exit 1); exit 1; }; }
else
- { echo "configure: error: can not find sources in $srcdir" 1>&2; exit 1; }
+ { echo "$as_me: error: cannot find sources ($ac_unique_file) in $srcdir" >&2
+ { (exit 1); exit 1; }; }
fi
fi
-srcdir=`echo "${srcdir}" | sed 's%\([^/]\)/*$%\1%'`
+(cd $srcdir && test -r ./$ac_unique_file) 2>/dev/null ||
+ { echo "$as_me: error: sources are in $srcdir, but \`cd $srcdir' does not work" >&2
+ { (exit 1); exit 1; }; }
+srcdir=`echo "$srcdir" | sed 's%\([^\\/]\)[\\/]*$%\1%'`
+ac_env_build_alias_set=${build_alias+set}
+ac_env_build_alias_value=$build_alias
+ac_cv_env_build_alias_set=${build_alias+set}
+ac_cv_env_build_alias_value=$build_alias
+ac_env_host_alias_set=${host_alias+set}
+ac_env_host_alias_value=$host_alias
+ac_cv_env_host_alias_set=${host_alias+set}
+ac_cv_env_host_alias_value=$host_alias
+ac_env_target_alias_set=${target_alias+set}
+ac_env_target_alias_value=$target_alias
+ac_cv_env_target_alias_set=${target_alias+set}
+ac_cv_env_target_alias_value=$target_alias
+ac_env_CC_set=${CC+set}
+ac_env_CC_value=$CC
+ac_cv_env_CC_set=${CC+set}
+ac_cv_env_CC_value=$CC
+ac_env_CFLAGS_set=${CFLAGS+set}
+ac_env_CFLAGS_value=$CFLAGS
+ac_cv_env_CFLAGS_set=${CFLAGS+set}
+ac_cv_env_CFLAGS_value=$CFLAGS
+ac_env_LDFLAGS_set=${LDFLAGS+set}
+ac_env_LDFLAGS_value=$LDFLAGS
+ac_cv_env_LDFLAGS_set=${LDFLAGS+set}
+ac_cv_env_LDFLAGS_value=$LDFLAGS
+ac_env_CPPFLAGS_set=${CPPFLAGS+set}
+ac_env_CPPFLAGS_value=$CPPFLAGS
+ac_cv_env_CPPFLAGS_set=${CPPFLAGS+set}
+ac_cv_env_CPPFLAGS_value=$CPPFLAGS
+ac_env_CPP_set=${CPP+set}
+ac_env_CPP_value=$CPP
+ac_cv_env_CPP_set=${CPP+set}
+ac_cv_env_CPP_value=$CPP
-# Prefer explicitly selected file to automatically selected ones.
-if test -z "$sitefile"; then
- if test -z "$CONFIG_SITE"; then
- if test "x$prefix" != xNONE; then
- CONFIG_SITE="$prefix/share/config.site $prefix/etc/config.site"
+#
+# Report the --help message.
+#
+if test "$ac_init_help" = "long"; then
+ # Omit some internal or obsolete options to make the list less imposing.
+ # This message is too long to be a string in the A/UX 3.1 sh.
+ cat <<_ACEOF
+\`configure' configures this package to adapt to many kinds of systems.
+
+Usage: $0 [OPTION]... [VAR=VALUE]...
+
+To assign environment variables (e.g., CC, CFLAGS...), specify them as
+VAR=VALUE. See below for descriptions of some of the useful variables.
+
+Defaults for the options are specified in brackets.
+
+Configuration:
+ -h, --help display this help and exit
+ --help=short display options specific to this package
+ --help=recursive display the short help of all the included packages
+ -V, --version display version information and exit
+ -q, --quiet, --silent do not print \`checking...' messages
+ --cache-file=FILE cache test results in FILE [disabled]
+ -C, --config-cache alias for \`--cache-file=config.cache'
+ -n, --no-create do not create output files
+ --srcdir=DIR find the sources in DIR [configure dir or \`..']
+
+_ACEOF
+
+ cat <<_ACEOF
+Installation directories:
+ --prefix=PREFIX install architecture-independent files in PREFIX
+ [$ac_default_prefix]
+ --exec-prefix=EPREFIX install architecture-dependent files in EPREFIX
+ [PREFIX]
+
+By default, \`make install' will install all the files in
+\`$ac_default_prefix/bin', \`$ac_default_prefix/lib' etc. You can specify
+an installation prefix other than \`$ac_default_prefix' using \`--prefix',
+for instance \`--prefix=\$HOME'.
+
+For better control, use the options below.
+
+Fine tuning of the installation directories:
+ --bindir=DIR user executables [EPREFIX/bin]
+ --sbindir=DIR system admin executables [EPREFIX/sbin]
+ --libexecdir=DIR program executables [EPREFIX/libexec]
+ --datadir=DIR read-only architecture-independent data [PREFIX/share]
+ --sysconfdir=DIR read-only single-machine data [PREFIX/etc]
+ --sharedstatedir=DIR modifiable architecture-independent data [PREFIX/com]
+ --localstatedir=DIR modifiable single-machine data [PREFIX/var]
+ --libdir=DIR object code libraries [EPREFIX/lib]
+ --includedir=DIR C header files [PREFIX/include]
+ --oldincludedir=DIR C header files for non-gcc [/usr/include]
+ --infodir=DIR info documentation [PREFIX/info]
+ --mandir=DIR man documentation [PREFIX/man]
+_ACEOF
+
+ cat <<\_ACEOF
+
+Program names:
+ --program-prefix=PREFIX prepend PREFIX to installed program names
+ --program-suffix=SUFFIX append SUFFIX to installed program names
+ --program-transform-name=PROGRAM run sed PROGRAM on installed program names
+
+System types:
+ --build=BUILD configure for building on BUILD [guessed]
+ --host=HOST cross-compile to build programs to run on HOST [BUILD]
+ --target=TARGET configure for building compilers for TARGET [HOST]
+_ACEOF
+fi
+
+if test -n "$ac_init_help"; then
+
+ cat <<\_ACEOF
+
+Optional Features:
+ --disable-FEATURE do not include FEATURE (same as --enable-FEATURE=no)
+ --enable-FEATURE[=ARG] include FEATURE [ARG=yes]
+ --disable-dependency-tracking speeds up one-time build
+ --enable-dependency-tracking do not reject slow dependency extractors
+ --enable-shared[=PKGS]
+ build shared libraries [default=yes]
+ --enable-static[=PKGS]
+ build static libraries [default=yes]
+ --enable-fast-install[=PKGS]
+ optimize for fast installation [default=yes]
+ --disable-libtool-lock avoid locking (might break parallel builds)
+ --enable-targets alternative target configurations
+ --enable-64-bit-bfd 64-bit support (on hosts with narrower word sizes)
+ --enable-werror treat compile warnings as errors
+ --enable-build-warnings enable build-time compiler warnings
+ --disable-nls do not use Native Language Support
+ --enable-maintainer-mode enable make rules and dependencies not useful
+ (and sometimes confusing) to the casual installer
+
+Optional Packages:
+ --with-PACKAGE[=ARG] use PACKAGE [ARG=yes]
+ --without-PACKAGE do not use PACKAGE (same as --with-PACKAGE=no)
+ --with-pic try to use only PIC/non-PIC objects [default=use
+ both]
+ --with-gnu-ld assume the C compiler uses GNU ld [default=no]
+ --with-lib-path=dir1:dir2... set default LIB_PATH
+ --with-sysroot=DIR Search for usr/lib et al within DIR.
+
+Some influential environment variables:
+ CC C compiler command
+ CFLAGS C compiler flags
+ LDFLAGS linker flags, e.g. -L<lib dir> if you have libraries in a
+ nonstandard directory <lib dir>
+ CPPFLAGS C/C++ preprocessor flags, e.g. -I<include dir> if you have
+ headers in a nonstandard directory <include dir>
+ CPP C preprocessor
+
+Use these variables to override the choices made by `configure' or to help
+it to find libraries and programs with nonstandard names/locations.
+
+_ACEOF
+fi
+
+if test "$ac_init_help" = "recursive"; then
+ # If there are subdirs, report their specific --help.
+ ac_popdir=`pwd`
+ for ac_dir in : $ac_subdirs_all; do test "x$ac_dir" = x: && continue
+ test -d $ac_dir || continue
+ ac_builddir=.
+
+if test "$ac_dir" != .; then
+ ac_dir_suffix=/`echo "$ac_dir" | sed 's,^\.[\\/],,'`
+ # A "../" for each directory in $ac_dir_suffix.
+ ac_top_builddir=`echo "$ac_dir_suffix" | sed 's,/[^\\/]*,../,g'`
+else
+ ac_dir_suffix= ac_top_builddir=
+fi
+
+case $srcdir in
+ .) # No --srcdir option. We are building in place.
+ ac_srcdir=.
+ if test -z "$ac_top_builddir"; then
+ ac_top_srcdir=.
+ else
+ ac_top_srcdir=`echo $ac_top_builddir | sed 's,/$,,'`
+ fi ;;
+ [\\/]* | ?:[\\/]* ) # Absolute path.
+ ac_srcdir=$srcdir$ac_dir_suffix;
+ ac_top_srcdir=$srcdir ;;
+ *) # Relative path.
+ ac_srcdir=$ac_top_builddir$srcdir$ac_dir_suffix
+ ac_top_srcdir=$ac_top_builddir$srcdir ;;
+esac
+
+# Do not use `cd foo && pwd` to compute absolute paths, because
+# the directories may not exist.
+case `pwd` in
+.) ac_abs_builddir="$ac_dir";;
+*)
+ case "$ac_dir" in
+ .) ac_abs_builddir=`pwd`;;
+ [\\/]* | ?:[\\/]* ) ac_abs_builddir="$ac_dir";;
+ *) ac_abs_builddir=`pwd`/"$ac_dir";;
+ esac;;
+esac
+case $ac_abs_builddir in
+.) ac_abs_top_builddir=${ac_top_builddir}.;;
+*)
+ case ${ac_top_builddir}. in
+ .) ac_abs_top_builddir=$ac_abs_builddir;;
+ [\\/]* | ?:[\\/]* ) ac_abs_top_builddir=${ac_top_builddir}.;;
+ *) ac_abs_top_builddir=$ac_abs_builddir/${ac_top_builddir}.;;
+ esac;;
+esac
+case $ac_abs_builddir in
+.) ac_abs_srcdir=$ac_srcdir;;
+*)
+ case $ac_srcdir in
+ .) ac_abs_srcdir=$ac_abs_builddir;;
+ [\\/]* | ?:[\\/]* ) ac_abs_srcdir=$ac_srcdir;;
+ *) ac_abs_srcdir=$ac_abs_builddir/$ac_srcdir;;
+ esac;;
+esac
+case $ac_abs_builddir in
+.) ac_abs_top_srcdir=$ac_top_srcdir;;
+*)
+ case $ac_top_srcdir in
+ .) ac_abs_top_srcdir=$ac_abs_builddir;;
+ [\\/]* | ?:[\\/]* ) ac_abs_top_srcdir=$ac_top_srcdir;;
+ *) ac_abs_top_srcdir=$ac_abs_builddir/$ac_top_srcdir;;
+ esac;;
+esac
+
+ cd $ac_dir
+ # Check for guested configure; otherwise get Cygnus style configure.
+ if test -f $ac_srcdir/configure.gnu; then
+ echo
+ $SHELL $ac_srcdir/configure.gnu --help=recursive
+ elif test -f $ac_srcdir/configure; then
+ echo
+ $SHELL $ac_srcdir/configure --help=recursive
+ elif test -f $ac_srcdir/configure.ac ||
+ test -f $ac_srcdir/configure.in; then
+ echo
+ $ac_configure --help
else
- CONFIG_SITE="$ac_default_prefix/share/config.site $ac_default_prefix/etc/config.site"
+ echo "$as_me: WARNING: no configuration information is in $ac_dir" >&2
+ fi
+ cd $ac_popdir
+ done
+fi
+
+test -n "$ac_init_help" && exit 0
+if $ac_init_version; then
+ cat <<\_ACEOF
+
+Copyright (C) 2003 Free Software Foundation, Inc.
+This configure script is free software; the Free Software Foundation
+gives unlimited permission to copy, distribute and modify it.
+_ACEOF
+ exit 0
+fi
+exec 5>config.log
+cat >&5 <<_ACEOF
+This file contains any messages produced by compilers while
+running configure, to aid debugging if configure makes a mistake.
+
+It was created by $as_me, which was
+generated by GNU Autoconf 2.59. Invocation command line was
+
+ $ $0 $@
+
+_ACEOF
+{
+cat <<_ASUNAME
+## --------- ##
+## Platform. ##
+## --------- ##
+
+hostname = `(hostname || uname -n) 2>/dev/null | sed 1q`
+uname -m = `(uname -m) 2>/dev/null || echo unknown`
+uname -r = `(uname -r) 2>/dev/null || echo unknown`
+uname -s = `(uname -s) 2>/dev/null || echo unknown`
+uname -v = `(uname -v) 2>/dev/null || echo unknown`
+
+/usr/bin/uname -p = `(/usr/bin/uname -p) 2>/dev/null || echo unknown`
+/bin/uname -X = `(/bin/uname -X) 2>/dev/null || echo unknown`
+
+/bin/arch = `(/bin/arch) 2>/dev/null || echo unknown`
+/usr/bin/arch -k = `(/usr/bin/arch -k) 2>/dev/null || echo unknown`
+/usr/convex/getsysinfo = `(/usr/convex/getsysinfo) 2>/dev/null || echo unknown`
+hostinfo = `(hostinfo) 2>/dev/null || echo unknown`
+/bin/machine = `(/bin/machine) 2>/dev/null || echo unknown`
+/usr/bin/oslevel = `(/usr/bin/oslevel) 2>/dev/null || echo unknown`
+/bin/universe = `(/bin/universe) 2>/dev/null || echo unknown`
+
+_ASUNAME
+
+as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
+for as_dir in $PATH
+do
+ IFS=$as_save_IFS
+ test -z "$as_dir" && as_dir=.
+ echo "PATH: $as_dir"
+done
+
+} >&5
+
+cat >&5 <<_ACEOF
+
+
+## ----------- ##
+## Core tests. ##
+## ----------- ##
+
+_ACEOF
+
+
+# Keep a trace of the command line.
+# Strip out --no-create and --no-recursion so they do not pile up.
+# Strip out --silent because we don't want to record it for future runs.
+# Also quote any args containing shell meta-characters.
+# Make two passes to allow for proper duplicate-argument suppression.
+ac_configure_args=
+ac_configure_args0=
+ac_configure_args1=
+ac_sep=
+ac_must_keep_next=false
+for ac_pass in 1 2
+do
+ for ac_arg
+ do
+ case $ac_arg in
+ -no-create | --no-c* | -n | -no-recursion | --no-r*) continue ;;
+ -q | -quiet | --quiet | --quie | --qui | --qu | --q \
+ | -silent | --silent | --silen | --sile | --sil)
+ continue ;;
+ *" "*|*" "*|*[\[\]\~\#\$\^\&\*\(\)\{\}\\\|\;\<\>\?\"\']*)
+ ac_arg=`echo "$ac_arg" | sed "s/'/'\\\\\\\\''/g"` ;;
+ esac
+ case $ac_pass in
+ 1) ac_configure_args0="$ac_configure_args0 '$ac_arg'" ;;
+ 2)
+ ac_configure_args1="$ac_configure_args1 '$ac_arg'"
+ if test $ac_must_keep_next = true; then
+ ac_must_keep_next=false # Got value, back to normal.
+ else
+ case $ac_arg in
+ *=* | --config-cache | -C | -disable-* | --disable-* \
+ | -enable-* | --enable-* | -gas | --g* | -nfp | --nf* \
+ | -q | -quiet | --q* | -silent | --sil* | -v | -verb* \
+ | -with-* | --with-* | -without-* | --without-* | --x)
+ case "$ac_configure_args0 " in
+ "$ac_configure_args1"*" '$ac_arg' "* ) continue ;;
+ esac
+ ;;
+ -* ) ac_must_keep_next=true ;;
+ esac
+ fi
+ ac_configure_args="$ac_configure_args$ac_sep'$ac_arg'"
+ # Get rid of the leading space.
+ ac_sep=" "
+ ;;
+ esac
+ done
+done
+$as_unset ac_configure_args0 || test "${ac_configure_args0+set}" != set || { ac_configure_args0=; export ac_configure_args0; }
+$as_unset ac_configure_args1 || test "${ac_configure_args1+set}" != set || { ac_configure_args1=; export ac_configure_args1; }
+
+# When interrupted or exit'd, cleanup temporary files, and complete
+# config.log. We remove comments because anyway the quotes in there
+# would cause problems or look ugly.
+# WARNING: Be sure not to use single quotes in there, as some shells,
+# such as our DU 5.0 friend, will then `close' the trap.
+trap 'exit_status=$?
+ # Save into config.log some information that might help in debugging.
+ {
+ echo
+
+ cat <<\_ASBOX
+## ---------------- ##
+## Cache variables. ##
+## ---------------- ##
+_ASBOX
+ echo
+ # The following way of writing the cache mishandles newlines in values,
+{
+ (set) 2>&1 |
+ case `(ac_space='"'"' '"'"'; set | grep ac_space) 2>&1` in
+ *ac_space=\ *)
+ sed -n \
+ "s/'"'"'/'"'"'\\\\'"'"''"'"'/g;
+ s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1='"'"'\\2'"'"'/p"
+ ;;
+ *)
+ sed -n \
+ "s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1=\\2/p"
+ ;;
+ esac;
+}
+ echo
+
+ cat <<\_ASBOX
+## ----------------- ##
+## Output variables. ##
+## ----------------- ##
+_ASBOX
+ echo
+ for ac_var in $ac_subst_vars
+ do
+ eval ac_val=$`echo $ac_var`
+ echo "$ac_var='"'"'$ac_val'"'"'"
+ done | sort
+ echo
+
+ if test -n "$ac_subst_files"; then
+ cat <<\_ASBOX
+## ------------- ##
+## Output files. ##
+## ------------- ##
+_ASBOX
+ echo
+ for ac_var in $ac_subst_files
+ do
+ eval ac_val=$`echo $ac_var`
+ echo "$ac_var='"'"'$ac_val'"'"'"
+ done | sort
+ echo
fi
+
+ if test -s confdefs.h; then
+ cat <<\_ASBOX
+## ----------- ##
+## confdefs.h. ##
+## ----------- ##
+_ASBOX
+ echo
+ sed "/^$/d" confdefs.h | sort
+ echo
+ fi
+ test "$ac_signal" != 0 &&
+ echo "$as_me: caught signal $ac_signal"
+ echo "$as_me: exit $exit_status"
+ } >&5
+ rm -f core *.core &&
+ rm -rf conftest* confdefs* conf$$* $ac_clean_files &&
+ exit $exit_status
+ ' 0
+for ac_signal in 1 2 13 15; do
+ trap 'ac_signal='$ac_signal'; { (exit 1); exit 1; }' $ac_signal
+done
+ac_signal=0
+
+# confdefs.h avoids OS command line length limits that DEFS can exceed.
+rm -rf conftest* confdefs.h
+# AIX cpp loses on an empty file, so make sure it contains at least a newline.
+echo >confdefs.h
+
+# Predefined preprocessor variables.
+
+cat >>confdefs.h <<_ACEOF
+#define PACKAGE_NAME "$PACKAGE_NAME"
+_ACEOF
+
+
+cat >>confdefs.h <<_ACEOF
+#define PACKAGE_TARNAME "$PACKAGE_TARNAME"
+_ACEOF
+
+
+cat >>confdefs.h <<_ACEOF
+#define PACKAGE_VERSION "$PACKAGE_VERSION"
+_ACEOF
+
+
+cat >>confdefs.h <<_ACEOF
+#define PACKAGE_STRING "$PACKAGE_STRING"
+_ACEOF
+
+
+cat >>confdefs.h <<_ACEOF
+#define PACKAGE_BUGREPORT "$PACKAGE_BUGREPORT"
+_ACEOF
+
+
+# Let the site file select an alternate cache file if it wants to.
+# Prefer explicitly selected file to automatically selected ones.
+if test -z "$CONFIG_SITE"; then
+ if test "x$prefix" != xNONE; then
+ CONFIG_SITE="$prefix/share/config.site $prefix/etc/config.site"
+ else
+ CONFIG_SITE="$ac_default_prefix/share/config.site $ac_default_prefix/etc/config.site"
fi
-else
- CONFIG_SITE="$sitefile"
fi
for ac_site_file in $CONFIG_SITE; do
if test -r "$ac_site_file"; then
- echo "loading site script $ac_site_file"
+ { echo "$as_me:$LINENO: loading site script $ac_site_file" >&5
+echo "$as_me: loading site script $ac_site_file" >&6;}
+ sed 's/^/| /' "$ac_site_file" >&5
. "$ac_site_file"
fi
done
if test -r "$cache_file"; then
- echo "loading cache $cache_file"
- . $cache_file
+ # Some versions of bash will fail to source /dev/null (special
+ # files actually), so we avoid doing that.
+ if test -f "$cache_file"; then
+ { echo "$as_me:$LINENO: loading cache $cache_file" >&5
+echo "$as_me: loading cache $cache_file" >&6;}
+ case $cache_file in
+ [\\/]* | ?:[\\/]* ) . $cache_file;;
+ *) . ./$cache_file;;
+ esac
+ fi
else
- echo "creating cache $cache_file"
- > $cache_file
+ { echo "$as_me:$LINENO: creating cache $cache_file" >&5
+echo "$as_me: creating cache $cache_file" >&6;}
+ >$cache_file
+fi
+
+# Check that the precious variables saved in the cache have kept the same
+# value.
+ac_cache_corrupted=false
+for ac_var in `(set) 2>&1 |
+ sed -n 's/^ac_env_\([a-zA-Z_0-9]*\)_set=.*/\1/p'`; do
+ eval ac_old_set=\$ac_cv_env_${ac_var}_set
+ eval ac_new_set=\$ac_env_${ac_var}_set
+ eval ac_old_val="\$ac_cv_env_${ac_var}_value"
+ eval ac_new_val="\$ac_env_${ac_var}_value"
+ case $ac_old_set,$ac_new_set in
+ set,)
+ { echo "$as_me:$LINENO: error: \`$ac_var' was set to \`$ac_old_val' in the previous run" >&5
+echo "$as_me: error: \`$ac_var' was set to \`$ac_old_val' in the previous run" >&2;}
+ ac_cache_corrupted=: ;;
+ ,set)
+ { echo "$as_me:$LINENO: error: \`$ac_var' was not set in the previous run" >&5
+echo "$as_me: error: \`$ac_var' was not set in the previous run" >&2;}
+ ac_cache_corrupted=: ;;
+ ,);;
+ *)
+ if test "x$ac_old_val" != "x$ac_new_val"; then
+ { echo "$as_me:$LINENO: error: \`$ac_var' has changed since the previous run:" >&5
+echo "$as_me: error: \`$ac_var' has changed since the previous run:" >&2;}
+ { echo "$as_me:$LINENO: former value: $ac_old_val" >&5
+echo "$as_me: former value: $ac_old_val" >&2;}
+ { echo "$as_me:$LINENO: current value: $ac_new_val" >&5
+echo "$as_me: current value: $ac_new_val" >&2;}
+ ac_cache_corrupted=:
+ fi;;
+ esac
+ # Pass precious variables to config.status.
+ if test "$ac_new_set" = set; then
+ case $ac_new_val in
+ *" "*|*" "*|*[\[\]\~\#\$\^\&\*\(\)\{\}\\\|\;\<\>\?\"\']*)
+ ac_arg=$ac_var=`echo "$ac_new_val" | sed "s/'/'\\\\\\\\''/g"` ;;
+ *) ac_arg=$ac_var=$ac_new_val ;;
+ esac
+ case " $ac_configure_args " in
+ *" '$ac_arg' "*) ;; # Avoid dups. Use of quotes ensures accuracy.
+ *) ac_configure_args="$ac_configure_args '$ac_arg'" ;;
+ esac
+ fi
+done
+if $ac_cache_corrupted; then
+ { echo "$as_me:$LINENO: error: changes in the environment can compromise the build" >&5
+echo "$as_me: error: changes in the environment can compromise the build" >&2;}
+ { { echo "$as_me:$LINENO: error: run \`make distclean' and/or \`rm $cache_file' and start over" >&5
+echo "$as_me: error: run \`make distclean' and/or \`rm $cache_file' and start over" >&2;}
+ { (exit 1); exit 1; }; }
fi
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${ac_exeext} $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5'
-cross_compiling=$ac_cv_prog_cc_cross
-
-ac_exeext=
-ac_objext=o
-if (echo "testing\c"; echo 1,2,3) | grep c >/dev/null; then
- # Stardent Vistra SVR4 grep lacks -e, says ghazi@caip.rutgers.edu.
- if (echo -n testing; echo 1,2,3) | sed s/-n/xn/ | grep xn >/dev/null; then
- ac_n= ac_c='
-' ac_t=' '
- else
- ac_n=-n ac_c= ac_t=
- fi
-else
- ac_n= ac_c='\c' ac_t=
-fi
+ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
+ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
+ac_compiler_gnu=$ac_cv_c_compiler_gnu
+
+
+
+
+
+
+
+
+
+
+
+
-echo $ac_n "checking for Cygwin environment""... $ac_c" 1>&6
-echo "configure:565: checking for Cygwin environment" >&5
-if eval "test \"`echo '$''{'ac_cv_cygwin'+set}'`\" = set"; then
- echo $ac_n "(cached) $ac_c" 1>&6
-else
- cat > conftest.$ac_ext <<EOF
-#line 570 "configure"
-#include "confdefs.h"
-int main() {
-#ifndef __CYGWIN__
-#define __CYGWIN__ __CYGWIN32__
-#endif
-return __CYGWIN__;
-; return 0; }
-EOF
-if { (eval echo configure:581: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
- rm -rf conftest*
- ac_cv_cygwin=yes
-else
- echo "configure: failed program was:" >&5
- cat conftest.$ac_ext >&5
- rm -rf conftest*
- ac_cv_cygwin=no
-fi
-rm -f conftest*
-rm -f conftest*
-fi
-echo "$ac_t""$ac_cv_cygwin" 1>&6
-CYGWIN=
-test "$ac_cv_cygwin" = yes && CYGWIN=yes
-echo $ac_n "checking for mingw32 environment""... $ac_c" 1>&6
-echo "configure:598: checking for mingw32 environment" >&5
-if eval "test \"`echo '$''{'ac_cv_mingw32'+set}'`\" = set"; then
- echo $ac_n "(cached) $ac_c" 1>&6
-else
- cat > conftest.$ac_ext <<EOF
-#line 603 "configure"
-#include "confdefs.h"
-int main() {
-return __MINGW32__;
-; return 0; }
-EOF
-if { (eval echo configure:610: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
- rm -rf conftest*
- ac_cv_mingw32=yes
-else
- echo "configure: failed program was:" >&5
- cat conftest.$ac_ext >&5
- rm -rf conftest*
- ac_cv_mingw32=no
-fi
-rm -f conftest*
-rm -f conftest*
-fi
-echo "$ac_t""$ac_cv_mingw32" 1>&6
-MINGW32=
-test "$ac_cv_mingw32" = yes && MINGW32=yes
ac_aux_dir=
@@ -634,149 +1483,1163 @@ for ac_dir in $srcdir $srcdir/.. $srcdir/../..; do
ac_aux_dir=$ac_dir
ac_install_sh="$ac_aux_dir/install.sh -c"
break
+ elif test -f $ac_dir/shtool; then
+ ac_aux_dir=$ac_dir
+ ac_install_sh="$ac_aux_dir/shtool install -c"
+ break
fi
done
if test -z "$ac_aux_dir"; then
- { echo "configure: error: can not find install-sh or install.sh in $srcdir $srcdir/.. $srcdir/../.." 1>&2; exit 1; }
+ { { echo "$as_me:$LINENO: error: cannot find install-sh or install.sh in $srcdir $srcdir/.. $srcdir/../.." >&5
+echo "$as_me: error: cannot find install-sh or install.sh in $srcdir $srcdir/.. $srcdir/../.." >&2;}
+ { (exit 1); exit 1; }; }
fi
-ac_config_guess=$ac_aux_dir/config.guess
-ac_config_sub=$ac_aux_dir/config.sub
-ac_configure=$ac_aux_dir/configure # This should be Cygnus configure.
+ac_config_guess="$SHELL $ac_aux_dir/config.guess"
+ac_config_sub="$SHELL $ac_aux_dir/config.sub"
+ac_configure="$SHELL $ac_aux_dir/configure" # This should be Cygnus configure.
+# Make sure we can run config.sub.
+$ac_config_sub sun4 >/dev/null 2>&1 ||
+ { { echo "$as_me:$LINENO: error: cannot run $ac_config_sub" >&5
+echo "$as_me: error: cannot run $ac_config_sub" >&2;}
+ { (exit 1); exit 1; }; }
+
+echo "$as_me:$LINENO: checking build system type" >&5
+echo $ECHO_N "checking build system type... $ECHO_C" >&6
+if test "${ac_cv_build+set}" = set; then
+ echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+ ac_cv_build_alias=$build_alias
+test -z "$ac_cv_build_alias" &&
+ ac_cv_build_alias=`$ac_config_guess`
+test -z "$ac_cv_build_alias" &&
+ { { echo "$as_me:$LINENO: error: cannot guess build type; you must specify one" >&5
+echo "$as_me: error: cannot guess build type; you must specify one" >&2;}
+ { (exit 1); exit 1; }; }
+ac_cv_build=`$ac_config_sub $ac_cv_build_alias` ||
+ { { echo "$as_me:$LINENO: error: $ac_config_sub $ac_cv_build_alias failed" >&5
+echo "$as_me: error: $ac_config_sub $ac_cv_build_alias failed" >&2;}
+ { (exit 1); exit 1; }; }
+
+fi
+echo "$as_me:$LINENO: result: $ac_cv_build" >&5
+echo "${ECHO_T}$ac_cv_build" >&6
+build=$ac_cv_build
+build_cpu=`echo $ac_cv_build | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\1/'`
+build_vendor=`echo $ac_cv_build | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\2/'`
+build_os=`echo $ac_cv_build | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\3/'`
+
+
+echo "$as_me:$LINENO: checking host system type" >&5
+echo $ECHO_N "checking host system type... $ECHO_C" >&6
+if test "${ac_cv_host+set}" = set; then
+ echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+ ac_cv_host_alias=$host_alias
+test -z "$ac_cv_host_alias" &&
+ ac_cv_host_alias=$ac_cv_build_alias
+ac_cv_host=`$ac_config_sub $ac_cv_host_alias` ||
+ { { echo "$as_me:$LINENO: error: $ac_config_sub $ac_cv_host_alias failed" >&5
+echo "$as_me: error: $ac_config_sub $ac_cv_host_alias failed" >&2;}
+ { (exit 1); exit 1; }; }
+
+fi
+echo "$as_me:$LINENO: result: $ac_cv_host" >&5
+echo "${ECHO_T}$ac_cv_host" >&6
+host=$ac_cv_host
+host_cpu=`echo $ac_cv_host | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\1/'`
+host_vendor=`echo $ac_cv_host | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\2/'`
+host_os=`echo $ac_cv_host | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\3/'`
+
+
+echo "$as_me:$LINENO: checking target system type" >&5
+echo $ECHO_N "checking target system type... $ECHO_C" >&6
+if test "${ac_cv_target+set}" = set; then
+ echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+ ac_cv_target_alias=$target_alias
+test "x$ac_cv_target_alias" = "x" &&
+ ac_cv_target_alias=$ac_cv_host_alias
+ac_cv_target=`$ac_config_sub $ac_cv_target_alias` ||
+ { { echo "$as_me:$LINENO: error: $ac_config_sub $ac_cv_target_alias failed" >&5
+echo "$as_me: error: $ac_config_sub $ac_cv_target_alias failed" >&2;}
+ { (exit 1); exit 1; }; }
+
+fi
+echo "$as_me:$LINENO: result: $ac_cv_target" >&5
+echo "${ECHO_T}$ac_cv_target" >&6
+target=$ac_cv_target
+target_cpu=`echo $ac_cv_target | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\1/'`
+target_vendor=`echo $ac_cv_target | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\2/'`
+target_os=`echo $ac_cv_target | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\3/'`
-# Do some error checking and defaulting for the host and target type.
-# The inputs are:
-# configure --host=HOST --target=TARGET --build=BUILD NONOPT
-#
-# The rules are:
-# 1. You are not allowed to specify --host, --target, and nonopt at the
-# same time.
-# 2. Host defaults to nonopt.
-# 3. If nonopt is not specified, then host defaults to the current host,
-# as determined by config.guess.
-# 4. Target and build default to nonopt.
-# 5. If nonopt is not specified, then target and build default to host.
# The aliases save the names the user supplied, while $host etc.
# will get canonicalized.
-case $host---$target---$nonopt in
-NONE---*---* | *---NONE---* | *---*---NONE) ;;
-*) { echo "configure: error: can only configure for one host and one target at a time" 1>&2; exit 1; } ;;
-esac
+test -n "$target_alias" &&
+ test "$program_prefix$program_suffix$program_transform_name" = \
+ NONENONEs,x,x, &&
+ program_prefix=${target_alias}-
+ac_ext=c
+ac_cpp='$CPP $CPPFLAGS'
+ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
+ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
+ac_compiler_gnu=$ac_cv_c_compiler_gnu
+if test -n "$ac_tool_prefix"; then
+ # Extract the first word of "${ac_tool_prefix}gcc", so it can be a program name with args.
+set dummy ${ac_tool_prefix}gcc; ac_word=$2
+echo "$as_me:$LINENO: checking for $ac_word" >&5
+echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
+if test "${ac_cv_prog_CC+set}" = set; then
+ echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+ if test -n "$CC"; then
+ ac_cv_prog_CC="$CC" # Let the user override the test.
+else
+as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
+for as_dir in $PATH
+do
+ IFS=$as_save_IFS
+ test -z "$as_dir" && as_dir=.
+ for ac_exec_ext in '' $ac_executable_extensions; do
+ if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
+ ac_cv_prog_CC="${ac_tool_prefix}gcc"
+ echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
+ break 2
+ fi
+done
+done
+fi
+fi
+CC=$ac_cv_prog_CC
+if test -n "$CC"; then
+ echo "$as_me:$LINENO: result: $CC" >&5
+echo "${ECHO_T}$CC" >&6
+else
+ echo "$as_me:$LINENO: result: no" >&5
+echo "${ECHO_T}no" >&6
+fi
-# Make sure we can run config.sub.
-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
+if test -z "$ac_cv_prog_CC"; then
+ ac_ct_CC=$CC
+ # Extract the first word of "gcc", so it can be a program name with args.
+set dummy gcc; ac_word=$2
+echo "$as_me:$LINENO: checking for $ac_word" >&5
+echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
+if test "${ac_cv_prog_ac_ct_CC+set}" = set; then
+ echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+ if test -n "$ac_ct_CC"; then
+ ac_cv_prog_ac_ct_CC="$ac_ct_CC" # Let the user override the test.
+else
+as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
+for as_dir in $PATH
+do
+ IFS=$as_save_IFS
+ test -z "$as_dir" && as_dir=.
+ for ac_exec_ext in '' $ac_executable_extensions; do
+ if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
+ ac_cv_prog_ac_ct_CC="gcc"
+ echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
+ break 2
+ fi
+done
+done
-echo $ac_n "checking host system type""... $ac_c" 1>&6
-echo "configure:675: checking host system type" >&5
+fi
+fi
+ac_ct_CC=$ac_cv_prog_ac_ct_CC
+if test -n "$ac_ct_CC"; then
+ echo "$as_me:$LINENO: result: $ac_ct_CC" >&5
+echo "${ECHO_T}$ac_ct_CC" >&6
+else
+ echo "$as_me:$LINENO: result: no" >&5
+echo "${ECHO_T}no" >&6
+fi
-host_alias=$host
-case "$host_alias" in
-NONE)
- case $nonopt in
- NONE)
- 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
+ CC=$ac_ct_CC
+else
+ CC="$ac_cv_prog_CC"
+fi
-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:696: checking target system type" >&5
-
-target_alias=$target
-case "$target_alias" in
-NONE)
- case $nonopt in
- NONE) target_alias=$host_alias ;;
- *) target_alias=$nonopt ;;
- esac ;;
-esac
+if test -z "$CC"; then
+ if test -n "$ac_tool_prefix"; then
+ # Extract the first word of "${ac_tool_prefix}cc", so it can be a program name with args.
+set dummy ${ac_tool_prefix}cc; ac_word=$2
+echo "$as_me:$LINENO: checking for $ac_word" >&5
+echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
+if test "${ac_cv_prog_CC+set}" = set; then
+ echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+ if test -n "$CC"; then
+ ac_cv_prog_CC="$CC" # Let the user override the test.
+else
+as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
+for as_dir in $PATH
+do
+ IFS=$as_save_IFS
+ test -z "$as_dir" && as_dir=.
+ for ac_exec_ext in '' $ac_executable_extensions; do
+ if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
+ ac_cv_prog_CC="${ac_tool_prefix}cc"
+ echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
+ break 2
+ fi
+done
+done
-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:714: checking build system type" >&5
-
-build_alias=$build
-case "$build_alias" in
-NONE)
- case $nonopt in
- NONE) build_alias=$host_alias ;;
- *) build_alias=$nonopt ;;
- esac ;;
-esac
+fi
+fi
+CC=$ac_cv_prog_CC
+if test -n "$CC"; then
+ echo "$as_me:$LINENO: result: $CC" >&5
+echo "${ECHO_T}$CC" >&6
+else
+ echo "$as_me:$LINENO: result: no" >&5
+echo "${ECHO_T}no" >&6
+fi
-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/'`
-echo "$ac_t""$build" 1>&6
+fi
+if test -z "$ac_cv_prog_CC"; then
+ ac_ct_CC=$CC
+ # Extract the first word of "cc", so it can be a program name with args.
+set dummy cc; ac_word=$2
+echo "$as_me:$LINENO: checking for $ac_word" >&5
+echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
+if test "${ac_cv_prog_ac_ct_CC+set}" = set; then
+ echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+ if test -n "$ac_ct_CC"; then
+ ac_cv_prog_ac_ct_CC="$ac_ct_CC" # Let the user override the test.
+else
+as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
+for as_dir in $PATH
+do
+ IFS=$as_save_IFS
+ test -z "$as_dir" && as_dir=.
+ for ac_exec_ext in '' $ac_executable_extensions; do
+ if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
+ ac_cv_prog_ac_ct_CC="cc"
+ echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
+ break 2
+ fi
+done
+done
-test "$host_alias" != "$target_alias" &&
- test "$program_prefix$program_suffix$program_transform_name" = \
- NONENONEs,x,x, &&
- program_prefix=${target_alias}-
+fi
+fi
+ac_ct_CC=$ac_cv_prog_ac_ct_CC
+if test -n "$ac_ct_CC"; then
+ echo "$as_me:$LINENO: result: $ac_ct_CC" >&5
+echo "${ECHO_T}$ac_ct_CC" >&6
+else
+ echo "$as_me:$LINENO: result: no" >&5
+echo "${ECHO_T}no" >&6
+fi
+ CC=$ac_ct_CC
+else
+ CC="$ac_cv_prog_CC"
+fi
- echo $ac_n "checking for strerror in -lcposix""... $ac_c" 1>&6
-echo "configure:738: checking for strerror in -lcposix" >&5
-ac_lib_var=`echo cposix'_'strerror | sed 'y%./+-%__p_%'`
-if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
- echo $ac_n "(cached) $ac_c" 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 "$as_me:$LINENO: checking for $ac_word" >&5
+echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
+if test "${ac_cv_prog_CC+set}" = set; then
+ echo $ECHO_N "(cached) $ECHO_C" >&6
else
- ac_save_LIBS="$LIBS"
-LIBS="-lcposix $LIBS"
-cat > conftest.$ac_ext <<EOF
-#line 746 "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 strerror();
-
-int main() {
-strerror()
-; return 0; }
-EOF
-if { (eval echo configure:757: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
- rm -rf conftest*
- eval "ac_cv_lib_$ac_lib_var=yes"
+ if test -n "$CC"; then
+ ac_cv_prog_CC="$CC" # Let the user override the test.
else
- echo "configure: failed program was:" >&5
- cat conftest.$ac_ext >&5
- rm -rf conftest*
- eval "ac_cv_lib_$ac_lib_var=no"
+ ac_prog_rejected=no
+as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
+for as_dir in $PATH
+do
+ IFS=$as_save_IFS
+ test -z "$as_dir" && as_dir=.
+ for ac_exec_ext in '' $ac_executable_extensions; do
+ if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
+ if test "$as_dir/$ac_word$ac_exec_ext" = "/usr/ucb/cc"; then
+ ac_prog_rejected=yes
+ continue
+ fi
+ ac_cv_prog_CC="cc"
+ echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
+ break 2
+ fi
+done
+done
+
+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 $# != 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
+ ac_cv_prog_CC="$as_dir/$ac_word${1+' '}$@"
+ fi
+fi
+fi
+fi
+CC=$ac_cv_prog_CC
+if test -n "$CC"; then
+ echo "$as_me:$LINENO: result: $CC" >&5
+echo "${ECHO_T}$CC" >&6
+else
+ echo "$as_me:$LINENO: result: no" >&5
+echo "${ECHO_T}no" >&6
+fi
+
+fi
+if test -z "$CC"; then
+ if test -n "$ac_tool_prefix"; then
+ for ac_prog in cl
+ do
+ # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
+set dummy $ac_tool_prefix$ac_prog; ac_word=$2
+echo "$as_me:$LINENO: checking for $ac_word" >&5
+echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
+if test "${ac_cv_prog_CC+set}" = set; then
+ echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+ if test -n "$CC"; then
+ ac_cv_prog_CC="$CC" # Let the user override the test.
+else
+as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
+for as_dir in $PATH
+do
+ IFS=$as_save_IFS
+ test -z "$as_dir" && as_dir=.
+ for ac_exec_ext in '' $ac_executable_extensions; do
+ if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
+ ac_cv_prog_CC="$ac_tool_prefix$ac_prog"
+ echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
+ break 2
+ fi
+done
+done
+
fi
+fi
+CC=$ac_cv_prog_CC
+if test -n "$CC"; then
+ echo "$as_me:$LINENO: result: $CC" >&5
+echo "${ECHO_T}$CC" >&6
+else
+ echo "$as_me:$LINENO: result: no" >&5
+echo "${ECHO_T}no" >&6
+fi
+
+ test -n "$CC" && break
+ done
+fi
+if test -z "$CC"; then
+ ac_ct_CC=$CC
+ for ac_prog in cl
+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 "$as_me:$LINENO: checking for $ac_word" >&5
+echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
+if test "${ac_cv_prog_ac_ct_CC+set}" = set; then
+ echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+ if test -n "$ac_ct_CC"; then
+ ac_cv_prog_ac_ct_CC="$ac_ct_CC" # Let the user override the test.
+else
+as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
+for as_dir in $PATH
+do
+ IFS=$as_save_IFS
+ test -z "$as_dir" && as_dir=.
+ for ac_exec_ext in '' $ac_executable_extensions; do
+ if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
+ ac_cv_prog_ac_ct_CC="$ac_prog"
+ echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
+ break 2
+ fi
+done
+done
+
+fi
+fi
+ac_ct_CC=$ac_cv_prog_ac_ct_CC
+if test -n "$ac_ct_CC"; then
+ echo "$as_me:$LINENO: result: $ac_ct_CC" >&5
+echo "${ECHO_T}$ac_ct_CC" >&6
+else
+ echo "$as_me:$LINENO: result: no" >&5
+echo "${ECHO_T}no" >&6
+fi
+
+ test -n "$ac_ct_CC" && break
+done
+
+ CC=$ac_ct_CC
+fi
+
+fi
+
+
+test -z "$CC" && { { echo "$as_me:$LINENO: error: no acceptable C compiler found in \$PATH
+See \`config.log' for more details." >&5
+echo "$as_me: error: no acceptable C compiler found in \$PATH
+See \`config.log' for more details." >&2;}
+ { (exit 1); exit 1; }; }
+
+# Provide some information about the compiler.
+echo "$as_me:$LINENO:" \
+ "checking for C compiler version" >&5
+ac_compiler=`set X $ac_compile; echo $2`
+{ (eval echo "$as_me:$LINENO: \"$ac_compiler --version </dev/null >&5\"") >&5
+ (eval $ac_compiler --version </dev/null >&5) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); }
+{ (eval echo "$as_me:$LINENO: \"$ac_compiler -v </dev/null >&5\"") >&5
+ (eval $ac_compiler -v </dev/null >&5) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); }
+{ (eval echo "$as_me:$LINENO: \"$ac_compiler -V </dev/null >&5\"") >&5
+ (eval $ac_compiler -V </dev/null >&5) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); }
+
+cat >conftest.$ac_ext <<_ACEOF
+/* confdefs.h. */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h. */
+
+int
+main ()
+{
+
+ ;
+ return 0;
+}
+_ACEOF
+ac_clean_files_save=$ac_clean_files
+ac_clean_files="$ac_clean_files a.out a.exe b.out"
+# Try to create an executable without -o first, disregard a.out.
+# It will help us diagnose broken compilers, and finding out an intuition
+# of exeext.
+echo "$as_me:$LINENO: checking for C compiler default output file name" >&5
+echo $ECHO_N "checking for C compiler default output file name... $ECHO_C" >&6
+ac_link_default=`echo "$ac_link" | sed 's/ -o *conftest[^ ]*//'`
+if { (eval echo "$as_me:$LINENO: \"$ac_link_default\"") >&5
+ (eval $ac_link_default) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); }; then
+ # Find the output, starting from the most likely. This scheme is
+# not robust to junk in `.', hence go to wildcards (a.*) only as a last
+# resort.
+
+# Be careful to initialize this variable, since it used to be cached.
+# Otherwise an old cache value of `no' led to `EXEEXT = no' in a Makefile.
+ac_cv_exeext=
+# b.out is created by i960 compilers.
+for ac_file in a_out.exe a.exe conftest.exe a.out conftest a.* conftest.* b.out
+do
+ test -f "$ac_file" || continue
+ case $ac_file in
+ *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.o | *.obj )
+ ;;
+ conftest.$ac_ext )
+ # This is the source file.
+ ;;
+ [ab].out )
+ # We found the default executable, but exeext='' is most
+ # certainly right.
+ break;;
+ *.* )
+ ac_cv_exeext=`expr "$ac_file" : '[^.]*\(\..*\)'`
+ # FIXME: I believe we export ac_cv_exeext for Libtool,
+ # but it would be cool to find out if it's true. Does anybody
+ # maintain Libtool? --akim.
+ export ac_cv_exeext
+ break;;
+ * )
+ break;;
+ esac
+done
+else
+ echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+{ { echo "$as_me:$LINENO: error: C compiler cannot create executables
+See \`config.log' for more details." >&5
+echo "$as_me: error: C compiler cannot create executables
+See \`config.log' for more details." >&2;}
+ { (exit 77); exit 77; }; }
+fi
+
+ac_exeext=$ac_cv_exeext
+echo "$as_me:$LINENO: result: $ac_file" >&5
+echo "${ECHO_T}$ac_file" >&6
+
+# Check the compiler produces executables we can run. If not, either
+# the compiler is broken, or we cross compile.
+echo "$as_me:$LINENO: checking whether the C compiler works" >&5
+echo $ECHO_N "checking whether the C compiler works... $ECHO_C" >&6
+# FIXME: These cross compiler hacks should be removed for Autoconf 3.0
+# If not cross compiling, check that we can run a simple program.
+if test "$cross_compiling" != yes; then
+ if { ac_try='./$ac_file'
+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+ (eval $ac_try) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); }; }; then
+ cross_compiling=no
+ else
+ if test "$cross_compiling" = maybe; then
+ cross_compiling=yes
+ else
+ { { echo "$as_me:$LINENO: error: cannot run C compiled programs.
+If you meant to cross compile, use \`--host'.
+See \`config.log' for more details." >&5
+echo "$as_me: error: cannot run C compiled programs.
+If you meant to cross compile, use \`--host'.
+See \`config.log' for more details." >&2;}
+ { (exit 1); exit 1; }; }
+ fi
+ fi
+fi
+echo "$as_me:$LINENO: result: yes" >&5
+echo "${ECHO_T}yes" >&6
+
+rm -f a.out a.exe conftest$ac_cv_exeext b.out
+ac_clean_files=$ac_clean_files_save
+# Check the compiler produces executables we can run. If not, either
+# the compiler is broken, or we cross compile.
+echo "$as_me:$LINENO: checking whether we are cross compiling" >&5
+echo $ECHO_N "checking whether we are cross compiling... $ECHO_C" >&6
+echo "$as_me:$LINENO: result: $cross_compiling" >&5
+echo "${ECHO_T}$cross_compiling" >&6
+
+echo "$as_me:$LINENO: checking for suffix of executables" >&5
+echo $ECHO_N "checking for suffix of executables... $ECHO_C" >&6
+if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
+ (eval $ac_link) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); }; then
+ # If both `conftest.exe' and `conftest' are `present' (well, observable)
+# catch `conftest.exe'. For instance with Cygwin, `ls conftest' will
+# work properly (i.e., refer to `conftest.exe'), while it won't with
+# `rm'.
+for ac_file in conftest.exe conftest conftest.*; do
+ test -f "$ac_file" || continue
+ case $ac_file in
+ *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.o | *.obj ) ;;
+ *.* ) ac_cv_exeext=`expr "$ac_file" : '[^.]*\(\..*\)'`
+ export ac_cv_exeext
+ break;;
+ * ) break;;
+ esac
+done
+else
+ { { echo "$as_me:$LINENO: error: cannot compute suffix of executables: cannot compile and link
+See \`config.log' for more details." >&5
+echo "$as_me: error: cannot compute suffix of executables: cannot compile and link
+See \`config.log' for more details." >&2;}
+ { (exit 1); exit 1; }; }
+fi
+
+rm -f conftest$ac_cv_exeext
+echo "$as_me:$LINENO: result: $ac_cv_exeext" >&5
+echo "${ECHO_T}$ac_cv_exeext" >&6
+
+rm -f conftest.$ac_ext
+EXEEXT=$ac_cv_exeext
+ac_exeext=$EXEEXT
+echo "$as_me:$LINENO: checking for suffix of object files" >&5
+echo $ECHO_N "checking for suffix of object files... $ECHO_C" >&6
+if test "${ac_cv_objext+set}" = set; then
+ echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+ cat >conftest.$ac_ext <<_ACEOF
+/* confdefs.h. */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h. */
+
+int
+main ()
+{
+
+ ;
+ return 0;
+}
+_ACEOF
+rm -f conftest.o conftest.obj
+if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
+ (eval $ac_compile) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); }; then
+ for ac_file in `(ls conftest.o conftest.obj; ls conftest.*) 2>/dev/null`; do
+ case $ac_file in
+ *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg ) ;;
+ *) ac_cv_objext=`expr "$ac_file" : '.*\.\(.*\)'`
+ break;;
+ esac
+done
+else
+ echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+{ { echo "$as_me:$LINENO: error: cannot compute suffix of object files: cannot compile
+See \`config.log' for more details." >&5
+echo "$as_me: error: cannot compute suffix of object files: cannot compile
+See \`config.log' for more details." >&2;}
+ { (exit 1); exit 1; }; }
+fi
+
+rm -f conftest.$ac_cv_objext conftest.$ac_ext
+fi
+echo "$as_me:$LINENO: result: $ac_cv_objext" >&5
+echo "${ECHO_T}$ac_cv_objext" >&6
+OBJEXT=$ac_cv_objext
+ac_objext=$OBJEXT
+echo "$as_me:$LINENO: checking whether we are using the GNU C compiler" >&5
+echo $ECHO_N "checking whether we are using the GNU C compiler... $ECHO_C" >&6
+if test "${ac_cv_c_compiler_gnu+set}" = set; then
+ echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+ cat >conftest.$ac_ext <<_ACEOF
+/* confdefs.h. */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h. */
+
+int
+main ()
+{
+#ifndef __GNUC__
+ choke me
+#endif
+
+ ;
+ return 0;
+}
+_ACEOF
+rm -f conftest.$ac_objext
+if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
+ (eval $ac_compile) 2>conftest.er1
+ ac_status=$?
+ grep -v '^ *+' conftest.er1 >conftest.err
+ rm -f conftest.er1
+ cat conftest.err >&5
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); } &&
+ { ac_try='test -z "$ac_c_werror_flag"
+ || test ! -s conftest.err'
+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+ (eval $ac_try) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); }; } &&
+ { ac_try='test -s conftest.$ac_objext'
+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+ (eval $ac_try) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); }; }; then
+ ac_compiler_gnu=yes
+else
+ echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+ac_compiler_gnu=no
+fi
+rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
+ac_cv_c_compiler_gnu=$ac_compiler_gnu
+
+fi
+echo "$as_me:$LINENO: result: $ac_cv_c_compiler_gnu" >&5
+echo "${ECHO_T}$ac_cv_c_compiler_gnu" >&6
+GCC=`test $ac_compiler_gnu = yes && echo yes`
+ac_test_CFLAGS=${CFLAGS+set}
+ac_save_CFLAGS=$CFLAGS
+CFLAGS="-g"
+echo "$as_me:$LINENO: checking whether $CC accepts -g" >&5
+echo $ECHO_N "checking whether $CC accepts -g... $ECHO_C" >&6
+if test "${ac_cv_prog_cc_g+set}" = set; then
+ echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+ cat >conftest.$ac_ext <<_ACEOF
+/* confdefs.h. */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h. */
+
+int
+main ()
+{
+
+ ;
+ return 0;
+}
+_ACEOF
+rm -f conftest.$ac_objext
+if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
+ (eval $ac_compile) 2>conftest.er1
+ ac_status=$?
+ grep -v '^ *+' conftest.er1 >conftest.err
+ rm -f conftest.er1
+ cat conftest.err >&5
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); } &&
+ { ac_try='test -z "$ac_c_werror_flag"
+ || test ! -s conftest.err'
+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+ (eval $ac_try) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); }; } &&
+ { ac_try='test -s conftest.$ac_objext'
+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+ (eval $ac_try) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); }; }; then
+ ac_cv_prog_cc_g=yes
+else
+ echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+ac_cv_prog_cc_g=no
+fi
+rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
+fi
+echo "$as_me:$LINENO: result: $ac_cv_prog_cc_g" >&5
+echo "${ECHO_T}$ac_cv_prog_cc_g" >&6
+if test "$ac_test_CFLAGS" = set; then
+ CFLAGS=$ac_save_CFLAGS
+elif test $ac_cv_prog_cc_g = yes; then
+ if test "$GCC" = yes; then
+ CFLAGS="-g -O2"
+ else
+ CFLAGS="-g"
+ fi
+else
+ if test "$GCC" = yes; then
+ CFLAGS="-O2"
+ else
+ CFLAGS=
+ fi
+fi
+echo "$as_me:$LINENO: checking for $CC option to accept ANSI C" >&5
+echo $ECHO_N "checking for $CC option to accept ANSI C... $ECHO_C" >&6
+if test "${ac_cv_prog_cc_stdc+set}" = set; then
+ echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+ ac_cv_prog_cc_stdc=no
+ac_save_CC=$CC
+cat >conftest.$ac_ext <<_ACEOF
+/* confdefs.h. */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h. */
+#include <stdarg.h>
+#include <stdio.h>
+#include <sys/types.h>
+#include <sys/stat.h>
+/* Most of the following tests are stolen from RCS 5.7's src/conf.sh. */
+struct buf { int x; };
+FILE * (*rcsopen) (struct buf *, struct stat *, int);
+static char *e (p, i)
+ char **p;
+ int i;
+{
+ return p[i];
+}
+static char *f (char * (*g) (char **, int), char **p, ...)
+{
+ char *s;
+ va_list v;
+ va_start (v,p);
+ s = g (p, va_arg (v,int));
+ va_end (v);
+ return s;
+}
+
+/* OSF 4.0 Compaq cc is some sort of almost-ANSI by default. It has
+ function prototypes and stuff, but not '\xHH' hex character constants.
+ These don't provoke an error unfortunately, instead are silently treated
+ as 'x'. The following induces an error, until -std1 is added to get
+ proper ANSI mode. Curiously '\x00'!='x' always comes out true, for an
+ array size at least. It's necessary to write '\x00'==0 to get something
+ that's true only with -std1. */
+int osf4_cc_array ['\x00' == 0 ? 1 : -1];
+
+int test (int i, double x);
+struct s1 {int (*f) (int a);};
+struct s2 {int (*f) (double a);};
+int pairnames (int, char **, FILE *(*)(struct buf *, struct stat *, int), int, int);
+int argc;
+char **argv;
+int
+main ()
+{
+return f (e, argv, 0) != argv[0] || f (e, argv, 1) != argv[1];
+ ;
+ return 0;
+}
+_ACEOF
+# Don't try gcc -ansi; that turns off useful extensions and
+# breaks some systems' header files.
+# AIX -qlanglvl=ansi
+# Ultrix and OSF/1 -std1
+# HP-UX 10.20 and later -Ae
+# HP-UX older versions -Aa -D_HPUX_SOURCE
+# SVR4 -Xc -D__EXTENSIONS__
+for ac_arg in "" -qlanglvl=ansi -std1 -Ae "-Aa -D_HPUX_SOURCE" "-Xc -D__EXTENSIONS__"
+do
+ CC="$ac_save_CC $ac_arg"
+ rm -f conftest.$ac_objext
+if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
+ (eval $ac_compile) 2>conftest.er1
+ ac_status=$?
+ grep -v '^ *+' conftest.er1 >conftest.err
+ rm -f conftest.er1
+ cat conftest.err >&5
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); } &&
+ { ac_try='test -z "$ac_c_werror_flag"
+ || test ! -s conftest.err'
+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+ (eval $ac_try) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); }; } &&
+ { ac_try='test -s conftest.$ac_objext'
+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+ (eval $ac_try) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); }; }; then
+ ac_cv_prog_cc_stdc=$ac_arg
+break
+else
+ echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+fi
+rm -f conftest.err conftest.$ac_objext
+done
+rm -f conftest.$ac_ext conftest.$ac_objext
+CC=$ac_save_CC
+
+fi
+
+case "x$ac_cv_prog_cc_stdc" in
+ x|xno)
+ echo "$as_me:$LINENO: result: none needed" >&5
+echo "${ECHO_T}none needed" >&6 ;;
+ *)
+ echo "$as_me:$LINENO: result: $ac_cv_prog_cc_stdc" >&5
+echo "${ECHO_T}$ac_cv_prog_cc_stdc" >&6
+ CC="$CC $ac_cv_prog_cc_stdc" ;;
+esac
+
+# Some people use a C++ compiler to compile C. Since we use `exit',
+# in C++ we need to declare it. In case someone uses the same compiler
+# for both compiling C and C++ we need to have the C++ compiler decide
+# the declaration of exit, since it's the most demanding environment.
+cat >conftest.$ac_ext <<_ACEOF
+#ifndef __cplusplus
+ choke me
+#endif
+_ACEOF
+rm -f conftest.$ac_objext
+if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
+ (eval $ac_compile) 2>conftest.er1
+ ac_status=$?
+ grep -v '^ *+' conftest.er1 >conftest.err
+ rm -f conftest.er1
+ cat conftest.err >&5
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); } &&
+ { ac_try='test -z "$ac_c_werror_flag"
+ || test ! -s conftest.err'
+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+ (eval $ac_try) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); }; } &&
+ { ac_try='test -s conftest.$ac_objext'
+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+ (eval $ac_try) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); }; }; then
+ for ac_declaration in \
+ '' \
+ 'extern "C" void std::exit (int) throw (); using std::exit;' \
+ 'extern "C" void std::exit (int); using std::exit;' \
+ 'extern "C" void exit (int) throw ();' \
+ 'extern "C" void exit (int);' \
+ 'void exit (int);'
+do
+ cat >conftest.$ac_ext <<_ACEOF
+/* confdefs.h. */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h. */
+$ac_declaration
+#include <stdlib.h>
+int
+main ()
+{
+exit (42);
+ ;
+ return 0;
+}
+_ACEOF
+rm -f conftest.$ac_objext
+if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
+ (eval $ac_compile) 2>conftest.er1
+ ac_status=$?
+ grep -v '^ *+' conftest.er1 >conftest.err
+ rm -f conftest.er1
+ cat conftest.err >&5
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); } &&
+ { ac_try='test -z "$ac_c_werror_flag"
+ || test ! -s conftest.err'
+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+ (eval $ac_try) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); }; } &&
+ { ac_try='test -s conftest.$ac_objext'
+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+ (eval $ac_try) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); }; }; then
+ :
+else
+ echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+continue
+fi
+rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
+ cat >conftest.$ac_ext <<_ACEOF
+/* confdefs.h. */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h. */
+$ac_declaration
+int
+main ()
+{
+exit (42);
+ ;
+ return 0;
+}
+_ACEOF
+rm -f conftest.$ac_objext
+if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
+ (eval $ac_compile) 2>conftest.er1
+ ac_status=$?
+ grep -v '^ *+' conftest.er1 >conftest.err
+ rm -f conftest.er1
+ cat conftest.err >&5
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); } &&
+ { ac_try='test -z "$ac_c_werror_flag"
+ || test ! -s conftest.err'
+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+ (eval $ac_try) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); }; } &&
+ { ac_try='test -s conftest.$ac_objext'
+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+ (eval $ac_try) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); }; }; then
+ break
+else
+ echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+fi
+rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
+done
rm -f conftest*
-LIBS="$ac_save_LIBS"
+if test -n "$ac_declaration"; then
+ echo '#ifdef __cplusplus' >>confdefs.h
+ echo $ac_declaration >>confdefs.h
+ echo '#endif' >>confdefs.h
+fi
+
+else
+ echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
fi
-if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
- echo "$ac_t""yes" 1>&6
- LIBS="$LIBS -lcposix"
+rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
+ac_ext=c
+ac_cpp='$CPP $CPPFLAGS'
+ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
+ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
+ac_compiler_gnu=$ac_cv_c_compiler_gnu
+
+
+echo "$as_me:$LINENO: checking for library containing strerror" >&5
+echo $ECHO_N "checking for library containing strerror... $ECHO_C" >&6
+if test "${ac_cv_search_strerror+set}" = set; then
+ echo $ECHO_N "(cached) $ECHO_C" >&6
else
- echo "$ac_t""no" 1>&6
+ ac_func_search_save_LIBS=$LIBS
+ac_cv_search_strerror=no
+cat >conftest.$ac_ext <<_ACEOF
+/* confdefs.h. */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h. */
+
+/* Override any gcc2 internal prototype to avoid an error. */
+#ifdef __cplusplus
+extern "C"
+#endif
+/* We use char because int might match the return type of a gcc2
+ builtin and then its argument prototype would still apply. */
+char strerror ();
+int
+main ()
+{
+strerror ();
+ ;
+ return 0;
+}
+_ACEOF
+rm -f conftest.$ac_objext conftest$ac_exeext
+if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
+ (eval $ac_link) 2>conftest.er1
+ ac_status=$?
+ grep -v '^ *+' conftest.er1 >conftest.err
+ rm -f conftest.er1
+ cat conftest.err >&5
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); } &&
+ { ac_try='test -z "$ac_c_werror_flag"
+ || test ! -s conftest.err'
+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+ (eval $ac_try) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); }; } &&
+ { ac_try='test -s conftest$ac_exeext'
+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+ (eval $ac_try) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); }; }; then
+ ac_cv_search_strerror="none required"
+else
+ echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+fi
+rm -f conftest.err conftest.$ac_objext \
+ conftest$ac_exeext conftest.$ac_ext
+if test "$ac_cv_search_strerror" = no; then
+ for ac_lib in cposix; do
+ LIBS="-l$ac_lib $ac_func_search_save_LIBS"
+ cat >conftest.$ac_ext <<_ACEOF
+/* confdefs.h. */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h. */
+
+/* Override any gcc2 internal prototype to avoid an error. */
+#ifdef __cplusplus
+extern "C"
+#endif
+/* We use char because int might match the return type of a gcc2
+ builtin and then its argument prototype would still apply. */
+char strerror ();
+int
+main ()
+{
+strerror ();
+ ;
+ return 0;
+}
+_ACEOF
+rm -f conftest.$ac_objext conftest$ac_exeext
+if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
+ (eval $ac_link) 2>conftest.er1
+ ac_status=$?
+ grep -v '^ *+' conftest.er1 >conftest.err
+ rm -f conftest.er1
+ cat conftest.err >&5
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); } &&
+ { ac_try='test -z "$ac_c_werror_flag"
+ || test ! -s conftest.err'
+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+ (eval $ac_try) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); }; } &&
+ { ac_try='test -s conftest$ac_exeext'
+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+ (eval $ac_try) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); }; }; then
+ ac_cv_search_strerror="-l$ac_lib"
+break
+else
+ echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+fi
+rm -f conftest.err conftest.$ac_objext \
+ conftest$ac_exeext conftest.$ac_ext
+ done
+fi
+LIBS=$ac_func_search_save_LIBS
fi
+echo "$as_me:$LINENO: result: $ac_cv_search_strerror" >&5
+echo "${ECHO_T}$ac_cv_search_strerror" >&6
+if test "$ac_cv_search_strerror" != no; then
+ test "$ac_cv_search_strerror" = "none required" || LIBS="$ac_cv_search_strerror $LIBS"
-
+fi
BFD_VERSION=`sed -n -e 's/^.._INIT_AUTOMAKE.*,[ ]*\([^ ]*\)[ ]*).*/\1/p' < ${srcdir}/../bfd/configure.in`
+am__api_version="1.9"
# 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:
@@ -784,523 +2647,842 @@ BFD_VERSION=`sed -n -e 's/^.._INIT_AUTOMAKE.*,[ ]*\([^ ]*\)[ ]*).*/\1/p' < ${
# SunOS /usr/etc/install
# IRIX /sbin/install
# AIX /bin/install
+# AmigaOS /C/install, which installs bootblocks on floppy discs
# 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"
+# OS/2's system install, which has a completely different semantic
# ./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:793: checking for a BSD compatible install" >&5
+echo "$as_me:$LINENO: checking for a BSD-compatible install" >&5
+echo $ECHO_N "checking for a BSD-compatible install... $ECHO_C" >&6
if test -z "$INSTALL"; then
-if eval "test \"`echo '$''{'ac_cv_path_install'+set}'`\" = set"; then
- echo $ac_n "(cached) $ac_c" 1>&6
+if test "${ac_cv_path_install+set}" = set; then
+ echo $ECHO_N "(cached) $ECHO_C" >&6
else
- IFS="${IFS= }"; ac_save_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
+ as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
+for as_dir in $PATH
+do
+ IFS=$as_save_IFS
+ test -z "$as_dir" && as_dir=.
+ # Account for people who put trailing slashes in PATH elements.
+case $as_dir/ in
+ ./ | .// | /cC/* | \
+ /etc/* | /usr/sbin/* | /usr/etc/* | /sbin/* | /usr/afsws/bin/* | \
+ ?:\\/os2\\/install\\/* | ?:\\/OS2\\/INSTALL\\/* | \
+ /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
+ for ac_exec_ext in '' $ac_executable_extensions; do
+ if $as_executable_p "$as_dir/$ac_prog$ac_exec_ext"; then
if test $ac_prog = install &&
- grep dspmsg $ac_dir/$ac_prog >/dev/null 2>&1; then
+ grep dspmsg "$as_dir/$ac_prog$ac_exec_ext" >/dev/null 2>&1; then
# AIX install. It has an incompatible calling convention.
:
+ elif test $ac_prog = install &&
+ grep pwplus "$as_dir/$ac_prog$ac_exec_ext" >/dev/null 2>&1; then
+ # program-specific install script used by HP pwplus--don't use.
+ :
else
- ac_cv_path_install="$ac_dir/$ac_prog -c"
- break 2
+ ac_cv_path_install="$as_dir/$ac_prog$ac_exec_ext -c"
+ break 3
fi
fi
done
- ;;
- esac
- done
- IFS="$ac_save_IFS"
+ done
+ ;;
+esac
+done
+
fi
if test "${ac_cv_path_install+set}" = set; then
- INSTALL="$ac_cv_path_install"
+ 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"
+ INSTALL=$ac_install_sh
fi
fi
-echo "$ac_t""$INSTALL" 1>&6
+echo "$as_me:$LINENO: result: $INSTALL" >&5
+echo "${ECHO_T}$INSTALL" >&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_SCRIPT" && INSTALL_SCRIPT='${INSTALL_PROGRAM}'
+test -z "$INSTALL_SCRIPT" && INSTALL_SCRIPT='${INSTALL}'
test -z "$INSTALL_DATA" && INSTALL_DATA='${INSTALL} -m 644'
-echo $ac_n "checking whether build environment is sane""... $ac_c" 1>&6
-echo "configure:846: checking whether build environment is sane" >&5
+echo "$as_me:$LINENO: checking whether build environment is sane" >&5
+echo $ECHO_N "checking whether build environment is sane... $ECHO_C" >&6
# Just in case
sleep 1
-echo timestamp > conftestfile
+echo timestamp > conftest.file
# 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`
+ set X `ls -Lt $srcdir/configure conftest.file 2> /dev/null`
if test "$*" = "X"; then
# -L didn't work.
- set X `ls -t $srcdir/configure conftestfile`
+ set X `ls -t $srcdir/configure conftest.file`
fi
- if test "$*" != "X $srcdir/configure conftestfile" \
- && test "$*" != "X conftestfile $srcdir/configure"; then
+ rm -f conftest.file
+ if test "$*" != "X $srcdir/configure conftest.file" \
+ && test "$*" != "X conftest.file $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; }
+ { { echo "$as_me:$LINENO: error: ls -t appears to fail. Make sure there is not a broken
+alias in your environment" >&5
+echo "$as_me: error: ls -t appears to fail. Make sure there is not a broken
+alias in your environment" >&2;}
+ { (exit 1); exit 1; }; }
fi
- test "$2" = conftestfile
+ test "$2" = conftest.file
)
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
- # Double any \ or $. echo might interpret backslashes.
- cat <<\EOF_SED > conftestsed
-s,\\,\\\\,g; s,\$,$$,g
-EOF_SED
- program_transform_name="`echo $program_transform_name|sed -f conftestsed`"
- rm -f conftestsed
+ { { echo "$as_me:$LINENO: error: newly created file is older than distributed files!
+Check your system clock" >&5
+echo "$as_me: error: newly created file is older than distributed files!
+Check your system clock" >&2;}
+ { (exit 1); exit 1; }; }
fi
+echo "$as_me:$LINENO: result: yes" >&5
+echo "${ECHO_T}yes" >&6
test "$program_prefix" != NONE &&
- program_transform_name="s,^,${program_prefix},; $program_transform_name"
+ program_transform_name="s,^,$program_prefix,;$program_transform_name"
# Use a double $ so make ignores it.
test "$program_suffix" != NONE &&
- program_transform_name="s,\$\$,${program_suffix},; $program_transform_name"
+ program_transform_name="s,\$,$program_suffix,;$program_transform_name"
+# Double any \ or $. echo might interpret backslashes.
+# By default was `s,x,x', remove it if useless.
+cat <<\_ACEOF >conftest.sed
+s/[\\$]/&&/g;s/;s,x,x,$//
+_ACEOF
+program_transform_name=`echo $program_transform_name | sed -f conftest.sed`
+rm conftest.sed
+
+# expand $ac_aux_dir to an absolute path
+am_aux_dir=`cd $ac_aux_dir && pwd`
+
+test x"${MISSING+set}" = xset || MISSING="\${SHELL} $am_aux_dir/missing"
+# Use eval to expand $SHELL
+if eval "$MISSING --run true"; then
+ am_missing_run="$MISSING --run "
+else
+ am_missing_run=
+ { echo "$as_me:$LINENO: WARNING: \`missing' script is too old or missing" >&5
+echo "$as_me: WARNING: \`missing' script is too old or missing" >&2;}
+fi
+
+if mkdir -p --version . >/dev/null 2>&1 && test ! -d ./--version; then
+ # We used to keeping the `.' as first argument, in order to
+ # allow $(mkdir_p) to be used without argument. As in
+ # $(mkdir_p) $(somedir)
+ # where $(somedir) is conditionally defined. However this is wrong
+ # for two reasons:
+ # 1. if the package is installed by a user who cannot write `.'
+ # make install will fail,
+ # 2. the above comment should most certainly read
+ # $(mkdir_p) $(DESTDIR)$(somedir)
+ # so it does not work when $(somedir) is undefined and
+ # $(DESTDIR) is not.
+ # To support the latter case, we have to write
+ # test -z "$(somedir)" || $(mkdir_p) $(DESTDIR)$(somedir),
+ # so the `.' trick is pointless.
+ mkdir_p='mkdir -p --'
+else
+ # On NextStep and OpenStep, the `mkdir' command does not
+ # recognize any option. It will interpret all options as
+ # directories to create, and then abort because `.' already
+ # exists.
+ for d in ./-p ./--version;
+ do
+ test -d $d && rmdir $d
+ done
+ # $(mkinstalldirs) is defined by Automake if mkinstalldirs exists.
+ if test -f "$ac_aux_dir/mkinstalldirs"; then
+ mkdir_p='$(mkinstalldirs)'
+ else
+ mkdir_p='$(install_sh) -d'
+ fi
+fi
-# sed with no file args requires a program.
-test "$program_transform_name" = "" && program_transform_name="s,x,x,"
+for ac_prog in gawk mawk nawk awk
+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 "$as_me:$LINENO: checking for $ac_word" >&5
+echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
+if test "${ac_cv_prog_AWK+set}" = set; then
+ echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+ if test -n "$AWK"; then
+ ac_cv_prog_AWK="$AWK" # Let the user override the test.
+else
+as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
+for as_dir in $PATH
+do
+ IFS=$as_save_IFS
+ test -z "$as_dir" && as_dir=.
+ for ac_exec_ext in '' $ac_executable_extensions; do
+ if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
+ ac_cv_prog_AWK="$ac_prog"
+ echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
+ break 2
+ fi
+done
+done
-echo $ac_n "checking whether ${MAKE-make} sets \${MAKE}""... $ac_c" 1>&6
-echo "configure:903: 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
+fi
+fi
+AWK=$ac_cv_prog_AWK
+if test -n "$AWK"; then
+ echo "$as_me:$LINENO: result: $AWK" >&5
+echo "${ECHO_T}$AWK" >&6
else
- cat > conftestmake <<\EOF
+ echo "$as_me:$LINENO: result: no" >&5
+echo "${ECHO_T}no" >&6
+fi
+
+ test -n "$AWK" && break
+done
+
+echo "$as_me:$LINENO: checking whether ${MAKE-make} sets \$(MAKE)" >&5
+echo $ECHO_N "checking whether ${MAKE-make} sets \$(MAKE)... $ECHO_C" >&6
+set dummy ${MAKE-make}; ac_make=`echo "$2" | sed 'y,:./+-,___p_,'`
+if eval "test \"\${ac_cv_prog_make_${ac_make}_set+set}\" = set"; then
+ echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+ cat >conftest.make <<\_ACEOF
all:
- @echo 'ac_maketemp="${MAKE}"'
-EOF
+ @echo 'ac_maketemp="$(MAKE)"'
+_ACEOF
# GNU make sometimes prints "make[1]: Entering...", which would confuse us.
-eval `${MAKE-make} -f conftestmake 2>/dev/null | grep temp=`
+eval `${MAKE-make} -f conftest.make 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
+rm -f conftest.make
fi
if eval "test \"`echo '$ac_cv_prog_make_'${ac_make}_set`\" = yes"; then
- echo "$ac_t""yes" 1>&6
+ echo "$as_me:$LINENO: result: yes" >&5
+echo "${ECHO_T}yes" >&6
SET_MAKE=
else
- echo "$ac_t""no" 1>&6
+ echo "$as_me:$LINENO: result: no" >&5
+echo "${ECHO_T}no" >&6
SET_MAKE="MAKE=${MAKE-make}"
fi
+rm -rf .tst 2>/dev/null
+mkdir .tst 2>/dev/null
+if test -d .tst; then
+ am__leading_dot=.
+else
+ am__leading_dot=_
+fi
+rmdir .tst 2>/dev/null
+
+DEPDIR="${am__leading_dot}deps"
+
+ ac_config_commands="$ac_config_commands depfiles"
+
+
+am_make=${MAKE-make}
+cat > confinc << 'END'
+am__doit:
+ @echo done
+.PHONY: am__doit
+END
+# If we don't find an include directive, just comment out the code.
+echo "$as_me:$LINENO: checking for style of include used by $am_make" >&5
+echo $ECHO_N "checking for style of include used by $am_make... $ECHO_C" >&6
+am__include="#"
+am__quote=
+_am_result=none
+# First try GNU make style include.
+echo "include confinc" > confmf
+# We grep out `Entering directory' and `Leaving directory'
+# messages which can occur if `w' ends up in MAKEFLAGS.
+# In particular we don't look at `^make:' because GNU make might
+# be invoked under some other name (usually "gmake"), in which
+# case it prints its new name instead of `make'.
+if test "`$am_make -s -f confmf 2> /dev/null | grep -v 'ing directory'`" = "done"; then
+ am__include=include
+ am__quote=
+ _am_result=GNU
+fi
+# Now try BSD make style include.
+if test "$am__include" = "#"; then
+ echo '.include "confinc"' > confmf
+ if test "`$am_make -s -f confmf 2> /dev/null`" = "done"; then
+ am__include=.include
+ am__quote="\""
+ _am_result=BSD
+ fi
+fi
+
+
+echo "$as_me:$LINENO: result: $_am_result" >&5
+echo "${ECHO_T}$_am_result" >&6
+rm -f confinc confmf
+
+# Check whether --enable-dependency-tracking or --disable-dependency-tracking was given.
+if test "${enable_dependency_tracking+set}" = set; then
+ enableval="$enable_dependency_tracking"
+
+fi;
+if test "x$enable_dependency_tracking" != xno; then
+ am_depcomp="$ac_aux_dir/depcomp"
+ AMDEPBACKSLASH='\'
+fi
+
-PACKAGE=ld
+if test "x$enable_dependency_tracking" != xno; then
+ AMDEP_TRUE=
+ AMDEP_FALSE='#'
+else
+ AMDEP_TRUE='#'
+ AMDEP_FALSE=
+fi
-VERSION=${BFD_VERSION}
-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; }
+
+# test to see if srcdir already configured
+if test "`cd $srcdir && pwd`" != "`pwd`" &&
+ test -f $srcdir/config.status; then
+ { { echo "$as_me:$LINENO: error: source directory already configured; run \"make distclean\" there first" >&5
+echo "$as_me: error: source directory already configured; run \"make distclean\" there first" >&2;}
+ { (exit 1); exit 1; }; }
+fi
+
+# test whether we have cygpath
+if test -z "$CYGPATH_W"; then
+ if (cygpath --version) >/dev/null 2>/dev/null; then
+ CYGPATH_W='cygpath -w'
+ else
+ CYGPATH_W=echo
+ fi
fi
-cat >> confdefs.h <<EOF
+
+
+# Define the identity of the package.
+ PACKAGE=ld
+ VERSION=${BFD_VERSION}
+
+
+cat >>confdefs.h <<_ACEOF
#define PACKAGE "$PACKAGE"
-EOF
+_ACEOF
-cat >> confdefs.h <<EOF
+
+cat >>confdefs.h <<_ACEOF
#define VERSION "$VERSION"
-EOF
+_ACEOF
+
+# Some tools Automake needs.
+
+ACLOCAL=${ACLOCAL-"${am_missing_run}aclocal-${am__api_version}"}
+
+AUTOCONF=${AUTOCONF-"${am_missing_run}autoconf"}
-missing_dir=`cd $ac_aux_dir && pwd`
-echo $ac_n "checking for working aclocal""... $ac_c" 1>&6
-echo "configure:949: 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
+AUTOMAKE=${AUTOMAKE-"${am_missing_run}automake-${am__api_version}"}
+
+
+AUTOHEADER=${AUTOHEADER-"${am_missing_run}autoheader"}
+
+
+MAKEINFO=${MAKEINFO-"${am_missing_run}makeinfo"}
+
+install_sh=${install_sh-"$am_aux_dir/install-sh"}
+
+# Installed binaries are usually stripped using `strip' when the user
+# run `make install-strip'. However `strip' might not be the right
+# tool to use in cross-compilation environments, therefore Automake
+# will honor the `STRIP' environment variable to overrule this program.
+if test "$cross_compiling" != no; then
+ if test -n "$ac_tool_prefix"; then
+ # Extract the first word of "${ac_tool_prefix}strip", so it can be a program name with args.
+set dummy ${ac_tool_prefix}strip; ac_word=$2
+echo "$as_me:$LINENO: checking for $ac_word" >&5
+echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
+if test "${ac_cv_prog_STRIP+set}" = set; then
+ echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+ if test -n "$STRIP"; then
+ ac_cv_prog_STRIP="$STRIP" # Let the user override the test.
+else
+as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
+for as_dir in $PATH
+do
+ IFS=$as_save_IFS
+ test -z "$as_dir" && as_dir=.
+ for ac_exec_ext in '' $ac_executable_extensions; do
+ if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
+ ac_cv_prog_STRIP="${ac_tool_prefix}strip"
+ echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
+ break 2
+ fi
+done
+done
+
+fi
+fi
+STRIP=$ac_cv_prog_STRIP
+if test -n "$STRIP"; then
+ echo "$as_me:$LINENO: result: $STRIP" >&5
+echo "${ECHO_T}$STRIP" >&6
else
- ACLOCAL="$missing_dir/missing aclocal"
- echo "$ac_t""missing" 1>&6
+ echo "$as_me:$LINENO: result: no" >&5
+echo "${ECHO_T}no" >&6
fi
-echo $ac_n "checking for working autoconf""... $ac_c" 1>&6
-echo "configure:962: 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
+fi
+if test -z "$ac_cv_prog_STRIP"; then
+ ac_ct_STRIP=$STRIP
+ # Extract the first word of "strip", so it can be a program name with args.
+set dummy strip; ac_word=$2
+echo "$as_me:$LINENO: checking for $ac_word" >&5
+echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
+if test "${ac_cv_prog_ac_ct_STRIP+set}" = set; then
+ echo $ECHO_N "(cached) $ECHO_C" >&6
else
- AUTOCONF="$missing_dir/missing autoconf"
- echo "$ac_t""missing" 1>&6
+ if test -n "$ac_ct_STRIP"; then
+ ac_cv_prog_ac_ct_STRIP="$ac_ct_STRIP" # Let the user override the test.
+else
+as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
+for as_dir in $PATH
+do
+ IFS=$as_save_IFS
+ test -z "$as_dir" && as_dir=.
+ for ac_exec_ext in '' $ac_executable_extensions; do
+ if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
+ ac_cv_prog_ac_ct_STRIP="strip"
+ echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
+ break 2
+ fi
+done
+done
+
+ test -z "$ac_cv_prog_ac_ct_STRIP" && ac_cv_prog_ac_ct_STRIP=":"
+fi
+fi
+ac_ct_STRIP=$ac_cv_prog_ac_ct_STRIP
+if test -n "$ac_ct_STRIP"; then
+ echo "$as_me:$LINENO: result: $ac_ct_STRIP" >&5
+echo "${ECHO_T}$ac_ct_STRIP" >&6
+else
+ echo "$as_me:$LINENO: result: no" >&5
+echo "${ECHO_T}no" >&6
fi
-echo $ac_n "checking for working automake""... $ac_c" 1>&6
-echo "configure:975: 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
+ STRIP=$ac_ct_STRIP
else
- AUTOMAKE="$missing_dir/missing automake"
- echo "$ac_t""missing" 1>&6
+ STRIP="$ac_cv_prog_STRIP"
fi
-echo $ac_n "checking for working autoheader""... $ac_c" 1>&6
-echo "configure:988: 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
+fi
+INSTALL_STRIP_PROGRAM="\${SHELL} \$(install_sh) -c -s"
+
+# We need awk for the "check" target. The system "awk" is bad on
+# some platforms.
+# Always define AMTAR for backward compatibility.
+
+AMTAR=${AMTAR-"${am_missing_run}tar"}
+
+am__tar='${AMTAR} chof - "$$tardir"'; am__untar='${AMTAR} xf -'
+
+
+
+
+depcc="$CC" am_compiler_list=
+
+echo "$as_me:$LINENO: checking dependency style of $depcc" >&5
+echo $ECHO_N "checking dependency style of $depcc... $ECHO_C" >&6
+if test "${am_cv_CC_dependencies_compiler_type+set}" = set; then
+ echo $ECHO_N "(cached) $ECHO_C" >&6
else
- AUTOHEADER="$missing_dir/missing autoheader"
- echo "$ac_t""missing" 1>&6
+ if test -z "$AMDEP_TRUE" && test -f "$am_depcomp"; then
+ # We make a subdir and do the tests there. Otherwise we can end up
+ # making bogus files that we don't know about and never remove. For
+ # instance it was reported that on HP-UX the gcc test will end up
+ # making a dummy file named `D' -- because `-MD' means `put the output
+ # in D'.
+ mkdir conftest.dir
+ # Copy depcomp to subdir because otherwise we won't find it if we're
+ # using a relative directory.
+ cp "$am_depcomp" conftest.dir
+ cd conftest.dir
+ # We will build objects and dependencies in a subdirectory because
+ # it helps to detect inapplicable dependency modes. For instance
+ # both Tru64's cc and ICC support -MD to output dependencies as a
+ # side effect of compilation, but ICC will put the dependencies in
+ # the current directory while Tru64 will put them in the object
+ # directory.
+ mkdir sub
+
+ am_cv_CC_dependencies_compiler_type=none
+ if test "$am_compiler_list" = ""; then
+ am_compiler_list=`sed -n 's/^#*\([a-zA-Z0-9]*\))$/\1/p' < ./depcomp`
+ fi
+ for depmode in $am_compiler_list; do
+ # Setup a source with many dependencies, because some compilers
+ # like to wrap large dependency lists on column 80 (with \), and
+ # we should not choose a depcomp mode which is confused by this.
+ #
+ # We need to recreate these files for each test, as the compiler may
+ # overwrite some of them when testing with obscure command lines.
+ # This happens at least with the AIX C compiler.
+ : > sub/conftest.c
+ for i in 1 2 3 4 5 6; do
+ echo '#include "conftst'$i'.h"' >> sub/conftest.c
+ # Using `: > sub/conftst$i.h' creates only sub/conftst1.h with
+ # Solaris 8's {/usr,}/bin/sh.
+ touch sub/conftst$i.h
+ done
+ echo "${am__include} ${am__quote}sub/conftest.Po${am__quote}" > confmf
+
+ case $depmode in
+ nosideeffect)
+ # after this tag, mechanisms are not by side-effect, so they'll
+ # only be used when explicitly requested
+ if test "x$enable_dependency_tracking" = xyes; then
+ continue
+ else
+ break
+ fi
+ ;;
+ none) break ;;
+ esac
+ # We check with `-c' and `-o' for the sake of the "dashmstdout"
+ # mode. It turns out that the SunPro C++ compiler does not properly
+ # handle `-M -o', and we need to detect this.
+ if depmode=$depmode \
+ source=sub/conftest.c object=sub/conftest.${OBJEXT-o} \
+ depfile=sub/conftest.Po tmpdepfile=sub/conftest.TPo \
+ $SHELL ./depcomp $depcc -c -o sub/conftest.${OBJEXT-o} sub/conftest.c \
+ >/dev/null 2>conftest.err &&
+ grep sub/conftst6.h sub/conftest.Po > /dev/null 2>&1 &&
+ grep sub/conftest.${OBJEXT-o} sub/conftest.Po > /dev/null 2>&1 &&
+ ${MAKE-make} -s -f confmf > /dev/null 2>&1; then
+ # icc doesn't choke on unknown options, it will just issue warnings
+ # or remarks (even with -Werror). So we grep stderr for any message
+ # that says an option was ignored or not supported.
+ # When given -MP, icc 7.0 and 7.1 complain thusly:
+ # icc: Command line warning: ignoring option '-M'; no argument required
+ # The diagnosis changed in icc 8.0:
+ # icc: Command line remark: option '-MP' not supported
+ if (grep 'ignoring option' conftest.err ||
+ grep 'not supported' conftest.err) >/dev/null 2>&1; then :; else
+ am_cv_CC_dependencies_compiler_type=$depmode
+ break
+ fi
+ fi
+ done
+
+ cd ..
+ rm -rf conftest.dir
+else
+ am_cv_CC_dependencies_compiler_type=none
fi
-echo $ac_n "checking for working makeinfo""... $ac_c" 1>&6
-echo "configure:1001: 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
+fi
+echo "$as_me:$LINENO: result: $am_cv_CC_dependencies_compiler_type" >&5
+echo "${ECHO_T}$am_cv_CC_dependencies_compiler_type" >&6
+CCDEPMODE=depmode=$am_cv_CC_dependencies_compiler_type
+
+
+
+if
+ test "x$enable_dependency_tracking" != xno \
+ && test "$am_cv_CC_dependencies_compiler_type" = gcc3; then
+ am__fastdepCC_TRUE=
+ am__fastdepCC_FALSE='#'
else
- MAKEINFO="$missing_dir/missing makeinfo"
- echo "$ac_t""missing" 1>&6
+ am__fastdepCC_TRUE='#'
+ am__fastdepCC_FALSE=
fi
+
+
+
+macro_version='2.1a'
+macro_revision='1.2435'
+
+
+
+
+
+
+
+
+
+
+
+
+ltmain="$ac_aux_dir/ltmain.sh"
+
+# Set options
+
+enable_dlopen=no
+
+
+enable_win32_dll=no
+
+
# 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
+ 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.
+ lt_save_ifs="$IFS"; IFS="${IFS}$PATH_SEPARATOR,"
+ for pkg in $enableval; do
+ IFS="$lt_save_ifs"
+ if test "X$pkg" = "X$p"; then
+ enable_shared=yes
+ fi
+ done
+ IFS="$lt_save_ifs"
+ ;;
+ esac
else
enable_shared=yes
-fi
+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
+ 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.
+ lt_save_ifs="$IFS"; IFS="${IFS}$PATH_SEPARATOR,"
+ for pkg in $enableval; do
+ IFS="$lt_save_ifs"
+ if test "X$pkg" = "X$p"; then
+ enable_static=yes
+ fi
+ done
+ IFS="$lt_save_ifs"
+ ;;
+ esac
else
enable_static=yes
-fi
+fi;
+
+
+
+
+
+
+
+
+
+# Check whether --with-pic or --without-pic was given.
+if test "${with_pic+set}" = set; then
+ withval="$with_pic"
+ pic_mode="$withval"
+else
+ pic_mode=default
+fi;
+
+test -z "$pic_mode" && pic_mode=default
+
+
+
+
+
+
# Check whether --enable-fast-install or --disable-fast-install was given.
if test "${enable_fast_install+set}" = set; then
enableval="$enable_fast_install"
p=${PACKAGE-default}
-case $enableval in
-yes) enable_fast_install=yes ;;
-no) enable_fast_install=no ;;
-*)
- enable_fast_install=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_fast_install=yes
- fi
- done
- IFS="$ac_save_ifs"
- ;;
-esac
+ case $enableval in
+ yes) enable_fast_install=yes ;;
+ no) enable_fast_install=no ;;
+ *)
+ enable_fast_install=no
+ # Look at the argument we got. We use all the common list separators.
+ lt_save_ifs="$IFS"; IFS="${IFS}$PATH_SEPARATOR,"
+ for pkg in $enableval; do
+ IFS="$lt_save_ifs"
+ if test "X$pkg" = "X$p"; then
+ enable_fast_install=yes
+ fi
+ done
+ IFS="$lt_save_ifs"
+ ;;
+ esac
else
enable_fast_install=yes
-fi
+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:1087: 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=":"
- ac_dummy="$PATH"
- for ac_dir in $ac_dummy; 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"
-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:1117: 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.
+
+
+
+
+
+
+echo "$as_me:$LINENO: checking for a sed that does not truncate output" >&5
+echo $ECHO_N "checking for a sed that does not truncate output... $ECHO_C" >&6
+if test "${lt_cv_path_SED+set}" = set; then
+ echo $ECHO_N "(cached) $ECHO_C" >&6
else
- IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":"
- ac_prog_rejected=no
- ac_dummy="$PATH"
- for ac_dir in $ac_dummy; 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
+ # Loop through the user's path and test for sed and gsed.
+# Then use that list of sed's as ones to test for truncation.
+as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
+for as_dir in $PATH
+do
+ IFS=$as_save_IFS
+ test -z "$as_dir" && as_dir=.
+ for lt_ac_prog in sed gsed; do
+ for ac_exec_ext in '' $ac_executable_extensions; do
+ if $as_executable_p "$as_dir/$lt_ac_prog$ac_exec_ext"; then
+ lt_ac_sed_list="$lt_ac_sed_list $as_dir/$lt_ac_prog$ac_exec_ext"
fi
- ac_cv_prog_CC="cc"
- break
- fi
+ done
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="$@"
+done
+IFS=$as_save_IFS
+lt_ac_max=0
+lt_ac_count=0
+# Add /usr/xpg4/bin/sed as it is typically found on Solaris
+# along with /bin/sed that truncates output.
+for lt_ac_sed in $lt_ac_sed_list /usr/xpg4/bin/sed; do
+ test ! -f $lt_ac_sed && continue
+ cat /dev/null > conftest.in
+ lt_ac_count=0
+ echo $ECHO_N "0123456789$ECHO_C" >conftest.in
+ # Check for GNU sed and select it if it is found.
+ if "$lt_ac_sed" --version 2>&1 < /dev/null | grep 'GNU' > /dev/null; then
+ lt_cv_path_SED=$lt_ac_sed
+ break
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
-
- if test -z "$CC"; then
- case "`uname -s`" in
- *win32* | *WIN32*)
- # Extract the first word of "cl", so it can be a program name with args.
-set dummy cl; ac_word=$2
-echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
-echo "configure:1168: 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=":"
- ac_dummy="$PATH"
- for ac_dir in $ac_dummy; do
- test -z "$ac_dir" && ac_dir=.
- if test -f $ac_dir/$ac_word; then
- ac_cv_prog_CC="cl"
- break
+ while true; do
+ cat conftest.in conftest.in >conftest.tmp
+ mv conftest.tmp conftest.in
+ cp conftest.in conftest.nl
+ echo >>conftest.nl
+ $lt_ac_sed -e 's/a$//' < conftest.nl >conftest.out || break
+ cmp -s conftest.out conftest.nl || break
+ # 10000 chars as input seems more than enough
+ test $lt_ac_count -gt 10 && break
+ lt_ac_count=`expr $lt_ac_count + 1`
+ if test $lt_ac_count -gt $lt_ac_max; then
+ lt_ac_max=$lt_ac_count
+ lt_cv_path_SED=$lt_ac_sed
fi
done
- 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
- ;;
- esac
- fi
- test -z "$CC" && { echo "configure: error: no acceptable cc found in \$PATH" 1>&2; exit 1; }
+done
+
fi
-echo $ac_n "checking whether the C compiler ($CC $CFLAGS $LDFLAGS) works""... $ac_c" 1>&6
-echo "configure:1200: checking whether the C compiler ($CC $CFLAGS $LDFLAGS) works" >&5
+SED=$lt_cv_path_SED
-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${ac_exeext} $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5'
-cross_compiling=$ac_cv_prog_cc_cross
+echo "$as_me:$LINENO: result: $SED" >&5
+echo "${ECHO_T}$SED" >&6
-cat > conftest.$ac_ext << EOF
+test -z "$SED" && SED=sed
+Xsed="$SED -e 1s/^X//"
-#line 1211 "configure"
-#include "confdefs.h"
-main(){return(0);}
-EOF
-if { (eval echo configure:1216: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; 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
- 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
-rm -fr conftest*
-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${ac_exeext} $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5'
-cross_compiling=$ac_cv_prog_cc_cross
-
-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:1242: 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:1247: 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:1256: \"$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
-if test $ac_cv_prog_gcc = yes; then
- GCC=yes
-else
- GCC=
-fi
-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:1275: 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
+
+
+
+
+
+
+echo "$as_me:$LINENO: checking for egrep" >&5
+echo $ECHO_N "checking for egrep... $ECHO_C" >&6
+if test "${ac_cv_prog_egrep+set}" = set; then
+ echo $ECHO_N "(cached) $ECHO_C" >&6
else
- ac_cv_prog_cc_g=no
+ if echo a | (grep -E '(a|b)') >/dev/null 2>&1
+ then ac_cv_prog_egrep='grep -E'
+ else ac_cv_prog_egrep='egrep'
+ fi
fi
-rm -f conftest*
+echo "$as_me:$LINENO: result: $ac_cv_prog_egrep" >&5
+echo "${ECHO_T}$ac_cv_prog_egrep" >&6
+ EGREP=$ac_cv_prog_egrep
-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
- if test "$GCC" = yes; then
- CFLAGS="-g -O2"
- else
- CFLAGS="-g"
- fi
+echo "$as_me:$LINENO: checking for fgrep" >&5
+echo $ECHO_N "checking for fgrep... $ECHO_C" >&6
+if test "${ac_cv_prog_fgrep+set}" = set; then
+ echo $ECHO_N "(cached) $ECHO_C" >&6
else
- if test "$GCC" = yes; then
- CFLAGS="-O2"
- else
- CFLAGS=
- fi
+ if echo 'ab*c' | (grep -F 'ab*c') >/dev/null 2>&1
+ then ac_cv_prog_fgrep='grep -F'
+ else ac_cv_prog_fgrep='fgrep'
+ fi
fi
+echo "$as_me:$LINENO: result: $ac_cv_prog_fgrep" >&5
+echo "${ECHO_T}$ac_cv_prog_fgrep" >&6
+ FGREP=$ac_cv_prog_fgrep
+
+
+test -z "$GREP" && GREP=grep
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
# Check whether --with-gnu-ld or --without-gnu-ld was given.
if test "${with_gnu_ld+set}" = set; then
@@ -1308,13 +3490,12 @@ if test "${with_gnu_ld+set}" = set; then
test "$withval" = no || with_gnu_ld=yes
else
with_gnu_ld=no
-fi
-
+fi;
ac_prog=ld
if test "$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:1318: checking for ld used by GCC" >&5
+ echo "$as_me:$LINENO: checking for ld used by $CC" >&5
+echo $ECHO_N "checking for ld used by $CC... $ECHO_C" >&6
case $host in
*-*-mingw*)
# gcc leaves a trailing carriage return which upsets mingw
@@ -1324,12 +3505,12 @@ echo "configure:1318: checking for ld used by GCC" >&5
esac
case $ac_prog in
# Accept absolute paths.
- [\\/]* | [A-Za-z]:[\\/]*)
+ [\\/]* | ?:[\\/]*)
re_direlt='/[^/][^/]*/\.\./'
- # Canonicalize the path of ld
- ac_prog=`echo $ac_prog| sed 's%\\\\%/%g'`
- while echo $ac_prog | grep "$re_direlt" > /dev/null 2>&1; do
- ac_prog=`echo $ac_prog| sed "s%$re_direlt%/%"`
+ # Canonicalize the pathname of ld
+ ac_prog=`$ECHO "$ac_prog"| $SED 's%\\\\%/%g'`
+ while $ECHO "$ac_prog" | $GREP "$re_direlt" > /dev/null 2>&1; do
+ ac_prog=`$ECHO $ac_prog| $SED "s%$re_direlt%/%"`
done
test -z "$LD" && LD="$ac_prog"
;;
@@ -1343,32 +3524,36 @@ echo "configure:1318: checking for ld used by GCC" >&5
;;
esac
elif test "$with_gnu_ld" = yes; then
- echo $ac_n "checking for GNU ld""... $ac_c" 1>&6
-echo "configure:1348: checking for GNU ld" >&5
+ echo "$as_me:$LINENO: checking for GNU ld" >&5
+echo $ECHO_N "checking for GNU ld... $ECHO_C" >&6
else
- echo $ac_n "checking for non-GNU ld""... $ac_c" 1>&6
-echo "configure:1351: checking for non-GNU ld" >&5
+ echo "$as_me:$LINENO: checking for non-GNU ld" >&5
+echo $ECHO_N "checking for non-GNU ld... $ECHO_C" >&6
fi
-if eval "test \"`echo '$''{'lt_cv_path_LD'+set}'`\" = set"; then
- echo $ac_n "(cached) $ac_c" 1>&6
+if test "${lt_cv_path_LD+set}" = set; then
+ echo $ECHO_N "(cached) $ECHO_C" >&6
else
if test -z "$LD"; then
- IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS="${IFS}${PATH_SEPARATOR-:}"
+ lt_save_ifs="$IFS"; IFS=$PATH_SEPARATOR
for ac_dir in $PATH; do
+ IFS="$lt_save_ifs"
test -z "$ac_dir" && ac_dir=.
if test -f "$ac_dir/$ac_prog" || test -f "$ac_dir/$ac_prog$ac_exeext"; then
lt_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.
+ # but apparently some variants of GNU ld only accept -v.
# Break only if it was the GNU/non-GNU ld that we prefer.
- if "$lt_cv_path_LD" -v 2>&1 < /dev/null | egrep '(GNU|with BFD)' > /dev/null; then
+ case `"$lt_cv_path_LD" -v 2>&1 </dev/null` in
+ *GNU* | *'with BFD'*)
test "$with_gnu_ld" != no && break
- else
+ ;;
+ *)
test "$with_gnu_ld" != yes && break
- fi
+ ;;
+ esac
fi
done
- IFS="$ac_save_ifs"
+ IFS="$lt_save_ifs"
else
lt_cv_path_LD="$LD" # Let the user override the test with a path.
fi
@@ -1376,103 +3561,461 @@ fi
LD="$lt_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:1386: checking if the linker ($LD) is GNU ld" >&5
-if eval "test \"`echo '$''{'lt_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
+ echo "$as_me:$LINENO: result: $LD" >&5
+echo "${ECHO_T}$LD" >&6
+else
+ echo "$as_me:$LINENO: result: no" >&5
+echo "${ECHO_T}no" >&6
+fi
+test -z "$LD" && { { echo "$as_me:$LINENO: error: no acceptable ld found in \$PATH" >&5
+echo "$as_me: error: no acceptable ld found in \$PATH" >&2;}
+ { (exit 1); exit 1; }; }
+echo "$as_me:$LINENO: checking if the linker ($LD) is GNU ld" >&5
+echo $ECHO_N "checking if the linker ($LD) is GNU ld... $ECHO_C" >&6
+if test "${lt_cv_prog_gnu_ld+set}" = set; then
+ echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+ # I'd rather use --version here, but apparently some GNU lds only accept -v.
+case `$LD -v 2>&1 </dev/null` in
+*GNU* | *'with BFD'*)
lt_cv_prog_gnu_ld=yes
-else
+ ;;
+*)
lt_cv_prog_gnu_ld=no
+ ;;
+esac
fi
-fi
-
-echo "$ac_t""$lt_cv_prog_gnu_ld" 1>&6
+echo "$as_me:$LINENO: result: $lt_cv_prog_gnu_ld" >&5
+echo "${ECHO_T}$lt_cv_prog_gnu_ld" >&6
with_gnu_ld=$lt_cv_prog_gnu_ld
-echo $ac_n "checking for $LD option to reload object files""... $ac_c" 1>&6
-echo "configure:1403: checking for $LD option to reload object files" >&5
-if eval "test \"`echo '$''{'lt_cv_ld_reload_flag'+set}'`\" = set"; then
- echo $ac_n "(cached) $ac_c" 1>&6
-else
- lt_cv_ld_reload_flag='-r'
-fi
-echo "$ac_t""$lt_cv_ld_reload_flag" 1>&6
-reload_flag=$lt_cv_ld_reload_flag
-test -n "$reload_flag" && reload_flag=" $reload_flag"
-echo $ac_n "checking for BSD-compatible nm""... $ac_c" 1>&6
-echo "configure:1415: checking for BSD-compatible nm" >&5
-if eval "test \"`echo '$''{'lt_cv_path_NM'+set}'`\" = set"; then
- echo $ac_n "(cached) $ac_c" 1>&6
+
+
+
+
+
+
+echo "$as_me:$LINENO: checking for BSD- or MS-compatible name lister (nm)" >&5
+echo $ECHO_N "checking for BSD- or MS-compatible name lister (nm)... $ECHO_C" >&6
+if test "${lt_cv_path_NM+set}" = set; then
+ echo $ECHO_N "(cached) $ECHO_C" >&6
else
if test -n "$NM"; then
# Let the user override the test.
lt_cv_path_NM="$NM"
else
- IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS="${IFS}${PATH_SEPARATOR-:}"
- for ac_dir in $PATH /usr/ccs/bin /usr/ucb /bin; do
- test -z "$ac_dir" && ac_dir=.
- tmp_nm=$ac_dir/${ac_tool_prefix}nm
- if test -f $tmp_nm || test -f $tmp_nm$ac_exeext ; 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
- # Tru64's nm complains that /dev/null is an invalid object file
- if ($tmp_nm -B /dev/null 2>&1 | sed '1q'; exit 0) | egrep '(/dev/null|Invalid file or object type)' >/dev/null; then
- lt_cv_path_NM="$tmp_nm -B"
- break
- elif ($tmp_nm -p /dev/null 2>&1 | sed '1q'; exit 0) | egrep /dev/null >/dev/null; then
- lt_cv_path_NM="$tmp_nm -p"
- break
- else
- lt_cv_path_NM=${lt_cv_path_NM="$tmp_nm"} # keep the first match, but
- continue # so that we can try to find one that supports BSD flags
+ lt_nm_to_check="${ac_tool_prefix}nm"
+ if test -n "$ac_tool_prefix" && test "$build" = "$host"; then
+ lt_nm_to_check="$lt_nm_to_check nm"
+ fi
+ for lt_tmp_nm in $lt_nm_to_check; do
+ lt_save_ifs="$IFS"; IFS=$PATH_SEPARATOR
+ for ac_dir in $PATH /usr/ccs/bin/elf /usr/ccs/bin /usr/ucb /bin; do
+ IFS="$lt_save_ifs"
+ test -z "$ac_dir" && ac_dir=.
+ tmp_nm="$ac_dir/$lt_tmp_nm"
+ if test -f "$tmp_nm" || test -f "$tmp_nm$ac_exeext" ; 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
+ # Tru64's nm complains that /dev/null is an invalid object file
+ case `"$tmp_nm" -B /dev/null 2>&1 | sed '1q'` in
+ */dev/null* | *'Invalid file or object type'*)
+ lt_cv_path_NM="$tmp_nm -B"
+ break
+ ;;
+ *)
+ case `"$tmp_nm" -p /dev/null 2>&1 | sed '1q'` in
+ */dev/null*)
+ lt_cv_path_NM="$tmp_nm -p"
+ break
+ ;;
+ *)
+ lt_cv_path_NM=${lt_cv_path_NM="$tmp_nm"} # keep the first match, but
+ continue # so that we can try to find one that supports BSD flags
+ ;;
+ esac
+ ;;
+ esac
fi
- fi
+ done
+ IFS="$lt_save_ifs"
done
- IFS="$ac_save_ifs"
- test -z "$lt_cv_path_NM" && lt_cv_path_NM=nm
+ : ${lt_cv_path_NM=no}
fi
fi
+echo "$as_me:$LINENO: result: $lt_cv_path_NM" >&5
+echo "${ECHO_T}$lt_cv_path_NM" >&6
+if test "$lt_cv_path_NM" != "no"; then
+ NM="$lt_cv_path_NM"
+else
+ # Didn't find any BSD compatible name lister, look for dumpbin.
+ if test -n "$ac_tool_prefix"; then
+ for ac_prog in "dumpbin -symbols" "link -dump -symbols"
+ do
+ # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
+set dummy $ac_tool_prefix$ac_prog; ac_word=$2
+echo "$as_me:$LINENO: checking for $ac_word" >&5
+echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
+if test "${ac_cv_prog_DUMPBIN+set}" = set; then
+ echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+ if test -n "$DUMPBIN"; then
+ ac_cv_prog_DUMPBIN="$DUMPBIN" # Let the user override the test.
+else
+as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
+for as_dir in $PATH
+do
+ IFS=$as_save_IFS
+ test -z "$as_dir" && as_dir=.
+ for ac_exec_ext in '' $ac_executable_extensions; do
+ if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
+ ac_cv_prog_DUMPBIN="$ac_tool_prefix$ac_prog"
+ echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
+ break 2
+ fi
+done
+done
-NM="$lt_cv_path_NM"
-echo "$ac_t""$NM" 1>&6
+fi
+fi
+DUMPBIN=$ac_cv_prog_DUMPBIN
+if test -n "$DUMPBIN"; then
+ echo "$as_me:$LINENO: result: $DUMPBIN" >&5
+echo "${ECHO_T}$DUMPBIN" >&6
+else
+ echo "$as_me:$LINENO: result: no" >&5
+echo "${ECHO_T}no" >&6
+fi
-echo $ac_n "checking whether ln -s works""... $ac_c" 1>&6
-echo "configure:1453: 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
+ test -n "$DUMPBIN" && break
+ done
+fi
+if test -z "$DUMPBIN"; then
+ ac_ct_DUMPBIN=$DUMPBIN
+ for ac_prog in "dumpbin -symbols" "link -dump -symbols"
+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 "$as_me:$LINENO: checking for $ac_word" >&5
+echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
+if test "${ac_cv_prog_ac_ct_DUMPBIN+set}" = set; then
+ echo $ECHO_N "(cached) $ECHO_C" >&6
else
- rm -f conftestdata
-if ln -s X conftestdata 2>/dev/null
-then
- rm -f conftestdata
- ac_cv_prog_LN_S="ln -s"
+ if test -n "$ac_ct_DUMPBIN"; then
+ ac_cv_prog_ac_ct_DUMPBIN="$ac_ct_DUMPBIN" # Let the user override the test.
else
- ac_cv_prog_LN_S=ln
+as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
+for as_dir in $PATH
+do
+ IFS=$as_save_IFS
+ test -z "$as_dir" && as_dir=.
+ for ac_exec_ext in '' $ac_executable_extensions; do
+ if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
+ ac_cv_prog_ac_ct_DUMPBIN="$ac_prog"
+ echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
+ break 2
+ fi
+done
+done
+
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
+ac_ct_DUMPBIN=$ac_cv_prog_ac_ct_DUMPBIN
+if test -n "$ac_ct_DUMPBIN"; then
+ echo "$as_me:$LINENO: result: $ac_ct_DUMPBIN" >&5
+echo "${ECHO_T}$ac_ct_DUMPBIN" >&6
else
- echo "$ac_t""no" 1>&6
+ echo "$as_me:$LINENO: result: no" >&5
+echo "${ECHO_T}no" >&6
fi
-echo $ac_n "checking how to recognise dependant libraries""... $ac_c" 1>&6
-echo "configure:1474: checking how to recognise dependant libraries" >&5
-if eval "test \"`echo '$''{'lt_cv_deplibs_check_method'+set}'`\" = set"; then
- echo $ac_n "(cached) $ac_c" 1>&6
+ test -n "$ac_ct_DUMPBIN" && break
+done
+test -n "$ac_ct_DUMPBIN" || ac_ct_DUMPBIN=":"
+
+ DUMPBIN=$ac_ct_DUMPBIN
+fi
+
+
+ if test "$DUMPBIN" != ":"; then
+ NM="$DUMPBIN"
+ fi
+fi
+test -z "$NM" && NM=nm
+
+
+
+
+
+
+echo "$as_me:$LINENO: checking the name lister ($NM) interface" >&5
+echo $ECHO_N "checking the name lister ($NM) interface... $ECHO_C" >&6
+if test "${lt_cv_nm_interface+set}" = set; then
+ echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+ lt_cv_nm_interface="BSD nm"
+ echo "int some_variable = 0;" > conftest.$ac_ext
+ (eval echo "\"\$as_me:3762: $ac_compile\"" >&5)
+ (eval "$ac_compile" 2>conftest.err)
+ cat conftest.err >&5
+ (eval echo "\"\$as_me:3765: $NM \\\"conftest.$ac_objext\\\"\"" >&5)
+ (eval "$NM \"conftest.$ac_objext\"" 2>conftest.err > conftest.out)
+ cat conftest.err >&5
+ (eval echo "\"\$as_me:3768: output\"" >&5)
+ cat conftest.out >&5
+ if $GREP 'External.*some_variable' conftest.out > /dev/null; then
+ lt_cv_nm_interface="MS dumpbin"
+ fi
+ rm -f conftest*
+fi
+echo "$as_me:$LINENO: result: $lt_cv_nm_interface" >&5
+echo "${ECHO_T}$lt_cv_nm_interface" >&6
+
+echo "$as_me:$LINENO: checking whether ln -s works" >&5
+echo $ECHO_N "checking whether ln -s works... $ECHO_C" >&6
+LN_S=$as_ln_s
+if test "$LN_S" = "ln -s"; then
+ echo "$as_me:$LINENO: result: yes" >&5
+echo "${ECHO_T}yes" >&6
+else
+ echo "$as_me:$LINENO: result: no, using $LN_S" >&5
+echo "${ECHO_T}no, using $LN_S" >&6
+fi
+
+# find the maximum length of command line arguments
+echo "$as_me:$LINENO: checking the maximum length of command line arguments" >&5
+echo $ECHO_N "checking the maximum length of command line arguments... $ECHO_C" >&6
+if test "${lt_cv_sys_max_cmd_len+set}" = set; then
+ echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+ i=0
+ teststring="ABCD"
+
+ case $build_os in
+ msdosdjgpp*)
+ # On DJGPP, this test can blow up pretty badly due to problems in libc
+ # (any single argument exceeding 2000 bytes causes a buffer overrun
+ # during glob expansion). Even if it were fixed, the result of this
+ # check would be larger than it should be.
+ lt_cv_sys_max_cmd_len=12288; # 12K is about right
+ ;;
+
+ gnu*)
+ # Under GNU Hurd, this test is not required because there is
+ # no limit to the length of command line arguments.
+ # Libtool will interpret -1 as no limit whatsoever
+ lt_cv_sys_max_cmd_len=-1;
+ ;;
+
+ cygwin* | mingw*)
+ # On Win9x/ME, this test blows up -- it succeeds, but takes
+ # about 5 minutes as the teststring grows exponentially.
+ # Worse, since 9x/ME are not pre-emptively multitasking,
+ # you end up with a "frozen" computer, even though with patience
+ # the test eventually succeeds (with a max line length of 256k).
+ # Instead, let's just punt: use the minimum linelength reported by
+ # all of the supported platforms: 8192 (on NT/2K/XP).
+ lt_cv_sys_max_cmd_len=8192;
+ ;;
+
+ amigaos*)
+ # On AmigaOS with pdksh, this test takes hours, literally.
+ # So we just punt and use a minimum line length of 8192.
+ lt_cv_sys_max_cmd_len=8192;
+ ;;
+
+ netbsd* | freebsd* | openbsd* | darwin* | dragonfly*)
+ # This has been around since 386BSD, at least. Likely further.
+ if test -x /sbin/sysctl; then
+ lt_cv_sys_max_cmd_len=`/sbin/sysctl -n kern.argmax`
+ elif test -x /usr/sbin/sysctl; then
+ lt_cv_sys_max_cmd_len=`/usr/sbin/sysctl -n kern.argmax`
+ else
+ lt_cv_sys_max_cmd_len=65536 # usable default for all BSDs
+ fi
+ # And add a safety zone
+ lt_cv_sys_max_cmd_len=`expr $lt_cv_sys_max_cmd_len \/ 4`
+ lt_cv_sys_max_cmd_len=`expr $lt_cv_sys_max_cmd_len \* 3`
+ ;;
+
+ interix*)
+ # We know the value 262144 and hardcode it with a safety zone (like BSD)
+ lt_cv_sys_max_cmd_len=196608
+ ;;
+
+ osf*)
+ # Dr. Hans Ekkehard Plesser reports seeing a kernel panic running configure
+ # due to this test when exec_disable_arg_limit is 1 on Tru64. It is not
+ # nice to cause kernel panics so lets avoid the loop below.
+ # First set a reasonable default.
+ lt_cv_sys_max_cmd_len=16384
+ #
+ if test -x /sbin/sysconfig; then
+ case `/sbin/sysconfig -q proc exec_disable_arg_limit` in
+ *1*) lt_cv_sys_max_cmd_len=-1 ;;
+ esac
+ fi
+ ;;
+ sco3.2v5*)
+ lt_cv_sys_max_cmd_len=102400
+ ;;
+ sysv5* | sco5v6* | sysv4.2uw2*)
+ kargmax=`grep ARG_MAX /etc/conf/cf.d/stune 2>/dev/null`
+ if test -n "$kargmax"; then
+ lt_cv_sys_max_cmd_len=`echo $kargmax | sed 's/.*[ ]//'`
+ else
+ lt_cv_sys_max_cmd_len=32768
+ fi
+ ;;
+ *)
+ lt_cv_sys_max_cmd_len=`getconf ARG_MAX 2> /dev/null`
+ if test -n $lt_cv_sys_max_cmd_len; then
+ lt_cv_sys_max_cmd_len=`expr $lt_cv_sys_max_cmd_len \/ 4`
+ lt_cv_sys_max_cmd_len=`expr $lt_cv_sys_max_cmd_len \* 3`
+ else
+ # Make teststring a little bigger before we do anything with it.
+ # a 1K string should be a reasonable start.
+ for i in 1 2 3 4 5 6 7 8 ; do
+ teststring=$teststring$teststring
+ done
+ SHELL=${SHELL-${CONFIG_SHELL-/bin/sh}}
+ # If test is not a shell built-in, we'll probably end up computing a
+ # maximum length that is only half of the actual maximum length, but
+ # we can't tell.
+ while { test "X"`$SHELL $0 --fallback-echo "X$teststring$teststring" 2>/dev/null` \
+ = "XX$teststring$teststring"; } >/dev/null 2>&1 &&
+ test $i != 17 # 1/2 MB should be enough
+ do
+ i=`expr $i + 1`
+ teststring=$teststring$teststring
+ done
+ # Only check the string length outside the loop.
+ lt_cv_sys_max_cmd_len=`expr "X$teststring" : ".*" 2>&1`
+ teststring=
+ # Add a significant safety factor because C++ compilers can tack on
+ # massive amounts of additional arguments before passing them to the
+ # linker. It appears as though 1/2 is a usable value.
+ lt_cv_sys_max_cmd_len=`expr $lt_cv_sys_max_cmd_len \/ 2`
+ fi
+ ;;
+ esac
+
+fi
+
+if test -n $lt_cv_sys_max_cmd_len ; then
+ echo "$as_me:$LINENO: result: $lt_cv_sys_max_cmd_len" >&5
+echo "${ECHO_T}$lt_cv_sys_max_cmd_len" >&6
+else
+ echo "$as_me:$LINENO: result: none" >&5
+echo "${ECHO_T}none" >&6
+fi
+max_cmd_len=$lt_cv_sys_max_cmd_len
+
+
+
+
+
+
+
+: ${CP="cp -f"}
+: ${MV="mv -f"}
+: ${RM="rm -f"}
+
+echo "$as_me:$LINENO: checking whether the shell understands some XSI constructs" >&5
+echo $ECHO_N "checking whether the shell understands some XSI constructs... $ECHO_C" >&6
+# Try some XSI features
+xsi_shell=no
+( _lt_dummy="a/b/c"
+ test "${_lt_dummy##*/},${_lt_dummy%/*},"${_lt_dummy%"$_lt_dummy"}, \
+ = c,a/b,, ) >/dev/null 2>&1 \
+ && xsi_shell=yes
+echo "$as_me:$LINENO: result: $xsi_shell" >&5
+echo "${ECHO_T}$xsi_shell" >&6
+
+
+echo "$as_me:$LINENO: checking whether the shell understands \"+=\"" >&5
+echo $ECHO_N "checking whether the shell understands \"+=\"... $ECHO_C" >&6
+lt_shell_append=no
+( foo=bar; set foo baz; eval "$1+=\$2" && test "$foo" = barbaz ) \
+ >/dev/null 2>&1 \
+ && lt_shell_append=yes
+echo "$as_me:$LINENO: result: $lt_shell_append" >&5
+echo "${ECHO_T}$lt_shell_append" >&6
+
+
+if ( (MAIL=60; unset MAIL) || exit) >/dev/null 2>&1; then
+ lt_unset=unset
+else
+ lt_unset=false
+fi
+
+
+
+
+
+# test EBCDIC or ASCII
+case `echo X|tr X '\101'` in
+ A) # ASCII based system
+ # \n is not interpreted correctly by Solaris 8 /usr/ucb/tr
+ lt_SP2NL='tr \040 \012'
+ lt_NL2SP='tr \015\012 \040\040'
+ ;;
+ *) # EBCDIC based system
+ lt_SP2NL='tr \100 \n'
+ lt_NL2SP='tr \r\n \100\100'
+ ;;
+esac
+
+
+
+
+
+
+
+
+
+echo "$as_me:$LINENO: checking for $LD option to reload object files" >&5
+echo $ECHO_N "checking for $LD option to reload object files... $ECHO_C" >&6
+if test "${lt_cv_ld_reload_flag+set}" = set; then
+ echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+ lt_cv_ld_reload_flag='-r'
+fi
+echo "$as_me:$LINENO: result: $lt_cv_ld_reload_flag" >&5
+echo "${ECHO_T}$lt_cv_ld_reload_flag" >&6
+reload_flag=$lt_cv_ld_reload_flag
+case $reload_flag in
+"" | " "*) ;;
+*) reload_flag=" $reload_flag" ;;
+esac
+reload_cmds='$LD$reload_flag -o $output$reload_objs'
+case $host_os in
+ darwin*)
+ if test "$GCC" = yes; then
+ reload_cmds='$LTCC $LTCFLAGS -nostdlib ${wl}-r -o $output$reload_objs'
+ else
+ reload_cmds='$LD$reload_flag -o $output$reload_objs'
+ fi
+ ;;
+esac
+
+
+
+
+
+
+
+
+
+
+echo "$as_me:$LINENO: checking how to recognize dependent libraries" >&5
+echo $ECHO_N "checking how to recognize dependent libraries... $ECHO_C" >&6
+if test "${lt_cv_deplibs_check_method+set}" = set; then
+ echo $ECHO_N "(cached) $ECHO_C" >&6
else
lt_cv_file_magic_cmd='$MAGIC_CMD'
lt_cv_file_magic_test_file=
@@ -1483,13 +4026,13 @@ lt_cv_deplibs_check_method='unknown'
# `unknown' -- same as none, but documents that we really don't know.
# 'pass_all' -- all dependencies passed with no checks.
# 'test_compile' -- check by making test program.
-# 'file_magic [regex]' -- check by looking for files in library path
-# which responds to the $file_magic_cmd with a given egrep regex.
+# 'file_magic [[regex]]' -- check by looking for files in library path
+# which responds to the $file_magic_cmd with a given extended regex.
# If you have `file' or equivalent on your system and you're not sure
# whether `pass_all' will *always* work, you probably want this one.
case $host_os in
-aix*)
+aix4* | aix5*)
lt_cv_deplibs_check_method=pass_all
;;
@@ -1497,37 +4040,42 @@ beos*)
lt_cv_deplibs_check_method=pass_all
;;
-bsdi4*)
+bsdi[45]*)
lt_cv_deplibs_check_method='file_magic ELF [0-9][0-9]*-bit [ML]SB (shared object|dynamic lib)'
lt_cv_file_magic_cmd='/usr/bin/file -L'
lt_cv_file_magic_test_file=/shlib/libc.so
;;
-cygwin* | mingw* |pw32*)
- lt_cv_deplibs_check_method='file_magic file format pei*-i386(.*architecture: i386)?'
- lt_cv_file_magic_cmd='$OBJDUMP -f'
+cygwin*)
+ # func_win32_libid is a shell function defined in ltmain.sh
+ lt_cv_deplibs_check_method='file_magic ^x86 archive import|^x86 DLL'
+ lt_cv_file_magic_cmd='func_win32_libid'
+ ;;
+
+mingw* | pw32*)
+ # Base MSYS/MinGW do not provide the 'file' command needed by
+ # func_win32_libid shell function, so use a weaker test based on 'objdump',
+ # unless we find 'file', for example because we are cross-compiling.
+ if ( file / ) >/dev/null 2>&1; then
+ lt_cv_deplibs_check_method='file_magic ^x86 archive import|^x86 DLL'
+ lt_cv_file_magic_cmd='func_win32_libid'
+ else
+ lt_cv_deplibs_check_method='file_magic file format pei*-i386(.*architecture: i386)?'
+ lt_cv_file_magic_cmd='$OBJDUMP -f'
+ fi
;;
darwin* | rhapsody*)
- lt_cv_deplibs_check_method='file_magic Mach-O dynamically linked shared library'
- lt_cv_file_magic_cmd='/usr/bin/file -L'
- case "$host_os" in
- rhapsody* | darwin1.012)
- lt_cv_file_magic_test_file='/System/Library/Frameworks/System.framework/System'
- ;;
- *) # Darwin 1.3 on
- lt_cv_file_magic_test_file='/usr/lib/libSystem.dylib'
- ;;
- esac
+ lt_cv_deplibs_check_method=pass_all
;;
-freebsd* )
- if echo __ELF__ | $CC -E - | grep __ELF__ > /dev/null; then
+freebsd* | dragonfly*)
+ if echo __ELF__ | $CC -E - | $GREP __ELF__ > /dev/null; then
case $host_cpu in
i*86 )
# Not sure whether the presence of OpenBSD here was a mistake.
# Let's accept both of them until this is cleared up.
- lt_cv_deplibs_check_method='file_magic (FreeBSD|OpenBSD)/i[3-9]86 (compact )?demand paged shared library'
+ lt_cv_deplibs_check_method='file_magic (FreeBSD|OpenBSD|DragonFly)/i[3-9]86 (compact )?demand paged shared library'
lt_cv_file_magic_cmd=/usr/bin/file
lt_cv_file_magic_test_file=`echo /usr/lib/libc.so.*`
;;
@@ -1541,206 +4089,1644 @@ gnu*)
lt_cv_deplibs_check_method=pass_all
;;
-hpux10.20*|hpux11*)
+hpux10.20* | hpux11*)
+ lt_cv_file_magic_cmd=/usr/bin/file
case $host_cpu in
- hppa*)
- lt_cv_deplibs_check_method='file_magic (s[0-9][0-9][0-9]|PA-RISC[0-9].[0-9]) shared library'
- lt_cv_file_magic_cmd=/usr/bin/file
- lt_cv_file_magic_test_file=/usr/lib/libc.sl
- ;;
ia64*)
lt_cv_deplibs_check_method='file_magic (s[0-9][0-9][0-9]|ELF-[0-9][0-9]) shared object file - IA64'
- lt_cv_file_magic_cmd=/usr/bin/file
lt_cv_file_magic_test_file=/usr/lib/hpux32/libc.so
;;
- esac
- ;;
-
-irix5* | irix6*)
- case $host_os in
- irix5*)
- # this will be overridden with pass_all, but let us keep it just in case
- lt_cv_deplibs_check_method="file_magic ELF 32-bit MSB dynamic lib MIPS - version 1"
+ hppa*64*)
+ lt_cv_deplibs_check_method='file_magic (s[0-9][0-9][0-9]|ELF-[0-9][0-9]) shared object file - PA-RISC [0-9].[0-9]'
+ lt_cv_file_magic_test_file=/usr/lib/pa20_64/libc.sl
;;
*)
- case $LD in
- *-32|*"-32 ") libmagic=32-bit;;
- *-n32|*"-n32 ") libmagic=N32;;
- *-64|*"-64 ") libmagic=64-bit;;
- *) libmagic=never-match;;
- esac
- # this will be overridden with pass_all, but let us keep it just in case
- lt_cv_deplibs_check_method="file_magic ELF ${libmagic} MSB mips-[1234] dynamic lib MIPS - version 1"
+ lt_cv_deplibs_check_method='file_magic (s[0-9][0-9][0-9]|PA-RISC[0-9].[0-9]) shared library'
+ lt_cv_file_magic_test_file=/usr/lib/libc.sl
;;
esac
- lt_cv_file_magic_test_file=`echo /lib${libsuff}/libc.so*`
+ ;;
+
+interix[3-9]*)
+ # PIC code is broken on Interix 3.x, that's why |\.a not |_pic\.a here
+ lt_cv_deplibs_check_method='match_pattern /lib[^/]+(\.so|\.a)$'
+ ;;
+
+irix5* | irix6* | nonstopux*)
+ case $LD in
+ *-32|*"-32 ") libmagic=32-bit;;
+ *-n32|*"-n32 ") libmagic=N32;;
+ *-64|*"-64 ") libmagic=64-bit;;
+ *) libmagic=never-match;;
+ esac
lt_cv_deplibs_check_method=pass_all
;;
# This must be Linux ELF.
-linux-gnu*)
- case $host_cpu in
- alpha* | mips* | hppa* | i*86 | powerpc* | sparc* | ia64* )
- lt_cv_deplibs_check_method=pass_all ;;
- *)
- # glibc up to 2.1.1 does not perform some relocations on ARM
- lt_cv_deplibs_check_method='file_magic ELF [0-9][0-9]*-bit [LM]SB (shared object|dynamic lib )' ;;
- esac
- lt_cv_file_magic_test_file=`echo /lib/libc.so* /lib/libc-*.so`
+linux* | k*bsd*-gnu)
+ lt_cv_deplibs_check_method=pass_all
;;
netbsd*)
- if echo __ELF__ | $CC -E - | grep __ELF__ > /dev/null; then
- lt_cv_deplibs_check_method='match_pattern /lib[^/\.]+\.so\.[0-9]+\.[0-9]+$'
+ if echo __ELF__ | $CC -E - | $GREP __ELF__ > /dev/null; then
+ lt_cv_deplibs_check_method='match_pattern /lib[^/]+(\.so\.[0-9]+\.[0-9]+|_pic\.a)$'
else
- lt_cv_deplibs_check_method='match_pattern /lib[^/\.]+\.so$'
+ lt_cv_deplibs_check_method='match_pattern /lib[^/]+(\.so|_pic\.a)$'
fi
;;
-newsos6)
+newos6*)
lt_cv_deplibs_check_method='file_magic ELF [0-9][0-9]*-bit [ML]SB (executable|dynamic lib)'
lt_cv_file_magic_cmd=/usr/bin/file
lt_cv_file_magic_test_file=/usr/lib/libnls.so
;;
+*nto* | *qnx*)
+ lt_cv_deplibs_check_method=pass_all
+ ;;
+
+openbsd*)
+ if test -z "`echo __ELF__ | $CC -E - | $GREP __ELF__`" || test "$host_os-$host_cpu" = "openbsd2.8-powerpc"; then
+ lt_cv_deplibs_check_method='match_pattern /lib[^/]+(\.so\.[0-9]+\.[0-9]+|\.so|_pic\.a)$'
+ else
+ lt_cv_deplibs_check_method='match_pattern /lib[^/]+(\.so\.[0-9]+\.[0-9]+|_pic\.a)$'
+ fi
+ ;;
+
osf3* | osf4* | osf5*)
- # this will be overridden with pass_all, but let us keep it just in case
- lt_cv_deplibs_check_method='file_magic COFF format alpha shared library'
- lt_cv_file_magic_test_file=/shlib/libc.so
lt_cv_deplibs_check_method=pass_all
;;
-sco3.2v5*)
+rdos*)
lt_cv_deplibs_check_method=pass_all
;;
solaris*)
lt_cv_deplibs_check_method=pass_all
- lt_cv_file_magic_test_file=/lib/libc.so
;;
-sysv5uw[78]* | sysv4*uw2*)
+sysv5* | sco3.2v5* | sco5v6* | unixware* | OpenUNIX* | sysv4*uw2*)
lt_cv_deplibs_check_method=pass_all
;;
-sysv4 | sysv4.2uw2* | sysv4.3* | sysv5*)
+sysv4 | sysv4.3*)
case $host_vendor in
- ncr)
- lt_cv_deplibs_check_method=pass_all
- ;;
motorola)
lt_cv_deplibs_check_method='file_magic ELF [0-9][0-9]*-bit [ML]SB (shared object|dynamic lib) M[0-9][0-9]* Version [0-9]'
lt_cv_file_magic_test_file=`echo /usr/lib/libc.so*`
;;
+ ncr)
+ lt_cv_deplibs_check_method=pass_all
+ ;;
+ sequent)
+ lt_cv_file_magic_cmd='/bin/file'
+ lt_cv_deplibs_check_method='file_magic ELF [0-9][0-9]*-bit [LM]SB (shared object|dynamic lib )'
+ ;;
+ sni)
+ lt_cv_file_magic_cmd='/bin/file'
+ lt_cv_deplibs_check_method="file_magic ELF [0-9][0-9]*-bit [LM]SB dynamic lib"
+ lt_cv_file_magic_test_file=/lib/libc.so
+ ;;
+ siemens)
+ lt_cv_deplibs_check_method=pass_all
+ ;;
+ pc)
+ lt_cv_deplibs_check_method=pass_all
+ ;;
esac
;;
+
+tpf*)
+ lt_cv_deplibs_check_method=pass_all
+ ;;
esac
fi
-
-echo "$ac_t""$lt_cv_deplibs_check_method" 1>&6
+echo "$as_me:$LINENO: result: $lt_cv_deplibs_check_method" >&5
+echo "${ECHO_T}$lt_cv_deplibs_check_method" >&6
file_magic_cmd=$lt_cv_file_magic_cmd
deplibs_check_method=$lt_cv_deplibs_check_method
+test -z "$deplibs_check_method" && deplibs_check_method=unknown
+
+
+
+
+
+
+
-echo $ac_n "checking for object suffix""... $ac_c" 1>&6
-echo "configure:1647: checking for object suffix" >&5
-if eval "test \"`echo '$''{'ac_cv_objext'+set}'`\" = set"; then
- echo $ac_n "(cached) $ac_c" 1>&6
+
+
+
+
+if test -n "$ac_tool_prefix"; then
+ # Extract the first word of "${ac_tool_prefix}ar", so it can be a program name with args.
+set dummy ${ac_tool_prefix}ar; ac_word=$2
+echo "$as_me:$LINENO: checking for $ac_word" >&5
+echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
+if test "${ac_cv_prog_AR+set}" = set; then
+ echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+ if test -n "$AR"; then
+ ac_cv_prog_AR="$AR" # Let the user override the test.
+else
+as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
+for as_dir in $PATH
+do
+ IFS=$as_save_IFS
+ test -z "$as_dir" && as_dir=.
+ for ac_exec_ext in '' $ac_executable_extensions; do
+ if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
+ ac_cv_prog_AR="${ac_tool_prefix}ar"
+ echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
+ break 2
+ fi
+done
+done
+
+fi
+fi
+AR=$ac_cv_prog_AR
+if test -n "$AR"; then
+ echo "$as_me:$LINENO: result: $AR" >&5
+echo "${ECHO_T}$AR" >&6
else
- rm -f conftest*
-echo 'int i = 1;' > conftest.$ac_ext
-if { (eval echo configure:1653: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
- for ac_file in conftest.*; do
- case $ac_file in
- *.c) ;;
- *) ac_cv_objext=`echo $ac_file | sed -e s/conftest.//` ;;
- esac
- done
+ echo "$as_me:$LINENO: result: no" >&5
+echo "${ECHO_T}no" >&6
+fi
+
+fi
+if test -z "$ac_cv_prog_AR"; then
+ ac_ct_AR=$AR
+ # Extract the first word of "ar", so it can be a program name with args.
+set dummy ar; ac_word=$2
+echo "$as_me:$LINENO: checking for $ac_word" >&5
+echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
+if test "${ac_cv_prog_ac_ct_AR+set}" = set; then
+ echo $ECHO_N "(cached) $ECHO_C" >&6
else
- { echo "configure: error: installation or configuration problem; compiler does not work" 1>&2; exit 1; }
+ if test -n "$ac_ct_AR"; then
+ ac_cv_prog_ac_ct_AR="$ac_ct_AR" # Let the user override the test.
+else
+as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
+for as_dir in $PATH
+do
+ IFS=$as_save_IFS
+ test -z "$as_dir" && as_dir=.
+ for ac_exec_ext in '' $ac_executable_extensions; do
+ if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
+ ac_cv_prog_ac_ct_AR="ar"
+ echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
+ break 2
+ fi
+done
+done
+
+ test -z "$ac_cv_prog_ac_ct_AR" && ac_cv_prog_ac_ct_AR="false"
fi
-rm -f conftest*
+fi
+ac_ct_AR=$ac_cv_prog_ac_ct_AR
+if test -n "$ac_ct_AR"; then
+ echo "$as_me:$LINENO: result: $ac_ct_AR" >&5
+echo "${ECHO_T}$ac_ct_AR" >&6
+else
+ echo "$as_me:$LINENO: result: no" >&5
+echo "${ECHO_T}no" >&6
fi
-echo "$ac_t""$ac_cv_objext" 1>&6
-OBJEXT=$ac_cv_objext
-ac_objext=$ac_cv_objext
+ AR=$ac_ct_AR
+else
+ AR="$ac_cv_prog_AR"
+fi
+
+test -z "$AR" && AR=ar
+test -z "$AR_FLAGS" && AR_FLAGS=cru
+
+
+
+
+
+
+
+
+
+
+
+if test -n "$ac_tool_prefix"; then
+ # Extract the first word of "${ac_tool_prefix}strip", so it can be a program name with args.
+set dummy ${ac_tool_prefix}strip; ac_word=$2
+echo "$as_me:$LINENO: checking for $ac_word" >&5
+echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
+if test "${ac_cv_prog_STRIP+set}" = set; then
+ echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+ if test -n "$STRIP"; then
+ ac_cv_prog_STRIP="$STRIP" # Let the user override the test.
+else
+as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
+for as_dir in $PATH
+do
+ IFS=$as_save_IFS
+ test -z "$as_dir" && as_dir=.
+ for ac_exec_ext in '' $ac_executable_extensions; do
+ if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
+ ac_cv_prog_STRIP="${ac_tool_prefix}strip"
+ echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
+ break 2
+ fi
+done
+done
+
+fi
+fi
+STRIP=$ac_cv_prog_STRIP
+if test -n "$STRIP"; then
+ echo "$as_me:$LINENO: result: $STRIP" >&5
+echo "${ECHO_T}$STRIP" >&6
+else
+ echo "$as_me:$LINENO: result: no" >&5
+echo "${ECHO_T}no" >&6
+fi
+
+fi
+if test -z "$ac_cv_prog_STRIP"; then
+ ac_ct_STRIP=$STRIP
+ # Extract the first word of "strip", so it can be a program name with args.
+set dummy strip; ac_word=$2
+echo "$as_me:$LINENO: checking for $ac_word" >&5
+echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
+if test "${ac_cv_prog_ac_ct_STRIP+set}" = set; then
+ echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+ if test -n "$ac_ct_STRIP"; then
+ ac_cv_prog_ac_ct_STRIP="$ac_ct_STRIP" # Let the user override the test.
+else
+as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
+for as_dir in $PATH
+do
+ IFS=$as_save_IFS
+ test -z "$as_dir" && as_dir=.
+ for ac_exec_ext in '' $ac_executable_extensions; do
+ if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
+ ac_cv_prog_ac_ct_STRIP="strip"
+ echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
+ break 2
+ fi
+done
+done
+
+ test -z "$ac_cv_prog_ac_ct_STRIP" && ac_cv_prog_ac_ct_STRIP=":"
+fi
+fi
+ac_ct_STRIP=$ac_cv_prog_ac_ct_STRIP
+if test -n "$ac_ct_STRIP"; then
+ echo "$as_me:$LINENO: result: $ac_ct_STRIP" >&5
+echo "${ECHO_T}$ac_ct_STRIP" >&6
+else
+ echo "$as_me:$LINENO: result: no" >&5
+echo "${ECHO_T}no" >&6
+fi
+
+ STRIP=$ac_ct_STRIP
+else
+ STRIP="$ac_cv_prog_STRIP"
+fi
+
+test -z "$STRIP" && STRIP=:
+
+
+
+
+
+
+if test -n "$ac_tool_prefix"; then
+ # Extract the first word of "${ac_tool_prefix}ranlib", so it can be a program name with args.
+set dummy ${ac_tool_prefix}ranlib; ac_word=$2
+echo "$as_me:$LINENO: checking for $ac_word" >&5
+echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
+if test "${ac_cv_prog_RANLIB+set}" = set; then
+ echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+ if test -n "$RANLIB"; then
+ ac_cv_prog_RANLIB="$RANLIB" # Let the user override the test.
+else
+as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
+for as_dir in $PATH
+do
+ IFS=$as_save_IFS
+ test -z "$as_dir" && as_dir=.
+ for ac_exec_ext in '' $ac_executable_extensions; do
+ if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
+ ac_cv_prog_RANLIB="${ac_tool_prefix}ranlib"
+ echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
+ break 2
+ fi
+done
+done
+fi
+fi
+RANLIB=$ac_cv_prog_RANLIB
+if test -n "$RANLIB"; then
+ echo "$as_me:$LINENO: result: $RANLIB" >&5
+echo "${ECHO_T}$RANLIB" >&6
+else
+ echo "$as_me:$LINENO: result: no" >&5
+echo "${ECHO_T}no" >&6
+fi
+fi
+if test -z "$ac_cv_prog_RANLIB"; then
+ ac_ct_RANLIB=$RANLIB
+ # Extract the first word of "ranlib", so it can be a program name with args.
+set dummy ranlib; ac_word=$2
+echo "$as_me:$LINENO: checking for $ac_word" >&5
+echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
+if test "${ac_cv_prog_ac_ct_RANLIB+set}" = set; then
+ echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+ if test -n "$ac_ct_RANLIB"; then
+ ac_cv_prog_ac_ct_RANLIB="$ac_ct_RANLIB" # Let the user override the test.
+else
+as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
+for as_dir in $PATH
+do
+ IFS=$as_save_IFS
+ test -z "$as_dir" && as_dir=.
+ for ac_exec_ext in '' $ac_executable_extensions; do
+ if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
+ ac_cv_prog_ac_ct_RANLIB="ranlib"
+ echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
+ break 2
+ fi
+done
+done
-echo $ac_n "checking for executable suffix""... $ac_c" 1>&6
-echo "configure:1673: checking for executable suffix" >&5
-if eval "test \"`echo '$''{'ac_cv_exeext'+set}'`\" = set"; then
- echo $ac_n "(cached) $ac_c" 1>&6
+ test -z "$ac_cv_prog_ac_ct_RANLIB" && ac_cv_prog_ac_ct_RANLIB=":"
+fi
+fi
+ac_ct_RANLIB=$ac_cv_prog_ac_ct_RANLIB
+if test -n "$ac_ct_RANLIB"; then
+ echo "$as_me:$LINENO: result: $ac_ct_RANLIB" >&5
+echo "${ECHO_T}$ac_ct_RANLIB" >&6
else
- if test "$CYGWIN" = yes || test "$MINGW32" = yes; then
- ac_cv_exeext=.exe
+ echo "$as_me:$LINENO: result: no" >&5
+echo "${ECHO_T}no" >&6
+fi
+
+ RANLIB=$ac_ct_RANLIB
+else
+ RANLIB="$ac_cv_prog_RANLIB"
+fi
+
+test -z "$RANLIB" && RANLIB=:
+
+
+
+
+
+
+# Determine commands to create old-style static archives.
+old_archive_cmds='$AR $AR_FLAGS $oldlib$oldobjs$old_deplibs'
+old_postinstall_cmds='chmod 644 $oldlib'
+old_postuninstall_cmds=
+
+if test -n "$RANLIB"; then
+ case $host_os in
+ openbsd*)
+ old_postinstall_cmds="$old_postinstall_cmds~\$RANLIB -t \$oldlib"
+ ;;
+ *)
+ old_postinstall_cmds="$old_postinstall_cmds~\$RANLIB \$oldlib"
+ ;;
+ esac
+ old_archive_cmds="$old_archive_cmds~\$RANLIB \$oldlib"
+fi
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+# If no C compiler was specified, use CC.
+LTCC=${LTCC-"$CC"}
+
+# If no C compiler flags were specified, use CFLAGS.
+LTCFLAGS=${LTCFLAGS-"$CFLAGS"}
+
+# Allow CC to be a program name with arguments.
+compiler=$CC
+
+
+# Check for command to grab the raw symbol name followed by C symbol from nm.
+echo "$as_me:$LINENO: checking command to parse $NM output from $compiler object" >&5
+echo $ECHO_N "checking command to parse $NM output from $compiler object... $ECHO_C" >&6
+if test "${lt_cv_sys_global_symbol_pipe+set}" = set; then
+ echo $ECHO_N "(cached) $ECHO_C" >&6
else
+
+# These are sane defaults that work on at least a few old systems.
+# [They come from Ultrix. What could be older than Ultrix?!! ;)]
+
+# Character class describing NM global symbol codes.
+symcode='[BCDEGRST]'
+
+# Regexp to match symbols that can be accessed directly from C.
+sympat='\([_A-Za-z][_A-Za-z0-9]*\)'
+
+# Define system-specific variables.
+case $host_os in
+aix*)
+ symcode='[BCDT]'
+ ;;
+cygwin* | mingw* | pw32*)
+ symcode='[ABCDGISTW]'
+ ;;
+hpux*)
+ if test "$host_cpu" = ia64; then
+ symcode='[ABCDEGRST]'
+ fi
+ ;;
+irix* | nonstopux*)
+ symcode='[BCDEGRST]'
+ ;;
+osf*)
+ symcode='[BCDEGQRST]'
+ ;;
+solaris*)
+ symcode='[BDRT]'
+ ;;
+sco3.2v5*)
+ symcode='[DT]'
+ ;;
+sysv4.2uw2*)
+ symcode='[DT]'
+ ;;
+sysv5* | sco5v6* | unixware* | OpenUNIX*)
+ symcode='[ABDT]'
+ ;;
+sysv4)
+ symcode='[DFNSTU]'
+ ;;
+esac
+
+# If we're using GNU nm, then use its standard symbol codes.
+case `$NM -V 2>&1` in
+*GNU* | *'with BFD'*)
+ symcode='[ABCDGIRSTW]' ;;
+esac
+
+# Transform an extracted symbol line into a proper C declaration.
+# Some systems (esp. on ia64) link data and code symbols differently,
+# so use this general approach.
+lt_cv_sys_global_symbol_to_cdecl="sed -n -e 's/^T .* \(.*\)$/extern int \1();/p' -e 's/^$symcode* .* \(.*\)$/extern char \1;/p'"
+
+# Transform an extracted symbol line into symbol name and symbol address
+lt_cv_sys_global_symbol_to_c_name_address="sed -n -e 's/^: \([^ ]*\) $/ {\\\"\1\\\", (void *) 0},/p' -e 's/^$symcode* \([^ ]*\) \([^ ]*\)$/ {\"\2\", (void *) \&\2},/p'"
+
+# Handle CRLF in mingw tool chain
+opt_cr=
+case $build_os in
+mingw*)
+ opt_cr=`$ECHO 'x\{0,1\}' | tr x '\015'` # option cr in regexp
+ ;;
+esac
+
+# Try without a prefix underscore, then with it.
+for ac_symprfx in "" "_"; do
+
+ # Transform symcode, sympat, and symprfx into a raw symbol and a C symbol.
+ symxfrm="\\1 $ac_symprfx\\2 \\2"
+
+ # Write the raw and C identifiers.
+ if test "$lt_cv_nm_interface" = "MS dumpbin"; then
+ # Fake it for dumpbin and say T for any non-static function
+ # and D for any global variable.
+ # Also find C++ and __fastcall symbols from MSVC++,
+ # which start with @ or ?.
+ lt_cv_sys_global_symbol_pipe="$AWK '"\
+" {last_section=section; section=\$ 3};"\
+" /Section length .*#relocs.*(pick any)/{hide[last_section]=1};"\
+" \$ 0!~/External *\|/{next};"\
+" / 0+ UNDEF /{next}; / UNDEF \([^|]\)*()/{next};"\
+" {if(hide[section]) next};"\
+" {f=0}; \$ 0~/\(\).*\|/{f=1}; {printf f ? \"T \" : \"D \"};"\
+" {split(\$ 0, a, /\||\r/); split(a[2], s)};"\
+" s[1]~/^[@?]/{print s[1], s[1]; next};"\
+" s[1]~prfx {split(s[1],t,\"@\"); print t[1], substr(t[1],length(prfx))}"\
+" ' prfx=^$ac_symprfx"
+ else
+ lt_cv_sys_global_symbol_pipe="sed -n -e 's/^.*[ ]\($symcode$symcode*\)[ ][ ]*$ac_symprfx$sympat$opt_cr$/$symxfrm/p'"
+ fi
+
+ # Check to see that the pipe works correctly.
+ pipe_works=no
+
rm -f conftest*
- echo 'int main () { return 0; }' > conftest.$ac_ext
- ac_cv_exeext=
- if { (eval echo configure:1683: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; }; then
- for file in conftest.*; do
- case $file in
- *.c | *.o | *.obj | *.ilk | *.pdb) ;;
- *) ac_cv_exeext=`echo $file | sed -e s/conftest//` ;;
+ cat > conftest.$ac_ext <<_LT_EOF
+#ifdef __cplusplus
+extern "C" {
+#endif
+char nm_test_var;
+void nm_test_func(void);
+void nm_test_func(void){}
+#ifdef __cplusplus
+}
+#endif
+int main(){nm_test_var='a';nm_test_func();return(0);}
+_LT_EOF
+
+ if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
+ (eval $ac_compile) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); }; then
+ # Now try to grab the symbols.
+ nlist=conftest.nm
+ if { (eval echo "$as_me:$LINENO: \"$NM conftest.$ac_objext \| $lt_cv_sys_global_symbol_pipe \> $nlist\"") >&5
+ (eval $NM conftest.$ac_objext \| $lt_cv_sys_global_symbol_pipe \> $nlist) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); } && test -s "$nlist"; then
+ # Try sorting and uniquifying the output.
+ if sort "$nlist" | uniq > "$nlist"T; then
+ mv -f "$nlist"T "$nlist"
+ else
+ rm -f "$nlist"T
+ fi
+
+ # Make sure that we snagged all the symbols we need.
+ if $GREP ' nm_test_var$' "$nlist" >/dev/null; then
+ if $GREP ' nm_test_func$' "$nlist" >/dev/null; then
+ cat <<_LT_EOF > conftest.$ac_ext
+#ifdef __cplusplus
+extern "C" {
+#endif
+
+_LT_EOF
+ # Now generate the symbol file.
+ eval "$lt_cv_sys_global_symbol_to_cdecl"' < "$nlist" | $GREP -v main >> conftest.$ac_ext'
+
+ cat <<_LT_EOF >> conftest.$ac_ext
+
+/* The mapping between symbol names and symbols. */
+const struct {
+ const char *name;
+ void *address;
+}
+lt__PROGRAM__LTX_preloaded_symbols[] =
+{
+ { "@PROGRAM@", (void *) 0 },
+_LT_EOF
+ $SED "s/^$symcode$symcode* \(.*\) \(.*\)$/ {\"\2\", (void *) \&\2},/" < "$nlist" | $GREP -v main >> conftest.$ac_ext
+ cat <<\_LT_EOF >> conftest.$ac_ext
+ {0, (void *) 0}
+};
+
+/* This works around a problem in FreeBSD linker */
+#ifdef FREEBSD_WORKAROUND
+static const void *lt_preloaded_setup() {
+ return lt__PROGRAM__LTX_preloaded_symbols;
+}
+#endif
+
+#ifdef __cplusplus
+}
+#endif
+_LT_EOF
+ # Now try linking the two files.
+ mv conftest.$ac_objext conftstm.$ac_objext
+ lt_save_LIBS="$LIBS"
+ lt_save_CFLAGS="$CFLAGS"
+ LIBS="conftstm.$ac_objext"
+ CFLAGS="$CFLAGS$lt_prog_compiler_no_builtin_flag"
+ if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
+ (eval $ac_link) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); } && test -s conftest${ac_exeext}; then
+ pipe_works=yes
+ fi
+ LIBS="$lt_save_LIBS"
+ CFLAGS="$lt_save_CFLAGS"
+ else
+ echo "cannot find nm_test_func in $nlist" >&5
+ fi
+ else
+ echo "cannot find nm_test_var in $nlist" >&5
+ fi
+ else
+ echo "cannot run $lt_cv_sys_global_symbol_pipe" >&5
+ fi
+ else
+ echo "$progname: failed program was:" >&5
+ cat conftest.$ac_ext >&5
+ fi
+ rm -f conftest* conftst*
+
+ # Do not use the global_symbol_pipe unless it works.
+ if test "$pipe_works" = yes; then
+ break
+ else
+ lt_cv_sys_global_symbol_pipe=
+ fi
+done
+
+fi
+
+if test -z "$lt_cv_sys_global_symbol_pipe"; then
+ lt_cv_sys_global_symbol_to_cdecl=
+fi
+if test -z "$lt_cv_sys_global_symbol_pipe$lt_cv_sys_global_symbol_to_cdecl"; then
+ echo "$as_me:$LINENO: result: failed" >&5
+echo "${ECHO_T}failed" >&6
+else
+ echo "$as_me:$LINENO: result: ok" >&5
+echo "${ECHO_T}ok" >&6
+fi
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+# Check whether --enable-libtool-lock or --disable-libtool-lock was given.
+if test "${enable_libtool_lock+set}" = set; then
+ enableval="$enable_libtool_lock"
+
+fi;
+test "x$enable_libtool_lock" != xno && enable_libtool_lock=yes
+
+# Some flags need to be propagated to the compiler or linker for good
+# libtool support.
+case $host in
+ia64-*-hpux*)
+ # Find out which ABI we are using.
+ echo 'int i;' > conftest.$ac_ext
+ if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
+ (eval $ac_compile) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); }; then
+ case `/usr/bin/file conftest.$ac_objext` in
+ *ELF-32*)
+ HPUX_IA64_MODE="32"
+ ;;
+ *ELF-64*)
+ HPUX_IA64_MODE="64"
+ ;;
+ esac
+ fi
+ rm -rf conftest*
+ ;;
+*-*-irix6*)
+ # Find out which ABI we are using.
+ echo '#line 4823 "configure"' > conftest.$ac_ext
+ if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
+ (eval $ac_compile) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); }; then
+ if test "$lt_cv_prog_gnu_ld" = yes; then
+ case `/usr/bin/file conftest.$ac_objext` in
+ *32-bit*)
+ LD="${LD-ld} -melf32bsmip"
+ ;;
+ *N32*)
+ LD="${LD-ld} -melf32bmipn32"
+ ;;
+ *64-bit*)
+ LD="${LD-ld} -melf64bmip"
+ ;;
+ esac
+ else
+ case `/usr/bin/file conftest.$ac_objext` in
+ *32-bit*)
+ LD="${LD-ld} -32"
+ ;;
+ *N32*)
+ LD="${LD-ld} -n32"
+ ;;
+ *64-bit*)
+ LD="${LD-ld} -64"
+ ;;
esac
+ fi
+ fi
+ rm -rf conftest*
+ ;;
+
+x86_64-*kfreebsd*-gnu|x86_64-*linux*|ppc*-*linux*|powerpc*-*linux*| \
+s390*-*linux*|s390*-*tpf*|sparc*-*linux*)
+ # Find out which ABI we are using.
+ echo 'int i;' > conftest.$ac_ext
+ if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
+ (eval $ac_compile) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); }; then
+ case `/usr/bin/file conftest.o` in
+ *32-bit*)
+ case $host in
+ x86_64-*kfreebsd*-gnu)
+ LD="${LD-ld} -m elf_i386_fbsd"
+ ;;
+ x86_64-*linux*)
+ LD="${LD-ld} -m elf_i386"
+ ;;
+ ppc64-*linux*|powerpc64-*linux*)
+ LD="${LD-ld} -m elf32ppclinux"
+ ;;
+ s390x-*linux*)
+ LD="${LD-ld} -m elf_s390"
+ ;;
+ sparc64-*linux*)
+ LD="${LD-ld} -m elf32_sparc"
+ ;;
+ esac
+ ;;
+ *64-bit*)
+ case $host in
+ x86_64-*kfreebsd*-gnu)
+ LD="${LD-ld} -m elf_x86_64_fbsd"
+ ;;
+ x86_64-*linux*)
+ LD="${LD-ld} -m elf_x86_64"
+ ;;
+ ppc*-*linux*|powerpc*-*linux*)
+ LD="${LD-ld} -m elf64ppc"
+ ;;
+ s390*-*linux*|s390*-*tpf*)
+ LD="${LD-ld} -m elf64_s390"
+ ;;
+ sparc*-*linux*)
+ LD="${LD-ld} -m elf64_sparc"
+ ;;
+ esac
+ ;;
+ esac
+ fi
+ rm -rf conftest*
+ ;;
+
+*-*-sco3.2v5*)
+ # On SCO OpenServer 5, we need -belf to get full-featured binaries.
+ SAVE_CFLAGS="$CFLAGS"
+ CFLAGS="$CFLAGS -belf"
+ echo "$as_me:$LINENO: checking whether the C compiler needs -belf" >&5
+echo $ECHO_N "checking whether the C compiler needs -belf... $ECHO_C" >&6
+if test "${lt_cv_cc_needs_belf+set}" = set; then
+ echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+ ac_ext=c
+ac_cpp='$CPP $CPPFLAGS'
+ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
+ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
+ac_compiler_gnu=$ac_cv_c_compiler_gnu
+
+ cat >conftest.$ac_ext <<_ACEOF
+/* confdefs.h. */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h. */
+
+int
+main ()
+{
+
+ ;
+ return 0;
+}
+_ACEOF
+rm -f conftest.$ac_objext conftest$ac_exeext
+if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
+ (eval $ac_link) 2>conftest.er1
+ ac_status=$?
+ grep -v '^ *+' conftest.er1 >conftest.err
+ rm -f conftest.er1
+ cat conftest.err >&5
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); } &&
+ { ac_try='test -z "$ac_c_werror_flag"
+ || test ! -s conftest.err'
+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+ (eval $ac_try) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); }; } &&
+ { ac_try='test -s conftest$ac_exeext'
+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+ (eval $ac_try) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); }; }; then
+ lt_cv_cc_needs_belf=yes
+else
+ echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+lt_cv_cc_needs_belf=no
+fi
+rm -f conftest.err conftest.$ac_objext \
+ conftest$ac_exeext conftest.$ac_ext
+ ac_ext=c
+ac_cpp='$CPP $CPPFLAGS'
+ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
+ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
+ac_compiler_gnu=$ac_cv_c_compiler_gnu
+
+fi
+echo "$as_me:$LINENO: result: $lt_cv_cc_needs_belf" >&5
+echo "${ECHO_T}$lt_cv_cc_needs_belf" >&6
+ if test x"$lt_cv_cc_needs_belf" != x"yes"; then
+ # this is probably gcc 2.8.0, egcs 1.0 or newer; no need for -belf
+ CFLAGS="$SAVE_CFLAGS"
+ fi
+ ;;
+sparc*-*solaris*)
+ # Find out which ABI we are using.
+ echo 'int i;' > conftest.$ac_ext
+ if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
+ (eval $ac_compile) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); }; then
+ case `/usr/bin/file conftest.o` in
+ *64-bit*)
+ case $lt_cv_prog_gnu_ld in
+ yes*) LD="${LD-ld} -m elf64_sparc" ;;
+ *) LD="${LD-ld} -64" ;;
+ esac
+ ;;
+ esac
+ fi
+ rm -rf conftest*
+ ;;
+esac
+
+need_locks="$enable_libtool_lock"
+
+ac_ext=c
+ac_cpp='$CPP $CPPFLAGS'
+ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
+ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
+ac_compiler_gnu=$ac_cv_c_compiler_gnu
+echo "$as_me:$LINENO: checking how to run the C preprocessor" >&5
+echo $ECHO_N "checking how to run the C preprocessor... $ECHO_C" >&6
+# On Suns, sometimes $CPP names a directory.
+if test -n "$CPP" && test -d "$CPP"; then
+ CPP=
+fi
+if test -z "$CPP"; then
+ if test "${ac_cv_prog_CPP+set}" = set; then
+ echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+ # Double quotes because CPP needs to be expanded
+ for CPP in "$CC -E" "$CC -E -traditional-cpp" "/lib/cpp"
+ do
+ ac_preproc_ok=false
+for ac_c_preproc_warn_flag in '' yes
+do
+ # Use a header file that comes with gcc, so configuring glibc
+ # with a fresh cross-compiler works.
+ # Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
+ # <limits.h> exists even on freestanding compilers.
+ # On the NeXT, cc -E runs the code through the compiler's parser,
+ # not just through cpp. "Syntax error" is here to catch this case.
+ cat >conftest.$ac_ext <<_ACEOF
+/* confdefs.h. */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h. */
+#ifdef __STDC__
+# include <limits.h>
+#else
+# include <assert.h>
+#endif
+ Syntax error
+_ACEOF
+if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5
+ (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
+ ac_status=$?
+ grep -v '^ *+' conftest.er1 >conftest.err
+ rm -f conftest.er1
+ cat conftest.err >&5
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); } >/dev/null; then
+ if test -s conftest.err; then
+ ac_cpp_err=$ac_c_preproc_warn_flag
+ ac_cpp_err=$ac_cpp_err$ac_c_werror_flag
+ else
+ ac_cpp_err=
+ fi
+else
+ ac_cpp_err=yes
+fi
+if test -z "$ac_cpp_err"; then
+ :
+else
+ echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+ # Broken: fails on valid input.
+continue
+fi
+rm -f conftest.err conftest.$ac_ext
+
+ # OK, works on sane cases. Now check whether non-existent headers
+ # can be detected and how.
+ cat >conftest.$ac_ext <<_ACEOF
+/* confdefs.h. */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h. */
+#include <ac_nonexistent.h>
+_ACEOF
+if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5
+ (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
+ ac_status=$?
+ grep -v '^ *+' conftest.er1 >conftest.err
+ rm -f conftest.er1
+ cat conftest.err >&5
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); } >/dev/null; then
+ if test -s conftest.err; then
+ ac_cpp_err=$ac_c_preproc_warn_flag
+ ac_cpp_err=$ac_cpp_err$ac_c_werror_flag
+ else
+ ac_cpp_err=
+ fi
+else
+ ac_cpp_err=yes
+fi
+if test -z "$ac_cpp_err"; then
+ # Broken: success on invalid input.
+continue
+else
+ echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+ # Passes both tests.
+ac_preproc_ok=:
+break
+fi
+rm -f conftest.err conftest.$ac_ext
+
+done
+# Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped.
+rm -f conftest.err conftest.$ac_ext
+if $ac_preproc_ok; then
+ break
+fi
+
done
+ ac_cv_prog_CPP=$CPP
+
+fi
+ CPP=$ac_cv_prog_CPP
+else
+ ac_cv_prog_CPP=$CPP
+fi
+echo "$as_me:$LINENO: result: $CPP" >&5
+echo "${ECHO_T}$CPP" >&6
+ac_preproc_ok=false
+for ac_c_preproc_warn_flag in '' yes
+do
+ # Use a header file that comes with gcc, so configuring glibc
+ # with a fresh cross-compiler works.
+ # Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
+ # <limits.h> exists even on freestanding compilers.
+ # On the NeXT, cc -E runs the code through the compiler's parser,
+ # not just through cpp. "Syntax error" is here to catch this case.
+ cat >conftest.$ac_ext <<_ACEOF
+/* confdefs.h. */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h. */
+#ifdef __STDC__
+# include <limits.h>
+#else
+# include <assert.h>
+#endif
+ Syntax error
+_ACEOF
+if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5
+ (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
+ ac_status=$?
+ grep -v '^ *+' conftest.er1 >conftest.err
+ rm -f conftest.er1
+ cat conftest.err >&5
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); } >/dev/null; then
+ if test -s conftest.err; then
+ ac_cpp_err=$ac_c_preproc_warn_flag
+ ac_cpp_err=$ac_cpp_err$ac_c_werror_flag
else
- { echo "configure: error: installation or configuration problem: compiler cannot create executables." 1>&2; exit 1; }
+ ac_cpp_err=
fi
- rm -f conftest*
- test x"${ac_cv_exeext}" = x && ac_cv_exeext=no
+else
+ ac_cpp_err=yes
fi
+if test -z "$ac_cpp_err"; then
+ :
+else
+ echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+ # Broken: fails on valid input.
+continue
+fi
+rm -f conftest.err conftest.$ac_ext
+
+ # OK, works on sane cases. Now check whether non-existent headers
+ # can be detected and how.
+ cat >conftest.$ac_ext <<_ACEOF
+/* confdefs.h. */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h. */
+#include <ac_nonexistent.h>
+_ACEOF
+if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5
+ (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
+ ac_status=$?
+ grep -v '^ *+' conftest.er1 >conftest.err
+ rm -f conftest.er1
+ cat conftest.err >&5
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); } >/dev/null; then
+ if test -s conftest.err; then
+ ac_cpp_err=$ac_c_preproc_warn_flag
+ ac_cpp_err=$ac_cpp_err$ac_c_werror_flag
+ else
+ ac_cpp_err=
+ fi
+else
+ ac_cpp_err=yes
fi
+if test -z "$ac_cpp_err"; then
+ # Broken: success on invalid input.
+continue
+else
+ echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
-EXEEXT=""
-test x"${ac_cv_exeext}" != xno && EXEEXT=${ac_cv_exeext}
-echo "$ac_t""${ac_cv_exeext}" 1>&6
-ac_exeext=$EXEEXT
+ # Passes both tests.
+ac_preproc_ok=:
+break
+fi
+rm -f conftest.err conftest.$ac_ext
+
+done
+# Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped.
+rm -f conftest.err conftest.$ac_ext
+if $ac_preproc_ok; then
+ :
+else
+ { { echo "$as_me:$LINENO: error: C preprocessor \"$CPP\" fails sanity check
+See \`config.log' for more details." >&5
+echo "$as_me: error: C preprocessor \"$CPP\" fails sanity check
+See \`config.log' for more details." >&2;}
+ { (exit 1); exit 1; }; }
+fi
-if test $host != $build; then
- ac_tool_prefix=${host_alias}-
+ac_ext=c
+ac_cpp='$CPP $CPPFLAGS'
+ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
+ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
+ac_compiler_gnu=$ac_cv_c_compiler_gnu
+
+
+echo "$as_me:$LINENO: checking for ANSI C header files" >&5
+echo $ECHO_N "checking for ANSI C header files... $ECHO_C" >&6
+if test "${ac_cv_header_stdc+set}" = set; then
+ echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+ cat >conftest.$ac_ext <<_ACEOF
+/* confdefs.h. */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h. */
+#include <stdlib.h>
+#include <stdarg.h>
+#include <string.h>
+#include <float.h>
+
+int
+main ()
+{
+
+ ;
+ return 0;
+}
+_ACEOF
+rm -f conftest.$ac_objext
+if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
+ (eval $ac_compile) 2>conftest.er1
+ ac_status=$?
+ grep -v '^ *+' conftest.er1 >conftest.err
+ rm -f conftest.er1
+ cat conftest.err >&5
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); } &&
+ { ac_try='test -z "$ac_c_werror_flag"
+ || test ! -s conftest.err'
+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+ (eval $ac_try) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); }; } &&
+ { ac_try='test -s conftest.$ac_objext'
+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+ (eval $ac_try) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); }; }; then
+ ac_cv_header_stdc=yes
else
- ac_tool_prefix=
+ echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+ac_cv_header_stdc=no
fi
+rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
+
+if test $ac_cv_header_stdc = yes; then
+ # SunOS 4.x string.h does not declare mem*, contrary to ANSI.
+ cat >conftest.$ac_ext <<_ACEOF
+/* confdefs.h. */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h. */
+#include <string.h>
+
+_ACEOF
+if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
+ $EGREP "memchr" >/dev/null 2>&1; then
+ :
+else
+ ac_cv_header_stdc=no
+fi
+rm -f conftest*
+
+fi
+
+if test $ac_cv_header_stdc = yes; then
+ # ISC 2.0.2 stdlib.h does not declare free, contrary to ANSI.
+ cat >conftest.$ac_ext <<_ACEOF
+/* confdefs.h. */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h. */
+#include <stdlib.h>
+
+_ACEOF
+if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
+ $EGREP "free" >/dev/null 2>&1; then
+ :
+else
+ ac_cv_header_stdc=no
+fi
+rm -f conftest*
+
+fi
+
+if test $ac_cv_header_stdc = yes; then
+ # /bin/cc in Irix-4.0.5 gets non-ANSI ctype macros unless using -ansi.
+ if test "$cross_compiling" = yes; then
+ :
+else
+ cat >conftest.$ac_ext <<_ACEOF
+/* confdefs.h. */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h. */
+#include <ctype.h>
+#if ((' ' & 0x0FF) == 0x020)
+# define ISLOWER(c) ('a' <= (c) && (c) <= 'z')
+# define TOUPPER(c) (ISLOWER(c) ? 'A' + ((c) - 'a') : (c))
+#else
+# define ISLOWER(c) \
+ (('a' <= (c) && (c) <= 'i') \
+ || ('j' <= (c) && (c) <= 'r') \
+ || ('s' <= (c) && (c) <= 'z'))
+# define TOUPPER(c) (ISLOWER(c) ? ((c) | 0x40) : (c))
+#endif
+
+#define XOR(e, f) (((e) && !(f)) || (!(e) && (f)))
+int
+main ()
+{
+ int i;
+ for (i = 0; i < 256; i++)
+ if (XOR (islower (i), ISLOWER (i))
+ || toupper (i) != TOUPPER (i))
+ exit(2);
+ exit (0);
+}
+_ACEOF
+rm -f conftest$ac_exeext
+if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
+ (eval $ac_link) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+ (eval $ac_try) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); }; }; then
+ :
+else
+ echo "$as_me: program exited with status $ac_status" >&5
+echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+( exit $ac_status )
+ac_cv_header_stdc=no
+fi
+rm -f core *.core gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
+fi
+fi
+fi
+echo "$as_me:$LINENO: result: $ac_cv_header_stdc" >&5
+echo "${ECHO_T}$ac_cv_header_stdc" >&6
+if test $ac_cv_header_stdc = yes; then
+
+cat >>confdefs.h <<\_ACEOF
+#define STDC_HEADERS 1
+_ACEOF
+
+fi
+
+# On IRIX 5.3, sys/types and inttypes.h are conflicting.
+
+
+
+
+
+
+
+
+
+for ac_header in sys/types.h sys/stat.h stdlib.h string.h memory.h strings.h \
+ inttypes.h stdint.h unistd.h
+do
+as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
+echo "$as_me:$LINENO: checking for $ac_header" >&5
+echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
+if eval "test \"\${$as_ac_Header+set}\" = set"; then
+ echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+ cat >conftest.$ac_ext <<_ACEOF
+/* confdefs.h. */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h. */
+$ac_includes_default
+
+#include <$ac_header>
+_ACEOF
+rm -f conftest.$ac_objext
+if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
+ (eval $ac_compile) 2>conftest.er1
+ ac_status=$?
+ grep -v '^ *+' conftest.er1 >conftest.err
+ rm -f conftest.er1
+ cat conftest.err >&5
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); } &&
+ { ac_try='test -z "$ac_c_werror_flag"
+ || test ! -s conftest.err'
+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+ (eval $ac_try) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); }; } &&
+ { ac_try='test -s conftest.$ac_objext'
+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+ (eval $ac_try) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); }; }; then
+ eval "$as_ac_Header=yes"
+else
+ echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+eval "$as_ac_Header=no"
+fi
+rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
+fi
+echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5
+echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
+if test `eval echo '${'$as_ac_Header'}'` = yes; then
+ cat >>confdefs.h <<_ACEOF
+#define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
+_ACEOF
+
+fi
+
+done
+
+
+
+for ac_header in dlfcn.h
+do
+as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
+echo "$as_me:$LINENO: checking for $ac_header" >&5
+echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
+if eval "test \"\${$as_ac_Header+set}\" = set"; then
+ echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+ cat >conftest.$ac_ext <<_ACEOF
+/* confdefs.h. */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h. */
+$ac_includes_default
+
+#include <$ac_header>
+_ACEOF
+rm -f conftest.$ac_objext
+if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
+ (eval $ac_compile) 2>conftest.er1
+ ac_status=$?
+ grep -v '^ *+' conftest.er1 >conftest.err
+ rm -f conftest.er1
+ cat conftest.err >&5
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); } &&
+ { ac_try='test -z "$ac_c_werror_flag"
+ || test ! -s conftest.err'
+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+ (eval $ac_try) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); }; } &&
+ { ac_try='test -s conftest.$ac_objext'
+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+ (eval $ac_try) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); }; }; then
+ eval "$as_ac_Header=yes"
+else
+ echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+eval "$as_ac_Header=no"
+fi
+rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
+fi
+echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5
+echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
+if test `eval echo '${'$as_ac_Header'}'` = yes; then
+ cat >>confdefs.h <<_ACEOF
+#define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
+_ACEOF
+
+fi
+
+done
+
+
+
+# This can be used to rebuild libtool when needed
+LIBTOOL_DEPS="$ltmain"
+
+# Always use our own libtool.
+LIBTOOL='$(SHELL) $(top_builddir)/libtool'
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+test -z "$LN_S" && LN_S="ln -s"
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+if test -n "${ZSH_VERSION+set}" ; then
+ setopt NO_GLOB_SUBST
+fi
+
+echo "$as_me:$LINENO: checking for objdir" >&5
+echo $ECHO_N "checking for objdir... $ECHO_C" >&6
+if test "${lt_cv_objdir+set}" = set; then
+ echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+ rm -f .libs 2>/dev/null
+mkdir .libs 2>/dev/null
+if test -d .libs; then
+ lt_cv_objdir=.libs
+else
+ # MS-DOS does not allow filenames that begin with a dot.
+ lt_cv_objdir=_libs
+fi
+rmdir .libs 2>/dev/null
+fi
+echo "$as_me:$LINENO: result: $lt_cv_objdir" >&5
+echo "${ECHO_T}$lt_cv_objdir" >&6
+objdir=$lt_cv_objdir
+
+
+
+
+
+cat >>confdefs.h <<_ACEOF
+#define LT_OBJDIR "$lt_cv_objdir/"
+_ACEOF
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+case $host_os in
+aix3*)
+ # AIX sometimes has problems with the GCC collect2 program. For some
+ # reason, if we set the COLLECT_NAMES environment variable, the problems
+ # vanish in a puff of smoke.
+ if test "X${COLLECT_NAMES+set}" != Xset; then
+ COLLECT_NAMES=
+ export COLLECT_NAMES
+ fi
+ ;;
+esac
+
+# Sed substitution that helps us do robust quoting. It backslashifies
+# metacharacters that are still active within double-quoted strings.
+sed_quote_subst='s/\(["`$\\]\)/\\\1/g'
+
+# Same as above, but do not quote variable references.
+double_quote_subst='s/\(["`\\]\)/\\\1/g'
+
+# Sed substitution to delay expansion of an escaped shell variable in a
+# double_quote_subst'ed string.
+delay_variable_subst='s/\\\\\\\\\\\$/\\\\\\$/g'
+
+# Sed substitution to delay expansion of an escaped single quote.
+delay_single_quote_subst='s/'\''/'\'\\\\\\\'\''/g'
+
+# Sed substitution to avoid accidental globbing in evaled expressions
+no_glob_subst='s/\*/\\\*/g'
+
+# Global variables:
+ofile=libtool
+can_build_shared=yes
+
+# All known linkers require a `.a' archive for static linking (except MSVC,
+# which needs '.lib').
+libext=a
+
+with_gnu_ld="$lt_cv_prog_gnu_ld"
+
+old_CC="$CC"
+old_CFLAGS="$CFLAGS"
+
+# Set sane defaults for various variables
+test -z "$CC" && CC=cc
+test -z "$LTCC" && LTCC=$CC
+test -z "$LTCFLAGS" && LTCFLAGS=$CFLAGS
+test -z "$LD" && LD=ld
+test -z "$ac_objext" && ac_objext=o
+
+for cc_temp in $compiler""; do
+ case $cc_temp in
+ compile | *[\\/]compile | ccache | *[\\/]ccache ) ;;
+ distcc | *[\\/]distcc | purify | *[\\/]purify ) ;;
+ \-*) ;;
+ *) break;;
+ esac
+done
+cc_basename=`$ECHO "X$cc_temp" | $Xsed -e 's%.*/%%' -e "s%^$host_alias-%%"`
-# Autoconf 2.13's AC_OBJEXT and AC_EXEEXT macros only works for C compilers!
# Only perform the check for file, if the check method requires it
+test -z "$MAGIC_CMD" && MAGIC_CMD=file
case $deplibs_check_method in
file_magic*)
if test "$file_magic_cmd" = '$MAGIC_CMD'; then
- echo $ac_n "checking for ${ac_tool_prefix}file""... $ac_c" 1>&6
-echo "configure:1716: checking for ${ac_tool_prefix}file" >&5
-if eval "test \"`echo '$''{'lt_cv_path_MAGIC_CMD'+set}'`\" = set"; then
- echo $ac_n "(cached) $ac_c" 1>&6
+ echo "$as_me:$LINENO: checking for ${ac_tool_prefix}file" >&5
+echo $ECHO_N "checking for ${ac_tool_prefix}file... $ECHO_C" >&6
+if test "${lt_cv_path_MAGIC_CMD+set}" = set; then
+ echo $ECHO_N "(cached) $ECHO_C" >&6
else
case $MAGIC_CMD in
- /*)
+[\\/*] | ?:[\\/]*)
lt_cv_path_MAGIC_CMD="$MAGIC_CMD" # Let the user override the test with a path.
;;
- ?:/*)
- lt_cv_path_MAGIC_CMD="$MAGIC_CMD" # Let the user override the test with a dos path.
- ;;
- *)
- ac_save_MAGIC_CMD="$MAGIC_CMD"
- IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":"
- ac_dummy="/usr/bin:$PATH"
+*)
+ lt_save_MAGIC_CMD="$MAGIC_CMD"
+ lt_save_ifs="$IFS"; IFS=$PATH_SEPARATOR
+ ac_dummy="/usr/bin$PATH_SEPARATOR$PATH"
for ac_dir in $ac_dummy; do
+ IFS="$lt_save_ifs"
test -z "$ac_dir" && ac_dir=.
if test -f $ac_dir/${ac_tool_prefix}file; then
lt_cv_path_MAGIC_CMD="$ac_dir/${ac_tool_prefix}file"
if test -n "$file_magic_test_file"; then
case $deplibs_check_method in
"file_magic "*)
- file_magic_regex="`expr \"$deplibs_check_method\" : \"file_magic \(.*\)\"`"
+ file_magic_regex=`expr "$deplibs_check_method" : "file_magic \(.*\)"`
MAGIC_CMD="$lt_cv_path_MAGIC_CMD"
if eval $file_magic_cmd \$file_magic_test_file 2> /dev/null |
- egrep "$file_magic_regex" > /dev/null; then
+ $EGREP "$file_magic_regex" > /dev/null; then
:
else
- cat <<EOF 1>&2
+ cat <<_LT_EOF 1>&2
*** Warning: the command libtool uses to detect shared libraries,
*** $file_magic_cmd, produces output that libtool cannot recognize.
@@ -1751,58 +5737,62 @@ else
*** may want to report the problem to your system manager and/or to
*** bug-libtool@gnu.org
-EOF
+_LT_EOF
fi ;;
esac
fi
break
fi
done
- IFS="$ac_save_ifs"
- MAGIC_CMD="$ac_save_MAGIC_CMD"
+ IFS="$lt_save_ifs"
+ MAGIC_CMD="$lt_save_MAGIC_CMD"
;;
esac
fi
MAGIC_CMD="$lt_cv_path_MAGIC_CMD"
if test -n "$MAGIC_CMD"; then
- echo "$ac_t""$MAGIC_CMD" 1>&6
+ echo "$as_me:$LINENO: result: $MAGIC_CMD" >&5
+echo "${ECHO_T}$MAGIC_CMD" >&6
else
- echo "$ac_t""no" 1>&6
+ echo "$as_me:$LINENO: result: no" >&5
+echo "${ECHO_T}no" >&6
fi
+
+
+
+
if test -z "$lt_cv_path_MAGIC_CMD"; then
if test -n "$ac_tool_prefix"; then
- echo $ac_n "checking for file""... $ac_c" 1>&6
-echo "configure:1778: checking for file" >&5
-if eval "test \"`echo '$''{'lt_cv_path_MAGIC_CMD'+set}'`\" = set"; then
- echo $ac_n "(cached) $ac_c" 1>&6
+ echo "$as_me:$LINENO: checking for file" >&5
+echo $ECHO_N "checking for file... $ECHO_C" >&6
+if test "${lt_cv_path_MAGIC_CMD+set}" = set; then
+ echo $ECHO_N "(cached) $ECHO_C" >&6
else
case $MAGIC_CMD in
- /*)
+[\\/*] | ?:[\\/]*)
lt_cv_path_MAGIC_CMD="$MAGIC_CMD" # Let the user override the test with a path.
;;
- ?:/*)
- lt_cv_path_MAGIC_CMD="$MAGIC_CMD" # Let the user override the test with a dos path.
- ;;
- *)
- ac_save_MAGIC_CMD="$MAGIC_CMD"
- IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":"
- ac_dummy="/usr/bin:$PATH"
+*)
+ lt_save_MAGIC_CMD="$MAGIC_CMD"
+ lt_save_ifs="$IFS"; IFS=$PATH_SEPARATOR
+ ac_dummy="/usr/bin$PATH_SEPARATOR$PATH"
for ac_dir in $ac_dummy; do
+ IFS="$lt_save_ifs"
test -z "$ac_dir" && ac_dir=.
if test -f $ac_dir/file; then
lt_cv_path_MAGIC_CMD="$ac_dir/file"
if test -n "$file_magic_test_file"; then
case $deplibs_check_method in
"file_magic "*)
- file_magic_regex="`expr \"$deplibs_check_method\" : \"file_magic \(.*\)\"`"
+ file_magic_regex=`expr "$deplibs_check_method" : "file_magic \(.*\)"`
MAGIC_CMD="$lt_cv_path_MAGIC_CMD"
if eval $file_magic_cmd \$file_magic_test_file 2> /dev/null |
- egrep "$file_magic_regex" > /dev/null; then
+ $EGREP "$file_magic_regex" > /dev/null; then
:
else
- cat <<EOF 1>&2
+ cat <<_LT_EOF 1>&2
*** Warning: the command libtool uses to detect shared libraries,
*** $file_magic_cmd, produces output that libtool cannot recognize.
@@ -1813,26 +5803,29 @@ else
*** may want to report the problem to your system manager and/or to
*** bug-libtool@gnu.org
-EOF
+_LT_EOF
fi ;;
esac
fi
break
fi
done
- IFS="$ac_save_ifs"
- MAGIC_CMD="$ac_save_MAGIC_CMD"
+ IFS="$lt_save_ifs"
+ MAGIC_CMD="$lt_save_MAGIC_CMD"
;;
esac
fi
MAGIC_CMD="$lt_cv_path_MAGIC_CMD"
if test -n "$MAGIC_CMD"; then
- echo "$ac_t""$MAGIC_CMD" 1>&6
+ echo "$as_me:$LINENO: result: $MAGIC_CMD" >&5
+echo "${ECHO_T}$MAGIC_CMD" >&6
else
- echo "$ac_t""no" 1>&6
+ echo "$as_me:$LINENO: result: no" >&5
+echo "${ECHO_T}no" >&6
fi
+
else
MAGIC_CMD=:
fi
@@ -1842,2733 +5835,5369 @@ fi
;;
esac
-# Extract the first word of "${ac_tool_prefix}ranlib", so it can be a program name with args.
-set dummy ${ac_tool_prefix}ranlib; ac_word=$2
-echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
-echo "configure:1849: 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=":"
- ac_dummy="$PATH"
- for ac_dir in $ac_dummy; do
- test -z "$ac_dir" && ac_dir=.
- if test -f $ac_dir/$ac_word; then
- ac_cv_prog_RANLIB="${ac_tool_prefix}ranlib"
- break
- fi
- done
- IFS="$ac_save_ifs"
-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
+# Use C for the default configuration in the libtool script
+lt_save_CC="$CC"
+ac_ext=c
+ac_cpp='$CPP $CPPFLAGS'
+ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
+ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
+ac_compiler_gnu=$ac_cv_c_compiler_gnu
+
+
+# Source file extension for C test sources.
+ac_ext=c
+
+# Object file extension for compiled C test sources.
+objext=o
+objext=$objext
+
+# Code to be used in simple compile tests
+lt_simple_compile_test_code="int some_variable = 0;"
+
+# Code to be used in simple link tests
+lt_simple_link_test_code='int main(){return(0);}'
+
+
+
+
+
+
+
+# If no C compiler was specified, use CC.
+LTCC=${LTCC-"$CC"}
+
+# If no C compiler flags were specified, use CFLAGS.
+LTCFLAGS=${LTCFLAGS-"$CFLAGS"}
+
+# Allow CC to be a program name with arguments.
+compiler=$CC
+
+# Save the default compiler, since it gets overwritten when the other
+# tags are being tested, and _LT_TAGVAR(compiler, []) is a NOP.
+compiler_DEFAULT=$CC
+
+# save warnings/boilerplate of simple test code
+ac_outfile=conftest.$ac_objext
+echo "$lt_simple_compile_test_code" >conftest.$ac_ext
+eval "$ac_compile" 2>&1 >/dev/null | $SED '/^$/d; /^ *+/d' >conftest.err
+_lt_compiler_boilerplate=`cat conftest.err`
+$RM conftest*
+
+ac_outfile=conftest.$ac_objext
+echo "$lt_simple_link_test_code" >conftest.$ac_ext
+eval "$ac_link" 2>&1 >/dev/null | $SED '/^$/d; /^ *+/d' >conftest.err
+_lt_linker_boilerplate=`cat conftest.err`
+$RM conftest*
+
+
+## CAVEAT EMPTOR:
+## There is no encapsulation within the following macros, do not change
+## the running order or otherwise move them around unless you know exactly
+## what you are doing...
+if test -n "$compiler"; then
+
+lt_prog_compiler_no_builtin_flag=
+
+if test "$GCC" = yes; then
+ lt_prog_compiler_no_builtin_flag=' -fno-builtin'
+
+ echo "$as_me:$LINENO: checking if $compiler supports -fno-rtti -fno-exceptions" >&5
+echo $ECHO_N "checking if $compiler supports -fno-rtti -fno-exceptions... $ECHO_C" >&6
+if test "${lt_cv_prog_compiler_rtti_exceptions+set}" = set; then
+ echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+ lt_cv_prog_compiler_rtti_exceptions=no
+ ac_outfile=conftest.$ac_objext
+ echo "$lt_simple_compile_test_code" > conftest.$ac_ext
+ lt_compiler_flag="-fno-rtti -fno-exceptions"
+ # Insert the option either (1) after the last *FLAGS variable, or
+ # (2) before a word containing "conftest.", or (3) at the end.
+ # Note that $ac_compile itself does not contain backslashes and begins
+ # with a dollar sign (not a hyphen), so the echo should work correctly.
+ # The option is referenced via a variable to avoid confusing sed.
+ lt_compile=`echo "$ac_compile" | $SED \
+ -e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \
+ -e 's: [^ ]*conftest\.: $lt_compiler_flag&:; t' \
+ -e 's:$: $lt_compiler_flag:'`
+ (eval echo "\"\$as_me:5923: $lt_compile\"" >&5)
+ (eval "$lt_compile" 2>conftest.err)
+ ac_status=$?
+ cat conftest.err >&5
+ echo "$as_me:5927: \$? = $ac_status" >&5
+ if (exit $ac_status) && test -s "$ac_outfile"; then
+ # The compiler can only warn and ignore the option if not recognized
+ # So say no if there are warnings other than the usual output.
+ $ECHO "X$_lt_compiler_boilerplate" | $Xsed -e '/^$/d' >conftest.exp
+ $SED '/^$/d; /^ *+/d' conftest.err >conftest.er2
+ if test ! -s conftest.er2 || diff conftest.exp conftest.er2 >/dev/null; then
+ lt_cv_prog_compiler_rtti_exceptions=yes
+ fi
+ fi
+ $RM conftest*
-if test -z "$ac_cv_prog_RANLIB"; then
-if test -n "$ac_tool_prefix"; then
- # 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:1881: 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=":"
- ac_dummy="$PATH"
- for ac_dir in $ac_dummy; 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
+echo "$as_me:$LINENO: result: $lt_cv_prog_compiler_rtti_exceptions" >&5
+echo "${ECHO_T}$lt_cv_prog_compiler_rtti_exceptions" >&6
+
+if test x"$lt_cv_prog_compiler_rtti_exceptions" = xyes; then
+ lt_prog_compiler_no_builtin_flag="$lt_prog_compiler_no_builtin_flag -fno-rtti -fno-exceptions"
else
- echo "$ac_t""no" 1>&6
+ :
fi
-else
- RANLIB=":"
fi
+
+
+
+
+
+
+ lt_prog_compiler_wl=
+lt_prog_compiler_pic=
+lt_prog_compiler_static=
+
+echo "$as_me:$LINENO: checking for $compiler option to produce PIC" >&5
+echo $ECHO_N "checking for $compiler option to produce PIC... $ECHO_C" >&6
+
+ if test "$GCC" = yes; then
+ lt_prog_compiler_wl='-Wl,'
+ lt_prog_compiler_static='-static'
+
+ case $host_os in
+ aix*)
+ # All AIX code is PIC.
+ if test "$host_cpu" = ia64; then
+ # AIX 5 now supports IA64 processor
+ lt_prog_compiler_static='-Bstatic'
+ fi
+ ;;
+
+ amigaos*)
+ if test "$host_cpu" = m68k; then
+ # FIXME: we need at least 68020 code to build shared libraries, but
+ # adding the `-m68020' flag to GCC prevents building anything better,
+ # like `-m68040'.
+ lt_prog_compiler_pic='-m68020 -resident32 -malways-restore-a4'
+ fi
+ ;;
+
+ beos* | irix5* | irix6* | nonstopux* | osf3* | osf4* | osf5*)
+ # PIC is the default for these OSes.
+ ;;
+
+ mingw* | cygwin* | pw32* | os2*)
+ # This hack is so that the source file can tell whether it is being
+ # built for inclusion in a dll (and should export symbols for example).
+ # Although the cygwin gcc ignores -fPIC, still need this for old-style
+ # (--disable-auto-import) libraries
+ lt_prog_compiler_pic='-DDLL_EXPORT'
+ ;;
+
+ darwin* | rhapsody*)
+ # PIC is the default on this platform
+ # Common symbols not allowed in MH_DYLIB files
+ lt_prog_compiler_pic='-fno-common'
+ ;;
+
+ hpux*)
+ # PIC is the default for IA64 HP-UX and 64-bit HP-UX, but
+ # not for PA HP-UX.
+ case $host_cpu in
+ hppa*64*|ia64*)
+ # +Z the default
+ ;;
+ *)
+ lt_prog_compiler_pic='-fPIC'
+ ;;
+ esac
+ ;;
+
+ interix[3-9]*)
+ # Interix 3.x gcc -fpic/-fPIC options generate broken code.
+ # Instead, we relocate shared libraries at runtime.
+ ;;
+
+ msdosdjgpp*)
+ # Just because we use GCC doesn't mean we suddenly get shared libraries
+ # on systems that don't support them.
+ lt_prog_compiler_can_build_shared=no
+ enable_shared=no
+ ;;
+
+ *nto* | *qnx*)
+ # QNX uses GNU C++, but need to define -shared option too, otherwise
+ # it will coredump.
+ lt_prog_compiler_pic='-fPIC -shared'
+ ;;
+
+ sysv4*MP*)
+ if test -d /usr/nec; then
+ lt_prog_compiler_pic=-Kconform_pic
+ fi
+ ;;
+
+ *)
+ lt_prog_compiler_pic='-fPIC'
+ ;;
+ esac
+ else
+ # PORTME Check for flag to pass linker flags through the system compiler.
+ case $host_os in
+ aix*)
+ lt_prog_compiler_wl='-Wl,'
+ if test "$host_cpu" = ia64; then
+ # AIX 5 now supports IA64 processor
+ lt_prog_compiler_static='-Bstatic'
+ else
+ lt_prog_compiler_static='-bnso -bI:/lib/syscalls.exp'
+ fi
+ ;;
+ darwin*)
+ # PIC is the default on this platform
+ # Common symbols not allowed in MH_DYLIB files
+ case $cc_basename in
+ xlc*)
+ lt_prog_compiler_pic='-qnocommon'
+ lt_prog_compiler_wl='-Wl,'
+ ;;
+ esac
+ ;;
+
+ mingw* | cygwin* | pw32* | os2*)
+ # This hack is so that the source file can tell whether it is being
+ # built for inclusion in a dll (and should export symbols for example).
+ lt_prog_compiler_pic='-DDLL_EXPORT'
+ ;;
+
+ hpux9* | hpux10* | hpux11*)
+ lt_prog_compiler_wl='-Wl,'
+ # PIC is the default for IA64 HP-UX and 64-bit HP-UX, but
+ # not for PA HP-UX.
+ case $host_cpu in
+ hppa*64*|ia64*)
+ # +Z the default
+ ;;
+ *)
+ lt_prog_compiler_pic='+Z'
+ ;;
+ esac
+ # Is there a better lt_prog_compiler_static that works with the bundled CC?
+ lt_prog_compiler_static='${wl}-a ${wl}archive'
+ ;;
+
+ irix5* | irix6* | nonstopux*)
+ lt_prog_compiler_wl='-Wl,'
+ # PIC (with -KPIC) is the default.
+ lt_prog_compiler_static='-non_shared'
+ ;;
+
+ linux* | k*bsd*-gnu)
+ case $cc_basename in
+ icc* | ecc*)
+ lt_prog_compiler_wl='-Wl,'
+ lt_prog_compiler_pic='-KPIC'
+ lt_prog_compiler_static='-static'
+ ;;
+ pgcc* | pgf77* | pgf90* | pgf95*)
+ # Portland Group compilers (*not* the Pentium gcc compiler,
+ # which looks to be a dead project)
+ lt_prog_compiler_wl='-Wl,'
+ lt_prog_compiler_pic='-fpic'
+ lt_prog_compiler_static='-Bstatic'
+ ;;
+ ccc*)
+ lt_prog_compiler_wl='-Wl,'
+ # All Alpha code is PIC.
+ lt_prog_compiler_static='-non_shared'
+ ;;
+ *)
+ case `$CC -V 2>&1 | sed 5q` in
+ *Sun\ C*)
+ # Sun C 5.9
+ lt_prog_compiler_pic='-KPIC'
+ lt_prog_compiler_static='-Bstatic'
+ lt_prog_compiler_wl='-Wl,'
+ ;;
+ *Sun\ F*)
+ # Sun Fortran 8.3 passes all unrecognized flags to the linker
+ lt_prog_compiler_pic='-KPIC'
+ lt_prog_compiler_static='-Bstatic'
+ lt_prog_compiler_wl=''
+ ;;
+ esac
+ ;;
+ esac
+ ;;
+
+ newsos6)
+ lt_prog_compiler_pic='-KPIC'
+ lt_prog_compiler_static='-Bstatic'
+ ;;
+
+ *nto* | *qnx*)
+ # QNX uses GNU C++, but need to define -shared option too, otherwise
+ # it will coredump.
+ lt_prog_compiler_pic='-fPIC -shared'
+ ;;
+
+ osf3* | osf4* | osf5*)
+ lt_prog_compiler_wl='-Wl,'
+ # All OSF/1 code is PIC.
+ lt_prog_compiler_static='-non_shared'
+ ;;
+
+ rdos*)
+ lt_prog_compiler_static='-non_shared'
+ ;;
+
+ solaris*)
+ lt_prog_compiler_pic='-KPIC'
+ lt_prog_compiler_static='-Bstatic'
+ case $cc_basename in
+ f77* | f90* | f95*)
+ lt_prog_compiler_wl='-Qoption ld ';;
+ *)
+ lt_prog_compiler_wl='-Wl,';;
+ esac
+ ;;
+
+ sunos4*)
+ lt_prog_compiler_wl='-Qoption ld '
+ lt_prog_compiler_pic='-PIC'
+ lt_prog_compiler_static='-Bstatic'
+ ;;
+
+ sysv4 | sysv4.2uw2* | sysv4.3*)
+ lt_prog_compiler_wl='-Wl,'
+ lt_prog_compiler_pic='-KPIC'
+ lt_prog_compiler_static='-Bstatic'
+ ;;
+
+ sysv4*MP*)
+ if test -d /usr/nec ;then
+ lt_prog_compiler_pic='-Kconform_pic'
+ lt_prog_compiler_static='-Bstatic'
+ fi
+ ;;
+
+ sysv5* | unixware* | sco3.2v5* | sco5v6* | OpenUNIX*)
+ lt_prog_compiler_wl='-Wl,'
+ lt_prog_compiler_pic='-KPIC'
+ lt_prog_compiler_static='-Bstatic'
+ ;;
+
+ unicos*)
+ lt_prog_compiler_wl='-Wl,'
+ lt_prog_compiler_can_build_shared=no
+ ;;
+
+ uts4*)
+ lt_prog_compiler_pic='-pic'
+ lt_prog_compiler_static='-Bstatic'
+ ;;
+
+ *)
+ lt_prog_compiler_can_build_shared=no
+ ;;
+ esac
+ fi
+
+case $host_os in
+ # For platforms which do not support PIC, -DPIC is meaningless:
+ *djgpp*)
+ lt_prog_compiler_pic=
+ ;;
+ *)
+ lt_prog_compiler_pic="$lt_prog_compiler_pic -DPIC"
+ ;;
+esac
+echo "$as_me:$LINENO: result: $lt_prog_compiler_pic" >&5
+echo "${ECHO_T}$lt_prog_compiler_pic" >&6
+
+
+
+
+
+
+#
+# Check to make sure the PIC flag actually works.
+#
+if test -n "$lt_prog_compiler_pic"; then
+ echo "$as_me:$LINENO: checking if $compiler PIC flag $lt_prog_compiler_pic works" >&5
+echo $ECHO_N "checking if $compiler PIC flag $lt_prog_compiler_pic works... $ECHO_C" >&6
+if test "${lt_prog_compiler_pic_works+set}" = set; then
+ echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+ lt_prog_compiler_pic_works=no
+ ac_outfile=conftest.$ac_objext
+ echo "$lt_simple_compile_test_code" > conftest.$ac_ext
+ lt_compiler_flag="$lt_prog_compiler_pic -DPIC"
+ # Insert the option either (1) after the last *FLAGS variable, or
+ # (2) before a word containing "conftest.", or (3) at the end.
+ # Note that $ac_compile itself does not contain backslashes and begins
+ # with a dollar sign (not a hyphen), so the echo should work correctly.
+ # The option is referenced via a variable to avoid confusing sed.
+ lt_compile=`echo "$ac_compile" | $SED \
+ -e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \
+ -e 's: [^ ]*conftest\.: $lt_compiler_flag&:; t' \
+ -e 's:$: $lt_compiler_flag:'`
+ (eval echo "\"\$as_me:6245: $lt_compile\"" >&5)
+ (eval "$lt_compile" 2>conftest.err)
+ ac_status=$?
+ cat conftest.err >&5
+ echo "$as_me:6249: \$? = $ac_status" >&5
+ if (exit $ac_status) && test -s "$ac_outfile"; then
+ # The compiler can only warn and ignore the option if not recognized
+ # So say no if there are warnings other than the usual output.
+ $ECHO "X$_lt_compiler_boilerplate" | $Xsed -e '/^$/d' >conftest.exp
+ $SED '/^$/d; /^ *+/d' conftest.err >conftest.er2
+ if test ! -s conftest.er2 || diff conftest.exp conftest.er2 >/dev/null; then
+ lt_prog_compiler_pic_works=yes
+ fi
+ fi
+ $RM conftest*
+
fi
+echo "$as_me:$LINENO: result: $lt_prog_compiler_pic_works" >&5
+echo "${ECHO_T}$lt_prog_compiler_pic_works" >&6
-# Extract the first word of "${ac_tool_prefix}strip", so it can be a program name with args.
-set dummy ${ac_tool_prefix}strip; ac_word=$2
-echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
-echo "configure:1916: checking for $ac_word" >&5
-if eval "test \"`echo '$''{'ac_cv_prog_STRIP'+set}'`\" = set"; then
- echo $ac_n "(cached) $ac_c" 1>&6
-else
- if test -n "$STRIP"; then
- ac_cv_prog_STRIP="$STRIP" # Let the user override the test.
+if test x"$lt_prog_compiler_pic_works" = xyes; then
+ case $lt_prog_compiler_pic in
+ "" | " "*) ;;
+ *) lt_prog_compiler_pic=" $lt_prog_compiler_pic" ;;
+ esac
else
- IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":"
- ac_dummy="$PATH"
- for ac_dir in $ac_dummy; do
- test -z "$ac_dir" && ac_dir=.
- if test -f $ac_dir/$ac_word; then
- ac_cv_prog_STRIP="${ac_tool_prefix}strip"
- break
- fi
- done
- IFS="$ac_save_ifs"
+ lt_prog_compiler_pic=
+ lt_prog_compiler_can_build_shared=no
fi
+
fi
-STRIP="$ac_cv_prog_STRIP"
-if test -n "$STRIP"; then
- echo "$ac_t""$STRIP" 1>&6
+
+
+
+
+
+
+#
+# Check to make sure the static flag actually works.
+#
+wl=$lt_prog_compiler_wl eval lt_tmp_static_flag=\"$lt_prog_compiler_static\"
+echo "$as_me:$LINENO: checking if $compiler static flag $lt_tmp_static_flag works" >&5
+echo $ECHO_N "checking if $compiler static flag $lt_tmp_static_flag works... $ECHO_C" >&6
+if test "${lt_prog_compiler_static_works+set}" = set; then
+ echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+ lt_prog_compiler_static_works=no
+ save_LDFLAGS="$LDFLAGS"
+ LDFLAGS="$LDFLAGS $lt_tmp_static_flag"
+ echo "$lt_simple_link_test_code" > conftest.$ac_ext
+ if (eval $ac_link 2>conftest.err) && test -s conftest$ac_exeext; then
+ # The linker can only warn and ignore the option if not recognized
+ # So say no if there are warnings
+ if test -s conftest.err; then
+ # Append any errors to the config.log.
+ cat conftest.err 1>&5
+ $ECHO "X$_lt_linker_boilerplate" | $Xsed -e '/^$/d' > conftest.exp
+ $SED '/^$/d; /^ *+/d' conftest.err >conftest.er2
+ if diff conftest.exp conftest.er2 >/dev/null; then
+ lt_prog_compiler_static_works=yes
+ fi
+ else
+ lt_prog_compiler_static_works=yes
+ fi
+ fi
+ $RM conftest*
+ LDFLAGS="$save_LDFLAGS"
+
+fi
+echo "$as_me:$LINENO: result: $lt_prog_compiler_static_works" >&5
+echo "${ECHO_T}$lt_prog_compiler_static_works" >&6
+
+if test x"$lt_prog_compiler_static_works" = xyes; then
+ :
else
- echo "$ac_t""no" 1>&6
+ lt_prog_compiler_static=
fi
-if test -z "$ac_cv_prog_STRIP"; then
-if test -n "$ac_tool_prefix"; then
- # Extract the first word of "strip", so it can be a program name with args.
-set dummy strip; ac_word=$2
-echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
-echo "configure:1948: checking for $ac_word" >&5
-if eval "test \"`echo '$''{'ac_cv_prog_STRIP'+set}'`\" = set"; then
- echo $ac_n "(cached) $ac_c" 1>&6
+
+
+
+
+
+ echo "$as_me:$LINENO: checking if $compiler supports -c -o file.$ac_objext" >&5
+echo $ECHO_N "checking if $compiler supports -c -o file.$ac_objext... $ECHO_C" >&6
+if test "${lt_cv_prog_compiler_c_o+set}" = set; then
+ echo $ECHO_N "(cached) $ECHO_C" >&6
else
- if test -n "$STRIP"; then
- ac_cv_prog_STRIP="$STRIP" # Let the user override the test.
+ lt_cv_prog_compiler_c_o=no
+ $RM -r conftest 2>/dev/null
+ mkdir conftest
+ cd conftest
+ mkdir out
+ echo "$lt_simple_compile_test_code" > conftest.$ac_ext
+
+ lt_compiler_flag="-o out/conftest2.$ac_objext"
+ # Insert the option either (1) after the last *FLAGS variable, or
+ # (2) before a word containing "conftest.", or (3) at the end.
+ # Note that $ac_compile itself does not contain backslashes and begins
+ # with a dollar sign (not a hyphen), so the echo should work correctly.
+ lt_compile=`echo "$ac_compile" | $SED \
+ -e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \
+ -e 's: [^ ]*conftest\.: $lt_compiler_flag&:; t' \
+ -e 's:$: $lt_compiler_flag:'`
+ (eval echo "\"\$as_me:6350: $lt_compile\"" >&5)
+ (eval "$lt_compile" 2>out/conftest.err)
+ ac_status=$?
+ cat out/conftest.err >&5
+ echo "$as_me:6354: \$? = $ac_status" >&5
+ if (exit $ac_status) && test -s out/conftest2.$ac_objext
+ then
+ # The compiler can only warn and ignore the option if not recognized
+ # So say no if there are warnings
+ $ECHO "X$_lt_compiler_boilerplate" | $Xsed -e '/^$/d' > out/conftest.exp
+ $SED '/^$/d; /^ *+/d' out/conftest.err >out/conftest.er2
+ if test ! -s out/conftest.er2 || diff out/conftest.exp out/conftest.er2 >/dev/null; then
+ lt_cv_prog_compiler_c_o=yes
+ fi
+ fi
+ chmod u+w . 2>&5
+ $RM conftest*
+ # SGI C++ compiler will create directory out/ii_files/ for
+ # template instantiation
+ test -d out/ii_files && $RM out/ii_files/* && rmdir out/ii_files
+ $RM out/* && rmdir out
+ cd ..
+ $RM -r conftest
+ $RM conftest*
+
+fi
+echo "$as_me:$LINENO: result: $lt_cv_prog_compiler_c_o" >&5
+echo "${ECHO_T}$lt_cv_prog_compiler_c_o" >&6
+
+
+
+
+
+
+ echo "$as_me:$LINENO: checking if $compiler supports -c -o file.$ac_objext" >&5
+echo $ECHO_N "checking if $compiler supports -c -o file.$ac_objext... $ECHO_C" >&6
+if test "${lt_cv_prog_compiler_c_o+set}" = set; then
+ echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+ lt_cv_prog_compiler_c_o=no
+ $RM -r conftest 2>/dev/null
+ mkdir conftest
+ cd conftest
+ mkdir out
+ echo "$lt_simple_compile_test_code" > conftest.$ac_ext
+
+ lt_compiler_flag="-o out/conftest2.$ac_objext"
+ # Insert the option either (1) after the last *FLAGS variable, or
+ # (2) before a word containing "conftest.", or (3) at the end.
+ # Note that $ac_compile itself does not contain backslashes and begins
+ # with a dollar sign (not a hyphen), so the echo should work correctly.
+ lt_compile=`echo "$ac_compile" | $SED \
+ -e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \
+ -e 's: [^ ]*conftest\.: $lt_compiler_flag&:; t' \
+ -e 's:$: $lt_compiler_flag:'`
+ (eval echo "\"\$as_me:6405: $lt_compile\"" >&5)
+ (eval "$lt_compile" 2>out/conftest.err)
+ ac_status=$?
+ cat out/conftest.err >&5
+ echo "$as_me:6409: \$? = $ac_status" >&5
+ if (exit $ac_status) && test -s out/conftest2.$ac_objext
+ then
+ # The compiler can only warn and ignore the option if not recognized
+ # So say no if there are warnings
+ $ECHO "X$_lt_compiler_boilerplate" | $Xsed -e '/^$/d' > out/conftest.exp
+ $SED '/^$/d; /^ *+/d' out/conftest.err >out/conftest.er2
+ if test ! -s out/conftest.er2 || diff out/conftest.exp out/conftest.er2 >/dev/null; then
+ lt_cv_prog_compiler_c_o=yes
+ fi
+ fi
+ chmod u+w . 2>&5
+ $RM conftest*
+ # SGI C++ compiler will create directory out/ii_files/ for
+ # template instantiation
+ test -d out/ii_files && $RM out/ii_files/* && rmdir out/ii_files
+ $RM out/* && rmdir out
+ cd ..
+ $RM -r conftest
+ $RM conftest*
+
+fi
+echo "$as_me:$LINENO: result: $lt_cv_prog_compiler_c_o" >&5
+echo "${ECHO_T}$lt_cv_prog_compiler_c_o" >&6
+
+
+
+
+hard_links="nottested"
+if test "$lt_cv_prog_compiler_c_o" = no && test "$need_locks" != no; then
+ # do not overwrite the value of need_locks provided by the user
+ echo "$as_me:$LINENO: checking if we can lock with hard links" >&5
+echo $ECHO_N "checking if we can lock with hard links... $ECHO_C" >&6
+ hard_links=yes
+ $RM conftest*
+ ln conftest.a conftest.b 2>/dev/null && hard_links=no
+ touch conftest.a
+ ln conftest.a conftest.b 2>&5 || hard_links=no
+ ln conftest.a conftest.b 2>/dev/null && hard_links=no
+ echo "$as_me:$LINENO: result: $hard_links" >&5
+echo "${ECHO_T}$hard_links" >&6
+ if test "$hard_links" = no; then
+ { echo "$as_me:$LINENO: WARNING: \`$CC' does not support \`-c -o', so \`make -j' may be unsafe" >&5
+echo "$as_me: WARNING: \`$CC' does not support \`-c -o', so \`make -j' may be unsafe" >&2;}
+ need_locks=warn
+ fi
else
- IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":"
- ac_dummy="$PATH"
- for ac_dir in $ac_dummy; do
- test -z "$ac_dir" && ac_dir=.
- if test -f $ac_dir/$ac_word; then
- ac_cv_prog_STRIP="strip"
- break
+ need_locks=no
+fi
+
+
+
+
+
+
+ echo "$as_me:$LINENO: checking whether the $compiler linker ($LD) supports shared libraries" >&5
+echo $ECHO_N "checking whether the $compiler linker ($LD) supports shared libraries... $ECHO_C" >&6
+
+ runpath_var=
+ allow_undefined_flag=
+ always_export_symbols=no
+ archive_cmds=
+ archive_expsym_cmds=
+ compiler_needs_object=no
+ enable_shared_with_static_runtimes=no
+ export_dynamic_flag_spec=
+ export_symbols_cmds='$NM $libobjs $convenience | $global_symbol_pipe | $SED '\''s/.* //'\'' | sort | uniq > $export_symbols'
+ hardcode_automatic=no
+ hardcode_direct=no
+ hardcode_direct_absolute=no
+ hardcode_libdir_flag_spec=
+ hardcode_libdir_flag_spec_ld=
+ hardcode_libdir_separator=
+ hardcode_minus_L=no
+ hardcode_shlibpath_var=unsupported
+ inherit_rpath=no
+ link_all_deplibs=unknown
+ module_cmds=
+ module_expsym_cmds=
+ old_archive_from_new_cmds=
+ old_archive_from_expsyms_cmds=
+ thread_safe_flag_spec=
+ whole_archive_flag_spec=
+ # include_expsyms should be a list of space-separated symbols to be *always*
+ # included in the symbol list
+ include_expsyms=
+ # exclude_expsyms can be an extended regexp of symbols to exclude
+ # it will be wrapped by ` (' and `)$', so one must not match beginning or
+ # end of line. Example: `a|bc|.*d.*' will exclude the symbols `a' and `bc',
+ # as well as any symbol that contains `d'.
+ exclude_expsyms="_GLOBAL_OFFSET_TABLE_"
+ # Although _GLOBAL_OFFSET_TABLE_ is a valid symbol C name, most a.out
+ # platforms (ab)use it in PIC code, but their linkers get confused if
+ # the symbol is explicitly referenced. Since portable code cannot
+ # rely on this symbol name, it's probably fine to never include it in
+ # preloaded symbol tables.
+ extract_expsyms_cmds=
+
+ case $host_os in
+ cygwin* | mingw* | pw32*)
+ # FIXME: the MSVC++ port hasn't been tested in a loooong time
+ # When not using gcc, we currently assume that we are using
+ # Microsoft Visual C++.
+ if test "$GCC" != yes; then
+ with_gnu_ld=no
fi
- done
- IFS="$ac_save_ifs"
- test -z "$ac_cv_prog_STRIP" && ac_cv_prog_STRIP=":"
-fi
-fi
-STRIP="$ac_cv_prog_STRIP"
-if test -n "$STRIP"; then
- echo "$ac_t""$STRIP" 1>&6
-else
- echo "$ac_t""no" 1>&6
-fi
+ ;;
+ interix*)
+ # we just hope/assume this is gcc and not c89 (= MSVC++)
+ with_gnu_ld=yes
+ ;;
+ openbsd*)
+ with_gnu_ld=no
+ ;;
+ esac
-else
- STRIP=":"
-fi
-fi
+ ld_shlibs=yes
+ if test "$with_gnu_ld" = yes; then
+ # If archive_cmds runs LD, not CC, wlarc should be empty
+ wlarc='${wl}'
+
+ # Set some defaults for GNU ld with shared library support. These
+ # are reset later if shared libraries are not supported. Putting them
+ # here allows them to be overridden if necessary.
+ runpath_var=LD_RUN_PATH
+ hardcode_libdir_flag_spec='${wl}-rpath ${wl}$libdir'
+ export_dynamic_flag_spec='${wl}--export-dynamic'
+ # ancient GNU ld didn't support --whole-archive et. al.
+ if $LD --help 2>&1 | $GREP 'no-whole-archive' > /dev/null; then
+ whole_archive_flag_spec="$wlarc"'--whole-archive$convenience '"$wlarc"'--no-whole-archive'
+ else
+ whole_archive_flag_spec=
+ fi
+ supports_anon_versioning=no
+ case `$LD -v 2>&1` in
+ *\ [01].* | *\ 2.[0-9].* | *\ 2.10.*) ;; # catch versions < 2.11
+ *\ 2.11.93.0.2\ *) supports_anon_versioning=yes ;; # RH7.3 ...
+ *\ 2.11.92.0.12\ *) supports_anon_versioning=yes ;; # Mandrake 8.2 ...
+ *\ 2.11.*) ;; # other 2.11 versions
+ *) supports_anon_versioning=yes ;;
+ esac
+ # See if GNU ld supports shared libraries.
+ case $host_os in
+ aix3* | aix4* | aix5*)
+ # On AIX/PPC, the GNU linker is very broken
+ if test "$host_cpu" != ia64; then
+ ld_shlibs=no
+ cat <<_LT_EOF 1>&2
+
+*** Warning: the GNU linker, at least up to release 2.9.1, is reported
+*** to be unable to reliably create shared libraries on AIX.
+*** Therefore, libtool is disabling shared libraries support. If you
+*** really care for shared libraries, you may want to modify your PATH
+*** so that a non-GNU linker is found, and then restart.
+
+_LT_EOF
+ fi
+ ;;
-# Check for any special flags to pass to ltconfig.
-libtool_flags="--cache-file=$cache_file"
-test "$enable_shared" = no && libtool_flags="$libtool_flags --disable-shared"
-test "$enable_static" = no && libtool_flags="$libtool_flags --disable-static"
-test "$enable_fast_install" = no && libtool_flags="$libtool_flags --disable-fast-install"
-test "$GCC" = yes && libtool_flags="$libtool_flags --with-gcc"
-test "$lt_cv_prog_gnu_ld" = yes && libtool_flags="$libtool_flags --with-gnu-ld"
+ amigaos*)
+ if test "$host_cpu" = m68k; then
+ archive_cmds='$RM $output_objdir/a2ixlibrary.data~$ECHO "#define NAME $libname" > $output_objdir/a2ixlibrary.data~$ECHO "#define LIBRARY_ID 1" >> $output_objdir/a2ixlibrary.data~$ECHO "#define VERSION $major" >> $output_objdir/a2ixlibrary.data~$ECHO "#define REVISION $revision" >> $output_objdir/a2ixlibrary.data~$AR $AR_FLAGS $lib $libobjs~$RANLIB $lib~(cd $output_objdir && a2ixlibrary -32)'
+ hardcode_libdir_flag_spec='-L$libdir'
+ hardcode_minus_L=yes
+ fi
+ # Samuel A. Falvo II <kc5tja@dolphin.openprojects.net> reports
+ # that the semantics of dynamic libraries on AmigaOS, at least up
+ # to version 4, is to share data among multiple programs linked
+ # with the same dynamic library. Since this doesn't match the
+ # behavior of shared libraries on other platforms, we can't use
+ # them.
+ ld_shlibs=no
+ ;;
-# Check whether --enable-libtool-lock or --disable-libtool-lock was given.
-if test "${enable_libtool_lock+set}" = set; then
- enableval="$enable_libtool_lock"
- :
-fi
+ beos*)
+ if $LD --help 2>&1 | $GREP ': supported targets:.* elf' > /dev/null; then
+ allow_undefined_flag=unsupported
+ # Joseph Beckenbach <jrb3@best.com> says some releases of gcc
+ # support --undefined. This deserves some investigation. FIXME
+ archive_cmds='$CC -nostart $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'
+ else
+ ld_shlibs=no
+ fi
+ ;;
-test "x$enable_libtool_lock" = xno && libtool_flags="$libtool_flags --disable-lock"
-test x"$silent" = xyes && libtool_flags="$libtool_flags --silent"
+ cygwin* | mingw* | pw32*)
+ # _LT_TAGVAR(hardcode_libdir_flag_spec, ) is actually meaningless,
+ # as there is no search path for DLLs.
+ hardcode_libdir_flag_spec='-L$libdir'
+ allow_undefined_flag=unsupported
+ always_export_symbols=no
+ enable_shared_with_static_runtimes=yes
+ export_symbols_cmds='$NM $libobjs $convenience | $global_symbol_pipe | $SED -e '\''/^[BCDGRS][ ]/s/.*[ ]\([^ ]*\)/\1 DATA/'\'' | $SED -e '\''/^[AITW][ ]/s/.*[ ]//'\'' | sort | uniq > $export_symbols'
+
+ if $LD --help 2>&1 | $GREP 'auto-import' > /dev/null; then
+ archive_cmds='$CC -shared $libobjs $deplibs $compiler_flags -o $output_objdir/$soname ${wl}--enable-auto-image-base -Xlinker --out-implib -Xlinker $lib'
+ # If the export-symbols file already is a .def file (1st line
+ # is EXPORTS), use it as is; otherwise, prepend...
+ archive_expsym_cmds='if test "x`$SED 1q $export_symbols`" = xEXPORTS; then
+ cp $export_symbols $output_objdir/$soname.def;
+ else
+ echo EXPORTS > $output_objdir/$soname.def;
+ cat $export_symbols >> $output_objdir/$soname.def;
+ fi~
+ $CC -shared $output_objdir/$soname.def $libobjs $deplibs $compiler_flags -o $output_objdir/$soname ${wl}--enable-auto-image-base -Xlinker --out-implib -Xlinker $lib'
+ else
+ ld_shlibs=no
+ fi
+ ;;
-# Check whether --with-pic or --without-pic was given.
-if test "${with_pic+set}" = set; then
- withval="$with_pic"
- pic_mode="$withval"
-else
- pic_mode=default
-fi
+ interix[3-9]*)
+ hardcode_direct=no
+ hardcode_shlibpath_var=no
+ hardcode_libdir_flag_spec='${wl}-rpath,$libdir'
+ export_dynamic_flag_spec='${wl}-E'
+ # Hack: On Interix 3.x, we cannot compile PIC because of a broken gcc.
+ # Instead, shared libraries are loaded at an image base (0x10000000 by
+ # default) and relocated if they conflict, which is a slow very memory
+ # consuming and fragmenting process. To avoid this, we pick a random,
+ # 256 KiB-aligned image base between 0x50000000 and 0x6FFC0000 at link
+ # time. Moving up from 0x10000000 also allows more sbrk(2) space.
+ archive_cmds='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags ${wl}-h,$soname ${wl}--image-base,`expr ${RANDOM-$$} % 4096 / 2 \* 262144 + 1342177280` -o $lib'
+ archive_expsym_cmds='sed "s,^,_," $export_symbols >$output_objdir/$soname.expsym~$CC -shared $pic_flag $libobjs $deplibs $compiler_flags ${wl}-h,$soname ${wl}--retain-symbols-file,$output_objdir/$soname.expsym ${wl}--image-base,`expr ${RANDOM-$$} % 4096 / 2 \* 262144 + 1342177280` -o $lib'
+ ;;
-test x"$pic_mode" = xyes && libtool_flags="$libtool_flags --prefer-pic"
-test x"$pic_mode" = xno && libtool_flags="$libtool_flags --prefer-non-pic"
+ gnu* | linux* | tpf* | k*bsd*-gnu)
+ tmp_diet=no
+ if test "$host_os" = linux-dietlibc; then
+ case $cc_basename in
+ diet\ *) tmp_diet=yes;; # linux-dietlibc with static linking (!diet-dyn)
+ esac
+ fi
+ if $LD --help 2>&1 | $EGREP ': supported targets:.* elf' > /dev/null \
+ && test "$tmp_diet" = no
+ then
+ tmp_addflag=
+ case $cc_basename,$host_cpu in
+ pgcc*) # Portland Group C compiler
+ whole_archive_flag_spec='${wl}--whole-archive`for conv in $convenience\"\"; do test -n \"$conv\" && new_convenience=\"$new_convenience,$conv\"; done; $ECHO \"$new_convenience\"` ${wl}--no-whole-archive'
+ tmp_addflag=' $pic_flag'
+ ;;
+ pgf77* | pgf90* | pgf95*) # Portland Group f77 and f90 compilers
+ whole_archive_flag_spec='${wl}--whole-archive`for conv in $convenience\"\"; do test -n \"$conv\" && new_convenience=\"$new_convenience,$conv\"; done; $ECHO \"$new_convenience\"` ${wl}--no-whole-archive'
+ tmp_addflag=' $pic_flag -Mnomain' ;;
+ ecc*,ia64* | icc*,ia64*) # Intel C compiler on ia64
+ tmp_addflag=' -i_dynamic' ;;
+ efc*,ia64* | ifort*,ia64*) # Intel Fortran compiler on ia64
+ tmp_addflag=' -i_dynamic -nofor_main' ;;
+ ifc* | ifort*) # Intel Fortran compiler
+ tmp_addflag=' -nofor_main' ;;
+ esac
+ case `$CC -V 2>&1 | sed 5q` in
+ *Sun\ C*) # Sun C 5.9
+ whole_archive_flag_spec='${wl}--whole-archive`new_convenience=; for conv in $convenience\"\"; do test -z \"$conv\" || new_convenience=\"$new_convenience,$conv\"; done; $ECHO \"$new_convenience\"` ${wl}--no-whole-archive'
+ compiler_needs_object=yes
+ tmp_sharedflag='-G' ;;
+ *Sun\ F*) # Sun Fortran 8.3
+ tmp_sharedflag='-G' ;;
+ *)
+ tmp_sharedflag='-shared' ;;
+ esac
+ archive_cmds='$CC '"$tmp_sharedflag""$tmp_addflag"' $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'
-# 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 2015 "configure"' > conftest.$ac_ext
- if { (eval echo configure:2016: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
- if test "$lt_cv_prog_gnu_ld" = yes; then
- case `/usr/bin/file conftest.$ac_objext` in
- *32-bit*)
- LD="${LD-ld} -melf32bsmip"
+ if test "x$supports_anon_versioning" = xyes; then
+ archive_expsym_cmds='echo "{ global:" > $output_objdir/$libname.ver~
+ cat $export_symbols | sed -e "s/\(.*\)/\1;/" >> $output_objdir/$libname.ver~
+ echo "local: *; };" >> $output_objdir/$libname.ver~
+ $CC '"$tmp_sharedflag""$tmp_addflag"' $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-version-script ${wl}$output_objdir/$libname.ver -o $lib'
+ fi
+ else
+ ld_shlibs=no
+ fi
;;
- *N32*)
- LD="${LD-ld} -melf32bmipn32"
+
+ netbsd*)
+ if echo __ELF__ | $CC -E - | $GREP __ELF__ >/dev/null; then
+ archive_cmds='$LD -Bshareable $libobjs $deplibs $linker_flags -o $lib'
+ wlarc=
+ else
+ archive_cmds='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'
+ archive_expsym_cmds='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib'
+ fi
;;
- *64-bit*)
- LD="${LD-ld} -melf64bmip"
+
+ solaris*)
+ if $LD -v 2>&1 | $GREP 'BFD 2\.8' > /dev/null; then
+ ld_shlibs=no
+ cat <<_LT_EOF 1>&2
+
+*** Warning: The releases 2.8.* of the GNU linker cannot reliably
+*** create shared libraries on Solaris systems. Therefore, libtool
+*** is disabling shared libraries support. We urge you to upgrade GNU
+*** binutils to release 2.9.1 or newer. Another option is to modify
+*** your PATH or compiler configuration so that the native linker is
+*** used, and then restart.
+
+_LT_EOF
+ elif $LD --help 2>&1 | $GREP ': supported targets:.* elf' > /dev/null; then
+ archive_cmds='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'
+ archive_expsym_cmds='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib'
+ else
+ ld_shlibs=no
+ fi
;;
- esac
- else
- case `/usr/bin/file conftest.$ac_objext` in
- *32-bit*)
- LD="${LD-ld} -32"
+
+ sysv5* | sco3.2v5* | sco5v6* | unixware* | OpenUNIX*)
+ case `$LD -v 2>&1` in
+ *\ [01].* | *\ 2.[0-9].* | *\ 2.1[0-5].*)
+ ld_shlibs=no
+ cat <<_LT_EOF 1>&2
+
+*** Warning: Releases of the GNU linker prior to 2.16.91.0.3 can not
+*** reliably create shared libraries on SCO systems. Therefore, libtool
+*** is disabling shared libraries support. We urge you to upgrade GNU
+*** binutils to release 2.16.91.0.3 or newer. Another option is to modify
+*** your PATH or compiler configuration so that the native linker is
+*** used, and then restart.
+
+_LT_EOF
+ ;;
+ *)
+ # For security reasons, it is highly recommended that you always
+ # use absolute paths for naming shared libraries, and exclude the
+ # DT_RUNPATH tag from executables and libraries. But doing so
+ # requires that you compile everything twice, which is a pain.
+ if $LD --help 2>&1 | $GREP ': supported targets:.* elf' > /dev/null; then
+ hardcode_libdir_flag_spec='${wl}-rpath ${wl}$libdir'
+ archive_cmds='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'
+ archive_expsym_cmds='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib'
+ else
+ ld_shlibs=no
+ fi
+ ;;
+ esac
;;
- *N32*)
- LD="${LD-ld} -n32"
+
+ sunos4*)
+ archive_cmds='$LD -assert pure-text -Bshareable -o $lib $libobjs $deplibs $linker_flags'
+ wlarc=
+ hardcode_direct=yes
+ hardcode_shlibpath_var=no
;;
- *64-bit*)
- LD="${LD-ld} -64"
+
+ *)
+ if $LD --help 2>&1 | $GREP ': supported targets:.* elf' > /dev/null; then
+ archive_cmds='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'
+ archive_expsym_cmds='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib'
+ else
+ ld_shlibs=no
+ fi
;;
esac
- fi
- fi
- rm -rf conftest*
- ;;
-ia64-*-hpux*)
- # Find out which ABI we are using.
- echo 'int i;' > conftest.$ac_ext
- if { (eval echo configure:2049: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
- case "`/usr/bin/file conftest.o`" in
- *ELF-32*)
- HPUX_IA64_MODE="32"
+ if test "$ld_shlibs" = no; then
+ runpath_var=
+ hardcode_libdir_flag_spec=
+ export_dynamic_flag_spec=
+ whole_archive_flag_spec=
+ fi
+ else
+ # PORTME fill in a description of your system's linker (not GNU ld)
+ case $host_os in
+ aix3*)
+ allow_undefined_flag=unsupported
+ always_export_symbols=yes
+ archive_expsym_cmds='$LD -o $output_objdir/$soname $libobjs $deplibs $linker_flags -bE:$export_symbols -T512 -H512 -bM:SRE~$AR $AR_FLAGS $lib $output_objdir/$soname'
+ # Note: this linker hardcodes the directories in LIBPATH if there
+ # are no directories specified by -L.
+ hardcode_minus_L=yes
+ if test "$GCC" = yes && test -z "$lt_prog_compiler_static"; then
+ # Neither direct hardcoding nor static linking is supported with a
+ # broken collect2.
+ hardcode_direct=unsupported
+ fi
;;
- *ELF-64*)
- HPUX_IA64_MODE="64"
+
+ aix4* | aix5*)
+ if test "$host_cpu" = ia64; then
+ # On IA64, the linker does run time linking by default, so we don't
+ # have to do anything special.
+ aix_use_runtimelinking=no
+ exp_sym_flag='-Bexport'
+ no_entry_flag=""
+ else
+ # If we're using GNU nm, then we don't want the "-C" option.
+ # -C means demangle to AIX nm, but means don't demangle with GNU nm
+ if $NM -V 2>&1 | $GREP 'GNU' > /dev/null; then
+ export_symbols_cmds='$NM -Bpg $libobjs $convenience | awk '\''{ if (((\$ 2 == "T") || (\$ 2 == "D") || (\$ 2 == "B")) && (substr(\$ 3,1,1) != ".")) { print \$ 3 } }'\'' | sort -u > $export_symbols'
+ else
+ export_symbols_cmds='$NM -BCpg $libobjs $convenience | awk '\''{ if (((\$ 2 == "T") || (\$ 2 == "D") || (\$ 2 == "B")) && (substr(\$ 3,1,1) != ".")) { print \$ 3 } }'\'' | sort -u > $export_symbols'
+ fi
+ aix_use_runtimelinking=no
+
+ # Test if we are trying to use run time linking or normal
+ # AIX style linking. If -brtl is somewhere in LDFLAGS, we
+ # need to do runtime linking.
+ case $host_os in aix4.[23]|aix4.[23].*|aix5*)
+ for ld_flag in $LDFLAGS; do
+ if (test $ld_flag = "-brtl" || test $ld_flag = "-Wl,-brtl"); then
+ aix_use_runtimelinking=yes
+ break
+ fi
+ done
+ ;;
+ esac
+
+ exp_sym_flag='-bexport'
+ no_entry_flag='-bnoentry'
+ fi
+
+ # When large executables or shared objects are built, AIX ld can
+ # have problems creating the table of contents. If linking a library
+ # or program results in "error TOC overflow" add -mminimal-toc to
+ # CXXFLAGS/CFLAGS for g++/gcc. In the cases where that is not
+ # enough to fix the problem, add -Wl,-bbigtoc to LDFLAGS.
+
+ archive_cmds=''
+ hardcode_direct=yes
+ hardcode_direct_absolute=yes
+ hardcode_libdir_separator=':'
+ link_all_deplibs=yes
+ file_list_spec='${wl}-f,'
+
+ if test "$GCC" = yes; then
+ case $host_os in aix4.[012]|aix4.[012].*)
+ # We only want to do this on AIX 4.2 and lower, the check
+ # below for broken collect2 doesn't work under 4.3+
+ collect2name=`${CC} -print-prog-name=collect2`
+ if test -f "$collect2name" &&
+ strings "$collect2name" | $GREP resolve_lib_name >/dev/null
+ then
+ # We have reworked collect2
+ :
+ else
+ # We have old collect2
+ hardcode_direct=unsupported
+ # It fails to find uninstalled libraries when the uninstalled
+ # path is not listed in the libpath. Setting hardcode_minus_L
+ # to unsupported forces relinking
+ hardcode_minus_L=yes
+ hardcode_libdir_flag_spec='-L$libdir'
+ hardcode_libdir_separator=
+ fi
+ ;;
+ esac
+ shared_flag='-shared'
+ if test "$aix_use_runtimelinking" = yes; then
+ shared_flag="$shared_flag "'${wl}-G'
+ fi
+ else
+ # not using gcc
+ if test "$host_cpu" = ia64; then
+ # VisualAge C++, Version 5.5 for AIX 5L for IA-64, Beta 3 Release
+ # chokes on -Wl,-G. The following line is correct:
+ shared_flag='-G'
+ else
+ if test "$aix_use_runtimelinking" = yes; then
+ shared_flag='${wl}-G'
+ else
+ shared_flag='${wl}-bM:SRE'
+ fi
+ fi
+ fi
+
+ # It seems that -bexpall does not export symbols beginning with
+ # underscore (_), so it is better to generate a list of symbols to export.
+ always_export_symbols=yes
+ if test "$aix_use_runtimelinking" = yes; then
+ # Warning - without using the other runtime loading flags (-brtl),
+ # -berok will link without error, but may produce a broken library.
+ allow_undefined_flag='-berok'
+ # Determine the default libpath from the value encoded in an
+ # empty executable.
+ cat >conftest.$ac_ext <<_ACEOF
+/* confdefs.h. */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h. */
+
+int
+main ()
+{
+
+ ;
+ return 0;
+}
+_ACEOF
+rm -f conftest.$ac_objext conftest$ac_exeext
+if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
+ (eval $ac_link) 2>conftest.er1
+ ac_status=$?
+ grep -v '^ *+' conftest.er1 >conftest.err
+ rm -f conftest.er1
+ cat conftest.err >&5
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); } &&
+ { ac_try='test -z "$ac_c_werror_flag"
+ || test ! -s conftest.err'
+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+ (eval $ac_try) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); }; } &&
+ { ac_try='test -s conftest$ac_exeext'
+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+ (eval $ac_try) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); }; }; then
+
+lt_aix_libpath_sed='
+ /Import File Strings/,/^$/ {
+ /^0/ {
+ s/^0 *\(.*\)$/\1/
+ p
+ }
+ }'
+aix_libpath=`dump -H conftest$ac_exeext 2>/dev/null | $SED -n -e "$lt_aix_libpath_sed"`
+# Check for a 64-bit object if we didn't find anything.
+if test -z "$aix_libpath"; then
+ aix_libpath=`dump -HX64 conftest$ac_exeext 2>/dev/null | $SED -n -e "$lt_aix_libpath_sed"`
+fi
+else
+ echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+fi
+rm -f conftest.err conftest.$ac_objext \
+ conftest$ac_exeext conftest.$ac_ext
+if test -z "$aix_libpath"; then aix_libpath="/usr/lib:/lib"; fi
+
+ hardcode_libdir_flag_spec='${wl}-blibpath:$libdir:'"$aix_libpath"
+ archive_expsym_cmds='$CC -o $output_objdir/$soname $libobjs $deplibs '"\${wl}$no_entry_flag"' $compiler_flags `if test "x${allow_undefined_flag}" != "x"; then $ECHO "X${wl}${allow_undefined_flag}" | $Xsed; else :; fi` '"\${wl}$exp_sym_flag:\$export_symbols $shared_flag"
+ else
+ if test "$host_cpu" = ia64; then
+ hardcode_libdir_flag_spec='${wl}-R $libdir:/usr/lib:/lib'
+ allow_undefined_flag="-z nodefs"
+ archive_expsym_cmds="\$CC $shared_flag"' -o $output_objdir/$soname $libobjs $deplibs '"\${wl}$no_entry_flag"' $compiler_flags ${wl}${allow_undefined_flag} '"\${wl}$exp_sym_flag:\$export_symbols"
+ else
+ # Determine the default libpath from the value encoded in an
+ # empty executable.
+ cat >conftest.$ac_ext <<_ACEOF
+/* confdefs.h. */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h. */
+
+int
+main ()
+{
+
+ ;
+ return 0;
+}
+_ACEOF
+rm -f conftest.$ac_objext conftest$ac_exeext
+if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
+ (eval $ac_link) 2>conftest.er1
+ ac_status=$?
+ grep -v '^ *+' conftest.er1 >conftest.err
+ rm -f conftest.er1
+ cat conftest.err >&5
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); } &&
+ { ac_try='test -z "$ac_c_werror_flag"
+ || test ! -s conftest.err'
+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+ (eval $ac_try) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); }; } &&
+ { ac_try='test -s conftest$ac_exeext'
+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+ (eval $ac_try) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); }; }; then
+
+lt_aix_libpath_sed='
+ /Import File Strings/,/^$/ {
+ /^0/ {
+ s/^0 *\(.*\)$/\1/
+ p
+ }
+ }'
+aix_libpath=`dump -H conftest$ac_exeext 2>/dev/null | $SED -n -e "$lt_aix_libpath_sed"`
+# Check for a 64-bit object if we didn't find anything.
+if test -z "$aix_libpath"; then
+ aix_libpath=`dump -HX64 conftest$ac_exeext 2>/dev/null | $SED -n -e "$lt_aix_libpath_sed"`
+fi
+else
+ echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+fi
+rm -f conftest.err conftest.$ac_objext \
+ conftest$ac_exeext conftest.$ac_ext
+if test -z "$aix_libpath"; then aix_libpath="/usr/lib:/lib"; fi
+
+ hardcode_libdir_flag_spec='${wl}-blibpath:$libdir:'"$aix_libpath"
+ # Warning - without using the other run time loading flags,
+ # -berok will link without error, but may produce a broken library.
+ no_undefined_flag=' ${wl}-bernotok'
+ allow_undefined_flag=' ${wl}-berok'
+ # Exported symbols can be pulled into shared objects from archives
+ whole_archive_flag_spec='$convenience'
+ archive_cmds_need_lc=yes
+ # This is similar to how AIX traditionally builds its shared libraries.
+ archive_expsym_cmds="\$CC $shared_flag"' -o $output_objdir/$soname $libobjs $deplibs ${wl}-bnoentry $compiler_flags ${wl}-bE:$export_symbols${allow_undefined_flag}~$AR $AR_FLAGS $output_objdir/$libname$release.a $output_objdir/$soname'
+ fi
+ fi
;;
- esac
- fi
- rm -rf conftest*
- ;;
-*-*-sco3.2v5*)
- # On SCO OpenServer 5, we need -belf to get full-featured binaries.
- SAVE_CFLAGS="$CFLAGS"
- CFLAGS="$CFLAGS -belf"
- echo $ac_n "checking whether the C compiler needs -belf""... $ac_c" 1>&6
-echo "configure:2067: checking whether the C compiler needs -belf" >&5
-if eval "test \"`echo '$''{'lt_cv_cc_needs_belf'+set}'`\" = set"; then
- echo $ac_n "(cached) $ac_c" 1>&6
-else
-
- 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${ac_exeext} $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5'
-cross_compiling=$ac_cv_prog_cc_cross
+ amigaos*)
+ if test "$host_cpu" = m68k; then
+ archive_cmds='$RM $output_objdir/a2ixlibrary.data~$ECHO "#define NAME $libname" > $output_objdir/a2ixlibrary.data~$ECHO "#define LIBRARY_ID 1" >> $output_objdir/a2ixlibrary.data~$ECHO "#define VERSION $major" >> $output_objdir/a2ixlibrary.data~$ECHO "#define REVISION $revision" >> $output_objdir/a2ixlibrary.data~$AR $AR_FLAGS $lib $libobjs~$RANLIB $lib~(cd $output_objdir && a2ixlibrary -32)'
+ hardcode_libdir_flag_spec='-L$libdir'
+ hardcode_minus_L=yes
+ fi
+ # see comment about different semantics on the GNU ld section
+ ld_shlibs=no
+ ;;
- cat > conftest.$ac_ext <<EOF
-#line 2080 "configure"
-#include "confdefs.h"
+ bsdi[45]*)
+ export_dynamic_flag_spec=-rdynamic
+ ;;
-int main() {
+ cygwin* | mingw* | pw32*)
+ # When not using gcc, we currently assume that we are using
+ # Microsoft Visual C++.
+ # hardcode_libdir_flag_spec is actually meaningless, as there is
+ # no search path for DLLs.
+ hardcode_libdir_flag_spec=' '
+ allow_undefined_flag=unsupported
+ # Tell ltmain to make .lib files, not .a files.
+ libext=lib
+ # Tell ltmain to make .dll files, not .so files.
+ shrext_cmds=".dll"
+ # FIXME: Setting linknames here is a bad hack.
+ archive_cmds='$CC -o $lib $libobjs $compiler_flags `$ECHO "X$deplibs" | $Xsed -e '\''s/ -lc$//'\''` -link -dll~linknames='
+ # The linker will automatically build a .lib file if we build a DLL.
+ old_archive_from_new_cmds='true'
+ # FIXME: Should let the user specify the lib program.
+ old_archive_cmds='lib -OUT:$oldlib$oldobjs$old_deplibs'
+ fix_srcfile_path='`cygpath -w "$srcfile"`'
+ enable_shared_with_static_runtimes=yes
+ ;;
-; return 0; }
-EOF
-if { (eval echo configure:2087: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
- rm -rf conftest*
- lt_cv_cc_needs_belf=yes
-else
- echo "configure: failed program was:" >&5
- cat conftest.$ac_ext >&5
- rm -rf conftest*
- lt_cv_cc_needs_belf=no
+ darwin* | rhapsody*)
+ case $host_os in
+ rhapsody* | darwin1.[012])
+ allow_undefined_flag='${wl}-undefined ${wl}suppress'
+ ;;
+ *) # Darwin 1.3 on
+ case ${MACOSX_DEPLOYMENT_TARGET-10.0} in
+ 10.[012])
+ allow_undefined_flag='${wl}-flat_namespace ${wl}-undefined ${wl}suppress'
+ ;;
+ 10.*)
+ allow_undefined_flag='${wl}-undefined ${wl}dynamic_lookup'
+ ;;
+ esac
+ ;;
+ esac
+ archive_cmds_need_lc=no
+ hardcode_direct=no
+ hardcode_automatic=yes
+ hardcode_shlibpath_var=unsupported
+ whole_archive_flag_spec=''
+ link_all_deplibs=yes
+ if test "$GCC" = yes ; then
+ if test "${lt_cv_apple_cc_single_mod+set}" = set; then
+ echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+ lt_cv_apple_cc_single_mod=no
+ if test -z "${LT_MULTI_MODULE}"; then
+ # By default we will add the -single_module flag. You can override
+ # by either setting the environment variable LT_MULTI_MODULE
+ # non-empty at configure time, or by adding -multi-module to the
+ # link flags.
+ echo "int foo(void){return 1;}" > conftest.c
+ $LTCC $LTCFLAGS $LDFLAGS -o libconftest.dylib \
+ -dynamiclib ${wl}-single_module conftest.c
+ if test -f libconftest.dylib; then
+ lt_cv_apple_cc_single_mod=yes
+ rm libconftest.dylib
+ fi
+ rm conftest.$ac_ext
+ fi
fi
-rm -f conftest*
- 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${ac_exeext} $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5'
-cross_compiling=$ac_cv_prog_cc_cross
-fi
+ output_verbose_link_cmd=echo
+ if test "X$lt_cv_apple_cc_single_mod" = Xyes ; then
+ archive_cmds='$CC -dynamiclib $single_module $allow_undefined_flag -o $lib $libobjs $deplibs $compiler_flags -install_name $rpath/$soname $verstring'
+ archive_expsym_cmds='sed "s,^,_," < $export_symbols > $output_objdir/${libname}-symbols.expsym~$CC $single_module -dynamiclib $allow_undefined_flag -o $lib $libobjs $deplibs $compiler_flags -install_name $rpath/$soname $verstring~nmedit -s $output_objdir/${libname}-symbols.expsym ${lib}'
+ else
+ archive_cmds='$CC -dynamiclib $allow_undefined_flag -o $lib $libobjs $deplibs $compiler_flags -install_name $rpath/$soname $verstring'
+ archive_expsym_cmds='sed "s,^,_," < $export_symbols > $output_objdir/${libname}-symbols.expsym~$CC -dynamiclib $allow_undefined_flag -o $lib $libobjs $deplibs $compiler_flags -install_name $rpath/$soname $verstring~nmedit -s $output_objdir/${libname}-symbols.expsym ${lib}'
+ fi
+ module_cmds='$CC $allow_undefined_flag -o $lib -bundle $libobjs $deplibs$compiler_flags'
+ module_expsym_cmds='sed -e "s,^,_," < $export_symbols > $output_objdir/${libname}-symbols.expsym~$CC $allow_undefined_flag -o $lib -bundle $libobjs $deplibs$compiler_flags~nmedit -s $output_objdir/${libname}-symbols.expsym ${lib}'
+ else
+ case $cc_basename in
+ xlc*)
+ output_verbose_link_cmd=echo
+ archive_cmds='$CC -qmkshrobj $allow_undefined_flag -o $lib $libobjs $deplibs $compiler_flags ${wl}-install_name ${wl}`$ECHO $rpath/$soname` $verstring'
+ module_cmds='$CC $allow_undefined_flag -o $lib -bundle $libobjs $deplibs$compiler_flags'
+ # Don't fix this by using the ld -exported_symbols_list flag, it doesn't exist in older darwin lds
+ archive_expsym_cmds='sed "s,^,_," < $export_symbols > $output_objdir/${libname}-symbols.expsym~$CC -qmkshrobj $allow_undefined_flag -o $lib $libobjs $deplibs $compiler_flags ${wl}-install_name ${wl}$rpath/$soname $verstring~nmedit -s $output_objdir/${libname}-symbols.expsym ${lib}'
+ module_expsym_cmds='sed "s,^,_," < $export_symbols > $output_objdir/${libname}-symbols.expsym~$CC $allow_undefined_flag -o $lib -bundle $libobjs $deplibs$compiler_flags~nmedit -s $output_objdir/${libname}-symbols.expsym ${lib}'
+ ;;
+ *)
+ ld_shlibs=no
+ ;;
+ esac
+ fi
+ ;;
-echo "$ac_t""$lt_cv_cc_needs_belf" 1>&6
- if test x"$lt_cv_cc_needs_belf" != x"yes"; then
- # this is probably gcc 2.8.0, egcs 1.0 or newer; no need for -belf
- CFLAGS="$SAVE_CFLAGS"
+ dgux*)
+ archive_cmds='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
+ hardcode_libdir_flag_spec='-L$libdir'
+ hardcode_shlibpath_var=no
+ ;;
+
+ freebsd1*)
+ ld_shlibs=no
+ ;;
+
+ # FreeBSD 2.2.[012] allows us to include c++rt0.o to get C++ constructor
+ # support. Future versions do this automatically, but an explicit c++rt0.o
+ # does not break anything, and helps significantly (at the cost of a little
+ # extra space).
+ freebsd2.2*)
+ archive_cmds='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags /usr/lib/c++rt0.o'
+ hardcode_libdir_flag_spec='-R$libdir'
+ hardcode_direct=yes
+ hardcode_shlibpath_var=no
+ ;;
+
+ # Unfortunately, older versions of FreeBSD 2 do not have this feature.
+ freebsd2*)
+ archive_cmds='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags'
+ hardcode_direct=yes
+ hardcode_minus_L=yes
+ hardcode_shlibpath_var=no
+ ;;
+
+ # FreeBSD 3 and greater uses gcc -shared to do shared libraries.
+ freebsd* | dragonfly*)
+ archive_cmds='$CC -shared -o $lib $libobjs $deplibs $compiler_flags'
+ hardcode_libdir_flag_spec='-R$libdir'
+ hardcode_direct=yes
+ hardcode_shlibpath_var=no
+ ;;
+
+ hpux9*)
+ if test "$GCC" = yes; then
+ archive_cmds='$RM $output_objdir/$soname~$CC -shared -fPIC ${wl}+b ${wl}$install_libdir -o $output_objdir/$soname $libobjs $deplibs $compiler_flags~test $output_objdir/$soname = $lib || mv $output_objdir/$soname $lib'
+ else
+ archive_cmds='$RM $output_objdir/$soname~$LD -b +b $install_libdir -o $output_objdir/$soname $libobjs $deplibs $linker_flags~test $output_objdir/$soname = $lib || mv $output_objdir/$soname $lib'
+ fi
+ hardcode_libdir_flag_spec='${wl}+b ${wl}$libdir'
+ hardcode_libdir_separator=:
+ hardcode_direct=yes
+
+ # hardcode_minus_L: Not really in the search PATH,
+ # but as the default location of the library.
+ hardcode_minus_L=yes
+ export_dynamic_flag_spec='${wl}-E'
+ ;;
+
+ hpux10*)
+ if test "$GCC" = yes -a "$with_gnu_ld" = no; then
+ archive_cmds='$CC -shared -fPIC ${wl}+h ${wl}$soname ${wl}+b ${wl}$install_libdir -o $lib $libobjs $deplibs $compiler_flags'
+ else
+ archive_cmds='$LD -b +h $soname +b $install_libdir -o $lib $libobjs $deplibs $linker_flags'
+ fi
+ if test "$with_gnu_ld" = no; then
+ hardcode_libdir_flag_spec='${wl}+b ${wl}$libdir'
+ hardcode_libdir_flag_spec_ld='+b $libdir'
+ hardcode_libdir_separator=:
+ hardcode_direct=yes
+ hardcode_direct_absolute=yes
+ export_dynamic_flag_spec='${wl}-E'
+ # hardcode_minus_L: Not really in the search PATH,
+ # but as the default location of the library.
+ hardcode_minus_L=yes
+ fi
+ ;;
+
+ hpux11*)
+ if test "$GCC" = yes -a "$with_gnu_ld" = no; then
+ case $host_cpu in
+ hppa*64*)
+ archive_cmds='$CC -shared ${wl}+h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags'
+ ;;
+ ia64*)
+ archive_cmds='$CC -shared ${wl}+h ${wl}$soname ${wl}+nodefaultrpath -o $lib $libobjs $deplibs $compiler_flags'
+ ;;
+ *)
+ archive_cmds='$CC -shared -fPIC ${wl}+h ${wl}$soname ${wl}+b ${wl}$install_libdir -o $lib $libobjs $deplibs $compiler_flags'
+ ;;
+ esac
+ else
+ case $host_cpu in
+ hppa*64*)
+ archive_cmds='$CC -b ${wl}+h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags'
+ ;;
+ ia64*)
+ archive_cmds='$CC -b ${wl}+h ${wl}$soname ${wl}+nodefaultrpath -o $lib $libobjs $deplibs $compiler_flags'
+ ;;
+ *)
+ archive_cmds='$CC -b ${wl}+h ${wl}$soname ${wl}+b ${wl}$install_libdir -o $lib $libobjs $deplibs $compiler_flags'
+ ;;
+ esac
+ fi
+ if test "$with_gnu_ld" = no; then
+ hardcode_libdir_flag_spec='${wl}+b ${wl}$libdir'
+ hardcode_libdir_separator=:
+
+ case $host_cpu in
+ hppa*64*|ia64*)
+ hardcode_direct=no
+ hardcode_shlibpath_var=no
+ ;;
+ *)
+ hardcode_direct=yes
+ hardcode_direct_absolute=yes
+ export_dynamic_flag_spec='${wl}-E'
+
+ # hardcode_minus_L: Not really in the search PATH,
+ # but as the default location of the library.
+ hardcode_minus_L=yes
+ ;;
+ esac
+ fi
+ ;;
+
+ irix5* | irix6* | nonstopux*)
+ if test "$GCC" = yes; then
+ archive_cmds='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname ${wl}$soname `test -n "$verstring" && $ECHO "X${wl}-set_version ${wl}$verstring" | $Xsed` ${wl}-update_registry ${wl}${output_objdir}/so_locations -o $lib'
+ # Try to use the -exported_symbol ld option, if it does not
+ # work, assume that -exports_file does not work either and
+ # implicitly export all symbols.
+ save_LDFLAGS="$LDFLAGS"
+ LDFLAGS="$LDFLAGS -shared ${wl}-exported_symbol ${wl}foo ${wl}-update_registry ${wl}/dev/null"
+ cat >conftest.$ac_ext <<_ACEOF
+int foo(void) {}
+_ACEOF
+rm -f conftest.$ac_objext conftest$ac_exeext
+if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
+ (eval $ac_link) 2>conftest.er1
+ ac_status=$?
+ grep -v '^ *+' conftest.er1 >conftest.err
+ rm -f conftest.er1
+ cat conftest.err >&5
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); } &&
+ { ac_try='test -z "$ac_c_werror_flag"
+ || test ! -s conftest.err'
+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+ (eval $ac_try) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); }; } &&
+ { ac_try='test -s conftest$ac_exeext'
+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+ (eval $ac_try) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); }; }; then
+ archive_expsym_cmds='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname ${wl}$soname `test -n "$verstring" && $ECHO "X${wl}-set_version ${wl}$verstring" | $Xsed` ${wl}-update_registry ${wl}${output_objdir}/so_locations ${wl}-exports_file ${wl}$export_symbols -o $lib'
+
+else
+ echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+fi
+rm -f conftest.err conftest.$ac_objext \
+ conftest$ac_exeext conftest.$ac_ext
+ LDFLAGS="$save_LDFLAGS"
+ else
+ archive_cmds='$CC -shared $libobjs $deplibs $compiler_flags -soname $soname `test -n "$verstring" && $ECHO "X-set_version $verstring" | $Xsed` -update_registry ${output_objdir}/so_locations -o $lib'
+ archive_expsym_cmds='$CC -shared $libobjs $deplibs $compiler_flags -soname $soname `test -n "$verstring" && $ECHO "X-set_version $verstring" | $Xsed` -update_registry ${output_objdir}/so_locations -exports_file $export_symbols -o $lib'
+ fi
+ archive_cmds_need_lc='no'
+ hardcode_libdir_flag_spec='${wl}-rpath ${wl}$libdir'
+ hardcode_libdir_separator=:
+ inherit_rpath=yes
+ link_all_deplibs=yes
+ ;;
+
+ netbsd*)
+ if echo __ELF__ | $CC -E - | $GREP __ELF__ >/dev/null; then
+ archive_cmds='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags' # a.out
+ else
+ archive_cmds='$LD -shared -o $lib $libobjs $deplibs $linker_flags' # ELF
+ fi
+ hardcode_libdir_flag_spec='-R$libdir'
+ hardcode_direct=yes
+ hardcode_shlibpath_var=no
+ ;;
+
+ newsos6)
+ archive_cmds='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
+ hardcode_direct=yes
+ hardcode_libdir_flag_spec='${wl}-rpath ${wl}$libdir'
+ hardcode_libdir_separator=:
+ hardcode_shlibpath_var=no
+ ;;
+
+ *nto* | *qnx*)
+ ;;
+
+ openbsd*)
+ hardcode_direct=yes
+ hardcode_shlibpath_var=no
+ hardcode_direct_absolute=yes
+ if test -z "`echo __ELF__ | $CC -E - | $GREP __ELF__`" || test "$host_os-$host_cpu" = "openbsd2.8-powerpc"; then
+ archive_cmds='$CC -shared $pic_flag -o $lib $libobjs $deplibs $compiler_flags'
+ archive_expsym_cmds='$CC -shared $pic_flag -o $lib $libobjs $deplibs $compiler_flags ${wl}-retain-symbols-file,$export_symbols'
+ hardcode_libdir_flag_spec='${wl}-rpath,$libdir'
+ export_dynamic_flag_spec='${wl}-E'
+ else
+ case $host_os in
+ openbsd[01].* | openbsd2.[0-7] | openbsd2.[0-7].*)
+ archive_cmds='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags'
+ hardcode_libdir_flag_spec='-R$libdir'
+ ;;
+ *)
+ archive_cmds='$CC -shared $pic_flag -o $lib $libobjs $deplibs $compiler_flags'
+ hardcode_libdir_flag_spec='${wl}-rpath,$libdir'
+ ;;
+ esac
+ fi
+ ;;
+
+ os2*)
+ hardcode_libdir_flag_spec='-L$libdir'
+ hardcode_minus_L=yes
+ allow_undefined_flag=unsupported
+ archive_cmds='$ECHO "LIBRARY $libname INITINSTANCE" > $output_objdir/$libname.def~$ECHO "DESCRIPTION \"$libname\"" >> $output_objdir/$libname.def~$ECHO DATA >> $output_objdir/$libname.def~$ECHO " SINGLE NONSHARED" >> $output_objdir/$libname.def~$ECHO EXPORTS >> $output_objdir/$libname.def~emxexp $libobjs >> $output_objdir/$libname.def~$CC -Zdll -Zcrtdll -o $lib $libobjs $deplibs $compiler_flags $output_objdir/$libname.def'
+ old_archive_from_new_cmds='emximp -o $output_objdir/$libname.a $output_objdir/$libname.def'
+ ;;
+
+ osf3*)
+ if test "$GCC" = yes; then
+ allow_undefined_flag=' ${wl}-expect_unresolved ${wl}\*'
+ archive_cmds='$CC -shared${allow_undefined_flag} $libobjs $deplibs $compiler_flags ${wl}-soname ${wl}$soname `test -n "$verstring" && $ECHO "X${wl}-set_version ${wl}$verstring" | $Xsed` ${wl}-update_registry ${wl}${output_objdir}/so_locations -o $lib'
+ else
+ allow_undefined_flag=' -expect_unresolved \*'
+ archive_cmds='$CC -shared${allow_undefined_flag} $libobjs $deplibs $compiler_flags -soname $soname `test -n "$verstring" && $ECHO "X-set_version $verstring" | $Xsed` -update_registry ${output_objdir}/so_locations -o $lib'
+ fi
+ archive_cmds_need_lc='no'
+ hardcode_libdir_flag_spec='${wl}-rpath ${wl}$libdir'
+ hardcode_libdir_separator=:
+ ;;
+
+ osf4* | osf5*) # as osf3* with the addition of -msym flag
+ if test "$GCC" = yes; then
+ allow_undefined_flag=' ${wl}-expect_unresolved ${wl}\*'
+ archive_cmds='$CC -shared${allow_undefined_flag} $libobjs $deplibs $compiler_flags ${wl}-msym ${wl}-soname ${wl}$soname `test -n "$verstring" && $ECHO "X${wl}-set_version ${wl}$verstring" | $Xsed` ${wl}-update_registry ${wl}${output_objdir}/so_locations -o $lib'
+ hardcode_libdir_flag_spec='${wl}-rpath ${wl}$libdir'
+ else
+ allow_undefined_flag=' -expect_unresolved \*'
+ archive_cmds='$CC -shared${allow_undefined_flag} $libobjs $deplibs $compiler_flags -msym -soname $soname `test -n "$verstring" && $ECHO "X-set_version $verstring" | $Xsed` -update_registry ${output_objdir}/so_locations -o $lib'
+ archive_expsym_cmds='for i in `cat $export_symbols`; do printf "%s %s\\n" -exported_symbol "\$i" >> $lib.exp; done; printf "%s\\n" "-hidden">> $lib.exp~
+ $CC -shared${allow_undefined_flag} ${wl}-input ${wl}$lib.exp $compiler_flags $libobjs $deplibs -soname $soname `test -n "$verstring" && $ECHO "X-set_version $verstring" | $Xsed` -update_registry ${output_objdir}/so_locations -o $lib~$RM $lib.exp'
+
+ # Both c and cxx compiler support -rpath directly
+ hardcode_libdir_flag_spec='-rpath $libdir'
+ fi
+ archive_cmds_need_lc='no'
+ hardcode_libdir_separator=:
+ ;;
+
+ solaris*)
+ no_undefined_flag=' -z defs'
+ if test "$GCC" = yes; then
+ wlarc='${wl}'
+ archive_cmds='$CC -shared ${wl}-z ${wl}text ${wl}-h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags'
+ archive_expsym_cmds='echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~echo "local: *; };" >> $lib.exp~
+ $CC -shared ${wl}-z ${wl}text ${wl}-M ${wl}$lib.exp ${wl}-h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags~$RM $lib.exp'
+ else
+ case `$CC -V 2>&1` in
+ *"Compilers 5.0"*)
+ wlarc=''
+ archive_cmds='$LD -G${allow_undefined_flag} -h $soname -o $lib $libobjs $deplibs $linker_flags'
+ archive_expsym_cmds='echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~echo "local: *; };" >> $lib.exp~
+ $LD -G${allow_undefined_flag} -M $lib.exp -h $soname -o $lib $libobjs $deplibs $linker_flags~$RM $lib.exp'
+ ;;
+ *)
+ wlarc='${wl}'
+ archive_cmds='$CC -G${allow_undefined_flag} -h $soname -o $lib $libobjs $deplibs $compiler_flags'
+ archive_expsym_cmds='echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~echo "local: *; };" >> $lib.exp~
+ $CC -G${allow_undefined_flag} -M $lib.exp -h $soname -o $lib $libobjs $deplibs $compiler_flags~$RM $lib.exp'
+ ;;
+ esac
+ fi
+ hardcode_libdir_flag_spec='-R$libdir'
+ hardcode_shlibpath_var=no
+ case $host_os in
+ solaris2.[0-5] | solaris2.[0-5].*) ;;
+ *)
+ # The compiler driver will combine and reorder linker options,
+ # but understands `-z linker_flag'. GCC discards it without `$wl',
+ # but is careful enough not to reorder.
+ # Supported since Solaris 2.6 (maybe 2.5.1?)
+ if test "$GCC" = yes; then
+ whole_archive_flag_spec='${wl}-z ${wl}allextract$convenience ${wl}-z ${wl}defaultextract'
+ else
+ whole_archive_flag_spec='-z allextract$convenience -z defaultextract'
+ fi
+ ;;
+ esac
+ link_all_deplibs=yes
+ ;;
+
+ sunos4*)
+ if test "x$host_vendor" = xsequent; then
+ # Use $CC to link under sequent, because it throws in some extra .o
+ # files that make .init and .fini sections work.
+ archive_cmds='$CC -G ${wl}-h $soname -o $lib $libobjs $deplibs $compiler_flags'
+ else
+ archive_cmds='$LD -assert pure-text -Bstatic -o $lib $libobjs $deplibs $linker_flags'
+ fi
+ hardcode_libdir_flag_spec='-L$libdir'
+ hardcode_direct=yes
+ hardcode_minus_L=yes
+ hardcode_shlibpath_var=no
+ ;;
+
+ sysv4)
+ case $host_vendor in
+ sni)
+ archive_cmds='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
+ hardcode_direct=yes # is this really true???
+ ;;
+ siemens)
+ ## LD is ld it makes a PLAMLIB
+ ## CC just makes a GrossModule.
+ archive_cmds='$LD -G -o $lib $libobjs $deplibs $linker_flags'
+ reload_cmds='$CC -r -o $output$reload_objs'
+ hardcode_direct=no
+ ;;
+ motorola)
+ archive_cmds='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
+ hardcode_direct=no #Motorola manual says yes, but my tests say they lie
+ ;;
+ esac
+ runpath_var='LD_RUN_PATH'
+ hardcode_shlibpath_var=no
+ ;;
+
+ sysv4.3*)
+ archive_cmds='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
+ hardcode_shlibpath_var=no
+ export_dynamic_flag_spec='-Bexport'
+ ;;
+
+ sysv4*MP*)
+ if test -d /usr/nec; then
+ archive_cmds='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
+ hardcode_shlibpath_var=no
+ runpath_var=LD_RUN_PATH
+ hardcode_runpath_var=yes
+ ld_shlibs=yes
+ fi
+ ;;
+
+ sysv4*uw2* | sysv5OpenUNIX* | sysv5UnixWare7.[01].[10]* | unixware7* | sco3.2v5.0.[024]*)
+ no_undefined_flag='${wl}-z,text'
+ archive_cmds_need_lc=no
+ hardcode_shlibpath_var=no
+ runpath_var='LD_RUN_PATH'
+
+ if test "$GCC" = yes; then
+ archive_cmds='$CC -shared ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
+ archive_expsym_cmds='$CC -shared ${wl}-Bexport:$export_symbols ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
+ else
+ archive_cmds='$CC -G ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
+ archive_expsym_cmds='$CC -G ${wl}-Bexport:$export_symbols ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
+ fi
+ ;;
+
+ sysv5* | sco3.2v5* | sco5v6*)
+ # Note: We can NOT use -z defs as we might desire, because we do not
+ # link with -lc, and that would cause any symbols used from libc to
+ # always be unresolved, which means just about no library would
+ # ever link correctly. If we're not using GNU ld we use -z text
+ # though, which does catch some bad symbols but isn't as heavy-handed
+ # as -z defs.
+ no_undefined_flag='${wl}-z,text'
+ allow_undefined_flag='${wl}-z,nodefs'
+ archive_cmds_need_lc=no
+ hardcode_shlibpath_var=no
+ hardcode_libdir_flag_spec='${wl}-R,$libdir'
+ hardcode_libdir_separator=':'
+ link_all_deplibs=yes
+ export_dynamic_flag_spec='${wl}-Bexport'
+ runpath_var='LD_RUN_PATH'
+
+ if test "$GCC" = yes; then
+ archive_cmds='$CC -shared ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
+ archive_expsym_cmds='$CC -shared ${wl}-Bexport:$export_symbols ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
+ else
+ archive_cmds='$CC -G ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
+ archive_expsym_cmds='$CC -G ${wl}-Bexport:$export_symbols ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
+ fi
+ ;;
+
+ uts4*)
+ archive_cmds='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
+ hardcode_libdir_flag_spec='-L$libdir'
+ hardcode_shlibpath_var=no
+ ;;
+
+ *)
+ ld_shlibs=no
+ ;;
+ esac
+
+ if test x$host_vendor = xsni; then
+ case $host in
+ sysv4 | sysv4.2uw2* | sysv4.3* | sysv5*)
+ export_dynamic_flag_spec='${wl}-Blargedynsym'
+ ;;
+ esac
+ fi
fi
- ;;
+
+echo "$as_me:$LINENO: result: $ld_shlibs" >&5
+echo "${ECHO_T}$ld_shlibs" >&6
+test "$ld_shlibs" = no && can_build_shared=no
+
+with_gnu_ld=$with_gnu_ld
+
+
+
+
+
+
+
+
+
+
+
-esac
-# Save cache, so that ltconfig can load it
-cat > confcache <<\EOF
-# This file is a shell script that caches the results of configure
-# tests run on this system so they can be shared between configure
-# scripts and configure runs. It is not useful on other systems.
-# If it contains results you don't want to keep, you may remove or edit it.
#
-# By default, configure uses ./config.cache as the cache file,
-# creating it if it does not exist already. You can give configure
-# the --cache-file=FILE option to use a different cache file; that is
-# what configure does when it calls configure scripts in
-# subdirectories, so they share the cache.
-# Giving --cache-file=/dev/null disables caching, for debugging configure.
-# config.status only pays attention to the cache file if you give it the
-# --recheck option to rerun configure.
+# Do we need to explicitly link libc?
#
-EOF
-# The following way of writing the cache mishandles newlines in values,
-# but we know of no workaround that is simple, portable, and efficient.
-# So, don't put newlines in cache variables' values.
-# 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 | grep ac_space) 2>&1` in
- *ac_space=\ *)
- # `set' does not quote correctly, so add quotes (double-quote substitution
- # turns \\\\ into \\, and sed turns \\ into \).
- sed -n \
- -e "s/'/'\\\\''/g" \
- -e "s/^\\([a-zA-Z0-9_]*_cv_[a-zA-Z0-9_]*\\)=\\(.*\\)/\\1=\${\\1='\\2'}/p"
- ;;
- *)
- # `set' quotes correctly as required by POSIX, so do not add quotes.
- sed -n -e 's/^\([a-zA-Z0-9_]*_cv_[a-zA-Z0-9_]*\)=\(.*\)/\1=${\1=\2}/p'
- ;;
- esac >> confcache
-if cmp -s $cache_file confcache; then
- :
-else
- if test -w $cache_file; then
- echo "updating cache $cache_file"
- cat confcache > $cache_file
- else
- echo "not updating unwritable cache $cache_file"
+case "x$archive_cmds_need_lc" in
+x|xyes)
+ # Assume -lc should be added
+ archive_cmds_need_lc=yes
+
+ if test "$enable_shared" = yes && test "$GCC" = yes; then
+ case $archive_cmds in
+ *'~'*)
+ # FIXME: we may have to deal with multi-command sequences.
+ ;;
+ '$CC '*)
+ # Test whether the compiler implicitly links with -lc since on some
+ # systems, -lgcc has to come before -lc. If gcc already passes -lc
+ # to ld, don't add -lc before -lgcc.
+ echo "$as_me:$LINENO: checking whether -lc should be explicitly linked in" >&5
+echo $ECHO_N "checking whether -lc should be explicitly linked in... $ECHO_C" >&6
+ $RM conftest*
+ echo "$lt_simple_compile_test_code" > conftest.$ac_ext
+
+ if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
+ (eval $ac_compile) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); } 2>conftest.err; then
+ soname=conftest
+ lib=conftest
+ libobjs=conftest.$ac_objext
+ deplibs=
+ wl=$lt_prog_compiler_wl
+ pic_flag=$lt_prog_compiler_pic
+ compiler_flags=-v
+ linker_flags=-v
+ verstring=
+ output_objdir=.
+ libname=conftest
+ lt_save_allow_undefined_flag=$allow_undefined_flag
+ allow_undefined_flag=
+ if { (eval echo "$as_me:$LINENO: \"$archive_cmds 2\>\&1 \| $GREP \" -lc \" \>/dev/null 2\>\&1\"") >&5
+ (eval $archive_cmds 2\>\&1 \| $GREP \" -lc \" \>/dev/null 2\>\&1) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); }
+ then
+ archive_cmds_need_lc=no
+ else
+ archive_cmds_need_lc=yes
+ fi
+ allow_undefined_flag=$lt_save_allow_undefined_flag
+ else
+ cat conftest.err 1>&5
+ fi
+ $RM conftest*
+ echo "$as_me:$LINENO: result: $archive_cmds_need_lc" >&5
+echo "${ECHO_T}$archive_cmds_need_lc" >&6
+ ;;
+ esac
fi
-fi
-rm -f confcache
+ ;;
+esac
-# Actually configure libtool. ac_aux_dir is where install-sh is found.
-AR="$AR" LTCC="$CC" CC="$CC" CFLAGS="$CFLAGS" CPPFLAGS="$CPPFLAGS" \
-MAGIC_CMD="$MAGIC_CMD" LD="$LD" LDFLAGS="$LDFLAGS" LIBS="$LIBS" \
-LN_S="$LN_S" NM="$NM" RANLIB="$RANLIB" STRIP="$STRIP" \
-AS="$AS" DLLTOOL="$DLLTOOL" OBJDUMP="$OBJDUMP" \
-objext="$OBJEXT" exeext="$EXEEXT" reload_flag="$reload_flag" \
-deplibs_check_method="$deplibs_check_method" file_magic_cmd="$file_magic_cmd" \
-${CONFIG_SHELL-/bin/sh} $ac_aux_dir/ltconfig --no-reexec \
-$libtool_flags --no-verify --build="$build" $ac_aux_dir/ltmain.sh $host \
-|| { echo "configure: error: libtool configure failed" 1>&2; exit 1; }
-# Reload cache, that may have been modified by ltconfig
-if test -r "$cache_file"; then
- echo "loading cache $cache_file"
- . $cache_file
-else
- echo "creating cache $cache_file"
- > $cache_file
-fi
-# This can be used to rebuild libtool when needed
-LIBTOOL_DEPS="$ac_aux_dir/ltconfig $ac_aux_dir/ltmain.sh $ac_aux_dir/ltcf-c.sh"
-# Always use our own libtool.
-LIBTOOL='$(SHELL) $(top_builddir)/libtool'
-# Redirect the config.log output again, so that the ltconfig log is not
-# clobbered by the next message.
-exec 5>>./config.log
-
-
-
-
-# Check whether --with-lib-path or --without-lib-path was given.
-if test "${with_lib_path+set}" = set; then
- withval="$with_lib_path"
- LIB_PATH=$withval
-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-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
-# Check whether --with-sysroot or --without-sysroot was given.
-if test "${with_sysroot+set}" = set; then
- withval="$with_sysroot"
-
- case ${with_sysroot} in
- yes) TARGET_SYSTEM_ROOT='${exec_prefix}/${target_alias}/sys-root' ;;
- *) TARGET_SYSTEM_ROOT=$with_sysroot ;;
- esac
- TARGET_SYSTEM_ROOT_DEFINE='-DTARGET_SYSTEM_ROOT=\"$(TARGET_SYSTEM_ROOT)\"'
- use_sysroot=yes
- if test "x$exec_prefix" = xNONE; then
- if test "x$prefix" = xNONE; then
- test_prefix=/usr/local
- else
- test_prefix=$prefix
- fi
- else
- test_prefix=$exec_prefix
- fi
- case ${TARGET_SYSTEM_ROOT} in
- "${test_prefix}"|"${test_prefix}/"*|\
- '${exec_prefix}'|'${exec_prefix}/'*)
- t="$TARGET_SYSTEM_ROOT_DEFINE -DTARGET_SYSTEM_ROOT_RELOCATABLE"
- TARGET_SYSTEM_ROOT_DEFINE="$t"
- ;;
- esac
-else
-
- use_sysroot=no
- TARGET_SYSTEM_ROOT=
- TARGET_SYSTEM_ROOT_DEFINE='-DTARGET_SYSTEM_ROOT=\"\"'
-fi
-build_warnings="-W -Wall -Wstrict-prototypes -Wmissing-prototypes"
-# Check whether --enable-build-warnings or --disable-build-warnings was given.
-if test "${enable_build_warnings+set}" = set; then
- enableval="$enable_build_warnings"
- case "${enableval}" in
- yes) ;;
- no) build_warnings="-w";;
- ,*) t=`echo "${enableval}" | sed -e "s/,/ /g"`
- build_warnings="${build_warnings} ${t}";;
- *,) t=`echo "${enableval}" | sed -e "s/,/ /g"`
- build_warnings="${t} ${build_warnings}";;
- *) build_warnings=`echo "${enableval}" | sed -e "s/,/ /g"`;;
-esac
-if test x"$silent" != x"yes" && test x"$build_warnings" != x""; then
- echo "Setting warning flags = $build_warnings" 6>&1
-fi
-fi
-WARN_CFLAGS=""
-if test "x${build_warnings}" != x -a "x$GCC" = xyes ; then
- WARN_CFLAGS="${build_warnings}"
-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:2311: 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=":"
- ac_dummy="$PATH"
- for ac_dir in $ac_dummy; do
- test -z "$ac_dir" && ac_dir=.
- if test -f $ac_dir/$ac_word; then
- ac_cv_prog_CC="gcc"
- break
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ echo "$as_me:$LINENO: checking dynamic linker characteristics" >&5
+echo $ECHO_N "checking dynamic linker characteristics... $ECHO_C" >&6
+withGCC=$GCC
+if test "$withGCC" = yes; then
+ case $host_os in
+ darwin*) lt_awk_arg="/^libraries:/,/LR/" ;;
+ *) lt_awk_arg="/^libraries:/" ;;
+ esac
+ lt_search_path_spec=`$CC -print-search-dirs | awk $lt_awk_arg | $SED -e "s/^libraries://" -e "s,=/,/,g"`
+ if $ECHO "$lt_search_path_spec" | $GREP ';' >/dev/null ; then
+ # if the path contains ";" then we assume it to be the separator
+ # otherwise default to the standard path separator (i.e. ":") - it is
+ # assumed that no part of a normal pathname contains ";" but that should
+ # okay in the real world where ";" in dirpaths is itself problematic.
+ lt_search_path_spec=`$ECHO "$lt_search_path_spec" | $SED -e 's/;/ /g'`
+ else
+ lt_search_path_spec=`$ECHO "$lt_search_path_spec" | $SED -e "s/$PATH_SEPARATOR/ /g"`
+ fi
+ # Ok, now we have the path, separated by spaces, we can step through it
+ # and add multilib dir if necessary.
+ lt_tmp_lt_search_path_spec=
+ lt_multi_os_dir=`$CC $CPPFLAGS $CFLAGS $LDFLAGS -print-multi-os-directory 2>/dev/null`
+ for lt_sys_path in $lt_search_path_spec; do
+ if test -d "$lt_sys_path/$lt_multi_os_dir"; then
+ lt_tmp_lt_search_path_spec="$lt_tmp_lt_search_path_spec $lt_sys_path/$lt_multi_os_dir"
+ else
+ test -d "$lt_sys_path" && \
+ lt_tmp_lt_search_path_spec="$lt_tmp_lt_search_path_spec $lt_sys_path"
fi
done
- 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
+ lt_search_path_spec=`$ECHO $lt_tmp_lt_search_path_spec | awk '
+BEGIN {RS=" "; FS="/|\n";} {
+ lt_foo="";
+ lt_count=0;
+ for (lt_i = NF; lt_i > 0; lt_i--) {
+ if ($lt_i != "" && $lt_i != ".") {
+ if ($lt_i == "..") {
+ lt_count++;
+ } else {
+ if (lt_count == 0) {
+ lt_foo="/" $lt_i lt_foo;
+ } else {
+ lt_count--;
+ }
+ }
+ }
+ }
+ if (lt_foo != "") { lt_freq[lt_foo]++; }
+ if (lt_freq[lt_foo] == 1) { print lt_foo; }
+}'`
+ sys_lib_search_path_spec=`$ECHO $lt_search_path_spec`
+else
+ sys_lib_search_path_spec="/lib /usr/lib /usr/local/lib"
+fi
+library_names_spec=
+libname_spec='lib$name'
+soname_spec=
+shrext_cmds=".so"
+postinstall_cmds=
+postuninstall_cmds=
+finish_cmds=
+finish_eval=
+shlibpath_var=
+shlibpath_overrides_runpath=unknown
+version_type=none
+dynamic_linker="$host_os ld.so"
+sys_lib_dlsearch_path_spec="/lib /usr/lib"
+need_lib_prefix=unknown
+hardcode_into_libs=no
+
+# when you set need_version to no, make sure it does not cause -set_version
+# flags to be left without arguments
+need_version=unknown
-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:2341: 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=":"
- ac_prog_rejected=no
- ac_dummy="$PATH"
- for ac_dir in $ac_dummy; 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
+case $host_os in
+aix3*)
+ version_type=linux
+ library_names_spec='${libname}${release}${shared_ext}$versuffix $libname.a'
+ shlibpath_var=LIBPATH
+
+ # AIX 3 has no versioning support, so we append a major version to the name.
+ soname_spec='${libname}${release}${shared_ext}$major'
+ ;;
+
+aix4* | aix5*)
+ version_type=linux
+ need_lib_prefix=no
+ need_version=no
+ hardcode_into_libs=yes
+ if test "$host_cpu" = ia64; then
+ # AIX 5 supports IA64
+ library_names_spec='${libname}${release}${shared_ext}$major ${libname}${release}${shared_ext}$versuffix $libname${shared_ext}'
+ shlibpath_var=LD_LIBRARY_PATH
+ else
+ # With GCC up to 2.95.x, collect2 would create an import file
+ # for dependence libraries. The import file would start with
+ # the line `#! .'. This would cause the generated library to
+ # depend on `.', always an invalid library. This was fixed in
+ # development snapshots of GCC prior to 3.0.
+ case $host_os in
+ aix4 | aix4.[01] | aix4.[01].*)
+ if { echo '#if __GNUC__ > 2 || (__GNUC__ == 2 && __GNUC_MINOR__ >= 97)'
+ echo ' yes '
+ echo '#endif'; } | ${CC} -E - | $GREP yes > /dev/null; then
+ :
+ else
+ can_build_shared=no
fi
- ac_cv_prog_CC="cc"
- break
+ ;;
+ esac
+ # AIX (on Power*) has no versioning support, so currently we can not hardcode correct
+ # soname into executable. Probably we can add versioning support to
+ # collect2, so additional links can be useful in future.
+ if test "$aix_use_runtimelinking" = yes; then
+ # If using run time linking (on AIX 4.2 or later) use lib<name>.so
+ # instead of lib<name>.a to let people know that these are not
+ # typical AIX shared libraries.
+ library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
+ else
+ # We preserve .a as extension for shared libraries through AIX4.2
+ # and later when we are not doing run time linking.
+ library_names_spec='${libname}${release}.a $libname.a'
+ soname_spec='${libname}${release}${shared_ext}$major'
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="$@"
+ shlibpath_var=LIBPATH
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
+ ;;
- if test -z "$CC"; then
- case "`uname -s`" in
- *win32* | *WIN32*)
- # Extract the first word of "cl", so it can be a program name with args.
-set dummy cl; ac_word=$2
-echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
-echo "configure:2392: 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=":"
- ac_dummy="$PATH"
- for ac_dir in $ac_dummy; do
- test -z "$ac_dir" && ac_dir=.
- if test -f $ac_dir/$ac_word; then
- ac_cv_prog_CC="cl"
- break
- fi
- done
- 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
- ;;
- esac
+amigaos*)
+ if test "$host_cpu" = m68k; then
+ library_names_spec='$libname.ixlibrary $libname.a'
+ # Create ${libname}_ixlibrary.a entries in /sys/libs.
+ finish_eval='for lib in `ls $libdir/*.ixlibrary 2>/dev/null`; do libname=`$ECHO "X$lib" | $Xsed -e '\''s%^.*/\([^/]*\)\.ixlibrary$%\1%'\''`; test $RM /sys/libs/${libname}_ixlibrary.a; $show "cd /sys/libs && $LN_S $lib ${libname}_ixlibrary.a"; cd /sys/libs && $LN_S $lib ${libname}_ixlibrary.a || exit 1; done'
+ else
+ dynamic_linker=no
fi
- test -z "$CC" && { echo "configure: error: no acceptable cc found in \$PATH" 1>&2; exit 1; }
-fi
+ ;;
+
+beos*)
+ library_names_spec='${libname}${shared_ext}'
+ dynamic_linker="$host_os ld.so"
+ shlibpath_var=LIBRARY_PATH
+ ;;
-echo $ac_n "checking whether the C compiler ($CC $CFLAGS $LDFLAGS) works""... $ac_c" 1>&6
-echo "configure:2424: checking whether the C compiler ($CC $CFLAGS $LDFLAGS) works" >&5
+bsdi[45]*)
+ version_type=linux
+ need_version=no
+ library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
+ soname_spec='${libname}${release}${shared_ext}$major'
+ finish_cmds='PATH="\$PATH:/sbin" ldconfig $libdir'
+ shlibpath_var=LD_LIBRARY_PATH
+ sys_lib_search_path_spec="/shlib /usr/lib /usr/X11/lib /usr/contrib/lib /lib /usr/local/lib"
+ sys_lib_dlsearch_path_spec="/shlib /usr/lib /usr/local/lib"
+ # the default ld.so.conf also contains /usr/contrib/lib and
+ # /usr/X11R6/lib (/usr/X11 is a link to /usr/X11R6), but let us allow
+ # libtool to hard-code these into programs
+ ;;
-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${ac_exeext} $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5'
-cross_compiling=$ac_cv_prog_cc_cross
+cygwin* | mingw* | pw32*)
+ version_type=windows
+ shrext_cmds=".dll"
+ need_version=no
+ need_lib_prefix=no
+
+ case $withGCC,$host_os in
+ yes,cygwin* | yes,mingw* | yes,pw32*)
+ library_names_spec='$libname.dll.a'
+ # DLL is installed to $(libdir)/../bin by postinstall_cmds
+ postinstall_cmds='base_file=`basename \${file}`~
+ dlpath=`$SHELL 2>&1 -c '\''. $dir/'\''\${base_file}'\''i; echo \$dlname'\''`~
+ dldir=$destdir/`dirname \$dlpath`~
+ test -d \$dldir || mkdir -p \$dldir~
+ $install_prog $dir/$dlname \$dldir/$dlname~
+ chmod a+x \$dldir/$dlname~
+ if test -n '\''$stripme'\'' && test -n '\''$striplib'\''; then
+ eval '\''$striplib \$dldir/$dlname'\'' || exit \$?;
+ fi'
+ postuninstall_cmds='dldll=`$SHELL 2>&1 -c '\''. $file; echo \$dlname'\''`~
+ dlpath=$dir/\$dldll~
+ $RM \$dlpath'
+ shlibpath_overrides_runpath=yes
+
+ case $host_os in
+ cygwin*)
+ # Cygwin DLLs use 'cyg' prefix rather than 'lib'
+ soname_spec='`echo ${libname} | sed -e 's/^lib/cyg/'``echo ${release} | $SED -e 's/[.]/-/g'`${versuffix}${shared_ext}'
+ sys_lib_search_path_spec="/usr/lib /lib/w32api /lib /usr/local/lib"
+ ;;
+ mingw*)
+ # MinGW DLLs use traditional 'lib' prefix
+ soname_spec='${libname}`echo ${release} | $SED -e 's/[.]/-/g'`${versuffix}${shared_ext}'
+ sys_lib_search_path_spec=`$CC -print-search-dirs | $GREP "^libraries:" | $SED -e "s/^libraries://" -e "s,=/,/,g"`
+ if $ECHO "$sys_lib_search_path_spec" | $GREP ';[c-zC-Z]:/' >/dev/null; then
+ # It is most probably a Windows format PATH printed by
+ # mingw gcc, but we are running on Cygwin. Gcc prints its search
+ # path with ; separators, and with drive letters. We can handle the
+ # drive letters (cygwin fileutils understands them), so leave them,
+ # especially as we might pass files found there to a mingw objdump,
+ # which wouldn't understand a cygwinified path. Ahh.
+ sys_lib_search_path_spec=`$ECHO "$sys_lib_search_path_spec" | $SED -e 's/;/ /g'`
+ else
+ sys_lib_search_path_spec=`$ECHO "$sys_lib_search_path_spec" | $SED -e "s/$PATH_SEPARATOR/ /g"`
+ fi
+ ;;
+ pw32*)
+ # pw32 DLLs use 'pw' prefix rather than 'lib'
+ library_names_spec='`echo ${libname} | sed -e 's/^lib/pw/'``echo ${release} | $SED -e 's/[.]/-/g'`${versuffix}${shared_ext}'
+ ;;
+ esac
+ ;;
-cat > conftest.$ac_ext << EOF
+ *)
+ library_names_spec='${libname}`echo ${release} | $SED -e 's/[.]/-/g'`${versuffix}${shared_ext} $libname.lib'
+ ;;
+ esac
+ dynamic_linker='Win32 ld.exe'
+ # FIXME: first we should search . and the directory the executable is in
+ shlibpath_var=PATH
+ ;;
-#line 2435 "configure"
-#include "confdefs.h"
+darwin* | rhapsody*)
+ dynamic_linker="$host_os dyld"
+ version_type=darwin
+ need_lib_prefix=no
+ need_version=no
+ library_names_spec='${libname}${release}${major}$shared_ext ${libname}$shared_ext'
+ soname_spec='${libname}${release}${major}$shared_ext'
+ shlibpath_overrides_runpath=yes
+ shlibpath_var=DYLD_LIBRARY_PATH
+ shrext_cmds='`test .$module = .yes && echo .so || echo .dylib`'
+
+ sys_lib_search_path_spec="$sys_lib_search_path_spec /usr/local/lib"
+ sys_lib_dlsearch_path_spec='/usr/local/lib /lib /usr/lib'
+ ;;
-main(){return(0);}
-EOF
-if { (eval echo configure:2440: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; 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
+dgux*)
+ version_type=linux
+ need_lib_prefix=no
+ need_version=no
+ library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname$shared_ext'
+ soname_spec='${libname}${release}${shared_ext}$major'
+ shlibpath_var=LD_LIBRARY_PATH
+ ;;
+
+freebsd1*)
+ dynamic_linker=no
+ ;;
+
+freebsd* | dragonfly*)
+ # DragonFly does not have aout. When/if they implement a new
+ # versioning mechanism, adjust this.
+ if test -x /usr/bin/objformat; then
+ objformat=`/usr/bin/objformat`
else
- ac_cv_prog_cc_cross=yes
+ case $host_os in
+ freebsd[123]*) objformat=aout ;;
+ *) objformat=elf ;;
+ esac
fi
-else
- echo "configure: failed program was:" >&5
- cat conftest.$ac_ext >&5
- ac_cv_prog_cc_works=no
-fi
-rm -fr conftest*
-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${ac_exeext} $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5'
-cross_compiling=$ac_cv_prog_cc_cross
-
-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:2466: 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:2471: 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:2480: \"$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
+ version_type=freebsd-$objformat
+ case $version_type in
+ freebsd-elf*)
+ library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext} $libname${shared_ext}'
+ need_version=no
+ need_lib_prefix=no
+ ;;
+ freebsd-*)
+ library_names_spec='${libname}${release}${shared_ext}$versuffix $libname${shared_ext}$versuffix'
+ need_version=yes
+ ;;
+ esac
+ shlibpath_var=LD_LIBRARY_PATH
+ case $host_os in
+ freebsd2*)
+ shlibpath_overrides_runpath=yes
+ ;;
+ freebsd3.[01]* | freebsdelf3.[01]*)
+ shlibpath_overrides_runpath=yes
+ hardcode_into_libs=yes
+ ;;
+ freebsd3.[2-9]* | freebsdelf3.[2-9]* | \
+ freebsd4.[0-5] | freebsdelf4.[0-5] | freebsd4.1.1 | freebsdelf4.1.1)
+ shlibpath_overrides_runpath=no
+ hardcode_into_libs=yes
+ ;;
+ *) # from 4.6 on, and DragonFly
+ shlibpath_overrides_runpath=yes
+ hardcode_into_libs=yes
+ ;;
+ esac
+ ;;
-echo "$ac_t""$ac_cv_prog_gcc" 1>&6
+gnu*)
+ version_type=linux
+ need_lib_prefix=no
+ need_version=no
+ library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}${major} ${libname}${shared_ext}'
+ soname_spec='${libname}${release}${shared_ext}$major'
+ shlibpath_var=LD_LIBRARY_PATH
+ hardcode_into_libs=yes
+ ;;
-if test $ac_cv_prog_gcc = yes; then
- GCC=yes
-else
- GCC=
-fi
+hpux9* | hpux10* | hpux11*)
+ # Give a soname corresponding to the major version so that dld.sl refuses to
+ # link against other versions.
+ version_type=sunos
+ need_lib_prefix=no
+ need_version=no
+ case $host_cpu in
+ ia64*)
+ shrext_cmds='.so'
+ hardcode_into_libs=yes
+ dynamic_linker="$host_os dld.so"
+ shlibpath_var=LD_LIBRARY_PATH
+ shlibpath_overrides_runpath=yes # Unless +noenvvar is specified.
+ library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
+ soname_spec='${libname}${release}${shared_ext}$major'
+ if test "X$HPUX_IA64_MODE" = X32; then
+ sys_lib_search_path_spec="/usr/lib/hpux32 /usr/local/lib/hpux32 /usr/local/lib"
+ else
+ sys_lib_search_path_spec="/usr/lib/hpux64 /usr/local/lib/hpux64"
+ fi
+ sys_lib_dlsearch_path_spec=$sys_lib_search_path_spec
+ ;;
+ hppa*64*)
+ shrext_cmds='.sl'
+ hardcode_into_libs=yes
+ dynamic_linker="$host_os dld.sl"
+ shlibpath_var=LD_LIBRARY_PATH # How should we handle SHLIB_PATH
+ shlibpath_overrides_runpath=yes # Unless +noenvvar is specified.
+ library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
+ soname_spec='${libname}${release}${shared_ext}$major'
+ sys_lib_search_path_spec="/usr/lib/pa20_64 /usr/ccs/lib/pa20_64"
+ sys_lib_dlsearch_path_spec=$sys_lib_search_path_spec
+ ;;
+ *)
+ shrext_cmds='.sl'
+ dynamic_linker="$host_os dld.sl"
+ shlibpath_var=SHLIB_PATH
+ shlibpath_overrides_runpath=no # +s is required to enable SHLIB_PATH
+ library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
+ soname_spec='${libname}${release}${shared_ext}$major'
+ ;;
+ esac
+ # HP-UX runs *really* slowly unless shared libraries are mode 555.
+ postinstall_cmds='chmod 555 $lib'
+ ;;
-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:2499: 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*
+interix[3-9]*)
+ version_type=linux
+ need_lib_prefix=no
+ need_version=no
+ library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major ${libname}${shared_ext}'
+ soname_spec='${libname}${release}${shared_ext}$major'
+ dynamic_linker='Interix 3.x ld.so.1 (PE, like ELF)'
+ shlibpath_var=LD_LIBRARY_PATH
+ shlibpath_overrides_runpath=no
+ hardcode_into_libs=yes
+ ;;
-fi
+irix5* | irix6* | nonstopux*)
+ case $host_os in
+ nonstopux*) version_type=nonstopux ;;
+ *)
+ if test "$lt_cv_prog_gnu_ld" = yes; then
+ version_type=linux
+ else
+ version_type=irix
+ fi ;;
+ esac
+ need_lib_prefix=no
+ need_version=no
+ soname_spec='${libname}${release}${shared_ext}$major'
+ library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major ${libname}${release}${shared_ext} $libname${shared_ext}'
+ case $host_os in
+ irix5* | nonstopux*)
+ libsuff= shlibsuff=
+ ;;
+ *)
+ case $LD in # libtool.m4 will add one of these switches to LD
+ *-32|*"-32 "|*-melf32bsmip|*"-melf32bsmip ")
+ libsuff= shlibsuff= libmagic=32-bit;;
+ *-n32|*"-n32 "|*-melf32bmipn32|*"-melf32bmipn32 ")
+ libsuff=32 shlibsuff=N32 libmagic=N32;;
+ *-64|*"-64 "|*-melf64bmip|*"-melf64bmip ")
+ libsuff=64 shlibsuff=64 libmagic=64-bit;;
+ *) libsuff= shlibsuff= libmagic=never-match;;
+ esac
+ ;;
+ esac
+ shlibpath_var=LD_LIBRARY${shlibsuff}_PATH
+ shlibpath_overrides_runpath=no
+ sys_lib_search_path_spec="/usr/lib${libsuff} /lib${libsuff} /usr/local/lib${libsuff}"
+ sys_lib_dlsearch_path_spec="/usr/lib${libsuff} /lib${libsuff}"
+ hardcode_into_libs=yes
+ ;;
-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
- if test "$GCC" = yes; then
- CFLAGS="-g -O2"
+# No shared lib support for Linux oldld, aout, or coff.
+linux*oldld* | linux*aout* | linux*coff*)
+ dynamic_linker=no
+ ;;
+
+# This must be Linux ELF.
+linux* | k*bsd*-gnu)
+ version_type=linux
+ need_lib_prefix=no
+ need_version=no
+ library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
+ soname_spec='${libname}${release}${shared_ext}$major'
+ finish_cmds='PATH="\$PATH:/sbin" ldconfig -n $libdir'
+ shlibpath_var=LD_LIBRARY_PATH
+ shlibpath_overrides_runpath=no
+ # Some binutils ld are patched to set DT_RUNPATH
+ save_LDFLAGS=$LDFLAGS
+ save_libdir=$libdir
+ eval "libdir=/foo; wl=\"$lt_prog_compiler_wl\"; \
+ LDFLAGS=\"\$LDFLAGS $hardcode_libdir_flag_spec\""
+ cat >conftest.$ac_ext <<_ACEOF
+/* confdefs.h. */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h. */
+
+int
+main ()
+{
+
+ ;
+ return 0;
+}
+_ACEOF
+rm -f conftest.$ac_objext conftest$ac_exeext
+if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
+ (eval $ac_link) 2>conftest.er1
+ ac_status=$?
+ grep -v '^ *+' conftest.er1 >conftest.err
+ rm -f conftest.er1
+ cat conftest.err >&5
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); } &&
+ { ac_try='test -z "$ac_c_werror_flag"
+ || test ! -s conftest.err'
+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+ (eval $ac_try) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); }; } &&
+ { ac_try='test -s conftest$ac_exeext'
+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+ (eval $ac_try) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); }; }; then
+ if ($OBJDUMP -p conftest$ac_exeext) 2>/dev/null | grep "RUNPATH.*$libdir"; then
+ shlibpath_overrides_runpath=yes
+fi
+
+else
+ echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+fi
+rm -f conftest.err conftest.$ac_objext \
+ conftest$ac_exeext conftest.$ac_ext
+ LDFLAGS=$save_LDFLAGS
+ libdir=$save_libdir
+
+ # This implies no fast_install, which is unacceptable.
+ # Some rework will be needed to allow for fast_install
+ # before this can be enabled.
+ hardcode_into_libs=yes
+
+ # Append ld.so.conf contents to the search path
+ if test -f /etc/ld.so.conf; then
+ lt_ld_extra=`awk '/^include / { system(sprintf("cd /etc; cat %s 2>/dev/null", \$2)); skip = 1; } { if (!skip) print \$0; skip = 0; }' < /etc/ld.so.conf | $SED -e 's/#.*//;s/[:, ]/ /g;s/=[^=]*$//;s/=[^= ]* / /g;/^$/d' | tr '\n' ' '`
+ sys_lib_dlsearch_path_spec="/lib /usr/lib $lt_ld_extra"
+ fi
+
+ # We used to test for /lib/ld.so.1 and disable shared libraries on
+ # powerpc, because MkLinux only supported shared libraries with the
+ # GNU dynamic linker. Since this was broken with cross compilers,
+ # most powerpc-linux boxes support dynamic linking these days and
+ # people can always --disable-shared, the test was removed, and we
+ # assume the GNU/Linux dynamic linker is in use.
+ dynamic_linker='GNU/Linux ld.so'
+ ;;
+
+netbsd*)
+ version_type=sunos
+ need_lib_prefix=no
+ need_version=no
+ if echo __ELF__ | $CC -E - | $GREP __ELF__ >/dev/null; then
+ library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${shared_ext}$versuffix'
+ finish_cmds='PATH="\$PATH:/sbin" ldconfig -m $libdir'
+ dynamic_linker='NetBSD (a.out) ld.so'
else
- CFLAGS="-g"
+ library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major ${libname}${shared_ext}'
+ soname_spec='${libname}${release}${shared_ext}$major'
+ dynamic_linker='NetBSD ld.elf_so'
fi
-else
- if test "$GCC" = yes; then
- CFLAGS="-O2"
+ shlibpath_var=LD_LIBRARY_PATH
+ shlibpath_overrides_runpath=yes
+ hardcode_into_libs=yes
+ ;;
+
+newsos6)
+ version_type=linux
+ library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
+ shlibpath_var=LD_LIBRARY_PATH
+ shlibpath_overrides_runpath=yes
+ ;;
+
+*nto* | *qnx*)
+ version_type=qnx
+ need_lib_prefix=no
+ need_version=no
+ library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
+ soname_spec='${libname}${release}${shared_ext}$major'
+ shlibpath_var=LD_LIBRARY_PATH
+ shlibpath_overrides_runpath=no
+ hardcode_into_libs=yes
+ dynamic_linker='ldqnx.so'
+ ;;
+
+openbsd*)
+ version_type=sunos
+ sys_lib_dlsearch_path_spec="/usr/lib"
+ need_lib_prefix=no
+ # Some older versions of OpenBSD (3.3 at least) *do* need versioned libs.
+ case $host_os in
+ openbsd3.3 | openbsd3.3.*) need_version=yes ;;
+ *) need_version=no ;;
+ esac
+ library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${shared_ext}$versuffix'
+ finish_cmds='PATH="\$PATH:/sbin" ldconfig -m $libdir'
+ shlibpath_var=LD_LIBRARY_PATH
+ if test -z "`echo __ELF__ | $CC -E - | $GREP __ELF__`" || test "$host_os-$host_cpu" = "openbsd2.8-powerpc"; then
+ case $host_os in
+ openbsd2.[89] | openbsd2.[89].*)
+ shlibpath_overrides_runpath=no
+ ;;
+ *)
+ shlibpath_overrides_runpath=yes
+ ;;
+ esac
else
- CFLAGS=
+ shlibpath_overrides_runpath=yes
fi
-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
-# 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:2542: 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=":"
- 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
+os2*)
+ libname_spec='$name'
+ shrext_cmds=".dll"
+ need_lib_prefix=no
+ library_names_spec='$libname${shared_ext} $libname.a'
+ dynamic_linker='OS/2 ld.exe'
+ shlibpath_var=LIBPATH
+ ;;
+
+osf3* | osf4* | osf5*)
+ version_type=osf
+ need_lib_prefix=no
+ need_version=no
+ soname_spec='${libname}${release}${shared_ext}$major'
+ library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
+ shlibpath_var=LD_LIBRARY_PATH
+ sys_lib_search_path_spec="/usr/shlib /usr/ccs/lib /usr/lib/cmplrs/cc /usr/lib /usr/local/lib /var/shlib"
+ sys_lib_dlsearch_path_spec="$sys_lib_search_path_spec"
+ ;;
+
+rdos*)
+ dynamic_linker=no
+ ;;
+
+solaris*)
+ version_type=linux
+ need_lib_prefix=no
+ need_version=no
+ library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
+ soname_spec='${libname}${release}${shared_ext}$major'
+ shlibpath_var=LD_LIBRARY_PATH
+ shlibpath_overrides_runpath=yes
+ hardcode_into_libs=yes
+ # ldd complains unless libraries are executable
+ postinstall_cmds='chmod +x $lib'
+ ;;
+
+sunos4*)
+ version_type=sunos
+ library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${shared_ext}$versuffix'
+ finish_cmds='PATH="\$PATH:/usr/etc" ldconfig $libdir'
+ shlibpath_var=LD_LIBRARY_PATH
+ shlibpath_overrides_runpath=yes
+ if test "$with_gnu_ld" = yes; then
+ need_lib_prefix=no
+ fi
+ need_version=yes
+ ;;
+
+sysv4 | sysv4.3*)
+ version_type=linux
+ library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
+ soname_spec='${libname}${release}${shared_ext}$major'
+ shlibpath_var=LD_LIBRARY_PATH
+ case $host_vendor in
+ sni)
+ shlibpath_overrides_runpath=no
+ need_lib_prefix=no
+ runpath_var=LD_RUN_PATH
;;
- esac
- done
- IFS="$ac_save_IFS"
+ siemens)
+ need_lib_prefix=no
+ ;;
+ motorola)
+ need_lib_prefix=no
+ need_version=no
+ shlibpath_overrides_runpath=no
+ sys_lib_search_path_spec='/lib /usr/lib /usr/ccs/lib'
+ ;;
+ esac
+ ;;
-fi
- if test "${ac_cv_path_install+set}" = set; then
- INSTALL="$ac_cv_path_install"
+sysv4*MP*)
+ if test -d /usr/nec ;then
+ version_type=linux
+ library_names_spec='$libname${shared_ext}.$versuffix $libname${shared_ext}.$major $libname${shared_ext}'
+ soname_spec='$libname${shared_ext}.$major'
+ shlibpath_var=LD_LIBRARY_PATH
+ fi
+ ;;
+
+sysv5* | sco3.2v5* | sco5v6* | unixware* | OpenUNIX* | sysv4*uw2*)
+ version_type=freebsd-elf
+ need_lib_prefix=no
+ need_version=no
+ library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext} $libname${shared_ext}'
+ soname_spec='${libname}${release}${shared_ext}$major'
+ shlibpath_var=LD_LIBRARY_PATH
+ shlibpath_overrides_runpath=yes
+ hardcode_into_libs=yes
+ if test "$with_gnu_ld" = yes; then
+ sys_lib_search_path_spec='/usr/local/lib /usr/gnu/lib /usr/ccs/lib /usr/lib /lib'
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"
+ sys_lib_search_path_spec='/usr/ccs/lib /usr/lib'
+ case $host_os in
+ sco3.2v5*)
+ sys_lib_search_path_spec="$sys_lib_search_path_spec /lib"
+ ;;
+ esac
fi
+ sys_lib_dlsearch_path_spec='/usr/lib'
+ ;;
+
+tpf*)
+ # TPF is a cross-target only. Preferred cross-host = GNU/Linux.
+ version_type=linux
+ need_lib_prefix=no
+ need_version=no
+ library_name_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
+ shlibpath_var=LD_LIBRARY_PATH
+ shlibpath_overrides_runpath=no
+ hardcode_into_libs=yes
+ ;;
+
+uts4*)
+ version_type=linux
+ library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
+ soname_spec='${libname}${release}${shared_ext}$major'
+ shlibpath_var=LD_LIBRARY_PATH
+ ;;
+
+*)
+ dynamic_linker=no
+ ;;
+esac
+echo "$as_me:$LINENO: result: $dynamic_linker" >&5
+echo "${ECHO_T}$dynamic_linker" >&6
+test "$dynamic_linker" = no && can_build_shared=no
+
+variables_saved_for_relink="PATH $shlibpath_var $runpath_var"
+if test "$GCC" = yes; then
+ variables_saved_for_relink="$variables_saved_for_relink GCC_EXEC_PREFIX COMPILER_PATH LIBRARY_PATH"
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_SCRIPT" && INSTALL_SCRIPT='${INSTALL_PROGRAM}'
-test -z "$INSTALL_DATA" && INSTALL_DATA='${INSTALL} -m 644'
-ALL_LINGUAS="fr sv tr es da"
-echo $ac_n "checking how to run the C preprocessor""... $ac_c" 1>&6
-echo "configure:2597: checking how to run the C preprocessor" >&5
-# On Suns, sometimes $CPP names a directory.
-if test -n "$CPP" && test -d "$CPP"; then
- CPP=
-fi
-if test -z "$CPP"; then
-if eval "test \"`echo '$''{'ac_cv_prog_CPP'+set}'`\" = set"; then
- echo $ac_n "(cached) $ac_c" 1>&6
-else
- # This must be in double quotes, not single quotes, because CPP may get
- # substituted into the Makefile and "${CC-cc}" will confuse make.
- CPP="${CC-cc} -E"
- # On the NeXT, cc -E runs the code through the compiler's parser,
- # not just through cpp.
- cat > conftest.$ac_ext <<EOF
-#line 2612 "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:2618: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
-ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
-if test -z "$ac_err"; then
- :
-else
- echo "$ac_err" >&5
- echo "configure: failed program was:" >&5
- cat conftest.$ac_ext >&5
- rm -rf conftest*
- CPP="${CC-cc} -E -traditional-cpp"
- cat > conftest.$ac_ext <<EOF
-#line 2629 "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:2635: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
-ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
-if test -z "$ac_err"; then
- :
-else
- echo "$ac_err" >&5
- echo "configure: failed program was:" >&5
- cat conftest.$ac_ext >&5
- rm -rf conftest*
- CPP="${CC-cc} -nologo -E"
- cat > conftest.$ac_ext <<EOF
-#line 2646 "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:2652: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
-ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
-if test -z "$ac_err"; then
- :
-else
- echo "$ac_err" >&5
- echo "configure: failed program was:" >&5
- cat conftest.$ac_ext >&5
- rm -rf conftest*
- CPP=/lib/cpp
-fi
-rm -f conftest*
-fi
-rm -f conftest*
-fi
-rm -f conftest*
- ac_cv_prog_CPP="$CPP"
-fi
- CPP="$ac_cv_prog_CPP"
-else
- ac_cv_prog_CPP="$CPP"
-fi
-echo "$ac_t""$CPP" 1>&6
-# 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:2679: 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=":"
- ac_dummy="$PATH"
- for ac_dir in $ac_dummy; 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
-echo $ac_n "checking for ANSI C header files""... $ac_c" 1>&6
-echo "configure:2707: checking for ANSI C header files" >&5
-if eval "test \"`echo '$''{'ac_cv_header_stdc'+set}'`\" = set"; then
- echo $ac_n "(cached) $ac_c" 1>&6
-else
- cat > conftest.$ac_ext <<EOF
-#line 2712 "configure"
-#include "confdefs.h"
-#include <stdlib.h>
-#include <stdarg.h>
-#include <string.h>
-#include <float.h>
-EOF
-ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
-{ (eval echo configure:2720: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
-ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
-if test -z "$ac_err"; then
- rm -rf conftest*
- ac_cv_header_stdc=yes
-else
- echo "$ac_err" >&5
- echo "configure: failed program was:" >&5
- cat conftest.$ac_ext >&5
- rm -rf conftest*
- ac_cv_header_stdc=no
-fi
-rm -f conftest*
-if test $ac_cv_header_stdc = yes; then
- # SunOS 4.x string.h does not declare mem*, contrary to ANSI.
-cat > conftest.$ac_ext <<EOF
-#line 2737 "configure"
-#include "confdefs.h"
-#include <string.h>
-EOF
-if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
- egrep "memchr" >/dev/null 2>&1; then
- :
-else
- rm -rf conftest*
- ac_cv_header_stdc=no
-fi
-rm -f conftest*
-fi
-if test $ac_cv_header_stdc = yes; then
- # ISC 2.0.2 stdlib.h does not declare free, contrary to ANSI.
-cat > conftest.$ac_ext <<EOF
-#line 2755 "configure"
-#include "confdefs.h"
-#include <stdlib.h>
-EOF
-if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
- egrep "free" >/dev/null 2>&1; then
- :
-else
- rm -rf conftest*
- ac_cv_header_stdc=no
-fi
-rm -f conftest*
-fi
-if test $ac_cv_header_stdc = yes; then
- # /bin/cc in Irix-4.0.5 gets non-ANSI ctype macros unless using -ansi.
-if test "$cross_compiling" = yes; then
- :
-else
- cat > conftest.$ac_ext <<EOF
-#line 2776 "configure"
-#include "confdefs.h"
-#include <ctype.h>
-#define ISLOWER(c) ('a' <= (c) && (c) <= 'z')
-#define TOUPPER(c) (ISLOWER(c) ? 'A' + ((c) - 'a') : (c))
-#define XOR(e, f) (((e) && !(f)) || (!(e) && (f)))
-int main () { int i; for (i = 0; i < 256; i++)
-if (XOR (islower (i), ISLOWER (i)) || toupper (i) != TOUPPER (i)) exit(2);
-exit (0); }
-EOF
-if { (eval echo configure:2787: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
-then
- :
-else
- echo "configure: failed program was:" >&5
- cat conftest.$ac_ext >&5
- rm -fr conftest*
- ac_cv_header_stdc=no
-fi
-rm -fr conftest*
-fi
-fi
-fi
-echo "$ac_t""$ac_cv_header_stdc" 1>&6
-if test $ac_cv_header_stdc = yes; then
- cat >> confdefs.h <<\EOF
-#define STDC_HEADERS 1
-EOF
-fi
-echo $ac_n "checking for working const""... $ac_c" 1>&6
-echo "configure:2811: checking for working const" >&5
-if eval "test \"`echo '$''{'ac_cv_c_const'+set}'`\" = set"; then
- echo $ac_n "(cached) $ac_c" 1>&6
-else
- cat > conftest.$ac_ext <<EOF
-#line 2816 "configure"
-#include "confdefs.h"
-int main() {
-
-/* Ultrix mips cc rejects this. */
-typedef int charset[2]; const charset x;
-/* SunOS 4.1.1 cc rejects this. */
-char const *const *ccp;
-char **p;
-/* NEC SVR4.0.2 mips cc rejects this. */
-struct point {int x, y;};
-static struct point const zero = {0,0};
-/* AIX XL C 1.02.0.0 rejects this.
- It does not let you subtract one const X* pointer from another in an arm
- of an if-expression whose if-part is not a constant expression */
-const char *g = "string";
-ccp = &g + (g ? g-g : 0);
-/* HPUX 7.0 cc rejects these. */
-++ccp;
-p = (char**) ccp;
-ccp = (char const *const *) p;
-{ /* SCO 3.2v4 cc rejects this. */
- char *t;
- char const *s = 0 ? (char *) 0 : (char const *) 0;
-
- *t++ = 0;
-}
-{ /* Someone thinks the Sun supposedly-ANSI compiler will reject this. */
- int x[] = {25, 17};
- const int *foo = &x[0];
- ++foo;
-}
-{ /* Sun SC1.0 ANSI compiler rejects this -- but not the above. */
- typedef const int *iptr;
- iptr p = 0;
- ++p;
-}
-{ /* AIX XL C 1.02.0.0 rejects this saying
- "k.c", line 2.27: 1506-025 (S) Operand must be a modifiable lvalue. */
- struct s { int j; const int *ap[3]; };
- struct s *b; b->j = 5;
-}
-{ /* ULTRIX-32 V3.1 (Rev 9) vcc rejects this */
- const int foo = 10;
-}
-; return 0; }
-EOF
-if { (eval echo configure:2865: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
- rm -rf conftest*
- ac_cv_c_const=yes
-else
- echo "configure: failed program was:" >&5
- cat conftest.$ac_ext >&5
- rm -rf conftest*
- ac_cv_c_const=no
-fi
-rm -f conftest*
-fi
-echo "$ac_t""$ac_cv_c_const" 1>&6
-if test $ac_cv_c_const = no; then
- cat >> confdefs.h <<\EOF
-#define const
-EOF
-fi
-echo $ac_n "checking for inline""... $ac_c" 1>&6
-echo "configure:2886: checking for inline" >&5
-if eval "test \"`echo '$''{'ac_cv_c_inline'+set}'`\" = set"; then
- echo $ac_n "(cached) $ac_c" 1>&6
-else
- ac_cv_c_inline=no
-for ac_kw in inline __inline__ __inline; do
- cat > conftest.$ac_ext <<EOF
-#line 2893 "configure"
-#include "confdefs.h"
-int main() {
-} $ac_kw foo() {
-; return 0; }
-EOF
-if { (eval echo configure:2900: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
- rm -rf conftest*
- ac_cv_c_inline=$ac_kw; break
-else
- echo "configure: failed program was:" >&5
- cat conftest.$ac_ext >&5
-fi
-rm -f conftest*
-done
-fi
-echo "$ac_t""$ac_cv_c_inline" 1>&6
-case "$ac_cv_c_inline" in
- inline | yes) ;;
- no) cat >> confdefs.h <<\EOF
-#define inline
-EOF
- ;;
- *) cat >> confdefs.h <<EOF
-#define inline $ac_cv_c_inline
-EOF
- ;;
-esac
-echo $ac_n "checking for off_t""... $ac_c" 1>&6
-echo "configure:2926: checking for off_t" >&5
-if eval "test \"`echo '$''{'ac_cv_type_off_t'+set}'`\" = set"; then
- echo $ac_n "(cached) $ac_c" 1>&6
-else
- cat > conftest.$ac_ext <<EOF
-#line 2931 "configure"
-#include "confdefs.h"
-#include <sys/types.h>
-#if STDC_HEADERS
-#include <stdlib.h>
-#include <stddef.h>
-#endif
-EOF
-if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
- egrep "(^|[^a-zA-Z_0-9])off_t[^a-zA-Z_0-9]" >/dev/null 2>&1; then
- rm -rf conftest*
- ac_cv_type_off_t=yes
-else
- rm -rf conftest*
- ac_cv_type_off_t=no
-fi
-rm -f conftest*
-fi
-echo "$ac_t""$ac_cv_type_off_t" 1>&6
-if test $ac_cv_type_off_t = no; then
- cat >> confdefs.h <<\EOF
-#define off_t long
-EOF
-fi
-echo $ac_n "checking for size_t""... $ac_c" 1>&6
-echo "configure:2959: checking for size_t" >&5
-if eval "test \"`echo '$''{'ac_cv_type_size_t'+set}'`\" = set"; then
- echo $ac_n "(cached) $ac_c" 1>&6
-else
- cat > conftest.$ac_ext <<EOF
-#line 2964 "configure"
-#include "confdefs.h"
-#include <sys/types.h>
-#if STDC_HEADERS
-#include <stdlib.h>
-#include <stddef.h>
-#endif
-EOF
-if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
- egrep "(^|[^a-zA-Z_0-9])size_t[^a-zA-Z_0-9]" >/dev/null 2>&1; then
- rm -rf conftest*
- ac_cv_type_size_t=yes
-else
- rm -rf conftest*
- ac_cv_type_size_t=no
-fi
-rm -f conftest*
-fi
-echo "$ac_t""$ac_cv_type_size_t" 1>&6
-if test $ac_cv_type_size_t = no; then
- cat >> confdefs.h <<\EOF
-#define size_t unsigned
-EOF
-fi
-# The Ultrix 4.2 mips builtin alloca declared by alloca.h only works
-# for constant arguments. Useless!
-echo $ac_n "checking for working alloca.h""... $ac_c" 1>&6
-echo "configure:2994: checking for working alloca.h" >&5
-if eval "test \"`echo '$''{'ac_cv_header_alloca_h'+set}'`\" = set"; then
- echo $ac_n "(cached) $ac_c" 1>&6
-else
- cat > conftest.$ac_ext <<EOF
-#line 2999 "configure"
-#include "confdefs.h"
-#include <alloca.h>
-int main() {
-char *p = alloca(2 * sizeof(int));
-; return 0; }
-EOF
-if { (eval echo configure:3006: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
- rm -rf conftest*
- ac_cv_header_alloca_h=yes
-else
- echo "configure: failed program was:" >&5
- cat conftest.$ac_ext >&5
- rm -rf conftest*
- ac_cv_header_alloca_h=no
-fi
-rm -f conftest*
-fi
-echo "$ac_t""$ac_cv_header_alloca_h" 1>&6
-if test $ac_cv_header_alloca_h = yes; then
- cat >> confdefs.h <<\EOF
-#define HAVE_ALLOCA_H 1
-EOF
-fi
-echo $ac_n "checking for alloca""... $ac_c" 1>&6
-echo "configure:3027: checking for alloca" >&5
-if eval "test \"`echo '$''{'ac_cv_func_alloca_works'+set}'`\" = set"; then
- echo $ac_n "(cached) $ac_c" 1>&6
-else
- cat > conftest.$ac_ext <<EOF
-#line 3032 "configure"
-#include "confdefs.h"
-#ifdef __GNUC__
-# define alloca __builtin_alloca
-#else
-# ifdef _MSC_VER
-# include <malloc.h>
-# define alloca _alloca
-# else
-# if HAVE_ALLOCA_H
-# include <alloca.h>
-# else
-# ifdef _AIX
- #pragma alloca
-# else
-# ifndef alloca /* predefined by HP cc +Olibcalls */
-char *alloca ();
-# endif
-# endif
-# endif
-# endif
-#endif
-int main() {
-char *p = (char *) alloca(1);
-; return 0; }
-EOF
-if { (eval echo configure:3060: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
- rm -rf conftest*
- ac_cv_func_alloca_works=yes
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ echo "$as_me:$LINENO: checking how to hardcode library paths into programs" >&5
+echo $ECHO_N "checking how to hardcode library paths into programs... $ECHO_C" >&6
+hardcode_action=
+if test -n "$hardcode_libdir_flag_spec" ||
+ test -n "$runpath_var" ||
+ test "X$hardcode_automatic" = "Xyes" ; then
+
+ # We can hardcode non-existent directories.
+ if test "$hardcode_direct" != no &&
+ # If the only mechanism to avoid hardcoding is shlibpath_var, we
+ # have to relink, otherwise we might link with an installed library
+ # when we should be linking with a yet-to-be-installed one
+ ## test "$_LT_TAGVAR(hardcode_shlibpath_var, )" != no &&
+ test "$hardcode_minus_L" != no; then
+ # Linking always hardcodes the temporary library directory.
+ hardcode_action=relink
+ else
+ # We can link without hardcoding, and we can hardcode nonexisting dirs.
+ hardcode_action=immediate
+ fi
else
- echo "configure: failed program was:" >&5
- cat conftest.$ac_ext >&5
- rm -rf conftest*
- ac_cv_func_alloca_works=no
+ # We cannot hardcode anything, or else we can only hardcode existing
+ # directories.
+ hardcode_action=unsupported
fi
-rm -f conftest*
+echo "$as_me:$LINENO: result: $hardcode_action" >&5
+echo "${ECHO_T}$hardcode_action" >&6
+
+if test "$hardcode_action" = relink ||
+ test "$inherit_rpath" = yes; then
+ # Fast installation is not supported
+ enable_fast_install=no
+elif test "$shlibpath_overrides_runpath" = yes ||
+ test "$enable_shared" = no; then
+ # Fast installation is not necessary
+ enable_fast_install=needless
fi
-echo "$ac_t""$ac_cv_func_alloca_works" 1>&6
-if test $ac_cv_func_alloca_works = yes; then
- cat >> confdefs.h <<\EOF
-#define HAVE_ALLOCA 1
-EOF
-fi
-if test $ac_cv_func_alloca_works = no; then
- # The SVR3 libPW and SVR4 libucb both contain incompatible functions
- # that cause trouble. Some versions do not even contain alloca or
- # contain a buggy version. If you still want to use their alloca,
- # use ar to extract alloca.o from them instead of compiling alloca.c.
- ALLOCA=alloca.${ac_objext}
- cat >> confdefs.h <<\EOF
-#define C_ALLOCA 1
-EOF
-echo $ac_n "checking whether alloca needs Cray hooks""... $ac_c" 1>&6
-echo "configure:3092: checking whether alloca needs Cray hooks" >&5
-if eval "test \"`echo '$''{'ac_cv_os_cray'+set}'`\" = set"; then
- echo $ac_n "(cached) $ac_c" 1>&6
+
+ if test "x$enable_dlopen" != xyes; then
+ enable_dlopen=unknown
+ enable_dlopen_self=unknown
+ enable_dlopen_self_static=unknown
else
- cat > conftest.$ac_ext <<EOF
-#line 3097 "configure"
-#include "confdefs.h"
-#if defined(CRAY) && ! defined(CRAY2)
-webecray
-#else
-wenotbecray
+ lt_cv_dlopen=no
+ lt_cv_dlopen_libs=
+
+ case $host_os in
+ beos*)
+ lt_cv_dlopen="load_add_on"
+ lt_cv_dlopen_libs=
+ lt_cv_dlopen_self=yes
+ ;;
+
+ mingw* | pw32*)
+ lt_cv_dlopen="LoadLibrary"
+ lt_cv_dlopen_libs=
+ ;;
+
+ cygwin*)
+ lt_cv_dlopen="dlopen"
+ lt_cv_dlopen_libs=
+ ;;
+
+ darwin*)
+ # if libdl is installed we need to link against it
+ echo "$as_me:$LINENO: checking for dlopen in -ldl" >&5
+echo $ECHO_N "checking for dlopen in -ldl... $ECHO_C" >&6
+if test "${ac_cv_lib_dl_dlopen+set}" = set; then
+ echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+ ac_check_lib_save_LIBS=$LIBS
+LIBS="-ldl $LIBS"
+cat >conftest.$ac_ext <<_ACEOF
+/* confdefs.h. */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h. */
+
+/* Override any gcc2 internal prototype to avoid an error. */
+#ifdef __cplusplus
+extern "C"
#endif
+/* We use char because int might match the return type of a gcc2
+ builtin and then its argument prototype would still apply. */
+char dlopen ();
+int
+main ()
+{
+dlopen ();
+ ;
+ return 0;
+}
+_ACEOF
+rm -f conftest.$ac_objext conftest$ac_exeext
+if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
+ (eval $ac_link) 2>conftest.er1
+ ac_status=$?
+ grep -v '^ *+' conftest.er1 >conftest.err
+ rm -f conftest.er1
+ cat conftest.err >&5
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); } &&
+ { ac_try='test -z "$ac_c_werror_flag"
+ || test ! -s conftest.err'
+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+ (eval $ac_try) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); }; } &&
+ { ac_try='test -s conftest$ac_exeext'
+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+ (eval $ac_try) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); }; }; then
+ ac_cv_lib_dl_dlopen=yes
+else
+ echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+ac_cv_lib_dl_dlopen=no
+fi
+rm -f conftest.err conftest.$ac_objext \
+ conftest$ac_exeext conftest.$ac_ext
+LIBS=$ac_check_lib_save_LIBS
+fi
+echo "$as_me:$LINENO: result: $ac_cv_lib_dl_dlopen" >&5
+echo "${ECHO_T}$ac_cv_lib_dl_dlopen" >&6
+if test $ac_cv_lib_dl_dlopen = yes; then
+ lt_cv_dlopen="dlopen" lt_cv_dlopen_libs="-ldl"
+else
+
+ lt_cv_dlopen="dyld"
+ lt_cv_dlopen_libs=
+ lt_cv_dlopen_self=yes
-EOF
-if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
- egrep "webecray" >/dev/null 2>&1; then
- rm -rf conftest*
- ac_cv_os_cray=yes
-else
- rm -rf conftest*
- ac_cv_os_cray=no
fi
-rm -f conftest*
-fi
+ ;;
+
+ *)
+ echo "$as_me:$LINENO: checking for shl_load" >&5
+echo $ECHO_N "checking for shl_load... $ECHO_C" >&6
+if test "${ac_cv_func_shl_load+set}" = set; then
+ echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+ cat >conftest.$ac_ext <<_ACEOF
+/* confdefs.h. */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h. */
+/* Define shl_load to an innocuous variant, in case <limits.h> declares shl_load.
+ For example, HP-UX 11i <limits.h> declares gettimeofday. */
+#define shl_load innocuous_shl_load
-echo "$ac_t""$ac_cv_os_cray" 1>&6
-if test $ac_cv_os_cray = yes; then
-for ac_func in _getb67 GETB67 getb67; do
- echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
-echo "configure:3122: 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 3127 "configure"
-#include "confdefs.h"
/* System header to define __stub macros and hopefully few prototypes,
- which can conflict with char $ac_func(); below. */
-#include <assert.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 $ac_func();
+ which can conflict with char shl_load (); below.
+ Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
+ <limits.h> exists even on freestanding compilers. */
+
+#ifdef __STDC__
+# include <limits.h>
+#else
+# include <assert.h>
+#endif
-int main() {
+#undef shl_load
+/* Override any gcc2 internal prototype to avoid an error. */
+#ifdef __cplusplus
+extern "C"
+{
+#endif
+/* We use char because int might match the return type of a gcc2
+ builtin and then its argument prototype would still apply. */
+char shl_load ();
/* The GNU C library defines this for functions which it implements
to always fail with ENOSYS. Some functions are actually named
something starting with __ and the normal name is an alias. */
-#if defined (__stub_$ac_func) || defined (__stub___$ac_func)
+#if defined (__stub_shl_load) || defined (__stub___shl_load)
choke me
#else
-$ac_func();
+char (*f) () = shl_load;
+#endif
+#ifdef __cplusplus
+}
#endif
-; return 0; }
-EOF
-if { (eval echo configure:3150: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
- rm -rf conftest*
- eval "ac_cv_func_$ac_func=yes"
-else
- echo "configure: failed program was:" >&5
- cat conftest.$ac_ext >&5
- rm -rf conftest*
- eval "ac_cv_func_$ac_func=no"
-fi
-rm -f conftest*
-fi
+int
+main ()
+{
+return f != shl_load;
+ ;
+ return 0;
+}
+_ACEOF
+rm -f conftest.$ac_objext conftest$ac_exeext
+if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
+ (eval $ac_link) 2>conftest.er1
+ ac_status=$?
+ grep -v '^ *+' conftest.er1 >conftest.err
+ rm -f conftest.er1
+ cat conftest.err >&5
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); } &&
+ { ac_try='test -z "$ac_c_werror_flag"
+ || test ! -s conftest.err'
+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+ (eval $ac_try) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); }; } &&
+ { ac_try='test -s conftest$ac_exeext'
+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+ (eval $ac_try) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); }; }; then
+ ac_cv_func_shl_load=yes
+else
+ echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+ac_cv_func_shl_load=no
+fi
+rm -f conftest.err conftest.$ac_objext \
+ conftest$ac_exeext conftest.$ac_ext
+fi
+echo "$as_me:$LINENO: result: $ac_cv_func_shl_load" >&5
+echo "${ECHO_T}$ac_cv_func_shl_load" >&6
+if test $ac_cv_func_shl_load = yes; then
+ lt_cv_dlopen="shl_load"
+else
+ echo "$as_me:$LINENO: checking for shl_load in -ldld" >&5
+echo $ECHO_N "checking for shl_load in -ldld... $ECHO_C" >&6
+if test "${ac_cv_lib_dld_shl_load+set}" = set; then
+ echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+ ac_check_lib_save_LIBS=$LIBS
+LIBS="-ldld $LIBS"
+cat >conftest.$ac_ext <<_ACEOF
+/* confdefs.h. */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h. */
+
+/* Override any gcc2 internal prototype to avoid an error. */
+#ifdef __cplusplus
+extern "C"
+#endif
+/* We use char because int might match the return type of a gcc2
+ builtin and then its argument prototype would still apply. */
+char shl_load ();
+int
+main ()
+{
+shl_load ();
+ ;
+ return 0;
+}
+_ACEOF
+rm -f conftest.$ac_objext conftest$ac_exeext
+if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
+ (eval $ac_link) 2>conftest.er1
+ ac_status=$?
+ grep -v '^ *+' conftest.er1 >conftest.err
+ rm -f conftest.er1
+ cat conftest.err >&5
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); } &&
+ { ac_try='test -z "$ac_c_werror_flag"
+ || test ! -s conftest.err'
+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+ (eval $ac_try) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); }; } &&
+ { ac_try='test -s conftest$ac_exeext'
+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+ (eval $ac_try) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); }; }; then
+ ac_cv_lib_dld_shl_load=yes
+else
+ echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+ac_cv_lib_dld_shl_load=no
+fi
+rm -f conftest.err conftest.$ac_objext \
+ conftest$ac_exeext conftest.$ac_ext
+LIBS=$ac_check_lib_save_LIBS
+fi
+echo "$as_me:$LINENO: result: $ac_cv_lib_dld_shl_load" >&5
+echo "${ECHO_T}$ac_cv_lib_dld_shl_load" >&6
+if test $ac_cv_lib_dld_shl_load = yes; then
+ lt_cv_dlopen="shl_load" lt_cv_dlopen_libs="-dld"
+else
+ echo "$as_me:$LINENO: checking for dlopen" >&5
+echo $ECHO_N "checking for dlopen... $ECHO_C" >&6
+if test "${ac_cv_func_dlopen+set}" = set; then
+ echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+ cat >conftest.$ac_ext <<_ACEOF
+/* confdefs.h. */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h. */
+/* Define dlopen to an innocuous variant, in case <limits.h> declares dlopen.
+ For example, HP-UX 11i <limits.h> declares gettimeofday. */
+#define dlopen innocuous_dlopen
-if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
- echo "$ac_t""yes" 1>&6
- cat >> confdefs.h <<EOF
-#define CRAY_STACKSEG_END $ac_func
-EOF
+/* System header to define __stub macros and hopefully few prototypes,
+ which can conflict with char dlopen (); below.
+ Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
+ <limits.h> exists even on freestanding compilers. */
- break
-else
- echo "$ac_t""no" 1>&6
-fi
+#ifdef __STDC__
+# include <limits.h>
+#else
+# include <assert.h>
+#endif
-done
-fi
+#undef dlopen
-echo $ac_n "checking stack direction for C alloca""... $ac_c" 1>&6
-echo "configure:3177: checking stack direction for C alloca" >&5
-if eval "test \"`echo '$''{'ac_cv_c_stack_direction'+set}'`\" = set"; then
- echo $ac_n "(cached) $ac_c" 1>&6
-else
- if test "$cross_compiling" = yes; then
- ac_cv_c_stack_direction=0
-else
- cat > conftest.$ac_ext <<EOF
-#line 3185 "configure"
-#include "confdefs.h"
-find_stack_direction ()
+/* Override any gcc2 internal prototype to avoid an error. */
+#ifdef __cplusplus
+extern "C"
{
- static char *addr = 0;
- auto char dummy;
- if (addr == 0)
- {
- addr = &dummy;
- return find_stack_direction ();
- }
- else
- return (&dummy > addr) ? 1 : -1;
+#endif
+/* We use char because int might match the return type of a gcc2
+ builtin and then its argument prototype would still apply. */
+char dlopen ();
+/* The GNU C library defines this for functions which it implements
+ to always fail with ENOSYS. Some functions are actually named
+ something starting with __ and the normal name is an alias. */
+#if defined (__stub_dlopen) || defined (__stub___dlopen)
+choke me
+#else
+char (*f) () = dlopen;
+#endif
+#ifdef __cplusplus
}
+#endif
+
+int
main ()
{
- exit (find_stack_direction() < 0);
+return f != dlopen;
+ ;
+ return 0;
}
-EOF
-if { (eval echo configure:3204: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
-then
- ac_cv_c_stack_direction=1
+_ACEOF
+rm -f conftest.$ac_objext conftest$ac_exeext
+if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
+ (eval $ac_link) 2>conftest.er1
+ ac_status=$?
+ grep -v '^ *+' conftest.er1 >conftest.err
+ rm -f conftest.er1
+ cat conftest.err >&5
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); } &&
+ { ac_try='test -z "$ac_c_werror_flag"
+ || test ! -s conftest.err'
+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+ (eval $ac_try) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); }; } &&
+ { ac_try='test -s conftest$ac_exeext'
+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+ (eval $ac_try) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); }; }; then
+ ac_cv_func_dlopen=yes
+else
+ echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+ac_cv_func_dlopen=no
+fi
+rm -f conftest.err conftest.$ac_objext \
+ conftest$ac_exeext conftest.$ac_ext
+fi
+echo "$as_me:$LINENO: result: $ac_cv_func_dlopen" >&5
+echo "${ECHO_T}$ac_cv_func_dlopen" >&6
+if test $ac_cv_func_dlopen = yes; then
+ lt_cv_dlopen="dlopen"
+else
+ echo "$as_me:$LINENO: checking for dlopen in -ldl" >&5
+echo $ECHO_N "checking for dlopen in -ldl... $ECHO_C" >&6
+if test "${ac_cv_lib_dl_dlopen+set}" = set; then
+ echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+ ac_check_lib_save_LIBS=$LIBS
+LIBS="-ldl $LIBS"
+cat >conftest.$ac_ext <<_ACEOF
+/* confdefs.h. */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h. */
+
+/* Override any gcc2 internal prototype to avoid an error. */
+#ifdef __cplusplus
+extern "C"
+#endif
+/* We use char because int might match the return type of a gcc2
+ builtin and then its argument prototype would still apply. */
+char dlopen ();
+int
+main ()
+{
+dlopen ();
+ ;
+ return 0;
+}
+_ACEOF
+rm -f conftest.$ac_objext conftest$ac_exeext
+if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
+ (eval $ac_link) 2>conftest.er1
+ ac_status=$?
+ grep -v '^ *+' conftest.er1 >conftest.err
+ rm -f conftest.er1
+ cat conftest.err >&5
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); } &&
+ { ac_try='test -z "$ac_c_werror_flag"
+ || test ! -s conftest.err'
+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+ (eval $ac_try) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); }; } &&
+ { ac_try='test -s conftest$ac_exeext'
+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+ (eval $ac_try) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); }; }; then
+ ac_cv_lib_dl_dlopen=yes
+else
+ echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+ac_cv_lib_dl_dlopen=no
+fi
+rm -f conftest.err conftest.$ac_objext \
+ conftest$ac_exeext conftest.$ac_ext
+LIBS=$ac_check_lib_save_LIBS
+fi
+echo "$as_me:$LINENO: result: $ac_cv_lib_dl_dlopen" >&5
+echo "${ECHO_T}$ac_cv_lib_dl_dlopen" >&6
+if test $ac_cv_lib_dl_dlopen = yes; then
+ lt_cv_dlopen="dlopen" lt_cv_dlopen_libs="-ldl"
+else
+ echo "$as_me:$LINENO: checking for dlopen in -lsvld" >&5
+echo $ECHO_N "checking for dlopen in -lsvld... $ECHO_C" >&6
+if test "${ac_cv_lib_svld_dlopen+set}" = set; then
+ echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+ ac_check_lib_save_LIBS=$LIBS
+LIBS="-lsvld $LIBS"
+cat >conftest.$ac_ext <<_ACEOF
+/* confdefs.h. */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h. */
+
+/* Override any gcc2 internal prototype to avoid an error. */
+#ifdef __cplusplus
+extern "C"
+#endif
+/* We use char because int might match the return type of a gcc2
+ builtin and then its argument prototype would still apply. */
+char dlopen ();
+int
+main ()
+{
+dlopen ();
+ ;
+ return 0;
+}
+_ACEOF
+rm -f conftest.$ac_objext conftest$ac_exeext
+if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
+ (eval $ac_link) 2>conftest.er1
+ ac_status=$?
+ grep -v '^ *+' conftest.er1 >conftest.err
+ rm -f conftest.er1
+ cat conftest.err >&5
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); } &&
+ { ac_try='test -z "$ac_c_werror_flag"
+ || test ! -s conftest.err'
+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+ (eval $ac_try) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); }; } &&
+ { ac_try='test -s conftest$ac_exeext'
+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+ (eval $ac_try) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); }; }; then
+ ac_cv_lib_svld_dlopen=yes
+else
+ echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+ac_cv_lib_svld_dlopen=no
+fi
+rm -f conftest.err conftest.$ac_objext \
+ conftest$ac_exeext conftest.$ac_ext
+LIBS=$ac_check_lib_save_LIBS
+fi
+echo "$as_me:$LINENO: result: $ac_cv_lib_svld_dlopen" >&5
+echo "${ECHO_T}$ac_cv_lib_svld_dlopen" >&6
+if test $ac_cv_lib_svld_dlopen = yes; then
+ lt_cv_dlopen="dlopen" lt_cv_dlopen_libs="-lsvld"
+else
+ echo "$as_me:$LINENO: checking for dld_link in -ldld" >&5
+echo $ECHO_N "checking for dld_link in -ldld... $ECHO_C" >&6
+if test "${ac_cv_lib_dld_dld_link+set}" = set; then
+ echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+ ac_check_lib_save_LIBS=$LIBS
+LIBS="-ldld $LIBS"
+cat >conftest.$ac_ext <<_ACEOF
+/* confdefs.h. */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h. */
+
+/* Override any gcc2 internal prototype to avoid an error. */
+#ifdef __cplusplus
+extern "C"
+#endif
+/* We use char because int might match the return type of a gcc2
+ builtin and then its argument prototype would still apply. */
+char dld_link ();
+int
+main ()
+{
+dld_link ();
+ ;
+ return 0;
+}
+_ACEOF
+rm -f conftest.$ac_objext conftest$ac_exeext
+if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
+ (eval $ac_link) 2>conftest.er1
+ ac_status=$?
+ grep -v '^ *+' conftest.er1 >conftest.err
+ rm -f conftest.er1
+ cat conftest.err >&5
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); } &&
+ { ac_try='test -z "$ac_c_werror_flag"
+ || test ! -s conftest.err'
+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+ (eval $ac_try) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); }; } &&
+ { ac_try='test -s conftest$ac_exeext'
+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+ (eval $ac_try) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); }; }; then
+ ac_cv_lib_dld_dld_link=yes
else
- echo "configure: failed program was:" >&5
- cat conftest.$ac_ext >&5
- rm -fr conftest*
- ac_cv_c_stack_direction=-1
+ echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+ac_cv_lib_dld_dld_link=no
fi
-rm -fr conftest*
+rm -f conftest.err conftest.$ac_objext \
+ conftest$ac_exeext conftest.$ac_ext
+LIBS=$ac_check_lib_save_LIBS
fi
+echo "$as_me:$LINENO: result: $ac_cv_lib_dld_dld_link" >&5
+echo "${ECHO_T}$ac_cv_lib_dld_dld_link" >&6
+if test $ac_cv_lib_dld_dld_link = yes; then
+ lt_cv_dlopen="dld_link" lt_cv_dlopen_libs="-dld"
+fi
+
fi
-echo "$ac_t""$ac_cv_c_stack_direction" 1>&6
-cat >> confdefs.h <<EOF
-#define STACK_DIRECTION $ac_cv_c_stack_direction
-EOF
fi
-for ac_hdr in unistd.h
-do
-ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
-echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
-echo "configure:3229: 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 3234 "configure"
-#include "confdefs.h"
-#include <$ac_hdr>
-EOF
-ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
-{ (eval echo configure:3239: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
-ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
-if test -z "$ac_err"; then
- rm -rf conftest*
- eval "ac_cv_header_$ac_safe=yes"
-else
- echo "$ac_err" >&5
- echo "configure: failed program was:" >&5
- cat conftest.$ac_ext >&5
- rm -rf conftest*
- eval "ac_cv_header_$ac_safe=no"
+
fi
-rm -f conftest*
+
+
fi
-if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
- echo "$ac_t""yes" 1>&6
- ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
- cat >> confdefs.h <<EOF
-#define $ac_tr_hdr 1
-EOF
-
-else
- echo "$ac_t""no" 1>&6
+
+
fi
-done
-for ac_func in getpagesize
-do
-echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
-echo "configure:3268: 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
+ ;;
+ esac
+
+ if test "x$lt_cv_dlopen" != xno; then
+ enable_dlopen=yes
+ else
+ enable_dlopen=no
+ fi
+
+ case $lt_cv_dlopen in
+ dlopen)
+ save_CPPFLAGS="$CPPFLAGS"
+ test "x$ac_cv_header_dlfcn_h" = xyes && CPPFLAGS="$CPPFLAGS -DHAVE_DLFCN_H"
+
+ save_LDFLAGS="$LDFLAGS"
+ wl=$lt_prog_compiler_wl eval LDFLAGS=\"\$LDFLAGS $export_dynamic_flag_spec\"
+
+ save_LIBS="$LIBS"
+ LIBS="$lt_cv_dlopen_libs $LIBS"
+
+ echo "$as_me:$LINENO: checking whether a program can dlopen itself" >&5
+echo $ECHO_N "checking whether a program can dlopen itself... $ECHO_C" >&6
+if test "${lt_cv_dlopen_self+set}" = set; then
+ echo $ECHO_N "(cached) $ECHO_C" >&6
else
- cat > conftest.$ac_ext <<EOF
-#line 3273 "configure"
+ if test "$cross_compiling" = yes; then :
+ lt_cv_dlopen_self=cross
+else
+ lt_dlunknown=0; lt_dlno_uscore=1; lt_dlneed_uscore=2
+ lt_status=$lt_dlunknown
+ cat > conftest.$ac_ext <<_LT_EOF
+#line 9202 "configure"
#include "confdefs.h"
-/* System header to define __stub macros and hopefully few prototypes,
- which can conflict with char $ac_func(); below. */
-#include <assert.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 $ac_func();
-int main() {
+#if HAVE_DLFCN_H
+#include <dlfcn.h>
+#endif
-/* The GNU C library defines this for functions which it implements
- to always fail with ENOSYS. Some functions are actually named
- something starting with __ and the normal name is an alias. */
-#if defined (__stub_$ac_func) || defined (__stub___$ac_func)
-choke me
+#include <stdio.h>
+
+#ifdef RTLD_GLOBAL
+# define LT_DLGLOBAL RTLD_GLOBAL
#else
-$ac_func();
+# ifdef DL_GLOBAL
+# define LT_DLGLOBAL DL_GLOBAL
+# else
+# define LT_DLGLOBAL 0
+# endif
#endif
-; return 0; }
-EOF
-if { (eval echo configure:3296: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
- rm -rf conftest*
- eval "ac_cv_func_$ac_func=yes"
-else
- echo "configure: failed program was:" >&5
- cat conftest.$ac_ext >&5
- rm -rf conftest*
- eval "ac_cv_func_$ac_func=no"
-fi
-rm -f conftest*
+/* We may have to define LT_DLLAZY_OR_NOW in the command line if we
+ find out it does not work in some platform. */
+#ifndef LT_DLLAZY_OR_NOW
+# ifdef RTLD_LAZY
+# define LT_DLLAZY_OR_NOW RTLD_LAZY
+# else
+# ifdef DL_LAZY
+# define LT_DLLAZY_OR_NOW DL_LAZY
+# else
+# ifdef RTLD_NOW
+# define LT_DLLAZY_OR_NOW RTLD_NOW
+# else
+# ifdef DL_NOW
+# define LT_DLLAZY_OR_NOW DL_NOW
+# else
+# define LT_DLLAZY_OR_NOW 0
+# endif
+# endif
+# endif
+# endif
+#endif
+
+#ifdef __cplusplus
+extern "C" void exit (int);
+#endif
+
+void fnord() { int i=42;}
+int main ()
+{
+ void *self = dlopen (0, LT_DLGLOBAL|LT_DLLAZY_OR_NOW);
+ int status = $lt_dlunknown;
+
+ if (self)
+ {
+ if (dlsym (self,"fnord")) status = $lt_dlno_uscore;
+ else if (dlsym( self,"_fnord")) status = $lt_dlneed_uscore;
+ /* dlclose (self); */
+ }
+ else
+ puts (dlerror ());
+
+ exit (status);
+}
+_LT_EOF
+ if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
+ (eval $ac_link) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); } && test -s conftest${ac_exeext} 2>/dev/null; then
+ (./conftest; exit; ) >&5 2>/dev/null
+ lt_status=$?
+ case x$lt_status in
+ x$lt_dlno_uscore) lt_cv_dlopen_self=yes ;;
+ x$lt_dlneed_uscore) lt_cv_dlopen_self=yes ;;
+ x$lt_dlunknown|x*) lt_cv_dlopen_self=no ;;
+ esac
+ else :
+ # compilation failed
+ lt_cv_dlopen_self=no
+ fi
fi
+rm -fr conftest*
+
-if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
- echo "$ac_t""yes" 1>&6
- ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
- cat >> confdefs.h <<EOF
-#define $ac_tr_func 1
-EOF
-
-else
- echo "$ac_t""no" 1>&6
fi
-done
+echo "$as_me:$LINENO: result: $lt_cv_dlopen_self" >&5
+echo "${ECHO_T}$lt_cv_dlopen_self" >&6
-echo $ac_n "checking for working mmap""... $ac_c" 1>&6
-echo "configure:3321: checking for working mmap" >&5
-if eval "test \"`echo '$''{'ac_cv_func_mmap_fixed_mapped'+set}'`\" = set"; then
- echo $ac_n "(cached) $ac_c" 1>&6
+ if test "x$lt_cv_dlopen_self" = xyes; then
+ wl=$lt_prog_compiler_wl eval LDFLAGS=\"\$LDFLAGS $lt_prog_compiler_static\"
+ echo "$as_me:$LINENO: checking whether a statically linked program can dlopen itself" >&5
+echo $ECHO_N "checking whether a statically linked program can dlopen itself... $ECHO_C" >&6
+if test "${lt_cv_dlopen_self_static+set}" = set; then
+ echo $ECHO_N "(cached) $ECHO_C" >&6
else
- if test "$cross_compiling" = yes; then
- ac_cv_func_mmap_fixed_mapped=no
+ if test "$cross_compiling" = yes; then :
+ lt_cv_dlopen_self_static=cross
else
- cat > conftest.$ac_ext <<EOF
-#line 3329 "configure"
+ lt_dlunknown=0; lt_dlno_uscore=1; lt_dlneed_uscore=2
+ lt_status=$lt_dlunknown
+ cat > conftest.$ac_ext <<_LT_EOF
+#line 9302 "configure"
#include "confdefs.h"
-/* Thanks to Mike Haertel and Jim Avera for this test.
- Here is a matrix of mmap possibilities:
- mmap private not fixed
- mmap private fixed at somewhere currently unmapped
- mmap private fixed at somewhere already mapped
- mmap shared not fixed
- mmap shared fixed at somewhere currently unmapped
- mmap shared fixed at somewhere already mapped
- For private mappings, we should verify that changes cannot be read()
- back from the file, nor mmap's back from the file at a different
- address. (There have been systems where private was not correctly
- implemented like the infamous i386 svr4.0, and systems where the
- VM page cache was not coherent with the filesystem buffer cache
- like early versions of FreeBSD and possibly contemporary NetBSD.)
- For shared mappings, we should conversely verify that changes get
- propogated back to all the places they're supposed to be.
-
- Grep wants private fixed already mapped.
- The main things grep needs to know about mmap are:
- * does it exist and is it safe to write into the mmap'd area
- * how to use it (BSD variants) */
-#include <sys/types.h>
-#include <fcntl.h>
-#include <sys/mman.h>
+#if HAVE_DLFCN_H
+#include <dlfcn.h>
+#endif
-/* This mess was copied from the GNU getpagesize.h. */
-#ifndef HAVE_GETPAGESIZE
-# ifdef HAVE_UNISTD_H
-# include <unistd.h>
-# endif
+#include <stdio.h>
-/* Assume that all systems that can run configure have sys/param.h. */
-# ifndef HAVE_SYS_PARAM_H
-# define HAVE_SYS_PARAM_H 1
-# endif
+#ifdef RTLD_GLOBAL
+# define LT_DLGLOBAL RTLD_GLOBAL
+#else
+# ifdef DL_GLOBAL
+# define LT_DLGLOBAL DL_GLOBAL
+# else
+# define LT_DLGLOBAL 0
+# endif
+#endif
-# ifdef _SC_PAGESIZE
-# define getpagesize() sysconf(_SC_PAGESIZE)
-# else /* no _SC_PAGESIZE */
-# ifdef HAVE_SYS_PARAM_H
-# include <sys/param.h>
-# ifdef EXEC_PAGESIZE
-# define getpagesize() EXEC_PAGESIZE
-# else /* no EXEC_PAGESIZE */
-# ifdef NBPG
-# define getpagesize() NBPG * CLSIZE
-# ifndef CLSIZE
-# define CLSIZE 1
-# endif /* no CLSIZE */
-# else /* no NBPG */
-# ifdef NBPC
-# define getpagesize() NBPC
-# else /* no NBPC */
-# ifdef PAGESIZE
-# define getpagesize() PAGESIZE
-# endif /* PAGESIZE */
-# endif /* no NBPC */
-# endif /* no NBPG */
-# endif /* no EXEC_PAGESIZE */
-# else /* no HAVE_SYS_PARAM_H */
-# define getpagesize() 8192 /* punt totally */
-# endif /* no HAVE_SYS_PARAM_H */
-# endif /* no _SC_PAGESIZE */
-
-#endif /* no HAVE_GETPAGESIZE */
+/* We may have to define LT_DLLAZY_OR_NOW in the command line if we
+ find out it does not work in some platform. */
+#ifndef LT_DLLAZY_OR_NOW
+# ifdef RTLD_LAZY
+# define LT_DLLAZY_OR_NOW RTLD_LAZY
+# else
+# ifdef DL_LAZY
+# define LT_DLLAZY_OR_NOW DL_LAZY
+# else
+# ifdef RTLD_NOW
+# define LT_DLLAZY_OR_NOW RTLD_NOW
+# else
+# ifdef DL_NOW
+# define LT_DLLAZY_OR_NOW DL_NOW
+# else
+# define LT_DLLAZY_OR_NOW 0
+# endif
+# endif
+# endif
+# endif
+#endif
#ifdef __cplusplus
-extern "C" { void *malloc(unsigned); }
-#else
-char *malloc();
+extern "C" void exit (int);
#endif
-int
-main()
+void fnord() { int i=42;}
+int main ()
{
- char *data, *data2, *data3;
- int i, pagesize;
- int fd;
-
- pagesize = getpagesize();
-
- /*
- * First, make a file with some known garbage in it.
- */
- data = malloc(pagesize);
- if (!data)
- exit(1);
- for (i = 0; i < pagesize; ++i)
- *(data + i) = rand();
- umask(0);
- fd = creat("conftestmmap", 0600);
- if (fd < 0)
- exit(1);
- if (write(fd, data, pagesize) != pagesize)
- exit(1);
- close(fd);
-
- /*
- * Next, try to mmap the file at a fixed address which
- * already has something else allocated at it. If we can,
- * also make sure that we see the same garbage.
- */
- fd = open("conftestmmap", O_RDWR);
- if (fd < 0)
- exit(1);
- data2 = malloc(2 * pagesize);
- if (!data2)
- exit(1);
- data2 += (pagesize - ((int) data2 & (pagesize - 1))) & (pagesize - 1);
- if (data2 != mmap(data2, pagesize, PROT_READ | PROT_WRITE,
- MAP_PRIVATE | MAP_FIXED, fd, 0L))
- exit(1);
- for (i = 0; i < pagesize; ++i)
- if (*(data + i) != *(data2 + i))
- exit(1);
-
- /*
- * Finally, make sure that changes to the mapped area
- * do not percolate back to the file as seen by read().
- * (This is a bug on some variants of i386 svr4.0.)
- */
- for (i = 0; i < pagesize; ++i)
- *(data2 + i) = *(data2 + i) + 1;
- data3 = malloc(pagesize);
- if (!data3)
- exit(1);
- if (read(fd, data3, pagesize) != pagesize)
- exit(1);
- for (i = 0; i < pagesize; ++i)
- if (*(data + i) != *(data3 + i))
- exit(1);
- close(fd);
- unlink("conftestmmap");
- exit(0);
-}
+ void *self = dlopen (0, LT_DLGLOBAL|LT_DLLAZY_OR_NOW);
+ int status = $lt_dlunknown;
-EOF
-if { (eval echo configure:3469: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
-then
- ac_cv_func_mmap_fixed_mapped=yes
-else
- echo "configure: failed program was:" >&5
- cat conftest.$ac_ext >&5
- rm -fr conftest*
- ac_cv_func_mmap_fixed_mapped=no
+ if (self)
+ {
+ if (dlsym (self,"fnord")) status = $lt_dlno_uscore;
+ else if (dlsym( self,"_fnord")) status = $lt_dlneed_uscore;
+ /* dlclose (self); */
+ }
+ else
+ puts (dlerror ());
+
+ exit (status);
+}
+_LT_EOF
+ if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
+ (eval $ac_link) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); } && test -s conftest${ac_exeext} 2>/dev/null; then
+ (./conftest; exit; ) >&5 2>/dev/null
+ lt_status=$?
+ case x$lt_status in
+ x$lt_dlno_uscore) lt_cv_dlopen_self_static=yes ;;
+ x$lt_dlneed_uscore) lt_cv_dlopen_self_static=yes ;;
+ x$lt_dlunknown|x*) lt_cv_dlopen_self_static=no ;;
+ esac
+ else :
+ # compilation failed
+ lt_cv_dlopen_self_static=no
+ fi
fi
rm -fr conftest*
-fi
+
fi
+echo "$as_me:$LINENO: result: $lt_cv_dlopen_self_static" >&5
+echo "${ECHO_T}$lt_cv_dlopen_self_static" >&6
+ fi
-echo "$ac_t""$ac_cv_func_mmap_fixed_mapped" 1>&6
-if test $ac_cv_func_mmap_fixed_mapped = yes; then
- cat >> confdefs.h <<\EOF
-#define HAVE_MMAP 1
-EOF
+ CPPFLAGS="$save_CPPFLAGS"
+ LDFLAGS="$save_LDFLAGS"
+ LIBS="$save_LIBS"
+ ;;
+ esac
-fi
+ case $lt_cv_dlopen_self in
+ yes|no) enable_dlopen_self=$lt_cv_dlopen_self ;;
+ *) enable_dlopen_self=unknown ;;
+ esac
-
- for ac_hdr in argz.h limits.h locale.h nl_types.h malloc.h string.h \
-unistd.h values.h sys/param.h
-do
-ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
-echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
-echo "configure:3497: 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 3502 "configure"
-#include "confdefs.h"
-#include <$ac_hdr>
-EOF
-ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
-{ (eval echo configure:3507: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
-ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
-if test -z "$ac_err"; then
- rm -rf conftest*
- eval "ac_cv_header_$ac_safe=yes"
-else
- echo "$ac_err" >&5
- echo "configure: failed program was:" >&5
- cat conftest.$ac_ext >&5
- rm -rf conftest*
- eval "ac_cv_header_$ac_safe=no"
-fi
-rm -f conftest*
-fi
-if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
- echo "$ac_t""yes" 1>&6
- ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
- cat >> confdefs.h <<EOF
-#define $ac_tr_hdr 1
-EOF
-
-else
- echo "$ac_t""no" 1>&6
+ case $lt_cv_dlopen_self_static in
+ yes|no) enable_dlopen_self_static=$lt_cv_dlopen_self_static ;;
+ *) enable_dlopen_self_static=unknown ;;
+ esac
fi
-done
- for ac_func in getcwd munmap putenv setenv setlocale strchr strcasecmp \
-__argz_count __argz_stringify __argz_next
-do
-echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
-echo "configure:3537: 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 3542 "configure"
-#include "confdefs.h"
-/* System header to define __stub macros and hopefully few prototypes,
- which can conflict with char $ac_func(); below. */
-#include <assert.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 $ac_func();
-int main() {
-/* The GNU C library defines this for functions which it implements
- to always fail with ENOSYS. Some functions are actually named
- something starting with __ and the normal name is an alias. */
-#if defined (__stub_$ac_func) || defined (__stub___$ac_func)
-choke me
-#else
-$ac_func();
-#endif
-; return 0; }
-EOF
-if { (eval echo configure:3565: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
- rm -rf conftest*
- eval "ac_cv_func_$ac_func=yes"
+
+
+
+
+
+
+
+
+
+
+
+
+
+striplib=
+old_striplib=
+echo "$as_me:$LINENO: checking whether stripping libraries is possible" >&5
+echo $ECHO_N "checking whether stripping libraries is possible... $ECHO_C" >&6
+if test -n "$STRIP" && $STRIP -V 2>&1 | $GREP "GNU strip" >/dev/null; then
+ test -z "$old_striplib" && old_striplib="$STRIP --strip-debug"
+ test -z "$striplib" && striplib="$STRIP --strip-unneeded"
+ echo "$as_me:$LINENO: result: yes" >&5
+echo "${ECHO_T}yes" >&6
else
- echo "configure: failed program was:" >&5
- cat conftest.$ac_ext >&5
- rm -rf conftest*
- eval "ac_cv_func_$ac_func=no"
-fi
-rm -f conftest*
+# FIXME - insert some real tests, host_os isn't really good enough
+ case $host_os in
+ darwin*)
+ if test -n "$STRIP" ; then
+ striplib="$STRIP -x"
+ old_striplib="$STRIP -S"
+ echo "$as_me:$LINENO: result: yes" >&5
+echo "${ECHO_T}yes" >&6
+ else
+ echo "$as_me:$LINENO: result: no" >&5
+echo "${ECHO_T}no" >&6
+ fi
+ ;;
+ *)
+ echo "$as_me:$LINENO: result: no" >&5
+echo "${ECHO_T}no" >&6
+ ;;
+ esac
fi
-if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
- echo "$ac_t""yes" 1>&6
- ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
- cat >> confdefs.h <<EOF
-#define $ac_tr_func 1
-EOF
-
-else
- echo "$ac_t""no" 1>&6
+
+
+
+
+
+
+
+
+
+
+
+ # Report which library types will actually be built
+ echo "$as_me:$LINENO: checking if libtool supports shared libraries" >&5
+echo $ECHO_N "checking if libtool supports shared libraries... $ECHO_C" >&6
+ echo "$as_me:$LINENO: result: $can_build_shared" >&5
+echo "${ECHO_T}$can_build_shared" >&6
+
+ echo "$as_me:$LINENO: checking whether to build shared libraries" >&5
+echo $ECHO_N "checking whether to build shared libraries... $ECHO_C" >&6
+ test "$can_build_shared" = "no" && enable_shared=no
+
+ # On AIX, shared libraries and static libraries use the same namespace, and
+ # are all built from PIC.
+ case $host_os in
+ aix3*)
+ test "$enable_shared" = yes && enable_static=no
+ if test -n "$RANLIB"; then
+ archive_cmds="$archive_cmds~\$RANLIB \$lib"
+ postinstall_cmds='$RANLIB $lib'
+ fi
+ ;;
+
+ aix4* | aix5*)
+ if test "$host_cpu" != ia64 && test "$aix_use_runtimelinking" = no ; then
+ test "$enable_shared" = yes && enable_static=no
+ fi
+ ;;
+ esac
+ echo "$as_me:$LINENO: result: $enable_shared" >&5
+echo "${ECHO_T}$enable_shared" >&6
+
+ echo "$as_me:$LINENO: checking whether to build static libraries" >&5
+echo $ECHO_N "checking whether to build static libraries... $ECHO_C" >&6
+ # Make sure either enable_shared or enable_static is yes.
+ test "$enable_shared" = yes || enable_static=yes
+ echo "$as_me:$LINENO: result: $enable_static" >&5
+echo "${ECHO_T}$enable_static" >&6
+
+
+
+
fi
-done
+ac_ext=c
+ac_cpp='$CPP $CPPFLAGS'
+ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
+ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
+ac_compiler_gnu=$ac_cv_c_compiler_gnu
+CC="$lt_save_CC"
- if test "${ac_cv_func_stpcpy+set}" != "set"; then
- for ac_func in stpcpy
-do
-echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
-echo "configure:3594: 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
+
+
+
+
+
+
+
+
+
+
+
+
+ ac_config_commands="$ac_config_commands libtool"
+
+
+
+
+# Only expand once:
+
+
+
+
+# Check whether --with-lib-path or --without-lib-path was given.
+if test "${with_lib_path+set}" = set; then
+ withval="$with_lib_path"
+ LIB_PATH=$withval
+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 "$as_me:$LINENO: error: enable-targets option must specify target names or 'all'" >&5
+echo "$as_me: error: enable-targets option must specify target names or 'all'" >&2;}
+ { (exit 1); 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 "$as_me:$LINENO: error: bad value ${enableval} for 64-bit-bfd option" >&5
+echo "$as_me: error: bad value ${enableval} for 64-bit-bfd option" >&2;}
+ { (exit 1); exit 1; }; } ;;
+esac
else
- cat > conftest.$ac_ext <<EOF
-#line 3599 "configure"
-#include "confdefs.h"
-/* System header to define __stub macros and hopefully few prototypes,
- which can conflict with char $ac_func(); below. */
-#include <assert.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 $ac_func();
+ want64=false
+fi;
-int main() {
+# Check whether --with-sysroot or --without-sysroot was given.
+if test "${with_sysroot+set}" = set; then
+ withval="$with_sysroot"
-/* The GNU C library defines this for functions which it implements
- to always fail with ENOSYS. Some functions are actually named
- something starting with __ and the normal name is an alias. */
-#if defined (__stub_$ac_func) || defined (__stub___$ac_func)
-choke me
-#else
-$ac_func();
-#endif
+ case ${with_sysroot} in
+ yes) TARGET_SYSTEM_ROOT='${exec_prefix}/${target_alias}/sys-root' ;;
+ *) TARGET_SYSTEM_ROOT=$with_sysroot ;;
+ esac
+
+ TARGET_SYSTEM_ROOT_DEFINE='-DTARGET_SYSTEM_ROOT=\"$(TARGET_SYSTEM_ROOT)\"'
+ use_sysroot=yes
+
+ if test "x$prefix" = xNONE; then
+ test_prefix=/usr/local
+ else
+ test_prefix=$prefix
+ fi
+ if test "x$exec_prefix" = xNONE; then
+ test_exec_prefix=$test_prefix
+ else
+ test_exec_prefix=$exec_prefix
+ fi
+ case ${TARGET_SYSTEM_ROOT} in
+ "${test_prefix}"|"${test_prefix}/"*|\
+ "${test_exec_prefix}"|"${test_exec_prefix}/"*|\
+ '${prefix}'|'${prefix}/'*|\
+ '${exec_prefix}'|'${exec_prefix}/'*)
+ t="$TARGET_SYSTEM_ROOT_DEFINE -DTARGET_SYSTEM_ROOT_RELOCATABLE"
+ TARGET_SYSTEM_ROOT_DEFINE="$t"
+ ;;
+ esac
-; return 0; }
-EOF
-if { (eval echo configure:3622: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
- rm -rf conftest*
- eval "ac_cv_func_$ac_func=yes"
else
- echo "configure: failed program was:" >&5
- cat conftest.$ac_ext >&5
- rm -rf conftest*
- eval "ac_cv_func_$ac_func=no"
+
+ use_sysroot=no
+ TARGET_SYSTEM_ROOT=
+ TARGET_SYSTEM_ROOT_DEFINE='-DTARGET_SYSTEM_ROOT=\"\"'
+
+fi;
+
+
+
+
+
+GCC_WARN_CFLAGS="-W -Wall -Wstrict-prototypes -Wmissing-prototypes"
+
+# Check whether --enable-werror or --disable-werror was given.
+if test "${enable_werror+set}" = set; then
+ enableval="$enable_werror"
+ case "${enableval}" in
+ yes | y) ERROR_ON_WARNING="yes" ;;
+ no | n) ERROR_ON_WARNING="no" ;;
+ *) { { echo "$as_me:$LINENO: error: bad value ${enableval} for --enable-werror" >&5
+echo "$as_me: error: bad value ${enableval} for --enable-werror" >&2;}
+ { (exit 1); exit 1; }; } ;;
+ esac
+fi;
+
+# Enable -Werror by default when using gcc
+if test "${GCC}" = yes -a -z "${ERROR_ON_WARNING}" ; then
+ ERROR_ON_WARNING=yes
fi
-rm -f conftest*
+
+NO_WERROR=
+if test "${ERROR_ON_WARNING}" = yes ; then
+ GCC_WARN_CFLAGS="$GCC_WARN_CFLAGS -Werror"
+ NO_WERROR="-Wno-error"
fi
-if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
- echo "$ac_t""yes" 1>&6
- ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
- cat >> confdefs.h <<EOF
-#define $ac_tr_func 1
-EOF
-
-else
- echo "$ac_t""no" 1>&6
+if test "${GCC}" = yes ; then
+ WARN_CFLAGS="${GCC_WARN_CFLAGS}"
fi
-done
- fi
- if test "${ac_cv_func_stpcpy}" = "yes"; then
- cat >> confdefs.h <<\EOF
-#define HAVE_STPCPY 1
-EOF
+# Check whether --enable-build-warnings or --disable-build-warnings was given.
+if test "${enable_build_warnings+set}" = set; then
+ enableval="$enable_build_warnings"
+ case "${enableval}" in
+ yes) WARN_CFLAGS="${GCC_WARN_CFLAGS}";;
+ no) if test "${GCC}" = yes ; then
+ WARN_CFLAGS="-w"
+ fi;;
+ ,*) t=`echo "${enableval}" | sed -e "s/,/ /g"`
+ WARN_CFLAGS="${GCC_WARN_CFLAGS} ${t}";;
+ *,) t=`echo "${enableval}" | sed -e "s/,/ /g"`
+ WARN_CFLAGS="${t} ${GCC_WARN_CFLAGS}";;
+ *) WARN_CFLAGS=`echo "${enableval}" | sed -e "s/,/ /g"`;;
+esac
+fi;
- fi
+if test x"$silent" != x"yes" && test x"$WARN_CFLAGS" != x""; then
+ echo "Setting warning flags = $WARN_CFLAGS" 6>&1
+fi
- if test $ac_cv_header_locale_h = yes; then
- echo $ac_n "checking for LC_MESSAGES""... $ac_c" 1>&6
-echo "configure:3656: checking for LC_MESSAGES" >&5
-if eval "test \"`echo '$''{'am_cv_val_LC_MESSAGES'+set}'`\" = set"; then
- echo $ac_n "(cached) $ac_c" 1>&6
-else
- cat > conftest.$ac_ext <<EOF
-#line 3661 "configure"
-#include "confdefs.h"
-#include <locale.h>
-int main() {
-return LC_MESSAGES
-; return 0; }
-EOF
-if { (eval echo configure:3668: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
- rm -rf conftest*
- am_cv_val_LC_MESSAGES=yes
-else
- echo "configure: failed program was:" >&5
- cat conftest.$ac_ext >&5
- rm -rf conftest*
- am_cv_val_LC_MESSAGES=no
+
+
+
+
+ ac_config_headers="$ac_config_headers config.h:config.in"
+
+
+if test -z "$target" ; then
+ { { echo "$as_me:$LINENO: error: Unrecognized target system type; please check config.sub." >&5
+echo "$as_me: error: Unrecognized target system type; please check config.sub." >&2;}
+ { (exit 1); exit 1; }; }
fi
-rm -f conftest*
+if test -z "$host" ; then
+ { { echo "$as_me:$LINENO: error: Unrecognized host system type; please check config.sub." >&5
+echo "$as_me: error: Unrecognized host system type; please check config.sub." >&2;}
+ { (exit 1); exit 1; }; }
fi
-echo "$ac_t""$am_cv_val_LC_MESSAGES" 1>&6
- if test $am_cv_val_LC_MESSAGES = yes; then
- cat >> confdefs.h <<\EOF
-#define HAVE_LC_MESSAGES 1
-EOF
+# host-specific stuff:
- fi
+ac_ext=c
+ac_cpp='$CPP $CPPFLAGS'
+ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
+ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
+ac_compiler_gnu=$ac_cv_c_compiler_gnu
+if test -n "$ac_tool_prefix"; then
+ # Extract the first word of "${ac_tool_prefix}gcc", so it can be a program name with args.
+set dummy ${ac_tool_prefix}gcc; ac_word=$2
+echo "$as_me:$LINENO: checking for $ac_word" >&5
+echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
+if test "${ac_cv_prog_CC+set}" = set; then
+ echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+ if test -n "$CC"; then
+ ac_cv_prog_CC="$CC" # Let the user override the test.
+else
+as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
+for as_dir in $PATH
+do
+ IFS=$as_save_IFS
+ test -z "$as_dir" && as_dir=.
+ for ac_exec_ext in '' $ac_executable_extensions; do
+ if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
+ ac_cv_prog_CC="${ac_tool_prefix}gcc"
+ echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
+ break 2
fi
- echo $ac_n "checking whether NLS is requested""... $ac_c" 1>&6
-echo "configure:3689: checking whether NLS is requested" >&5
- # Check whether --enable-nls or --disable-nls was given.
-if test "${enable_nls+set}" = set; then
- enableval="$enable_nls"
- USE_NLS=$enableval
+done
+done
+
+fi
+fi
+CC=$ac_cv_prog_CC
+if test -n "$CC"; then
+ echo "$as_me:$LINENO: result: $CC" >&5
+echo "${ECHO_T}$CC" >&6
else
- USE_NLS=yes
+ echo "$as_me:$LINENO: result: no" >&5
+echo "${ECHO_T}no" >&6
fi
- echo "$ac_t""$USE_NLS" 1>&6
-
-
- USE_INCLUDED_LIBINTL=no
-
- if test "$USE_NLS" = "yes"; then
- cat >> confdefs.h <<\EOF
-#define ENABLE_NLS 1
-EOF
+fi
+if test -z "$ac_cv_prog_CC"; then
+ ac_ct_CC=$CC
+ # Extract the first word of "gcc", so it can be a program name with args.
+set dummy gcc; ac_word=$2
+echo "$as_me:$LINENO: checking for $ac_word" >&5
+echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
+if test "${ac_cv_prog_ac_ct_CC+set}" = set; then
+ echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+ if test -n "$ac_ct_CC"; then
+ ac_cv_prog_ac_ct_CC="$ac_ct_CC" # Let the user override the test.
+else
+as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
+for as_dir in $PATH
+do
+ IFS=$as_save_IFS
+ test -z "$as_dir" && as_dir=.
+ for ac_exec_ext in '' $ac_executable_extensions; do
+ if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
+ ac_cv_prog_ac_ct_CC="gcc"
+ echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
+ break 2
+ fi
+done
+done
- echo $ac_n "checking whether included gettext is requested""... $ac_c" 1>&6
-echo "configure:3709: checking whether included gettext is requested" >&5
- # Check whether --with-included-gettext or --without-included-gettext was given.
-if test "${with_included_gettext+set}" = set; then
- withval="$with_included_gettext"
- nls_cv_force_use_gnu_gettext=$withval
+fi
+fi
+ac_ct_CC=$ac_cv_prog_ac_ct_CC
+if test -n "$ac_ct_CC"; then
+ echo "$as_me:$LINENO: result: $ac_ct_CC" >&5
+echo "${ECHO_T}$ac_ct_CC" >&6
else
- nls_cv_force_use_gnu_gettext=no
+ echo "$as_me:$LINENO: result: no" >&5
+echo "${ECHO_T}no" >&6
fi
- echo "$ac_t""$nls_cv_force_use_gnu_gettext" 1>&6
-
- nls_cv_use_gnu_gettext="$nls_cv_force_use_gnu_gettext"
- if test "$nls_cv_force_use_gnu_gettext" != "yes"; then
- nls_cv_header_intl=
- nls_cv_header_libgt=
- CATOBJEXT=NONE
+ CC=$ac_ct_CC
+else
+ CC="$ac_cv_prog_CC"
+fi
- ac_safe=`echo "libintl.h" | sed 'y%./+-%__p_%'`
-echo $ac_n "checking for libintl.h""... $ac_c" 1>&6
-echo "configure:3728: checking for libintl.h" >&5
-if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
- echo $ac_n "(cached) $ac_c" 1>&6
+if test -z "$CC"; then
+ if test -n "$ac_tool_prefix"; then
+ # Extract the first word of "${ac_tool_prefix}cc", so it can be a program name with args.
+set dummy ${ac_tool_prefix}cc; ac_word=$2
+echo "$as_me:$LINENO: checking for $ac_word" >&5
+echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
+if test "${ac_cv_prog_CC+set}" = set; then
+ echo $ECHO_N "(cached) $ECHO_C" >&6
else
- cat > conftest.$ac_ext <<EOF
-#line 3733 "configure"
-#include "confdefs.h"
-#include <libintl.h>
-EOF
-ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
-{ (eval echo configure:3738: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
-ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
-if test -z "$ac_err"; then
- rm -rf conftest*
- eval "ac_cv_header_$ac_safe=yes"
+ if test -n "$CC"; then
+ ac_cv_prog_CC="$CC" # Let the user override the test.
else
- echo "$ac_err" >&5
- echo "configure: failed program was:" >&5
- cat conftest.$ac_ext >&5
- rm -rf conftest*
- eval "ac_cv_header_$ac_safe=no"
+as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
+for as_dir in $PATH
+do
+ IFS=$as_save_IFS
+ test -z "$as_dir" && as_dir=.
+ for ac_exec_ext in '' $ac_executable_extensions; do
+ if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
+ ac_cv_prog_CC="${ac_tool_prefix}cc"
+ echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
+ break 2
+ fi
+done
+done
+
fi
-rm -f conftest*
fi
-if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
- echo "$ac_t""yes" 1>&6
- echo $ac_n "checking for gettext in libc""... $ac_c" 1>&6
-echo "configure:3755: checking for gettext in libc" >&5
-if eval "test \"`echo '$''{'gt_cv_func_gettext_libc'+set}'`\" = set"; then
- echo $ac_n "(cached) $ac_c" 1>&6
+CC=$ac_cv_prog_CC
+if test -n "$CC"; then
+ echo "$as_me:$LINENO: result: $CC" >&5
+echo "${ECHO_T}$CC" >&6
else
- cat > conftest.$ac_ext <<EOF
-#line 3760 "configure"
-#include "confdefs.h"
-#include <libintl.h>
-int main() {
-return (int) gettext ("")
-; return 0; }
-EOF
-if { (eval echo configure:3767: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
- rm -rf conftest*
- gt_cv_func_gettext_libc=yes
+ echo "$as_me:$LINENO: result: no" >&5
+echo "${ECHO_T}no" >&6
+fi
+
+fi
+if test -z "$ac_cv_prog_CC"; then
+ ac_ct_CC=$CC
+ # Extract the first word of "cc", so it can be a program name with args.
+set dummy cc; ac_word=$2
+echo "$as_me:$LINENO: checking for $ac_word" >&5
+echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
+if test "${ac_cv_prog_ac_ct_CC+set}" = set; then
+ echo $ECHO_N "(cached) $ECHO_C" >&6
else
- echo "configure: failed program was:" >&5
- cat conftest.$ac_ext >&5
- rm -rf conftest*
- gt_cv_func_gettext_libc=no
+ if test -n "$ac_ct_CC"; then
+ ac_cv_prog_ac_ct_CC="$ac_ct_CC" # Let the user override the test.
+else
+as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
+for as_dir in $PATH
+do
+ IFS=$as_save_IFS
+ test -z "$as_dir" && as_dir=.
+ for ac_exec_ext in '' $ac_executable_extensions; do
+ if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
+ ac_cv_prog_ac_ct_CC="cc"
+ echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
+ break 2
+ fi
+done
+done
+
fi
-rm -f conftest*
+fi
+ac_ct_CC=$ac_cv_prog_ac_ct_CC
+if test -n "$ac_ct_CC"; then
+ echo "$as_me:$LINENO: result: $ac_ct_CC" >&5
+echo "${ECHO_T}$ac_ct_CC" >&6
+else
+ echo "$as_me:$LINENO: result: no" >&5
+echo "${ECHO_T}no" >&6
fi
-echo "$ac_t""$gt_cv_func_gettext_libc" 1>&6
+ CC=$ac_ct_CC
+else
+ CC="$ac_cv_prog_CC"
+fi
- if test "$gt_cv_func_gettext_libc" != "yes"; then
- echo $ac_n "checking for bindtextdomain in -lintl""... $ac_c" 1>&6
-echo "configure:3783: checking for bindtextdomain in -lintl" >&5
-ac_lib_var=`echo intl'_'bindtextdomain | sed 'y%./+-%__p_%'`
-if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
- echo $ac_n "(cached) $ac_c" 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 "$as_me:$LINENO: checking for $ac_word" >&5
+echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
+if test "${ac_cv_prog_CC+set}" = set; then
+ echo $ECHO_N "(cached) $ECHO_C" >&6
else
- ac_save_LIBS="$LIBS"
-LIBS="-lintl $LIBS"
-cat > conftest.$ac_ext <<EOF
-#line 3791 "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 bindtextdomain();
-
-int main() {
-bindtextdomain()
-; return 0; }
-EOF
-if { (eval echo configure:3802: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
- rm -rf conftest*
- eval "ac_cv_lib_$ac_lib_var=yes"
+ if test -n "$CC"; then
+ ac_cv_prog_CC="$CC" # Let the user override the test.
else
- echo "configure: failed program was:" >&5
- cat conftest.$ac_ext >&5
- rm -rf conftest*
- eval "ac_cv_lib_$ac_lib_var=no"
+ ac_prog_rejected=no
+as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
+for as_dir in $PATH
+do
+ IFS=$as_save_IFS
+ test -z "$as_dir" && as_dir=.
+ for ac_exec_ext in '' $ac_executable_extensions; do
+ if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
+ if test "$as_dir/$ac_word$ac_exec_ext" = "/usr/ucb/cc"; then
+ ac_prog_rejected=yes
+ continue
+ fi
+ ac_cv_prog_CC="cc"
+ echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
+ break 2
+ fi
+done
+done
+
+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 $# != 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
+ ac_cv_prog_CC="$as_dir/$ac_word${1+' '}$@"
+ fi
+fi
+fi
+fi
+CC=$ac_cv_prog_CC
+if test -n "$CC"; then
+ echo "$as_me:$LINENO: result: $CC" >&5
+echo "${ECHO_T}$CC" >&6
+else
+ echo "$as_me:$LINENO: result: no" >&5
+echo "${ECHO_T}no" >&6
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
- echo $ac_n "checking for gettext in libintl""... $ac_c" 1>&6
-echo "configure:3818: checking for gettext in libintl" >&5
-if eval "test \"`echo '$''{'gt_cv_func_gettext_libintl'+set}'`\" = set"; then
- echo $ac_n "(cached) $ac_c" 1>&6
+if test -z "$CC"; then
+ if test -n "$ac_tool_prefix"; then
+ for ac_prog in cl
+ do
+ # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
+set dummy $ac_tool_prefix$ac_prog; ac_word=$2
+echo "$as_me:$LINENO: checking for $ac_word" >&5
+echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
+if test "${ac_cv_prog_CC+set}" = set; then
+ echo $ECHO_N "(cached) $ECHO_C" >&6
else
- cat > conftest.$ac_ext <<EOF
-#line 3823 "configure"
-#include "confdefs.h"
+ if test -n "$CC"; then
+ ac_cv_prog_CC="$CC" # Let the user override the test.
+else
+as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
+for as_dir in $PATH
+do
+ IFS=$as_save_IFS
+ test -z "$as_dir" && as_dir=.
+ for ac_exec_ext in '' $ac_executable_extensions; do
+ if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
+ ac_cv_prog_CC="$ac_tool_prefix$ac_prog"
+ echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
+ break 2
+ fi
+done
+done
-int main() {
-return (int) gettext ("")
-; return 0; }
-EOF
-if { (eval echo configure:3830: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
- rm -rf conftest*
- gt_cv_func_gettext_libintl=yes
+fi
+fi
+CC=$ac_cv_prog_CC
+if test -n "$CC"; then
+ echo "$as_me:$LINENO: result: $CC" >&5
+echo "${ECHO_T}$CC" >&6
else
- echo "configure: failed program was:" >&5
- cat conftest.$ac_ext >&5
- rm -rf conftest*
- gt_cv_func_gettext_libintl=no
+ echo "$as_me:$LINENO: result: no" >&5
+echo "${ECHO_T}no" >&6
fi
-rm -f conftest*
+
+ test -n "$CC" && break
+ done
fi
+if test -z "$CC"; then
+ ac_ct_CC=$CC
+ for ac_prog in cl
+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 "$as_me:$LINENO: checking for $ac_word" >&5
+echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
+if test "${ac_cv_prog_ac_ct_CC+set}" = set; then
+ echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+ if test -n "$ac_ct_CC"; then
+ ac_cv_prog_ac_ct_CC="$ac_ct_CC" # Let the user override the test.
+else
+as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
+for as_dir in $PATH
+do
+ IFS=$as_save_IFS
+ test -z "$as_dir" && as_dir=.
+ for ac_exec_ext in '' $ac_executable_extensions; do
+ if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
+ ac_cv_prog_ac_ct_CC="$ac_prog"
+ echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
+ break 2
+ fi
+done
+done
-echo "$ac_t""$gt_cv_func_gettext_libintl" 1>&6
+fi
+fi
+ac_ct_CC=$ac_cv_prog_ac_ct_CC
+if test -n "$ac_ct_CC"; then
+ echo "$as_me:$LINENO: result: $ac_ct_CC" >&5
+echo "${ECHO_T}$ac_ct_CC" >&6
else
- echo "$ac_t""no" 1>&6
+ echo "$as_me:$LINENO: result: no" >&5
+echo "${ECHO_T}no" >&6
fi
- fi
+ test -n "$ac_ct_CC" && break
+done
- if test "$gt_cv_func_gettext_libc" = "yes" \
- || test "$gt_cv_func_gettext_libintl" = "yes"; then
- cat >> confdefs.h <<\EOF
-#define HAVE_GETTEXT 1
-EOF
+ CC=$ac_ct_CC
+fi
+
+fi
+
+
+test -z "$CC" && { { echo "$as_me:$LINENO: error: no acceptable C compiler found in \$PATH
+See \`config.log' for more details." >&5
+echo "$as_me: error: no acceptable C compiler found in \$PATH
+See \`config.log' for more details." >&2;}
+ { (exit 1); exit 1; }; }
+
+# Provide some information about the compiler.
+echo "$as_me:$LINENO:" \
+ "checking for C compiler version" >&5
+ac_compiler=`set X $ac_compile; echo $2`
+{ (eval echo "$as_me:$LINENO: \"$ac_compiler --version </dev/null >&5\"") >&5
+ (eval $ac_compiler --version </dev/null >&5) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); }
+{ (eval echo "$as_me:$LINENO: \"$ac_compiler -v </dev/null >&5\"") >&5
+ (eval $ac_compiler -v </dev/null >&5) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); }
+{ (eval echo "$as_me:$LINENO: \"$ac_compiler -V </dev/null >&5\"") >&5
+ (eval $ac_compiler -V </dev/null >&5) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); }
+
+echo "$as_me:$LINENO: checking whether we are using the GNU C compiler" >&5
+echo $ECHO_N "checking whether we are using the GNU C compiler... $ECHO_C" >&6
+if test "${ac_cv_c_compiler_gnu+set}" = set; then
+ echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+ cat >conftest.$ac_ext <<_ACEOF
+/* confdefs.h. */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h. */
- # Extract the first word of "msgfmt", so it can be a program name with args.
-set dummy msgfmt; ac_word=$2
-echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
-echo "configure:3858: checking for $ac_word" >&5
-if eval "test \"`echo '$''{'ac_cv_path_MSGFMT'+set}'`\" = set"; then
- echo $ac_n "(cached) $ac_c" 1>&6
+int
+main ()
+{
+#ifndef __GNUC__
+ choke me
+#endif
+
+ ;
+ return 0;
+}
+_ACEOF
+rm -f conftest.$ac_objext
+if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
+ (eval $ac_compile) 2>conftest.er1
+ ac_status=$?
+ grep -v '^ *+' conftest.er1 >conftest.err
+ rm -f conftest.er1
+ cat conftest.err >&5
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); } &&
+ { ac_try='test -z "$ac_c_werror_flag"
+ || test ! -s conftest.err'
+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+ (eval $ac_try) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); }; } &&
+ { ac_try='test -s conftest.$ac_objext'
+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+ (eval $ac_try) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); }; }; then
+ ac_compiler_gnu=yes
+else
+ echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+ac_compiler_gnu=no
+fi
+rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
+ac_cv_c_compiler_gnu=$ac_compiler_gnu
+
+fi
+echo "$as_me:$LINENO: result: $ac_cv_c_compiler_gnu" >&5
+echo "${ECHO_T}$ac_cv_c_compiler_gnu" >&6
+GCC=`test $ac_compiler_gnu = yes && echo yes`
+ac_test_CFLAGS=${CFLAGS+set}
+ac_save_CFLAGS=$CFLAGS
+CFLAGS="-g"
+echo "$as_me:$LINENO: checking whether $CC accepts -g" >&5
+echo $ECHO_N "checking whether $CC accepts -g... $ECHO_C" >&6
+if test "${ac_cv_prog_cc_g+set}" = set; then
+ echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+ cat >conftest.$ac_ext <<_ACEOF
+/* confdefs.h. */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h. */
+
+int
+main ()
+{
+
+ ;
+ return 0;
+}
+_ACEOF
+rm -f conftest.$ac_objext
+if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
+ (eval $ac_compile) 2>conftest.er1
+ ac_status=$?
+ grep -v '^ *+' conftest.er1 >conftest.err
+ rm -f conftest.er1
+ cat conftest.err >&5
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); } &&
+ { ac_try='test -z "$ac_c_werror_flag"
+ || test ! -s conftest.err'
+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+ (eval $ac_try) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); }; } &&
+ { ac_try='test -s conftest.$ac_objext'
+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+ (eval $ac_try) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); }; }; then
+ ac_cv_prog_cc_g=yes
else
- case "$MSGFMT" in
- /*)
- ac_cv_path_MSGFMT="$MSGFMT" # Let the user override the test with a path.
- ;;
- *)
- 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
- if test -z "`$ac_dir/$ac_word -h 2>&1 | grep 'dv '`"; then
- ac_cv_path_MSGFMT="$ac_dir/$ac_word"
- break
- fi
- fi
- done
- IFS="$ac_save_ifs"
- test -z "$ac_cv_path_MSGFMT" && ac_cv_path_MSGFMT="no"
- ;;
-esac
+ echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+ac_cv_prog_cc_g=no
fi
-MSGFMT="$ac_cv_path_MSGFMT"
-if test -n "$MSGFMT"; then
- echo "$ac_t""$MSGFMT" 1>&6
+rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
+fi
+echo "$as_me:$LINENO: result: $ac_cv_prog_cc_g" >&5
+echo "${ECHO_T}$ac_cv_prog_cc_g" >&6
+if test "$ac_test_CFLAGS" = set; then
+ CFLAGS=$ac_save_CFLAGS
+elif test $ac_cv_prog_cc_g = yes; then
+ if test "$GCC" = yes; then
+ CFLAGS="-g -O2"
+ else
+ CFLAGS="-g"
+ fi
else
- echo "$ac_t""no" 1>&6
+ if test "$GCC" = yes; then
+ CFLAGS="-O2"
+ else
+ CFLAGS=
+ fi
fi
- if test "$MSGFMT" != "no"; then
- for ac_func in dcgettext
+echo "$as_me:$LINENO: checking for $CC option to accept ANSI C" >&5
+echo $ECHO_N "checking for $CC option to accept ANSI C... $ECHO_C" >&6
+if test "${ac_cv_prog_cc_stdc+set}" = set; then
+ echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+ ac_cv_prog_cc_stdc=no
+ac_save_CC=$CC
+cat >conftest.$ac_ext <<_ACEOF
+/* confdefs.h. */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h. */
+#include <stdarg.h>
+#include <stdio.h>
+#include <sys/types.h>
+#include <sys/stat.h>
+/* Most of the following tests are stolen from RCS 5.7's src/conf.sh. */
+struct buf { int x; };
+FILE * (*rcsopen) (struct buf *, struct stat *, int);
+static char *e (p, i)
+ char **p;
+ int i;
+{
+ return p[i];
+}
+static char *f (char * (*g) (char **, int), char **p, ...)
+{
+ char *s;
+ va_list v;
+ va_start (v,p);
+ s = g (p, va_arg (v,int));
+ va_end (v);
+ return s;
+}
+
+/* OSF 4.0 Compaq cc is some sort of almost-ANSI by default. It has
+ function prototypes and stuff, but not '\xHH' hex character constants.
+ These don't provoke an error unfortunately, instead are silently treated
+ as 'x'. The following induces an error, until -std1 is added to get
+ proper ANSI mode. Curiously '\x00'!='x' always comes out true, for an
+ array size at least. It's necessary to write '\x00'==0 to get something
+ that's true only with -std1. */
+int osf4_cc_array ['\x00' == 0 ? 1 : -1];
+
+int test (int i, double x);
+struct s1 {int (*f) (int a);};
+struct s2 {int (*f) (double a);};
+int pairnames (int, char **, FILE *(*)(struct buf *, struct stat *, int), int, int);
+int argc;
+char **argv;
+int
+main ()
+{
+return f (e, argv, 0) != argv[0] || f (e, argv, 1) != argv[1];
+ ;
+ return 0;
+}
+_ACEOF
+# Don't try gcc -ansi; that turns off useful extensions and
+# breaks some systems' header files.
+# AIX -qlanglvl=ansi
+# Ultrix and OSF/1 -std1
+# HP-UX 10.20 and later -Ae
+# HP-UX older versions -Aa -D_HPUX_SOURCE
+# SVR4 -Xc -D__EXTENSIONS__
+for ac_arg in "" -qlanglvl=ansi -std1 -Ae "-Aa -D_HPUX_SOURCE" "-Xc -D__EXTENSIONS__"
do
-echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
-echo "configure:3892: 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 3897 "configure"
-#include "confdefs.h"
-/* System header to define __stub macros and hopefully few prototypes,
- which can conflict with char $ac_func(); below. */
-#include <assert.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 $ac_func();
+ CC="$ac_save_CC $ac_arg"
+ rm -f conftest.$ac_objext
+if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
+ (eval $ac_compile) 2>conftest.er1
+ ac_status=$?
+ grep -v '^ *+' conftest.er1 >conftest.err
+ rm -f conftest.er1
+ cat conftest.err >&5
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); } &&
+ { ac_try='test -z "$ac_c_werror_flag"
+ || test ! -s conftest.err'
+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+ (eval $ac_try) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); }; } &&
+ { ac_try='test -s conftest.$ac_objext'
+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+ (eval $ac_try) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); }; }; then
+ ac_cv_prog_cc_stdc=$ac_arg
+break
+else
+ echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+fi
+rm -f conftest.err conftest.$ac_objext
+done
+rm -f conftest.$ac_ext conftest.$ac_objext
+CC=$ac_save_CC
-int main() {
+fi
-/* The GNU C library defines this for functions which it implements
- to always fail with ENOSYS. Some functions are actually named
- something starting with __ and the normal name is an alias. */
-#if defined (__stub_$ac_func) || defined (__stub___$ac_func)
-choke me
-#else
-$ac_func();
+case "x$ac_cv_prog_cc_stdc" in
+ x|xno)
+ echo "$as_me:$LINENO: result: none needed" >&5
+echo "${ECHO_T}none needed" >&6 ;;
+ *)
+ echo "$as_me:$LINENO: result: $ac_cv_prog_cc_stdc" >&5
+echo "${ECHO_T}$ac_cv_prog_cc_stdc" >&6
+ CC="$CC $ac_cv_prog_cc_stdc" ;;
+esac
+
+# Some people use a C++ compiler to compile C. Since we use `exit',
+# in C++ we need to declare it. In case someone uses the same compiler
+# for both compiling C and C++ we need to have the C++ compiler decide
+# the declaration of exit, since it's the most demanding environment.
+cat >conftest.$ac_ext <<_ACEOF
+#ifndef __cplusplus
+ choke me
#endif
+_ACEOF
+rm -f conftest.$ac_objext
+if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
+ (eval $ac_compile) 2>conftest.er1
+ ac_status=$?
+ grep -v '^ *+' conftest.er1 >conftest.err
+ rm -f conftest.er1
+ cat conftest.err >&5
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); } &&
+ { ac_try='test -z "$ac_c_werror_flag"
+ || test ! -s conftest.err'
+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+ (eval $ac_try) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); }; } &&
+ { ac_try='test -s conftest.$ac_objext'
+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+ (eval $ac_try) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); }; }; then
+ for ac_declaration in \
+ '' \
+ 'extern "C" void std::exit (int) throw (); using std::exit;' \
+ 'extern "C" void std::exit (int); using std::exit;' \
+ 'extern "C" void exit (int) throw ();' \
+ 'extern "C" void exit (int);' \
+ 'void exit (int);'
+do
+ cat >conftest.$ac_ext <<_ACEOF
+/* confdefs.h. */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h. */
+$ac_declaration
+#include <stdlib.h>
+int
+main ()
+{
+exit (42);
+ ;
+ return 0;
+}
+_ACEOF
+rm -f conftest.$ac_objext
+if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
+ (eval $ac_compile) 2>conftest.er1
+ ac_status=$?
+ grep -v '^ *+' conftest.er1 >conftest.err
+ rm -f conftest.er1
+ cat conftest.err >&5
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); } &&
+ { ac_try='test -z "$ac_c_werror_flag"
+ || test ! -s conftest.err'
+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+ (eval $ac_try) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); }; } &&
+ { ac_try='test -s conftest.$ac_objext'
+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+ (eval $ac_try) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); }; }; then
+ :
+else
+ echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
-; return 0; }
-EOF
-if { (eval echo configure:3920: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
- rm -rf conftest*
- eval "ac_cv_func_$ac_func=yes"
+continue
+fi
+rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
+ cat >conftest.$ac_ext <<_ACEOF
+/* confdefs.h. */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h. */
+$ac_declaration
+int
+main ()
+{
+exit (42);
+ ;
+ return 0;
+}
+_ACEOF
+rm -f conftest.$ac_objext
+if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
+ (eval $ac_compile) 2>conftest.er1
+ ac_status=$?
+ grep -v '^ *+' conftest.er1 >conftest.err
+ rm -f conftest.er1
+ cat conftest.err >&5
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); } &&
+ { ac_try='test -z "$ac_c_werror_flag"
+ || test ! -s conftest.err'
+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+ (eval $ac_try) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); }; } &&
+ { ac_try='test -s conftest.$ac_objext'
+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+ (eval $ac_try) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); }; }; then
+ break
else
- echo "configure: failed program was:" >&5
- cat conftest.$ac_ext >&5
- rm -rf conftest*
- eval "ac_cv_func_$ac_func=no"
+ echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
fi
+rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
+done
rm -f conftest*
+if test -n "$ac_declaration"; then
+ echo '#ifdef __cplusplus' >>confdefs.h
+ echo $ac_declaration >>confdefs.h
+ echo '#endif' >>confdefs.h
fi
-if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
- echo "$ac_t""yes" 1>&6
- ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
- cat >> confdefs.h <<EOF
-#define $ac_tr_func 1
-EOF
-
else
- echo "$ac_t""no" 1>&6
+ echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
fi
-done
+rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
+ac_ext=c
+ac_cpp='$CPP $CPPFLAGS'
+ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
+ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
+ac_compiler_gnu=$ac_cv_c_compiler_gnu
- # Extract the first word of "gmsgfmt", so it can be a program name with args.
-set dummy gmsgfmt; ac_word=$2
-echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
-echo "configure:3947: checking for $ac_word" >&5
-if eval "test \"`echo '$''{'ac_cv_path_GMSGFMT'+set}'`\" = set"; then
- echo $ac_n "(cached) $ac_c" 1>&6
+# 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
+# AmigaOS /C/install, which installs bootblocks on floppy discs
+# 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"
+# OS/2's system install, which has a completely different semantic
+# ./install, which can be erroneously created by make from ./install.sh.
+echo "$as_me:$LINENO: checking for a BSD-compatible install" >&5
+echo $ECHO_N "checking for a BSD-compatible install... $ECHO_C" >&6
+if test -z "$INSTALL"; then
+if test "${ac_cv_path_install+set}" = set; then
+ echo $ECHO_N "(cached) $ECHO_C" >&6
else
- case "$GMSGFMT" in
- /*)
- ac_cv_path_GMSGFMT="$GMSGFMT" # Let the user override the test with a path.
- ;;
- ?:/*)
- ac_cv_path_GMSGFMT="$GMSGFMT" # Let the user override the test with a dos path.
- ;;
+ as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
+for as_dir in $PATH
+do
+ IFS=$as_save_IFS
+ test -z "$as_dir" && as_dir=.
+ # Account for people who put trailing slashes in PATH elements.
+case $as_dir/ in
+ ./ | .// | /cC/* | \
+ /etc/* | /usr/sbin/* | /usr/etc/* | /sbin/* | /usr/afsws/bin/* | \
+ ?:\\/os2\\/install\\/* | ?:\\/OS2\\/INSTALL\\/* | \
+ /usr/ucb/* ) ;;
*)
- IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":"
- ac_dummy="$PATH"
- for ac_dir in $ac_dummy; do
- test -z "$ac_dir" && ac_dir=.
- if test -f $ac_dir/$ac_word; then
- ac_cv_path_GMSGFMT="$ac_dir/$ac_word"
- break
- fi
- done
- IFS="$ac_save_ifs"
- test -z "$ac_cv_path_GMSGFMT" && ac_cv_path_GMSGFMT="$MSGFMT"
- ;;
+ # 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
+ for ac_exec_ext in '' $ac_executable_extensions; do
+ if $as_executable_p "$as_dir/$ac_prog$ac_exec_ext"; then
+ if test $ac_prog = install &&
+ grep dspmsg "$as_dir/$ac_prog$ac_exec_ext" >/dev/null 2>&1; then
+ # AIX install. It has an incompatible calling convention.
+ :
+ elif test $ac_prog = install &&
+ grep pwplus "$as_dir/$ac_prog$ac_exec_ext" >/dev/null 2>&1; then
+ # program-specific install script used by HP pwplus--don't use.
+ :
+ else
+ ac_cv_path_install="$as_dir/$ac_prog$ac_exec_ext -c"
+ break 3
+ fi
+ fi
+ done
+ done
+ ;;
esac
+done
+
+
fi
-GMSGFMT="$ac_cv_path_GMSGFMT"
-if test -n "$GMSGFMT"; then
- echo "$ac_t""$GMSGFMT" 1>&6
-else
- echo "$ac_t""no" 1>&6
+ 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 "$as_me:$LINENO: result: $INSTALL" >&5
+echo "${ECHO_T}$INSTALL" >&6
- # Extract the first word of "xgettext", so it can be a program name with args.
-set dummy xgettext; ac_word=$2
-echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
-echo "configure:3983: checking for $ac_word" >&5
-if eval "test \"`echo '$''{'ac_cv_path_XGETTEXT'+set}'`\" = set"; then
- echo $ac_n "(cached) $ac_c" 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_SCRIPT" && INSTALL_SCRIPT='${INSTALL}'
+
+test -z "$INSTALL_DATA" && INSTALL_DATA='${INSTALL} -m 644'
+
+
+ALL_LINGUAS="fr sv tr es da vi zh_CN zh_TW ga"
+# If we haven't got the data from the intl directory,
+# assume NLS is disabled.
+USE_NLS=no
+LIBINTL=
+LIBINTL_DEP=
+INCINTL=
+XGETTEXT=
+GMSGFMT=
+POSUB=
+
+if test -f ../intl/config.intl; then
+ . ../intl/config.intl
+fi
+echo "$as_me:$LINENO: checking whether NLS is requested" >&5
+echo $ECHO_N "checking whether NLS is requested... $ECHO_C" >&6
+if test x"$USE_NLS" != xyes; then
+ echo "$as_me:$LINENO: result: no" >&5
+echo "${ECHO_T}no" >&6
else
- case "$XGETTEXT" in
- /*)
- ac_cv_path_XGETTEXT="$XGETTEXT" # Let the user override the test with a path.
- ;;
- *)
- 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
- if test -z "`$ac_dir/$ac_word -h 2>&1 | grep '(HELP)'`"; then
- ac_cv_path_XGETTEXT="$ac_dir/$ac_word"
- break
- fi
+ echo "$as_me:$LINENO: result: yes" >&5
+echo "${ECHO_T}yes" >&6
+
+cat >>confdefs.h <<\_ACEOF
+#define ENABLE_NLS 1
+_ACEOF
+
+
+ echo "$as_me:$LINENO: checking for catalogs to be installed" >&5
+echo $ECHO_N "checking for catalogs to be installed... $ECHO_C" >&6
+ # Look for .po and .gmo files in the source directory.
+ CATALOGS=
+ XLINGUAS=
+ for cat in $srcdir/po/*.gmo $srcdir/po/*.po; do
+ # If there aren't any .gmo files the shell will give us the
+ # literal string "../path/to/srcdir/po/*.gmo" which has to be
+ # weeded out.
+ case "$cat" in *\**)
+ continue;;
+ esac
+ # The quadruple backslash is collapsed to a double backslash
+ # by the backticks, then collapsed again by the double quotes,
+ # leaving us with one backslash in the sed expression (right
+ # before the dot that mustn't act as a wildcard).
+ cat=`echo $cat | sed -e "s!$srcdir/po/!!" -e "s!\\\\.po!.gmo!"`
+ lang=`echo $cat | sed -e "s!\\\\.gmo!!"`
+ # The user is allowed to set LINGUAS to a list of languages to
+ # install catalogs for. If it's empty that means "all of them."
+ if test "x$LINGUAS" = x; then
+ CATALOGS="$CATALOGS $cat"
+ XLINGUAS="$XLINGUAS $lang"
+ else
+ case "$LINGUAS" in *$lang*)
+ CATALOGS="$CATALOGS $cat"
+ XLINGUAS="$XLINGUAS $lang"
+ ;;
+ esac
fi
done
- IFS="$ac_save_ifs"
- test -z "$ac_cv_path_XGETTEXT" && ac_cv_path_XGETTEXT=":"
- ;;
-esac
-fi
-XGETTEXT="$ac_cv_path_XGETTEXT"
-if test -n "$XGETTEXT"; then
- echo "$ac_t""$XGETTEXT" 1>&6
-else
- echo "$ac_t""no" 1>&6
-fi
+ LINGUAS="$XLINGUAS"
+ echo "$as_me:$LINENO: result: $LINGUAS" >&5
+echo "${ECHO_T}$LINGUAS" >&6
- cat > conftest.$ac_ext <<EOF
-#line 4015 "configure"
-#include "confdefs.h"
-int main() {
-extern int _nl_msg_cat_cntr;
- return _nl_msg_cat_cntr
-; return 0; }
-EOF
-if { (eval echo configure:4023: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
- rm -rf conftest*
+ DATADIRNAME=share
+
+ INSTOBJEXT=.mo
+
+ GENCAT=gencat
+
CATOBJEXT=.gmo
- DATADIRNAME=share
-else
- echo "configure: failed program was:" >&5
- cat conftest.$ac_ext >&5
- rm -rf conftest*
- CATOBJEXT=.mo
- DATADIRNAME=lib
+
fi
-rm -f conftest*
- INSTOBJEXT=.mo
- fi
- fi
-
+
+ MKINSTALLDIRS=
+ if test -n "$ac_aux_dir"; then
+ case "$ac_aux_dir" in
+ /*) MKINSTALLDIRS="$ac_aux_dir/mkinstalldirs" ;;
+ *) MKINSTALLDIRS="\$(top_builddir)/$ac_aux_dir/mkinstalldirs" ;;
+ esac
+ fi
+ if test -z "$MKINSTALLDIRS"; then
+ MKINSTALLDIRS="\$(top_srcdir)/mkinstalldirs"
+ fi
+
+
+
+ echo "$as_me:$LINENO: checking whether NLS is requested" >&5
+echo $ECHO_N "checking whether NLS is requested... $ECHO_C" >&6
+ # Check whether --enable-nls or --disable-nls was given.
+if test "${enable_nls+set}" = set; then
+ enableval="$enable_nls"
+ USE_NLS=$enableval
else
- echo "$ac_t""no" 1>&6
-fi
+ USE_NLS=yes
+fi;
+ echo "$as_me:$LINENO: result: $USE_NLS" >&5
+echo "${ECHO_T}$USE_NLS" >&6
-
- if test "$CATOBJEXT" = "NONE"; then
- nls_cv_use_gnu_gettext=yes
- fi
- fi
- if test "$nls_cv_use_gnu_gettext" = "yes"; then
- INTLOBJS="\$(GETTOBJS)"
- # Extract the first word of "msgfmt", so it can be a program name with args.
+
+
+
+# Prepare PATH_SEPARATOR.
+# The user is always right.
+if test "${PATH_SEPARATOR+set}" != set; then
+ echo "#! /bin/sh" >conf$$.sh
+ echo "exit 0" >>conf$$.sh
+ chmod +x conf$$.sh
+ if (PATH="/nonexistent;."; conf$$.sh) >/dev/null 2>&1; then
+ PATH_SEPARATOR=';'
+ else
+ PATH_SEPARATOR=:
+ fi
+ rm -f conf$$.sh
+fi
+
+# Find out how to test for executable files. Don't use a zero-byte file,
+# as systems may use methods other than mode bits to determine executability.
+cat >conf$$.file <<_ASEOF
+#! /bin/sh
+exit 0
+_ASEOF
+chmod +x conf$$.file
+if test -x conf$$.file >/dev/null 2>&1; then
+ ac_executable_p="test -x"
+else
+ ac_executable_p="test -f"
+fi
+rm -f conf$$.file
+
+# Extract the first word of "msgfmt", so it can be a program name with args.
set dummy msgfmt; ac_word=$2
-echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
-echo "configure:4055: checking for $ac_word" >&5
-if eval "test \"`echo '$''{'ac_cv_path_MSGFMT'+set}'`\" = set"; then
- echo $ac_n "(cached) $ac_c" 1>&6
+echo "$as_me:$LINENO: checking for $ac_word" >&5
+echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
+if test "${ac_cv_path_MSGFMT+set}" = set; then
+ echo $ECHO_N "(cached) $ECHO_C" >&6
else
case "$MSGFMT" in
- /*)
- ac_cv_path_MSGFMT="$MSGFMT" # Let the user override the test with a path.
- ;;
+ [\\/]* | ?:[\\/]*)
+ ac_cv_path_MSGFMT="$MSGFMT" # Let the user override the test with a path.
+ ;;
*)
- 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
- if test -z "`$ac_dir/$ac_word -h 2>&1 | grep 'dv '`"; then
- ac_cv_path_MSGFMT="$ac_dir/$ac_word"
- break
- fi
- fi
- done
- IFS="$ac_save_ifs"
- test -z "$ac_cv_path_MSGFMT" && ac_cv_path_MSGFMT="msgfmt"
- ;;
+ ac_save_IFS="$IFS"; IFS=$PATH_SEPARATOR
+ for ac_dir in $PATH; do
+ IFS="$ac_save_IFS"
+ test -z "$ac_dir" && ac_dir=.
+ for ac_exec_ext in '' $ac_executable_extensions; do
+ if $ac_executable_p "$ac_dir/$ac_word$ac_exec_ext"; then
+ if $ac_dir/$ac_word --statistics /dev/null >/dev/null 2>&1 &&
+ (if $ac_dir/$ac_word --statistics /dev/null 2>&1 >/dev/null | grep usage >/dev/null; then exit 1; else exit 0; fi); then
+ ac_cv_path_MSGFMT="$ac_dir/$ac_word$ac_exec_ext"
+ break 2
+ fi
+ fi
+ done
+ done
+ IFS="$ac_save_IFS"
+ test -z "$ac_cv_path_MSGFMT" && ac_cv_path_MSGFMT=":"
+ ;;
esac
fi
MSGFMT="$ac_cv_path_MSGFMT"
-if test -n "$MSGFMT"; then
- echo "$ac_t""$MSGFMT" 1>&6
+if test "$MSGFMT" != ":"; then
+ echo "$as_me:$LINENO: result: $MSGFMT" >&5
+echo "${ECHO_T}$MSGFMT" >&6
else
- echo "$ac_t""no" 1>&6
+ echo "$as_me:$LINENO: result: no" >&5
+echo "${ECHO_T}no" >&6
fi
- # Extract the first word of "gmsgfmt", so it can be a program name with args.
+ # Extract the first word of "gmsgfmt", so it can be a program name with args.
set dummy gmsgfmt; ac_word=$2
-echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
-echo "configure:4089: checking for $ac_word" >&5
-if eval "test \"`echo '$''{'ac_cv_path_GMSGFMT'+set}'`\" = set"; then
- echo $ac_n "(cached) $ac_c" 1>&6
+echo "$as_me:$LINENO: checking for $ac_word" >&5
+echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
+if test "${ac_cv_path_GMSGFMT+set}" = set; then
+ echo $ECHO_N "(cached) $ECHO_C" >&6
else
- case "$GMSGFMT" in
- /*)
+ case $GMSGFMT in
+ [\\/]* | ?:[\\/]*)
ac_cv_path_GMSGFMT="$GMSGFMT" # Let the user override the test with a path.
;;
- ?:/*)
- ac_cv_path_GMSGFMT="$GMSGFMT" # Let the user override the test with a dos path.
- ;;
*)
- IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":"
- ac_dummy="$PATH"
- for ac_dir in $ac_dummy; do
- test -z "$ac_dir" && ac_dir=.
- if test -f $ac_dir/$ac_word; then
- ac_cv_path_GMSGFMT="$ac_dir/$ac_word"
- break
- fi
- done
- IFS="$ac_save_ifs"
+ as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
+for as_dir in $PATH
+do
+ IFS=$as_save_IFS
+ test -z "$as_dir" && as_dir=.
+ for ac_exec_ext in '' $ac_executable_extensions; do
+ if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
+ ac_cv_path_GMSGFMT="$as_dir/$ac_word$ac_exec_ext"
+ echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
+ break 2
+ fi
+done
+done
+
test -z "$ac_cv_path_GMSGFMT" && ac_cv_path_GMSGFMT="$MSGFMT"
;;
esac
fi
-GMSGFMT="$ac_cv_path_GMSGFMT"
+GMSGFMT=$ac_cv_path_GMSGFMT
+
if test -n "$GMSGFMT"; then
- echo "$ac_t""$GMSGFMT" 1>&6
+ echo "$as_me:$LINENO: result: $GMSGFMT" >&5
+echo "${ECHO_T}$GMSGFMT" >&6
+else
+ echo "$as_me:$LINENO: result: no" >&5
+echo "${ECHO_T}no" >&6
+fi
+
+
+
+# Prepare PATH_SEPARATOR.
+# The user is always right.
+if test "${PATH_SEPARATOR+set}" != set; then
+ echo "#! /bin/sh" >conf$$.sh
+ echo "exit 0" >>conf$$.sh
+ chmod +x conf$$.sh
+ if (PATH="/nonexistent;."; conf$$.sh) >/dev/null 2>&1; then
+ PATH_SEPARATOR=';'
+ else
+ PATH_SEPARATOR=:
+ fi
+ rm -f conf$$.sh
+fi
+
+# Find out how to test for executable files. Don't use a zero-byte file,
+# as systems may use methods other than mode bits to determine executability.
+cat >conf$$.file <<_ASEOF
+#! /bin/sh
+exit 0
+_ASEOF
+chmod +x conf$$.file
+if test -x conf$$.file >/dev/null 2>&1; then
+ ac_executable_p="test -x"
else
- echo "$ac_t""no" 1>&6
+ ac_executable_p="test -f"
fi
+rm -f conf$$.file
- # Extract the first word of "xgettext", so it can be a program name with args.
+# Extract the first word of "xgettext", so it can be a program name with args.
set dummy xgettext; ac_word=$2
-echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
-echo "configure:4125: checking for $ac_word" >&5
-if eval "test \"`echo '$''{'ac_cv_path_XGETTEXT'+set}'`\" = set"; then
- echo $ac_n "(cached) $ac_c" 1>&6
+echo "$as_me:$LINENO: checking for $ac_word" >&5
+echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
+if test "${ac_cv_path_XGETTEXT+set}" = set; then
+ echo $ECHO_N "(cached) $ECHO_C" >&6
else
case "$XGETTEXT" in
- /*)
- ac_cv_path_XGETTEXT="$XGETTEXT" # Let the user override the test with a path.
- ;;
+ [\\/]* | ?:[\\/]*)
+ ac_cv_path_XGETTEXT="$XGETTEXT" # Let the user override the test with a path.
+ ;;
*)
- 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
- if test -z "`$ac_dir/$ac_word -h 2>&1 | grep '(HELP)'`"; then
- ac_cv_path_XGETTEXT="$ac_dir/$ac_word"
- break
- fi
- fi
- done
- IFS="$ac_save_ifs"
+ ac_save_IFS="$IFS"; IFS=$PATH_SEPARATOR
+ for ac_dir in $PATH; do
+ IFS="$ac_save_IFS"
+ test -z "$ac_dir" && ac_dir=.
+ for ac_exec_ext in '' $ac_executable_extensions; do
+ if $ac_executable_p "$ac_dir/$ac_word$ac_exec_ext"; then
+ if $ac_dir/$ac_word --omit-header --copyright-holder= --msgid-bugs-address= /dev/null >/dev/null 2>&1 &&
+ (if $ac_dir/$ac_word --omit-header --copyright-holder= --msgid-bugs-address= /dev/null 2>&1 >/dev/null | grep usage >/dev/null; then exit 1; else exit 0; fi); then
+ ac_cv_path_XGETTEXT="$ac_dir/$ac_word$ac_exec_ext"
+ break 2
+ fi
+ fi
+ done
+ done
+ IFS="$ac_save_IFS"
test -z "$ac_cv_path_XGETTEXT" && ac_cv_path_XGETTEXT=":"
- ;;
+ ;;
esac
fi
XGETTEXT="$ac_cv_path_XGETTEXT"
-if test -n "$XGETTEXT"; then
- echo "$ac_t""$XGETTEXT" 1>&6
-else
- echo "$ac_t""no" 1>&6
-fi
-
-
- USE_INCLUDED_LIBINTL=yes
- CATOBJEXT=.gmo
- INSTOBJEXT=.mo
- DATADIRNAME=share
- INTLDEPS='$(top_builddir)/../intl/libintl.a'
- INTLLIBS=$INTLDEPS
- LIBS=`echo $LIBS | sed -e 's/-lintl//'`
- nls_cv_header_intl=libintl.h
- nls_cv_header_libgt=libgettext.h
- fi
-
- if test "$XGETTEXT" != ":"; then
- if $XGETTEXT --omit-header /dev/null 2> /dev/null; then
- : ;
- else
- echo "$ac_t""found xgettext programs is not GNU xgettext; ignore it" 1>&6
- XGETTEXT=":"
- fi
- fi
-
- # We need to process the po/ directory.
- POSUB=po
- else
- DATADIRNAME=share
- nls_cv_header_intl=libintl.h
- nls_cv_header_libgt=libgettext.h
- fi
-
- # If this is used in GNU gettext we have to set USE_NLS to `yes'
- # because some of the sources are only built for this goal.
- if test "$PACKAGE" = gettext; then
- USE_NLS=yes
- USE_INCLUDED_LIBINTL=yes
- fi
+if test "$XGETTEXT" != ":"; then
+ echo "$as_me:$LINENO: result: $XGETTEXT" >&5
+echo "${ECHO_T}$XGETTEXT" >&6
+else
+ echo "$as_me:$LINENO: result: no" >&5
+echo "${ECHO_T}no" >&6
+fi
- for lang in $ALL_LINGUAS; do
- GMOFILES="$GMOFILES $lang.gmo"
- POFILES="$POFILES $lang.po"
- done
+ rm -f messages.po
-
-
-
-
-
-
-
-
-
-
-
-
-
- if test "x$CATOBJEXT" != "x"; then
- if test "x$ALL_LINGUAS" = "x"; then
- LINGUAS=
- else
- echo $ac_n "checking for catalogs to be installed""... $ac_c" 1>&6
-echo "configure:4215: checking for catalogs to be installed" >&5
- NEW_LINGUAS=
- for lang in ${LINGUAS=$ALL_LINGUAS}; do
- case "$ALL_LINGUAS" in
- *$lang*) NEW_LINGUAS="$NEW_LINGUAS $lang" ;;
- esac
- done
- LINGUAS=$NEW_LINGUAS
- echo "$ac_t""$LINGUAS" 1>&6
- fi
- if test -n "$LINGUAS"; then
- for lang in $LINGUAS; do CATALOGS="$CATALOGS $lang$CATOBJEXT"; done
- fi
- fi
+# Prepare PATH_SEPARATOR.
+# The user is always right.
+if test "${PATH_SEPARATOR+set}" != set; then
+ echo "#! /bin/sh" >conf$$.sh
+ echo "exit 0" >>conf$$.sh
+ chmod +x conf$$.sh
+ if (PATH="/nonexistent;."; conf$$.sh) >/dev/null 2>&1; then
+ PATH_SEPARATOR=';'
+ else
+ PATH_SEPARATOR=:
+ fi
+ rm -f conf$$.sh
+fi
- if test $ac_cv_header_locale_h = yes; then
- INCLUDE_LOCALE_H="#include <locale.h>"
- else
- INCLUDE_LOCALE_H="\
-/* The system does not provide the header <locale.h>. Take care yourself. */"
- fi
-
-
- if test -f $srcdir/po2tbl.sed.in; then
- if test "$CATOBJEXT" = ".cat"; then
- ac_safe=`echo "linux/version.h" | sed 'y%./+-%__p_%'`
-echo $ac_n "checking for linux/version.h""... $ac_c" 1>&6
-echo "configure:4243: checking for linux/version.h" >&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 4248 "configure"
-#include "confdefs.h"
-#include <linux/version.h>
-EOF
-ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
-{ (eval echo configure:4253: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
-ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
-if test -z "$ac_err"; then
- rm -rf conftest*
- eval "ac_cv_header_$ac_safe=yes"
+# Find out how to test for executable files. Don't use a zero-byte file,
+# as systems may use methods other than mode bits to determine executability.
+cat >conf$$.file <<_ASEOF
+#! /bin/sh
+exit 0
+_ASEOF
+chmod +x conf$$.file
+if test -x conf$$.file >/dev/null 2>&1; then
+ ac_executable_p="test -x"
else
- echo "$ac_err" >&5
- echo "configure: failed program was:" >&5
- cat conftest.$ac_ext >&5
- rm -rf conftest*
- eval "ac_cv_header_$ac_safe=no"
+ ac_executable_p="test -f"
fi
-rm -f conftest*
+rm -f conf$$.file
+
+# Extract the first word of "msgmerge", so it can be a program name with args.
+set dummy msgmerge; ac_word=$2
+echo "$as_me:$LINENO: checking for $ac_word" >&5
+echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
+if test "${ac_cv_path_MSGMERGE+set}" = set; then
+ echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+ case "$MSGMERGE" in
+ [\\/]* | ?:[\\/]*)
+ ac_cv_path_MSGMERGE="$MSGMERGE" # Let the user override the test with a path.
+ ;;
+ *)
+ ac_save_IFS="$IFS"; IFS=$PATH_SEPARATOR
+ for ac_dir in $PATH; do
+ IFS="$ac_save_IFS"
+ test -z "$ac_dir" && ac_dir=.
+ for ac_exec_ext in '' $ac_executable_extensions; do
+ if $ac_executable_p "$ac_dir/$ac_word$ac_exec_ext"; then
+ if $ac_dir/$ac_word --update -q /dev/null /dev/null >/dev/null 2>&1; then
+ ac_cv_path_MSGMERGE="$ac_dir/$ac_word$ac_exec_ext"
+ break 2
+ fi
+ fi
+ done
+ done
+ IFS="$ac_save_IFS"
+ test -z "$ac_cv_path_MSGMERGE" && ac_cv_path_MSGMERGE=":"
+ ;;
+esac
fi
-if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
- echo "$ac_t""yes" 1>&6
- msgformat=linux
+MSGMERGE="$ac_cv_path_MSGMERGE"
+if test "$MSGMERGE" != ":"; then
+ echo "$as_me:$LINENO: result: $MSGMERGE" >&5
+echo "${ECHO_T}$MSGMERGE" >&6
else
- echo "$ac_t""no" 1>&6
-msgformat=xopen
+ echo "$as_me:$LINENO: result: no" >&5
+echo "${ECHO_T}no" >&6
fi
- sed -e '/^#/d' $srcdir/$msgformat-msg.sed > po2msg.sed
- fi
- sed -e '/^#.*[^\\]$/d' -e '/^#$/d' \
- $srcdir/po2tbl.sed.in > po2tbl.sed
- fi
-
- if test "$PACKAGE" = "gettext"; then
- GT_NO="#NO#"
- GT_YES=
- else
- GT_NO=
- GT_YES="#YES#"
- fi
-
-
-
- MKINSTALLDIRS="\$(srcdir)/../../mkinstalldirs"
-
-
- l=
-
+ if test "$GMSGFMT" != ":"; then
+ if $GMSGFMT --statistics /dev/null >/dev/null 2>&1 &&
+ (if $GMSGFMT --statistics /dev/null 2>&1 >/dev/null | grep usage >/dev/null; then exit 1; else exit 0; fi); then
+ : ;
+ else
+ GMSGFMT=`echo "$GMSGFMT" | sed -e 's,^.*/,,'`
+ echo "$as_me:$LINENO: result: found $GMSGFMT program is not GNU msgfmt; ignore it" >&5
+echo "${ECHO_T}found $GMSGFMT program is not GNU msgfmt; ignore it" >&6
+ GMSGFMT=":"
+ fi
+ fi
- if test -f $srcdir/po/POTFILES.in; then
- test -d po || mkdir po
- if test "x$srcdir" != "x."; then
- if test "x`echo $srcdir | sed 's@/.*@@'`" = "x"; then
- posrcprefix="$srcdir/"
- else
- posrcprefix="../$srcdir/"
- fi
- else
- posrcprefix="../"
- fi
- rm -f po/POTFILES
- sed -e "/^#/d" -e "/^\$/d" -e "s,.*, $posrcprefix& \\\\," -e "\$s/\(.*\) \\\\/\1/" \
- < $srcdir/po/POTFILES.in > po/POTFILES
- fi
-
+ if test "$XGETTEXT" != ":"; then
+ if $XGETTEXT --omit-header --copyright-holder= --msgid-bugs-address= /dev/null >/dev/null 2>&1 &&
+ (if $XGETTEXT --omit-header --copyright-holder= --msgid-bugs-address= /dev/null 2>&1 >/dev/null | grep usage >/dev/null; then exit 1; else exit 0; fi); then
+ : ;
+ else
+ echo "$as_me:$LINENO: result: found xgettext program is not GNU xgettext; ignore it" >&5
+echo "${ECHO_T}found xgettext program is not GNU xgettext; ignore it" >&6
+ XGETTEXT=":"
+ fi
+ rm -f messages.po
+ fi
+ ac_config_commands="$ac_config_commands default-1"
-echo $ac_n "checking for executable suffix""... $ac_c" 1>&6
-echo "configure:4318: checking for executable suffix" >&5
-if eval "test \"`echo '$''{'ac_cv_exeext'+set}'`\" = set"; then
- echo $ac_n "(cached) $ac_c" 1>&6
-else
- if test "$CYGWIN" = yes || test "$MINGW32" = yes; then
- ac_cv_exeext=.exe
-else
- rm -f conftest*
- echo 'int main () { return 0; }' > conftest.$ac_ext
- ac_cv_exeext=
- if { (eval echo configure:4328: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; }; then
- for file in conftest.*; do
- case $file in
- *.c | *.o | *.obj | *.ilk | *.pdb) ;;
- *) ac_cv_exeext=`echo $file | sed -e s/conftest//` ;;
- esac
- done
- else
- { echo "configure: error: installation or configuration problem: compiler cannot create executables." 1>&2; exit 1; }
- fi
- rm -f conftest*
- test x"${ac_cv_exeext}" = x && ac_cv_exeext=no
-fi
-fi
-EXEEXT=""
-test x"${ac_cv_exeext}" != xno && EXEEXT=${ac_cv_exeext}
-echo "$ac_t""${ac_cv_exeext}" 1>&6
-ac_exeext=$EXEEXT
for ac_prog in 'bison -y' byacc
do
-# Extract the first word of "$ac_prog", so it can be a program name with args.
+ # 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:4354: checking for $ac_word" >&5
-if eval "test \"`echo '$''{'ac_cv_prog_YACC'+set}'`\" = set"; then
- echo $ac_n "(cached) $ac_c" 1>&6
+echo "$as_me:$LINENO: checking for $ac_word" >&5
+echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
+if test "${ac_cv_prog_YACC+set}" = set; then
+ echo $ECHO_N "(cached) $ECHO_C" >&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=":"
- ac_dummy="$PATH"
- for ac_dir in $ac_dummy; 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"
+as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
+for as_dir in $PATH
+do
+ IFS=$as_save_IFS
+ test -z "$as_dir" && as_dir=.
+ for ac_exec_ext in '' $ac_executable_extensions; do
+ if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
+ ac_cv_prog_YACC="$ac_prog"
+ echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
+ break 2
+ fi
+done
+done
+
fi
fi
-YACC="$ac_cv_prog_YACC"
+YACC=$ac_cv_prog_YACC
if test -n "$YACC"; then
- echo "$ac_t""$YACC" 1>&6
+ echo "$as_me:$LINENO: result: $YACC" >&5
+echo "${ECHO_T}$YACC" >&6
else
- echo "$ac_t""no" 1>&6
+ echo "$as_me:$LINENO: result: no" >&5
+echo "${ECHO_T}no" >&6
fi
-test -n "$YACC" && break
+ test -n "$YACC" && break
done
test -n "$YACC" || YACC="yacc"
-missing_dir=`cd $ac_aux_dir && pwd`
for ac_prog in flex lex
do
-# Extract the first word of "$ac_prog", so it can be a program name with args.
+ # 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:4390: checking for $ac_word" >&5
-if eval "test \"`echo '$''{'ac_cv_prog_LEX'+set}'`\" = set"; then
- echo $ac_n "(cached) $ac_c" 1>&6
+echo "$as_me:$LINENO: checking for $ac_word" >&5
+echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
+if test "${ac_cv_prog_LEX+set}" = set; then
+ echo $ECHO_N "(cached) $ECHO_C" >&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=":"
- ac_dummy="$PATH"
- for ac_dir in $ac_dummy; do
- test -z "$ac_dir" && ac_dir=.
- if test -f $ac_dir/$ac_word; then
- ac_cv_prog_LEX="$ac_prog"
- break
- fi
- done
- IFS="$ac_save_ifs"
-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
-
-test -n "$LEX" && break
+as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
+for as_dir in $PATH
+do
+ IFS=$as_save_IFS
+ test -z "$as_dir" && as_dir=.
+ for ac_exec_ext in '' $ac_executable_extensions; do
+ if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
+ ac_cv_prog_LEX="$ac_prog"
+ echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
+ break 2
+ fi
+done
done
-test -n "$LEX" || LEX=""$missing_dir/missing flex""
-# 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:4423: 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=":"
- ac_dummy="$PATH"
- for ac_dir in $ac_dummy; 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"
+LEX=$ac_cv_prog_LEX
if test -n "$LEX"; then
- echo "$ac_t""$LEX" 1>&6
+ echo "$as_me:$LINENO: result: $LEX" >&5
+echo "${ECHO_T}$LEX" >&6
else
- echo "$ac_t""no" 1>&6
+ echo "$as_me:$LINENO: result: no" >&5
+echo "${ECHO_T}no" >&6
fi
+ test -n "$LEX" && break
+done
+test -n "$LEX" || LEX=":"
+
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:4457: 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 4465 "configure"
-#include "confdefs.h"
+ echo "$as_me:$LINENO: checking for yywrap in -lfl" >&5
+echo $ECHO_N "checking for yywrap in -lfl... $ECHO_C" >&6
+if test "${ac_cv_lib_fl_yywrap+set}" = set; then
+ echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+ ac_check_lib_save_LIBS=$LIBS
+LIBS="-lfl $LIBS"
+cat >conftest.$ac_ext <<_ACEOF
+/* confdefs.h. */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h. */
+
/* Override any gcc2 internal prototype to avoid an error. */
+#ifdef __cplusplus
+extern "C"
+#endif
/* 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:4476: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; 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
+ builtin and then its argument prototype would still apply. */
+char yywrap ();
+int
+main ()
+{
+yywrap ();
+ ;
+ return 0;
+}
+_ACEOF
+rm -f conftest.$ac_objext conftest$ac_exeext
+if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
+ (eval $ac_link) 2>conftest.er1
+ ac_status=$?
+ grep -v '^ *+' conftest.er1 >conftest.err
+ rm -f conftest.er1
+ cat conftest.err >&5
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); } &&
+ { ac_try='test -z "$ac_c_werror_flag"
+ || test ! -s conftest.err'
+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+ (eval $ac_try) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); }; } &&
+ { ac_try='test -s conftest$ac_exeext'
+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+ (eval $ac_try) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); }; }; then
+ ac_cv_lib_fl_yywrap=yes
+else
+ echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+ac_cv_lib_fl_yywrap=no
+fi
+rm -f conftest.err conftest.$ac_objext \
+ conftest$ac_exeext conftest.$ac_ext
+LIBS=$ac_check_lib_save_LIBS
+fi
+echo "$as_me:$LINENO: result: $ac_cv_lib_fl_yywrap" >&5
+echo "${ECHO_T}$ac_cv_lib_fl_yywrap" >&6
+if test $ac_cv_lib_fl_yywrap = yes; then
+ LEXLIB="-lfl"
+else
+ echo "$as_me:$LINENO: checking for yywrap in -ll" >&5
+echo $ECHO_N "checking for yywrap in -ll... $ECHO_C" >&6
+if test "${ac_cv_lib_l_yywrap+set}" = set; then
+ echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+ ac_check_lib_save_LIBS=$LIBS
+LIBS="-ll $LIBS"
+cat >conftest.$ac_ext <<_ACEOF
+/* confdefs.h. */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h. */
-echo $ac_n "checking lex output file root""... $ac_c" 1>&6
-echo "configure:4499: 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
+/* Override any gcc2 internal prototype to avoid an error. */
+#ifdef __cplusplus
+extern "C"
+#endif
+/* 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;
+}
+_ACEOF
+rm -f conftest.$ac_objext conftest$ac_exeext
+if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
+ (eval $ac_link) 2>conftest.er1
+ ac_status=$?
+ grep -v '^ *+' conftest.er1 >conftest.err
+ rm -f conftest.er1
+ cat conftest.err >&5
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); } &&
+ { ac_try='test -z "$ac_c_werror_flag"
+ || test ! -s conftest.err'
+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+ (eval $ac_try) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); }; } &&
+ { ac_try='test -s conftest$ac_exeext'
+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+ (eval $ac_try) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); }; }; then
+ ac_cv_lib_l_yywrap=yes
+else
+ echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+ac_cv_lib_l_yywrap=no
+fi
+rm -f conftest.err conftest.$ac_objext \
+ conftest$ac_exeext conftest.$ac_ext
+LIBS=$ac_check_lib_save_LIBS
+fi
+echo "$as_me:$LINENO: result: $ac_cv_lib_l_yywrap" >&5
+echo "${ECHO_T}$ac_cv_lib_l_yywrap" >&6
+if test $ac_cv_lib_l_yywrap = yes; then
+ LEXLIB="-ll"
+fi
+
+fi
+
+fi
+
+if test "x$LEX" != "x:"; then
+ echo "$as_me:$LINENO: checking lex output file root" >&5
+echo $ECHO_N "checking lex output file root... $ECHO_C" >&6
+if test "${ac_cv_prog_lex_root+set}" = set; then
+ echo $ECHO_N "(cached) $ECHO_C" >&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
+cat >conftest.l <<_ACEOF
+%%
+%%
+_ACEOF
+{ (eval echo "$as_me:$LINENO: \"$LEX conftest.l\"") >&5
+ (eval $LEX conftest.l) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); }
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; }
+ { { echo "$as_me:$LINENO: error: cannot find output from $LEX; giving up" >&5
+echo "$as_me: error: cannot find output from $LEX; giving up" >&2;}
+ { (exit 1); exit 1; }; }
fi
fi
-
-echo "$ac_t""$ac_cv_prog_lex_root" 1>&6
+echo "$as_me:$LINENO: result: $ac_cv_prog_lex_root" >&5
+echo "${ECHO_T}$ac_cv_prog_lex_root" >&6
+rm -f conftest.l
LEX_OUTPUT_ROOT=$ac_cv_prog_lex_root
-echo $ac_n "checking whether yytext is a pointer""... $ac_c" 1>&6
-echo "configure:4520: 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
+echo "$as_me:$LINENO: checking whether yytext is a pointer" >&5
+echo $ECHO_N "checking whether yytext is a pointer... $ECHO_C" >&6
+if test "${ac_cv_prog_lex_yytext_pointer+set}" = set; then
+ echo $ECHO_N "(cached) $ECHO_C" >&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"
+ac_save_LIBS=$LIBS
LIBS="$LIBS $LEXLIB"
-cat > conftest.$ac_ext <<EOF
-#line 4532 "configure"
-#include "confdefs.h"
+cat >conftest.$ac_ext <<_ACEOF
`cat $LEX_OUTPUT_ROOT.c`
-int main() {
-
-; return 0; }
-EOF
-if { (eval echo configure:4539: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
- rm -rf conftest*
+_ACEOF
+rm -f conftest.$ac_objext conftest$ac_exeext
+if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
+ (eval $ac_link) 2>conftest.er1
+ ac_status=$?
+ grep -v '^ *+' conftest.er1 >conftest.err
+ rm -f conftest.er1
+ cat conftest.err >&5
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); } &&
+ { ac_try='test -z "$ac_c_werror_flag"
+ || test ! -s conftest.err'
+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+ (eval $ac_try) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); }; } &&
+ { ac_try='test -s conftest$ac_exeext'
+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+ (eval $ac_try) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); }; }; then
ac_cv_prog_lex_yytext_pointer=yes
else
- echo "configure: failed program was:" >&5
- cat conftest.$ac_ext >&5
+ echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
fi
-rm -f conftest*
-LIBS="$ac_save_LIBS"
+rm -f conftest.err conftest.$ac_objext \
+ conftest$ac_exeext conftest.$ac_ext
+LIBS=$ac_save_LIBS
rm -f "${LEX_OUTPUT_ROOT}.c"
fi
-
-echo "$ac_t""$ac_cv_prog_lex_yytext_pointer" 1>&6
+echo "$as_me:$LINENO: result: $ac_cv_prog_lex_yytext_pointer" >&5
+echo "${ECHO_T}$ac_cv_prog_lex_yytext_pointer" >&6
if test $ac_cv_prog_lex_yytext_pointer = yes; then
- cat >> confdefs.h <<\EOF
+
+cat >>confdefs.h <<\_ACEOF
#define YYTEXT_POINTER 1
-EOF
+_ACEOF
fi
+fi
+if test "$LEX" = :; then
+ LEX=${am_missing_run}flex
+fi
-echo $ac_n "checking whether to enable maintainer-specific portions of Makefiles""... $ac_c" 1>&6
-echo "configure:4562: checking whether to enable maintainer-specific portions of Makefiles" >&5
+echo "$as_me:$LINENO: checking whether to enable maintainer-specific portions of Makefiles" >&5
+echo $ECHO_N "checking whether to enable maintainer-specific portions of Makefiles... $ECHO_C" >&6
# 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
+fi;
+ echo "$as_me:$LINENO: result: $USE_MAINTAINER_MODE" >&5
+echo "${ECHO_T}$USE_MAINTAINER_MODE" >&6
- echo "$ac_t""$USE_MAINTAINER_MODE" 1>&6
-
if test $USE_MAINTAINER_MODE = yes; then
MAINTAINER_MODE_TRUE=
@@ -4577,8 +11206,19 @@ else
MAINTAINER_MODE_TRUE='#'
MAINTAINER_MODE_FALSE=
fi
+
MAINT=$MAINTAINER_MODE_TRUE
-
+
+
+
+
+if false; then
+ GENINSRC_NEVER_TRUE=
+ GENINSRC_NEVER_FALSE='#'
+else
+ GENINSRC_NEVER_TRUE='#'
+ GENINSRC_NEVER_FALSE=
+fi
. ${srcdir}/configure.host
@@ -4588,504 +11228,1084 @@ fi
-for ac_hdr in string.h strings.h stdlib.h unistd.h
+
+
+
+
+
+
+
+for ac_header in string.h strings.h stdlib.h unistd.h elf-hints.h limits.h sys/param.h
do
-ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
-echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
-echo "configure:4596: 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 4601 "configure"
-#include "confdefs.h"
-#include <$ac_hdr>
-EOF
-ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
-{ (eval echo configure:4606: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
-ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
-if test -z "$ac_err"; then
- rm -rf conftest*
- eval "ac_cv_header_$ac_safe=yes"
+as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
+if eval "test \"\${$as_ac_Header+set}\" = set"; then
+ echo "$as_me:$LINENO: checking for $ac_header" >&5
+echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
+if eval "test \"\${$as_ac_Header+set}\" = set"; then
+ echo $ECHO_N "(cached) $ECHO_C" >&6
+fi
+echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5
+echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
+else
+ # Is the header compilable?
+echo "$as_me:$LINENO: checking $ac_header usability" >&5
+echo $ECHO_N "checking $ac_header usability... $ECHO_C" >&6
+cat >conftest.$ac_ext <<_ACEOF
+/* confdefs.h. */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h. */
+$ac_includes_default
+#include <$ac_header>
+_ACEOF
+rm -f conftest.$ac_objext
+if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
+ (eval $ac_compile) 2>conftest.er1
+ ac_status=$?
+ grep -v '^ *+' conftest.er1 >conftest.err
+ rm -f conftest.er1
+ cat conftest.err >&5
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); } &&
+ { ac_try='test -z "$ac_c_werror_flag"
+ || test ! -s conftest.err'
+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+ (eval $ac_try) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); }; } &&
+ { ac_try='test -s conftest.$ac_objext'
+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+ (eval $ac_try) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); }; }; then
+ ac_header_compiler=yes
+else
+ echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+ac_header_compiler=no
+fi
+rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
+echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
+echo "${ECHO_T}$ac_header_compiler" >&6
+
+# Is the header present?
+echo "$as_me:$LINENO: checking $ac_header presence" >&5
+echo $ECHO_N "checking $ac_header presence... $ECHO_C" >&6
+cat >conftest.$ac_ext <<_ACEOF
+/* confdefs.h. */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h. */
+#include <$ac_header>
+_ACEOF
+if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5
+ (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
+ ac_status=$?
+ grep -v '^ *+' conftest.er1 >conftest.err
+ rm -f conftest.er1
+ cat conftest.err >&5
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); } >/dev/null; then
+ if test -s conftest.err; then
+ ac_cpp_err=$ac_c_preproc_warn_flag
+ ac_cpp_err=$ac_cpp_err$ac_c_werror_flag
+ else
+ ac_cpp_err=
+ fi
else
- echo "$ac_err" >&5
- echo "configure: failed program was:" >&5
- cat conftest.$ac_ext >&5
- rm -rf conftest*
- eval "ac_cv_header_$ac_safe=no"
+ ac_cpp_err=yes
fi
-rm -f conftest*
+if test -z "$ac_cpp_err"; then
+ ac_header_preproc=yes
+else
+ echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+ ac_header_preproc=no
fi
-if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
- echo "$ac_t""yes" 1>&6
- ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
- cat >> confdefs.h <<EOF
-#define $ac_tr_hdr 1
-EOF
-
+rm -f conftest.err conftest.$ac_ext
+echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
+echo "${ECHO_T}$ac_header_preproc" >&6
+
+# So? What about this header?
+case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in
+ yes:no: )
+ { echo "$as_me:$LINENO: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&5
+echo "$as_me: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&2;}
+ { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the compiler's result" >&5
+echo "$as_me: WARNING: $ac_header: proceeding with the compiler's result" >&2;}
+ ac_header_preproc=yes
+ ;;
+ no:yes:* )
+ { echo "$as_me:$LINENO: WARNING: $ac_header: present but cannot be compiled" >&5
+echo "$as_me: WARNING: $ac_header: present but cannot be compiled" >&2;}
+ { echo "$as_me:$LINENO: WARNING: $ac_header: check for missing prerequisite headers?" >&5
+echo "$as_me: WARNING: $ac_header: check for missing prerequisite headers?" >&2;}
+ { echo "$as_me:$LINENO: WARNING: $ac_header: see the Autoconf documentation" >&5
+echo "$as_me: WARNING: $ac_header: see the Autoconf documentation" >&2;}
+ { echo "$as_me:$LINENO: WARNING: $ac_header: section \"Present But Cannot Be Compiled\"" >&5
+echo "$as_me: WARNING: $ac_header: section \"Present But Cannot Be Compiled\"" >&2;}
+ { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the preprocessor's result" >&5
+echo "$as_me: WARNING: $ac_header: proceeding with the preprocessor's result" >&2;}
+ { echo "$as_me:$LINENO: WARNING: $ac_header: in the future, the compiler will take precedence" >&5
+echo "$as_me: WARNING: $ac_header: in the future, the compiler will take precedence" >&2;}
+ (
+ cat <<\_ASBOX
+## ------------------------------------------ ##
+## Report this to the AC_PACKAGE_NAME lists. ##
+## ------------------------------------------ ##
+_ASBOX
+ ) |
+ sed "s/^/$as_me: WARNING: /" >&2
+ ;;
+esac
+echo "$as_me:$LINENO: checking for $ac_header" >&5
+echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
+if eval "test \"\${$as_ac_Header+set}\" = set"; then
+ echo $ECHO_N "(cached) $ECHO_C" >&6
else
- echo "$ac_t""no" 1>&6
+ eval "$as_ac_Header=\$ac_header_preproc"
+fi
+echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5
+echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
+
+fi
+if test `eval echo '${'$as_ac_Header'}'` = yes; then
+ cat >>confdefs.h <<_ACEOF
+#define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
+_ACEOF
+
fi
+
done
-for ac_func in sbrk realpath
+
+
+
+
+
+for ac_func in glob mkstemp realpath sbrk waitpid
do
-echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
-echo "configure:4635: 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 4640 "configure"
-#include "confdefs.h"
+as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
+echo "$as_me:$LINENO: checking for $ac_func" >&5
+echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6
+if eval "test \"\${$as_ac_var+set}\" = set"; then
+ echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+ cat >conftest.$ac_ext <<_ACEOF
+/* confdefs.h. */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h. */
+/* Define $ac_func to an innocuous variant, in case <limits.h> declares $ac_func.
+ For example, HP-UX 11i <limits.h> declares gettimeofday. */
+#define $ac_func innocuous_$ac_func
+
/* System header to define __stub macros and hopefully few prototypes,
- which can conflict with char $ac_func(); below. */
-#include <assert.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 $ac_func();
+ which can conflict with char $ac_func (); below.
+ Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
+ <limits.h> exists even on freestanding compilers. */
-int main() {
+#ifdef __STDC__
+# include <limits.h>
+#else
+# include <assert.h>
+#endif
+#undef $ac_func
+
+/* Override any gcc2 internal prototype to avoid an error. */
+#ifdef __cplusplus
+extern "C"
+{
+#endif
+/* We use char because int might match the return type of a gcc2
+ builtin and then its argument prototype would still apply. */
+char $ac_func ();
/* The GNU C library defines this for functions which it implements
to always fail with ENOSYS. Some functions are actually named
something starting with __ and the normal name is an alias. */
#if defined (__stub_$ac_func) || defined (__stub___$ac_func)
choke me
#else
-$ac_func();
+char (*f) () = $ac_func;
+#endif
+#ifdef __cplusplus
+}
#endif
-; return 0; }
-EOF
-if { (eval echo configure:4663: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
- rm -rf conftest*
- eval "ac_cv_func_$ac_func=yes"
-else
- echo "configure: failed program was:" >&5
- cat conftest.$ac_ext >&5
- rm -rf conftest*
- eval "ac_cv_func_$ac_func=no"
-fi
-rm -f conftest*
-fi
+int
+main ()
+{
+return f != $ac_func;
+ ;
+ return 0;
+}
+_ACEOF
+rm -f conftest.$ac_objext conftest$ac_exeext
+if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
+ (eval $ac_link) 2>conftest.er1
+ ac_status=$?
+ grep -v '^ *+' conftest.er1 >conftest.err
+ rm -f conftest.er1
+ cat conftest.err >&5
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); } &&
+ { ac_try='test -z "$ac_c_werror_flag"
+ || test ! -s conftest.err'
+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+ (eval $ac_try) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); }; } &&
+ { ac_try='test -s conftest$ac_exeext'
+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+ (eval $ac_try) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); }; }; then
+ eval "$as_ac_var=yes"
+else
+ echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+eval "$as_ac_var=no"
+fi
+rm -f conftest.err conftest.$ac_objext \
+ conftest$ac_exeext conftest.$ac_ext
+fi
+echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_var'}'`" >&5
+echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6
+if test `eval echo '${'$as_ac_var'}'` = yes; then
+ cat >>confdefs.h <<_ACEOF
+#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
+_ACEOF
-if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
- echo "$ac_t""yes" 1>&6
- ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
- cat >> confdefs.h <<EOF
-#define $ac_tr_func 1
-EOF
-
-else
- echo "$ac_t""no" 1>&6
fi
done
+
+
+
+
+
ac_header_dirent=no
-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:4692: 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 4697 "configure"
-#include "confdefs.h"
+for ac_hdr in dirent.h sys/ndir.h sys/dir.h ndir.h; do
+ as_ac_Header=`echo "ac_cv_header_dirent_$ac_hdr" | $as_tr_sh`
+echo "$as_me:$LINENO: checking for $ac_hdr that defines DIR" >&5
+echo $ECHO_N "checking for $ac_hdr that defines DIR... $ECHO_C" >&6
+if eval "test \"\${$as_ac_Header+set}\" = set"; then
+ echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+ cat >conftest.$ac_ext <<_ACEOF
+/* confdefs.h. */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h. */
#include <sys/types.h>
#include <$ac_hdr>
-int main() {
-DIR *dirp = 0;
-; return 0; }
-EOF
-if { (eval echo configure:4705: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
- rm -rf conftest*
- eval "ac_cv_header_dirent_$ac_safe=yes"
-else
- echo "configure: failed program was:" >&5
- cat conftest.$ac_ext >&5
- rm -rf conftest*
- eval "ac_cv_header_dirent_$ac_safe=no"
-fi
-rm -f conftest*
-fi
-if eval "test \"`echo '$ac_cv_header_dirent_'$ac_safe`\" = yes"; then
- echo "$ac_t""yes" 1>&6
- ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
- cat >> confdefs.h <<EOF
-#define $ac_tr_hdr 1
-EOF
- ac_header_dirent=$ac_hdr; break
-else
- echo "$ac_t""no" 1>&6
+
+int
+main ()
+{
+if ((DIR *) 0)
+return 0;
+ ;
+ return 0;
+}
+_ACEOF
+rm -f conftest.$ac_objext
+if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
+ (eval $ac_compile) 2>conftest.er1
+ ac_status=$?
+ grep -v '^ *+' conftest.er1 >conftest.err
+ rm -f conftest.er1
+ cat conftest.err >&5
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); } &&
+ { ac_try='test -z "$ac_c_werror_flag"
+ || test ! -s conftest.err'
+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+ (eval $ac_try) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); }; } &&
+ { ac_try='test -s conftest.$ac_objext'
+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+ (eval $ac_try) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); }; }; then
+ eval "$as_ac_Header=yes"
+else
+ echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+eval "$as_ac_Header=no"
+fi
+rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
+fi
+echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5
+echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
+if test `eval echo '${'$as_ac_Header'}'` = yes; then
+ cat >>confdefs.h <<_ACEOF
+#define `echo "HAVE_$ac_hdr" | $as_tr_cpp` 1
+_ACEOF
+
+ac_header_dirent=$ac_hdr; break
fi
+
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:4730: 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
-else
- ac_save_LIBS="$LIBS"
-LIBS="-ldir $LIBS"
-cat > conftest.$ac_ext <<EOF
-#line 4738 "configure"
-#include "confdefs.h"
+ echo "$as_me:$LINENO: checking for library containing opendir" >&5
+echo $ECHO_N "checking for library containing opendir... $ECHO_C" >&6
+if test "${ac_cv_search_opendir+set}" = set; then
+ echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+ ac_func_search_save_LIBS=$LIBS
+ac_cv_search_opendir=no
+cat >conftest.$ac_ext <<_ACEOF
+/* confdefs.h. */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h. */
+
/* Override any gcc2 internal prototype to avoid an error. */
+#ifdef __cplusplus
+extern "C"
+#endif
/* We use char because int might match the return type of a gcc2
- builtin and then its argument prototype would still apply. */
-char opendir();
-
-int main() {
-opendir()
-; return 0; }
-EOF
-if { (eval echo configure:4749: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; 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
- LIBS="$LIBS -ldir"
-else
- echo "$ac_t""no" 1>&6
-fi
+ builtin and then its argument prototype would still apply. */
+char opendir ();
+int
+main ()
+{
+opendir ();
+ ;
+ return 0;
+}
+_ACEOF
+rm -f conftest.$ac_objext conftest$ac_exeext
+if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
+ (eval $ac_link) 2>conftest.er1
+ ac_status=$?
+ grep -v '^ *+' conftest.er1 >conftest.err
+ rm -f conftest.er1
+ cat conftest.err >&5
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); } &&
+ { ac_try='test -z "$ac_c_werror_flag"
+ || test ! -s conftest.err'
+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+ (eval $ac_try) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); }; } &&
+ { ac_try='test -s conftest$ac_exeext'
+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+ (eval $ac_try) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); }; }; then
+ ac_cv_search_opendir="none required"
+else
+ echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+fi
+rm -f conftest.err conftest.$ac_objext \
+ conftest$ac_exeext conftest.$ac_ext
+if test "$ac_cv_search_opendir" = no; then
+ for ac_lib in dir; do
+ LIBS="-l$ac_lib $ac_func_search_save_LIBS"
+ cat >conftest.$ac_ext <<_ACEOF
+/* confdefs.h. */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h. */
-else
-echo $ac_n "checking for opendir in -lx""... $ac_c" 1>&6
-echo "configure:4771: 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
-else
- ac_save_LIBS="$LIBS"
-LIBS="-lx $LIBS"
-cat > conftest.$ac_ext <<EOF
-#line 4779 "configure"
-#include "confdefs.h"
/* Override any gcc2 internal prototype to avoid an error. */
+#ifdef __cplusplus
+extern "C"
+#endif
/* We use char because int might match the return type of a gcc2
- builtin and then its argument prototype would still apply. */
-char opendir();
-
-int main() {
-opendir()
-; return 0; }
-EOF
-if { (eval echo configure:4790: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; 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"
-
+ builtin and then its argument prototype would still apply. */
+char opendir ();
+int
+main ()
+{
+opendir ();
+ ;
+ return 0;
+}
+_ACEOF
+rm -f conftest.$ac_objext conftest$ac_exeext
+if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
+ (eval $ac_link) 2>conftest.er1
+ ac_status=$?
+ grep -v '^ *+' conftest.er1 >conftest.err
+ rm -f conftest.er1
+ cat conftest.err >&5
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); } &&
+ { ac_try='test -z "$ac_c_werror_flag"
+ || test ! -s conftest.err'
+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+ (eval $ac_try) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); }; } &&
+ { ac_try='test -s conftest$ac_exeext'
+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+ (eval $ac_try) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); }; }; then
+ ac_cv_search_opendir="-l$ac_lib"
+break
+else
+ echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+fi
+rm -f conftest.err conftest.$ac_objext \
+ conftest$ac_exeext conftest.$ac_ext
+ done
fi
-if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
- echo "$ac_t""yes" 1>&6
- LIBS="$LIBS -lx"
-else
- echo "$ac_t""no" 1>&6
+LIBS=$ac_func_search_save_LIBS
fi
+echo "$as_me:$LINENO: result: $ac_cv_search_opendir" >&5
+echo "${ECHO_T}$ac_cv_search_opendir" >&6
+if test "$ac_cv_search_opendir" != no; then
+ test "$ac_cv_search_opendir" = "none required" || LIBS="$ac_cv_search_opendir $LIBS"
fi
-
-
-case "${host}" in
-*-*-msdos* | *-*-go32* | *-*-mingw32* | *-*-cygwin* | *-*-windows*)
- cat >> confdefs.h <<\EOF
-#define USE_BINARY_FOPEN 1
-EOF
- ;;
-esac
-
-echo $ac_n "checking whether strstr must be declared""... $ac_c" 1>&6
-echo "configure:4823: 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 4828 "configure"
-#include "confdefs.h"
+ echo "$as_me:$LINENO: checking for library containing opendir" >&5
+echo $ECHO_N "checking for library containing opendir... $ECHO_C" >&6
+if test "${ac_cv_search_opendir+set}" = set; then
+ echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+ ac_func_search_save_LIBS=$LIBS
+ac_cv_search_opendir=no
+cat >conftest.$ac_ext <<_ACEOF
+/* confdefs.h. */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h. */
-#include <stdio.h>
-#ifdef HAVE_STRING_H
-#include <string.h>
-#else
-#ifdef HAVE_STRINGS_H
-#include <strings.h>
-#endif
-#endif
-#ifdef HAVE_STDLIB_H
-#include <stdlib.h>
+/* Override any gcc2 internal prototype to avoid an error. */
+#ifdef __cplusplus
+extern "C"
#endif
-#ifdef HAVE_UNISTD_H
-#include <unistd.h>
+/* We use char because int might match the return type of a gcc2
+ builtin and then its argument prototype would still apply. */
+char opendir ();
+int
+main ()
+{
+opendir ();
+ ;
+ return 0;
+}
+_ACEOF
+rm -f conftest.$ac_objext conftest$ac_exeext
+if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
+ (eval $ac_link) 2>conftest.er1
+ ac_status=$?
+ grep -v '^ *+' conftest.er1 >conftest.err
+ rm -f conftest.er1
+ cat conftest.err >&5
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); } &&
+ { ac_try='test -z "$ac_c_werror_flag"
+ || test ! -s conftest.err'
+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+ (eval $ac_try) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); }; } &&
+ { ac_try='test -s conftest$ac_exeext'
+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+ (eval $ac_try) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); }; }; then
+ ac_cv_search_opendir="none required"
+else
+ echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+fi
+rm -f conftest.err conftest.$ac_objext \
+ conftest$ac_exeext conftest.$ac_ext
+if test "$ac_cv_search_opendir" = no; then
+ for ac_lib in x; do
+ LIBS="-l$ac_lib $ac_func_search_save_LIBS"
+ cat >conftest.$ac_ext <<_ACEOF
+/* confdefs.h. */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h. */
+
+/* Override any gcc2 internal prototype to avoid an error. */
+#ifdef __cplusplus
+extern "C"
#endif
-int main() {
-char *(*pfn) = (char *(*)) strstr
-; return 0; }
-EOF
-if { (eval echo configure:4849: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
- rm -rf conftest*
- bfd_cv_decl_needed_strstr=no
-else
- echo "configure: failed program was:" >&5
- cat conftest.$ac_ext >&5
- rm -rf conftest*
- bfd_cv_decl_needed_strstr=yes
+/* We use char because int might match the return type of a gcc2
+ builtin and then its argument prototype would still apply. */
+char opendir ();
+int
+main ()
+{
+opendir ();
+ ;
+ return 0;
+}
+_ACEOF
+rm -f conftest.$ac_objext conftest$ac_exeext
+if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
+ (eval $ac_link) 2>conftest.er1
+ ac_status=$?
+ grep -v '^ *+' conftest.er1 >conftest.err
+ rm -f conftest.er1
+ cat conftest.err >&5
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); } &&
+ { ac_try='test -z "$ac_c_werror_flag"
+ || test ! -s conftest.err'
+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+ (eval $ac_try) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); }; } &&
+ { ac_try='test -s conftest$ac_exeext'
+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+ (eval $ac_try) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); }; }; then
+ ac_cv_search_opendir="-l$ac_lib"
+break
+else
+ echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+fi
+rm -f conftest.err conftest.$ac_objext \
+ conftest$ac_exeext conftest.$ac_ext
+ done
fi
-rm -f conftest*
+LIBS=$ac_func_search_save_LIBS
fi
+echo "$as_me:$LINENO: result: $ac_cv_search_opendir" >&5
+echo "${ECHO_T}$ac_cv_search_opendir" >&6
+if test "$ac_cv_search_opendir" != no; then
+ test "$ac_cv_search_opendir" = "none required" || LIBS="$ac_cv_search_opendir $LIBS"
-echo "$ac_t""$bfd_cv_decl_needed_strstr" 1>&6
-if test $bfd_cv_decl_needed_strstr = yes; then
- cat >> confdefs.h <<\EOF
-#define NEED_DECLARATION_STRSTR 1
-EOF
+fi
fi
-echo $ac_n "checking whether free must be declared""... $ac_c" 1>&6
-echo "configure:4870: 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 4875 "configure"
-#include "confdefs.h"
-#include <stdio.h>
-#ifdef HAVE_STRING_H
-#include <string.h>
-#else
-#ifdef HAVE_STRINGS_H
-#include <strings.h>
-#endif
-#endif
-#ifdef HAVE_STDLIB_H
-#include <stdlib.h>
-#endif
-#ifdef HAVE_UNISTD_H
-#include <unistd.h>
-#endif
-int main() {
-char *(*pfn) = (char *(*)) free
-; return 0; }
-EOF
-if { (eval echo configure:4896: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
- rm -rf conftest*
- bfd_cv_decl_needed_free=no
+echo "$as_me:$LINENO: checking for a known getopt prototype in unistd.h" >&5
+echo $ECHO_N "checking for a known getopt prototype in unistd.h... $ECHO_C" >&6
+if test "${ld_cv_decl_getopt_unistd_h+set}" = set; then
+ echo $ECHO_N "(cached) $ECHO_C" >&6
else
- echo "configure: failed program was:" >&5
- cat conftest.$ac_ext >&5
- rm -rf conftest*
- bfd_cv_decl_needed_free=yes
-fi
-rm -f conftest*
+ cat >conftest.$ac_ext <<_ACEOF
+/* confdefs.h. */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h. */
+#include <unistd.h>
+int
+main ()
+{
+extern int getopt (int, char *const*, const char *);
+ ;
+ return 0;
+}
+_ACEOF
+rm -f conftest.$ac_objext
+if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
+ (eval $ac_compile) 2>conftest.er1
+ ac_status=$?
+ grep -v '^ *+' conftest.er1 >conftest.err
+ rm -f conftest.er1
+ cat conftest.err >&5
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); } &&
+ { ac_try='test -z "$ac_c_werror_flag"
+ || test ! -s conftest.err'
+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+ (eval $ac_try) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); }; } &&
+ { ac_try='test -s conftest.$ac_objext'
+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+ (eval $ac_try) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); }; }; then
+ ld_cv_decl_getopt_unistd_h=yes
+else
+ echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+ld_cv_decl_getopt_unistd_h=no
+fi
+rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
+fi
+
+echo "$as_me:$LINENO: result: $ld_cv_decl_getopt_unistd_h" >&5
+echo "${ECHO_T}$ld_cv_decl_getopt_unistd_h" >&6
+if test $ld_cv_decl_getopt_unistd_h = yes; then
+
+cat >>confdefs.h <<\_ACEOF
+#define HAVE_DECL_GETOPT 1
+_ACEOF
+
fi
-echo "$ac_t""$bfd_cv_decl_needed_free" 1>&6
-if test $bfd_cv_decl_needed_free = yes; then
- cat >> confdefs.h <<\EOF
-#define NEED_DECLARATION_FREE 1
-EOF
-fi
+case "${host}" in
+*-*-msdos* | *-*-go32* | *-*-mingw32* | *-*-cygwin* | *-*-windows*)
-echo $ac_n "checking whether sbrk must be declared""... $ac_c" 1>&6
-echo "configure:4917: 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 4922 "configure"
-#include "confdefs.h"
+cat >>confdefs.h <<\_ACEOF
+#define USE_BINARY_FOPEN 1
+_ACEOF
+ ;;
+esac
-#include <stdio.h>
-#ifdef HAVE_STRING_H
-#include <string.h>
-#else
-#ifdef HAVE_STRINGS_H
-#include <strings.h>
-#endif
+echo "$as_me:$LINENO: checking whether strstr is declared" >&5
+echo $ECHO_N "checking whether strstr is declared... $ECHO_C" >&6
+if test "${ac_cv_have_decl_strstr+set}" = set; then
+ echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+ cat >conftest.$ac_ext <<_ACEOF
+/* confdefs.h. */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h. */
+$ac_includes_default
+int
+main ()
+{
+#ifndef strstr
+ char *p = (char *) strstr;
#endif
-#ifdef HAVE_STDLIB_H
-#include <stdlib.h>
+
+ ;
+ return 0;
+}
+_ACEOF
+rm -f conftest.$ac_objext
+if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
+ (eval $ac_compile) 2>conftest.er1
+ ac_status=$?
+ grep -v '^ *+' conftest.er1 >conftest.err
+ rm -f conftest.er1
+ cat conftest.err >&5
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); } &&
+ { ac_try='test -z "$ac_c_werror_flag"
+ || test ! -s conftest.err'
+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+ (eval $ac_try) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); }; } &&
+ { ac_try='test -s conftest.$ac_objext'
+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+ (eval $ac_try) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); }; }; then
+ ac_cv_have_decl_strstr=yes
+else
+ echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+ac_cv_have_decl_strstr=no
+fi
+rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
+fi
+echo "$as_me:$LINENO: result: $ac_cv_have_decl_strstr" >&5
+echo "${ECHO_T}$ac_cv_have_decl_strstr" >&6
+if test $ac_cv_have_decl_strstr = yes; then
+
+cat >>confdefs.h <<_ACEOF
+#define HAVE_DECL_STRSTR 1
+_ACEOF
+
+
+else
+ cat >>confdefs.h <<_ACEOF
+#define HAVE_DECL_STRSTR 0
+_ACEOF
+
+
+fi
+echo "$as_me:$LINENO: checking whether free is declared" >&5
+echo $ECHO_N "checking whether free is declared... $ECHO_C" >&6
+if test "${ac_cv_have_decl_free+set}" = set; then
+ echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+ cat >conftest.$ac_ext <<_ACEOF
+/* confdefs.h. */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h. */
+$ac_includes_default
+int
+main ()
+{
+#ifndef free
+ char *p = (char *) free;
#endif
-#ifdef HAVE_UNISTD_H
-#include <unistd.h>
+
+ ;
+ return 0;
+}
+_ACEOF
+rm -f conftest.$ac_objext
+if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
+ (eval $ac_compile) 2>conftest.er1
+ ac_status=$?
+ grep -v '^ *+' conftest.er1 >conftest.err
+ rm -f conftest.er1
+ cat conftest.err >&5
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); } &&
+ { ac_try='test -z "$ac_c_werror_flag"
+ || test ! -s conftest.err'
+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+ (eval $ac_try) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); }; } &&
+ { ac_try='test -s conftest.$ac_objext'
+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+ (eval $ac_try) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); }; }; then
+ ac_cv_have_decl_free=yes
+else
+ echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+ac_cv_have_decl_free=no
+fi
+rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
+fi
+echo "$as_me:$LINENO: result: $ac_cv_have_decl_free" >&5
+echo "${ECHO_T}$ac_cv_have_decl_free" >&6
+if test $ac_cv_have_decl_free = yes; then
+
+cat >>confdefs.h <<_ACEOF
+#define HAVE_DECL_FREE 1
+_ACEOF
+
+
+else
+ cat >>confdefs.h <<_ACEOF
+#define HAVE_DECL_FREE 0
+_ACEOF
+
+
+fi
+echo "$as_me:$LINENO: checking whether sbrk is declared" >&5
+echo $ECHO_N "checking whether sbrk is declared... $ECHO_C" >&6
+if test "${ac_cv_have_decl_sbrk+set}" = set; then
+ echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+ cat >conftest.$ac_ext <<_ACEOF
+/* confdefs.h. */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h. */
+$ac_includes_default
+int
+main ()
+{
+#ifndef sbrk
+ char *p = (char *) sbrk;
#endif
-int main() {
-char *(*pfn) = (char *(*)) sbrk
-; return 0; }
-EOF
-if { (eval echo configure:4943: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
- rm -rf conftest*
- bfd_cv_decl_needed_sbrk=no
-else
- echo "configure: failed program was:" >&5
- cat conftest.$ac_ext >&5
- rm -rf conftest*
- bfd_cv_decl_needed_sbrk=yes
-fi
-rm -f conftest*
-fi
-echo "$ac_t""$bfd_cv_decl_needed_sbrk" 1>&6
-if test $bfd_cv_decl_needed_sbrk = yes; then
- cat >> confdefs.h <<\EOF
-#define NEED_DECLARATION_SBRK 1
-EOF
+ ;
+ return 0;
+}
+_ACEOF
+rm -f conftest.$ac_objext
+if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
+ (eval $ac_compile) 2>conftest.er1
+ ac_status=$?
+ grep -v '^ *+' conftest.er1 >conftest.err
+ rm -f conftest.er1
+ cat conftest.err >&5
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); } &&
+ { ac_try='test -z "$ac_c_werror_flag"
+ || test ! -s conftest.err'
+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+ (eval $ac_try) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); }; } &&
+ { ac_try='test -s conftest.$ac_objext'
+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+ (eval $ac_try) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); }; }; then
+ ac_cv_have_decl_sbrk=yes
+else
+ echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+ac_cv_have_decl_sbrk=no
+fi
+rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
+fi
+echo "$as_me:$LINENO: result: $ac_cv_have_decl_sbrk" >&5
+echo "${ECHO_T}$ac_cv_have_decl_sbrk" >&6
+if test $ac_cv_have_decl_sbrk = yes; then
+
+cat >>confdefs.h <<_ACEOF
+#define HAVE_DECL_SBRK 1
+_ACEOF
+
+
+else
+ cat >>confdefs.h <<_ACEOF
+#define HAVE_DECL_SBRK 0
+_ACEOF
+
+
+fi
+echo "$as_me:$LINENO: checking whether getenv is declared" >&5
+echo $ECHO_N "checking whether getenv is declared... $ECHO_C" >&6
+if test "${ac_cv_have_decl_getenv+set}" = set; then
+ echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+ cat >conftest.$ac_ext <<_ACEOF
+/* confdefs.h. */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h. */
+$ac_includes_default
+int
+main ()
+{
+#ifndef getenv
+ char *p = (char *) getenv;
+#endif
-fi
+ ;
+ return 0;
+}
+_ACEOF
+rm -f conftest.$ac_objext
+if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
+ (eval $ac_compile) 2>conftest.er1
+ ac_status=$?
+ grep -v '^ *+' conftest.er1 >conftest.err
+ rm -f conftest.er1
+ cat conftest.err >&5
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); } &&
+ { ac_try='test -z "$ac_c_werror_flag"
+ || test ! -s conftest.err'
+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+ (eval $ac_try) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); }; } &&
+ { ac_try='test -s conftest.$ac_objext'
+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+ (eval $ac_try) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); }; }; then
+ ac_cv_have_decl_getenv=yes
+else
+ echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+ac_cv_have_decl_getenv=no
+fi
+rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
+fi
+echo "$as_me:$LINENO: result: $ac_cv_have_decl_getenv" >&5
+echo "${ECHO_T}$ac_cv_have_decl_getenv" >&6
+if test $ac_cv_have_decl_getenv = yes; then
+
+cat >>confdefs.h <<_ACEOF
+#define HAVE_DECL_GETENV 1
+_ACEOF
+
+
+else
+ cat >>confdefs.h <<_ACEOF
+#define HAVE_DECL_GETENV 0
+_ACEOF
+
+
+fi
+echo "$as_me:$LINENO: checking whether environ is declared" >&5
+echo $ECHO_N "checking whether environ is declared... $ECHO_C" >&6
+if test "${ac_cv_have_decl_environ+set}" = set; then
+ echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+ cat >conftest.$ac_ext <<_ACEOF
+/* confdefs.h. */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h. */
+$ac_includes_default
+int
+main ()
+{
+#ifndef environ
+ char *p = (char *) environ;
+#endif
-echo $ac_n "checking whether getenv must be declared""... $ac_c" 1>&6
-echo "configure:4964: 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
+ ;
+ return 0;
+}
+_ACEOF
+rm -f conftest.$ac_objext
+if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
+ (eval $ac_compile) 2>conftest.er1
+ ac_status=$?
+ grep -v '^ *+' conftest.er1 >conftest.err
+ rm -f conftest.er1
+ cat conftest.err >&5
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); } &&
+ { ac_try='test -z "$ac_c_werror_flag"
+ || test ! -s conftest.err'
+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+ (eval $ac_try) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); }; } &&
+ { ac_try='test -s conftest.$ac_objext'
+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+ (eval $ac_try) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); }; }; then
+ ac_cv_have_decl_environ=yes
else
- cat > conftest.$ac_ext <<EOF
-#line 4969 "configure"
-#include "confdefs.h"
+ echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
-#include <stdio.h>
-#ifdef HAVE_STRING_H
-#include <string.h>
-#else
-#ifdef HAVE_STRINGS_H
-#include <strings.h>
-#endif
-#endif
-#ifdef HAVE_STDLIB_H
-#include <stdlib.h>
-#endif
-#ifdef HAVE_UNISTD_H
-#include <unistd.h>
-#endif
-int main() {
-char *(*pfn) = (char *(*)) getenv
-; return 0; }
-EOF
-if { (eval echo configure:4990: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
- rm -rf conftest*
- bfd_cv_decl_needed_getenv=no
-else
- echo "configure: failed program was:" >&5
- cat conftest.$ac_ext >&5
- rm -rf conftest*
- bfd_cv_decl_needed_getenv=yes
+ac_cv_have_decl_environ=no
fi
-rm -f conftest*
+rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
fi
+echo "$as_me:$LINENO: result: $ac_cv_have_decl_environ" >&5
+echo "${ECHO_T}$ac_cv_have_decl_environ" >&6
+if test $ac_cv_have_decl_environ = yes; then
-echo "$ac_t""$bfd_cv_decl_needed_getenv" 1>&6
-if test $bfd_cv_decl_needed_getenv = yes; then
- cat >> confdefs.h <<\EOF
-#define NEED_DECLARATION_GETENV 1
-EOF
+cat >>confdefs.h <<_ACEOF
+#define HAVE_DECL_ENVIRON 1
+_ACEOF
-fi
-echo $ac_n "checking whether environ must be declared""... $ac_c" 1>&6
-echo "configure:5011: checking whether environ must be declared" >&5
-if eval "test \"`echo '$''{'bfd_cv_decl_needed_environ'+set}'`\" = set"; then
- echo $ac_n "(cached) $ac_c" 1>&6
else
- cat > conftest.$ac_ext <<EOF
-#line 5016 "configure"
-#include "confdefs.h"
-
-#include <stdio.h>
-#ifdef HAVE_STRING_H
-#include <string.h>
-#else
-#ifdef HAVE_STRINGS_H
-#include <strings.h>
-#endif
-#endif
-#ifdef HAVE_STDLIB_H
-#include <stdlib.h>
-#endif
-#ifdef HAVE_UNISTD_H
-#include <unistd.h>
-#endif
-int main() {
-char *(*pfn) = (char *(*)) environ
-; return 0; }
-EOF
-if { (eval echo configure:5037: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
- rm -rf conftest*
- bfd_cv_decl_needed_environ=no
-else
- echo "configure: failed program was:" >&5
- cat conftest.$ac_ext >&5
- rm -rf conftest*
- bfd_cv_decl_needed_environ=yes
-fi
-rm -f conftest*
-fi
+ cat >>confdefs.h <<_ACEOF
+#define HAVE_DECL_ENVIRON 0
+_ACEOF
-echo "$ac_t""$bfd_cv_decl_needed_environ" 1>&6
-if test $bfd_cv_decl_needed_environ = yes; then
- cat >> confdefs.h <<\EOF
-#define NEED_DECLARATION_ENVIRON 1
-EOF
fi
+
# When converting linker scripts into strings for use in emulation
# files, use astring.sed if the compiler supports ANSI string
# concatenation, or ostring.sed otherwise. This is to support the
# broken Microsoft MSVC compiler, which limits the length of string
# constants, while still supporting pre-ANSI compilers which do not
# support string concatenation.
-echo $ac_n "checking whether ANSI C string concatenation works""... $ac_c" 1>&6
-echo "configure:5065: checking whether ANSI C string concatenation works" >&5
-if eval "test \"`echo '$''{'ld_cv_string_concatenation'+set}'`\" = set"; then
- echo $ac_n "(cached) $ac_c" 1>&6
-else
- cat > conftest.$ac_ext <<EOF
-#line 5070 "configure"
-#include "confdefs.h"
+echo "$as_me:$LINENO: checking whether ANSI C string concatenation works" >&5
+echo $ECHO_N "checking whether ANSI C string concatenation works... $ECHO_C" >&6
+if test "${ld_cv_string_concatenation+set}" = set; then
+ echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+ cat >conftest.$ac_ext <<_ACEOF
+/* confdefs.h. */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h. */
-int main() {
+int
+main ()
+{
char *a = "a" "a";
-; return 0; }
-EOF
-if { (eval echo configure:5077: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
- rm -rf conftest*
+ ;
+ return 0;
+}
+_ACEOF
+rm -f conftest.$ac_objext
+if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
+ (eval $ac_compile) 2>conftest.er1
+ ac_status=$?
+ grep -v '^ *+' conftest.er1 >conftest.err
+ rm -f conftest.er1
+ cat conftest.err >&5
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); } &&
+ { ac_try='test -z "$ac_c_werror_flag"
+ || test ! -s conftest.err'
+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+ (eval $ac_try) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); }; } &&
+ { ac_try='test -s conftest.$ac_objext'
+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+ (eval $ac_try) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); }; }; then
ld_cv_string_concatenation=yes
else
- echo "configure: failed program was:" >&5
- cat conftest.$ac_ext >&5
- rm -rf conftest*
- ld_cv_string_concatenation=no
+ echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+ld_cv_string_concatenation=no
fi
-rm -f conftest*
+rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
fi
-echo "$ac_t""$ld_cv_string_concatenation" 1>&6
+echo "$as_me:$LINENO: result: $ld_cv_string_concatenation" >&5
+echo "${ECHO_T}$ld_cv_string_concatenation" >&6
if test "$ld_cv_string_concatenation" = "yes"; then
STRINGIFY=astring.sed
else
@@ -5122,6 +12342,15 @@ do
EMUL=$targ_emul
fi
+ if test x${want64} = xfalse; then
+ . ${srcdir}/../bfd/config.bfd
+ fi
+
+ if test x${want64} = xtrue; then
+ targ_extra_emuls="$targ_extra_emuls $targ64_extra_emuls"
+ targ_extra_libpath="$targ_extra_libpath $targ64_extra_libpath"
+ fi
+
for i in $targ_emul $targ_extra_emuls $targ_extra_libpath; do
case " $all_emuls " in
*" e${i}.o "*) ;;
@@ -5164,6 +12393,425 @@ TDIRS=tdirs
if test x${all_targets} = xtrue; then
+ if test x${want64} = xfalse; then
+ echo "$as_me:$LINENO: checking for long" >&5
+echo $ECHO_N "checking for long... $ECHO_C" >&6
+if test "${ac_cv_type_long+set}" = set; then
+ echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+ cat >conftest.$ac_ext <<_ACEOF
+/* confdefs.h. */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h. */
+$ac_includes_default
+int
+main ()
+{
+if ((long *) 0)
+ return 0;
+if (sizeof (long))
+ return 0;
+ ;
+ return 0;
+}
+_ACEOF
+rm -f conftest.$ac_objext
+if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
+ (eval $ac_compile) 2>conftest.er1
+ ac_status=$?
+ grep -v '^ *+' conftest.er1 >conftest.err
+ rm -f conftest.er1
+ cat conftest.err >&5
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); } &&
+ { ac_try='test -z "$ac_c_werror_flag"
+ || test ! -s conftest.err'
+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+ (eval $ac_try) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); }; } &&
+ { ac_try='test -s conftest.$ac_objext'
+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+ (eval $ac_try) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); }; }; then
+ ac_cv_type_long=yes
+else
+ echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+ac_cv_type_long=no
+fi
+rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
+fi
+echo "$as_me:$LINENO: result: $ac_cv_type_long" >&5
+echo "${ECHO_T}$ac_cv_type_long" >&6
+
+echo "$as_me:$LINENO: checking size of long" >&5
+echo $ECHO_N "checking size of long... $ECHO_C" >&6
+if test "${ac_cv_sizeof_long+set}" = set; then
+ echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+ if test "$ac_cv_type_long" = yes; then
+ # The cast to unsigned long works around a bug in the HP C Compiler
+ # version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
+ # declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
+ # This bug is HP SR number 8606223364.
+ if test "$cross_compiling" = yes; then
+ # Depending upon the size, compute the lo and hi bounds.
+cat >conftest.$ac_ext <<_ACEOF
+/* confdefs.h. */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h. */
+$ac_includes_default
+int
+main ()
+{
+static int test_array [1 - 2 * !(((long) (sizeof (long))) >= 0)];
+test_array [0] = 0
+
+ ;
+ return 0;
+}
+_ACEOF
+rm -f conftest.$ac_objext
+if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
+ (eval $ac_compile) 2>conftest.er1
+ ac_status=$?
+ grep -v '^ *+' conftest.er1 >conftest.err
+ rm -f conftest.er1
+ cat conftest.err >&5
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); } &&
+ { ac_try='test -z "$ac_c_werror_flag"
+ || test ! -s conftest.err'
+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+ (eval $ac_try) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); }; } &&
+ { ac_try='test -s conftest.$ac_objext'
+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+ (eval $ac_try) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); }; }; then
+ ac_lo=0 ac_mid=0
+ while :; do
+ cat >conftest.$ac_ext <<_ACEOF
+/* confdefs.h. */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h. */
+$ac_includes_default
+int
+main ()
+{
+static int test_array [1 - 2 * !(((long) (sizeof (long))) <= $ac_mid)];
+test_array [0] = 0
+
+ ;
+ return 0;
+}
+_ACEOF
+rm -f conftest.$ac_objext
+if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
+ (eval $ac_compile) 2>conftest.er1
+ ac_status=$?
+ grep -v '^ *+' conftest.er1 >conftest.err
+ rm -f conftest.er1
+ cat conftest.err >&5
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); } &&
+ { ac_try='test -z "$ac_c_werror_flag"
+ || test ! -s conftest.err'
+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+ (eval $ac_try) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); }; } &&
+ { ac_try='test -s conftest.$ac_objext'
+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+ (eval $ac_try) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); }; }; then
+ ac_hi=$ac_mid; break
+else
+ echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+ac_lo=`expr $ac_mid + 1`
+ if test $ac_lo -le $ac_mid; then
+ ac_lo= ac_hi=
+ break
+ fi
+ ac_mid=`expr 2 '*' $ac_mid + 1`
+fi
+rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
+ done
+else
+ echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+cat >conftest.$ac_ext <<_ACEOF
+/* confdefs.h. */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h. */
+$ac_includes_default
+int
+main ()
+{
+static int test_array [1 - 2 * !(((long) (sizeof (long))) < 0)];
+test_array [0] = 0
+
+ ;
+ return 0;
+}
+_ACEOF
+rm -f conftest.$ac_objext
+if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
+ (eval $ac_compile) 2>conftest.er1
+ ac_status=$?
+ grep -v '^ *+' conftest.er1 >conftest.err
+ rm -f conftest.er1
+ cat conftest.err >&5
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); } &&
+ { ac_try='test -z "$ac_c_werror_flag"
+ || test ! -s conftest.err'
+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+ (eval $ac_try) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); }; } &&
+ { ac_try='test -s conftest.$ac_objext'
+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+ (eval $ac_try) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); }; }; then
+ ac_hi=-1 ac_mid=-1
+ while :; do
+ cat >conftest.$ac_ext <<_ACEOF
+/* confdefs.h. */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h. */
+$ac_includes_default
+int
+main ()
+{
+static int test_array [1 - 2 * !(((long) (sizeof (long))) >= $ac_mid)];
+test_array [0] = 0
+
+ ;
+ return 0;
+}
+_ACEOF
+rm -f conftest.$ac_objext
+if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
+ (eval $ac_compile) 2>conftest.er1
+ ac_status=$?
+ grep -v '^ *+' conftest.er1 >conftest.err
+ rm -f conftest.er1
+ cat conftest.err >&5
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); } &&
+ { ac_try='test -z "$ac_c_werror_flag"
+ || test ! -s conftest.err'
+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+ (eval $ac_try) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); }; } &&
+ { ac_try='test -s conftest.$ac_objext'
+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+ (eval $ac_try) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); }; }; then
+ ac_lo=$ac_mid; break
+else
+ echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+ac_hi=`expr '(' $ac_mid ')' - 1`
+ if test $ac_mid -le $ac_hi; then
+ ac_lo= ac_hi=
+ break
+ fi
+ ac_mid=`expr 2 '*' $ac_mid`
+fi
+rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
+ done
+else
+ echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+ac_lo= ac_hi=
+fi
+rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
+fi
+rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
+# Binary search between lo and hi bounds.
+while test "x$ac_lo" != "x$ac_hi"; do
+ ac_mid=`expr '(' $ac_hi - $ac_lo ')' / 2 + $ac_lo`
+ cat >conftest.$ac_ext <<_ACEOF
+/* confdefs.h. */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h. */
+$ac_includes_default
+int
+main ()
+{
+static int test_array [1 - 2 * !(((long) (sizeof (long))) <= $ac_mid)];
+test_array [0] = 0
+
+ ;
+ return 0;
+}
+_ACEOF
+rm -f conftest.$ac_objext
+if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
+ (eval $ac_compile) 2>conftest.er1
+ ac_status=$?
+ grep -v '^ *+' conftest.er1 >conftest.err
+ rm -f conftest.er1
+ cat conftest.err >&5
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); } &&
+ { ac_try='test -z "$ac_c_werror_flag"
+ || test ! -s conftest.err'
+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+ (eval $ac_try) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); }; } &&
+ { ac_try='test -s conftest.$ac_objext'
+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+ (eval $ac_try) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); }; }; then
+ ac_hi=$ac_mid
+else
+ echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+ac_lo=`expr '(' $ac_mid ')' + 1`
+fi
+rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
+done
+case $ac_lo in
+?*) ac_cv_sizeof_long=$ac_lo;;
+'') { { echo "$as_me:$LINENO: error: cannot compute sizeof (long), 77
+See \`config.log' for more details." >&5
+echo "$as_me: error: cannot compute sizeof (long), 77
+See \`config.log' for more details." >&2;}
+ { (exit 1); exit 1; }; } ;;
+esac
+else
+ if test "$cross_compiling" = yes; then
+ { { echo "$as_me:$LINENO: error: cannot run test program while cross compiling
+See \`config.log' for more details." >&5
+echo "$as_me: error: cannot run test program while cross compiling
+See \`config.log' for more details." >&2;}
+ { (exit 1); exit 1; }; }
+else
+ cat >conftest.$ac_ext <<_ACEOF
+/* confdefs.h. */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h. */
+$ac_includes_default
+long longval () { return (long) (sizeof (long)); }
+unsigned long ulongval () { return (long) (sizeof (long)); }
+#include <stdio.h>
+#include <stdlib.h>
+int
+main ()
+{
+
+ FILE *f = fopen ("conftest.val", "w");
+ if (! f)
+ exit (1);
+ if (((long) (sizeof (long))) < 0)
+ {
+ long i = longval ();
+ if (i != ((long) (sizeof (long))))
+ exit (1);
+ fprintf (f, "%ld\n", i);
+ }
+ else
+ {
+ unsigned long i = ulongval ();
+ if (i != ((long) (sizeof (long))))
+ exit (1);
+ fprintf (f, "%lu\n", i);
+ }
+ exit (ferror (f) || fclose (f) != 0);
+
+ ;
+ return 0;
+}
+_ACEOF
+rm -f conftest$ac_exeext
+if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
+ (eval $ac_link) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+ (eval $ac_try) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); }; }; then
+ ac_cv_sizeof_long=`cat conftest.val`
+else
+ echo "$as_me: program exited with status $ac_status" >&5
+echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+( exit $ac_status )
+{ { echo "$as_me:$LINENO: error: cannot compute sizeof (long), 77
+See \`config.log' for more details." >&5
+echo "$as_me: error: cannot compute sizeof (long), 77
+See \`config.log' for more details." >&2;}
+ { (exit 1); exit 1; }; }
+fi
+rm -f core *.core gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
+fi
+fi
+rm -f conftest.val
+else
+ ac_cv_sizeof_long=0
+fi
+fi
+echo "$as_me:$LINENO: result: $ac_cv_sizeof_long" >&5
+echo "${ECHO_T}$ac_cv_sizeof_long" >&6
+cat >>confdefs.h <<_ACEOF
+#define SIZEOF_LONG $ac_cv_sizeof_long
+_ACEOF
+
+
+ if test "x${ac_cv_sizeof_long}" = "x8"; then
+ want64=true
+ fi
+ fi
if test x${want64} = xtrue; then
EMULATION_OFILES='$(ALL_EMULATIONS) $(ALL_64_EMULATIONS)'
else
@@ -5193,443 +12841,2401 @@ case "$target_vendor" in
hp) EXTRA_SHLIB_EXTENSION=".sl" ;;
*) EXTRA_SHLIB_EXTENSION= ;;
esac
+
+case "$target_os" in
+ lynxos) EXTRA_SHLIB_EXTENSION=".a" ;;
+esac
+
if test x${EXTRA_SHLIB_EXTENSION} != x ; then
- cat >> confdefs.h <<EOF
+
+cat >>confdefs.h <<_ACEOF
#define EXTRA_SHLIB_EXTENSION "$EXTRA_SHLIB_EXTENSION"
-EOF
+_ACEOF
fi
-trap '' 1 2 15
-cat > confcache <<\EOF
+
+
+
+
+ ac_config_files="$ac_config_files Makefile po/Makefile.in:po/Make-in"
+cat >confcache <<\_ACEOF
# This file is a shell script that caches the results of configure
# tests run on this system so they can be shared between configure
-# scripts and configure runs. It is not useful on other systems.
-# If it contains results you don't want to keep, you may remove or edit it.
+# scripts and configure runs, see configure's option --config-cache.
+# It is not useful on other systems. If it contains results you don't
+# want to keep, you may remove or edit it.
#
-# By default, configure uses ./config.cache as the cache file,
-# creating it if it does not exist already. You can give configure
-# the --cache-file=FILE option to use a different cache file; that is
-# what configure does when it calls configure scripts in
-# subdirectories, so they share the cache.
-# Giving --cache-file=/dev/null disables caching, for debugging configure.
-# config.status only pays attention to the cache file if you give it the
-# --recheck option to rerun configure.
+# config.status only pays attention to the cache file if you give it
+# the --recheck option to rerun configure.
#
-EOF
+# `ac_cv_env_foo' variables (set or unset) will be overridden when
+# loading this file, other *unset* `ac_cv_foo' will be assigned the
+# following values.
+
+_ACEOF
+
# The following way of writing the cache mishandles newlines in values,
# but we know of no workaround that is simple, portable, and efficient.
# So, don't put newlines in cache variables' values.
# 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 | grep ac_space) 2>&1` in
- *ac_space=\ *)
- # `set' does not quote correctly, so add quotes (double-quote substitution
- # turns \\\\ into \\, and sed turns \\ into \).
- sed -n \
- -e "s/'/'\\\\''/g" \
- -e "s/^\\([a-zA-Z0-9_]*_cv_[a-zA-Z0-9_]*\\)=\\(.*\\)/\\1=\${\\1='\\2'}/p"
- ;;
- *)
- # `set' quotes correctly as required by POSIX, so do not add quotes.
- sed -n -e 's/^\([a-zA-Z0-9_]*_cv_[a-zA-Z0-9_]*\)=\(.*\)/\1=${\1=\2}/p'
- ;;
- esac >> confcache
-if cmp -s $cache_file confcache; then
- :
-else
+{
+ (set) 2>&1 |
+ case `(ac_space=' '; set | grep ac_space) 2>&1` in
+ *ac_space=\ *)
+ # `set' does not quote correctly, so add quotes (double-quote
+ # substitution turns \\\\ into \\, and sed turns \\ into \).
+ sed -n \
+ "s/'/'\\\\''/g;
+ s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1='\\2'/p"
+ ;;
+ *)
+ # `set' quotes correctly as required by POSIX, so do not add quotes.
+ sed -n \
+ "s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1=\\2/p"
+ ;;
+ esac;
+} |
+ sed '
+ t clear
+ : clear
+ s/^\([^=]*\)=\(.*[{}].*\)$/test "${\1+set}" = set || &/
+ t end
+ /^ac_cv_env/!s/^\([^=]*\)=\(.*\)$/\1=${\1=\2}/
+ : end' >>confcache
+if diff $cache_file confcache >/dev/null 2>&1; then :; else
if test -w $cache_file; then
- echo "updating cache $cache_file"
- cat confcache > $cache_file
+ test "x$cache_file" != "x/dev/null" && echo "updating cache $cache_file"
+ cat confcache >$cache_file
else
echo "not updating unwritable cache $cache_file"
fi
fi
rm -f confcache
-trap 'rm -fr conftest* confdefs* core core.* *.core $ac_clean_files; exit 1' 1 2 15
-
test "x$prefix" = xNONE && prefix=$ac_default_prefix
# Let make expand exec_prefix.
test "x$exec_prefix" = xNONE && exec_prefix='${prefix}'
-# Any assignment to VPATH causes Sun make to only execute
-# the first set of double-colon rules, so remove it if not needed.
-# If there is a colon in the path, we need to keep it.
+# VPATH may cause trouble with some makes, so we remove $(srcdir),
+# ${srcdir} and @srcdir@ from VPATH if srcdir is ".", strip leading and
+# trailing colons and then remove the whole line if VPATH becomes empty
+# (actually we leave an empty line to preserve line numbers).
if test "x$srcdir" = x.; then
- ac_vpsub='/^[ ]*VPATH[ ]*=[^:]*$/d'
+ ac_vpsub='/^[ ]*VPATH[ ]*=/{
+s/:*\$(srcdir):*/:/;
+s/:*\${srcdir}:*/:/;
+s/:*@srcdir@:*/:/;
+s/^\([^=]*=[ ]*\):*/\1/;
+s/:*$//;
+s/^[^=]*=[ ]*$//;
+}'
fi
-trap 'rm -f $CONFIG_STATUS conftest*; exit 1' 1 2 15
-
DEFS=-DHAVE_CONFIG_H
-# Without the "./", some shells look in PATH for config.status.
-: ${CONFIG_STATUS=./config.status}
+ac_libobjs=
+ac_ltlibobjs=
+for ac_i in : $LIBOBJS; do test "x$ac_i" = x: && continue
+ # 1. Remove the extension, and $U if already installed.
+ ac_i=`echo "$ac_i" |
+ sed 's/\$U\././;s/\.o$//;s/\.obj$//'`
+ # 2. Add them.
+ ac_libobjs="$ac_libobjs $ac_i\$U.$ac_objext"
+ ac_ltlibobjs="$ac_ltlibobjs $ac_i"'$U.lo'
+done
+LIBOBJS=$ac_libobjs
-echo creating $CONFIG_STATUS
-rm -f $CONFIG_STATUS
-cat > $CONFIG_STATUS <<EOF
-#! /bin/sh
-# Generated automatically by configure.
+LTLIBOBJS=$ac_ltlibobjs
+
+
+if test -z "${AMDEP_TRUE}" && test -z "${AMDEP_FALSE}"; then
+ { { echo "$as_me:$LINENO: error: conditional \"AMDEP\" was never defined.
+Usually this means the macro was only invoked conditionally." >&5
+echo "$as_me: error: conditional \"AMDEP\" was never defined.
+Usually this means the macro was only invoked conditionally." >&2;}
+ { (exit 1); exit 1; }; }
+fi
+if test -z "${am__fastdepCC_TRUE}" && test -z "${am__fastdepCC_FALSE}"; then
+ { { echo "$as_me:$LINENO: error: conditional \"am__fastdepCC\" was never defined.
+Usually this means the macro was only invoked conditionally." >&5
+echo "$as_me: error: conditional \"am__fastdepCC\" was never defined.
+Usually this means the macro was only invoked conditionally." >&2;}
+ { (exit 1); exit 1; }; }
+fi
+if test -z "${MAINTAINER_MODE_TRUE}" && test -z "${MAINTAINER_MODE_FALSE}"; then
+ { { echo "$as_me:$LINENO: error: conditional \"MAINTAINER_MODE\" was never defined.
+Usually this means the macro was only invoked conditionally." >&5
+echo "$as_me: error: conditional \"MAINTAINER_MODE\" was never defined.
+Usually this means the macro was only invoked conditionally." >&2;}
+ { (exit 1); exit 1; }; }
+fi
+if test -z "${GENINSRC_NEVER_TRUE}" && test -z "${GENINSRC_NEVER_FALSE}"; then
+ { { echo "$as_me:$LINENO: error: conditional \"GENINSRC_NEVER\" was never defined.
+Usually this means the macro was only invoked conditionally." >&5
+echo "$as_me: error: conditional \"GENINSRC_NEVER\" was never defined.
+Usually this means the macro was only invoked conditionally." >&2;}
+ { (exit 1); exit 1; }; }
+fi
+
+: ${CONFIG_STATUS=./config.status}
+ac_clean_files_save=$ac_clean_files
+ac_clean_files="$ac_clean_files $CONFIG_STATUS"
+{ echo "$as_me:$LINENO: creating $CONFIG_STATUS" >&5
+echo "$as_me: creating $CONFIG_STATUS" >&6;}
+cat >$CONFIG_STATUS <<_ACEOF
+#! $SHELL
+# Generated by $as_me.
# Run this file to recreate the current configuration.
-# This directory was configured as follows,
-# on host `(hostname || uname -n) 2>/dev/null | sed 1q`:
-#
-# $0 $ac_configure_args
-#
# Compiler output produced by configure, useful for debugging
-# configure, is in ./config.log if it exists.
+# configure, is in config.log if it exists.
-ac_cs_usage="Usage: $CONFIG_STATUS [--recheck] [--version] [--help]"
-for ac_option
+debug=false
+ac_cs_recheck=false
+ac_cs_silent=false
+SHELL=\${CONFIG_SHELL-$SHELL}
+_ACEOF
+
+cat >>$CONFIG_STATUS <<\_ACEOF
+## --------------------- ##
+## M4sh Initialization. ##
+## --------------------- ##
+
+# Be Bourne compatible
+if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then
+ emulate sh
+ NULLCMD=:
+ # Zsh 3.x and 4.x performs word splitting on ${1+"$@"}, which
+ # is contrary to our usage. Disable this feature.
+ alias -g '${1+"$@"}'='"$@"'
+elif test -n "${BASH_VERSION+set}" && (set -o posix) >/dev/null 2>&1; then
+ set -o posix
+fi
+DUALCASE=1; export DUALCASE # for MKS sh
+
+# Support unset when possible.
+if ( (MAIL=60; unset MAIL) || exit) >/dev/null 2>&1; then
+ as_unset=unset
+else
+ as_unset=false
+fi
+
+
+# Work around bugs in pre-3.0 UWIN ksh.
+$as_unset ENV MAIL MAILPATH
+PS1='$ '
+PS2='> '
+PS4='+ '
+
+# NLS nuisances.
+for as_var in \
+ LANG LANGUAGE LC_ADDRESS LC_ALL LC_COLLATE LC_CTYPE LC_IDENTIFICATION \
+ LC_MEASUREMENT LC_MESSAGES LC_MONETARY LC_NAME LC_NUMERIC LC_PAPER \
+ LC_TELEPHONE LC_TIME
do
- case "\$ac_option" in
- -recheck | --recheck | --rechec | --reche | --rech | --rec | --re | --r)
- 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.13"
- exit 0 ;;
- -help | --help | --hel | --he | --h)
- echo "\$ac_cs_usage"; exit 0 ;;
- *) echo "\$ac_cs_usage"; exit 1 ;;
- esac
+ if (set +x; test -z "`(eval $as_var=C; export $as_var) 2>&1`"); then
+ eval $as_var=C; export $as_var
+ else
+ $as_unset $as_var
+ fi
done
-ac_given_srcdir=$srcdir
-ac_given_INSTALL="$INSTALL"
+# Required to use basename.
+if expr a : '\(a\)' >/dev/null 2>&1; then
+ as_expr=expr
+else
+ as_expr=false
+fi
-trap 'rm -fr `echo "Makefile po/Makefile.in:po/Make-in config.h:config.in" | sed "s/:[^ ]*//g"` conftest*; exit 1' 1 2 15
-EOF
-cat >> $CONFIG_STATUS <<EOF
+if (basename /) >/dev/null 2>&1 && test "X`basename / 2>&1`" = "X/"; then
+ as_basename=basename
+else
+ as_basename=false
+fi
-# Protect against being on the right side of a sed subst in config.status.
-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
-s%@FFLAGS@%$FFLAGS%g
-s%@DEFS@%$DEFS%g
-s%@LDFLAGS@%$LDFLAGS%g
-s%@LIBS@%$LIBS%g
-s%@exec_prefix@%$exec_prefix%g
-s%@prefix@%$prefix%g
-s%@program_transform_name@%$program_transform_name%g
-s%@bindir@%$bindir%g
-s%@sbindir@%$sbindir%g
-s%@libexecdir@%$libexecdir%g
-s%@datadir@%$datadir%g
-s%@sysconfdir@%$sysconfdir%g
-s%@sharedstatedir@%$sharedstatedir%g
-s%@localstatedir@%$localstatedir%g
-s%@libdir@%$libdir%g
-s%@includedir@%$includedir%g
-s%@oldincludedir@%$oldincludedir%g
-s%@infodir@%$infodir%g
-s%@mandir@%$mandir%g
-s%@host@%$host%g
-s%@host_alias@%$host_alias%g
-s%@host_cpu@%$host_cpu%g
-s%@host_vendor@%$host_vendor%g
-s%@host_os@%$host_os%g
-s%@target@%$target%g
-s%@target_alias@%$target_alias%g
-s%@target_cpu@%$target_cpu%g
-s%@target_vendor@%$target_vendor%g
-s%@target_os@%$target_os%g
-s%@build@%$build%g
-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%@INSTALL_PROGRAM@%$INSTALL_PROGRAM%g
-s%@INSTALL_SCRIPT@%$INSTALL_SCRIPT%g
-s%@INSTALL_DATA@%$INSTALL_DATA%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%@CC@%$CC%g
-s%@LN_S@%$LN_S%g
-s%@OBJEXT@%$OBJEXT%g
-s%@EXEEXT@%$EXEEXT%g
-s%@RANLIB@%$RANLIB%g
-s%@STRIP@%$STRIP%g
-s%@LIBTOOL@%$LIBTOOL%g
-s%@use_sysroot@%$use_sysroot%g
-s%@TARGET_SYSTEM_ROOT@%$TARGET_SYSTEM_ROOT%g
-s%@TARGET_SYSTEM_ROOT_DEFINE@%$TARGET_SYSTEM_ROOT_DEFINE%g
-s%@WARN_CFLAGS@%$WARN_CFLAGS%g
-s%@CPP@%$CPP%g
-s%@ALLOCA@%$ALLOCA%g
-s%@USE_NLS@%$USE_NLS%g
-s%@MSGFMT@%$MSGFMT%g
-s%@GMSGFMT@%$GMSGFMT%g
-s%@XGETTEXT@%$XGETTEXT%g
-s%@USE_INCLUDED_LIBINTL@%$USE_INCLUDED_LIBINTL%g
-s%@CATALOGS@%$CATALOGS%g
-s%@CATOBJEXT@%$CATOBJEXT%g
-s%@DATADIRNAME@%$DATADIRNAME%g
-s%@GMOFILES@%$GMOFILES%g
-s%@INSTOBJEXT@%$INSTOBJEXT%g
-s%@INTLDEPS@%$INTLDEPS%g
-s%@INTLLIBS@%$INTLLIBS%g
-s%@INTLOBJS@%$INTLOBJS%g
-s%@POFILES@%$POFILES%g
-s%@POSUB@%$POSUB%g
-s%@INCLUDE_LOCALE_H@%$INCLUDE_LOCALE_H%g
-s%@GT_NO@%$GT_NO%g
-s%@GT_YES@%$GT_YES%g
-s%@MKINSTALLDIRS@%$MKINSTALLDIRS%g
-s%@l@%$l%g
-s%@YACC@%$YACC%g
-s%@LEX@%$LEX%g
-s%@LEXLIB@%$LEXLIB%g
-s%@LEX_OUTPUT_ROOT@%$LEX_OUTPUT_ROOT%g
-s%@MAINTAINER_MODE_TRUE@%$MAINTAINER_MODE_TRUE%g
-s%@MAINTAINER_MODE_FALSE@%$MAINTAINER_MODE_FALSE%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%@STRINGIFY@%$STRINGIFY%g
-s%@EMUL@%$EMUL%g
-/@TDIRS@/r $TDIRS
-s%@TDIRS@%%g
-s%@EMULATION_OFILES@%$EMULATION_OFILES%g
-s%@EMUL_EXTRA_OFILES@%$EMUL_EXTRA_OFILES%g
-s%@LIB_PATH@%$LIB_PATH%g
-s%@EMULATION_LIBPATH@%$EMULATION_LIBPATH%g
-s%@TESTBFDLIB@%$TESTBFDLIB%g
-CEOF
-EOF
-
-cat >> $CONFIG_STATUS <<\EOF
-
-# Split the substitutions into bite-sized pieces for seds with
-# small command number limits, like on Digital OSF/1 and HP-UX.
-ac_max_sed_cmds=90 # Maximum number of lines to put in a sed script.
-ac_file=1 # Number of current file.
-ac_beg=1 # First line for current file.
-ac_end=$ac_max_sed_cmds # Line after last line for current file.
-ac_more_lines=:
-ac_sed_cmds=""
-while $ac_more_lines; do
- if test $ac_beg -gt 1; then
- sed "1,${ac_beg}d; ${ac_end}q" conftest.subs > conftest.s$ac_file
+# Name of the executable.
+as_me=`$as_basename "$0" ||
+$as_expr X/"$0" : '.*/\([^/][^/]*\)/*$' \| \
+ X"$0" : 'X\(//\)$' \| \
+ X"$0" : 'X\(/\)$' \| \
+ . : '\(.\)' 2>/dev/null ||
+echo X/"$0" |
+ sed '/^.*\/\([^/][^/]*\)\/*$/{ s//\1/; q; }
+ /^X\/\(\/\/\)$/{ s//\1/; q; }
+ /^X\/\(\/\).*/{ s//\1/; q; }
+ s/.*/./; q'`
+
+
+# PATH needs CR, and LINENO needs CR and PATH.
+# Avoid depending upon Character Ranges.
+as_cr_letters='abcdefghijklmnopqrstuvwxyz'
+as_cr_LETTERS='ABCDEFGHIJKLMNOPQRSTUVWXYZ'
+as_cr_Letters=$as_cr_letters$as_cr_LETTERS
+as_cr_digits='0123456789'
+as_cr_alnum=$as_cr_Letters$as_cr_digits
+
+# The user is always right.
+if test "${PATH_SEPARATOR+set}" != set; then
+ echo "#! /bin/sh" >conf$$.sh
+ echo "exit 0" >>conf$$.sh
+ chmod +x conf$$.sh
+ if (PATH="/nonexistent;."; conf$$.sh) >/dev/null 2>&1; then
+ PATH_SEPARATOR=';'
else
- sed "${ac_end}q" conftest.subs > conftest.s$ac_file
+ PATH_SEPARATOR=:
fi
- if test ! -s conftest.s$ac_file; then
- ac_more_lines=false
- rm -f conftest.s$ac_file
+ rm -f conf$$.sh
+fi
+
+
+ as_lineno_1=$LINENO
+ as_lineno_2=$LINENO
+ as_lineno_3=`(expr $as_lineno_1 + 1) 2>/dev/null`
+ test "x$as_lineno_1" != "x$as_lineno_2" &&
+ test "x$as_lineno_3" = "x$as_lineno_2" || {
+ # Find who we are. Look in the path if we contain no path at all
+ # relative or not.
+ case $0 in
+ *[\\/]* ) as_myself=$0 ;;
+ *) as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
+for as_dir in $PATH
+do
+ IFS=$as_save_IFS
+ test -z "$as_dir" && as_dir=.
+ test -r "$as_dir/$0" && as_myself=$as_dir/$0 && break
+done
+
+ ;;
+ esac
+ # We did not find ourselves, most probably we were run as `sh COMMAND'
+ # in which case we are not to be found in the path.
+ if test "x$as_myself" = x; then
+ as_myself=$0
+ fi
+ if test ! -f "$as_myself"; then
+ { { echo "$as_me:$LINENO: error: cannot find myself; rerun with an absolute path" >&5
+echo "$as_me: error: cannot find myself; rerun with an absolute path" >&2;}
+ { (exit 1); exit 1; }; }
+ fi
+ case $CONFIG_SHELL in
+ '')
+ as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
+for as_dir in /bin$PATH_SEPARATOR/usr/bin$PATH_SEPARATOR$PATH
+do
+ IFS=$as_save_IFS
+ test -z "$as_dir" && as_dir=.
+ for as_base in sh bash ksh sh5; do
+ case $as_dir in
+ /*)
+ if ("$as_dir/$as_base" -c '
+ as_lineno_1=$LINENO
+ as_lineno_2=$LINENO
+ as_lineno_3=`(expr $as_lineno_1 + 1) 2>/dev/null`
+ test "x$as_lineno_1" != "x$as_lineno_2" &&
+ test "x$as_lineno_3" = "x$as_lineno_2" ') 2>/dev/null; then
+ $as_unset BASH_ENV || test "${BASH_ENV+set}" != set || { BASH_ENV=; export BASH_ENV; }
+ $as_unset ENV || test "${ENV+set}" != set || { ENV=; export ENV; }
+ CONFIG_SHELL=$as_dir/$as_base
+ export CONFIG_SHELL
+ exec "$CONFIG_SHELL" "$0" ${1+"$@"}
+ fi;;
+ esac
+ done
+done
+;;
+ esac
+
+ # Create $as_me.lineno as a copy of $as_myself, but with $LINENO
+ # uniformly replaced by the line number. The first 'sed' inserts a
+ # line-number line before each line; the second 'sed' does the real
+ # work. The second script uses 'N' to pair each line-number line
+ # with the numbered line, and appends trailing '-' during
+ # substitution so that $LINENO is not a special case at line end.
+ # (Raja R Harinath suggested sed '=', and Paul Eggert wrote the
+ # second 'sed' script. Blame Lee E. McMahon for sed's syntax. :-)
+ sed '=' <$as_myself |
+ sed '
+ N
+ s,$,-,
+ : loop
+ s,^\(['$as_cr_digits']*\)\(.*\)[$]LINENO\([^'$as_cr_alnum'_]\),\1\2\1\3,
+ t loop
+ s,-$,,
+ s,^['$as_cr_digits']*\n,,
+ ' >$as_me.lineno &&
+ chmod +x $as_me.lineno ||
+ { { echo "$as_me:$LINENO: error: cannot create $as_me.lineno; rerun with a POSIX shell" >&5
+echo "$as_me: error: cannot create $as_me.lineno; rerun with a POSIX shell" >&2;}
+ { (exit 1); exit 1; }; }
+
+ # Don't try to exec as it changes $[0], causing all sort of problems
+ # (the dirname of $[0] is not the place where we might find the
+ # original and so on. Autoconf is especially sensible to this).
+ . ./$as_me.lineno
+ # Exit status is that of the last command.
+ exit
+}
+
+
+case `echo "testing\c"; echo 1,2,3`,`echo -n testing; echo 1,2,3` in
+ *c*,-n*) ECHO_N= ECHO_C='
+' ECHO_T=' ' ;;
+ *c*,* ) ECHO_N=-n ECHO_C= ECHO_T= ;;
+ *) ECHO_N= ECHO_C='\c' ECHO_T= ;;
+esac
+
+if expr a : '\(a\)' >/dev/null 2>&1; then
+ as_expr=expr
+else
+ as_expr=false
+fi
+
+rm -f conf$$ conf$$.exe conf$$.file
+echo >conf$$.file
+if ln -s conf$$.file conf$$ 2>/dev/null; then
+ # We could just check for DJGPP; but this test a) works b) is more generic
+ # and c) will remain valid once DJGPP supports symlinks (DJGPP 2.04).
+ if test -f conf$$.exe; then
+ # Don't use ln at all; we don't have any links
+ as_ln_s='cp -p'
else
- if test -z "$ac_sed_cmds"; then
- ac_sed_cmds="sed -f conftest.s$ac_file"
- else
- ac_sed_cmds="$ac_sed_cmds | sed -f conftest.s$ac_file"
- fi
- ac_file=`expr $ac_file + 1`
- ac_beg=$ac_end
- ac_end=`expr $ac_end + $ac_max_sed_cmds`
+ as_ln_s='ln -s'
fi
+elif ln conf$$.file conf$$ 2>/dev/null; then
+ as_ln_s=ln
+else
+ as_ln_s='cp -p'
+fi
+rm -f conf$$ conf$$.exe conf$$.file
+
+if mkdir -p . 2>/dev/null; then
+ as_mkdir_p=:
+else
+ test -d ./-p && rmdir ./-p
+ as_mkdir_p=false
+fi
+
+as_executable_p="test -f"
+
+# Sed expression to map a string onto a valid CPP name.
+as_tr_cpp="eval sed 'y%*$as_cr_letters%P$as_cr_LETTERS%;s%[^_$as_cr_alnum]%_%g'"
+
+# Sed expression to map a string onto a valid variable name.
+as_tr_sh="eval sed 'y%*+%pp%;s%[^_$as_cr_alnum]%_%g'"
+
+
+# IFS
+# We need space, tab and new line, in precisely that order.
+as_nl='
+'
+IFS=" $as_nl"
+
+# CDPATH.
+$as_unset CDPATH
+
+exec 6>&1
+
+# Open the log real soon, to keep \$[0] and so on meaningful, and to
+# report actual input values of CONFIG_FILES etc. instead of their
+# values after options handling. Logging --version etc. is OK.
+exec 5>>config.log
+{
+ echo
+ sed 'h;s/./-/g;s/^.../## /;s/...$/ ##/;p;x;p;x' <<_ASBOX
+## Running $as_me. ##
+_ASBOX
+} >&5
+cat >&5 <<_CSEOF
+
+This file was extended by $as_me, which was
+generated by GNU Autoconf 2.59. Invocation command line was
+
+ CONFIG_FILES = $CONFIG_FILES
+ CONFIG_HEADERS = $CONFIG_HEADERS
+ CONFIG_LINKS = $CONFIG_LINKS
+ CONFIG_COMMANDS = $CONFIG_COMMANDS
+ $ $0 $@
+
+_CSEOF
+echo "on `(hostname || uname -n) 2>/dev/null | sed 1q`" >&5
+echo >&5
+_ACEOF
+
+# Files that config.status was made for.
+if test -n "$ac_config_files"; then
+ echo "config_files=\"$ac_config_files\"" >>$CONFIG_STATUS
+fi
+
+if test -n "$ac_config_headers"; then
+ echo "config_headers=\"$ac_config_headers\"" >>$CONFIG_STATUS
+fi
+
+if test -n "$ac_config_links"; then
+ echo "config_links=\"$ac_config_links\"" >>$CONFIG_STATUS
+fi
+
+if test -n "$ac_config_commands"; then
+ echo "config_commands=\"$ac_config_commands\"" >>$CONFIG_STATUS
+fi
+
+cat >>$CONFIG_STATUS <<\_ACEOF
+
+ac_cs_usage="\
+\`$as_me' instantiates files from templates according to the
+current configuration.
+
+Usage: $0 [OPTIONS] [FILE]...
+
+ -h, --help print this help, then exit
+ -V, --version print version number, then exit
+ -q, --quiet do not print progress messages
+ -d, --debug don't remove temporary files
+ --recheck update $as_me by reconfiguring in the same conditions
+ --file=FILE[:TEMPLATE]
+ instantiate the configuration file FILE
+ --header=FILE[:TEMPLATE]
+ instantiate the configuration header FILE
+
+Configuration files:
+$config_files
+
+Configuration headers:
+$config_headers
+
+Configuration commands:
+$config_commands
+
+Report bugs to <bug-autoconf@gnu.org>."
+_ACEOF
+
+cat >>$CONFIG_STATUS <<_ACEOF
+ac_cs_version="\\
+config.status
+configured by $0, generated by GNU Autoconf 2.59,
+ with options \\"`echo "$ac_configure_args" | sed 's/[\\""\`\$]/\\\\&/g'`\\"
+
+Copyright (C) 2003 Free Software Foundation, Inc.
+This config.status script is free software; the Free Software Foundation
+gives unlimited permission to copy, distribute and modify it."
+srcdir=$srcdir
+INSTALL="$INSTALL"
+_ACEOF
+
+cat >>$CONFIG_STATUS <<\_ACEOF
+# If no file are specified by the user, then we need to provide default
+# value. By we need to know if files were specified by the user.
+ac_need_defaults=:
+while test $# != 0
+do
+ case $1 in
+ --*=*)
+ ac_option=`expr "x$1" : 'x\([^=]*\)='`
+ ac_optarg=`expr "x$1" : 'x[^=]*=\(.*\)'`
+ ac_shift=:
+ ;;
+ -*)
+ ac_option=$1
+ ac_optarg=$2
+ ac_shift=shift
+ ;;
+ *) # This is not an option, so the user has probably given explicit
+ # arguments.
+ ac_option=$1
+ ac_need_defaults=false;;
+ esac
+
+ case $ac_option in
+ # Handling of the options.
+_ACEOF
+cat >>$CONFIG_STATUS <<\_ACEOF
+ -recheck | --recheck | --rechec | --reche | --rech | --rec | --re | --r)
+ ac_cs_recheck=: ;;
+ --version | --vers* | -V )
+ echo "$ac_cs_version"; exit 0 ;;
+ --he | --h)
+ # Conflict between --help and --header
+ { { echo "$as_me:$LINENO: error: ambiguous option: $1
+Try \`$0 --help' for more information." >&5
+echo "$as_me: error: ambiguous option: $1
+Try \`$0 --help' for more information." >&2;}
+ { (exit 1); exit 1; }; };;
+ --help | --hel | -h )
+ echo "$ac_cs_usage"; exit 0 ;;
+ --debug | --d* | -d )
+ debug=: ;;
+ --file | --fil | --fi | --f )
+ $ac_shift
+ CONFIG_FILES="$CONFIG_FILES $ac_optarg"
+ ac_need_defaults=false;;
+ --header | --heade | --head | --hea )
+ $ac_shift
+ CONFIG_HEADERS="$CONFIG_HEADERS $ac_optarg"
+ ac_need_defaults=false;;
+ -q | -quiet | --quiet | --quie | --qui | --qu | --q \
+ | -silent | --silent | --silen | --sile | --sil | --si | --s)
+ ac_cs_silent=: ;;
+
+ # This is an error.
+ -*) { { echo "$as_me:$LINENO: error: unrecognized option: $1
+Try \`$0 --help' for more information." >&5
+echo "$as_me: error: unrecognized option: $1
+Try \`$0 --help' for more information." >&2;}
+ { (exit 1); exit 1; }; } ;;
+
+ *) ac_config_targets="$ac_config_targets $1" ;;
+
+ esac
+ shift
done
-if test -z "$ac_sed_cmds"; then
- ac_sed_cmds=cat
+
+ac_configure_extra_args=
+
+if $ac_cs_silent; then
+ exec 6>/dev/null
+ ac_configure_extra_args="$ac_configure_extra_args --silent"
fi
-EOF
-cat >> $CONFIG_STATUS <<EOF
+_ACEOF
+cat >>$CONFIG_STATUS <<_ACEOF
+if \$ac_cs_recheck; then
+ echo "running $SHELL $0 " $ac_configure_args \$ac_configure_extra_args " --no-create --no-recursion" >&6
+ exec $SHELL $0 $ac_configure_args \$ac_configure_extra_args --no-create --no-recursion
+fi
-CONFIG_FILES=\${CONFIG_FILES-"Makefile po/Makefile.in:po/Make-in"}
-EOF
-cat >> $CONFIG_STATUS <<\EOF
-for ac_file in .. $CONFIG_FILES; do if test "x$ac_file" != x..; then
- # Support "outfile[:infile[:infile...]]", defaulting infile="outfile.in".
- case "$ac_file" in
- *:*) ac_file_in=`echo "$ac_file"|sed 's%[^:]*:%%'`
- ac_file=`echo "$ac_file"|sed 's%:.*%%'` ;;
- *) ac_file_in="${ac_file}.in" ;;
+_ACEOF
+
+cat >>$CONFIG_STATUS <<_ACEOF
+#
+# INIT-COMMANDS section.
+#
+
+AMDEP_TRUE="$AMDEP_TRUE" ac_aux_dir="$ac_aux_dir"
+
+
+# The HP-UX ksh and POSIX shell print the target directory to stdout
+# if CDPATH is set.
+(unset CDPATH) >/dev/null 2>&1 && unset CDPATH
+
+sed_quote_subst='$sed_quote_subst'
+double_quote_subst='$double_quote_subst'
+delay_variable_subst='$delay_variable_subst'
+macro_version='`$ECHO "X$macro_version" | $Xsed -e "$delay_single_quote_subst"`'
+macro_revision='`$ECHO "X$macro_revision" | $Xsed -e "$delay_single_quote_subst"`'
+enable_shared='`$ECHO "X$enable_shared" | $Xsed -e "$delay_single_quote_subst"`'
+enable_static='`$ECHO "X$enable_static" | $Xsed -e "$delay_single_quote_subst"`'
+pic_mode='`$ECHO "X$pic_mode" | $Xsed -e "$delay_single_quote_subst"`'
+enable_fast_install='`$ECHO "X$enable_fast_install" | $Xsed -e "$delay_single_quote_subst"`'
+host_alias='`$ECHO "X$host_alias" | $Xsed -e "$delay_single_quote_subst"`'
+host='`$ECHO "X$host" | $Xsed -e "$delay_single_quote_subst"`'
+host_os='`$ECHO "X$host_os" | $Xsed -e "$delay_single_quote_subst"`'
+build_alias='`$ECHO "X$build_alias" | $Xsed -e "$delay_single_quote_subst"`'
+build='`$ECHO "X$build" | $Xsed -e "$delay_single_quote_subst"`'
+build_os='`$ECHO "X$build_os" | $Xsed -e "$delay_single_quote_subst"`'
+SED='`$ECHO "X$SED" | $Xsed -e "$delay_single_quote_subst"`'
+Xsed='`$ECHO "X$Xsed" | $Xsed -e "$delay_single_quote_subst"`'
+GREP='`$ECHO "X$GREP" | $Xsed -e "$delay_single_quote_subst"`'
+EGREP='`$ECHO "X$EGREP" | $Xsed -e "$delay_single_quote_subst"`'
+FGREP='`$ECHO "X$FGREP" | $Xsed -e "$delay_single_quote_subst"`'
+LD='`$ECHO "X$LD" | $Xsed -e "$delay_single_quote_subst"`'
+NM='`$ECHO "X$NM" | $Xsed -e "$delay_single_quote_subst"`'
+LN_S='`$ECHO "X$LN_S" | $Xsed -e "$delay_single_quote_subst"`'
+max_cmd_len='`$ECHO "X$max_cmd_len" | $Xsed -e "$delay_single_quote_subst"`'
+ac_objext='`$ECHO "X$ac_objext" | $Xsed -e "$delay_single_quote_subst"`'
+exeext='`$ECHO "X$exeext" | $Xsed -e "$delay_single_quote_subst"`'
+lt_unset='`$ECHO "X$lt_unset" | $Xsed -e "$delay_single_quote_subst"`'
+lt_SP2NL='`$ECHO "X$lt_SP2NL" | $Xsed -e "$delay_single_quote_subst"`'
+lt_NL2SP='`$ECHO "X$lt_NL2SP" | $Xsed -e "$delay_single_quote_subst"`'
+reload_flag='`$ECHO "X$reload_flag" | $Xsed -e "$delay_single_quote_subst"`'
+reload_cmds='`$ECHO "X$reload_cmds" | $Xsed -e "$delay_single_quote_subst"`'
+deplibs_check_method='`$ECHO "X$deplibs_check_method" | $Xsed -e "$delay_single_quote_subst"`'
+file_magic_cmd='`$ECHO "X$file_magic_cmd" | $Xsed -e "$delay_single_quote_subst"`'
+AR='`$ECHO "X$AR" | $Xsed -e "$delay_single_quote_subst"`'
+AR_FLAGS='`$ECHO "X$AR_FLAGS" | $Xsed -e "$delay_single_quote_subst"`'
+STRIP='`$ECHO "X$STRIP" | $Xsed -e "$delay_single_quote_subst"`'
+RANLIB='`$ECHO "X$RANLIB" | $Xsed -e "$delay_single_quote_subst"`'
+old_postinstall_cmds='`$ECHO "X$old_postinstall_cmds" | $Xsed -e "$delay_single_quote_subst"`'
+old_postuninstall_cmds='`$ECHO "X$old_postuninstall_cmds" | $Xsed -e "$delay_single_quote_subst"`'
+old_archive_cmds='`$ECHO "X$old_archive_cmds" | $Xsed -e "$delay_single_quote_subst"`'
+CC='`$ECHO "X$CC" | $Xsed -e "$delay_single_quote_subst"`'
+CFLAGS='`$ECHO "X$CFLAGS" | $Xsed -e "$delay_single_quote_subst"`'
+compiler='`$ECHO "X$compiler" | $Xsed -e "$delay_single_quote_subst"`'
+GCC='`$ECHO "X$GCC" | $Xsed -e "$delay_single_quote_subst"`'
+lt_cv_sys_global_symbol_pipe='`$ECHO "X$lt_cv_sys_global_symbol_pipe" | $Xsed -e "$delay_single_quote_subst"`'
+lt_cv_sys_global_symbol_to_cdecl='`$ECHO "X$lt_cv_sys_global_symbol_to_cdecl" | $Xsed -e "$delay_single_quote_subst"`'
+lt_cv_sys_global_symbol_to_c_name_address='`$ECHO "X$lt_cv_sys_global_symbol_to_c_name_address" | $Xsed -e "$delay_single_quote_subst"`'
+objdir='`$ECHO "X$objdir" | $Xsed -e "$delay_single_quote_subst"`'
+SHELL='`$ECHO "X$SHELL" | $Xsed -e "$delay_single_quote_subst"`'
+ECHO='`$ECHO "X$ECHO" | $Xsed -e "$delay_single_quote_subst"`'
+MAGIC_CMD='`$ECHO "X$MAGIC_CMD" | $Xsed -e "$delay_single_quote_subst"`'
+lt_prog_compiler_no_builtin_flag='`$ECHO "X$lt_prog_compiler_no_builtin_flag" | $Xsed -e "$delay_single_quote_subst"`'
+lt_prog_compiler_wl='`$ECHO "X$lt_prog_compiler_wl" | $Xsed -e "$delay_single_quote_subst"`'
+lt_prog_compiler_pic='`$ECHO "X$lt_prog_compiler_pic" | $Xsed -e "$delay_single_quote_subst"`'
+lt_prog_compiler_static='`$ECHO "X$lt_prog_compiler_static" | $Xsed -e "$delay_single_quote_subst"`'
+lt_cv_prog_compiler_c_o='`$ECHO "X$lt_cv_prog_compiler_c_o" | $Xsed -e "$delay_single_quote_subst"`'
+need_locks='`$ECHO "X$need_locks" | $Xsed -e "$delay_single_quote_subst"`'
+libext='`$ECHO "X$libext" | $Xsed -e "$delay_single_quote_subst"`'
+shrext_cmds='`$ECHO "X$shrext_cmds" | $Xsed -e "$delay_single_quote_subst"`'
+extract_expsyms_cmds='`$ECHO "X$extract_expsyms_cmds" | $Xsed -e "$delay_single_quote_subst"`'
+archive_cmds_need_lc='`$ECHO "X$archive_cmds_need_lc" | $Xsed -e "$delay_single_quote_subst"`'
+enable_shared_with_static_runtimes='`$ECHO "X$enable_shared_with_static_runtimes" | $Xsed -e "$delay_single_quote_subst"`'
+export_dynamic_flag_spec='`$ECHO "X$export_dynamic_flag_spec" | $Xsed -e "$delay_single_quote_subst"`'
+whole_archive_flag_spec='`$ECHO "X$whole_archive_flag_spec" | $Xsed -e "$delay_single_quote_subst"`'
+compiler_needs_object='`$ECHO "X$compiler_needs_object" | $Xsed -e "$delay_single_quote_subst"`'
+old_archive_from_new_cmds='`$ECHO "X$old_archive_from_new_cmds" | $Xsed -e "$delay_single_quote_subst"`'
+old_archive_from_expsyms_cmds='`$ECHO "X$old_archive_from_expsyms_cmds" | $Xsed -e "$delay_single_quote_subst"`'
+archive_cmds='`$ECHO "X$archive_cmds" | $Xsed -e "$delay_single_quote_subst"`'
+archive_expsym_cmds='`$ECHO "X$archive_expsym_cmds" | $Xsed -e "$delay_single_quote_subst"`'
+module_cmds='`$ECHO "X$module_cmds" | $Xsed -e "$delay_single_quote_subst"`'
+module_expsym_cmds='`$ECHO "X$module_expsym_cmds" | $Xsed -e "$delay_single_quote_subst"`'
+with_gnu_ld='`$ECHO "X$with_gnu_ld" | $Xsed -e "$delay_single_quote_subst"`'
+allow_undefined_flag='`$ECHO "X$allow_undefined_flag" | $Xsed -e "$delay_single_quote_subst"`'
+no_undefined_flag='`$ECHO "X$no_undefined_flag" | $Xsed -e "$delay_single_quote_subst"`'
+hardcode_libdir_flag_spec='`$ECHO "X$hardcode_libdir_flag_spec" | $Xsed -e "$delay_single_quote_subst"`'
+hardcode_libdir_flag_spec_ld='`$ECHO "X$hardcode_libdir_flag_spec_ld" | $Xsed -e "$delay_single_quote_subst"`'
+hardcode_libdir_separator='`$ECHO "X$hardcode_libdir_separator" | $Xsed -e "$delay_single_quote_subst"`'
+hardcode_direct='`$ECHO "X$hardcode_direct" | $Xsed -e "$delay_single_quote_subst"`'
+hardcode_direct_absolute='`$ECHO "X$hardcode_direct_absolute" | $Xsed -e "$delay_single_quote_subst"`'
+hardcode_minus_L='`$ECHO "X$hardcode_minus_L" | $Xsed -e "$delay_single_quote_subst"`'
+hardcode_shlibpath_var='`$ECHO "X$hardcode_shlibpath_var" | $Xsed -e "$delay_single_quote_subst"`'
+hardcode_automatic='`$ECHO "X$hardcode_automatic" | $Xsed -e "$delay_single_quote_subst"`'
+inherit_rpath='`$ECHO "X$inherit_rpath" | $Xsed -e "$delay_single_quote_subst"`'
+link_all_deplibs='`$ECHO "X$link_all_deplibs" | $Xsed -e "$delay_single_quote_subst"`'
+fix_srcfile_path='`$ECHO "X$fix_srcfile_path" | $Xsed -e "$delay_single_quote_subst"`'
+always_export_symbols='`$ECHO "X$always_export_symbols" | $Xsed -e "$delay_single_quote_subst"`'
+export_symbols_cmds='`$ECHO "X$export_symbols_cmds" | $Xsed -e "$delay_single_quote_subst"`'
+exclude_expsyms='`$ECHO "X$exclude_expsyms" | $Xsed -e "$delay_single_quote_subst"`'
+include_expsyms='`$ECHO "X$include_expsyms" | $Xsed -e "$delay_single_quote_subst"`'
+prelink_cmds='`$ECHO "X$prelink_cmds" | $Xsed -e "$delay_single_quote_subst"`'
+file_list_spec='`$ECHO "X$file_list_spec" | $Xsed -e "$delay_single_quote_subst"`'
+variables_saved_for_relink='`$ECHO "X$variables_saved_for_relink" | $Xsed -e "$delay_single_quote_subst"`'
+need_lib_prefix='`$ECHO "X$need_lib_prefix" | $Xsed -e "$delay_single_quote_subst"`'
+need_version='`$ECHO "X$need_version" | $Xsed -e "$delay_single_quote_subst"`'
+version_type='`$ECHO "X$version_type" | $Xsed -e "$delay_single_quote_subst"`'
+runpath_var='`$ECHO "X$runpath_var" | $Xsed -e "$delay_single_quote_subst"`'
+shlibpath_var='`$ECHO "X$shlibpath_var" | $Xsed -e "$delay_single_quote_subst"`'
+shlibpath_overrides_runpath='`$ECHO "X$shlibpath_overrides_runpath" | $Xsed -e "$delay_single_quote_subst"`'
+libname_spec='`$ECHO "X$libname_spec" | $Xsed -e "$delay_single_quote_subst"`'
+library_names_spec='`$ECHO "X$library_names_spec" | $Xsed -e "$delay_single_quote_subst"`'
+soname_spec='`$ECHO "X$soname_spec" | $Xsed -e "$delay_single_quote_subst"`'
+postinstall_cmds='`$ECHO "X$postinstall_cmds" | $Xsed -e "$delay_single_quote_subst"`'
+postuninstall_cmds='`$ECHO "X$postuninstall_cmds" | $Xsed -e "$delay_single_quote_subst"`'
+finish_cmds='`$ECHO "X$finish_cmds" | $Xsed -e "$delay_single_quote_subst"`'
+finish_eval='`$ECHO "X$finish_eval" | $Xsed -e "$delay_single_quote_subst"`'
+hardcode_into_libs='`$ECHO "X$hardcode_into_libs" | $Xsed -e "$delay_single_quote_subst"`'
+sys_lib_search_path_spec='`$ECHO "X$sys_lib_search_path_spec" | $Xsed -e "$delay_single_quote_subst"`'
+sys_lib_dlsearch_path_spec='`$ECHO "X$sys_lib_dlsearch_path_spec" | $Xsed -e "$delay_single_quote_subst"`'
+hardcode_action='`$ECHO "X$hardcode_action" | $Xsed -e "$delay_single_quote_subst"`'
+enable_dlopen='`$ECHO "X$enable_dlopen" | $Xsed -e "$delay_single_quote_subst"`'
+enable_dlopen_self='`$ECHO "X$enable_dlopen_self" | $Xsed -e "$delay_single_quote_subst"`'
+enable_dlopen_self_static='`$ECHO "X$enable_dlopen_self_static" | $Xsed -e "$delay_single_quote_subst"`'
+old_striplib='`$ECHO "X$old_striplib" | $Xsed -e "$delay_single_quote_subst"`'
+striplib='`$ECHO "X$striplib" | $Xsed -e "$delay_single_quote_subst"`'
+
+LTCC='$LTCC'
+LTCFLAGS='$LTCFLAGS'
+compiler='$compiler_DEFAULT'
+
+# Quote evaled strings.
+for var in SED \
+GREP \
+EGREP \
+FGREP \
+LD \
+NM \
+LN_S \
+lt_SP2NL \
+lt_NL2SP \
+reload_flag \
+deplibs_check_method \
+file_magic_cmd \
+AR \
+AR_FLAGS \
+STRIP \
+RANLIB \
+CC \
+CFLAGS \
+compiler \
+lt_cv_sys_global_symbol_pipe \
+lt_cv_sys_global_symbol_to_cdecl \
+lt_cv_sys_global_symbol_to_c_name_address \
+SHELL \
+ECHO \
+lt_prog_compiler_no_builtin_flag \
+lt_prog_compiler_wl \
+lt_prog_compiler_pic \
+lt_prog_compiler_static \
+lt_cv_prog_compiler_c_o \
+need_locks \
+shrext_cmds \
+export_dynamic_flag_spec \
+whole_archive_flag_spec \
+compiler_needs_object \
+with_gnu_ld \
+allow_undefined_flag \
+no_undefined_flag \
+hardcode_libdir_flag_spec \
+hardcode_libdir_flag_spec_ld \
+hardcode_libdir_separator \
+fix_srcfile_path \
+exclude_expsyms \
+include_expsyms \
+file_list_spec \
+variables_saved_for_relink \
+libname_spec \
+library_names_spec \
+soname_spec \
+finish_eval \
+old_striplib \
+striplib; do
+ case \`eval \\\\\$ECHO "X\\\\\$\$var"\` in
+ *[\\\\\\\`\\"\\\$]*)
+ eval "lt_\$var=\\\\\\"\\\`\\\$ECHO \\"X\\\$\$var\\" | \\\$Xsed -e \\"\\\$sed_quote_subst\\"\\\`\\\\\\""
+ ;;
+ *)
+ eval "lt_\$var=\\\\\\"\\\$\$var\\\\\\""
+ ;;
+ esac
+done
+
+# Double-quote double-evaled strings.
+for var in reload_cmds \
+old_postinstall_cmds \
+old_postuninstall_cmds \
+old_archive_cmds \
+extract_expsyms_cmds \
+old_archive_from_new_cmds \
+old_archive_from_expsyms_cmds \
+archive_cmds \
+archive_expsym_cmds \
+module_cmds \
+module_expsym_cmds \
+export_symbols_cmds \
+prelink_cmds \
+postinstall_cmds \
+postuninstall_cmds \
+finish_cmds \
+sys_lib_search_path_spec \
+sys_lib_dlsearch_path_spec; do
+ case \`eval \\\\\$ECHO "X\\\\\$\$var"\` in
+ *[\\\\\\\`\\"\\\$]*)
+ eval "lt_\$var=\\\\\\"\\\`\\\$ECHO \\"X\\\$\$var\\" | \\\$Xsed -e \\"\\\$double_quote_subst\\" -e \\"\\\$sed_quote_subst\\" -e \\"\\\$delay_variable_subst\\"\\\`\\\\\\""
+ ;;
+ *)
+ eval "lt_\$var=\\\\\\"\\\$\$var\\\\\\""
+ ;;
+ esac
+done
+
+# Fix-up fallback echo if it was mangled by the above quoting rules.
+case \$lt_ECHO in
+*'\\\$0 --fallback-echo"') lt_ECHO=\`\$ECHO "X\$lt_ECHO" | \$Xsed -e 's/\\\\\\\\\\\\\\\$0 --fallback-echo"\$/\$0 --fallback-echo"/'\`
+ ;;
+esac
+
+ac_aux_dir='$ac_aux_dir'
+xsi_shell='$xsi_shell'
+lt_shell_append='$lt_shell_append'
+
+# See if we are running on zsh, and set the options which allow our
+# commands through without removal of \ escapes INIT.
+if test -n "\${ZSH_VERSION+set}" ; then
+ setopt NO_GLOB_SUBST
+fi
+
+
+ PACKAGE='$PACKAGE'
+ VERSION='$VERSION'
+ TIMESTAMP='$TIMESTAMP'
+ RM='$RM'
+ ofile='$ofile'
+
+
+
+# Capture the value of obsolete ALL_LINGUAS because we need it to compute
+ # POFILES, GMOFILES, UPDATEPOFILES, DUMMYPOFILES, CATALOGS. But hide it
+ # from automake.
+ eval 'OBSOLETE_ALL_LINGUAS''="$ALL_LINGUAS"'
+ # Capture the value of LINGUAS because we need it to compute CATALOGS.
+ LINGUAS="${LINGUAS-%UNSET%}"
+
+
+_ACEOF
+
+
+
+cat >>$CONFIG_STATUS <<\_ACEOF
+for ac_config_target in $ac_config_targets
+do
+ case "$ac_config_target" in
+ # Handling of arguments.
+ "Makefile" ) CONFIG_FILES="$CONFIG_FILES Makefile" ;;
+ "po/Makefile.in" ) CONFIG_FILES="$CONFIG_FILES po/Makefile.in:po/Make-in" ;;
+ "depfiles" ) CONFIG_COMMANDS="$CONFIG_COMMANDS depfiles" ;;
+ "libtool" ) CONFIG_COMMANDS="$CONFIG_COMMANDS libtool" ;;
+ "default-1" ) CONFIG_COMMANDS="$CONFIG_COMMANDS default-1" ;;
+ "config.h" ) CONFIG_HEADERS="$CONFIG_HEADERS config.h:config.in" ;;
+ *) { { echo "$as_me:$LINENO: error: invalid argument: $ac_config_target" >&5
+echo "$as_me: error: invalid argument: $ac_config_target" >&2;}
+ { (exit 1); exit 1; }; };;
esac
+done
- # Adjust a relative srcdir, top_srcdir, and INSTALL for subdirectories.
+# If the user did not use the arguments to specify the items to instantiate,
+# then the envvar interface is used. Set only those that are not.
+# We use the long form for the default assignment because of an extremely
+# bizarre bug on SunOS 4.1.3.
+if $ac_need_defaults; then
+ test "${CONFIG_FILES+set}" = set || CONFIG_FILES=$config_files
+ test "${CONFIG_HEADERS+set}" = set || CONFIG_HEADERS=$config_headers
+ test "${CONFIG_COMMANDS+set}" = set || CONFIG_COMMANDS=$config_commands
+fi
+
+# Have a temporary directory for convenience. Make it in the build tree
+# simply because there is no reason to put it here, and in addition,
+# creating and moving files from /tmp can sometimes cause problems.
+# Create a temporary directory, and hook for its removal unless debugging.
+$debug ||
+{
+ trap 'exit_status=$?; rm -rf $tmp && exit $exit_status' 0
+ trap '{ (exit 1); exit 1; }' 1 2 13 15
+}
- # Remove last slash and all that follows it. Not all systems have dirname.
- ac_dir=`echo $ac_file|sed 's%/[^/][^/]*$%%'`
- if test "$ac_dir" != "$ac_file" && test "$ac_dir" != .; then
- # The file is in a subdirectory.
- test ! -d "$ac_dir" && mkdir "$ac_dir"
- ac_dir_suffix="/`echo $ac_dir|sed 's%^\./%%'`"
- # A "../" for each directory in $ac_dir_suffix.
- ac_dots=`echo $ac_dir_suffix|sed 's%/[^/]*%../%g'`
- else
- ac_dir_suffix= ac_dots=
+# Create a (secure) tmp directory for tmp files.
+
+{
+ tmp=`(umask 077 && mktemp -d -q "./confstatXXXXXX") 2>/dev/null` &&
+ test -n "$tmp" && test -d "$tmp"
+} ||
+{
+ tmp=./confstat$$-$RANDOM
+ (umask 077 && mkdir $tmp)
+} ||
+{
+ echo "$me: cannot create a temporary directory in ." >&2
+ { (exit 1); exit 1; }
+}
+
+_ACEOF
+
+cat >>$CONFIG_STATUS <<_ACEOF
+
+#
+# CONFIG_FILES section.
+#
+
+# No need to generate the scripts if there are no CONFIG_FILES.
+# This happens for instance when ./config.status config.h
+if test -n "\$CONFIG_FILES"; then
+ # Protect against being on the right side of a sed subst in config.status.
+ sed 's/,@/@@/; s/@,/@@/; s/,;t t\$/@;t t/; /@;t t\$/s/[\\\\&,]/\\\\&/g;
+ s/@@/,@/; s/@@/@,/; s/@;t t\$/,;t t/' >\$tmp/subs.sed <<\\CEOF
+s,@SHELL@,$SHELL,;t t
+s,@PATH_SEPARATOR@,$PATH_SEPARATOR,;t t
+s,@PACKAGE_NAME@,$PACKAGE_NAME,;t t
+s,@PACKAGE_TARNAME@,$PACKAGE_TARNAME,;t t
+s,@PACKAGE_VERSION@,$PACKAGE_VERSION,;t t
+s,@PACKAGE_STRING@,$PACKAGE_STRING,;t t
+s,@PACKAGE_BUGREPORT@,$PACKAGE_BUGREPORT,;t t
+s,@exec_prefix@,$exec_prefix,;t t
+s,@prefix@,$prefix,;t t
+s,@program_transform_name@,$program_transform_name,;t t
+s,@bindir@,$bindir,;t t
+s,@sbindir@,$sbindir,;t t
+s,@libexecdir@,$libexecdir,;t t
+s,@datadir@,$datadir,;t t
+s,@sysconfdir@,$sysconfdir,;t t
+s,@sharedstatedir@,$sharedstatedir,;t t
+s,@localstatedir@,$localstatedir,;t t
+s,@libdir@,$libdir,;t t
+s,@includedir@,$includedir,;t t
+s,@oldincludedir@,$oldincludedir,;t t
+s,@infodir@,$infodir,;t t
+s,@mandir@,$mandir,;t t
+s,@build_alias@,$build_alias,;t t
+s,@host_alias@,$host_alias,;t t
+s,@target_alias@,$target_alias,;t t
+s,@DEFS@,$DEFS,;t t
+s,@ECHO_C@,$ECHO_C,;t t
+s,@ECHO_N@,$ECHO_N,;t t
+s,@ECHO_T@,$ECHO_T,;t t
+s,@LIBS@,$LIBS,;t t
+s,@build@,$build,;t t
+s,@build_cpu@,$build_cpu,;t t
+s,@build_vendor@,$build_vendor,;t t
+s,@build_os@,$build_os,;t t
+s,@host@,$host,;t t
+s,@host_cpu@,$host_cpu,;t t
+s,@host_vendor@,$host_vendor,;t t
+s,@host_os@,$host_os,;t t
+s,@target@,$target,;t t
+s,@target_cpu@,$target_cpu,;t t
+s,@target_vendor@,$target_vendor,;t t
+s,@target_os@,$target_os,;t t
+s,@CC@,$CC,;t t
+s,@CFLAGS@,$CFLAGS,;t t
+s,@LDFLAGS@,$LDFLAGS,;t t
+s,@CPPFLAGS@,$CPPFLAGS,;t t
+s,@ac_ct_CC@,$ac_ct_CC,;t t
+s,@EXEEXT@,$EXEEXT,;t t
+s,@OBJEXT@,$OBJEXT,;t t
+s,@INSTALL_PROGRAM@,$INSTALL_PROGRAM,;t t
+s,@INSTALL_SCRIPT@,$INSTALL_SCRIPT,;t t
+s,@INSTALL_DATA@,$INSTALL_DATA,;t t
+s,@CYGPATH_W@,$CYGPATH_W,;t t
+s,@PACKAGE@,$PACKAGE,;t t
+s,@VERSION@,$VERSION,;t t
+s,@ACLOCAL@,$ACLOCAL,;t t
+s,@AUTOCONF@,$AUTOCONF,;t t
+s,@AUTOMAKE@,$AUTOMAKE,;t t
+s,@AUTOHEADER@,$AUTOHEADER,;t t
+s,@MAKEINFO@,$MAKEINFO,;t t
+s,@install_sh@,$install_sh,;t t
+s,@STRIP@,$STRIP,;t t
+s,@ac_ct_STRIP@,$ac_ct_STRIP,;t t
+s,@INSTALL_STRIP_PROGRAM@,$INSTALL_STRIP_PROGRAM,;t t
+s,@mkdir_p@,$mkdir_p,;t t
+s,@AWK@,$AWK,;t t
+s,@SET_MAKE@,$SET_MAKE,;t t
+s,@am__leading_dot@,$am__leading_dot,;t t
+s,@AMTAR@,$AMTAR,;t t
+s,@am__tar@,$am__tar,;t t
+s,@am__untar@,$am__untar,;t t
+s,@DEPDIR@,$DEPDIR,;t t
+s,@am__include@,$am__include,;t t
+s,@am__quote@,$am__quote,;t t
+s,@AMDEP_TRUE@,$AMDEP_TRUE,;t t
+s,@AMDEP_FALSE@,$AMDEP_FALSE,;t t
+s,@AMDEPBACKSLASH@,$AMDEPBACKSLASH,;t t
+s,@CCDEPMODE@,$CCDEPMODE,;t t
+s,@am__fastdepCC_TRUE@,$am__fastdepCC_TRUE,;t t
+s,@am__fastdepCC_FALSE@,$am__fastdepCC_FALSE,;t t
+s,@LIBTOOL@,$LIBTOOL,;t t
+s,@SED@,$SED,;t t
+s,@EGREP@,$EGREP,;t t
+s,@FGREP@,$FGREP,;t t
+s,@GREP@,$GREP,;t t
+s,@LD@,$LD,;t t
+s,@DUMPBIN@,$DUMPBIN,;t t
+s,@ac_ct_DUMPBIN@,$ac_ct_DUMPBIN,;t t
+s,@NM@,$NM,;t t
+s,@LN_S@,$LN_S,;t t
+s,@AR@,$AR,;t t
+s,@ac_ct_AR@,$ac_ct_AR,;t t
+s,@RANLIB@,$RANLIB,;t t
+s,@ac_ct_RANLIB@,$ac_ct_RANLIB,;t t
+s,@lt_ECHO@,$lt_ECHO,;t t
+s,@CPP@,$CPP,;t t
+s,@use_sysroot@,$use_sysroot,;t t
+s,@TARGET_SYSTEM_ROOT@,$TARGET_SYSTEM_ROOT,;t t
+s,@TARGET_SYSTEM_ROOT_DEFINE@,$TARGET_SYSTEM_ROOT_DEFINE,;t t
+s,@WARN_CFLAGS@,$WARN_CFLAGS,;t t
+s,@NO_WERROR@,$NO_WERROR,;t t
+s,@USE_NLS@,$USE_NLS,;t t
+s,@LIBINTL@,$LIBINTL,;t t
+s,@LIBINTL_DEP@,$LIBINTL_DEP,;t t
+s,@INCINTL@,$INCINTL,;t t
+s,@XGETTEXT@,$XGETTEXT,;t t
+s,@GMSGFMT@,$GMSGFMT,;t t
+s,@POSUB@,$POSUB,;t t
+s,@CATALOGS@,$CATALOGS,;t t
+s,@DATADIRNAME@,$DATADIRNAME,;t t
+s,@INSTOBJEXT@,$INSTOBJEXT,;t t
+s,@GENCAT@,$GENCAT,;t t
+s,@CATOBJEXT@,$CATOBJEXT,;t t
+s,@MKINSTALLDIRS@,$MKINSTALLDIRS,;t t
+s,@MSGFMT@,$MSGFMT,;t t
+s,@MSGMERGE@,$MSGMERGE,;t t
+s,@YACC@,$YACC,;t t
+s,@LEX@,$LEX,;t t
+s,@LEXLIB@,$LEXLIB,;t t
+s,@LEX_OUTPUT_ROOT@,$LEX_OUTPUT_ROOT,;t t
+s,@MAINTAINER_MODE_TRUE@,$MAINTAINER_MODE_TRUE,;t t
+s,@MAINTAINER_MODE_FALSE@,$MAINTAINER_MODE_FALSE,;t t
+s,@MAINT@,$MAINT,;t t
+s,@GENINSRC_NEVER_TRUE@,$GENINSRC_NEVER_TRUE,;t t
+s,@GENINSRC_NEVER_FALSE@,$GENINSRC_NEVER_FALSE,;t t
+s,@HDEFINES@,$HDEFINES,;t t
+s,@HOSTING_CRT0@,$HOSTING_CRT0,;t t
+s,@HOSTING_LIBS@,$HOSTING_LIBS,;t t
+s,@NATIVE_LIB_DIRS@,$NATIVE_LIB_DIRS,;t t
+s,@STRINGIFY@,$STRINGIFY,;t t
+s,@EMUL@,$EMUL,;t t
+s,@EMULATION_OFILES@,$EMULATION_OFILES,;t t
+s,@EMUL_EXTRA_OFILES@,$EMUL_EXTRA_OFILES,;t t
+s,@LIB_PATH@,$LIB_PATH,;t t
+s,@EMULATION_LIBPATH@,$EMULATION_LIBPATH,;t t
+s,@TESTBFDLIB@,$TESTBFDLIB,;t t
+s,@datarootdir@,$datarootdir,;t t
+s,@docdir@,$docdir,;t t
+s,@htmldir@,$htmldir,;t t
+s,@LIBOBJS@,$LIBOBJS,;t t
+s,@LTLIBOBJS@,$LTLIBOBJS,;t t
+/@TDIRS@/r $TDIRS
+s,@TDIRS@,,;t t
+CEOF
+
+_ACEOF
+
+ cat >>$CONFIG_STATUS <<\_ACEOF
+ # Split the substitutions into bite-sized pieces for seds with
+ # small command number limits, like on Digital OSF/1 and HP-UX.
+ ac_max_sed_lines=48
+ ac_sed_frag=1 # Number of current file.
+ ac_beg=1 # First line for current file.
+ ac_end=$ac_max_sed_lines # Line after last line for current file.
+ ac_more_lines=:
+ ac_sed_cmds=
+ while $ac_more_lines; do
+ if test $ac_beg -gt 1; then
+ sed "1,${ac_beg}d; ${ac_end}q" $tmp/subs.sed >$tmp/subs.frag
+ else
+ sed "${ac_end}q" $tmp/subs.sed >$tmp/subs.frag
+ fi
+ if test ! -s $tmp/subs.frag; then
+ ac_more_lines=false
+ else
+ # The purpose of the label and of the branching condition is to
+ # speed up the sed processing (if there are no `@' at all, there
+ # is no need to browse any of the substitutions).
+ # These are the two extra sed commands mentioned above.
+ (echo ':t
+ /@[a-zA-Z_][a-zA-Z_0-9]*@/!b' && cat $tmp/subs.frag) >$tmp/subs-$ac_sed_frag.sed
+ if test -z "$ac_sed_cmds"; then
+ ac_sed_cmds="sed -f $tmp/subs-$ac_sed_frag.sed"
+ else
+ ac_sed_cmds="$ac_sed_cmds | sed -f $tmp/subs-$ac_sed_frag.sed"
+ fi
+ ac_sed_frag=`expr $ac_sed_frag + 1`
+ ac_beg=$ac_end
+ ac_end=`expr $ac_end + $ac_max_sed_lines`
+ fi
+ done
+ if test -z "$ac_sed_cmds"; then
+ ac_sed_cmds=cat
fi
+fi # test -n "$CONFIG_FILES"
- case "$ac_given_srcdir" in
- .) srcdir=.
- if test -z "$ac_dots"; then top_srcdir=.
- else top_srcdir=`echo $ac_dots|sed 's%/$%%'`; fi ;;
- /*) srcdir="$ac_given_srcdir$ac_dir_suffix"; top_srcdir="$ac_given_srcdir" ;;
- *) # Relative path.
- srcdir="$ac_dots$ac_given_srcdir$ac_dir_suffix"
- top_srcdir="$ac_dots$ac_given_srcdir" ;;
+_ACEOF
+cat >>$CONFIG_STATUS <<\_ACEOF
+for ac_file in : $CONFIG_FILES; do test "x$ac_file" = x: && continue
+ # Support "outfile[:infile[:infile...]]", defaulting infile="outfile.in".
+ case $ac_file in
+ - | *:- | *:-:* ) # input from stdin
+ cat >$tmp/stdin
+ ac_file_in=`echo "$ac_file" | sed 's,[^:]*:,,'`
+ ac_file=`echo "$ac_file" | sed 's,:.*,,'` ;;
+ *:* ) ac_file_in=`echo "$ac_file" | sed 's,[^:]*:,,'`
+ ac_file=`echo "$ac_file" | sed 's,:.*,,'` ;;
+ * ) ac_file_in=$ac_file.in ;;
esac
- case "$ac_given_INSTALL" in
- [/$]*) INSTALL="$ac_given_INSTALL" ;;
- *) INSTALL="$ac_dots$ac_given_INSTALL" ;;
- esac
+ # Compute @srcdir@, @top_srcdir@, and @INSTALL@ for subdirectories.
+ ac_dir=`(dirname "$ac_file") 2>/dev/null ||
+$as_expr X"$ac_file" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
+ X"$ac_file" : 'X\(//\)[^/]' \| \
+ X"$ac_file" : 'X\(//\)$' \| \
+ X"$ac_file" : 'X\(/\)' \| \
+ . : '\(.\)' 2>/dev/null ||
+echo X"$ac_file" |
+ sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ s//\1/; q; }
+ /^X\(\/\/\)[^/].*/{ s//\1/; q; }
+ /^X\(\/\/\)$/{ s//\1/; q; }
+ /^X\(\/\).*/{ s//\1/; q; }
+ s/.*/./; q'`
+ { if $as_mkdir_p; then
+ mkdir -p "$ac_dir"
+ else
+ as_dir="$ac_dir"
+ as_dirs=
+ while test ! -d "$as_dir"; do
+ as_dirs="$as_dir $as_dirs"
+ as_dir=`(dirname "$as_dir") 2>/dev/null ||
+$as_expr X"$as_dir" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
+ X"$as_dir" : 'X\(//\)[^/]' \| \
+ X"$as_dir" : 'X\(//\)$' \| \
+ X"$as_dir" : 'X\(/\)' \| \
+ . : '\(.\)' 2>/dev/null ||
+echo X"$as_dir" |
+ sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ s//\1/; q; }
+ /^X\(\/\/\)[^/].*/{ s//\1/; q; }
+ /^X\(\/\/\)$/{ s//\1/; q; }
+ /^X\(\/\).*/{ s//\1/; q; }
+ s/.*/./; q'`
+ done
+ test ! -n "$as_dirs" || mkdir $as_dirs
+ fi || { { echo "$as_me:$LINENO: error: cannot create directory \"$ac_dir\"" >&5
+echo "$as_me: error: cannot create directory \"$ac_dir\"" >&2;}
+ { (exit 1); exit 1; }; }; }
+
+ ac_builddir=.
+
+if test "$ac_dir" != .; then
+ ac_dir_suffix=/`echo "$ac_dir" | sed 's,^\.[\\/],,'`
+ # A "../" for each directory in $ac_dir_suffix.
+ ac_top_builddir=`echo "$ac_dir_suffix" | sed 's,/[^\\/]*,../,g'`
+else
+ ac_dir_suffix= ac_top_builddir=
+fi
- echo creating "$ac_file"
- rm -f "$ac_file"
- configure_input="Generated automatically from `echo $ac_file_in|sed 's%.*/%%'` by configure."
- case "$ac_file" in
- *Makefile*) ac_comsub="1i\\
-# $configure_input" ;;
- *) ac_comsub= ;;
+case $srcdir in
+ .) # No --srcdir option. We are building in place.
+ ac_srcdir=.
+ if test -z "$ac_top_builddir"; then
+ ac_top_srcdir=.
+ else
+ ac_top_srcdir=`echo $ac_top_builddir | sed 's,/$,,'`
+ fi ;;
+ [\\/]* | ?:[\\/]* ) # Absolute path.
+ ac_srcdir=$srcdir$ac_dir_suffix;
+ ac_top_srcdir=$srcdir ;;
+ *) # Relative path.
+ ac_srcdir=$ac_top_builddir$srcdir$ac_dir_suffix
+ ac_top_srcdir=$ac_top_builddir$srcdir ;;
+esac
+
+# Do not use `cd foo && pwd` to compute absolute paths, because
+# the directories may not exist.
+case `pwd` in
+.) ac_abs_builddir="$ac_dir";;
+*)
+ case "$ac_dir" in
+ .) ac_abs_builddir=`pwd`;;
+ [\\/]* | ?:[\\/]* ) ac_abs_builddir="$ac_dir";;
+ *) ac_abs_builddir=`pwd`/"$ac_dir";;
+ esac;;
+esac
+case $ac_abs_builddir in
+.) ac_abs_top_builddir=${ac_top_builddir}.;;
+*)
+ case ${ac_top_builddir}. in
+ .) ac_abs_top_builddir=$ac_abs_builddir;;
+ [\\/]* | ?:[\\/]* ) ac_abs_top_builddir=${ac_top_builddir}.;;
+ *) ac_abs_top_builddir=$ac_abs_builddir/${ac_top_builddir}.;;
+ esac;;
+esac
+case $ac_abs_builddir in
+.) ac_abs_srcdir=$ac_srcdir;;
+*)
+ case $ac_srcdir in
+ .) ac_abs_srcdir=$ac_abs_builddir;;
+ [\\/]* | ?:[\\/]* ) ac_abs_srcdir=$ac_srcdir;;
+ *) ac_abs_srcdir=$ac_abs_builddir/$ac_srcdir;;
+ esac;;
+esac
+case $ac_abs_builddir in
+.) ac_abs_top_srcdir=$ac_top_srcdir;;
+*)
+ case $ac_top_srcdir in
+ .) ac_abs_top_srcdir=$ac_abs_builddir;;
+ [\\/]* | ?:[\\/]* ) ac_abs_top_srcdir=$ac_top_srcdir;;
+ *) ac_abs_top_srcdir=$ac_abs_builddir/$ac_top_srcdir;;
+ esac;;
+esac
+
+
+ case $INSTALL in
+ [\\/$]* | ?:[\\/]* ) ac_INSTALL=$INSTALL ;;
+ *) ac_INSTALL=$ac_top_builddir$INSTALL ;;
esac
- ac_file_inputs=`echo $ac_file_in|sed -e "s%^%$ac_given_srcdir/%" -e "s%:% $ac_given_srcdir/%g"`
- sed -e "$ac_comsub
-s%@configure_input@%$configure_input%g
-s%@srcdir@%$srcdir%g
-s%@top_srcdir@%$top_srcdir%g
-s%@INSTALL@%$INSTALL%g
-" $ac_file_inputs | (eval "$ac_sed_cmds") > $ac_file
-fi; done
-rm -f conftest.s*
+ if test x"$ac_file" != x-; then
+ { echo "$as_me:$LINENO: creating $ac_file" >&5
+echo "$as_me: creating $ac_file" >&6;}
+ rm -f "$ac_file"
+ fi
+ # Let's still pretend it is `configure' which instantiates (i.e., don't
+ # use $as_me), people would be surprised to read:
+ # /* config.h. Generated by config.status. */
+ if test x"$ac_file" = x-; then
+ configure_input=
+ else
+ configure_input="$ac_file. "
+ fi
+ configure_input=$configure_input"Generated from `echo $ac_file_in |
+ sed 's,.*/,,'` by configure."
+
+ # First look for the input files in the build tree, otherwise in the
+ # src tree.
+ ac_file_inputs=`IFS=:
+ for f in $ac_file_in; do
+ case $f in
+ -) echo $tmp/stdin ;;
+ [\\/$]*)
+ # Absolute (can't be DOS-style, as IFS=:)
+ test -f "$f" || { { echo "$as_me:$LINENO: error: cannot find input file: $f" >&5
+echo "$as_me: error: cannot find input file: $f" >&2;}
+ { (exit 1); exit 1; }; }
+ echo "$f";;
+ *) # Relative
+ if test -f "$f"; then
+ # Build tree
+ echo "$f"
+ elif test -f "$srcdir/$f"; then
+ # Source tree
+ echo "$srcdir/$f"
+ else
+ # /dev/null tree
+ { { echo "$as_me:$LINENO: error: cannot find input file: $f" >&5
+echo "$as_me: error: cannot find input file: $f" >&2;}
+ { (exit 1); exit 1; }; }
+ fi;;
+ esac
+ done` || { (exit 1); exit 1; }
+_ACEOF
+cat >>$CONFIG_STATUS <<_ACEOF
+ sed "$ac_vpsub
+$extrasub
+_ACEOF
+cat >>$CONFIG_STATUS <<\_ACEOF
+:t
+/@[a-zA-Z_][a-zA-Z_0-9]*@/!b
+s,@configure_input@,$configure_input,;t t
+s,@srcdir@,$ac_srcdir,;t t
+s,@abs_srcdir@,$ac_abs_srcdir,;t t
+s,@top_srcdir@,$ac_top_srcdir,;t t
+s,@abs_top_srcdir@,$ac_abs_top_srcdir,;t t
+s,@builddir@,$ac_builddir,;t t
+s,@abs_builddir@,$ac_abs_builddir,;t t
+s,@top_builddir@,$ac_top_builddir,;t t
+s,@abs_top_builddir@,$ac_abs_top_builddir,;t t
+s,@INSTALL@,$ac_INSTALL,;t t
+" $ac_file_inputs | (eval "$ac_sed_cmds") >$tmp/out
+ rm -f $tmp/stdin
+ if test x"$ac_file" != x-; then
+ mv $tmp/out $ac_file
+ else
+ cat $tmp/out
+ rm -f $tmp/out
+ fi
+
+done
+_ACEOF
+cat >>$CONFIG_STATUS <<\_ACEOF
+
+#
+# CONFIG_HEADER section.
+#
# These sed commands are passed to sed as "A NAME B NAME C VALUE D", where
# NAME is the cpp macro being defined and VALUE is the value it is being given.
#
# ac_d sets the value in "#define NAME VALUE" lines.
-ac_dA='s%^\([ ]*\)#\([ ]*define[ ][ ]*\)'
-ac_dB='\([ ][ ]*\)[^ ]*%\1#\2'
-ac_dC='\3'
-ac_dD='%g'
-# ac_u turns "#undef NAME" with trailing blanks into "#define NAME VALUE".
-ac_uA='s%^\([ ]*\)#\([ ]*\)undef\([ ][ ]*\)'
-ac_uB='\([ ]\)%\1#\2define\3'
+ac_dA='s,^\([ ]*\)#\([ ]*define[ ][ ]*\)'
+ac_dB='[ ].*$,\1#\2'
+ac_dC=' '
+ac_dD=',;t'
+# ac_u turns "#undef NAME" without trailing blanks into "#define NAME VALUE".
+ac_uA='s,^\([ ]*\)#\([ ]*\)undef\([ ][ ]*\)'
+ac_uB='$,\1#\2define\3'
ac_uC=' '
-ac_uD='\4%g'
-# ac_e turns "#undef NAME" without trailing blanks into "#define NAME VALUE".
-ac_eA='s%^\([ ]*\)#\([ ]*\)undef\([ ][ ]*\)'
-ac_eB='$%\1#\2define\3'
-ac_eC=' '
-ac_eD='%g'
-
-if test "${CONFIG_HEADERS+set}" != set; then
-EOF
-cat >> $CONFIG_STATUS <<EOF
- CONFIG_HEADERS="config.h:config.in"
-EOF
-cat >> $CONFIG_STATUS <<\EOF
-fi
-for ac_file in .. $CONFIG_HEADERS; do if test "x$ac_file" != x..; then
+ac_uD=',;t'
+
+for ac_file in : $CONFIG_HEADERS; do test "x$ac_file" = x: && continue
# Support "outfile[:infile[:infile...]]", defaulting infile="outfile.in".
- case "$ac_file" in
- *:*) ac_file_in=`echo "$ac_file"|sed 's%[^:]*:%%'`
- ac_file=`echo "$ac_file"|sed 's%:.*%%'` ;;
- *) ac_file_in="${ac_file}.in" ;;
+ case $ac_file in
+ - | *:- | *:-:* ) # input from stdin
+ cat >$tmp/stdin
+ ac_file_in=`echo "$ac_file" | sed 's,[^:]*:,,'`
+ ac_file=`echo "$ac_file" | sed 's,:.*,,'` ;;
+ *:* ) ac_file_in=`echo "$ac_file" | sed 's,[^:]*:,,'`
+ ac_file=`echo "$ac_file" | sed 's,:.*,,'` ;;
+ * ) ac_file_in=$ac_file.in ;;
esac
- echo creating $ac_file
-
- rm -f conftest.frag conftest.in conftest.out
- ac_file_inputs=`echo $ac_file_in|sed -e "s%^%$ac_given_srcdir/%" -e "s%:% $ac_given_srcdir/%g"`
- cat $ac_file_inputs > conftest.in
-
-EOF
-
-# Transform confdefs.h into a sed script conftest.vals that substitutes
-# the proper values into config.h.in to produce config.h. And first:
-# Protect against being on the right side of a sed subst in config.status.
-# Protect against being in an unquoted here document in config.status.
-rm -f conftest.vals
-cat > conftest.hdr <<\EOF
-s/[\\&%]/\\&/g
-s%[\\$`]%\\&%g
-s%#define \([A-Za-z_][A-Za-z0-9_]*\) *\(.*\)%${ac_dA}\1${ac_dB}\1${ac_dC}\2${ac_dD}%gp
-s%ac_d%ac_u%gp
-s%ac_u%ac_e%gp
-EOF
-sed -n -f conftest.hdr confdefs.h > conftest.vals
-rm -f conftest.hdr
+ test x"$ac_file" != x- && { echo "$as_me:$LINENO: creating $ac_file" >&5
+echo "$as_me: creating $ac_file" >&6;}
+
+ # First look for the input files in the build tree, otherwise in the
+ # src tree.
+ ac_file_inputs=`IFS=:
+ for f in $ac_file_in; do
+ case $f in
+ -) echo $tmp/stdin ;;
+ [\\/$]*)
+ # Absolute (can't be DOS-style, as IFS=:)
+ test -f "$f" || { { echo "$as_me:$LINENO: error: cannot find input file: $f" >&5
+echo "$as_me: error: cannot find input file: $f" >&2;}
+ { (exit 1); exit 1; }; }
+ # Do quote $f, to prevent DOS paths from being IFS'd.
+ echo "$f";;
+ *) # Relative
+ if test -f "$f"; then
+ # Build tree
+ echo "$f"
+ elif test -f "$srcdir/$f"; then
+ # Source tree
+ echo "$srcdir/$f"
+ else
+ # /dev/null tree
+ { { echo "$as_me:$LINENO: error: cannot find input file: $f" >&5
+echo "$as_me: error: cannot find input file: $f" >&2;}
+ { (exit 1); exit 1; }; }
+ fi;;
+ esac
+ done` || { (exit 1); exit 1; }
+ # Remove the trailing spaces.
+ sed 's/[ ]*$//' $ac_file_inputs >$tmp/in
+
+_ACEOF
+
+# Transform confdefs.h into two sed scripts, `conftest.defines' and
+# `conftest.undefs', that substitutes the proper values into
+# config.h.in to produce config.h. The first handles `#define'
+# templates, and the second `#undef' templates.
+# And first: Protect against being on the right side of a sed subst in
+# config.status. Protect against being in an unquoted here document
+# in config.status.
+rm -f conftest.defines conftest.undefs
+# Using a here document instead of a string reduces the quoting nightmare.
+# Putting comments in sed scripts is not portable.
+#
+# `end' is used to avoid that the second main sed command (meant for
+# 0-ary CPP macros) applies to n-ary macro definitions.
+# See the Autoconf documentation for `clear'.
+cat >confdef2sed.sed <<\_ACEOF
+s/[\\&,]/\\&/g
+s,[\\$`],\\&,g
+t clear
+: clear
+s,^[ ]*#[ ]*define[ ][ ]*\([^ (][^ (]*\)\(([^)]*)\)[ ]*\(.*\)$,${ac_dA}\1${ac_dB}\1\2${ac_dC}\3${ac_dD},gp
+t end
+s,^[ ]*#[ ]*define[ ][ ]*\([^ ][^ ]*\)[ ]*\(.*\)$,${ac_dA}\1${ac_dB}\1${ac_dC}\2${ac_dD},gp
+: end
+_ACEOF
+# If some macros were called several times there might be several times
+# the same #defines, which is useless. Nevertheless, we may not want to
+# sort them, since we want the *last* AC-DEFINE to be honored.
+uniq confdefs.h | sed -n -f confdef2sed.sed >conftest.defines
+sed 's/ac_d/ac_u/g' conftest.defines >conftest.undefs
+rm -f confdef2sed.sed
# This sed command replaces #undef with comments. This is necessary, for
# example, in the case of _POSIX_SOURCE, which is predefined and required
# on some systems where configure will not decide to define it.
-cat >> conftest.vals <<\EOF
-s%^[ ]*#[ ]*undef[ ][ ]*[a-zA-Z_][a-zA-Z_0-9]*%/* & */%
-EOF
-
-# Break up conftest.vals because some shells have a limit on
-# the size of here documents, and old seds have small limits too.
+cat >>conftest.undefs <<\_ACEOF
+s,^[ ]*#[ ]*undef[ ][ ]*[a-zA-Z_][a-zA-Z_0-9]*,/* & */,
+_ACEOF
+
+# Break up conftest.defines because some shells have a limit on the size
+# of here documents, and old seds have small limits too (100 cmds).
+echo ' # Handle all the #define templates only if necessary.' >>$CONFIG_STATUS
+echo ' if grep "^[ ]*#[ ]*define" $tmp/in >/dev/null; then' >>$CONFIG_STATUS
+echo ' # If there are no defines, we may have an empty if/fi' >>$CONFIG_STATUS
+echo ' :' >>$CONFIG_STATUS
+rm -f conftest.tail
+while grep . conftest.defines >/dev/null
+do
+ # Write a limited-size here document to $tmp/defines.sed.
+ echo ' cat >$tmp/defines.sed <<CEOF' >>$CONFIG_STATUS
+ # Speed up: don't consider the non `#define' lines.
+ echo '/^[ ]*#[ ]*define/!b' >>$CONFIG_STATUS
+ # Work around the forget-to-reset-the-flag bug.
+ echo 't clr' >>$CONFIG_STATUS
+ echo ': clr' >>$CONFIG_STATUS
+ sed ${ac_max_here_lines}q conftest.defines >>$CONFIG_STATUS
+ echo 'CEOF
+ sed -f $tmp/defines.sed $tmp/in >$tmp/out
+ rm -f $tmp/in
+ mv $tmp/out $tmp/in
+' >>$CONFIG_STATUS
+ sed 1,${ac_max_here_lines}d conftest.defines >conftest.tail
+ rm -f conftest.defines
+ mv conftest.tail conftest.defines
+done
+rm -f conftest.defines
+echo ' fi # grep' >>$CONFIG_STATUS
+echo >>$CONFIG_STATUS
+# Break up conftest.undefs because some shells have a limit on the size
+# of here documents, and old seds have small limits too (100 cmds).
+echo ' # Handle all the #undef templates' >>$CONFIG_STATUS
rm -f conftest.tail
-while :
+while grep . conftest.undefs >/dev/null
do
- ac_lines=`grep -c . conftest.vals`
- # grep -c gives empty output for an empty file on some AIX systems.
- if test -z "$ac_lines" || test "$ac_lines" -eq 0; then break; fi
- # Write a limited-size here document to conftest.frag.
- echo ' cat > conftest.frag <<CEOF' >> $CONFIG_STATUS
- sed ${ac_max_here_lines}q conftest.vals >> $CONFIG_STATUS
+ # Write a limited-size here document to $tmp/undefs.sed.
+ echo ' cat >$tmp/undefs.sed <<CEOF' >>$CONFIG_STATUS
+ # Speed up: don't consider the non `#undef'
+ echo '/^[ ]*#[ ]*undef/!b' >>$CONFIG_STATUS
+ # Work around the forget-to-reset-the-flag bug.
+ echo 't clr' >>$CONFIG_STATUS
+ echo ': clr' >>$CONFIG_STATUS
+ sed ${ac_max_here_lines}q conftest.undefs >>$CONFIG_STATUS
echo 'CEOF
- sed -f conftest.frag conftest.in > conftest.out
- rm -f conftest.in
- mv conftest.out conftest.in
-' >> $CONFIG_STATUS
- sed 1,${ac_max_here_lines}d conftest.vals > conftest.tail
- rm -f conftest.vals
- mv conftest.tail conftest.vals
+ sed -f $tmp/undefs.sed $tmp/in >$tmp/out
+ rm -f $tmp/in
+ mv $tmp/out $tmp/in
+' >>$CONFIG_STATUS
+ sed 1,${ac_max_here_lines}d conftest.undefs >conftest.tail
+ rm -f conftest.undefs
+ mv conftest.tail conftest.undefs
done
-rm -f conftest.vals
-
-cat >> $CONFIG_STATUS <<\EOF
- rm -f conftest.frag conftest.h
- echo "/* $ac_file. Generated automatically by configure. */" > conftest.h
- cat conftest.in >> conftest.h
- rm -f conftest.in
- if cmp -s $ac_file conftest.h 2>/dev/null; then
- echo "$ac_file is unchanged"
- rm -f conftest.h
+rm -f conftest.undefs
+
+cat >>$CONFIG_STATUS <<\_ACEOF
+ # Let's still pretend it is `configure' which instantiates (i.e., don't
+ # use $as_me), people would be surprised to read:
+ # /* config.h. Generated by config.status. */
+ if test x"$ac_file" = x-; then
+ echo "/* Generated by configure. */" >$tmp/config.h
else
- # Remove last slash and all that follows it. Not all systems have dirname.
- ac_dir=`echo $ac_file|sed 's%/[^/][^/]*$%%'`
- if test "$ac_dir" != "$ac_file" && test "$ac_dir" != .; then
- # The file is in a subdirectory.
- test ! -d "$ac_dir" && mkdir "$ac_dir"
+ echo "/* $ac_file. Generated by configure. */" >$tmp/config.h
+ fi
+ cat $tmp/in >>$tmp/config.h
+ rm -f $tmp/in
+ if test x"$ac_file" != x-; then
+ if diff $ac_file $tmp/config.h >/dev/null 2>&1; then
+ { echo "$as_me:$LINENO: $ac_file is unchanged" >&5
+echo "$as_me: $ac_file is unchanged" >&6;}
+ else
+ ac_dir=`(dirname "$ac_file") 2>/dev/null ||
+$as_expr X"$ac_file" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
+ X"$ac_file" : 'X\(//\)[^/]' \| \
+ X"$ac_file" : 'X\(//\)$' \| \
+ X"$ac_file" : 'X\(/\)' \| \
+ . : '\(.\)' 2>/dev/null ||
+echo X"$ac_file" |
+ sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ s//\1/; q; }
+ /^X\(\/\/\)[^/].*/{ s//\1/; q; }
+ /^X\(\/\/\)$/{ s//\1/; q; }
+ /^X\(\/\).*/{ s//\1/; q; }
+ s/.*/./; q'`
+ { if $as_mkdir_p; then
+ mkdir -p "$ac_dir"
+ else
+ as_dir="$ac_dir"
+ as_dirs=
+ while test ! -d "$as_dir"; do
+ as_dirs="$as_dir $as_dirs"
+ as_dir=`(dirname "$as_dir") 2>/dev/null ||
+$as_expr X"$as_dir" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
+ X"$as_dir" : 'X\(//\)[^/]' \| \
+ X"$as_dir" : 'X\(//\)$' \| \
+ X"$as_dir" : 'X\(/\)' \| \
+ . : '\(.\)' 2>/dev/null ||
+echo X"$as_dir" |
+ sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ s//\1/; q; }
+ /^X\(\/\/\)[^/].*/{ s//\1/; q; }
+ /^X\(\/\/\)$/{ s//\1/; q; }
+ /^X\(\/\).*/{ s//\1/; q; }
+ s/.*/./; q'`
+ done
+ test ! -n "$as_dirs" || mkdir $as_dirs
+ fi || { { echo "$as_me:$LINENO: error: cannot create directory \"$ac_dir\"" >&5
+echo "$as_me: error: cannot create directory \"$ac_dir\"" >&2;}
+ { (exit 1); exit 1; }; }; }
+
+ rm -f $ac_file
+ mv $tmp/config.h $ac_file
fi
- rm -f $ac_file
- mv conftest.h $ac_file
+ else
+ cat $tmp/config.h
+ rm -f $tmp/config.h
+ fi
+# Compute $ac_file's index in $config_headers.
+_am_stamp_count=1
+for _am_header in $config_headers :; do
+ case $_am_header in
+ $ac_file | $ac_file:* )
+ break ;;
+ * )
+ _am_stamp_count=`expr $_am_stamp_count + 1` ;;
+ esac
+done
+echo "timestamp for $ac_file" >`(dirname $ac_file) 2>/dev/null ||
+$as_expr X$ac_file : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
+ X$ac_file : 'X\(//\)[^/]' \| \
+ X$ac_file : 'X\(//\)$' \| \
+ X$ac_file : 'X\(/\)' \| \
+ . : '\(.\)' 2>/dev/null ||
+echo X$ac_file |
+ sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ s//\1/; q; }
+ /^X\(\/\/\)[^/].*/{ s//\1/; q; }
+ /^X\(\/\/\)$/{ s//\1/; q; }
+ /^X\(\/\).*/{ s//\1/; q; }
+ s/.*/./; q'`/stamp-h$_am_stamp_count
+done
+_ACEOF
+cat >>$CONFIG_STATUS <<\_ACEOF
+
+#
+# CONFIG_COMMANDS section.
+#
+for ac_file in : $CONFIG_COMMANDS; do test "x$ac_file" = x: && continue
+ ac_dest=`echo "$ac_file" | sed 's,:.*,,'`
+ ac_source=`echo "$ac_file" | sed 's,[^:]*:,,'`
+ ac_dir=`(dirname "$ac_dest") 2>/dev/null ||
+$as_expr X"$ac_dest" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
+ X"$ac_dest" : 'X\(//\)[^/]' \| \
+ X"$ac_dest" : 'X\(//\)$' \| \
+ X"$ac_dest" : 'X\(/\)' \| \
+ . : '\(.\)' 2>/dev/null ||
+echo X"$ac_dest" |
+ sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ s//\1/; q; }
+ /^X\(\/\/\)[^/].*/{ s//\1/; q; }
+ /^X\(\/\/\)$/{ s//\1/; q; }
+ /^X\(\/\).*/{ s//\1/; q; }
+ s/.*/./; q'`
+ { if $as_mkdir_p; then
+ mkdir -p "$ac_dir"
+ else
+ as_dir="$ac_dir"
+ as_dirs=
+ while test ! -d "$as_dir"; do
+ as_dirs="$as_dir $as_dirs"
+ as_dir=`(dirname "$as_dir") 2>/dev/null ||
+$as_expr X"$as_dir" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
+ X"$as_dir" : 'X\(//\)[^/]' \| \
+ X"$as_dir" : 'X\(//\)$' \| \
+ X"$as_dir" : 'X\(/\)' \| \
+ . : '\(.\)' 2>/dev/null ||
+echo X"$as_dir" |
+ sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ s//\1/; q; }
+ /^X\(\/\/\)[^/].*/{ s//\1/; q; }
+ /^X\(\/\/\)$/{ s//\1/; q; }
+ /^X\(\/\).*/{ s//\1/; q; }
+ s/.*/./; q'`
+ done
+ test ! -n "$as_dirs" || mkdir $as_dirs
+ fi || { { echo "$as_me:$LINENO: error: cannot create directory \"$ac_dir\"" >&5
+echo "$as_me: error: cannot create directory \"$ac_dir\"" >&2;}
+ { (exit 1); exit 1; }; }; }
+
+ ac_builddir=.
+
+if test "$ac_dir" != .; then
+ ac_dir_suffix=/`echo "$ac_dir" | sed 's,^\.[\\/],,'`
+ # A "../" for each directory in $ac_dir_suffix.
+ ac_top_builddir=`echo "$ac_dir_suffix" | sed 's,/[^\\/]*,../,g'`
+else
+ ac_dir_suffix= ac_top_builddir=
+fi
+
+case $srcdir in
+ .) # No --srcdir option. We are building in place.
+ ac_srcdir=.
+ if test -z "$ac_top_builddir"; then
+ ac_top_srcdir=.
+ else
+ ac_top_srcdir=`echo $ac_top_builddir | sed 's,/$,,'`
+ fi ;;
+ [\\/]* | ?:[\\/]* ) # Absolute path.
+ ac_srcdir=$srcdir$ac_dir_suffix;
+ ac_top_srcdir=$srcdir ;;
+ *) # Relative path.
+ ac_srcdir=$ac_top_builddir$srcdir$ac_dir_suffix
+ ac_top_srcdir=$ac_top_builddir$srcdir ;;
+esac
+
+# Do not use `cd foo && pwd` to compute absolute paths, because
+# the directories may not exist.
+case `pwd` in
+.) ac_abs_builddir="$ac_dir";;
+*)
+ case "$ac_dir" in
+ .) ac_abs_builddir=`pwd`;;
+ [\\/]* | ?:[\\/]* ) ac_abs_builddir="$ac_dir";;
+ *) ac_abs_builddir=`pwd`/"$ac_dir";;
+ esac;;
+esac
+case $ac_abs_builddir in
+.) ac_abs_top_builddir=${ac_top_builddir}.;;
+*)
+ case ${ac_top_builddir}. in
+ .) ac_abs_top_builddir=$ac_abs_builddir;;
+ [\\/]* | ?:[\\/]* ) ac_abs_top_builddir=${ac_top_builddir}.;;
+ *) ac_abs_top_builddir=$ac_abs_builddir/${ac_top_builddir}.;;
+ esac;;
+esac
+case $ac_abs_builddir in
+.) ac_abs_srcdir=$ac_srcdir;;
+*)
+ case $ac_srcdir in
+ .) ac_abs_srcdir=$ac_abs_builddir;;
+ [\\/]* | ?:[\\/]* ) ac_abs_srcdir=$ac_srcdir;;
+ *) ac_abs_srcdir=$ac_abs_builddir/$ac_srcdir;;
+ esac;;
+esac
+case $ac_abs_builddir in
+.) ac_abs_top_srcdir=$ac_top_srcdir;;
+*)
+ case $ac_top_srcdir in
+ .) ac_abs_top_srcdir=$ac_abs_builddir;;
+ [\\/]* | ?:[\\/]* ) ac_abs_top_srcdir=$ac_top_srcdir;;
+ *) ac_abs_top_srcdir=$ac_abs_builddir/$ac_top_srcdir;;
+ esac;;
+esac
+
+
+ { echo "$as_me:$LINENO: executing $ac_dest commands" >&5
+echo "$as_me: executing $ac_dest commands" >&6;}
+ case $ac_dest in
+ depfiles ) test x"$AMDEP_TRUE" != x"" || for mf in $CONFIG_FILES; do
+ # Strip MF so we end up with the name of the file.
+ mf=`echo "$mf" | sed -e 's/:.*$//'`
+ # Check whether this is an Automake generated Makefile or not.
+ # We used to match only the files named `Makefile.in', but
+ # some people rename them; so instead we look at the file content.
+ # Grep'ing the first line is not enough: some people post-process
+ # each Makefile.in and add a new line on top of each file to say so.
+ # So let's grep whole file.
+ if grep '^#.*generated by automake' $mf > /dev/null 2>&1; then
+ dirpart=`(dirname "$mf") 2>/dev/null ||
+$as_expr X"$mf" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
+ X"$mf" : 'X\(//\)[^/]' \| \
+ X"$mf" : 'X\(//\)$' \| \
+ X"$mf" : 'X\(/\)' \| \
+ . : '\(.\)' 2>/dev/null ||
+echo X"$mf" |
+ sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ s//\1/; q; }
+ /^X\(\/\/\)[^/].*/{ s//\1/; q; }
+ /^X\(\/\/\)$/{ s//\1/; q; }
+ /^X\(\/\).*/{ s//\1/; q; }
+ s/.*/./; q'`
+ else
+ continue
fi
-fi; done
+ # Extract the definition of DEPDIR, am__include, and am__quote
+ # from the Makefile without running `make'.
+ DEPDIR=`sed -n 's/^DEPDIR = //p' < "$mf"`
+ test -z "$DEPDIR" && continue
+ am__include=`sed -n 's/^am__include = //p' < "$mf"`
+ test -z "am__include" && continue
+ am__quote=`sed -n 's/^am__quote = //p' < "$mf"`
+ # When using ansi2knr, U may be empty or an underscore; expand it
+ U=`sed -n 's/^U = //p' < "$mf"`
+ # Find all dependency output files, they are included files with
+ # $(DEPDIR) in their names. We invoke sed twice because it is the
+ # simplest approach to changing $(DEPDIR) to its actual value in the
+ # expansion.
+ for file in `sed -n "
+ s/^$am__include $am__quote\(.*(DEPDIR).*\)$am__quote"'$/\1/p' <"$mf" | \
+ sed -e 's/\$(DEPDIR)/'"$DEPDIR"'/g' -e 's/\$U/'"$U"'/g'`; do
+ # Make sure the directory exists.
+ test -f "$dirpart/$file" && continue
+ fdir=`(dirname "$file") 2>/dev/null ||
+$as_expr X"$file" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
+ X"$file" : 'X\(//\)[^/]' \| \
+ X"$file" : 'X\(//\)$' \| \
+ X"$file" : 'X\(/\)' \| \
+ . : '\(.\)' 2>/dev/null ||
+echo X"$file" |
+ sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ s//\1/; q; }
+ /^X\(\/\/\)[^/].*/{ s//\1/; q; }
+ /^X\(\/\/\)$/{ s//\1/; q; }
+ /^X\(\/\).*/{ s//\1/; q; }
+ s/.*/./; q'`
+ { if $as_mkdir_p; then
+ mkdir -p $dirpart/$fdir
+ else
+ as_dir=$dirpart/$fdir
+ as_dirs=
+ while test ! -d "$as_dir"; do
+ as_dirs="$as_dir $as_dirs"
+ as_dir=`(dirname "$as_dir") 2>/dev/null ||
+$as_expr X"$as_dir" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
+ X"$as_dir" : 'X\(//\)[^/]' \| \
+ X"$as_dir" : 'X\(//\)$' \| \
+ X"$as_dir" : 'X\(/\)' \| \
+ . : '\(.\)' 2>/dev/null ||
+echo X"$as_dir" |
+ sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ s//\1/; q; }
+ /^X\(\/\/\)[^/].*/{ s//\1/; q; }
+ /^X\(\/\/\)$/{ s//\1/; q; }
+ /^X\(\/\).*/{ s//\1/; q; }
+ s/.*/./; q'`
+ done
+ test ! -n "$as_dirs" || mkdir $as_dirs
+ fi || { { echo "$as_me:$LINENO: error: cannot create directory $dirpart/$fdir" >&5
+echo "$as_me: error: cannot create directory $dirpart/$fdir" >&2;}
+ { (exit 1); exit 1; }; }; }
-EOF
-cat >> $CONFIG_STATUS <<EOF
+ # echo "creating $dirpart/$file"
+ echo '# dummy' > "$dirpart/$file"
+ done
+done
+ ;;
+ libtool )
+
+ # See if we are running on zsh, and set the options which allow our
+ # commands through without removal of \ escapes.
+ if test -n "${ZSH_VERSION+set}" ; then
+ setopt NO_GLOB_SUBST
+ fi
+ cfgfile="${ofile}T"
+ trap "$RM \"$cfgfile\"; exit 1" 1 2 15
+ $RM "$cfgfile"
-EOF
-cat >> $CONFIG_STATUS <<\EOF
-test -z "$CONFIG_HEADERS" || echo timestamp > stamp-h
-sed -e '/POTFILES =/r po/POTFILES' po/Makefile.in > po/Makefile
-exit 0
-EOF
+ cat <<_LT_EOF >> "$cfgfile"
+#! $SHELL
+
+# `$ECHO "$ofile" | sed 's%^.*/%%'` - Provide generalized library-building support services.
+# Generated automatically by $as_me (GNU $PACKAGE$TIMESTAMP) $VERSION
+# Libtool was configured on host `(hostname || uname -n) 2>/dev/null | sed 1q`:
+# NOTE: Changes made to this file will be lost: look at ltmain.sh.
+#
+# Copyright (C) 1996, 1997, 1998, 1999, 2000, 2001, 2003, 2004, 2005,
+# 2006, 2007 Free Software Foundation, Inc.
+#
+# This file is part of GNU Libtool:
+# Originally by Gordon Matzigkeit <gord@gnu.ai.mit.edu>, 1996
+#
+# 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, a copy can be downloaded from
+# http://www.gnu.org/copyleft/gpl.html, or by writing to the Free
+# Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston,
+# MA 02110-1301, USA.
+#
+# As a special exception to the GNU General Public License, if you
+# distribute this file as part of a program that contains a
+# configuration script generated by Autoconf, you may include it under
+# the same distribution terms that you use for the rest of that program.
+
+
+# The names of the tagged configurations supported by this script.
+available_tags=""
+
+# ### BEGIN LIBTOOL CONFIG
+
+# Which release of libtool.m4 was used?
+macro_version=$macro_version
+macro_revision=$macro_revision
+
+# Whether or not to build shared libraries.
+build_libtool_libs=$enable_shared
+
+# Whether or not to build static libraries.
+build_old_libs=$enable_static
+
+# What type of objects to build.
+pic_mode=$pic_mode
+
+# Whether or not to optimize for fast installation.
+fast_install=$enable_fast_install
+
+# The host system.
+host_alias=$host_alias
+host=$host
+host_os=$host_os
+
+# The build system.
+build_alias=$build_alias
+build=$build
+build_os=$build_os
+
+# A sed program that does not truncate output.
+SED=$lt_SED
+
+# Sed that helps us avoid accidentally triggering echo(1) options like -n.
+Xsed="\$SED -e 1s/^X//"
+
+# A grep program that handles long lines.
+GREP=$lt_GREP
+
+# An ERE matcher.
+EGREP=$lt_EGREP
+
+# A literal string matcher.
+FGREP=$lt_FGREP
+
+# A BSD- or MS-compatible name lister.
+NM=$lt_NM
+
+# Whether we need soft or hard links.
+LN_S=$lt_LN_S
+
+# What is the maximum length of a command?
+max_cmd_len=$max_cmd_len
+
+# Object file suffix (normally "o").
+objext=$ac_objext
+
+# Executable file suffix (normally "").
+exeext=$exeext
+
+# whether the shell understands "unset".
+lt_unset=$lt_unset
+
+# turn spaces into newlines.
+SP2NL=$lt_lt_SP2NL
+
+# turn newlines into spaces.
+NL2SP=$lt_lt_NL2SP
+
+# How to create reloadable object files.
+reload_flag=$lt_reload_flag
+reload_cmds=$lt_reload_cmds
+
+# Method to check whether dependent libraries are shared objects.
+deplibs_check_method=$lt_deplibs_check_method
+
+# Command to use when deplibs_check_method == "file_magic".
+file_magic_cmd=$lt_file_magic_cmd
+
+# The archiver.
+AR=$lt_AR
+AR_FLAGS=$lt_AR_FLAGS
+
+# A symbol stripping program.
+STRIP=$lt_STRIP
+
+# Commands used to install an old-style archive.
+RANLIB=$lt_RANLIB
+old_postinstall_cmds=$lt_old_postinstall_cmds
+old_postuninstall_cmds=$lt_old_postuninstall_cmds
+
+# A C compiler.
+LTCC=$lt_CC
+
+# LTCC compiler flags.
+LTCFLAGS=$lt_CFLAGS
+
+# Take the output of nm and produce a listing of raw symbols and C names.
+global_symbol_pipe=$lt_lt_cv_sys_global_symbol_pipe
+
+# Transform the output of nm in a proper C declaration.
+global_symbol_to_cdecl=$lt_lt_cv_sys_global_symbol_to_cdecl
+
+# Transform the output of nm in a C name address pair.
+global_symbol_to_c_name_address=$lt_lt_cv_sys_global_symbol_to_c_name_address
+
+# The name of the directory that contains temporary libtool files.
+objdir=$objdir
+
+# Shell to use when invoking shell scripts.
+SHELL=$lt_SHELL
+
+# An echo program that does not interpret backslashes.
+ECHO=$lt_ECHO
+
+# Used to examine libraries when file_magic_cmd begins with "file".
+MAGIC_CMD=$MAGIC_CMD
+
+# Must we lock files when doing compilation?
+need_locks=$lt_need_locks
+
+# Old archive suffix (normally "a").
+libext=$libext
+
+# Shared library suffix (normally ".so").
+shrext_cmds=$lt_shrext_cmds
+
+# The commands to extract the exported symbol list from a shared archive.
+extract_expsyms_cmds=$lt_extract_expsyms_cmds
+
+# Variables whose values should be saved in libtool wrapper scripts and
+# restored at link time.
+variables_saved_for_relink=$lt_variables_saved_for_relink
+
+# Do we need the "lib" prefix for modules?
+need_lib_prefix=$need_lib_prefix
+
+# Do we need a version for libraries?
+need_version=$need_version
+
+# Library versioning type.
+version_type=$version_type
+
+# Shared library runtime path variable.
+runpath_var=$runpath_var
+
+# Shared library path variable.
+shlibpath_var=$shlibpath_var
+
+# Is shlibpath searched before the hard-coded library search path?
+shlibpath_overrides_runpath=$shlibpath_overrides_runpath
+
+# Format of library name prefix.
+libname_spec=$lt_libname_spec
+
+# List of archive names. First name is the real one, the rest are links.
+# The last name is the one that the linker finds with -lNAME
+library_names_spec=$lt_library_names_spec
+
+# The coded name of the library, if different from the real name.
+soname_spec=$lt_soname_spec
+
+# Command to use after installation of a shared archive.
+postinstall_cmds=$lt_postinstall_cmds
+
+# Command to use after uninstallation of a shared archive.
+postuninstall_cmds=$lt_postuninstall_cmds
+
+# Commands used to finish a libtool library installation in a directory.
+finish_cmds=$lt_finish_cmds
+
+# As "finish_cmds", except a single script fragment to be evaled but
+# not shown.
+finish_eval=$lt_finish_eval
+
+# Whether we should hardcode library paths into libraries.
+hardcode_into_libs=$hardcode_into_libs
+
+# Compile-time system search path for libraries.
+sys_lib_search_path_spec=$lt_sys_lib_search_path_spec
+
+# Run-time system search path for libraries.
+sys_lib_dlsearch_path_spec=$lt_sys_lib_dlsearch_path_spec
+
+# Whether dlopen is supported.
+dlopen_support=$enable_dlopen
+
+# Whether dlopen of programs is supported.
+dlopen_self=$enable_dlopen_self
+
+# Whether dlopen of statically linked programs is supported.
+dlopen_self_static=$enable_dlopen_self_static
+
+# Commands to strip libraries.
+old_striplib=$lt_old_striplib
+striplib=$lt_striplib
+
+
+# The linker used to build libraries.
+LD=$lt_LD
+
+# Commands used to build an old-style archive.
+old_archive_cmds=$lt_old_archive_cmds
+
+# A language specific compiler.
+CC=$lt_compiler
+
+# Is the compiler the GNU compiler?
+with_gcc=$GCC
+
+# Compiler flag to turn off builtin functions.
+no_builtin_flag=$lt_lt_prog_compiler_no_builtin_flag
+
+# How to pass a linker flag through the compiler.
+wl=$lt_lt_prog_compiler_wl
+
+# Additional compiler flags for building library objects.
+pic_flag=$lt_lt_prog_compiler_pic
+
+# Compiler flag to prevent dynamic linking.
+link_static_flag=$lt_lt_prog_compiler_static
+
+# Does compiler simultaneously support -c and -o options?
+compiler_c_o=$lt_lt_cv_prog_compiler_c_o
+
+# Whether or not to add -lc for building shared libraries.
+build_libtool_need_lc=$archive_cmds_need_lc
+
+# Whether or not to disallow shared libs when runtime libs are static.
+allow_libtool_libs_with_static_runtimes=$enable_shared_with_static_runtimes
+
+# Compiler flag to allow reflexive dlopens.
+export_dynamic_flag_spec=$lt_export_dynamic_flag_spec
+
+# Compiler flag to generate shared objects directly from archives.
+whole_archive_flag_spec=$lt_whole_archive_flag_spec
+
+# Whether the compiler copes with passing no objects directly.
+compiler_needs_object=$lt_compiler_needs_object
+
+# Create an old-style archive from a shared archive.
+old_archive_from_new_cmds=$lt_old_archive_from_new_cmds
+
+# Create a temporary old-style archive to link instead of a shared archive.
+old_archive_from_expsyms_cmds=$lt_old_archive_from_expsyms_cmds
+
+# Commands used to build a shared archive.
+archive_cmds=$lt_archive_cmds
+archive_expsym_cmds=$lt_archive_expsym_cmds
+
+# Commands used to build a loadable module if different from building
+# a shared archive.
+module_cmds=$lt_module_cmds
+module_expsym_cmds=$lt_module_expsym_cmds
+
+# Whether we are building with GNU ld or not.
+with_gnu_ld=$lt_with_gnu_ld
+
+# Flag that allows shared libraries with undefined symbols to be built.
+allow_undefined_flag=$lt_allow_undefined_flag
+
+# Flag that enforces no undefined symbols.
+no_undefined_flag=$lt_no_undefined_flag
+
+# Flag to hardcode \$libdir into a binary during linking.
+# This must work even if \$libdir does not exist
+hardcode_libdir_flag_spec=$lt_hardcode_libdir_flag_spec
+
+# If ld is used when linking, flag to hardcode \$libdir into a binary
+# during linking. This must work even if \$libdir does not exist.
+hardcode_libdir_flag_spec_ld=$lt_hardcode_libdir_flag_spec_ld
+
+# Whether we need a single "-rpath" flag with a separated argument.
+hardcode_libdir_separator=$lt_hardcode_libdir_separator
+
+# Set to "yes" if using DIR/libNAME\${shared_ext} during linking hardcodes
+# DIR into the resulting binary.
+hardcode_direct=$hardcode_direct
+
+# Set to "yes" if using DIR/libNAME\${shared_ext} during linking hardcodes
+# DIR into the resulting binary and the resulting library dependency is
+# "absolute",i.e impossible to change by setting \${shlibpath_var} if the
+# library is relocated.
+hardcode_direct_absolute=$hardcode_direct_absolute
+
+# Set to "yes" if using the -LDIR flag during linking hardcodes DIR
+# into the resulting binary.
+hardcode_minus_L=$hardcode_minus_L
+
+# Set to "yes" if using SHLIBPATH_VAR=DIR during linking hardcodes DIR
+# into the resulting binary.
+hardcode_shlibpath_var=$hardcode_shlibpath_var
+
+# Set to "yes" if building a shared library automatically hardcodes DIR
+# into the library and all subsequent libraries and executables linked
+# against it.
+hardcode_automatic=$hardcode_automatic
+
+# Set to yes if linker adds runtime paths of dependent libraries
+# to runtime path list.
+inherit_rpath=$inherit_rpath
+
+# Whether libtool must link a program against all its dependency libraries.
+link_all_deplibs=$link_all_deplibs
+
+# Fix the shell variable \$srcfile for the compiler.
+fix_srcfile_path=$lt_fix_srcfile_path
+
+# Set to "yes" if exported symbols are required.
+always_export_symbols=$always_export_symbols
+
+# The commands to list exported symbols.
+export_symbols_cmds=$lt_export_symbols_cmds
+
+# Symbols that should not be listed in the preloaded symbols.
+exclude_expsyms=$lt_exclude_expsyms
+
+# Symbols that must always be exported.
+include_expsyms=$lt_include_expsyms
+
+# Commands necessary for linking programs (against libraries) with templates.
+prelink_cmds=$lt_prelink_cmds
+
+# Specify filename containing input files.
+file_list_spec=$lt_file_list_spec
+
+# How to hardcode a shared library path into an executable.
+hardcode_action=$hardcode_action
+
+# ### END LIBTOOL CONFIG
+
+_LT_EOF
+
+ case $host_os in
+ aix3*)
+ cat <<\_LT_EOF >> "$cfgfile"
+# AIX sometimes has problems with the GCC collect2 program. For some
+# reason, if we set the COLLECT_NAMES environment variable, the problems
+# vanish in a puff of smoke.
+if test "X${COLLECT_NAMES+set}" != Xset; then
+ COLLECT_NAMES=
+ export COLLECT_NAMES
+fi
+_LT_EOF
+ ;;
+ esac
+
+
+ltmain="$ac_aux_dir/ltmain.sh"
+
+
+ # We use sed instead of cat because bash on DJGPP gets confused if
+ # if finds mixed CR/LF and LF-only lines. Since sed operates in
+ # text mode, it properly converts lines to CR/LF. This bash problem
+ # is reportedly fixed, but why not run on old versions too?
+ sed '/^# Generated shell functions inserted here/q' "$ltmain" >> "$cfgfile" \
+ || (rm -f "$cfgfile"; exit 1)
+
+ case $xsi_shell in
+ yes)
+ cat << \_LT_EOF >> "$cfgfile"
+# func_dirname file append nondir_replacement
+# Compute the dirname of FILE. If nonempty, add APPEND to the result,
+# otherwise set result to NONDIR_REPLACEMENT.
+func_dirname ()
+{
+ case ${1} in
+ */*) func_dirname_result="${1%/*}${2}" ;;
+ * ) func_dirname_result="${3}" ;;
+ esac
+}
+
+# func_basename file
+func_basename ()
+{
+ func_basename_result="${1##*/}"
+}
+
+# func_stripname prefix suffix name
+# strip PREFIX and SUFFIX off of NAME.
+# PREFIX and SUFFIX must not contain globbing or regex special
+# characters, hashes, percent signs, but SUFFIX may contain a leading
+# dot (in which case that matches only a dot).
+func_stripname ()
+{
+ # pdksh 5.2.14 does not do ${X%$Y} correctly if both X and Y are
+ # positional parameters, so assign one to ordinary parameter first.
+ func_stripname_result=${3}
+ func_stripname_result=${func_stripname_result#"${1}"}
+ func_stripname_result=${func_stripname_result%"${2}"}
+}
+
+# func_opt_split
+func_opt_split ()
+{
+ func_opt_split_opt=${1%%=*}
+ func_opt_split_arg=${1#*=}
+}
+
+# func_lo2o object
+func_lo2o ()
+{
+ case ${1} in
+ *.lo) func_lo2o_result=${1%.lo}.${objext} ;;
+ *) func_lo2o_result=${1} ;;
+ esac
+}
+_LT_EOF
+ ;;
+ *) # Bourne compatible functions.
+ cat << \_LT_EOF >> "$cfgfile"
+# func_dirname file append nondir_replacement
+# Compute the dirname of FILE. If nonempty, add APPEND to the result,
+# otherwise set result to NONDIR_REPLACEMENT.
+func_dirname ()
+{
+ # Extract subdirectory from the argument.
+ func_dirname_result=`$ECHO "X${1}" | $Xsed -e "$dirname"`
+ if test "X$func_dirname_result" = "X${1}"; then
+ func_dirname_result="${3}"
+ else
+ func_dirname_result="$func_dirname_result${2}"
+ fi
+}
+
+# func_basename file
+func_basename ()
+{
+ func_basename_result=`$ECHO "X${1}" | $Xsed -e "$basename"`
+}
+
+# func_stripname prefix suffix name
+# strip PREFIX and SUFFIX off of NAME.
+# PREFIX and SUFFIX must not contain globbing or regex special
+# characters, hashes, percent signs, but SUFFIX may contain a leading
+# dot (in which case that matches only a dot).
+# func_strip_suffix prefix name
+func_stripname ()
+{
+ case ${2} in
+ .*) func_stripname_result=`$ECHO "X${3}" \
+ | $Xsed -e "s%^${1}%%" -e "s%\\\\${2}\$%%"`;;
+ *) func_stripname_result=`$ECHO "X${3}" \
+ | $Xsed -e "s%^${1}%%" -e "s%${2}\$%%"`;;
+ esac
+}
+
+# sed scripts:
+my_sed_long_opt='1s/^\(-[^=]*\)=.*/\1/;q'
+my_sed_long_arg='1s/^-[^=]*=//'
+
+# func_opt_split
+func_opt_split ()
+{
+ func_opt_split_opt=`$ECHO "X${1}" | $Xsed -e "$my_sed_long_opt"`
+ func_opt_split_arg=`$ECHO "X${1}" | $Xsed -e "$my_sed_long_arg"`
+}
+
+# func_lo2o object
+func_lo2o ()
+{
+ func_lo2o_result=`$ECHO "X${1}" | $Xsed -e "$lo2o"`
+}
+_LT_EOF
+esac
+
+case $lt_shell_append in
+ yes)
+ cat << \_LT_EOF >> "$cfgfile"
+
+# func_append var value
+# Append VALUE to the end of shell variable VAR.
+func_append ()
+{
+ eval "$1+=\$2"
+}
+_LT_EOF
+ ;;
+ *)
+ cat << \_LT_EOF >> "$cfgfile"
+
+# func_append var value
+# Append VALUE to the end of shell variable VAR.
+func_append ()
+{
+ eval "$1=\$$1\$2"
+}
+_LT_EOF
+ ;;
+ esac
+
+
+ sed -n '/^# Generated shell functions inserted here/,$p' "$ltmain" >> "$cfgfile" \
+ || (rm -f "$cfgfile"; exit 1)
+
+ mv -f "$cfgfile" "$ofile" ||
+ (rm -f "$ofile" && cp "$cfgfile" "$ofile" && rm -f "$cfgfile")
+ chmod +x "$ofile"
+
+ ;;
+ default-1 )
+ for ac_file in $CONFIG_FILES; do
+ # Support "outfile[:infile[:infile...]]"
+ case "$ac_file" in
+ *:*) ac_file=`echo "$ac_file"|sed 's%:.*%%'` ;;
+ esac
+ # PO directories have a Makefile.in generated from Makefile.in.in.
+ case "$ac_file" in */Makefile.in)
+ # Adjust a relative srcdir.
+ ac_dir=`echo "$ac_file"|sed 's%/[^/][^/]*$%%'`
+ ac_dir_suffix="/`echo "$ac_dir"|sed 's%^\./%%'`"
+ ac_dots=`echo "$ac_dir_suffix"|sed 's%/[^/]*%../%g'`
+ # In autoconf-2.13 it is called $ac_given_srcdir.
+ # In autoconf-2.50 it is called $srcdir.
+ test -n "$ac_given_srcdir" || ac_given_srcdir="$srcdir"
+ case "$ac_given_srcdir" in
+ .) top_srcdir=`echo $ac_dots|sed 's%/$%%'` ;;
+ /*) top_srcdir="$ac_given_srcdir" ;;
+ *) top_srcdir="$ac_dots$ac_given_srcdir" ;;
+ esac
+ if test -f "$ac_given_srcdir/$ac_dir/POTFILES.in"; then
+ rm -f "$ac_dir/POTFILES"
+ test -n "$as_me" && echo "$as_me: creating $ac_dir/POTFILES" || echo "creating $ac_dir/POTFILES"
+ cat "$ac_given_srcdir/$ac_dir/POTFILES.in" | sed -e "/^#/d" -e "/^[ ]*\$/d" -e "s,.*, $top_srcdir/& \\\\," | sed -e "\$s/\(.*\) \\\\/\1/" > "$ac_dir/POTFILES"
+ POMAKEFILEDEPS="POTFILES.in"
+ # ALL_LINGUAS, POFILES, GMOFILES, UPDATEPOFILES, DUMMYPOFILES depend
+ # on $ac_dir but don't depend on user-specified configuration
+ # parameters.
+ if test -f "$ac_given_srcdir/$ac_dir/LINGUAS"; then
+ # The LINGUAS file contains the set of available languages.
+ if test -n "$OBSOLETE_ALL_LINGUAS"; then
+ test -n "$as_me" && echo "$as_me: setting ALL_LINGUAS in configure.in is obsolete" || echo "setting ALL_LINGUAS in configure.in is obsolete"
+ fi
+ ALL_LINGUAS_=`sed -e "/^#/d" "$ac_given_srcdir/$ac_dir/LINGUAS"`
+ # Hide the ALL_LINGUAS assigment from automake.
+ eval 'ALL_LINGUAS''=$ALL_LINGUAS_'
+ POMAKEFILEDEPS="$POMAKEFILEDEPS LINGUAS"
+ else
+ # The set of available languages was given in configure.in.
+ eval 'ALL_LINGUAS''=$OBSOLETE_ALL_LINGUAS'
+ fi
+ case "$ac_given_srcdir" in
+ .) srcdirpre= ;;
+ *) srcdirpre='$(srcdir)/' ;;
+ esac
+ POFILES=
+ GMOFILES=
+ UPDATEPOFILES=
+ DUMMYPOFILES=
+ for lang in $ALL_LINGUAS; do
+ POFILES="$POFILES $srcdirpre$lang.po"
+ GMOFILES="$GMOFILES $srcdirpre$lang.gmo"
+ UPDATEPOFILES="$UPDATEPOFILES $lang.po-update"
+ DUMMYPOFILES="$DUMMYPOFILES $lang.nop"
+ done
+ # CATALOGS depends on both $ac_dir and the user's LINGUAS
+ # environment variable.
+ INST_LINGUAS=
+ if test -n "$ALL_LINGUAS"; then
+ for presentlang in $ALL_LINGUAS; do
+ useit=no
+ if test "%UNSET%" != "$LINGUAS"; then
+ desiredlanguages="$LINGUAS"
+ else
+ desiredlanguages="$ALL_LINGUAS"
+ fi
+ for desiredlang in $desiredlanguages; do
+ # Use the presentlang catalog if desiredlang is
+ # a. equal to presentlang, or
+ # b. a variant of presentlang (because in this case,
+ # presentlang can be used as a fallback for messages
+ # which are not translated in the desiredlang catalog).
+ case "$desiredlang" in
+ "$presentlang"*) useit=yes;;
+ esac
+ done
+ if test $useit = yes; then
+ INST_LINGUAS="$INST_LINGUAS $presentlang"
+ fi
+ done
+ fi
+ CATALOGS=
+ if test -n "$INST_LINGUAS"; then
+ for lang in $INST_LINGUAS; do
+ CATALOGS="$CATALOGS $lang.gmo"
+ done
+ fi
+ test -n "$as_me" && echo "$as_me: creating $ac_dir/Makefile" || echo "creating $ac_dir/Makefile"
+ sed -e "/^POTFILES =/r $ac_dir/POTFILES" -e "/^# Makevars/r $ac_given_srcdir/$ac_dir/Makevars" -e "s|@POFILES@|$POFILES|g" -e "s|@GMOFILES@|$GMOFILES|g" -e "s|@UPDATEPOFILES@|$UPDATEPOFILES|g" -e "s|@DUMMYPOFILES@|$DUMMYPOFILES|g" -e "s|@CATALOGS@|$CATALOGS|g" -e "s|@POMAKEFILEDEPS@|$POMAKEFILEDEPS|g" "$ac_dir/Makefile.in" > "$ac_dir/Makefile"
+ for f in "$ac_given_srcdir/$ac_dir"/Rules-*; do
+ if test -f "$f"; then
+ case "$f" in
+ *.orig | *.bak | *~) ;;
+ *) cat "$f" >> "$ac_dir/Makefile" ;;
+ esac
+ fi
+ done
+ fi
+ ;;
+ esac
+ done ;;
+ esac
+done
+_ACEOF
+
+cat >>$CONFIG_STATUS <<\_ACEOF
+
+{ (exit 0); exit 0; }
+_ACEOF
chmod +x $CONFIG_STATUS
-rm -fr confdefs* $ac_clean_files
-test "$no_create" = yes || ${CONFIG_SHELL-/bin/sh} $CONFIG_STATUS || exit 1
+ac_clean_files=$ac_clean_files_save
+
+
+# configure is writing to config.log, and then calls config.status.
+# config.status does its own redirection, appending to config.log.
+# Unfortunately, on DOS this fails, as config.log is still kept open
+# by configure, so config.status won't be able to write to it; its
+# output is simply discarded. So we exec the FD to /dev/null,
+# effectively closing config.log, so it can be properly (re)opened and
+# appended to by config.status. When coming back to configure, we
+# need to make the FD available again.
+if test "$no_create" != yes; then
+ ac_cs_success=:
+ ac_config_status_args=
+ test "$silent" = yes &&
+ ac_config_status_args="$ac_config_status_args --quiet"
+ exec 5>/dev/null
+ $SHELL $CONFIG_STATUS $ac_config_status_args || ac_cs_success=false
+ exec 5>>config.log
+ # Use ||, not &&, to avoid exiting from the if with $? = 1, which
+ # would make configure fail if this is the last instruction.
+ $ac_cs_success || { (exit 1); exit 1; }
+fi
diff --git a/contrib/binutils/ld/configure.host b/contrib/binutils/ld/configure.host
index f2e1eb4..be343eb 100644
--- a/contrib/binutils/ld/configure.host
+++ b/contrib/binutils/ld/configure.host
@@ -10,7 +10,7 @@
HDEFINES=
HOSTING_CRT0=/lib/crt0.o
-HOSTING_LIBS='`if [ -f ../gcc/libgcc.a ]; then libgcc=../gcc/libgcc.a; else libgcc=\`${CC} -print-libgcc-file-name\`; fi; if [ -f ../gcc/libgcc_eh.a ]; then libgcc="$libgcc ../gcc/libgcc_eh.a"; else libgcc_eh=\`${CC} -print-file-name=libgcc_eh.a\`; if [ x"$libgcc_eh" != xlibgcc_eh.a ]; then libgcc="$libgcc $libgcc_eh"; fi; fi; echo --start-group $libgcc -lc --end-group`'
+HOSTING_LIBS='`if [ -f ../gcc/libgcc.a ]; then libgcc=../gcc/libgcc.a; else libgcc=\`${CC} -print-libgcc-file-name\`; fi; if [ -f ../gcc/libgcc_eh.a ]; then libgcc="$libgcc ../gcc/libgcc_eh.a"; else libgcc_eh=\`${CC} -print-file-name=libgcc_eh.a\`; if [ x"$libgcc_eh" != xlibgcc_eh.a ]; then libgcc="$libgcc $libgcc_eh"; fi; fi; if [ -f ../gcc/libunwind.a ]; then libgcc="$libgcc ../gcc/libunwind.a"; else libunwind=\`${CC} -print-file-name=libunwind.a\`; if [ x"$libunwind" != xlibunwind.a ]; then libgcc="$libgcc $libunwind"; fi; fi; echo --start-group $libgcc -lc --end-group`'
#
# Generic configurations:
@@ -33,7 +33,7 @@ case "${host}" in
;;
*-*-linux*)
- HOSTING_CRT0='-dynamic-linker `egrep "ld[^ ]*\.so" \`${CC} --print-file-name=specs\` | sed -e "s,.*-dynamic-linker[ ][ ]*\(.*/ld[^ ]*\.so..\).*,\1,"` `${CC} --print-file-name=crt1.o` `${CC} --print-file-name=crti.o` `if [ -f ../gcc/crtbegin.o ]; then echo ../gcc/crtbegin.o; else ${CC} --print-file-name=crtbegin.o; fi`'
+ HOSTING_CRT0='-dynamic-linker `${CC} --help --verbose 2>&1 | egrep "ld[^ ]*\.so" | sed -e "s,.*-dynamic-linker[ ][ ]*\(.*/ld[^ ]*\.so..\).*,\1,"` `${CC} --print-file-name=crt1.o` `${CC} --print-file-name=crti.o` `if [ -f ../gcc/crtbegin.o ]; then echo ../gcc/crtbegin.o; else ${CC} --print-file-name=crtbegin.o; fi`'
HOSTING_LIBS='-L`dirname \`${CC} --print-file-name=libc.so\`` '"$HOSTING_LIBS"' `if [ -f ../gcc/crtend.o ]; then echo ../gcc/crtend.o; else ${CC} --print-file-name=crtend.o; fi` `${CC} --print-file-name=crtn.o`'
;;
@@ -67,6 +67,12 @@ case "${host}" in
fi
;;
+*-*-openbsd*)
+ HOSTING_CRT0="-dynamic-linker /usr/libexec/ld.so /usr/lib/crt0.o"
+ HOSTING_CRT0="$HOSTING_CRT0 /usr/lib/crtbegin.o"
+ HOSTING_LIBS="$HOSTING_LIBS /usr/lib/crtend.o"
+ ;;
+
esac
#
@@ -83,7 +89,7 @@ am33_2.0-*-linux*)
HOSTING_CRT0=`echo "$HOSTING_CRT0" | sed -e "s,ld\[^ \]\*,ld-linux,g"`
;;
-arm*-*-linux-gnu*)
+arm*-*-linux-*)
HOSTING_CRT0='-p '`echo "$HOSTING_CRT0" | sed -e "s,ld\[^ \]\*,ld-linux,g"`
;;
@@ -132,11 +138,6 @@ i[3-7]86-*-sco* | i[3-7]86-*-isc*)
HOSTING_LIBS="$HOSTING_LIBS"' `if [ -f ../gcc/crtend.o ]; then echo ../gcc/crtend.o; else ${CC} -print-file-name=crtend.o; fi` /lib/crtn.o'
;;
-i[3-7]86-*-lynxos*)
- HOSTING_CRT0=/lib/init1.o
- HOSTING_LIBS="$HOSTING_LIBS"' -lm /lib/initn.o'
- ;;
-
i[3-7]86-pc-interix*)
HOSTING_CRT0='$$INTERIX_ROOT/usr/lib/crt0.o'
HOSTING_LIBS='-L $$X/local_bin -L $$INTERIX_ROOT/usr/lib '"$HOSTING_LIBS"' -lcpsx -lc -lcpsx $$INTERIX_ROOT/usr/lib/psxdll.a $$INTERIX_ROOT/usr/lib/psxdll2.a'
@@ -146,13 +147,14 @@ i[3-7]86-*-cygwin*)
HOSTING_LIBS="$HOSTING_LIBS"' -lcygwin -L/usr/lib/w32api -luser32 -lkernel32 -ladvapi32 -lshell32 `if [ -f ../gcc/libgcc.a ] ; then echo ../gcc/libgcc.a ; else ${CC} -print-libgcc-file-name; fi`'
;;
-ia64-*-linux-gnu*)
- HOSTING_CRT0=`echo "$HOSTING_CRT0" | sed -e "s,ld\[^ \]*\*,ld-linux-ia64,g"`
- ;;
+i[3-7]86-*-mingw*)
+ #We only support msvcrt.dll, crtid == 2.
+ HOSTING_CRT0='/mingw/lib/crt2.o'
+ HOSTING_LIBS='-L/mingw/lib -lmingw32 -lmoldname -lmingwex -lmsvcrt -luser32 -lkernel32 -ladvapi32 -lshell32 -lmingw32 -lmoldname -lmingwex -lmsvcrt `if [ -f ../gcc/libgcc.a ] ; then echo ../gcc/libgcc.a ; else ${CC} -print-libgcc-file-name; fi`'
+ ;;
-ia64-*-aix*)
- HOSTING_CRT0='-dynamic-linker `egrep "libc.so" \`${CC} --print-file-name=specs\` | sed -e "s,.*-dynamic-linker[ ][ ]*\(.*/libc.so..\).*,\1,"` `${CC} --print-file-name=crt1.o` `${CC} --print-file-name=crti.o` `if [ -f ../gcc/crtbegin.o ]; then echo ../gcc/crtbegin.o; else ${CC} --print-file-name=crtbegin.o; fi`'
- HOSTING_LIBS='-L`dirname \`${CC} --print-file-name=libc.so\`` '"$HOSTING_LIBS"' `if [ -f ../gcc/crtend.o ]; then echo ../gcc/crtend.o; else ${CC} --print-file-name=crtend.o; fi` `${CC} --print-file-name=crtn.o`'
+ia64-*-linux-*)
+ HOSTING_CRT0=`echo "$HOSTING_CRT0" | sed -e "s,ld\[^ \]*\*,ld-linux-ia64,g"`
;;
mips*-sgi-irix4* | mips*-sgi-irix5*)
@@ -165,17 +167,12 @@ mips*-sgi-irix6*)
HOSTING_LIBS='-L/usr/lib32 '"$HOSTING_LIBS"' `if [ -f ../gcc/crtend.o ]; then echo ../gcc/crtend.o ; else ${CC} -print-file-name=crtend.o; fi` /usr/lib32/crtn.o -init __do_global_ctors -fini __do_global_dtors'
;;
-mips*-*-linux-gnu*)
- HOSTING_CRT0=`echo "$HOSTING_CRT0" | sed -e "s,\\\`egrep.*\"\\\`,/lib/ld.so.1,"`
+mips*-*-linux-*)
+ HOSTING_CRT0=`echo "$HOSTING_CRT0" | sed -e "s,\\\`specs.*\"\\\`,/lib/ld.so.1,"`
;;
-m68*-*-linux-gnu*)
- HOSTING_CRT0=`echo "$HOSTING_CRT0" | sed -e "s,\\\`egrep.*\"\\\`,/lib/ld.so.1,"`
- ;;
-
-m68*-*-lynxos*)
- HOSTING_CRT0=/lib/init1.o
- HOSTING_LIBS="$HOSTING_LIBS"' -lm /lib/initn.o'
+m68*-*-linux-*)
+ HOSTING_CRT0=`echo "$HOSTING_CRT0" | sed -e "s,\\\`specs.*\"\\\`,/lib/ld.so.1,"`
;;
m68*-motorola-sysv)
@@ -198,37 +195,42 @@ m88*-motorola-sysv3)
HOSTING_LIBS="$HOSTING_LIBS"' `if [ -f ../gcc/crtend.o ]; then echo ../gcc/crtend.o; else ${CC} -print-file-name=crtend.o; fi`'
;;
-powerpc64*-*-linux-gnu*)
- HOSTING_CRT0=`echo "$HOSTING_CRT0" | sed -e "s,\\\`egrep.*\"\\\`,/lib64/ld64.so.1,"`
+powerpc64*-*-linux-*)
+ HOSTING_CRT0=`echo "$HOSTING_CRT0" | sed -e "s,\\\`specs.*\"\\\`,/lib64/ld64.so.1,"`
;;
-powerpc*-*-linux-gnu*)
- HOSTING_CRT0=`echo "$HOSTING_CRT0" | sed -e "s,\\\`egrep.*\"\\\`,/lib/ld.so.1,"`
+powerpc*-*-linux-*)
+ HOSTING_CRT0=`echo "$HOSTING_CRT0" | sed -e "s,\\\`specs.*\"\\\`,/lib/ld.so.1,"`
;;
-s390x-*-linux-gnu*)
- HOSTING_CRT0=`echo "$HOSTING_CRT0" | sed -e "s,\\\`egrep.*\"\\\`,/lib/ld64.so.1,"`
+s390x-*-linux-*)
+ HOSTING_CRT0=`echo "$HOSTING_CRT0" | sed -e "s,\\\`specs.*\"\\\`,/lib/ld64.so.1,"`
;;
-s390-*-linux-gnu*)
- HOSTING_CRT0=`echo "$HOSTING_CRT0" | sed -e "s,\\\`egrep.*\"\\\`,/lib/ld.so.1,"`
+s390-*-linux-*)
+ HOSTING_CRT0=`echo "$HOSTING_CRT0" | sed -e "s,\\\`specs.*\"\\\`,/lib/ld.so.1,"`
;;
-sparc*-*-solaris2*)
+sparc-*-solaris2*)
HOSTING_CRT0='`if [ -f ../gcc/crt1.o ]; then echo ../gcc/crt1.o; else ${CC} -print-file-name=crt1.o; fi` `if [ -f ../gcc/crti.o ]; then echo ../gcc/crti.o; else ${CC} -print-file-name=crti.o; fi` /usr/ccs/lib/values-Xa.o `if [ -f ../gcc/crtbegin.o ]; then echo ../gcc/crtbegin.o; else ${CC} -print-file-name=crtbegin.o; fi`'
HOSTING_LIBS="$HOSTING_LIBS"' `if [ -f ../gcc/crtend.o ]; then echo ../gcc/crtend.o; else ${CC} -print-file-name=crtend.o; fi` `if [ -f ../gcc/crtn.o ]; then echo ../gcc/crtn.o; else ${CC} -print-file-name=crtn.o; fi`'
;;
-sparc-*-linux-gnu*)
- HOSTING_CRT0=`echo "$HOSTING_CRT0" | sed -e "s,\\\`egrep.*\"\\\`,/lib/ld-linux.so.2,"`
+sparc64-*-solaris2* | sparcv9-*-solaris2*)
+ HOSTING_CRT0='`if [ -f ../gcc/crt1.o ]; then echo ../gcc/crt1.o; else ${CC} -print-file-name=crt1.o; fi` `if [ -f ../gcc/crti.o ]; then echo ../gcc/crti.o; else ${CC} -print-file-name=crti.o; fi` /usr/ccs/lib/sparcv9/values-Xa.o `if [ -f ../gcc/crtbegin.o ]; then echo ../gcc/crtbegin.o; else ${CC} -print-file-name=crtbegin.o; fi`'
+ HOSTING_LIBS="$HOSTING_LIBS"' `if [ -f ../gcc/crtend.o ]; then echo ../gcc/crtend.o; else ${CC} -print-file-name=crtend.o; fi` `if [ -f ../gcc/crtn.o ]; then echo ../gcc/crtn.o; else ${CC} -print-file-name=crtn.o; fi`'
;;
-sparc64-*-linux-gnu*)
- HOSTING_CRT0=`echo "$HOSTING_CRT0" | sed -e "s,\\\`egrep.*\"\\\`,/lib64/ld-linux.so.2,"`
+sparc-*-linux-*)
+ HOSTING_CRT0=`echo "$HOSTING_CRT0" | sed -e "s,\\\`specs.*\"\\\`,/lib/ld-linux.so.2,"`
;;
-x86_64-*-linux-gnu*)
- HOSTING_CRT0=`echo "$HOSTING_CRT0" | sed -e "s,\\\`egrep.*\"\\\`,/lib64/ld-linux-x86-64.so.2,"`
+sparc64-*-linux-*)
+ HOSTING_CRT0=`echo "$HOSTING_CRT0" | sed -e "s,\\\`specs.*\"\\\`,/lib64/ld-linux.so.2,"`
+ ;;
+
+x86_64-*-linux-*)
+ HOSTING_CRT0=`echo "$HOSTING_CRT0" | sed -e "s,\\\`specs.*\"\\\`,/lib64/ld-linux-x86-64.so.2,"`
;;
*-*-freebsd* | *-*-kfreebsd*-gnu)
@@ -240,6 +242,9 @@ x86_64-*-linux-gnu*)
*-*-netbsd*)
;;
+*-*-openbsd*)
+ ;;
+
alpha*-*-*)
HOSTING_CRT0=/usr/ccs/lib/crt0.o
;;
diff --git a/contrib/binutils/ld/configure.in b/contrib/binutils/ld/configure.in
index 4358cbe..0589578 100644
--- a/contrib/binutils/ld/configure.in
+++ b/contrib/binutils/ld/configure.in
@@ -1,6 +1,6 @@
dnl Process this file with autoconf to produce a configure script
dnl
-AC_PREREQ(2.13)
+AC_PREREQ(2.57)
AC_INIT(ldmain.c)
AC_CANONICAL_SYSTEM
@@ -41,17 +41,20 @@ AC_ARG_WITH(sysroot,
TARGET_SYSTEM_ROOT_DEFINE='-DTARGET_SYSTEM_ROOT=\"$(TARGET_SYSTEM_ROOT)\"'
use_sysroot=yes
+ if test "x$prefix" = xNONE; then
+ test_prefix=/usr/local
+ else
+ test_prefix=$prefix
+ fi
if test "x$exec_prefix" = xNONE; then
- if test "x$prefix" = xNONE; then
- test_prefix=/usr/local
- else
- test_prefix=$prefix
- fi
+ test_exec_prefix=$test_prefix
else
- test_prefix=$exec_prefix
+ test_exec_prefix=$exec_prefix
fi
case ${TARGET_SYSTEM_ROOT} in
"${test_prefix}"|"${test_prefix}/"*|\
+ "${test_exec_prefix}"|"${test_exec_prefix}/"*|\
+ '${prefix}'|'${prefix}/'*|\
'${exec_prefix}'|'${exec_prefix}/'*)
t="$TARGET_SYSTEM_ROOT_DEFINE -DTARGET_SYSTEM_ROOT_RELOCATABLE"
TARGET_SYSTEM_ROOT_DEFINE="$t"
@@ -66,26 +69,7 @@ AC_SUBST(use_sysroot)
AC_SUBST(TARGET_SYSTEM_ROOT)
AC_SUBST(TARGET_SYSTEM_ROOT_DEFINE)
-build_warnings="-W -Wall -Wstrict-prototypes -Wmissing-prototypes"
-AC_ARG_ENABLE(build-warnings,
-[ --enable-build-warnings enable build-time compiler warnings if gcc is used],
-[case "${enableval}" in
- yes) ;;
- no) build_warnings="-w";;
- ,*) t=`echo "${enableval}" | sed -e "s/,/ /g"`
- build_warnings="${build_warnings} ${t}";;
- *,) t=`echo "${enableval}" | sed -e "s/,/ /g"`
- build_warnings="${t} ${build_warnings}";;
- *) build_warnings=`echo "${enableval}" | sed -e "s/,/ /g"`;;
-esac
-if test x"$silent" != x"yes" && test x"$build_warnings" != x""; then
- echo "Setting warning flags = $build_warnings" 6>&1
-fi])dnl
-WARN_CFLAGS=""
-if test "x${build_warnings}" != x -a "x$GCC" = xyes ; then
- WARN_CFLAGS="${build_warnings}"
-fi
-AC_SUBST(WARN_CFLAGS)
+AM_BINUTILS_WARNINGS
AM_CONFIG_HEADER(config.h:config.in)
@@ -101,8 +85,9 @@ fi
AC_PROG_CC
AC_PROG_INSTALL
-ALL_LINGUAS="fr sv tr es da"
-CY_GNU_GETTEXT
+ALL_LINGUAS="fr sv tr es da vi zh_CN zh_TW ga"
+ZW_GNU_GETTEXT_SISTER_DIR
+AM_PO_SUBDIRS
AC_EXEEXT
@@ -110,6 +95,7 @@ AC_PROG_YACC
AM_PROG_LEX
AM_MAINTAINER_MODE
+AM_CONDITIONAL(GENINSRC_NEVER, false)
. ${srcdir}/configure.host
@@ -118,17 +104,23 @@ AC_SUBST(HOSTING_CRT0)
AC_SUBST(HOSTING_LIBS)
AC_SUBST(NATIVE_LIB_DIRS)
-AC_CHECK_HEADERS(string.h strings.h stdlib.h unistd.h)
-AC_CHECK_FUNCS(sbrk realpath)
+AC_CHECK_HEADERS(string.h strings.h stdlib.h unistd.h elf-hints.h limits.h sys/param.h)
+AC_CHECK_FUNCS(glob mkstemp realpath sbrk waitpid)
AC_HEADER_DIRENT
+AC_MSG_CHECKING(for a known getopt prototype in unistd.h)
+AC_CACHE_VAL(ld_cv_decl_getopt_unistd_h,
+[AC_TRY_COMPILE([#include <unistd.h>], [extern int getopt (int, char *const*, const char *);],
+ld_cv_decl_getopt_unistd_h=yes, ld_cv_decl_getopt_unistd_h=no)])
+AC_MSG_RESULT($ld_cv_decl_getopt_unistd_h)
+if test $ld_cv_decl_getopt_unistd_h = yes; then
+ AC_DEFINE([HAVE_DECL_GETOPT], 1,
+ [Is the prototype for getopt in <unistd.h> in the expected format?])
+fi
+
BFD_BINARY_FOPEN
-BFD_NEED_DECLARATION(strstr)
-BFD_NEED_DECLARATION(free)
-BFD_NEED_DECLARATION(sbrk)
-BFD_NEED_DECLARATION(getenv)
-BFD_NEED_DECLARATION(environ)
+AC_CHECK_DECLS([strstr, free, sbrk, getenv, environ])
# When converting linker scripts into strings for use in emulation
# files, use astring.sed if the compiler supports ANSI string
@@ -182,6 +174,15 @@ do
EMUL=$targ_emul
fi
+ if test x${want64} = xfalse; then
+ . ${srcdir}/../bfd/config.bfd
+ fi
+
+ if test x${want64} = xtrue; then
+ targ_extra_emuls="$targ_extra_emuls $targ64_extra_emuls"
+ targ_extra_libpath="$targ_extra_libpath $targ64_extra_libpath"
+ fi
+
for i in $targ_emul $targ_extra_emuls $targ_extra_libpath; do
case " $all_emuls " in
*" e${i}.o "*) ;;
@@ -223,10 +224,13 @@ AC_SUBST(EMUL)
TDIRS=tdirs
AC_SUBST_FILE(TDIRS)
-dnl FIXME: We will build a 64 bit BFD for a 64 bit host or a 64 bit
-dnl target, and in those cases we should also build the 64 bit
-dnl emulations.
if test x${all_targets} = xtrue; then
+ if test x${want64} = xfalse; then
+ AC_CHECK_SIZEOF(long)
+ if test "x${ac_cv_sizeof_long}" = "x8"; then
+ want64=true
+ fi
+ fi
if test x${want64} = xtrue; then
EMULATION_OFILES='$(ALL_EMULATIONS) $(ALL_64_EMULATIONS)'
else
@@ -256,10 +260,19 @@ case "$target_vendor" in
hp) EXTRA_SHLIB_EXTENSION=".sl" ;;
*) EXTRA_SHLIB_EXTENSION= ;;
esac
+
+case "$target_os" in
+ lynxos) EXTRA_SHLIB_EXTENSION=".a" ;;
+esac
+
if test x${EXTRA_SHLIB_EXTENSION} != x ; then
AC_DEFINE_UNQUOTED(EXTRA_SHLIB_EXTENSION, "$EXTRA_SHLIB_EXTENSION",
[Additional extension a shared object might have.])
fi
-AC_OUTPUT(Makefile po/Makefile.in:po/Make-in,
-[sed -e '/POTFILES =/r po/POTFILES' po/Makefile.in > po/Makefile])
+dnl Required by html and install-html
+AC_SUBST(datarootdir)
+AC_SUBST(docdir)
+AC_SUBST(htmldir)
+
+AC_OUTPUT(Makefile po/Makefile.in:po/Make-in)
diff --git a/contrib/binutils/ld/configure.tgt b/contrib/binutils/ld/configure.tgt
index 9b29291..46e05d3 100644
--- a/contrib/binutils/ld/configure.tgt
+++ b/contrib/binutils/ld/configure.tgt
@@ -9,129 +9,166 @@
# targ_extra_emuls additional linker emulations to provide
# targ_extra_libpath additional linker emulations using LIB_PATH
# targ_extra_ofiles additional objects needed by the emulation
+# targ64_extra_emuls additional linker emulations to provide if
+# --enable-64-bit-bfd is given or if host is 64 bit.
+# targ64_extra_libpath additional linker emulations using LIB_PATH if
+# --enable-64-bit-bfd is given or if host is 64 bit.
# NATIVE_LIB_DIRS library directories to search on this host
# (if we are a native or sysrooted linker)
targ_extra_emuls=
+targ_extra_libpath=
targ_extra_ofiles=
+targ64_extra_emuls=
+targ64_extra_libpath=
+# Please try to keep this table in alphabetic order - it makes it
+# much easier to lookup a specific archictecture. Naturally any
+# architecture variants should be kept together even if their names
+# break the alpha sorting.
case "${targ}" in
-am33_2.0-*-linux*) targ_emul=elf32am33lin ;;
-arm-epoc-pe) targ_emul=arm_epoc_pe ;
- targ_extra_ofiles="deffilep.o pe-dll.o" ;;
-arm-*-wince) targ_emul=armpe ;
+alpha*-*-freebsd* | alpha*-*-kfreebsd*-gnu)
+ targ_emul=elf64alpha_fbsd
+ targ_extra_emuls="elf64alpha alpha"
+ tdir_alpha=`echo ${targ_alias} | sed -e 's/freebsd/freebsdecoff/'` ;;
+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
+ 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*-*-netbsd*) targ_emul=elf64alpha_nbsd ;;
+alpha*-*-openbsd*) targ_emul=elf64alpha
+ ;;
+arc-*-elf*) targ_emul=arcelf
+ ;;
+arm-epoc-pe) targ_emul=arm_epoc_pe ; targ_extra_ofiles="deffilep.o pe-dll.o" ;;
+arm-wince-pe | arm-*-wince) targ_emul=arm_wince_pe ; targ_extra_ofiles="deffilep.o pe-dll.o" ;;
+arm-*-pe) targ_emul=armpe ; targ_extra_ofiles="deffilep.o pe-dll.o" ;;
+arm-*-aout | armel-*-aout) targ_emul=armaoutl ;;
+armeb-*-aout) targ_emul=armaoutb ;;
+arm-*-coff) targ_emul=armcoff ;;
+arm-*-freebsd* | arm-*-kfreebsd*-gnu)
+ targ_emul=armelf_fbsd
+ targ_extra_emuls="armelf" ;;
+armeb-*-netbsdelf*) targ_emul=armelfb_nbsd;
+ targ_extra_emuls="armelf_nbsd armelf armnbsd" ;;
+arm-*-netbsdelf*) targ_emul=armelf_nbsd;
+ targ_extra_emuls="armelfb_nbsd armelf armnbsd" ;;
+arm-*-netbsd*) targ_emul=armnbsd;
+ targ_extra_emuls="armelf armelf_nbsd armelfb_nbsd" ;;
+arm-*-nto*) targ_emul=armnto ;;
+arm-*-openbsd*) targ_emul=armnbsd ;;
+arm-*-rtems*) targ_emul=armelf ;;
+armeb-*-elf) targ_emul=armelfb ;;
+arm-*-elf | arm*-*-eabi*)
+ targ_emul=armelf ;;
+arm*-*-symbianelf*) targ_emul=armsymbian;;
+arm-*-kaos*) targ_emul=armelf ;;
+arm9e-*-elf) targ_emul=armelf ;;
+arm*b-*-linux-*eabi) targ_emul=armelfb_linux_eabi
+ targ_extra_emuls=armelf_linux_eabi
+ targ_extra_libpath=$targ_extra_emuls
+ ;;
+arm*b-*-linux-*) targ_emul=armelfb_linux
+ targ_extra_emuls="armelfb armelf armelf_linux"
+ targ_extra_libpath="armelf_linux"
+ ;;
+arm*-*-linux-*eabi) targ_emul=armelf_linux_eabi
+ targ_extra_emuls=armelfb_linux_eabi
+ targ_extra_libpath=$targ_extra_emuls
+ ;;
+arm*-*-linux-*) targ_emul=armelf_linux
+ targ_extra_emuls="armelf armelfb armelfb_linux"
+ targ_extra_libpath="armelfb_linux"
+ ;;
+arm*-*-uclinux*eabi) targ_emul=armelf_linux_eabi
+ targ_extra_emuls=armelfb_linux_eabi
+ targ_extra_libpath=$targ_extra_emuls
+ ;;
+arm*-*-uclinux*) targ_emul=armelf_linux
+ targ_extra_emuls="armelf armelfb armelfb_linux"
+ targ_extra_libpath="armelfb_linux"
+ ;;
+arm-*-vxworks) targ_emul=armelf_vxworks ;;
+arm*-*-conix*) targ_emul=armelf ;;
+thumb-*-linux-* | thumb-*-uclinux*) targ_emul=armelf_linux; targ_extra_emuls=armelf ;;
+strongarm-*-coff) targ_emul=armcoff ;;
+strongarm-*-elf) targ_emul=armelf ;;
+strongarm-*-kaos*) targ_emul=armelf ;;
+thumb-*-coff) targ_emul=armcoff ;;
+thumb-*-elf) targ_emul=armelf ;;
+thumb-epoc-pe) targ_emul=arm_epoc_pe ;
targ_extra_ofiles="deffilep.o pe-dll.o" ;;
-arm-*-pe) targ_emul=armpe ;
+thumb-*-pe) targ_emul=armpe ;
targ_extra_ofiles="deffilep.o pe-dll.o" ;;
-arc-*-elf*) targ_emul=arcelf ;;
+xscale-*-coff) targ_emul=armcoff ;;
+xscale-*-elf) targ_emul=armelf
+ ;;
avr-*-*) targ_emul=avr2
- targ_extra_emuls="avr1 avr3 avr4 avr5" ;;
+ targ_extra_emuls="avr1 avr3 avr4 avr5 avr6"
+ ;;
+bfin-*-elf) targ_emul=elf32bfin;
+ targ_extra_emuls="elf32bfinfd"
+ targ_extra_libpath=$targ_extra_emuls
+ ;;
+bfin-*-uclinux*) targ_emul=elf32bfin;
+ targ_extra_emuls="elf32bfinfd"
+ targ_extra_libpath=$targ_extra_emuls
+ ;;
+bfin-*-linux-uclibc*) targ_emul=elf32bfin;
+ targ_extra_emuls="elf32bfinfd"
+ targ_extra_libpath=$targ_extra_emuls
+ ;;
+cr16-*-elf*) targ_emul=elf32cr16 ;;
+cr16c-*-elf*) targ_emul=elf32cr16c
+ ;;
cris-*-*aout*) targ_emul=crisaout
targ_extra_emuls="criself crislinux"
targ_extra_libpath=$targ_extra_emuls ;;
-cris-*-linux-gnu*) targ_emul=crislinux ;;
-cris-*-*) targ_emul=criself
+cris-*-linux-* | crisv32-*-linux-*)
+ targ_emul=crislinux ;;
+cris-*-* | crisv32-*-*) targ_emul=criself
targ_extra_emuls="crisaout crislinux"
- targ_extra_libpath=$targ_extra_emuls ;;
+ targ_extra_libpath=$targ_extra_emuls
+ ;;
+crx-*-elf*) targ_emul=elf32crx
+ ;;
d10v-*-*) targ_emul=d10velf ;;
d30v-*-*ext*) targ_emul=d30v_e; targ_extra_emuls="d30velf d30v_o" ;;
d30v-*-*onchip*) targ_emul=d30v_o; targ_extra_emuls="d30velf d30v_e" ;;
-d30v-*-*) targ_emul=d30velf; targ_extra_emuls="d30v_e d30v_o" ;;
-dlx-*-elf*) targ_emul=elf32_dlx ;;
-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 ;;
-sparc*-*-coff) targ_emul=coff_sparc ;;
-sparc*-*-elf) targ_emul=elf32_sparc ;;
-sparc*-*-sysv4*) targ_emul=elf32_sparc ;;
-sparc64-*-freebsd* | sparcv9-*-freebsd* | sparc64-*-kfreebsd*-gnu | sparcv9-*-kfreebsd*-gnu)
- targ_emul=elf64_sparc_fbsd
- targ_extra_emuls="elf64_sparc elf32_sparc"
- targ_extra_libpath=$targ_extra_emuls
- tdir_elf32_sparc=`echo ${targ_alias} | sed -e 's/64//'`
+d30v-*-*) targ_emul=d30velf; targ_extra_emuls="d30v_e d30v_o"
;;
-sparc*-*-linux*aout*) targ_emul=sparclinux
- targ_extra_emuls="elf32_sparc sun4"
- tdir_elf32_sparc=`echo ${targ_alias} | sed -e 's/aout//'`
- tdir_sun4=sparc-sun-sunos4
+dlx-*-elf*) targ_emul=elf32_dlx
;;
-sparc64-*-linux-gnu*) targ_emul=elf64_sparc
- targ_extra_emuls="elf32_sparc sparclinux sun4"
- targ_extra_libpath=elf32_sparc
- tdir_elf32_sparc=`echo ${targ_alias} | sed -e 's/64//'`
- tdir_sparclinux=${tdir_elf32_sparc}aout
- tdir_sun4=sparc-sun-sunos4
+fido*-*-elf*) targ_emul=m68kelf ;;
+fr30-*-*) targ_emul=elf32fr30
;;
-sparc*-*-linux-gnu*) targ_emul=elf32_sparc
- targ_extra_emuls="sparclinux elf64_sparc sun4"
- targ_extra_libpath=elf64_sparc
- tdir_sparclinux=${targ_alias}aout
- tdir_elf64_sparc=`echo ${targ_alias} | sed -e 's/32//'`
- tdir_sun4=sparc-sun-sunos4
+frv-*-*linux*) targ_emul=elf32frvfd ;;
+frv-*-*) targ_emul=elf32frv ; targ_extra_emuls="elf32frvfd"
;;
-sparc*-*-lynxos*) targ_emul=sparclynx ;;
-sparc64-*-netbsd* | sparc64-*-openbsd*)
- targ_emul=elf64_sparc
- targ_extra_emuls="elf32_sparc"
+h8300-*-hms* | h8300-*-coff* | h8300-*-rtemscoff*)
+ targ_emul=h8300; targ_extra_emuls="h8300h h8300s h8300hn h8300sn h8300sx h8300sxn" ;;
+h8300-*-elf* | h8300-*-rtems*)
+ targ_emul=h8300elf;
+ targ_extra_emuls="h8300helf h8300self h8300hnelf h8300snelf h8300sxelf h8300sxnelf" ;;
+h8500-*-hms* | h8500-*-coff* | h8500-*-rtems*)
+ targ_emul=h8500
+ targ_extra_emuls="h8500s h8500b h8500m h8500c"
;;
-sparc*-*-netbsd*elf*) targ_emul=elf32_sparc ;;
-sparc*-*-netbsd*) targ_emul=sparcnbsd ;;
-sparc-*-solaris2.[0-6] | sparc-*-solaris2.[0-6].*)
- targ_emul=elf32_sparc ;;
-sparc-*-solaris2*) targ_emul=elf32_sparc
- targ_extra_emuls="elf64_sparc"
- targ_extra_libpath=$targ_extra_emuls
- tdir_elf64_sparc=`echo ${targ_alias} | sed -e 's/32//'`
+hppa*64*-*-linux-*) targ_emul=hppa64linux ;;
+hppa*64*-*) targ_emul=elf64hppa ;;
+hppa*-*-linux-*) targ_emul=hppalinux ;;
+hppa*-*-*elf*) targ_emul=hppaelf ;;
+hppa*-*-lites*) targ_emul=hppaelf ;;
+hppa*-*-netbsd*) targ_emul=hppanbsd ;;
+hppa*-*-openbsd*) targ_emul=hppaobsd
;;
-sparcv9-*-solaris2* | sparc64-*-solaris2*)
- targ_emul=elf64_sparc
- targ_extra_emuls="elf32_sparc"
- targ_extra_libpath=$targ_extra_emuls
- tdir_elf32_sparc=`echo ${targ_alias} | sed -e 's/64//'`
+i370-*-elf* | i370-*-linux-*) targ_emul=elf32i370
;;
-sparc*-*-solaris2*) targ_emul=elf32_sparc ;;
-sparc*-wrs-vxworks*) targ_emul=sparcaout ;;
-sparc*-*-rtemsaout*) targ_emul=sparcaout ;;
-sparc*-*-rtemself*) targ_emul=elf32_sparc ;;
-sparc*-*-rtems*) targ_emul=elf32_sparc ;;
-i860-*-coff) targ_emul=coff_i860 ;;
-i860-stardent-sysv4* | i860-stardent-elf*)
- targ_emul=elf32_i860 ;;
-i960-wrs-vxworks5.0*) targ_emul=gld960 ;;
-i960-wrs-vxworks5*) targ_emul=gld960coff ;;
-i960-wrs-vxworks*) targ_emul=gld960 ;;
-i960-*-coff) targ_emul=gld960coff ;;
-i960-intel-nindy) targ_emul=gld960 ;;
-i960-*-rtems*) targ_emul=gld960coff ;;
-i960-*-elf*) targ_emul=elf32_i960 ;;
-ia64-*-elf*) targ_emul=elf64_ia64 ;;
-ia64-*-freebsd* | ia64-*-kfreebsd*-gnu)
- targ_emul=elf64_ia64_fbsd
- targ_extra_emuls="elf64_ia64" ;;
-ia64-*-netbsd*) targ_emul=elf64_ia64 ;;
-ia64-*-linux*) targ_emul=elf64_ia64 ;;
-ia64-*-aix*) targ_emul=elf64_aix ;;
-m32r*le-*-elf*) targ_emul=m32rlelf ;;
-m32r*-*-elf*) targ_emul=m32relf ;;
-m32r*le-*-linux-gnu*) targ_emul=m32rlelf_linux ;;
-m32r*-*-linux-gnu*) targ_emul=m32relf_linux ;;
-m68hc11-*-*|m6811-*-*) targ_emul=m68hc11elf
- targ_extra_emuls="m68hc11elfb m68hc12elf m68hc12elfb" ;;
-m68hc12-*-*|m6812-*-*) targ_emul=m68hc12elf
- targ_extra_emuls="m68hc12elfb m68hc11elf m68hc11elfb" ;;
-m68*-sun-sunos[34]*) targ_emul=sun3 ;;
-m68*-wrs-vxworks*) targ_emul=sun3 ;;
-m68*-ericsson-ose) targ_emul=sun3 ;;
-m68*-apple-aux*) targ_emul=m68kaux ;;
-*-tandem-none) targ_emul=st2000 ;;
-i370-*-elf* | i370-*-linux-gnu*) targ_emul=elf32i370 ;;
i[3-7]86-*-nto-qnx*) targ_emul=i386nto ;;
i[3-7]86-*-vsta) targ_emul=vsta ;;
-i[3-7]86-go32-rtems*) targ_emul=i386go32 ;;
i[3-7]86-*-go32) targ_emul=i386go32 ;;
i[3-7]86-*-msdosdjgpp*) targ_emul=i386go32 ;;
i[3-7]86-*-aix*) targ_emul=i386coff ;;
@@ -139,66 +176,60 @@ i[3-7]86-*-sco*) targ_emul=i386coff ;;
i[3-7]86-*-isc*) targ_emul=i386coff ;;
i[3-7]86-*-lynxos*) targ_emul=i386lynx ;;
i[3-7]86-*-coff) targ_emul=i386coff ;;
-i[3-7]86-*-rtemscoff*) targ_emul=i386coff ;;
-i[3-7]86-*-rtemself*) targ_emul=elf_i386 ;;
i[3-7]86-*-rtems*) targ_emul=elf_i386 ;;
i[3-7]86-*-aros*) targ_emul=elf_i386 ;;
+i[3-7]86-*-rdos*) targ_emul=elf_i386 ;;
i[3-7]86-*-bsd) targ_emul=i386bsd ;;
i[3-7]86-*-bsd386) targ_emul=i386bsd ;;
i[3-7]86-*-bsdi*) targ_emul=i386bsd ;;
i[3-7]86-*-aout) targ_emul=i386aout ;;
i[3-7]86-*-linux*aout*) targ_emul=i386linux
targ_extra_emuls=elf_i386
- tdir_elf_i386=`echo ${targ_alias} | sed -e 's/aout//'`
- ;;
+ tdir_elf_i386=`echo ${targ_alias} | sed -e 's/aout//'` ;;
i[3-7]86-*-linux*oldld) targ_emul=i386linux; targ_extra_emuls=elf_i386 ;;
-i[3-7]86-*-linux-gnu*) targ_emul=elf_i386
+i[3-7]86-*-linux-*) targ_emul=elf_i386
targ_extra_emuls=i386linux
- if test x${want64} = xtrue; then
- targ_extra_emuls="$targ_extra_emuls elf_x86_64"
- fi
- tdir_i386linux=${targ_alias}aout
- ;;
-x86_64-*-linux-gnu*) targ_emul=elf_x86_64
+ targ64_extra_emuls=elf_x86_64
+ targ64_extra_libpath=elf_x86_64
+ tdir_i386linux=${targ_alias}aout ;;
+x86_64-*-linux-*) targ_emul=elf_x86_64
targ_extra_emuls="elf_i386 i386linux"
targ_extra_libpath=elf_i386
tdir_i386linux=`echo ${targ_alias}aout | sed -e 's/x86_64/i386/'`
- tdir_elf_i386=`echo ${targ_alias} | sed -e 's/x86_64/i386/'`
- ;;
+ tdir_elf_i386=`echo ${targ_alias} | sed -e 's/x86_64/i386/'` ;;
i[3-7]86-*-sysv[45]*) targ_emul=elf_i386 ;;
i[3-7]86-*-solaris2*) targ_emul=elf_i386_ldso
- targ_extra_emuls="elf_i386"
+ targ_extra_emuls="elf_i386 elf_x86_64"
+ targ_extra_libpath=$targ_extra_emuls
;;
i[3-7]86-*-unixware) targ_emul=elf_i386 ;;
i[3-7]86-*-solaris*) targ_emul=elf_i386_ldso
targ_extra_emuls="elf_i386"
+ targ_extra_libpath=$targ_extra_emuls
;;
i[3-7]86-*-netbsdelf* | \
i[3-7]86-*-netbsd*-gnu* | \
i[3-7]86-*-knetbsd*-gnu)
targ_emul=elf_i386
- targ_extra_emuls=i386nbsd
- ;;
+ targ_extra_emuls=i386nbsd ;;
i[3-7]86-*-netbsdpe*) targ_emul=i386pe
- targ_extra_ofiles="deffilep.o pe-dll.o"
- ;;
+ targ_extra_ofiles="deffilep.o pe-dll.o" ;;
i[3-7]86-*-netbsd*) targ_emul=i386nbsd
- targ_extra_emuls=elf_i386
- ;;
+ targ_extra_emuls=elf_i386 ;;
x86_64-*-netbsd*) targ_emul=elf_x86_64
targ_extra_emuls="elf_i386 i386nbsd"
tdir_elf_i386=`echo ${targ_alias} | \
sed -e 's/x86_64/i386/'`
case "${tdir_elf_i386}" in
- *-netbsdelf*) ;;
- *)
- tdir_elf_i386=`echo ${tdir_elf_i386} | \
- sed -e 's/netbsd/netbsdelf/'`
- ;;
- esac
- ;;
+ *-netbsdelf*) ;;
+ *) tdir_elf_i386=`echo ${tdir_elf_i386} | \
+ sed -e 's/netbsd/netbsdelf/'`;;
+ esac ;;
i[3-7]86-*-netware) targ_emul=i386nw ;;
i[3-7]86-*-elf*) targ_emul=elf_i386 ;;
+x86_64-*-elf*) targ_emul=elf_x86_64
+ targ_extra_emuls=elf_i386
+ ;;
i[3-7]86-*-kaos*) targ_emul=elf_i386 ;;
i[3-7]86-*-freebsdaout* | i[3-7]86-*-freebsd[12].* | i[3-7]86-*-freebsd[12])
targ_emul=i386bsd ;;
@@ -208,9 +239,11 @@ i[3-7]86-*-freebsd* | i[3-7]86-*-kfreebsd*-gnu)
x86_64-*-freebsd* | x86_64-*-kfreebsd*-gnu)
targ_emul=elf_x86_64_fbsd
targ_extra_emuls="elf_i386_fbsd elf_x86_64 elf_i386"
- tdir_elf_i386=`echo ${targ_alias} \
+ targ_extra_libpath="elf_i386_fbsd"
+ tdir_elf_i386_fbsd=`echo ${targ_alias} \
| sed -e 's/x86_64/i386/'`
- ;;
+ tdir_elf_i386=`echo ${targ_alias} \
+ | sed -e 's/x86_64/i386/'` ;;
i[3-7]86-*-sysv*) targ_emul=i386coff ;;
i[3-7]86-*-ptx*) targ_emul=i386coff ;;
i[3-7]86-*-mach*) targ_emul=i386mach ;;
@@ -226,133 +259,54 @@ i[3-7]86-*-cygwin*) targ_emul=i386pe ;
test "$targ" != "$host" && LIB_PATH='${tooldir}/lib/w32api' ;;
i[3-7]86-*-mingw32*) targ_emul=i386pe ;
targ_extra_ofiles="deffilep.o pe-dll.o" ;;
+x86_64-*-mingw*) targ_emul=i386pep ;
+ targ_extra_ofiles="deffilep.o pep-dll.o" ;;
i[3-7]86-*-interix*) targ_emul=i386pe_posix;
targ_extra_ofiles="deffilep.o pe-dll.o" ;;
i[3-7]86-*-beospe*) targ_emul=i386beos ;;
i[3-7]86-*-beos*) targ_emul=elf_i386_be ;;
-i[3-7]86-*-vxworks*) targ_emul=elf_i386 ;;
-i[3-7]86-*-chaos) targ_emul=elf_i386_chaos ;;
-m8*-*-*) targ_emul=m88kbcs ;;
-a29k-*-udi) targ_emul=sa29200 ;;
-a29k-*-ebmon) targ_emul=ebmon29k ;;
-a29k-*-*) targ_emul=a29k ;;
-# arm-*-riscix*) targ_emul=riscix ;;
-arm-*-aout | armel-*-aout) targ_emul=armaoutl ;;
-armeb-*-aout) targ_emul=armaoutb ;;
-arm-*-coff) targ_emul=armcoff ;;
-arm-*-freebsd* | arm-*-kfreebsd*-gnu)
- targ_emul=armelf_fbsd
- targ_extra_emuls="armelf" ;;
-armeb-*-netbsdelf*) targ_emul=armelfb_nbsd;
- targ_extra_emuls="armelf_nbsd armelf armnbsd" ;;
-arm-*-netbsdelf*) targ_emul=armelf_nbsd;
- targ_extra_emuls="armelfb_nbsd armelf armnbsd" ;;
-arm-*-netbsd*) targ_emul=armnbsd;
- targ_extra_emuls="armelf armelf_nbsd armelfb_nbsd" ;;
-arm-*-nto*) targ_emul=armnto ;;
-arm-*-openbsd*) targ_emul=armnbsd ;;
-arm-*-rtems*) targ_emul=armelf ;;
-armeb-*-elf) targ_emul=armelfb ;;
-arm-*-elf | arm-*-vxworks)
- targ_emul=armelf ;;
-arm-*-kaos*) targ_emul=armelf ;;
-arm9e-*-elf) targ_emul=armelf ;;
-arm-*-oabi) targ_emul=armelf_oabi ;;
-arm*b-*-linux-gnu*) targ_emul=armelfb_linux; targ_extra_emuls=armelfb ;;
-arm*-*-linux-gnu*) targ_emul=armelf_linux; targ_extra_emuls=armelf ;;
-arm*-*-uclinux*) targ_emul=armelf_linux; targ_extra_emuls=armelf ;;
-arm*-*-conix*) targ_emul=armelf ;;
-thumb-*-linux-gnu* | thumb-*-uclinux*) targ_emul=armelf_linux; targ_extra_emuls=armelf ;;
-strongarm-*-coff) targ_emul=armcoff ;;
-strongarm-*-elf) targ_emul=armelf ;;
-strongarm-*-kaos*) targ_emul=armelf ;;
-thumb-*-coff) targ_emul=armcoff ;;
-thumb-*-elf) targ_emul=armelf ;;
-thumb-*-oabi) targ_emul=armelf_oabi ;;
-thumb-epoc-pe) targ_emul=arm_epoc_pe ;
- targ_extra_ofiles="deffilep.o pe-dll.o" ;;
-thumb-*-pe) targ_emul=armpe ;
- targ_extra_ofiles="deffilep.o pe-dll.o" ;;
-xscale-*-coff) targ_emul=armcoff ;;
-xscale-*-elf) targ_emul=armelf ;;
-h8300-*-hms* | h8300-*-coff* | h8300-*-rtems*)
- targ_emul=h8300; targ_extra_emuls="h8300h h8300s h8300hn h8300sn h8300sx h8300sxn"
- ;;
-h8300-*-elf*)
- targ_emul=h8300elf;
- targ_extra_emuls="h8300helf h8300self h8300hnelf h8300snelf h8300sxelf h8300sxnelf"
- ;;
-h8500-*-hms* | h8500-*-coff* | h8500-*-rtems*)
- targ_emul=h8500
- targ_extra_emuls="h8500s h8500b h8500m h8500c"
+i[3-7]86-*-vxworks*) targ_emul=elf_i386_vxworks ;;
+i[3-7]86-*-chaos) targ_emul=elf_i386_chaos
;;
-sh-*-linux*)
- targ_emul=shlelf_linux
- targ_extra_emuls=shelf_linux
- targ_extra_libpath=shelf_linux
- ;;
-sh64eb-*-linux*) targ_emul=shelf32_linux
- targ_extra_emuls="shlelf32_linux"
- ;;
-sh64-*-linux*) targ_emul=shlelf32_linux
- targ_extra_emuls="shelf32_linux"
- targ_extra_libpath=shelf32_linux
- ;;
-sh*eb-*-linux*)
- targ_emul=shelf_linux
- ;;
-sh*-*-linux*)
- targ_emul=shlelf_linux
- ;;
-sh5le-*-netbsd*)
- targ_emul=shlelf32_nbsd
- targ_extra_emuls="shelf32_nbsd shelf64_nbsd shlelf64_nbsd shelf_nbsd shlelf_nbsd"
- ;;
-sh5-*-netbsd*)
- targ_emul=shelf32_nbsd
- targ_extra_emuls="shlelf32_nbsd shelf64_nbsd shlelf64_nbsd shelf_nbsd shlelf_nbsd"
- ;;
-sh64le-*-netbsd*)
- targ_emul=shlelf64_nbsd
- targ_extra_emuls="shelf64_nbsd shelf32_nbsd shlelf32_nbsd shelf_nbsd shlelf_nbsd"
- ;;
-sh64-*-netbsd*)
- targ_emul=shelf64_nbsd
- targ_extra_emuls="shlelf64_nbsd shelf32_nbsd shlelf32_nbsd shelf_nbsd shlelf_nbsd"
- ;;
-sh*l*-*-netbsdelf*)
- targ_emul=shlelf_nbsd
- targ_extra_emuls=shelf_nbsd
+i860-*-coff) targ_emul=coff_i860 ;;
+i860-stardent-sysv4* | i860-stardent-elf*)
+ targ_emul=elf32_i860
;;
-sh*-*-netbsdelf*)
- targ_emul=shelf_nbsd
- targ_extra_emuls=shlelf_nbsd
+i960-wrs-vxworks5.0*) targ_emul=gld960 ;;
+i960-wrs-vxworks5*) targ_emul=gld960coff ;;
+i960-wrs-vxworks*) targ_emul=gld960 ;;
+i960-*-coff) targ_emul=gld960coff ;;
+i960-intel-nindy) targ_emul=gld960 ;;
+i960-*-rtems*) targ_emul=gld960coff ;;
+i960-*-elf*) targ_emul=elf32_i960
;;
-shle*-*-elf* | sh[1234]*le*-*-elf | shle*-*-kaos*)
- targ_emul=shlelf
- targ_extra_emuls="shelf shl sh"
+ia64-*-elf*) targ_emul=elf64_ia64 ;;
+ia64-*-freebsd* | ia64-*-kfreebsd*-gnu)
+ targ_emul=elf64_ia64_fbsd
+ targ_extra_emuls="elf64_ia64" ;;
+ia64-*-netbsd*) targ_emul=elf64_ia64 ;;
+ia64-*-linux*) targ_emul=elf64_ia64 ;;
+ia64-*-aix*) targ_emul=elf64_aix
;;
-sh-*-rtemscoff*) targ_emul=sh; targ_extra_emuls=shl ;;
-sh-*-elf* | sh[1234]*-*-elf | sh-*-rtems* | sh-*-kaos* | sh-*-vxworks)
- targ_emul=shelf
- targ_extra_emuls="shlelf sh shl"
+ip2k-*-elf) targ_emul=elf32ip2k
;;
-sh-*-nto*) targ_emul=shelf_nto
- targ_extra_emuls=shlelf_nto
+iq2000-*-elf) targ_emul=elf32iq2000 ; targ_extra_emuls="elf32iq10"
;;
-sh-*-pe) targ_emul=shpe ;
- targ_extra_ofiles="deffilep.o pe-dll.o" ;;
-sh-*-*) targ_emul=sh; targ_extra_emuls=shl ;;
-sh64le-*-elf*)
- targ_emul=shlelf
- targ_extra_emuls="shelf shlelf32 shelf32 shlelf64 shelf64"
- targ_extra_libpath=$targ_extra_emuls
+m32c-*-elf) targ_emul=elf32m32c
;;
-sh64-*-elf*)
- targ_emul=shelf
- targ_extra_emuls="shlelf shelf32 shlelf32 shelf64 shlelf64"
- targ_extra_libpath=$targ_extra_emuls
+m32r*le-*-elf*) targ_emul=m32rlelf ;;
+m32r*-*-elf*) targ_emul=m32relf ;;
+m32r*le-*-linux-*) targ_emul=m32rlelf_linux ;;
+m32r*-*-linux-*) targ_emul=m32relf_linux
;;
+m68hc11-*-*|m6811-*-*) targ_emul=m68hc11elf
+ targ_extra_emuls="m68hc11elfb m68hc12elf m68hc12elfb" ;;
+m68hc12-*-*|m6812-*-*) targ_emul=m68hc12elf
+ targ_extra_emuls="m68hc12elfb m68hc11elf m68hc11elfb" ;;
+m68*-sun-sunos[34]*) targ_emul=sun3 ;;
+m68*-wrs-vxworks*) targ_emul=sun3 ;;
+m68*-ericsson-ose) targ_emul=sun3 ;;
+m68*-apple-aux*) targ_emul=m68kaux ;;
m68k-sony-*) targ_emul=news ;;
m68k-hp-bsd*) targ_emul=hp300bsd ;;
m68*-motorola-sysv*) targ_emul=delta68 ;;
@@ -362,15 +316,12 @@ m68*-*-elf) targ_emul=m68kelf ;;
m68*-*-hpux*) targ_emul=hp3hpux ;;
m68k-*-linux*aout*) targ_emul=m68klinux
targ_extra_emuls=m68kelf
- tdir_m68kelf=`echo ${targ_alias} | sed -e 's/aout//'`
- ;;
-m68k-*-linux-gnu*) targ_emul=m68kelf
+ tdir_m68kelf=`echo ${targ_alias} | sed -e 's/aout//'` ;;
+m68k-*-linux-*) targ_emul=m68kelf
targ_extra_emuls=m68klinux
- tdir_m68klinux=`echo ${targ_alias} | sed -e 's/linux/linuxaout/'`
- ;;
+ tdir_m68klinux=`echo ${targ_alias} | sed -e 's/linux/linuxaout/'` ;;
m68k-*-uclinux*) targ_emul=m68kelf ;;
m68*-*-gnu*) targ_emul=m68kelf ;;
-m68*-*-lynxos*) targ_emul=m68klynx ;;
m68*-*-netbsd*4k*) targ_emul=m68k4knbsd
targ_extra_emuls="m68knbsd m68kelfnbsd" ;;
m68*-*-netbsdelf*) targ_emul=m68kelfnbsd
@@ -380,22 +331,17 @@ m68*-*-netbsdaout* | m68*-*-netbsd*)
targ_extra_emuls="m68kelfnbsd m68k4knbsd" ;;
m68*-*-psos*) targ_emul=m68kpsos ;;
m68*-*-rtemscoff*) targ_emul=m68kcoff ;;
-m68*-*-rtems*) targ_emul=m68kelf ;;
-hppa*64*-*-linux-gnu*) targ_emul=hppa64linux ;;
-hppa*64*-*) targ_emul=elf64hppa ;;
-hppa*-*-linux-gnu*) targ_emul=hppalinux ;;
-hppa*-*-*elf*) targ_emul=hppaelf ;;
-hppa*-*-lites*) targ_emul=hppaelf ;;
-hppa*-*-netbsd*) targ_emul=hppanbsd ;;
-hppa*-*-openbsd*) targ_emul=hppaobsd ;;
-hppa*-*-rtems*) targ_emul=hppaelf ;;
-vax-dec-ultrix* | vax-dec-bsd*) targ_emul=vax ;;
-vax-*-netbsdelf*) targ_emul=elf32vax
- targ_extra_emuls=vaxnbsd ;;
-vax-*-netbsdaout* | vax-*-netbsd*)
- targ_emul=vaxnbsd
- targ_extra_emuls=elf32vax ;;
-vax-*-linux-gnu*) targ_emul=elf32vax ;;
+m68*-*-rtems*) targ_emul=m68kelf
+ ;;
+m8*-*-*) targ_emul=m88kbcs
+ ;;
+maxq-*-coff) targ_emul=maxqcoff
+ ;;
+mcore-*-pe) targ_emul=mcorepe ;
+ targ_extra_ofiles="deffilep.o pe-dll.o" ;;
+mcore-*-elf) targ_emul=elf32mcore
+ ;;
+mep-*-elf) targ_emul=elf32mep ;;
mips*-*-pe) targ_emul=mipspe ;
targ_extra_ofiles="deffilep.o pe-dll.o" ;;
mips*-dec-ultrix*) targ_emul=mipslit ;;
@@ -403,17 +349,16 @@ mips*-dec-osf*) targ_emul=mipslit ;;
mips*-sgi-irix5*) targ_emul=elf32bsmip ;;
mips*-sgi-irix6*) targ_emul=elf32bmipn32
targ_extra_emuls="elf32bsmip elf64bmip"
- targ_extra_libpath=$targ_extra_emuls
- ;;
+ targ_extra_libpath=$targ_extra_emuls ;;
mips*-sgi-irix*) targ_emul=mipsbig ;;
mips*el-*-ecoff*) targ_emul=mipsidtl ;;
mips*-*-ecoff*) targ_emul=mipsidt ;;
-mips*el-*-netbsd*) targ_emul=elf32lmip
- targ_extra_emuls="elf32bmip"
- ;;
-mips*-*-netbsd*) targ_emul=elf32bmip
- targ_extra_emuls="elf32lmip"
+mips*el-*-netbsd*) targ_emul=elf32ltsmip
+ targ_extra_emuls="elf32btsmip elf64ltsmip elf64btsmip"
;;
+mips*-*-netbsd*) targ_emul=elf32btsmip
+ targ_extra_emuls="elf32ltsmip elf64btsmip elf64ltsmip"
+ ;;
mips*-*-bsd*) targ_emul=mipsbig ;;
mips*vr4300el-*-elf*) targ_emul=elf32l4300 ;;
mips*vr4300-*-elf*) targ_emul=elf32b4300 ;;
@@ -421,108 +366,106 @@ mips*vr4100el-*-elf*) targ_emul=elf32l4300 ;;
mips*vr4100-*-elf*) targ_emul=elf32b4300 ;;
mips*vr5000el-*-elf*) targ_emul=elf32l4300 ;;
mips*vr5000-*-elf*) targ_emul=elf32b4300 ;;
+mips*el-sde-elf*) targ_emul=elf32ltsmip
+ targ_extra_emuls="elf32btsmip elf32ltsmipn32 elf64ltsmip elf32btsmipn32 elf64btsmip" ;;
+mips*-sde-elf*) targ_emul=elf32btsmip
+ targ_extra_emuls="elf32ltsmip elf32btsmipn32 elf64btsmip elf32ltsmipn32 elf64ltsmip" ;;
mips*el-*-elf*) targ_emul=elf32elmip ;;
mips*-*-elf*) targ_emul=elf32ebmip ;;
-mips*el-*-rtems*) targ_emul=elf32elmip ;;
mips*-*-rtems*) targ_emul=elf32ebmip ;;
-mips*el-*-vxworks*) targ_emul=elf32elmip ;;
-mips*-*-vxworks*) targ_emul=elf32ebmip
- targ_extra_emuls="elf32elmip" ;;
+mips*el-*-vxworks*) targ_emul=elf32elmipvxworks
+ targ_extra_emuls="elf32ebmipvxworks" ;;
+mips*-*-vxworks*) targ_emul=elf32ebmipvxworks
+ targ_extra_emuls="elf32elmipvxworks" ;;
mips*-*-windiss) targ_emul=elf32mipswindiss ;;
-mips64*el-*-linux-gnu*) targ_emul=elf32ltsmipn32
+mips64*el-*-linux-*) targ_emul=elf32ltsmipn32
targ_extra_emuls="elf32btsmipn32 elf32ltsmip elf32btsmip elf64ltsmip elf64btsmip"
- ;;
-mips64*-*-linux-gnu*) targ_emul=elf32btsmipn32
+ targ_extra_libpath=$targ_extra_emuls ;;
+mips64*-*-linux-*) targ_emul=elf32btsmipn32
targ_extra_emuls="elf32ltsmipn32 elf32btsmip elf32ltsmip elf64btsmip elf64ltsmip"
- ;;
-mips*el-*-linux-gnu*) targ_emul=elf32ltsmip
+ targ_extra_libpath=$targ_extra_emuls ;;
+mips*el-*-linux-*) targ_emul=elf32ltsmip
targ_extra_emuls="elf32btsmip elf32ltsmipn32 elf64ltsmip elf32btsmipn32 elf64btsmip"
- ;;
-mips*-*-linux-gnu*) targ_emul=elf32btsmip
+ targ_extra_libpath=$targ_extra_emuls ;;
+mips*-*-linux-*) targ_emul=elf32btsmip
targ_extra_emuls="elf32ltsmip elf32btsmipn32 elf64btsmip elf32ltsmipn32 elf64ltsmip"
- ;;
+ targ_extra_libpath=$targ_extra_emuls ;;
mips*-*-lnews*) targ_emul=mipslnews ;;
-mips*-*-sysv4*) targ_emul=elf32btsmip ;;
+mips*-*-sysv4*) targ_emul=elf32btsmip
+ ;;
mmix-*-*) targ_emul=mmo
targ_extra_emuls=elf64mmix
;;
+am33_2.0-*-linux*) targ_emul=elf32am33lin ;;
mn10200-*-*) targ_emul=mn10200 ;;
-mn10300-*-*) targ_emul=mn10300 ;;
-msp430-*-*) targ_emul=msp430x110
- targ_extra_emuls="msp430x112 msp430x1101 msp430x1111 msp430x1121 msp430x1122 msp430x1132 msp430x122 msp430x123 msp430x1222 msp430x1232 msp430x133 msp430x135 msp430x1331 msp430x1351 msp430x147 msp430x148 msp430x149 msp430x155 msp430x156 msp430x157 msp430x167 msp430x168 msp430x169 msp430x311 msp430x312 msp430x313 msp430x314 msp430x315 msp430x323 msp430x325 msp430x336 msp430x337 msp430x412 msp430x413 msp430xE423 msp430xE425 msp430xE427 msp430xW423 msp430xW425 msp430xW427 msp430x435 msp430x436 msp430x437 msp430x447 msp430x448 msp430x449" ;;
-alpha*-*-freebsd* | alpha*-*-kfreebsd*-gnu)
- targ_emul=elf64alpha_fbsd
- targ_extra_emuls="elf64alpha alpha"
- tdir_alpha=`echo ${targ_alias} | sed -e 's/freebsd/freebsdecoff/'`
+mn10300-*-*) targ_emul=mn10300
;;
-alpha*-*-linuxecoff*) targ_emul=alpha targ_extra_emuls=elf64alpha
- tdir_elf64alpha=`echo ${targ_alias} | sed -e 's/ecoff//'`
+mt-*elf) targ_emul=elf32mt
;;
-alpha*-*-linux-gnu*) targ_emul=elf64alpha targ_extra_emuls=alpha
- tdir_alpha=`echo ${targ_alias} | sed -e 's/linux/linuxecoff/'`
+msp430-*-*) targ_emul=msp430x110
+ targ_extra_emuls="msp430x112 msp430x1101 msp430x1111 msp430x1121 msp430x1122 msp430x1132 msp430x122 msp430x123 msp430x1222 msp430x1232 msp430x133 msp430x135 msp430x1331 msp430x1351 msp430x147 msp430x148 msp430x149 msp430x155 msp430x156 msp430x157 msp430x167 msp430x168 msp430x169 msp430x1610 msp430x1611 msp430x1612 msp430x2101 msp430x2111 msp430x2121 msp430x2131 msp430x311 msp430x312 msp430x313 msp430x314 msp430x315 msp430x323 msp430x325 msp430x336 msp430x337 msp430x412 msp430x413 msp430x415 msp430x417 msp430xE423 msp430xE425 msp430xE427 msp430xW423 msp430xW425 msp430xW427 msp430xG437 msp430xG438 msp430xG439 msp430x435 msp430x436 msp430x437 msp430x447 msp430x448 msp430x449"
+ ;;
+ns32k-pc532-mach* | ns32k-pc532-ux*) targ_emul=pc532macha ;;
+ns32k-*-netbsd* | ns32k-pc532-lites*) targ_emul=ns32knbsd
;;
-alpha*-*-osf*) targ_emul=alpha ;;
-alpha*-*-gnu*) targ_emul=elf64alpha ;;
-alpha*-*-netware*) targ_emul=alpha ;;
-alpha*-*-netbsd*) targ_emul=elf64alpha_nbsd ;;
-alpha*-*-openbsd*) targ_emul=elf64alpha ;;
-z8k-*-coff) targ_emul=z8002; targ_extra_emuls=z8001 ;;
-ns32k-pc532-mach* | ns32k-pc532-ux*) targ_emul=pc532macha ;;
-ns32k-*-netbsd* | ns32k-pc532-lites*) targ_emul=ns32knbsd ;;
openrisc-*-*) targ_emul=elf32openrisc ;;
or32-*-coff) targ_emul=or32 ;;
or32-*-elf) targ_emul=or32elf ;;
-or32-*-rtems*) targ_emul=or32elf ;;
-pdp11-*-*) targ_emul=pdp11 ;;
+or32-*-rtems*) targ_emul=or32elf
+ ;;
+pdp11-*-*) targ_emul=pdp11
+ ;;
pjl*-*-*) targ_emul=pjlelf ; targ_extra_emuls="elf_i386" ;;
-pj*-*-*) targ_emul=pjelf ;;
+pj*-*-*) targ_emul=pjelf
+ ;;
powerpc-*-freebsd* | powerpc-*-kfreebsd*-gnu)
targ_emul=elf32ppc_fbsd;
targ_extra_emuls="elf32ppc elf32ppcsim";
targ_extra_libpath=elf32ppc;
- tdir_elf32ppcsim=`echo ${targ_alias} | sed -e 's/ppc/ppcsim/'`
- ;;
-powerpc*-*-linux*)
- case "${targ}" in
- *64*) targ_emul=elf64ppc
- targ_extra_emuls="elf32ppclinux elf32ppc elf32ppcsim"
- targ_extra_libpath="elf32ppclinux elf32ppc"
- tdir_elf32ppc=`echo "${targ_alias}" | sed -e 's/64//'`
- tdir_elf32ppclinux=$tdir_elf32ppc
- tdir_elf32ppcsim=$tdir_elf32ppc ;;
- *) targ_emul=elf32ppclinux
- targ_extra_emuls="elf32ppc elf32ppcsim"
- targ_extra_libpath=elf32ppc
- if test "${want64}" = "true"; then
- targ_extra_emuls="$targ_extra_emuls elf64ppc"
- targ_extra_libpath="$targ_extra_libpath elf64ppc"
- fi
- ;;
- esac ;;
+ tdir_elf32ppcsim=`echo ${targ_alias} | sed -e 's/ppc/ppcsim/'` ;;
+powerpc*-*-linux*) case "${targ}" in
+ *64*) targ_emul=elf64ppc
+ targ_extra_emuls="elf32ppclinux elf32ppc elf32ppcsim"
+ targ_extra_libpath="elf32ppclinux elf32ppc"
+ tdir_elf32ppc=`echo "${targ_alias}" | sed -e 's/64//'`
+ tdir_elf32ppclinux=$tdir_elf32ppc
+ tdir_elf32ppcsim=$tdir_elf32ppc
+ ;;
+ *) targ_emul=elf32ppclinux
+ targ_extra_emuls="elf32ppc elf32ppcsim"
+ targ_extra_libpath=elf32ppc
+ targ64_extra_emuls=elf64ppc
+ targ64_extra_libpath=elf64ppc
+ ;;
+ esac ;;
powerpc*le-*-elf* | powerpc*le-*-eabi* | powerpc*le-*-solaris* \
| powerpc*le-*-sysv* | powerpc*le-*-vxworks*)
- case "${targ}" in
- *64*) targ_emul=elf64lppc
- targ_extra_emuls="elf32lppc elf32lppcsim"
- tdir_elf32lppc=`echo "${targ_alias}" | sed -e 's/64//'`
- tdir_elf32lppcsim=$tdir_elf32lppc ;;
- *) targ_emul=elf32lppc
- targ_extra_emuls="elf32ppcsim" ;;
- esac ;;
+ case "${targ}" in
+ *64*) targ_emul=elf64lppc
+ targ_extra_emuls="elf32lppc elf32lppcsim"
+ tdir_elf32lppc=`echo "${targ_alias}" | sed -e 's/64//'`
+ tdir_elf32lppcsim=$tdir_elf32lppc
+ ;;
+ *) targ_emul=elf32lppc
+ targ_extra_emuls="elf32ppcsim" ;;
+ esac ;;
powerpc*-*-elf* | powerpc*-*-eabi* | powerpc*-*-sysv* \
- | powerpc*-*-netbsd* | powerpc-*-openbsd* | powerpc*-*-vxworks* | powerpc*-*-kaos*)
- case "${targ}" in
- *64*) targ_emul=elf64ppc
- targ_extra_emuls="elf32ppc elf32ppclinux elf32ppcsim"
- tdir_elf32ppc=`echo "${targ_alias}" | sed -e 's/64//'`
- tdir_elf32ppclinux=$tdir_elf32ppc
- tdir_elf32ppcsim=$tdir_elf32ppc ;;
- *) targ_emul=elf32ppc
- targ_extra_emuls="elf32ppclinux elf32ppcsim" ;;
- esac ;;
+ | powerpc*-*-netbsd* | powerpc-*-openbsd* | powerpc*-*-kaos*)
+ case "${targ}" in
+ *64*) targ_emul=elf64ppc
+ targ_extra_emuls="elf32ppc elf32ppclinux elf32ppcsim"
+ tdir_elf32ppc=`echo "${targ_alias}" | sed -e 's/64//'`
+ tdir_elf32ppclinux=$tdir_elf32ppc
+ tdir_elf32ppcsim=$tdir_elf32ppc
+ ;;
+ *) targ_emul=elf32ppc
+ targ_extra_emuls="elf32ppclinux elf32ppcsim" ;;
+ esac ;;
+powerpc-*-vxworks*)
+ targ_emul=elf32ppcvxworks
+ targ_extra_emuls="elf32ppc elf32ppclinux elf32ppcsim" ;;
powerpc-*-nto*) targ_emul=elf32ppcnto ;;
powerpcle-*-nto*) targ_emul=elf32lppcnto ;;
-powerpcle-*-rtems*) targ_emul=elf32leppc ;;
powerpc-*-rtems*) targ_emul=elf32ppc ;;
powerpc-*-macos*) targ_emul=ppcmacos ;;
powerpc-*-netware*) targ_emul=ppcnw ;;
@@ -533,39 +476,156 @@ powerpc-*-aix5*) targ_emul=aix5ppc ;;
powerpc-*-aix*) targ_emul=aixppc ;;
powerpc-*-beos*) targ_emul=aixppc ;;
powerpc-*-windiss*) targ_emul=elf32ppcwindiss ;;
+powerpc-*-lynxos*) targ_emul=ppclynx ;;
rs6000-*-aix5*) targ_emul=aix5rs6 ;;
-rs6000-*-aix*) targ_emul=aixrs6 ;;
+rs6000-*-aix*) targ_emul=aixrs6
+ ;;
+s390x-*-linux*) targ_emul=elf64_s390
+ targ_extra_emuls=elf_s390
+ targ_extra_libpath=$targ_extra_emuls
+ tdir_elf_s390=`echo ${targ_alias} | sed -e 's/s390x/s390/'` ;;
+s390x-*-tpf*) targ_emul=elf64_s390
+ tdir_elf_s390=`echo ${targ_alias} | sed -e 's/s390x/s390/'` ;;
+s390-*-linux*) targ_emul=elf_s390
+ targ64_extra_emuls=elf64_s390
+ targ64_extra_libpath=elf64_s390
+ tdir_elf64_s390=`echo ${targ_alias} | sed -e 's/s390/s390x/'`
+ ;;
+score-*-elf) targ_emul=scoreelf ;;
+sh-*-linux*) targ_emul=shlelf_linux
+ targ_extra_emuls=shelf_linux
+ targ_extra_libpath=shelf_linux ;;
+sh64eb-*-linux*) targ_emul=shelf32_linux
+ targ_extra_emuls="shlelf32_linux" ;;
+sh64-*-linux*) targ_emul=shlelf32_linux
+ targ_extra_emuls="shelf32_linux"
+ targ_extra_libpath=shelf32_linux ;;
+sh*eb-*-linux*) targ_emul=shelf_linux ;;
+sh*-*-linux*) targ_emul=shlelf_linux ;;
+sh5le-*-netbsd*) targ_emul=shlelf32_nbsd
+ targ_extra_emuls="shelf32_nbsd shelf64_nbsd shlelf64_nbsd shelf_nbsd shlelf_nbsd" ;;
+sh5-*-netbsd*) targ_emul=shelf32_nbsd
+ targ_extra_emuls="shlelf32_nbsd shelf64_nbsd shlelf64_nbsd shelf_nbsd shlelf_nbsd" ;;
+sh64le-*-netbsd*) targ_emul=shlelf64_nbsd
+ targ_extra_emuls="shelf64_nbsd shelf32_nbsd shlelf32_nbsd shelf_nbsd shlelf_nbsd" ;;
+sh64-*-netbsd*) targ_emul=shelf64_nbsd
+ targ_extra_emuls="shlelf64_nbsd shelf32_nbsd shlelf32_nbsd shelf_nbsd shlelf_nbsd" ;;
+sh*l*-*-netbsdelf*) targ_emul=shlelf_nbsd
+ targ_extra_emuls=shelf_nbsd ;;
+sh*-*-netbsdelf*) targ_emul=shelf_nbsd
+ targ_extra_emuls=shlelf_nbsd ;;
+sh*-*-symbianelf*) targ_emul=shlsymbian ;;
+shle*-*-elf* | sh[1234]*le*-*-elf | shle*-*-kaos*)
+ targ_emul=shlelf
+ targ_extra_emuls="shelf shl sh" ;;
+sh-*-rtemscoff*) targ_emul=sh; targ_extra_emuls=shl ;;
+sh-*-elf* | sh[1234]*-*-elf | sh-*-rtems* | sh-*-kaos*)
+ targ_emul=shelf
+ targ_extra_emuls="shlelf sh shl" ;;
+sh-*-uclinux* | sh[12]-*-uclinux*)
+ targ_emul=shelf_uclinux
+ targ_extra_emuls="shelf shlelf sh shl" ;;
+sh-*-vxworks) targ_emul=shelf_vxworks
+ targ_extra_emuls=shlelf_vxworks ;;
+sh-*-nto*) targ_emul=shelf_nto
+ targ_extra_emuls=shlelf_nto ;;
+sh-*-pe) targ_emul=shpe ;
+ targ_extra_ofiles="deffilep.o pe-dll.o" ;;
+sh-*-*) targ_emul=sh; targ_extra_emuls=shl ;;
+sh64le-*-elf*) targ_emul=shlelf
+ targ_extra_emuls="shelf shlelf32 shelf32 shlelf64 shelf64"
+ targ_extra_libpath=$targ_extra_emuls ;;
+sh64-*-elf*) targ_emul=shelf
+ targ_extra_emuls="shlelf shelf32 shlelf32 shelf64 shlelf64"
+ targ_extra_libpath=$targ_extra_emuls ;;
+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 ;;
+sparc*-*-coff) targ_emul=coff_sparc ;;
+sparc*-*-elf) targ_emul=elf32_sparc ;;
+sparc*-*-sysv4*) targ_emul=elf32_sparc ;;
+sparc*-*-vxworks*) targ_emul=elf32_sparc_vxworks ;;
+sparc64-*-freebsd* | sparcv9-*-freebsd* | sparc64-*-kfreebsd*-gnu | sparcv9-*-kfreebsd*-gnu)
+ targ_emul=elf64_sparc_fbsd
+ targ_extra_emuls="elf64_sparc elf32_sparc"
+ targ_extra_libpath=$targ_extra_emuls
+ tdir_elf32_sparc=`echo ${targ_alias} | sed -e 's/64//'` ;;
+sparc*-*-linux*aout*) targ_emul=sparclinux
+ targ_extra_emuls="elf32_sparc sun4"
+ tdir_elf32_sparc=`echo ${targ_alias} | sed -e 's/aout//'`
+ tdir_sun4=sparc-sun-sunos4 ;;
+sparc64-*-linux-*) targ_emul=elf64_sparc
+ targ_extra_emuls="elf32_sparc sparclinux sun4"
+ targ_extra_libpath=elf32_sparc
+ tdir_elf32_sparc=`echo ${targ_alias} | sed -e 's/64//'`
+ tdir_sparclinux=${tdir_elf32_sparc}aout
+ tdir_sun4=sparc-sun-sunos4 ;;
+sparc*-*-linux-*) targ_emul=elf32_sparc
+ targ_extra_emuls="sparclinux elf64_sparc sun4"
+ targ_extra_libpath=elf64_sparc
+ tdir_sparclinux=${targ_alias}aout
+ tdir_elf64_sparc=`echo ${targ_alias} | sed -e 's/32//'`
+ tdir_sun4=sparc-sun-sunos4 ;;
+sparc64-*-netbsd* | sparc64-*-openbsd*)
+ targ_emul=elf64_sparc
+ targ_extra_emuls="elf32_sparc" ;;
+sparc*-*-netbsd*elf*) targ_emul=elf32_sparc ;;
+sparc*-*-netbsd*) targ_emul=sparcnbsd ;;
+sparc-*-solaris2.[0-6] | sparc-*-solaris2.[0-6].*)
+ targ_emul=elf32_sparc ;;
+sparc-*-solaris2*) targ_emul=elf32_sparc
+ targ_extra_emuls="elf64_sparc"
+ targ_extra_libpath=$targ_extra_emuls
+ tdir_elf64_sparc=`echo ${targ_alias} | sed -e 's/32//'` ;;
+sparcv9-*-solaris2* | sparc64-*-solaris2*)
+ targ_emul=elf64_sparc
+ targ_extra_emuls="elf32_sparc"
+ targ_extra_libpath=$targ_extra_emuls
+ tdir_elf32_sparc=`echo ${targ_alias} | sed -e 's/64//'` ;;
+sparc*-*-solaris2*) targ_emul=elf32_sparc ;;
+sparc*-wrs-vxworks*) targ_emul=sparcaout ;;
+sparc*-*-rtems*) targ_emul=elf32_sparc
+ ;;
+spu-*-elf*) targ_emul=elf32_spu ;;
tic30-*-*aout*) targ_emul=tic30aout ;;
tic30-*-*coff*) targ_emul=tic30coff ;;
tic4x-*-* | c4x-*-*) targ_emul=tic4xcoff ; targ_extra_emuls="tic3xcoff tic3xcoff_onchip" ;;
tic54x-*-* | c54x*-*-*) targ_emul=tic54xcoff ;;
-tic80-*-*) targ_emul=tic80coff ;;
+tic80-*-*) targ_emul=tic80coff
+ ;;
v850-*-*) targ_emul=v850 ;;
v850e-*-*) targ_emul=v850 ;;
-v850ea-*-*) targ_emul=v850 ;;
-iq2000-*-elf) targ_emul=elf32iq2000 ; targ_extra_emuls="elf32iq10" ;;
-frv-*-*linux*) targ_emul=elf32frvfd ;;
-frv-*-*) targ_emul=elf32frv ; targ_extra_emuls="elf32frvfd" ;;
-w65-*-*) targ_emul=w65 ;;
-xstormy16-*-*) targ_emul=elf32xstormy16 ;;
-xtensa-*-*) targ_emul=elf32xtensa;;
-fr30-*-*) targ_emul=elf32fr30 ;;
-mcore-*-pe) targ_emul=mcorepe ;
- targ_extra_ofiles="deffilep.o pe-dll.o" ;;
-mcore-*-elf) targ_emul=elf32mcore ;;
-s390x-*-linux*) targ_emul=elf64_s390
- targ_extra_emuls=elf_s390
- targ_extra_libpath=$targ_extra_emuls
- tdir_elf_s390=`echo ${targ_alias} | sed -e 's/s390x/s390/'` ;;
-s390-*-linux*) targ_emul=elf_s390
- if test "${want64}" = "true"; then
- targ_extra_emuls=elf64_s390
- targ_extra_libpath=$targ_extra_emuls
- tdir_elf64_s390=`echo ${targ_alias} | sed -e 's/s390/s390x/'`
- fi ;;
-*-*-ieee*) targ_emul=vanilla ;;
-ip2k-*-elf) targ_emul=elf32ip2k ;;
-
+v850ea-*-*) targ_emul=v850
+ ;;
+vax-dec-ultrix* | vax-dec-bsd*) targ_emul=vax ;;
+vax-*-netbsdelf*) targ_emul=elf32vax
+ targ_extra_emuls=vaxnbsd ;;
+vax-*-netbsdaout* | vax-*-netbsd*)
+ targ_emul=vaxnbsd
+ targ_extra_emuls=elf32vax ;;
+vax-*-linux-*) targ_emul=elf32vax
+ ;;
+w65-*-*) targ_emul=w65
+ ;;
+xc16x-*-elf) targ_emul=elf32xc16x
+ targ_extra_emuls="elf32xc16xl elf32xc16xs"
+ ;;
+xstormy16-*-*) targ_emul=elf32xstormy16
+ ;;
+xtensa-*-*) targ_emul=elf32xtensa
+ ;;
+z80-*-coff) targ_emul=z80
+ ;;
+z8k-*-coff) targ_emul=z8002; targ_extra_emuls=z8001
+ ;;
+*-*-ieee*) targ_emul=vanilla
+ ;;
+*-tandem-none) targ_emul=st2000
+ ;;
*)
echo 2>&1 "*** ld does not support target ${targ}"
echo 2>&1 "*** see ld/configure.tgt for supported targets"
@@ -604,6 +664,11 @@ sparc*-*-solaris2*)
NATIVE_LIB_DIRS='/usr/local/lib /usr/ccs/lib /lib /usr/lib'
;;
+spu-*-elf*)
+ # This allows to build a pair of PPU/SPU toolchains with common sysroot.
+ NATIVE_LIB_DIRS='/usr/spu/lib'
+ ;;
+
i[03-9x]86-*-cygwin*)
NATIVE_LIB_DIRS='/usr/lib /usr/lib/w32api'
;;
diff --git a/contrib/binutils/ld/deffile.h b/contrib/binutils/ld/deffile.h
index f1e3301..6db8bf7 100644
--- a/contrib/binutils/ld/deffile.h
+++ b/contrib/binutils/ld/deffile.h
@@ -16,8 +16,8 @@
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. */
+ Software Foundation, 51 Franklin Street - Fifth Floor, Boston, MA
+ 02110-1301, USA. */
#ifndef DEFFILE_H
#define DEFFILE_H
@@ -36,7 +36,7 @@ typedef struct def_file_export {
char *internal_name; /* always set, may == name */
int ordinal; /* -1 if not specified */
int hint;
- char flag_private, flag_constant, flag_noname, flag_data;
+ char flag_private, flag_constant, flag_noname, flag_data, flag_forward;
} def_file_export;
typedef struct def_file_module {
diff --git a/contrib/binutils/ld/deffilep.y b/contrib/binutils/ld/deffilep.y
index 80cf548..80efb78 100644
--- a/contrib/binutils/ld/deffilep.y
+++ b/contrib/binutils/ld/deffilep.y
@@ -1,6 +1,6 @@
%{ /* deffilep.y - parser for .def files */
-/* Copyright 1995, 1997, 1998, 1999, 2000, 2001, 2002, 2003
+/* Copyright 1995, 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2005, 2007
Free Software Foundation, Inc.
This file is part of GNU Binutils.
@@ -17,13 +17,12 @@
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. */
+ Foundation, Inc., 51 Franklin Street - Fifth Floor, Boston, MA 02110-1301, USA. */
-#include <stdio.h>
+#include "sysdep.h"
#include "libiberty.h"
#include "safe-ctype.h"
#include "bfd.h"
-#include "sysdep.h"
#include "ld.h"
#include "ldmisc.h"
#include "deffile.h"
@@ -83,8 +82,7 @@ static void def_exports (const char *, const char *, int, int);
static void def_heapsize (int, int);
static void def_import (const char *, const char *, const char *, const char *,
int);
-static void def_library (const char *, int);
-static void def_name (const char *, int);
+static void def_image_name (const char *, int, int);
static void def_section (const char *, int);
static void def_section_alt (const char *, const char *);
static void def_stacksize (int, int);
@@ -122,8 +120,8 @@ start: start command
;
command:
- NAME opt_name opt_base { def_name ($2, $3); }
- | LIBRARY opt_name opt_base { def_library ($2, $3); }
+ NAME opt_name opt_base { def_image_name ($2, $3, 0); }
+ | LIBRARY opt_name opt_base { def_image_name ($2, $3, 1); }
| DESCRIPTION ID { def_description ($2);}
| STACKSIZE NUMBER opt_number { def_stacksize ($2, $3);}
| HEAPSIZE NUMBER opt_number { def_heapsize ($2, $3);}
@@ -647,23 +645,34 @@ def_file_add_directive (def_file *my_def, const char *param, int len)
/* Parser Callbacks. */
static void
-def_name (const char *name, int base)
+def_image_name (const char *name, int base, int is_dll)
{
- if (def->name)
- free (def->name);
- def->name = xstrdup (name);
- def->base_address = base;
- def->is_dll = 0;
-}
+ /* If a LIBRARY or NAME statement is specified without a name, there is nothing
+ to do here. We retain the output filename specified on command line. */
+ if (*name)
+ {
+ const char* image_name = lbasename (name);
+ if (image_name != name)
+ einfo ("%s:%d: Warning: path components stripped from %s, '%s'\n",
+ def_filename, linenumber, is_dll ? "LIBRARY" : "NAME",
+ name);
+ if (def->name)
+ free (def->name);
+ /* Append the default suffix, if none specified. */
+ if (strchr (image_name, '.') == 0)
+ {
+ const char * suffix = is_dll ? ".dll" : ".exe";
-static void
-def_library (const char *name, int base)
-{
- if (def->name)
- free (def->name);
- def->name = xstrdup (name);
+ def->name = xmalloc (strlen (image_name) + strlen (suffix) + 1);
+ sprintf (def->name, "%s%s", image_name, suffix);
+ }
+ else
+ def->name = xstrdup (image_name);
+ }
+
+ /* Honor a BASE address statement, even if LIBRARY string is empty. */
def->base_address = base;
- def->is_dll = 1;
+ def->is_dll = is_dll;
}
static void
diff --git a/contrib/binutils/ld/dep-in.sed b/contrib/binutils/ld/dep-in.sed
index 83418e2..0bf6ffe 100644
--- a/contrib/binutils/ld/dep-in.sed
+++ b/contrib/binutils/ld/dep-in.sed
@@ -2,6 +2,7 @@
/\\$/N
/\\$/b loop
+s! \./! !g
s!@INCDIR@!$(INCDIR)!g
s!@TOPDIR@/include!$(INCDIR)!g
s!@BFDDIR@!$(BFDDIR)!g
diff --git a/contrib/binutils/ld/emulparams/arcelf.sh b/contrib/binutils/ld/emulparams/arcelf.sh
index b1c9c17..6c524c9 100644
--- a/contrib/binutils/ld/emulparams/arcelf.sh
+++ b/contrib/binutils/ld/emulparams/arcelf.sh
@@ -1,11 +1,12 @@
SCRIPT_NAME=elf
+TEMPLATE_NAME=generic
+EXTRA_EM_FILE=genelf
OUTPUT_FORMAT="elf32-littlearc"
LITTLE_OUTPUT_FORMAT="elf32-littlearc"
BIG_OUTPUT_FORMAT="elf32-bigarc"
TEXT_START_ADDR=0x0
-MAXPAGESIZE=0x1000
+MAXPAGESIZE="CONSTANT (MAXPAGESIZE)"
NONPAGED_TEXT_START_ADDR=0x0
ARCH=arc
MACHINE=
ENTRY=start
-#TEMPLATE_NAME=elf32
diff --git a/contrib/binutils/ld/emulparams/arm_wince_pe.sh b/contrib/binutils/ld/emulparams/arm_wince_pe.sh
new file mode 100644
index 0000000..2d0019f
--- /dev/null
+++ b/contrib/binutils/ld/emulparams/arm_wince_pe.sh
@@ -0,0 +1,14 @@
+ARCH=arm
+SCRIPT_NAME=pe
+
+OUTPUT_FORMAT="pei-arm-wince-little"
+LITTLE_OUTPUT_FORMAT="pei-arm-wince-little"
+BIG_OUTPUT_FORMAT="pei-arm-wince-big"
+
+RELOCATEABLE_OUTPUT_FORMAT="pe-arm-wince-little"
+
+TEMPLATE_NAME=pe
+ENTRY="WinMainCRTStartup"
+SUBSYSTEM=PE_DEF_SUBSYSTEM
+INITIAL_SYMBOL_CHAR=\"\"
+TARGET_PAGE_SIZE=0x1000
diff --git a/contrib/binutils/ld/emulparams/armelf.sh b/contrib/binutils/ld/emulparams/armelf.sh
index 35a6d23..ba9fdbe 100644
--- a/contrib/binutils/ld/emulparams/armelf.sh
+++ b/contrib/binutils/ld/emulparams/armelf.sh
@@ -6,10 +6,17 @@ LITTLE_OUTPUT_FORMAT="elf32-littlearm"
TEXT_START_ADDR=0x8000
TEMPLATE_NAME=elf32
EXTRA_EM_FILE=armelf
-OTHER_TEXT_SECTIONS='*(.glue_7t) *(.glue_7)'
+OTHER_TEXT_SECTIONS='*(.glue_7t) *(.glue_7) *(.vfp11_veneer)'
OTHER_BSS_SYMBOLS='__bss_start__ = .;'
-OTHER_BSS_END_SYMBOLS='_bss_end__ = . ; __bss_end__ = . ; __end__ = . ;'
+OTHER_BSS_END_SYMBOLS='_bss_end__ = . ; __bss_end__ = . ;'
+OTHER_END_SYMBOLS='__end__ = . ;'
OTHER_SECTIONS='.note.gnu.arm.ident 0 : { KEEP (*(.note.gnu.arm.ident)) }'
+ATTRS_SECTIONS='.ARM.attributes 0 : { KEEP (*(.ARM.attributes)) KEEP (*(.gnu.attributes)) }'
+OTHER_READONLY_SECTIONS="
+ .ARM.extab ${RELOCATING-0} : { *(.ARM.extab${RELOCATING+* .gnu.linkonce.armextab.*}) }
+ ${RELOCATING+ __exidx_start = .; }
+ .ARM.exidx ${RELOCATING-0} : { *(.ARM.exidx${RELOCATING+* .gnu.linkonce.armexidx.*}) }
+ ${RELOCATING+ __exidx_end = .; }"
DATA_START_SYMBOLS='__data_start = . ;';
@@ -17,7 +24,7 @@ GENERATE_SHLIB_SCRIPT=yes
ARCH=arm
MACHINE=
-MAXPAGESIZE=256
+MAXPAGESIZE="CONSTANT (MAXPAGESIZE)"
ENTRY=_start
EMBEDDED=yes
diff --git a/contrib/binutils/ld/emulparams/armelf_fbsd.sh b/contrib/binutils/ld/emulparams/armelf_fbsd.sh
index 52da345..ee9520d 100644
--- a/contrib/binutils/ld/emulparams/armelf_fbsd.sh
+++ b/contrib/binutils/ld/emulparams/armelf_fbsd.sh
@@ -1,2 +1,3 @@
. ${srcdir}/emulparams/armelf.sh
. ${srcdir}/emulparams/elf_fbsd.sh
+TARGET2_TYPE=got-rel
diff --git a/contrib/binutils/ld/emulparams/armelf_linux.sh b/contrib/binutils/ld/emulparams/armelf_linux.sh
index 88a2d19..e7f301f 100644
--- a/contrib/binutils/ld/emulparams/armelf_linux.sh
+++ b/contrib/binutils/ld/emulparams/armelf_linux.sh
@@ -3,19 +3,22 @@ SCRIPT_NAME=elf
OUTPUT_FORMAT="elf32-littlearm"
BIG_OUTPUT_FORMAT="elf32-bigarm"
LITTLE_OUTPUT_FORMAT="elf32-littlearm"
-MAXPAGESIZE=0x8000
-COMMONPAGESIZE=0x1000
+MAXPAGESIZE="CONSTANT (MAXPAGESIZE)"
+COMMONPAGESIZE="CONSTANT (COMMONPAGESIZE)"
TEMPLATE_NAME=elf32
EXTRA_EM_FILE=armelf
GENERATE_SHLIB_SCRIPT=yes
+GENERATE_PIE_SCRIPT=yes
DATA_START_SYMBOLS='__data_start = . ;';
-OTHER_TEXT_SECTIONS='*(.glue_7t) *(.glue_7)'
+OTHER_TEXT_SECTIONS='*(.glue_7t) *(.glue_7) *(.vfp11_veneer)'
OTHER_BSS_SYMBOLS='__bss_start__ = .;'
-OTHER_BSS_END_SYMBOLS='_bss_end__ = . ; __bss_end__ = . ; __end__ = . ;'
+OTHER_BSS_END_SYMBOLS='_bss_end__ = . ; __bss_end__ = . ;'
+OTHER_END_SYMBOLS='__end__ = . ;'
OTHER_SECTIONS='.note.gnu.arm.ident 0 : { KEEP (*(.note.gnu.arm.ident)) }'
TEXT_START_ADDR=0x00008000
+TARGET2_TYPE=got-rel
# ARM does not support .s* sections.
NO_SMALL_DATA=yes
diff --git a/contrib/binutils/ld/emulparams/armelf_nbsd.sh b/contrib/binutils/ld/emulparams/armelf_nbsd.sh
index 571483c..517cd62 100644
--- a/contrib/binutils/ld/emulparams/armelf_nbsd.sh
+++ b/contrib/binutils/ld/emulparams/armelf_nbsd.sh
@@ -1,6 +1,7 @@
. ${srcdir}/emulparams/armelf.sh
-MAXPAGESIZE=0x8000
+MAXPAGESIZE="CONSTANT (MAXPAGESIZE)"
TEXT_START_ADDR=0x00008000
+TARGET2_TYPE=got-rel
unset STACK_ADDR
unset EMBEDDED
diff --git a/contrib/binutils/ld/emulparams/armelf_oabi.sh b/contrib/binutils/ld/emulparams/armelf_oabi.sh
deleted file mode 100644
index 0c2c1d3..0000000
--- a/contrib/binutils/ld/emulparams/armelf_oabi.sh
+++ /dev/null
@@ -1,23 +0,0 @@
-MACHINE=
-SCRIPT_NAME=elf
-OUTPUT_FORMAT="elf32-littlearm-oabi"
-BIG_OUTPUT_FORMAT="elf32-bigarm-oabi"
-LITTLE_OUTPUT_FORMAT="elf32-littlearm-oabi"
-TEXT_START_ADDR=0x8000
-TEMPLATE_NAME=armelf_oabi
-OTHER_TEXT_SECTIONS='*(.glue_7t) *(.glue_7)'
-OTHER_BSS_SYMBOLS='__bss_start__ = .;'
-OTHER_BSS_END_SYMBOLS='_bss_end__ = . ; __bss_end__ = . ;'
-
-
-ARCH=arm
-MACHINE=
-MAXPAGESIZE=256
-ENTRY=_start
-EMBEDDED=yes
-
-# This sets the stack to the top of the simulator memory (2^19 bytes).
-STACK_ADDR=0x80000
-
-# ARM does not support .s* sections.
-NO_SMALL_DATA=yes
diff --git a/contrib/binutils/ld/emulparams/armpe.sh b/contrib/binutils/ld/emulparams/armpe.sh
index aa60536..5db5faf 100644
--- a/contrib/binutils/ld/emulparams/armpe.sh
+++ b/contrib/binutils/ld/emulparams/armpe.sh
@@ -11,3 +11,5 @@ TEMPLATE_NAME=pe
ENTRY="_mainCRTStartup"
SUBSYSTEM=PE_DEF_SUBSYSTEM
INITIAL_SYMBOL_CHAR=\"_\"
+
+TARGET_PAGE_SIZE=0x1000
diff --git a/contrib/binutils/ld/emulparams/avr6.sh b/contrib/binutils/ld/emulparams/avr6.sh
new file mode 100644
index 0000000..5326488
--- /dev/null
+++ b/contrib/binutils/ld/emulparams/avr6.sh
@@ -0,0 +1,11 @@
+ARCH=avr:6
+MACHINE=
+SCRIPT_NAME=avr
+OUTPUT_FORMAT="elf32-avr"
+MAXPAGESIZE=1
+EMBEDDED=yes
+TEMPLATE_NAME=elf32
+
+TEXT_LENGTH=1024K
+DATA_LENGTH=0xffa0
+EXTRA_EM_FILE=avrelf
diff --git a/contrib/binutils/ld/emulparams/elf32_sparc.sh b/contrib/binutils/ld/emulparams/elf32_sparc.sh
index af23252..d09d9dc 100644
--- a/contrib/binutils/ld/emulparams/elf32_sparc.sh
+++ b/contrib/binutils/ld/emulparams/elf32_sparc.sh
@@ -1,8 +1,11 @@
+# If you change this file, please also look at files which source this one:
+# elf32_sparc_vxworks.sh
+
SCRIPT_NAME=elf
OUTPUT_FORMAT="elf32-sparc"
TEXT_START_ADDR=0x10000
-MAXPAGESIZE=0x10000
-COMMONPAGESIZE=0x2000
+MAXPAGESIZE="CONSTANT (MAXPAGESIZE)"
+COMMONPAGESIZE="CONSTANT (COMMONPAGESIZE)"
NONPAGED_TEXT_START_ADDR=0x10000
ALIGNMENT=8
ARCH=sparc
diff --git a/contrib/binutils/ld/emulparams/elf32_spu.sh b/contrib/binutils/ld/emulparams/elf32_spu.sh
new file mode 100644
index 0000000..4af608c
--- /dev/null
+++ b/contrib/binutils/ld/emulparams/elf32_spu.sh
@@ -0,0 +1,20 @@
+SCRIPT_NAME=elf
+TEMPLATE_NAME=elf32
+EXTRA_EM_FILE=spuelf
+OUTPUT_FORMAT="elf32-spu"
+ARCH=spu
+MACHINE=
+ALIGNMENT=16
+TEXT_START_ADDR=0
+INITIAL_READONLY_SECTIONS='.interrupt : { KEEP(*(.interrupt)) }'
+if test -z "${CREATE_SHLIB}"; then
+ INITIAL_READONLY_SECTIONS="${INITIAL_READONLY_SECTIONS}
+ .interp ${RELOCATING-0} : { *(.interp) }"
+fi
+OTHER_END_SYMBOLS='PROVIDE (__stack = 0x3fff0);'
+NO_SMALL_DATA=true
+EMBEDDED=true
+MAXPAGESIZE=0x80
+DATA_ADDR="ALIGN(${MAXPAGESIZE})"
+OTHER_BSS_SECTIONS=".toe ALIGN(128) : { *(.toe) } = 0"
+OTHER_SECTIONS=".note.spu_name 0 : { KEEP(*(.note.spu_name)) }"
diff --git a/contrib/binutils/ld/emulparams/elf32bmip.sh b/contrib/binutils/ld/emulparams/elf32bmip.sh
index 94e1c9c..ce33674 100644
--- a/contrib/binutils/ld/emulparams/elf32bmip.sh
+++ b/contrib/binutils/ld/emulparams/elf32bmip.sh
@@ -1,5 +1,6 @@
# If you change this file, please also look at files which source this one:
# elf32b4300.sh elf32bsmip.sh elf32btsmip.sh elf32ebmip.sh elf32lmip.sh
+# elf32ebmipvxworks.sh elf32elmipvxworks.sh
SCRIPT_NAME=elf
OUTPUT_FORMAT="elf32-bigmips"
@@ -7,16 +8,32 @@ BIG_OUTPUT_FORMAT="elf32-bigmips"
LITTLE_OUTPUT_FORMAT="elf32-littlemips"
TEXT_START_ADDR=0x0400000
test -n "${EMBEDDED}" || DATA_ADDR=0x10000000
-MAXPAGESIZE=0x40000
-COMMONPAGESIZE=0x1000
+MAXPAGESIZE="CONSTANT (MAXPAGESIZE)"
+COMMONPAGESIZE="CONSTANT (COMMONPAGESIZE)"
NONPAGED_TEXT_START_ADDR=0x0400000
SHLIB_TEXT_START_ADDR=0x5ffe0000
-test -n "${EMBEDDED}" || TEXT_DYNAMIC=
-INITIAL_READONLY_SECTIONS="
+TEXT_DYNAMIC=
+INITIAL_READONLY_SECTIONS=
+if test -z "${CREATE_SHLIB}"; then
+ INITIAL_READONLY_SECTIONS=".interp ${RELOCATING-0} : { *(.interp) }"
+fi
+INITIAL_READONLY_SECTIONS="${INITIAL_READONLY_SECTIONS}
.reginfo ${RELOCATING-0} : { *(.reginfo) }
"
OTHER_TEXT_SECTIONS='*(.mips16.fn.*) *(.mips16.call.*)'
+# Unlike most targets, the MIPS backend puts all dynamic relocations
+# in a single dynobj section, which it also calls ".rel.dyn". It does
+# this so that it can easily sort all dynamic relocations before the
+# output section has been populated.
+OTHER_GOT_RELOC_SECTIONS="
+ .rel.dyn ${RELOCATING-0} : { *(.rel.dyn) }
+"
+# If the output has a GOT section, there must be exactly 0x7ff0 bytes
+# between .got and _gp. The ". = ." below stops the orphan code from
+# inserting other sections between the assignment to _gp and the start
+# of .got.
OTHER_GOT_SYMBOLS='
+ . = .;
_gp = ALIGN(16) + 0x7ff0;
'
OTHER_SDATA_SECTIONS="
@@ -29,9 +46,18 @@ OTHER_BSS_SYMBOLS='_fbss = .;'
OTHER_SECTIONS='
.gptab.sdata : { *(.gptab.data) *(.gptab.sdata) }
.gptab.sbss : { *(.gptab.bss) *(.gptab.sbss) }
+ .mdebug.abi32 : { KEEP(*(.mdebug.abi32)) }
+ .mdebug.abiN32 : { KEEP(*(.mdebug.abiN32)) }
+ .mdebug.abi64 : { KEEP(*(.mdebug.abi64)) }
+ .mdebug.abiO64 : { KEEP(*(.mdebug.abiO64)) }
+ .mdebug.eabi32 : { KEEP(*(.mdebug.eabi32)) }
+ .mdebug.eabi64 : { KEEP(*(.mdebug.eabi64)) }
+ .gcc_compiled_long32 : { KEEP(*(.gcc_compiled_long32)) }
+ .gcc_compiled_long64 : { KEEP(*(.gcc_compiled_long64)) }
'
ARCH=mips
MACHINE=
TEMPLATE_NAME=elf32
EXTRA_EM_FILE=mipself
GENERATE_SHLIB_SCRIPT=yes
+GENERATE_PIE_SCRIPT=yes
diff --git a/contrib/binutils/ld/emulparams/elf32bmipn32-defs.sh b/contrib/binutils/ld/emulparams/elf32bmipn32-defs.sh
index f7b0d08..49d2f85 100644
--- a/contrib/binutils/ld/emulparams/elf32bmipn32-defs.sh
+++ b/contrib/binutils/ld/emulparams/elf32bmipn32-defs.sh
@@ -11,6 +11,7 @@ BIG_OUTPUT_FORMAT="elf32-bigmips"
LITTLE_OUTPUT_FORMAT="elf32-littlemips"
TEMPLATE_NAME=elf32
+EXTRA_EM_FILE=mipself
case "$EMULATION_NAME" in
elf32*n32*) ELFSIZE=32 ;;
@@ -30,13 +31,26 @@ fi
LIBPATH_SUFFIX=$ELFSIZE
GENERATE_SHLIB_SCRIPT=yes
+GENERATE_PIE_SCRIPT=yes
TEXT_START_ADDR=0x10000000
-MAXPAGESIZE=0x100000
+MAXPAGESIZE="CONSTANT (MAXPAGESIZE)"
ENTRY=__start
+# Unlike most targets, the MIPS backend puts all dynamic relocations
+# in a single dynobj section, which it also calls ".rel.dyn". It does
+# this so that it can easily sort all dynamic relocations before the
+# output section has been populated.
+OTHER_GOT_RELOC_SECTIONS="
+ .rel.dyn ${RELOCATING-0} : { *(.rel.dyn) }
+"
# GOT-related settings.
+# If the output has a GOT section, there must be exactly 0x7ff0 bytes
+# between .got and _gp. The ". = ." below stops the orphan code from
+# inserting other sections between the assignment to _gp and the start
+# of .got.
OTHER_GOT_SYMBOLS='
+ . = .;
_gp = ALIGN(16) + 0x7ff0;
'
OTHER_SDATA_SECTIONS="
@@ -50,7 +64,12 @@ TEXT_START_SYMBOLS='_ftext = . ;'
DATA_START_SYMBOLS='_fdata = . ;'
OTHER_BSS_SYMBOLS='_fbss = .;'
-INITIAL_READONLY_SECTIONS=".MIPS.options : { *(.MIPS.options) }"
+INITIAL_READONLY_SECTIONS=
+if test -z "${CREATE_SHLIB}"; then
+ INITIAL_READONLY_SECTIONS=".interp ${RELOCATING-0} : { *(.interp) }"
+fi
+INITIAL_READONLY_SECTIONS="${INITIAL_READONLY_SECTIONS}
+ .reginfo ${RELOCATING-0} : { *(.reginfo) }"
# Discard any .MIPS.content* or .MIPS.events* sections. The linker
# doesn't know how to adjust them.
OTHER_SECTIONS="/DISCARD/ : { *(.MIPS.content*) *(.MIPS.events*) }"
diff --git a/contrib/binutils/ld/emulparams/elf32bmipn32.sh b/contrib/binutils/ld/emulparams/elf32bmipn32.sh
index a320eb2..c26b6b3 100755
--- a/contrib/binutils/ld/emulparams/elf32bmipn32.sh
+++ b/contrib/binutils/ld/emulparams/elf32bmipn32.sh
@@ -3,7 +3,7 @@ OUTPUT_FORMAT="elf32-nbigmips"
BIG_OUTPUT_FORMAT="elf32-nbigmips"
LITTLE_OUTPUT_FORMAT="elf32-nlittlemips"
SHLIB_TEXT_START_ADDR=0x5ffe0000
-COMMONPAGESIZE=0x1000
+COMMONPAGESIZE="CONSTANT (COMMONPAGESIZE)"
# IRIX6 defines these symbols. 0x34 is the size of the ELF header.
EXECUTABLE_SYMBOLS="
diff --git a/contrib/binutils/ld/emulparams/elf32btsmip.sh b/contrib/binutils/ld/emulparams/elf32btsmip.sh
index 4c5a9ab..e29e045 100644
--- a/contrib/binutils/ld/emulparams/elf32btsmip.sh
+++ b/contrib/binutils/ld/emulparams/elf32btsmip.sh
@@ -5,5 +5,6 @@
OUTPUT_FORMAT="elf32-tradbigmips"
BIG_OUTPUT_FORMAT="elf32-tradbigmips"
LITTLE_OUTPUT_FORMAT="elf32-tradlittlemips"
+unset DATA_ADDR
SHLIB_TEXT_START_ADDR=0
ENTRY=__start
diff --git a/contrib/binutils/ld/emulparams/elf32btsmipn32.sh b/contrib/binutils/ld/emulparams/elf32btsmipn32.sh
index 5ca6797..10c5565 100644
--- a/contrib/binutils/ld/emulparams/elf32btsmipn32.sh
+++ b/contrib/binutils/ld/emulparams/elf32btsmipn32.sh
@@ -5,7 +5,7 @@
OUTPUT_FORMAT="elf32-ntradbigmips"
BIG_OUTPUT_FORMAT="elf32-ntradbigmips"
LITTLE_OUTPUT_FORMAT="elf32-ntradlittlemips"
-COMMONPAGESIZE=0x1000
+COMMONPAGESIZE="CONSTANT (COMMONPAGESIZE)"
# Magic sections.
OTHER_TEXT_SECTIONS='*(.mips16.fn.*) *(.mips16.call.*)'
diff --git a/contrib/binutils/ld/emulparams/elf32cr16.sh b/contrib/binutils/ld/emulparams/elf32cr16.sh
new file mode 100644
index 0000000..756d02b
--- /dev/null
+++ b/contrib/binutils/ld/emulparams/elf32cr16.sh
@@ -0,0 +1,6 @@
+SCRIPT_NAME=elf32cr16
+TEMPLATE_NAME=elf32
+OUTPUT_FORMAT="elf32-cr16"
+ARCH=cr16
+ENTRY=_start
+EXTRA_EM_FILE=cr16elf
diff --git a/contrib/binutils/ld/emulparams/elf32mep.sh b/contrib/binutils/ld/emulparams/elf32mep.sh
new file mode 100755
index 0000000..886ca47
--- /dev/null
+++ b/contrib/binutils/ld/emulparams/elf32mep.sh
@@ -0,0 +1,55 @@
+MACHINE=
+SCRIPT_NAME=mep
+OUTPUT_FORMAT="elf32-mep"
+TEXT_START_ADDR=0x1000
+ARCH=mep
+MAXPAGESIZE=256
+ENTRY=_start
+EMBEDDED=yes
+TEMPLATE_NAME=elf32
+DATA_START_SYMBOLS='__data_start = . ;'
+OTHER_GOT_SYMBOLS='
+ . = ALIGN(4);
+ __sdabase = . + 0x8000;
+ .srodata : { *(.srodata) *(.srodata.*) *(.gnu.linkonce.srd.*) }
+'
+OTHER_SDATA_SECTIONS='
+ PROVIDE (__sdabase = .);
+ __assert_tiny_size = ASSERT ((. < __sdabase) || ((. - __sdabase) <= 0x8000),
+ "tiny section overflow");
+'
+OTHER_READONLY_SECTIONS='
+ __stack = 0x001ffff0;
+ __stack_size = 0x100000;
+ __stack0 = (__stack - (0 * (__stack_size / 1)) + 15) / 16 * 16;
+
+ .rostacktab :
+ {
+ /* Emit a table describing the location of the different stacks.
+ Only 1 processor in the default configuration. */
+ . = ALIGN(4);
+ __stack_table = .;
+ LONG (__stack0);
+ }
+'
+OTHER_END_SYMBOLS='
+ PROVIDE (__heap = _end);
+ PROVIDE (__heap_end = 0);
+'
+OTHER_TEXT_SECTIONS='
+ *(.ftext) *(.ftext.*) *(.gnu.linkonce.ft.*)
+ . = ALIGN(8);
+ *(.vftext) *(.vftext.*) *(.gnu.linkonce.vf.*)
+ *(.frodata) *(.frodata.*) *(.gnu.linkonce.frd.*)
+'
+OTHER_READWRITE_SECTIONS='
+ . = ALIGN(4);
+ __tpbase = .;
+ .based : { *(.based) *(.based.*) *(.gnu.linkonce.based.*) }
+ __assert_based_size = ASSERT ((. - __tpbase) <= 0x80, "based section overflow");
+ .far : { *(.far) *(.far.*) *(.gnu.linkonce.far.*) }
+'
+OTHER_BSS_SECTIONS='
+ __assert_near_size = ASSERT (. <= 0x1000000, "near section overflow");
+ .farbss : { PROVIDE (__farbss_start = .); *(.farbss) *(.farbss.*) PROVIDE (__farbss_end = .); }
+'
diff --git a/contrib/binutils/ld/emulparams/elf32ppc.sh b/contrib/binutils/ld/emulparams/elf32ppc.sh
index d95cb786..68962d7 100644
--- a/contrib/binutils/ld/emulparams/elf32ppc.sh
+++ b/contrib/binutils/ld/emulparams/elf32ppc.sh
@@ -1,41 +1,16 @@
# If you change this file, please also look at files which source this one:
-# elf32lppc.sh elf32ppclinux.sh elf32ppcsim.sh
+# elf32lppcnto.sh elf32lppc.sh elf32ppclinux.sh elf32ppcnto.sh
+# elf32ppcsim.sh
-TEMPLATE_NAME=elf32
-EXTRA_EM_FILE=ppc32elf
-GENERATE_SHLIB_SCRIPT=yes
-GENERATE_PIE_SCRIPT=yes
-SCRIPT_NAME=elf
-OUTPUT_FORMAT="elf32-powerpc"
-TEXT_START_ADDR=0x01800000
-MAXPAGESIZE=0x10000
-COMMONPAGESIZE=0x1000
-ARCH=powerpc:common
-MACHINE=
+. ${srcdir}/emulparams/elf32ppccommon.sh
+# Yes, we want duplicate .got and .plt sections. The linker chooses the
+# appropriate one magically in ppc_after_open
+DATA_GOT=
+SDATA_GOT=
+SEPARATE_GOTPLT=0
BSS_PLT=
-EXECUTABLE_SYMBOLS='PROVIDE (__stack = 0); PROVIDE (___stack = 0);'
-OTHER_BSS_END_SYMBOLS='__end = .;'
-OTHER_READWRITE_SECTIONS="
- .fixup ${RELOCATING-0} : { *(.fixup) }
- .got1 ${RELOCATING-0} : { *(.got1) }
- .got2 ${RELOCATING-0} : { *(.got2) }
-"
-OTHER_GOT_RELOC_SECTIONS="
- .rela.got1 ${RELOCATING-0} : { *(.rela.got1) }
- .rela.got2 ${RELOCATING-0} : { *(.rela.got2) }
-"
-
-# Treat a host that matches the target with the possible exception of "64"
-# in the name as if it were native.
-if test `echo "$host" | sed -e s/64//` = `echo "$target" | sed -e s/64//`; then
- case " $EMULATION_LIBPATH " in
- *" ${EMULATION_NAME} "*)
- NATIVE=yes
- ;;
- esac
-fi
-
-# Look for 64 bit target libraries in /lib64, /usr/lib64 etc., first.
-case "$EMULATION_NAME" in
- *64*) LIBPATH_SUFFIX=64 ;;
-esac
+GOT=".got ${RELOCATING-0} : SPECIAL { *(.got) }"
+PLT=".plt ${RELOCATING-0} : SPECIAL { *(.plt) }"
+GOTPLT="${PLT}"
+OTHER_TEXT_SECTIONS="*(.glink)"
+EXTRA_EM_FILE=ppc32elf
diff --git a/contrib/binutils/ld/emulparams/elf32ppccommon.sh b/contrib/binutils/ld/emulparams/elf32ppccommon.sh
new file mode 100644
index 0000000..1a12890
--- /dev/null
+++ b/contrib/binutils/ld/emulparams/elf32ppccommon.sh
@@ -0,0 +1,49 @@
+# The PLT-agnostic parts of a generic 32-bit ELF PowerPC target. Included by:
+# elf32ppc.sh elf32ppcvxworks.sh
+TEMPLATE_NAME=elf32
+GENERATE_SHLIB_SCRIPT=yes
+GENERATE_PIE_SCRIPT=yes
+SCRIPT_NAME=elf
+OUTPUT_FORMAT="elf32-powerpc"
+TEXT_START_ADDR=0x01800000
+MAXPAGESIZE="CONSTANT (MAXPAGESIZE)"
+COMMONPAGESIZE="CONSTANT (COMMONPAGESIZE)"
+ARCH=powerpc:common
+MACHINE=
+EXECUTABLE_SYMBOLS='PROVIDE (__stack = 0); PROVIDE (___stack = 0);'
+if test -z "${CREATE_SHLIB}"; then
+ SDATA_START_SYMBOLS="PROVIDE (_SDA_BASE_ = 32768);"
+ SDATA2_START_SYMBOLS="PROVIDE (_SDA2_BASE_ = 32768);"
+ SBSS_START_SYMBOLS="PROVIDE (__sbss_start = .); PROVIDE (___sbss_start = .);"
+ SBSS_END_SYMBOLS="PROVIDE (__sbss_end = .); PROVIDE (___sbss_end = .);"
+else
+ unset SDATA_START_SYMBOLS
+ unset SDATA2_START_SYMBOLS
+ unset SBSS_START_SYMBOLS
+ unset SBSS_END_SYMBOLS
+fi
+OTHER_END_SYMBOLS="__end = .;"
+OTHER_RELRO_SECTIONS="
+ .fixup ${RELOCATING-0} : { *(.fixup) }
+ .got1 ${RELOCATING-0} : { *(.got1) }
+ .got2 ${RELOCATING-0} : { *(.got2) }
+"
+OTHER_GOT_RELOC_SECTIONS="
+ .rela.got1 ${RELOCATING-0} : { *(.rela.got1) }
+ .rela.got2 ${RELOCATING-0} : { *(.rela.got2) }
+"
+
+# Treat a host that matches the target with the possible exception of "64"
+# in the name as if it were native.
+if test `echo "$host" | sed -e s/64//` = `echo "$target" | sed -e s/64//`; then
+ case " $EMULATION_LIBPATH " in
+ *" ${EMULATION_NAME} "*)
+ NATIVE=yes
+ ;;
+ esac
+fi
+
+# Look for 64 bit target libraries in /lib64, /usr/lib64 etc., first.
+case "$EMULATION_NAME" in
+ *64*) LIBPATH_SUFFIX=64 ;;
+esac
diff --git a/contrib/binutils/ld/emulparams/elf32ppclinux.sh b/contrib/binutils/ld/emulparams/elf32ppclinux.sh
index 5ced00d..262731a 100644
--- a/contrib/binutils/ld/emulparams/elf32ppclinux.sh
+++ b/contrib/binutils/ld/emulparams/elf32ppclinux.sh
@@ -1,8 +1,8 @@
. ${srcdir}/emulparams/elf32ppc.sh
TEXT_START_ADDR=0x10000000
unset EXECUTABLE_SYMBOLS
-unset OTHER_BSS_END_SYMBOLS
+unset OTHER_END_SYMBOLS
test -z "${RELOCATING}" || OTHER_SECTIONS="/DISCARD/ : { *(.fixup) }"
-OTHER_READWRITE_SECTIONS="
+OTHER_RELRO_SECTIONS="
.got1 ${RELOCATING-0} : { *(.got1) }
.got2 ${RELOCATING-0} : { *(.got2) }"
diff --git a/contrib/binutils/ld/emulparams/elf64_ia64.sh b/contrib/binutils/ld/emulparams/elf64_ia64.sh
index 60c8c4c..7e5e54d 100644
--- a/contrib/binutils/ld/emulparams/elf64_ia64.sh
+++ b/contrib/binutils/ld/emulparams/elf64_ia64.sh
@@ -6,12 +6,12 @@ EXTRA_EM_FILE=ia64elf
OUTPUT_FORMAT="elf64-ia64-little"
ARCH=ia64
MACHINE=
-MAXPAGESIZE=0x10000
+MAXPAGESIZE="CONSTANT (MAXPAGESIZE)"
# FIXME: It interferes with linker relaxation. Disable it until it is
# fixed.
if test "0" = "1" -a -n "$CREATE_SHLIB"; then
# Optimize shared libraries for 16K page size
- COMMONPAGESIZE=0x4000
+ COMMONPAGESIZE="CONSTANT (COMMONPAGESIZE)"
fi
TEXT_START_ADDR="0x4000000000000000"
DATA_ADDR="0x6000000000000000 + (. & (${MAXPAGESIZE} - 1))"
@@ -33,3 +33,7 @@ test -n "$CREATE_PIE" && OTHER_GOT_RELOC_SECTIONS="
OTHER_READONLY_SECTIONS="${OTHER_READONLY_SECTIONS}
.IA_64.unwind_info ${RELOCATING-0} : { *(.IA_64.unwind_info${RELOCATING+* .gnu.linkonce.ia64unwi.*}) }
.IA_64.unwind ${RELOCATING-0} : { *(.IA_64.unwind${RELOCATING+* .gnu.linkonce.ia64unw.*}) }"
+# Intel C++ compiler, prior to 9.0, puts small data in .ctors and
+# .dtors. They have to be next to .sbss/.sbss2/.sdata/.sdata2.
+SMALL_DATA_CTOR=" "
+SMALL_DATA_DTOR=" "
diff --git a/contrib/binutils/ld/emulparams/elf64_ia64_fbsd.sh b/contrib/binutils/ld/emulparams/elf64_ia64_fbsd.sh
index 47cde5c..a7e2675 100644
--- a/contrib/binutils/ld/emulparams/elf64_ia64_fbsd.sh
+++ b/contrib/binutils/ld/emulparams/elf64_ia64_fbsd.sh
@@ -1,4 +1,7 @@
. ${srcdir}/emulparams/elf64_ia64.sh
TEXT_START_ADDR="0x2000000000000000"
unset DATA_ADDR
+unset SMALL_DATA_CTOR
+unset SMALL_DATA_DTOR
. ${srcdir}/emulparams/elf_fbsd.sh
+OUTPUT_FORMAT="elf64-ia64-freebsd"
diff --git a/contrib/binutils/ld/emulparams/elf64_s390.sh b/contrib/binutils/ld/emulparams/elf64_s390.sh
index 0c689a9..a26bbb6 100644
--- a/contrib/binutils/ld/emulparams/elf64_s390.sh
+++ b/contrib/binutils/ld/emulparams/elf64_s390.sh
@@ -2,7 +2,8 @@ SCRIPT_NAME=elf
ELFSIZE=64
OUTPUT_FORMAT="elf64-s390"
TEXT_START_ADDR=0x80000000
-MAXPAGESIZE=0x1000
+MAXPAGESIZE="CONSTANT (MAXPAGESIZE)"
+COMMONPAGESIZE="CONSTANT (COMMONPAGESIZE)"
NONPAGED_TEXT_START_ADDR=0x80000000
ARCH="s390:64-bit"
MACHINE=
diff --git a/contrib/binutils/ld/emulparams/elf64_sparc.sh b/contrib/binutils/ld/emulparams/elf64_sparc.sh
index 0c0f5d8..cef4bff 100644
--- a/contrib/binutils/ld/emulparams/elf64_sparc.sh
+++ b/contrib/binutils/ld/emulparams/elf64_sparc.sh
@@ -2,8 +2,8 @@ SCRIPT_NAME=elf
ELFSIZE=64
TEMPLATE_NAME=elf32
OUTPUT_FORMAT="elf64-sparc"
-MAXPAGESIZE=0x100000
-COMMONPAGESIZE=0x2000
+MAXPAGESIZE="CONSTANT (MAXPAGESIZE)"
+COMMONPAGESIZE="CONSTANT (COMMONPAGESIZE)"
ARCH="sparc:v9"
MACHINE=
DATA_PLT=
diff --git a/contrib/binutils/ld/emulparams/elf64_sparc_fbsd.sh b/contrib/binutils/ld/emulparams/elf64_sparc_fbsd.sh
index 232a321..21d13ab 100644
--- a/contrib/binutils/ld/emulparams/elf64_sparc_fbsd.sh
+++ b/contrib/binutils/ld/emulparams/elf64_sparc_fbsd.sh
@@ -1,2 +1,4 @@
. ${srcdir}/emulparams/elf64_sparc.sh
. ${srcdir}/emulparams/elf_fbsd.sh
+
+OUTPUT_FORMAT="elf64-sparc-freebsd"
diff --git a/contrib/binutils/ld/emulparams/elf64alpha.sh b/contrib/binutils/ld/emulparams/elf64alpha.sh
index 093c8df..2c3b7d4 100644
--- a/contrib/binutils/ld/emulparams/elf64alpha.sh
+++ b/contrib/binutils/ld/emulparams/elf64alpha.sh
@@ -5,14 +5,20 @@ TEMPLATE_NAME=elf32
EXTRA_EM_FILE=alphaelf
OUTPUT_FORMAT="elf64-alpha"
TEXT_START_ADDR="0x120000000"
-MAXPAGESIZE=0x10000
-COMMONPAGESIZE=0x2000
+MAXPAGESIZE="CONSTANT (MAXPAGESIZE)"
+COMMONPAGESIZE="CONSTANT (COMMONPAGESIZE)"
NONPAGED_TEXT_START_ADDR="0x120000000"
ARCH=alpha
MACHINE=
GENERATE_SHLIB_SCRIPT=yes
GENERATE_PIE_SCRIPT=yes
-DATA_PLT=
+
+# Yes, we want duplicate .plt sections. The linker chooses the
+# appropriate one magically in alpha_after_open.
+PLT=".plt ${RELOCATING-0} : SPECIAL { *(.plt) }"
+DATA_PLT=yes
+TEXT_PLT=yes
+
# Note that the number is always big-endian, thus we have to
# reverse the digit string.
NOP=0x0000fe2f1f04ff47 # unop; nop
diff --git a/contrib/binutils/ld/emulparams/elf64bmip-defs.sh b/contrib/binutils/ld/emulparams/elf64bmip-defs.sh
new file mode 100644
index 0000000..110f892
--- /dev/null
+++ b/contrib/binutils/ld/emulparams/elf64bmip-defs.sh
@@ -0,0 +1,3 @@
+. ${srcdir}/emulparams/elf32bmipn32-defs.sh
+COMMONPAGESIZE="CONSTANT (COMMONPAGESIZE)"
+INITIAL_READONLY_SECTIONS=".MIPS.options : { *(.MIPS.options) }"
diff --git a/contrib/binutils/ld/emulparams/elf64bmip.sh b/contrib/binutils/ld/emulparams/elf64bmip.sh
index a4ce6d4..0df6528 100755
--- a/contrib/binutils/ld/emulparams/elf64bmip.sh
+++ b/contrib/binutils/ld/emulparams/elf64bmip.sh
@@ -1,4 +1,4 @@
-. ${srcdir}/emulparams/elf32bmipn32-defs.sh
+. ${srcdir}/emulparams/elf64bmip-defs.sh
OUTPUT_FORMAT="elf64-bigmips"
BIG_OUTPUT_FORMAT="elf64-bigmips"
LITTLE_OUTPUT_FORMAT="elf64-littlemips"
diff --git a/contrib/binutils/ld/emulparams/elf64btsmip.sh b/contrib/binutils/ld/emulparams/elf64btsmip.sh
index 23a20c7..b9e80bb 100644
--- a/contrib/binutils/ld/emulparams/elf64btsmip.sh
+++ b/contrib/binutils/ld/emulparams/elf64btsmip.sh
@@ -1,7 +1,7 @@
# If you change this file, please also look at files which source this one:
# elf64ltsmip.sh
-. ${srcdir}/emulparams/elf32bmipn32-defs.sh
+. ${srcdir}/emulparams/elf64bmip-defs.sh
OUTPUT_FORMAT="elf64-tradbigmips"
BIG_OUTPUT_FORMAT="elf64-tradbigmips"
LITTLE_OUTPUT_FORMAT="elf64-tradlittlemips"
diff --git a/contrib/binutils/ld/emulparams/elf64ppc.sh b/contrib/binutils/ld/emulparams/elf64ppc.sh
index c190b18..2fecba8 100644
--- a/contrib/binutils/ld/emulparams/elf64ppc.sh
+++ b/contrib/binutils/ld/emulparams/elf64ppc.sh
@@ -7,21 +7,21 @@ SCRIPT_NAME=elf
OUTPUT_FORMAT="elf64-powerpc"
TEXT_START_ADDR=0x10000000
#SEGMENT_SIZE=0x10000000
-MAXPAGESIZE=0x10000
-COMMONPAGESIZE=0x1000
+MAXPAGESIZE="CONSTANT (MAXPAGESIZE)"
+COMMONPAGESIZE="CONSTANT (COMMONPAGESIZE)"
ARCH=powerpc:common64
MACHINE=
NOP=0x60000000
OTHER_TEXT_SECTIONS="*(.sfpr .glink)"
BSS_PLT=
OTHER_BSS_SYMBOLS="
- .tocbss ${RELOCATING-0}${RELOCATING+ALIGN(8)} : { *(.tocbss)}"
+ .tocbss ${RELOCATING-0} :${RELOCATING+ ALIGN(8)} { *(.tocbss)}"
OTHER_PLT_RELOC_SECTIONS="
.rela.tocbss ${RELOCATING-0} : { *(.rela.tocbss) }"
if test x${RELOCATING+set} = xset; then
GOT="
- .got ALIGN(8) : { *(.got .toc) }"
+ .got : ALIGN(8) { *(.got .toc) }"
else
GOT="
.got 0 : { *(.got) }
@@ -30,8 +30,9 @@ fi
OTHER_GOT_RELOC_SECTIONS="
.rela.toc ${RELOCATING-0} : { *(.rela.toc) }"
OTHER_READWRITE_SECTIONS="
- .toc1 ${RELOCATING-0}${RELOCATING+ALIGN(8)} : { *(.toc1) }
- .opd ${RELOCATING-0}${RELOCATING+ALIGN(8)} : { KEEP (*(.opd)) }"
+ .toc1 ${RELOCATING-0} :${RELOCATING+ ALIGN(8)} { *(.toc1) }
+ .opd ${RELOCATING-0} :${RELOCATING+ ALIGN(8)} { KEEP (*(.opd)) }
+ .branch_lt ${RELOCATING-0} :${RELOCATING+ ALIGN(8)} { *(.branch_lt) }"
# Treat a host that matches the target with the possible exception of "64"
# in the name as if it were native.
diff --git a/contrib/binutils/ld/emulparams/elf_i386.sh b/contrib/binutils/ld/emulparams/elf_i386.sh
index 2382286..bdeaebb 100644
--- a/contrib/binutils/ld/emulparams/elf_i386.sh
+++ b/contrib/binutils/ld/emulparams/elf_i386.sh
@@ -1,8 +1,8 @@
SCRIPT_NAME=elf
OUTPUT_FORMAT="elf32-i386"
TEXT_START_ADDR=0x08048000
-MAXPAGESIZE=0x1000
-COMMONPAGESIZE=0x1000
+MAXPAGESIZE="CONSTANT (MAXPAGESIZE)"
+COMMONPAGESIZE="CONSTANT (COMMONPAGESIZE)"
NONPAGED_TEXT_START_ADDR=0x08048000
ARCH=i386
MACHINE=
@@ -11,3 +11,4 @@ TEMPLATE_NAME=elf32
GENERATE_SHLIB_SCRIPT=yes
GENERATE_PIE_SCRIPT=yes
NO_SMALL_DATA=yes
+SEPARATE_GOTPLT=12
diff --git a/contrib/binutils/ld/emulparams/elf_i386_chaos.sh b/contrib/binutils/ld/emulparams/elf_i386_chaos.sh
index e018231..a652913 100644
--- a/contrib/binutils/ld/emulparams/elf_i386_chaos.sh
+++ b/contrib/binutils/ld/emulparams/elf_i386_chaos.sh
@@ -1,7 +1,7 @@
SCRIPT_NAME=elf_chaos
OUTPUT_FORMAT="elf32-i386"
TEXT_START_ADDR=0x40000000
-MAXPAGESIZE=0x1000
+MAXPAGESIZE="CONSTANT (MAXPAGESIZE)"
NONPAGED_TEXT_START_ADDR=0x40000000
ARCH=i386
MACHINE=
diff --git a/contrib/binutils/ld/emulparams/elf_i386_ldso.sh b/contrib/binutils/ld/emulparams/elf_i386_ldso.sh
index a477a69..d62184f 100644
--- a/contrib/binutils/ld/emulparams/elf_i386_ldso.sh
+++ b/contrib/binutils/ld/emulparams/elf_i386_ldso.sh
@@ -1,7 +1,7 @@
SCRIPT_NAME=elf
OUTPUT_FORMAT="elf32-i386"
TEXT_START_ADDR=0x08048000
-MAXPAGESIZE=0x1000
+MAXPAGESIZE="CONSTANT (MAXPAGESIZE)"
NONPAGED_TEXT_START_ADDR=0x08048000
ARCH=i386
MACHINE=
diff --git a/contrib/binutils/ld/emulparams/elf_s390.sh b/contrib/binutils/ld/emulparams/elf_s390.sh
index e710673..d958504 100644
--- a/contrib/binutils/ld/emulparams/elf_s390.sh
+++ b/contrib/binutils/ld/emulparams/elf_s390.sh
@@ -1,7 +1,8 @@
SCRIPT_NAME=elf
OUTPUT_FORMAT="elf32-s390"
TEXT_START_ADDR=0x00400000
-MAXPAGESIZE=0x1000
+MAXPAGESIZE="CONSTANT (MAXPAGESIZE)"
+COMMONPAGESIZE="CONSTANT (COMMONPAGESIZE)"
NONPAGED_TEXT_START_ADDR=0x00400000
ARCH="s390:31-bit"
MACHINE=
diff --git a/contrib/binutils/ld/emulparams/elf_x86_64.sh b/contrib/binutils/ld/emulparams/elf_x86_64.sh
index 6d37058..449ccc9 100644
--- a/contrib/binutils/ld/emulparams/elf_x86_64.sh
+++ b/contrib/binutils/ld/emulparams/elf_x86_64.sh
@@ -2,8 +2,8 @@ SCRIPT_NAME=elf
ELFSIZE=64
OUTPUT_FORMAT="elf64-x86-64"
TEXT_START_ADDR=0x400000
-MAXPAGESIZE=0x100000
-COMMONPAGESIZE=0x1000
+MAXPAGESIZE="CONSTANT (MAXPAGESIZE)"
+COMMONPAGESIZE="CONSTANT (COMMONPAGESIZE)"
NONPAGED_TEXT_START_ADDR=0x400000
ARCH="i386:x86-64"
MACHINE=
@@ -12,6 +12,8 @@ TEMPLATE_NAME=elf32
GENERATE_SHLIB_SCRIPT=yes
GENERATE_PIE_SCRIPT=yes
NO_SMALL_DATA=yes
+LARGE_SECTIONS=yes
+SEPARATE_GOTPLT=24
if [ "x${host}" = "x${target}" ]; then
case " $EMULATION_LIBPATH " in
@@ -20,12 +22,16 @@ if [ "x${host}" = "x${target}" ]; then
esac
fi
-# Linux modify the default library search path to first include
+# Linux/Solaris modify the default library search path to first include
# a 64-bit specific directory.
case "$target" in
- x86_64*-linux*)
+ x86_64*-linux*|i[3-7]86-*-linux-*)
case "$EMULATION_NAME" in
*64*) LIBPATH_SUFFIX=64 ;;
esac
;;
+ *-*-solaris2*)
+ LIBPATH_SUFFIX=/amd64
+ ELF_INTERPRETER_NAME=\"/lib/amd64/ld.so.1\"
+ ;;
esac
diff --git a/contrib/binutils/ld/emulparams/elf_x86_64_fbsd.sh b/contrib/binutils/ld/emulparams/elf_x86_64_fbsd.sh
index 34258cb..35b6a62 100644
--- a/contrib/binutils/ld/emulparams/elf_x86_64_fbsd.sh
+++ b/contrib/binutils/ld/emulparams/elf_x86_64_fbsd.sh
@@ -1,2 +1,3 @@
. ${srcdir}/emulparams/elf_x86_64.sh
. ${srcdir}/emulparams/elf_fbsd.sh
+OUTPUT_FORMAT="elf64-x86-64-freebsd"
diff --git a/contrib/binutils/ld/emulparams/i386freebsd.sh b/contrib/binutils/ld/emulparams/i386freebsd.sh
deleted file mode 100644
index 0d5e9ff..0000000
--- a/contrib/binutils/ld/emulparams/i386freebsd.sh
+++ /dev/null
@@ -1,6 +0,0 @@
-SCRIPT_NAME=aout
-TEXT_START_ADDR=0x1020
-OUTPUT_FORMAT="a.out-i386-freebsd"
-TARGET_PAGE_SIZE=0x1000
-ARCH=i386
-EXECUTABLE_SYMBOLS='__DYNAMIC = 0;'
diff --git a/contrib/binutils/ld/emulparams/i386moss.sh b/contrib/binutils/ld/emulparams/i386moss.sh
index eece447..659c7f2 100644
--- a/contrib/binutils/ld/emulparams/i386moss.sh
+++ b/contrib/binutils/ld/emulparams/i386moss.sh
@@ -1,7 +1,7 @@
SCRIPT_NAME=elf
OUTPUT_FORMAT="elf32-i386"
TEXT_START_ADDR=0x00002000
-MAXPAGESIZE=0x1000
+MAXPAGESIZE="CONSTANT (MAXPAGESIZE)"
NONPAGED_TEXT_START_ADDR=0x00002000
ARCH=i386
MACHINE=
diff --git a/contrib/binutils/ld/emulparams/i386nto.sh b/contrib/binutils/ld/emulparams/i386nto.sh
index e4872ed..256d4c8 100644
--- a/contrib/binutils/ld/emulparams/i386nto.sh
+++ b/contrib/binutils/ld/emulparams/i386nto.sh
@@ -2,7 +2,7 @@ SCRIPT_NAME=elf
OUTPUT_FORMAT="elf32-i386"
TEXT_START_ADDR=0x08048000
TEXT_START_SYMBOLS='_btext = .;'
-MAXPAGESIZE=0x1000
+MAXPAGESIZE="CONSTANT (MAXPAGESIZE)"
NONPAGED_TEXT_START_ADDR=0x08048000
#SHLIB_TEXT_START_ADDR=0xb0300000
ARCH=i386
diff --git a/contrib/binutils/ld/emulparams/i386nw.sh b/contrib/binutils/ld/emulparams/i386nw.sh
index 621b475..dd5558c 100644
--- a/contrib/binutils/ld/emulparams/i386nw.sh
+++ b/contrib/binutils/ld/emulparams/i386nw.sh
@@ -1,7 +1,7 @@
SCRIPT_NAME=nw
OUTPUT_FORMAT="elf32-i386"
TEXT_START_ADDR=0x08000000
-MAXPAGESIZE=0x1000
+MAXPAGESIZE="CONSTANT (MAXPAGESIZE)"
NONPAGED_TEXT_START_ADDR=0x08000000
ARCH=i386
NOP=0x90909090
diff --git a/contrib/binutils/ld/emulparams/i386pe.sh b/contrib/binutils/ld/emulparams/i386pe.sh
index a8add23..879379f 100644
--- a/contrib/binutils/ld/emulparams/i386pe.sh
+++ b/contrib/binutils/ld/emulparams/i386pe.sh
@@ -6,3 +6,4 @@ TEMPLATE_NAME=pe
ENTRY="_mainCRTStartup"
SUBSYSTEM=PE_DEF_SUBSYSTEM
INITIAL_SYMBOL_CHAR=\"_\"
+TARGET_PAGE_SIZE=0x1000
diff --git a/contrib/binutils/ld/emulparams/i386pe_posix.sh b/contrib/binutils/ld/emulparams/i386pe_posix.sh
index 37f51b5..afa00de 100644
--- a/contrib/binutils/ld/emulparams/i386pe_posix.sh
+++ b/contrib/binutils/ld/emulparams/i386pe_posix.sh
@@ -7,3 +7,4 @@ ENTRY="___PosixProcessStartup"
SUBSYSTEM=7
EXECUTABLE_NAME=a.out
INITIAL_SYMBOL_CHAR=\"_\"
+TARGET_PAGE_SIZE=0x1000
diff --git a/contrib/binutils/ld/emulparams/i386pep.sh b/contrib/binutils/ld/emulparams/i386pep.sh
new file mode 100644
index 0000000..d20f3ab
--- /dev/null
+++ b/contrib/binutils/ld/emulparams/i386pep.sh
@@ -0,0 +1,9 @@
+ARCH="i386:x86-64"
+SCRIPT_NAME=pep
+OUTPUT_FORMAT="pei-x86-64"
+RELOCATEABLE_OUTPUT_FORMAT="pe-x86-64"
+TEMPLATE_NAME=pep
+ENTRY="_mainCRTStartup"
+SUBSYSTEM=PE_DEF_SUBSYSTEM
+INITIAL_SYMBOL_CHAR=\"_\"
+TARGET_PAGE_SIZE=0x1000
diff --git a/contrib/binutils/ld/emulparams/mipsidt.sh b/contrib/binutils/ld/emulparams/mipsidt.sh
index 63176f5..f381267 100644
--- a/contrib/binutils/ld/emulparams/mipsidt.sh
+++ b/contrib/binutils/ld/emulparams/mipsidt.sh
@@ -7,5 +7,6 @@ ARCH=mips
ENTRY=start
TEXT_START_ADDR=0xa0012000
DATA_ADDR=.
-TEMPLATE_NAME=mipsecoff
+TEMPLATE_NAME=generic
+EXTRA_EM_FILE=mipsecoff
EMBEDDED=yes
diff --git a/contrib/binutils/ld/emulparams/mipsidtl.sh b/contrib/binutils/ld/emulparams/mipsidtl.sh
index 02279de..52447ff 100644
--- a/contrib/binutils/ld/emulparams/mipsidtl.sh
+++ b/contrib/binutils/ld/emulparams/mipsidtl.sh
@@ -7,5 +7,6 @@ ARCH=mips
ENTRY=start
TEXT_START_ADDR=0xa0012000
DATA_ADDR=.
-TEMPLATE_NAME=mipsecoff
+TEMPLATE_NAME=generic
+EXTRA_EM_FILE=mipsecoff
EMBEDDED=yes
diff --git a/contrib/binutils/ld/emulparams/mipspe.sh b/contrib/binutils/ld/emulparams/mipspe.sh
index 9dd9ce7..a5cfc2e 100644
--- a/contrib/binutils/ld/emulparams/mipspe.sh
+++ b/contrib/binutils/ld/emulparams/mipspe.sh
@@ -7,3 +7,4 @@ TEMPLATE_NAME=pe
SUBSYSTEM=PE_DEF_SUBSYSTEM
INITIAL_SYMBOL_CHAR=\"_\"
ENTRY="_mainCRTStartup"
+TARGET_PAGE_SIZE=0x1000
diff --git a/contrib/binutils/ld/emulparams/ppcnw.sh b/contrib/binutils/ld/emulparams/ppcnw.sh
index c3ead43..14b2745 100644
--- a/contrib/binutils/ld/emulparams/ppcnw.sh
+++ b/contrib/binutils/ld/emulparams/ppcnw.sh
@@ -2,6 +2,6 @@ SCRIPT_NAME=nw
OUTPUT_FORMAT="elf32-powerpc"
TEXT_START_ADDR=0x0400000
DATA_ADDR=0x10000000
-MAXPAGESIZE=0x40000
+MAXPAGESIZE="CONSTANT (MAXPAGESIZE)"
NONPAGED_TEXT_START_ADDR=0x0400000
ARCH=powerpc
diff --git a/contrib/binutils/ld/emulparams/ppcpe.sh b/contrib/binutils/ld/emulparams/ppcpe.sh
index a2d09ef..2e1e102 100644
--- a/contrib/binutils/ld/emulparams/ppcpe.sh
+++ b/contrib/binutils/ld/emulparams/ppcpe.sh
@@ -5,3 +5,4 @@ TEMPLATE_NAME=pe
ENTRY="_mainCRTStartup"
SUBSYSTEM=PE_DEF_SUBSYSTEM
INITIAL_SYMBOL_CHAR=\"_\"
+TARGET_PAGE_SIZE=0x1000
diff --git a/contrib/binutils/ld/emulparams/scoreelf.sh b/contrib/binutils/ld/emulparams/scoreelf.sh
new file mode 100644
index 0000000..e138de2
--- /dev/null
+++ b/contrib/binutils/ld/emulparams/scoreelf.sh
@@ -0,0 +1,31 @@
+MACHINE=
+SCRIPT_NAME=elf
+TEMPLATE_NAME=elf32
+OUTPUT_FORMAT="elf32-bigscore"
+BIG_OUTPUT_FORMAT="elf32-bigscore"
+LITTLE_OUTPUT_FORMAT="elf32-littlescore"
+GROUP="-lm -lc -lglsim -lgcc -lstdc++"
+
+TEXT_START_ADDR=0x00000000
+MAXPAGESIZE=256
+NONPAGED_TEXT_START_ADDR=0x0400000
+SHLIB_TEXT_START_ADDR=0x5ffe0000
+OTHER_GOT_SYMBOLS='
+ _gp = ALIGN(16) + 0x3ff0;
+'
+
+OTHER_BSS_START_SYMBOLS='_bss_start__ = . + ALIGN(4);'
+OTHER_BSS_END_SYMBOLS='_bss_end__ = . ; __bss_end__ = . ; __end__ = . ;'
+DATA_START_SYMBOLS='_fdata = . ;'
+SDATA_START_SYMBOLS='_sdata_begin = . ;'
+OTHER_BSS_SYMBOLS='
+ _bss_start = ALIGN(4) ;
+'
+# This sets the stack to the top of the simulator memory (2^19 bytes).
+STACK_ADDR=0x8000000
+
+ARCH=score
+MACHINE=
+ENTRY=_start
+EMBEDDED=yes
+GENERATE_SHLIB_SCRIPT=yes
diff --git a/contrib/binutils/ld/emulparams/shelf_uclinux.sh b/contrib/binutils/ld/emulparams/shelf_uclinux.sh
new file mode 100644
index 0000000..2af5da4
--- /dev/null
+++ b/contrib/binutils/ld/emulparams/shelf_uclinux.sh
@@ -0,0 +1,4 @@
+. ${srcdir}/emulparams/shelf.sh
+
+# We do not want a .stack section
+OTHER_SECTIONS=""
diff --git a/contrib/binutils/ld/emulparams/shelf_vxworks.sh b/contrib/binutils/ld/emulparams/shelf_vxworks.sh
new file mode 100644
index 0000000..a87d529
--- /dev/null
+++ b/contrib/binutils/ld/emulparams/shelf_vxworks.sh
@@ -0,0 +1,19 @@
+# If you change this file, please also look at files which source this one:
+# shlelf_vxworks.sh
+
+SCRIPT_NAME=elf
+BIG_OUTPUT_FORMAT="elf32-sh-vxworks"
+LITTLE_OUTPUT_FORMAT="elf32-shl-vxworks"
+OUTPUT_FORMAT="$BIG_OUTPUT_FORMAT"
+TEXT_START_ADDR=0x1000
+MAXPAGESIZE='CONSTANT (MAXPAGESIZE)'
+ARCH=sh
+MACHINE=
+TEMPLATE_NAME=elf32
+GENERATE_SHLIB_SCRIPT=yes
+ENTRY=__start
+SYMPREFIX=_
+GOT=".got ${RELOCATING-0} : {
+ PROVIDE(__GLOBAL_OFFSET_TABLE_ = .);
+ *(.got.plt) *(.got) }"
+. ${srcdir}/emulparams/vxworks.sh
diff --git a/contrib/binutils/ld/emulparams/shlelf_vxworks.sh b/contrib/binutils/ld/emulparams/shlelf_vxworks.sh
new file mode 100644
index 0000000..0a055b1
--- /dev/null
+++ b/contrib/binutils/ld/emulparams/shlelf_vxworks.sh
@@ -0,0 +1,2 @@
+. ${srcdir}/emulparams/shelf_vxworks.sh
+OUTPUT_FORMAT="$LITTLE_OUTPUT_FORMAT"
diff --git a/contrib/binutils/ld/emultempl/alphaelf.em b/contrib/binutils/ld/emultempl/alphaelf.em
index 7e64323..62eca18 100644
--- a/contrib/binutils/ld/emultempl/alphaelf.em
+++ b/contrib/binutils/ld/emultempl/alphaelf.em
@@ -1,5 +1,5 @@
# This shell script emits a C file. -*- C -*-
-# Copyright 2003 Free Software Foundation, Inc.
+# Copyright 2003, 2004, 2005 Free Software Foundation, Inc.
#
# This file is part of GLD, the Gnu Linker.
#
@@ -15,7 +15,7 @@
#
# 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.
+# Foundation, Inc., 51 Franklin Street - Fifth Floor, Boston, MA 02110-1301, USA.
#
# This file is sourced from elf32.em, and defines extra alpha
@@ -27,25 +27,76 @@ cat >>e${EMULATION_NAME}.c <<EOF
#include "elf/alpha.h"
#include "elf-bfd.h"
-static int elf64alpha_32bit = 0;
+static bfd_boolean limit_32bit;
+static bfd_boolean disable_relaxation;
+
+extern bfd_boolean elf64_alpha_use_secureplt;
+extern const bfd_target bfd_elf64_alpha_vec;
+extern const bfd_target bfd_elf64_alpha_freebsd_vec;
+
/* Set the start address as in the Tru64 ld. */
#define ALPHA_TEXT_START_32BIT 0x12000000
static void
+alpha_after_open (void)
+{
+ if (link_info.hash->creator == &bfd_elf64_alpha_vec
+ || link_info.hash->creator == &bfd_elf64_alpha_freebsd_vec)
+ {
+ unsigned int num_plt;
+ lang_output_section_statement_type *os;
+ lang_output_section_statement_type *plt_os[2];
+
+ num_plt = 0;
+ for (os = &lang_output_section_statement.head->output_section_statement;
+ os != NULL;
+ os = os->next)
+ {
+ if (os->constraint == SPECIAL && strcmp (os->name, ".plt") == 0)
+ {
+ if (num_plt < 2)
+ plt_os[num_plt] = os;
+ ++num_plt;
+ }
+ }
+
+ if (num_plt == 2)
+ {
+ plt_os[0]->constraint = elf64_alpha_use_secureplt ? 0 : -1;
+ plt_os[1]->constraint = elf64_alpha_use_secureplt ? -1 : 0;
+ }
+ }
+
+ gld${EMULATION_NAME}_after_open ();
+}
+
+static void
alpha_after_parse (void)
{
- if (elf64alpha_32bit && !link_info.shared && !link_info.relocatable)
+ if (limit_32bit && !link_info.shared && !link_info.relocatable)
lang_section_start (".interp",
exp_binop ('+',
exp_intop (ALPHA_TEXT_START_32BIT),
- exp_nameop (SIZEOF_HEADERS, NULL)));
+ exp_nameop (SIZEOF_HEADERS, NULL)),
+ NULL);
+}
+
+static void
+alpha_before_allocation (void)
+{
+ /* Call main function; we're just extending it. */
+ gld${EMULATION_NAME}_before_allocation ();
+
+ /* Add -relax if -O, not -r, and not explicitly disabled. */
+ if (link_info.optimize && !link_info.relocatable && !disable_relaxation)
+ command_line.relax = TRUE;
}
static void
alpha_finish (void)
{
- if (elf64alpha_32bit)
+ if (limit_32bit)
elf_elfheader (output_bfd)->e_flags |= EF_ALPHA_32BIT;
gld${EMULATION_NAME}_finish ();
@@ -56,25 +107,47 @@ EOF
# parse_args and list_options functions.
#
PARSE_AND_LIST_PROLOGUE='
-#define OPTION_TASO 300
+#define OPTION_TASO 300
+#define OPTION_NO_RELAX (OPTION_TASO + 1)
+#define OPTION_SECUREPLT (OPTION_NO_RELAX + 1)
+#define OPTION_NO_SECUREPLT (OPTION_SECUREPLT + 1)
'
PARSE_AND_LIST_LONGOPTS='
- {"taso", no_argument, NULL, OPTION_TASO},
+ { "taso", no_argument, NULL, OPTION_TASO },
+ { "no-relax", no_argument, NULL, OPTION_NO_RELAX },
+ { "secureplt", no_argument, NULL, OPTION_SECUREPLT },
+ { "no-secureplt", no_argument, NULL, OPTION_NO_SECUREPLT },
'
PARSE_AND_LIST_OPTIONS='
- fprintf (file, _(" -taso\t\t\tLoad executable in the lower 31-bit addressable\n"));
- fprintf (file, _("\t\t\t virtual address range\n"));
+ fprintf (file, _("\
+ --taso Load executable in the lower 31-bit addressable\n\
+ virtual address range.\n\
+ --no-relax Do not relax call and gp sequences.\n\
+ --secureplt Force PLT in text segment.\n\
+ --no-secureplt Force PLT in data segment.\n\
+"));
'
PARSE_AND_LIST_ARGS_CASES='
case OPTION_TASO:
- elf64alpha_32bit = 1;
+ limit_32bit = 1;
+ break;
+ case OPTION_NO_RELAX:
+ disable_relaxation = TRUE;
+ break;
+ case OPTION_SECUREPLT:
+ elf64_alpha_use_secureplt = TRUE;
+ break;
+ case OPTION_NO_SECUREPLT:
+ elf64_alpha_use_secureplt = FALSE;
break;
'
# Put these extra alpha routines in ld_${EMULATION_NAME}_emulation
#
+LDEMUL_AFTER_OPEN=alpha_after_open
LDEMUL_AFTER_PARSE=alpha_after_parse
+LDEMUL_BEFORE_ALLOCATION=alpha_before_allocation
LDEMUL_FINISH=alpha_finish
diff --git a/contrib/binutils/ld/emultempl/armcoff.em b/contrib/binutils/ld/emultempl/armcoff.em
index 468c3b0..a2e2c6c 100644
--- a/contrib/binutils/ld/emultempl/armcoff.em
+++ b/contrib/binutils/ld/emultempl/armcoff.em
@@ -5,7 +5,7 @@ cat >e${EMULATION_NAME}.c <<EOF
/* emulate the original gld for the given ${EMULATION_NAME}
Copyright 1991, 1993, 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003,
- 2004 Free Software Foundation, Inc.
+ 2004, 2005, 2007 Free Software Foundation, Inc.
Written by Steve Chamberlain steve@cygnus.com
This file is part of GLD, the Gnu Linker.
@@ -22,12 +22,12 @@ 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. */
+Foundation, Inc., 51 Franklin Street - Fifth Floor, Boston, MA 02110-1301, USA. */
#define TARGET_IS_${EMULATION_NAME}
-#include "bfd.h"
#include "sysdep.h"
+#include "bfd.h"
#include "bfdlink.h"
#include "getopt.h"
@@ -125,6 +125,8 @@ gld${EMULATION_NAME}_before_allocation (void)
/* We have seen it all. Allocate it, and carry on */
bfd_arm_allocate_interworking_sections (& link_info);
+
+ before_allocation_default ();
}
static void
@@ -152,45 +154,48 @@ gld${EMULATION_NAME}_after_open (void)
static void
gld${EMULATION_NAME}_finish (void)
{
- struct bfd_link_hash_entry * h;
-
- if (thumb_entry_symbol == NULL)
- return;
-
- h = bfd_link_hash_lookup (link_info.hash, thumb_entry_symbol,
- FALSE, FALSE, TRUE);
-
- if (h != (struct bfd_link_hash_entry *) NULL
- && (h->type == bfd_link_hash_defined
- || h->type == bfd_link_hash_defweak)
- && h->u.def.section->output_section != NULL)
+ if (thumb_entry_symbol != NULL)
{
- static char buffer[32];
- bfd_vma val;
-
- /* Special procesing is required for a Thumb entry symbol. The
- bottom bit of its address must be set. */
- val = (h->u.def.value
- + bfd_get_section_vma (output_bfd,
- h->u.def.section->output_section)
- + h->u.def.section->output_offset);
-
- val |= 1;
-
- /* Now convert this value into a string and store it in entry_symbol
- where the lang_finish() function will pick it up. */
- buffer[0] = '0';
- buffer[1] = 'x';
-
- sprintf_vma (buffer + 2, val);
-
- if (entry_symbol.name != NULL && entry_from_cmdline)
- einfo (_("%P: warning: '--thumb-entry %s' is overriding '-e %s'\n"),
- thumb_entry_symbol, entry_symbol.name);
- entry_symbol.name = buffer;
+ struct bfd_link_hash_entry * h;
+
+ h = bfd_link_hash_lookup (link_info.hash, thumb_entry_symbol,
+ FALSE, FALSE, TRUE);
+
+ if (h != (struct bfd_link_hash_entry *) NULL
+ && (h->type == bfd_link_hash_defined
+ || h->type == bfd_link_hash_defweak)
+ && h->u.def.section->output_section != NULL)
+ {
+ static char buffer[32];
+ bfd_vma val;
+
+ /* Special procesing is required for a Thumb entry symbol. The
+ bottom bit of its address must be set. */
+ val = (h->u.def.value
+ + bfd_get_section_vma (output_bfd,
+ h->u.def.section->output_section)
+ + h->u.def.section->output_offset);
+
+ val |= 1;
+
+ /* Now convert this value into a string and store it in entry_symbol
+ where the lang_finish() function will pick it up. */
+ buffer[0] = '0';
+ buffer[1] = 'x';
+
+ sprintf_vma (buffer + 2, val);
+
+ if (entry_symbol.name != NULL && entry_from_cmdline)
+ einfo (_("%P: warning: '--thumb-entry %s' is overriding '-e %s'\n"),
+ thumb_entry_symbol, entry_symbol.name);
+ entry_symbol.name = buffer;
+ }
+ else
+ einfo (_("%P: warning: connot find thumb start symbol %s\n"),
+ thumb_entry_symbol);
}
- else
- einfo (_("%P: warning: connot find thumb start symbol %s\n"), thumb_entry_symbol);
+
+ finish_default ();
}
static char *
diff --git a/contrib/binutils/ld/emultempl/armelf.em b/contrib/binutils/ld/emultempl/armelf.em
index 0c051ad..e9f663f 100644
--- a/contrib/binutils/ld/emultempl/armelf.em
+++ b/contrib/binutils/ld/emultempl/armelf.em
@@ -1,5 +1,6 @@
# This shell script emits a C file. -*- C -*-
-# Copyright 1991, 1993, 1996, 1997, 1998, 1999, 2000, 2002, 2003, 2004
+# Copyright 1991, 1993, 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003,
+# 2004, 2005
# Free Software Foundation, Inc.
#
# This file is part of GLD, the Gnu Linker.
@@ -16,17 +17,27 @@
#
# 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.
+# Foundation, Inc., 51 Franklin Street - Fifth Floor, Boston, MA 02110-1301, USA.
#
# This file is sourced from elf32.em, and defines extra arm-elf
# specific routines.
#
+test -z "$TARGET2_TYPE" && TARGET2_TYPE="rel"
cat >>e${EMULATION_NAME}.c <<EOF
-static int no_pipeline_knowledge = 0;
+#include "elf/arm.h"
+
static char *thumb_entry_symbol = NULL;
static bfd *bfd_for_interwork;
+static int byteswap_code = 0;
+static int target1_is_rel = 0${TARGET1_IS_REL};
+static char *target2_type = "${TARGET2_TYPE}";
+static int fix_v4bx = 0;
+static int use_blx = 0;
+static bfd_arm_vfp11_fix vfp11_denorm_fix = BFD_ARM_VFP11_FIX_DEFAULT;
+static int no_enum_size_warning = 0;
+static int pic_veneer = 0;
static void
gld${EMULATION_NAME}_before_parse (void)
@@ -65,20 +76,27 @@ arm_elf_after_open (void)
static void
arm_elf_set_bfd_for_interworking (lang_statement_union_type *statement)
{
- if (statement->header.type == lang_input_section_enum
- && !statement->input_section.ifile->just_syms_flag)
+ if (statement->header.type == lang_input_section_enum)
{
asection *i = statement->input_section.section;
- asection *output_section = i->output_section;
-
- ASSERT (output_section->owner == output_bfd);
- if ((output_section->flags & SEC_HAS_CONTENTS) != 0
- && (i->flags & SEC_NEVER_LOAD) == 0
- && ! i->owner->output_has_begun)
+ if (!((lang_input_statement_type *) i->owner->usrdata)->just_syms_flag
+ && (i->flags & SEC_EXCLUDE) == 0)
{
- bfd_for_interwork = i->owner;
- bfd_for_interwork->output_has_begun = TRUE;
+ asection *output_section = i->output_section;
+
+ ASSERT (output_section->owner == output_bfd);
+
+ /* Don't attach the interworking stubs to a dynamic object, to
+ an empty section, etc. */
+ if ((output_section->flags & SEC_HAS_CONTENTS) != 0
+ && (i->flags & SEC_NEVER_LOAD) == 0
+ && ! (i->owner->flags & DYNAMIC)
+ && ! i->owner->output_has_begun)
+ {
+ bfd_for_interwork = i->owner;
+ bfd_for_interwork->output_has_begun = TRUE;
+ }
}
}
}
@@ -88,9 +106,6 @@ arm_elf_before_allocation (void)
{
bfd *tem;
- /* Call the standard elf routine. */
- gld${EMULATION_NAME}_before_allocation ();
-
if (link_info.input_bfds != NULL)
{
/* The interworking bfd must be the last one in the link. */
@@ -109,27 +124,55 @@ arm_elf_before_allocation (void)
if (bfd_for_interwork != NULL)
bfd_elf32_arm_get_bfd_for_interworking (bfd_for_interwork, &link_info);
}
- /* 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 (!bfd_elf32_arm_process_before_allocation (is->the_bfd, & link_info,
- no_pipeline_knowledge))
- {
+ bfd_elf32_arm_set_byteswap_code (&link_info, byteswap_code);
+
+ /* Choose type of VFP11 erratum fix, or warn if specified fix is unnecessary
+ due to architecture version. */
+ bfd_elf32_arm_set_vfp11_fix (output_bfd, &link_info);
+
+ /* We should be able to set the size of the interworking stub section. We
+ can't do it until later if we have dynamic sections, though. */
+ if (! elf_hash_table (&link_info)->dynamic_sections_created)
+ {
+ /* Here we rummage through the found bfds to collect glue information. */
+ LANG_FOR_EACH_INPUT_STATEMENT (is)
+ {
+ /* Initialise mapping tables for code/data. */
+ bfd_elf32_arm_init_maps (is->the_bfd);
+
+ if (!bfd_elf32_arm_process_before_allocation (is->the_bfd,
+ &link_info)
+ || !bfd_elf32_arm_vfp11_erratum_scan (is->the_bfd, &link_info))
/* xgettext:c-format */
einfo (_("Errors encountered processing file %s"), is->filename);
- }
- }
- }
+ }
+ }
+
+ /* Call the standard elf routine. */
+ gld${EMULATION_NAME}_before_allocation ();
/* We have seen it all. Allocate it, and carry on. */
bfd_elf32_arm_allocate_interworking_sections (& link_info);
}
static void
+arm_elf_after_allocation (void)
+{
+ /* Call the standard elf routine. */
+ after_allocation_default ();
+
+ {
+ LANG_FOR_EACH_INPUT_STATEMENT (is)
+ {
+ /* Figure out where VFP11 erratum veneers (and the labels returning
+ from same) have been placed. */
+ bfd_elf32_arm_vfp11_fix_veneer_locations (is->the_bfd, &link_info);
+ }
+ }
+}
+
+static void
arm_elf_finish (void)
{
struct bfd_link_hash_entry * h;
@@ -137,11 +180,25 @@ arm_elf_finish (void)
/* Call the elf32.em routine. */
gld${EMULATION_NAME}_finish ();
- if (thumb_entry_symbol == NULL)
- return;
+ if (thumb_entry_symbol)
+ {
+ h = bfd_link_hash_lookup (link_info.hash, thumb_entry_symbol,
+ FALSE, FALSE, TRUE);
+ }
+ else
+ {
+ struct elf_link_hash_entry * eh;
+
+ if (!entry_symbol.name)
+ return;
+
+ h = bfd_link_hash_lookup (link_info.hash, entry_symbol.name,
+ FALSE, FALSE, TRUE);
+ eh = (struct elf_link_hash_entry *)h;
+ if (!h || ELF_ST_TYPE(eh->type) != STT_ARM_TFUNC)
+ return;
+ }
- h = bfd_link_hash_lookup (link_info.hash, thumb_entry_symbol,
- FALSE, FALSE, TRUE);
if (h != (struct bfd_link_hash_entry *) NULL
&& (h->type == bfd_link_hash_defined
@@ -167,7 +224,8 @@ arm_elf_finish (void)
sprintf_vma (buffer + 2, val);
- if (entry_symbol.name != NULL && entry_from_cmdline)
+ if (thumb_entry_symbol != NULL && entry_symbol.name != NULL
+ && entry_from_cmdline)
einfo (_("%P: warning: '--thumb-entry %s' is overriding '-e %s'\n"),
thumb_entry_symbol, entry_symbol.name);
entry_symbol.name = buffer;
@@ -177,6 +235,17 @@ arm_elf_finish (void)
thumb_entry_symbol);
}
+/* This is a convenient point to tell BFD about target specific flags.
+ After the output has been created, but before inputs are read. */
+static void
+arm_elf_create_output_section_statements (void)
+{
+ bfd_elf32_arm_set_target_relocs (output_bfd, &link_info, target1_is_rel,
+ target2_type, fix_v4bx, use_blx,
+ vfp11_denorm_fix, no_enum_size_warning,
+ pic_veneer);
+}
+
EOF
# Define some shell vars to insert bits of code into the standard elf
@@ -184,6 +253,15 @@ EOF
#
PARSE_AND_LIST_PROLOGUE='
#define OPTION_THUMB_ENTRY 301
+#define OPTION_BE8 302
+#define OPTION_TARGET1_REL 303
+#define OPTION_TARGET1_ABS 304
+#define OPTION_TARGET2 305
+#define OPTION_FIX_V4BX 306
+#define OPTION_USE_BLX 307
+#define OPTION_VFP11_DENORM_FIX 308
+#define OPTION_NO_ENUM_SIZE_WARNING 309
+#define OPTION_PIC_VENEER 310
'
PARSE_AND_LIST_SHORTOPTS=p
@@ -191,27 +269,89 @@ PARSE_AND_LIST_SHORTOPTS=p
PARSE_AND_LIST_LONGOPTS='
{ "no-pipeline-knowledge", no_argument, NULL, '\'p\''},
{ "thumb-entry", required_argument, NULL, OPTION_THUMB_ENTRY},
+ { "be8", no_argument, NULL, OPTION_BE8},
+ { "target1-rel", no_argument, NULL, OPTION_TARGET1_REL},
+ { "target1-abs", no_argument, NULL, OPTION_TARGET1_ABS},
+ { "target2", required_argument, NULL, OPTION_TARGET2},
+ { "fix-v4bx", no_argument, NULL, OPTION_FIX_V4BX},
+ { "use-blx", no_argument, NULL, OPTION_USE_BLX},
+ { "vfp11-denorm-fix", required_argument, NULL, OPTION_VFP11_DENORM_FIX},
+ { "no-enum-size-warning", no_argument, NULL, OPTION_NO_ENUM_SIZE_WARNING},
+ { "pic-veneer", no_argument, NULL, OPTION_PIC_VENEER},
'
PARSE_AND_LIST_OPTIONS='
- fprintf (file, _(" -p --no-pipeline-knowledge Stop the linker knowing about the pipeline length\n"));
fprintf (file, _(" --thumb-entry=<sym> Set the entry point to be Thumb symbol <sym>\n"));
+ fprintf (file, _(" --be8 Oputput BE8 format image\n"));
+ fprintf (file, _(" --target1=rel Interpret R_ARM_TARGET1 as R_ARM_REL32\n"));
+ fprintf (file, _(" --target1=abs Interpret R_ARM_TARGET1 as R_ARM_ABS32\n"));
+ fprintf (file, _(" --target2=<type> Specify definition of R_ARM_TARGET2\n"));
+ fprintf (file, _(" --fix-v4bx Rewrite BX rn as MOV pc, rn for ARMv4\n"));
+ fprintf (file, _(" --use-blx Enable use of BLX instructions\n"));
+ fprintf (file, _(" --vfp11-denorm-fix Specify how to fix VFP11 denorm erratum\n"));
+ fprintf (file, _(" --no-enum-size-warning Don'\''t warn about objects with incompatible enum sizes\n"));
+ fprintf (file, _(" --pic-veneer Always generate PIC interworking veneers\n"));
'
PARSE_AND_LIST_ARGS_CASES='
case '\'p\'':
- no_pipeline_knowledge = 1;
+ /* Only here for backwards compatibility. */
break;
case OPTION_THUMB_ENTRY:
thumb_entry_symbol = optarg;
break;
+
+ case OPTION_BE8:
+ byteswap_code = 1;
+ break;
+
+ case OPTION_TARGET1_REL:
+ target1_is_rel = 1;
+ break;
+
+ case OPTION_TARGET1_ABS:
+ target1_is_rel = 0;
+ break;
+
+ case OPTION_TARGET2:
+ target2_type = optarg;
+ break;
+
+ case OPTION_FIX_V4BX:
+ fix_v4bx = 1;
+ break;
+
+ case OPTION_USE_BLX:
+ use_blx = 1;
+ break;
+
+ case OPTION_VFP11_DENORM_FIX:
+ if (strcmp (optarg, "none") == 0)
+ vfp11_denorm_fix = BFD_ARM_VFP11_FIX_NONE;
+ else if (strcmp (optarg, "scalar") == 0)
+ vfp11_denorm_fix = BFD_ARM_VFP11_FIX_SCALAR;
+ else if (strcmp (optarg, "vector") == 0)
+ vfp11_denorm_fix = BFD_ARM_VFP11_FIX_VECTOR;
+ else
+ einfo (_("Unrecognized VFP11 fix type '\''%s'\''.\n"), optarg);
+ break;
+
+ case OPTION_NO_ENUM_SIZE_WARNING:
+ no_enum_size_warning = 1;
+ break;
+
+ case OPTION_PIC_VENEER:
+ pic_veneer = 1;
+ break;
'
# We have our own after_open and before_allocation functions, but they call
# the standard routines, so give them a different name.
LDEMUL_AFTER_OPEN=arm_elf_after_open
LDEMUL_BEFORE_ALLOCATION=arm_elf_before_allocation
+LDEMUL_AFTER_ALLOCATION=arm_elf_after_allocation
+LDEMUL_CREATE_OUTPUT_SECTION_STATEMENTS=arm_elf_create_output_section_statements
# Replace the elf before_parse function with our own.
LDEMUL_BEFORE_PARSE=gld"${EMULATION_NAME}"_before_parse
diff --git a/contrib/binutils/ld/emultempl/armelf_oabi.em b/contrib/binutils/ld/emultempl/armelf_oabi.em
deleted file mode 100644
index d75c658..0000000
--- a/contrib/binutils/ld/emultempl/armelf_oabi.em
+++ /dev/null
@@ -1,176 +0,0 @@
-# This shell script emits a C file. -*- C -*-
-# It does some substitutions.
-cat >e${EMULATION_NAME}.c <<EOF
-/* This file is is generated by a shell script. DO NOT EDIT! */
-
-/* emulate the original gld for the given ${EMULATION_NAME}
- Copyright 1991, 1993, 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003,
- 2004 Free Software Foundation, Inc.
- Written by Steve Chamberlain steve@cygnus.com
-
-This file is part of GLD, the Gnu Linker.
-
-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. */
-
-#define TARGET_IS_${EMULATION_NAME}
-
-#define bfd_elf32_arm_allocate_interworking_sections \
- bfd_elf32_arm_oabi_allocate_interworking_sections
-#define bfd_elf32_arm_get_bfd_for_interworking \
- bfd_elf32_arm_oabi_get_bfd_for_interworking
-#define bfd_elf32_arm_process_before_allocation \
- bfd_elf32_arm_oabi_process_before_allocation
-
-#include "bfd.h"
-#include "sysdep.h"
-#include "bfdlink.h"
-#include "getopt.h"
-
-#include "ld.h"
-#include "ldmain.h"
-#include "ldmisc.h"
-
-#include "ldexp.h"
-#include "ldlang.h"
-#include "ldfile.h"
-#include "ldemul.h"
-
-static void
-gld${EMULATION_NAME}_before_parse (void)
-{
-#ifndef TARGET_ /* I.e., if not generic. */
- ldfile_set_output_arch ("`echo ${ARCH}`", bfd_arch_unknown);
-#endif /* not TARGET_ */
-}
-
-/* This is called after the sections have been attached to output
- sections, but before any sizes or addresses have been set. */
-
-static void
-gld${EMULATION_NAME}_before_allocation (void)
-{
- /* 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 (!bfd_elf32_arm_process_before_allocation (is->the_bfd, &link_info, 0))
- {
- /* xgettext:c-format */
- einfo (_("Errors encountered processing file %s"), is->filename);
- }
- }
- }
-
- /* We have seen it all. Allocate it, and carry on */
- bfd_elf32_arm_allocate_interworking_sections (& link_info);
-}
-
-static void
-gld${EMULATION_NAME}_after_open (void)
-{
-
- LANG_FOR_EACH_INPUT_STATEMENT (is)
- {
- /* The interworking bfd must be the last one to be processed */
- if (!is->next)
- bfd_elf32_arm_get_bfd_for_interworking (is->the_bfd, & link_info);
- }
-}
-
-static char *
-gld${EMULATION_NAME}_get_script (int *isfile)
-EOF
-
-if test -n "$COMPILE_IN"
-then
-# Scripts compiled in.
-
-# sed commands to quote an ld script as a C string.
-sc="-f stringify.sed"
-
-cat >>e${EMULATION_NAME}.c <<EOF
-{
- *isfile = 0;
-
- if (link_info.relocatable && config.build_constructors)
- return
-EOF
-sed $sc ldscripts/${EMULATION_NAME}.xu >> e${EMULATION_NAME}.c
-echo ' ; else if (link_info.relocatable) return' >> e${EMULATION_NAME}.c
-sed $sc ldscripts/${EMULATION_NAME}.xr >> e${EMULATION_NAME}.c
-echo ' ; else if (!config.text_read_only) return' >> e${EMULATION_NAME}.c
-sed $sc ldscripts/${EMULATION_NAME}.xbn >> e${EMULATION_NAME}.c
-echo ' ; else if (!config.magic_demand_paged) return' >> e${EMULATION_NAME}.c
-sed $sc ldscripts/${EMULATION_NAME}.xn >> e${EMULATION_NAME}.c
-echo ' ; else return' >> e${EMULATION_NAME}.c
-sed $sc ldscripts/${EMULATION_NAME}.x >> e${EMULATION_NAME}.c
-echo '; }' >> e${EMULATION_NAME}.c
-
-else
-# Scripts read from the filesystem.
-
-cat >>e${EMULATION_NAME}.c <<EOF
-{
- *isfile = 1;
-
- if (link_info.relocatable && config.build_constructors)
- return "ldscripts/${EMULATION_NAME}.xu";
- else if (link_info.relocatable)
- return "ldscripts/${EMULATION_NAME}.xr";
- else if (!config.text_read_only)
- return "ldscripts/${EMULATION_NAME}.xbn";
- else if (!config.magic_demand_paged)
- return "ldscripts/${EMULATION_NAME}.xn";
- else
- return "ldscripts/${EMULATION_NAME}.x";
-}
-EOF
-
-fi
-
-cat >>e${EMULATION_NAME}.c <<EOF
-
-struct ld_emulation_xfer_struct ld_${EMULATION_NAME}_emulation =
-{
- gld${EMULATION_NAME}_before_parse,
- syslib_default,
- hll_default,
- after_parse_default,
- gld${EMULATION_NAME}_after_open,
- after_allocation_default,
- set_output_arch_default,
- ldemul_default_target,
- gld${EMULATION_NAME}_before_allocation,
- gld${EMULATION_NAME}_get_script,
- "${EMULATION_NAME}",
- "${OUTPUT_FORMAT}",
- NULL, /* finish */
- NULL, /* create output section statements */
- NULL, /* open dynamic archive */
- NULL, /* place orphan */
- NULL, /* set symbols */
- NULL, /* parse args */
- NULL, /* add_options */
- NULL, /* handle_option */
- NULL, /* unrecognized file */
- NULL, /* list options */
- NULL, /* recognized file */
- NULL, /* find_potential_libraries */
- NULL /* new_vers_pattern */
-};
-EOF
diff --git a/contrib/binutils/ld/emultempl/avrelf.em b/contrib/binutils/ld/emultempl/avrelf.em
new file mode 100644
index 0000000..1f5ab5c
--- /dev/null
+++ b/contrib/binutils/ld/emultempl/avrelf.em
@@ -0,0 +1,269 @@
+# This shell script emits a C file. -*- C -*-
+# Copyright 2006
+# Free Software Foundation, Inc.
+#
+# This file is part of GLD, the Gnu Linker.
+#
+# 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., 51 Franklin Street - Fifth Floor, Boston,
+# MA 02110-1301 USA.
+
+# This file is sourced from elf32.em, and defines extra avr-elf
+# specific routines. It is used to generate the trampolines for the avr6
+# family devices where one needs to address the issue that it is not possible
+# to reach the whole program memory by using 16 bit pointers.
+
+cat >>e${EMULATION_NAME}.c <<EOF
+
+#include "elf32-avr.h"
+#include "ldctor.h"
+
+/* The fake file and it's corresponding section meant to hold
+ the linker stubs if needed. */
+
+static lang_input_statement_type *stub_file;
+static asection *avr_stub_section;
+
+/* Variables set by the command-line parameters and transfered
+ to the bfd without use of global shared variables. */
+
+static bfd_boolean avr_no_stubs = FALSE;
+static bfd_boolean avr_debug_relax = FALSE;
+static bfd_boolean avr_debug_stubs = FALSE;
+static bfd_boolean avr_replace_call_ret_sequences = TRUE;
+static bfd_vma avr_pc_wrap_around = 0x10000000;
+
+/* Transfers information to the bfd frontend. */
+
+static void
+avr_elf_set_global_bfd_parameters (void)
+{
+ elf32_avr_setup_params (& link_info,
+ stub_file->the_bfd,
+ avr_stub_section,
+ avr_no_stubs,
+ avr_debug_stubs,
+ avr_debug_relax,
+ avr_pc_wrap_around,
+ avr_replace_call_ret_sequences);
+}
+
+
+/* Makes a conservative estimate of the trampoline section size that could
+ be corrected later on. */
+
+static void
+avr_elf_${EMULATION_NAME}_before_allocation (void)
+{
+ int ret;
+
+ gld${EMULATION_NAME}_before_allocation ();
+
+ /* We only need stubs for the avr6 family. */
+ if (strcmp ("${EMULATION_NAME}","avr6"))
+ avr_no_stubs = TRUE;
+
+ avr_elf_set_global_bfd_parameters ();
+
+ /* If generating a relocatable output file, then
+ we don't have to generate the trampolines. */
+ if (link_info.relocatable)
+ avr_no_stubs = TRUE;
+
+ if (avr_no_stubs)
+ return;
+
+ ret = elf32_avr_setup_section_lists (output_bfd, &link_info);
+
+ if (ret < 0)
+ einfo ("%X%P: can not setup the input section list: %E\n");
+
+ if (ret <= 0)
+ return;
+
+ /* Call into the BFD backend to do the real "stub"-work. */
+ if (! elf32_avr_size_stubs (output_bfd, &link_info, TRUE))
+ einfo ("%X%P: can not size stub section: %E\n");
+}
+
+/* This is called before the input files are opened. We create a new
+ fake input file to hold the stub section and generate the section itself. */
+
+static void
+avr_elf_create_output_section_statements (void)
+{
+ flagword flags;
+
+ stub_file = lang_add_input_file ("linker stubs",
+ lang_input_file_is_fake_enum,
+ NULL);
+
+ stub_file->the_bfd = bfd_create ("linker stubs", output_bfd);
+ if (stub_file->the_bfd == NULL
+ || !bfd_set_arch_mach (stub_file->the_bfd,
+ bfd_get_arch (output_bfd),
+ bfd_get_mach (output_bfd)))
+ {
+ einfo ("%X%P: can not create stub BFD %E\n");
+ return;
+ }
+
+ /* Now we add the stub section. */
+
+ avr_stub_section = bfd_make_section_anyway (stub_file->the_bfd,
+ ".trampolines");
+ if (avr_stub_section == NULL)
+ goto err_ret;
+
+ flags = (SEC_ALLOC | SEC_LOAD | SEC_READONLY | SEC_CODE
+ | SEC_HAS_CONTENTS | SEC_RELOC | SEC_IN_MEMORY | SEC_KEEP);
+ if (!bfd_set_section_flags (stub_file->the_bfd, avr_stub_section, flags))
+ goto err_ret;
+
+ avr_stub_section->alignment_power = 1;
+
+ ldlang_add_file (stub_file);
+
+ return;
+
+ err_ret:
+ einfo ("%X%P: can not make stub section: %E\n");
+ return;
+}
+
+/* Re-calculates the size of the stubs so that we won't waste space. */
+
+static void
+avr_elf_finish (void)
+{
+ if (!avr_no_stubs)
+ {
+ /* Now build the linker stubs. */
+ if (stub_file->the_bfd->sections != NULL)
+ {
+ /* Call again the trampoline analyzer to initialize the trampoline
+ stubs with the correct symbol addresses. Since there could have
+ been relaxation, the symbol addresses that were found during
+ first call may no longer be correct. */
+ if (!elf32_avr_size_stubs (output_bfd, &link_info, FALSE))
+ {
+ einfo ("%X%P: can not size stub section: %E\n");
+ return;
+ }
+
+ if (!elf32_avr_build_stubs (&link_info))
+ einfo ("%X%P: can not build stubs: %E\n");
+ }
+ }
+
+ gld${EMULATION_NAME}_finish ();
+}
+
+
+EOF
+
+
+PARSE_AND_LIST_PROLOGUE='
+
+#define OPTION_NO_CALL_RET_REPLACEMENT 301
+#define OPTION_PMEM_WRAP_AROUND 302
+#define OPTION_NO_STUBS 303
+#define OPTION_DEBUG_STUBS 304
+#define OPTION_DEBUG_RELAX 305
+'
+
+PARSE_AND_LIST_LONGOPTS='
+ { "no-call-ret-replacement", no_argument,
+ NULL, OPTION_NO_CALL_RET_REPLACEMENT},
+ { "pmem-wrap-around", required_argument,
+ NULL, OPTION_PMEM_WRAP_AROUND},
+ { "no-stubs", no_argument,
+ NULL, OPTION_NO_STUBS},
+ { "debug-stubs", no_argument,
+ NULL, OPTION_DEBUG_STUBS},
+ { "debug-relax", no_argument,
+ NULL, OPTION_DEBUG_RELAX},
+'
+
+PARSE_AND_LIST_OPTIONS='
+ fprintf (file, _(" --pmem-wrap-around=<val> "
+ "Make the linker relaxation machine assume that a\n"
+ " "
+ "program counter wrap-around occures at address\n"
+ " "
+ "<val>. Supported values are 8k, 16k, 32k and 64k.\n"));
+ fprintf (file, _(" --no-call-ret-replacement "
+ "The relaxation machine normally will\n"
+ " "
+ "substitute two immediately following call/ret\n"
+ " "
+ "instructions by a single jump instruction.\n"
+ " "
+ "This option disables this optimization.\n"));
+ fprintf (file, _(" --no-stubs "
+ "If the linker detects to attempt to access\n"
+ " "
+ "an instruction beyond 128k by a reloc that\n"
+ " "
+ "is limited to 128k max, it inserts a jump\n"
+ " "
+ "stub. You can de-active this with this switch.\n"));
+ fprintf (file, _(" --debug-stubs Used for debugging avr-ld.\n"));
+ fprintf (file, _(" --debug-relax Used for debugging avr-ld.\n"));
+'
+
+PARSE_AND_LIST_ARGS_CASES='
+
+ case OPTION_PMEM_WRAP_AROUND:
+ {
+ /* This variable is defined in the bfd library. */
+ if ((!strcmp (optarg,"32k")) || (!strcmp (optarg,"32K")))
+ avr_pc_wrap_around = 32768;
+ else if ((!strcmp (optarg,"8k")) || (!strcmp (optarg,"8K")))
+ avr_pc_wrap_around = 8192;
+ else if ((!strcmp (optarg,"16k")) || (!strcmp (optarg,"16K")))
+ avr_pc_wrap_around = 16384;
+ else if ((!strcmp (optarg,"64k")) || (!strcmp (optarg,"64K")))
+ avr_pc_wrap_around = 0x10000;
+ else
+ return FALSE;
+ }
+ break;
+
+ case OPTION_DEBUG_STUBS:
+ avr_debug_stubs = TRUE;
+ break;
+
+ case OPTION_DEBUG_RELAX:
+ avr_debug_relax = TRUE;
+ break;
+
+ case OPTION_NO_STUBS:
+ avr_no_stubs = TRUE;
+ break;
+
+ case OPTION_NO_CALL_RET_REPLACEMENT:
+ {
+ /* This variable is defined in the bfd library. */
+ avr_replace_call_ret_sequences = FALSE;
+ }
+ break;
+'
+
+#
+# Put these extra avr-elf routines in ld_${EMULATION_NAME}_emulation
+#
+LDEMUL_BEFORE_ALLOCATION=avr_elf_${EMULATION_NAME}_before_allocation
+LDEMUL_FINISH=avr_elf_finish
+LDEMUL_CREATE_OUTPUT_SECTION_STATEMENTS=avr_elf_create_output_section_statements
diff --git a/contrib/binutils/ld/emultempl/cr16elf.em b/contrib/binutils/ld/emultempl/cr16elf.em
new file mode 100644
index 0000000..0881634
--- /dev/null
+++ b/contrib/binutils/ld/emultempl/cr16elf.em
@@ -0,0 +1,92 @@
+# This shell script emits a C file. -*- C -*-
+# Copyright 2007 Free Software Foundation, Inc.
+# Contributed by M R Swami Reddy <MR.Swami.Reddy@nsc.com>
+#
+# This file is part of GLD, the Gnu Linker.
+#
+# 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., 51 Franklin Street - Fifth Floor, Boston, MA 02110-1301, USA.
+#
+
+# This file is sourced from elf32.em, and defines extra cr16-elf
+# specific routines.
+#
+cat >>e${EMULATION_NAME}.c <<EOF
+
+#include "ldctor.h"
+
+/* Flag for the emulation-specific "--no-relax" option. */
+static bfd_boolean disable_relaxation = FALSE;
+
+static void
+cr16elf_after_parse (void)
+{
+ /* Always behave as if called with --sort-common command line
+ option.
+ This is to emulate the CRTools' method of keeping variables
+ of different alignment in separate sections. */
+ config.sort_common = TRUE;
+
+ /* Don't create a demand-paged executable, since this feature isn't
+ meaninful in CR16 embedded systems. Moreover, when magic_demand_paged
+ is true the link sometimes fails. */
+ config.magic_demand_paged = FALSE;
+}
+
+/* This is called after the sections have been attached to output
+ sections, but before any sizes or addresses have been set. */
+
+static void
+cr16elf_before_allocation (void)
+{
+ /* Call the default first. */
+ gld${EMULATION_NAME}_before_allocation ();
+
+ /* Enable relaxation by default if the "--no-relax" option was not
+ specified. This is done here instead of in the before_parse hook
+ because there is a check in main() to prohibit use of --relax and
+ -r together. */
+
+ if (!disable_relaxation)
+ command_line.relax = TRUE;
+}
+
+EOF
+
+# Define some shell vars to insert bits of code into the standard elf
+# parse_args and list_options functions.
+#
+PARSE_AND_LIST_PROLOGUE='
+#define OPTION_NO_RELAX 301
+'
+
+PARSE_AND_LIST_LONGOPTS='
+ { "no-relax", no_argument, NULL, OPTION_NO_RELAX},
+'
+
+PARSE_AND_LIST_OPTIONS='
+ fprintf (file, _(" --no-relax Do not relax branches\n"));
+'
+
+PARSE_AND_LIST_ARGS_CASES='
+ case OPTION_NO_RELAX:
+ disable_relaxation = TRUE;
+ break;
+'
+
+# Put these extra cr16-elf routines in ld_${EMULATION_NAME}_emulation
+#
+LDEMUL_AFTER_PARSE=cr16elf_after_parse
+LDEMUL_BEFORE_ALLOCATION=cr16elf_before_allocation
+
diff --git a/contrib/binutils/ld/emultempl/elf-generic.em b/contrib/binutils/ld/emultempl/elf-generic.em
new file mode 100644
index 0000000..7edee8b
--- /dev/null
+++ b/contrib/binutils/ld/emultempl/elf-generic.em
@@ -0,0 +1,81 @@
+# This shell script emits a C file. -*- C -*-
+# Copyright 2006 Free Software Foundation, Inc.
+#
+# This file is part of GLD, the Gnu Linker.
+#
+# 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.,
+# 51 Franklin Street - Fifth Floor, Boston, MA 02110-1301, USA.
+#
+
+# This file is sourced from elf32.em and from ELF targets that use
+# generic.em.
+#
+cat >>e${EMULATION_NAME}.c <<EOF
+
+static void
+gld${EMULATION_NAME}_map_segments (bfd_boolean need_layout)
+{
+ int tries = 10;
+
+ do
+ {
+ if (need_layout)
+ {
+ lang_reset_memory_regions ();
+
+ /* Resize the sections. */
+ lang_size_sections (NULL, TRUE);
+
+ /* Redo special stuff. */
+ ldemul_after_allocation ();
+
+ /* Do the assignments again. */
+ lang_do_assignments ();
+
+ need_layout = FALSE;
+ }
+
+ if (output_bfd->xvec->flavour == bfd_target_elf_flavour
+ && !link_info.relocatable)
+ {
+ bfd_size_type phdr_size;
+
+ phdr_size = elf_tdata (output_bfd)->program_header_size;
+ /* If we don't have user supplied phdrs, throw away any
+ previous linker generated program headers. */
+ if (lang_phdr_list == NULL)
+ elf_tdata (output_bfd)->segment_map = NULL;
+ if (!_bfd_elf_map_sections_to_segments (output_bfd, &link_info))
+ einfo ("%F%P: map sections to segments failed: %E\n");
+
+ if (phdr_size != elf_tdata (output_bfd)->program_header_size)
+ {
+ if (tries > 6)
+ /* The first few times we allow any change to
+ phdr_size . */
+ need_layout = TRUE;
+ else if (phdr_size < elf_tdata (output_bfd)->program_header_size)
+ /* After that we only allow the size to grow. */
+ need_layout = TRUE;
+ else
+ elf_tdata (output_bfd)->program_header_size = phdr_size;
+ }
+ }
+ }
+ while (need_layout && --tries);
+
+ if (tries == 0)
+ einfo (_("%P%F: looping in map_segments"));
+}
+EOF
diff --git a/contrib/binutils/ld/emultempl/elf32.em b/contrib/binutils/ld/emultempl/elf32.em
index b970e56..d9f6fbb 100644
--- a/contrib/binutils/ld/emultempl/elf32.em
+++ b/contrib/binutils/ld/emultempl/elf32.em
@@ -1,6 +1,3 @@
-# $FreeBSD$
-
-
# This shell script emits a C file. -*- C -*-
# It does some substitutions.
# This file is now misnamed, because it supports both 32 bit and 64 bit
@@ -16,7 +13,7 @@ cat >e${EMULATION_NAME}.c <<EOF
/* ${ELFSIZE} bit ELF emulation code for ${EMULATION_NAME}
Copyright 1991, 1993, 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001,
- 2002, 2003, 2004 Free Software Foundation, Inc.
+ 2002, 2003, 2004, 2005, 2006, 2007 Free Software Foundation, Inc.
Written by Steve Chamberlain <sac@cygnus.com>
ELF support by Ian Lance Taylor <ian@cygnus.com>
@@ -34,12 +31,12 @@ 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. */
+Foundation, Inc., 51 Franklin Street - Fifth Floor, Boston, MA 02110-1301, USA. */
#define TARGET_IS_${EMULATION_NAME}
-#include "bfd.h"
#include "sysdep.h"
+#include "bfd.h"
#include "libiberty.h"
#include "safe-ctype.h"
#include "getopt.h"
@@ -55,19 +52,32 @@ Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */
#include "ldemul.h"
#include <ldgram.h>
#include "elf/common.h"
+#include "elf-bfd.h"
/* Declare functions used by various EXTRA_EM_FILEs. */
static void gld${EMULATION_NAME}_before_parse (void);
static void gld${EMULATION_NAME}_after_open (void);
static void gld${EMULATION_NAME}_before_allocation (void);
-static bfd_boolean gld${EMULATION_NAME}_place_orphan
- (lang_input_statement_type *file, asection *s);
+static bfd_boolean gld${EMULATION_NAME}_place_orphan (asection *s);
static void gld${EMULATION_NAME}_finish (void);
EOF
+if [ "x${USE_LIBPATH}" = xyes ] ; then
+ case ${target} in
+ *-*-linux-* | *-*-k*bsd*-*)
+ cat >>e${EMULATION_NAME}.c <<EOF
+#ifdef HAVE_GLOB
+#include <glob.h>
+#endif
+EOF
+ ;;
+ esac
+fi
+
# Import any needed special functions and/or overrides.
#
+. ${srcdir}/emultempl/elf-generic.em
if test -n "$EXTRA_EM_FILE" ; then
. ${srcdir}/emultempl/${EXTRA_EM_FILE}.em
fi
@@ -99,14 +109,30 @@ cat >>e${EMULATION_NAME}.c <<EOF
static bfd_boolean
gld${EMULATION_NAME}_load_symbols (lang_input_statement_type *entry)
{
- if (!entry->as_needed
- || (bfd_get_file_flags (entry->the_bfd) & DYNAMIC) == 0)
- return FALSE;
+ int class = 0;
/* Tell the ELF linker that we don't want the output file to have a
DT_NEEDED entry for this file, unless it is used to resolve
references in a regular object. */
- bfd_elf_set_dyn_lib_class (entry->the_bfd, DYN_AS_NEEDED);
+ if (entry->as_needed)
+ class = DYN_AS_NEEDED;
+
+ /* Tell the ELF linker that we don't want the output file to have a
+ DT_NEEDED entry for any dynamic library in DT_NEEDED tags from
+ this file at all. */
+ if (!entry->add_needed)
+ class |= DYN_NO_ADD_NEEDED;
+
+ if (entry->just_syms_flag
+ && (bfd_get_file_flags (entry->the_bfd) & DYNAMIC) != 0)
+ einfo (_("%P%F: --just-symbols may not be used on DSO: %B\n"),
+ entry->the_bfd);
+
+ if (!class
+ || (bfd_get_file_flags (entry->the_bfd) & DYNAMIC) == 0)
+ return FALSE;
+
+ bfd_elf_set_dyn_lib_class (entry->the_bfd, class);
/* Continue on with normal load_symbols processing. */
return FALSE;
@@ -121,7 +147,7 @@ cat >>e${EMULATION_NAME}.c <<EOF
static struct bfd_link_needed_list *global_needed;
static struct stat global_stat;
-static bfd_boolean global_found;
+static lang_input_statement_type *global_found;
static struct bfd_link_needed_list *global_vercheck_needed;
static bfd_boolean global_vercheck_failed;
@@ -202,21 +228,34 @@ gld${EMULATION_NAME}_stat_needed (lang_input_statement_type *s)
const char *suffix;
const char *soname;
- if (global_found)
+ if (global_found != NULL)
return;
if (s->the_bfd == NULL)
return;
+ /* If this input file was an as-needed entry, and wasn't found to be
+ needed at the stage it was linked, then don't say we have loaded it. */
+ if ((bfd_elf_get_dyn_lib_class (s->the_bfd) & DYN_AS_NEEDED) != 0)
+ return;
+
if (bfd_stat (s->the_bfd, &st) != 0)
{
einfo ("%P:%B: bfd_stat failed: %E\n", s->the_bfd);
return;
}
+ /* Some operating systems, e.g. Windows, do not provide a meaningful
+ st_ino; they always set it to zero. (Windows does provide a
+ meaningful st_dev.) Do not indicate a duplicate library in that
+ case. While there is no guarantee that a system that provides
+ meaningful inode numbers will never set st_ino to zero, this is
+ merely an optimization, so we do not need to worry about false
+ negatives. */
if (st.st_dev == global_stat.st_dev
- && st.st_ino == global_stat.st_ino)
+ && st.st_ino == global_stat.st_ino
+ && st.st_ino != 0)
{
- global_found = TRUE;
+ global_found = s;
return;
}
@@ -245,16 +284,24 @@ gld${EMULATION_NAME}_stat_needed (lang_input_statement_type *s)
global_needed->name, global_needed->by, soname);
}
+struct dt_needed
+{
+ bfd *by;
+ const char *name;
+};
/* This function is called for each possible name for a dynamic object
named by a DT_NEEDED entry. The FORCE parameter indicates whether
to skip the check for a conflicting version. */
static bfd_boolean
-gld${EMULATION_NAME}_try_needed (const char *name, int force)
+gld${EMULATION_NAME}_try_needed (struct dt_needed *needed,
+ int force)
{
bfd *abfd;
+ const char *name = needed->name;
const char *soname;
+ int class;
abfd = bfd_openr (name, bfd_get_target (output_bfd));
if (abfd == NULL)
@@ -311,13 +358,13 @@ gld${EMULATION_NAME}_try_needed (const char *name, int force)
EOF
case ${target} in
- *-*-linux-gnu*)
+ *-*-linux-* | *-*-k*bsd*-*)
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)
+ if (CONST_STRNEQ (l->name, "libc.so"))
break;
if (l == NULL)
{
@@ -352,9 +399,9 @@ cat >>e${EMULATION_NAME}.c <<EOF
if (trace_file_tries)
info_msg (_("found %s at %s\n"), soname, name);
- global_found = FALSE;
+ global_found = NULL;
lang_for_each_input_file (gld${EMULATION_NAME}_stat_needed);
- if (global_found)
+ if (global_found != NULL)
{
/* Return TRUE to indicate that we found the file, even though
we aren't going to do anything with it. */
@@ -367,7 +414,16 @@ cat >>e${EMULATION_NAME}.c <<EOF
/* Tell the ELF linker that we don't want the output file to have a
DT_NEEDED entry for this file, unless it is used to resolve
references in a regular object. */
- bfd_elf_set_dyn_lib_class (abfd, DYN_DT_NEEDED);
+ class = DYN_DT_NEEDED;
+
+ /* Tell the ELF linker that we don't want the output file to have a
+ DT_NEEDED entry for this file at all if the entry is from a file
+ with DYN_NO_ADD_NEEDED. */
+ if (needed->by != NULL
+ && (bfd_elf_get_dyn_lib_class (needed->by) & DYN_NO_ADD_NEEDED) != 0)
+ class |= DYN_NO_NEEDED | DYN_NO_ADD_NEEDED;
+
+ bfd_elf_set_dyn_lib_class (abfd, class);
/* Add this file into the symbol table. */
if (! bfd_link_add_symbols (abfd, &link_info))
@@ -380,22 +436,29 @@ cat >>e${EMULATION_NAME}.c <<EOF
/* Search for a needed file in a path. */
static bfd_boolean
-gld${EMULATION_NAME}_search_needed (const char *path, const char *name, int force)
+gld${EMULATION_NAME}_search_needed (const char *path,
+ struct dt_needed *n, int force)
{
const char *s;
+ const char *name = n->name;
size_t len;
+ struct dt_needed needed;
if (name[0] == '/')
- return gld${EMULATION_NAME}_try_needed (name, force);
+ return gld${EMULATION_NAME}_try_needed (n, force);
if (path == NULL || *path == '\0')
return FALSE;
+
+ needed.by = n->by;
+ needed.name = n->name;
+
len = strlen (name);
while (1)
{
char *filename, *sset;
- s = strchr (path, ':');
+ s = strchr (path, config.rpath_separator);
if (s == NULL)
s = path + strlen (path);
@@ -410,7 +473,8 @@ gld${EMULATION_NAME}_search_needed (const char *path, const char *name, int forc
}
strcpy (sset, name);
- if (gld${EMULATION_NAME}_try_needed (filename, force))
+ needed.name = filename;
+ if (gld${EMULATION_NAME}_try_needed (&needed, force))
return TRUE;
free (filename);
@@ -427,7 +491,8 @@ EOF
if [ "x${USE_LIBPATH}" = xyes ] ; then
cat >>e${EMULATION_NAME}.c <<EOF
-/* Add the sysroot to every entry in a colon-separated path. */
+/* Add the sysroot to every entry in a path separated by
+ config.rpath_separator. */
static char *
gld${EMULATION_NAME}_add_sysroot (const char *path)
@@ -439,7 +504,7 @@ gld${EMULATION_NAME}_add_sysroot (const char *path)
colons = 0;
i = 0;
while (path[i])
- if (path[i++] == ':')
+ if (path[i++] == config.rpath_separator)
colons++;
if (path[i])
@@ -451,7 +516,7 @@ gld${EMULATION_NAME}_add_sysroot (const char *path)
p = ret + strlen (ret);
i = 0;
while (path[i])
- if (path[i] == ':')
+ if (path[i] == config.rpath_separator)
{
*p++ = path[i++];
strcpy (p, ld_sysroot);
@@ -466,20 +531,23 @@ gld${EMULATION_NAME}_add_sysroot (const char *path)
EOF
case ${target} in
- *-*-freebsd*)
+ *-*-freebsd* | *-*-dragonfly*)
cat >>e${EMULATION_NAME}.c <<EOF
-/*
- * Read the system search path the FreeBSD way rather than like Linux.
- */
+/* Read the system search path the FreeBSD way rather than the Linux way. */
+#ifdef HAVE_ELF_HINTS_H
#include <elf-hints.h>
+#else
+#include "elf-hints-local.h"
+#endif
static bfd_boolean
gld${EMULATION_NAME}_check_ld_elf_hints (const char *name, int force)
{
static bfd_boolean initialized;
static char *ld_elf_hints;
+ struct dt_needed needed;
- if (! initialized)
+ if (!initialized)
{
FILE *f;
char *tmppath;
@@ -491,26 +559,20 @@ gld${EMULATION_NAME}_check_ld_elf_hints (const char *name, int force)
{
struct elfhints_hdr hdr;
- if (fread(&hdr, 1, sizeof(hdr), f) == sizeof(hdr) &&
- hdr.magic == ELFHINTS_MAGIC &&
- hdr.version == 1)
+ if (fread (&hdr, 1, sizeof (hdr), f) == sizeof (hdr)
+ && hdr.magic == ELFHINTS_MAGIC
+ && hdr.version == 1)
{
- if (fseek(f, hdr.strtab + hdr.dirlist, SEEK_SET) != -1)
+ if (fseek (f, hdr.strtab + hdr.dirlist, SEEK_SET) != -1)
{
char *b;
- b = (char *) xmalloc (hdr.dirlistlen + 1);
- if (fread(b, 1, hdr.dirlistlen + 1, f) !=
+ b = xmalloc (hdr.dirlistlen + 1);
+ if (fread (b, 1, hdr.dirlistlen + 1, f) ==
hdr.dirlistlen + 1)
- {
- free(b);
- b = NULL;
- }
- else
- {
- ld_elf_hints = gld${EMULATION_NAME}_add_sysroot (b);
- free (b);
- }
+ ld_elf_hints = gld${EMULATION_NAME}_add_sysroot (b);
+
+ free (b);
}
}
fclose (f);
@@ -522,98 +584,219 @@ gld${EMULATION_NAME}_check_ld_elf_hints (const char *name, int force)
if (ld_elf_hints == NULL)
return FALSE;
- return gld${EMULATION_NAME}_search_needed (ld_elf_hints, name, force);
+ needed.by = NULL;
+ needed.name = name;
+ return gld${EMULATION_NAME}_search_needed (ld_elf_hints, & needed,
+ force);
}
EOF
# FreeBSD
;;
- *-*-linux-gnu*)
+ *-*-linux-* | *-*-k*bsd*-*)
cat >>e${EMULATION_NAME}.c <<EOF
/* For a native linker, check the file /etc/ld.so.conf for directories
in which we may find shared libraries. /etc/ld.so.conf is really
only meaningful on Linux. */
+struct gld${EMULATION_NAME}_ld_so_conf
+{
+ char *path;
+ size_t len, alloc;
+};
+
static bfd_boolean
-gld${EMULATION_NAME}_check_ld_so_conf (const char *name, int force)
+gld${EMULATION_NAME}_parse_ld_so_conf
+ (struct gld${EMULATION_NAME}_ld_so_conf *info, const char *filename);
+
+static void
+gld${EMULATION_NAME}_parse_ld_so_conf_include
+ (struct gld${EMULATION_NAME}_ld_so_conf *info, const char *filename,
+ const char *pattern)
{
- static bfd_boolean initialized;
- static char *ld_so_conf;
+ char *newp = NULL;
+#ifdef HAVE_GLOB
+ glob_t gl;
+#endif
- if (! initialized)
+ if (pattern[0] != '/')
{
- FILE *f;
- char *tmppath;
+ char *p = strrchr (filename, '/');
+ size_t patlen = strlen (pattern) + 1;
- tmppath = concat (ld_sysroot, "/etc/ld.so.conf", NULL);
- f = fopen (tmppath, FOPEN_RT);
- free (tmppath);
- if (f != NULL)
+ newp = xmalloc (p - filename + 1 + patlen);
+ memcpy (newp, filename, p - filename + 1);
+ memcpy (newp + (p - filename + 1), pattern, patlen);
+ pattern = newp;
+ }
+
+#ifdef HAVE_GLOB
+ if (glob (pattern, 0, NULL, &gl) == 0)
+ {
+ size_t i;
+
+ for (i = 0; i < gl.gl_pathc; ++i)
+ gld${EMULATION_NAME}_parse_ld_so_conf (info, gl.gl_pathv[i]);
+ globfree (&gl);
+ }
+#else
+ /* If we do not have glob, treat the pattern as a literal filename. */
+ gld${EMULATION_NAME}_parse_ld_so_conf (info, pattern);
+#endif
+
+ if (newp)
+ free (newp);
+}
+
+static bfd_boolean
+gld${EMULATION_NAME}_parse_ld_so_conf
+ (struct gld${EMULATION_NAME}_ld_so_conf *info, const char *filename)
+{
+ FILE *f = fopen (filename, FOPEN_RT);
+ char *line;
+ size_t linelen;
+
+ if (f == NULL)
+ return FALSE;
+
+ linelen = 256;
+ line = xmalloc (linelen);
+ do
+ {
+ char *p = line, *q;
+
+ /* Normally this would use getline(3), but we need to be portable. */
+ while ((q = fgets (p, linelen - (p - line), f)) != NULL
+ && strlen (q) == linelen - (p - line) - 1
+ && line[linelen - 2] != '\n')
{
- char *b;
- size_t len, alloc;
- int c;
+ line = xrealloc (line, 2 * linelen);
+ p = line + linelen - 1;
+ linelen += linelen;
+ }
+
+ if (q == NULL && p == line)
+ break;
- len = 0;
- alloc = 100;
- b = (char *) xmalloc (alloc);
+ p = strchr (line, '\n');
+ if (p)
+ *p = '\0';
- while ((c = getc (f)) != EOF)
+ /* Because the file format does not know any form of quoting we
+ can search forward for the next '#' character and if found
+ make it terminating the line. */
+ p = strchr (line, '#');
+ if (p)
+ *p = '\0';
+
+ /* Remove leading whitespace. NUL is no whitespace character. */
+ p = line;
+ while (*p == ' ' || *p == '\f' || *p == '\r' || *p == '\t' || *p == '\v')
+ ++p;
+
+ /* If the line is blank it is ignored. */
+ if (p[0] == '\0')
+ continue;
+
+ if (CONST_STRNEQ (p, "include") && (p[7] == ' ' || p[7] == '\t'))
+ {
+ char *dir, c;
+ p += 8;
+ do
{
- if (len + 1 >= alloc)
- {
- alloc *= 2;
- b = (char *) xrealloc (b, alloc);
- }
- if (c != ':'
- && c != ' '
- && c != '\t'
- && c != '\n'
- && c != ',')
- {
- b[len] = c;
- ++len;
- }
- else
- {
- if (len > 0 && b[len - 1] != ':')
- {
- b[len] = ':';
- ++len;
- }
- }
- }
+ while (*p == ' ' || *p == '\t')
+ ++p;
+
+ if (*p == '\0')
+ break;
- if (len > 0 && b[len - 1] == ':')
- --len;
+ dir = p;
- if (len > 0)
- b[len] = '\0';
+ while (*p != ' ' && *p != '\t' && *p)
+ ++p;
+
+ c = *p;
+ *p++ = '\0';
+ if (dir[0] != '\0')
+ gld${EMULATION_NAME}_parse_ld_so_conf_include (info, filename,
+ dir);
+ }
+ while (c != '\0');
+ }
+ else
+ {
+ char *dir = p;
+ while (*p && *p != '=' && *p != ' ' && *p != '\t' && *p != '\f'
+ && *p != '\r' && *p != '\v')
+ ++p;
+
+ while (p != dir && p[-1] == '/')
+ --p;
+ if (info->path == NULL)
+ {
+ info->alloc = p - dir + 1 + 256;
+ info->path = xmalloc (info->alloc);
+ info->len = 0;
+ }
else
{
- free (b);
- b = NULL;
+ if (info->len + 1 + (p - dir) >= info->alloc)
+ {
+ info->alloc += p - dir + 256;
+ info->path = xrealloc (info->path, info->alloc);
+ }
+ info->path[info->len++] = config.rpath_separator;
}
+ memcpy (info->path + info->len, dir, p - dir);
+ info->len += p - dir;
+ info->path[info->len] = '\0';
+ }
+ }
+ while (! feof (f));
+ free (line);
+ fclose (f);
+ return TRUE;
+}
- fclose (f);
+static bfd_boolean
+gld${EMULATION_NAME}_check_ld_so_conf (const char *name, int force)
+{
+ static bfd_boolean initialized;
+ static char *ld_so_conf;
+ struct dt_needed needed;
- if (b)
- {
- char *d = gld${EMULATION_NAME}_add_sysroot (b);
- free (b);
- b = d;
- }
+ if (! initialized)
+ {
+ char *tmppath;
+ struct gld${EMULATION_NAME}_ld_so_conf info;
- ld_so_conf = b;
+ info.path = NULL;
+ info.len = info.alloc = 0;
+ tmppath = concat (ld_sysroot, "${prefix}/etc/ld.so.conf", NULL);
+ if (!gld${EMULATION_NAME}_parse_ld_so_conf (&info, tmppath))
+ {
+ free (tmppath);
+ tmppath = concat (ld_sysroot, "/etc/ld.so.conf", NULL);
+ gld${EMULATION_NAME}_parse_ld_so_conf (&info, tmppath);
}
+ free (tmppath);
+ if (info.path)
+ {
+ char *d = gld${EMULATION_NAME}_add_sysroot (info.path);
+ free (info.path);
+ ld_so_conf = d;
+ }
initialized = TRUE;
}
if (ld_so_conf == NULL)
return FALSE;
- return gld${EMULATION_NAME}_search_needed (ld_so_conf, name, force);
+
+ needed.by = NULL;
+ needed.name = name;
+ return gld${EMULATION_NAME}_search_needed (ld_so_conf, &needed, force);
}
EOF
@@ -628,43 +811,46 @@ cat >>e${EMULATION_NAME}.c <<EOF
static void
gld${EMULATION_NAME}_check_needed (lang_input_statement_type *s)
{
- if (global_found)
+ const char *soname;
+
+ /* Stop looking if we've found a loaded lib. */
+ if (global_found != NULL
+ && (bfd_elf_get_dyn_lib_class (global_found->the_bfd)
+ & DYN_AS_NEEDED) == 0)
return;
- if (s->filename != NULL)
- {
- const char *f;
+ if (s->filename == NULL || s->the_bfd == NULL)
+ return;
- if (strcmp (s->filename, global_needed->name) == 0)
- {
- global_found = TRUE;
- return;
- }
+ /* Don't look for a second non-loaded as-needed lib. */
+ if (global_found != NULL
+ && (bfd_elf_get_dyn_lib_class (s->the_bfd) & DYN_AS_NEEDED) != 0)
+ return;
- if (s->search_dirs_flag)
- {
- f = strrchr (s->filename, '/');
- if (f != NULL
- && strcmp (f + 1, global_needed->name) == 0)
- {
- global_found = TRUE;
- return;
- }
- }
+ if (strcmp (s->filename, global_needed->name) == 0)
+ {
+ global_found = s;
+ return;
}
- if (s->the_bfd != NULL)
+ if (s->search_dirs_flag)
{
- const char *soname;
-
- soname = bfd_elf_get_dt_soname (s->the_bfd);
- if (soname != NULL
- && strcmp (soname, global_needed->name) == 0)
+ const char *f = strrchr (s->filename, '/');
+ if (f != NULL
+ && strcmp (f + 1, global_needed->name) == 0)
{
- global_found = TRUE;
+ global_found = s;
return;
}
}
+
+ soname = bfd_elf_get_dt_soname (s->the_bfd);
+ if (soname != NULL
+ && strcmp (soname, global_needed->name) == 0)
+ {
+ global_found = s;
+ return;
+ }
}
EOF
@@ -679,6 +865,42 @@ gld${EMULATION_NAME}_after_open (void)
{
struct bfd_link_needed_list *needed, *l;
+ if (link_info.eh_frame_hdr
+ && ! link_info.traditional_format
+ && ! link_info.relocatable)
+ {
+ struct elf_link_hash_table *htab;
+
+ htab = elf_hash_table (&link_info);
+ if (is_elf_hash_table (htab))
+ {
+ bfd *abfd;
+ asection *s;
+
+ for (abfd = link_info.input_bfds; abfd; abfd = abfd->link_next)
+ {
+ s = bfd_get_section_by_name (abfd, ".eh_frame");
+ if (s && s->size > 8 && !bfd_is_abs_section (s->output_section))
+ break;
+ }
+ if (abfd)
+ {
+ const struct elf_backend_data *bed;
+
+ bed = get_elf_backend_data (abfd);
+ s = bfd_make_section_with_flags (abfd, ".eh_frame_hdr",
+ bed->dynamic_sec_flags
+ | SEC_READONLY);
+ if (s != NULL
+ && bfd_set_section_alignment (abfd, s, 2))
+ htab->eh_info.hdr_sec = s;
+ else
+ einfo ("%P: warning: Cannot create .eh_frame_hdr section,"
+ " --eh-frame-hdr ignored.\n");
+ }
+ }
+ }
+
/* We only need to worry about this when doing a final link. */
if (link_info.relocatable || !link_info.executable)
return;
@@ -696,25 +918,48 @@ gld${EMULATION_NAME}_after_open (void)
for (l = needed; l != NULL; l = l->next)
{
struct bfd_link_needed_list *ll;
+ struct dt_needed n, nn;
int force;
+ /* If the lib that needs this one was --as-needed and wasn't
+ found to be needed, then this lib isn't needed either. */
+ if (l->by != NULL
+ && (bfd_elf_get_dyn_lib_class (l->by) & DYN_AS_NEEDED) != 0)
+ continue;
+
/* If we've already seen this file, skip it. */
for (ll = needed; ll != l; ll = ll->next)
- if (strcmp (ll->name, l->name) == 0)
+ if ((ll->by == NULL
+ || (bfd_elf_get_dyn_lib_class (ll->by) & DYN_AS_NEEDED) == 0)
+ && strcmp (ll->name, l->name) == 0)
break;
if (ll != l)
continue;
/* See if this file was included in the link explicitly. */
global_needed = l;
- global_found = FALSE;
+ global_found = NULL;
lang_for_each_input_file (gld${EMULATION_NAME}_check_needed);
- if (global_found)
+ if (global_found != NULL
+ && (bfd_elf_get_dyn_lib_class (global_found->the_bfd)
+ & DYN_AS_NEEDED) == 0)
continue;
+ n.by = l->by;
+ n.name = l->name;
+ nn.by = l->by;
if (trace_file_tries)
info_msg (_("%s needed by %B\n"), l->name, l->by);
+ /* As-needed libs specified on the command line (or linker script)
+ take priority over libs found in search dirs. */
+ if (global_found != NULL)
+ {
+ nn.name = global_found->filename;
+ if (gld${EMULATION_NAME}_try_needed (&nn, TRUE))
+ continue;
+ }
+
/* We need to find this file and include the symbol table. We
want to search for the file in the same way that the dynamic
linker will search. That means that we want to use
@@ -731,9 +976,13 @@ gld${EMULATION_NAME}_after_open (void)
size_t len;
search_dirs_type *search;
EOF
-if [ "x${USE_LIBPATH}" = xyes ] ; then
+if [ "x${NATIVE}" = xyes ] ; then
cat >>e${EMULATION_NAME}.c <<EOF
const char *lib_path;
+EOF
+fi
+if [ "x${USE_LIBPATH}" = xyes ] ; then
+cat >>e${EMULATION_NAME}.c <<EOF
struct bfd_link_needed_list *rp;
int found;
EOF
@@ -741,13 +990,13 @@ fi
cat >>e${EMULATION_NAME}.c <<EOF
if (gld${EMULATION_NAME}_search_needed (command_line.rpath_link,
- l->name, force))
+ &n, force))
break;
EOF
if [ "x${USE_LIBPATH}" = xyes ] ; then
cat >>e${EMULATION_NAME}.c <<EOF
if (gld${EMULATION_NAME}_search_needed (command_line.rpath,
- l->name, force))
+ &n, force))
break;
EOF
fi
@@ -757,12 +1006,12 @@ cat >>e${EMULATION_NAME}.c <<EOF
&& command_line.rpath == NULL)
{
lib_path = (const char *) getenv ("LD_RUN_PATH");
- if (gld${EMULATION_NAME}_search_needed (lib_path, l->name,
+ if (gld${EMULATION_NAME}_search_needed (lib_path, &n,
force))
break;
}
lib_path = (const char *) getenv ("LD_LIBRARY_PATH");
- if (gld${EMULATION_NAME}_search_needed (lib_path, l->name, force))
+ if (gld${EMULATION_NAME}_search_needed (lib_path, &n, force))
break;
EOF
fi
@@ -775,7 +1024,7 @@ cat >>e${EMULATION_NAME}.c <<EOF
char *tmpname = gld${EMULATION_NAME}_add_sysroot (rp->name);
found = (rp->by == l->by
&& gld${EMULATION_NAME}_search_needed (tmpname,
- l->name,
+ &n,
force));
free (tmpname);
}
@@ -784,26 +1033,9 @@ cat >>e${EMULATION_NAME}.c <<EOF
EOF
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, force))
- break;
- free (filename);
- }
- if (search != NULL)
- break;
-EOF
if [ "x${USE_LIBPATH}" = xyes ] ; then
case ${target} in
- *-*-freebsd*)
+ *-*-freebsd* | *-*-dragonfly*)
cat >>e${EMULATION_NAME}.c <<EOF
if (gld${EMULATION_NAME}_check_ld_elf_hints (l->name, force))
break;
@@ -811,16 +1043,35 @@ EOF
# FreeBSD
;;
- *-*-linux-gnu*)
+ *-*-linux-* | *-*-k*bsd*-*)
+ # Linux
cat >>e${EMULATION_NAME}.c <<EOF
if (gld${EMULATION_NAME}_check_ld_so_conf (l->name, force))
break;
+
EOF
- # Linux
;;
esac
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);
+ nn.name = filename;
+ if (gld${EMULATION_NAME}_try_needed (&nn, force))
+ break;
+ free (filename);
+ }
+ if (search != NULL)
+ break;
+EOF
+cat >>e${EMULATION_NAME}.c <<EOF
}
if (force < 2)
@@ -841,16 +1092,14 @@ cat >>e${EMULATION_NAME}.c <<EOF
static void
gld${EMULATION_NAME}_find_exp_assignment (etree_type *exp)
{
- struct bfd_link_hash_entry *h;
+ bfd_boolean provide = FALSE;
switch (exp->type.node_class)
{
case etree_provide:
- h = bfd_link_hash_lookup (link_info.hash, exp->assign.dst,
- FALSE, FALSE, FALSE);
- if (h == NULL)
- break;
-
+ provide = TRUE;
+ /* Fall thru */
+ case etree_assign:
/* We call record_link_assignment even if the symbol is defined.
This is because if it is defined by a dynamic object, we
actually want to use the value defined by the linker script,
@@ -858,14 +1107,11 @@ gld${EMULATION_NAME}_find_exp_assignment (etree_type *exp)
symbols like etext). If the symbol is defined by a regular
object, then, as it happens, calling record_link_assignment
will do no harm. */
-
- /* Fall through. */
- case etree_assign:
if (strcmp (exp->assign.dst, ".") != 0)
{
- if (! (bfd_elf_record_link_assignment
- (output_bfd, &link_info, exp->assign.dst,
- exp->type.node_class == etree_provide ? TRUE : FALSE)))
+ if (!bfd_elf_record_link_assignment (output_bfd, &link_info,
+ exp->assign.dst, provide,
+ exp->assign.hidden))
einfo ("%P%F: failed to record assignment to %s: %E\n",
exp->assign.dst);
}
@@ -912,8 +1158,8 @@ if test x"$LDEMUL_BEFORE_ALLOCATION" != xgld"$EMULATION_NAME"_before_allocation;
ELF_INTERPRETER_SET_DEFAULT="
if (sinterp != NULL)
{
- sinterp->contents = ${ELF_INTERPRETER_NAME};
- sinterp->_raw_size = strlen (sinterp->contents) + 1;
+ sinterp->contents = (unsigned char *) ${ELF_INTERPRETER_NAME};
+ sinterp->size = strlen ((char *) sinterp->contents) + 1;
}
"
@@ -950,13 +1196,14 @@ gld${EMULATION_NAME}_before_allocation (void)
(const char * const *) command_line.auxiliary_filters,
&link_info, &sinterp, lang_elf_version_info)))
einfo ("%P%F: failed to set dynamic section sizes: %E\n");
+
${ELF_INTERPRETER_SET_DEFAULT}
/* Let the user override the dynamic linker we are using. */
if (command_line.interpreter != NULL
&& sinterp != NULL)
{
sinterp->contents = (bfd_byte *) command_line.interpreter;
- sinterp->_raw_size = strlen (command_line.interpreter) + 1;
+ sinterp->size = strlen (command_line.interpreter) + 1;
}
/* Look for any sections named .gnu.warning. As a GNU extensions,
@@ -969,10 +1216,8 @@ ${ELF_INTERPRETER_SET_DEFAULT}
{
asection *s;
bfd_size_type sz;
- bfd_size_type prefix_len;
char *msg;
bfd_boolean ret;
- const char * gnu_warning_prefix = _("warning: ");
if (is->just_syms_flag)
continue;
@@ -981,15 +1226,13 @@ ${ELF_INTERPRETER_SET_DEFAULT}
if (s == NULL)
continue;
- sz = bfd_section_size (is->the_bfd, s);
- prefix_len = strlen (gnu_warning_prefix);
- msg = xmalloc ((size_t) (prefix_len + sz + 1));
- strcpy (msg, gnu_warning_prefix);
- if (! bfd_get_section_contents (is->the_bfd, s, msg + prefix_len,
+ sz = s->size;
+ msg = xmalloc ((size_t) (sz + 1));
+ if (! bfd_get_section_contents (is->the_bfd, s, msg,
(file_ptr) 0, sz))
einfo ("%F%B: Can't read contents of section .gnu.warning: %E\n",
is->the_bfd);
- msg[prefix_len + sz] = '\0';
+ msg[sz] = '\0';
ret = link_info.callbacks->warning (&link_info, msg,
(const char *) NULL,
is->the_bfd, (asection *) NULL,
@@ -997,11 +1240,27 @@ ${ELF_INTERPRETER_SET_DEFAULT}
ASSERT (ret);
free (msg);
- /* Clobber the section size, so that we don't waste copying the
- warning into the output file. */
- s->_raw_size = 0;
+ /* Clobber the section size, so that we don't waste space
+ copying the warning into the output file. If we've already
+ sized the output section, adjust its size. The adjustment
+ is on rawsize because targets that size sections early will
+ have called lang_reset_memory_regions after sizing. */
+ if (s->output_section != NULL
+ && s->output_section->rawsize >= s->size)
+ s->output_section->rawsize -= s->size;
+
+ s->size = 0;
+
+ /* Also set SEC_EXCLUDE, so that local symbols defined in the
+ warning section don't get copied to the output. */
+ s->flags |= SEC_EXCLUDE | SEC_KEEP;
}
}
+
+ before_allocation_default ();
+
+ if (!bfd_elf_size_dynsym_hash_dynstr (output_bfd, &link_info))
+ einfo ("%P%F: failed to set dynamic section sizes: %E\n");
}
EOF
@@ -1089,12 +1348,11 @@ fi
if test x"$LDEMUL_PLACE_ORPHAN" != xgld"$EMULATION_NAME"_place_orphan; then
cat >>e${EMULATION_NAME}.c <<EOF
-/* A variant of lang_output_section_find. Used by place_orphan. */
+/* A variant of lang_output_section_find used by place_orphan. */
static lang_output_section_statement_type *
output_rel_find (asection *sec, int isdyn)
{
- lang_statement_union_type *u;
lang_output_section_statement_type *lookup;
lang_output_section_statement_type *last = NULL;
lang_output_section_statement_type *last_alloc = NULL;
@@ -1102,10 +1360,12 @@ output_rel_find (asection *sec, int isdyn)
lang_output_section_statement_type *last_rel_alloc = NULL;
int rela = sec->name[4] == 'a';
- for (u = lang_output_section_statement.head; u; u = lookup->next)
+ for (lookup = &lang_output_section_statement.head->output_section_statement;
+ lookup != NULL;
+ lookup = lookup->next)
{
- lookup = &u->output_section_statement;
- if (strncmp (".rel", lookup->name, 4) == 0)
+ if (lookup->constraint != -1
+ && CONST_STRNEQ (lookup->name, ".rel"))
{
int lookrela = lookup->name[4] == 'a';
@@ -1145,104 +1405,128 @@ output_rel_find (asection *sec, int isdyn)
return last;
}
-/* Find the last output section before given output statement.
- Used by place_orphan. */
-
-static asection *
-output_prev_sec_find (lang_output_section_statement_type *os)
-{
- asection *s = (asection *) NULL;
- lang_statement_union_type *u;
- lang_output_section_statement_type *lookup;
-
- for (u = lang_output_section_statement.head;
- u != (lang_statement_union_type *) NULL;
- u = lookup->next)
- {
- lookup = &u->output_section_statement;
- if (lookup == os)
- return s;
-
- if (lookup->bfd_section != NULL && lookup->bfd_section->owner != NULL)
- s = lookup->bfd_section;
- }
-
- return NULL;
-}
-
/* Place an orphan section. We use this to put random SHF_ALLOC
sections in the right segment. */
-struct orphan_save {
- lang_output_section_statement_type *os;
- asection **section;
- lang_statement_union_type **stmt;
- lang_statement_union_type **os_tail;
-};
-
static bfd_boolean
-gld${EMULATION_NAME}_place_orphan (lang_input_statement_type *file, asection *s)
+gld${EMULATION_NAME}_place_orphan (asection *s)
{
- static struct orphan_save hold_text;
- static struct orphan_save hold_rodata;
- static struct orphan_save hold_data;
- static struct orphan_save hold_bss;
- static struct orphan_save hold_rel;
- static struct orphan_save hold_interp;
- static struct orphan_save hold_sdata;
- static int count = 1;
+ static struct orphan_save hold[] =
+ {
+ { ".text",
+ SEC_HAS_CONTENTS | SEC_ALLOC | SEC_LOAD | SEC_READONLY | SEC_CODE,
+ 0, 0, 0, 0 },
+ { ".rodata",
+ SEC_HAS_CONTENTS | SEC_ALLOC | SEC_LOAD | SEC_READONLY | SEC_DATA,
+ 0, 0, 0, 0 },
+ { ".data",
+ SEC_HAS_CONTENTS | SEC_ALLOC | SEC_LOAD | SEC_DATA,
+ 0, 0, 0, 0 },
+ { ".bss",
+ SEC_ALLOC,
+ 0, 0, 0, 0 },
+ { 0,
+ SEC_HAS_CONTENTS | SEC_ALLOC | SEC_LOAD | SEC_READONLY | SEC_DATA,
+ 0, 0, 0, 0 },
+ { ".interp",
+ SEC_HAS_CONTENTS | SEC_ALLOC | SEC_LOAD | SEC_READONLY | SEC_DATA,
+ 0, 0, 0, 0 },
+ { ".sdata",
+ SEC_HAS_CONTENTS | SEC_ALLOC | SEC_LOAD | SEC_DATA | SEC_SMALL_DATA,
+ 0, 0, 0, 0 }
+ };
+ enum orphan_save_index
+ {
+ orphan_text = 0,
+ orphan_rodata,
+ orphan_data,
+ orphan_bss,
+ orphan_rel,
+ orphan_interp,
+ orphan_sdata
+ };
+ static int orphan_init_done = 0;
struct orphan_save *place;
- lang_statement_list_type *old;
- lang_statement_list_type add;
- etree_type *address;
const char *secname;
- const char *ps = NULL;
+ lang_output_section_statement_type *after;
lang_output_section_statement_type *os;
- lang_statement_union_type **os_tail;
- etree_type *load_base;
int isdyn = 0;
+ int iself = s->owner->xvec->flavour == bfd_target_elf_flavour;
+ unsigned int sh_type = iself ? elf_section_type (s) : SHT_NULL;
secname = bfd_get_section_name (s->owner, s);
+
if (! link_info.relocatable
&& link_info.combreloc
- && (s->flags & SEC_ALLOC)
- && strncmp (secname, ".rel", 4) == 0)
+ && (s->flags & SEC_ALLOC))
{
- if (secname[4] == 'a')
- secname = ".rela.dyn";
- else
- secname = ".rel.dyn";
- isdyn = 1;
+ if (iself)
+ switch (sh_type)
+ {
+ case SHT_RELA:
+ secname = ".rela.dyn";
+ isdyn = 1;
+ break;
+ case SHT_REL:
+ secname = ".rel.dyn";
+ isdyn = 1;
+ break;
+ default:
+ break;
+ }
+ else if (CONST_STRNEQ (secname, ".rel"))
+ {
+ secname = secname[4] == 'a' ? ".rela.dyn" : ".rel.dyn";
+ isdyn = 1;
+ }
}
- if (isdyn || (!config.unique_orphan_sections && !unique_section_p (secname)))
+ if (isdyn || (!config.unique_orphan_sections && !unique_section_p (s)))
{
/* Look through the script to see where to place this section. */
os = lang_output_section_find (secname);
if (os != NULL
&& (os->bfd_section == NULL
- || ((s->flags ^ os->bfd_section->flags)
- & (SEC_LOAD | SEC_ALLOC)) == 0))
+ || os->bfd_section->flags == 0
+ || (_bfd_elf_match_sections_by_type (output_bfd,
+ os->bfd_section,
+ s->owner, s)
+ && ((s->flags ^ os->bfd_section->flags)
+ & (SEC_LOAD | SEC_ALLOC)) == 0)))
{
/* We already have an output section statement with this
- name, and its bfd section, if any, has compatible flags. */
- lang_add_section (&os->children, s, os, file);
+ name, and its bfd section, if any, has compatible flags.
+ If the section already exists but does not have any flags
+ set, then it has been created by the linker, probably as a
+ result of a --section-start command line switch. */
+ lang_add_section (&os->children, s, os);
return TRUE;
}
}
- if (hold_text.os == NULL)
- hold_text.os = lang_output_section_find (".text");
+ if (!orphan_init_done)
+ {
+ struct orphan_save *ho;
+ for (ho = hold; ho < hold + sizeof (hold) / sizeof (hold[0]); ++ho)
+ if (ho->name != NULL)
+ {
+ ho->os = lang_output_section_find (ho->name);
+ if (ho->os != NULL && ho->os->flags == 0)
+ ho->os->flags = ho->flags;
+ }
+ orphan_init_done = 1;
+ }
/* If this is a final link, then always put .gnu.warning.SYMBOL
sections into the .text section to get them out of the way. */
if (link_info.executable
&& ! link_info.relocatable
- && strncmp (secname, ".gnu.warning.", sizeof ".gnu.warning." - 1) == 0
- && hold_text.os != NULL)
+ && CONST_STRNEQ (secname, ".gnu.warning.")
+ && hold[orphan_text].os != NULL)
{
- lang_add_section (&hold_text.os->children, s, hold_text.os, file);
+ lang_add_section (&hold[orphan_text].os->children, s,
+ hold[orphan_text].os);
return TRUE;
}
@@ -1251,223 +1535,60 @@ gld${EMULATION_NAME}_place_orphan (lang_input_statement_type *file, asection *s)
right after the .interp section, so that the PT_NOTE segment is
stored right after the program headers where the OS can read it
in the first page. */
-#define HAVE_SECTION(hold, name) \
-(hold.os != NULL || (hold.os = lang_output_section_find (name)) != NULL)
-
- if ((s->flags & SEC_EXCLUDE) != 0 && !link_info.relocatable)
- {
- if (s->output_section == NULL)
- s->output_section = bfd_abs_section_ptr;
- return TRUE;
- }
place = NULL;
if ((s->flags & SEC_ALLOC) == 0)
;
else if ((s->flags & SEC_LOAD) != 0
- && strncmp (secname, ".note", 5) == 0
- && HAVE_SECTION (hold_interp, ".interp"))
- place = &hold_interp;
- else if ((s->flags & SEC_HAS_CONTENTS) == 0
- && HAVE_SECTION (hold_bss, ".bss"))
- place = &hold_bss;
- else if ((s->flags & SEC_SMALL_DATA) != 0
- && HAVE_SECTION (hold_sdata, ".sdata"))
- place = &hold_sdata;
- else if ((s->flags & SEC_READONLY) == 0
- && HAVE_SECTION (hold_data, ".data"))
- place = &hold_data;
- else if (strncmp (secname, ".rel", 4) == 0
- && (s->flags & SEC_LOAD) != 0
- && (hold_rel.os != NULL
- || (hold_rel.os = output_rel_find (s, isdyn)) != NULL))
- place = &hold_rel;
- else if ((s->flags & (SEC_CODE | SEC_READONLY)) == SEC_READONLY
- && HAVE_SECTION (hold_rodata, ".rodata"))
- place = &hold_rodata;
- else if ((s->flags & (SEC_CODE | SEC_READONLY)) == (SEC_CODE | SEC_READONLY)
- && hold_text.os != NULL)
- place = &hold_text;
-
-#undef HAVE_SECTION
+ && ((iself && sh_type == SHT_NOTE)
+ || (!iself && CONST_STRNEQ (secname, ".note"))))
+ place = &hold[orphan_interp];
+ else if ((s->flags & (SEC_LOAD | SEC_HAS_CONTENTS)) == 0)
+ place = &hold[orphan_bss];
+ else if ((s->flags & SEC_SMALL_DATA) != 0)
+ place = &hold[orphan_sdata];
+ else if ((s->flags & SEC_READONLY) == 0)
+ place = &hold[orphan_data];
+ else if (((iself && (sh_type == SHT_RELA || sh_type == SHT_REL))
+ || (!iself && CONST_STRNEQ (secname, ".rel")))
+ && (s->flags & SEC_LOAD) != 0)
+ place = &hold[orphan_rel];
+ else if ((s->flags & SEC_CODE) == 0)
+ place = &hold[orphan_rodata];
+ else
+ place = &hold[orphan_text];
+
+ after = NULL;
+ if (place != NULL)
+ {
+ if (place->os == NULL)
+ {
+ if (place->name != NULL)
+ place->os = lang_output_section_find (place->name);
+ else
+ place->os = output_rel_find (s, isdyn);
+ }
+ after = place->os;
+ if (after == NULL)
+ after = lang_output_section_find_by_flags
+ (s, &place->os, _bfd_elf_match_sections_by_type);
+ if (after == NULL)
+ /* *ABS* is always the first output section statement. */
+ after = &lang_output_section_statement.head->output_section_statement;
+ }
/* Choose a unique name for the section. This will be needed if the
same section name appears in the input file with different
loadable or allocatable characteristics. */
if (bfd_get_section_by_name (output_bfd, secname) != NULL)
{
+ static int count = 1;
secname = bfd_get_unique_section_name (output_bfd, secname, &count);
if (secname == NULL)
einfo ("%F%P: place_orphan failed: %E\n");
}
- /* Start building a list of statements for this section.
- First save the current statement pointer. */
- old = stat_ptr;
-
- /* If we have found an appropriate place for the output section
- statements for this orphan, add them to our own private list,
- inserting them later into the global statement list. */
- if (place != NULL)
- {
- stat_ptr = &add;
- lang_list_init (stat_ptr);
- }
-
- address = NULL;
- if (link_info.relocatable || (s->flags & (SEC_LOAD | SEC_ALLOC)) == 0)
- address = exp_intop ((bfd_vma) 0);
-
- load_base = NULL;
- if (place != NULL && place->os->load_base != NULL)
- {
- etree_type *lma_from_vma;
- lma_from_vma = exp_binop ('-', place->os->load_base,
- exp_nameop (ADDR, place->os->name));
- load_base = exp_binop ('+', lma_from_vma,
- exp_nameop (ADDR, secname));
- }
-
- os_tail = lang_output_section_statement.tail;
- os = lang_enter_output_section_statement (secname, address, 0,
- (etree_type *) NULL,
- (etree_type *) NULL,
- load_base);
-
- if (config.build_constructors)
- {
- /* 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 = secname; *ps != '\0'; ps++)
- if (! ISALNUM (*ps) && *ps != '_')
- break;
- if (*ps == '\0')
- {
- char *symname;
- etree_type *e_align;
-
- symname = (char *) xmalloc (ps - secname + sizeof "__start_");
- sprintf (symname, "__start_%s", secname);
- lang_add_assignment (exp_assop ('=', symname,
- exp_unop (ABSOLUTE,
- exp_nameop (NAME, "."))));
- }
- }
-
- lang_add_section (&os->children, s, os, file);
-
- lang_leave_output_section_statement
- ((bfd_vma) 0, "*default*",
- (struct lang_output_section_phdr_list *) NULL, NULL);
-
- if (config.build_constructors && *ps == '\0')
- {
- char *symname;
-
- /* lang_leave_ouput_section_statement resets stat_ptr. Put
- stat_ptr back where we want it. */
- if (place != NULL)
- stat_ptr = &add;
-
- symname = (char *) xmalloc (ps - secname + sizeof "__stop_");
- sprintf (symname, "__stop_%s", secname);
- lang_add_assignment (exp_assop ('=', symname,
- exp_nameop (NAME, ".")));
- }
-
- /* Restore the global list pointer. */
- stat_ptr = old;
-
- if (place != NULL && os->bfd_section != NULL)
- {
- asection *snew, **pps;
-
- snew = os->bfd_section;
-
- /* Shuffle the bfd section list to make the output file look
- neater. This is really only cosmetic. */
- if (place->section == NULL)
- {
- asection *bfd_section = place->os->bfd_section;
-
- /* If the output statement hasn't been used to place
- any input sections (and thus doesn't have an output
- bfd_section), look for the closest prior output statement
- having an output section. */
- if (bfd_section == NULL)
- bfd_section = output_prev_sec_find (place->os);
-
- if (bfd_section != NULL && bfd_section != snew)
- place->section = &bfd_section->next;
- }
-
- if (place->section != NULL)
- {
- /* Unlink the section. */
- for (pps = &output_bfd->sections; *pps != snew; pps = &(*pps)->next)
- ;
- bfd_section_list_remove (output_bfd, pps);
-
- /* Now tack it on to the "place->os" section list. */
- bfd_section_list_insert (output_bfd, place->section, snew);
- }
-
- /* Save the end of this list. Further ophans of this type will
- follow the one we've just added. */
- place->section = &snew->next;
-
- /* The following is non-cosmetic. We try to put the output
- statements in some sort of reasonable order here, because
- they determine the final load addresses of the orphan
- sections. In addition, placing output statements in the
- wrong order may require extra segments. For instance,
- given a typical situation of all read-only sections placed
- in one segment and following that a segment containing all
- the read-write sections, we wouldn't want to place an orphan
- read/write section before or amongst the read-only ones. */
- if (add.head != NULL)
- {
- lang_statement_union_type *newly_added_os;
-
- if (place->stmt == NULL)
- {
- /* Put the new statement list right at the head. */
- *add.tail = place->os->header.next;
- place->os->header.next = add.head;
-
- place->os_tail = &place->os->next;
- }
- else
- {
- /* Put it after the last orphan statement we added. */
- *add.tail = *place->stmt;
- *place->stmt = add.head;
- }
-
- /* Fix the global list pointer if we happened to tack our
- new list at the tail. */
- if (*old->tail == add.head)
- old->tail = add.tail;
-
- /* Save the end of this list. */
- place->stmt = add.tail;
-
- /* Do the same for the list of output section statements. */
- newly_added_os = *os_tail;
- *os_tail = NULL;
- newly_added_os->output_section_statement.next = *place->os_tail;
- *place->os_tail = newly_added_os;
- place->os_tail = &newly_added_os->output_section_statement.next;
-
- /* Fixing the global list pointer here is a little different.
- We added to the list in lang_enter_output_section_statement,
- trimmed off the new output_section_statment above when
- assigning *os_tail = NULL, but possibly added it back in
- the same place when assigning *place->os_tail. */
- if (*os_tail == NULL)
- lang_output_section_statement.tail = os_tail;
- }
- }
+ lang_insert_orphan (s, secname, after, place, NULL, NULL);
return TRUE;
}
@@ -1480,21 +1601,10 @@ cat >>e${EMULATION_NAME}.c <<EOF
static void
gld${EMULATION_NAME}_finish (void)
{
- if (bfd_elf_discard_info (output_bfd, &link_info))
- {
- lang_reset_memory_regions ();
-
- /* Resize the sections. */
- lang_size_sections (stat_ptr->head, abs_output_section,
- &stat_ptr->head, 0, (bfd_vma) 0, NULL, TRUE);
-
- /* Redo special stuff. */
- ldemul_after_allocation ();
+ bfd_boolean need_layout = bfd_elf_discard_info (output_bfd, &link_info);
- /* Do the assignments again. */
- lang_do_assignments (stat_ptr->head, abs_output_section,
- (fill_type *) 0, (bfd_vma) 0);
- }
+ gld${EMULATION_NAME}_map_segments (need_layout);
+ finish_default ();
}
EOF
fi
@@ -1520,38 +1630,49 @@ cat >>e${EMULATION_NAME}.c <<EOF
if (link_info.relocatable && config.build_constructors)
return
EOF
-sed $sc ldscripts/${EMULATION_NAME}.xu >> e${EMULATION_NAME}.c
-echo ' ; else if (link_info.relocatable) return' >> e${EMULATION_NAME}.c
-sed $sc ldscripts/${EMULATION_NAME}.xr >> e${EMULATION_NAME}.c
-echo ' ; else if (!config.text_read_only) return' >> e${EMULATION_NAME}.c
-sed $sc ldscripts/${EMULATION_NAME}.xbn >> e${EMULATION_NAME}.c
+sed $sc ldscripts/${EMULATION_NAME}.xu >> e${EMULATION_NAME}.c
+echo ' ; else if (link_info.relocatable) return' >> e${EMULATION_NAME}.c
+sed $sc ldscripts/${EMULATION_NAME}.xr >> e${EMULATION_NAME}.c
+echo ' ; else if (!config.text_read_only) return' >> e${EMULATION_NAME}.c
+sed $sc ldscripts/${EMULATION_NAME}.xbn >> e${EMULATION_NAME}.c
if cmp -s ldscripts/${EMULATION_NAME}.x ldscripts/${EMULATION_NAME}.xn; then : ; else
-echo ' ; else if (!config.magic_demand_paged) return' >> e${EMULATION_NAME}.c
-sed $sc ldscripts/${EMULATION_NAME}.xn >> e${EMULATION_NAME}.c
+echo ' ; else if (!config.magic_demand_paged) return' >> e${EMULATION_NAME}.c
+sed $sc ldscripts/${EMULATION_NAME}.xn >> e${EMULATION_NAME}.c
fi
if test -n "$GENERATE_PIE_SCRIPT" ; then
if test -n "$GENERATE_COMBRELOC_SCRIPT" ; then
+echo ' ; else if (link_info.pie && link_info.combreloc' >> e${EMULATION_NAME}.c
+echo ' && link_info.relro' >> e${EMULATION_NAME}.c
+echo ' && (link_info.flags & DT_BIND_NOW)) return' >> e${EMULATION_NAME}.c
+sed $sc ldscripts/${EMULATION_NAME}.xdw >> e${EMULATION_NAME}.c
echo ' ; else if (link_info.pie && link_info.combreloc) return' >> e${EMULATION_NAME}.c
-sed $sc ldscripts/${EMULATION_NAME}.xdc >> e${EMULATION_NAME}.c
+sed $sc ldscripts/${EMULATION_NAME}.xdc >> e${EMULATION_NAME}.c
fi
-echo ' ; else if (link_info.pie) return' >> e${EMULATION_NAME}.c
-sed $sc ldscripts/${EMULATION_NAME}.xd >> e${EMULATION_NAME}.c
+echo ' ; else if (link_info.pie) return' >> e${EMULATION_NAME}.c
+sed $sc ldscripts/${EMULATION_NAME}.xd >> e${EMULATION_NAME}.c
fi
if test -n "$GENERATE_SHLIB_SCRIPT" ; then
if test -n "$GENERATE_COMBRELOC_SCRIPT" ; then
+echo ' ; else if (link_info.shared && link_info.combreloc' >> e${EMULATION_NAME}.c
+echo ' && link_info.relro' >> e${EMULATION_NAME}.c
+echo ' && (link_info.flags & DT_BIND_NOW)) return' >> e${EMULATION_NAME}.c
+sed $sc ldscripts/${EMULATION_NAME}.xsw >> e${EMULATION_NAME}.c
echo ' ; else if (link_info.shared && link_info.combreloc) return' >> e${EMULATION_NAME}.c
-sed $sc ldscripts/${EMULATION_NAME}.xsc >> e${EMULATION_NAME}.c
+sed $sc ldscripts/${EMULATION_NAME}.xsc >> e${EMULATION_NAME}.c
fi
-echo ' ; else if (link_info.shared) return' >> e${EMULATION_NAME}.c
-sed $sc ldscripts/${EMULATION_NAME}.xs >> e${EMULATION_NAME}.c
+echo ' ; else if (link_info.shared) return' >> e${EMULATION_NAME}.c
+sed $sc ldscripts/${EMULATION_NAME}.xs >> e${EMULATION_NAME}.c
fi
if test -n "$GENERATE_COMBRELOC_SCRIPT" ; then
-echo ' ; else if (link_info.combreloc) return' >> e${EMULATION_NAME}.c
-sed $sc ldscripts/${EMULATION_NAME}.xc >> e${EMULATION_NAME}.c
+echo ' ; else if (link_info.combreloc && link_info.relro' >> e${EMULATION_NAME}.c
+echo ' && (link_info.flags & DT_BIND_NOW)) return' >> e${EMULATION_NAME}.c
+sed $sc ldscripts/${EMULATION_NAME}.xw >> e${EMULATION_NAME}.c
+echo ' ; else if (link_info.combreloc) return' >> e${EMULATION_NAME}.c
+sed $sc ldscripts/${EMULATION_NAME}.xc >> e${EMULATION_NAME}.c
fi
-echo ' ; else return' >> e${EMULATION_NAME}.c
-sed $sc ldscripts/${EMULATION_NAME}.x >> e${EMULATION_NAME}.c
-echo '; }' >> e${EMULATION_NAME}.c
+echo ' ; else return' >> e${EMULATION_NAME}.c
+sed $sc ldscripts/${EMULATION_NAME}.x >> e${EMULATION_NAME}.c
+echo '; }' >> e${EMULATION_NAME}.c
else
# Scripts read from the filesystem.
@@ -1577,6 +1698,9 @@ fi
if test -n "$GENERATE_PIE_SCRIPT" ; then
if test -n "$GENERATE_COMBRELOC_SCRIPT" ; then
cat >>e${EMULATION_NAME}.c <<EOF
+ else if (link_info.pie && link_info.combreloc
+ && link_info.relro && (link_info.flags & DT_BIND_NOW))
+ return "ldscripts/${EMULATION_NAME}.xdw";
else if (link_info.pie && link_info.combreloc)
return "ldscripts/${EMULATION_NAME}.xdc";
EOF
@@ -1589,6 +1713,9 @@ fi
if test -n "$GENERATE_SHLIB_SCRIPT" ; then
if test -n "$GENERATE_COMBRELOC_SCRIPT" ; then
cat >>e${EMULATION_NAME}.c <<EOF
+ else if (link_info.shared && link_info.combreloc
+ && link_info.relro && (link_info.flags & DT_BIND_NOW))
+ return "ldscripts/${EMULATION_NAME}.xsw";
else if (link_info.shared && link_info.combreloc)
return "ldscripts/${EMULATION_NAME}.xsc";
EOF
@@ -1600,6 +1727,9 @@ EOF
fi
if test -n "$GENERATE_COMBRELOC_SCRIPT" ; then
cat >>e${EMULATION_NAME}.c <<EOF
+ else if (link_info.combreloc && link_info.relro
+ && (link_info.flags & DT_BIND_NOW))
+ return "ldscripts/${EMULATION_NAME}.xw";
else if (link_info.combreloc)
return "ldscripts/${EMULATION_NAME}.xc";
EOF
@@ -1627,6 +1757,8 @@ cat >>e${EMULATION_NAME}.c <<EOF
#define OPTION_ENABLE_NEW_DTAGS (OPTION_DISABLE_NEW_DTAGS + 1)
#define OPTION_GROUP (OPTION_ENABLE_NEW_DTAGS + 1)
#define OPTION_EH_FRAME_HDR (OPTION_GROUP + 1)
+#define OPTION_EXCLUDE_LIBS (OPTION_EH_FRAME_HDR + 1)
+#define OPTION_HASH_STYLE (OPTION_EXCLUDE_LIBS + 1)
static void
gld${EMULATION_NAME}_add_options
@@ -1642,6 +1774,8 @@ cat >>e${EMULATION_NAME}.c <<EOF
{"disable-new-dtags", no_argument, NULL, OPTION_DISABLE_NEW_DTAGS},
{"enable-new-dtags", no_argument, NULL, OPTION_ENABLE_NEW_DTAGS},
{"eh-frame-hdr", no_argument, NULL, OPTION_EH_FRAME_HDR},
+ {"exclude-libs", required_argument, NULL, OPTION_EXCLUDE_LIBS},
+ {"hash-style", required_argument, NULL, OPTION_HASH_STYLE},
{"Bgroup", no_argument, NULL, OPTION_GROUP},
EOF
fi
@@ -1694,6 +1828,26 @@ cat >>e${EMULATION_NAME}.c <<EOF
link_info.unresolved_syms_in_shared_libs = RM_GENERATE_ERROR;
break;
+ case OPTION_EXCLUDE_LIBS:
+ add_excluded_libs (optarg);
+ break;
+
+ case OPTION_HASH_STYLE:
+ link_info.emit_hash = FALSE;
+ link_info.emit_gnu_hash = FALSE;
+ if (strcmp (optarg, "sysv") == 0)
+ link_info.emit_hash = TRUE;
+ else if (strcmp (optarg, "gnu") == 0)
+ link_info.emit_gnu_hash = TRUE;
+ else if (strcmp (optarg, "both") == 0)
+ {
+ link_info.emit_hash = TRUE;
+ link_info.emit_gnu_hash = TRUE;
+ }
+ else
+ einfo (_("%P%F: invalid hash style \`%s'\n"), optarg);
+ break;
+
case 'z':
if (strcmp (optarg, "initfirst") == 0)
link_info.flags_1 |= (bfd_vma) DF_1_INITFIRST;
@@ -1714,6 +1868,11 @@ cat >>e${EMULATION_NAME}.c <<EOF
link_info.flags |= (bfd_vma) DF_BIND_NOW;
link_info.flags_1 |= (bfd_vma) DF_1_NOW;
}
+ else if (strcmp (optarg, "lazy") == 0)
+ {
+ link_info.flags &= ~(bfd_vma) DF_BIND_NOW;
+ link_info.flags_1 &= ~(bfd_vma) DF_1_NOW;
+ }
else if (strcmp (optarg, "origin") == 0)
{
link_info.flags |= (bfd_vma) DF_ORIGIN;
@@ -1739,6 +1898,41 @@ cat >>e${EMULATION_NAME}.c <<EOF
link_info.noexecstack = TRUE;
link_info.execstack = FALSE;
}
+EOF
+
+ if test -n "$COMMONPAGESIZE"; then
+cat >>e${EMULATION_NAME}.c <<EOF
+ else if (strcmp (optarg, "relro") == 0)
+ link_info.relro = TRUE;
+ else if (strcmp (optarg, "norelro") == 0)
+ link_info.relro = FALSE;
+EOF
+ fi
+
+cat >>e${EMULATION_NAME}.c <<EOF
+ else if (CONST_STRNEQ (optarg, "max-page-size="))
+ {
+ char *end;
+
+ config.maxpagesize = strtoul (optarg + 14, &end, 0);
+ if (*end || (config.maxpagesize & (config.maxpagesize - 1)) != 0)
+ einfo (_("%P%F: invalid maxium page size \`%s'\n"),
+ optarg + 14);
+ ASSERT (default_target != NULL);
+ bfd_emul_set_maxpagesize (default_target, config.maxpagesize);
+ }
+ else if (CONST_STRNEQ (optarg, "common-page-size="))
+ {
+ char *end;
+ config.commonpagesize = strtoul (optarg + 17, &end, 0);
+ if (*end
+ || (config.commonpagesize & (config.commonpagesize - 1)) != 0)
+ einfo (_("%P%F: invalid common page size \`%s'\n"),
+ optarg + 17);
+ ASSERT (default_target != NULL);
+ bfd_emul_set_commonpagesize (default_target,
+ config.commonpagesize);
+ }
/* What about the other Solaris -z options? FIXME. */
break;
EOF
@@ -1772,11 +1966,13 @@ cat >>e${EMULATION_NAME}.c <<EOF
fprintf (file, _(" --disable-new-dtags\tDisable new dynamic tags\n"));
fprintf (file, _(" --enable-new-dtags\tEnable new dynamic tags\n"));
fprintf (file, _(" --eh-frame-hdr\tCreate .eh_frame_hdr section\n"));
+ fprintf (file, _(" --hash-style=STYLE\tSet hash style to sysv, gnu or both\n"));
fprintf (file, _(" -z combreloc\t\tMerge dynamic relocs into one section and sort\n"));
fprintf (file, _(" -z defs\t\tReport unresolved symbols in object files.\n"));
fprintf (file, _(" -z execstack\t\tMark executable as requiring executable stack\n"));
fprintf (file, _(" -z initfirst\t\tMark DSO to be initialized first at runtime\n"));
fprintf (file, _(" -z interpose\t\tMark object to interpose all DSOs but executable\n"));
+ fprintf (file, _(" -z lazy\t\tMark object lazy runtime binding (default)\n"));
fprintf (file, _(" -z loadfltr\t\tMark object requiring immediate process\n"));
fprintf (file, _(" -z muldefs\t\tAllow multiple definitions\n"));
fprintf (file, _(" -z nocombreloc\tDon't merge dynamic relocs into one section\n"));
@@ -1786,8 +1982,28 @@ cat >>e${EMULATION_NAME}.c <<EOF
fprintf (file, _(" -z nodlopen\t\tMark DSO not available to dlopen\n"));
fprintf (file, _(" -z nodump\t\tMark DSO not available to dldump\n"));
fprintf (file, _(" -z noexecstack\tMark executable as not requiring executable stack\n"));
+EOF
+
+ if test -n "$COMMONPAGESIZE"; then
+cat >>e${EMULATION_NAME}.c <<EOF
+ fprintf (file, _(" -z norelro\t\tDon't create RELRO program header\n"));
+EOF
+ fi
+
+cat >>e${EMULATION_NAME}.c <<EOF
fprintf (file, _(" -z now\t\tMark object non-lazy runtime binding\n"));
fprintf (file, _(" -z origin\t\tMark object requiring immediate \$ORIGIN processing\n\t\t\t at runtime\n"));
+EOF
+
+ if test -n "$COMMONPAGESIZE"; then
+cat >>e${EMULATION_NAME}.c <<EOF
+ fprintf (file, _(" -z relro\t\tCreate RELRO program header\n"));
+EOF
+ fi
+
+cat >>e${EMULATION_NAME}.c <<EOF
+ fprintf (file, _(" -z max-page-size=SIZE\tSet maximum page size to SIZE\n"));
+ fprintf (file, _(" -z common-page-size=SIZE\n\t\t\tSet common page size to SIZE\n"));
fprintf (file, _(" -z KEYWORD\t\tIgnored for Solaris compatibility\n"));
EOF
fi
diff --git a/contrib/binutils/ld/emultempl/genelf.em b/contrib/binutils/ld/emultempl/genelf.em
new file mode 100644
index 0000000..dae75a1
--- /dev/null
+++ b/contrib/binutils/ld/emultempl/genelf.em
@@ -0,0 +1,39 @@
+# This shell script emits a C file. -*- C -*-
+# Copyright 2006 Free Software Foundation, Inc.
+#
+# This file is part of GLD, the Gnu Linker.
+#
+# 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., 51 Franklin Street - Fifth Floor, Boston, MA 02110-1301, USA.
+#
+
+# This file is sourced from generic.em
+#
+cat >>e${EMULATION_NAME}.c <<EOF
+#include "elf-bfd.h"
+
+EOF
+. ${srcdir}/emultempl/elf-generic.em
+cat >>e${EMULATION_NAME}.c <<EOF
+
+static void
+gld${EMULATION_NAME}_finish (void)
+{
+ gld${EMULATION_NAME}_map_segments (FALSE);
+ finish_default ();
+}
+EOF
+# Put these extra routines in ld_${EMULATION_NAME}_emulation
+#
+LDEMUL_FINISH=gld${EMULATION_NAME}_finish
diff --git a/contrib/binutils/ld/emultempl/generic.em b/contrib/binutils/ld/emultempl/generic.em
index 4d17ca2..9ea6d02 100644
--- a/contrib/binutils/ld/emultempl/generic.em
+++ b/contrib/binutils/ld/emultempl/generic.em
@@ -4,8 +4,8 @@ cat >e${EMULATION_NAME}.c <<EOF
/* This file is is generated by a shell script. DO NOT EDIT! */
/* emulate the original gld for the given ${EMULATION_NAME}
- Copyright 1991, 1992, 1994, 1996, 2000, 2001, 2002, 2003, 2004
- Free Software Foundation, Inc.
+ Copyright 1991, 1992, 1994, 1996, 1999, 2000, 2001, 2002, 2003, 2004,
+ 2007 Free Software Foundation, Inc.
Written by Steve Chamberlain steve@cygnus.com
This file is part of GLD, the Gnu Linker.
@@ -22,12 +22,12 @@ 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. */
+Foundation, Inc., 51 Franklin Street - Fifth Floor, Boston, MA 02110-1301, USA. */
#define TARGET_IS_${EMULATION_NAME}
-#include "bfd.h"
#include "sysdep.h"
+#include "bfd.h"
#include "bfdlink.h"
#include "ld.h"
@@ -131,7 +131,7 @@ struct ld_emulation_xfer_struct ld_${EMULATION_NAME}_emulation =
${LDEMUL_GET_SCRIPT-gld${EMULATION_NAME}_get_script},
"${EMULATION_NAME}",
"${OUTPUT_FORMAT}",
- ${LDEMUL_FINISH-NULL},
+ ${LDEMUL_FINISH-finish_default},
${LDEMUL_CREATE_OUTPUT_SECTION_STATEMENTS-NULL},
${LDEMUL_OPEN_DYNAMIC_ARCHIVE-NULL},
${LDEMUL_PLACE_ORPHAN-NULL},
diff --git a/contrib/binutils/ld/emultempl/ia64elf.em b/contrib/binutils/ld/emultempl/ia64elf.em
index eee467b..ddc5370 100644
--- a/contrib/binutils/ld/emultempl/ia64elf.em
+++ b/contrib/binutils/ld/emultempl/ia64elf.em
@@ -15,7 +15,7 @@
#
# 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.
+# Foundation, Inc., 51 Franklin Street - Fifth Floor, Boston, MA 02110-1301, USA.
#
# This file is sourced from elf32.em, and defines extra ia64-elf
@@ -32,7 +32,7 @@ static int itanium = 0;
static void
gld${EMULATION_NAME}_after_parse (void)
{
- link_info.need_relax_finalize = TRUE;
+ link_info.relax_pass = 2;
bfd_elf${ELFSIZE}_ia64_after_parse (itanium);
}
diff --git a/contrib/binutils/ld/emultempl/linux.em b/contrib/binutils/ld/emultempl/linux.em
index d041b68..48ac046 100644
--- a/contrib/binutils/ld/emultempl/linux.em
+++ b/contrib/binutils/ld/emultempl/linux.em
@@ -9,8 +9,8 @@ cat >e${EMULATION_NAME}.c <<EOF
/* This file is is generated by a shell script. DO NOT EDIT! */
/* Linux a.out emulation code for ${EMULATION_NAME}
- Copyright 1991, 1993, 1994, 1995, 1996, 1998, 1999, 2000, 2002, 2003, 2004
- Free Software Foundation, Inc.
+ Copyright 1991, 1993, 1994, 1995, 1996, 1998, 1999, 2000, 2001, 2002,
+ 2003, 2004, 2005, 2007 Free Software Foundation, Inc.
Written by Steve Chamberlain <sac@cygnus.com>
Linux support by Eric Youngdale <ericy@cais.cais.com>
@@ -28,12 +28,12 @@ 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. */
+Foundation, Inc., 51 Franklin Street - Fifth Floor, Boston, MA 02110-1301, USA. */
#define TARGET_IS_${EMULATION_NAME}
-#include "bfd.h"
#include "sysdep.h"
+#include "bfd.h"
#include "bfdlink.h"
#include "ld.h"
@@ -121,6 +121,8 @@ gld${EMULATION_NAME}_before_allocation (void)
dynamic linking. */
if (! bfd_${EMULATION_NAME}_size_dynamic_sections (output_bfd, &link_info))
einfo ("%P%F: failed to set dynamic section sizes: %E\n");
+
+ before_allocation_default ();
}
static char *
@@ -190,7 +192,7 @@ struct ld_emulation_xfer_struct ld_${EMULATION_NAME}_emulation =
gld${EMULATION_NAME}_get_script,
"${EMULATION_NAME}",
"${OUTPUT_FORMAT}",
- NULL, /* finish */
+ finish_default,
gld${EMULATION_NAME}_create_output_section_statements,
gld${EMULATION_NAME}_open_dynamic_archive,
NULL, /* place orphan */
diff --git a/contrib/binutils/ld/emultempl/mipsecoff.em b/contrib/binutils/ld/emultempl/mipsecoff.em
index dde33c2..780cc60 100644
--- a/contrib/binutils/ld/emultempl/mipsecoff.em
+++ b/contrib/binutils/ld/emultempl/mipsecoff.em
@@ -1,51 +1,30 @@
# This shell script emits a C file. -*- C -*-
-# It does some substitutions.
+# Copyright 1994, 1995, 1997, 1999, 2000, 2001, 2002, 2003, 2004
+# Free Software Foundation, Inc.
+#
+# This file is part of GLD, the Gnu Linker.
+#
+# 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., 51 Franklin Street - Fifth Floor, Boston, MA 02110-1301, USA.
+#
+
if [ -z "$MACHINE" ]; then
OUTPUT_ARCH=${ARCH}
else
OUTPUT_ARCH=${ARCH}:${MACHINE}
fi
-cat >e${EMULATION_NAME}.c <<EOF
-/* This file is is generated by a shell script. DO NOT EDIT! */
-
-/* Handle embedded relocs for MIPS.
- Copyright 1994, 1995, 1997, 2000, 2002, 2003, 2004
- Free Software Foundation, Inc.
- Written by Ian Lance Taylor <ian@cygnus.com> based on generic.em.
-
-This file is part of GLD, the Gnu Linker.
-
-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. */
-
-#define TARGET_IS_${EMULATION_NAME}
-
-#include "bfd.h"
-#include "sysdep.h"
-#include "bfdlink.h"
-
-#include "ld.h"
-#include "ldmain.h"
-#include "ldmisc.h"
-
-#include "ldexp.h"
-#include "ldlang.h"
-#include "ldfile.h"
-#include "ldemul.h"
-
-static void check_sections (bfd *, asection *, void *);
-
+cat >>e${EMULATION_NAME}.c <<EOF
static void
gld${EMULATION_NAME}_before_parse (void)
{
@@ -53,196 +32,6 @@ gld${EMULATION_NAME}_before_parse (void)
ldfile_set_output_arch ("${OUTPUT_ARCH}", bfd_arch_`echo ${ARCH} | sed -e 's/:.*//'`);
#endif /* not TARGET_ */
}
-
-/* This function is run after all the input files have been opened.
- We create a .rel.sdata section for each input file with a non zero
- .sdata section. The BFD backend will fill in these sections with
- magic numbers which can be used to relocate the data section at run
- time. This will only do the right thing if all the input files
- have been compiled using -membedded-pic. */
-
-static void
-gld${EMULATION_NAME}_after_open (void)
-{
- bfd *abfd;
-
- if (! command_line.embedded_relocs
- || link_info.relocatable)
- return;
-
- for (abfd = link_info.input_bfds; abfd != NULL; abfd = abfd->link_next)
- {
- asection *datasec;
-
- /* As first-order business, make sure that each input BFD is ECOFF. It
- better be, as we are directly calling an ECOFF backend function. */
- if (bfd_get_flavour (abfd) != bfd_target_ecoff_flavour)
- einfo ("%F%B: all input objects must be ECOFF for --embedded-relocs\n");
-
- datasec = bfd_get_section_by_name (abfd, ".sdata");
-
- /* Note that we assume that the reloc_count field has already
- been set up. We could call bfd_get_reloc_upper_bound, but
- that returns the size of a memory buffer rather than a reloc
- count. We do not want to call bfd_canonicalize_reloc,
- because although it would always work it would force us to
- read in the relocs into BFD canonical form, which would waste
- a significant amount of time and memory. */
- if (datasec != NULL && datasec->reloc_count > 0)
- {
- asection *relsec;
-
- relsec = bfd_make_section (abfd, ".rel.sdata");
- if (relsec == NULL
- || ! bfd_set_section_flags (abfd, relsec,
- (SEC_ALLOC
- | SEC_LOAD
- | SEC_HAS_CONTENTS
- | SEC_IN_MEMORY))
- || ! bfd_set_section_alignment (abfd, relsec, 2)
- || ! bfd_set_section_size (abfd, relsec,
- datasec->reloc_count * 4))
- einfo ("%F%B: can not create .rel.sdata section: %E\n");
- }
-
- /* Double check that all other data sections are empty, as is
- required for embedded PIC code. */
- bfd_map_over_sections (abfd, check_sections, datasec);
- }
-}
-
-/* Check that of the data sections, only the .sdata section has
- relocs. This is called via bfd_map_over_sections. */
-
-static void
-check_sections (bfd *abfd, asection *sec, void *sdatasec)
-{
- if ((bfd_get_section_flags (abfd, sec) & SEC_CODE) == 0
- && sec != sdatasec
- && sec->reloc_count != 0)
- einfo ("%B%X: section %s has relocs; can not use --embedded-relocs\n",
- abfd, bfd_get_section_name (abfd, sec));
-}
-
-/* This function is called after the section sizes and offsets have
- been set. If we are generating embedded relocs, it calls a special
- BFD backend routine to do the work. */
-
-static void
-gld${EMULATION_NAME}_after_allocation (void)
-{
- bfd *abfd;
-
- if (! command_line.embedded_relocs
- || link_info.relocatable)
- return;
-
- for (abfd = link_info.input_bfds; abfd != NULL; abfd = abfd->link_next)
- {
- asection *datasec, *relsec;
- char *errmsg;
-
- datasec = bfd_get_section_by_name (abfd, ".sdata");
-
- if (datasec == NULL || datasec->reloc_count == 0)
- continue;
-
- relsec = bfd_get_section_by_name (abfd, ".rel.sdata");
- ASSERT (relsec != NULL);
-
- if (! bfd_mips_ecoff_create_embedded_relocs (abfd, &link_info,
- datasec, relsec,
- &errmsg))
- {
- if (errmsg == NULL)
- einfo ("%B%X: can not create runtime reloc information: %E\n",
- abfd);
- else
- einfo ("%X%B: can not create runtime reloc information: %s\n",
- abfd, errmsg);
- }
- }
-}
-
-static char *
-gld${EMULATION_NAME}_get_script (int *isfile)
EOF
-if test -n "$COMPILE_IN"
-then
-# Scripts compiled in.
-
-# sed commands to quote an ld script as a C string.
-sc="-f stringify.sed"
-
-cat >>e${EMULATION_NAME}.c <<EOF
-{
- *isfile = 0;
-
- if (link_info.relocatable && config.build_constructors)
- return
-EOF
-sed $sc ldscripts/${EMULATION_NAME}.xu >> e${EMULATION_NAME}.c
-echo ' ; else if (link_info.relocatable) return' >> e${EMULATION_NAME}.c
-sed $sc ldscripts/${EMULATION_NAME}.xr >> e${EMULATION_NAME}.c
-echo ' ; else if (!config.text_read_only) return' >> e${EMULATION_NAME}.c
-sed $sc ldscripts/${EMULATION_NAME}.xbn >> e${EMULATION_NAME}.c
-echo ' ; else if (!config.magic_demand_paged) return' >> e${EMULATION_NAME}.c
-sed $sc ldscripts/${EMULATION_NAME}.xn >> e${EMULATION_NAME}.c
-echo ' ; else return' >> e${EMULATION_NAME}.c
-sed $sc ldscripts/${EMULATION_NAME}.x >> e${EMULATION_NAME}.c
-echo '; }' >> e${EMULATION_NAME}.c
-
-else
-# Scripts read from the filesystem.
-
-cat >>e${EMULATION_NAME}.c <<EOF
-{
- *isfile = 1;
-
- if (link_info.relocatable && config.build_constructors)
- return "ldscripts/${EMULATION_NAME}.xu";
- else if (link_info.relocatable)
- return "ldscripts/${EMULATION_NAME}.xr";
- else if (!config.text_read_only)
- return "ldscripts/${EMULATION_NAME}.xbn";
- else if (!config.magic_demand_paged)
- return "ldscripts/${EMULATION_NAME}.xn";
- else
- return "ldscripts/${EMULATION_NAME}.x";
-}
-EOF
-
-fi
-
-cat >>e${EMULATION_NAME}.c <<EOF
-
-struct ld_emulation_xfer_struct ld_${EMULATION_NAME}_emulation =
-{
- gld${EMULATION_NAME}_before_parse,
- syslib_default,
- hll_default,
- after_parse_default,
- gld${EMULATION_NAME}_after_open,
- gld${EMULATION_NAME}_after_allocation,
- set_output_arch_default,
- ldemul_default_target,
- before_allocation_default,
- gld${EMULATION_NAME}_get_script,
- "${EMULATION_NAME}",
- "${OUTPUT_FORMAT}",
- NULL, /* finish */
- NULL, /* create output section statements */
- NULL, /* open dynamic archive */
- NULL, /* place orphan */
- NULL, /* set symbols */
- NULL, /* parse args */
- NULL, /* add_options */
- NULL, /* handle_option */
- NULL, /* unrecognized file */
- NULL, /* list options */
- NULL, /* recognized file */
- NULL, /* find_potential_libraries */
- NULL /* new_vers_pattern */
-};
-EOF
+LDEMUL_BEFORE_PARSE=gld${EMULATION_NAME}_before_parse
diff --git a/contrib/binutils/ld/emultempl/mipself.em b/contrib/binutils/ld/emultempl/mipself.em
index a950fb1..846cdc5 100644
--- a/contrib/binutils/ld/emultempl/mipself.em
+++ b/contrib/binutils/ld/emultempl/mipself.em
@@ -1,7 +1,5 @@
# This shell script emits a C file. -*- C -*-
-# Copyright 2002, 2003 Free Software Foundation, Inc.
-# Written by Mitch Lichtenberg <mpl@broadcom.com> and
-# Chris Demetriou <cgd@broadcom.com> based on m68kelf.em and mipsecoff.em.
+# Copyright 2006 Free Software Foundation, Inc.
#
# This file is part of GLD, the Gnu Linker.
#
@@ -16,162 +14,24 @@
# 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.
-
-
-# This file is sourced from elf32.em, and defines some extra routines for m68k
-# embedded systems using ELF and for some other systems using m68k ELF. While
-# it is sourced from elf32.em for all m68k ELF configurations, here we include
-# only the features we want depending on the configuration.
-
-case ${target} in
- mips*-*-elf)
- echo "#define SUPPORT_EMBEDDED_RELOCS" >>e${EMULATION_NAME}.c
- ;;
-esac
+# along with this program; if not, write to the Free Software Foundation,
+# Inc., 51 Franklin Street - Fifth Floor, Boston, MA 02110-1301, USA.
cat >>e${EMULATION_NAME}.c <<EOF
-
-#ifdef SUPPORT_EMBEDDED_RELOCS
-static void mips_elf${ELFSIZE}_check_sections (bfd *, asection *, void *);
-#endif
-
-/* This function is run after all the input files have been opened. */
-
static void
-mips_elf${ELFSIZE}_after_open (void)
+mips_after_parse (void)
{
- /* Call the standard elf routine. */
- gld${EMULATION_NAME}_after_open ();
-
-#ifdef SUPPORT_EMBEDDED_RELOCS
- if (command_line.embedded_relocs && (! link_info.relocatable))
- {
- bfd *abfd;
-
- /* In the embedded relocs mode we create a .rel.sdata section for
- each input file with a .sdata section which has has
- relocations. The BFD backend will fill in these sections
- with magic numbers which can be used to relocate the data
- section at run time. */
- for (abfd = link_info.input_bfds; abfd != NULL; abfd = abfd->link_next)
- {
- asection *datasec;
-
- /* As first-order business, make sure that each input BFD is
- ELF. We need to call a special BFD backend function to
- generate the embedded relocs, and we have that function
- only for ELF */
-
- if (bfd_get_flavour (abfd) != bfd_target_elf_flavour)
- einfo ("%F%B: all input objects must be ELF for --embedded-relocs\n");
-
- if (bfd_get_arch_size (abfd) != ${ELFSIZE})
- einfo ("%F%B: all input objects must be ${ELFSIZE}-bit ELF for --embedded-relocs\n");
-
- datasec = bfd_get_section_by_name (abfd, ".sdata");
-
- /* Note that we assume that the reloc_count field has already
- been set up. We could call bfd_get_reloc_upper_bound, but
- that returns the size of a memory buffer rather than a reloc
- count. We do not want to call bfd_canonicalize_reloc,
- because although it would always work it would force us to
- read in the relocs into BFD canonical form, which would waste
- a significant amount of time and memory. */
-
- if (datasec != NULL && datasec->reloc_count > 0)
- {
- asection *relsec;
-
- relsec = bfd_make_section (abfd, ".rel.sdata");
- if (relsec == NULL
- || ! bfd_set_section_flags (abfd, relsec,
- (SEC_ALLOC
- | SEC_LOAD
- | SEC_HAS_CONTENTS
- | SEC_IN_MEMORY))
- || ! bfd_set_section_alignment (abfd, relsec,
- (${ELFSIZE} == 32) ? 2 : 3)
- || ! bfd_set_section_size (abfd, relsec,
- datasec->reloc_count
- * ((${ELFSIZE} / 8) + 8)))
- einfo ("%F%B: cannot create .rel.sdata section: %E\n");
- }
-
- /* Double check that all other data sections have no relocs,
- as is required for embedded PIC code. */
- bfd_map_over_sections (abfd, mips_elf${ELFSIZE}_check_sections,
- datasec);
- }
- }
-#endif /* SUPPORT_EMBEDDED_RELOCS */
-}
-
-#ifdef SUPPORT_EMBEDDED_RELOCS
-/* Check that of the data sections, only the .sdata section has
- relocs. This is called via bfd_map_over_sections. */
-
-static void
-mips_elf${ELFSIZE}_check_sections (bfd *abfd, asection *sec, void *sdatasec)
-{
- if ((bfd_get_section_flags (abfd, sec) & SEC_DATA)
- && sec != sdatasec
- && sec->reloc_count != 0)
- einfo ("%B%X: section %s has relocs; cannot use --embedded-relocs\n",
- abfd, bfd_get_section_name (abfd, sec));
-}
-#endif /* SUPPORT_EMBEDDED_RELOCS */
-
-/* This function is called after the section sizes and offsets have
- been set. If we are generating embedded relocs, it calls a special
- BFD backend routine to do the work. */
-
-static void
-mips_elf${ELFSIZE}_after_allocation (void)
-{
- /* Call the standard elf routine. */
- after_allocation_default ();
-
-#ifdef SUPPORT_EMBEDDED_RELOCS
- if (command_line.embedded_relocs && (! link_info.relocatable))
+ /* .gnu.hash and the MIPS ABI require .dynsym to be sorted in different
+ ways. .gnu.hash needs symbols to be grouped by hash code whereas the
+ MIPS ABI requires a mapping between the GOT and the symbol table. */
+ if (link_info.emit_gnu_hash)
{
- bfd *abfd;
-
- for (abfd = link_info.input_bfds; abfd != NULL; abfd = abfd->link_next)
- {
- asection *datasec, *relsec;
- char *errmsg;
-
- datasec = bfd_get_section_by_name (abfd, ".sdata");
-
- if (datasec == NULL || datasec->reloc_count == 0)
- continue;
-
- relsec = bfd_get_section_by_name (abfd, ".rel.sdata");
- ASSERT (relsec != NULL);
-
- if (! bfd_mips_elf${ELFSIZE}_create_embedded_relocs (abfd,
- &link_info,
- datasec,
- relsec,
- &errmsg))
- {
- if (errmsg == NULL)
- einfo ("%B%X: can not create runtime reloc information: %E\n",
- abfd);
- else
- einfo ("%X%B: can not create runtime reloc information: %s\n",
- abfd, errmsg);
- }
- }
+ einfo ("%X%P: .gnu.hash is incompatible with the MIPS ABI\n");
+ link_info.emit_hash = TRUE;
+ link_info.emit_gnu_hash = FALSE;
}
-#endif /* SUPPORT_EMBEDDED_RELOCS */
+ after_parse_default ();
}
-
EOF
-# We have our own after_open and after_allocation functions, but they call
-# the standard routines, so give them a different name.
-LDEMUL_AFTER_OPEN=mips_elf${ELFSIZE}_after_open
-LDEMUL_AFTER_ALLOCATION=mips_elf${ELFSIZE}_after_allocation
+LDEMUL_AFTER_PARSE=mips_after_parse
diff --git a/contrib/binutils/ld/emultempl/needrelax.em b/contrib/binutils/ld/emultempl/needrelax.em
index 65e622b..aaa85d0 100644
--- a/contrib/binutils/ld/emultempl/needrelax.em
+++ b/contrib/binutils/ld/emultempl/needrelax.em
@@ -15,7 +15,7 @@
#
# 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.
+# Foundation, Inc., 51 Franklin Street - Fifth Floor, Boston, MA 02110-1301, USA.
#
# This file is sourced from elf32.em. It is used by targets for
diff --git a/contrib/binutils/ld/emultempl/pe.em b/contrib/binutils/ld/emultempl/pe.em
index 7d6c2e8..e9b316a 100644
--- a/contrib/binutils/ld/emultempl/pe.em
+++ b/contrib/binutils/ld/emultempl/pe.em
@@ -1,5 +1,6 @@
# This shell script emits a C file. -*- C -*-
# It does some substitutions.
+test -z "${ENTRY}" && ENTRY="_mainCRTStartup"
if [ -z "$MACHINE" ]; then
OUTPUT_ARCH=${ARCH}
else
@@ -9,8 +10,8 @@ rm -f e${EMULATION_NAME}.c
(echo;echo;echo;echo;echo)>e${EMULATION_NAME}.c # there, now line numbers match ;-)
cat >>e${EMULATION_NAME}.c <<EOF
/* This file is part of GLD, the Gnu Linker.
- Copyright 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004
- Free Software Foundation, Inc.
+ Copyright 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004,
+ 2005, 2006, 2007 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
@@ -24,7 +25,7 @@ cat >>e${EMULATION_NAME}.c <<EOF
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. */
+ Foundation, Inc., 51 Franklin Street - Fifth Floor, Boston, MA 02110-1301, USA. */
/* For WINDOWS_NT */
/* The original file generated returned different default scripts depending
@@ -36,17 +37,20 @@ cat >>e${EMULATION_NAME}.c <<EOF
#define TARGET_IS_${EMULATION_NAME}
/* Do this before including bfd.h, so we prototype the right functions. */
-#ifdef TARGET_IS_arm_epoc_pe
-#define bfd_arm_pe_allocate_interworking_sections \
- bfd_arm_epoc_pe_allocate_interworking_sections
-#define bfd_arm_pe_get_bfd_for_interworking \
- bfd_arm_epoc_pe_get_bfd_for_interworking
-#define bfd_arm_pe_process_before_allocation \
- bfd_arm_epoc_pe_process_before_allocation
-#endif
-#include "bfd.h"
+#if defined(TARGET_IS_armpe) \
+ || defined(TARGET_IS_arm_epoc_pe) \
+ || defined(TARGET_IS_arm_wince_pe)
+#define bfd_arm_allocate_interworking_sections \
+ bfd_${EMULATION_NAME}_allocate_interworking_sections
+#define bfd_arm_get_bfd_for_interworking \
+ bfd_${EMULATION_NAME}_get_bfd_for_interworking
+#define bfd_arm_process_before_allocation \
+ bfd_${EMULATION_NAME}_process_before_allocation
+#endif
+
#include "sysdep.h"
+#include "bfd.h"
#include "bfdlink.h"
#include "getopt.h"
#include "libiberty.h"
@@ -62,6 +66,11 @@ cat >>e${EMULATION_NAME}.c <<EOF
#include "ldctor.h"
#include "coff/internal.h"
+/* FIXME: See bfd/peXXigen.c for why we include an architecture specific
+ header in generic PE code. */
+#include "coff/i386.h"
+#include "coff/pe.h"
+
/* FIXME: This is a BFD internal header file, and we should not be
using it here. */
#include "../bfd/libcoff.h"
@@ -79,10 +88,12 @@ cat >>e${EMULATION_NAME}.c <<EOF
#define PE_DEF_SECTION_ALIGNMENT ${OVERRIDE_SECTION_ALIGNMENT}
#endif
-#if defined(TARGET_IS_i386pe)
-#define DLL_SUPPORT
-#endif
-#if defined(TARGET_IS_shpe) || defined(TARGET_IS_mipspe) || defined(TARGET_IS_armpe)
+#if defined(TARGET_IS_i386pe) \
+ || defined(TARGET_IS_shpe) \
+ || defined(TARGET_IS_mipspe) \
+ || defined(TARGET_IS_armpe) \
+ || defined(TARGET_IS_arm_epoc_pe) \
+ || defined(TARGET_IS_arm_wince_pe)
#define DLL_SUPPORT
#endif
@@ -93,7 +104,8 @@ cat >>e${EMULATION_NAME}.c <<EOF
#undef PE_DEF_SECTION_ALIGNMENT
#undef PE_DEF_FILE_ALIGNMENT
#define NT_EXE_IMAGE_BASE 0x00010000
-#ifdef TARGET_IS_armpe
+
+#if defined(TARGET_IS_armpe) || defined(TARGET_IS_arm_wince_pe)
#define PE_DEF_SECTION_ALIGNMENT 0x00001000
#define PE_DEF_SUBSYSTEM 9
#else
@@ -103,9 +115,11 @@ cat >>e${EMULATION_NAME}.c <<EOF
#define PE_DEF_FILE_ALIGNMENT 0x00000200
#endif
+#define U(S) ${INITIAL_SYMBOL_CHAR} S
static struct internal_extra_pe_aouthdr pe;
static int dll;
+static flagword real_flags = 0;
static int support_old_code = 0;
static char * thumb_entry_symbol = NULL;
static lang_assignment_statement_type *image_base_statement = 0;
@@ -129,14 +143,16 @@ gld_${EMULATION_NAME}_before_parse (void)
config.dynamic_link = TRUE;
config.has_shared = 1;
link_info.pei386_auto_import = -1;
- link_info.pei386_runtime_pseudo_reloc = FALSE;
+ link_info.pei386_runtime_pseudo_reloc = -1;
#if (PE_DEF_SUBSYSTEM == 9) || (PE_DEF_SUBSYSTEM == 2)
-#if defined TARGET_IS_mipspe || defined TARGET_IS_armpe
- lang_add_entry ("WinMainCRTStartup", FALSE);
+#if defined TARGET_IS_mipspe || defined TARGET_IS_armpe || defined TARGET_IS_arm_wince_pe
+ lang_default_entry ("WinMainCRTStartup");
#else
- lang_add_entry ("_WinMainCRTStartup", FALSE);
+ lang_default_entry ("_WinMainCRTStartup");
#endif
+#else
+ lang_default_entry ("${ENTRY}");
#endif
#endif
}
@@ -182,6 +198,8 @@ gld_${EMULATION_NAME}_before_parse (void)
(OPTION_EXCLUDE_LIBS + 1)
#define OPTION_DLL_DISABLE_RUNTIME_PSEUDO_RELOC \
(OPTION_DLL_ENABLE_RUNTIME_PSEUDO_RELOC + 1)
+#define OPTION_LARGE_ADDRESS_AWARE \
+ (OPTION_DLL_DISABLE_RUNTIME_PSEUDO_RELOC + 1)
static void
gld${EMULATION_NAME}_add_options
@@ -235,6 +253,7 @@ gld${EMULATION_NAME}_add_options
{"enable-runtime-pseudo-reloc", no_argument, NULL, OPTION_DLL_ENABLE_RUNTIME_PSEUDO_RELOC},
{"disable-runtime-pseudo-reloc", no_argument, NULL, OPTION_DLL_DISABLE_RUNTIME_PSEUDO_RELOC},
#endif
+ {"large-address-aware", no_argument, NULL, OPTION_LARGE_ADDRESS_AWARE},
{NULL, no_argument, NULL, 0}
};
@@ -270,8 +289,8 @@ static definfo init[] =
D(MinorOperatingSystemVersion,"__minor_os_version__", 0),
D(MajorImageVersion,"__major_image_version__", 1),
D(MinorImageVersion,"__minor_image_version__", 0),
-#ifdef TARGET_IS_armpe
- D(MajorSubsystemVersion,"__major_subsystem_version__", 2),
+#if defined(TARGET_IS_armpe) || defined(TARGET_IS_arm_wince_pe)
+ D(MajorSubsystemVersion,"__major_subsystem_version__", 3),
#else
D(MajorSubsystemVersion,"__major_subsystem_version__", 4),
#endif
@@ -335,6 +354,8 @@ gld_${EMULATION_NAME}_list_options (FILE *file)
fprintf (file, _(" --enable-extra-pe-debug Enable verbose debug output when building\n\
or linking to DLLs (esp. auto-import)\n"));
#endif
+ fprintf (file, _(" --large-address-aware Executable supports virtual addresses\n\
+ greater than 2 gigabytes\n"));
}
@@ -361,8 +382,13 @@ static void
set_pe_subsystem (void)
{
const char *sver;
+ const char *entry;
+ const char *initial_symbol_char;
+ char *end;
int len;
int i;
+ int subsystem;
+ unsigned long temp_subsystem;
static const struct
{
const char *name;
@@ -371,29 +397,23 @@ set_pe_subsystem (void)
}
v[] =
{
- { "native", 1, "NtProcessStartup" },
-#if defined TARGET_IS_mipspe || defined TARGET_IS_armpe
- { "windows", 2, "WinMainCRTStartup" },
-#else
+ { "native", 1, "NtProcessStartup" },
{ "windows", 2, "WinMainCRTStartup" },
-#endif
{ "console", 3, "mainCRTStartup" },
-#if 0
- /* The Microsoft linker does not recognize this. */
- { "os2", 5, "" },
-#endif
- { "posix", 7, "__PosixProcessStartup"},
- { "wince", 9, "_WinMainCRTStartup" },
- { 0, 0, 0 }
+ { "posix", 7, "__PosixProcessStartup"},
+ { "wince", 9, "WinMainCRTStartup" },
+ { "xbox", 14, "mainCRTStartup" },
+ { NULL, 0, NULL }
};
+ /* Entry point name for arbitrary subsystem numbers. */
+ static const char default_entry[] = "mainCRTStartup";
+ /* Check for the presence of a version number. */
sver = strchr (optarg, ':');
if (sver == NULL)
len = strlen (optarg);
else
{
- char *end;
-
len = sver - optarg;
set_pe_name ("__major_subsystem_version__",
strtoul (sver + 1, &end, 0));
@@ -404,40 +424,62 @@ set_pe_subsystem (void)
einfo (_("%P: warning: bad version number in -subsystem option\n"));
}
- for (i = 0; v[i].name; i++)
+ /* Check for numeric subsystem. */
+ temp_subsystem = strtoul (optarg, & end, 0);
+ if ((*end == ':' || *end == '\0') && (temp_subsystem < 65536))
{
- if (strncmp (optarg, v[i].name, len) == 0
- && v[i].name[len] == '\0')
- {
- const char *initial_symbol_char;
- const char *entry;
-
- set_pe_name ("__subsystem__", v[i].value);
+ /* Search list for a numeric match to use its entry point. */
+ for (i = 0; v[i].name; i++)
+ if (v[i].value == (int) temp_subsystem)
+ break;
- initial_symbol_char = ${INITIAL_SYMBOL_CHAR};
- if (*initial_symbol_char == '\0')
- entry = v[i].entry;
- else
- {
- char *alc_entry;
-
- /* lang_add_entry expects its argument to be permanently
- allocated, so we don't free this string. */
- alc_entry = xmalloc (strlen (initial_symbol_char)
- + strlen (v[i].entry)
- + 1);
- strcpy (alc_entry, initial_symbol_char);
- strcat (alc_entry, v[i].entry);
- entry = alc_entry;
- }
+ /* If no match, use the default. */
+ if (v[i].name != NULL)
+ entry = v[i].entry;
+ else
+ entry = default_entry;
- lang_add_entry (entry, TRUE);
+ /* Use this subsystem. */
+ subsystem = (int) temp_subsystem;
+ }
+ else
+ {
+ /* Search for subsystem by name. */
+ for (i = 0; v[i].name; i++)
+ if (strncmp (optarg, v[i].name, len) == 0
+ && v[i].name[len] == '\0')
+ break;
+ if (v[i].name == NULL)
+ {
+ einfo (_("%P%F: invalid subsystem type %s\n"), optarg);
return;
}
+
+ entry = v[i].entry;
+ subsystem = v[i].value;
}
- einfo (_("%P%F: invalid subsystem type %s\n"), optarg);
+ set_pe_name ("__subsystem__", subsystem);
+
+ initial_symbol_char = ${INITIAL_SYMBOL_CHAR};
+ if (*initial_symbol_char != '\0')
+ {
+ char *alc_entry;
+
+ /* lang_default_entry expects its argument to be permanently
+ allocated, so we don't free this string. */
+ alc_entry = xmalloc (strlen (initial_symbol_char)
+ + strlen (entry)
+ + 1);
+ strcpy (alc_entry, initial_symbol_char);
+ strcat (alc_entry, entry);
+ entry = alc_entry;
+ }
+
+ lang_default_entry (entry);
+
+ return;
}
@@ -597,6 +639,9 @@ gld${EMULATION_NAME}_handle_option (int optc)
pe_dll_extra_pe_debug = 1;
break;
#endif
+ case OPTION_LARGE_ADDRESS_AWARE:
+ real_flags |= IMAGE_FILE_LARGE_ADDRESS_AWARE;
+ break;
}
return TRUE;
}
@@ -632,7 +677,7 @@ static unsigned long
compute_dll_image_base (const char *ofile)
{
unsigned long hash = strhash (ofile);
- return 0x60000000 | ((hash << 16) & 0x0FFC0000);
+ return 0x61300000 + ((hash << 16) & 0x0FFC0000);
}
#endif
@@ -651,7 +696,7 @@ gld_${EMULATION_NAME}_set_symbols (void)
{
if (link_info.relocatable)
init[IMAGEBASEOFF].value = 0;
- else if (init[DLLOFF].value || link_info.shared)
+ else if (init[DLLOFF].value || (link_info.shared && !link_info.pie))
#ifdef DLL_SUPPORT
init[IMAGEBASEOFF].value = (pe_enable_auto_image_base) ?
compute_dll_image_base (output_filename) : NT_DLL_IMAGE_BASE;
@@ -759,7 +804,7 @@ pe_fixup_stdcalls (void)
if (pe_dll_extra_pe_debug)
printf ("%s\n", __FUNCTION__);
- for (undef = link_info.hash->undefs; undef; undef=undef->und_next)
+ for (undef = link_info.hash->undefs; undef; undef=undef->u.undef.next)
if (undef->type == bfd_link_hash_undefined)
{
char* at = strchr (undef->root.string, '@');
@@ -828,17 +873,17 @@ static int
make_import_fixup (arelent *rel, asection *s)
{
struct bfd_symbol *sym = *rel->sym_ptr_ptr;
- int addend = 0;
+ char addend[4];
if (pe_dll_extra_pe_debug)
printf ("arelent: %s@%#lx: add=%li\n", sym->name,
(long) rel->address, (long) rel->addend);
- if (! bfd_get_section_contents (s->owner, s, &addend, rel->address, sizeof (addend)))
+ if (! bfd_get_section_contents (s->owner, s, addend, rel->address, sizeof (addend)))
einfo (_("%C: Cannot get section contents - auto-import exception\n"),
s->owner, s, rel->address);
- pe_create_import_fixup (rel, s, addend);
+ pe_create_import_fixup (rel, s, bfd_get_32 (s->owner, addend));
return 1;
}
@@ -851,22 +896,22 @@ pe_find_data_imports (void)
if (link_info.pei386_auto_import == 0)
return;
- for (undef = link_info.hash->undefs; undef; undef=undef->und_next)
+ for (undef = link_info.hash->undefs; undef; undef=undef->u.undef.next)
{
if (undef->type == bfd_link_hash_undefined)
- {
- /* C++ symbols are *long*. */
- char buf[4096];
+ {
+ /* C++ symbols are *long*. */
+ char buf[4096];
if (pe_dll_extra_pe_debug)
printf ("%s:%s\n", __FUNCTION__, undef->root.string);
- sprintf (buf, "__imp_%s", undef->root.string);
+ sprintf (buf, "__imp_%s", undef->root.string);
- sym = bfd_link_hash_lookup (link_info.hash, buf, 0, 0, 1);
+ sym = bfd_link_hash_lookup (link_info.hash, buf, 0, 0, 1);
- if (sym && sym->type == bfd_link_hash_defined)
- {
+ if (sym && sym->type == bfd_link_hash_defined)
+ {
bfd *b = sym->u.def.section->owner;
asymbol **symbols;
int nsyms, symsize, i;
@@ -881,15 +926,14 @@ pe_find_data_imports (void)
for (i = 0; i < nsyms; i++)
{
- if (memcmp (symbols[i]->name, "__head_",
- sizeof ("__head_") - 1))
+ if (! CONST_STRNEQ (symbols[i]->name, U ("_head_")))
continue;
if (pe_dll_extra_pe_debug)
printf ("->%s\n", symbols[i]->name);
pe_data_import_dll = (char*) (symbols[i]->name +
- sizeof ("__head_") - 1);
+ sizeof (U ("_head_")) - 1);
break;
}
@@ -904,8 +948,8 @@ pe_find_data_imports (void)
undef->root.string = sym->root.string;
undef->u.def.value = sym->u.def.value;
undef->u.def.section = sym->u.def.section;
- }
- }
+ }
+ }
}
}
@@ -931,8 +975,8 @@ gld_${EMULATION_NAME}_after_open (void)
printf ("%s()\n", __FUNCTION__);
- for (sym = link_info.hash->undefs; sym; sym=sym->und_next)
- printf ("-%s\n", sym->root.string);
+ for (sym = link_info.hash->undefs; sym; sym=sym->u.undef.next)
+ printf ("-%s\n", sym->root.string);
bfd_hash_traverse (&link_info.hash->table, pr_sym, NULL);
for (a = link_info.input_bfds; a; a = a->link_next)
@@ -945,10 +989,11 @@ gld_${EMULATION_NAME}_after_open (void)
including an internal BFD header. */
if (coff_data (output_bfd) == NULL || coff_data (output_bfd)->pe == 0)
- einfo (_("%F%P: PE operations on non PE file.\n"));
+ einfo (_("%F%P: cannot perform PE operations on non PE output file '%B'.\n"), output_bfd);
pe_data (output_bfd)->pe_opthdr = pe;
pe_data (output_bfd)->dll = init[DLLOFF].value;
+ pe_data (output_bfd)->real_flags |= real_flags;
#ifdef DLL_SUPPORT
if (pe_enable_stdcall_fixup) /* -1=warn or 1=disable */
@@ -958,22 +1003,21 @@ gld_${EMULATION_NAME}_after_open (void)
pe_find_data_imports ();
-#if ! (defined (TARGET_IS_i386pe) || defined (TARGET_IS_armpe))
- if (link_info.shared)
-#else
+#if defined (TARGET_IS_i386pe) \
+ || defined (TARGET_IS_armpe) \
+ || defined (TARGET_IS_arm_epoc_pe) \
+ || defined (TARGET_IS_arm_wince_pe)
if (!link_info.relocatable)
-#endif
pe_dll_build_sections (output_bfd, &link_info);
-
-#ifndef TARGET_IS_i386pe
-#ifndef TARGET_IS_armpe
else
pe_exe_build_sections (output_bfd, &link_info);
+#else
+ if (link_info.shared)
+ pe_dll_build_sections (output_bfd, &link_info);
#endif
-#endif
-#endif
+#endif /* DLL_SUPPORT */
-#if defined(TARGET_IS_armpe) || defined(TARGET_IS_arm_epoc_pe)
+#if defined(TARGET_IS_armpe) || defined(TARGET_IS_arm_epoc_pe) || defined(TARGET_IS_arm_wince_pe)
if (strstr (bfd_get_target (output_bfd), "arm") == NULL)
{
/* The arm backend needs special fields in the output hash structure.
@@ -987,7 +1031,7 @@ gld_${EMULATION_NAME}_after_open (void)
/* Find a BFD that can hold the interworking stubs. */
LANG_FOR_EACH_INPUT_STATEMENT (is)
{
- if (bfd_arm_pe_get_bfd_for_interworking (is->the_bfd, & link_info))
+ if (bfd_arm_get_bfd_for_interworking (is->the_bfd, & link_info))
break;
}
}
@@ -1016,7 +1060,7 @@ gld_${EMULATION_NAME}_after_open (void)
{
if (strcmp (sec->name, ".idata\$2") == 0)
idata2 = 1;
- if (strncmp (sec->name, ".idata\$", 7) == 0)
+ if (CONST_STRNEQ (sec->name, ".idata\$"))
is_imp = 1;
reloc_count += sec->reloc_count;
}
@@ -1051,7 +1095,7 @@ gld_${EMULATION_NAME}_after_open (void)
relocs = (arelent **) xmalloc ((size_t) relsize);
nrelocs = bfd_canonicalize_reloc (is->the_bfd, sec,
- relocs, symbols);
+ relocs, symbols);
if (nrelocs < 0)
{
free (relocs);
@@ -1063,7 +1107,7 @@ gld_${EMULATION_NAME}_after_open (void)
{
struct bfd_symbol *s;
struct bfd_link_hash_entry * blhe;
- bfd *other_bfd;
+ char *other_bfd_filename;
char *n;
s = (relocs[i]->sym_ptr_ptr)[0];
@@ -1080,17 +1124,18 @@ gld_${EMULATION_NAME}_after_open (void)
|| blhe->type != bfd_link_hash_defined)
continue;
- other_bfd = blhe->u.def.section->owner;
+ other_bfd_filename
+ = blhe->u.def.section->owner->my_archive
+ ? bfd_get_filename (blhe->u.def.section->owner->my_archive)
+ : bfd_get_filename (blhe->u.def.section->owner);
- if (strcmp (is->the_bfd->my_archive->filename,
- other_bfd->my_archive->filename) == 0)
+ if (strcmp (bfd_get_filename (is->the_bfd->my_archive),
+ other_bfd_filename) == 0)
continue;
- /* Rename this implib to match the other. */
- n = (char *) xmalloc (strlen (other_bfd->my_archive->filename) + 1);
-
- strcpy (n, other_bfd->my_archive->filename);
-
+ /* Rename this implib to match the other one. */
+ n = xmalloc (strlen (other_bfd_filename) + 1);
+ strcpy (n, other_bfd_filename);
is->the_bfd->my_archive->filename = n;
}
@@ -1134,7 +1179,7 @@ gld_${EMULATION_NAME}_after_open (void)
is3 && is3->the_bfd->my_archive == arch;
is3 = (lang_input_statement_type *) is3->next)
{
- /* A MS dynamic import library can also contain static
+ /* A MS dynamic import library can also contain static
members, so look for the first element with a .dll
extension, and use that for the remainder of the
comparisons. */
@@ -1205,6 +1250,74 @@ gld_${EMULATION_NAME}_after_open (void)
}
}
}
+
+ {
+ /* The following chunk of code tries to identify jump stubs in
+ import libraries which are dead code and eliminates them
+ from the final link. For each exported symbol <sym>, there
+ is a object file in the import library with a .text section
+ and several .idata$* sections. The .text section contains the
+ symbol definition for <sym> which is a jump stub of the form
+ jmp *__imp_<sym>. The .idata$5 contains the symbol definition
+ for __imp_<sym> which is the address of the slot for <sym> in
+ the import address table. When a symbol is imported explicitly
+ using __declspec(dllimport) declaration, the compiler generates
+ a reference to __imp_<sym> which directly resolves to the
+ symbol in .idata$5, in which case the jump stub code is not
+ needed. The following code tries to identify jump stub sections
+ in import libraries which are not referred to by anyone and
+ marks them for exclusion from the final link. */
+ LANG_FOR_EACH_INPUT_STATEMENT (is)
+ {
+ if (is->the_bfd->my_archive)
+ {
+ int is_imp = 0;
+ asection *sec, *stub_sec = NULL;
+
+ /* See if this is an import library thunk. */
+ for (sec = is->the_bfd->sections; sec; sec = sec->next)
+ {
+ if (strncmp (sec->name, ".idata\$", 7) == 0)
+ is_imp = 1;
+ /* The section containing the jmp stub has code
+ and has a reloc. */
+ if ((sec->flags & SEC_CODE) && sec->reloc_count)
+ stub_sec = sec;
+ }
+
+ if (is_imp && stub_sec)
+ {
+ long symsize;
+ asymbol **symbols;
+ long src_count;
+ struct bfd_link_hash_entry * blhe;
+
+ symsize = bfd_get_symtab_upper_bound (is->the_bfd);
+ symbols = xmalloc (symsize);
+ symsize = bfd_canonicalize_symtab (is->the_bfd, symbols);
+
+ for (src_count = 0; src_count < symsize; src_count++)
+ {
+ if (symbols[src_count]->section->id == stub_sec->id)
+ {
+ /* This symbol belongs to the section containing
+ the stub. */
+ blhe = bfd_link_hash_lookup (link_info.hash,
+ symbols[src_count]->name,
+ FALSE, FALSE, TRUE);
+ /* If the symbol in the stub section has no other
+ undefined references, exclude the stub section
+ from the final link. */
+ if (blhe && (blhe->type == bfd_link_hash_defined)
+ && (blhe->u.undef.next == NULL))
+ stub_sec->flags |= SEC_EXCLUDE;
+ }
+ }
+ free (symbols);
+ }
+ }
+ }
+ }
}
static void
@@ -1227,7 +1340,7 @@ gld_${EMULATION_NAME}_before_allocation (void)
ppc_allocate_toc_section (&link_info);
#endif /* TARGET_IS_ppcpe */
-#if defined(TARGET_IS_armpe) || defined(TARGET_IS_arm_epoc_pe)
+#if defined(TARGET_IS_armpe) || defined(TARGET_IS_arm_epoc_pe) || defined(TARGET_IS_arm_wince_pe)
/* FIXME: we should be able to set the size of the interworking stub
section.
@@ -1237,7 +1350,7 @@ gld_${EMULATION_NAME}_before_allocation (void)
{
LANG_FOR_EACH_INPUT_STATEMENT (is)
{
- if (! bfd_arm_pe_process_before_allocation
+ if (! bfd_arm_process_before_allocation
(is->the_bfd, & link_info, support_old_code))
{
/* xgettext:c-format */
@@ -1248,8 +1361,10 @@ gld_${EMULATION_NAME}_before_allocation (void)
}
/* We have seen it all. Allocate it, and carry on. */
- bfd_arm_pe_allocate_interworking_sections (& link_info);
-#endif /* TARGET_IS_armpe */
+ bfd_arm_allocate_interworking_sections (& link_info);
+#endif /* TARGET_IS_armpe || TARGET_IS_arm_epoc_pe || TARGET_IS_arm_wince_pe */
+
+ before_allocation_default ();
}
#ifdef DLL_SUPPORT
@@ -1276,10 +1391,7 @@ gld_${EMULATION_NAME}_unrecognized_file (lang_input_statement_type *entry ATTRIB
if (strcmp (ext, ".def") == 0 || strcmp (ext, ".DEF") == 0)
{
- if (pe_def_file == 0)
- pe_def_file = def_file_empty ();
-
- def_file_parse (entry->filename, pe_def_file);
+ pe_def_file = def_file_parse (entry->filename, pe_def_file);
if (pe_def_file)
{
@@ -1299,7 +1411,7 @@ gld_${EMULATION_NAME}_unrecognized_file (lang_input_statement_type *entry ATTRIB
{
struct bfd_link_hash_entry *h;
- sprintf (buf, "_%s", pe_def_file->exports[i].internal_name);
+ sprintf (buf, "%s%s", U (""), pe_def_file->exports[i].internal_name);
h = bfd_link_hash_lookup (link_info.hash, buf, TRUE, TRUE, TRUE);
if (h == (struct bfd_link_hash_entry *) NULL)
@@ -1328,14 +1440,6 @@ gld_${EMULATION_NAME}_unrecognized_file (lang_input_statement_type *entry ATTRIB
exp_assop ('=', "__image_base__", exp_intop (pe.ImageBase));
}
-#if 0
- /* Not sure if these *should* be set. */
- if (pe_def_file->version_major != -1)
- {
- pe.MajorImageVersion = pe_def_file->version_major;
- pe.MinorImageVersion = pe_def_file->version_minor;
- }
-#endif
if (pe_def_file->stack_reserve != -1
&& ! saw_option ("__size_of_stack_reserve__"))
{
@@ -1373,19 +1477,14 @@ gld_${EMULATION_NAME}_recognized_file (lang_input_statement_type *entry ATTRIBUT
#ifdef TARGET_IS_armpe
pe_dll_id_target ("pei-arm-little");
#endif
- if (bfd_get_format (entry->the_bfd) == bfd_object)
- {
- char fbuf[LD_PATHMAX + 1];
- const char *ext;
-
- if (REALPATH (entry->filename, fbuf) == NULL)
- strncpy (fbuf, entry->filename, sizeof (fbuf));
-
- ext = fbuf + strlen (fbuf) - 4;
-
- if (strcmp (ext, ".dll") == 0 || strcmp (ext, ".DLL") == 0)
- return pe_implied_import_dll (fbuf);
- }
+#ifdef TARGET_IS_arm_epoc_pe
+ pe_dll_id_target ("epoc-pei-arm-little");
+#endif
+#ifdef TARGET_IS_arm_wince_pe
+ pe_dll_id_target ("pei-arm-wince-little");
+#endif
+ if (pe_bfd_is_dll (entry->the_bfd))
+ return pe_implied_import_dll (entry->filename);
#endif
return FALSE;
}
@@ -1393,7 +1492,7 @@ gld_${EMULATION_NAME}_recognized_file (lang_input_statement_type *entry ATTRIBUT
static void
gld_${EMULATION_NAME}_finish (void)
{
-#if defined(TARGET_IS_armpe) || defined(TARGET_IS_arm_epoc_pe)
+#if defined(TARGET_IS_armpe) || defined(TARGET_IS_arm_epoc_pe) || defined(TARGET_IS_arm_wince_pe)
struct bfd_link_hash_entry * h;
if (thumb_entry_symbol != NULL)
@@ -1433,7 +1532,9 @@ gld_${EMULATION_NAME}_finish (void)
else
einfo (_("%P: warning: connot find thumb start symbol %s\n"), thumb_entry_symbol);
}
-#endif /* defined(TARGET_IS_armpe) || defined(TARGET_IS_arm_epoc_pe) */
+#endif /* defined(TARGET_IS_armpe) || defined(TARGET_IS_arm_epoc_pe) || defined(TARGET_IS_arm_wince_pe) */
+
+ finish_default ();
#ifdef DLL_SUPPORT
if (link_info.shared
@@ -1464,38 +1565,13 @@ gld_${EMULATION_NAME}_finish (void)
if (asec)
{
- asec->flags &= ~SEC_CODE;
- asec->flags |= SEC_DATA;
+ asec->flags &= ~SEC_CODE;
+ asec->flags |= SEC_DATA;
}
}
}
-/* Find the last output section before given output statement.
- Used by place_orphan. */
-
-static asection *
-output_prev_sec_find (lang_output_section_statement_type *os)
-{
- asection *s = (asection *) NULL;
- lang_statement_union_type *u;
- lang_output_section_statement_type *lookup;
-
- for (u = lang_output_section_statement.head;
- u != (lang_statement_union_type *) NULL;
- u = lookup->next)
- {
- lookup = &u->output_section_statement;
- if (lookup == os)
- return s;
-
- if (lookup->bfd_section != NULL && lookup->bfd_section->owner != NULL)
- s = lookup->bfd_section;
- }
-
- return NULL;
-}
-
/* Place an orphan section.
We use this to put sections in a reasonable place in the file, and
@@ -1509,289 +1585,157 @@ output_prev_sec_find (lang_output_section_statement_type *os)
default linker script using wildcards, and are sorted by
sort_sections. */
-struct orphan_save
-{
- lang_output_section_statement_type *os;
- asection **section;
- lang_statement_union_type **stmt;
-};
-
static bfd_boolean
-gld_${EMULATION_NAME}_place_orphan (lang_input_statement_type *file, asection *s)
+gld_${EMULATION_NAME}_place_orphan (asection *s)
{
const char *secname;
- char *hold_section_name;
+ const char *orig_secname;
char *dollar = NULL;
- const char *ps = NULL;
lang_output_section_statement_type *os;
lang_statement_list_type add_child;
+ lang_statement_union_type **pl;
secname = bfd_get_section_name (s->owner, s);
/* Look through the script to see where to place this section. */
- hold_section_name = xstrdup (secname);
- if (!link_info.relocatable)
+ orig_secname = secname;
+ if (!link_info.relocatable
+ && (dollar = strchr (secname, '$')) != NULL)
{
- dollar = strchr (hold_section_name, '$');
- if (dollar != NULL)
- *dollar = '\0';
+ size_t len = dollar - orig_secname;
+ char *newname = xmalloc (len + 1);
+ memcpy (newname, orig_secname, len);
+ newname[len] = '\0';
+ secname = newname;
}
- os = lang_output_section_find (hold_section_name);
+ os = lang_output_section_find (secname);
lang_list_init (&add_child);
if (os != NULL
&& (os->bfd_section == NULL
+ || os->bfd_section->flags == 0
|| ((s->flags ^ os->bfd_section->flags)
& (SEC_LOAD | SEC_ALLOC)) == 0))
{
/* We already have an output section statement with this
- name, and its bfd section, if any, has compatible flags. */
- lang_add_section (&add_child, s, os, file);
+ name, and its bfd section, if any, has compatible flags.
+ If the section already exists but does not have any flags set,
+ then it has been created by the linker, probably as a result of
+ a --section-start command line switch. */
+ lang_add_section (&add_child, s, os);
}
else
{
+ static struct orphan_save hold[] =
+ {
+ { ".text",
+ SEC_HAS_CONTENTS | SEC_ALLOC | SEC_LOAD | SEC_READONLY | SEC_CODE,
+ 0, 0, 0, 0 },
+ { ".rdata",
+ SEC_HAS_CONTENTS | SEC_ALLOC | SEC_LOAD | SEC_READONLY | SEC_DATA,
+ 0, 0, 0, 0 },
+ { ".data",
+ SEC_HAS_CONTENTS | SEC_ALLOC | SEC_LOAD | SEC_DATA,
+ 0, 0, 0, 0 },
+ { ".bss",
+ SEC_ALLOC,
+ 0, 0, 0, 0 }
+ };
+ enum orphan_save_index
+ {
+ orphan_text = 0,
+ orphan_rodata,
+ orphan_data,
+ orphan_bss
+ };
+ static int orphan_init_done = 0;
struct orphan_save *place;
- static struct orphan_save hold_text;
- static struct orphan_save hold_rdata;
- static struct orphan_save hold_data;
- static struct orphan_save hold_bss;
- char *outsecname;
- lang_statement_list_type *old;
- lang_statement_list_type add;
+ lang_output_section_statement_type *after;
etree_type *address;
+ if (!orphan_init_done)
+ {
+ struct orphan_save *ho;
+ for (ho = hold; ho < hold + sizeof (hold) / sizeof (hold[0]); ++ho)
+ if (ho->name != NULL)
+ {
+ ho->os = lang_output_section_find (ho->name);
+ if (ho->os != NULL && ho->os->flags == 0)
+ ho->os->flags = ho->flags;
+ }
+ orphan_init_done = 1;
+ }
+
/* Try to put the new output section in a reasonable place based
on the section name and section flags. */
-#define HAVE_SECTION(hold, name) \
-(hold.os != NULL || (hold.os = lang_output_section_find (name)) != NULL)
place = NULL;
if ((s->flags & SEC_ALLOC) == 0)
;
- else if ((s->flags & SEC_HAS_CONTENTS) == 0
- && HAVE_SECTION (hold_bss, ".bss"))
- place = &hold_bss;
- else if ((s->flags & SEC_READONLY) == 0
- && HAVE_SECTION (hold_data, ".data"))
- place = &hold_data;
- else if ((s->flags & SEC_CODE) == 0
- && (s->flags & SEC_READONLY) != 0
- && HAVE_SECTION (hold_rdata, ".rdata"))
- place = &hold_rdata;
- else if ((s->flags & SEC_READONLY) != 0
- && HAVE_SECTION (hold_text, ".text"))
- place = &hold_text;
-
-#undef HAVE_SECTION
-
- /* Choose a unique name for the section. This will be needed if
- the same section name appears in the input file with
- different loadable or allocatable characteristics. */
- outsecname = xstrdup (hold_section_name);
- if (bfd_get_section_by_name (output_bfd, outsecname) != NULL)
- {
- unsigned int len;
- char *newname;
- unsigned int i;
-
- len = strlen (outsecname);
- newname = xmalloc (len + 5);
- strcpy (newname, outsecname);
- i = 0;
- do
- {
- sprintf (newname + len, "%d", i);
- ++i;
- }
- while (bfd_get_section_by_name (output_bfd, newname) != NULL);
-
- free (outsecname);
- outsecname = newname;
- }
-
- /* Start building a list of statements for this section. */
- old = stat_ptr;
- stat_ptr = &add;
- lang_list_init (stat_ptr);
+ else if ((s->flags & (SEC_LOAD | SEC_HAS_CONTENTS)) == 0)
+ place = &hold[orphan_bss];
+ else if ((s->flags & SEC_READONLY) == 0)
+ place = &hold[orphan_data];
+ else if ((s->flags & SEC_CODE) == 0)
+ place = &hold[orphan_rodata];
+ else
+ place = &hold[orphan_text];
- if (config.build_constructors)
+ after = NULL;
+ if (place != NULL)
{
- /* 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 ((unsigned char) *ps) && *ps != '_')
- break;
- if (*ps == '\0')
- {
- char *symname;
- etree_type *e_align;
-
- symname = (char *) xmalloc (ps - outsecname + sizeof "___start_");
- sprintf (symname, "___start_%s", outsecname);
- e_align = exp_unop (ALIGN_K,
- exp_intop ((bfd_vma) 1 << s->alignment_power));
- lang_add_assignment (exp_assop ('=', symname, e_align));
- }
+ if (place->os == NULL)
+ place->os = lang_output_section_find (place->name);
+ after = place->os;
+ if (after == NULL)
+ after = lang_output_section_find_by_flags (s, &place->os, NULL);
+ if (after == NULL)
+ /* *ABS* is always the first output section statement. */
+ after = (&lang_output_section_statement.head
+ ->output_section_statement);
}
- if (link_info.relocatable || (s->flags & (SEC_LOAD | SEC_ALLOC)) == 0)
- address = exp_intop ((bfd_vma) 0);
- else
+ /* Choose a unique name for the section. This will be needed if the
+ same section name appears in the input file with different
+ loadable or allocatable characteristics. */
+ if (bfd_get_section_by_name (output_bfd, secname) != NULL)
{
- /* All sections in an executable must be aligned to a page
- boundary. */
- address = exp_unop (ALIGN_K,
- exp_nameop (NAME, "__section_alignment__"));
- }
-
- os = lang_enter_output_section_statement (outsecname, address, 0,
- (etree_type *) NULL,
- (etree_type *) NULL,
- (etree_type *) NULL);
-
- lang_add_section (&add_child, s, os, file);
-
- lang_leave_output_section_statement
- ((bfd_vma) 0, "*default*",
- (struct lang_output_section_phdr_list *) NULL, NULL);
-
- if (config.build_constructors && *ps == '\0')
- {
- char *symname;
-
- /* lang_leave_ouput_section_statement resets stat_ptr.
- Put stat_ptr back where we want it. */
- if (place != NULL)
- stat_ptr = &add;
-
- symname = (char *) xmalloc (ps - outsecname + sizeof "___stop_");
- sprintf (symname, "___stop_%s", outsecname);
- lang_add_assignment (exp_assop ('=', symname,
- exp_nameop (NAME, ".")));
+ static int count = 1;
+ secname = bfd_get_unique_section_name (output_bfd, secname, &count);
+ if (secname == NULL)
+ einfo ("%F%P: place_orphan failed: %E\n");
}
- stat_ptr = old;
-
- if (place != NULL && os->bfd_section != NULL)
- {
- asection *snew, **pps;
-
- snew = os->bfd_section;
-
- /* Shuffle the bfd section list to make the output file look
- neater. This is really only cosmetic. */
- if (place->section == NULL)
- {
- asection *bfd_section = place->os->bfd_section;
-
- /* If the output statement hasn't been used to place
- any input sections (and thus doesn't have an output
- bfd_section), look for the closest prior output statement
- having an output section. */
- if (bfd_section == NULL)
- bfd_section = output_prev_sec_find (place->os);
-
- if (bfd_section != NULL && bfd_section != snew)
- place->section = &bfd_section->next;
- }
-
- if (place->section != NULL)
- {
- /* Unlink the section. */
- for (pps = &output_bfd->sections;
- *pps != snew;
- pps = &(*pps)->next)
- ;
- bfd_section_list_remove (output_bfd, pps);
-
- /* Now tack it on to the "place->os" section list. */
- bfd_section_list_insert (output_bfd, place->section, snew);
- }
-
- /* Save the end of this list. Further ophans of this type will
- follow the one we've just added. */
- place->section = &snew->next;
-
- /* The following is non-cosmetic. We try to put the output
- statements in some sort of reasonable order here, because
- they determine the final load addresses of the orphan
- sections. In addition, placing output statements in the
- wrong order may require extra segments. For instance,
- given a typical situation of all read-only sections placed
- in one segment and following that a segment containing all
- the read-write sections, we wouldn't want to place an orphan
- read/write section before or amongst the read-only ones. */
- if (add.head != NULL)
- {
- if (place->stmt == NULL)
- {
- /* Put the new statement list right at the head. */
- *add.tail = place->os->header.next;
- place->os->header.next = add.head;
- }
- else
- {
- /* Put it after the last orphan statement we added. */
- *add.tail = *place->stmt;
- *place->stmt = add.head;
- }
-
- /* Fix the global list pointer if we happened to tack our
- new list at the tail. */
- if (*old->tail == add.head)
- old->tail = add.tail;
-
- /* Save the end of this list. */
- place->stmt = add.tail;
- }
- }
+ /* All sections in an executable must be aligned to a page boundary. */
+ address = exp_unop (ALIGN_K, exp_nameop (NAME, "__section_alignment__"));
+ os = lang_insert_orphan (s, secname, after, place, address, &add_child);
}
- {
- lang_statement_union_type **pl = &os->children.head;
-
- if (dollar != NULL)
- {
- bfd_boolean found_dollar;
-
- /* The section name has a '$'. Sort it with the other '$'
- sections. */
- found_dollar = FALSE;
- for ( ; *pl != NULL; pl = &(*pl)->header.next)
- {
- lang_input_section_type *ls;
- const char *lname;
-
- if ((*pl)->header.type != lang_input_section_enum)
- continue;
+ /* If the section name has a '\$', sort it with the other '\$'
+ sections. */
+ for (pl = &os->children.head; *pl != NULL; pl = &(*pl)->header.next)
+ {
+ lang_input_section_type *ls;
+ const char *lname;
- ls = &(*pl)->input_section;
+ if ((*pl)->header.type != lang_input_section_enum)
+ continue;
- lname = bfd_get_section_name (ls->ifile->the_bfd, ls->section);
- if (strchr (lname, '$') == NULL)
- {
- if (found_dollar)
- break;
- }
- else
- {
- found_dollar = TRUE;
- if (strcmp (secname, lname) < 0)
- break;
- }
- }
- }
+ ls = &(*pl)->input_section;
- if (add_child.head != NULL)
- {
- add_child.head->header.next = *pl;
- *pl = add_child.head;
- }
- }
+ lname = bfd_get_section_name (ls->section->owner, ls->section);
+ if (strchr (lname, '\$') != NULL
+ && (dollar == NULL || strcmp (orig_secname, lname) < 0))
+ break;
+ }
- free (hold_section_name);
+ if (add_child.head != NULL)
+ {
+ *add_child.tail = *pl;
+ *pl = add_child.head;
+ }
return TRUE;
}
@@ -1801,87 +1745,100 @@ gld_${EMULATION_NAME}_open_dynamic_archive
(const char *arch ATTRIBUTE_UNUSED, search_dirs_type *search,
lang_input_statement_type *entry)
{
+ static const struct
+ {
+ const char * format;
+ bfd_boolean use_prefix;
+ }
+ libname_fmt [] =
+ {
+ /* Preferred explicit import library for dll's. */
+ { "lib%s.dll.a", FALSE },
+ /* Alternate explicit import library for dll's. */
+ { "%s.dll.a", FALSE },
+ /* "libfoo.a" could be either an import lib or a static lib.
+ For backwards compatibility, libfoo.a needs to precede
+ libfoo.dll and foo.dll in the search. */
+ { "lib%s.a", FALSE },
+ /* The 'native' spelling of an import lib name is "foo.lib". */
+ { "%s.lib", FALSE },
+#ifdef DLL_SUPPORT
+ /* Try "<prefix>foo.dll" (preferred dll name, if specified). */
+ { "%s%s.dll", TRUE },
+#endif
+ /* Try "libfoo.dll" (default preferred dll name). */
+ { "lib%s.dll", FALSE },
+ /* Finally try 'native' dll name "foo.dll". */
+ { "%s.dll", FALSE },
+ /* Note: If adding more formats to this table, make sure to check to
+ see if their length is longer than libname_fmt[0].format, and if
+ so, update the call to xmalloc() below. */
+ { NULL, FALSE }
+ };
+ static unsigned int format_max_len = 0;
const char * filename;
- char * string;
+ char * full_string;
+ char * base_string;
+ unsigned int i;
+
if (! entry->is_archive)
return FALSE;
filename = entry->filename;
- string = (char *) xmalloc (strlen (search->name)
- + strlen (filename)
- + sizeof "/lib.a.dll"
+ if (format_max_len == 0)
+ /* We need to allow space in the memory that we are going to allocate
+ for the characters in the format string. Since the format array is
+ static we only need to calculate this information once. In theory
+ this value could also be computed statically, but this introduces
+ the possibility for a discrepancy and hence a possible memory
+ corruption. The lengths we compute here will be too long because
+ they will include any formating characters (%s) in the strings, but
+ this will not matter. */
+ for (i = 0; libname_fmt[i].format; i++)
+ if (format_max_len < strlen (libname_fmt[i].format))
+ format_max_len = strlen (libname_fmt[i].format);
+
+ full_string = xmalloc (strlen (search->name)
+ + strlen (filename)
+ + format_max_len
#ifdef DLL_SUPPORT
- + (pe_dll_search_prefix ? strlen (pe_dll_search_prefix) : 0)
+ + (pe_dll_search_prefix
+ ? strlen (pe_dll_search_prefix) : 0)
#endif
- + 1);
+ /* Allow for the terminating NUL and for the path
+ separator character that is inserted between
+ search->name and the start of the format string. */
+ + 2);
- /* Try "libfoo.dll.a" first (preferred explicit import library for dll's. */
- sprintf (string, "%s/lib%s.dll.a", search->name, filename);
+ sprintf (full_string, "%s/", search->name);
+ base_string = full_string + strlen (full_string);
- if (! ldfile_try_open_bfd (string, entry))
+ for (i = 0; libname_fmt[i].format; i++)
{
- /* Try "foo.dll.a" next (alternate explicit import library for dll's. */
- sprintf (string, "%s/%s.dll.a", search->name, filename);
- if (! ldfile_try_open_bfd (string, entry))
- {
- /* Try libfoo.a next. Normally, this would be interpreted as a static
- library, but it *could* be an import library. For backwards compatibility,
- libfoo.a needs to ==precede== libfoo.dll and foo.dll in the search,
- or sometimes errors occur when building legacy packages.
-
- Putting libfoo.a here means that in a failure case (i.e. the library
- -lfoo is not found) we will search for libfoo.a twice before
- giving up -- once here, and once when searching for a "static" lib.
- for a "static" lib. */
- /* Try "libfoo.a" (import lib, or static lib, but must
- take precedence over dll's). */
- sprintf (string, "%s/lib%s.a", search->name, filename);
- if (! ldfile_try_open_bfd (string, entry))
- {
-#ifdef DLL_SUPPORT
- if (pe_dll_search_prefix)
- {
- /* Try "<prefix>foo.dll" (preferred dll name, if specified). */
- sprintf (string, "%s/%s%s.dll", search->name, pe_dll_search_prefix, filename);
- if (! ldfile_try_open_bfd (string, entry))
- {
- /* Try "libfoo.dll" (default preferred dll name). */
- sprintf (string, "%s/lib%s.dll", search->name, filename);
- if (! ldfile_try_open_bfd (string, entry))
- {
- /* Finally, try "foo.dll" (alternate dll name). */
- sprintf (string, "%s/%s.dll", search->name, filename);
- if (! ldfile_try_open_bfd (string, entry))
- {
- free (string);
- return FALSE;
- }
- }
- }
- }
- else /* pe_dll_search_prefix not specified. */
+#ifdef DLL_SUPPORT
+ if (libname_fmt[i].use_prefix)
+ {
+ if (!pe_dll_search_prefix)
+ continue;
+ sprintf (base_string, libname_fmt[i].format, pe_dll_search_prefix, filename);
+ }
+ else
#endif
- {
- /* Try "libfoo.dll" (preferred dll name). */
- sprintf (string, "%s/lib%s.dll", search->name, filename);
- if (! ldfile_try_open_bfd (string, entry))
- {
- /* Finally, try "foo.dll" (alternate dll name). */
- sprintf (string, "%s/%s.dll", search->name, filename);
- if (! ldfile_try_open_bfd (string, entry))
- {
- free (string);
- return FALSE;
- }
- }
- }
- }
- }
+ sprintf (base_string, libname_fmt[i].format, filename);
+
+ if (ldfile_try_open_bfd (full_string, entry))
+ break;
+ }
+
+ if (!libname_fmt[i].format)
+ {
+ free (full_string);
+ return FALSE;
}
- entry->filename = string;
+ entry->filename = full_string;
return TRUE;
}
@@ -1907,16 +1864,16 @@ cat >>e${EMULATION_NAME}.c <<EOF
if (link_info.relocatable && config.build_constructors)
return
EOF
-sed $sc ldscripts/${EMULATION_NAME}.xu >> e${EMULATION_NAME}.c
-echo ' ; else if (link_info.relocatable) return' >> e${EMULATION_NAME}.c
-sed $sc ldscripts/${EMULATION_NAME}.xr >> e${EMULATION_NAME}.c
-echo ' ; else if (!config.text_read_only) return' >> e${EMULATION_NAME}.c
-sed $sc ldscripts/${EMULATION_NAME}.xbn >> e${EMULATION_NAME}.c
-echo ' ; else if (!config.magic_demand_paged) return' >> e${EMULATION_NAME}.c
-sed $sc ldscripts/${EMULATION_NAME}.xn >> e${EMULATION_NAME}.c
-echo ' ; else return' >> e${EMULATION_NAME}.c
-sed $sc ldscripts/${EMULATION_NAME}.x >> e${EMULATION_NAME}.c
-echo '; }' >> e${EMULATION_NAME}.c
+sed $sc ldscripts/${EMULATION_NAME}.xu >> e${EMULATION_NAME}.c
+echo ' ; else if (link_info.relocatable) return' >> e${EMULATION_NAME}.c
+sed $sc ldscripts/${EMULATION_NAME}.xr >> e${EMULATION_NAME}.c
+echo ' ; else if (!config.text_read_only) return' >> e${EMULATION_NAME}.c
+sed $sc ldscripts/${EMULATION_NAME}.xbn >> e${EMULATION_NAME}.c
+echo ' ; else if (!config.magic_demand_paged) return' >> e${EMULATION_NAME}.c
+sed $sc ldscripts/${EMULATION_NAME}.xn >> e${EMULATION_NAME}.c
+echo ' ; else return' >> e${EMULATION_NAME}.c
+sed $sc ldscripts/${EMULATION_NAME}.x >> e${EMULATION_NAME}.c
+echo '; }' >> e${EMULATION_NAME}.c
cat >>e${EMULATION_NAME}.c <<EOF
diff --git a/contrib/binutils/ld/emultempl/pep.em b/contrib/binutils/ld/emultempl/pep.em
new file mode 100644
index 0000000..f44471b
--- /dev/null
+++ b/contrib/binutils/ld/emultempl/pep.em
@@ -0,0 +1,1706 @@
+# This shell script emits a C file. -*- C -*-
+# It does some substitutions.
+test -z "${ENTRY}" && ENTRY="_mainCRTStartup"
+if [ -z "$MACHINE" ]; then
+ OUTPUT_ARCH=${ARCH}
+else
+ OUTPUT_ARCH=${ARCH}:${MACHINE}
+fi
+rm -f e${EMULATION_NAME}.c
+(echo;echo;echo;echo;echo)>e${EMULATION_NAME}.c # there, now line numbers match ;-)
+cat >>e${EMULATION_NAME}.c <<EOF
+/* This file is part of GLD, the Gnu Linker.
+ Copyright 2006, 2007 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
+ 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., 51 Franklin Street - Fifth Floor, Boston, MA 02110-1301, USA.
+
+ Written by Kai Tietz, OneVision Software GmbH&CoKg. */
+
+/* For WINDOWS_XP64 and higher */
+/* Based on pe.em, but modified for 64 bit support. */
+
+#define TARGET_IS_${EMULATION_NAME}
+
+#define COFF_IMAGE_WITH_PE
+#define COFF_WITH_PE
+#define COFF_WITH_pex64
+
+#include "sysdep.h"
+#include "bfd.h"
+#include "bfdlink.h"
+#include "getopt.h"
+#include "libiberty.h"
+#include "ld.h"
+#include "ldmain.h"
+#include "ldexp.h"
+#include "ldlang.h"
+#include "ldfile.h"
+#include "ldemul.h"
+#include <ldgram.h>
+#include "ldlex.h"
+#include "ldmisc.h"
+#include "ldctor.h"
+#include "coff/internal.h"
+
+/* FIXME: See bfd/peXXigen.c for why we include an architecture specific
+ header in generic PE code. */
+#include "coff/x86_64.h"
+#include "coff/pe.h"
+
+/* FIXME: This is a BFD internal header file, and we should not be
+ using it here. */
+#include "../bfd/libcoff.h"
+
+#undef AOUTSZ
+#define AOUTSZ PEPAOUTSZ
+#define PEAOUTHDR PEPAOUTHDR
+
+#include "deffile.h"
+#include "pep-dll.h"
+#include "safe-ctype.h"
+
+/* Permit the emulation parameters to override the default section
+ alignment by setting OVERRIDE_SECTION_ALIGNMENT. FIXME: This makes
+ it seem that include/coff/internal.h should not define
+ PE_DEF_SECTION_ALIGNMENT. */
+#if PE_DEF_SECTION_ALIGNMENT != ${OVERRIDE_SECTION_ALIGNMENT:-PE_DEF_SECTION_ALIGNMENT}
+#undef PE_DEF_SECTION_ALIGNMENT
+#define PE_DEF_SECTION_ALIGNMENT ${OVERRIDE_SECTION_ALIGNMENT}
+#endif
+
+#ifdef TARGET_IS_i386pep
+#define DLL_SUPPORT
+#endif
+
+#if defined(TARGET_IS_i386pep) || ! defined(DLL_SUPPORT)
+#define PE_DEF_SUBSYSTEM 3
+#else
+#undef NT_EXE_IMAGE_BASE
+#define NT_EXE_IMAGE_BASE 0x00010000
+#undef PE_DEF_SECTION_ALIGNMENT
+#define PE_DEF_SUBSYSTEM 2
+#undef PE_DEF_FILE_ALIGNMENT
+#define PE_DEF_FILE_ALIGNMENT 0x00000200
+#define PE_DEF_SECTION_ALIGNMENT 0x00000400
+#endif
+
+
+static struct internal_extra_pe_aouthdr pep;
+static int dll;
+static flagword real_flags = IMAGE_FILE_LARGE_ADDRESS_AWARE;
+static int support_old_code = 0;
+static lang_assignment_statement_type *image_base_statement = 0;
+
+#ifdef DLL_SUPPORT
+static int pep_enable_stdcall_fixup = -1; /* 0=disable 1=enable. */
+static char * pep_out_def_filename = NULL;
+static char * pep_implib_filename = NULL;
+static int pep_enable_auto_image_base = 0;
+static char * pep_dll_search_prefix = NULL;
+#endif
+
+extern const char *output_filename;
+
+static void
+gld_${EMULATION_NAME}_before_parse (void)
+{
+ ldfile_set_output_arch ("${OUTPUT_ARCH}", bfd_arch_`echo ${ARCH} | sed -e 's/:.*//'`);
+ output_filename = "${EXECUTABLE_NAME:-a.exe}";
+#ifdef DLL_SUPPORT
+ config.dynamic_link = TRUE;
+ config.has_shared = 1;
+ link_info.pei386_auto_import = -1;
+ link_info.pei386_runtime_pseudo_reloc = -1;
+
+#if (PE_DEF_SUBSYSTEM == 9) || (PE_DEF_SUBSYSTEM == 2)
+ lang_default_entry ("_WinMainCRTStartup");
+#else
+ lang_default_entry ("${ENTRY}");
+#endif
+#endif
+}
+
+/* PE format extra command line options. */
+
+/* Used for setting flags in the PE header. */
+enum options
+{
+ OPTION_BASE_FILE = 300 + 1,
+ OPTION_DLL,
+ OPTION_FILE_ALIGNMENT,
+ OPTION_IMAGE_BASE,
+ OPTION_MAJOR_IMAGE_VERSION,
+ OPTION_MAJOR_OS_VERSION,
+ OPTION_MAJOR_SUBSYSTEM_VERSION,
+ OPTION_MINOR_IMAGE_VERSION,
+ OPTION_MINOR_OS_VERSION,
+ OPTION_MINOR_SUBSYSTEM_VERSION,
+ OPTION_SECTION_ALIGNMENT,
+ OPTION_STACK,
+ OPTION_SUBSYSTEM,
+ OPTION_HEAP,
+ OPTION_SUPPORT_OLD_CODE,
+ OPTION_OUT_DEF,
+ OPTION_EXPORT_ALL,
+ OPTION_EXCLUDE_SYMBOLS,
+ OPTION_KILL_ATS,
+ OPTION_STDCALL_ALIASES,
+ OPTION_ENABLE_STDCALL_FIXUP,
+ OPTION_DISABLE_STDCALL_FIXUP,
+ OPTION_IMPLIB_FILENAME,
+ OPTION_WARN_DUPLICATE_EXPORTS,
+ OPTION_IMP_COMPAT,
+ OPTION_ENABLE_AUTO_IMAGE_BASE,
+ OPTION_DISABLE_AUTO_IMAGE_BASE,
+ OPTION_DLL_SEARCH_PREFIX,
+ OPTION_NO_DEFAULT_EXCLUDES,
+ OPTION_DLL_ENABLE_AUTO_IMPORT,
+ OPTION_DLL_DISABLE_AUTO_IMPORT,
+ OPTION_ENABLE_EXTRA_PE_DEBUG,
+ OPTION_EXCLUDE_LIBS,
+ OPTION_DLL_ENABLE_RUNTIME_PSEUDO_RELOC,
+ OPTION_DLL_DISABLE_RUNTIME_PSEUDO_RELOC
+};
+
+static void
+gld${EMULATION_NAME}_add_options
+ (int ns ATTRIBUTE_UNUSED,
+ char **shortopts ATTRIBUTE_UNUSED,
+ int nl,
+ struct option **longopts,
+ int nrl ATTRIBUTE_UNUSED,
+ struct option **really_longopts ATTRIBUTE_UNUSED)
+{
+ static const struct option xtra_long[] =
+ {
+ /* PE options */
+ {"base-file", required_argument, NULL, OPTION_BASE_FILE},
+ {"dll", no_argument, NULL, OPTION_DLL},
+ {"file-alignment", required_argument, NULL, OPTION_FILE_ALIGNMENT},
+ {"heap", required_argument, NULL, OPTION_HEAP},
+ {"image-base", required_argument, NULL, OPTION_IMAGE_BASE},
+ {"major-image-version", required_argument, NULL, OPTION_MAJOR_IMAGE_VERSION},
+ {"major-os-version", required_argument, NULL, OPTION_MAJOR_OS_VERSION},
+ {"major-subsystem-version", required_argument, NULL, OPTION_MAJOR_SUBSYSTEM_VERSION},
+ {"minor-image-version", required_argument, NULL, OPTION_MINOR_IMAGE_VERSION},
+ {"minor-os-version", required_argument, NULL, OPTION_MINOR_OS_VERSION},
+ {"minor-subsystem-version", required_argument, NULL, OPTION_MINOR_SUBSYSTEM_VERSION},
+ {"section-alignment", required_argument, NULL, OPTION_SECTION_ALIGNMENT},
+ {"stack", required_argument, NULL, OPTION_STACK},
+ {"subsystem", required_argument, NULL, OPTION_SUBSYSTEM},
+ {"support-old-code", no_argument, NULL, OPTION_SUPPORT_OLD_CODE},
+#ifdef DLL_SUPPORT
+ /* getopt allows abbreviations, so we do this to stop it
+ from treating -o as an abbreviation for this option. */
+ {"output-def", required_argument, NULL, OPTION_OUT_DEF},
+ {"output-def", required_argument, NULL, OPTION_OUT_DEF},
+ {"export-all-symbols", no_argument, NULL, OPTION_EXPORT_ALL},
+ {"exclude-symbols", required_argument, NULL, OPTION_EXCLUDE_SYMBOLS},
+ {"exclude-libs", required_argument, NULL, OPTION_EXCLUDE_LIBS},
+ {"kill-at", no_argument, NULL, OPTION_KILL_ATS},
+ {"add-stdcall-alias", no_argument, NULL, OPTION_STDCALL_ALIASES},
+ {"enable-stdcall-fixup", no_argument, NULL, OPTION_ENABLE_STDCALL_FIXUP},
+ {"disable-stdcall-fixup", no_argument, NULL, OPTION_DISABLE_STDCALL_FIXUP},
+ {"out-implib", required_argument, NULL, OPTION_IMPLIB_FILENAME},
+ {"warn-duplicate-exports", no_argument, NULL, OPTION_WARN_DUPLICATE_EXPORTS},
+ /* getopt() allows abbreviations, so we do this to stop it from
+ treating -c as an abbreviation for these --compat-implib. */
+ {"compat-implib", no_argument, NULL, OPTION_IMP_COMPAT},
+ {"compat-implib", no_argument, NULL, OPTION_IMP_COMPAT},
+ {"enable-auto-image-base", no_argument, NULL, OPTION_ENABLE_AUTO_IMAGE_BASE},
+ {"disable-auto-image-base", no_argument, NULL, OPTION_DISABLE_AUTO_IMAGE_BASE},
+ {"dll-search-prefix", required_argument, NULL, OPTION_DLL_SEARCH_PREFIX},
+ {"no-default-excludes", no_argument, NULL, OPTION_NO_DEFAULT_EXCLUDES},
+ {"enable-auto-import", no_argument, NULL, OPTION_DLL_ENABLE_AUTO_IMPORT},
+ {"disable-auto-import", no_argument, NULL, OPTION_DLL_DISABLE_AUTO_IMPORT},
+ {"enable-extra-pep-debug", no_argument, NULL, OPTION_ENABLE_EXTRA_PE_DEBUG},
+ {"enable-runtime-pseudo-reloc", no_argument, NULL, OPTION_DLL_ENABLE_RUNTIME_PSEUDO_RELOC},
+ {"disable-runtime-pseudo-reloc", no_argument, NULL, OPTION_DLL_DISABLE_RUNTIME_PSEUDO_RELOC},
+#endif
+ {NULL, no_argument, NULL, 0}
+ };
+
+ *longopts = xrealloc (*longopts, nl * sizeof (struct option) + sizeof (xtra_long));
+ memcpy (*longopts + nl, &xtra_long, sizeof (xtra_long));
+}
+
+/* PE/WIN32; added routines to get the subsystem type, heap and/or stack
+ parameters which may be input from the command line. */
+
+typedef struct
+{
+ void *ptr;
+ int size;
+ int value;
+ char *symbol;
+ int inited;
+} definfo;
+
+#define D(field,symbol,def) {&pep.field,sizeof(pep.field), def, symbol,0}
+
+static definfo init[] =
+{
+ /* imagebase must be first */
+#define IMAGEBASEOFF 0
+ D(ImageBase,"__image_base__", NT_EXE_IMAGE_BASE),
+#define DLLOFF 1
+ {&dll, sizeof(dll), 0, "__dll__", 0},
+#define MSIMAGEBASEOFF 2
+ D(ImageBase,"__ImageBase", NT_EXE_IMAGE_BASE),
+ D(SectionAlignment,"__section_alignment__", PE_DEF_SECTION_ALIGNMENT),
+ D(FileAlignment,"__file_alignment__", PE_DEF_FILE_ALIGNMENT),
+ D(MajorOperatingSystemVersion,"__major_os_version__", 4),
+ D(MinorOperatingSystemVersion,"__minor_os_version__", 0),
+ D(MajorImageVersion,"__major_image_version__", 0),
+ D(MinorImageVersion,"__minor_image_version__", 0),
+ D(MajorSubsystemVersion,"__major_subsystem_version__", 5),
+ D(MinorSubsystemVersion,"__minor_subsystem_version__", 2),
+ D(Subsystem,"__subsystem__", ${SUBSYSTEM}),
+ D(SizeOfStackReserve,"__size_of_stack_reserve__", 0x200000),
+ D(SizeOfStackCommit,"__size_of_stack_commit__", 0x1000),
+ D(SizeOfHeapReserve,"__size_of_heap_reserve__", 0x100000),
+ D(SizeOfHeapCommit,"__size_of_heap_commit__", 0x1000),
+ D(LoaderFlags,"__loader_flags__", 0x0),
+ { NULL, 0, 0, NULL, 0 }
+};
+
+
+static void
+gld_${EMULATION_NAME}_list_options (FILE *file)
+{
+ fprintf (file, _(" --base_file <basefile> Generate a base file for relocatable DLLs\n"));
+ fprintf (file, _(" --dll Set image base to the default for DLLs\n"));
+ fprintf (file, _(" --file-alignment <size> Set file alignment\n"));
+ fprintf (file, _(" --heap <size> Set initial size of the heap\n"));
+ fprintf (file, _(" --image-base <address> Set start address of the executable\n"));
+ fprintf (file, _(" --major-image-version <number> Set version number of the executable\n"));
+ fprintf (file, _(" --major-os-version <number> Set minimum required OS version\n"));
+ fprintf (file, _(" --major-subsystem-version <number> Set minimum required OS subsystem version\n"));
+ fprintf (file, _(" --minor-image-version <number> Set revision number of the executable\n"));
+ fprintf (file, _(" --minor-os-version <number> Set minimum required OS revision\n"));
+ fprintf (file, _(" --minor-subsystem-version <number> Set minimum required OS subsystem revision\n"));
+ fprintf (file, _(" --section-alignment <size> Set section alignment\n"));
+ fprintf (file, _(" --stack <size> Set size of the initial stack\n"));
+ fprintf (file, _(" --subsystem <name>[:<version>] Set required OS subsystem [& version]\n"));
+ fprintf (file, _(" --support-old-code Support interworking with old code\n"));
+#ifdef DLL_SUPPORT
+ fprintf (file, _(" --add-stdcall-alias Export symbols with and without @nn\n"));
+ fprintf (file, _(" --disable-stdcall-fixup Don't link _sym to _sym@nn\n"));
+ fprintf (file, _(" --enable-stdcall-fixup Link _sym to _sym@nn without warnings\n"));
+ fprintf (file, _(" --exclude-symbols sym,sym,... Exclude symbols from automatic export\n"));
+ fprintf (file, _(" --exclude-libs lib,lib,... Exclude libraries from automatic export\n"));
+ fprintf (file, _(" --export-all-symbols Automatically export all globals to DLL\n"));
+ fprintf (file, _(" --kill-at Remove @nn from exported symbols\n"));
+ fprintf (file, _(" --out-implib <file> Generate import library\n"));
+ fprintf (file, _(" --output-def <file> Generate a .DEF file for the built DLL\n"));
+ fprintf (file, _(" --warn-duplicate-exports Warn about duplicate exports.\n"));
+ fprintf (file, _(" --compat-implib Create backward compatible import libs;\n\
+ create __imp_<SYMBOL> as well.\n"));
+ fprintf (file, _(" --enable-auto-image-base Automatically choose image base for DLLs\n\
+ unless user specifies one\n"));
+ fprintf (file, _(" --disable-auto-image-base Do not auto-choose image base. (default)\n"));
+ fprintf (file, _(" --dll-search-prefix=<string> When linking dynamically to a dll without\n\
+ an importlib, use <string><basename>.dll\n\
+ in preference to lib<basename>.dll \n"));
+ fprintf (file, _(" --enable-auto-import Do sophistcated linking of _sym to\n\
+ __imp_sym for DATA references\n"));
+ fprintf (file, _(" --disable-auto-import Do not auto-import DATA items from DLLs\n"));
+ fprintf (file, _(" --enable-runtime-pseudo-reloc Work around auto-import limitations by\n\
+ adding pseudo-relocations resolved at\n\
+ runtime.\n"));
+ fprintf (file, _(" --disable-runtime-pseudo-reloc Do not add runtime pseudo-relocations for\n\
+ auto-imported DATA.\n"));
+ fprintf (file, _(" --enable-extra-pep-debug Enable verbose debug output when building\n\
+ or linking to DLLs (esp. auto-import)\n"));
+#endif
+}
+
+
+static void
+set_pep_name (char *name, long val)
+{
+ int i;
+
+ /* Find the name and set it. */
+ for (i = 0; init[i].ptr; i++)
+ {
+ if (strcmp (name, init[i].symbol) == 0)
+ {
+ init[i].value = val;
+ init[i].inited = 1;
+ if (strcmp (name,"__image_base__") == 0)
+ set_pep_name ("__ImageBase", val);
+ return;
+ }
+ }
+ abort ();
+}
+
+
+static void
+set_pep_subsystem (void)
+{
+ const char *sver;
+ const char *entry;
+ const char *initial_symbol_char;
+ char *end;
+ int len;
+ int i;
+ int subsystem;
+ unsigned long temp_subsystem;
+ static const struct
+ {
+ const char *name;
+ const int value;
+ const char *entry;
+ }
+ v[] =
+ {
+ { "native", 1, "NtProcessStartup" },
+ { "windows", 2, "WinMainCRTStartup" },
+ { "console", 3, "mainCRTStartup" },
+ { "posix", 7, "__PosixProcessStartup"},
+ { "wince", 9, "_WinMainCRTStartup" },
+ { "xbox", 14, "mainCRTStartup" },
+ { NULL, 0, NULL }
+ };
+ /* Entry point name for arbitrary subsystem numbers. */
+ static const char default_entry[] = "mainCRTStartup";
+
+ /* Check for the presence of a version number. */
+ sver = strchr (optarg, ':');
+ if (sver == NULL)
+ len = strlen (optarg);
+ else
+ {
+ len = sver - optarg;
+ set_pep_name ("__major_subsystem_version__",
+ strtoul (sver + 1, &end, 0));
+ if (*end == '.')
+ set_pep_name ("__minor_subsystem_version__",
+ strtoul (end + 1, &end, 0));
+ if (*end != '\0')
+ einfo (_("%P: warning: bad version number in -subsystem option\n"));
+ }
+
+ /* Check for numeric subsystem. */
+ temp_subsystem = strtoul (optarg, & end, 0);
+ if ((*end == ':' || *end == '\0') && (temp_subsystem < 65536))
+ {
+ /* Search list for a numeric match to use its entry point. */
+ for (i = 0; v[i].name; i++)
+ if (v[i].value == (int) temp_subsystem)
+ break;
+
+ /* If no match, use the default. */
+ if (v[i].name != NULL)
+ entry = v[i].entry;
+ else
+ entry = default_entry;
+
+ /* Use this subsystem. */
+ subsystem = (int) temp_subsystem;
+ }
+ else
+ {
+ /* Search for subsystem by name. */
+ for (i = 0; v[i].name; i++)
+ if (strncmp (optarg, v[i].name, len) == 0
+ && v[i].name[len] == '\0')
+ break;
+
+ if (v[i].name == NULL)
+ {
+ einfo (_("%P%F: invalid subsystem type %s\n"), optarg);
+ return;
+ }
+
+ entry = v[i].entry;
+ subsystem = v[i].value;
+ }
+
+ set_pep_name ("__subsystem__", subsystem);
+
+ initial_symbol_char = ${INITIAL_SYMBOL_CHAR};
+ if (*initial_symbol_char != '\0')
+ {
+ char *alc_entry;
+
+ /* lang_default_entry expects its argument to be permanently
+ allocated, so we don't free this string. */
+ alc_entry = xmalloc (strlen (initial_symbol_char)
+ + strlen (entry)
+ + 1);
+ strcpy (alc_entry, initial_symbol_char);
+ strcat (alc_entry, entry);
+ entry = alc_entry;
+ }
+
+ lang_default_entry (entry);
+
+ return;
+}
+
+
+static void
+set_pep_value (char *name)
+{
+ char *end;
+
+ set_pep_name (name, strtoul (optarg, &end, 0));
+
+ if (end == optarg)
+ einfo (_("%P%F: invalid hex number for PE parameter '%s'\n"), optarg);
+
+ optarg = end;
+}
+
+
+static void
+set_pep_stack_heap (char *resname, char *comname)
+{
+ set_pep_value (resname);
+
+ if (*optarg == ',')
+ {
+ optarg++;
+ set_pep_value (comname);
+ }
+ else if (*optarg)
+ einfo (_("%P%F: strange hex info for PE parameter '%s'\n"), optarg);
+}
+
+
+static bfd_boolean
+gld${EMULATION_NAME}_handle_option (int optc)
+{
+ switch (optc)
+ {
+ default:
+ return FALSE;
+
+ case OPTION_BASE_FILE:
+ link_info.base_file = fopen (optarg, FOPEN_WB);
+ if (link_info.base_file == NULL)
+ {
+ /* xgettext:c-format */
+ fprintf (stderr, _("%s: Can't open base file %s\n"),
+ program_name, optarg);
+ xexit (1);
+ }
+ break;
+
+ /* PE options. */
+ case OPTION_HEAP:
+ set_pep_stack_heap ("__size_of_heap_reserve__", "__size_of_heap_commit__");
+ break;
+ case OPTION_STACK:
+ set_pep_stack_heap ("__size_of_stack_reserve__", "__size_of_stack_commit__");
+ break;
+ case OPTION_SUBSYSTEM:
+ set_pep_subsystem ();
+ break;
+ case OPTION_MAJOR_OS_VERSION:
+ set_pep_value ("__major_os_version__");
+ break;
+ case OPTION_MINOR_OS_VERSION:
+ set_pep_value ("__minor_os_version__");
+ break;
+ case OPTION_MAJOR_SUBSYSTEM_VERSION:
+ set_pep_value ("__major_subsystem_version__");
+ break;
+ case OPTION_MINOR_SUBSYSTEM_VERSION:
+ set_pep_value ("__minor_subsystem_version__");
+ break;
+ case OPTION_MAJOR_IMAGE_VERSION:
+ set_pep_value ("__major_image_version__");
+ break;
+ case OPTION_MINOR_IMAGE_VERSION:
+ set_pep_value ("__minor_image_version__");
+ break;
+ case OPTION_FILE_ALIGNMENT:
+ set_pep_value ("__file_alignment__");
+ break;
+ case OPTION_SECTION_ALIGNMENT:
+ set_pep_value ("__section_alignment__");
+ break;
+ case OPTION_DLL:
+ set_pep_name ("__dll__", 1);
+ break;
+ case OPTION_IMAGE_BASE:
+ set_pep_value ("__image_base__");
+ break;
+ case OPTION_SUPPORT_OLD_CODE:
+ support_old_code = 1;
+ break;
+#ifdef DLL_SUPPORT
+ case OPTION_OUT_DEF:
+ pep_out_def_filename = xstrdup (optarg);
+ break;
+ case OPTION_EXPORT_ALL:
+ pep_dll_export_everything = 1;
+ break;
+ case OPTION_EXCLUDE_SYMBOLS:
+ pep_dll_add_excludes (optarg, 0);
+ break;
+ case OPTION_EXCLUDE_LIBS:
+ pep_dll_add_excludes (optarg, 1);
+ break;
+ case OPTION_KILL_ATS:
+ pep_dll_kill_ats = 1;
+ break;
+ case OPTION_STDCALL_ALIASES:
+ pep_dll_stdcall_aliases = 1;
+ break;
+ case OPTION_ENABLE_STDCALL_FIXUP:
+ pep_enable_stdcall_fixup = 1;
+ break;
+ case OPTION_DISABLE_STDCALL_FIXUP:
+ pep_enable_stdcall_fixup = 0;
+ break;
+ case OPTION_IMPLIB_FILENAME:
+ pep_implib_filename = xstrdup (optarg);
+ break;
+ case OPTION_WARN_DUPLICATE_EXPORTS:
+ pep_dll_warn_dup_exports = 1;
+ break;
+ case OPTION_IMP_COMPAT:
+ pep_dll_compat_implib = 1;
+ break;
+ case OPTION_ENABLE_AUTO_IMAGE_BASE:
+ pep_enable_auto_image_base = 1;
+ break;
+ case OPTION_DISABLE_AUTO_IMAGE_BASE:
+ pep_enable_auto_image_base = 0;
+ break;
+ case OPTION_DLL_SEARCH_PREFIX:
+ pep_dll_search_prefix = xstrdup (optarg);
+ break;
+ case OPTION_NO_DEFAULT_EXCLUDES:
+ pep_dll_do_default_excludes = 0;
+ break;
+ case OPTION_DLL_ENABLE_AUTO_IMPORT:
+ link_info.pei386_auto_import = 1;
+ break;
+ case OPTION_DLL_DISABLE_AUTO_IMPORT:
+ link_info.pei386_auto_import = 0;
+ break;
+ case OPTION_DLL_ENABLE_RUNTIME_PSEUDO_RELOC:
+ link_info.pei386_runtime_pseudo_reloc = 1;
+ break;
+ case OPTION_DLL_DISABLE_RUNTIME_PSEUDO_RELOC:
+ link_info.pei386_runtime_pseudo_reloc = 0;
+ break;
+ case OPTION_ENABLE_EXTRA_PE_DEBUG:
+ pep_dll_extra_pe_debug = 1;
+ break;
+#endif
+ }
+ return TRUE;
+}
+
+
+#ifdef DLL_SUPPORT
+static unsigned long
+strhash (const char *str)
+{
+ const unsigned char *s;
+ unsigned long hash;
+ unsigned int c;
+ unsigned int len;
+
+ hash = 0;
+ len = 0;
+ s = (const unsigned char *) str;
+ while ((c = *s++) != '\0')
+ {
+ hash += c + (c << 17);
+ hash ^= hash >> 2;
+ ++len;
+ }
+ hash += len + (len << 17);
+ hash ^= hash >> 2;
+
+ return hash;
+}
+
+/* Use the output file to create a image base for relocatable DLLs. */
+
+static unsigned long
+compute_dll_image_base (const char *ofile)
+{
+ unsigned long hash = strhash (ofile);
+ return 0x61300000 + ((hash << 16) & 0x0FFC0000);
+}
+#endif
+
+/* Assign values to the special symbols before the linker script is
+ read. */
+
+static void
+gld_${EMULATION_NAME}_set_symbols (void)
+{
+ /* Run through and invent symbols for all the
+ names and insert the defaults. */
+ int j;
+ lang_statement_list_type *save;
+
+ if (!init[IMAGEBASEOFF].inited)
+ {
+ if (link_info.relocatable)
+ init[IMAGEBASEOFF].value = 0;
+ else if (init[DLLOFF].value || (link_info.shared && !link_info.pie))
+#ifdef DLL_SUPPORT
+ init[IMAGEBASEOFF].value = (pep_enable_auto_image_base) ?
+ compute_dll_image_base (output_filename) : NT_DLL_IMAGE_BASE;
+#else
+ init[IMAGEBASEOFF].value = NT_DLL_IMAGE_BASE;
+#endif
+ else
+ init[IMAGEBASEOFF].value = NT_EXE_IMAGE_BASE;
+ init[MSIMAGEBASEOFF].value = init[IMAGEBASEOFF].value;
+ }
+
+ /* Don't do any symbol assignments if this is a relocatable link. */
+ if (link_info.relocatable)
+ return;
+
+ /* Glue the assignments into the abs section. */
+ save = stat_ptr;
+
+ stat_ptr = &(abs_output_section->children);
+
+ for (j = 0; init[j].ptr; j++)
+ {
+ long val = init[j].value;
+ lang_assignment_statement_type *rv;
+ rv = lang_add_assignment (exp_assop ('=', init[j].symbol,
+ exp_intop (val)));
+ if (init[j].size == sizeof (short))
+ *(short *) init[j].ptr = val;
+ else if (init[j].size == sizeof (int))
+ *(int *) init[j].ptr = val;
+ else if (init[j].size == sizeof (long))
+ *(long *) init[j].ptr = val;
+ /* This might be a long long or other special type. */
+ else if (init[j].size == sizeof (bfd_vma))
+ *(bfd_vma *) init[j].ptr = val;
+ else abort ();
+ if (j == IMAGEBASEOFF)
+ image_base_statement = rv;
+ }
+ /* Restore the pointer. */
+ stat_ptr = save;
+
+ if (pep.FileAlignment > pep.SectionAlignment)
+ {
+ einfo (_("%P: warning, file alignment > section alignment.\n"));
+ }
+}
+
+/* This is called after the linker script and the command line options
+ have been read. */
+
+static void
+gld_${EMULATION_NAME}_after_parse (void)
+{
+ /* The Windows libraries are designed for the linker to treat the
+ entry point as an undefined symbol. Otherwise, the .obj that
+ defines mainCRTStartup is brought in because it is the first
+ encountered in libc.lib and it has other symbols in it which will
+ be pulled in by the link process. To avoid this, we act as
+ though the user specified -u with the entry point symbol.
+
+ This function is called after the linker script and command line
+ options have been read, so at this point we know the right entry
+ point. This function is called before the input files are
+ opened, so registering the symbol as undefined will make a
+ difference. */
+
+ if (! link_info.relocatable && entry_symbol.name != NULL)
+ ldlang_add_undef (entry_symbol.name);
+}
+
+/* pep-dll.c directly accesses pep_data_import_dll,
+ so it must be defined outside of #ifdef DLL_SUPPORT.
+ Note - this variable is deliberately not initialised.
+ This allows it to be treated as a common varaible, and only
+ exist in one incarnation in a multiple target enabled linker. */
+char * pep_data_import_dll;
+
+#ifdef DLL_SUPPORT
+static struct bfd_link_hash_entry *pep_undef_found_sym;
+
+static bfd_boolean
+pep_undef_cdecl_match (struct bfd_link_hash_entry *h, void *inf)
+{
+ int sl;
+ char *string = inf;
+
+ sl = strlen (string);
+ if (h->type == bfd_link_hash_defined
+ && strncmp (h->root.string, string, sl) == 0
+ && h->root.string[sl] == '@')
+ {
+ pep_undef_found_sym = h;
+ return FALSE;
+ }
+ return TRUE;
+}
+
+static void
+pep_fixup_stdcalls (void)
+{
+ static int gave_warning_message = 0;
+ struct bfd_link_hash_entry *undef, *sym;
+
+ if (pep_dll_extra_pe_debug)
+ printf ("%s\n", __FUNCTION__);
+
+ for (undef = link_info.hash->undefs; undef; undef=undef->u.undef.next)
+ if (undef->type == bfd_link_hash_undefined)
+ {
+ char* at = strchr (undef->root.string, '@');
+ int lead_at = (*undef->root.string == '@');
+ /* For now, don't try to fixup fastcall symbols. */
+
+ if (at && !lead_at)
+ {
+ /* The symbol is a stdcall symbol, so let's look for a
+ cdecl symbol with the same name and resolve to that. */
+ char *cname = xstrdup (undef->root.string /* + lead_at */);
+ at = strchr (cname, '@');
+ *at = 0;
+ sym = bfd_link_hash_lookup (link_info.hash, cname, 0, 0, 1);
+
+ if (sym && sym->type == bfd_link_hash_defined)
+ {
+ undef->type = bfd_link_hash_defined;
+ undef->u.def.value = sym->u.def.value;
+ undef->u.def.section = sym->u.def.section;
+
+ if (pep_enable_stdcall_fixup == -1)
+ {
+ einfo (_("Warning: resolving %s by linking to %s\n"),
+ undef->root.string, cname);
+ if (! gave_warning_message)
+ {
+ gave_warning_message = 1;
+ einfo (_("Use --enable-stdcall-fixup to disable these warnings\n"));
+ einfo (_("Use --disable-stdcall-fixup to disable these fixups\n"));
+ }
+ }
+ }
+ }
+ else
+ {
+ /* The symbol is a cdecl symbol, so we look for stdcall
+ symbols - which means scanning the whole symbol table. */
+ pep_undef_found_sym = 0;
+ bfd_link_hash_traverse (link_info.hash, pep_undef_cdecl_match,
+ (char *) undef->root.string);
+ sym = pep_undef_found_sym;
+ if (sym)
+ {
+ undef->type = bfd_link_hash_defined;
+ undef->u.def.value = sym->u.def.value;
+ undef->u.def.section = sym->u.def.section;
+
+ if (pep_enable_stdcall_fixup == -1)
+ {
+ einfo (_("Warning: resolving %s by linking to %s\n"),
+ undef->root.string, sym->root.string);
+ if (! gave_warning_message)
+ {
+ gave_warning_message = 1;
+ einfo (_("Use --enable-stdcall-fixup to disable these warnings\n"));
+ einfo (_("Use --disable-stdcall-fixup to disable these fixups\n"));
+ }
+ }
+ }
+ }
+ }
+}
+
+static int
+make_import_fixup (arelent *rel, asection *s)
+{
+ struct bfd_symbol *sym = *rel->sym_ptr_ptr;
+ char addend[4];
+
+ if (pep_dll_extra_pe_debug)
+ printf ("arelent: %s@%#lx: add=%li\n", sym->name,
+ (long) rel->address, (long) rel->addend);
+
+ if (! bfd_get_section_contents (s->owner, s, addend, rel->address, sizeof (addend)))
+ einfo (_("%C: Cannot get section contents - auto-import exception\n"),
+ s->owner, s, rel->address);
+
+ pep_create_import_fixup (rel, s, bfd_get_32 (s->owner, addend));
+
+ return 1;
+}
+
+static void
+pep_find_data_imports (void)
+{
+ struct bfd_link_hash_entry *undef, *sym;
+
+ if (link_info.pei386_auto_import == 0)
+ return;
+
+ for (undef = link_info.hash->undefs; undef; undef=undef->u.undef.next)
+ {
+ if (undef->type == bfd_link_hash_undefined)
+ {
+ /* C++ symbols are *long*. */
+ char buf[4096];
+
+ if (pep_dll_extra_pe_debug)
+ printf ("%s:%s\n", __FUNCTION__, undef->root.string);
+
+ sprintf (buf, "__imp_%s", undef->root.string);
+
+ sym = bfd_link_hash_lookup (link_info.hash, buf, 0, 0, 1);
+
+ if (sym && sym->type == bfd_link_hash_defined)
+ {
+ bfd *b = sym->u.def.section->owner;
+ asymbol **symbols;
+ int nsyms, symsize, i;
+
+ if (link_info.pei386_auto_import == -1)
+ info_msg (_("Info: resolving %s by linking to %s (auto-import)\n"),
+ undef->root.string, buf);
+
+ symsize = bfd_get_symtab_upper_bound (b);
+ symbols = xmalloc (symsize);
+ nsyms = bfd_canonicalize_symtab (b, symbols);
+
+ for (i = 0; i < nsyms; i++)
+ {
+ if (! CONST_STRNEQ (symbols[i]->name, "__head_"))
+ continue;
+
+ if (pep_dll_extra_pe_debug)
+ printf ("->%s\n", symbols[i]->name);
+
+ pep_data_import_dll = (char*) (symbols[i]->name +
+ sizeof ("__head_") - 1);
+ break;
+ }
+
+ pep_walk_relocs_of_symbol (&link_info, undef->root.string,
+ make_import_fixup);
+
+ /* Let's differentiate it somehow from defined. */
+ undef->type = bfd_link_hash_defweak;
+ /* We replace original name with __imp_ prefixed, this
+ 1) may trash memory 2) leads to duplicate symbol generation.
+ Still, IMHO it's better than having name poluted. */
+ undef->root.string = sym->root.string;
+ undef->u.def.value = sym->u.def.value;
+ undef->u.def.section = sym->u.def.section;
+ }
+ }
+ }
+}
+
+static bfd_boolean
+pr_sym (struct bfd_hash_entry *h, void *inf ATTRIBUTE_UNUSED)
+{
+ if (pep_dll_extra_pe_debug)
+ printf ("+%s\n", h->string);
+
+ return TRUE;
+}
+#endif /* DLL_SUPPORT */
+
+
+static void
+gld_${EMULATION_NAME}_after_open (void)
+{
+#ifdef DLL_SUPPORT
+ if (pep_dll_extra_pe_debug)
+ {
+ bfd *a;
+ struct bfd_link_hash_entry *sym;
+
+ printf ("%s()\n", __FUNCTION__);
+
+ for (sym = link_info.hash->undefs; sym; sym=sym->u.undef.next)
+ printf ("-%s\n", sym->root.string);
+ bfd_hash_traverse (&link_info.hash->table, pr_sym, NULL);
+
+ for (a = link_info.input_bfds; a; a = a->link_next)
+ printf ("*%s\n",a->filename);
+ }
+#endif
+
+ /* Pass the wacky PE command line options into the output bfd.
+ FIXME: This should be done via a function, rather than by
+ including an internal BFD header. */
+
+ if (coff_data (output_bfd) == NULL || coff_data (output_bfd)->pe == 0)
+ einfo (_("%F%P: cannot perform PE operations on non PE output file '%B'.\n"), output_bfd);
+
+ pe_data (output_bfd)->pe_opthdr = pep;
+ pe_data (output_bfd)->dll = init[DLLOFF].value;
+ pe_data (output_bfd)->real_flags |= real_flags;
+
+#ifdef DLL_SUPPORT
+ if (pep_enable_stdcall_fixup) /* -1=warn or 1=disable */
+ pep_fixup_stdcalls ();
+
+ pep_process_import_defs (output_bfd, & link_info);
+
+ pep_find_data_imports ();
+
+#ifndef TARGET_IS_i386pep
+ if (link_info.shared)
+#else
+ if (!link_info.relocatable)
+#endif
+ pep_dll_build_sections (output_bfd, &link_info);
+
+#ifndef TARGET_IS_i386pep
+ else
+ pep_exe_build_sections (output_bfd, &link_info);
+#endif
+#endif /* DLL_SUPPORT */
+
+ {
+ /* This next chunk of code tries to detect the case where you have
+ two import libraries for the same DLL (specifically,
+ symbolically linking libm.a and libc.a in cygwin to
+ libcygwin.a). In those cases, it's possible for function
+ thunks from the second implib to be used but without the
+ head/tail objects, causing an improper import table. We detect
+ those cases and rename the "other" import libraries to match
+ the one the head/tail come from, so that the linker will sort
+ things nicely and produce a valid import table. */
+
+ LANG_FOR_EACH_INPUT_STATEMENT (is)
+ {
+ if (is->the_bfd->my_archive)
+ {
+ int idata2 = 0, reloc_count=0, is_imp = 0;
+ asection *sec;
+
+ /* See if this is an import library thunk. */
+ for (sec = is->the_bfd->sections; sec; sec = sec->next)
+ {
+ if (strcmp (sec->name, ".idata\$2") == 0)
+ idata2 = 1;
+ if (CONST_STRNEQ (sec->name, ".idata\$"))
+ is_imp = 1;
+ reloc_count += sec->reloc_count;
+ }
+
+ if (is_imp && !idata2 && reloc_count)
+ {
+ /* It is, look for the reference to head and see if it's
+ from our own library. */
+ for (sec = is->the_bfd->sections; sec; sec = sec->next)
+ {
+ int i;
+ long symsize;
+ long relsize;
+ asymbol **symbols;
+ arelent **relocs;
+ int nrelocs;
+
+ symsize = bfd_get_symtab_upper_bound (is->the_bfd);
+ if (symsize < 1)
+ break;
+ relsize = bfd_get_reloc_upper_bound (is->the_bfd, sec);
+ if (relsize < 1)
+ break;
+
+ symbols = xmalloc (symsize);
+ symsize = bfd_canonicalize_symtab (is->the_bfd, symbols);
+ if (symsize < 0)
+ {
+ einfo ("%X%P: unable to process symbols: %E");
+ return;
+ }
+
+ relocs = xmalloc ((size_t) relsize);
+ nrelocs = bfd_canonicalize_reloc (is->the_bfd, sec,
+ relocs, symbols);
+ if (nrelocs < 0)
+ {
+ free (relocs);
+ einfo ("%X%P: unable to process relocs: %E");
+ return;
+ }
+
+ for (i = 0; i < nrelocs; i++)
+ {
+ struct bfd_symbol *s;
+ struct bfd_link_hash_entry * blhe;
+ char *other_bfd_filename;
+ char *n;
+
+ s = (relocs[i]->sym_ptr_ptr)[0];
+
+ if (s->flags & BSF_LOCAL)
+ continue;
+
+ /* Thunk section with reloc to another bfd. */
+ blhe = bfd_link_hash_lookup (link_info.hash,
+ s->name,
+ FALSE, FALSE, TRUE);
+
+ if (blhe == NULL
+ || blhe->type != bfd_link_hash_defined)
+ continue;
+
+ other_bfd_filename
+ = blhe->u.def.section->owner->my_archive
+ ? bfd_get_filename (blhe->u.def.section->owner->my_archive)
+ : bfd_get_filename (blhe->u.def.section->owner);
+
+ if (strcmp (bfd_get_filename (is->the_bfd->my_archive),
+ other_bfd_filename) == 0)
+ continue;
+
+ /* Rename this implib to match the other one. */
+ n = xmalloc (strlen (other_bfd_filename) + 1);
+ strcpy (n, other_bfd_filename);
+ is->the_bfd->my_archive->filename = n;
+ }
+
+ free (relocs);
+ /* Note - we do not free the symbols,
+ they are now cached in the BFD. */
+ }
+ }
+ }
+ }
+ }
+
+ {
+ int is_ms_arch = 0;
+ bfd *cur_arch = 0;
+ lang_input_statement_type *is2;
+ lang_input_statement_type *is3;
+
+ /* Careful - this is a shell script. Watch those dollar signs! */
+ /* Microsoft import libraries have every member named the same,
+ and not in the right order for us to link them correctly. We
+ must detect these and rename the members so that they'll link
+ correctly. There are three types of objects: the head, the
+ thunks, and the sentinel(s). The head is easy; it's the one
+ with idata2. We assume that the sentinels won't have relocs,
+ and the thunks will. It's easier than checking the symbol
+ table for external references. */
+ LANG_FOR_EACH_INPUT_STATEMENT (is)
+ {
+ if (is->the_bfd->my_archive)
+ {
+ char *pnt;
+ bfd *arch = is->the_bfd->my_archive;
+
+ if (cur_arch != arch)
+ {
+ cur_arch = arch;
+ is_ms_arch = 1;
+
+ for (is3 = is;
+ is3 && is3->the_bfd->my_archive == arch;
+ is3 = (lang_input_statement_type *) is3->next)
+ {
+ /* A MS dynamic import library can also contain static
+ members, so look for the first element with a .dll
+ extension, and use that for the remainder of the
+ comparisons. */
+ pnt = strrchr (is3->the_bfd->filename, '.');
+ if (pnt != NULL && strcmp (pnt, ".dll") == 0)
+ break;
+ }
+
+ if (is3 == NULL)
+ is_ms_arch = 0;
+ else
+ {
+ /* OK, found one. Now look to see if the remaining
+ (dynamic import) members use the same name. */
+ for (is2 = is;
+ is2 && is2->the_bfd->my_archive == arch;
+ is2 = (lang_input_statement_type *) is2->next)
+ {
+ /* Skip static members, ie anything with a .obj
+ extension. */
+ pnt = strrchr (is2->the_bfd->filename, '.');
+ if (pnt != NULL && strcmp (pnt, ".obj") == 0)
+ continue;
+
+ if (strcmp (is3->the_bfd->filename,
+ is2->the_bfd->filename))
+ {
+ is_ms_arch = 0;
+ break;
+ }
+ }
+ }
+ }
+
+ /* This fragment might have come from an .obj file in a Microsoft
+ import, and not an actual import record. If this is the case,
+ then leave the filename alone. */
+ pnt = strrchr (is->the_bfd->filename, '.');
+
+ if (is_ms_arch && (strcmp (pnt, ".dll") == 0))
+ {
+ int idata2 = 0, reloc_count=0;
+ asection *sec;
+ char *new_name, seq;
+
+ for (sec = is->the_bfd->sections; sec; sec = sec->next)
+ {
+ if (strcmp (sec->name, ".idata\$2") == 0)
+ idata2 = 1;
+ reloc_count += sec->reloc_count;
+ }
+
+ if (idata2) /* .idata2 is the TOC */
+ seq = 'a';
+ else if (reloc_count > 0) /* thunks */
+ seq = 'b';
+ else /* sentinel */
+ seq = 'c';
+
+ new_name = xmalloc (strlen (is->the_bfd->filename) + 3);
+ sprintf (new_name, "%s.%c", is->the_bfd->filename, seq);
+ is->the_bfd->filename = new_name;
+
+ new_name = xmalloc (strlen (is->filename) + 3);
+ sprintf (new_name, "%s.%c", is->filename, seq);
+ is->filename = new_name;
+ }
+ }
+ }
+ }
+}
+
+static void
+gld_${EMULATION_NAME}_before_allocation (void)
+{
+ before_allocation_default ();
+}
+
+#ifdef DLL_SUPPORT
+/* This is called when an input file isn't recognized as a BFD. We
+ check here for .DEF files and pull them in automatically. */
+
+static int
+saw_option (char *option)
+{
+ int i;
+
+ for (i = 0; init[i].ptr; i++)
+ if (strcmp (init[i].symbol, option) == 0)
+ return init[i].inited;
+ return 0;
+}
+#endif /* DLL_SUPPORT */
+
+static bfd_boolean
+gld_${EMULATION_NAME}_unrecognized_file (lang_input_statement_type *entry ATTRIBUTE_UNUSED)
+{
+#ifdef DLL_SUPPORT
+ const char *ext = entry->filename + strlen (entry->filename) - 4;
+
+ if (strcmp (ext, ".def") == 0 || strcmp (ext, ".DEF") == 0)
+ {
+ pep_def_file = def_file_parse (entry->filename, pep_def_file);
+
+ if (pep_def_file)
+ {
+ int i, buflen=0, len;
+ char *buf;
+
+ for (i = 0; i < pep_def_file->num_exports; i++)
+ {
+ len = strlen (pep_def_file->exports[i].internal_name);
+ if (buflen < len + 2)
+ buflen = len + 2;
+ }
+
+ buf = xmalloc (buflen);
+
+ for (i = 0; i < pep_def_file->num_exports; i++)
+ {
+ struct bfd_link_hash_entry *h;
+
+ sprintf (buf, "_%s", pep_def_file->exports[i].internal_name);
+
+ h = bfd_link_hash_lookup (link_info.hash, buf, TRUE, TRUE, TRUE);
+ if (h == (struct bfd_link_hash_entry *) NULL)
+ einfo (_("%P%F: bfd_link_hash_lookup failed: %E\n"));
+ if (h->type == bfd_link_hash_new)
+ {
+ h->type = bfd_link_hash_undefined;
+ h->u.undef.abfd = NULL;
+ bfd_link_add_undef (link_info.hash, h);
+ }
+ }
+ free (buf);
+
+ /* def_file_print (stdout, pep_def_file); */
+ if (pep_def_file->is_dll == 1)
+ link_info.shared = 1;
+
+ if (pep_def_file->base_address != (bfd_vma)(-1))
+ {
+ pep.ImageBase =
+ pe_data (output_bfd)->pe_opthdr.ImageBase =
+ init[IMAGEBASEOFF].value = pep_def_file->base_address;
+ init[IMAGEBASEOFF].inited = 1;
+ if (image_base_statement)
+ image_base_statement->exp =
+ exp_assop ('=', "__image_base__", exp_intop (pep.ImageBase));
+ }
+
+ if (pep_def_file->stack_reserve != -1
+ && ! saw_option ("__size_of_stack_reserve__"))
+ {
+ pep.SizeOfStackReserve = pep_def_file->stack_reserve;
+ if (pep_def_file->stack_commit != -1)
+ pep.SizeOfStackCommit = pep_def_file->stack_commit;
+ }
+ if (pep_def_file->heap_reserve != -1
+ && ! saw_option ("__size_of_heap_reserve__"))
+ {
+ pep.SizeOfHeapReserve = pep_def_file->heap_reserve;
+ if (pep_def_file->heap_commit != -1)
+ pep.SizeOfHeapCommit = pep_def_file->heap_commit;
+ }
+ return TRUE;
+ }
+ }
+#endif
+ return FALSE;
+}
+
+static bfd_boolean
+gld_${EMULATION_NAME}_recognized_file (lang_input_statement_type *entry ATTRIBUTE_UNUSED)
+{
+#ifdef DLL_SUPPORT
+#ifdef TARGET_IS_i386pep
+ pep_dll_id_target ("pei-x86-64");
+#endif
+ if (bfd_get_format (entry->the_bfd) == bfd_object)
+ {
+ char fbuf[LD_PATHMAX + 1];
+ const char *ext;
+
+ if (REALPATH (entry->filename, fbuf) == NULL)
+ strncpy (fbuf, entry->filename, sizeof (fbuf));
+
+ ext = fbuf + strlen (fbuf) - 4;
+
+ if (strcmp (ext, ".dll") == 0 || strcmp (ext, ".DLL") == 0)
+ return pep_implied_import_dll (fbuf);
+ }
+#endif
+ return FALSE;
+}
+
+static void
+gld_${EMULATION_NAME}_finish (void)
+{
+ finish_default ();
+
+#ifdef DLL_SUPPORT
+ if (link_info.shared
+ || (!link_info.relocatable && pep_def_file->num_exports != 0))
+ {
+ pep_dll_fill_sections (output_bfd, &link_info);
+ if (pep_implib_filename)
+ pep_dll_generate_implib (pep_def_file, pep_implib_filename);
+ }
+
+ if (pep_out_def_filename)
+ pep_dll_generate_def_file (pep_out_def_filename);
+#endif /* DLL_SUPPORT */
+
+ /* I don't know where .idata gets set as code, but it shouldn't be. */
+ {
+ asection *asec = bfd_get_section_by_name (output_bfd, ".idata");
+
+ if (asec)
+ {
+ asec->flags &= ~SEC_CODE;
+ asec->flags |= SEC_DATA;
+ }
+ }
+}
+
+
+/* Place an orphan section.
+
+ We use this to put sections in a reasonable place in the file, and
+ to ensure that they are aligned as required.
+
+ We handle grouped sections here as well. A section named .foo$nn
+ goes into the output section .foo. All grouped sections are sorted
+ by name.
+
+ Grouped sections for the default sections are handled by the
+ default linker script using wildcards, and are sorted by
+ sort_sections. */
+
+static bfd_boolean
+gld_${EMULATION_NAME}_place_orphan (asection *s)
+{
+ const char *secname;
+ const char *orig_secname;
+ char *dollar = NULL;
+ lang_output_section_statement_type *os;
+ lang_statement_list_type add_child;
+
+ secname = bfd_get_section_name (s->owner, s);
+
+ /* Look through the script to see where to place this section. */
+ orig_secname = secname;
+ if (!link_info.relocatable
+ && (dollar = strchr (secname, '$')) != NULL)
+ {
+ size_t len = dollar - orig_secname;
+ char *newname = xmalloc (len + 1);
+ memcpy (newname, orig_secname, len);
+ newname[len] = '\0';
+ secname = newname;
+ }
+
+ os = lang_output_section_find (secname);
+
+ lang_list_init (&add_child);
+
+ if (os != NULL
+ && (os->bfd_section == NULL
+ || os->bfd_section->flags == 0
+ || ((s->flags ^ os->bfd_section->flags)
+ & (SEC_LOAD | SEC_ALLOC)) == 0))
+ {
+ /* We already have an output section statement with this
+ name, and its bfd section, if any, has compatible flags.
+ If the section already exists but does not have any flags set,
+ then it has been created by the linker, probably as a result of
+ a --section-start command line switch. */
+ lang_add_section (&add_child, s, os);
+ }
+ else
+ {
+ static struct orphan_save hold[] =
+ {
+ { ".text",
+ SEC_HAS_CONTENTS | SEC_ALLOC | SEC_LOAD | SEC_READONLY | SEC_CODE,
+ 0, 0, 0, 0 },
+ { ".rdata",
+ SEC_HAS_CONTENTS | SEC_ALLOC | SEC_LOAD | SEC_READONLY | SEC_DATA,
+ 0, 0, 0, 0 },
+ { ".data",
+ SEC_HAS_CONTENTS | SEC_ALLOC | SEC_LOAD | SEC_DATA,
+ 0, 0, 0, 0 },
+ { ".bss",
+ SEC_ALLOC,
+ 0, 0, 0, 0 }
+ };
+ enum orphan_save_index
+ {
+ orphan_text = 0,
+ orphan_rodata,
+ orphan_data,
+ orphan_bss
+ };
+ static int orphan_init_done = 0;
+ struct orphan_save *place;
+ lang_output_section_statement_type *after;
+ etree_type *address;
+
+ if (!orphan_init_done)
+ {
+ struct orphan_save *ho;
+ for (ho = hold; ho < hold + sizeof (hold) / sizeof (hold[0]); ++ho)
+ if (ho->name != NULL)
+ {
+ ho->os = lang_output_section_find (ho->name);
+ if (ho->os != NULL && ho->os->flags == 0)
+ ho->os->flags = ho->flags;
+ }
+ orphan_init_done = 1;
+ }
+
+ /* Try to put the new output section in a reasonable place based
+ on the section name and section flags. */
+
+ place = NULL;
+ if ((s->flags & SEC_ALLOC) == 0)
+ ;
+ else if ((s->flags & (SEC_LOAD | SEC_HAS_CONTENTS)) == 0)
+ place = &hold[orphan_bss];
+ else if ((s->flags & SEC_READONLY) == 0)
+ place = &hold[orphan_data];
+ else if ((s->flags & SEC_CODE) == 0)
+ place = &hold[orphan_rodata];
+ else
+ place = &hold[orphan_text];
+
+ after = NULL;
+ if (place != NULL)
+ {
+ if (place->os == NULL)
+ place->os = lang_output_section_find (place->name);
+ after = place->os;
+ if (after == NULL)
+ after = lang_output_section_find_by_flags (s, &place->os, NULL);
+ if (after == NULL)
+ /* *ABS* is always the first output section statement. */
+ after = (&lang_output_section_statement.head
+ ->output_section_statement);
+ }
+
+ /* Choose a unique name for the section. This will be needed if the
+ same section name appears in the input file with different
+ loadable or allocatable characteristics. */
+ if (bfd_get_section_by_name (output_bfd, secname) != NULL)
+ {
+ static int count = 1;
+ secname = bfd_get_unique_section_name (output_bfd, secname, &count);
+ if (secname == NULL)
+ einfo ("%F%P: place_orphan failed: %E\n");
+ }
+
+ /* All sections in an executable must be aligned to a page boundary. */
+ address = exp_unop (ALIGN_K, exp_nameop (NAME, "__section_alignment__"));
+ os = lang_insert_orphan (s, secname, after, place, address, &add_child);
+ }
+
+ {
+ lang_statement_union_type **pl = &os->children.head;
+
+ if (dollar != NULL)
+ {
+ bfd_boolean found_dollar;
+
+ /* The section name has a '$'. Sort it with the other '$'
+ sections. */
+ found_dollar = FALSE;
+ for ( ; *pl != NULL; pl = &(*pl)->header.next)
+ {
+ lang_input_section_type *ls;
+ const char *lname;
+
+ if ((*pl)->header.type != lang_input_section_enum)
+ continue;
+
+ ls = &(*pl)->input_section;
+
+ lname = bfd_get_section_name (ls->section->owner, ls->section);
+ if (strchr (lname, '$') == NULL)
+ {
+ if (found_dollar)
+ break;
+ }
+ else
+ {
+ found_dollar = TRUE;
+ if (strcmp (orig_secname, lname) < 0)
+ break;
+ }
+ }
+ }
+
+ if (add_child.head != NULL)
+ {
+ add_child.head->header.next = *pl;
+ *pl = add_child.head;
+ }
+ }
+
+ return TRUE;
+}
+
+static bfd_boolean
+gld_${EMULATION_NAME}_open_dynamic_archive
+ (const char *arch ATTRIBUTE_UNUSED,
+ search_dirs_type *search,
+ lang_input_statement_type *entry)
+{
+ static const struct
+ {
+ const char * format;
+ bfd_boolean use_prefix;
+ }
+ libname_fmt [] =
+ {
+ /* Preferred explicit import library for dll's. */
+ { "lib%s.dll.a", FALSE },
+ /* Alternate explicit import library for dll's. */
+ { "%s.dll.a", FALSE },
+ /* "libfoo.a" could be either an import lib or a static lib.
+ For backwards compatibility, libfoo.a needs to precede
+ libfoo.dll and foo.dll in the search. */
+ { "lib%s.a", FALSE },
+ /* The 'native' spelling of an import lib name is "foo.lib". */
+ { "%s.lib", FALSE },
+#ifdef DLL_SUPPORT
+ /* Try "<prefix>foo.dll" (preferred dll name, if specified). */
+ { "%s%s.dll", TRUE },
+#endif
+ /* Try "libfoo.dll" (default preferred dll name). */
+ { "lib%s.dll", FALSE },
+ /* Finally try 'native' dll name "foo.dll". */
+ { "%s.dll", FALSE },
+ /* Note: If adding more formats to this table, make sure to check to
+ see if their length is longer than libname_fmt[0].format, and if
+ so, update the call to xmalloc() below. */
+ { NULL, FALSE }
+ };
+ static unsigned int format_max_len = 0;
+ const char * filename;
+ char * full_string;
+ char * base_string;
+ unsigned int i;
+
+
+ if (! entry->is_archive)
+ return FALSE;
+
+ filename = entry->filename;
+
+ if (format_max_len == 0)
+ /* We need to allow space in the memory that we are going to allocate
+ for the characters in the format string. Since the format array is
+ static we only need to calculate this information once. In theory
+ this value could also be computed statically, but this introduces
+ the possibility for a discrepancy and hence a possible memory
+ corruption. The lengths we compute here will be too long because
+ they will include any formating characters (%s) in the strings, but
+ this will not matter. */
+ for (i = 0; libname_fmt[i].format; i++)
+ if (format_max_len < strlen (libname_fmt[i].format))
+ format_max_len = strlen (libname_fmt[i].format);
+
+ full_string = xmalloc (strlen (search->name)
+ + strlen (filename)
+ + format_max_len
+#ifdef DLL_SUPPORT
+ + (pep_dll_search_prefix
+ ? strlen (pep_dll_search_prefix) : 0)
+#endif
+ /* Allow for the terminating NUL and for the path
+ separator character that is inserted between
+ search->name and the start of the format string. */
+ + 2);
+
+ sprintf (full_string, "%s/", search->name);
+ base_string = full_string + strlen (full_string);
+
+ for (i = 0; libname_fmt[i].format; i++)
+ {
+#ifdef DLL_SUPPORT
+ if (libname_fmt[i].use_prefix)
+ {
+ if (!pep_dll_search_prefix)
+ continue;
+ sprintf (base_string, libname_fmt[i].format, pep_dll_search_prefix, filename);
+ }
+ else
+#endif
+ sprintf (base_string, libname_fmt[i].format, filename);
+
+ if (ldfile_try_open_bfd (full_string, entry))
+ break;
+ }
+
+ if (!libname_fmt[i].format)
+ {
+ free (full_string);
+ return FALSE;
+ }
+
+ entry->filename = full_string;
+
+ return TRUE;
+}
+
+static int
+gld_${EMULATION_NAME}_find_potential_libraries
+ (char *name, lang_input_statement_type *entry)
+{
+ return ldfile_open_file_search (name, entry, "", ".lib");
+}
+
+static char *
+gld_${EMULATION_NAME}_get_script (int *isfile)
+EOF
+# Scripts compiled in.
+# sed commands to quote an ld script as a C string.
+sc="-f stringify.sed"
+
+cat >>e${EMULATION_NAME}.c <<EOF
+{
+ *isfile = 0;
+
+ if (link_info.relocatable && config.build_constructors)
+ return
+EOF
+sed $sc ldscripts/${EMULATION_NAME}.xu >> e${EMULATION_NAME}.c
+echo ' ; else if (link_info.relocatable) return' >> e${EMULATION_NAME}.c
+sed $sc ldscripts/${EMULATION_NAME}.xr >> e${EMULATION_NAME}.c
+echo ' ; else if (!config.text_read_only) return' >> e${EMULATION_NAME}.c
+sed $sc ldscripts/${EMULATION_NAME}.xbn >> e${EMULATION_NAME}.c
+echo ' ; else if (!config.magic_demand_paged) return' >> e${EMULATION_NAME}.c
+sed $sc ldscripts/${EMULATION_NAME}.xn >> e${EMULATION_NAME}.c
+echo ' ; else return' >> e${EMULATION_NAME}.c
+sed $sc ldscripts/${EMULATION_NAME}.x >> e${EMULATION_NAME}.c
+echo '; }' >> e${EMULATION_NAME}.c
+
+cat >>e${EMULATION_NAME}.c <<EOF
+
+
+struct ld_emulation_xfer_struct ld_${EMULATION_NAME}_emulation =
+{
+ gld_${EMULATION_NAME}_before_parse,
+ syslib_default,
+ hll_default,
+ gld_${EMULATION_NAME}_after_parse,
+ gld_${EMULATION_NAME}_after_open,
+ after_allocation_default,
+ set_output_arch_default,
+ ldemul_default_target,
+ gld_${EMULATION_NAME}_before_allocation,
+ gld_${EMULATION_NAME}_get_script,
+ "${EMULATION_NAME}",
+ "${OUTPUT_FORMAT}",
+ gld_${EMULATION_NAME}_finish,
+ NULL, /* Create output section statements. */
+ gld_${EMULATION_NAME}_open_dynamic_archive,
+ gld_${EMULATION_NAME}_place_orphan,
+ gld_${EMULATION_NAME}_set_symbols,
+ NULL, /* parse_args */
+ gld${EMULATION_NAME}_add_options,
+ gld${EMULATION_NAME}_handle_option,
+ gld_${EMULATION_NAME}_unrecognized_file,
+ gld_${EMULATION_NAME}_list_options,
+ gld_${EMULATION_NAME}_recognized_file,
+ gld_${EMULATION_NAME}_find_potential_libraries,
+ NULL /* new_vers_pattern. */
+};
+EOF
diff --git a/contrib/binutils/ld/emultempl/ppc32elf.em b/contrib/binutils/ld/emultempl/ppc32elf.em
index 4614593..b0239e0 100644
--- a/contrib/binutils/ld/emultempl/ppc32elf.em
+++ b/contrib/binutils/ld/emultempl/ppc32elf.em
@@ -1,5 +1,5 @@
# This shell script emits a C file. -*- C -*-
-# Copyright 2003 Free Software Foundation, Inc.
+# Copyright 2003, 2005, 2007 Free Software Foundation, Inc.
#
# This file is part of GLD, the Gnu Linker.
#
@@ -15,10 +15,10 @@
#
# 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.
+# Foundation, Inc., 51 Franklin Street - Fifth Floor, Boston, MA 02110-1301, USA.
#
-# This file is sourced from elf32.em, and defines extra powerpc64-elf
+# This file is sourced from elf32.em, and defines extra powerpc32-elf
# specific routines.
#
cat >>e${EMULATION_NAME}.c <<EOF
@@ -26,17 +26,89 @@ cat >>e${EMULATION_NAME}.c <<EOF
#include "libbfd.h"
#include "elf32-ppc.h"
+extern const bfd_target bfd_elf32_powerpc_vec;
+extern const bfd_target bfd_elf32_powerpcle_vec;
+extern const bfd_target bfd_elf32_powerpc_vxworks_vec;
+
+static inline int
+is_ppc_elf32_vec(const bfd_target * vec)
+{
+ return (vec == &bfd_elf32_powerpc_vec
+ || vec == &bfd_elf32_powerpc_vxworks_vec
+ || vec == &bfd_elf32_powerpcle_vec);
+}
+
/* Whether to run tls optimization. */
static int notlsopt = 0;
+/* Whether to emit symbols for stubs. */
+static int emit_stub_syms = 0;
+
+/* Chooses the correct place for .plt and .got. */
+static enum ppc_elf_plt_type plt_style = PLT_UNSET;
+static int old_got = 0;
+
static void
-ppc_before_allocation (void)
+ppc_after_open (void)
{
- extern const bfd_target bfd_elf32_powerpc_vec;
- extern const bfd_target bfd_elf32_powerpcle_vec;
+ if (is_ppc_elf32_vec (link_info.hash->creator))
+ {
+ int new_plt;
+ int keep_new;
+ unsigned int num_plt;
+ unsigned int num_got;
+ lang_output_section_statement_type *os;
+ lang_output_section_statement_type *plt_os[2];
+ lang_output_section_statement_type *got_os[2];
+
+ emit_stub_syms |= link_info.emitrelocations;
+ new_plt = ppc_elf_select_plt_layout (output_bfd, &link_info, plt_style,
+ emit_stub_syms);
+ if (new_plt < 0)
+ einfo ("%X%P: select_plt_layout problem %E\n");
+
+ num_got = 0;
+ num_plt = 0;
+ for (os = &lang_output_section_statement.head->output_section_statement;
+ os != NULL;
+ os = os->next)
+ {
+ if (os->constraint == SPECIAL && strcmp (os->name, ".plt") == 0)
+ {
+ if (num_plt < 2)
+ plt_os[num_plt] = os;
+ ++num_plt;
+ }
+ if (os->constraint == SPECIAL && strcmp (os->name, ".got") == 0)
+ {
+ if (num_got < 2)
+ got_os[num_got] = os;
+ ++num_got;
+ }
+ }
+
+ keep_new = new_plt == 1 ? 0 : -1;
+ if (num_plt == 2)
+ {
+ plt_os[0]->constraint = keep_new;
+ plt_os[1]->constraint = ~keep_new;
+ }
+ if (num_got == 2)
+ {
+ if (old_got)
+ keep_new = -1;
+ got_os[0]->constraint = keep_new;
+ got_os[1]->constraint = ~keep_new;
+ }
+ }
+
+ gld${EMULATION_NAME}_after_open ();
+}
- if (link_info.hash->creator == &bfd_elf32_powerpc_vec
- || link_info.hash->creator == &bfd_elf32_powerpcle_vec)
+static void
+ppc_before_allocation (void)
+{
+ if (is_ppc_elf32_vec (link_info.hash->creator))
{
if (ppc_elf_tls_setup (output_bfd, &link_info) && !notlsopt)
{
@@ -52,29 +124,77 @@ ppc_before_allocation (void)
EOF
+if grep -q 'ld_elf32_spu_emulation' ldemul-list.h; then
+ cat >>e${EMULATION_NAME}.c <<EOF
+/* Special handling for embedded SPU executables. */
+extern bfd_boolean embedded_spu_file (lang_input_statement_type *, const char *);
+static bfd_boolean gld${EMULATION_NAME}_load_symbols (lang_input_statement_type *);
+
+static bfd_boolean
+ppc_recognized_file (lang_input_statement_type *entry)
+{
+ if (embedded_spu_file (entry, "-m32"))
+ return TRUE;
+
+ return gld${EMULATION_NAME}_load_symbols (entry);
+}
+
+EOF
+LDEMUL_RECOGNIZED_FILE=ppc_recognized_file
+fi
+
# Define some shell vars to insert bits of code into the standard elf
# parse_args and list_options functions.
#
PARSE_AND_LIST_PROLOGUE='
#define OPTION_NO_TLS_OPT 301
+#define OPTION_NEW_PLT 302
+#define OPTION_OLD_PLT 303
+#define OPTION_OLD_GOT 304
+#define OPTION_STUBSYMS 305
'
PARSE_AND_LIST_LONGOPTS='
+ { "emit-stub-syms", no_argument, NULL, OPTION_STUBSYMS },
{ "no-tls-optimize", no_argument, NULL, OPTION_NO_TLS_OPT },
+ { "secure-plt", no_argument, NULL, OPTION_NEW_PLT },
+ { "bss-plt", no_argument, NULL, OPTION_OLD_PLT },
+ { "sdata-got", no_argument, NULL, OPTION_OLD_GOT },
'
PARSE_AND_LIST_OPTIONS='
fprintf (file, _("\
- --no-tls-optimize Don'\''t try to optimize TLS accesses.\n"
+ --emit-stub-syms Label linker stubs with a symbol.\n\
+ --no-tls-optimize Don'\''t try to optimize TLS accesses.\n\
+ --secure-plt Use new-style PLT if possible.\n\
+ --bss-plt Force old-style BSS PLT.\n\
+ --sdata-got Force GOT location just before .sdata.\n"
));
'
PARSE_AND_LIST_ARGS_CASES='
+ case OPTION_STUBSYMS:
+ emit_stub_syms = 1;
+ break;
+
case OPTION_NO_TLS_OPT:
notlsopt = 1;
break;
+
+ case OPTION_NEW_PLT:
+ plt_style = PLT_NEW;
+ break;
+
+ case OPTION_OLD_PLT:
+ plt_style = PLT_OLD;
+ break;
+
+ case OPTION_OLD_GOT:
+ old_got = 1;
+ break;
'
-# Put these extra ppc64elf routines in ld_${EMULATION_NAME}_emulation
+# Put these extra ppc32elf routines in ld_${EMULATION_NAME}_emulation
#
+LDEMUL_AFTER_OPEN=ppc_after_open
LDEMUL_BEFORE_ALLOCATION=ppc_before_allocation
diff --git a/contrib/binutils/ld/emultempl/ppc64elf.em b/contrib/binutils/ld/emultempl/ppc64elf.em
index aed5d3a..3ba2ba6 100644
--- a/contrib/binutils/ld/emultempl/ppc64elf.em
+++ b/contrib/binutils/ld/emultempl/ppc64elf.em
@@ -1,5 +1,5 @@
# This shell script emits a C file. -*- C -*-
-# Copyright 2002, 2003, 2004 Free Software Foundation, Inc.
+# Copyright 2002, 2003, 2004, 2005 Free Software Foundation, Inc.
#
# This file is part of GLD, the Gnu Linker.
#
@@ -15,7 +15,7 @@
#
# 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.
+# Foundation, Inc., 51 Franklin Street - Fifth Floor, Boston, MA 02110-1301, USA.
#
# This file is sourced from elf32.em, and defines extra powerpc64-elf
@@ -44,13 +44,25 @@ static bfd_signed_vma group_size = 1;
static int dotsyms = 1;
/* Whether to run tls optimization. */
-static int notlsopt = 0;
+static int no_tls_opt = 0;
+
+/* Whether to run opd optimization. */
+static int no_opd_opt = 0;
+
+/* Whether to run toc optimization. */
+static int no_toc_opt = 0;
+
+/* Whether to allow multiple toc sections. */
+static int no_multi_toc = 0;
/* Whether to emit symbols for stubs. */
static int emit_stub_syms = 0;
static asection *toc_section = 0;
+/* Whether to canonicalize .opd so that there are no overlapping
+ .opd entries. */
+static int non_overlapping_opd = 0;
/* This is called before the input files are opened. We create a new
fake input file to hold the stub sections. */
@@ -77,56 +89,45 @@ ppc_create_output_section_statements (void)
bfd_get_arch (output_bfd),
bfd_get_mach (output_bfd)))
{
- einfo ("%X%P: can not create BFD %E\n");
+ einfo ("%F%P: can not create BFD %E\n");
return;
}
if (bfd_get_section_by_name (stub_file->the_bfd, ".note.GNU-stack") == NULL)
sect = bfd_make_section (stub_file->the_bfd, ".note.GNU-stack");
+ stub_file->the_bfd->flags |= BFD_LINKER_CREATED;
ldlang_add_file (stub_file);
ppc64_elf_init_stub_bfd (stub_file->the_bfd, &link_info);
}
static void
-ppc_after_open (void)
-{
- if (!ppc64_elf_mark_entry_syms (&link_info))
- {
- einfo ("%X%P: can not mark entry symbols %E\n");
- return;
- }
-
- gld${EMULATION_NAME}_after_open ();
-}
-
-static void
ppc_before_allocation (void)
{
if (stub_file != NULL)
{
- if (!ppc64_elf_edit_opd (output_bfd, &link_info))
- {
- einfo ("%X%P: can not edit opd %E\n");
- return;
- }
+ if (!ppc64_elf_edit_opd (output_bfd, &link_info, no_opd_opt,
+ non_overlapping_opd))
+ einfo ("%X%P: can not edit %s %E\n", "opd");
- if (ppc64_elf_tls_setup (output_bfd, &link_info) && !notlsopt)
+ if (ppc64_elf_tls_setup (output_bfd, &link_info) && !no_tls_opt)
{
/* Size the sections. This is premature, but we want to know the
TLS segment layout so that certain optimizations can be done. */
- lang_size_sections (stat_ptr->head, abs_output_section,
- &stat_ptr->head, 0, 0, NULL, TRUE);
+ expld.phase = lang_mark_phase_enum;
+ expld.dataseg.phase = exp_dataseg_none;
+ one_lang_size_sections_pass (NULL, TRUE);
if (!ppc64_elf_tls_optimize (output_bfd, &link_info))
- {
- einfo ("%X%P: TLS problem %E\n");
- return;
- }
+ einfo ("%X%P: TLS problem %E\n");
/* We must not cache anything from the preliminary sizing. */
- elf_tdata (output_bfd)->program_header_size = 0;
lang_reset_memory_regions ();
}
+
+ if (!no_toc_opt
+ && !link_info.relocatable
+ && !ppc64_elf_edit_toc (output_bfd, &link_info))
+ einfo ("%X%P: can not edit %s %E\n", "toc");
}
gld${EMULATION_NAME}_before_allocation ();
@@ -227,7 +228,7 @@ ppc_add_stub_section (const char *stub_sec_name, asection *input_section)
goto err_ret;
flags = (SEC_ALLOC | SEC_LOAD | SEC_READONLY | SEC_CODE
- | SEC_HAS_CONTENTS | SEC_RELOC | SEC_IN_MEMORY | SEC_KEEP);
+ | SEC_HAS_CONTENTS | SEC_IN_MEMORY | SEC_KEEP);
if (!bfd_set_section_flags (stub_file->the_bfd, stub_sec, flags))
goto err_ret;
@@ -237,7 +238,7 @@ ppc_add_stub_section (const char *stub_sec_name, asection *input_section)
info.input_section = input_section;
lang_list_init (&info.add);
- lang_add_section (&info.add, stub_sec, os, stub_file);
+ lang_add_section (&info.add, stub_sec, os);
if (info.add.head == NULL)
goto err_ret;
@@ -260,19 +261,8 @@ ppc_layout_sections_again (void)
/* If we have changed sizes of the stub sections, then we need
to recalculate all the section offsets. This may mean we need to
add even more stubs. */
- need_laying_out = 0;
-
- lang_reset_memory_regions ();
-
- /* Resize the sections. */
- lang_size_sections (stat_ptr->head, abs_output_section,
- &stat_ptr->head, 0, 0, NULL, TRUE);
-
- /* Recalculate TOC base. */
- ldemul_after_allocation ();
-
- /* Do the assignments again. */
- lang_do_assignments (stat_ptr->head, abs_output_section, NULL, 0);
+ gld${EMULATION_NAME}_map_segments (TRUE);
+ need_laying_out = -1;
}
@@ -289,24 +279,33 @@ gld${EMULATION_NAME}_after_allocation (void)
static void
build_toc_list (lang_statement_union_type *statement)
{
- if (statement->header.type == lang_input_section_enum
- && !statement->input_section.ifile->just_syms_flag
- && statement->input_section.section->output_section == toc_section)
- ppc64_elf_next_toc_section (&link_info, statement->input_section.section);
+ if (statement->header.type == lang_input_section_enum)
+ {
+ asection *i = statement->input_section.section;
+
+ if (!((lang_input_statement_type *) i->owner->usrdata)->just_syms_flag
+ && (i->flags & SEC_EXCLUDE) == 0
+ && i->output_section == toc_section)
+ ppc64_elf_next_toc_section (&link_info, i);
+ }
}
static void
build_section_lists (lang_statement_union_type *statement)
{
- if (statement->header.type == lang_input_section_enum
- && !statement->input_section.ifile->just_syms_flag
- && statement->input_section.section->output_section != NULL
- && statement->input_section.section->output_section->owner == output_bfd)
+ if (statement->header.type == lang_input_section_enum)
{
- if (!ppc64_elf_next_input_section (&link_info,
- statement->input_section.section))
- einfo ("%X%P: can not size stub section: %E\n");
+ asection *i = statement->input_section.section;
+
+ if (!((lang_input_statement_type *) i->owner->usrdata)->just_syms_flag
+ && (i->flags & SEC_EXCLUDE) == 0
+ && i->output_section != NULL
+ && i->output_section->owner == output_bfd)
+ {
+ if (!ppc64_elf_next_input_section (&link_info, i))
+ einfo ("%X%P: can not size stub section: %E\n");
+ }
}
}
@@ -332,15 +331,12 @@ gld${EMULATION_NAME}_finish (void)
stubs. */
if (stub_file != NULL && !link_info.relocatable)
{
- int ret = ppc64_elf_setup_section_lists (output_bfd, &link_info);
- if (ret != 0)
+ int ret = ppc64_elf_setup_section_lists (output_bfd, &link_info,
+ no_multi_toc);
+ if (ret < 0)
+ einfo ("%X%P: can not size stub section: %E\n");
+ else if (ret > 0)
{
- if (ret < 0)
- {
- einfo ("%X%P: can not size stub section: %E\n");
- return;
- }
-
toc_section = bfd_get_section_by_name (output_bfd, ".got");
if (toc_section != NULL)
lang_for_each_statement (build_toc_list);
@@ -355,21 +351,27 @@ gld${EMULATION_NAME}_finish (void)
group_size,
&ppc_add_stub_section,
&ppc_layout_sections_again))
- {
- einfo ("%X%P: can not size stub section: %E\n");
- return;
- }
+ einfo ("%X%P: can not size stub section: %E\n");
}
}
- if (need_laying_out)
- ppc_layout_sections_again ();
+ if (need_laying_out != -1)
+ gld${EMULATION_NAME}_map_segments (need_laying_out);
+
+ if (link_info.relocatable)
+ {
+ asection *toc = bfd_get_section_by_name (output_bfd, ".toc");
+ if (toc != NULL
+ && bfd_section_size (output_bfd, toc) > 0x10000)
+ einfo ("%X%P: TOC section size exceeds 64k\n");
+ }
if (stub_added)
{
char *msg = NULL;
char *line, *endline;
+ emit_stub_syms |= link_info.emitrelocations;
if (!ppc64_elf_build_stubs (emit_stub_syms, &link_info,
config.stats ? &msg : NULL))
einfo ("%X%P: can not build stubs: %E\n");
@@ -384,6 +386,9 @@ gld${EMULATION_NAME}_finish (void)
if (msg != NULL)
free (msg);
}
+
+ ppc64_elf_restore_symbols (&link_info);
+ finish_default ();
}
@@ -412,17 +417,30 @@ gld${EMULATION_NAME}_new_vers_pattern (struct bfd_elf_version_expr *entry)
unsigned int len;
char *dot_pat;
- if (!dotsyms || entry->pattern[0] == '*' || entry->pattern[0] == '.')
+ if (!dotsyms
+ || (entry->pattern != NULL
+ && (entry->pattern[0] == '*' || entry->pattern[0] == '.')))
return entry;
dot_entry = xmalloc (sizeof *dot_entry);
*dot_entry = *entry;
dot_entry->next = entry;
- len = strlen (entry->pattern) + 2;
- dot_pat = xmalloc (len);
- dot_pat[0] = '.';
- memcpy (dot_pat + 1, entry->pattern, len - 1);
- dot_entry->pattern = dot_pat;
+ if (entry->pattern != NULL)
+ {
+ len = strlen (entry->pattern) + 2;
+ dot_pat = xmalloc (len);
+ dot_pat[0] = '.';
+ memcpy (dot_pat + 1, entry->pattern, len - 1);
+ dot_entry->pattern = dot_pat;
+ }
+ if (entry->symbol != NULL)
+ {
+ len = strlen (entry->symbol) + 2;
+ dot_pat = xmalloc (len);
+ dot_pat[0] = '.';
+ memcpy (dot_pat + 1, entry->symbol, len - 1);
+ dot_entry->symbol = dot_pat;
+ }
return dot_entry;
}
@@ -449,6 +467,24 @@ ppc_lang_for_each_input_file (void (*func) (lang_input_statement_type *))
EOF
+if grep -q 'ld_elf32_spu_emulation' ldemul-list.h; then
+ cat >>e${EMULATION_NAME}.c <<EOF
+/* Special handling for embedded SPU executables. */
+extern bfd_boolean embedded_spu_file (lang_input_statement_type *, const char *);
+static bfd_boolean gld${EMULATION_NAME}_load_symbols (lang_input_statement_type *);
+
+static bfd_boolean
+ppc64_recognized_file (lang_input_statement_type *entry)
+{
+ if (embedded_spu_file (entry, "-m64"))
+ return TRUE;
+
+ return gld${EMULATION_NAME}_load_symbols (entry);
+}
+EOF
+LDEMUL_RECOGNIZED_FILE=ppc64_recognized_file
+fi
+
# Define some shell vars to insert bits of code into the standard elf
# parse_args and list_options functions.
#
@@ -458,6 +494,10 @@ PARSE_AND_LIST_PROLOGUE='
#define OPTION_DOTSYMS (OPTION_STUBSYMS + 1)
#define OPTION_NO_DOTSYMS (OPTION_DOTSYMS + 1)
#define OPTION_NO_TLS_OPT (OPTION_NO_DOTSYMS + 1)
+#define OPTION_NO_OPD_OPT (OPTION_NO_TLS_OPT + 1)
+#define OPTION_NO_TOC_OPT (OPTION_NO_OPD_OPT + 1)
+#define OPTION_NO_MULTI_TOC (OPTION_NO_TOC_OPT + 1)
+#define OPTION_NON_OVERLAPPING_OPD (OPTION_NO_MULTI_TOC + 1)
'
PARSE_AND_LIST_LONGOPTS='
@@ -466,6 +506,10 @@ PARSE_AND_LIST_LONGOPTS='
{ "dotsyms", no_argument, NULL, OPTION_DOTSYMS },
{ "no-dotsyms", no_argument, NULL, OPTION_NO_DOTSYMS },
{ "no-tls-optimize", no_argument, NULL, OPTION_NO_TLS_OPT },
+ { "no-opd-optimize", no_argument, NULL, OPTION_NO_OPD_OPT },
+ { "no-toc-optimize", no_argument, NULL, OPTION_NO_TOC_OPT },
+ { "no-multi-toc", no_argument, NULL, OPTION_NO_MULTI_TOC },
+ { "non-overlapping-opd", no_argument, NULL, OPTION_NON_OVERLAPPING_OPD },
'
PARSE_AND_LIST_OPTIONS='
@@ -493,6 +537,19 @@ PARSE_AND_LIST_OPTIONS='
fprintf (file, _("\
--no-tls-optimize Don'\''t try to optimize TLS accesses.\n"
));
+ fprintf (file, _("\
+ --no-opd-optimize Don'\''t optimize the OPD section.\n"
+ ));
+ fprintf (file, _("\
+ --no-toc-optimize Don'\''t optimize the TOC section.\n"
+ ));
+ fprintf (file, _("\
+ --no-multi-toc Disallow automatic multiple toc sections.\n"
+ ));
+ fprintf (file, _("\
+ --non-overlapping-opd Canonicalize .opd, so that there are no overlapping\n\
+ .opd entries.\n"
+ ));
'
PARSE_AND_LIST_ARGS_CASES='
@@ -518,13 +575,28 @@ PARSE_AND_LIST_ARGS_CASES='
break;
case OPTION_NO_TLS_OPT:
- notlsopt = 1;
+ no_tls_opt = 1;
+ break;
+
+ case OPTION_NO_OPD_OPT:
+ no_opd_opt = 1;
+ break;
+
+ case OPTION_NO_TOC_OPT:
+ no_toc_opt = 1;
+ break;
+
+ case OPTION_NO_MULTI_TOC:
+ no_multi_toc = 1;
+ break;
+
+ case OPTION_NON_OVERLAPPING_OPD:
+ non_overlapping_opd = 1;
break;
'
# Put these extra ppc64elf routines in ld_${EMULATION_NAME}_emulation
#
-LDEMUL_AFTER_OPEN=ppc_after_open
LDEMUL_BEFORE_ALLOCATION=ppc_before_allocation
LDEMUL_AFTER_ALLOCATION=gld${EMULATION_NAME}_after_allocation
LDEMUL_FINISH=gld${EMULATION_NAME}_finish
diff --git a/contrib/binutils/ld/emultempl/scoreelf.em b/contrib/binutils/ld/emultempl/scoreelf.em
new file mode 100644
index 0000000..a529a1b
--- /dev/null
+++ b/contrib/binutils/ld/emultempl/scoreelf.em
@@ -0,0 +1,74 @@
+# This shell script emits a C file. -*- C -*-
+# Copyright 2006 Free Software Foundation, Inc.
+# Contributed by:
+# Mei Ligang (ligang@sunnorth.com.cn)
+# Pei-Lin Tsai (pltsai@sunplus.com)
+
+# This file is part of GLD, the Gnu Linker.
+#
+# 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., 51 Franklin Street - Fifth Floor, Boston, MA
+# 02110-1301, USA.
+#
+
+# This file is sourced from elf32.em, and defines extra score-elf
+# specific routines.
+#
+cat >>e${EMULATION_NAME}.c <<EOF
+
+static void
+gld${EMULATION_NAME}_before_parse ()
+{
+#ifndef TARGET_ /* I.e., if not generic. */
+ ldfile_set_output_arch ("`echo ${ARCH}`");
+#endif /* not TARGET_ */
+ config.dynamic_link = ${DYNAMIC_LINK-true};
+ config.has_shared = `if test -n "$GENERATE_SHLIB_SCRIPT" ; then echo true ; else echo false ; fi`;
+}
+
+static void
+score_elf_after_open (void)
+{
+ if (strstr (bfd_get_target (output_bfd), "score") == NULL)
+ {
+ /* The score backend needs special fields in the output hash structure.
+ These will only be created if the output format is an score format,
+ hence we do not support linking and changing output formats at the
+ same time. Use a link followed by objcopy to change output formats. */
+ einfo ("%F%X%P: error: cannot change output format whilst linking S+core binaries\n");
+ return;
+ }
+
+ /* Call the standard elf routine. */
+ gld${EMULATION_NAME}_after_open ();
+}
+
+EOF
+
+# Define some shell vars to insert bits of code into the standard elf
+# parse_args and list_options functions.
+#
+PARSE_AND_LIST_PROLOGUE=''
+PARSE_AND_LIST_SHORTOPTS=
+PARSE_AND_LIST_LONGOPTS=''
+PARSE_AND_LIST_OPTIONS=''
+PARSE_AND_LIST_ARGS_CASES=''
+
+# We have our own after_open and before_allocation functions, but they call
+# the standard routines, so give them a different name.
+LDEMUL_AFTER_OPEN=score_elf_after_open
+
+# Replace the elf before_parse function with our own.
+LDEMUL_BEFORE_PARSE=gld"${EMULATION_NAME}"_before_parse
+
diff --git a/contrib/binutils/ld/emultempl/spu_ovl.S b/contrib/binutils/ld/emultempl/spu_ovl.S
new file mode 100644
index 0000000..adc6ab2
--- /dev/null
+++ b/contrib/binutils/ld/emultempl/spu_ovl.S
@@ -0,0 +1,294 @@
+/* Overlay manager for SPU.
+
+ Copyright 2006, 2007 Free Software Foundation, Inc.
+
+ This file is part of GLD, the Gnu Linker.
+
+ GLD 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, or (at your option)
+ any later version.
+
+ GLD 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 GLD; see the file COPYING. If not, write to the Free
+ Software Foundation, 51 Franklin Street - Fifth Floor, Boston, MA
+ 02110-1301, USA. */
+
+/**
+ * MFC DMA defn's.
+ */
+#define MFC_GET_CMD 0x40
+#define MFC_MAX_DMA_SIZE 0x4000
+#define MFC_TAG_UPDATE_ALL 2
+#define MFC_TAG_ID 0
+
+
+/**
+ * Temporary register allocations.
+ * These are saved/restored here.
+ */
+#define tab $75
+#define cgbits $75
+#define add64 $75
+#define ealo $75
+#define newmask $75
+#define tagstat $75
+#define bchn $75
+#define rv1 $75
+
+#define off $76
+#define off64 $76
+#define maxsize $76
+#define oldmask $76
+#define sz $76
+#define lnkr $76
+#define rv2 $76
+
+#define cur $77
+#define cmp $77
+#define buf $77
+#define genwi $77
+#define tagid $77
+#define cmd $77
+#define rv3 $77
+
+#define cgshuf $78
+
+#define vma $6
+
+#define map $7
+#define osize $7
+#define cmp2 $7
+
+#define ea64 $8
+#define retval $8
+
+#ifdef OVLY_IRQ_SAVE
+#define irqtmp $8
+#define irq_stat $9
+#endif
+
+ .extern _ovly_table
+ .extern _ovly_buf_table
+
+ .text
+ .align 4
+ .type __rv_pattern, @object
+ .size __rv_pattern, 16
+__rv_pattern:
+ .word 0x00010203, 0x1c1d1e1f, 0x00010203, 0x10111213
+ .type __cg_pattern, @object
+ .size __cg_pattern, 16
+__cg_pattern:
+ .word 0x04050607, 0x80808080, 0x80808080, 0x80808080
+
+/**
+ * __ovly_return - stub for returning from overlay functions.
+ *
+ * inputs:
+ * $lr link register
+ *
+ * outputs:
+ * $78 old partition number, to be reloaded
+ * $79 return address in old partion number
+ */
+ .global __ovly_return
+ .type __ovly_return, @function
+
+ .word 0
+__ovly_return:
+ shlqbyi $78, $lr, 4
+ shlqbyi $79, $lr, 8
+ biz $78, $79
+ .size __ovly_return, . - __ovly_return
+
+/**
+ * __ovly_load - copy an overlay partion to local store.
+ *
+ * inputs:
+ * $78 partition number to be loaded.
+ * $79 branch target in new partition.
+ * $lr link register, containing return addr.
+ *
+ * outputs:
+ * $lr new link register, returning through __ovly_return.
+ *
+ * Copy a new overlay partition into local store, or return
+ * immediately if the partition is already resident.
+ */
+ .global __ovly_load
+ .type __ovly_load, @function
+
+__ovly_load:
+/* Save temporary registers to stack. */
+ stqd $6, -16($sp)
+ stqd $7, -32($sp)
+ stqd $8, -48($sp)
+
+#ifdef OVLY_IRQ_SAVE
+/* Save irq state, then disable interrupts. */
+ stqd $9, -64($sp)
+ ila irqtmp, __ovly_irq_save
+ rdch irq_stat, $SPU_RdMachStat
+ bid irqtmp
+__ovly_irq_save:
+#endif
+
+/* Set branch hint to overlay target. */
+ hbr __ovly_load_ret, $79
+
+/* Get caller's overlay index by back chaining through stack frames.
+ * Loop until end of stack (back chain all-zeros) or
+ * encountered a link register we set here. */
+ lqd bchn, 0($sp)
+ ila retval, __ovly_return
+
+__ovly_backchain_loop:
+ lqd lnkr, 16(bchn)
+ lqd bchn, 0(bchn)
+ ceq cmp, lnkr, retval
+ ceqi cmp2, bchn, 0
+ or cmp, cmp, cmp2
+ brz cmp, __ovly_backchain_loop
+
+/* If we reached the zero back-chain, then lnkr is bogus. Clear the
+ * part of lnkr that we use later (slot 3). */
+ rotqbyi cmp2, cmp2, 4
+ andc lnkr, lnkr, cmp2
+
+/* Set lr = {__ovly_return, prev ovl ndx, caller return adr, callee ovl ndx}. */
+ lqd rv1, (__rv_pattern-__ovly_return+4)(retval)
+ shufb rv2, retval, lnkr, rv1
+ shufb rv3, $lr, $78, rv1
+ fsmbi rv1, 0xff
+ selb rv2, rv2, rv3, rv1
+/* If we have a tail call from one overlay function to another overlay,
+ then lr is already set up. Don't change it. */
+ ceq rv1, $lr, retval
+ fsmb rv1, rv1
+ selb $lr, rv2, $lr, rv1
+
+/* Branch to $79 if non-overlay */
+ brz $78, __ovly_load_restore
+
+/* Load values from _ovly_table[$78].
+ * extern struct {
+ * u32 vma;
+ * u32 size;
+ * u32 file_offset;
+ * u32 buf;
+ * } _ovly_table[];
+ */
+ shli off, $78, 4
+ ila tab, _ovly_table - 16
+ lqx vma, tab, off
+ rotqbyi buf, vma, 12
+
+/* Load values from _ovly_buf_table[buf].
+ * extern struct {
+ * u32 mapped;
+ * } _ovly_buf_table[];
+ */
+ ila tab, _ovly_buf_table
+ ai off, buf, -1
+ shli off, off, 2
+ lqx map, tab, off
+ rotqby cur, map, off
+
+/* Branch to $79 now if overlay is already mapped. */
+ ceq cmp, $78, cur
+ brnz cmp, __ovly_load_restore
+
+/* Marker for profiling code. If we get here, we are about to load
+ * a new overlay.
+ */
+ .global __ovly_load_event
+ .type __ovly_load_event, @function
+__ovly_load_event:
+
+/* Set _ovly_buf_table[buf].mapped = $78. */
+ cwx genwi, tab, off
+ shufb map, $78, map, genwi
+ stqx map, tab, off
+
+/* A new partition needs to be loaded. Prepare for DMA loop.
+ * _EAR_ is the 64b base EA, filled in at run time by the
+ * loader, and indicating the value for SPU executable image start.
+ */
+ lqd cgshuf, (__cg_pattern-__ovly_return+4)(retval)
+ rotqbyi osize, vma, 4
+ rotqbyi sz, vma, 8
+ lqa ea64, _EAR_
+
+__ovly_xfer_loop:
+/* 64b add to compute next ea64. */
+ rotqmbyi off64, sz, -4
+ cg cgbits, ea64, off64
+ shufb add64, cgbits, cgbits, cgshuf
+ addx add64, ea64, off64
+ ori ea64, add64, 0
+
+/* Setup DMA parameters, then issue DMA request. */
+ rotqbyi ealo, add64, 4
+ ila maxsize, MFC_MAX_DMA_SIZE
+ cgt cmp, osize, maxsize
+ selb sz, osize, maxsize, cmp
+ ila tagid, MFC_TAG_ID
+ wrch $MFC_LSA, vma
+ wrch $MFC_EAH, ea64
+ wrch $MFC_EAL, ealo
+ wrch $MFC_Size, sz
+ wrch $MFC_TagId, tagid
+ ila cmd, MFC_GET_CMD
+ wrch $MFC_Cmd, cmd
+
+/* Increment vma, decrement size, branch back as needed. */
+ a vma, vma, sz
+ sf osize, sz, osize
+ brnz osize, __ovly_xfer_loop
+
+/* Save app's tagmask, wait for DMA complete, restore mask. */
+ rdch oldmask, $MFC_RdTagMask
+#if MFC_TAG_ID < 16
+ ilh newmask, 1 << MFC_TAG_ID
+#else
+ ilhu newmask, 1 << (MFC_TAG_ID - 16)
+#endif
+ wrch $MFC_WrTagMask, newmask
+ ila tagstat, MFC_TAG_UPDATE_ALL
+ wrch $MFC_WrTagUpdate, tagstat
+ rdch tagstat, $MFC_RdTagStat
+ sync
+ wrch $MFC_WrTagMask, oldmask
+
+ .global _ovly_debug_event
+ .type _ovly_debug_event, @function
+_ovly_debug_event:
+/* GDB inserts debugger trap here. */
+ nop
+
+__ovly_load_restore:
+#ifdef OVLY_IRQ_SAVE
+/* Conditionally re-enable interrupts. */
+ andi irq_stat, irq_stat, 1
+ ila irqtmp, __ovly_irq_restore
+ binze irq_stat, irqtmp
+__ovly_irq_restore:
+ lqd $9, -64($sp)
+#endif
+
+/* Restore saved registers. */
+ lqd $8, -48($sp)
+ lqd $7, -32($sp)
+ lqd $6, -16($sp)
+
+__ovly_load_ret:
+/* Branch to target address. */
+ bi $79
+
+ .size __ovly_load, . - __ovly_load
diff --git a/contrib/binutils/ld/emultempl/spu_ovl.o b/contrib/binutils/ld/emultempl/spu_ovl.o
new file mode 100644
index 0000000..a68eea3
--- /dev/null
+++ b/contrib/binutils/ld/emultempl/spu_ovl.o
Binary files differ
diff --git a/contrib/binutils/ld/emultempl/spuelf.em b/contrib/binutils/ld/emultempl/spuelf.em
new file mode 100644
index 0000000..05adeb8
--- /dev/null
+++ b/contrib/binutils/ld/emultempl/spuelf.em
@@ -0,0 +1,504 @@
+# This shell script emits a C file. -*- C -*-
+# Copyright 2006, 2007 Free Software Foundation, Inc.
+#
+# This file is part of GLD, the Gnu Linker.
+#
+# 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.,
+# 51 Franklin Street - Fifth Floor, Boston, MA 02110-1301, USA.
+#
+
+# This file is sourced from elf32.em, and defines extra spu specific
+# features.
+#
+cat >>e${EMULATION_NAME}.c <<EOF
+#include "ldctor.h"
+#include "elf32-spu.h"
+
+/* Non-zero if no overlay processing should be done. */
+static int no_overlays = 0;
+
+/* Non-zero if we want stubs on all calls out of overlay regions. */
+static int non_overlay_stubs = 0;
+
+/* Whether to emit symbols for stubs. */
+static int emit_stub_syms = 0;
+
+/* Non-zero to perform stack space analysis. */
+static int stack_analysis = 0;
+
+/* Whether to emit symbols with stack requirements for each function. */
+static int emit_stack_syms = 0;
+
+/* Range of valid addresses for loadable sections. */
+static bfd_vma local_store_lo = 0;
+static bfd_vma local_store_hi = 0x3ffff;
+
+static const char ovl_mgr[] = {
+EOF
+
+../binutils/bin2c < ${srcdir}/emultempl/spu_ovl.o >> e${EMULATION_NAME}.c
+
+cat >>e${EMULATION_NAME}.c <<EOF
+};
+
+static const struct _ovl_stream ovl_mgr_stream = {
+ ovl_mgr,
+ ovl_mgr + sizeof (ovl_mgr)
+};
+
+static asection *toe = NULL;
+
+
+static int
+is_spu_target (void)
+{
+ extern const bfd_target bfd_elf32_spu_vec;
+
+ return link_info.hash->creator == &bfd_elf32_spu_vec;
+}
+
+/* Create our note section. */
+
+static void
+spu_after_open (void)
+{
+ if (is_spu_target ()
+ && !link_info.relocatable
+ && link_info.input_bfds != NULL
+ && !spu_elf_create_sections (output_bfd, &link_info,
+ stack_analysis, emit_stack_syms))
+ einfo ("%X%P: can not create note section: %E\n");
+
+ gld${EMULATION_NAME}_after_open ();
+}
+
+/* Add section S at the end of output section OUTPUT_NAME.
+
+ Really, we should be duplicating ldlang.c map_input_to_output_sections
+ logic here, ie. using the linker script to find where the section
+ goes. That's rather a lot of code, and we don't want to run
+ map_input_to_output_sections again because most sections are already
+ mapped. So cheat, and put the section in a fixed place, ignoring any
+ attempt via a linker script to put .stub, .ovtab, and built-in
+ overlay manager code somewhere else. */
+
+static void
+spu_place_special_section (asection *s, const char *output_name)
+{
+ lang_output_section_statement_type *os;
+
+ os = lang_output_section_find (output_name);
+ if (os == NULL)
+ {
+ const char *save = s->name;
+ s->name = output_name;
+ gld${EMULATION_NAME}_place_orphan (s);
+ s->name = save;
+ }
+ else
+ lang_add_section (&os->children, s, os);
+
+ s->output_section->size += s->size;
+}
+
+/* Load built-in overlay manager, and tweak overlay section alignment. */
+
+static void
+spu_elf_load_ovl_mgr (void)
+{
+ lang_output_section_statement_type *os;
+ struct elf_link_hash_entry *h;
+
+ h = elf_link_hash_lookup (elf_hash_table (&link_info),
+ "__ovly_load", FALSE, FALSE, FALSE);
+
+ if (h != NULL
+ && (h->root.type == bfd_link_hash_defined
+ || h->root.type == bfd_link_hash_defweak)
+ && h->def_regular)
+ {
+ /* User supplied __ovly_load. */
+ }
+ else if (ovl_mgr_stream.start == ovl_mgr_stream.end)
+ einfo ("%F%P: no built-in overlay manager\n");
+ else
+ {
+ lang_input_statement_type *ovl_is;
+
+ ovl_is = lang_add_input_file ("builtin ovl_mgr",
+ lang_input_file_is_file_enum,
+ NULL);
+
+ if (!spu_elf_open_builtin_lib (&ovl_is->the_bfd, &ovl_mgr_stream))
+ einfo ("%X%P: can not open built-in overlay manager: %E\n");
+ else
+ {
+ asection *in;
+
+ if (!load_symbols (ovl_is, NULL))
+ einfo ("%X%P: can not load built-in overlay manager: %E\n");
+
+ /* Map overlay manager sections to output sections. */
+ for (in = ovl_is->the_bfd->sections; in != NULL; in = in->next)
+ if ((in->flags & (SEC_ALLOC | SEC_LOAD))
+ == (SEC_ALLOC | SEC_LOAD))
+ spu_place_special_section (in, ".text");
+ }
+ }
+
+ /* Ensure alignment of overlay sections is sufficient. */
+ for (os = &lang_output_section_statement.head->output_section_statement;
+ os != NULL;
+ os = os->next)
+ if (os->bfd_section != NULL
+ && spu_elf_section_data (os->bfd_section) != NULL
+ && spu_elf_section_data (os->bfd_section)->ovl_index != 0)
+ {
+ if (os->bfd_section->alignment_power < 4)
+ os->bfd_section->alignment_power = 4;
+
+ /* Also ensure size rounds up. */
+ os->block_value = 16;
+ }
+}
+
+/* Go find if we need to do anything special for overlays. */
+
+static void
+spu_before_allocation (void)
+{
+ if (is_spu_target ()
+ && !link_info.relocatable
+ && !no_overlays)
+ {
+ /* Size the sections. This is premature, but we need to know the
+ rough layout so that overlays can be found. */
+ expld.phase = lang_mark_phase_enum;
+ expld.dataseg.phase = exp_dataseg_none;
+ one_lang_size_sections_pass (NULL, TRUE);
+
+ /* Find overlays by inspecting section vmas. */
+ if (spu_elf_find_overlays (output_bfd, &link_info))
+ {
+ asection *stub, *ovtab;
+
+ if (!spu_elf_size_stubs (output_bfd, &link_info, non_overlay_stubs,
+ stack_analysis, &stub, &ovtab, &toe))
+ einfo ("%X%P: can not size overlay stubs: %E\n");
+
+ if (stub != NULL)
+ {
+ spu_place_special_section (stub, ".text");
+ spu_place_special_section (ovtab, ".data");
+ spu_place_special_section (toe, ".toe");
+
+ spu_elf_load_ovl_mgr ();
+ }
+ }
+
+ /* We must not cache anything from the preliminary sizing. */
+ lang_reset_memory_regions ();
+ }
+
+ gld${EMULATION_NAME}_before_allocation ();
+}
+
+/* Final emulation specific call. */
+
+static void
+gld${EMULATION_NAME}_finish (void)
+{
+ int need_laying_out;
+
+ need_laying_out = bfd_elf_discard_info (output_bfd, &link_info);
+
+ gld${EMULATION_NAME}_map_segments (need_laying_out);
+
+ if (is_spu_target () && local_store_lo < local_store_hi)
+ {
+ asection *s;
+
+ s = spu_elf_check_vma (output_bfd, local_store_lo, local_store_hi);
+ if (s != NULL)
+ einfo ("%X%P: %A exceeds local store range\n", s);
+ }
+
+ if (toe != NULL
+ && !spu_elf_build_stubs (&link_info,
+ emit_stub_syms || link_info.emitrelocations,
+ toe))
+ einfo ("%X%P: can not build overlay stubs: %E\n");
+
+ finish_default ();
+}
+
+EOF
+
+if grep -q 'ld_elf.*ppc.*_emulation' ldemul-list.h; then
+ cat >>e${EMULATION_NAME}.c <<EOF
+#include "filenames.h"
+#include <fcntl.h>
+#include <sys/wait.h>
+
+struct tflist {
+ struct tflist *next;
+ char name[9];
+};
+
+static struct tflist *tmp_file_list;
+
+static void clean_tmp (void)
+{
+ for (; tmp_file_list != NULL; tmp_file_list = tmp_file_list->next)
+ unlink (tmp_file_list->name);
+}
+
+static const char *
+base_name (const char *path)
+{
+ const char *file = strrchr (path, '/');
+#ifdef HAVE_DOS_BASED_FILE_SYSTEM
+ {
+ char *bslash = strrchr (path, '\\\\');
+
+ if (file == NULL || (bslash != NULL && bslash > file))
+ file = bslash;
+ if (file == NULL
+ && path[0] != '\0'
+ && path[1] == ':')
+ file = path + 1;
+ }
+#endif
+ if (file == NULL)
+ file = path;
+ else
+ ++file;
+ return file;
+}
+
+/* This function is called when building a ppc32 or ppc64 executable
+ to handle embedded spu images. */
+extern bfd_boolean embedded_spu_file (lang_input_statement_type *, const char *);
+
+bfd_boolean
+embedded_spu_file (lang_input_statement_type *entry, const char *flags)
+{
+ const char *cmd[6];
+ const char *sym;
+ char *handle, *p;
+ struct tflist *tf;
+ char *oname;
+ int fd;
+ pid_t pid;
+ int status;
+ union lang_statement_union **old_stat_tail;
+ union lang_statement_union **old_file_tail;
+ union lang_statement_union *new_ent;
+ lang_input_statement_type *search;
+
+ if (entry->the_bfd->format != bfd_object
+ || strcmp (entry->the_bfd->xvec->name, "elf32-spu") != 0
+ || (entry->the_bfd->tdata.elf_obj_data->elf_header->e_type != ET_EXEC
+ && entry->the_bfd->tdata.elf_obj_data->elf_header->e_type != ET_DYN))
+ return FALSE;
+
+ /* Use the filename as the symbol marking the program handle struct. */
+ sym = base_name (entry->the_bfd->filename);
+
+ handle = xstrdup (sym);
+ for (p = handle; *p; ++p)
+ if (!(ISALNUM (*p) || *p == '$' || *p == '.'))
+ *p = '_';
+
+ if (tmp_file_list == NULL)
+ atexit (clean_tmp);
+ tf = xmalloc (sizeof (*tf));
+ tf->next = tmp_file_list;
+ tmp_file_list = tf;
+ oname = tf->name;
+ memcpy (tf->name, "ldXXXXXX", sizeof (tf->name));
+
+#ifdef HAVE_MKSTEMP
+ fd = mkstemp (oname);
+#else
+ oname = mktemp (oname);
+ if (oname == NULL)
+ return FALSE;
+ fd = open (oname, O_RDWR | O_CREAT | O_EXCL, 0600);
+#endif
+ if (fd == -1)
+ return FALSE;
+ close (fd);
+
+ for (search = (lang_input_statement_type *) input_file_chain.head;
+ search != NULL;
+ search = (lang_input_statement_type *) search->next_real_file)
+ {
+ const char *infile = base_name (search->filename);
+
+ if (infile != NULL
+ && strncmp (infile, "crtbegin", 8) == 0)
+ {
+ if (infile[8] == 'S')
+ flags = concat (flags, " -fPIC", NULL);
+ else if (infile[8] == 'T')
+ flags = concat (flags, " -fpie", NULL);
+ break;
+ }
+ }
+
+ /* Use fork() and exec() rather than system() so that we don't
+ need to worry about quoting args. */
+ cmd[0] = EMBEDSPU;
+ cmd[1] = flags;
+ cmd[2] = handle;
+ cmd[3] = entry->the_bfd->filename;
+ cmd[4] = oname;
+ cmd[5] = NULL;
+ if (trace_file_tries)
+ {
+ info_msg (_("running: %s \"%s\" \"%s\" \"%s\" \"%s\"\n"),
+ cmd[0], cmd[1], cmd[2], cmd[3], cmd[4]);
+ fflush (stdout);
+ }
+
+ pid = fork ();
+ if (pid == -1)
+ return FALSE;
+ if (pid == 0)
+ {
+ execvp (cmd[0], (char *const *) cmd);
+ if (strcmp ("embedspu", EMBEDSPU) != 0)
+ {
+ cmd[0] = "embedspu";
+ execvp (cmd[0], (char *const *) cmd);
+ }
+ perror (cmd[0]);
+ _exit (127);
+ }
+#ifdef HAVE_WAITPID
+#define WAITFOR(PID, STAT) waitpid (PID, STAT, 0)
+#else
+#define WAITFOR(PID, STAT) wait (STAT)
+#endif
+ if (WAITFOR (pid, &status) != pid
+ || !WIFEXITED (status)
+ || WEXITSTATUS (status) != 0)
+ return FALSE;
+#undef WAITFOR
+
+ old_stat_tail = stat_ptr->tail;
+ old_file_tail = input_file_chain.tail;
+ if (lang_add_input_file (oname, lang_input_file_is_file_enum, NULL) == NULL)
+ return FALSE;
+
+ /* lang_add_input_file put the new list entry at the end of the statement
+ and input file lists. Move it to just after the current entry. */
+ new_ent = *old_stat_tail;
+ *old_stat_tail = NULL;
+ stat_ptr->tail = old_stat_tail;
+ *old_file_tail = NULL;
+ input_file_chain.tail = old_file_tail;
+ new_ent->header.next = entry->header.next;
+ entry->header.next = new_ent;
+ new_ent->input_statement.next_real_file = entry->next_real_file;
+ entry->next_real_file = new_ent;
+
+ /* Ensure bfd sections are excluded from the output. */
+ bfd_section_list_clear (entry->the_bfd);
+ entry->loaded = TRUE;
+ return TRUE;
+}
+
+EOF
+fi
+
+# Define some shell vars to insert bits of code into the standard elf
+# parse_args and list_options functions.
+#
+PARSE_AND_LIST_PROLOGUE='
+#define OPTION_SPU_PLUGIN 301
+#define OPTION_SPU_NO_OVERLAYS (OPTION_SPU_PLUGIN + 1)
+#define OPTION_SPU_STUB_SYMS (OPTION_SPU_NO_OVERLAYS + 1)
+#define OPTION_SPU_NON_OVERLAY_STUBS (OPTION_SPU_STUB_SYMS + 1)
+#define OPTION_SPU_LOCAL_STORE (OPTION_SPU_NON_OVERLAY_STUBS + 1)
+#define OPTION_SPU_STACK_ANALYSIS (OPTION_SPU_LOCAL_STORE + 1)
+#define OPTION_SPU_STACK_SYMS (OPTION_SPU_STACK_ANALYSIS + 1)
+'
+
+PARSE_AND_LIST_LONGOPTS='
+ { "plugin", no_argument, NULL, OPTION_SPU_PLUGIN },
+ { "no-overlays", no_argument, NULL, OPTION_SPU_NO_OVERLAYS },
+ { "emit-stub-syms", no_argument, NULL, OPTION_SPU_STUB_SYMS },
+ { "extra-overlay-stubs", no_argument, NULL, OPTION_SPU_NON_OVERLAY_STUBS },
+ { "local-store", required_argument, NULL, OPTION_SPU_LOCAL_STORE },
+ { "stack-analysis", no_argument, NULL, OPTION_SPU_STACK_ANALYSIS },
+ { "emit-stack-syms", no_argument, NULL, OPTION_SPU_STACK_SYMS },
+'
+
+PARSE_AND_LIST_OPTIONS='
+ fprintf (file, _("\
+ --plugin Make SPU plugin.\n\
+ --no-overlays No overlay handling.\n\
+ --emit-stub-syms Add symbols on overlay call stubs.\n\
+ --extra-overlay-stubs Add stubs on all calls out of overlay regions.\n\
+ --local-store=lo:hi Valid address range.\n\
+ --stack-analysis Estimate maximum stack requirement.\n\
+ --emit-stack-syms Add __stack_func giving stack needed for each func.\n"
+ ));
+'
+
+PARSE_AND_LIST_ARGS_CASES='
+ case OPTION_SPU_PLUGIN:
+ spu_elf_plugin (1);
+ break;
+
+ case OPTION_SPU_NO_OVERLAYS:
+ no_overlays = 1;
+ break;
+
+ case OPTION_SPU_STUB_SYMS:
+ emit_stub_syms = 1;
+ break;
+
+ case OPTION_SPU_NON_OVERLAY_STUBS:
+ non_overlay_stubs = 1;
+ break;
+
+ case OPTION_SPU_LOCAL_STORE:
+ {
+ char *end;
+ local_store_lo = strtoul (optarg, &end, 0);
+ if (*end == '\'':'\'')
+ {
+ local_store_hi = strtoul (end + 1, &end, 0);
+ if (*end == 0)
+ break;
+ }
+ einfo (_("%P%F: invalid --local-store address range `%s'\''\n"), optarg);
+ }
+ break;
+
+ case OPTION_SPU_STACK_ANALYSIS:
+ stack_analysis = 1;
+ break;
+
+ case OPTION_SPU_STACK_SYMS:
+ emit_stack_syms = 1;
+ break;
+'
+
+LDEMUL_AFTER_OPEN=spu_after_open
+LDEMUL_BEFORE_ALLOCATION=spu_before_allocation
+LDEMUL_FINISH=gld${EMULATION_NAME}_finish
diff --git a/contrib/binutils/ld/emultempl/sunos.em b/contrib/binutils/ld/emultempl/sunos.em
index 358bc9a..53a572a 100644
--- a/contrib/binutils/ld/emultempl/sunos.em
+++ b/contrib/binutils/ld/emultempl/sunos.em
@@ -9,8 +9,8 @@ cat >e${EMULATION_NAME}.c <<EOF
/* This file is is generated by a shell script. DO NOT EDIT! */
/* SunOS emulation code for ${EMULATION_NAME}
- Copyright 1991, 1993, 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2002,
- 2003, 2004 Free Software Foundation, Inc.
+ Copyright 1991, 1993, 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001,
+ 2002, 2003, 2004, 2005, 2006, 2007 Free Software Foundation, Inc.
Written by Steve Chamberlain <sac@cygnus.com>
SunOS shared library support by Ian Lance Taylor <ian@cygnus.com>
@@ -28,12 +28,12 @@ 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. */
+Foundation, Inc., 51 Franklin Street - Fifth Floor, Boston, MA 02110-1301, USA. */
#define TARGET_IS_${EMULATION_NAME}
-#include "bfd.h"
#include "sysdep.h"
+#include "bfd.h"
#include "bfdlink.h"
#include "libiberty.h"
#include "safe-ctype.h"
@@ -160,7 +160,7 @@ gld${EMULATION_NAME}_find_so (lang_input_statement_type *inp)
|| ! inp->dynamic)
return;
- ASSERT (strncmp (inp->local_sym_name, "-l", 2) == 0);
+ ASSERT (CONST_STRNEQ (inp->local_sym_name, "-l"));
for (search = search_head; search != NULL; search = search->next)
{
@@ -273,7 +273,7 @@ gld${EMULATION_NAME}_search_dir
const char *s;
int found_maj, found_min;
- if (strncmp (entry->d_name, "lib", 3) != 0
+ if (! CONST_STRNEQ (entry->d_name, "lib")
|| strncmp (entry->d_name + 3, filename, len) != 0)
continue;
@@ -288,7 +288,7 @@ gld${EMULATION_NAME}_search_dir
native linker does not. This is more convenient for packages
which just generate .so files for shared libraries, as on ELF
systems. */
- if (strncmp (entry->d_name + 3 + len, ".so", 3) != 0)
+ if (! CONST_STRNEQ (entry->d_name + 3 + len, ".so"))
continue;
if (entry->d_name[6 + len] == '\0')
;
@@ -400,7 +400,7 @@ gld${EMULATION_NAME}_after_open (void)
if (global_found)
continue;
- if (strncmp (lname, "-l", 2) != 0)
+ if (! CONST_STRNEQ (lname, "-l"))
{
bfd *abfd;
@@ -586,7 +586,7 @@ gld${EMULATION_NAME}_check_needed (lang_input_statement_type *s)
{
if (s->filename == NULL)
return;
- if (strncmp (global_needed->name, "-l", 2) != 0)
+ if (! CONST_STRNEQ (global_needed->name, "-l"))
{
if (strcmp (s->filename, global_needed->name) == 0)
global_found = TRUE;
@@ -605,7 +605,7 @@ gld${EMULATION_NAME}_check_needed (lang_input_statement_type *s)
else
++sname;
- if (strncmp (sname, "lib", 3) != 0)
+ if (! CONST_STRNEQ (sname, "lib"))
return;
sname += 3;
@@ -671,7 +671,7 @@ gld${EMULATION_NAME}_before_allocation (void)
{
struct bfd_link_hash_entry *h;
- for (h = link_info.hash->undefs; h != NULL; h = h->und_next)
+ for (h = link_info.hash->undefs; h != NULL; h = h->u.undef.next)
{
if (h->type == bfd_link_hash_undefined
&& h->u.undef.abfd != NULL
@@ -744,7 +744,7 @@ gld${EMULATION_NAME}_before_allocation (void)
dynamic object. */
ASSERT (need_entries != 0);
- sneed->_raw_size = need_size;
+ sneed->size = need_size;
sneed->contents = (bfd_byte *) xmalloc (need_size);
need_contents = sneed->contents;
@@ -764,7 +764,7 @@ gld${EMULATION_NAME}_before_allocation (void)
option. */
if (command_line.rpath)
{
- srules->_raw_size = strlen (command_line.rpath);
+ srules->size = strlen (command_line.rpath);
srules->contents = (bfd_byte *) command_line.rpath;
}
else
@@ -776,7 +776,7 @@ gld${EMULATION_NAME}_before_allocation (void)
for (search = search_head; search != NULL; search = search->next)
if (search->cmdline)
size += strlen (search->name) + 1;
- srules->_raw_size = size;
+ srules->size = size;
if (size > 0)
{
char *p;
@@ -810,6 +810,8 @@ gld${EMULATION_NAME}_before_allocation (void)
else
hdyn->u.def.section = bfd_abs_section_ptr;
}
+
+ before_allocation_default ();
}
/* This is called by the before_allocation routine via
@@ -917,7 +919,7 @@ gld${EMULATION_NAME}_set_need (lang_input_statement_type *inp)
bfd_put_32 (output_bfd, (bfd_vma) 0, need_pinfo + 4);
bfd_put_16 (output_bfd, (bfd_vma) 0, need_pinfo + 8);
bfd_put_16 (output_bfd, (bfd_vma) 0, need_pinfo + 10);
- strcpy (need_pnames, inp->filename);
+ strcpy ((char *) need_pnames, inp->filename);
}
else
{
@@ -932,7 +934,7 @@ gld${EMULATION_NAME}_set_need (lang_input_statement_type *inp)
sscanf (verstr, ".so.%d.%d", &maj, &min);
bfd_put_16 (output_bfd, (bfd_vma) maj, need_pinfo + 8);
bfd_put_16 (output_bfd, (bfd_vma) min, need_pinfo + 10);
- strcpy (need_pnames, inp->local_sym_name + 2);
+ strcpy ((char *) need_pnames, inp->local_sym_name + 2);
}
c = (need_pinfo - need_contents) / NEED_ENTRY_SIZE;
@@ -943,7 +945,7 @@ gld${EMULATION_NAME}_set_need (lang_input_statement_type *inp)
need_pinfo + 12);
need_pinfo += NEED_ENTRY_SIZE;
- need_pnames += strlen (need_pnames) + 1;
+ need_pnames += strlen ((char *) need_pnames) + 1;
}
}
@@ -1014,7 +1016,7 @@ struct ld_emulation_xfer_struct ld_${EMULATION_NAME}_emulation =
gld${EMULATION_NAME}_get_script,
"${EMULATION_NAME}",
"${OUTPUT_FORMAT}",
- NULL, /* finish */
+ finish_default,
gld${EMULATION_NAME}_create_output_section_statements,
NULL, /* open dynamic archive */
NULL, /* place orphan */
diff --git a/contrib/binutils/ld/emultempl/ticoff.em b/contrib/binutils/ld/emultempl/ticoff.em
index 8f86b04..113c2b4 100644
--- a/contrib/binutils/ld/emultempl/ticoff.em
+++ b/contrib/binutils/ld/emultempl/ticoff.em
@@ -3,7 +3,8 @@
(echo;echo;echo;echo)>e${EMULATION_NAME}.c # there, now line numbers match ;-)
cat >>e${EMULATION_NAME}.c <<EOF
/* This file is part of GLD, the Gnu Linker.
- Copyright 1999, 2000, 2002, 2003, 2004 Free Software Foundation, Inc.
+ Copyright 1999, 2000, 2002, 2003, 2004, 2007
+ 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
@@ -17,15 +18,15 @@ 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. */
+Foundation, Inc., 51 Franklin Street - Fifth Floor, Boston, MA 02110-1301, USA. */
/* For TI COFF */
/* Need to determine load and run pages for output sections */
#define TARGET_IS_${EMULATION_NAME}
-#include "bfd.h"
#include "sysdep.h"
+#include "bfd.h"
#include "bfdlink.h"
#include "getopt.h"
@@ -165,7 +166,7 @@ struct ld_emulation_xfer_struct ld_${EMULATION_NAME}_emulation =
gld_${EMULATION_NAME}_get_script,
"${EMULATION_NAME}",
"${OUTPUT_FORMAT}",
- NULL, /* finish */
+ finish_default,
NULL, /* create output section statements */
NULL, /* open dynamic archive */
NULL, /* place orphan */
diff --git a/contrib/binutils/ld/emultempl/vanilla.em b/contrib/binutils/ld/emultempl/vanilla.em
index 2141083..ece005e 100644
--- a/contrib/binutils/ld/emultempl/vanilla.em
+++ b/contrib/binutils/ld/emultempl/vanilla.em
@@ -2,7 +2,7 @@
# It does some substitutions.
cat >e${EMULATION_NAME}.c <<EOF
/* A vanilla emulation with no defaults
- Copyright 1991, 1992, 1994, 2000, 2001, 2002, 2003
+ Copyright 1991, 1992, 1994, 2000, 2001, 2002, 2003, 2007
Free Software Foundation, Inc.
Written by Steve Chamberlain steve@cygnus.com
@@ -20,11 +20,10 @@ 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. */
+Foundation, Inc., 51 Franklin Street - Fifth Floor, Boston, MA 02110-1301, USA. */
-#include "bfd.h"
#include "sysdep.h"
-
+#include "bfd.h"
#include "ld.h"
#include "ldmisc.h"
@@ -68,7 +67,7 @@ struct ld_emulation_xfer_struct ld_vanilla_emulation =
vanilla_get_script,
"vanilla",
"a.out-sunos-big",
- NULL, /* finish */
+ finish_default,
NULL, /* create output section statements */
NULL, /* open dynamic archive */
NULL, /* place orphan */
diff --git a/contrib/binutils/ld/fdl.texi b/contrib/binutils/ld/fdl.texi
index c6409a3..cc3cd01 100644
--- a/contrib/binutils/ld/fdl.texi
+++ b/contrib/binutils/ld/fdl.texi
@@ -4,8 +4,8 @@
@center Version 1.1, March 2000
@display
-Copyright (C) 2000, Free Software Foundation, Inc.
-59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
+Copyright (C) 2000, 2003 Free Software Foundation, Inc.
+51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
Everyone is permitted to copy and distribute verbatim copies
of this license document, but changing it is not allowed.
diff --git a/contrib/binutils/ld/gen-doc.texi b/contrib/binutils/ld/gen-doc.texi
index 5add195..03ab558 100644
--- a/contrib/binutils/ld/gen-doc.texi
+++ b/contrib/binutils/ld/gen-doc.texi
@@ -3,12 +3,17 @@
@set GENERIC
@c 2. Specific target machines
-@set H8300
-@set I960
@set ARM
+@set H8300
@set HPPA
+@set I960
+@set M68HC11
@set MMIX
@set MSP430
+@set POWERPC
+@set POWERPC64
+@set Renesas
+@set SPU
@set TICOFF
@set WIN32
@set XTENSA
diff --git a/contrib/binutils/ld/genscripts.sh b/contrib/binutils/ld/genscripts.sh
index 0168203..81b78a2 100755
--- a/contrib/binutils/ld/genscripts.sh
+++ b/contrib/binutils/ld/genscripts.sh
@@ -4,6 +4,7 @@
# Usage: genscripts_extra.sh \
# srcdir \
# libdir \
+# prefix \
# exec_prefix \
# host \
# target \
@@ -22,6 +23,7 @@
# /sources/ld \
# /usr/local/lib \
# /usr/local \
+# /usr/local \
# sparc-sun-sunos4.1.3 \
# sparc-sun-sunos4.1.3 \
# sparc-sun-sunos4.1.3 \
@@ -59,17 +61,18 @@
srcdir=$1
libdir=$2
-exec_prefix=$3
-host=$4
-target=$5
-target_alias=$6
-EMULATION_LIBPATH=$7
-NATIVE_LIB_DIRS=$8
-use_sysroot=$9
+prefix=$3
+exec_prefix=$4
+host=$5
+target=$6
+target_alias=$7
+EMULATION_LIBPATH=$8
+NATIVE_LIB_DIRS=$9
shift 9
-EMULATION_NAME=$1
-TOOL_LIB=$2
-CUSTOMIZER_SCRIPT=$3
+use_sysroot=$1
+EMULATION_NAME=$2
+TOOL_LIB=$3
+CUSTOMIZER_SCRIPT=$4
# Can't use ${TOOL_LIB:-$target_alias} here due to an Ultrix shell bug.
if [ "x${TOOL_LIB}" = "x" ] ; then
@@ -186,18 +189,25 @@ if [ "x${use_sysroot}" != "xyes" ] ; then
::) LIB_PATH=${tool_lib} ;;
*) LIB_PATH=${tool_lib}:${LIB_PATH} ;;
esac
+ # For multilib targets, search both $tool_lib dirs
+ if [ "x${LIBPATH_SUFFIX}" != "x" ] ; then
+ case :${LIB_PATH}: in
+ ::: | *:${tool_lib}${LIBPATH_SUFFIX}:*) ;;
+ ::) LIB_PATH=${tool_lib}${LIBPATH_SUFFIX} ;;
+ *) LIB_PATH=${tool_lib}${LIBPATH_SUFFIX}:${LIB_PATH} ;;
+ esac
+ fi
fi
LIB_SEARCH_DIRS=`echo ${LIB_PATH} | sed -e 's/:/ /g' -e 's/\([^ ][^ ]*\)/SEARCH_DIR(\\"\1\\");/g'`
# We need it for testsuite.
-case " $EMULATION_LIBPATH " in
- *" ${EMULATION_NAME} "*)
+set $EMULATION_LIBPATH
+if [ "x$1" = "x$EMULATION_NAME" ]; then
test -d tmpdir || mkdir tmpdir
- test -f tmpdir/libpath.exp || \
+ rm -f tmpdir/libpath.exp
echo "set libpath \"${LIB_PATH}\"" | sed -e 's/:/ /g' > tmpdir/libpath.exp
- ;;
-esac
+fi
# Generate 5 or 6 script files from a master script template in
# ${srcdir}/scripttempl/${SCRIPT_NAME}.sh. Which one of the 5 or 6
@@ -283,7 +293,16 @@ if test -n "$GENERATE_COMBRELOC_SCRIPT"; then
. ${srcdir}/scripttempl/${SCRIPT_NAME}.sc
) | sed -e '/^ *$/d;s/[ ]*$//' > ldscripts/${EMULATION_NAME}.xc
rm -f ${COMBRELOC}
+ LD_FLAG=w
+ RELRO_NOW=" "
+ COMBRELOC=ldscripts/${EMULATION_NAME}.xw.tmp
+ ( echo "/* Script for -z combreloc -z now -z relro: combine and sort reloc sections */"
+ . ${CUSTOMIZER_SCRIPT} ${EMULATION_NAME}
+ . ${srcdir}/scripttempl/${SCRIPT_NAME}.sc
+ ) | sed -e '/^ *$/d;s/[ ]*$//' > ldscripts/${EMULATION_NAME}.xw
+ rm -f ${COMBRELOC}
COMBRELOC=
+ unset RELRO_NOW
fi
if test -n "$GENERATE_SHLIB_SCRIPT"; then
@@ -299,13 +318,22 @@ if test -n "$GENERATE_SHLIB_SCRIPT"; then
if test -n "$GENERATE_COMBRELOC_SCRIPT"; then
LD_FLAG=cshared
DATA_ALIGNMENT=${DATA_ALIGNMENT_sc-${DATA_ALIGNMENT}}
- COMBRELOC=ldscripts/${EMULATION_NAME}.xc.tmp
+ COMBRELOC=ldscripts/${EMULATION_NAME}.xsc.tmp
( echo "/* Script for --shared -z combreloc: shared library, combine & sort relocs */"
. ${CUSTOMIZER_SCRIPT} ${EMULATION_NAME}
. ${srcdir}/scripttempl/${SCRIPT_NAME}.sc
) | sed -e '/^ *$/d;s/[ ]*$//' > ldscripts/${EMULATION_NAME}.xsc
rm -f ${COMBRELOC}
+ LD_FLAG=wshared
+ RELRO_NOW=" "
+ COMBRELOC=ldscripts/${EMULATION_NAME}.xsw.tmp
+ ( echo "/* Script for --shared -z combreloc -z now -z relro: shared library, combine & sort relocs */"
+ . ${CUSTOMIZER_SCRIPT} ${EMULATION_NAME}
+ . ${srcdir}/scripttempl/${SCRIPT_NAME}.sc
+ ) | sed -e '/^ *$/d;s/[ ]*$//' > ldscripts/${EMULATION_NAME}.xsw
+ rm -f ${COMBRELOC}
COMBRELOC=
+ unset RELRO_NOW
fi
unset CREATE_SHLIB
fi
@@ -323,13 +351,22 @@ if test -n "$GENERATE_PIE_SCRIPT"; then
if test -n "$GENERATE_COMBRELOC_SCRIPT"; then
LD_FLAG=cpie
DATA_ALIGNMENT=${DATA_ALIGNMENT_sc-${DATA_ALIGNMENT}}
- COMBRELOC=ldscripts/${EMULATION_NAME}.xc.tmp
+ COMBRELOC=ldscripts/${EMULATION_NAME}.xdc.tmp
( echo "/* Script for -pie -z combreloc: position independent executable, combine & sort relocs */"
. ${CUSTOMIZER_SCRIPT} ${EMULATION_NAME}
. ${srcdir}/scripttempl/${SCRIPT_NAME}.sc
) | sed -e '/^ *$/d;s/[ ]*$//' > ldscripts/${EMULATION_NAME}.xdc
rm -f ${COMBRELOC}
+ LD_FLAG=wpie
+ RELRO_NOW=" "
+ COMBRELOC=ldscripts/${EMULATION_NAME}.xdw.tmp
+ ( echo "/* Script for -pie -z combreloc -z now -z relro: position independent executable, combine & sort relocs */"
+ . ${CUSTOMIZER_SCRIPT} ${EMULATION_NAME}
+ . ${srcdir}/scripttempl/${SCRIPT_NAME}.sc
+ ) | sed -e '/^ *$/d;s/[ ]*$//' > ldscripts/${EMULATION_NAME}.xdw
+ rm -f ${COMBRELOC}
COMBRELOC=
+ unset RELRO_NOW
fi
unset CREATE_PIE
fi
diff --git a/contrib/binutils/ld/ld.1 b/contrib/binutils/ld/ld.1
deleted file mode 100644
index 87ee202..0000000
--- a/contrib/binutils/ld/ld.1
+++ /dev/null
@@ -1,1929 +0,0 @@
-.\" Automatically generated by Pod::Man v1.37, Pod::Parser v1.14
-.\"
-.\" Standard preamble:
-.\" ========================================================================
-.de Sh \" Subsection heading
-.br
-.if t .Sp
-.ne 5
-.PP
-\fB\\$1\fR
-.PP
-..
-.de Sp \" Vertical space (when we can't use .PP)
-.if t .sp .5v
-.if n .sp
-..
-.de Vb \" Begin verbatim text
-.ft CW
-.nf
-.ne \\$1
-..
-.de Ve \" End verbatim text
-.ft R
-.fi
-..
-.\" Set up some character translations and predefined strings. \*(-- will
-.\" give an unbreakable dash, \*(PI will give pi, \*(L" will give a left
-.\" double quote, and \*(R" will give a right double quote. | will give a
-.\" real vertical bar. \*(C+ will give a nicer C++. Capital omega is used to
-.\" do unbreakable dashes and therefore won't be available. \*(C` and \*(C'
-.\" expand to `' in nroff, nothing in troff, for use with C<>.
-.tr \(*W-|\(bv\*(Tr
-.ds C+ C\v'-.1v'\h'-1p'\s-2+\h'-1p'+\s0\v'.1v'\h'-1p'
-.ie n \{\
-. ds -- \(*W-
-. ds PI pi
-. if (\n(.H=4u)&(1m=24u) .ds -- \(*W\h'-12u'\(*W\h'-12u'-\" diablo 10 pitch
-. if (\n(.H=4u)&(1m=20u) .ds -- \(*W\h'-12u'\(*W\h'-8u'-\" diablo 12 pitch
-. ds L" ""
-. ds R" ""
-. ds C` ""
-. ds C' ""
-'br\}
-.el\{\
-. ds -- \|\(em\|
-. ds PI \(*p
-. ds L" ``
-. ds R" ''
-'br\}
-.\"
-.\" If the F register is turned on, we'll generate index entries on stderr for
-.\" titles (.TH), headers (.SH), subsections (.Sh), items (.Ip), and index
-.\" entries marked with X<> in POD. Of course, you'll have to process the
-.\" output yourself in some meaningful fashion.
-.if \nF \{\
-. de IX
-. tm Index:\\$1\t\\n%\t"\\$2"
-..
-. nr % 0
-. rr F
-.\}
-.\"
-.\" For nroff, turn off justification. Always turn off hyphenation; it makes
-.\" way too many mistakes in technical documents.
-.hy 0
-.\"
-.\" Accent mark definitions (@(#)ms.acc 1.5 88/02/08 SMI; from UCB 4.2).
-.\" Fear. Run. Save yourself. No user-serviceable parts.
-. \" fudge factors for nroff and troff
-.if n \{\
-. ds #H 0
-. ds #V .8m
-. ds #F .3m
-. ds #[ \f1
-. ds #] \fP
-.\}
-.if t \{\
-. ds #H ((1u-(\\\\n(.fu%2u))*.13m)
-. ds #V .6m
-. ds #F 0
-. ds #[ \&
-. ds #] \&
-.\}
-. \" simple accents for nroff and troff
-.if n \{\
-. ds ' \&
-. ds ` \&
-. ds ^ \&
-. ds , \&
-. ds ~ ~
-. ds /
-.\}
-.if t \{\
-. ds ' \\k:\h'-(\\n(.wu*8/10-\*(#H)'\'\h"|\\n:u"
-. ds ` \\k:\h'-(\\n(.wu*8/10-\*(#H)'\`\h'|\\n:u'
-. ds ^ \\k:\h'-(\\n(.wu*10/11-\*(#H)'^\h'|\\n:u'
-. ds , \\k:\h'-(\\n(.wu*8/10)',\h'|\\n:u'
-. ds ~ \\k:\h'-(\\n(.wu-\*(#H-.1m)'~\h'|\\n:u'
-. ds / \\k:\h'-(\\n(.wu*8/10-\*(#H)'\z\(sl\h'|\\n:u'
-.\}
-. \" troff and (daisy-wheel) nroff accents
-.ds : \\k:\h'-(\\n(.wu*8/10-\*(#H+.1m+\*(#F)'\v'-\*(#V'\z.\h'.2m+\*(#F'.\h'|\\n:u'\v'\*(#V'
-.ds 8 \h'\*(#H'\(*b\h'-\*(#H'
-.ds o \\k:\h'-(\\n(.wu+\w'\(de'u-\*(#H)/2u'\v'-.3n'\*(#[\z\(de\v'.3n'\h'|\\n:u'\*(#]
-.ds d- \h'\*(#H'\(pd\h'-\w'~'u'\v'-.25m'\f2\(hy\fP\v'.25m'\h'-\*(#H'
-.ds D- D\\k:\h'-\w'D'u'\v'-.11m'\z\(hy\v'.11m'\h'|\\n:u'
-.ds th \*(#[\v'.3m'\s+1I\s-1\v'-.3m'\h'-(\w'I'u*2/3)'\s-1o\s+1\*(#]
-.ds Th \*(#[\s+2I\s-2\h'-\w'I'u*3/5'\v'-.3m'o\v'.3m'\*(#]
-.ds ae a\h'-(\w'a'u*4/10)'e
-.ds Ae A\h'-(\w'A'u*4/10)'E
-. \" corrections for vroff
-.if v .ds ~ \\k:\h'-(\\n(.wu*9/10-\*(#H)'\s-2\u~\d\s+2\h'|\\n:u'
-.if v .ds ^ \\k:\h'-(\\n(.wu*10/11-\*(#H)'\v'-.4m'^\v'.4m'\h'|\\n:u'
-. \" for low resolution devices (crt and lpr)
-.if \n(.H>23 .if \n(.V>19 \
-\{\
-. ds : e
-. ds 8 ss
-. ds o a
-. ds d- d\h'-1'\(ga
-. ds D- D\h'-1'\(hy
-. ds th \o'bp'
-. ds Th \o'LP'
-. ds ae ae
-. ds Ae AE
-.\}
-.rm #[ #] #H #V #F C
-.\" ========================================================================
-.\"
-.IX Title "LD 1"
-.TH LD 1 "2004-05-17" "binutils-2.15" "GNU Development Tools"
-.SH "NAME"
-ld \- Using LD, the GNU linker
-.SH "SYNOPSIS"
-.IX Header "SYNOPSIS"
-ld [\fBoptions\fR] \fIobjfile\fR ...
-.SH "DESCRIPTION"
-.IX Header "DESCRIPTION"
-\&\fBld\fR combines a number of object and archive files, relocates
-their data and ties up symbol references. Usually the last step in
-compiling a program is to run \fBld\fR.
-.PP
-\&\fBld\fR accepts Linker Command Language files written in
-a superset of \s-1AT&T\s0's Link Editor Command Language syntax,
-to provide explicit and total control over the linking process.
-.PP
-This man page does not describe the command language; see the
-\&\fBld\fR entry in \f(CW\*(C`info\*(C'\fR, or the manual
-ld: the \s-1GNU\s0 linker, for full details on the command language and
-on other aspects of the \s-1GNU\s0 linker.
-.PP
-This version of \fBld\fR uses the general purpose \s-1BFD\s0 libraries
-to operate on object files. This allows \fBld\fR to read, combine, and
-write object files in many different formats\-\-\-for example, \s-1COFF\s0 or
-\&\f(CW\*(C`a.out\*(C'\fR. Different formats may be linked together to produce any
-available kind of object file.
-.PP
-Aside from its flexibility, the \s-1GNU\s0 linker is more helpful than other
-linkers in providing diagnostic information. Many linkers abandon
-execution immediately upon encountering an error; whenever possible,
-\&\fBld\fR continues executing, allowing you to identify other errors
-(or, in some cases, to get an output file in spite of the error).
-.PP
-The \s-1GNU\s0 linker \fBld\fR is meant to cover a broad range of situations,
-and to be as compatible as possible with other linkers. As a result,
-you have many choices to control its behavior.
-.SH "OPTIONS"
-.IX Header "OPTIONS"
-The linker supports a plethora of command-line options, but in actual
-practice few of them are used in any particular context.
-For instance, a frequent use of \fBld\fR is to link standard Unix
-object files on a standard, supported Unix system. On such a system, to
-link a file \f(CW\*(C`hello.o\*(C'\fR:
-.PP
-.Vb 1
-\& ld -o <output> /lib/crt0.o hello.o -lc
-.Ve
-.PP
-This tells \fBld\fR to produce a file called \fIoutput\fR as the
-result of linking the file \f(CW\*(C`/lib/crt0.o\*(C'\fR with \f(CW\*(C`hello.o\*(C'\fR and
-the library \f(CW\*(C`libc.a\*(C'\fR, which will come from the standard search
-directories. (See the discussion of the \fB\-l\fR option below.)
-.PP
-Some of the command-line options to \fBld\fR may be specified at any
-point in the command line. However, options which refer to files, such
-as \fB\-l\fR or \fB\-T\fR, cause the file to be read at the point at
-which the option appears in the command line, relative to the object
-files and other file options. Repeating non-file options with a
-different argument will either have no further effect, or override prior
-occurrences (those further to the left on the command line) of that
-option. Options which may be meaningfully specified more than once are
-noted in the descriptions below.
-.PP
-Non-option arguments are object files or archives which are to be linked
-together. They may follow, precede, or be mixed in with command-line
-options, except that an object file argument may not be placed between
-an option and its argument.
-.PP
-Usually the linker is invoked with at least one object file, but you can
-specify other forms of binary input files using \fB\-l\fR, \fB\-R\fR,
-and the script command language. If \fIno\fR binary input files at all
-are specified, the linker does not produce any output, and issues the
-message \fBNo input files\fR.
-.PP
-If the linker cannot recognize the format of an object file, it will
-assume that it is a linker script. A script specified in this way
-augments the main linker script used for the link (either the default
-linker script or the one specified by using \fB\-T\fR). This feature
-permits the linker to link against a file which appears to be an object
-or an archive, but actually merely defines some symbol values, or uses
-\&\f(CW\*(C`INPUT\*(C'\fR or \f(CW\*(C`GROUP\*(C'\fR to load other objects. Note that
-specifying a script in this way merely augments the main linker script;
-use the \fB\-T\fR option to replace the default linker script entirely.
-.PP
-For options whose names are a single letter,
-option arguments must either follow the option letter without intervening
-whitespace, or be given as separate arguments immediately following the
-option that requires them.
-.PP
-For options whose names are multiple letters, either one dash or two can
-precede the option name; for example, \fB\-trace\-symbol\fR and
-\&\fB\-\-trace\-symbol\fR are equivalent. Note\-\-\-there is one exception to
-this rule. Multiple letter options that start with a lower case 'o' can
-only be preceeded by two dashes. This is to reduce confusion with the
-\&\fB\-o\fR option. So for example \fB\-omagic\fR sets the output file
-name to \fBmagic\fR whereas \fB\-\-omagic\fR sets the \s-1NMAGIC\s0 flag on the
-output.
-.PP
-Arguments to multiple-letter options must either be separated from the
-option name by an equals sign, or be given as separate arguments
-immediately following the option that requires them. For example,
-\&\fB\-\-trace\-symbol foo\fR and \fB\-\-trace\-symbol=foo\fR are equivalent.
-Unique abbreviations of the names of multiple-letter options are
-accepted.
-.PP
-Note\-\-\-if the linker is being invoked indirectly, via a compiler driver
-(e.g. \fBgcc\fR) then all the linker command line options should be
-prefixed by \fB\-Wl,\fR (or whatever is appropriate for the particular
-compiler driver) like this:
-.PP
-.Vb 1
-\& gcc -Wl,--startgroup foo.o bar.o -Wl,--endgroup
-.Ve
-.PP
-This is important, because otherwise the compiler driver program may
-silently drop the linker options, resulting in a bad link.
-.PP
-Here is a table of the generic command line switches accepted by the \s-1GNU\s0
-linker:
-.IP "\fB\-a\fR\fIkeyword\fR" 4
-.IX Item "-akeyword"
-This option is supported for \s-1HP/UX\s0 compatibility. The \fIkeyword\fR
-argument must be one of the strings \fBarchive\fR, \fBshared\fR, or
-\&\fBdefault\fR. \fB\-aarchive\fR is functionally equivalent to
-\&\fB\-Bstatic\fR, and the other two keywords are functionally equivalent
-to \fB\-Bdynamic\fR. This option may be used any number of times.
-.IP "\fB\-A\fR\fIarchitecture\fR" 4
-.IX Item "-Aarchitecture"
-.PD 0
-.IP "\fB\-\-architecture=\fR\fIarchitecture\fR" 4
-.IX Item "--architecture=architecture"
-.PD
-In the current release of \fBld\fR, this option is useful only for the
-Intel 960 family of architectures. In that \fBld\fR configuration, the
-\&\fIarchitecture\fR argument identifies the particular architecture in
-the 960 family, enabling some safeguards and modifying the
-archive-library search path.
-.Sp
-Future releases of \fBld\fR may support similar functionality for
-other architecture families.
-.IP "\fB\-b\fR \fIinput-format\fR" 4
-.IX Item "-b input-format"
-.PD 0
-.IP "\fB\-\-format=\fR\fIinput-format\fR" 4
-.IX Item "--format=input-format"
-.PD
-\&\fBld\fR may be configured to support more than one kind of object
-file. If your \fBld\fR is configured this way, you can use the
-\&\fB\-b\fR option to specify the binary format for input object files
-that follow this option on the command line. Even when \fBld\fR is
-configured to support alternative object formats, you don't usually need
-to specify this, as \fBld\fR should be configured to expect as a
-default input format the most usual format on each machine.
-\&\fIinput-format\fR is a text string, the name of a particular format
-supported by the \s-1BFD\s0 libraries. (You can list the available binary
-formats with \fBobjdump \-i\fR.)
-.Sp
-You may want to use this option if you are linking files with an unusual
-binary format. You can also use \fB\-b\fR to switch formats explicitly (when
-linking object files of different formats), by including
-\&\fB\-b\fR \fIinput-format\fR before each group of object files in a
-particular format.
-.Sp
-The default format is taken from the environment variable
-\&\f(CW\*(C`GNUTARGET\*(C'\fR.
-.Sp
-You can also define the input format from a script, using the command
-\&\f(CW\*(C`TARGET\*(C'\fR;
-.IP "\fB\-c\fR \fIMRI-commandfile\fR" 4
-.IX Item "-c MRI-commandfile"
-.PD 0
-.IP "\fB\-\-mri\-script=\fR\fIMRI-commandfile\fR" 4
-.IX Item "--mri-script=MRI-commandfile"
-.PD
-For compatibility with linkers produced by \s-1MRI\s0, \fBld\fR accepts script
-files written in an alternate, restricted command language, described in
-the \s-1MRI\s0 Compatible Script Files section of \s-1GNU\s0 ld documentation.
-Introduce \s-1MRI\s0 script files with
-the option \fB\-c\fR; use the \fB\-T\fR option to run linker
-scripts written in the general-purpose \fBld\fR scripting language.
-If \fIMRI-cmdfile\fR does not exist, \fBld\fR looks for it in the directories
-specified by any \fB\-L\fR options.
-.IP "\fB\-d\fR" 4
-.IX Item "-d"
-.PD 0
-.IP "\fB\-dc\fR" 4
-.IX Item "-dc"
-.IP "\fB\-dp\fR" 4
-.IX Item "-dp"
-.PD
-These three options are equivalent; multiple forms are supported for
-compatibility with other linkers. They assign space to common symbols
-even if a relocatable output file is specified (with \fB\-r\fR). The
-script command \f(CW\*(C`FORCE_COMMON_ALLOCATION\*(C'\fR has the same effect.
-.IP "\fB\-e\fR \fIentry\fR" 4
-.IX Item "-e entry"
-.PD 0
-.IP "\fB\-\-entry=\fR\fIentry\fR" 4
-.IX Item "--entry=entry"
-.PD
-Use \fIentry\fR as the explicit symbol for beginning execution of your
-program, rather than the default entry point. If there is no symbol
-named \fIentry\fR, the linker will try to parse \fIentry\fR as a number,
-and use that as the entry address (the number will be interpreted in
-base 10; you may use a leading \fB0x\fR for base 16, or a leading
-\&\fB0\fR for base 8).
-.IP "\fB\-E\fR" 4
-.IX Item "-E"
-.PD 0
-.IP "\fB\-\-export\-dynamic\fR" 4
-.IX Item "--export-dynamic"
-.PD
-When creating a dynamically linked executable, add all symbols to the
-dynamic symbol table. The dynamic symbol table is the set of symbols
-which are visible from dynamic objects at run time.
-.Sp
-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.
-.Sp
-If you use \f(CW\*(C`dlopen\*(C'\fR 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.
-.Sp
-You can also use the version script to control what symbols should
-be added to the dynamic symbol table if the output format supports it.
-See the description of \fB\-\-version\-script\fR in \f(CW@ref\fR{\s-1VERSION\s0}.
-.IP "\fB\-EB\fR" 4
-.IX Item "-EB"
-Link big-endian objects. This affects the default output format.
-.IP "\fB\-EL\fR" 4
-.IX Item "-EL"
-Link little-endian objects. This affects the default output format.
-.IP "\fB\-f\fR" 4
-.IX Item "-f"
-.PD 0
-.IP "\fB\-\-auxiliary\fR \fIname\fR" 4
-.IX Item "--auxiliary name"
-.PD
-When creating an \s-1ELF\s0 shared object, set the internal \s-1DT_AUXILIARY\s0 field
-to the specified name. This tells the dynamic linker that the symbol
-table of the shared object should be used as an auxiliary filter on the
-symbol table of the shared object \fIname\fR.
-.Sp
-If you later link a program against this filter object, then, when you
-run the program, the dynamic linker will see the \s-1DT_AUXILIARY\s0 field. If
-the dynamic linker resolves any symbols from the filter object, it will
-first check whether there is a definition in the shared object
-\&\fIname\fR. If there is one, it will be used instead of the definition
-in the filter object. The shared object \fIname\fR need not exist.
-Thus the shared object \fIname\fR may be used to provide an alternative
-implementation of certain functions, perhaps for debugging or for
-machine specific performance.
-.Sp
-This option may be specified more than once. The \s-1DT_AUXILIARY\s0 entries
-will be created in the order in which they appear on the command line.
-.IP "\fB\-F\fR \fIname\fR" 4
-.IX Item "-F name"
-.PD 0
-.IP "\fB\-\-filter\fR \fIname\fR" 4
-.IX Item "--filter name"
-.PD
-When creating an \s-1ELF\s0 shared object, set the internal \s-1DT_FILTER\s0 field to
-the specified name. This tells the dynamic linker that the symbol table
-of the shared object which is being created should be used as a filter
-on the symbol table of the shared object \fIname\fR.
-.Sp
-If you later link a program against this filter object, then, when you
-run the program, the dynamic linker will see the \s-1DT_FILTER\s0 field. The
-dynamic linker will resolve symbols according to the symbol table of the
-filter object as usual, but it will actually link to the definitions
-found in the shared object \fIname\fR. Thus the filter object can be
-used to select a subset of the symbols provided by the object
-\&\fIname\fR.
-.Sp
-Some older linkers used the \fB\-F\fR option throughout a compilation
-toolchain for specifying object-file format for both input and output
-object files.
-The \s-1GNU\s0 linker uses other mechanisms for this purpose: the
-\&\fB\-b\fR, \fB\-\-format\fR, \fB\-\-oformat\fR options, the
-\&\f(CW\*(C`TARGET\*(C'\fR command in linker scripts, and the \f(CW\*(C`GNUTARGET\*(C'\fR
-environment variable.
-The \s-1GNU\s0 linker will ignore the \fB\-F\fR option when not
-creating an \s-1ELF\s0 shared object.
-.IP "\fB\-fini\fR \fIname\fR" 4
-.IX Item "-fini name"
-When creating an \s-1ELF\s0 executable or shared object, call \s-1NAME\s0 when the
-executable or shared object is unloaded, by setting \s-1DT_FINI\s0 to the
-address of the function. By default, the linker uses \f(CW\*(C`_fini\*(C'\fR as
-the function to call.
-.IP "\fB\-g\fR" 4
-.IX Item "-g"
-Ignored. Provided for compatibility with other tools.
-.IP "\fB\-G\fR\fIvalue\fR" 4
-.IX Item "-Gvalue"
-.PD 0
-.IP "\fB\-\-gpsize=\fR\fIvalue\fR" 4
-.IX Item "--gpsize=value"
-.PD
-Set the maximum size of objects to be optimized using the \s-1GP\s0 register to
-\&\fIsize\fR. This is only meaningful for object file formats such as
-\&\s-1MIPS\s0 \s-1ECOFF\s0 which supports putting large and small objects into different
-sections. This is ignored for other object file formats.
-.IP "\fB\-h\fR\fIname\fR" 4
-.IX Item "-hname"
-.PD 0
-.IP "\fB\-soname=\fR\fIname\fR" 4
-.IX Item "-soname=name"
-.PD
-When creating an \s-1ELF\s0 shared object, set the internal \s-1DT_SONAME\s0 field to
-the specified name. When an executable is linked with a shared object
-which has a \s-1DT_SONAME\s0 field, then when the executable is run the dynamic
-linker will attempt to load the shared object specified by the \s-1DT_SONAME\s0
-field rather than the using the file name given to the linker.
-.IP "\fB\-i\fR" 4
-.IX Item "-i"
-Perform an incremental link (same as option \fB\-r\fR).
-.IP "\fB\-init\fR \fIname\fR" 4
-.IX Item "-init name"
-When creating an \s-1ELF\s0 executable or shared object, call \s-1NAME\s0 when the
-executable or shared object is loaded, by setting \s-1DT_INIT\s0 to the address
-of the function. By default, the linker uses \f(CW\*(C`_init\*(C'\fR as the
-function to call.
-.IP "\fB\-l\fR\fIarchive\fR" 4
-.IX Item "-larchive"
-.PD 0
-.IP "\fB\-\-library=\fR\fIarchive\fR" 4
-.IX Item "--library=archive"
-.PD
-Add archive file \fIarchive\fR to the list of files to link. This
-option may be used any number of times. \fBld\fR will search its
-path-list for occurrences of \f(CW\*(C`lib\f(CIarchive\f(CW.a\*(C'\fR for every
-\&\fIarchive\fR specified.
-.Sp
-On systems which support shared libraries, \fBld\fR may also search for
-libraries with extensions other than \f(CW\*(C`.a\*(C'\fR. Specifically, on \s-1ELF\s0
-and SunOS systems, \fBld\fR will search a directory for a library with
-an extension of \f(CW\*(C`.so\*(C'\fR before searching for one with an extension of
-\&\f(CW\*(C`.a\*(C'\fR. By convention, a \f(CW\*(C`.so\*(C'\fR extension indicates a shared
-library.
-.Sp
-The linker will search an archive only once, at the location where it is
-specified on the command line. If the archive defines a symbol which
-was undefined in some object which appeared before the archive on the
-command line, the linker will include the appropriate file(s) from the
-archive. However, an undefined symbol in an object appearing later on
-the command line will not cause the linker to search the archive again.
-.Sp
-See the \fB\-(\fR option for a way to force the linker to search
-archives multiple times.
-.Sp
-You may list the same archive multiple times on the command line.
-.Sp
-This type of archive searching is standard for Unix linkers. However,
-if you are using \fBld\fR on \s-1AIX\s0, note that it is different from the
-behaviour of the \s-1AIX\s0 linker.
-.IP "\fB\-L\fR\fIsearchdir\fR" 4
-.IX Item "-Lsearchdir"
-.PD 0
-.IP "\fB\-\-library\-path=\fR\fIsearchdir\fR" 4
-.IX Item "--library-path=searchdir"
-.PD
-Add path \fIsearchdir\fR to the list of paths that \fBld\fR will search
-for archive libraries and \fBld\fR control scripts. You may use this
-option any number of times. The directories are searched in the order
-in which they are specified on the command line. Directories specified
-on the command line are searched before the default directories. All
-\&\fB\-L\fR options apply to all \fB\-l\fR options, regardless of the
-order in which the options appear.
-.Sp
-If \fIsearchdir\fR begins with \f(CW\*(C`=\*(C'\fR, then the \f(CW\*(C`=\*(C'\fR will be replaced
-by the \fIsysroot prefix\fR, a path specified when the linker is configured.
-.Sp
-The default set of paths searched (without being specified with
-\&\fB\-L\fR) depends on which emulation mode \fBld\fR is using, and in
-some cases also on how it was configured.
-.Sp
-The paths can also be specified in a link script with the
-\&\f(CW\*(C`SEARCH_DIR\*(C'\fR command. Directories specified this way are searched
-at the point in which the linker script appears in the command line.
-.IP "\fB\-m\fR\fIemulation\fR" 4
-.IX Item "-memulation"
-Emulate the \fIemulation\fR linker. You can list the available
-emulations with the \fB\-\-verbose\fR or \fB\-V\fR options.
-.Sp
-If the \fB\-m\fR option is not used, the emulation is taken from the
-\&\f(CW\*(C`LDEMULATION\*(C'\fR environment variable, if that is defined.
-.Sp
-Otherwise, the default emulation depends upon how the linker was
-configured.
-.IP "\fB\-M\fR" 4
-.IX Item "-M"
-.PD 0
-.IP "\fB\-\-print\-map\fR" 4
-.IX Item "--print-map"
-.PD
-Print a link map to the standard output. A link map provides
-information about the link, including the following:
-.RS 4
-.IP "*" 4
-Where object files and symbols are mapped into memory.
-.IP "*" 4
-How common symbols are allocated.
-.IP "*" 4
-All archive members included in the link, with a mention of the symbol
-which caused the archive member to be brought in.
-.RE
-.RS 4
-.RE
-.IP "\fB\-n\fR" 4
-.IX Item "-n"
-.PD 0
-.IP "\fB\-\-nmagic\fR" 4
-.IX Item "--nmagic"
-.PD
-Turn off page alignment of sections, and mark the output as
-\&\f(CW\*(C`NMAGIC\*(C'\fR if possible.
-.IP "\fB\-N\fR" 4
-.IX Item "-N"
-.PD 0
-.IP "\fB\-\-omagic\fR" 4
-.IX Item "--omagic"
-.PD
-Set the text and data sections to be readable and writable. Also, do
-not page-align the data segment, and disable linking against shared
-libraries. If the output format supports Unix style magic numbers,
-mark the output as \f(CW\*(C`OMAGIC\*(C'\fR. Note: Although a writable text section
-is allowed for PE-COFF targets, it does not conform to the format
-specification published by Microsoft.
-.IP "\fB\-\-no\-omagic\fR" 4
-.IX Item "--no-omagic"
-This option negates most of the effects of the \fB\-N\fR option. It
-sets the text section to be read\-only, and forces the data segment to
-be page\-aligned. Note \- this option does not enable linking against
-shared libraries. Use \fB\-Bdynamic\fR for this.
-.IP "\fB\-o\fR \fIoutput\fR" 4
-.IX Item "-o output"
-.PD 0
-.IP "\fB\-\-output=\fR\fIoutput\fR" 4
-.IX Item "--output=output"
-.PD
-Use \fIoutput\fR as the name for the program produced by \fBld\fR; if this
-option is not specified, the name \fIa.out\fR is used by default. The
-script command \f(CW\*(C`OUTPUT\*(C'\fR can also specify the output file name.
-.IP "\fB\-O\fR \fIlevel\fR" 4
-.IX Item "-O level"
-If \fIlevel\fR is a numeric values greater than zero \fBld\fR optimizes
-the output. This might take significantly longer and therefore probably
-should only be enabled for the final binary.
-.IP "\fB\-q\fR" 4
-.IX Item "-q"
-.PD 0
-.IP "\fB\-\-emit\-relocs\fR" 4
-.IX Item "--emit-relocs"
-.PD
-Leave relocation sections and contents in fully linked exececutables.
-Post link analysis and optimization tools may need this information in
-order to perform correct modifications of executables. This results
-in larger executables.
-.Sp
-This option is currently only supported on \s-1ELF\s0 platforms.
-.IP "\fB\-r\fR" 4
-.IX Item "-r"
-.PD 0
-.IP "\fB\-\-relocatable\fR" 4
-.IX Item "--relocatable"
-.PD
-Generate relocatable output\-\-\-i.e., generate an output file that can in
-turn serve as input to \fBld\fR. This is often called \fIpartial
-linking\fR. As a side effect, in environments that support standard Unix
-magic numbers, this option also sets the output file's magic number to
-\&\f(CW\*(C`OMAGIC\*(C'\fR.
-If this option is not specified, an absolute file is produced. When
-linking \*(C+ programs, this option \fIwill not\fR resolve references to
-constructors; to do that, use \fB\-Ur\fR.
-.Sp
-When an input file does not have the same format as the output file,
-partial linking is only supported if that input file does not contain any
-relocations. Different output formats can have further restrictions; for
-example some \f(CW\*(C`a.out\*(C'\fR\-based formats do not support partial linking
-with input files in other formats at all.
-.Sp
-This option does the same thing as \fB\-i\fR.
-.IP "\fB\-R\fR \fIfilename\fR" 4
-.IX Item "-R filename"
-.PD 0
-.IP "\fB\-\-just\-symbols=\fR\fIfilename\fR" 4
-.IX Item "--just-symbols=filename"
-.PD
-Read symbol names and their addresses from \fIfilename\fR, but do not
-relocate it or include it in the output. This allows your output file
-to refer symbolically to absolute locations of memory defined in other
-programs. You may use this option more than once.
-.Sp
-For compatibility with other \s-1ELF\s0 linkers, if the \fB\-R\fR option is
-followed by a directory name, rather than a file name, it is treated as
-the \fB\-rpath\fR option.
-.IP "\fB\-s\fR" 4
-.IX Item "-s"
-.PD 0
-.IP "\fB\-\-strip\-all\fR" 4
-.IX Item "--strip-all"
-.PD
-Omit all symbol information from the output file.
-.IP "\fB\-S\fR" 4
-.IX Item "-S"
-.PD 0
-.IP "\fB\-\-strip\-debug\fR" 4
-.IX Item "--strip-debug"
-.PD
-Omit debugger symbol information (but not all symbols) from the output file.
-.IP "\fB\-t\fR" 4
-.IX Item "-t"
-.PD 0
-.IP "\fB\-\-trace\fR" 4
-.IX Item "--trace"
-.PD
-Print the names of the input files as \fBld\fR processes them.
-.IP "\fB\-T\fR \fIscriptfile\fR" 4
-.IX Item "-T scriptfile"
-.PD 0
-.IP "\fB\-\-script=\fR\fIscriptfile\fR" 4
-.IX Item "--script=scriptfile"
-.PD
-Use \fIscriptfile\fR as the linker script. This script replaces
-\&\fBld\fR's default linker script (rather than adding to it), so
-\&\fIcommandfile\fR must specify everything necessary to describe the
-output file. If \fIscriptfile\fR does not exist in
-the current directory, \f(CW\*(C`ld\*(C'\fR looks for it in the directories
-specified by any preceding \fB\-L\fR options. Multiple \fB\-T\fR
-options accumulate.
-.IP "\fB\-u\fR \fIsymbol\fR" 4
-.IX Item "-u symbol"
-.PD 0
-.IP "\fB\-\-undefined=\fR\fIsymbol\fR" 4
-.IX Item "--undefined=symbol"
-.PD
-Force \fIsymbol\fR to be entered in the output file as an undefined
-symbol. Doing this may, for example, trigger linking of additional
-modules from standard libraries. \fB\-u\fR may be repeated with
-different option arguments to enter additional undefined symbols. This
-option is equivalent to the \f(CW\*(C`EXTERN\*(C'\fR linker script command.
-.IP "\fB\-Ur\fR" 4
-.IX Item "-Ur"
-For anything other than \*(C+ programs, this option is equivalent to
-\&\fB\-r\fR: it generates relocatable output\-\-\-i.e., an output file that can in
-turn serve as input to \fBld\fR. When linking \*(C+ programs, \fB\-Ur\fR
-\&\fIdoes\fR resolve references to constructors, unlike \fB\-r\fR.
-It does not work to use \fB\-Ur\fR on files that were themselves linked
-with \fB\-Ur\fR; once the constructor table has been built, it cannot
-be added to. Use \fB\-Ur\fR only for the last partial link, and
-\&\fB\-r\fR for the others.
-.IP "\fB\-\-unique[=\fR\fI\s-1SECTION\s0\fR\fB]\fR" 4
-.IX Item "--unique[=SECTION]"
-Creates a separate output section for every input section matching
-\&\fI\s-1SECTION\s0\fR, or if the optional wildcard \fI\s-1SECTION\s0\fR argument is
-missing, for every orphan input section. An orphan section is one not
-specifically mentioned in a linker script. You may use this option
-multiple times on the command line; It prevents the normal merging of
-input sections with the same name, overriding output section assignments
-in a linker script.
-.IP "\fB\-v\fR" 4
-.IX Item "-v"
-.PD 0
-.IP "\fB\-\-version\fR" 4
-.IX Item "--version"
-.IP "\fB\-V\fR" 4
-.IX Item "-V"
-.PD
-Display the version number for \fBld\fR. The \fB\-V\fR option also
-lists the supported emulations.
-.IP "\fB\-x\fR" 4
-.IX Item "-x"
-.PD 0
-.IP "\fB\-\-discard\-all\fR" 4
-.IX Item "--discard-all"
-.PD
-Delete all local symbols.
-.IP "\fB\-X\fR" 4
-.IX Item "-X"
-.PD 0
-.IP "\fB\-\-discard\-locals\fR" 4
-.IX Item "--discard-locals"
-.PD
-Delete all temporary local symbols. For most targets, this is all local
-symbols whose names begin with \fBL\fR.
-.IP "\fB\-y\fR \fIsymbol\fR" 4
-.IX Item "-y symbol"
-.PD 0
-.IP "\fB\-\-trace\-symbol=\fR\fIsymbol\fR" 4
-.IX Item "--trace-symbol=symbol"
-.PD
-Print the name of each linked file in which \fIsymbol\fR appears. This
-option may be given any number of times. On many systems it is necessary
-to prepend an underscore.
-.Sp
-This option is useful when you have an undefined symbol in your link but
-don't know where the reference is coming from.
-.IP "\fB\-Y\fR \fIpath\fR" 4
-.IX Item "-Y path"
-Add \fIpath\fR to the default library search path. This option exists
-for Solaris compatibility.
-.IP "\fB\-z\fR \fIkeyword\fR" 4
-.IX Item "-z keyword"
-The recognized keywords are:
-.RS 4
-.IP "\fBcombreloc\fR" 4
-.IX Item "combreloc"
-Combines multiple reloc sections and sorts them to make dynamic symbol
-lookup caching possible.
-.IP "\fBdefs\fR" 4
-.IX Item "defs"
-Disallows undefined symbols in object files. Undefined symbols in
-shared libraries are still allowed.
-.IP "\fBinitfirst\fR" 4
-.IX Item "initfirst"
-This option is only meaningful when building a shared object.
-It marks the object so that its runtime initialization will occur
-before the runtime initialization of any other objects brought into
-the process at the same time. Similarly the runtime finalization of
-the object will occur after the runtime finalization of any other
-objects.
-.IP "\fBinterpose\fR" 4
-.IX Item "interpose"
-Marks the object that its symbol table interposes before all symbols
-but the primary executable.
-.IP "\fBloadfltr\fR" 4
-.IX Item "loadfltr"
-Marks the object that its filters be processed immediately at
-runtime.
-.IP "\fBmuldefs\fR" 4
-.IX Item "muldefs"
-Allows multiple definitions.
-.IP "\fBnocombreloc\fR" 4
-.IX Item "nocombreloc"
-Disables multiple reloc sections combining.
-.IP "\fBnocopyreloc\fR" 4
-.IX Item "nocopyreloc"
-Disables production of copy relocs.
-.IP "\fBnodefaultlib\fR" 4
-.IX Item "nodefaultlib"
-Marks the object that the search for dependencies of this object will
-ignore any default library search paths.
-.IP "\fBnodelete\fR" 4
-.IX Item "nodelete"
-Marks the object shouldn't be unloaded at runtime.
-.IP "\fBnodlopen\fR" 4
-.IX Item "nodlopen"
-Marks the object not available to \f(CW\*(C`dlopen\*(C'\fR.
-.IP "\fBnodump\fR" 4
-.IX Item "nodump"
-Marks the object can not be dumped by \f(CW\*(C`dldump\*(C'\fR.
-.IP "\fBnow\fR" 4
-.IX Item "now"
-When generating an executable or shared library, mark it to tell the
-dynamic linker to resolve all symbols when the program is started, or
-when the shared library is linked to using dlopen, instead of
-deferring function call resolution to the point when the function is
-first called.
-.IP "\fBorigin\fR" 4
-.IX Item "origin"
-Marks the object may contain \f(CW$ORIGIN\fR.
-.RE
-.RS 4
-.Sp
-Other keywords are ignored for Solaris compatibility.
-.RE
-.IP "\fB\-(\fR \fIarchives\fR \fB\-)\fR" 4
-.IX Item "-( archives -)"
-.PD 0
-.IP "\fB\-\-start\-group\fR \fIarchives\fR \fB\-\-end\-group\fR" 4
-.IX Item "--start-group archives --end-group"
-.PD
-The \fIarchives\fR should be a list of archive files. They may be
-either explicit file names, or \fB\-l\fR options.
-.Sp
-The specified archives are searched repeatedly until no new undefined
-references are created. Normally, an archive is searched only once in
-the order that it is specified on the command line. If a symbol in that
-archive is needed to resolve an undefined symbol referred to by an
-object in an archive that appears later on the command line, the linker
-would not be able to resolve that reference. By grouping the archives,
-they all be searched repeatedly until all possible references are
-resolved.
-.Sp
-Using this option has a significant performance cost. It is best to use
-it only when there are unavoidable circular references between two or
-more archives.
-.IP "\fB\-\-accept\-unknown\-input\-arch\fR" 4
-.IX Item "--accept-unknown-input-arch"
-.PD 0
-.IP "\fB\-\-no\-accept\-unknown\-input\-arch\fR" 4
-.IX Item "--no-accept-unknown-input-arch"
-.PD
-Tells the linker to accept input files whose architecture cannot be
-recognised. The assumption is that the user knows what they are doing
-and deliberately wants to link in these unknown input files. This was
-the default behaviour of the linker, before release 2.14. The default
-behaviour from release 2.14 onwards is to reject such input files, and
-so the \fB\-\-accept\-unknown\-input\-arch\fR option has been added to
-restore the old behaviour.
-.IP "\fB\-\-as\-needed\fR" 4
-.IX Item "--as-needed"
-.PD 0
-.IP "\fB\-\-no\-as\-needed\fR" 4
-.IX Item "--no-as-needed"
-.PD
-This option affects \s-1ELF\s0 \s-1DT_NEEDED\s0 tags for dynamic libraries mentioned
-on the command line after the \fB\-\-as\-needed\fR option. Normally,
-the linker will add a \s-1DT_NEEDED\s0 tag for each dynamic library mentioned
-on the command line, regardless of whether the library is actually
-needed. \fB\-\-as\-needed\fR causes \s-1DT_NEEDED\s0 tags to only be emitted
-for libraries that satisfy some reference from regular objects.
-\&\fB\-\-no\-as\-needed\fR restores the default behaviour.
-.IP "\fB\-assert\fR \fIkeyword\fR" 4
-.IX Item "-assert keyword"
-This option is ignored for SunOS compatibility.
-.IP "\fB\-Bdynamic\fR" 4
-.IX Item "-Bdynamic"
-.PD 0
-.IP "\fB\-dy\fR" 4
-.IX Item "-dy"
-.IP "\fB\-call_shared\fR" 4
-.IX Item "-call_shared"
-.PD
-Link against dynamic libraries. This is only meaningful on platforms
-for which shared libraries are supported. This option is normally the
-default on such platforms. The different variants of this option are
-for compatibility with various systems. You may use this option
-multiple times on the command line: it affects library searching for
-\&\fB\-l\fR options which follow it.
-.IP "\fB\-Bgroup\fR" 4
-.IX Item "-Bgroup"
-Set the \f(CW\*(C`DF_1_GROUP\*(C'\fR flag in the \f(CW\*(C`DT_FLAGS_1\*(C'\fR entry in the dynamic
-section. This causes the runtime linker to handle lookups in this
-object and its dependencies to be performed only inside the group.
-\&\fB\-\-unresolved\-symbols=report\-all\fR is implied. This option is
-only meaningful on \s-1ELF\s0 platforms which support shared libraries.
-.IP "\fB\-Bstatic\fR" 4
-.IX Item "-Bstatic"
-.PD 0
-.IP "\fB\-dn\fR" 4
-.IX Item "-dn"
-.IP "\fB\-non_shared\fR" 4
-.IX Item "-non_shared"
-.IP "\fB\-static\fR" 4
-.IX Item "-static"
-.PD
-Do not link against shared libraries. This is only meaningful on
-platforms for which shared libraries are supported. The different
-variants of this option are for compatibility with various systems. You
-may use this option multiple times on the command line: it affects
-library searching for \fB\-l\fR options which follow it. This
-option also implies \fB\-\-unresolved\-symbols=report\-all\fR.
-.IP "\fB\-Bsymbolic\fR" 4
-.IX Item "-Bsymbolic"
-When creating a shared library, bind references to global symbols to the
-definition within the shared library, if any. Normally, it is possible
-for a program linked against a shared library to override the definition
-within the shared library. This option is only meaningful on \s-1ELF\s0
-platforms which support shared libraries.
-.IP "\fB\-\-check\-sections\fR" 4
-.IX Item "--check-sections"
-.PD 0
-.IP "\fB\-\-no\-check\-sections\fR" 4
-.IX Item "--no-check-sections"
-.PD
-Asks the linker \fInot\fR to check section addresses after they have
-been assigned to see if there any overlaps. Normally the linker will
-perform this check, and if it finds any overlaps it will produce
-suitable error messages. The linker does know about, and does make
-allowances for sections in overlays. The default behaviour can be
-restored by using the command line switch \fB\-\-check\-sections\fR.
-.IP "\fB\-\-cref\fR" 4
-.IX Item "--cref"
-Output a cross reference table. If a linker map file is being
-generated, the cross reference table is printed to the map file.
-Otherwise, it is printed on the standard output.
-.Sp
-The format of the table is intentionally simple, so that it may be
-easily processed by a script if necessary. The symbols are printed out,
-sorted by name. For each symbol, a list of file names is given. If the
-symbol is defined, the first file listed is the location of the
-definition. The remaining files contain references to the symbol.
-.IP "\fB\-\-no\-define\-common\fR" 4
-.IX Item "--no-define-common"
-This option inhibits the assignment of addresses to common symbols.
-The script command \f(CW\*(C`INHIBIT_COMMON_ALLOCATION\*(C'\fR has the same effect.
-.Sp
-The \fB\-\-no\-define\-common\fR option allows decoupling
-the decision to assign addresses to Common symbols from the choice
-of the output file type; otherwise a non-Relocatable output type
-forces assigning addresses to Common symbols.
-Using \fB\-\-no\-define\-common\fR allows Common symbols that are referenced
-from a shared library to be assigned addresses only in the main program.
-This eliminates the unused duplicate space in the shared library,
-and also prevents any possible confusion over resolving to the wrong
-duplicate when there are many dynamic modules with specialized search
-paths for runtime symbol resolution.
-.IP "\fB\-\-defsym\fR \fIsymbol\fR\fB=\fR\fIexpression\fR" 4
-.IX Item "--defsym symbol=expression"
-Create a global symbol in the output file, containing the absolute
-address given by \fIexpression\fR. You may use this option as many
-times as necessary to define multiple symbols in the command line. A
-limited form of arithmetic is supported for the \fIexpression\fR in this
-context: you may give a hexadecimal constant or the name of an existing
-symbol, or use \f(CW\*(C`+\*(C'\fR and \f(CW\*(C`\-\*(C'\fR to add or subtract hexadecimal
-constants or symbols. If you need more elaborate expressions, consider
-using the linker command language from a script. \fINote:\fR there should be no white
-space between \fIsymbol\fR, the equals sign (``\fB=\fR''), and
-\&\fIexpression\fR.
-.IP "\fB\-\-demangle[=\fR\fIstyle\fR\fB]\fR" 4
-.IX Item "--demangle[=style]"
-.PD 0
-.IP "\fB\-\-no\-demangle\fR" 4
-.IX Item "--no-demangle"
-.PD
-These options control whether to demangle symbol names in error messages
-and other output. When the linker is told to demangle, it tries to
-present symbol names in a readable fashion: it strips leading
-underscores if they are used by the object file format, and converts \*(C+
-mangled symbol names into user readable names. Different compilers have
-different mangling styles. The optional demangling style argument can be used
-to choose an appropriate demangling style for your compiler. The linker will
-demangle by default unless the environment variable \fB\s-1COLLECT_NO_DEMANGLE\s0\fR
-is set. These options may be used to override the default.
-.IP "\fB\-\-dynamic\-linker\fR \fIfile\fR" 4
-.IX Item "--dynamic-linker file"
-Set the name of the dynamic linker. This is only meaningful when
-generating dynamically linked \s-1ELF\s0 executables. The default dynamic
-linker is normally correct; don't use this unless you know what you are
-doing.
-.IP "\fB\-\-embedded\-relocs\fR" 4
-.IX Item "--embedded-relocs"
-This option is only meaningful when linking \s-1MIPS\s0 embedded \s-1PIC\s0 code,
-generated by the \-membedded\-pic option to the \s-1GNU\s0 compiler and
-assembler. It causes the linker to create a table which may be used at
-runtime to relocate any data which was statically initialized to pointer
-values. See the code in testsuite/ld\-empic for details.
-.IP "\fB\-\-fatal\-warnings\fR" 4
-.IX Item "--fatal-warnings"
-Treat all warnings as errors.
-.IP "\fB\-\-force\-exe\-suffix\fR" 4
-.IX Item "--force-exe-suffix"
-Make sure that an output file has a .exe suffix.
-.Sp
-If a successfully built fully linked output file does not have a
-\&\f(CW\*(C`.exe\*(C'\fR or \f(CW\*(C`.dll\*(C'\fR suffix, this option forces the linker to copy
-the output file to one of the same name with a \f(CW\*(C`.exe\*(C'\fR suffix. This
-option is useful when using unmodified Unix makefiles on a Microsoft
-Windows host, since some versions of Windows won't run an image unless
-it ends in a \f(CW\*(C`.exe\*(C'\fR suffix.
-.IP "\fB\-\-no\-gc\-sections\fR" 4
-.IX Item "--no-gc-sections"
-.PD 0
-.IP "\fB\-\-gc\-sections\fR" 4
-.IX Item "--gc-sections"
-.PD
-Enable garbage collection of unused input sections. It is ignored on
-targets that do not support this option. This option is not compatible
-with \fB\-r\fR, nor should it be used with dynamic linking. The default
-behaviour (of not performing this garbage collection) can be restored by
-specifying \fB\-\-no\-gc\-sections\fR on the command line.
-.IP "\fB\-\-help\fR" 4
-.IX Item "--help"
-Print a summary of the command-line options on the standard output and exit.
-.IP "\fB\-\-target\-help\fR" 4
-.IX Item "--target-help"
-Print a summary of all target specific options on the standard output and exit.
-.IP "\fB\-Map\fR \fImapfile\fR" 4
-.IX Item "-Map mapfile"
-Print a link map to the file \fImapfile\fR. See the description of the
-\&\fB\-M\fR option, above.
-.IP "\fB\-\-no\-keep\-memory\fR" 4
-.IX Item "--no-keep-memory"
-\&\fBld\fR normally optimizes for speed over memory usage by caching the
-symbol tables of input files in memory. This option tells \fBld\fR to
-instead optimize for memory usage, by rereading the symbol tables as
-necessary. This may be required if \fBld\fR runs out of memory space
-while linking a large executable.
-.IP "\fB\-\-no\-undefined\fR" 4
-.IX Item "--no-undefined"
-.PD 0
-.IP "\fB\-z defs\fR" 4
-.IX Item "-z defs"
-.PD
-Report unresolved symbol references from regular object files. This
-is done even if the linker is creating a non-symbolic shared library.
-The switch \fB\-\-[no\-]allow\-shlib\-undefined\fR controls the
-behaviour for reporting unresolved references found in shared
-libraries being linked in.
-.IP "\fB\-\-allow\-multiple\-definition\fR" 4
-.IX Item "--allow-multiple-definition"
-.PD 0
-.IP "\fB\-z muldefs\fR" 4
-.IX Item "-z muldefs"
-.PD
-Normally when a symbol is defined multiple times, the linker will
-report a fatal error. These options allow multiple definitions and the
-first definition will be used.
-.IP "\fB\-\-allow\-shlib\-undefined\fR" 4
-.IX Item "--allow-shlib-undefined"
-.PD 0
-.IP "\fB\-\-no\-allow\-shlib\-undefined\fR" 4
-.IX Item "--no-allow-shlib-undefined"
-.PD
-Allows (the default) or disallows undefined symbols in shared libraries.
-This switch is similar to \fB\-\-no\-undefined\fR except that it
-determines the behaviour when the undefined symbols are in a
-shared library rather than a regular object file. It does not affect
-how undefined symbols in regular object files are handled.
-.Sp
-The reason that \fB\-\-allow\-shlib\-undefined\fR is the default is that
-the shared library being specified at link time may not be the same as
-the one that is available at load time, so the symbols might actually be
-resolvable at load time. Plus there are some systems, (eg BeOS) where
-undefined symbols in shared libraries is normal. (The kernel patches
-them at load time to select which function is most appropriate
-for the current architecture. This is used for example to dynamically
-select an appropriate memset function). Apparently it is also normal
-for \s-1HPPA\s0 shared libraries to have undefined symbols.
-.IP "\fB\-\-no\-undefined\-version\fR" 4
-.IX Item "--no-undefined-version"
-Normally when a symbol has an undefined version, the linker will ignore
-it. This option disallows symbols with undefined version and a fatal error
-will be issued instead.
-.IP "\fB\-\-no\-warn\-mismatch\fR" 4
-.IX Item "--no-warn-mismatch"
-Normally \fBld\fR 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 \fBld\fR 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.
-.IP "\fB\-\-no\-whole\-archive\fR" 4
-.IX Item "--no-whole-archive"
-Turn off the effect of the \fB\-\-whole\-archive\fR option for subsequent
-archive files.
-.IP "\fB\-\-noinhibit\-exec\fR" 4
-.IX Item "--noinhibit-exec"
-Retain the executable output file whenever it is still usable.
-Normally, the linker will not produce an output file if it encounters
-errors during the link process; it exits without writing an output file
-when it issues any error whatsoever.
-.IP "\fB\-nostdlib\fR" 4
-.IX Item "-nostdlib"
-Only search library directories explicitly specified on the
-command line. Library directories specified in linker scripts
-(including linker scripts specified on the command line) are ignored.
-.IP "\fB\-\-oformat\fR \fIoutput-format\fR" 4
-.IX Item "--oformat output-format"
-\&\fBld\fR may be configured to support more than one kind of object
-file. If your \fBld\fR is configured this way, you can use the
-\&\fB\-\-oformat\fR option to specify the binary format for the output
-object file. Even when \fBld\fR is configured to support alternative
-object formats, you don't usually need to specify this, as \fBld\fR
-should be configured to produce as a default output format the most
-usual format on each machine. \fIoutput-format\fR is a text string, the
-name of a particular format supported by the \s-1BFD\s0 libraries. (You can
-list the available binary formats with \fBobjdump \-i\fR.) The script
-command \f(CW\*(C`OUTPUT_FORMAT\*(C'\fR can also specify the output format, but
-this option overrides it.
-.IP "\fB\-pie\fR" 4
-.IX Item "-pie"
-.PD 0
-.IP "\fB\-\-pic\-executable\fR" 4
-.IX Item "--pic-executable"
-.PD
-Create a position independent executable. This is currently only supported on
-\&\s-1ELF\s0 platforms. Position independent executables are similar to shared
-libraries in that they are relocated by the dynamic linker to the virtual
-address the \s-1OS\s0 chooses for them (which can vary between invocations). Like
-normal dynamically linked executables they can be executed and symbols
-defined in the executable cannot be overridden by shared libraries.
-.IP "\fB\-qmagic\fR" 4
-.IX Item "-qmagic"
-This option is ignored for Linux compatibility.
-.IP "\fB\-Qy\fR" 4
-.IX Item "-Qy"
-This option is ignored for \s-1SVR4\s0 compatibility.
-.IP "\fB\-\-relax\fR" 4
-.IX Item "--relax"
-An option with machine dependent effects.
-This option is only supported on a few targets.
-.Sp
-On some platforms, the \fB\-\-relax\fR option performs global
-optimizations that become possible when the linker resolves addressing
-in the program, such as relaxing address modes and synthesizing new
-instructions in the output object file.
-.Sp
-On some platforms these link time global optimizations may make symbolic
-debugging of the resulting executable impossible.
-This is known to be
-the case for the Matsushita \s-1MN10200\s0 and \s-1MN10300\s0 family of processors.
-.Sp
-On platforms where this is not supported, \fB\-\-relax\fR is accepted,
-but ignored.
-.IP "\fB\-\-retain\-symbols\-file\fR \fIfilename\fR" 4
-.IX Item "--retain-symbols-file filename"
-Retain \fIonly\fR the symbols listed in the file \fIfilename\fR,
-discarding all others. \fIfilename\fR is simply a flat file, with one
-symbol name per line. This option is especially useful in environments
-(such as VxWorks)
-where a large global symbol table is accumulated gradually, to conserve
-run-time memory.
-.Sp
-\&\fB\-\-retain\-symbols\-file\fR does \fInot\fR discard undefined symbols,
-or symbols needed for relocations.
-.Sp
-You may only specify \fB\-\-retain\-symbols\-file\fR once in the command
-line. It overrides \fB\-s\fR and \fB\-S\fR.
-.IP "\fB\-rpath\fR \fIdir\fR" 4
-.IX Item "-rpath dir"
-Add a directory to the runtime library search path. This is used when
-linking an \s-1ELF\s0 executable with shared objects. All \fB\-rpath\fR
-arguments are concatenated and passed to the runtime linker, which uses
-them to locate shared objects at runtime. The \fB\-rpath\fR option is
-also used when locating shared objects which are needed by shared
-objects explicitly included in the link; see the description of the
-\&\fB\-rpath\-link\fR option. If \fB\-rpath\fR is not used when linking an
-\&\s-1ELF\s0 executable, the contents of the environment variable
-\&\f(CW\*(C`LD_RUN_PATH\*(C'\fR will be used if it is defined.
-.Sp
-The \fB\-rpath\fR option may also be used on SunOS. By default, on
-SunOS, the linker will form a runtime search patch out of all the
-\&\fB\-L\fR options it is given. If a \fB\-rpath\fR option is used, the
-runtime search path will be formed exclusively using the \fB\-rpath\fR
-options, ignoring the \fB\-L\fR options. This can be useful when using
-gcc, which adds many \fB\-L\fR options which may be on \s-1NFS\s0 mounted
-filesystems.
-.Sp
-For compatibility with other \s-1ELF\s0 linkers, if the \fB\-R\fR option is
-followed by a directory name, rather than a file name, it is treated as
-the \fB\-rpath\fR option.
-.IP "\fB\-rpath\-link\fR \fI\s-1DIR\s0\fR" 4
-.IX Item "-rpath-link DIR"
-When using \s-1ELF\s0 or SunOS, one shared library may require another. This
-happens when an \f(CW\*(C`ld \-shared\*(C'\fR link includes a shared library as one
-of the input files.
-.Sp
-When the linker encounters such a dependency when doing a non\-shared,
-non-relocatable link, it will automatically try to locate the required
-shared library and include it in the link, if it is not included
-explicitly. In such a case, the \fB\-rpath\-link\fR option
-specifies the first set of directories to search. The
-\&\fB\-rpath\-link\fR option may specify a sequence of directory names
-either by specifying a list of names separated by colons, or by
-appearing multiple times.
-.Sp
-This option should be used with caution as it overrides the search path
-that may have been hard compiled into a shared library. In such a case it
-is possible to use unintentionally a different search path than the
-runtime linker would do.
-.Sp
-The linker uses the following search paths to locate required shared
-libraries.
-.RS 4
-.IP "1." 4
-Any directories specified by \fB\-rpath\-link\fR options.
-.IP "2." 4
-Any directories specified by \fB\-rpath\fR options. The difference
-between \fB\-rpath\fR and \fB\-rpath\-link\fR is that directories
-specified by \fB\-rpath\fR options are included in the executable and
-used at runtime, whereas the \fB\-rpath\-link\fR option is only effective
-at link time. It is for the native linker only.
-.IP "3." 4
-On an \s-1ELF\s0 system, if the \fB\-rpath\fR and \f(CW\*(C`rpath\-link\*(C'\fR options
-were not used, search the contents of the environment variable
-\&\f(CW\*(C`LD_RUN_PATH\*(C'\fR. It is for the native linker only.
-.IP "4." 4
-On SunOS, if the \fB\-rpath\fR option was not used, search any
-directories specified using \fB\-L\fR options.
-.IP "5." 4
-For a native linker, the contents of the environment variable
-\&\f(CW\*(C`LD_LIBRARY_PATH\*(C'\fR.
-.IP "6." 4
-For a native \s-1ELF\s0 linker, the directories in \f(CW\*(C`DT_RUNPATH\*(C'\fR or
-\&\f(CW\*(C`DT_RPATH\*(C'\fR of a shared library are searched for shared
-libraries needed by it. The \f(CW\*(C`DT_RPATH\*(C'\fR entries are ignored if
-\&\f(CW\*(C`DT_RUNPATH\*(C'\fR entries exist.
-.IP "7." 4
-The default directories, normally \fI/lib\fR and \fI/usr/lib\fR.
-.IP "8." 4
-For a native linker on an \s-1ELF\s0 system, if the file \fI/etc/ld.so.conf\fR
-exists, the list of directories found in that file.
-.RE
-.RS 4
-.Sp
-If the required shared library is not found, the linker will issue a
-warning and continue with the link.
-.RE
-.IP "\fB\-shared\fR" 4
-.IX Item "-shared"
-.PD 0
-.IP "\fB\-Bshareable\fR" 4
-.IX Item "-Bshareable"
-.PD
-Create a shared library. This is currently only supported on \s-1ELF\s0, \s-1XCOFF\s0
-and SunOS platforms. On SunOS, the linker will automatically create a
-shared library if the \fB\-e\fR option is not used and there are
-undefined symbols in the link.
-.IP "\fB\-\-sort\-common\fR" 4
-.IX Item "--sort-common"
-This option tells \fBld\fR to sort the common symbols by size when it
-places them in the appropriate output sections. First come all the one
-byte symbols, then all the two byte, then all the four byte, and then
-everything else. This is to prevent gaps between symbols due to
-alignment constraints.
-.IP "\fB\-\-split\-by\-file [\fR\fIsize\fR\fB]\fR" 4
-.IX Item "--split-by-file [size]"
-Similar to \fB\-\-split\-by\-reloc\fR but creates a new output section for
-each input file when \fIsize\fR is reached. \fIsize\fR defaults to a
-size of 1 if not given.
-.IP "\fB\-\-split\-by\-reloc [\fR\fIcount\fR\fB]\fR" 4
-.IX Item "--split-by-reloc [count]"
-Tries to creates extra sections in the output file so that no single
-output section in the file contains more than \fIcount\fR relocations.
-This is useful when generating huge relocatable files for downloading into
-certain real time kernels with the \s-1COFF\s0 object file format; since \s-1COFF\s0
-cannot represent more than 65535 relocations in a single section. Note
-that this will fail to work with object file formats which do not
-support arbitrary sections. The linker will not split up individual
-input sections for redistribution, so if a single input section contains
-more than \fIcount\fR relocations one output section will contain that
-many relocations. \fIcount\fR defaults to a value of 32768.
-.IP "\fB\-\-stats\fR" 4
-.IX Item "--stats"
-Compute and display statistics about the operation of the linker, such
-as execution time and memory usage.
-.IP "\fB\-\-traditional\-format\fR" 4
-.IX Item "--traditional-format"
-For some targets, the output of \fBld\fR is different in some ways from
-the output of some existing linker. This switch requests \fBld\fR to
-use the traditional format instead.
-.Sp
-For example, on SunOS, \fBld\fR combines duplicate entries in the
-symbol string table. This can reduce the size of an output file with
-full debugging information by over 30 percent. Unfortunately, the SunOS
-\&\f(CW\*(C`dbx\*(C'\fR program can not read the resulting program (\f(CW\*(C`gdb\*(C'\fR has no
-trouble). The \fB\-\-traditional\-format\fR switch tells \fBld\fR to not
-combine duplicate entries.
-.IP "\fB\-\-section\-start\fR \fIsectionname\fR\fB=\fR\fIorg\fR" 4
-.IX Item "--section-start sectionname=org"
-Locate a section in the output file at the absolute
-address given by \fIorg\fR. You may use this option as many
-times as necessary to locate multiple sections in the command
-line.
-\&\fIorg\fR must be a single hexadecimal integer;
-for compatibility with other linkers, you may omit the leading
-\&\fB0x\fR usually associated with hexadecimal values. \fINote:\fR there
-should be no white space between \fIsectionname\fR, the equals
-sign (``\fB=\fR''), and \fIorg\fR.
-.IP "\fB\-Tbss\fR \fIorg\fR" 4
-.IX Item "-Tbss org"
-.PD 0
-.IP "\fB\-Tdata\fR \fIorg\fR" 4
-.IX Item "-Tdata org"
-.IP "\fB\-Ttext\fR \fIorg\fR" 4
-.IX Item "-Ttext org"
-.PD
-Same as \-\-section\-start, with \f(CW\*(C`.bss\*(C'\fR, \f(CW\*(C`.data\*(C'\fR or
-\&\f(CW\*(C`.text\*(C'\fR as the \fIsectionname\fR.
-.IP "\fB\-\-unresolved\-symbols=\fR\fImethod\fR" 4
-.IX Item "--unresolved-symbols=method"
-Determine how to handle unresolved symbols. There are four possible
-values for \fBmethod\fR:
-.RS 4
-.IP "\fBignore-all\fR" 4
-.IX Item "ignore-all"
-Do not report any unresolved symbols.
-.IP "\fBreport-all\fR" 4
-.IX Item "report-all"
-Report all unresolved symbols. This is the default.
-.IP "\fBignore-in-object-files\fR" 4
-.IX Item "ignore-in-object-files"
-Report unresolved symbols that are contained in shared libraries, but
-ignore them if they come from regular object files.
-.IP "\fBignore-in-shared-libs\fR" 4
-.IX Item "ignore-in-shared-libs"
-Report unresolved symbols that come from regular object files, but
-ignore them if they come from shared libraries. This can be useful
-when creating a dynamic binary and it is known that all the shared
-libraries that it should be referencing are included on the linker's
-command line.
-.RE
-.RS 4
-.Sp
-The behaviour for shared libraries on their own can also be controlled
-by the \fB\-\-[no\-]allow\-shlib\-undefined\fR option.
-.Sp
-Normally the linker will generate an error message for each reported
-unresolved symbol but the option \fB\-\-warn\-unresolved\-symbols\fR
-can change this to a warning.
-.RE
-.IP "\fB\-\-dll\-verbose\fR" 4
-.IX Item "--dll-verbose"
-.PD 0
-.IP "\fB\-\-verbose\fR" 4
-.IX Item "--verbose"
-.PD
-Display the version number for \fBld\fR and list the linker emulations
-supported. Display which input files can and cannot be opened. Display
-the linker script being used by the linker.
-.IP "\fB\-\-version\-script=\fR\fIversion-scriptfile\fR" 4
-.IX Item "--version-script=version-scriptfile"
-Specify the name of a version script to the linker. This is typically
-used when creating shared libraries to specify additional information
-about the version hierarchy for the library being created. This option
-is only meaningful on \s-1ELF\s0 platforms which support shared libraries.
-.IP "\fB\-\-warn\-common\fR" 4
-.IX Item "--warn-common"
-Warn when a common symbol is combined with another common symbol or with
-a symbol definition. Unix linkers allow this somewhat sloppy practise,
-but linkers on some other operating systems do not. This option allows
-you to find potential problems from combining global symbols.
-Unfortunately, some C libraries use this practise, so you may get some
-warnings about symbols in the libraries as well as in your programs.
-.Sp
-There are three kinds of global symbols, illustrated here by C examples:
-.RS 4
-.IP "\fBint i = 1;\fR" 4
-.IX Item "int i = 1;"
-A definition, which goes in the initialized data section of the output
-file.
-.IP "\fBextern int i;\fR" 4
-.IX Item "extern int i;"
-An undefined reference, which does not allocate space.
-There must be either a definition or a common symbol for the
-variable somewhere.
-.IP "\fBint i;\fR" 4
-.IX Item "int i;"
-A common symbol. If there are only (one or more) common symbols for a
-variable, it goes in the uninitialized data area of the output file.
-The linker merges multiple common symbols for the same variable into a
-single symbol. If they are of different sizes, it picks the largest
-size. The linker turns a common symbol into a declaration, if there is
-a definition of the same variable.
-.RE
-.RS 4
-.Sp
-The \fB\-\-warn\-common\fR option can produce five kinds of warnings.
-Each warning consists of a pair of lines: the first describes the symbol
-just encountered, and the second describes the previous symbol
-encountered with the same name. One or both of the two symbols will be
-a common symbol.
-.IP "1." 4
-Turning a common symbol into a reference, because there is already a
-definition for the symbol.
-.Sp
-.Vb 3
-\& <file>(<section>): warning: common of `<symbol>'
-\& overridden by definition
-\& <file>(<section>): warning: defined here
-.Ve
-.IP "2." 4
-Turning a common symbol into a reference, because a later definition for
-the symbol is encountered. This is the same as the previous case,
-except that the symbols are encountered in a different order.
-.Sp
-.Vb 3
-\& <file>(<section>): warning: definition of `<symbol>'
-\& overriding common
-\& <file>(<section>): warning: common is here
-.Ve
-.IP "3." 4
-Merging a common symbol with a previous same-sized common symbol.
-.Sp
-.Vb 3
-\& <file>(<section>): warning: multiple common
-\& of `<symbol>'
-\& <file>(<section>): warning: previous common is here
-.Ve
-.IP "4." 4
-Merging a common symbol with a previous larger common symbol.
-.Sp
-.Vb 3
-\& <file>(<section>): warning: common of `<symbol>'
-\& overridden by larger common
-\& <file>(<section>): warning: larger common is here
-.Ve
-.IP "5." 4
-Merging a common symbol with a previous smaller common symbol. This is
-the same as the previous case, except that the symbols are
-encountered in a different order.
-.Sp
-.Vb 3
-\& <file>(<section>): warning: common of `<symbol>'
-\& overriding smaller common
-\& <file>(<section>): warning: smaller common is here
-.Ve
-.RE
-.RS 4
-.RE
-.IP "\fB\-\-warn\-constructors\fR" 4
-.IX Item "--warn-constructors"
-Warn if any global constructors are used. This is only useful for a few
-object file formats. For formats like \s-1COFF\s0 or \s-1ELF\s0, the linker can not
-detect the use of global constructors.
-.IP "\fB\-\-warn\-multiple\-gp\fR" 4
-.IX Item "--warn-multiple-gp"
-Warn if multiple global pointer values are required in the output file.
-This is only meaningful for certain processors, such as the Alpha.
-Specifically, some processors put large-valued constants in a special
-section. A special register (the global pointer) points into the middle
-of this section, so that constants can be loaded efficiently via a
-base-register relative addressing mode. Since the offset in
-base-register relative mode is fixed and relatively small (e.g., 16
-bits), this limits the maximum size of the constant pool. Thus, in
-large programs, it is often necessary to use multiple global pointer
-values in order to be able to address all possible constants. This
-option causes a warning to be issued whenever this case occurs.
-.IP "\fB\-\-warn\-once\fR" 4
-.IX Item "--warn-once"
-Only warn once for each undefined symbol, rather than once per module
-which refers to it.
-.IP "\fB\-\-warn\-section\-align\fR" 4
-.IX Item "--warn-section-align"
-Warn if the address of an output section is changed because of
-alignment. Typically, the alignment will be set by an input section.
-The address will only be changed if it not explicitly specified; that
-is, if the \f(CW\*(C`SECTIONS\*(C'\fR command does not specify a start address for
-the section.
-.IP "\fB\-\-warn\-unresolved\-symbols\fR" 4
-.IX Item "--warn-unresolved-symbols"
-If the linker is going to report an unresolved symbol (see the option
-\&\fB\-\-unresolved\-symbols\fR) it will normally generate an error.
-This option makes it generate a warning instead.
-.IP "\fB\-\-error\-unresolved\-symbols\fR" 4
-.IX Item "--error-unresolved-symbols"
-This restores the linker's default behaviour of generating errors when
-it is reporting unresolved symbols.
-.IP "\fB\-\-whole\-archive\fR" 4
-.IX Item "--whole-archive"
-For each archive mentioned on the command line after the
-\&\fB\-\-whole\-archive\fR option, include every object file in the archive
-in the link, rather than searching the archive for the required object
-files. This is normally used to turn an archive file into a shared
-library, forcing every object to be included in the resulting shared
-library. This option may be used more than once.
-.Sp
-Two notes when using this option from gcc: First, gcc doesn't know
-about this option, so you have to use \fB\-Wl,\-whole\-archive\fR.
-Second, don't forget to use \fB\-Wl,\-no\-whole\-archive\fR after your
-list of archives, because gcc will add its own list of archives to
-your link and you may not want this flag to affect those as well.
-.IP "\fB\-\-wrap\fR \fIsymbol\fR" 4
-.IX Item "--wrap symbol"
-Use a wrapper function for \fIsymbol\fR. Any undefined reference to
-\&\fIsymbol\fR will be resolved to \f(CW\*(C`_\|_wrap_\f(CIsymbol\f(CW\*(C'\fR. Any
-undefined reference to \f(CW\*(C`_\|_real_\f(CIsymbol\f(CW\*(C'\fR will be resolved to
-\&\fIsymbol\fR.
-.Sp
-This can be used to provide a wrapper for a system function. The
-wrapper function should be called \f(CW\*(C`_\|_wrap_\f(CIsymbol\f(CW\*(C'\fR. If it
-wishes to call the system function, it should call
-\&\f(CW\*(C`_\|_real_\f(CIsymbol\f(CW\*(C'\fR.
-.Sp
-Here is a trivial example:
-.Sp
-.Vb 6
-\& void *
-\& __wrap_malloc (size_t c)
-\& {
-\& printf ("malloc called with %zu\en", c);
-\& return __real_malloc (c);
-\& }
-.Ve
-.Sp
-If you link other code with this file using \fB\-\-wrap malloc\fR, then
-all calls to \f(CW\*(C`malloc\*(C'\fR will call the function \f(CW\*(C`_\|_wrap_malloc\*(C'\fR
-instead. The call to \f(CW\*(C`_\|_real_malloc\*(C'\fR in \f(CW\*(C`_\|_wrap_malloc\*(C'\fR will
-call the real \f(CW\*(C`malloc\*(C'\fR function.
-.Sp
-You may wish to provide a \f(CW\*(C`_\|_real_malloc\*(C'\fR function as well, so that
-links without the \fB\-\-wrap\fR option will succeed. If you do this,
-you should not put the definition of \f(CW\*(C`_\|_real_malloc\*(C'\fR in the same
-file as \f(CW\*(C`_\|_wrap_malloc\*(C'\fR; if you do, the assembler may resolve the
-call before the linker has a chance to wrap it to \f(CW\*(C`malloc\*(C'\fR.
-.IP "\fB\-\-enable\-new\-dtags\fR" 4
-.IX Item "--enable-new-dtags"
-.PD 0
-.IP "\fB\-\-disable\-new\-dtags\fR" 4
-.IX Item "--disable-new-dtags"
-.PD
-This linker can create the new dynamic tags in \s-1ELF\s0. But the older \s-1ELF\s0
-systems may not understand them. If you specify
-\&\fB\-\-enable\-new\-dtags\fR, the dynamic tags will be created as needed.
-If you specify \fB\-\-disable\-new\-dtags\fR, no new dynamic tags will be
-created. By default, the new dynamic tags are not created. Note that
-those options are only available for \s-1ELF\s0 systems.
-.PP
-The i386 \s-1PE\s0 linker supports the \fB\-shared\fR option, which causes
-the output to be a dynamically linked library (\s-1DLL\s0) instead of a
-normal executable. You should name the output \f(CW\*(C`*.dll\*(C'\fR when you
-use this option. In addition, the linker fully supports the standard
-\&\f(CW\*(C`*.def\*(C'\fR files, which may be specified on the linker command line
-like an object file (in fact, it should precede archives it exports
-symbols from, to ensure that they get linked in, just like a normal
-object file).
-.PP
-In addition to the options common to all targets, the i386 \s-1PE\s0 linker
-support additional command line options that are specific to the i386
-\&\s-1PE\s0 target. Options that take values may be separated from their
-values by either a space or an equals sign.
-.IP "\fB\-\-add\-stdcall\-alias\fR" 4
-.IX Item "--add-stdcall-alias"
-If given, symbols with a stdcall suffix (@\fInn\fR) will be exported
-as-is and also with the suffix stripped.
-[This option is specific to the i386 \s-1PE\s0 targeted port of the linker]
-.IP "\fB\-\-base\-file\fR \fIfile\fR" 4
-.IX Item "--base-file file"
-Use \fIfile\fR as the name of a file in which to save the base
-addresses of all the relocations needed for generating DLLs with
-\&\fIdlltool\fR.
-[This is an i386 \s-1PE\s0 specific option]
-.IP "\fB\-\-dll\fR" 4
-.IX Item "--dll"
-Create a \s-1DLL\s0 instead of a regular executable. You may also use
-\&\fB\-shared\fR or specify a \f(CW\*(C`LIBRARY\*(C'\fR in a given \f(CW\*(C`.def\*(C'\fR
-file.
-[This option is specific to the i386 \s-1PE\s0 targeted port of the linker]
-.IP "\fB\-\-enable\-stdcall\-fixup\fR" 4
-.IX Item "--enable-stdcall-fixup"
-.PD 0
-.IP "\fB\-\-disable\-stdcall\-fixup\fR" 4
-.IX Item "--disable-stdcall-fixup"
-.PD
-If the link finds a symbol that it cannot resolve, it will attempt to
-do ``fuzzy linking'' by looking for another defined symbol that differs
-only in the format of the symbol name (cdecl vs stdcall) and will
-resolve that symbol by linking to the match. For example, the
-undefined symbol \f(CW\*(C`_foo\*(C'\fR might be linked to the function
-\&\f(CW\*(C`_foo@12\*(C'\fR, or the undefined symbol \f(CW\*(C`_bar@16\*(C'\fR might be linked
-to the function \f(CW\*(C`_bar\*(C'\fR. When the linker does this, it prints a
-warning, since it normally should have failed to link, but sometimes
-import libraries generated from third-party dlls may need this feature
-to be usable. If you specify \fB\-\-enable\-stdcall\-fixup\fR, this
-feature is fully enabled and warnings are not printed. If you specify
-\&\fB\-\-disable\-stdcall\-fixup\fR, this feature is disabled and such
-mismatches are considered to be errors.
-[This option is specific to the i386 \s-1PE\s0 targeted port of the linker]
-.IP "\fB\-\-export\-all\-symbols\fR" 4
-.IX Item "--export-all-symbols"
-If given, all global symbols in the objects used to build a \s-1DLL\s0 will
-be exported by the \s-1DLL\s0. Note that this is the default if there
-otherwise wouldn't be any exported symbols. When symbols are
-explicitly exported via \s-1DEF\s0 files or implicitly exported via function
-attributes, the default is to not export anything else unless this
-option is given. Note that the symbols \f(CW\*(C`DllMain@12\*(C'\fR,
-\&\f(CW\*(C`DllEntryPoint@0\*(C'\fR, \f(CW\*(C`DllMainCRTStartup@12\*(C'\fR, and
-\&\f(CW\*(C`impure_ptr\*(C'\fR will not be automatically
-exported. Also, symbols imported from other DLLs will not be
-re\-exported, nor will symbols specifying the \s-1DLL\s0's internal layout
-such as those beginning with \f(CW\*(C`_head_\*(C'\fR or ending with
-\&\f(CW\*(C`_iname\*(C'\fR. In addition, no symbols from \f(CW\*(C`libgcc\*(C'\fR,
-\&\f(CW\*(C`libstd++\*(C'\fR, \f(CW\*(C`libmingw32\*(C'\fR, or \f(CW\*(C`crtX.o\*(C'\fR will be exported.
-Symbols whose names begin with \f(CW\*(C`_\|_rtti_\*(C'\fR or \f(CW\*(C`_\|_builtin_\*(C'\fR will
-not be exported, to help with \*(C+ DLLs. Finally, there is an
-extensive list of cygwin-private symbols that are not exported
-(obviously, this applies on when building DLLs for cygwin targets).
-These cygwin-excludes are: \f(CW\*(C`_cygwin_dll_entry@12\*(C'\fR,
-\&\f(CW\*(C`_cygwin_crt0_common@8\*(C'\fR, \f(CW\*(C`_cygwin_noncygwin_dll_entry@12\*(C'\fR,
-\&\f(CW\*(C`_fmode\*(C'\fR, \f(CW\*(C`_impure_ptr\*(C'\fR, \f(CW\*(C`cygwin_attach_dll\*(C'\fR,
-\&\f(CW\*(C`cygwin_premain0\*(C'\fR, \f(CW\*(C`cygwin_premain1\*(C'\fR, \f(CW\*(C`cygwin_premain2\*(C'\fR,
-\&\f(CW\*(C`cygwin_premain3\*(C'\fR, and \f(CW\*(C`environ\*(C'\fR.
-[This option is specific to the i386 \s-1PE\s0 targeted port of the linker]
-.IP "\fB\-\-exclude\-symbols\fR \fIsymbol\fR\fB,\fR\fIsymbol\fR\fB,...\fR" 4
-.IX Item "--exclude-symbols symbol,symbol,..."
-Specifies a list of symbols which should not be automatically
-exported. The symbol names may be delimited by commas or colons.
-[This option is specific to the i386 \s-1PE\s0 targeted port of the linker]
-.IP "\fB\-\-exclude\-libs\fR \fIlib\fR\fB,\fR\fIlib\fR\fB,...\fR" 4
-.IX Item "--exclude-libs lib,lib,..."
-Specifies a list of archive libraries from which symbols should not be automatically
-exported. The library names may be delimited by commas or colons. Specifying
-\&\f(CW\*(C`\-\-exclude\-libs ALL\*(C'\fR excludes symbols in all archive libraries from
-automatic export. Symbols explicitly listed in a .def file are still exported,
-regardless of this option.
-[This option is specific to the i386 \s-1PE\s0 targeted port of the linker]
-.IP "\fB\-\-file\-alignment\fR" 4
-.IX Item "--file-alignment"
-Specify the file alignment. Sections in the file will always begin at
-file offsets which are multiples of this number. This defaults to
-512.
-[This option is specific to the i386 \s-1PE\s0 targeted port of the linker]
-.IP "\fB\-\-heap\fR \fIreserve\fR" 4
-.IX Item "--heap reserve"
-.PD 0
-.IP "\fB\-\-heap\fR \fIreserve\fR\fB,\fR\fIcommit\fR" 4
-.IX Item "--heap reserve,commit"
-.PD
-Specify the amount of memory to reserve (and optionally commit) to be
-used as heap for this program. The default is 1Mb reserved, 4K
-committed.
-[This option is specific to the i386 \s-1PE\s0 targeted port of the linker]
-.IP "\fB\-\-image\-base\fR \fIvalue\fR" 4
-.IX Item "--image-base value"
-Use \fIvalue\fR as the base address of your program or dll. This is
-the lowest memory location that will be used when your program or dll
-is loaded. To reduce the need to relocate and improve performance of
-your dlls, each should have a unique base address and not overlap any
-other dlls. The default is 0x400000 for executables, and 0x10000000
-for dlls.
-[This option is specific to the i386 \s-1PE\s0 targeted port of the linker]
-.IP "\fB\-\-kill\-at\fR" 4
-.IX Item "--kill-at"
-If given, the stdcall suffixes (@\fInn\fR) will be stripped from
-symbols before they are exported.
-[This option is specific to the i386 \s-1PE\s0 targeted port of the linker]
-.IP "\fB\-\-major\-image\-version\fR \fIvalue\fR" 4
-.IX Item "--major-image-version value"
-Sets the major number of the ``image version''. Defaults to 1.
-[This option is specific to the i386 \s-1PE\s0 targeted port of the linker]
-.IP "\fB\-\-major\-os\-version\fR \fIvalue\fR" 4
-.IX Item "--major-os-version value"
-Sets the major number of the ``os version''. Defaults to 4.
-[This option is specific to the i386 \s-1PE\s0 targeted port of the linker]
-.IP "\fB\-\-major\-subsystem\-version\fR \fIvalue\fR" 4
-.IX Item "--major-subsystem-version value"
-Sets the major number of the ``subsystem version''. Defaults to 4.
-[This option is specific to the i386 \s-1PE\s0 targeted port of the linker]
-.IP "\fB\-\-minor\-image\-version\fR \fIvalue\fR" 4
-.IX Item "--minor-image-version value"
-Sets the minor number of the ``image version''. Defaults to 0.
-[This option is specific to the i386 \s-1PE\s0 targeted port of the linker]
-.IP "\fB\-\-minor\-os\-version\fR \fIvalue\fR" 4
-.IX Item "--minor-os-version value"
-Sets the minor number of the ``os version''. Defaults to 0.
-[This option is specific to the i386 \s-1PE\s0 targeted port of the linker]
-.IP "\fB\-\-minor\-subsystem\-version\fR \fIvalue\fR" 4
-.IX Item "--minor-subsystem-version value"
-Sets the minor number of the ``subsystem version''. Defaults to 0.
-[This option is specific to the i386 \s-1PE\s0 targeted port of the linker]
-.IP "\fB\-\-output\-def\fR \fIfile\fR" 4
-.IX Item "--output-def file"
-The linker will create the file \fIfile\fR which will contain a \s-1DEF\s0
-file corresponding to the \s-1DLL\s0 the linker is generating. This \s-1DEF\s0 file
-(which should be called \f(CW\*(C`*.def\*(C'\fR) may be used to create an import
-library with \f(CW\*(C`dlltool\*(C'\fR or may be used as a reference to
-automatically or implicitly exported symbols.
-[This option is specific to the i386 \s-1PE\s0 targeted port of the linker]
-.IP "\fB\-\-out\-implib\fR \fIfile\fR" 4
-.IX Item "--out-implib file"
-The linker will create the file \fIfile\fR which will contain an
-import lib corresponding to the \s-1DLL\s0 the linker is generating. This
-import lib (which should be called \f(CW\*(C`*.dll.a\*(C'\fR or \f(CW\*(C`*.a\*(C'\fR
-may be used to link clients against the generated \s-1DLL\s0; this behaviour
-makes it possible to skip a separate \f(CW\*(C`dlltool\*(C'\fR import library
-creation step.
-[This option is specific to the i386 \s-1PE\s0 targeted port of the linker]
-.IP "\fB\-\-enable\-auto\-image\-base\fR" 4
-.IX Item "--enable-auto-image-base"
-Automatically choose the image base for DLLs, unless one is specified
-using the \f(CW\*(C`\-\-image\-base\*(C'\fR argument. By using a hash generated
-from the dllname to create unique image bases for each \s-1DLL\s0, in-memory
-collisions and relocations which can delay program execution are
-avoided.
-[This option is specific to the i386 \s-1PE\s0 targeted port of the linker]
-.IP "\fB\-\-disable\-auto\-image\-base\fR" 4
-.IX Item "--disable-auto-image-base"
-Do not automatically generate a unique image base. If there is no
-user-specified image base (\f(CW\*(C`\-\-image\-base\*(C'\fR) then use the platform
-default.
-[This option is specific to the i386 \s-1PE\s0 targeted port of the linker]
-.IP "\fB\-\-dll\-search\-prefix\fR \fIstring\fR" 4
-.IX Item "--dll-search-prefix string"
-When linking dynamically to a dll without an import library,
-search for \f(CW\*(C`<string><basename>.dll\*(C'\fR in preference to
-\&\f(CW\*(C`lib<basename>.dll\*(C'\fR. This behaviour allows easy distinction
-between DLLs built for the various \*(L"subplatforms\*(R": native, cygwin,
-uwin, pw, etc. For instance, cygwin DLLs typically use
-\&\f(CW\*(C`\-\-dll\-search\-prefix=cyg\*(C'\fR.
-[This option is specific to the i386 \s-1PE\s0 targeted port of the linker]
-.IP "\fB\-\-enable\-auto\-import\fR" 4
-.IX Item "--enable-auto-import"
-Do sophisticated linking of \f(CW\*(C`_symbol\*(C'\fR to \f(CW\*(C`_\|_imp_\|_symbol\*(C'\fR for
-\&\s-1DATA\s0 imports from DLLs, and create the necessary thunking symbols when
-building the import libraries with those \s-1DATA\s0 exports. Note: Use of the
-\&'auto\-import' extension will cause the text section of the image file
-to be made writable. This does not conform to the PE-COFF format
-specification published by Microsoft.
-.Sp
-Using 'auto\-import' generally will 'just work' \*(-- but sometimes you may
-see this message:
-.Sp
-"variable '<var>' can't be auto\-imported. Please read the
-documentation for ld's \f(CW\*(C`\-\-enable\-auto\-import\*(C'\fR for details."
-.Sp
-This message occurs when some (sub)expression accesses an address
-ultimately given by the sum of two constants (Win32 import tables only
-allow one). Instances where this may occur include accesses to member
-fields of struct variables imported from a \s-1DLL\s0, as well as using a
-constant index into an array variable imported from a \s-1DLL\s0. Any
-multiword variable (arrays, structs, long long, etc) may trigger
-this error condition. However, regardless of the exact data type
-of the offending exported variable, ld will always detect it, issue
-the warning, and exit.
-.Sp
-There are several ways to address this difficulty, regardless of the
-data type of the exported variable:
-.Sp
-One way is to use \-\-enable\-runtime\-pseudo\-reloc switch. This leaves the task
-of adjusting references in your client code for runtime environment, so
-this method works only when runtime environment supports this feature.
-.Sp
-A second solution is to force one of the 'constants' to be a variable \*(--
-that is, unknown and un-optimizable at compile time. For arrays,
-there are two possibilities: a) make the indexee (the array's address)
-a variable, or b) make the 'constant' index a variable. Thus:
-.Sp
-.Vb 3
-\& extern type extern_array[];
-\& extern_array[1] -->
-\& { volatile type *t=extern_array; t[1] }
-.Ve
-.Sp
-or
-.Sp
-.Vb 3
-\& extern type extern_array[];
-\& extern_array[1] -->
-\& { volatile int t=1; extern_array[t] }
-.Ve
-.Sp
-For structs (and most other multiword data types) the only option
-is to make the struct itself (or the long long, or the ...) variable:
-.Sp
-.Vb 3
-\& extern struct s extern_struct;
-\& extern_struct.field -->
-\& { volatile struct s *t=&extern_struct; t->field }
-.Ve
-.Sp
-or
-.Sp
-.Vb 3
-\& extern long long extern_ll;
-\& extern_ll -->
-\& { volatile long long * local_ll=&extern_ll; *local_ll }
-.Ve
-.Sp
-A third method of dealing with this difficulty is to abandon
-\&'auto\-import' for the offending symbol and mark it with
-\&\f(CW\*(C`_\|_declspec(dllimport)\*(C'\fR. However, in practise that
-requires using compile-time #defines to indicate whether you are
-building a \s-1DLL\s0, building client code that will link to the \s-1DLL\s0, or
-merely building/linking to a static library. In making the choice
-between the various methods of resolving the 'direct address with
-constant offset' problem, you should consider typical real-world usage:
-.Sp
-Original:
-.Sp
-.Vb 7
-\& --foo.h
-\& extern int arr[];
-\& --foo.c
-\& #include "foo.h"
-\& void main(int argc, char **argv){
-\& printf("%d\en",arr[1]);
-\& }
-.Ve
-.Sp
-Solution 1:
-.Sp
-.Vb 9
-\& --foo.h
-\& extern int arr[];
-\& --foo.c
-\& #include "foo.h"
-\& void main(int argc, char **argv){
-\& /* This workaround is for win32 and cygwin; do not "optimize" */
-\& volatile int *parr = arr;
-\& printf("%d\en",parr[1]);
-\& }
-.Ve
-.Sp
-Solution 2:
-.Sp
-.Vb 14
-\& --foo.h
-\& /* Note: auto-export is assumed (no __declspec(dllexport)) */
-\& #if (defined(_WIN32) || defined(__CYGWIN__)) && \e
-\& !(defined(FOO_BUILD_DLL) || defined(FOO_STATIC))
-\& #define FOO_IMPORT __declspec(dllimport)
-\& #else
-\& #define FOO_IMPORT
-\& #endif
-\& extern FOO_IMPORT int arr[];
-\& --foo.c
-\& #include "foo.h"
-\& void main(int argc, char **argv){
-\& printf("%d\en",arr[1]);
-\& }
-.Ve
-.Sp
-A fourth way to avoid this problem is to re-code your
-library to use a functional interface rather than a data interface
-for the offending variables (e.g. \fIset_foo()\fR and \fIget_foo()\fR accessor
-functions).
-[This option is specific to the i386 \s-1PE\s0 targeted port of the linker]
-.IP "\fB\-\-disable\-auto\-import\fR" 4
-.IX Item "--disable-auto-import"
-Do not attempt to do sophisticated linking of \f(CW\*(C`_symbol\*(C'\fR to
-\&\f(CW\*(C`_\|_imp_\|_symbol\*(C'\fR for \s-1DATA\s0 imports from DLLs.
-[This option is specific to the i386 \s-1PE\s0 targeted port of the linker]
-.IP "\fB\-\-enable\-runtime\-pseudo\-reloc\fR" 4
-.IX Item "--enable-runtime-pseudo-reloc"
-If your code contains expressions described in \-\-enable\-auto\-import section,
-that is, \s-1DATA\s0 imports from \s-1DLL\s0 with non-zero offset, this switch will create
-a vector of 'runtime pseudo relocations' which can be used by runtime
-environment to adjust references to such data in your client code.
-[This option is specific to the i386 \s-1PE\s0 targeted port of the linker]
-.IP "\fB\-\-disable\-runtime\-pseudo\-reloc\fR" 4
-.IX Item "--disable-runtime-pseudo-reloc"
-Do not create pseudo relocations for non-zero offset \s-1DATA\s0 imports from
-DLLs. This is the default.
-[This option is specific to the i386 \s-1PE\s0 targeted port of the linker]
-.IP "\fB\-\-enable\-extra\-pe\-debug\fR" 4
-.IX Item "--enable-extra-pe-debug"
-Show additional debug info related to auto-import symbol thunking.
-[This option is specific to the i386 \s-1PE\s0 targeted port of the linker]
-.IP "\fB\-\-section\-alignment\fR" 4
-.IX Item "--section-alignment"
-Sets the section alignment. Sections in memory will always begin at
-addresses which are a multiple of this number. Defaults to 0x1000.
-[This option is specific to the i386 \s-1PE\s0 targeted port of the linker]
-.IP "\fB\-\-stack\fR \fIreserve\fR" 4
-.IX Item "--stack reserve"
-.PD 0
-.IP "\fB\-\-stack\fR \fIreserve\fR\fB,\fR\fIcommit\fR" 4
-.IX Item "--stack reserve,commit"
-.PD
-Specify the amount of memory to reserve (and optionally commit) to be
-used as stack for this program. The default is 2Mb reserved, 4K
-committed.
-[This option is specific to the i386 \s-1PE\s0 targeted port of the linker]
-.IP "\fB\-\-subsystem\fR \fIwhich\fR" 4
-.IX Item "--subsystem which"
-.PD 0
-.IP "\fB\-\-subsystem\fR \fIwhich\fR\fB:\fR\fImajor\fR" 4
-.IX Item "--subsystem which:major"
-.IP "\fB\-\-subsystem\fR \fIwhich\fR\fB:\fR\fImajor\fR\fB.\fR\fIminor\fR" 4
-.IX Item "--subsystem which:major.minor"
-.PD
-Specifies the subsystem under which your program will execute. The
-legal values for \fIwhich\fR are \f(CW\*(C`native\*(C'\fR, \f(CW\*(C`windows\*(C'\fR,
-\&\f(CW\*(C`console\*(C'\fR, and \f(CW\*(C`posix\*(C'\fR. You may optionally set the
-subsystem version also.
-[This option is specific to the i386 \s-1PE\s0 targeted port of the linker]
-.SH "ENVIRONMENT"
-.IX Header "ENVIRONMENT"
-You can change the behaviour of \fBld\fR with the environment variables
-\&\f(CW\*(C`GNUTARGET\*(C'\fR,
-\&\f(CW\*(C`LDEMULATION\*(C'\fR and \f(CW\*(C`COLLECT_NO_DEMANGLE\*(C'\fR.
-.PP
-\&\f(CW\*(C`GNUTARGET\*(C'\fR determines the input-file object format if you don't
-use \fB\-b\fR (or its synonym \fB\-\-format\fR). Its value should be one
-of the \s-1BFD\s0 names for an input format. If there is no
-\&\f(CW\*(C`GNUTARGET\*(C'\fR in the environment, \fBld\fR uses the natural format
-of the target. If \f(CW\*(C`GNUTARGET\*(C'\fR is set to \f(CW\*(C`default\*(C'\fR then \s-1BFD\s0
-attempts to discover the input format by examining binary input files;
-this method often succeeds, but there are potential ambiguities, since
-there is no method of ensuring that the magic number used to specify
-object-file formats is unique. However, the configuration procedure for
-\&\s-1BFD\s0 on each system places the conventional format for that system first
-in the search\-list, so ambiguities are resolved in favor of convention.
-.PP
-\&\f(CW\*(C`LDEMULATION\*(C'\fR determines the default emulation if you don't use the
-\&\fB\-m\fR option. The emulation can affect various aspects of linker
-behaviour, particularly the default linker script. You can list the
-available emulations with the \fB\-\-verbose\fR or \fB\-V\fR options. If
-the \fB\-m\fR option is not used, and the \f(CW\*(C`LDEMULATION\*(C'\fR environment
-variable is not defined, the default emulation depends upon how the
-linker was configured.
-.PP
-Normally, the linker will default to demangling symbols. However, if
-\&\f(CW\*(C`COLLECT_NO_DEMANGLE\*(C'\fR is set in the environment, then it will
-default to not demangling symbols. This environment variable is used in
-a similar fashion by the \f(CW\*(C`gcc\*(C'\fR linker wrapper program. The default
-may be overridden by the \fB\-\-demangle\fR and \fB\-\-no\-demangle\fR
-options.
-.SH "SEE ALSO"
-.IX Header "SEE ALSO"
-\&\fIar\fR\|(1), \fInm\fR\|(1), \fIobjcopy\fR\|(1), \fIobjdump\fR\|(1), \fIreadelf\fR\|(1) and
-the Info entries for \fIbinutils\fR and
-\&\fIld\fR.
-.SH "COPYRIGHT"
-.IX Header "COPYRIGHT"
-Copyright (c) 1991, 92, 93, 94, 95, 96, 97, 98, 99, 2000, 2001,
-2002, 2003, 2004 Free Software Foundation, Inc.
-.PP
-Permission is granted to copy, distribute and/or modify this document
-under the terms of the \s-1GNU\s0 Free Documentation License, Version 1.1
-or any later version published by the Free Software Foundation;
-with no Invariant Sections, with no Front-Cover Texts, and with no
-Back-Cover Texts. A copy of the license is included in the
-section entitled ``\s-1GNU\s0 Free Documentation License''.
diff --git a/contrib/binutils/ld/ld.h b/contrib/binutils/ld/ld.h
index dde4cfe..fd7301b 100644
--- a/contrib/binutils/ld/ld.h
+++ b/contrib/binutils/ld/ld.h
@@ -1,5 +1,6 @@
/* ld.h -- general linker header file
- Copyright 1991, 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2002
+ Copyright 1991, 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999, 2000,
+ 2001, 2002, 2003, 2004, 2005, 2006, 2007
Free Software Foundation, Inc.
This file is part of GLD, the Gnu Linker.
@@ -16,13 +17,49 @@
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. */
+ Software Foundation, 51 Franklin Street - Fifth Floor, Boston, MA
+ 02110-1301, USA. */
#ifndef LD_H
#define LD_H
#ifdef HAVE_LOCALE_H
+#endif
+#ifndef SEEK_CUR
+#define SEEK_CUR 1
+#endif
+#ifndef SEEK_END
+#define SEEK_END 2
+#endif
+
+#if defined(__GNUC__) && !defined(C_ALLOCA)
+# undef alloca
+# define alloca __builtin_alloca
+#else
+# if defined(HAVE_ALLOCA_H) && !defined(C_ALLOCA)
+# include <alloca.h>
+# else
+# ifndef alloca /* predefined by HP cc +Olibcalls */
+# if !defined (__STDC__) && !defined (__hpux)
+char *alloca ();
+# else
+void *alloca ();
+# endif /* __STDC__, __hpux */
+# endif /* alloca */
+# endif /* HAVE_ALLOCA_H */
+#endif
+
+
+#ifdef HAVE_LOCALE_H
+# ifndef ENABLE_NLS
+ /* The Solaris version of locale.h always includes libintl.h. If we have
+ been configured with --disable-nls then ENABLE_NLS will not be defined
+ and the dummy definitions of bindtextdomain (et al) below will conflict
+ with the defintions in libintl.h. So we define these values to prevent
+ the bogus inclusion of libintl.h. */
+# define _LIBINTL_H
+# define _LIBGETTEXT_H
+# endif
# include <locale.h>
#endif
@@ -44,8 +81,6 @@
# define N_(String) (String)
#endif
-#include "bin-bugs.h"
-
/* Look in this environment name for the linker to pretend to be */
#define EMULATION_ENVIRON "LDEMULATION"
/* If in there look for the strings: */
@@ -64,13 +99,18 @@ typedef struct name_list {
}
name_list;
-/* A wildcard specification. This is only used in ldgram.y, but it
- winds up in ldgram.h, so we need to define it outside. */
+/* A wildcard specification. */
+
+typedef enum {
+ none, by_name, by_alignment, by_name_alignment, by_alignment_name
+} sort_type;
+
+extern sort_type sort_section;
struct wildcard_spec {
const char *name;
struct name_list *exclude_name_list;
- bfd_boolean sorted;
+ sort_type sorted;
};
struct wildcard_list {
@@ -78,11 +118,19 @@ struct wildcard_list {
struct wildcard_spec spec;
};
-/* Extra information we hold on sections */
-typedef struct user_section_struct {
- /* Pointer to the section where this data will go */
- struct lang_input_statement_struct *file;
-} section_userdata_type;
+struct map_symbol_def {
+ struct bfd_link_hash_entry *entry;
+ struct map_symbol_def *next;
+};
+
+/* The initial part of fat_user_section_struct has to be idential with
+ lean_user_section_struct. */
+typedef struct fat_user_section_struct {
+ /* For input sections, when writing a map file: head / tail of a linked
+ list of hash table entries for symbols defined in this section. */
+ struct map_symbol_def *map_symbol_def_head;
+ struct map_symbol_def **map_symbol_def_tail;
+} fat_section_userdata_type;
#define get_userdata(x) ((x)->userdata)
@@ -99,22 +147,6 @@ typedef struct {
bfd_boolean inhibit_common_definition;
bfd_boolean relax;
- /* Name of runtime interpreter to invoke. */
- char *interpreter;
-
- /* Name to give runtime libary from the -soname argument. */
- char *soname;
-
- /* Runtime library search path from the -rpath argument. */
- char *rpath;
-
- /* Link time runtime library search path from the -rpath-link
- argument. */
- char *rpath_link;
-
- /* Big or little endian as set on command line. */
- enum { ENDIAN_UNSET = 0, ENDIAN_BIG, ENDIAN_LITTLE } endian;
-
/* If TRUE, build MIPS embedded PIC relocation tables in the output
file. */
bfd_boolean embedded_relocs;
@@ -129,8 +161,53 @@ typedef struct {
files. */
bfd_boolean warn_mismatch;
- /* Remove unreferenced sections? */
- bfd_boolean gc_sections;
+ /* Warn on attempting to open an incompatible library during a library
+ search. */
+ bfd_boolean warn_search_mismatch;
+
+
+ /* If TRUE (the default) check section addresses, once compute,
+ fpor overlaps. */
+ bfd_boolean check_section_addresses;
+
+ /* If TRUE allow the linking of input files in an unknown architecture
+ assuming that the user knows what they are doing. This was the old
+ behaviour of the linker. The new default behaviour is to reject such
+ input files. */
+ bfd_boolean accept_unknown_input_arch;
+
+ /* Big or little endian as set on command line. */
+ enum { ENDIAN_UNSET = 0, ENDIAN_BIG, ENDIAN_LITTLE } endian;
+
+ /* -Bsymbolic and -Bsymbolic-functions, as set on command line. */
+ enum
+ {
+ symbolic_unset = 0,
+ symbolic,
+ symbolic_functions,
+ } symbolic;
+
+ /* --dynamic-list, --dynamic-list-cpp-new, --dynamic-list-cpp-typeinfo
+ and --dynamic-list FILE, as set on command line. */
+ enum
+ {
+ dynamic_list_unset = 0,
+ dynamic_list_data,
+ dynamic_list
+ } dynamic_list;
+
+ /* Name of runtime interpreter to invoke. */
+ char *interpreter;
+
+ /* Name to give runtime libary from the -soname argument. */
+ char *soname;
+
+ /* Runtime library search path from the -rpath argument. */
+ char *rpath;
+
+ /* Link time runtime library search path from the -rpath-link
+ argument. */
+ char *rpath_link;
/* Name of shared object whose symbol table should be filtered with
this shared object. From the --filter option. */
@@ -144,16 +221,8 @@ typedef struct {
.exports sections. */
char *version_exports_section;
- /* If TRUE (the default) check section addresses, once compute,
- fpor overlaps. */
- bfd_boolean check_section_addresses;
-
- /* If TRUE allow the linking of input files in an unknown architecture
- assuming that the user knows what they are doing. This was the old
- behaviour of the linker. The new default behaviour is to reject such
- input files. */
- bfd_boolean accept_unknown_input_arch;
-
+ /* Default linker script. */
+ char *default_script;
} args_type;
extern args_type command_line;
@@ -161,7 +230,6 @@ extern args_type command_line;
typedef int token_code_type;
typedef struct {
- bfd_size_type specified_data_size;
bfd_boolean magic_demand_paged;
bfd_boolean make_executable;
@@ -201,31 +269,39 @@ typedef struct {
bfd_boolean text_read_only;
- char *map_filename;
- FILE *map_file;
-
bfd_boolean stats;
/* If set, orphan input sections will be mapped to separate output
sections. */
bfd_boolean unique_orphan_sections;
- unsigned int split_by_reloc;
- bfd_size_type split_by_file;
-
/* If set, only search library directories explicitly selected
on the command line. */
bfd_boolean only_cmd_line_lib_dirs;
+
+ /* The rpath separation character. Usually ':'. */
+ char rpath_separator;
+
+ char *map_filename;
+ FILE *map_file;
+
+ unsigned int split_by_reloc;
+ bfd_size_type split_by_file;
+
+ bfd_size_type specified_data_size;
+
+ /* The size of the hash table to use. */
+ bfd_size_type hash_table_size;
+
+ /* The maximum page size for ELF. */
+ bfd_vma maxpagesize;
+
+ /* The common page size for ELF. */
+ bfd_vma commonpagesize;
} ld_config_type;
extern ld_config_type config;
-typedef enum {
- lang_first_phase_enum,
- lang_allocating_phase_enum,
- lang_final_phase_enum
-} lang_phase_type;
-
extern FILE * saved_script_handle;
extern bfd_boolean force_make_executable;
@@ -234,6 +310,7 @@ extern int parsing_defsym;
extern int yyparse (void);
extern void add_cref (const char *, bfd *, asection *, bfd_vma);
+extern bfd_boolean handle_asneeded_cref (bfd *, enum notice_asneeded_action);
extern void output_cref (FILE *);
extern void check_nocrossrefs (void);
extern void ld_abort (const char *, int, const char *) ATTRIBUTE_NORETURN;
diff --git a/contrib/binutils/ld/ld.texinfo b/contrib/binutils/ld/ld.texinfo
index 4310c12..71273f4 100644
--- a/contrib/binutils/ld/ld.texinfo
+++ b/contrib/binutils/ld/ld.texinfo
@@ -1,11 +1,13 @@
\input texinfo
@setfilename ld.info
@c Copyright 1991, 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999, 2000,
-@c 2001, 2002, 2003, 2004 Free Software Foundation, Inc.
+@c 2001, 2002, 2003, 2004, 2005, 2006, 2007 Free Software Foundation, Inc.
@syncodeindex ky cp
+@c man begin INCLUDE
@include configdoc.texi
@c (configdoc.texi is generated by the Makefile)
-@include ldver.texi
+@include bfdver.texi
+@c man end
@c @smallbook
@@ -18,32 +20,18 @@
@c Configure for the generation of man pages
@set UsesEnvVars
@set GENERIC
-@set A29K
-@set ARC
@set ARM
-@set D10V
-@set D30V
-@set H8/300
-@set H8/500
+@set H8300
@set HPPA
-@set I370
-@set I80386
-@set I860
@set I960
-@set M32R
@set M68HC11
-@set M680X0
-@set MCORE
-@set MIPS
@set MMIX
@set MSP430
-@set PDP11
-@set PJ
-@set SH
-@set SPARC
-@set TIC54X
-@set V850
-@set VAX
+@set POWERPC
+@set POWERPC64
+@set Renesas
+@set SPU
+@set TICOFF
@set WIN32
@set XTENSA
@end ifset
@@ -57,13 +45,15 @@ END-INFO-DIR-ENTRY
@end format
@end ifinfo
-@ifinfo
-This file documents the @sc{gnu} linker LD version @value{VERSION}.
-
-Copyright (C) 1991, 92, 93, 94, 95, 96, 97, 98, 99, 2000,
-2001, 2002, 2003, 2004 Free Software Foundation, Inc.
+@copying
+This file documents the @sc{gnu} linker LD
+@ifset VERSION_PACKAGE
+@value{VERSION_PACKAGE}
+@end ifset
+version @value{VERSION}.
-@ignore
+Copyright @copyright{} 1991, 92, 93, 94, 95, 96, 97, 98, 99, 2000,
+2001, 2002, 2003, 2004, 2005, 2006, 2007 Free Software Foundation, Inc.
Permission is granted to copy, distribute and/or modify this document
under the terms of the GNU Free Documentation License, Version 1.1
@@ -71,23 +61,18 @@ or any later version published by the Free Software Foundation;
with no Invariant Sections, with no Front-Cover Texts, and with no
Back-Cover Texts. A copy of the license is included in the
section entitled ``GNU Free Documentation License''.
-
-Permission is granted to process this file through Tex and print the
-results, provided the printed document carries copying permission
-notice identical to this one except for the removal of this paragraph
-(this paragraph not being relevant to the printed manual).
-
-@end ignore
-@end ifinfo
+@end copying
@iftex
@finalout
@setchapternewpage odd
-@settitle Using LD, the GNU linker
+@settitle The GNU linker
@titlepage
-@title Using ld
-@subtitle The GNU linker
+@title The GNU linker
@sp 1
-@subtitle @code{ld} version 2
+@subtitle @code{ld}
+@ifset VERSION_PACKAGE
+@subtitle @value{VERSION_PACKAGE}
+@end ifset
@subtitle Version @value{VERSION}
@author Steve Chamberlain
@author Ian Lance Taylor
@@ -97,7 +82,7 @@ notice identical to this one except for the removal of this paragraph
{\parskip=0pt
\hfill Red Hat Inc\par
\hfill nickc\@credhat.com, doc\@redhat.com\par
-\hfill {\it Using LD, the GNU linker}\par
+\hfill {\it The GNU linker}\par
\hfill Edited by Jeffrey Osier (jeffrey\@cygnus.com)\par
}
\global\parindent=0pt % Steve likes it this way.
@@ -106,7 +91,7 @@ notice identical to this one except for the removal of this paragraph
@vskip 0pt plus 1filll
@c man begin COPYRIGHT
Copyright @copyright{} 1991, 92, 93, 94, 95, 96, 97, 98, 99, 2000, 2001,
-2002, 2003, 2004 Free Software Foundation, Inc.
+2002, 2003, 2004, 2005, 2006, 2007 Free Software Foundation, Inc.
Permission is granted to copy, distribute and/or modify this document
under the terms of the GNU Free Documentation License, Version 1.1
@@ -118,12 +103,17 @@ section entitled ``GNU Free Documentation License''.
@end titlepage
@end iftex
+@contents
@c FIXME: Talk about importance of *order* of args, cmds to linker!
@ifnottex
@node Top
-@top Using ld
-This file documents the @sc{gnu} linker ld version @value{VERSION}.
+@top LD
+This file documents the @sc{gnu} linker ld
+@ifset VERSION_PACKAGE
+@value{VERSION_PACKAGE}
+@end ifset
+version @value{VERSION}.
This document is distributed under the terms of the GNU Free
Documentation License. A copy of the license is included in the
@@ -152,6 +142,18 @@ section entitled ``GNU Free Documentation License''.
@ifset HPPA
* HPPA ELF32:: ld and HPPA 32-bit ELF
@end ifset
+@ifset M68HC11
+* M68HC11/68HC12:: ld and the Motorola 68HC11 and 68HC12 families
+@end ifset
+@ifset POWERPC
+* PowerPC ELF32:: ld and PowerPC 32-bit ELF Support
+@end ifset
+@ifset POWERPC64
+* PowerPC64 ELF64:: ld and PowerPC64 64-bit ELF Support
+@end ifset
+@ifset SPU
+* SPU ELF:: ld and SPU ELF Support
+@end ifset
@ifset TICOFF
* TI COFF:: ld and the TI COFF
@end ifset
@@ -170,7 +172,7 @@ section entitled ``GNU Free Documentation License''.
* Reporting Bugs:: Reporting Bugs
* MRI:: MRI Compatible Script Files
* GNU Free Documentation License:: GNU Free Documentation License
-* Index:: Index
+* LD Index:: LD Index
@end menu
@end ifnottex
@@ -204,10 +206,9 @@ to provide explicit and total control over the linking process.
@ifset man
@c For the man only
-This man page does not describe the command language; see the
-@command{ld} entry in @code{info}, or the manual
-ld: the GNU linker, for full details on the command language and
-on other aspects of the GNU linker.
+This man page does not describe the command language; see the
+@command{ld} entry in @code{info} for full details on the command
+language and on other aspects of the GNU linker.
@end ifset
@ifclear SingleFormat
@@ -310,7 +311,7 @@ For options whose names are multiple letters, either one dash or two can
precede the option name; for example, @samp{-trace-symbol} and
@samp{--trace-symbol} are equivalent. Note---there is one exception to
this rule. Multiple letter options that start with a lower case 'o' can
-only be preceeded by two dashes. This is to reduce confusion with the
+only be preceded by two dashes. This is to reduce confusion with the
@samp{-o} option. So for example @samp{-omagic} sets the output file
name to @samp{magic} whereas @samp{--omagic} sets the NMAGIC flag on the
output.
@@ -338,6 +339,8 @@ Here is a table of the generic command line switches accepted by the GNU
linker:
@table @gcctabopt
+@include at-file.texi
+
@kindex -a@var{keyword}
@item -a@var{keyword}
This option is supported for HP/UX compatibility. The @var{keyword}
@@ -446,6 +449,17 @@ base 10; you may use a leading @samp{0x} for base 16, or a leading
@samp{0} for base 8). @xref{Entry Point}, for a discussion of defaults
and other ways of specifying the entry point.
+@kindex --exclude-libs
+@item --exclude-libs @var{lib},@var{lib},...
+Specifies a list of archive libraries from which symbols should not be automatically
+exported. The library names may be delimited by commas or colons. Specifying
+@code{--exclude-libs ALL} excludes symbols in all archive libraries from
+automatic export. This option is available only for the i386 PE targeted
+port of the linker and for ELF targeted ports. For i386 PE, symbols
+explicitly listed in a .def file are still exported, regardless of this
+option. For ELF targeted ports, symbols affected by this option will
+be treated as hidden.
+
@cindex dynamic symbol table
@kindex -E
@kindex --export-dynamic
@@ -464,9 +478,9 @@ 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.
-You can also use the version script to control what symbols should
+You can also use the dynamic list to control what symbols should
be added to the dynamic symbol table if the output format supports it.
-See the description of @samp{--version-script} in @ref{VERSION}.
+See the description of @samp{--dynamic-list}.
@ifclear SingleFormat
@cindex big-endian objects
@@ -525,7 +539,7 @@ toolchain for specifying object-file format for both input and output
object files.
@ifclear SingleFormat
The @sc{gnu} linker uses other mechanisms for this purpose: the
-@option{-b}, @option{--format}, @option{--oformat} options, the
+@option{-b}, @option{--format}, @option{--oformat} options, the
@code{TARGET} command in linker scripts, and the @code{GNUTARGET}
environment variable.
@end ifclear
@@ -579,21 +593,24 @@ of the function. By default, the linker uses @code{_init} as the
function to call.
@cindex archive files, from cmd line
-@kindex -l@var{archive}
-@kindex --library=@var{archive}
-@item -l@var{archive}
-@itemx --library=@var{archive}
-Add archive file @var{archive} to the list of files to link. This
-option may be used any number of times. @command{ld} will search its
-path-list for occurrences of @code{lib@var{archive}.a} for every
-@var{archive} specified.
+@kindex -l@var{namespec}
+@kindex --library=@var{namespec}
+@item -l@var{namespec}
+@itemx --library=@var{namespec}
+Add the archive or object file specified by @var{namespec} to the
+list of files to link. This option may be used any number of times.
+If @var{namespec} is of the form @file{:@var{filename}}, @command{ld}
+will search the library path for a file called @var{filename}, otherise it
+will search the library path for a file called @file{lib@var{namespec}.a}.
On systems which support shared libraries, @command{ld} may also search for
-libraries with extensions other than @code{.a}. Specifically, on ELF
-and SunOS systems, @command{ld} will search a directory for a library with
-an extension of @code{.so} before searching for one with an extension of
-@code{.a}. By convention, a @code{.so} extension indicates a shared
-library.
+files other than @file{lib@var{namespec}.a}. Specifically, on ELF
+and SunOS systems, @command{ld} will search a directory for a library
+called @file{lib@var{namespec}.so} before searching for one called
+@file{lib@var{namespec}.a}. (By convention, a @code{.so} extension
+indicates a shared library.) Note that this behavior does not apply
+to @file{:@var{filename}}, which always specifies a file called
+@var{filename}.
The linker will search an archive only once, at the location where it is
specified on the command line. If the archive defines a symbol which
@@ -661,12 +678,40 @@ information about the link, including the following:
@itemize @bullet
@item
-Where object files and symbols are mapped into memory.
+Where object files 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.
+@item
+The values assigned to symbols.
+
+Note - symbols whose values are computed by an expression which
+involves a reference to a previous value of the same symbol may not
+have correct result displayed in the link map. This is because the
+linker discards intermediate results and only retains the final value
+of an expression. Under such circumstances the linker will display
+the final value enclosed by square brackets. Thus for example a
+linker script containing:
+
+@smallexample
+ foo = 1
+ foo = foo * 4
+ foo = foo + 8
+@end smallexample
+
+will produce the following output in the link map if the @option{-M}
+option is used:
+
+@smallexample
+ 0x00000001 foo = 0x1
+ [0x0000000c] foo = (foo * 0x4)
+ [0x0000000c] foo = (foo + 0x8)
+@end smallexample
+
+See @ref{Expressions} for more information about expressions in linker
+scripts.
@end itemize
@kindex -n
@@ -720,13 +765,19 @@ should only be enabled for the final binary.
@cindex retain relocations in final executable
@item -q
@itemx --emit-relocs
-Leave relocation sections and contents in fully linked exececutables.
+Leave relocation sections and contents in fully linked executables.
Post link analysis and optimization tools may need this information in
order to perform correct modifications of executables. This results
in larger executables.
This option is currently only supported on ELF platforms.
+@kindex --force-dynamic
+@cindex forcing the creation of dynamic sections
+@item --force-dynamic
+Force the output file to have dynamic sections. This option is specific
+to VxWorks targets.
+
@cindex partial link
@cindex relocatable output
@kindex -r
@@ -799,6 +850,22 @@ the current directory, @code{ld} looks for it in the directories
specified by any preceding @samp{-L} options. Multiple @samp{-T}
options accumulate.
+@kindex -dT @var{script}
+@kindex --default-script=@var{script}
+@cindex script files
+@item -dT @var{scriptfile}
+@itemx --default-script=@var{scriptfile}
+Use @var{scriptfile} as the default linker script. @xref{Scripts}.
+
+This option is similar to the @option{--script} option except that
+processing of the script is delayed until after the rest of the
+command line has been processed. This allows options placed after the
+@option{--default-script} option on the command line to affect the
+behaviour of the linker script, which can be important when the linker
+command line cannot be directly controlled by the user. (eg because
+the command line is being constructed by another tool, such as
+@samp{gcc}).
+
@kindex -u @var{symbol}
@kindex --undefined=@var{symbol}
@cindex undefined symbol
@@ -852,11 +919,11 @@ Delete all local symbols.
@kindex -X
@kindex --discard-locals
@cindex local symbols, deleting
-@cindex L, deleting symbols beginning
@item -X
@itemx --discard-locals
-Delete all temporary local symbols. For most targets, this is all local
-symbols whose names begin with @samp{L}.
+Delete all temporary local symbols. (These symbols start with
+system-specific local label prefixes, typically @samp{.L} for ELF systems
+or @samp{L} for traditional a.out systems.)
@kindex -y @var{symbol}
@kindex --trace-symbol=@var{symbol}
@@ -888,6 +955,9 @@ lookup caching possible.
Disallows undefined symbols in object files. Undefined symbols in
shared libraries are still allowed.
+@item execstack
+Marks the object as requiring executable stack.
+
@item initfirst
This option is only meaningful when building a shared object.
It marks the object so that its runtime initialization will occur
@@ -900,6 +970,12 @@ objects.
Marks the object that its symbol table interposes before all symbols
but the primary executable.
+@item lazy
+When generating an executable or shared library, mark it to tell the
+dynamic linker to defer function call resolution to the point when
+the function is called (lazy binding), rather than at load time.
+Lazy binding is the default.
+
@item loadfltr
Marks the object that its filters be processed immediately at
runtime.
@@ -926,6 +1002,12 @@ Marks the object not available to @code{dlopen}.
@item nodump
Marks the object can not be dumped by @code{dldump}.
+@item noexecstack
+Marks the object as not requiring executable stack.
+
+@item norelro
+Don't create an ELF @code{PT_GNU_RELRO} segment header in the object.
+
@item now
When generating an executable or shared library, mark it to tell the
dynamic linker to resolve all symbols when the program is started, or
@@ -936,9 +1018,18 @@ first called.
@item origin
Marks the object may contain $ORIGIN.
+@item relro
+Create an ELF @code{PT_GNU_RELRO} segment header in the object.
+
+@item max-page-size=@var{value}
+Set the emulation maximum page size to @var{value}.
+
+@item common-page-size=@var{value}
+Set the emulation common page size to @var{value}.
+
@end table
-Other keywords are ignored for Solaris compatibility.
+Other keywords are ignored for Solaris compatibility.
@kindex -(
@cindex groups of archives
@@ -980,10 +1071,23 @@ This option affects ELF DT_NEEDED tags for dynamic libraries mentioned
on the command line after the @option{--as-needed} option. Normally,
the linker will add a DT_NEEDED tag for each dynamic library mentioned
on the command line, regardless of whether the library is actually
-needed. @option{--as-needed} causes DT_NEEDED tags to only be emitted
-for libraries that satisfy some reference from regular objects.
+needed. @option{--as-needed} causes DT_NEEDED tags to only be emitted
+for libraries that satisfy some symbol reference from regular objects
+which is undefined at the point that the library was linked.
@option{--no-as-needed} restores the default behaviour.
+@kindex --add-needed
+@kindex --no-add-needed
+@item --add-needed
+@itemx --no-add-needed
+This option affects the treatment of dynamic libraries from ELF
+DT_NEEDED tags in dynamic libraries mentioned on the command line after
+the @option{--no-add-needed} option. Normally, the linker will add
+a DT_NEEDED tag for each dynamic library from DT_NEEDED tags.
+@option{--no-add-needed} causes DT_NEEDED tags will never be emitted
+for those libraries from DT_NEEDED tags. @option{--add-needed} restores
+the default behaviour.
+
@kindex -assert @var{keyword}
@item -assert @var{keyword}
This option is ignored for SunOS compatibility.
@@ -1022,7 +1126,11 @@ platforms for which shared libraries are supported. The different
variants of this option are for compatibility with various systems. You
may use this option multiple times on the command line: it affects
library searching for @option{-l} options which follow it. This
-option also implies @option{--unresolved-symbols=report-all}.
+option also implies @option{--unresolved-symbols=report-all}. This
+option can be used with @option{-shared}. Doing so means that a
+shared library is being created but that all of the library's external
+references must be resolved by pulling in entries from static
+libraries.
@kindex -Bsymbolic
@item -Bsymbolic
@@ -1032,12 +1140,45 @@ for a program linked against a shared library to override the definition
within the shared library. This option is only meaningful on ELF
platforms which support shared libraries.
+@kindex -Bsymbolic-functions
+@item -Bsymbolic-functions
+When creating a shared library, bind references to global function
+symbols to the definition within the shared library, if any.
+This option is only meaningful on ELF platforms which support shared
+libraries.
+
+@kindex --dynamic-list=@var{dynamic-list-file}
+@item --dynamic-list=@var{dynamic-list-file}
+Specify the name of a dynamic list file to the linker. This is
+typically used when creating shared libraries to specify a list of
+global symbols whose references shouldn't be bound to the definition
+within the shared library, or creating dynamically linked executables
+to specify a list of symbols which should be added to the symbol table
+in the executable. This option is only meaningful on ELF platforms
+which support shared libraries.
+
+The format of the dynamic list is the same as the version node without
+scope and node name. See @ref{VERSION} for more information.
+
+@kindex --dynamic-list-data
+@item --dynamic-list-data
+Include all global data symbols to the dynamic list.
+
+@kindex --dynamic-list-cpp-new
+@item --dynamic-list-cpp-new
+Provide the builtin dynamic list for C++ operator new and delete. It
+is mainly useful for building shared libstdc++.
+
+@kindex --dynamic-list-cpp-typeinfo
+@item --dynamic-list-cpp-typeinfo
+Provide the builtin dynamic list for C++ runtime type identification.
+
@kindex --check-sections
@kindex --no-check-sections
@item --check-sections
@itemx --no-check-sections
Asks the linker @emph{not} to check section addresses after they have
-been assigned to see if there any overlaps. Normally the linker will
+been assigned to see if there are any overlaps. Normally the linker will
perform this check, and if it finds any overlaps it will produce
suitable error messages. The linker does know about, and does make
allowances for sections in overlays. The default behaviour can be
@@ -1113,15 +1254,6 @@ generating dynamically linked ELF executables. The default dynamic
linker is normally correct; don't use this unless you know what you are
doing.
-@cindex MIPS embedded PIC code
-@kindex --embedded-relocs
-@item --embedded-relocs
-This option is only meaningful when linking MIPS embedded PIC code,
-generated by the -membedded-pic option to the @sc{gnu} compiler and
-assembler. It causes the linker to create a table which may be used at
-runtime to relocate any data which was statically initialized to pointer
-values. See the code in testsuite/ld-empic for details.
-
@kindex --fatal-warnings
@item --fatal-warnings
@@ -1141,13 +1273,25 @@ it ends in a @code{.exe} suffix.
@kindex --gc-sections
@kindex --no-gc-sections
@cindex garbage collection
-@item --no-gc-sections
-@itemx --gc-sections
+@item --gc-sections
+@itemx --no-gc-sections
Enable garbage collection of unused input sections. It is ignored on
targets that do not support this option. This option is not compatible
-with @samp{-r}, nor should it be used with dynamic linking. The default
-behaviour (of not performing this garbage collection) can be restored by
-specifying @samp{--no-gc-sections} on the command line.
+with @samp{-r} or @samp{--emit-relocs}. The default behaviour (of not
+performing this garbage collection) can be restored by specifying
+@samp{--no-gc-sections} on the command line.
+
+@kindex --print-gc-sections
+@kindex --no-print-gc-sections
+@cindex garbage collection
+@item --print-gc-sections
+@itemx --no-print-gc-sections
+List all sections removed by garbage collection. The listing is
+printed on stderr. This option is only effective if garbage
+collection has been enabled via the @samp{--gc-sections}) option. The
+default behaviour (of not listing the sections that are removed) can
+be restored by specifying @samp{--no-print-gc-sections} on the command
+line.
@cindex help
@cindex usage
@@ -1181,7 +1325,7 @@ Report unresolved symbol references from regular object files. This
is done even if the linker is creating a non-symbolic shared library.
The switch @option{--[no-]allow-shlib-undefined} controls the
behaviour for reporting unresolved references found in shared
-libraries being linked in.
+libraries being linked in.
@kindex --allow-multiple-definition
@kindex -z muldefs
@@ -1206,7 +1350,7 @@ the shared library being specified at link time may not be the same as
the one that is available at load time, so the symbols might actually be
resolvable at load time. Plus there are some systems, (eg BeOS) where
undefined symbols in shared libraries is normal. (The kernel patches
-them at load time to select which function is most appropriate
+them at load time to select which function is most appropriate
for the current architecture. This is used for example to dynamically
select an appropriate memset function). Apparently it is also normal
for HPPA shared libraries to have undefined symbols.
@@ -1217,6 +1361,16 @@ Normally when a symbol has an undefined version, the linker will ignore
it. This option disallows symbols with undefined version and a fatal error
will be issued instead.
+@kindex --default-symver
+@item --default-symver
+Create and use a default symbol version (the soname) for unversioned
+exported symbols.
+
+@kindex --default-imported-symver
+@item --default-imported-symver
+Create and use a default symbol version (the soname) for unversioned
+imported symbols.
+
@kindex --no-warn-mismatch
@item --no-warn-mismatch
Normally @command{ld} will give an error if you try to link together input
@@ -1227,6 +1381,11 @@ 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-warn-search-mismatch
+@item --no-warn-search-mismatch
+Normally @command{ld} will give a warning if it finds an incompatible
+library during a library search. This option silences the warning.
+
@kindex --no-whole-archive
@item --no-whole-archive
Turn off the effect of the @option{--whole-archive} option for subsequent
@@ -1299,6 +1458,12 @@ This option is only supported on a few targets.
@ifset XTENSA
@xref{Xtensa,, @command{ld} and Xtensa Processors}.
@end ifset
+@ifset M68HC11
+@xref{M68HC11/68HC12,,@command{ld} and the 68HC11 and 68HC12}.
+@end ifset
+@ifset POWERPC
+@xref{PowerPC ELF32,,@command{ld} and PowerPC 32-bit ELF Support}.
+@end ifset
On some platforms, the @samp{--relax} option performs global
optimizations that become possible when the linker resolves addressing
@@ -1356,7 +1521,7 @@ SunOS, the linker will form a runtime search patch out of all the
runtime search path will be formed exclusively using the @option{-rpath}
options, ignoring the @option{-L} options. This can be useful when using
gcc, which adds many @option{-L} options which may be on NFS mounted
-filesystems.
+file systems.
For compatibility with other ELF linkers, if the @option{-R} option is
followed by a directory name, rather than a file name, it is treated as
@@ -1386,7 +1551,7 @@ is possible to use unintentionally a different search path than the
runtime linker would do.
The linker uses the following search paths to locate required shared
-libraries.
+libraries:
@enumerate
@item
Any directories specified by @option{-rpath-link} options.
@@ -1395,7 +1560,9 @@ Any directories specified by @option{-rpath} options. The difference
between @option{-rpath} and @option{-rpath-link} is that directories
specified by @option{-rpath} options are included in the executable and
used at runtime, whereas the @option{-rpath-link} option is only effective
-at link time. It is for the native linker only.
+at link time. Searching @option{-rpath} in this way is only supported
+by native linkers and cross linkers which have been configured with
+the @option{--with-sysroot} option.
@item
On an ELF system, if the @option{-rpath} and @code{rpath-link} options
were not used, search the contents of the environment variable
@@ -1440,6 +1607,16 @@ byte symbols, then all the two byte, then all the four byte, and then
everything else. This is to prevent gaps between symbols due to
alignment constraints.
+@kindex --sort-section name
+@item --sort-section name
+This option will apply @code{SORT_BY_NAME} to all wildcard section
+patterns in the linker script.
+
+@kindex --sort-section alignment
+@item --sort-section alignment
+This option will apply @code{SORT_BY_ALIGNMENT} to all wildcard section
+patterns in the linker script.
+
@kindex --split-by-file
@item --split-by-file [@var{size}]
Similar to @option{--split-by-reloc} but creates a new output section for
@@ -1464,6 +1641,12 @@ many relocations. @var{count} defaults to a value of 32768.
Compute and display statistics about the operation of the linker, such
as execution time and memory usage.
+@kindex --sysroot
+@item --sysroot=@var{directory}
+Use @var{directory} as the location of the sysroot, overriding the
+configure-time default. This option is only supported by linkers
+that were configured using @option{--with-sysroot}.
+
@kindex --traditional-format
@cindex traditional format
@item --traditional-format
@@ -1671,6 +1854,10 @@ The address will only be changed if it not explicitly specified; that
is, if the @code{SECTIONS} command does not specify a start address for
the section (@pxref{SECTIONS}).
+@kindex --warn-shared-textrel
+@item --warn-shared-textrel
+Warn if the linker adds a DT_TEXTREL to a shared object.
+
@kindex --warn-unresolved-symbols
@item --warn-unresolved-symbols
If the linker is going to report an unresolved symbol (see the option
@@ -1732,6 +1919,11 @@ you should not put the definition of @code{__real_malloc} in the same
file as @code{__wrap_malloc}; if you do, the assembler may resolve the
call before the linker has a chance to wrap it to @code{malloc}.
+@kindex --eh-frame-hdr
+@item --eh-frame-hdr
+Request creation of @code{.eh_frame_hdr} section and ELF
+@code{PT_GNU_EH_FRAME} segment header.
+
@kindex --enable-new-dtags
@kindex --disable-new-dtags
@item --enable-new-dtags
@@ -1743,6 +1935,37 @@ If you specify @option{--disable-new-dtags}, no new dynamic tags will be
created. By default, the new dynamic tags are not created. Note that
those options are only available for ELF systems.
+@kindex --hash-size=@var{number}
+@item --hash-size=@var{number}
+Set the default size of the linker's hash tables to a prime number
+close to @var{number}. Increasing this value can reduce the length of
+time it takes the linker to perform its tasks, at the expense of
+increasing the linker's memory requirements. Similarly reducing this
+value can reduce the memory requirements at the expense of speed.
+
+@kindex --hash-style=@var{style}
+@item --hash-style=@var{style}
+Set the type of linker's hash table(s). @var{style} can be either
+@code{sysv} for classic ELF @code{.hash} section, @code{gnu} for
+new style GNU @code{.gnu.hash} section or @code{both} for both
+the classic ELF @code{.hash} and new style GNU @code{.gnu.hash}
+hash tables. The default is @code{sysv}.
+
+@kindex --reduce-memory-overheads
+@item --reduce-memory-overheads
+This option reduces memory requirements at ld runtime, at the expense of
+linking speed. This was introduced to select the old O(n^2) algorithm
+for link map file generation, rather than the new O(n) algorithm which uses
+about 40% more memory for symbol storage.
+
+Another effect of the switch is to set the default hash table size to
+1021, which again saves memory at the cost of lengthening the linker's
+run time. This is not done however if the @option{--hash-size} switch
+has been used.
+
+The @option{--reduce-memory-overheads} switch may be also be used to
+enable other tradeoffs in future versions of the linker.
+
@end table
@c man end
@@ -1815,22 +2038,22 @@ otherwise wouldn't be any exported symbols. When symbols are
explicitly exported via DEF files or implicitly exported via function
attributes, the default is to not export anything else unless this
option is given. Note that the symbols @code{DllMain@@12},
-@code{DllEntryPoint@@0}, @code{DllMainCRTStartup@@12}, and
+@code{DllEntryPoint@@0}, @code{DllMainCRTStartup@@12}, and
@code{impure_ptr} will not be automatically
-exported. Also, symbols imported from other DLLs will not be
-re-exported, nor will symbols specifying the DLL's internal layout
-such as those beginning with @code{_head_} or ending with
-@code{_iname}. In addition, no symbols from @code{libgcc},
+exported. Also, symbols imported from other DLLs will not be
+re-exported, nor will symbols specifying the DLL's internal layout
+such as those beginning with @code{_head_} or ending with
+@code{_iname}. In addition, no symbols from @code{libgcc},
@code{libstd++}, @code{libmingw32}, or @code{crtX.o} will be exported.
Symbols whose names begin with @code{__rtti_} or @code{__builtin_} will
not be exported, to help with C++ DLLs. Finally, there is an
-extensive list of cygwin-private symbols that are not exported
+extensive list of cygwin-private symbols that are not exported
(obviously, this applies on when building DLLs for cygwin targets).
-These cygwin-excludes are: @code{_cygwin_dll_entry@@12},
+These cygwin-excludes are: @code{_cygwin_dll_entry@@12},
@code{_cygwin_crt0_common@@8}, @code{_cygwin_noncygwin_dll_entry@@12},
-@code{_fmode}, @code{_impure_ptr}, @code{cygwin_attach_dll},
+@code{_fmode}, @code{_impure_ptr}, @code{cygwin_attach_dll},
@code{cygwin_premain0}, @code{cygwin_premain1}, @code{cygwin_premain2},
-@code{cygwin_premain3}, and @code{environ}.
+@code{cygwin_premain3}, and @code{environ}.
[This option is specific to the i386 PE targeted port of the linker]
@kindex --exclude-symbols
@@ -1839,15 +2062,6 @@ Specifies a list of symbols which should not be automatically
exported. The symbol names may be delimited by commas or colons.
[This option is specific to the i386 PE targeted port of the linker]
-@kindex --exclude-libs
-@item --exclude-libs @var{lib},@var{lib},...
-Specifies a list of archive libraries from which symbols should not be automatically
-exported. The library names may be delimited by commas or colons. Specifying
-@code{--exclude-libs ALL} excludes symbols in all archive libraries from
-automatic export. Symbols explicitly listed in a .def file are still exported,
-regardless of this option.
-[This option is specific to the i386 PE targeted port of the linker]
-
@kindex --file-alignment
@item --file-alignment
Specify the file alignment. Sections in the file will always begin at
@@ -1881,6 +2095,15 @@ If given, the stdcall suffixes (@@@var{nn}) will be stripped from
symbols before they are exported.
[This option is specific to the i386 PE targeted port of the linker]
+@kindex --large-address-aware
+@item --large-address-aware
+If given, the appropriate bit in the ``Characteristics'' field of the COFF
+header is set to indicate that this executable supports virtual addresses
+greater than 2 gigabytes. This should be used in conjunction with the /3GB
+or /USERVA=@var{value} megabytes switch in the ``[operating systems]''
+section of the BOOT.INI. Otherwise, this bit has no effect.
+[This option is specific to PE targeted ports of the linker]
+
@kindex --major-image-version
@item --major-image-version @var{value}
Sets the major number of the ``image version''. Defaults to 1.
@@ -1953,17 +2176,17 @@ default.
@kindex --dll-search-prefix
@item --dll-search-prefix @var{string}
When linking dynamically to a dll without an import library,
-search for @code{<string><basename>.dll} in preference to
+search for @code{<string><basename>.dll} in preference to
@code{lib<basename>.dll}. This behaviour allows easy distinction
between DLLs built for the various "subplatforms": native, cygwin,
uwin, pw, etc. For instance, cygwin DLLs typically use
-@code{--dll-search-prefix=cyg}.
+@code{--dll-search-prefix=cyg}.
[This option is specific to the i386 PE targeted port of the linker]
@kindex --enable-auto-import
@item --enable-auto-import
-Do sophisticated linking of @code{_symbol} to @code{__imp__symbol} for
-DATA imports from DLLs, and create the necessary thunking symbols when
+Do sophisticated linking of @code{_symbol} to @code{__imp__symbol} for
+DATA imports from DLLs, and create the necessary thunking symbols when
building the import libraries with those DATA exports. Note: Use of the
'auto-import' extension will cause the text section of the image file
to be made writable. This does not conform to the PE-COFF format
@@ -1972,11 +2195,11 @@ specification published by Microsoft.
Using 'auto-import' generally will 'just work' -- but sometimes you may
see this message:
-"variable '<var>' can't be auto-imported. Please read the
+"variable '<var>' can't be auto-imported. Please read the
documentation for ld's @code{--enable-auto-import} for details."
-This message occurs when some (sub)expression accesses an address
-ultimately given by the sum of two constants (Win32 import tables only
+This message occurs when some (sub)expression accesses an address
+ultimately given by the sum of two constants (Win32 import tables only
allow one). Instances where this may occur include accesses to member
fields of struct variables imported from a DLL, as well as using a
constant index into an array variable imported from a DLL. Any
@@ -2131,14 +2354,43 @@ committed.
@itemx --subsystem @var{which}:@var{major}.@var{minor}
Specifies the subsystem under which your program will execute. The
legal values for @var{which} are @code{native}, @code{windows},
-@code{console}, and @code{posix}. You may optionally set the
-subsystem version also.
+@code{console}, @code{posix}, and @code{xbox}. You may optionally set
+the subsystem version also. Numeric values are also accepted for
+@var{which}.
[This option is specific to the i386 PE targeted port of the linker]
@end table
@c man end
+@ifset M68HC11
+@subsection Options specific to Motorola 68HC11 and 68HC12 targets
+
+@c man begin OPTIONS
+
+The 68HC11 and 68HC12 linkers support specific options to control the
+memory bank switching mapping and trampoline code generation.
+
+@table @gcctabopt
+
+@kindex --no-trampoline
+@item --no-trampoline
+This option disables the generation of trampoline. By default a trampoline
+is generated for each far function which is called using a @code{jsr}
+instruction (this happens when a pointer to a far function is taken).
+
+@kindex --bank-window
+@item --bank-window @var{name}
+This option indicates to the linker the name of the memory region in
+the @samp{MEMORY} specification that describes the memory bank window.
+The definition of such region is then used by the linker to compute
+paging and addresses within the memory window.
+
+@end table
+
+@c man end
+@end ifset
+
@ifset UsesEnvVars
@node Environment
@section Environment Variables
@@ -2365,7 +2617,7 @@ at address @samp{0x8000000}. After the linker places the @samp{.data}
output section, the value of the location counter will be
@samp{0x8000000} plus the size of the @samp{.data} output section. The
effect is that the linker will place the @samp{.bss} output section
-immediately after the @samp{.data} output section in memory
+immediately after the @samp{.data} output section in memory.
The linker will ensure that each output section has the required
alignment, by increasing the location counter if necessary. In this
@@ -2475,9 +2727,21 @@ files should all be archives, and they are searched repeatedly until no
new undefined references are created. See the description of @samp{-(}
in @ref{Options,,Command Line Options}.
+@item AS_NEEDED(@var{file}, @var{file}, @dots{})
+@itemx AS_NEEDED(@var{file} @var{file} @dots{})
+@kindex AS_NEEDED(@var{files})
+This construct can appear only inside of the @code{INPUT} or @code{GROUP}
+commands, among other filenames. The files listed will be handled
+as if they appear directly in the @code{INPUT} or @code{GROUP} commands,
+with the exception of ELF shared libraries, that will be added only
+when they are actually needed. This construct essentially enables
+@option{--as-needed} option for all the files listed inside of it
+and restores previous @option{--as-needed} resp. @option{--no-as-needed}
+setting afterwards.
+
@item OUTPUT(@var{filename})
@kindex OUTPUT(@var{filename})
-@cindex output file name in linker scripot
+@cindex output file name in linker script
The @code{OUTPUT} command names the output file. Using
@code{OUTPUT(@var{filename})} in the linker script is exactly like using
@samp{-o @var{filename}} on the command line (@pxref{Options,,Command
@@ -2627,11 +2891,13 @@ the @samp{-f} option.
@cindex symbol definition, scripts
@cindex variables, defining
You may assign a value to a symbol in a linker script. This will define
-the symbol as a global symbol.
+the symbol and place it into the symbol table with a global scope.
@menu
* Simple Assignments:: Simple Assignments
* PROVIDE:: PROVIDE
+* PROVIDE_HIDDEN:: PROVIDE_HIDDEN
+* Source Code Reference:: How to use a linker script defined symbol in source code
@end menu
@node Simple Assignments
@@ -2656,7 +2922,7 @@ The first case will define @var{symbol} to the value of
defined, and the value will be adjusted accordingly.
The special symbol name @samp{.} indicates the location counter. You
-may only use this within a @code{SECTIONS} command.
+may only use this within a @code{SECTIONS} command. @xref{Location Counter}.
The semicolon after @var{expression} is required.
@@ -2724,6 +2990,119 @@ underscore), the linker will silently use the definition in the program.
If the program references @samp{etext} but does not define it, the
linker will use the definition in the linker script.
+@node PROVIDE_HIDDEN
+@subsection PROVIDE_HIDDEN
+@cindex PROVIDE_HIDDEN
+Similar to @code{PROVIDE}. For ELF targeted ports, the symbol will be
+hidden and won't be exported.
+
+@node Source Code Reference
+@subsection Source Code Reference
+
+Accessing a linker script defined variable from source code is not
+intuitive. In particular a linker script symbol is not equivalent to
+a variable declaration in a high level language, it is instead a
+symbol that does not have a value.
+
+Before going further, it is important to note that compilers often
+transform names in the source code into different names when they are
+stored in the symbol table. For example, Fortran compilers commonly
+prepend or append an underscore, and C++ performs extensive @samp{name
+mangling}. Therefore there might be a discrepancy between the name
+of a variable as it is used in source code and the name of the same
+variable as it is defined in a linker script. For example in C a
+linker script variable might be referred to as:
+
+@smallexample
+ extern int foo;
+@end smallexample
+
+But in the linker script it might be defined as:
+
+@smallexample
+ _foo = 1000;
+@end smallexample
+
+In the remaining examples however it is assumed that no name
+transformation has taken place.
+
+When a symbol is declared in a high level language such as C, two
+things happen. The first is that the compiler reserves enough space
+in the program's memory to hold the @emph{value} of the symbol. The
+second is that the compiler creates an entry in the program's symbol
+table which holds the symbol's @emph{address}. ie the symbol table
+contains the address of the block of memory holding the symbol's
+value. So for example the following C declaration, at file scope:
+
+@smallexample
+ int foo = 1000;
+@end smallexample
+
+creates a entry called @samp{foo} in the symbol table. This entry
+holds the address of an @samp{int} sized block of memory where the
+number 1000 is initially stored.
+
+When a program references a symbol the compiler generates code that
+first accesses the symbol table to find the address of the symbol's
+memory block and then code to read the value from that memory block.
+So:
+
+@smallexample
+ foo = 1;
+@end smallexample
+
+looks up the symbol @samp{foo} in the symbol table, gets the address
+associated with this symbol and then writes the value 1 into that
+address. Whereas:
+
+@smallexample
+ int * a = & foo;
+@end smallexample
+
+looks up the symbol @samp{foo} in the symbol table, gets it address
+and then copies this address into the block of memory associated with
+the variable @samp{a}.
+
+Linker scripts symbol declarations, by contrast, create an entry in
+the symbol table but do not assign any memory to them. Thus they are
+an address without a value. So for example the linker script definition:
+
+@smallexample
+ foo = 1000;
+@end smallexample
+
+creates an entry in the symbol table called @samp{foo} which holds
+the address of memory location 1000, but nothing special is stored at
+address 1000. This means that you cannot access the @emph{value} of a
+linker script defined symbol - it has no value - all you can do is
+access the @emph{address} of a linker script defined symbol.
+
+Hence when you are using a linker script defined symbol in source code
+you should always take the address of the symbol, and never attempt to
+use its value. For example suppose you want to copy the contents of a
+section of memory called .ROM into a section called .FLASH and the
+linker script contains these declarations:
+
+@smallexample
+@group
+ start_of_ROM = .ROM;
+ end_of_ROM = .ROM + sizeof (.ROM) - 1;
+ start_of_FLASH = .FLASH;
+@end group
+@end smallexample
+
+Then the C source code to perform the copy would be:
+
+@smallexample
+@group
+ extern char start_of_ROM, end_of_ROM, start_of_FLASH;
+
+ memcpy (& start_of_FLASH, & start_of_ROM, & end_of_ROM - & start_of_ROM);
+@end group
+@end smallexample
+
+Note the use of the @samp{&} operators. These are correct.
+
@node SECTIONS
@section SECTIONS Command
@kindex SECTIONS
@@ -2787,7 +3166,7 @@ The full description of an output section looks like this:
@smallexample
@group
@var{section} [@var{address}] [(@var{type})] :
- [AT(@var{lma})] [SUBALIGN(@var{subsection_align})]
+ [AT(@var{lma})] [ALIGN(@var{section_align})] [SUBALIGN(@var{subsection_align})]
@{
@var{output-section-command}
@var{output-section-command}
@@ -2834,7 +3213,7 @@ The output section name @samp{/DISCARD/} is special; @ref{Output Section
Discarding}.
@node Output Section Address
-@subsection Output Section Description
+@subsection Output Section Address
@cindex address, section
@cindex section address
The @var{address} is an expression for the VMA (the virtual memory
@@ -3008,14 +3387,66 @@ sequence of input section descriptions is probably in error, because the
.data1 : @{ data.o(.data) @}
@end smallexample
-@cindex SORT
+@cindex SORT_BY_NAME
Normally, the linker will place files and sections matched by wildcards
in the order in which they are seen during the link. You can change
-this by using the @code{SORT} keyword, which appears before a wildcard
-pattern in parentheses (e.g., @code{SORT(.text*)}). When the
-@code{SORT} keyword is used, the linker will sort the files or sections
+this by using the @code{SORT_BY_NAME} keyword, which appears before a wildcard
+pattern in parentheses (e.g., @code{SORT_BY_NAME(.text*)}). When the
+@code{SORT_BY_NAME} keyword is used, the linker will sort the files or sections
into ascending order by name before placing them in the output file.
+@cindex SORT_BY_ALIGNMENT
+@code{SORT_BY_ALIGNMENT} is very similar to @code{SORT_BY_NAME}. The
+difference is @code{SORT_BY_ALIGNMENT} will sort sections into
+ascending order by alignment before placing them in the output file.
+
+@cindex SORT
+@code{SORT} is an alias for @code{SORT_BY_NAME}.
+
+When there are nested section sorting commands in linker script, there
+can be at most 1 level of nesting for section sorting commands.
+
+@enumerate
+@item
+@code{SORT_BY_NAME} (@code{SORT_BY_ALIGNMENT} (wildcard section pattern)).
+It will sort the input sections by name first, then by alignment if 2
+sections have the same name.
+@item
+@code{SORT_BY_ALIGNMENT} (@code{SORT_BY_NAME} (wildcard section pattern)).
+It will sort the input sections by alignment first, then by name if 2
+sections have the same alignment.
+@item
+@code{SORT_BY_NAME} (@code{SORT_BY_NAME} (wildcard section pattern)) is
+treated the same as @code{SORT_BY_NAME} (wildcard section pattern).
+@item
+@code{SORT_BY_ALIGNMENT} (@code{SORT_BY_ALIGNMENT} (wildcard section pattern))
+is treated the same as @code{SORT_BY_ALIGNMENT} (wildcard section pattern).
+@item
+All other nested section sorting commands are invalid.
+@end enumerate
+
+When both command line section sorting option and linker script
+section sorting command are used, section sorting command always
+takes precedence over the command line option.
+
+If the section sorting command in linker script isn't nested, the
+command line option will make the section sorting command to be
+treated as nested sorting command.
+
+@enumerate
+@item
+@code{SORT_BY_NAME} (wildcard section pattern ) with
+@option{--sort-sections alignment} is equivalent to
+@code{SORT_BY_NAME} (@code{SORT_BY_ALIGNMENT} (wildcard section pattern)).
+@item
+@code{SORT_BY_ALIGNMENT} (wildcard section pattern) with
+@option{--sort-section name} is equivalent to
+@code{SORT_BY_ALIGNMENT} (@code{SORT_BY_NAME} (wildcard section pattern)).
+@end enumerate
+
+If the section sorting command in linker script is nested, the
+command line option will be ignored.
+
If you ever get confused about where input sections are going, use the
@samp{-M} linker option to generate a map file. The map file shows
precisely how input sections are mapped to output sections.
@@ -3081,7 +3512,7 @@ When link-time garbage collection is in use (@samp{--gc-sections}),
it is often useful to mark sections that should not be eliminated.
This is accomplished by surrounding an input section's wildcard entry
with @code{KEEP()}, as in @code{KEEP(*(.init))} or
-@code{KEEP(SORT(*)(.ctors))}.
+@code{KEEP(SORT_BY_NAME(*)(.ctors))}.
@node Input Section Example
@subsubsection Input Section Example
@@ -3231,7 +3662,9 @@ linker to place constructor information in the output section where the
ignored for other object file formats.
The symbol @w{@code{__CTOR_LIST__}} marks the start of the global
-constructors, and the symbol @w{@code{__DTOR_LIST}} marks the end. The
+constructors, and the symbol @w{@code{__CTOR_END__}} marks the end.
+Similarly, @w{@code{__DTOR_LIST__}} and @w{@code{__DTOR_END__}} mark
+the start and end of the global destructors. The
first word in the list is the number of entries, followed by the address
of each constructor or destructor, followed by a zero word. The
compiler must arrange to actually run the code. For these object file
@@ -3265,9 +3698,9 @@ If you are using the @sc{gnu} C++ support for initialization priority,
which provides some control over the order in which global constructors
are run, you must sort the constructors at link time to ensure that they
are executed in the correct order. When using the @code{CONSTRUCTORS}
-command, use @samp{SORT(CONSTRUCTORS)} instead. When using the
-@code{.ctors} and @code{.dtors} sections, use @samp{*(SORT(.ctors))} and
-@samp{*(SORT(.dtors))} instead of just @samp{*(.ctors)} and
+command, use @samp{SORT_BY_NAME(CONSTRUCTORS)} instead. When using the
+@code{.ctors} and @code{.dtors} sections, use @samp{*(SORT_BY_NAME(.ctors))} and
+@samp{*(SORT_BY_NAME(.dtors))} instead of just @samp{*(.ctors)} and
@samp{*(.dtors)}.
Normally the compiler and linker will handle these issues automatically,
@@ -3282,19 +3715,23 @@ scripts.
@cindex discarding sections
@cindex sections, discarding
@cindex removing sections
-The linker will not create output section which do not have any
-contents. This is for convenience when referring to input sections that
-may or may not be present in any of the input files. For example:
+The linker will not create output sections with no contents. This is
+for convenience when referring to input sections that may or may not
+be present in any of the input files. For example:
@smallexample
-.foo @{ *(.foo) @}
+.foo : @{ *(.foo) @}
@end smallexample
@noindent
will only create a @samp{.foo} section in the output file if there is a
-@samp{.foo} section in at least one input file.
+@samp{.foo} section in at least one input file, and if the input
+sections are not all empty. Other link script directives that allocate
+space in an output section will also create the output section.
-If you use anything other than an input section description as an output
-section command, such as a symbol assignment, then the output section
-will always be created, even if there are no matching input sections.
+The linker will ignore address assignments (@pxref{Output Section Address})
+on discarded output sections, except when the linker script defines
+symbols in the output section. In that case the linker will obey
+the address assignments, possibly advancing dot even though the
+section is discarded.
@cindex /DISCARD/
The special output section name @samp{/DISCARD/} may be used to discard
@@ -3309,7 +3746,7 @@ like this:
@smallexample
@group
@var{section} [@var{address}] [(@var{type})] :
- [AT(@var{lma})] [SUBALIGN(@var{subsection_align})]
+ [AT(@var{lma})] [ALIGN(@var{section_align})] [SUBALIGN(@var{subsection_align})]
@{
@var{output-section-command}
@var{output-section-command}
@@ -3324,6 +3761,7 @@ remaining section attributes.
@menu
* Output Section Type:: Output section type
* Output Section LMA:: Output section LMA
+* Forced Output Alignment:: Forced Output Alignment
* Forced Input Alignment:: Forced Input Alignment
* Output Section Region:: Output section region
* Output Section Phdr:: Output section phdr
@@ -3378,15 +3816,20 @@ Every section has a virtual address (VMA) and a load address (LMA); see
an output section description sets the VMA (@pxref{Output Section
Address}).
-The linker will normally set the LMA equal to the VMA. You can change
-that by using the @code{AT} keyword. The expression @var{lma} that
-follows the @code{AT} keyword specifies the load address of the
-section.
+The expression @var{lma} that follows the @code{AT} keyword specifies
+the load address of the section.
Alternatively, with @samp{AT>@var{lma_region}} expression, you may
specify a memory region for the section's load address. @xref{MEMORY}.
Note that if the section has not had a VMA assigned to it then the
linker will use the @var{lma_region} as the VMA region as well.
+
+If neither @code{AT} nor @code{AT>} is specified for an allocatable
+section, the linker will set the LMA such that the difference between
+VMA and LMA for the section is the same as the preceding output
+section in the same region. If there is no preceding output section
+or the section is not allocatable, the linker will set the LMA equal
+to the VMA.
@xref{Output Section Region}.
@cindex ROM initialized data
@@ -3437,6 +3880,13 @@ for (dst = &_bstart; dst< &_bend; dst++)
@end group
@end smallexample
+@node Forced Output Alignment
+@subsubsection Forced Output Alignment
+@kindex ALIGN(@var{section_align})
+@cindex forcing output section alignment
+@cindex output section alignment
+You can increase an output section's alignment by using ALIGN.
+
@node Forced Input Alignment
@subsubsection Forced Input Alignment
@kindex SUBALIGN(@var{subsection_align})
@@ -3568,7 +4018,7 @@ section to refer directly to another. @xref{Miscellaneous Commands,
NOCROSSREFS}.
For each section within the @code{OVERLAY}, the linker automatically
-defines two symbols. The symbol @code{__load_start_@var{secname}} is
+provides two symbols. The symbol @code{__load_start_@var{secname}} is
defined as the starting load address of the section. The symbol
@code{__load_stop_@var{secname}} is defined as the final load address of
the section. Any characters within @var{secname} which are not legal
@@ -3593,7 +4043,7 @@ Here is an example. Remember that this would appear inside a
This will define both @samp{.text0} and @samp{.text1} to start at
address 0x1000. @samp{.text0} will be loaded at address 0x4000, and
@samp{.text1} will be loaded immediately after @samp{.text0}. The
-following symbols will be defined: @code{__load_start_text0},
+following symbols will be defined if referenced: @code{__load_start_text0},
@code{__load_stop_text0}, @code{__load_start_text1},
@code{__load_stop_text1}.
@@ -3615,11 +4065,11 @@ example could have been written identically as follows.
@smallexample
@group
.text0 0x1000 : AT (0x4000) @{ o1/*.o(.text) @}
- __load_start_text0 = LOADADDR (.text0);
- __load_stop_text0 = LOADADDR (.text0) + SIZEOF (.text0);
+ PROVIDE (__load_start_text0 = LOADADDR (.text0));
+ PROVIDE (__load_stop_text0 = LOADADDR (.text0) + SIZEOF (.text0));
.text1 0x1000 : AT (0x4000 + SIZEOF (.text0)) @{ o2/*.o(.text) @}
- __load_start_text1 = LOADADDR (.text1);
- __load_stop_text1 = LOADADDR (.text1) + SIZEOF (.text1);
+ PROVIDE (__load_start_text1 = LOADADDR (.text1));
+ PROVIDE (__load_stop_text1 = LOADADDR (.text1) + SIZEOF (.text1));
. = 0x1000 + MAX (SIZEOF (.text0), SIZEOF (.text1));
@end group
@end smallexample
@@ -3697,19 +4147,19 @@ attributes.
@kindex ORIGIN =
@kindex o =
@kindex org =
-The @var{origin} is an expression for the start address of the memory
-region. The expression must evaluate to a constant before memory
-allocation is performed, which means that you may not use any section
-relative symbols. The keyword @code{ORIGIN} may be abbreviated to
-@code{org} or @code{o} (but not, for example, @code{ORG}).
+The @var{origin} is an numerical expression for the start address of
+the memory region. The expression must evaluate to a constant and it
+cannot involve any symbols. The keyword @code{ORIGIN} may be
+abbreviated to @code{org} or @code{o} (but not, for example,
+@code{ORG}).
@kindex LENGTH =
@kindex len =
@kindex l =
The @var{len} is an expression for the size in bytes of the memory
region. As with the @var{origin} expression, the expression must
-evaluate to a constant before memory allocation is performed. The
-keyword @code{LENGTH} may be abbreviated to @code{len} or @code{l}.
+be numerical only and must evaluate to a constant. The keyword
+@code{LENGTH} may be abbreviated to @code{len} or @code{l}.
In the following example, we specify that there are two memory regions
available for allocation: one starting at @samp{0} for 256 kilobytes,
@@ -3740,6 +4190,16 @@ the next available address within the memory region. If the combined
output sections directed to a memory region are too large for the
region, the linker will issue an error message.
+It is possible to access the origin and length of a memory in an
+expression via the @code{ORIGIN(@var{memory})} and
+@code{LENGTH(@var{memory})} functions:
+
+@smallexample
+@group
+ _fstack = ORIGIN(ram) + LENGTH(ram) - 4;
+@end group
+@end smallexample
+
@node PHDRS
@section PHDRS Command
@kindex PHDRS
@@ -3937,6 +4397,10 @@ VERS_1.2 @{
VERS_2.0 @{
bar1; bar2;
+ extern "C++" @{
+ ns::*;
+ "int f(int, double)";
+ @}
@} VERS_1.2;
@end smallexample
@@ -3948,6 +4412,8 @@ of the shared library; this is done using wildcard patterns, so that any
symbol whose name begins with @samp{old}, @samp{original}, or @samp{new}
is matched. The wildcard patterns available are the same as those used
in the shell when matching filenames (also known as ``globbing'').
+However, if you specify the symbol name inside double quotes, then the
+name is treated as literal, rather than as a glob pattern.
Next, the version script defines node @samp{VERS_1.2}. This node
depends upon @samp{VERS_1.1}. The script binds the symbol @samp{foo2}
@@ -3968,7 +4434,7 @@ they might suggest to the person reading them. The @samp{2.0} version
could just as well have appeared in between @samp{1.1} and @samp{1.2}.
However, this would be a confusing way to write a version script.
-Node name can be omited, provided it is the only version node
+Node name can be omitted, provided it is the only version node
in the version script. Such version script doesn't assign any versions to
symbols, only selects which symbols will be globally visible out and which
won't.
@@ -4057,6 +4523,16 @@ The linker will iterate over the list of symbols at the link time and
demangle them according to @samp{lang} before matching them to the
patterns specified in @samp{version-script-commands}.
+Demangled names may contains spaces and other special characters. As
+described above, you can use a glob pattern to match demangled names,
+or you can use a double-quoted string to match the string exactly. In
+the latter case, be aware that minor differences (such as differing
+whitespace) between the version script and the demangler output will
+cause a mismatch. As the exact string generated by the demangler
+might change in the future, even if the mangled name does not, you
+should check that all of your version directives are behaving as you
+expect when you upgrade.
+
@node Expressions
@section Expressions in Linker Scripts
@cindex expressions
@@ -4074,6 +4550,7 @@ expressions.
@menu
* Constants:: Constants
* Symbols:: Symbol Names
+* Orphan Sections:: Orphan Sections
* Location Counter:: The Location Counter
* Operators:: Operators
* Evaluation:: Evaluation
@@ -4135,6 +4612,22 @@ Since symbols can contain many non-alphabetic characters, it is safest
to delimit symbols with spaces. For example, @samp{A-B} is one symbol,
whereas @samp{A - B} is an expression involving subtraction.
+@node Orphan Sections
+@subsection Orphan Sections
+@cindex orphan
+Orphan sections are sections present in the input files which
+are not explicitly placed into the output file by the linker
+script. The linker will still copy these sections into the
+output file, but it has to guess as to where they should be
+placed. The linker uses a simple heuristic to do this. It
+attempts to place orphan sections after non-orphan sections of the
+same attribute, such as code vs data, loadable vs non-loadable, etc.
+If there is not enough room to do this then it places
+at the end of the file.
+
+For ELF targets, the attribute of the section includes section type as
+well as section flag.
+
@node Location Counter
@subsection The Location Counter
@kindex .
@@ -4150,7 +4643,9 @@ anywhere that an ordinary symbol is allowed in an expression.
@cindex holes
Assigning a value to @code{.} will cause the location counter to be
moved. This may be used to create holes in the output section. The
-location counter may never be moved backwards.
+location counter may not be moved backwards inside an output section,
+and may not be moved backwards outside of an output section if so
+doing creates areas with overlapping LMAs.
@smallexample
SECTIONS
@@ -4206,6 +4701,74 @@ and it will have an extra 0x600 bytes worth of space after the end of
the values from the @samp{.data} input sections and before the end of
the @samp{.data} output section itself.
+@cindex dot outside sections
+Setting symbols to the value of the location counter outside of an
+output section statement can result in unexpected values if the linker
+needs to place orphan sections. For example, given the following:
+
+@smallexample
+SECTIONS
+@{
+ start_of_text = . ;
+ .text: @{ *(.text) @}
+ end_of_text = . ;
+
+ start_of_data = . ;
+ .data: @{ *(.data) @}
+ end_of_data = . ;
+@}
+@end smallexample
+
+If the linker needs to place some input section, e.g. @code{.rodata},
+not mentioned in the script, it might choose to place that section
+between @code{.text} and @code{.data}. You might think the linker
+should place @code{.rodata} on the blank line in the above script, but
+blank lines are of no particular significance to the linker. As well,
+the linker doesn't associate the above symbol names with their
+sections. Instead, it assumes that all assignments or other
+statements belong to the previous output section, except for the
+special case of an assignment to @code{.}. I.e., the linker will
+place the orphan @code{.rodata} section as if the script was written
+as follows:
+
+@smallexample
+SECTIONS
+@{
+ start_of_text = . ;
+ .text: @{ *(.text) @}
+ end_of_text = . ;
+
+ start_of_data = . ;
+ .rodata: @{ *(.rodata) @}
+ .data: @{ *(.data) @}
+ end_of_data = . ;
+@}
+@end smallexample
+
+This may or may not be the script author's intention for the value of
+@code{start_of_data}. One way to influence the orphan section
+placement is to assign the location counter to itself, as the linker
+assumes that an assignment to @code{.} is setting the start address of
+a following output section and thus should be grouped with that
+section. So you could write:
+
+@smallexample
+SECTIONS
+@{
+ start_of_text = . ;
+ .text: @{ *(.text) @}
+ end_of_text = . ;
+
+ . = . ;
+ start_of_data = . ;
+ .data: @{ *(.data) @}
+ end_of_data = . ;
+@}
+@end smallexample
+
+Now, the orphan @code{.rodata} section will be placed between
+@code{end_of_text} and @code{start_of_data}.
+
@need 2000
@node Operators
@subsection Operators
@@ -4432,6 +4995,25 @@ of @code{ALIGN} is used to defines the value of a symbol.
The builtin function @code{NEXT} is closely related to @code{ALIGN}.
+@item ALIGNOF(@var{section})
+@kindex ALIGNOF(@var{section})
+@cindex section alignment
+Return the alignment in bytes of the named @var{section}, if that section has
+been allocated. If the section has not been allocated when this is
+evaluated, the linker will report an error. In the following example,
+the alignment of the @code{.output} section is stored as the first
+value in that section.
+@smallexample
+@group
+SECTIONS@{ @dots{}
+ .output @{
+ LONG (ALIGNOF (.output))
+ @dots{}
+ @}
+@dots{} @}
+@end group
+@end smallexample
+
@item BLOCK(@var{exp})
@kindex BLOCK(@var{exp})
This is a synonym for @code{ALIGN}, for compatibility with older linker
@@ -4477,6 +5059,21 @@ evaluation purposes.
. = DATA_SEGMENT_END(.);
@end smallexample
+@item DATA_SEGMENT_RELRO_END(@var{offset}, @var{exp})
+@kindex DATA_SEGMENT_RELRO_END(@var{offset}, @var{exp})
+This defines the end of the @code{PT_GNU_RELRO} segment when
+@samp{-z relro} option is used. Second argument is returned.
+When @samp{-z relro} option is not present, @code{DATA_SEGMENT_RELRO_END}
+does nothing, otherwise @code{DATA_SEGMENT_ALIGN} is padded so that
+@var{exp} + @var{offset} is aligned to the most commonly used page
+boundary for particular target. If present in the linker script,
+it must always come in between @code{DATA_SEGMENT_ALIGN} and
+@code{DATA_SEGMENT_END}.
+
+@smallexample
+ . = DATA_SEGMENT_RELRO_END(24, .);
+@end smallexample
+
@item DEFINED(@var{symbol})
@kindex DEFINED(@var{symbol})
@cindex symbol defaults
@@ -4500,6 +5097,10 @@ SECTIONS @{ @dots{}
@end group
@end smallexample
+@item LENGTH(@var{memory})
+@kindex LENGTH(@var{memory})
+Return the length of the memory region named @var{memory}.
+
@item LOADADDR(@var{section})
@kindex LOADADDR(@var{section})
@cindex section load address in expression
@@ -4524,6 +5125,20 @@ This function is closely related to @code{ALIGN(@var{exp})}; unless you
use the @code{MEMORY} command to define discontinuous memory for the
output file, the two functions are equivalent.
+@item ORIGIN(@var{memory})
+@kindex ORIGIN(@var{memory})
+Return the origin of the memory region named @var{memory}.
+
+@item SEGMENT_START(@var{segment}, @var{default})
+@kindex SEGMENT_START(@var{segment}, @var{default})
+Return the base address of the named @var{segment}. If an explicit
+value has been given for this segment (with a command-line @samp{-T}
+option) that value will be returned; otherwise the value will be
+@var{default}. At present, the @samp{-T} command-line option can only
+be used to set the base address for the ``text'', ``data'', and
+``bss'' sections, but you use @code{SEGMENT_START} with any segment
+name.
+
@item SIZEOF(@var{section})
@kindex SIZEOF(@var{section})
@cindex section size
@@ -4614,6 +5229,18 @@ functionality are not listed.
@ifset MSP430
* MSP430:: @command{ld} and MSP430
@end ifset
+@ifset M68HC11
+* M68HC11/68HC12:: @code{ld} and the Motorola 68HC11 and 68HC12 families
+@end ifset
+@ifset POWERPC
+* PowerPC ELF32:: @command{ld} and PowerPC 32-bit ELF Support
+@end ifset
+@ifset POWERPC64
+* PowerPC64 ELF64:: @command{ld} and PowerPC64 64-bit ELF Support
+@end ifset
+@ifset SPU
+* SPU ELF:: @command{ld} and SPU ELF Support
+@end ifset
@ifset TICOFF
* TI COFF:: @command{ld} and TI COFF
@end ifset
@@ -4655,6 +5282,23 @@ page of memory, and changes them to use the eight-bit address form.
(That is: the linker turns @samp{mov.b @code{@@}@var{aa}:16} into
@samp{mov.b @code{@@}@var{aa}:8} whenever the address @var{aa} is in the
top page of memory).
+
+@item bit manipulation instructions
+@command{ld} finds all bit manipulation instructions like @code{band, bclr,
+biand, bild, bior, bist, bixor, bld, bnot, bor, bset, bst, btst, bxor}
+which use 32 bit and 16 bit absolute address form, but refer to the top
+page of memory, and changes them to use the 8 bit address form.
+(That is: the linker turns @samp{bset #xx:3,@code{@@}@var{aa}:32} into
+@samp{bset #xx:3,@code{@@}@var{aa}:8} whenever the address @var{aa} is in
+the top page of memory).
+
+@item system control instructions
+@command{ld} finds all @code{ldc.w, stc.w} instructions which use the
+32 bit absolute address form, but refer to the top page of memory, and
+changes them to use 16 bit address form.
+(That is: the linker turns @samp{ldc.w @code{@@}@var{aa}:32,ccr} into
+@samp{ldc.w @code{@@}@var{aa}:16,ccr} whenever the address @var{aa} is in
+the top page of memory).
@end table
@ifclear GENERIC
@@ -4737,13 +5381,71 @@ not itself call any subroutines).
@raisesections
@end ifclear
+@ifset M68HC11
+@ifclear GENERIC
+@raisesections
+@end ifclear
+
+@node M68HC11/68HC12
+@section @command{ld} and the Motorola 68HC11 and 68HC12 families
+
+@cindex M68HC11 and 68HC12 support
+
+@subsection Linker Relaxation
+
+For the Motorola 68HC11, @command{ld} can perform these global
+optimizations when you specify the @samp{--relax} command-line option.
+
+@table @emph
+@cindex relaxing on M68HC11
+@item relaxing address modes
+@command{ld} finds all @code{jsr} and @code{jmp} instructions whose
+targets are within eight bits, and turns them into eight-bit
+program-counter relative @code{bsr} and @code{bra} instructions,
+respectively.
+
+@command{ld} also looks at all 16-bit extended addressing modes and
+transforms them in a direct addressing mode when the address is in
+page 0 (between 0 and 0x0ff).
+
+@item relaxing gcc instruction group
+When @command{gcc} is called with @option{-mrelax}, it can emit group
+of instructions that the linker can optimize to use a 68HC11 direct
+addressing mode. These instructions consists of @code{bclr} or
+@code{bset} instructions.
+
+@end table
+
+@subsection Trampoline Generation
+
+@cindex trampoline generation on M68HC11
+@cindex trampoline generation on M68HC12
+For 68HC11 and 68HC12, @command{ld} can generate trampoline code to
+call a far function using a normal @code{jsr} instruction. The linker
+will also change the relocation to some far function to use the
+trampoline address instead of the function address. This is typically the
+case when a pointer to a function is taken. The pointer will in fact
+point to the function trampoline.
+
+@cindex PIC_VENEER
+@kindex --pic-veneer
+The @samp{--pic-veneer} switch makes the linker use PIC sequences for
+ARM/Thumb interworking veneers, even if the rest of the binary
+is not PIC. This avoids problems on uClinux targets where
+@samp{--emit-relocs} is used to generate relocatable binaries.
+
+@ifclear GENERIC
+@lowersections
+@end ifclear
+@end ifset
+
@node ARM
-@section @command{ld}'s Support for Interworking Between ARM and Thumb Code
+@section @command{ld} and the ARM family
@cindex ARM interworking support
@kindex --support-old-code
For the ARM, @command{ld} will generate code stubs to allow functions calls
-betweem ARM and Thumb code. These stubs only work with code that has
+between ARM and Thumb code. These stubs only work with code that has
been compiled and assembled with the @samp{-mthumb-interwork} command
line option. If it is necessary to link with old ARM object files or
libraries, which have not been compiled with the -mthumb-interwork
@@ -4762,6 +5464,98 @@ But it also sets the bottom bit of the address, so that it can be
branched to using a BX instruction, and the program will start
executing in Thumb mode straight away.
+@cindex BE8
+@kindex --be8
+The @samp{--be8} switch instructs @command{ld} to generate BE8 format
+executables. This option is only valid when linking big-endian objects.
+The resulting image will contain big-endian data and little-endian code.
+
+@cindex TARGET1
+@kindex --target1-rel
+@kindex --target1-abs
+The @samp{R_ARM_TARGET1} relocation is typically used for entries in the
+@samp{.init_array} section. It is interpreted as either @samp{R_ARM_REL32}
+or @samp{R_ARM_ABS32}, depending on the target. The @samp{--target1-rel}
+and @samp{--target1-abs} switches override the default.
+
+@cindex TARGET2
+@kindex --target2=@var{type}
+The @samp{--target2=type} switch overrides the default definition of the
+@samp{R_ARM_TARGET2} relocation. Valid values for @samp{type}, their
+meanings, and target defaults are as follows:
+@table @samp
+@item rel
+@samp{R_ARM_REL32} (arm*-*-elf, arm*-*-eabi)
+@item abs
+@samp{R_ARM_ABS32} (arm*-*-symbianelf)
+@item got-rel
+@samp{R_ARM_GOT_PREL} (arm*-*-linux, arm*-*-*bsd)
+@end table
+
+@cindex FIX_V4BX
+@kindex --fix-v4bx
+The @samp{R_ARM_V4BX} relocation (defined by the ARM AAELF
+specification) enables objects compiled for the ARMv4 architecture to be
+interworking-safe when linked with other objects compiled for ARMv4t, but
+also allows pure ARMv4 binaries to be built from the same ARMv4 objects.
+
+In the latter case, the switch @option{--fix-v4bx} must be passed to the
+linker, which causes v4t @code{BX rM} instructions to be rewritten as
+@code{MOV PC,rM}, since v4 processors do not have a @code{BX} instruction.
+
+In the former case, the switch should not be used, and @samp{R_ARM_V4BX}
+relocations are ignored.
+
+@cindex USE_BLX
+@kindex --use-blx
+The @samp{--use-blx} switch enables the linker to use ARM/Thumb
+BLX instructions (available on ARMv5t and above) in various
+situations. Currently it is used to perform calls via the PLT from Thumb
+code using BLX rather than using BX and a mode-switching stub before
+each PLT entry. This should lead to such calls executing slightly faster.
+
+This option is enabled implicitly for SymbianOS, so there is no need to
+specify it if you are using that target.
+
+@cindex VFP11_DENORM_FIX
+@kindex --vfp11-denorm-fix
+The @samp{--vfp11-denorm-fix} switch enables a link-time workaround for a
+bug in certain VFP11 coprocessor hardware, which sometimes allows
+instructions with denorm operands (which must be handled by support code)
+to have those operands overwritten by subsequent instructions before
+the support code can read the intended values.
+
+The bug may be avoided in scalar mode if you allow at least one
+intervening instruction between a VFP11 instruction which uses a register
+and another instruction which writes to the same register, or at least two
+intervening instructions if vector mode is in use. The bug only affects
+full-compliance floating-point mode: you do not need this workaround if
+you are using "runfast" mode. Please contact ARM for further details.
+
+If you know you are using buggy VFP11 hardware, you can
+enable this workaround by specifying the linker option
+@samp{--vfp-denorm-fix=scalar} if you are using the VFP11 scalar
+mode only, or @samp{--vfp-denorm-fix=vector} if you are using
+vector mode (the latter also works for scalar code). The default is
+@samp{--vfp-denorm-fix=none}.
+
+If the workaround is enabled, instructions are scanned for
+potentially-troublesome sequences, and a veneer is created for each
+such sequence which may trigger the erratum. The veneer consists of the
+first instruction of the sequence and a branch back to the subsequent
+instruction. The original instruction is then replaced with a branch to
+the veneer. The extra cycles required to call and return from the veneer
+are sufficient to avoid the erratum in both the scalar and vector cases.
+
+@cindex NO_ENUM_SIZE_WARNING
+@kindex --no-enum-size-warning
+The @samp{--no-enum-size-warning} switch prevents the linker from
+warning when linking object files that specify incompatible EABI
+enumeration size attributes. For example, with this switch enabled,
+linking of an object file using 32-bit enumeration values with another
+using enumeration values fitted into the smallest possible space will
+not be diagnosed.
+
@ifclear GENERIC
@lowersections
@end ifclear
@@ -4884,6 +5678,272 @@ The last two sections are used by gcc.
@end ifclear
@end ifset
+@ifset POWERPC
+@ifclear GENERIC
+@raisesections
+@end ifclear
+
+@node PowerPC ELF32
+@section @command{ld} and PowerPC 32-bit ELF Support
+@cindex PowerPC long branches
+@kindex --relax on PowerPC
+Branches on PowerPC processors are limited to a signed 26-bit
+displacement, which may result in @command{ld} giving
+@samp{relocation truncated to fit} errors with very large programs.
+@samp{--relax} enables the generation of trampolines that can access
+the entire 32-bit address space. These trampolines are inserted at
+section boundaries, so may not themselves be reachable if an input
+section exceeds 33M in size.
+
+@cindex PowerPC ELF32 options
+@table @option
+@cindex PowerPC PLT
+@kindex --bss-plt
+@item --bss-plt
+Current PowerPC GCC accepts a @samp{-msecure-plt} option that
+generates code capable of using a newer PLT and GOT layout that has
+the security advantage of no executable section ever needing to be
+writable and no writable section ever being executable. PowerPC
+@command{ld} will generate this layout, including stubs to access the
+PLT, if all input files (including startup and static libraries) were
+compiled with @samp{-msecure-plt}. @samp{--bss-plt} forces the old
+BSS PLT (and GOT layout) which can give slightly better performance.
+
+@kindex --secure-plt
+@item --secure-plt
+@command{ld} will use the new PLT and GOT layout if it is linking new
+@samp{-fpic} or @samp{-fPIC} code, but does not do so automatically
+when linking non-PIC code. This option requests the new PLT and GOT
+layout. A warning will be given if some object file requires the old
+style BSS PLT.
+
+@cindex PowerPC GOT
+@kindex --sdata-got
+@item --sdata-got
+The new secure PLT and GOT are placed differently relative to other
+sections compared to older BSS PLT and GOT placement. The location of
+@code{.plt} must change because the new secure PLT is an initialized
+section while the old PLT is uninitialized. The reason for the
+@code{.got} change is more subtle: The new placement allows
+@code{.got} to be read-only in applications linked with
+@samp{-z relro -z now}. However, this placement means that
+@code{.sdata} cannot always be used in shared libraries, because the
+PowerPC ABI accesses @code{.sdata} in shared libraries from the GOT
+pointer. @samp{--sdata-got} forces the old GOT placement. PowerPC
+GCC doesn't use @code{.sdata} in shared libraries, so this option is
+really only useful for other compilers that may do so.
+
+@cindex PowerPC stub symbols
+@kindex --emit-stub-syms
+@item --emit-stub-syms
+This option causes @command{ld} to label linker stubs with a local
+symbol that encodes the stub type and destination.
+
+@cindex PowerPC TLS optimization
+@kindex --no-tls-optimize
+@item --no-tls-optimize
+PowerPC @command{ld} normally performs some optimization of code
+sequences used to access Thread-Local Storage. Use this option to
+disable the optimization.
+@end table
+
+@ifclear GENERIC
+@lowersections
+@end ifclear
+@end ifset
+
+@ifset POWERPC64
+@ifclear GENERIC
+@raisesections
+@end ifclear
+
+@node PowerPC64 ELF64
+@section @command{ld} and PowerPC64 64-bit ELF Support
+
+@cindex PowerPC64 ELF64 options
+@table @option
+@cindex PowerPC64 stub grouping
+@kindex --stub-group-size
+@item --stub-group-size
+Long branch stubs, PLT call stubs and TOC adjusting stubs are placed
+by @command{ld} in stub sections located between groups of input sections.
+@samp{--stub-group-size} specifies the maximum size of a group of input
+sections handled by one stub section. Since branch offsets are signed,
+a stub section may serve two groups of input sections, one group before
+the stub section, and one group after it. However, when using
+conditional branches that require stubs, it may be better (for branch
+prediction) that stub sections only serve one group of input sections.
+A negative value for @samp{N} chooses this scheme, ensuring that
+branches to stubs always use a negative offset. Two special values of
+@samp{N} are recognized, @samp{1} and @samp{-1}. These both instruct
+@command{ld} to automatically size input section groups for the branch types
+detected, with the same behaviour regarding stub placement as other
+positive or negative values of @samp{N} respectively.
+
+Note that @samp{--stub-group-size} does not split input sections. A
+single input section larger than the group size specified will of course
+create a larger group (of one section). If input sections are too
+large, it may not be possible for a branch to reach its stub.
+
+@cindex PowerPC64 stub symbols
+@kindex --emit-stub-syms
+@item --emit-stub-syms
+This option causes @command{ld} to label linker stubs with a local
+symbol that encodes the stub type and destination.
+
+@cindex PowerPC64 dot symbols
+@kindex --dotsyms
+@kindex --no-dotsyms
+@item --dotsyms, --no-dotsyms
+These two options control how @command{ld} interprets version patterns
+in a version script. Older PowerPC64 compilers emitted both a
+function descriptor symbol with the same name as the function, and a
+code entry symbol with the name prefixed by a dot (@samp{.}). To
+properly version a function @samp{foo}, the version script thus needs
+to control both @samp{foo} and @samp{.foo}. The option
+@samp{--dotsyms}, on by default, automatically adds the required
+dot-prefixed patterns. Use @samp{--no-dotsyms} to disable this
+feature.
+
+@cindex PowerPC64 TLS optimization
+@kindex --no-tls-optimize
+@item --no-tls-optimize
+PowerPC64 @command{ld} normally performs some optimization of code
+sequences used to access Thread-Local Storage. Use this option to
+disable the optimization.
+
+@cindex PowerPC64 OPD optimization
+@kindex --no-opd-optimize
+@item --no-opd-optimize
+PowerPC64 @command{ld} normally removes @code{.opd} section entries
+corresponding to deleted link-once functions, or functions removed by
+the action of @samp{--gc-sections} or linker scrip @code{/DISCARD/}.
+Use this option to disable @code{.opd} optimization.
+
+@cindex PowerPC64 OPD spacing
+@kindex --non-overlapping-opd
+@item --non-overlapping-opd
+Some PowerPC64 compilers have an option to generate compressed
+@code{.opd} entries spaced 16 bytes apart, overlapping the third word,
+the static chain pointer (unused in C) with the first word of the next
+entry. This option expands such entries to the full 24 bytes.
+
+@cindex PowerPC64 TOC optimization
+@kindex --no-toc-optimize
+@item --no-toc-optimize
+PowerPC64 @command{ld} normally removes unused @code{.toc} section
+entries. Such entries are detected by examining relocations that
+reference the TOC in code sections. A reloc in a deleted code section
+marks a TOC word as unneeded, while a reloc in a kept code section
+marks a TOC word as needed. Since the TOC may reference itself, TOC
+relocs are also examined. TOC words marked as both needed and
+unneeded will of course be kept. TOC words without any referencing
+reloc are assumed to be part of a multi-word entry, and are kept or
+discarded as per the nearest marked preceding word. This works
+reliably for compiler generated code, but may be incorrect if assembly
+code is used to insert TOC entries. Use this option to disable the
+optimization.
+
+@cindex PowerPC64 multi-TOC
+@kindex --no-multi-toc
+@item --no-multi-toc
+By default, PowerPC64 GCC generates code for a TOC model where TOC
+entries are accessed with a 16-bit offset from r2. This limits the
+total TOC size to 64K. PowerPC64 @command{ld} extends this limit by
+grouping code sections such that each group uses less than 64K for its
+TOC entries, then inserts r2 adjusting stubs between inter-group
+calls. @command{ld} does not split apart input sections, so cannot
+help if a single input file has a @code{.toc} section that exceeds
+64K, most likely from linking multiple files with @command{ld -r}.
+Use this option to turn off this feature.
+@end table
+
+@ifclear GENERIC
+@lowersections
+@end ifclear
+@end ifset
+
+@ifset SPU
+@ifclear GENERIC
+@raisesections
+@end ifclear
+
+@node SPU ELF
+@section @command{ld} and SPU ELF Support
+
+@cindex SPU ELF options
+@table @option
+
+@cindex SPU plugins
+@kindex --plugin
+@item --plugin
+This option marks an executable as a PIC plugin module.
+
+@cindex SPU overlays
+@kindex --no-overlays
+@item --no-overlays
+Normally, @command{ld} recognizes calls to functions within overlay
+regions, and redirects such calls to an overlay manager via a stub.
+@command{ld} also provides a built-in overlay manager. This option
+turns off all this special overlay handling.
+
+@cindex SPU overlay stub symbols
+@kindex --emit-stub-syms
+@item --emit-stub-syms
+This option causes @command{ld} to label overlay stubs with a local
+symbol that encodes the stub type and destination.
+
+@cindex SPU extra overlay stubs
+@kindex --extra-overlay-stubs
+@item --extra-overlay-stubs
+This option causes @command{ld} to add overlay call stubs on all
+function calls out of overlay regions. Normally stubs are not added
+on calls to non-overlay regions.
+
+@cindex SPU local store size
+@kindex --local-store=lo:hi
+@item --local-store=lo:hi
+@command{ld} usually checks that a final executable for SPU fits in
+the address range 0 to 256k. This option may be used to change the
+range. Disable the check entirely with @option{--local-store=0:0}.
+
+@cindex SPU
+@kindex --stack-analysis
+@item --stack-analysis
+SPU local store space is limited. Over-allocation of stack space
+unnecessarily limits space available for code and data, while
+under-allocation results in runtime failures. If given this option,
+@command{ld} will provide an estimate of maximum stack usage.
+@command{ld} does this by examining symbols in code sections to
+determine the extents of functions, and looking at function prologues
+for stack adjusting instructions. A call-graph is created by looking
+for relocations on branch instructions. The graph is then searched
+for the maximum stack usage path. Note that this analysis does not
+find calls made via function pointers, and does not handle recursion
+and other cycles in the call graph. Stack usage may be
+under-estimated if your code makes such calls. Also, stack usage for
+dynamic allocation, e.g. alloca, will not be detected. If a link map
+is requested, detailed information about each function's stack usage
+and calls will be given.
+
+@cindex SPU
+@kindex --emit-stack-syms
+@item --emit-stack-syms
+This option, if given along with @option{--stack-analysis} will result
+in @command{ld} emitting stack sizing symbols for each function.
+These take the form @code{__stack_<function_name>} for global
+functions, and @code{__stack_<number>_<function_name>} for static
+functions. @code{<number>} is the section id in hex. The value of
+such symbols is the stack requirement for the corresponding function.
+The symbol size will be zero, type @code{STT_NOTYPE}, binding
+@code{STB_LOCAL}, and section @code{SHN_ABS}.
+@end table
+
+@ifclear GENERIC
+@lowersections
+@end ifclear
+@end ifset
+
@ifset TICOFF
@ifclear GENERIC
@raisesections
@@ -4913,7 +5973,7 @@ header format depends on the default specified by the specific target.
@section @command{ld} and WIN32 (cygwin/mingw)
This section describes some of the win32 specific @command{ld} issues.
-See @ref{Options,,Command Line Options} for detailed decription of the
+See @ref{Options,,Command Line Options} for detailed description of the
command line options mentioned here.
@table @emph
@@ -4969,17 +6029,85 @@ Using a DEF file turns off the normal auto-export behavior, unless the
Here is an example of a DEF file for a shared library called @samp{xyz.dll}:
@example
-LIBRARY "xyz.dll" BASE=0x10000000
+LIBRARY "xyz.dll" BASE=0x20000000
EXPORTS
foo
bar
_bar = bar
+another_foo = abc.dll.afoo
+var1 DATA
+@end example
+
+This example defines a DLL with a non-default base address and five
+symbols in the export table. The third exported symbol @code{_bar} is an
+alias for the second. The fourth symbol, @code{another_foo} is resolved
+by "forwarding" to another module and treating it as an alias for
+@code{afoo} exported from the DLL @samp{abc.dll}. The final symbol
+@code{var1} is declared to be a data object.
+
+The optional @code{LIBRARY <name>} command indicates the @emph{internal}
+name of the output DLL. If @samp{<name>} does not include a suffix,
+the default library suffix, @samp{.DLL} is appended.
+
+When the .DEF file is used to build an application, rather than a
+library, the @code{NAME <name>} command should be used instead of
+@code{LIBRARY}. If @samp{<name>} does not include a suffix, the default
+executable suffix, @samp{.EXE} is appended.
+
+With either @code{LIBRARY <name>} or @code{NAME <name>} the optional
+specification @code{BASE = <number>} may be used to specify a
+non-default base address for the image.
+
+If neither @code{LIBRARY <name>} nor @code{NAME <name>} is specified,
+or they specify an empty string, the internal name is the same as the
+filename specified on the command line.
+
+The complete specification of an export symbol is:
+
+@example
+EXPORTS
+ ( ( ( <name1> [ = <name2> ] )
+ | ( <name1> = <module-name> . <external-name>))
+ [ @@ <integer> ] [NONAME] [DATA] [CONSTANT] [PRIVATE] ) *
@end example
-This example defines a base address and three symbols. The third
-symbol is an alias for the second. For the complete format
-specification see ld/deffilep.y in the binutils sources.
+Declares @samp{<name1>} as an exported symbol from the DLL, or declares
+@samp{<name1>} as an exported alias for @samp{<name2>}; or declares
+@samp{<name1>} as a "forward" alias for the symbol
+@samp{<external-name>} in the DLL @samp{<module-name>}.
+Optionally, the symbol may be exported by the specified ordinal
+@samp{<integer>} alias.
+
+The optional keywords that follow the declaration indicate:
+
+@code{NONAME}: Do not put the symbol name in the DLL's export table. It
+will still be exported by its ordinal alias (either the value specified
+by the .def specification or, otherwise, the value assigned by the
+linker). The symbol name, however, does remain visible in the import
+library (if any), unless @code{PRIVATE} is also specified.
+
+@code{DATA}: The symbol is a variable or object, rather than a function.
+The import lib will export only an indirect reference to @code{foo} as
+the symbol @code{_imp__foo} (ie, @code{foo} must be resolved as
+@code{*_imp__foo}).
+
+@code{CONSTANT}: Like @code{DATA}, but put the undecorated @code{foo} as
+well as @code{_imp__foo} into the import library. Both refer to the
+read-only import address table's pointer to the variable, not to the
+variable itself. This can be dangerous. If the user code fails to add
+the @code{dllimport} attribute and also fails to explicitly add the
+extra indirection that the use of the attribute enforces, the
+application will behave unexpectedly.
+
+@code{PRIVATE}: Put the symbol in the DLL's export table, but do not put
+it into the static import library used to resolve imports at link time. The
+symbol can still be imported using the @code{LoadLibrary/GetProcAddress}
+API at runtime or by by using the GNU ld extension of linking directly to
+the DLL without an import library.
+
+See ld/deffilep.y in the binutils sources for the full specification of
+other DEF file statements
@cindex creating a DEF file
While linking a shared dll, @command{ld} is able to create a DEF file
@@ -5017,7 +6145,7 @@ code the header must declare them as dllimport. There are a number
of idioms that are typically used to do this; often client code can
omit the __declspec() declaration completely. See
@samp{--enable-auto-import} and @samp{automatic data imports} for more
-imformation.
+information.
@end table
@cindex automatic data imports
@@ -5029,7 +6157,7 @@ issue. This increases the effort necessary to port existing Un*x
code to these platforms, especially for large
c++ libraries and applications. The auto-import feature, which was
initially provided by Paul Sokolovsky, allows one to omit the
-decorations to archieve a behavior that conforms to that on POSIX/Un*x
+decorations to achieve a behavior that conforms to that on POSIX/Un*x
platforms. This feature is enabled with the @samp{--enable-auto-import}
command-line option, although it is enabled by default on cygwin/mingw.
The @samp{--enable-auto-import} option itself now serves mainly to
@@ -5073,7 +6201,7 @@ enabled as needed.
The cygwin/mingw ports of @command{ld} support the direct linking,
including data symbols, to a dll without the usage of any import
libraries. This is much faster and uses much less memory than does the
-traditional import library method, expecially when linking large
+traditional import library method, especially when linking large
libraries or applications. When @command{ld} creates an import lib, each
function or variable exported from the dll is stored in its own bfd, even
though a single bfd could contain many exports. The overhead involved in
@@ -5092,12 +6220,13 @@ For instance, when ld is called with the argument @samp{-lxxx} it will attempt
to find, in the first directory of its search path,
@example
-libxxx.dll.a
-xxx.dll.a
-libxxx.a
+libxxx.dll.a
+xxx.dll.a
+libxxx.a
+xxx.lib
cygxxx.dll (*)
-libxxx.dll
-xxx.dll
+libxxx.dll
+xxx.dll
@end example
before moving on to the next directory in the search path.
@@ -5169,7 +6298,7 @@ even when auto-import features are exercised, and even when
@samp{--enable-runtime-pseudo-relocs} is used.
Given the improvements in speed and memory usage, one might justifiably
-wonder why import libraries are used at all. There are two reasons:
+wonder why import libraries are used at all. There are three reasons:
1. Until recently, the link-directly-to-dll functionality did @emph{not}
work with auto-imported data.
@@ -5180,9 +6309,14 @@ symbols that point to the exports of a dll). Again, the import lib
for the cygwin kernel makes use of this ability, and it is not
possible to do this without an import lib.
+3. Symbol aliases can only be resolved using an import lib. This is
+critical when linking against OS-supplied dll's (eg, the win32 API)
+in which symbols are usually exported as undecorated aliases of their
+stdcall-decorated assembly names.
+
So, import libs are not going away. But the ability to replace
true import libs with a simple symbolic link to (or a copy of)
-a dll, in most cases, is a useful addition to the suite of tools
+a dll, in many cases, is a useful addition to the suite of tools
binutils makes available to the win32 developer. Given the
massive improvements in memory requirements during linking, storage
requirements, and linking speed, we expect that many developers
@@ -5247,6 +6381,24 @@ to handle the other symbols, then the both the new names @emph{and}
the original names for the renamed symbols will be exported.
In effect, you'd be aliasing those symbols, not renaming them,
which is probably not what you wanted.
+
+@cindex weak externals
+@item weak externals
+The Windows object format, PE, specifies a form of weak symbols called
+weak externals. When a weak symbol is linked and the symbol is not
+defined, the weak symbol becomes an alias for some other symbol. There
+are three variants of weak externals:
+@itemize
+@item Definition is searched for in objects and libraries, historically
+called lazy externals.
+@item Definition is searched for only in other objects, not in libraries.
+This form is not presently implemented.
+@item No search; the symbol is an alias. This form is not presently
+implemented.
+@end itemize
+As a GNU extension, weak symbols that do not specify an alternate symbol
+are supported. If the symbol is undefined when linking, the symbol
+uses a default value.
@end table
@ifclear GENERIC
@@ -5286,34 +6438,53 @@ interleaving might place the @code{.literal} sections from an initial
group of files followed by the @code{.text} sections of that group of
files. Then, the @code{.literal} sections from the rest of the files
and the @code{.text} sections from the rest of the files would follow.
-The non-interleaved order can still be specified as:
-
-@smallexample
-SECTIONS
-@{
- .text : @{
- *(.literal) *(.text)
- @}
-@}
-@end smallexample
-@cindex @code{--relax} on Xtensa
+@cindex @option{--relax} on Xtensa
@cindex relaxing on Xtensa
+Relaxation is enabled by default for the Xtensa version of @command{ld} and
+provides two important link-time optimizations. The first optimization
+is to combine identical literal values to reduce code size. A redundant
+literal will be removed and all the @code{L32R} instructions that use it
+will be changed to reference an identical literal, as long as the
+location of the replacement literal is within the offset range of all
+the @code{L32R} instructions. The second optimization is to remove
+unnecessary overhead from assembler-generated ``longcall'' sequences of
+@code{L32R}/@code{CALLX@var{n}} when the target functions are within
+range of direct @code{CALL@var{n}} instructions.
+
+For each of these cases where an indirect call sequence can be optimized
+to a direct call, the linker will change the @code{CALLX@var{n}}
+instruction to a @code{CALL@var{n}} instruction, remove the @code{L32R}
+instruction, and remove the literal referenced by the @code{L32R}
+instruction if it is not used for anything else. Removing the
+@code{L32R} instruction always reduces code size but can potentially
+hurt performance by changing the alignment of subsequent branch targets.
+By default, the linker will always preserve alignments, either by
+switching some instructions between 24-bit encodings and the equivalent
+density instructions or by inserting a no-op in place of the @code{L32R}
+instruction that was removed. If code size is more important than
+performance, the @option{--size-opt} option can be used to prevent the
+linker from widening density instructions or inserting no-ops, except in
+a few cases where no-ops are required for correctness.
+
+The following Xtensa-specific command-line options can be used to
+control the linker:
+
+@cindex Xtensa options
+@table @option
@kindex --no-relax
-The Xtensa version of @command{ld} enables the @option{--relax} option by
-default to attempt to reduce space in the output image by combining
-literals with identical values. It also provides the
-@option{--no-relax} option to disable this optimization. When enabled,
-the relaxation algorithm ensures that a literal will only be merged with
-another literal when the new merged literal location is within the
-offset range of all of its uses.
-
-The relaxation mechanism will also attempt to optimize
-assembler-generated ``longcall'' sequences of
-@code{L32R}/@code{CALLX@var{n}} when the target is known to fit into a
-@code{CALL@var{n}} instruction encoding. The current optimization
-converts the sequence into @code{NOP}/@code{CALL@var{n}} and removes the
-literal referenced by the @code{L32R} instruction.
+@item --no-relax
+Since the Xtensa version of @code{ld} enables the @option{--relax} option
+by default, the @option{--no-relax} option is provided to disable
+relaxation.
+
+@item --size-opt
+When optimizing indirect calls to direct calls, optimize for code size
+more than performance. With this option, the linker will not insert
+no-ops or widen density instructions to preserve branch target
+alignment. There may still be some cases where no-ops are required to
+preserve the correctness of the code.
+@end table
@ifclear GENERIC
@lowersections
@@ -5426,8 +6597,10 @@ You can find contact information for many support companies and
individuals in the file @file{etc/SERVICE} in the @sc{gnu} Emacs
distribution.
+@ifset BUGURL
Otherwise, send bug reports for @command{ld} to
-@samp{bug-binutils@@gnu.org}.
+@value{BUGURL}.
+@end ifset
The fundamental principle of reporting bugs usefully is this:
@strong{report all the facts}. If you are not sure whether to state a
@@ -5511,7 +6684,7 @@ a chance to make a mistake.
Even if the problem you experience is a fatal signal, you should still
say so explicitly. Suppose something strange is going on, such as, your
-copy of @command{ld} is out of synch, or you have encountered a bug in the
+copy of @command{ld} is out of sync, or you have encountered a bug in the
C library on your system. (This has happened!) Your copy might crash
and ours would not. If you told us to expect a crash, then when ours
fails to crash, we would know that the bug was not happening for us. If
@@ -5712,8 +6885,8 @@ If you have more than one @code{SECT} statement for the same
@include fdl.texi
-@node Index
-@unnumbered Index
+@node LD Index
+@unnumbered LD Index
@printindex cp
@@ -5732,6 +6905,4 @@ If you have more than one @code{SECT} statement for the same
% Blame: doc@cygnus.com, 28mar91.
@end tex
-
-@contents
@bye
diff --git a/contrib/binutils/ld/ldcref.c b/contrib/binutils/ld/ldcref.c
index 3094735..4fa29de 100644
--- a/contrib/binutils/ld/ldcref.c
+++ b/contrib/binutils/ld/ldcref.c
@@ -1,6 +1,6 @@
/* ldcref.c -- output a cross reference table
- Copyright 1996, 1997, 1998, 2000, 2002, 2003
- Free Software Foundation, Inc.
+ Copyright 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004, 2006,
+ 2007 Free Software Foundation, Inc.
Written by Ian Lance Taylor <ian@cygnus.com>
This file is part of GLD, the Gnu Linker.
@@ -17,16 +17,18 @@ 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. */
+Foundation, Inc., 51 Franklin Street - Fifth Floor, Boston, MA 02110-1301, USA. */
/* This file holds routines that manage the cross reference table.
The table is used to generate cross reference reports. It is also
used to implement the NOCROSSREFS command in the linker script. */
-#include "bfd.h"
#include "sysdep.h"
+#include "bfd.h"
#include "bfdlink.h"
#include "libiberty.h"
+#include "demangle.h"
+#include "objalloc.h"
#include "ld.h"
#include "ldmain.h"
@@ -55,7 +57,7 @@ struct cref_ref {
struct cref_hash_entry {
struct bfd_hash_entry root;
/* The demangled name. */
- char *demangled;
+ const char *demangled;
/* References to and definitions of this symbol. */
struct cref_ref *refs;
};
@@ -69,9 +71,9 @@ struct cref_hash_table {
/* Forward declarations. */
static void output_one_cref (FILE *, struct cref_hash_entry *);
-static void check_section_sym_xref (lang_input_statement_type *);
+static void check_local_sym_xref (lang_input_statement_type *);
static bfd_boolean check_nocrossref (struct cref_hash_entry *, void *);
-static void check_refs (const char *, asection *, bfd *,
+static void check_refs (const char *, bfd_boolean, asection *, bfd *,
struct lang_nocrossrefs *);
static void check_reloc_refs (bfd *, asection *, void *);
@@ -101,6 +103,16 @@ static bfd_boolean cref_initialized;
static size_t cref_symcount;
+/* Used to take a snapshot of the cref hash table when starting to
+ add syms from an as-needed library. */
+static struct bfd_hash_entry **old_table;
+static unsigned int old_size;
+static unsigned int old_count;
+static void *old_tab;
+static void *alloc_mark;
+static size_t tabsize, entsize, refsize;
+static size_t old_symcount;
+
/* Create an entry in a cref hash table. */
static struct bfd_hash_entry *
@@ -136,7 +148,7 @@ cref_hash_newfunc (struct bfd_hash_entry *entry,
}
/* Add a symbol to the cref hash table. This is called for every
- symbol that is seen during the link. */
+ global symbol that is seen during the link. */
void
add_cref (const char *name,
@@ -149,7 +161,8 @@ add_cref (const char *name,
if (! cref_initialized)
{
- if (! bfd_hash_table_init (&cref_table.root, cref_hash_newfunc))
+ if (!bfd_hash_table_init (&cref_table.root, cref_hash_newfunc,
+ sizeof (struct cref_hash_entry)))
einfo (_("%X%P: bfd_hash_table_init of cref table failed: %E\n"));
cref_initialized = TRUE;
}
@@ -164,7 +177,9 @@ add_cref (const char *name,
if (r == NULL)
{
- r = xmalloc (sizeof *r);
+ r = bfd_hash_allocate (&cref_table.root, sizeof *r);
+ if (r == NULL)
+ einfo (_("%X%P: cref alloc failed: %E\n"));
r->next = h->refs;
h->refs = r;
r->abfd = abfd;
@@ -181,6 +196,125 @@ add_cref (const char *name,
r->def = TRUE;
}
+/* Called before loading an as-needed library to take a snapshot of
+ the cref hash table, and after we have loaded or found that the
+ library was not needed. */
+
+bfd_boolean
+handle_asneeded_cref (bfd *abfd ATTRIBUTE_UNUSED,
+ enum notice_asneeded_action act)
+{
+ unsigned int i;
+
+ if (!cref_initialized)
+ return TRUE;
+
+ if (act == notice_as_needed)
+ {
+ char *old_ent, *old_ref;
+
+ for (i = 0; i < cref_table.root.size; i++)
+ {
+ struct bfd_hash_entry *p;
+ struct cref_hash_entry *c;
+ struct cref_ref *r;
+
+ for (p = cref_table.root.table[i]; p != NULL; p = p->next)
+ {
+ entsize += cref_table.root.entsize;
+ c = (struct cref_hash_entry *) p;
+ for (r = c->refs; r != NULL; r = r->next)
+ refsize += sizeof (struct cref_hash_entry);
+ }
+ }
+
+ tabsize = cref_table.root.size * sizeof (struct bfd_hash_entry *);
+ old_tab = xmalloc (tabsize + entsize + refsize);
+
+ alloc_mark = bfd_hash_allocate (&cref_table.root, 1);
+ if (alloc_mark == NULL)
+ return FALSE;
+
+ memcpy (old_tab, cref_table.root.table, tabsize);
+ old_ent = (char *) old_tab + tabsize;
+ old_ref = (char *) old_ent + entsize;
+ old_table = cref_table.root.table;
+ old_size = cref_table.root.size;
+ old_count = cref_table.root.count;
+ old_symcount = cref_symcount;
+
+ for (i = 0; i < cref_table.root.size; i++)
+ {
+ struct bfd_hash_entry *p;
+ struct cref_hash_entry *c;
+ struct cref_ref *r;
+
+ for (p = cref_table.root.table[i]; p != NULL; p = p->next)
+ {
+ memcpy (old_ent, p, cref_table.root.entsize);
+ old_ent = (char *) old_ent + cref_table.root.entsize;
+ c = (struct cref_hash_entry *) p;
+ for (r = c->refs; r != NULL; r = r->next)
+ {
+ memcpy (old_ref, r, sizeof (struct cref_hash_entry));
+ old_ref = (char *) old_ref + sizeof (struct cref_hash_entry);
+ }
+ }
+ }
+ return TRUE;
+ }
+
+ if (act == notice_not_needed)
+ {
+ char *old_ent, *old_ref;
+
+ if (old_tab == NULL)
+ {
+ /* The only way old_tab can be NULL is if the cref hash table
+ had not been initialised when notice_as_needed. */
+ bfd_hash_table_free (&cref_table.root);
+ cref_initialized = FALSE;
+ return TRUE;
+ }
+
+ old_ent = (char *) old_tab + tabsize;
+ old_ref = (char *) old_ent + entsize;
+ cref_table.root.table = old_table;
+ cref_table.root.size = old_size;
+ cref_table.root.count = old_count;
+ memcpy (cref_table.root.table, old_tab, tabsize);
+ cref_symcount = old_symcount;
+
+ for (i = 0; i < cref_table.root.size; i++)
+ {
+ struct bfd_hash_entry *p;
+ struct cref_hash_entry *c;
+ struct cref_ref *r;
+
+ for (p = cref_table.root.table[i]; p != NULL; p = p->next)
+ {
+ memcpy (p, old_ent, cref_table.root.entsize);
+ old_ent = (char *) old_ent + cref_table.root.entsize;
+ c = (struct cref_hash_entry *) p;
+ for (r = c->refs; r != NULL; r = r->next)
+ {
+ memcpy (r, old_ref, sizeof (struct cref_hash_entry));
+ old_ref = (char *) old_ref + sizeof (struct cref_hash_entry);
+ }
+ }
+ }
+
+ objalloc_free_block ((struct objalloc *) cref_table.root.memory,
+ alloc_mark);
+ }
+ else if (act != notice_needed)
+ return FALSE;
+
+ free (old_tab);
+ old_tab = NULL;
+ return TRUE;
+}
+
/* Copy the addresses of the hash table entries into an array. This
is called via cref_hash_traverse. We also fill in the demangled
name. */
@@ -191,7 +325,10 @@ cref_fill_array (struct cref_hash_entry *h, void *data)
struct cref_hash_entry ***pph = data;
ASSERT (h->demangled == NULL);
- h->demangled = demangle (h->root.string);
+ h->demangled = bfd_demangle (output_bfd, h->root.string,
+ DMGL_ANSI | DMGL_PARAMS);
+ if (h->demangled == NULL)
+ h->demangled = h->root.string;
**pph = h;
@@ -330,39 +467,69 @@ check_nocrossrefs (void)
cref_hash_traverse (&cref_table, check_nocrossref, NULL);
- lang_for_each_file (check_section_sym_xref);
+ lang_for_each_file (check_local_sym_xref);
}
-/* Checks for prohibited cross references to section symbols. */
+/* Check for prohibited cross references to local and section symbols. */
static void
-check_section_sym_xref (lang_input_statement_type *statement)
+check_local_sym_xref (lang_input_statement_type *statement)
{
bfd *abfd;
- asection *sec;
+ lang_input_statement_type *li;
+ asymbol **asymbols, **syms;
abfd = statement->the_bfd;
if (abfd == NULL)
return;
- for (sec = abfd->sections; sec != NULL; sec = sec->next)
+ li = abfd->usrdata;
+ if (li != NULL && li->asymbols != NULL)
+ asymbols = li->asymbols;
+ else
{
- asection *outsec;
+ long symsize;
+ long symbol_count;
+
+ symsize = bfd_get_symtab_upper_bound (abfd);
+ if (symsize < 0)
+ einfo (_("%B%F: could not read symbols; %E\n"), abfd);
+ asymbols = xmalloc (symsize);
+ symbol_count = bfd_canonicalize_symtab (abfd, asymbols);
+ if (symbol_count < 0)
+ einfo (_("%B%F: could not read symbols: %E\n"), abfd);
+ if (li != NULL)
+ {
+ li->asymbols = asymbols;
+ li->symbol_count = symbol_count;
+ }
+ }
- outsec = sec->output_section;
- if (outsec != NULL)
+ for (syms = asymbols; *syms; ++syms)
+ {
+ asymbol *sym = *syms;
+ if (sym->flags & (BSF_GLOBAL | BSF_WARNING | BSF_INDIRECT | BSF_FILE))
+ continue;
+ if ((sym->flags & (BSF_LOCAL | BSF_SECTION_SYM)) != 0
+ && sym->section->output_section != NULL)
{
- const char *outsecname;
+ const char *outsecname, *symname;
struct lang_nocrossrefs *ncrs;
struct lang_nocrossref *ncr;
- outsecname = outsec->name;
+ outsecname = sym->section->output_section->name;
+ symname = NULL;
+ if ((sym->flags & BSF_SECTION_SYM) == 0)
+ symname = sym->name;
for (ncrs = nocrossref_list; ncrs != NULL; ncrs = ncrs->next)
for (ncr = ncrs->list; ncr != NULL; ncr = ncr->next)
if (strcmp (ncr->name, outsecname) == 0)
- check_refs (NULL, sec, abfd, ncrs);
+ check_refs (symname, FALSE, sym->section, abfd, ncrs);
}
}
+
+ if (li == NULL)
+ free (asymbols);
}
/* Check one symbol to see if it is a prohibited cross reference. */
@@ -399,7 +566,8 @@ check_nocrossref (struct cref_hash_entry *h, void *ignore ATTRIBUTE_UNUSED)
for (ncr = ncrs->list; ncr != NULL; ncr = ncr->next)
if (strcmp (ncr->name, defsecname) == 0)
for (ref = h->refs; ref != NULL; ref = ref->next)
- check_refs (hl->root.string, hl->u.def.section, ref->abfd, ncrs);
+ check_refs (hl->root.string, TRUE, hl->u.def.section,
+ ref->abfd, ncrs);
return TRUE;
}
@@ -412,6 +580,7 @@ struct check_refs_info {
asection *defsec;
struct lang_nocrossrefs *ncrs;
asymbol **asymbols;
+ bfd_boolean global;
};
/* This function is called for each symbol defined in a section which
@@ -421,6 +590,7 @@ struct check_refs_info {
static void
check_refs (const char *name,
+ bfd_boolean global,
asection *sec,
bfd *abfd,
struct lang_nocrossrefs *ncrs)
@@ -458,6 +628,7 @@ check_refs (const char *name,
}
info.sym_name = name;
+ info.global = global;
info.defsec = sec;
info.ncrs = ncrs;
info.asymbols = asymbols;
@@ -483,6 +654,7 @@ check_reloc_refs (bfd *abfd, asection *sec, void *iarg)
const char *outdefsecname;
struct lang_nocrossref *ncr;
const char *symname;
+ bfd_boolean global;
long relsize;
arelent **relpp;
long relcount;
@@ -508,9 +680,13 @@ check_reloc_refs (bfd *abfd, asection *sec, void *iarg)
/* This section is one for which cross references are prohibited.
Look through the relocations, and see if any of them are to
INFO->SYM_NAME. If INFO->SYMNAME is NULL, check for relocations
- against the section symbol. */
+ against the section symbol. If INFO->GLOBAL is TRUE, the
+ definition is global, check for relocations against the global
+ symbols. Otherwise check for relocations against the local and
+ section symbols. */
symname = info->sym_name;
+ global = info->global;
relsize = bfd_get_reloc_upper_bound (abfd, sec);
if (relsize < 0)
@@ -531,10 +707,18 @@ check_reloc_refs (bfd *abfd, asection *sec, void *iarg)
if (q->sym_ptr_ptr != NULL
&& *q->sym_ptr_ptr != NULL
+ && ((global
+ && (bfd_is_und_section (bfd_get_section (*q->sym_ptr_ptr))
+ || bfd_is_com_section (bfd_get_section (*q->sym_ptr_ptr))
+ || ((*q->sym_ptr_ptr)->flags & (BSF_GLOBAL
+ | BSF_WEAK)) != 0))
+ || (!global
+ && ((*q->sym_ptr_ptr)->flags & (BSF_LOCAL
+ | BSF_SECTION_SYM)) != 0
+ && bfd_get_section (*q->sym_ptr_ptr) == info->defsec))
&& (symname != NULL
? strcmp (bfd_asymbol_name (*q->sym_ptr_ptr), symname) == 0
- : (((*q->sym_ptr_ptr)->flags & BSF_SECTION_SYM) != 0
- && bfd_get_section (*q->sym_ptr_ptr) == info->defsec)))
+ : ((*q->sym_ptr_ptr)->flags & BSF_SECTION_SYM) != 0))
{
/* We found a reloc for the symbol. The symbol is defined
in OUTSECNAME. This reloc is from a section which is
diff --git a/contrib/binutils/ld/ldctor.c b/contrib/binutils/ld/ldctor.c
index 34d5e52..ab881ad 100644
--- a/contrib/binutils/ld/ldctor.c
+++ b/contrib/binutils/ld/ldctor.c
@@ -1,6 +1,6 @@
/* ldctor.c -- constructor support routines
Copyright 1991, 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001,
- 2002, 2003 Free Software Foundation, Inc.
+ 2002, 2003, 2004, 2006, 2007 Free Software Foundation, Inc.
By Steve Chamberlain <sac@cygnus.com>
This file is part of GLD, the Gnu Linker.
@@ -17,11 +17,11 @@ 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. */
+Software Foundation, 51 Franklin Street - Fifth Floor, Boston, MA
+02110-1301, USA. */
-#include "bfd.h"
#include "sysdep.h"
+#include "bfd.h"
#include "bfdlink.h"
#include "safe-ctype.h"
@@ -49,7 +49,7 @@ struct set_info *sets;
RELOC is the relocation to use for an entry in the set. SECTION
and VALUE are the value to add. This is called during the first
phase of the link, when we are still gathering symbols together.
- We just record the information now. The ldctor_find_constructors
+ We just record the information now. The ldctor_build_sets
function will construct the sets. */
void
@@ -131,7 +131,7 @@ ctor_prio (const char *name)
while (*name == '_')
++name;
- if (strncmp (name, "GLOBAL_", sizeof "GLOBAL_" - 1) != 0)
+ if (! CONST_STRNEQ (name, "GLOBAL_"))
return -1;
name += sizeof "GLOBAL_" - 1;
diff --git a/contrib/binutils/ld/ldctor.h b/contrib/binutils/ld/ldctor.h
index 436df6c0..5608ff7 100644
--- a/contrib/binutils/ld/ldctor.h
+++ b/contrib/binutils/ld/ldctor.h
@@ -16,8 +16,8 @@ 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. */
+Software Foundation, 51 Franklin Street - Fifth Floor, Boston, MA
+02110-1301, USA. */
#ifndef LDCTOR_H
#define LDCTOR_H
diff --git a/contrib/binutils/ld/ldemul.c b/contrib/binutils/ld/ldemul.c
index 760c55d..d4ed3d1 100644
--- a/contrib/binutils/ld/ldemul.c
+++ b/contrib/binutils/ld/ldemul.c
@@ -1,5 +1,6 @@
/* ldemul.c -- clearing house for ld emulation states
- Copyright 1991, 1992, 1993, 1994, 1995, 1996, 1997, 1998, 2000, 2002, 2003
+ Copyright 1991, 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999, 2000,
+ 2001, 2002, 2003, 2005, 2007
Free Software Foundation, Inc.
This file is part of GLD, the Gnu Linker.
@@ -16,12 +17,13 @@ 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. */
+Software Foundation, 51 Franklin Street - Fifth Floor, Boston, MA
+02110-1301, USA. */
-#include "bfd.h"
#include "sysdep.h"
+#include "bfd.h"
#include "getopt.h"
+#include "bfdlink.h"
#include "ld.h"
#include "ldmisc.h"
@@ -32,7 +34,7 @@ Software Foundation, 59 Temple Place - Suite 330, Boston, MA
#include "ldmain.h"
#include "ldemul-list.h"
-ld_emulation_xfer_type *ld_emulation;
+static ld_emulation_xfer_type *ld_emulation;
void
ldemul_hll (char *name)
@@ -73,8 +75,7 @@ ldemul_after_allocation (void)
void
ldemul_before_allocation (void)
{
- if (ld_emulation->before_allocation)
- ld_emulation->before_allocation ();
+ ld_emulation->before_allocation ();
}
void
@@ -86,8 +87,7 @@ ldemul_set_output_arch (void)
void
ldemul_finish (void)
{
- if (ld_emulation->finish)
- ld_emulation->finish ();
+ ld_emulation->finish ();
}
void
@@ -120,10 +120,10 @@ ldemul_open_dynamic_archive (const char *arch, search_dirs_type *search,
}
bfd_boolean
-ldemul_place_orphan (lang_input_statement_type *file, asection *s)
+ldemul_place_orphan (asection *s)
{
if (ld_emulation->place_orphan)
- return (*ld_emulation->place_orphan) (file, s);
+ return (*ld_emulation->place_orphan) (s);
return FALSE;
}
@@ -210,6 +210,15 @@ after_allocation_default (void)
void
before_allocation_default (void)
{
+ if (!link_info.relocatable)
+ strip_excluded_output_sections ();
+}
+
+void
+finish_default (void)
+{
+ if (!link_info.relocatable)
+ _bfd_fix_excluded_sec_syms (output_bfd, &link_info);
}
void
diff --git a/contrib/binutils/ld/ldemul.h b/contrib/binutils/ld/ldemul.h
index 8fbbaa2..1b9b79b 100644
--- a/contrib/binutils/ld/ldemul.h
+++ b/contrib/binutils/ld/ldemul.h
@@ -1,5 +1,6 @@
/* ld-emul.h - Linker emulation header file
- Copyright 1991, 1992, 1993, 1994, 1995, 1996, 1997, 1998, 2000, 2002, 2003
+ Copyright 1991, 1992, 1993, 1994, 1995, 1996, 1997, 1998, 2000, 2001,
+ 2002, 2003, 2004, 2005
Free Software Foundation, Inc.
This file is part of GLD, the Gnu Linker.
@@ -53,7 +54,7 @@ extern void ldemul_set_symbols
extern void ldemul_create_output_section_statements
(void);
extern bfd_boolean ldemul_place_orphan
- (struct lang_input_statement_struct *, asection *);
+ (asection *);
extern bfd_boolean ldemul_parse_args
(int, char **);
extern void ldemul_add_options
@@ -76,6 +77,10 @@ extern void after_allocation_default
(void);
extern void before_allocation_default
(void);
+extern void finish_default
+ (void);
+extern void finish_default
+ (void);
extern void set_output_arch_default
(void);
extern void syslib_default
@@ -142,7 +147,7 @@ typedef struct ld_emulation_xfer_struct {
the default action should be taken. This field may be NULL, in
which case the default action will always be taken. */
bfd_boolean (*place_orphan)
- (struct lang_input_statement_struct *, asection *);
+ (asection *);
/* Run after assigning parsing with the args, but before
reading the script. Used to initialize symbols used in the script. */
diff --git a/contrib/binutils/ld/ldexp.c b/contrib/binutils/ld/ldexp.c
index 4d9a857..4f1d61d 100644
--- a/contrib/binutils/ld/ldexp.c
+++ b/contrib/binutils/ld/ldexp.c
@@ -1,25 +1,25 @@
/* This module handles expression trees.
Copyright 1991, 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999, 2000,
- 2001, 2002, 2003, 2004
+ 2001, 2002, 2003, 2004, 2005, 2006, 2007
Free Software Foundation, Inc.
Written by Steve Chamberlain of Cygnus Support <sac@cygnus.com>.
-This file is part of GLD, the Gnu Linker.
+ This file is part of GLD, the Gnu Linker.
-GLD 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, or (at your option)
-any later version.
+ GLD 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, or (at your option)
+ any later version.
-GLD 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.
+ GLD 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 GLD; see the file COPYING. If not, write to the Free
-Software Foundation, 59 Temple Place - Suite 330, Boston, MA
-02111-1307, USA. */
+ 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, 51 Franklin Street - Fifth Floor, Boston, MA
+ 02110-1301, USA. */
/* This module is in charge of working out the contents of expressions.
@@ -28,25 +28,27 @@ Software Foundation, 59 Temple Place - Suite 330, Boston, MA
which contains a value, a section to which it is relative and a
valid bit. */
-#include "bfd.h"
#include "sysdep.h"
+#include "bfd.h"
#include "bfdlink.h"
#include "ld.h"
#include "ldmain.h"
#include "ldmisc.h"
#include "ldexp.h"
+#include "ldlex.h"
#include <ldgram.h>
#include "ldlang.h"
#include "libiberty.h"
#include "safe-ctype.h"
-static etree_value_type exp_fold_tree_no_dot
- (etree_type *, lang_output_section_statement_type *, lang_phase_type);
-static bfd_vma align_n
- (bfd_vma, bfd_vma);
+static void exp_fold_tree_1 (etree_type *);
+static void exp_fold_tree_no_dot (etree_type *);
+static bfd_vma align_n (bfd_vma, bfd_vma);
+
+segment_type *segments;
-struct exp_data_seg exp_data_seg;
+struct ldexp_control expld;
/* Print the string representation of the given token. Surround it
with spaces if INFIX_P is TRUE. */
@@ -95,13 +97,19 @@ exp_print_token (token_code_type code, int infix_p)
{ MAP, "MAP" },
{ ENTRY, "ENTRY" },
{ NEXT, "NEXT" },
+ { ALIGNOF, "ALIGNOF" },
{ SIZEOF, "SIZEOF" },
{ ADDR, "ADDR" },
{ LOADADDR, "LOADADDR" },
+ { CONSTANT, "CONSTANT" },
{ MAX_K, "MAX_K" },
{ REL, "relocatable" },
{ DATA_SEGMENT_ALIGN, "DATA_SEGMENT_ALIGN" },
- { DATA_SEGMENT_END, "DATA_SEGMENT_END" }
+ { DATA_SEGMENT_RELRO_END, "DATA_SEGMENT_RELRO_END" },
+ { DATA_SEGMENT_END, "DATA_SEGMENT_END" },
+ { ORIGIN, "ORIGIN" },
+ { LENGTH, "LENGTH" },
+ { SEGMENT_START, "SEGMENT_START" }
};
unsigned int idx;
@@ -124,21 +132,19 @@ exp_print_token (token_code_type code, int infix_p)
}
static void
-make_abs (etree_value_type *ptr)
+make_abs (void)
{
- asection *s = ptr->section->bfd_section;
- ptr->value += s->vma;
- ptr->section = abs_output_section;
+ expld.result.value += expld.result.section->vma;
+ expld.result.section = bfd_abs_section_ptr;
}
-static etree_value_type
+static void
new_abs (bfd_vma value)
{
- etree_value_type new;
- new.valid_p = TRUE;
- new.section = abs_output_section;
- new.value = value;
- return new;
+ expld.result.valid_p = TRUE;
+ expld.result.section = bfd_abs_section_ptr;
+ expld.result.value = value;
+ expld.result.str = NULL;
}
etree_type *
@@ -146,6 +152,7 @@ exp_intop (bfd_vma value)
{
etree_type *new = stat_alloc (sizeof (new->value));
new->type.node_code = INT;
+ new->type.lineno = lineno;
new->value.value = value;
new->value.str = NULL;
new->type.node_class = etree_value;
@@ -157,6 +164,7 @@ exp_bigintop (bfd_vma value, char *str)
{
etree_type *new = stat_alloc (sizeof (new->value));
new->type.node_code = INT;
+ new->type.lineno = lineno;
new->value.value = value;
new->value.str = str;
new->type.node_class = etree_value;
@@ -170,115 +178,94 @@ exp_relop (asection *section, bfd_vma value)
{
etree_type *new = stat_alloc (sizeof (new->rel));
new->type.node_code = REL;
+ new->type.lineno = lineno;
new->type.node_class = etree_rel;
new->rel.section = section;
new->rel.value = value;
return new;
}
-static etree_value_type
-new_rel (bfd_vma value,
- char *str,
- lang_output_section_statement_type *section)
+static void
+new_rel (bfd_vma value, char *str, asection *section)
{
- etree_value_type new;
- new.valid_p = TRUE;
- new.value = value;
- new.str = str;
- new.section = section;
- return new;
+ expld.result.valid_p = TRUE;
+ expld.result.value = value;
+ expld.result.str = str;
+ expld.result.section = section;
}
-static etree_value_type
-new_rel_from_section (bfd_vma value,
- lang_output_section_statement_type *section)
+static void
+new_rel_from_abs (bfd_vma value)
{
- etree_value_type new;
- new.valid_p = TRUE;
- new.value = value;
- new.str = NULL;
- new.section = section;
-
- new.value -= section->bfd_section->vma;
-
- return new;
+ expld.result.valid_p = TRUE;
+ expld.result.value = value - expld.section->vma;
+ expld.result.str = NULL;
+ expld.result.section = expld.section;
}
-static etree_value_type
-fold_unary (etree_type *tree,
- lang_output_section_statement_type *current_section,
- lang_phase_type allocation_done,
- bfd_vma dot,
- bfd_vma *dotp)
+static void
+fold_unary (etree_type *tree)
{
- etree_value_type result;
-
- result = exp_fold_tree (tree->unary.child,
- current_section,
- allocation_done, dot, dotp);
- if (result.valid_p)
+ exp_fold_tree_1 (tree->unary.child);
+ if (expld.result.valid_p)
{
switch (tree->type.node_code)
{
case ALIGN_K:
- if (allocation_done != lang_first_phase_enum)
- result = new_rel_from_section (align_n (dot, result.value),
- current_section);
+ if (expld.phase != lang_first_phase_enum)
+ new_rel_from_abs (align_n (expld.dot, expld.result.value));
else
- result.valid_p = FALSE;
+ expld.result.valid_p = FALSE;
break;
case ABSOLUTE:
- if (allocation_done != lang_first_phase_enum)
- {
- result.value += result.section->bfd_section->vma;
- result.section = abs_output_section;
- }
- else
- result.valid_p = FALSE;
+ make_abs ();
break;
case '~':
- make_abs (&result);
- result.value = ~result.value;
+ make_abs ();
+ expld.result.value = ~expld.result.value;
break;
case '!':
- make_abs (&result);
- result.value = !result.value;
+ make_abs ();
+ expld.result.value = !expld.result.value;
break;
case '-':
- make_abs (&result);
- result.value = -result.value;
+ make_abs ();
+ expld.result.value = -expld.result.value;
break;
case NEXT:
/* Return next place aligned to value. */
- if (allocation_done == lang_allocating_phase_enum)
+ if (expld.phase != lang_first_phase_enum)
{
- make_abs (&result);
- result.value = align_n (dot, result.value);
+ make_abs ();
+ expld.result.value = align_n (expld.dot, expld.result.value);
}
else
- result.valid_p = FALSE;
+ expld.result.valid_p = FALSE;
break;
case DATA_SEGMENT_END:
- if (allocation_done != lang_first_phase_enum
- && current_section == abs_output_section
- && (exp_data_seg.phase == exp_dataseg_align_seen
- || exp_data_seg.phase == exp_dataseg_adjust
- || allocation_done != lang_allocating_phase_enum))
+ if (expld.phase != lang_first_phase_enum
+ && expld.section == bfd_abs_section_ptr
+ && (expld.dataseg.phase == exp_dataseg_align_seen
+ || expld.dataseg.phase == exp_dataseg_relro_seen
+ || expld.dataseg.phase == exp_dataseg_adjust
+ || expld.dataseg.phase == exp_dataseg_relro_adjust
+ || expld.phase == lang_final_phase_enum))
{
- if (exp_data_seg.phase == exp_dataseg_align_seen)
+ if (expld.dataseg.phase == exp_dataseg_align_seen
+ || expld.dataseg.phase == exp_dataseg_relro_seen)
{
- exp_data_seg.phase = exp_dataseg_end_seen;
- exp_data_seg.end = result.value;
+ expld.dataseg.phase = exp_dataseg_end_seen;
+ expld.dataseg.end = expld.result.value;
}
}
else
- result.valid_p = FALSE;
+ expld.result.valid_p = FALSE;
break;
default:
@@ -286,76 +273,90 @@ fold_unary (etree_type *tree,
break;
}
}
-
- return result;
}
-static etree_value_type
-fold_binary (etree_type *tree,
- lang_output_section_statement_type *current_section,
- lang_phase_type allocation_done,
- bfd_vma dot,
- bfd_vma *dotp)
+static void
+fold_binary (etree_type *tree)
{
- etree_value_type result;
+ exp_fold_tree_1 (tree->binary.lhs);
- result = exp_fold_tree (tree->binary.lhs, current_section,
- allocation_done, dot, dotp);
- if (result.valid_p)
+ /* The SEGMENT_START operator is special because its first
+ operand is a string, not the name of a symbol. */
+ if (expld.result.valid_p && tree->type.node_code == SEGMENT_START)
+ {
+ const char *segment_name;
+ segment_type *seg;
+ /* Check to see if the user has overridden the default
+ value. */
+ segment_name = tree->binary.rhs->name.name;
+ for (seg = segments; seg; seg = seg->next)
+ if (strcmp (seg->name, segment_name) == 0)
+ {
+ seg->used = TRUE;
+ expld.result.value = seg->value;
+ expld.result.str = NULL;
+ expld.result.section = NULL;
+ break;
+ }
+ }
+ else if (expld.result.valid_p)
{
- etree_value_type other;
+ etree_value_type lhs = expld.result;
- other = exp_fold_tree (tree->binary.rhs,
- current_section,
- allocation_done, dot, dotp);
- if (other.valid_p)
+ exp_fold_tree_1 (tree->binary.rhs);
+ if (expld.result.valid_p)
{
/* If the values are from different sections, or this is an
absolute expression, make both the source arguments
absolute. However, adding or subtracting an absolute
value from a relative value is meaningful, and is an
exception. */
- if (current_section != abs_output_section
- && (other.section == abs_output_section
- || (result.section == abs_output_section
- && tree->type.node_code == '+'))
+ if (expld.section != bfd_abs_section_ptr
+ && lhs.section == bfd_abs_section_ptr
+ && tree->type.node_code == '+')
+ {
+ /* Keep the section of the rhs term. */
+ expld.result.value = lhs.value + expld.result.value;
+ return;
+ }
+ else if (expld.section != bfd_abs_section_ptr
+ && expld.result.section == bfd_abs_section_ptr
&& (tree->type.node_code == '+'
|| tree->type.node_code == '-'))
{
- if (other.section != abs_output_section)
- {
- /* Keep the section of the other term. */
- if (tree->type.node_code == '+')
- other.value = result.value + other.value;
- else
- other.value = result.value - other.value;
- return other;
- }
+ /* Keep the section of the lhs term. */
+ expld.result.section = lhs.section;
}
- else if (result.section != other.section
- || current_section == abs_output_section)
+ else if (expld.result.section != lhs.section
+ || expld.section == bfd_abs_section_ptr)
{
- make_abs (&result);
- make_abs (&other);
+ make_abs ();
+ lhs.value += lhs.section->vma;
}
switch (tree->type.node_code)
{
case '%':
- if (other.value == 0)
+ if (expld.result.value != 0)
+ expld.result.value = ((bfd_signed_vma) lhs.value
+ % (bfd_signed_vma) expld.result.value);
+ else if (expld.phase != lang_mark_phase_enum)
einfo (_("%F%S %% by zero\n"));
- result.value = ((bfd_signed_vma) result.value
- % (bfd_signed_vma) other.value);
break;
case '/':
- if (other.value == 0)
+ if (expld.result.value != 0)
+ expld.result.value = ((bfd_signed_vma) lhs.value
+ / (bfd_signed_vma) expld.result.value);
+ else if (expld.phase != lang_mark_phase_enum)
einfo (_("%F%S / by zero\n"));
- result.value = ((bfd_signed_vma) result.value
- / (bfd_signed_vma) other.value);
break;
-#define BOP(x,y) case x : result.value = result.value y other.value; break;
+#define BOP(x, y) \
+ case x: \
+ expld.result.value = lhs.value y expld.result.value; \
+ break;
+
BOP ('+', +);
BOP ('*', *);
BOP ('-', -);
@@ -374,45 +375,82 @@ fold_binary (etree_type *tree,
BOP (OROR, ||);
case MAX_K:
- if (result.value < other.value)
- result = other;
+ if (lhs.value > expld.result.value)
+ expld.result.value = lhs.value;
break;
case MIN_K:
- if (result.value > other.value)
- result = other;
+ if (lhs.value < expld.result.value)
+ expld.result.value = lhs.value;
break;
case ALIGN_K:
- result.value = align_n (result.value, other.value);
+ expld.result.value = align_n (lhs.value, expld.result.value);
break;
-
+
case DATA_SEGMENT_ALIGN:
- if (allocation_done != lang_first_phase_enum
- && current_section == abs_output_section
- && (exp_data_seg.phase == exp_dataseg_none
- || exp_data_seg.phase == exp_dataseg_adjust
- || allocation_done != lang_allocating_phase_enum))
+ if (expld.phase != lang_first_phase_enum
+ && expld.section == bfd_abs_section_ptr
+ && (expld.dataseg.phase == exp_dataseg_none
+ || expld.dataseg.phase == exp_dataseg_adjust
+ || expld.dataseg.phase == exp_dataseg_relro_adjust
+ || expld.phase == lang_final_phase_enum))
{
- bfd_vma maxpage = result.value;
+ bfd_vma maxpage = lhs.value;
+ bfd_vma commonpage = expld.result.value;
- result.value = align_n (dot, maxpage);
- if (exp_data_seg.phase != exp_dataseg_adjust)
+ expld.result.value = align_n (expld.dot, maxpage);
+ if (expld.dataseg.phase == exp_dataseg_relro_adjust)
+ expld.result.value = expld.dataseg.base;
+ else if (expld.dataseg.phase != exp_dataseg_adjust)
{
- result.value += dot & (maxpage - 1);
- if (allocation_done == lang_allocating_phase_enum)
+ expld.result.value += expld.dot & (maxpage - 1);
+ if (expld.phase == lang_allocating_phase_enum)
{
- exp_data_seg.phase = exp_dataseg_align_seen;
- exp_data_seg.base = result.value;
- exp_data_seg.pagesize = other.value;
+ expld.dataseg.phase = exp_dataseg_align_seen;
+ expld.dataseg.min_base = align_n (expld.dot, maxpage);
+ expld.dataseg.base = expld.result.value;
+ expld.dataseg.pagesize = commonpage;
+ expld.dataseg.maxpagesize = maxpage;
+ expld.dataseg.relro_end = 0;
}
}
- else if (other.value < maxpage)
- result.value += (dot + other.value - 1)
- & (maxpage - other.value);
+ else if (commonpage < maxpage)
+ expld.result.value += ((expld.dot + commonpage - 1)
+ & (maxpage - commonpage));
+ }
+ else
+ expld.result.valid_p = FALSE;
+ break;
+
+ case DATA_SEGMENT_RELRO_END:
+ if (expld.phase != lang_first_phase_enum
+ && (expld.dataseg.phase == exp_dataseg_align_seen
+ || expld.dataseg.phase == exp_dataseg_adjust
+ || expld.dataseg.phase == exp_dataseg_relro_adjust
+ || expld.phase == lang_final_phase_enum))
+ {
+ if (expld.dataseg.phase == exp_dataseg_align_seen
+ || expld.dataseg.phase == exp_dataseg_relro_adjust)
+ expld.dataseg.relro_end = lhs.value + expld.result.value;
+
+ if (expld.dataseg.phase == exp_dataseg_relro_adjust
+ && (expld.dataseg.relro_end
+ & (expld.dataseg.pagesize - 1)))
+ {
+ expld.dataseg.relro_end += expld.dataseg.pagesize - 1;
+ expld.dataseg.relro_end &= ~(expld.dataseg.pagesize - 1);
+ expld.result.value = (expld.dataseg.relro_end
+ - expld.result.value);
+ }
+ else
+ expld.result.value = lhs.value;
+
+ if (expld.dataseg.phase == exp_dataseg_align_seen)
+ expld.dataseg.phase = exp_dataseg_relro_seen;
}
else
- result.valid_p = FALSE;
+ expld.result.valid_p = FALSE;
break;
default:
@@ -420,54 +458,41 @@ fold_binary (etree_type *tree,
}
}
else
- {
- result.valid_p = FALSE;
- }
+ expld.result.valid_p = FALSE;
}
-
- return result;
}
-static etree_value_type
-fold_trinary (etree_type *tree,
- lang_output_section_statement_type *current_section,
- lang_phase_type allocation_done,
- bfd_vma dot,
- bfd_vma *dotp)
+static void
+fold_trinary (etree_type *tree)
{
- etree_value_type result;
-
- result = exp_fold_tree (tree->trinary.cond, current_section,
- allocation_done, dot, dotp);
- if (result.valid_p)
- result = exp_fold_tree ((result.value
- ? tree->trinary.lhs
- : tree->trinary.rhs),
- current_section,
- allocation_done, dot, dotp);
-
- return result;
+ exp_fold_tree_1 (tree->trinary.cond);
+ if (expld.result.valid_p)
+ exp_fold_tree_1 (expld.result.value
+ ? tree->trinary.lhs
+ : tree->trinary.rhs);
}
-static etree_value_type
-fold_name (etree_type *tree,
- lang_output_section_statement_type *current_section,
- lang_phase_type allocation_done,
- bfd_vma dot)
+static void
+fold_name (etree_type *tree)
{
- etree_value_type result;
+ memset (&expld.result, 0, sizeof (expld.result));
- result.valid_p = FALSE;
-
switch (tree->type.node_code)
{
case SIZEOF_HEADERS:
- if (allocation_done != lang_first_phase_enum)
- result = new_abs (bfd_sizeof_headers (output_bfd,
- link_info.relocatable));
+ if (expld.phase != lang_first_phase_enum)
+ {
+ bfd_vma hdr_size = 0;
+ /* Don't find the real header size if only marking sections;
+ The bfd function may cache incorrect data. */
+ if (expld.phase != lang_mark_phase_enum)
+ hdr_size = bfd_sizeof_headers (output_bfd, &link_info);
+ new_abs (hdr_size);
+ }
break;
+
case DEFINED:
- if (allocation_done == lang_first_phase_enum)
+ if (expld.phase == lang_first_phase_enum)
lang_track_definedness (tree->name.name);
else
{
@@ -478,23 +503,23 @@ fold_name (etree_type *tree,
h = bfd_wrapped_link_hash_lookup (output_bfd, &link_info,
tree->name.name,
FALSE, FALSE, TRUE);
- result.value = (h != NULL
- && (h->type == bfd_link_hash_defined
- || h->type == bfd_link_hash_defweak
- || h->type == bfd_link_hash_common)
- && (def_iteration == lang_statement_iteration
- || def_iteration == -1));
- result.section = abs_output_section;
- result.valid_p = TRUE;
+ expld.result.value = (h != NULL
+ && (h->type == bfd_link_hash_defined
+ || h->type == bfd_link_hash_defweak
+ || h->type == bfd_link_hash_common)
+ && (def_iteration == lang_statement_iteration
+ || def_iteration == -1));
+ expld.result.section = bfd_abs_section_ptr;
+ expld.result.valid_p = TRUE;
}
break;
+
case NAME:
- if (tree->name.name[0] == '.' && tree->name.name[1] == 0)
- {
- if (allocation_done != lang_first_phase_enum)
- result = new_rel_from_section (dot, current_section);
- }
- else if (allocation_done != lang_first_phase_enum)
+ if (expld.phase == lang_first_phase_enum)
+ ;
+ else if (tree->name.name[0] == '.' && tree->name.name[1] == 0)
+ new_rel_from_abs (expld.dot);
+ else
{
struct bfd_link_hash_entry *h;
@@ -507,151 +532,192 @@ fold_name (etree_type *tree,
|| h->type == bfd_link_hash_defweak)
{
if (bfd_is_abs_section (h->u.def.section))
- result = new_abs (h->u.def.value);
- else if (allocation_done == lang_final_phase_enum
- || allocation_done == lang_allocating_phase_enum)
+ new_abs (h->u.def.value);
+ else
{
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),
- NULL,
- os);
+ if (expld.phase != lang_mark_phase_enum)
+ einfo (_("%X%S: unresolvable symbol `%s'"
+ " referenced in expression\n"),
+ tree->name.name);
}
+ else
+ new_rel (h->u.def.value + h->u.def.section->output_offset,
+ NULL, output_section);
}
}
- else if (allocation_done == lang_final_phase_enum)
+ else if (expld.phase == lang_final_phase_enum
+ || expld.assigning_to_dot)
einfo (_("%F%S: undefined symbol `%s' referenced in expression\n"),
tree->name.name);
else if (h->type == bfd_link_hash_new)
{
h->type = bfd_link_hash_undefined;
h->u.undef.abfd = NULL;
- bfd_link_add_undef (link_info.hash, h);
+ if (h->u.undef.next == NULL && h != link_info.hash->undefs_tail)
+ bfd_link_add_undef (link_info.hash, h);
}
}
break;
case ADDR:
- if (allocation_done != lang_first_phase_enum)
+ if (expld.phase != lang_first_phase_enum)
{
lang_output_section_statement_type *os;
os = lang_output_section_find (tree->name.name);
- if (os && os->processed > 0)
- result = new_rel (0, NULL, os);
+ if (os == NULL)
+ {
+ if (expld.phase == lang_final_phase_enum)
+ einfo (_("%F%S: undefined section `%s' referenced in expression\n"),
+ tree->name.name);
+ }
+ else if (os->processed_vma)
+ new_rel (0, NULL, os->bfd_section);
}
break;
case LOADADDR:
- if (allocation_done != lang_first_phase_enum)
+ if (expld.phase != lang_first_phase_enum)
{
lang_output_section_statement_type *os;
os = lang_output_section_find (tree->name.name);
- if (os && os->processed != 0)
+ if (os == NULL)
+ {
+ if (expld.phase == lang_final_phase_enum)
+ einfo (_("%F%S: undefined section `%s' referenced in expression\n"),
+ tree->name.name);
+ }
+ else if (os->processed_lma)
{
if (os->load_base == NULL)
- result = new_rel (0, NULL, os);
+ new_abs (os->bfd_section->lma);
else
- result = exp_fold_tree_no_dot (os->load_base,
- abs_output_section,
- allocation_done);
+ {
+ exp_fold_tree_1 (os->load_base);
+ make_abs ();
+ }
}
}
break;
case SIZEOF:
- if (allocation_done != lang_first_phase_enum)
+ case ALIGNOF:
+ if (expld.phase != lang_first_phase_enum)
{
- int opb = bfd_octets_per_byte (output_bfd);
lang_output_section_statement_type *os;
os = lang_output_section_find (tree->name.name);
- if (os && os->processed > 0)
- result = new_abs (os->bfd_section->_raw_size / opb);
+ if (os == NULL)
+ {
+ if (expld.phase == lang_final_phase_enum)
+ einfo (_("%F%S: undefined section `%s' referenced in expression\n"),
+ tree->name.name);
+ new_abs (0);
+ }
+ else if (os->processed_vma)
+ {
+ bfd_vma val;
+
+ if (tree->type.node_code == SIZEOF)
+ val = os->bfd_section->size / bfd_octets_per_byte (output_bfd);
+ else
+ val = (bfd_vma)1 << os->bfd_section->alignment_power;
+
+ new_abs (val);
+ }
}
break;
+ case LENGTH:
+ {
+ lang_memory_region_type *mem;
+
+ mem = lang_memory_region_lookup (tree->name.name, FALSE);
+ if (mem != NULL)
+ new_abs (mem->length);
+ else
+ einfo (_("%F%S: undefined MEMORY region `%s'"
+ " referenced in expression\n"), tree->name.name);
+ }
+ break;
+
+ case ORIGIN:
+ {
+ lang_memory_region_type *mem;
+
+ mem = lang_memory_region_lookup (tree->name.name, FALSE);
+ if (mem != NULL)
+ new_abs (mem->origin);
+ else
+ einfo (_("%F%S: undefined MEMORY region `%s'"
+ " referenced in expression\n"), tree->name.name);
+ }
+ break;
+
+ case CONSTANT:
+ if (strcmp (tree->name.name, "MAXPAGESIZE") == 0)
+ new_abs (bfd_emul_get_maxpagesize (default_target));
+ else if (strcmp (tree->name.name, "COMMONPAGESIZE") == 0)
+ new_abs (bfd_emul_get_commonpagesize (default_target));
+ else
+ einfo (_("%F%S: unknown constant `%s' referenced in expression\n"),
+ tree->name.name);
+ break;
+
default:
FAIL ();
break;
}
-
- return result;
}
-etree_value_type
-exp_fold_tree (etree_type *tree,
- lang_output_section_statement_type *current_section,
- lang_phase_type allocation_done,
- bfd_vma dot,
- bfd_vma *dotp)
+static void
+exp_fold_tree_1 (etree_type *tree)
{
- etree_value_type result;
-
if (tree == NULL)
{
- result.valid_p = FALSE;
- return result;
+ memset (&expld.result, 0, sizeof (expld.result));
+ return;
}
switch (tree->type.node_class)
{
case etree_value:
- result = new_rel (tree->value.value, tree->value.str, current_section);
+ new_rel (tree->value.value, tree->value.str, expld.section);
break;
case etree_rel:
- if (allocation_done != lang_final_phase_enum)
- result.valid_p = FALSE;
+ if (expld.phase != lang_first_phase_enum)
+ {
+ asection *output_section = tree->rel.section->output_section;
+ new_rel (tree->rel.value + tree->rel.section->output_offset,
+ NULL, output_section);
+ }
else
- result = new_rel ((tree->rel.value
- + tree->rel.section->output_section->vma
- + tree->rel.section->output_offset),
- NULL,
- current_section);
+ memset (&expld.result, 0, sizeof (expld.result));
break;
case etree_assert:
- result = exp_fold_tree (tree->assert_s.child,
- current_section,
- allocation_done, dot, dotp);
- if (result.valid_p)
- {
- if (! result.value)
- einfo ("%F%P: %s\n", tree->assert_s.message);
- return result;
- }
+ exp_fold_tree_1 (tree->assert_s.child);
+ if (expld.phase == lang_final_phase_enum && !expld.result.value)
+ einfo ("%X%P: %s\n", tree->assert_s.message);
break;
case etree_unary:
- result = fold_unary (tree, current_section, allocation_done,
- dot, dotp);
+ fold_unary (tree);
break;
case etree_binary:
- result = fold_binary (tree, current_section, allocation_done,
- dot, dotp);
+ fold_binary (tree);
break;
case etree_trinary:
- result = fold_trinary (tree, current_section, allocation_done,
- dot, dotp);
+ fold_trinary (tree);
break;
case etree_assign:
@@ -662,118 +728,129 @@ exp_fold_tree (etree_type *tree,
/* Assignment to dot can only be done during allocation. */
if (tree->type.node_class != etree_assign)
einfo (_("%F%S can not PROVIDE assignment to location counter\n"));
- if (allocation_done == lang_allocating_phase_enum
- || (allocation_done == lang_final_phase_enum
- && current_section == abs_output_section))
+ if (expld.phase == lang_mark_phase_enum
+ || expld.phase == lang_allocating_phase_enum
+ || (expld.phase == lang_final_phase_enum
+ && expld.section == bfd_abs_section_ptr))
{
- result = exp_fold_tree (tree->assign.src,
- current_section,
- allocation_done, dot,
- dotp);
- if (! result.valid_p)
- einfo (_("%F%S invalid assignment to location counter\n"));
+ /* Notify the folder that this is an assignment to dot. */
+ expld.assigning_to_dot = TRUE;
+ exp_fold_tree_1 (tree->assign.src);
+ expld.assigning_to_dot = FALSE;
+
+ if (!expld.result.valid_p)
+ {
+ if (expld.phase != lang_mark_phase_enum)
+ einfo (_("%F%S invalid assignment to location counter\n"));
+ }
+ else if (expld.dotp == NULL)
+ einfo (_("%F%S assignment to location counter"
+ " invalid outside of SECTION\n"));
else
{
- if (current_section == NULL)
- einfo (_("%F%S assignment to location counter invalid outside of SECTION\n"));
+ bfd_vma nextdot;
+
+ nextdot = expld.result.value + expld.section->vma;
+ if (nextdot < expld.dot
+ && expld.section != bfd_abs_section_ptr)
+ einfo (_("%F%S cannot move location counter backwards"
+ " (from %V to %V)\n"), expld.dot, nextdot);
else
{
- bfd_vma nextdot;
-
- nextdot = (result.value
- + current_section->bfd_section->vma);
- if (nextdot < dot
- && current_section != abs_output_section)
- einfo (_("%F%S cannot move location counter backwards (from %V to %V)\n"),
- dot, nextdot);
- else
- *dotp = nextdot;
+ expld.dot = nextdot;
+ *expld.dotp = nextdot;
}
}
}
+ else
+ memset (&expld.result, 0, sizeof (expld.result));
}
else
{
- result = exp_fold_tree (tree->assign.src,
- current_section, allocation_done,
- dot, dotp);
- if (result.valid_p)
- {
- bfd_boolean create;
- struct bfd_link_hash_entry *h;
+ struct bfd_link_hash_entry *h = NULL;
- if (tree->type.node_class == etree_assign)
- create = TRUE;
- else
- create = FALSE;
+ if (tree->type.node_class == etree_provide)
+ {
h = bfd_link_hash_lookup (link_info.hash, tree->assign.dst,
- create, FALSE, TRUE);
+ FALSE, FALSE, TRUE);
+ if (h == NULL
+ || (h->type != bfd_link_hash_new
+ && h->type != bfd_link_hash_undefined
+ && h->type != bfd_link_hash_common))
+ {
+ /* Do nothing. The symbol was never referenced, or was
+ defined by some object. */
+ break;
+ }
+ }
+
+ exp_fold_tree_1 (tree->assign.src);
+ if (expld.result.valid_p)
+ {
if (h == NULL)
{
- if (create)
+ h = bfd_link_hash_lookup (link_info.hash, tree->assign.dst,
+ TRUE, FALSE, TRUE);
+ if (h == NULL)
einfo (_("%P%F:%s: hash creation failed\n"),
tree->assign.dst);
}
- else if (tree->type.node_class == etree_provide
- && h->type != bfd_link_hash_new
- && h->type != bfd_link_hash_undefined
- && h->type != bfd_link_hash_common)
- {
- /* Do nothing. The symbol was defined by some
- object. */
- }
- else
- {
- /* FIXME: Should we worry if the symbol is already
- defined? */
- lang_update_definedness (tree->assign.dst, h);
- h->type = bfd_link_hash_defined;
- h->u.def.value = result.value;
- h->u.def.section = result.section->bfd_section;
- if (tree->type.node_class == etree_provide)
- tree->type.node_class = etree_provided;
- }
+
+ /* FIXME: Should we worry if the symbol is already
+ defined? */
+ lang_update_definedness (tree->assign.dst, h);
+ h->type = bfd_link_hash_defined;
+ h->u.def.value = expld.result.value;
+ h->u.def.section = expld.result.section;
+ if (tree->type.node_class == etree_provide)
+ tree->type.node_class = etree_provided;
}
}
break;
case etree_name:
- result = fold_name (tree, current_section, allocation_done, dot);
+ fold_name (tree);
break;
default:
FAIL ();
+ memset (&expld.result, 0, sizeof (expld.result));
break;
}
+}
- return result;
+void
+exp_fold_tree (etree_type *tree, asection *current_section, bfd_vma *dotp)
+{
+ expld.dot = *dotp;
+ expld.dotp = dotp;
+ expld.section = current_section;
+ exp_fold_tree_1 (tree);
}
-static etree_value_type
-exp_fold_tree_no_dot (etree_type *tree,
- lang_output_section_statement_type *current_section,
- lang_phase_type allocation_done)
+static void
+exp_fold_tree_no_dot (etree_type *tree)
{
- return exp_fold_tree (tree, current_section, allocation_done, 0, NULL);
+ expld.dot = 0;
+ expld.dotp = NULL;
+ expld.section = bfd_abs_section_ptr;
+ exp_fold_tree_1 (tree);
}
etree_type *
exp_binop (int code, etree_type *lhs, etree_type *rhs)
{
etree_type value, *new;
- etree_value_type r;
value.type.node_code = code;
+ value.type.lineno = lhs->type.lineno;
value.binary.lhs = lhs;
value.binary.rhs = rhs;
value.type.node_class = etree_binary;
- r = exp_fold_tree_no_dot (&value,
- abs_output_section,
- lang_first_phase_enum);
- if (r.valid_p)
- {
- return exp_intop (r.value);
- }
+ exp_fold_tree_no_dot (&value);
+ if (expld.result.valid_p)
+ return exp_intop (expld.result.value);
+
new = stat_alloc (sizeof (new->binary));
memcpy (new, &value, sizeof (new->binary));
return new;
@@ -783,15 +860,16 @@ etree_type *
exp_trinop (int code, etree_type *cond, etree_type *lhs, etree_type *rhs)
{
etree_type value, *new;
- etree_value_type r;
+
value.type.node_code = code;
+ value.type.lineno = lhs->type.lineno;
value.trinary.lhs = lhs;
value.trinary.cond = cond;
value.trinary.rhs = rhs;
value.type.node_class = etree_trinary;
- r = exp_fold_tree_no_dot (&value, NULL, lang_first_phase_enum);
- if (r.valid_p)
- return exp_intop (r.value);
+ exp_fold_tree_no_dot (&value);
+ if (expld.result.valid_p)
+ return exp_intop (expld.result.value);
new = stat_alloc (sizeof (new->trinary));
memcpy (new, &value, sizeof (new->trinary));
@@ -803,14 +881,13 @@ exp_unop (int code, etree_type *child)
{
etree_type value, *new;
- etree_value_type r;
value.unary.type.node_code = code;
+ value.unary.type.lineno = child->type.lineno;
value.unary.child = child;
value.unary.type.node_class = etree_unary;
- r = exp_fold_tree_no_dot (&value, abs_output_section,
- lang_first_phase_enum);
- if (r.valid_p)
- return exp_intop (r.value);
+ exp_fold_tree_no_dot (&value);
+ if (expld.result.valid_p)
+ return exp_intop (expld.result.value);
new = stat_alloc (sizeof (new->unary));
memcpy (new, &value, sizeof (new->unary));
@@ -821,14 +898,15 @@ etree_type *
exp_nameop (int code, const char *name)
{
etree_type value, *new;
- etree_value_type r;
+
value.name.type.node_code = code;
+ value.name.type.lineno = lineno;
value.name.name = name;
value.name.type.node_class = etree_name;
- r = exp_fold_tree_no_dot (&value, NULL, lang_first_phase_enum);
- if (r.valid_p)
- return exp_intop (r.value);
+ exp_fold_tree_no_dot (&value);
+ if (expld.result.valid_p)
+ return exp_intop (expld.result.value);
new = stat_alloc (sizeof (new->name));
memcpy (new, &value, sizeof (new->name));
@@ -839,35 +917,31 @@ exp_nameop (int code, const char *name)
etree_type *
exp_assop (int code, const char *dst, etree_type *src)
{
- etree_type value, *new;
-
- value.assign.type.node_code = code;
+ etree_type *new;
- value.assign.src = src;
- value.assign.dst = dst;
- value.assign.type.node_class = etree_assign;
-
-#if 0
- if (exp_fold_tree_no_dot (&value, &result))
- return exp_intop (result);
-#endif
new = stat_alloc (sizeof (new->assign));
- memcpy (new, &value, sizeof (new->assign));
+ new->type.node_code = code;
+ new->type.lineno = src->type.lineno;
+ new->type.node_class = etree_assign;
+ new->assign.src = src;
+ new->assign.dst = dst;
return new;
}
/* Handle PROVIDE. */
etree_type *
-exp_provide (const char *dst, etree_type *src)
+exp_provide (const char *dst, etree_type *src, bfd_boolean hidden)
{
etree_type *n;
n = stat_alloc (sizeof (n->assign));
n->assign.type.node_code = '=';
+ n->assign.type.lineno = src->type.lineno;
n->assign.type.node_class = etree_provide;
n->assign.src = src;
n->assign.dst = dst;
+ n->assign.hidden = hidden;
return n;
}
@@ -880,6 +954,7 @@ exp_assert (etree_type *exp, const char *message)
n = stat_alloc (sizeof (n->assert_s));
n->assert_s.type.node_code = '!';
+ n->assert_s.type.lineno = exp->type.lineno;
n->assert_s.type.node_class = etree_assert;
n->assert_s.child = exp;
n->assert_s.message = message;
@@ -909,13 +984,6 @@ exp_print_tree (etree_type *tree)
minfo ("%s+0x%v", tree->rel.section->name, tree->rel.value);
return;
case etree_assign:
-#if 0
- if (tree->assign.dst->sdefs != NULL)
- fprintf (config.map_file, "%s (%x) ", tree->assign.dst->name,
- tree->assign.dst->sdefs->value);
- else
- fprintf (config.map_file, "%s (UNDEFINED)", tree->assign.dst->name);
-#endif
fprintf (config.map_file, "%s", tree->assign.dst);
exp_print_token (tree->type.node_code, TRUE);
exp_print_tree (tree->assign.src);
@@ -956,9 +1024,6 @@ exp_print_tree (etree_type *tree)
fprintf (config.map_file, ", %s)", tree->assert_s.message);
break;
- case etree_undef:
- fprintf (config.map_file, "????????");
- break;
case etree_name:
if (tree->type.node_code == NAME)
{
@@ -978,59 +1043,51 @@ exp_print_tree (etree_type *tree)
}
bfd_vma
-exp_get_vma (etree_type *tree,
- bfd_vma def,
- char *name,
- lang_phase_type allocation_done)
+exp_get_vma (etree_type *tree, bfd_vma def, char *name)
{
- etree_value_type r;
-
if (tree != NULL)
{
- r = exp_fold_tree_no_dot (tree, abs_output_section, allocation_done);
- if (! r.valid_p && name != NULL)
+ exp_fold_tree_no_dot (tree);
+ if (expld.result.valid_p)
+ return expld.result.value;
+ else if (name != NULL && expld.phase != lang_mark_phase_enum)
einfo (_("%F%S nonconstant expression for %s\n"), name);
- return r.value;
}
- else
- return def;
+ return def;
}
int
-exp_get_value_int (etree_type *tree,
- int def,
- char *name,
- lang_phase_type allocation_done)
+exp_get_value_int (etree_type *tree, int def, char *name)
{
- return exp_get_vma (tree, def, name, allocation_done);
+ return exp_get_vma (tree, def, name);
}
fill_type *
-exp_get_fill (etree_type *tree,
- fill_type *def,
- char *name,
- lang_phase_type allocation_done)
+exp_get_fill (etree_type *tree, fill_type *def, char *name)
{
fill_type *fill;
- etree_value_type r;
size_t len;
unsigned int val;
if (tree == NULL)
return def;
- r = exp_fold_tree_no_dot (tree, abs_output_section, allocation_done);
- if (! r.valid_p && name != NULL)
- einfo (_("%F%S nonconstant expression for %s\n"), name);
+ exp_fold_tree_no_dot (tree);
+ if (!expld.result.valid_p)
+ {
+ if (name != NULL && expld.phase != lang_mark_phase_enum)
+ einfo (_("%F%S nonconstant expression for %s\n"), name);
+ return def;
+ }
- if (r.str != NULL && (len = strlen (r.str)) != 0)
+ if (expld.result.str != NULL && (len = strlen (expld.result.str)) != 0)
{
unsigned char *dst;
unsigned char *s;
fill = xmalloc ((len + 1) / 2 + sizeof (*fill) - 1);
fill->size = (len + 1) / 2;
dst = fill->data;
- s = r.str;
+ s = (unsigned char *) expld.result.str;
val = 0;
do
{
@@ -1053,7 +1110,7 @@ exp_get_fill (etree_type *tree,
else
{
fill = xmalloc (4 + sizeof (*fill) - 1);
- val = r.value;
+ val = expld.result.value;
fill->data[0] = (val >> 24) & 0xff;
fill->data[1] = (val >> 16) & 0xff;
fill->data[2] = (val >> 8) & 0xff;
@@ -1064,20 +1121,24 @@ exp_get_fill (etree_type *tree,
}
bfd_vma
-exp_get_abs_int (etree_type *tree,
- int def ATTRIBUTE_UNUSED,
- char *name,
- lang_phase_type allocation_done)
+exp_get_abs_int (etree_type *tree, int def, char *name)
{
- etree_value_type res;
- res = exp_fold_tree_no_dot (tree, abs_output_section, allocation_done);
-
- if (res.valid_p)
- res.value += res.section->bfd_section->vma;
- else
- einfo (_("%F%S non constant expression for %s\n"), name);
+ if (tree != NULL)
+ {
+ exp_fold_tree_no_dot (tree);
- return res.value;
+ if (expld.result.valid_p)
+ {
+ expld.result.value += expld.result.section->vma;
+ return expld.result.value;
+ }
+ else if (name != NULL && expld.phase != lang_mark_phase_enum)
+ {
+ lineno = tree->type.lineno;
+ einfo (_("%F%S: nonconstant expression for %s\n"), name);
+ }
+ }
+ return def;
}
static bfd_vma
diff --git a/contrib/binutils/ld/ldexp.h b/contrib/binutils/ld/ldexp.h
index 99e7073..3534188 100644
--- a/contrib/binutils/ld/ldexp.h
+++ b/contrib/binutils/ld/ldexp.h
@@ -1,6 +1,6 @@
/* ldexp.h -
Copyright 1991, 1992, 1993, 1994, 1995, 1998, 1999, 2000, 2001, 2002,
- 2003, 2004 Free Software Foundation, Inc.
+ 2003, 2004, 2005 Free Software Foundation, Inc.
This file is part of GLD, the Gnu Linker.
@@ -16,8 +16,8 @@
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. */
+ Software Foundation, 51 Franklin Street - Fifth Floor, Boston, MA
+ 02110-1301, USA. */
#ifndef LDEXP_H
#define LDEXP_H
@@ -26,12 +26,13 @@
typedef struct {
bfd_vma value;
char *str;
- struct lang_output_section_statement_struct *section;
+ asection *section;
bfd_boolean valid_p;
} etree_value_type;
typedef struct {
int node_code;
+ unsigned int lineno;
enum {
etree_binary,
etree_trinary,
@@ -40,8 +41,6 @@ typedef struct {
etree_assign,
etree_provide,
etree_provided,
- etree_undef,
- etree_unspec,
etree_value,
etree_assert,
etree_rel
@@ -65,6 +64,7 @@ typedef union etree_union {
node_type type;
const char *dst;
union etree_union *src;
+ bfd_boolean hidden;
} assign;
struct {
node_type type;
@@ -91,15 +91,60 @@ typedef union etree_union {
} assert_s;
} etree_type;
-extern struct exp_data_seg {
- enum {
- exp_dataseg_none,
- exp_dataseg_align_seen,
- exp_dataseg_end_seen,
- exp_dataseg_adjust
- } phase;
- bfd_vma base, end, pagesize;
-} exp_data_seg;
+typedef enum {
+ lang_first_phase_enum,
+ lang_mark_phase_enum,
+ lang_allocating_phase_enum,
+ lang_final_phase_enum
+} lang_phase_type;
+
+struct ldexp_control {
+ /* Modify expression evaluation depending on this. */
+ lang_phase_type phase;
+
+ /* Principally used for diagnostics. */
+ bfd_boolean assigning_to_dot;
+
+ /* Working results. */
+ etree_value_type result;
+ bfd_vma dot;
+
+ /* Current dot and section passed to ldexp folder. */
+ bfd_vma *dotp;
+ asection *section;
+
+ /* State machine and results for DATASEG. */
+ struct {
+ enum {
+ exp_dataseg_none,
+ exp_dataseg_align_seen,
+ exp_dataseg_relro_seen,
+ exp_dataseg_end_seen,
+ exp_dataseg_relro_adjust,
+ exp_dataseg_adjust
+ } phase;
+
+ bfd_vma base, min_base, relro_end, end, pagesize, maxpagesize;
+ } dataseg;
+};
+
+extern struct ldexp_control expld;
+
+/* A maps from a segment name to a base address. */
+typedef struct segment_struct {
+ /* The next segment in the linked list. */
+ struct segment_struct *next;
+ /* The name of the sgement. */
+ const char *name;
+ /* The base address for the segment. */
+ bfd_vma value;
+ /* True if a SEGMENT_START directive corresponding to this segment
+ has been seen. */
+ bfd_boolean used;
+} segment_type;
+
+/* The segments specified by the user on the command-line. */
+extern segment_type *segments;
typedef struct _fill_type fill_type;
@@ -109,11 +154,8 @@ etree_type *exp_bigintop
(bfd_vma, char *);
etree_type *exp_relop
(asection *, bfd_vma);
-etree_value_type invalid
- (void);
-etree_value_type exp_fold_tree
- (etree_type *, struct lang_output_section_statement_struct *,
- lang_phase_type, bfd_vma, bfd_vma *);
+void exp_fold_tree
+ (etree_type *, asection *, bfd_vma *);
etree_type *exp_binop
(int, etree_type *, etree_type *);
etree_type *exp_trinop
@@ -125,18 +167,18 @@ etree_type *exp_nameop
etree_type *exp_assop
(int, const char *, etree_type *);
etree_type *exp_provide
- (const char *, etree_type *);
+ (const char *, etree_type *, bfd_boolean);
etree_type *exp_assert
(etree_type *, const char *);
void exp_print_tree
(etree_type *);
bfd_vma exp_get_vma
- (etree_type *, bfd_vma, char *, lang_phase_type);
+ (etree_type *, bfd_vma, char *);
int exp_get_value_int
- (etree_type *, int, char *, lang_phase_type);
+ (etree_type *, int, char *);
fill_type *exp_get_fill
- (etree_type *, fill_type *, char *, lang_phase_type);
+ (etree_type *, fill_type *, char *);
bfd_vma exp_get_abs_int
- (etree_type *, int, char *, lang_phase_type);
+ (etree_type *, int, char *);
#endif
diff --git a/contrib/binutils/ld/ldfile.c b/contrib/binutils/ld/ldfile.c
index a6f0d60..9781aac 100644
--- a/contrib/binutils/ld/ldfile.c
+++ b/contrib/binutils/ld/ldfile.c
@@ -1,6 +1,6 @@
/* Linker file opening and searching.
Copyright 1991, 1992, 1993, 1994, 1995, 1998, 1999, 2000, 2001, 2002,
- 2003, 2004 Free Software Foundation, Inc.
+ 2003, 2004, 2005, 2007 Free Software Foundation, Inc.
This file is part of GLD, the Gnu Linker.
@@ -16,13 +16,13 @@
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. */
+ Software Foundation, 51 Franklin Street - Fifth Floor, Boston, MA
+ 02110-1301, USA. */
/* ldfile.c: look after all the file stuff. */
-#include "bfd.h"
#include "sysdep.h"
+#include "bfd.h"
#include "bfdlink.h"
#include "safe-ctype.h"
#include "ld.h"
@@ -44,20 +44,15 @@ unsigned long ldfile_output_machine;
enum bfd_architecture ldfile_output_architecture;
search_dirs_type * search_head;
-#ifndef MPW
#ifdef VMS
-char * slash = "";
+static char * slash = "";
#else
#if defined (_WIN32) && ! defined (__CYGWIN32__)
-char * slash = "\\";
+static char * slash = "\\";
#else
-char * slash = "/";
+static char * slash = "/";
#endif
#endif
-#else /* MPW */
-/* The MPW path char is a colon. */
-char * slash = ":";
-#endif /* MPW */
typedef struct search_arch
{
@@ -156,9 +151,10 @@ ldfile_try_open_bfd (const char *attempt,
/* If we are searching for this file, see if the architecture is
compatible with the output file. If it isn't, keep searching.
If we can't open the file as an object file, stop the search
- here. */
+ here. If we are statically linking, ensure that we don't link
+ a dynamic object. */
- if (entry->search_dirs_flag)
+ if (entry->search_dirs_flag || !entry->dynamic)
{
bfd *check;
@@ -172,6 +168,7 @@ ldfile_try_open_bfd (const char *attempt,
if (! bfd_check_format (check, bfd_object))
{
if (check == entry->the_bfd
+ && entry->search_dirs_flag
&& bfd_get_error () == bfd_error_file_not_recognized
&& ! ldemul_unrecognized_file (entry))
{
@@ -255,8 +252,10 @@ ldfile_try_open_bfd (const char *attempt,
yyin = NULL;
if (skip)
{
- einfo (_("%P: skipping incompatible %s when searching for %s\n"),
- attempt, entry->local_sym_name);
+ if (command_line.warn_search_mismatch)
+ einfo (_("%P: skipping incompatible %s "
+ "when searching for %s\n"),
+ attempt, entry->local_sym_name);
bfd_close (entry->the_bfd);
entry->the_bfd = NULL;
return FALSE;
@@ -265,15 +264,27 @@ ldfile_try_open_bfd (const char *attempt,
return TRUE;
}
- if ((bfd_arch_get_compatible (check, output_bfd,
- command_line.accept_unknown_input_arch) == NULL)
+ if (!entry->dynamic && (entry->the_bfd->flags & DYNAMIC) != 0)
+ {
+ einfo (_("%F%P: attempted static link of dynamic object `%s'\n"),
+ attempt);
+ bfd_close (entry->the_bfd);
+ entry->the_bfd = NULL;
+ return FALSE;
+ }
+
+ if (entry->search_dirs_flag
+ && !bfd_arch_get_compatible (check, output_bfd,
+ command_line.accept_unknown_input_arch)
/* XCOFF archives can have 32 and 64 bit objects. */
&& ! (bfd_get_flavour (check) == bfd_target_xcoff_flavour
&& bfd_get_flavour (output_bfd) == bfd_target_xcoff_flavour
&& bfd_check_format (entry->the_bfd, bfd_archive)))
{
- einfo (_("%P: skipping incompatible %s when searching for %s\n"),
- attempt, entry->local_sym_name);
+ if (command_line.warn_search_mismatch)
+ einfo (_("%P: skipping incompatible %s "
+ "when searching for %s\n"),
+ attempt, entry->local_sym_name);
bfd_close (entry->the_bfd);
entry->the_bfd = NULL;
return FALSE;
@@ -455,7 +466,7 @@ try_open (const char *name, const char *exten)
/* Try to open NAME; if that fails, look for it in any directories
specified with -L, without and with EXTEND appended. */
-FILE *
+static FILE *
ldfile_find_command_file (const char *name, const char *extend)
{
search_dirs_type *search;
@@ -500,61 +511,6 @@ ldfile_open_command_file (const char *name)
saved_script_handle = ldlex_input_stack;
}
-#ifdef GNU960
-static char *
-gnu960_map_archname (char *name)
-{
- struct tabentry { char *cmd_switch; char *arch; };
- static struct tabentry arch_tab[] =
- {
- "", "",
- "KA", "ka",
- "KB", "kb",
- "KC", "mc", /* Synonym for MC */
- "MC", "mc",
- "CA", "ca",
- "SA", "ka", /* Functionally equivalent to KA */
- "SB", "kb", /* Functionally equivalent to KB */
- NULL, ""
- };
- struct tabentry *tp;
-
- for (tp = arch_tab; tp->cmd_switch != NULL; tp++)
- {
- if (! strcmp (name,tp->cmd_switch))
- break;
- }
-
- if (tp->cmd_switch == NULL)
- einfo (_("%P%F: unknown architecture: %s\n"), name);
-
- return tp->arch;
-}
-
-void
-ldfile_add_arch (char *name)
-{
- search_arch_type *new = xmalloc (sizeof (search_arch_type));
-
- if (*name != '\0')
- {
- if (ldfile_output_machine_name[0] != '\0')
- {
- einfo (_("%P%F: target architecture respecified\n"));
- return;
- }
-
- ldfile_output_machine_name = name;
- }
-
- new->next = NULL;
- new->name = gnu960_map_archname (name);
- *search_arch_tail_ptr = new;
- search_arch_tail_ptr = &new->next;
-}
-
-#else /* not GNU960 */
-
void
ldfile_add_arch (const char *in_name)
{
@@ -574,7 +530,6 @@ ldfile_add_arch (const char *in_name)
search_arch_tail_ptr = &new->next;
}
-#endif
/* Set the output architecture. */
diff --git a/contrib/binutils/ld/ldfile.h b/contrib/binutils/ld/ldfile.h
index 6d5f09d..b9ace6b 100644
--- a/contrib/binutils/ld/ldfile.h
+++ b/contrib/binutils/ld/ldfile.h
@@ -16,8 +16,8 @@
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. */
+ the Free Software Foundation, 51 Franklin Street - Fifth Floor,
+ Boston, MA 02110-1301, USA. */
#ifndef LDFILE_H
#define LDFILE_H
@@ -54,8 +54,6 @@ extern void ldfile_open_file
(struct lang_input_statement_struct *);
extern bfd_boolean ldfile_try_open_bfd
(const char *, struct lang_input_statement_struct *);
-extern FILE *ldfile_find_command_file
- (const char *name, const char *extend);
extern void ldfile_set_output_arch
(const char *, enum bfd_architecture);
extern bfd_boolean ldfile_open_file_search
diff --git a/contrib/binutils/ld/ldgram.y b/contrib/binutils/ld/ldgram.y
index 6c46c85..c6f268b 100644
--- a/contrib/binutils/ld/ldgram.y
+++ b/contrib/binutils/ld/ldgram.y
@@ -1,23 +1,23 @@
/* A YACC grammar to parse a superset of the AT&T linker scripting language.
Copyright 1991, 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999, 2000,
- 2001, 2002, 2003 Free Software Foundation, Inc.
+ 2001, 2002, 2003, 2004, 2005, 2006, 2007 Free Software Foundation, Inc.
Written by Steve Chamberlain of Cygnus Support (steve@cygnus.com).
-This file is part of GNU ld.
+ This file is part of GNU ld.
-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 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.
+ 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. */
+ 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., 51 Franklin Street - Fifth Floor, Boston, MA 02110-1301, USA. */
%{
/*
@@ -26,8 +26,8 @@ Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */
#define DONTDECLARE_MALLOC
-#include "bfd.h"
#include "sysdep.h"
+#include "bfd.h"
#include "bfdlink.h"
#include "ld.h"
#include "ldexp.h"
@@ -46,10 +46,8 @@ Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */
#endif
static enum section_type sectype;
+static lang_memory_region_type *region;
-lang_memory_region_type *region;
-
-bfd_boolean ldgram_want_filename = TRUE;
FILE *saved_script_handle = NULL;
bfd_boolean force_make_executable = FALSE;
@@ -94,7 +92,7 @@ static int error_index;
}
%type <etree> exp opt_exp_with_type mustbe_exp opt_at phdr_type phdr_val
-%type <etree> opt_exp_without_type opt_subalign
+%type <etree> opt_exp_without_type opt_subalign opt_align
%type <fill> fill_opt fill_exp
%type <name_list> exclude_name_list
%type <wildcard_list> file_NAME_list
@@ -128,33 +126,36 @@ static int error_index;
%token END
%left <token> '('
%token <token> ALIGN_K BLOCK BIND QUAD SQUAD LONG SHORT BYTE
-%token SECTIONS PHDRS SORT DATA_SEGMENT_ALIGN DATA_SEGMENT_END
+%token SECTIONS PHDRS DATA_SEGMENT_ALIGN DATA_SEGMENT_RELRO_END DATA_SEGMENT_END
+%token SORT_BY_NAME SORT_BY_ALIGNMENT
%token '{' '}'
%token SIZEOF_HEADERS OUTPUT_FORMAT FORCE_COMMON_ALLOCATION OUTPUT_ARCH
%token INHIBIT_COMMON_ALLOCATION
-%token SIZEOF_HEADERS
+%token SEGMENT_START
%token INCLUDE
-%token MEMORY DEFSYMEND
+%token MEMORY
%token NOLOAD DSECT COPY INFO OVERLAY
-%token NAME LNAME DEFINED TARGET_K SEARCH_DIR MAP ENTRY
+%token DEFINED TARGET_K SEARCH_DIR MAP ENTRY
%token <integer> NEXT
-%token SIZEOF ADDR LOADADDR MAX_K MIN_K
+%token SIZEOF ALIGNOF ADDR LOADADDR MAX_K MIN_K
%token STARTUP HLL SYSLIB FLOAT NOFLOAT NOCROSSREFS
%token ORIGIN FILL
%token LENGTH CREATE_OBJECT_SYMBOLS INPUT GROUP OUTPUT CONSTRUCTORS
-%token ALIGNMOD AT SUBALIGN PROVIDE
-%type <token> assign_op atype attributes_opt
+%token ALIGNMOD AT SUBALIGN PROVIDE PROVIDE_HIDDEN AS_NEEDED
+%type <token> assign_op atype attributes_opt sect_constraint
%type <name> filename
%token CHIP LIST SECT ABSOLUTE LOAD NEWLINE ENDWORD ORDER NAMEWORD ASSERT_K
%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 VERSIONK INPUT_VERSION_SCRIPT
-%token KEEP
+%token KEEP ONLY_IF_RO ONLY_IF_RW SPECIAL
%token EXCLUDE_FILE
+%token CONSTANT
%type <versyms> vers_defns
%type <versnode> vers_tag
%type <deflist> verdep
+%token INPUT_DYNAMIC_LIST
%%
@@ -162,6 +163,7 @@ file:
INPUT_SCRIPT script_file
| INPUT_MRI_SCRIPT mri_script_file
| INPUT_VERSION_SCRIPT version_script_file
+ | INPUT_DYNAMIC_LIST dynamic_list_file
| INPUT_DEFSYM defsym_expr
;
@@ -278,33 +280,33 @@ casesymlist:
| casesymlist ',' NAME
;
+/* Parsed as expressions so that commas separate entries */
extern_name_list:
+ { ldlex_expression (); }
+ extern_name_list_body
+ { ldlex_popstate (); }
+
+extern_name_list_body:
NAME
{ ldlang_add_undef ($1); }
- | extern_name_list NAME
+ | extern_name_list_body NAME
{ ldlang_add_undef ($2); }
- | extern_name_list ',' NAME
+ | extern_name_list_body ',' NAME
{ ldlang_add_undef ($3); }
;
script_file:
- {
- ldlex_both();
- }
- ifile_list
- {
- ldlex_popstate();
- }
+ { ldlex_both(); }
+ ifile_list
+ { ldlex_popstate(); }
;
-
ifile_list:
- ifile_list ifile_p1
+ ifile_list ifile_p1
|
;
-
ifile_p1:
memory
| sections
@@ -370,6 +372,18 @@ input_list:
| input_list LNAME
{ lang_add_input_file($2,lang_input_file_is_l_enum,
(char *)NULL); }
+ | AS_NEEDED '('
+ { $<integer>$ = as_needed; as_needed = TRUE; }
+ input_list ')'
+ { as_needed = $<integer>3; }
+ | input_list ',' AS_NEEDED '('
+ { $<integer>$ = as_needed; as_needed = TRUE; }
+ input_list ')'
+ { as_needed = $<integer>5; }
+ | input_list AS_NEEDED '('
+ { $<integer>$ = as_needed; as_needed = TRUE; }
+ input_list ')'
+ { as_needed = $<integer>4; }
;
sections:
@@ -412,25 +426,55 @@ wildcard_spec:
wildcard_name
{
$$.name = $1;
- $$.sorted = FALSE;
+ $$.sorted = none;
$$.exclude_name_list = NULL;
}
| EXCLUDE_FILE '(' exclude_name_list ')' wildcard_name
{
$$.name = $5;
- $$.sorted = FALSE;
+ $$.sorted = none;
$$.exclude_name_list = $3;
}
- | SORT '(' wildcard_name ')'
+ | SORT_BY_NAME '(' wildcard_name ')'
+ {
+ $$.name = $3;
+ $$.sorted = by_name;
+ $$.exclude_name_list = NULL;
+ }
+ | SORT_BY_ALIGNMENT '(' wildcard_name ')'
{
$$.name = $3;
- $$.sorted = TRUE;
+ $$.sorted = by_alignment;
+ $$.exclude_name_list = NULL;
+ }
+ | SORT_BY_NAME '(' SORT_BY_ALIGNMENT '(' wildcard_name ')' ')'
+ {
+ $$.name = $5;
+ $$.sorted = by_name_alignment;
+ $$.exclude_name_list = NULL;
+ }
+ | SORT_BY_NAME '(' SORT_BY_NAME '(' wildcard_name ')' ')'
+ {
+ $$.name = $5;
+ $$.sorted = by_name;
$$.exclude_name_list = NULL;
}
- | SORT '(' EXCLUDE_FILE '(' exclude_name_list ')' wildcard_name ')'
+ | SORT_BY_ALIGNMENT '(' SORT_BY_NAME '(' wildcard_name ')' ')'
+ {
+ $$.name = $5;
+ $$.sorted = by_alignment_name;
+ $$.exclude_name_list = NULL;
+ }
+ | SORT_BY_ALIGNMENT '(' SORT_BY_ALIGNMENT '(' wildcard_name ')' ')'
+ {
+ $$.name = $5;
+ $$.sorted = by_alignment;
+ $$.exclude_name_list = NULL;
+ }
+ | SORT_BY_NAME '(' EXCLUDE_FILE '(' exclude_name_list ')' wildcard_name ')'
{
$$.name = $7;
- $$.sorted = TRUE;
+ $$.sorted = by_name;
$$.exclude_name_list = $5;
}
;
@@ -481,7 +525,7 @@ input_section_spec_no_keep:
struct wildcard_spec tmp;
tmp.name = $1;
tmp.exclude_name_list = NULL;
- tmp.sorted = FALSE;
+ tmp.sorted = none;
lang_add_wild (&tmp, NULL, ldgram_had_keep);
}
| '[' file_NAME_list ']'
@@ -514,7 +558,7 @@ statement:
lang_add_attribute(lang_constructors_statement_enum);
}
- | SORT '(' CONSTRUCTORS ')'
+ | SORT_BY_NAME '(' CONSTRUCTORS ')'
{
constructors_sorted = TRUE;
lang_add_attribute (lang_constructors_statement_enum);
@@ -529,6 +573,9 @@ statement:
{
lang_add_fill ($3);
}
+ | ASSERT_K {ldlex_expression ();} '(' exp ',' NAME ')' end
+ { ldlex_popstate ();
+ lang_add_assignment (exp_assert ($4, $6)); }
;
statement_list:
@@ -557,10 +604,7 @@ length:
fill_exp:
mustbe_exp
{
- $$ = exp_get_fill ($1,
- 0,
- "fill value",
- lang_first_phase_enum);
+ $$ = exp_get_fill ($1, 0, "fill value");
}
;
@@ -609,7 +653,11 @@ assignment:
}
| PROVIDE '(' NAME '=' mustbe_exp ')'
{
- lang_add_assignment (exp_provide ($3, $5));
+ lang_add_assignment (exp_provide ($3, $5, FALSE));
+ }
+ | PROVIDE_HIDDEN '(' NAME '=' mustbe_exp ')'
+ {
+ lang_add_assignment (exp_provide ($3, $5, TRUE));
}
;
@@ -638,18 +686,16 @@ memory_spec: NAME
origin_spec:
ORIGIN '=' mustbe_exp
- { region->current =
- region->origin =
- exp_get_vma($3, 0L,"origin", lang_first_phase_enum);
-}
+ {
+ region->origin = exp_get_vma ($3, 0, "origin");
+ region->current = region->origin;
+ }
;
length_spec:
LENGTH '=' mustbe_exp
- { region->length = exp_get_vma($3,
- ~((bfd_vma)0),
- "length",
- lang_first_phase_enum);
+ {
+ region->length = exp_get_vma ($3, -1, "length");
}
;
@@ -730,96 +776,115 @@ nocrossref_list:
}
;
-mustbe_exp: { ldlex_expression(); }
+mustbe_exp: { ldlex_expression (); }
exp
- { ldlex_popstate(); $$=$2;}
+ { ldlex_popstate (); $$=$2;}
;
exp :
'-' exp %prec UNARY
- { $$ = exp_unop('-', $2); }
+ { $$ = exp_unop ('-', $2); }
| '(' exp ')'
{ $$ = $2; }
| NEXT '(' exp ')' %prec UNARY
- { $$ = exp_unop((int) $1,$3); }
+ { $$ = exp_unop ((int) $1,$3); }
| '!' exp %prec UNARY
- { $$ = exp_unop('!', $2); }
+ { $$ = exp_unop ('!', $2); }
| '+' exp %prec UNARY
{ $$ = $2; }
| '~' exp %prec UNARY
- { $$ = exp_unop('~', $2);}
+ { $$ = exp_unop ('~', $2);}
| exp '*' exp
- { $$ = exp_binop('*', $1, $3); }
+ { $$ = exp_binop ('*', $1, $3); }
| exp '/' exp
- { $$ = exp_binop('/', $1, $3); }
+ { $$ = exp_binop ('/', $1, $3); }
| exp '%' exp
- { $$ = exp_binop('%', $1, $3); }
+ { $$ = exp_binop ('%', $1, $3); }
| exp '+' exp
- { $$ = exp_binop('+', $1, $3); }
+ { $$ = exp_binop ('+', $1, $3); }
| exp '-' exp
- { $$ = exp_binop('-' , $1, $3); }
+ { $$ = exp_binop ('-' , $1, $3); }
| exp LSHIFT exp
- { $$ = exp_binop(LSHIFT , $1, $3); }
+ { $$ = exp_binop (LSHIFT , $1, $3); }
| exp RSHIFT exp
- { $$ = exp_binop(RSHIFT , $1, $3); }
+ { $$ = exp_binop (RSHIFT , $1, $3); }
| exp EQ exp
- { $$ = exp_binop(EQ , $1, $3); }
+ { $$ = exp_binop (EQ , $1, $3); }
| exp NE exp
- { $$ = exp_binop(NE , $1, $3); }
+ { $$ = exp_binop (NE , $1, $3); }
| exp LE exp
- { $$ = exp_binop(LE , $1, $3); }
+ { $$ = exp_binop (LE , $1, $3); }
| exp GE exp
- { $$ = exp_binop(GE , $1, $3); }
+ { $$ = exp_binop (GE , $1, $3); }
| exp '<' exp
- { $$ = exp_binop('<' , $1, $3); }
+ { $$ = exp_binop ('<' , $1, $3); }
| exp '>' exp
- { $$ = exp_binop('>' , $1, $3); }
+ { $$ = exp_binop ('>' , $1, $3); }
| exp '&' exp
- { $$ = exp_binop('&' , $1, $3); }
+ { $$ = exp_binop ('&' , $1, $3); }
| exp '^' exp
- { $$ = exp_binop('^' , $1, $3); }
+ { $$ = exp_binop ('^' , $1, $3); }
| exp '|' exp
- { $$ = exp_binop('|' , $1, $3); }
+ { $$ = exp_binop ('|' , $1, $3); }
| exp '?' exp ':' exp
- { $$ = exp_trinop('?' , $1, $3, $5); }
+ { $$ = exp_trinop ('?' , $1, $3, $5); }
| exp ANDAND exp
- { $$ = exp_binop(ANDAND , $1, $3); }
+ { $$ = exp_binop (ANDAND , $1, $3); }
| exp OROR exp
- { $$ = exp_binop(OROR , $1, $3); }
+ { $$ = exp_binop (OROR , $1, $3); }
| DEFINED '(' NAME ')'
- { $$ = exp_nameop(DEFINED, $3); }
+ { $$ = exp_nameop (DEFINED, $3); }
| INT
{ $$ = exp_bigintop ($1.integer, $1.str); }
| SIZEOF_HEADERS
- { $$ = exp_nameop(SIZEOF_HEADERS,0); }
+ { $$ = exp_nameop (SIZEOF_HEADERS,0); }
+ | ALIGNOF '(' NAME ')'
+ { $$ = exp_nameop (ALIGNOF,$3); }
| SIZEOF '(' NAME ')'
- { $$ = exp_nameop(SIZEOF,$3); }
+ { $$ = exp_nameop (SIZEOF,$3); }
| ADDR '(' NAME ')'
- { $$ = exp_nameop(ADDR,$3); }
+ { $$ = exp_nameop (ADDR,$3); }
| LOADADDR '(' NAME ')'
- { $$ = exp_nameop(LOADADDR,$3); }
+ { $$ = exp_nameop (LOADADDR,$3); }
+ | CONSTANT '(' NAME ')'
+ { $$ = exp_nameop (CONSTANT,$3); }
| ABSOLUTE '(' exp ')'
- { $$ = exp_unop(ABSOLUTE, $3); }
+ { $$ = exp_unop (ABSOLUTE, $3); }
| ALIGN_K '(' exp ')'
- { $$ = exp_unop(ALIGN_K,$3); }
+ { $$ = exp_unop (ALIGN_K,$3); }
| ALIGN_K '(' exp ',' exp ')'
- { $$ = exp_binop(ALIGN_K,$3,$5); }
+ { $$ = exp_binop (ALIGN_K,$3,$5); }
| DATA_SEGMENT_ALIGN '(' exp ',' exp ')'
{ $$ = exp_binop (DATA_SEGMENT_ALIGN, $3, $5); }
+ | DATA_SEGMENT_RELRO_END '(' exp ',' exp ')'
+ { $$ = exp_binop (DATA_SEGMENT_RELRO_END, $5, $3); }
| DATA_SEGMENT_END '(' exp ')'
- { $$ = exp_unop(DATA_SEGMENT_END, $3); }
+ { $$ = exp_unop (DATA_SEGMENT_END, $3); }
+ | SEGMENT_START '(' NAME ',' exp ')'
+ { /* The operands to the expression node are
+ placed in the opposite order from the way
+ in which they appear in the script as
+ that allows us to reuse more code in
+ fold_binary. */
+ $$ = exp_binop (SEGMENT_START,
+ $5,
+ exp_nameop (NAME, $3)); }
| BLOCK '(' exp ')'
- { $$ = exp_unop(ALIGN_K,$3); }
+ { $$ = exp_unop (ALIGN_K,$3); }
| NAME
- { $$ = exp_nameop(NAME,$1); }
+ { $$ = exp_nameop (NAME,$1); }
| MAX_K '(' exp ',' exp ')'
{ $$ = exp_binop (MAX_K, $3, $5 ); }
| MIN_K '(' exp ',' exp ')'
{ $$ = exp_binop (MIN_K, $3, $5 ); }
| ASSERT_K '(' exp ',' NAME ')'
{ $$ = exp_assert ($3, $5); }
+ | ORIGIN '(' NAME ')'
+ { $$ = exp_nameop (ORIGIN, $3); }
+ | LENGTH '(' NAME ')'
+ { $$ = exp_nameop (LENGTH, $3); }
;
@@ -833,27 +898,41 @@ opt_at:
| { $$ = 0; }
;
+opt_align:
+ ALIGN_K '(' exp ')' { $$ = $3; }
+ | { $$ = 0; }
+ ;
+
opt_subalign:
SUBALIGN '(' exp ')' { $$ = $3; }
| { $$ = 0; }
;
+sect_constraint:
+ ONLY_IF_RO { $$ = ONLY_IF_RO; }
+ | ONLY_IF_RW { $$ = ONLY_IF_RW; }
+ | SPECIAL { $$ = SPECIAL; }
+ | { $$ = 0; }
+ ;
+
section: NAME { ldlex_expression(); }
opt_exp_with_type
opt_at
+ opt_align
opt_subalign { ldlex_popstate (); ldlex_script (); }
+ sect_constraint
'{'
{
lang_enter_output_section_statement($1, $3,
sectype,
- 0, $5, $4);
+ $5, $6, $4, $8);
}
statement_list_opt
'}' { ldlex_popstate (); ldlex_expression (); }
memspec_opt memspec_at_opt phdr_opt fill_opt
{
ldlex_popstate ();
- lang_leave_output_section_statement ($15, $12, $14, $13);
+ lang_leave_output_section_statement ($17, $14, $16, $15);
}
opt_comma
{}
@@ -890,10 +969,10 @@ section: NAME { ldlex_expression(); }
type:
NOLOAD { sectype = noload_section; }
- | DSECT { sectype = dsect_section; }
- | COPY { sectype = copy_section; }
- | INFO { sectype = info_section; }
- | OVERLAY { sectype = overlay_section; }
+ | DSECT { sectype = noalloc_section; }
+ | COPY { sectype = noalloc_section; }
+ | INFO { sectype = noalloc_section; }
+ | OVERLAY { sectype = noalloc_section; }
;
atype:
@@ -1066,6 +1145,34 @@ phdr_val:
}
;
+dynamic_list_file:
+ {
+ ldlex_version_file ();
+ PUSH_ERROR (_("dynamic list"));
+ }
+ dynamic_list_nodes
+ {
+ ldlex_popstate ();
+ POP_ERROR ();
+ }
+ ;
+
+dynamic_list_nodes:
+ dynamic_list_node
+ | dynamic_list_nodes dynamic_list_node
+ ;
+
+dynamic_list_node:
+ '{' dynamic_list_tag '}' ';'
+ ;
+
+dynamic_list_tag:
+ vers_defns ';'
+ {
+ lang_append_dynamic_list ($1);
+ }
+ ;
+
/* This syntax is used within an external version script file. */
version_script_file:
@@ -1149,11 +1256,19 @@ vers_tag:
vers_defns:
VERS_IDENTIFIER
{
- $$ = lang_new_vers_pattern (NULL, $1, ldgram_vers_current_lang);
+ $$ = lang_new_vers_pattern (NULL, $1, ldgram_vers_current_lang, FALSE);
+ }
+ | NAME
+ {
+ $$ = lang_new_vers_pattern (NULL, $1, ldgram_vers_current_lang, TRUE);
}
| vers_defns ';' VERS_IDENTIFIER
{
- $$ = lang_new_vers_pattern ($1, $3, ldgram_vers_current_lang);
+ $$ = lang_new_vers_pattern ($1, $3, ldgram_vers_current_lang, FALSE);
+ }
+ | vers_defns ';' NAME
+ {
+ $$ = lang_new_vers_pattern ($1, $3, ldgram_vers_current_lang, TRUE);
}
| vers_defns ';' EXTERN NAME '{'
{
@@ -1162,6 +1277,9 @@ vers_defns:
}
vers_defns opt_semicolon '}'
{
+ struct bfd_elf_version_expr *pat;
+ for (pat = $7; pat->next != NULL; pat = pat->next);
+ pat->next = $1;
$$ = $7;
ldgram_vers_current_lang = $<name>6;
}
@@ -1175,6 +1293,30 @@ vers_defns:
$$ = $5;
ldgram_vers_current_lang = $<name>4;
}
+ | GLOBAL
+ {
+ $$ = lang_new_vers_pattern (NULL, "global", ldgram_vers_current_lang, FALSE);
+ }
+ | vers_defns ';' GLOBAL
+ {
+ $$ = lang_new_vers_pattern ($1, "global", ldgram_vers_current_lang, FALSE);
+ }
+ | LOCAL
+ {
+ $$ = lang_new_vers_pattern (NULL, "local", ldgram_vers_current_lang, FALSE);
+ }
+ | vers_defns ';' LOCAL
+ {
+ $$ = lang_new_vers_pattern ($1, "local", ldgram_vers_current_lang, FALSE);
+ }
+ | EXTERN
+ {
+ $$ = lang_new_vers_pattern (NULL, "extern", ldgram_vers_current_lang, FALSE);
+ }
+ | vers_defns ';' EXTERN
+ {
+ $$ = lang_new_vers_pattern ($1, "extern", ldgram_vers_current_lang, FALSE);
+ }
;
opt_semicolon:
diff --git a/contrib/binutils/ld/ldint.texinfo b/contrib/binutils/ld/ldint.texinfo
index 5486764..85d736b 100644
--- a/contrib/binutils/ld/ldint.texinfo
+++ b/contrib/binutils/ld/ldint.texinfo
@@ -1,6 +1,7 @@
\input texinfo
@setfilename ldint.info
-@c Copyright 1992, 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2003
+@c Copyright 1992, 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001,
+@c 2003, 2007
@c Free Software Foundation, Inc.
@ifinfo
@@ -11,28 +12,31 @@ END-INFO-DIR-ENTRY
@end format
@end ifinfo
-@ifinfo
+@copying
This file documents the internals of the GNU linker ld.
-Copyright 1992, 1994, 1995, 1996, 1997, 1998, 1999, 2000
+Copyright @copyright{} 1992, 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2007
Free Software Foundation, Inc.
Contributed by Cygnus Support.
- Permission is granted to copy, distribute and/or modify this document
- under the terms of the GNU Free Documentation License, Version 1.1
- or any later version published by the Free Software Foundation;
- with no Invariant Sections, with no Front-Cover Texts, and with no
- Back-Cover Texts. A copy of the license is included in the
- section entitled "GNU Free Documentation License".
+Permission is granted to copy, distribute and/or modify this document
+under the terms of the GNU Free Documentation License, Version 1.1 or
+any later version published by the Free Software Foundation; with the
+Invariant Sections being ``GNU General Public License'' and ``Funding
+Free Software'', the Front-Cover texts being (a) (see below), and with
+the Back-Cover Texts being (b) (see below). A copy of the license is
+included in the section entitled ``GNU Free Documentation License''.
-@ignore
-Permission is granted to process this file through Tex and print the
-results, provided the printed document carries copying permission
-notice identical to this one except for the removal of this paragraph
-(this paragraph not being relevant to the printed manual).
+(a) The FSF's Front-Cover Text is:
-@end ignore
-@end ifinfo
+ A GNU Manual
+
+(b) The FSF's Back-Cover Text is:
+
+ You have freedom to copy and modify this GNU Manual, like GNU
+ software. Copies published by the Free Software Foundation raise
+ funds for GNU development.
+@end copying
@iftex
@finalout
@@ -179,10 +183,10 @@ as well as some conventional shell variables interpreted by the
@item SCRIPT_NAME
This is the name of the @file{scripttempl} script to use. If
@code{SCRIPT_NAME} is set to @var{script}, @file{genscripts.sh} will use
-the script @file{scriptteml/@var{script}.sc}.
+the script @file{scripttempl/@var{script}.sc}.
@item TEMPLATE_NAME
-This is the name of the @file{emultemlp} script to use. If
+This is the name of the @file{emultempl} script to use. If
@code{TEMPLATE_NAME} is set to @var{template}, @file{genscripts.sh} will
use the script @file{emultempl/@var{template}.em}. If this variable is
not set, the default value is @samp{generic}.
@@ -290,7 +294,7 @@ option. The output has an extension of
The @file{scripttempl} script is only invoked with @code{LD_FLAG} set to
this value if @code{GENERATE_COMBRELOC_SCRIPT} is defined in the
@file{emulparams} file or if @code{SCRIPT_NAME} is @code{elf} and
-@code{GENERATE_SHLIB_SCRIPT} is defined in the @file{emulparms} file.
+@code{GENERATE_SHLIB_SCRIPT} is defined in the @file{emulparams} file.
The @file{emultempl} script must arrange to use this script at the
appropriate time, normally when the linker is invoked with the @code{-shared
-z combreloc} option. The output has an extension of @file{.xsc}.
@@ -644,7 +648,7 @@ Motivation
The obvious and only way to get rid of dllimport insanity is
to make client access variable directly in the DLL, bypassing
the extra dereference imposed by ordinary DLL runtime linking.
-I.e., whenever client contains someting like
+I.e., whenever client contains something like
@code{mov dll_var,%eax,}
@@ -653,7 +657,7 @@ into loaded DLL. The aim is to make OS loader do so, and than
make ld help with that. Import section of PE made following
way: there's a vector of structures each describing imports
from particular DLL. Each such structure points to two other
-parellel vectors: one holding imported names, and one which
+parallel vectors: one holding imported names, and one which
will hold address of corresponding imported name. So, the
solution is de-vectorize these structures, making import
locations be sparse and pointing directly into code.
@@ -699,7 +703,7 @@ require more work on behalf of loader than not doing it.
Version 1.1, March 2000
Copyright (C) 2000 Free Software Foundation, Inc.
- 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
+ 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
Everyone is permitted to copy and distribute verbatim copies
of this license document, but changing it is not allowed.
diff --git a/contrib/binutils/ld/ldlang.c b/contrib/binutils/ld/ldlang.c
index 0c08601..5c26974 100644
--- a/contrib/binutils/ld/ldlang.c
+++ b/contrib/binutils/ld/ldlang.c
@@ -1,6 +1,6 @@
/* Linker command language support.
Copyright 1991, 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999, 2000,
- 2001, 2002, 2003, 2004
+ 2001, 2002, 2003, 2004, 2005, 2006, 2007
Free Software Foundation, Inc.
This file is part of GLD, the Gnu Linker.
@@ -17,11 +17,11 @@
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. */
+ Software Foundation, 51 Franklin Street - Fifth Floor, Boston, MA
+ 02110-1301, USA. */
-#include "bfd.h"
#include "sysdep.h"
+#include "bfd.h"
#include "libiberty.h"
#include "safe-ctype.h"
#include "obstack.h"
@@ -47,12 +47,13 @@
/* Locals variables. */
static struct obstack stat_obstack;
+static struct obstack map_obstack;
#define obstack_chunk_alloc xmalloc
#define obstack_chunk_free free
static const char *startup_file;
-static lang_statement_list_type input_file_chain;
static bfd_boolean placed_commons = FALSE;
+static bfd_boolean stripped_excluded_sections = FALSE;
static lang_output_section_statement_type *default_common_section;
static bfd_boolean map_option_f;
static bfd_vma print_dot;
@@ -60,49 +61,60 @@ static lang_input_statement_type *first_file;
static const char *current_target;
static const char *output_target;
static lang_statement_list_type statement_list;
-static struct lang_phdr *lang_phdr_list;
static struct bfd_hash_table lang_definedness_table;
/* Forward declarations. */
static void exp_init_os (etree_type *);
-static bfd_boolean wildcardp (const char *);
+static void init_map_userdata (bfd *, asection *, void *);
static lang_input_statement_type *lookup_name (const char *);
-static bfd_boolean load_symbols (lang_input_statement_type *,
- lang_statement_list_type *);
static struct bfd_hash_entry *lang_definedness_newfunc
(struct bfd_hash_entry *, struct bfd_hash_table *, const char *);
static void insert_undefined (const char *);
+static bfd_boolean sort_def_symbol (struct bfd_link_hash_entry *, void *);
static void print_statement (lang_statement_union_type *,
lang_output_section_statement_type *);
static void print_statement_list (lang_statement_union_type *,
lang_output_section_statement_type *);
static void print_statements (void);
+static void print_input_section (asection *);
static bfd_boolean lang_one_common (struct bfd_link_hash_entry *, void *);
static void lang_record_phdrs (void);
static void lang_do_version_exports_section (void);
-
-typedef void (*callback_t) (lang_wild_statement_type *, struct wildcard_list *,
- asection *, lang_input_statement_type *, void *);
+static void lang_finalize_version_expr_head
+ (struct bfd_elf_version_expr_head *);
/* Exported variables. */
lang_output_section_statement_type *abs_output_section;
lang_statement_list_type lang_output_section_statement;
lang_statement_list_type *stat_ptr = &statement_list;
lang_statement_list_type file_chain = { NULL, NULL };
+lang_statement_list_type input_file_chain;
struct bfd_sym_chain entry_symbol = { NULL, NULL };
+static const char *entry_symbol_default = "start";
const char *entry_section = ".text";
bfd_boolean entry_from_cmdline;
bfd_boolean lang_has_input_file = FALSE;
bfd_boolean had_output_filename = FALSE;
bfd_boolean lang_float_flag = FALSE;
bfd_boolean delete_output_file_on_failure = FALSE;
+struct lang_phdr *lang_phdr_list;
struct lang_nocrossrefs *nocrossref_list;
-struct unique_sections *unique_section_list;
+static struct unique_sections *unique_section_list;
static bfd_boolean ldlang_sysrooted_script = FALSE;
+
+ /* Functions that traverse the linker script and might evaluate
+ DEFINED() need to increment this. */
int lang_statement_iteration = 0;
etree_type *base; /* Relocation base - or null */
+/* 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 pattern to be treated as a wildcard.
+ That lets us handle DOS filenames more naturally. */
+#define wildcardp(pattern) (strpbrk ((pattern), "?*[") != NULL)
+
#define new_stat(x, y) \
(x##_type *) new_statement (x##_enum, sizeof (x##_type), y)
@@ -121,10 +133,17 @@ stat_alloc (size_t size)
}
bfd_boolean
-unique_section_p (const char *secnam)
+unique_section_p (const asection *sec)
{
struct unique_sections *unam;
+ const char *secnam;
+ if (link_info.relocatable
+ && sec->owner != NULL
+ && bfd_is_group_section (sec->owner, sec))
+ return TRUE;
+
+ secnam = sec->name;
for (unam = unique_section_list; unam; unam = unam->next)
if (wildcardp (unam->name)
? fnmatch (unam->name, secnam, 0) == 0
@@ -138,21 +157,71 @@ unique_section_p (const char *secnam)
/* Generic traversal routines for finding matching sections. */
+/* Try processing a section against a wildcard. This just calls
+ the callback unless the filename exclusion list is present
+ and excludes the file. It's hardly ever present so this
+ function is very fast. */
+
static void
-walk_wild_section (lang_wild_statement_type *ptr,
- lang_input_statement_type *file,
- callback_t callback,
- void *data)
+walk_wild_consider_section (lang_wild_statement_type *ptr,
+ lang_input_statement_type *file,
+ asection *s,
+ struct wildcard_list *sec,
+ callback_t callback,
+ void *data)
+{
+ bfd_boolean skip = FALSE;
+ struct name_list *list_tmp;
+
+ /* Don't process sections from files which were
+ excluded. */
+ for (list_tmp = sec->spec.exclude_name_list;
+ list_tmp;
+ list_tmp = list_tmp->next)
+ {
+ bfd_boolean is_wildcard = wildcardp (list_tmp->name);
+ if (is_wildcard)
+ skip = fnmatch (list_tmp->name, file->filename, 0) == 0;
+ else
+ skip = strcmp (list_tmp->name, file->filename) == 0;
+
+ /* If this file is part of an archive, and the archive is
+ excluded, exclude this file. */
+ if (! skip && file->the_bfd != NULL
+ && file->the_bfd->my_archive != NULL
+ && file->the_bfd->my_archive->filename != NULL)
+ {
+ if (is_wildcard)
+ skip = fnmatch (list_tmp->name,
+ file->the_bfd->my_archive->filename,
+ 0) == 0;
+ else
+ skip = strcmp (list_tmp->name,
+ file->the_bfd->my_archive->filename) == 0;
+ }
+
+ if (skip)
+ break;
+ }
+
+ if (!skip)
+ (*callback) (ptr, sec, s, file, data);
+}
+
+/* Lowest common denominator routine that can handle everything correctly,
+ but slowly. */
+
+static void
+walk_wild_section_general (lang_wild_statement_type *ptr,
+ lang_input_statement_type *file,
+ callback_t callback,
+ void *data)
{
asection *s;
-
- if (file->just_syms_flag)
- return;
+ struct wildcard_list *sec;
for (s = file->the_bfd->sections; s != NULL; s = s->next)
{
- struct wildcard_list *sec;
-
sec = ptr->section_list;
if (sec == NULL)
(*callback) (ptr, sec, s, file, data);
@@ -160,39 +229,8 @@ walk_wild_section (lang_wild_statement_type *ptr,
while (sec != NULL)
{
bfd_boolean skip = FALSE;
- struct name_list *list_tmp;
-
- /* Don't process sections from files which were
- excluded. */
- for (list_tmp = sec->spec.exclude_name_list;
- list_tmp;
- list_tmp = list_tmp->next)
- {
- if (wildcardp (list_tmp->name))
- skip = fnmatch (list_tmp->name, file->filename, 0) == 0;
- else
- skip = strcmp (list_tmp->name, file->filename) == 0;
-
- /* If this file is part of an archive, and the archive is
- excluded, exclude this file. */
- if (! skip && file->the_bfd != NULL
- && file->the_bfd->my_archive != NULL
- && file->the_bfd->my_archive->filename != NULL)
- {
- if (wildcardp (list_tmp->name))
- skip = fnmatch (list_tmp->name,
- file->the_bfd->my_archive->filename,
- 0) == 0;
- else
- skip = strcmp (list_tmp->name,
- file->the_bfd->my_archive->filename) == 0;
- }
-
- if (skip)
- break;
- }
- if (!skip && sec->spec.name != NULL)
+ if (sec->spec.name != NULL)
{
const char *sname = bfd_get_section_name (file->the_bfd, s);
@@ -203,13 +241,504 @@ walk_wild_section (lang_wild_statement_type *ptr,
}
if (!skip)
- (*callback) (ptr, sec, s, file, data);
+ walk_wild_consider_section (ptr, file, s, sec, callback, data);
sec = sec->next;
}
}
}
+/* Routines to find a single section given its name. If there's more
+ than one section with that name, we report that. */
+
+typedef struct
+{
+ asection *found_section;
+ bfd_boolean multiple_sections_found;
+} section_iterator_callback_data;
+
+static bfd_boolean
+section_iterator_callback (bfd *bfd ATTRIBUTE_UNUSED, asection *s, void *data)
+{
+ section_iterator_callback_data *d = data;
+
+ if (d->found_section != NULL)
+ {
+ d->multiple_sections_found = TRUE;
+ return TRUE;
+ }
+
+ d->found_section = s;
+ return FALSE;
+}
+
+static asection *
+find_section (lang_input_statement_type *file,
+ struct wildcard_list *sec,
+ bfd_boolean *multiple_sections_found)
+{
+ section_iterator_callback_data cb_data = { NULL, FALSE };
+
+ bfd_get_section_by_name_if (file->the_bfd, sec->spec.name,
+ section_iterator_callback, &cb_data);
+ *multiple_sections_found = cb_data.multiple_sections_found;
+ return cb_data.found_section;
+}
+
+/* Code for handling simple wildcards without going through fnmatch,
+ which can be expensive because of charset translations etc. */
+
+/* A simple wild is a literal string followed by a single '*',
+ where the literal part is at least 4 characters long. */
+
+static bfd_boolean
+is_simple_wild (const char *name)
+{
+ size_t len = strcspn (name, "*?[");
+ return len >= 4 && name[len] == '*' && name[len + 1] == '\0';
+}
+
+static bfd_boolean
+match_simple_wild (const char *pattern, const char *name)
+{
+ /* The first four characters of the pattern are guaranteed valid
+ non-wildcard characters. So we can go faster. */
+ if (pattern[0] != name[0] || pattern[1] != name[1]
+ || pattern[2] != name[2] || pattern[3] != name[3])
+ return FALSE;
+
+ pattern += 4;
+ name += 4;
+ while (*pattern != '*')
+ if (*name++ != *pattern++)
+ return FALSE;
+
+ return TRUE;
+}
+
+/* Compare sections ASEC and BSEC according to SORT. */
+
+static int
+compare_section (sort_type sort, asection *asec, asection *bsec)
+{
+ int ret;
+
+ switch (sort)
+ {
+ default:
+ abort ();
+
+ case by_alignment_name:
+ ret = (bfd_section_alignment (bsec->owner, bsec)
+ - bfd_section_alignment (asec->owner, asec));
+ if (ret)
+ break;
+ /* Fall through. */
+
+ case by_name:
+ ret = strcmp (bfd_get_section_name (asec->owner, asec),
+ bfd_get_section_name (bsec->owner, bsec));
+ break;
+
+ case by_name_alignment:
+ ret = strcmp (bfd_get_section_name (asec->owner, asec),
+ bfd_get_section_name (bsec->owner, bsec));
+ if (ret)
+ break;
+ /* Fall through. */
+
+ case by_alignment:
+ ret = (bfd_section_alignment (bsec->owner, bsec)
+ - bfd_section_alignment (asec->owner, asec));
+ break;
+ }
+
+ return ret;
+}
+
+/* Build a Binary Search Tree to sort sections, unlike insertion sort
+ used in wild_sort(). BST is considerably faster if the number of
+ of sections are large. */
+
+static lang_section_bst_type **
+wild_sort_fast (lang_wild_statement_type *wild,
+ struct wildcard_list *sec,
+ lang_input_statement_type *file ATTRIBUTE_UNUSED,
+ asection *section)
+{
+ lang_section_bst_type **tree;
+
+ tree = &wild->tree;
+ if (!wild->filenames_sorted
+ && (sec == NULL || sec->spec.sorted == none))
+ {
+ /* Append at the right end of tree. */
+ while (*tree)
+ tree = &((*tree)->right);
+ return tree;
+ }
+
+ while (*tree)
+ {
+ /* Find the correct node to append this section. */
+ if (compare_section (sec->spec.sorted, section, (*tree)->section) < 0)
+ tree = &((*tree)->left);
+ else
+ tree = &((*tree)->right);
+ }
+
+ return tree;
+}
+
+/* Use wild_sort_fast to build a BST to sort sections. */
+
+static void
+output_section_callback_fast (lang_wild_statement_type *ptr,
+ struct wildcard_list *sec,
+ asection *section,
+ lang_input_statement_type *file,
+ void *output ATTRIBUTE_UNUSED)
+{
+ lang_section_bst_type *node;
+ lang_section_bst_type **tree;
+
+ if (unique_section_p (section))
+ return;
+
+ node = xmalloc (sizeof (lang_section_bst_type));
+ node->left = 0;
+ node->right = 0;
+ node->section = section;
+
+ tree = wild_sort_fast (ptr, sec, file, section);
+ if (tree != NULL)
+ *tree = node;
+}
+
+/* Convert a sorted sections' BST back to list form. */
+
+static void
+output_section_callback_tree_to_list (lang_wild_statement_type *ptr,
+ lang_section_bst_type *tree,
+ void *output)
+{
+ if (tree->left)
+ output_section_callback_tree_to_list (ptr, tree->left, output);
+
+ lang_add_section (&ptr->children, tree->section,
+ (lang_output_section_statement_type *) output);
+
+ if (tree->right)
+ output_section_callback_tree_to_list (ptr, tree->right, output);
+
+ free (tree);
+}
+
+/* Specialized, optimized routines for handling different kinds of
+ wildcards */
+
+static void
+walk_wild_section_specs1_wild0 (lang_wild_statement_type *ptr,
+ lang_input_statement_type *file,
+ callback_t callback,
+ void *data)
+{
+ /* We can just do a hash lookup for the section with the right name.
+ But if that lookup discovers more than one section with the name
+ (should be rare), we fall back to the general algorithm because
+ we would otherwise have to sort the sections to make sure they
+ get processed in the bfd's order. */
+ bfd_boolean multiple_sections_found;
+ struct wildcard_list *sec0 = ptr->handler_data[0];
+ asection *s0 = find_section (file, sec0, &multiple_sections_found);
+
+ if (multiple_sections_found)
+ walk_wild_section_general (ptr, file, callback, data);
+ else if (s0)
+ walk_wild_consider_section (ptr, file, s0, sec0, callback, data);
+}
+
+static void
+walk_wild_section_specs1_wild1 (lang_wild_statement_type *ptr,
+ lang_input_statement_type *file,
+ callback_t callback,
+ void *data)
+{
+ asection *s;
+ struct wildcard_list *wildsec0 = ptr->handler_data[0];
+
+ for (s = file->the_bfd->sections; s != NULL; s = s->next)
+ {
+ const char *sname = bfd_get_section_name (file->the_bfd, s);
+ bfd_boolean skip = !match_simple_wild (wildsec0->spec.name, sname);
+
+ if (!skip)
+ walk_wild_consider_section (ptr, file, s, wildsec0, callback, data);
+ }
+}
+
+static void
+walk_wild_section_specs2_wild1 (lang_wild_statement_type *ptr,
+ lang_input_statement_type *file,
+ callback_t callback,
+ void *data)
+{
+ asection *s;
+ struct wildcard_list *sec0 = ptr->handler_data[0];
+ struct wildcard_list *wildsec1 = ptr->handler_data[1];
+ bfd_boolean multiple_sections_found;
+ asection *s0 = find_section (file, sec0, &multiple_sections_found);
+
+ if (multiple_sections_found)
+ {
+ walk_wild_section_general (ptr, file, callback, data);
+ return;
+ }
+
+ /* Note that if the section was not found, s0 is NULL and
+ we'll simply never succeed the s == s0 test below. */
+ for (s = file->the_bfd->sections; s != NULL; s = s->next)
+ {
+ /* Recall that in this code path, a section cannot satisfy more
+ than one spec, so if s == s0 then it cannot match
+ wildspec1. */
+ if (s == s0)
+ walk_wild_consider_section (ptr, file, s, sec0, callback, data);
+ else
+ {
+ const char *sname = bfd_get_section_name (file->the_bfd, s);
+ bfd_boolean skip = !match_simple_wild (wildsec1->spec.name, sname);
+
+ if (!skip)
+ walk_wild_consider_section (ptr, file, s, wildsec1, callback,
+ data);
+ }
+ }
+}
+
+static void
+walk_wild_section_specs3_wild2 (lang_wild_statement_type *ptr,
+ lang_input_statement_type *file,
+ callback_t callback,
+ void *data)
+{
+ asection *s;
+ struct wildcard_list *sec0 = ptr->handler_data[0];
+ struct wildcard_list *wildsec1 = ptr->handler_data[1];
+ struct wildcard_list *wildsec2 = ptr->handler_data[2];
+ bfd_boolean multiple_sections_found;
+ asection *s0 = find_section (file, sec0, &multiple_sections_found);
+
+ if (multiple_sections_found)
+ {
+ walk_wild_section_general (ptr, file, callback, data);
+ return;
+ }
+
+ for (s = file->the_bfd->sections; s != NULL; s = s->next)
+ {
+ if (s == s0)
+ walk_wild_consider_section (ptr, file, s, sec0, callback, data);
+ else
+ {
+ const char *sname = bfd_get_section_name (file->the_bfd, s);
+ bfd_boolean skip = !match_simple_wild (wildsec1->spec.name, sname);
+
+ if (!skip)
+ walk_wild_consider_section (ptr, file, s, wildsec1, callback, data);
+ else
+ {
+ skip = !match_simple_wild (wildsec2->spec.name, sname);
+ if (!skip)
+ walk_wild_consider_section (ptr, file, s, wildsec2, callback,
+ data);
+ }
+ }
+ }
+}
+
+static void
+walk_wild_section_specs4_wild2 (lang_wild_statement_type *ptr,
+ lang_input_statement_type *file,
+ callback_t callback,
+ void *data)
+{
+ asection *s;
+ struct wildcard_list *sec0 = ptr->handler_data[0];
+ struct wildcard_list *sec1 = ptr->handler_data[1];
+ struct wildcard_list *wildsec2 = ptr->handler_data[2];
+ struct wildcard_list *wildsec3 = ptr->handler_data[3];
+ bfd_boolean multiple_sections_found;
+ asection *s0 = find_section (file, sec0, &multiple_sections_found), *s1;
+
+ if (multiple_sections_found)
+ {
+ walk_wild_section_general (ptr, file, callback, data);
+ return;
+ }
+
+ s1 = find_section (file, sec1, &multiple_sections_found);
+ if (multiple_sections_found)
+ {
+ walk_wild_section_general (ptr, file, callback, data);
+ return;
+ }
+
+ for (s = file->the_bfd->sections; s != NULL; s = s->next)
+ {
+ if (s == s0)
+ walk_wild_consider_section (ptr, file, s, sec0, callback, data);
+ else
+ if (s == s1)
+ walk_wild_consider_section (ptr, file, s, sec1, callback, data);
+ else
+ {
+ const char *sname = bfd_get_section_name (file->the_bfd, s);
+ bfd_boolean skip = !match_simple_wild (wildsec2->spec.name,
+ sname);
+
+ if (!skip)
+ walk_wild_consider_section (ptr, file, s, wildsec2, callback,
+ data);
+ else
+ {
+ skip = !match_simple_wild (wildsec3->spec.name, sname);
+ if (!skip)
+ walk_wild_consider_section (ptr, file, s, wildsec3,
+ callback, data);
+ }
+ }
+ }
+}
+
+static void
+walk_wild_section (lang_wild_statement_type *ptr,
+ lang_input_statement_type *file,
+ callback_t callback,
+ void *data)
+{
+ if (file->just_syms_flag)
+ return;
+
+ (*ptr->walk_wild_section_handler) (ptr, file, callback, data);
+}
+
+/* Returns TRUE when name1 is a wildcard spec that might match
+ something name2 can match. We're conservative: we return FALSE
+ only if the prefixes of name1 and name2 are different up to the
+ first wildcard character. */
+
+static bfd_boolean
+wild_spec_can_overlap (const char *name1, const char *name2)
+{
+ size_t prefix1_len = strcspn (name1, "?*[");
+ size_t prefix2_len = strcspn (name2, "?*[");
+ size_t min_prefix_len;
+
+ /* Note that if there is no wildcard character, then we treat the
+ terminating 0 as part of the prefix. Thus ".text" won't match
+ ".text." or ".text.*", for example. */
+ if (name1[prefix1_len] == '\0')
+ prefix1_len++;
+ if (name2[prefix2_len] == '\0')
+ prefix2_len++;
+
+ min_prefix_len = prefix1_len < prefix2_len ? prefix1_len : prefix2_len;
+
+ return memcmp (name1, name2, min_prefix_len) == 0;
+}
+
+/* Select specialized code to handle various kinds of wildcard
+ statements. */
+
+static void
+analyze_walk_wild_section_handler (lang_wild_statement_type *ptr)
+{
+ int sec_count = 0;
+ int wild_name_count = 0;
+ struct wildcard_list *sec;
+ int signature;
+ int data_counter;
+
+ ptr->walk_wild_section_handler = walk_wild_section_general;
+ ptr->handler_data[0] = NULL;
+ ptr->handler_data[1] = NULL;
+ ptr->handler_data[2] = NULL;
+ ptr->handler_data[3] = NULL;
+ ptr->tree = NULL;
+
+ /* Count how many wildcard_specs there are, and how many of those
+ actually use wildcards in the name. Also, bail out if any of the
+ wildcard names are NULL. (Can this actually happen?
+ walk_wild_section used to test for it.) And bail out if any
+ of the wildcards are more complex than a simple string
+ ending in a single '*'. */
+ for (sec = ptr->section_list; sec != NULL; sec = sec->next)
+ {
+ ++sec_count;
+ if (sec->spec.name == NULL)
+ return;
+ if (wildcardp (sec->spec.name))
+ {
+ ++wild_name_count;
+ if (!is_simple_wild (sec->spec.name))
+ return;
+ }
+ }
+
+ /* The zero-spec case would be easy to optimize but it doesn't
+ happen in practice. Likewise, more than 4 specs doesn't
+ happen in practice. */
+ if (sec_count == 0 || sec_count > 4)
+ return;
+
+ /* Check that no two specs can match the same section. */
+ for (sec = ptr->section_list; sec != NULL; sec = sec->next)
+ {
+ struct wildcard_list *sec2;
+ for (sec2 = sec->next; sec2 != NULL; sec2 = sec2->next)
+ {
+ if (wild_spec_can_overlap (sec->spec.name, sec2->spec.name))
+ return;
+ }
+ }
+
+ signature = (sec_count << 8) + wild_name_count;
+ switch (signature)
+ {
+ case 0x0100:
+ ptr->walk_wild_section_handler = walk_wild_section_specs1_wild0;
+ break;
+ case 0x0101:
+ ptr->walk_wild_section_handler = walk_wild_section_specs1_wild1;
+ break;
+ case 0x0201:
+ ptr->walk_wild_section_handler = walk_wild_section_specs2_wild1;
+ break;
+ case 0x0302:
+ ptr->walk_wild_section_handler = walk_wild_section_specs3_wild2;
+ break;
+ case 0x0402:
+ ptr->walk_wild_section_handler = walk_wild_section_specs4_wild2;
+ break;
+ default:
+ return;
+ }
+
+ /* Now fill the data array with pointers to the specs, first the
+ specs with non-wildcard names, then the specs with wildcard
+ names. It's OK to process the specs in different order from the
+ given order, because we've already determined that no section
+ will match more than one spec. */
+ data_counter = 0;
+ for (sec = ptr->section_list; sec != NULL; sec = sec->next)
+ if (!wildcardp (sec->spec.name))
+ ptr->handler_data[data_counter++] = sec;
+ for (sec = ptr->section_list; sec != NULL; sec = sec->next)
+ if (wildcardp (sec->spec.name))
+ ptr->handler_data[data_counter++] = sec;
+}
+
/* Handle a wild statement for a single file F. */
static void
@@ -262,7 +791,7 @@ walk_wild (lang_wild_statement_type *s, callback_t callback, void *data)
{
LANG_FOR_EACH_INPUT_STATEMENT (f)
{
- if (fnmatch (file_spec, f->filename, FNM_FILE_NAME) == 0)
+ if (fnmatch (file_spec, f->filename, 0) == 0)
walk_wild_file (s, f, callback, data);
}
}
@@ -295,13 +824,11 @@ lang_for_each_statement_worker (void (*func) (lang_statement_union_type *),
break;
case lang_output_section_statement_enum:
lang_for_each_statement_worker
- (func,
- s->output_section_statement.children.head);
+ (func, s->output_section_statement.children.head);
break;
case lang_wild_statement_enum:
- lang_for_each_statement_worker
- (func,
- s->wild_statement.children.head);
+ lang_for_each_statement_worker (func,
+ s->wild_statement.children.head);
break;
case lang_group_statement_enum:
lang_for_each_statement_worker (func,
@@ -379,12 +906,21 @@ new_afile (const char *name,
else
{
p = stat_alloc (sizeof (lang_input_statement_type));
+ p->header.type = lang_input_statement_enum;
p->header.next = NULL;
}
lang_has_input_file = TRUE;
p->target = target;
p->sysrooted = FALSE;
+
+ if (file_type == lang_input_file_is_l_enum
+ && name[0] == ':' && name[1] != '\0')
+ {
+ file_type = lang_input_file_is_search_file_enum;
+ name = name + 1;
+ }
+
switch (file_type)
{
case lang_input_file_is_symbols_only_enum:
@@ -445,6 +981,7 @@ new_afile (const char *name,
p->next = NULL;
p->symbol_count = 0;
p->dynamic = config.dynamic_link;
+ p->add_needed = add_needed;
p->as_needed = as_needed;
p->whole_archive = whole_archive;
p->loaded = FALSE;
@@ -459,10 +996,85 @@ lang_add_input_file (const char *name,
lang_input_file_enum_type file_type,
const char *target)
{
- lang_has_input_file = TRUE;
return new_afile (name, file_type, target, TRUE);
}
+struct out_section_hash_entry
+{
+ struct bfd_hash_entry root;
+ lang_statement_union_type s;
+};
+
+/* The hash table. */
+
+static struct bfd_hash_table output_section_statement_table;
+
+/* Support routines for the hash table used by lang_output_section_find,
+ initialize the table, fill in an entry and remove the table. */
+
+static struct bfd_hash_entry *
+output_section_statement_newfunc (struct bfd_hash_entry *entry,
+ struct bfd_hash_table *table,
+ const char *string)
+{
+ lang_output_section_statement_type **nextp;
+ struct out_section_hash_entry *ret;
+
+ if (entry == NULL)
+ {
+ entry = bfd_hash_allocate (table, sizeof (*ret));
+ if (entry == NULL)
+ return entry;
+ }
+
+ entry = bfd_hash_newfunc (entry, table, string);
+ if (entry == NULL)
+ return entry;
+
+ ret = (struct out_section_hash_entry *) entry;
+ memset (&ret->s, 0, sizeof (ret->s));
+ ret->s.header.type = lang_output_section_statement_enum;
+ ret->s.output_section_statement.subsection_alignment = -1;
+ ret->s.output_section_statement.section_alignment = -1;
+ ret->s.output_section_statement.block_value = 1;
+ lang_list_init (&ret->s.output_section_statement.children);
+ lang_statement_append (stat_ptr, &ret->s, &ret->s.header.next);
+
+ /* For every output section statement added to the list, except the
+ first one, lang_output_section_statement.tail points to the "next"
+ field of the last element of the list. */
+ if (lang_output_section_statement.head != NULL)
+ ret->s.output_section_statement.prev
+ = ((lang_output_section_statement_type *)
+ ((char *) lang_output_section_statement.tail
+ - offsetof (lang_output_section_statement_type, next)));
+
+ /* GCC's strict aliasing rules prevent us from just casting the
+ address, so we store the pointer in a variable and cast that
+ instead. */
+ nextp = &ret->s.output_section_statement.next;
+ lang_statement_append (&lang_output_section_statement,
+ &ret->s,
+ (lang_statement_union_type **) nextp);
+ return &ret->root;
+}
+
+static void
+output_section_statement_table_init (void)
+{
+ if (!bfd_hash_table_init_n (&output_section_statement_table,
+ output_section_statement_newfunc,
+ sizeof (struct out_section_hash_entry),
+ 61))
+ einfo (_("%P%F: can not create hash table: %E\n"));
+}
+
+static void
+output_section_statement_table_free (void)
+{
+ bfd_hash_table_free (&output_section_statement_table);
+}
+
/* Build enough state so that the parser can build its tree. */
void
@@ -472,6 +1084,8 @@ lang_init (void)
stat_ptr = &statement_list;
+ output_section_statement_table_init ();
+
lang_list_init (stat_ptr);
lang_list_init (&input_file_chain);
@@ -490,12 +1104,17 @@ lang_init (void)
simpler to re-use working machinery than using a linked list in terms
of code-complexity here in ld, besides the initialization which just
looks like other code here. */
- if (bfd_hash_table_init_n (&lang_definedness_table,
- lang_definedness_newfunc, 3) != TRUE)
- einfo (_("%P%F: out of memory during initialization"));
+ if (!bfd_hash_table_init_n (&lang_definedness_table,
+ lang_definedness_newfunc,
+ sizeof (struct lang_definedness_hash_entry),
+ 3))
+ einfo (_("%P%F: can not create hash table: %E\n"));
+}
- /* Callers of exp_fold_tree need to increment this. */
- lang_statement_iteration = 0;
+void
+lang_finish (void)
+{
+ output_section_statement_table_free ();
}
/*----------------------------------------------------------------------
@@ -515,7 +1134,8 @@ lang_init (void)
and so we issue a warning. */
static lang_memory_region_type *lang_memory_region_list;
-static lang_memory_region_type **lang_memory_region_list_tail = &lang_memory_region_list;
+static lang_memory_region_type **lang_memory_region_list_tail
+ = &lang_memory_region_list;
lang_memory_region_type *
lang_memory_region_lookup (const char *const name, bfd_boolean create)
@@ -531,24 +1151,11 @@ lang_memory_region_lookup (const char *const name, bfd_boolean create)
if (strcmp (p->name, name) == 0)
{
if (create)
- einfo (_("%P:%S: warning: redeclaration of memory region '%s'\n"), name);
+ einfo (_("%P:%S: warning: redeclaration of memory region '%s'\n"),
+ name);
return p;
}
-#if 0
- /* This code used to always use the first region in the list as the
- default region. I changed it to instead use a region
- encompassing all of memory as the default region. This permits
- NOLOAD sections to work reasonably without requiring a region.
- People should specify what region they mean, if they really want
- a region. */
- if (strcmp (name, DEFAULT_MEMORY_REGION) == 0)
- {
- if (lang_memory_region_list != NULL)
- return lang_memory_region_list;
- }
-#endif
-
if (!create && strcmp (name, DEFAULT_MEMORY_REGION))
einfo (_("%P:%S: warning: memory region %s not declared\n"), name);
@@ -556,16 +1163,17 @@ lang_memory_region_lookup (const char *const name, bfd_boolean create)
new->name = xstrdup (name);
new->next = NULL;
-
- *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->last_os = NULL;
+ new->flags = 0;
+ new->not_flags = 0;
new->had_full_message = FALSE;
+ *lang_memory_region_list_tail = new;
+ lang_memory_region_list_tail = &new->next;
+
return new;
}
@@ -594,53 +1202,513 @@ lang_memory_default (asection *section)
lang_output_section_statement_type *
lang_output_section_find (const char *const name)
{
- lang_statement_union_type *u;
- lang_output_section_statement_type *lookup;
+ struct out_section_hash_entry *entry;
+ unsigned long hash;
+
+ entry = ((struct out_section_hash_entry *)
+ bfd_hash_lookup (&output_section_statement_table, name,
+ FALSE, FALSE));
+ if (entry == NULL)
+ return NULL;
- for (u = lang_output_section_statement.head; u != NULL; u = lookup->next)
+ hash = entry->root.hash;
+ do
{
- lookup = &u->output_section_statement;
- if (strcmp (name, lookup->name) == 0)
- return lookup;
+ if (entry->s.output_section_statement.constraint != -1)
+ return &entry->s.output_section_statement;
+ entry = (struct out_section_hash_entry *) entry->root.next;
}
+ while (entry != NULL
+ && entry->root.hash == hash
+ && strcmp (name, entry->s.output_section_statement.name) == 0);
+
return NULL;
}
+static lang_output_section_statement_type *
+lang_output_section_statement_lookup_1 (const char *const name, int constraint)
+{
+ struct out_section_hash_entry *entry;
+ struct out_section_hash_entry *last_ent;
+ unsigned long hash;
+
+ entry = ((struct out_section_hash_entry *)
+ bfd_hash_lookup (&output_section_statement_table, name,
+ TRUE, FALSE));
+ if (entry == NULL)
+ {
+ einfo (_("%P%F: failed creating section `%s': %E\n"), name);
+ return NULL;
+ }
+
+ if (entry->s.output_section_statement.name != NULL)
+ {
+ /* We have a section of this name, but it might not have the correct
+ constraint. */
+ hash = entry->root.hash;
+ do
+ {
+ if (entry->s.output_section_statement.constraint != -1
+ && (constraint == 0
+ || (constraint == entry->s.output_section_statement.constraint
+ && constraint != SPECIAL)))
+ return &entry->s.output_section_statement;
+ last_ent = entry;
+ entry = (struct out_section_hash_entry *) entry->root.next;
+ }
+ while (entry != NULL
+ && entry->root.hash == hash
+ && strcmp (name, entry->s.output_section_statement.name) == 0);
+
+ entry
+ = ((struct out_section_hash_entry *)
+ output_section_statement_newfunc (NULL,
+ &output_section_statement_table,
+ name));
+ if (entry == NULL)
+ {
+ einfo (_("%P%F: failed creating section `%s': %E\n"), name);
+ return NULL;
+ }
+ entry->root = last_ent->root;
+ last_ent->root.next = &entry->root;
+ }
+
+ entry->s.output_section_statement.name = name;
+ entry->s.output_section_statement.constraint = constraint;
+ return &entry->s.output_section_statement;
+}
+
lang_output_section_statement_type *
lang_output_section_statement_lookup (const char *const name)
{
+ return lang_output_section_statement_lookup_1 (name, 0);
+}
+
+/* A variant of lang_output_section_find used by place_orphan.
+ Returns the output statement that should precede a new output
+ statement for SEC. If an exact match is found on certain flags,
+ sets *EXACT too. */
+
+lang_output_section_statement_type *
+lang_output_section_find_by_flags (const asection *sec,
+ lang_output_section_statement_type **exact,
+ lang_match_sec_type_func match_type)
+{
+ lang_output_section_statement_type *first, *look, *found;
+ flagword flags;
+
+ /* We know the first statement on this list is *ABS*. May as well
+ skip it. */
+ first = &lang_output_section_statement.head->output_section_statement;
+ first = first->next;
+
+ /* First try for an exact match. */
+ found = NULL;
+ for (look = first; look; look = look->next)
+ {
+ flags = look->flags;
+ if (look->bfd_section != NULL)
+ {
+ flags = look->bfd_section->flags;
+ if (match_type && !match_type (output_bfd, look->bfd_section,
+ sec->owner, sec))
+ continue;
+ }
+ flags ^= sec->flags;
+ if (!(flags & (SEC_HAS_CONTENTS | SEC_ALLOC | SEC_LOAD | SEC_READONLY
+ | SEC_CODE | SEC_SMALL_DATA | SEC_THREAD_LOCAL)))
+ found = look;
+ }
+ if (found != NULL)
+ {
+ if (exact != NULL)
+ *exact = found;
+ return found;
+ }
+
+ if (sec->flags & SEC_CODE)
+ {
+ /* Try for a rw code section. */
+ for (look = first; look; look = look->next)
+ {
+ flags = look->flags;
+ if (look->bfd_section != NULL)
+ {
+ flags = look->bfd_section->flags;
+ if (match_type && !match_type (output_bfd, look->bfd_section,
+ sec->owner, sec))
+ continue;
+ }
+ flags ^= sec->flags;
+ if (!(flags & (SEC_HAS_CONTENTS | SEC_ALLOC | SEC_LOAD
+ | SEC_CODE | SEC_SMALL_DATA | SEC_THREAD_LOCAL)))
+ found = look;
+ }
+ }
+ else if (sec->flags & (SEC_READONLY | SEC_THREAD_LOCAL))
+ {
+ /* .rodata can go after .text, .sdata2 after .rodata. */
+ for (look = first; look; look = look->next)
+ {
+ flags = look->flags;
+ if (look->bfd_section != NULL)
+ {
+ flags = look->bfd_section->flags;
+ if (match_type && !match_type (output_bfd, look->bfd_section,
+ sec->owner, sec))
+ continue;
+ }
+ flags ^= sec->flags;
+ if (!(flags & (SEC_HAS_CONTENTS | SEC_ALLOC | SEC_LOAD
+ | SEC_READONLY))
+ && !(look->flags & (SEC_SMALL_DATA | SEC_THREAD_LOCAL)))
+ found = look;
+ }
+ }
+ else if (sec->flags & SEC_SMALL_DATA)
+ {
+ /* .sdata goes after .data, .sbss after .sdata. */
+ for (look = first; look; look = look->next)
+ {
+ flags = look->flags;
+ if (look->bfd_section != NULL)
+ {
+ flags = look->bfd_section->flags;
+ if (match_type && !match_type (output_bfd, look->bfd_section,
+ sec->owner, sec))
+ continue;
+ }
+ flags ^= sec->flags;
+ if (!(flags & (SEC_HAS_CONTENTS | SEC_ALLOC | SEC_LOAD
+ | SEC_THREAD_LOCAL))
+ || ((look->flags & SEC_SMALL_DATA)
+ && !(sec->flags & SEC_HAS_CONTENTS)))
+ found = look;
+ }
+ }
+ else if (sec->flags & SEC_HAS_CONTENTS)
+ {
+ /* .data goes after .rodata. */
+ for (look = first; look; look = look->next)
+ {
+ flags = look->flags;
+ if (look->bfd_section != NULL)
+ {
+ flags = look->bfd_section->flags;
+ if (match_type && !match_type (output_bfd, look->bfd_section,
+ sec->owner, sec))
+ continue;
+ }
+ flags ^= sec->flags;
+ if (!(flags & (SEC_HAS_CONTENTS | SEC_ALLOC | SEC_LOAD
+ | SEC_SMALL_DATA | SEC_THREAD_LOCAL)))
+ found = look;
+ }
+ }
+ else
+ {
+ /* .bss goes last. */
+ for (look = first; look; look = look->next)
+ {
+ flags = look->flags;
+ if (look->bfd_section != NULL)
+ {
+ flags = look->bfd_section->flags;
+ if (match_type && !match_type (output_bfd, look->bfd_section,
+ sec->owner, sec))
+ continue;
+ }
+ flags ^= sec->flags;
+ if (!(flags & SEC_ALLOC))
+ found = look;
+ }
+ }
+
+ if (found || !match_type)
+ return found;
+
+ return lang_output_section_find_by_flags (sec, NULL, NULL);
+}
+
+/* Find the last output section before given output statement.
+ Used by place_orphan. */
+
+static asection *
+output_prev_sec_find (lang_output_section_statement_type *os)
+{
lang_output_section_statement_type *lookup;
- lookup = lang_output_section_find (name);
- if (lookup == NULL)
+ for (lookup = os->prev; lookup != NULL; lookup = lookup->prev)
+ {
+ if (lookup->constraint == -1)
+ continue;
+
+ if (lookup->bfd_section != NULL && lookup->bfd_section->owner != NULL)
+ return lookup->bfd_section;
+ }
+
+ return NULL;
+}
+
+lang_output_section_statement_type *
+lang_insert_orphan (asection *s,
+ const char *secname,
+ lang_output_section_statement_type *after,
+ struct orphan_save *place,
+ etree_type *address,
+ lang_statement_list_type *add_child)
+{
+ lang_statement_list_type *old;
+ lang_statement_list_type add;
+ const char *ps;
+ lang_output_section_statement_type *os;
+ lang_output_section_statement_type **os_tail;
+
+ /* Start building a list of statements for this section.
+ First save the current statement pointer. */
+ old = stat_ptr;
+
+ /* If we have found an appropriate place for the output section
+ statements for this orphan, add them to our own private list,
+ inserting them later into the global statement list. */
+ if (after != NULL)
+ {
+ stat_ptr = &add;
+ lang_list_init (stat_ptr);
+ }
+
+ if (link_info.relocatable || (s->flags & (SEC_LOAD | SEC_ALLOC)) == 0)
+ address = exp_intop (0);
+
+ os_tail = ((lang_output_section_statement_type **)
+ lang_output_section_statement.tail);
+ os = lang_enter_output_section_statement (secname, address, 0, NULL, NULL,
+ NULL, 0);
+
+ ps = NULL;
+ if (config.build_constructors && *os_tail == os)
{
- lookup = new_stat (lang_output_section_statement, stat_ptr);
- lookup->region = NULL;
- lookup->lma_region = NULL;
- lookup->fill = 0;
- lookup->block_value = 1;
- lookup->name = name;
+ /* 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 = secname; *ps != '\0'; ps++)
+ if (! ISALNUM ((unsigned char) *ps) && *ps != '_')
+ break;
+ if (*ps == '\0')
+ {
+ char *symname;
+ etree_type *e_align;
+
+ symname = (char *) xmalloc (ps - secname + sizeof "__start_" + 1);
+ symname[0] = bfd_get_symbol_leading_char (output_bfd);
+ sprintf (symname + (symname[0] != 0), "__start_%s", secname);
+ e_align = exp_unop (ALIGN_K,
+ exp_intop ((bfd_vma) 1 << s->alignment_power));
+ lang_add_assignment (exp_assop ('=', ".", e_align));
+ lang_add_assignment (exp_provide (symname,
+ exp_unop (ABSOLUTE,
+ exp_nameop (NAME, ".")),
+ FALSE));
+ }
+ }
- lookup->next = NULL;
- lookup->bfd_section = NULL;
- lookup->processed = 0;
- lookup->sectype = normal_section;
- lookup->addr_tree = NULL;
- lang_list_init (&lookup->children);
+ if (add_child == NULL)
+ add_child = &os->children;
+ lang_add_section (add_child, s, os);
- lookup->memspec = NULL;
- lookup->flags = 0;
- lookup->subsection_alignment = -1;
- lookup->section_alignment = -1;
- lookup->load_base = NULL;
- lookup->update_dot_tree = NULL;
- lookup->phdrs = NULL;
+ lang_leave_output_section_statement (0, "*default*", NULL, NULL);
- lang_statement_append (&lang_output_section_statement,
- (lang_statement_union_type *) lookup,
- &lookup->next);
+ if (ps != NULL && *ps == '\0')
+ {
+ char *symname;
+
+ /* lang_leave_ouput_section_statement resets stat_ptr.
+ Put stat_ptr back where we want it. */
+ if (after != NULL)
+ stat_ptr = &add;
+
+ symname = (char *) xmalloc (ps - secname + sizeof "__stop_" + 1);
+ symname[0] = bfd_get_symbol_leading_char (output_bfd);
+ sprintf (symname + (symname[0] != 0), "__stop_%s", secname);
+ lang_add_assignment (exp_provide (symname,
+ exp_nameop (NAME, "."),
+ FALSE));
}
- return lookup;
+
+ /* Restore the global list pointer. */
+ if (after != NULL)
+ stat_ptr = old;
+
+ if (after != NULL && os->bfd_section != NULL)
+ {
+ asection *snew, *as;
+
+ snew = os->bfd_section;
+
+ /* Shuffle the bfd section list to make the output file look
+ neater. This is really only cosmetic. */
+ if (place->section == NULL
+ && after != (&lang_output_section_statement.head
+ ->output_section_statement))
+ {
+ asection *bfd_section = after->bfd_section;
+
+ /* If the output statement hasn't been used to place any input
+ sections (and thus doesn't have an output bfd_section),
+ look for the closest prior output statement having an
+ output section. */
+ if (bfd_section == NULL)
+ bfd_section = output_prev_sec_find (after);
+
+ if (bfd_section != NULL && bfd_section != snew)
+ place->section = &bfd_section->next;
+ }
+
+ if (place->section == NULL)
+ place->section = &output_bfd->sections;
+
+ as = *place->section;
+
+ if (!as)
+ {
+ /* Put the section at the end of the list. */
+
+ /* Unlink the section. */
+ bfd_section_list_remove (output_bfd, snew);
+
+ /* Now tack it back on in the right place. */
+ bfd_section_list_append (output_bfd, snew);
+ }
+ else if (as != snew && as->prev != snew)
+ {
+ /* Unlink the section. */
+ bfd_section_list_remove (output_bfd, snew);
+
+ /* Now tack it back on in the right place. */
+ bfd_section_list_insert_before (output_bfd, as, snew);
+ }
+
+ /* Save the end of this list. Further ophans of this type will
+ follow the one we've just added. */
+ place->section = &snew->next;
+
+ /* The following is non-cosmetic. We try to put the output
+ statements in some sort of reasonable order here, because they
+ determine the final load addresses of the orphan sections.
+ In addition, placing output statements in the wrong order may
+ require extra segments. For instance, given a typical
+ situation of all read-only sections placed in one segment and
+ following that a segment containing all the read-write
+ sections, we wouldn't want to place an orphan read/write
+ section before or amongst the read-only ones. */
+ if (add.head != NULL)
+ {
+ lang_output_section_statement_type *newly_added_os;
+
+ if (place->stmt == NULL)
+ {
+ lang_statement_union_type **where;
+ lang_statement_union_type **assign = NULL;
+ bfd_boolean ignore_first;
+
+ /* Look for a suitable place for the new statement list.
+ The idea is to skip over anything that might be inside
+ a SECTIONS {} statement in a script, before we find
+ another output_section_statement. Assignments to "dot"
+ before an output section statement are assumed to
+ belong to it. An exception to this rule is made for
+ the first assignment to dot, otherwise we might put an
+ orphan before . = . + SIZEOF_HEADERS or similar
+ assignments that set the initial address. */
+
+ ignore_first = after == (&lang_output_section_statement.head
+ ->output_section_statement);
+ for (where = &after->header.next;
+ *where != NULL;
+ where = &(*where)->header.next)
+ {
+ switch ((*where)->header.type)
+ {
+ case lang_assignment_statement_enum:
+ if (assign == NULL)
+ {
+ lang_assignment_statement_type *ass;
+ ass = &(*where)->assignment_statement;
+ if (ass->exp->type.node_class != etree_assert
+ && ass->exp->assign.dst[0] == '.'
+ && ass->exp->assign.dst[1] == 0
+ && !ignore_first)
+ assign = where;
+ }
+ ignore_first = FALSE;
+ continue;
+ case lang_wild_statement_enum:
+ case lang_input_section_enum:
+ case lang_object_symbols_statement_enum:
+ case lang_fill_statement_enum:
+ case lang_data_statement_enum:
+ case lang_reloc_statement_enum:
+ case lang_padding_statement_enum:
+ case lang_constructors_statement_enum:
+ assign = NULL;
+ continue;
+ case lang_output_section_statement_enum:
+ if (assign != NULL)
+ where = assign;
+ case lang_input_statement_enum:
+ case lang_address_statement_enum:
+ case lang_target_statement_enum:
+ case lang_output_statement_enum:
+ case lang_group_statement_enum:
+ case lang_afile_asection_pair_statement_enum:
+ break;
+ }
+ break;
+ }
+
+ *add.tail = *where;
+ *where = add.head;
+
+ place->os_tail = &after->next;
+ }
+ else
+ {
+ /* Put it after the last orphan statement we added. */
+ *add.tail = *place->stmt;
+ *place->stmt = add.head;
+ }
+
+ /* Fix the global list pointer if we happened to tack our
+ new list at the tail. */
+ if (*old->tail == add.head)
+ old->tail = add.tail;
+
+ /* Save the end of this list. */
+ place->stmt = add.tail;
+
+ /* Do the same for the list of output section statements. */
+ newly_added_os = *os_tail;
+ *os_tail = NULL;
+ newly_added_os->prev = (lang_output_section_statement_type *)
+ ((char *) place->os_tail
+ - offsetof (lang_output_section_statement_type, next));
+ newly_added_os->next = *place->os_tail;
+ if (newly_added_os->next != NULL)
+ newly_added_os->next->prev = newly_added_os;
+ *place->os_tail = newly_added_os;
+ place->os_tail = &newly_added_os->next;
+
+ /* Fixing the global list pointer here is a little different.
+ We added to the list in lang_enter_output_section_statement,
+ trimmed off the new output_section_statment above when
+ assigning *os_tail = NULL, but possibly added it back in
+ the same place when assigning *place->os_tail. */
+ if (*os_tail == NULL)
+ lang_output_section_statement.tail
+ = (lang_statement_union_type **) os_tail;
+ }
+ }
+ return os;
}
static void
@@ -666,6 +1734,31 @@ void
lang_map (void)
{
lang_memory_region_type *m;
+ bfd_boolean dis_header_printed = FALSE;
+ bfd *p;
+
+ LANG_FOR_EACH_INPUT_STATEMENT (file)
+ {
+ asection *s;
+
+ if ((file->the_bfd->flags & (BFD_LINKER_CREATED | DYNAMIC)) != 0
+ || file->just_syms_flag)
+ continue;
+
+ for (s = file->the_bfd->sections; s != NULL; s = s->next)
+ if ((s->output_section == NULL
+ || s->output_section->owner != output_bfd)
+ && (s->flags & (SEC_LINKER_CREATED | SEC_KEEP)) == 0)
+ {
+ if (! dis_header_printed)
+ {
+ fprintf (config.map_file, _("\nDiscarded input sections\n\n"));
+ dis_header_printed = TRUE;
+ }
+
+ print_input_section (s);
+ }
+ }
minfo (_("\nMemory Configuration\n\n"));
fprintf (config.map_file, "%-16s %-18s %-18s %s\n",
@@ -711,38 +1804,92 @@ lang_map (void)
fprintf (config.map_file, _("\nLinker script and memory map\n\n"));
+ if (! link_info.reduce_memory_overheads)
+ {
+ obstack_begin (&map_obstack, 1000);
+ for (p = link_info.input_bfds; p != (bfd *) NULL; p = p->link_next)
+ bfd_map_over_sections (p, init_map_userdata, 0);
+ bfd_link_hash_traverse (link_info.hash, sort_def_symbol, 0);
+ }
print_statements ();
}
+static void
+init_map_userdata (abfd, sec, data)
+ bfd *abfd ATTRIBUTE_UNUSED;
+ asection *sec;
+ void *data ATTRIBUTE_UNUSED;
+{
+ fat_section_userdata_type *new_data
+ = ((fat_section_userdata_type *) (stat_alloc
+ (sizeof (fat_section_userdata_type))));
+
+ ASSERT (get_userdata (sec) == NULL);
+ get_userdata (sec) = new_data;
+ new_data->map_symbol_def_tail = &new_data->map_symbol_def_head;
+}
+
+static bfd_boolean
+sort_def_symbol (hash_entry, info)
+ struct bfd_link_hash_entry *hash_entry;
+ void *info ATTRIBUTE_UNUSED;
+{
+ if (hash_entry->type == bfd_link_hash_defined
+ || hash_entry->type == bfd_link_hash_defweak)
+ {
+ struct fat_user_section_struct *ud;
+ struct map_symbol_def *def;
+
+ ud = get_userdata (hash_entry->u.def.section);
+ if (! ud)
+ {
+ /* ??? What do we have to do to initialize this beforehand? */
+ /* The first time we get here is bfd_abs_section... */
+ init_map_userdata (0, hash_entry->u.def.section, 0);
+ ud = get_userdata (hash_entry->u.def.section);
+ }
+ else if (!ud->map_symbol_def_tail)
+ ud->map_symbol_def_tail = &ud->map_symbol_def_head;
+
+ def = obstack_alloc (&map_obstack, sizeof *def);
+ def->entry = hash_entry;
+ *(ud->map_symbol_def_tail) = def;
+ ud->map_symbol_def_tail = &def->next;
+ }
+ return TRUE;
+}
+
/* Initialize an output section. */
static void
-init_os (lang_output_section_statement_type *s)
+init_os (lang_output_section_statement_type *s, asection *isec,
+ flagword flags)
{
- section_userdata_type *new;
-
if (s->bfd_section != NULL)
return;
if (strcmp (s->name, DISCARD_SECTION_NAME) == 0)
einfo (_("%P%F: Illegal use of `%s' section\n"), DISCARD_SECTION_NAME);
- new = stat_alloc (sizeof (section_userdata_type));
-
s->bfd_section = bfd_get_section_by_name (output_bfd, s->name);
if (s->bfd_section == NULL)
- s->bfd_section = bfd_make_section (output_bfd, s->name);
+ s->bfd_section = bfd_make_section_with_flags (output_bfd, s->name,
+ flags);
if (s->bfd_section == NULL)
{
einfo (_("%P%F: output format %s cannot represent section called %s\n"),
output_bfd->xvec->name, s->name);
}
s->bfd_section->output_section = s->bfd_section;
-
- /* We initialize an output sections output offset to minus its own
- vma to allow us to output a section through itself. */
s->bfd_section->output_offset = 0;
- get_userdata (s->bfd_section) = new;
+
+ if (!link_info.reduce_memory_overheads)
+ {
+ fat_section_userdata_type *new
+ = stat_alloc (sizeof (fat_section_userdata_type));
+ memset (new, 0, sizeof (fat_section_userdata_type));
+ get_userdata (s->bfd_section) = new;
+ }
/* If there is a base address, make sure that any sections it might
mention are initialized. */
@@ -751,6 +1898,15 @@ init_os (lang_output_section_statement_type *s)
if (s->load_base != NULL)
exp_init_os (s->load_base);
+
+ /* If supplied an alignment, set it. */
+ if (s->section_alignment != -1)
+ s->bfd_section->alignment_power = s->section_alignment;
+
+ if (isec)
+ bfd_init_private_section_data (isec->owner, isec,
+ output_bfd, s->bfd_section,
+ &link_info);
}
/* Make sure that all output sections mentioned in an expression are
@@ -762,6 +1918,7 @@ exp_init_os (etree_type *exp)
switch (exp->type.node_class)
{
case etree_assign:
+ case etree_provide:
exp_init_os (exp->assign.src);
break;
@@ -779,7 +1936,7 @@ exp_init_os (etree_type *exp)
case etree_assert:
exp_init_os (exp->assert_s.child);
break;
-
+
case etree_unary:
exp_init_os (exp->unary.child);
break;
@@ -795,7 +1952,7 @@ exp_init_os (etree_type *exp)
os = lang_output_section_find (exp->name.name);
if (os != NULL && os->bfd_section == NULL)
- init_os (os);
+ init_os (os, NULL, 0);
}
}
break;
@@ -805,175 +1962,21 @@ exp_init_os (etree_type *exp)
}
}
-/* Sections marked with the SEC_LINK_ONCE flag should only be linked
- once into the output. This routine checks each section, and
- arrange to discard it if a section of the same name has already
- been linked. If the section has COMDAT information, then it uses
- that to decide whether the section should be included. This code
- assumes that all relevant sections have the SEC_LINK_ONCE flag set;
- that is, it does not depend solely upon the section name.
- section_already_linked is called via bfd_map_over_sections. */
-
-/* This is the shape of the elements inside the already_linked hash
- table. It maps a name onto a list of already_linked elements with
- the same name. It's possible to get more than one element in a
- list if the COMDAT sections have different names. */
-
-struct already_linked_hash_entry
-{
- struct bfd_hash_entry root;
- struct already_linked *entry;
-};
-
-struct already_linked
-{
- struct already_linked *next;
- asection *sec;
-};
-
-/* The hash table. */
-
-static struct bfd_hash_table already_linked_table;
-
static void
section_already_linked (bfd *abfd, asection *sec, void *data)
{
lang_input_statement_type *entry = data;
- flagword flags;
- const char *name;
- struct already_linked *l;
- struct already_linked_hash_entry *already_linked_list;
/* If we are only reading symbols from this object, then we want to
discard all sections. */
if (entry->just_syms_flag)
{
- bfd_link_just_syms (sec, &link_info);
+ bfd_link_just_syms (abfd, sec, &link_info);
return;
}
- flags = bfd_get_section_flags (abfd, sec);
-
- if ((flags & SEC_LINK_ONCE) == 0)
- return;
-
- /* FIXME: When doing a relocatable link, we may have trouble
- copying relocations in other sections that refer to local symbols
- in the section being discarded. Those relocations will have to
- be converted somehow; as of this writing I'm not sure that any of
- the backends handle that correctly.
-
- It is tempting to instead not discard link once sections when
- doing a relocatable link (technically, they should be discarded
- whenever we are building constructors). However, that fails,
- because the linker winds up combining all the link once sections
- into a single large link once section, which defeats the purpose
- of having link once sections in the first place.
-
- Also, not merging link once sections in a relocatable link
- causes trouble for MIPS ELF, which relies on link once semantics
- to handle the .reginfo section correctly. */
-
- name = bfd_get_section_name (abfd, sec);
-
- already_linked_list =
- ((struct already_linked_hash_entry *)
- bfd_hash_lookup (&already_linked_table, name, TRUE, FALSE));
-
- for (l = already_linked_list->entry; l != NULL; l = l->next)
- {
- if (sec->comdat == NULL
- || l->sec->comdat == NULL
- || strcmp (sec->comdat->name, l->sec->comdat->name) == 0)
- {
- /* The section has already been linked. See if we should
- issue a warning. */
- switch (flags & SEC_LINK_DUPLICATES)
- {
- default:
- abort ();
-
- case SEC_LINK_DUPLICATES_DISCARD:
- break;
-
- case SEC_LINK_DUPLICATES_ONE_ONLY:
- if (sec->comdat == NULL)
- einfo (_("%P: %B: warning: ignoring duplicate section `%s'\n"),
- abfd, name);
- else
- einfo (_("%P: %B: warning: ignoring duplicate `%s' section symbol `%s'\n"),
- abfd, name, sec->comdat->name);
- break;
-
- case SEC_LINK_DUPLICATES_SAME_CONTENTS:
- /* FIXME: We should really dig out the contents of both
- sections and memcmp them. The COFF/PE spec says that
- the Microsoft linker does not implement this
- correctly, so I'm not going to bother doing it
- either. */
- /* Fall through. */
- case SEC_LINK_DUPLICATES_SAME_SIZE:
- if (bfd_section_size (abfd, sec)
- != bfd_section_size (l->sec->owner, l->sec))
- einfo (_("%P: %B: warning: duplicate section `%s' has different size\n"),
- abfd, name);
- break;
- }
-
- /* Set the output_section field so that lang_add_section
- does not create a lang_input_section structure for this
- section. Since there might be a symbol in the section
- being discarded, we must retain a pointer to the section
- which we are really going to use. */
- sec->output_section = bfd_abs_section_ptr;
- sec->kept_section = l->sec;
-
- if (flags & SEC_GROUP)
- bfd_discard_group (abfd, sec);
-
- return;
- }
- }
-
- /* This is the first section with this name. Record it. Allocate
- the memory from the same obstack as the hash table is kept in. */
-
- l = bfd_hash_allocate (&already_linked_table, sizeof *l);
-
- l->sec = sec;
- l->next = already_linked_list->entry;
- already_linked_list->entry = l;
-}
-
-/* Support routines for the hash table used by section_already_linked,
- initialize the table, fill in an entry and remove the table. */
-
-static struct bfd_hash_entry *
-already_linked_newfunc (struct bfd_hash_entry *entry ATTRIBUTE_UNUSED,
- struct bfd_hash_table *table,
- const char *string ATTRIBUTE_UNUSED)
-{
- struct already_linked_hash_entry *ret =
- bfd_hash_allocate (table, sizeof (struct already_linked_hash_entry));
-
- ret->entry = NULL;
-
- return &ret->root;
-}
-
-static void
-already_linked_table_init (void)
-{
- if (! bfd_hash_table_init_n (&already_linked_table,
- already_linked_newfunc,
- 42))
- einfo (_("%P%F: Failed to create hash table\n"));
-}
-
-static void
-already_linked_table_free (void)
-{
- bfd_hash_table_free (&already_linked_table);
+ if (!(abfd->flags & DYNAMIC))
+ bfd_section_already_linked (abfd, sec, &link_info);
}
/* The wild routines.
@@ -982,25 +1985,6 @@ already_linked_table_free (void)
explicit actions, like foo.o(.text), bar.o(.text) and
foo.o(.text, .data). */
-/* 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 pattern to be treated as a wildcard.
- That lets us handle DOS filenames more naturally. */
-
-static bfd_boolean
-wildcardp (const char *pattern)
-{
- const char *s;
-
- for (s = pattern; *s != '\0'; ++s)
- if (*s == '?'
- || *s == '*'
- || *s == '[')
- return TRUE;
- return FALSE;
-}
-
/* Add SECTION to the output section OUTPUT. Do this by creating a
lang_input_section statement which is placed at PTR. FILE is the
input file which holds SECTION. */
@@ -1008,22 +1992,13 @@ wildcardp (const char *pattern)
void
lang_add_section (lang_statement_list_type *ptr,
asection *section,
- lang_output_section_statement_type *output,
- lang_input_statement_type *file)
+ lang_output_section_statement_type *output)
{
- flagword flags;
+ flagword flags = section->flags;
bfd_boolean discard;
- flags = bfd_get_section_flags (section->owner, section);
-
- discard = FALSE;
-
- /* Discard sections marked with SEC_EXCLUDE if we are doing a final
- link. Discard debugging sections marked with SEC_EXCLUDE on a
- relocatable link too. */
- if ((flags & SEC_EXCLUDE) != 0
- && ((flags & SEC_DEBUGGING) != 0 || !link_info.relocatable))
- discard = TRUE;
+ /* Discard sections marked with SEC_EXCLUDE. */
+ discard = (flags & SEC_EXCLUDE) != 0;
/* Discard input sections which are assigned to a section named
DISCARD_SECTION_NAME. */
@@ -1052,19 +2027,6 @@ lang_add_section (lang_statement_list_type *ptr,
lang_input_section_type *new;
flagword flags;
- if (output->bfd_section == NULL)
- init_os (output);
-
- first = ! output->bfd_section->linker_has_input;
- output->bfd_section->linker_has_input = 1;
-
- /* Add a section reference to the list. */
- new = new_stat (lang_input_section, ptr);
-
- new->section = section;
- 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
@@ -1076,6 +2038,45 @@ lang_add_section (lang_statement_list_type *ptr,
flags &= ~ SEC_NEVER_LOAD;
+ switch (output->sectype)
+ {
+ case normal_section:
+ case overlay_section:
+ break;
+ case noalloc_section:
+ flags &= ~SEC_ALLOC;
+ break;
+ case noload_section:
+ flags &= ~SEC_LOAD;
+ flags |= SEC_NEVER_LOAD;
+ break;
+ }
+
+ if (output->bfd_section == NULL)
+ init_os (output, section, flags);
+
+ first = ! output->bfd_section->linker_has_input;
+ output->bfd_section->linker_has_input = 1;
+
+ if (!link_info.relocatable
+ && !stripped_excluded_sections)
+ {
+ asection *s = output->bfd_section->map_tail.s;
+ output->bfd_section->map_tail.s = section;
+ section->map_head.s = NULL;
+ section->map_tail.s = s;
+ if (s != NULL)
+ s->map_head.s = section;
+ else
+ output->bfd_section->map_head.s = section;
+ }
+
+ /* Add a section reference to the list. */
+ new = new_stat (lang_input_section, ptr);
+
+ new->section = section;
+ section->output_section = output->bfd_section;
+
/* 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
@@ -1085,63 +2086,44 @@ lang_add_section (lang_statement_list_type *ptr,
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. */
+ 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)
+ if (! first && (output->bfd_section->flags & SEC_READONLY) == 0)
flags &= ~ SEC_READONLY;
/* Keep SEC_MERGE and SEC_STRINGS only if they are the same. */
if (! first
- && ((section->output_section->flags & (SEC_MERGE | SEC_STRINGS))
+ && ((output->bfd_section->flags & (SEC_MERGE | SEC_STRINGS))
!= (flags & (SEC_MERGE | SEC_STRINGS))
|| ((flags & SEC_MERGE)
- && section->output_section->entsize != section->entsize)))
+ && output->bfd_section->entsize != section->entsize)))
{
- section->output_section->flags &= ~ (SEC_MERGE | SEC_STRINGS);
+ output->bfd_section->flags &= ~ (SEC_MERGE | SEC_STRINGS);
flags &= ~ (SEC_MERGE | SEC_STRINGS);
}
- section->output_section->flags |= flags;
+ output->bfd_section->flags |= flags;
if (flags & SEC_MERGE)
- section->output_section->entsize = section->entsize;
+ output->bfd_section->entsize = section->entsize;
/* If SEC_READONLY is not set in the input section, then clear
- it from the output section. */
+ it from the output section. */
if ((section->flags & SEC_READONLY) == 0)
- section->output_section->flags &= ~SEC_READONLY;
-
- switch (output->sectype)
- {
- case normal_section:
- break;
- case dsect_section:
- case copy_section:
- case info_section:
- case overlay_section:
- output->bfd_section->flags &= ~SEC_ALLOC;
- break;
- case noload_section:
- output->bfd_section->flags &= ~SEC_LOAD;
- output->bfd_section->flags |= SEC_NEVER_LOAD;
- break;
- }
+ output->bfd_section->flags &= ~SEC_READONLY;
/* Copy over SEC_SMALL_DATA. */
if (section->flags & SEC_SMALL_DATA)
- section->output_section->flags |= SEC_SMALL_DATA;
+ output->bfd_section->flags |= SEC_SMALL_DATA;
if (section->alignment_power > output->bfd_section->alignment_power)
output->bfd_section->alignment_power = section->alignment_power;
- /* If supplied an alignment, then force it. */
- if (output->section_alignment != -1)
- output->bfd_section->alignment_power = output->section_alignment;
-
- if (section->flags & SEC_BLOCK)
+ if (bfd_get_arch (section->owner) == bfd_arch_tic54x
+ && (section->flags & SEC_TIC54X_BLOCK) != 0)
{
- section->output_section->flags |= SEC_BLOCK;
+ output->bfd_section->flags |= SEC_TIC54X_BLOCK;
/* FIXME: This value should really be obtained from the bfd... */
output->block_value = 128;
}
@@ -1162,7 +2144,8 @@ wild_sort (lang_wild_statement_type *wild,
const char *section_name;
lang_statement_union_type *l;
- if (!wild->filenames_sorted && (sec == NULL || !sec->spec.sorted))
+ if (!wild->filenames_sorted
+ && (sec == NULL || sec->spec.sorted == none))
return NULL;
section_name = bfd_get_section_name (file->the_bfd, section);
@@ -1175,7 +2158,7 @@ wild_sort (lang_wild_statement_type *wild,
ls = &l->input_section;
/* Sorting by filename takes precedence over sorting by section
- name. */
+ name. */
if (wild->filenames_sorted)
{
@@ -1184,9 +2167,9 @@ wild_sort (lang_wild_statement_type *wild,
int i;
/* The PE support for the .idata section as generated by
- dlltool assumes that files will be sorted by the name of
- the archive and then the name of the file within the
- archive. */
+ dlltool assumes that files will be sorted by the name of
+ the archive and then the name of the file within the
+ archive. */
if (file->the_bfd != NULL
&& bfd_my_archive (file->the_bfd) != NULL)
@@ -1200,15 +2183,14 @@ wild_sort (lang_wild_statement_type *wild,
fa = FALSE;
}
- if (ls->ifile->the_bfd != NULL
- && bfd_my_archive (ls->ifile->the_bfd) != NULL)
+ if (bfd_my_archive (ls->section->owner) != NULL)
{
- ln = bfd_get_filename (bfd_my_archive (ls->ifile->the_bfd));
+ ln = bfd_get_filename (bfd_my_archive (ls->section->owner));
la = TRUE;
}
else
{
- ln = ls->ifile->filename;
+ ln = ls->section->owner->filename;
la = FALSE;
}
@@ -1223,7 +2205,7 @@ wild_sort (lang_wild_statement_type *wild,
if (fa)
fn = file->filename;
if (la)
- ln = ls->ifile->filename;
+ ln = ls->section->owner->filename;
i = strcmp (fn, ln);
if (i > 0)
@@ -1234,16 +2216,11 @@ wild_sort (lang_wild_statement_type *wild,
}
/* Here either the files are not sorted by name, or we are
- looking at the sections for this file. */
+ looking at the sections for this file. */
- if (sec != NULL && sec->spec.sorted)
- {
- if (strcmp (section_name,
- bfd_get_section_name (ls->ifile->the_bfd,
- ls->section))
- < 0)
- break;
- }
+ if (sec != NULL && sec->spec.sorted != none)
+ if (compare_section (sec->spec.sorted, section, ls->section) < 0)
+ break;
}
return l;
@@ -1262,14 +2239,9 @@ output_section_callback (lang_wild_statement_type *ptr,
lang_statement_union_type *before;
/* Exclude sections that match UNIQUE_SECTION_LIST. */
- if (unique_section_p (bfd_get_section_name (file->the_bfd, section)))
+ if (unique_section_p (section))
return;
- /* If the wild pattern was marked KEEP, the member sections
- should be as well. */
- if (ptr->keep_sections)
- section->flags |= SEC_KEEP;
-
before = wild_sort (ptr, sec, file, section);
/* Here BEFORE points to the lang_input_section which
@@ -1279,8 +2251,7 @@ output_section_callback (lang_wild_statement_type *ptr,
if (before == NULL)
lang_add_section (&ptr->children, section,
- (lang_output_section_statement_type *) output,
- file);
+ (lang_output_section_statement_type *) output);
else
{
lang_statement_list_type list;
@@ -1288,8 +2259,7 @@ output_section_callback (lang_wild_statement_type *ptr,
lang_list_init (&list);
lang_add_section (&list, section,
- (lang_output_section_statement_type *) output,
- file);
+ (lang_output_section_statement_type *) output);
/* If we are discarding the section, LIST.HEAD will
be NULL. */
@@ -1308,6 +2278,24 @@ output_section_callback (lang_wild_statement_type *ptr,
}
}
+/* Check if all sections in a wild statement for a particular FILE
+ are readonly. */
+
+static void
+check_section_callback (lang_wild_statement_type *ptr ATTRIBUTE_UNUSED,
+ struct wildcard_list *sec ATTRIBUTE_UNUSED,
+ asection *section,
+ lang_input_statement_type *file ATTRIBUTE_UNUSED,
+ void *data)
+{
+ /* Exclude sections that match UNIQUE_SECTION_LIST. */
+ if (unique_section_p (section))
+ return;
+
+ if (section->output_section == NULL && (section->flags & SEC_READONLY) == 0)
+ ((lang_output_section_statement_type *) data)->all_input_readonly = FALSE;
+}
+
/* This is passed a file name which must have been seen already and
added to the statement tree. We will see if it has been opened
already and had its symbols read. If not then we'll read it. */
@@ -1324,26 +2312,20 @@ lookup_name (const char *name)
/* Use the local_sym_name as the name of the file that has
already been loaded as filename might have been transformed
via the search directory lookup mechanism. */
- const char * filename = search->local_sym_name;
+ const char *filename = search->local_sym_name;
- if (filename == NULL && name == NULL)
- return search;
if (filename != NULL
- && name != NULL
&& strcmp (filename, name) == 0)
break;
}
if (search == NULL)
- search = new_afile (name, lang_input_file_is_search_file_enum, default_target,
- FALSE);
+ search = new_afile (name, lang_input_file_is_search_file_enum,
+ default_target, FALSE);
/* If we have already added this file, or this file is not real
- (FIXME: can that ever actually happen?) or the name is NULL
- (FIXME: can that ever actually happen?) don't add this file. */
- if (search->loaded
- || ! search->real
- || search->filename == NULL)
+ don't add this file. */
+ if (search->loaded || !search->real)
return search;
if (! load_symbols (search, NULL))
@@ -1352,9 +2334,70 @@ lookup_name (const char *name)
return search;
}
+/* Save LIST as a list of libraries whose symbols should not be exported. */
+
+struct excluded_lib
+{
+ char *name;
+ struct excluded_lib *next;
+};
+static struct excluded_lib *excluded_libs;
+
+void
+add_excluded_libs (const char *list)
+{
+ const char *p = list, *end;
+
+ while (*p != '\0')
+ {
+ struct excluded_lib *entry;
+ end = strpbrk (p, ",:");
+ if (end == NULL)
+ end = p + strlen (p);
+ entry = xmalloc (sizeof (*entry));
+ entry->next = excluded_libs;
+ entry->name = xmalloc (end - p + 1);
+ memcpy (entry->name, p, end - p);
+ entry->name[end - p] = '\0';
+ excluded_libs = entry;
+ if (*end == '\0')
+ break;
+ p = end + 1;
+ }
+}
+
+static void
+check_excluded_libs (bfd *abfd)
+{
+ struct excluded_lib *lib = excluded_libs;
+
+ while (lib)
+ {
+ int len = strlen (lib->name);
+ const char *filename = lbasename (abfd->filename);
+
+ if (strcmp (lib->name, "ALL") == 0)
+ {
+ abfd->no_export = TRUE;
+ return;
+ }
+
+ if (strncmp (lib->name, filename, len) == 0
+ && (filename[len] == '\0'
+ || (filename[len] == '.' && filename[len + 1] == 'a'
+ && filename[len + 2] == '\0')))
+ {
+ abfd->no_export = TRUE;
+ return;
+ }
+
+ lib = lib->next;
+ }
+}
+
/* Get the symbols for an input file. */
-static bfd_boolean
+bfd_boolean
load_symbols (lang_input_statement_type *entry,
lang_statement_list_type *place)
{
@@ -1372,6 +2415,7 @@ load_symbols (lang_input_statement_type *entry,
lang_statement_list_type *hold;
bfd_boolean bad_load = TRUE;
bfd_boolean save_ldlang_sysrooted_script;
+ bfd_boolean save_as_needed, save_add_needed;
err = bfd_get_error ();
@@ -1405,13 +2449,22 @@ load_symbols (lang_input_statement_type *entry,
stat_ptr = place;
save_ldlang_sysrooted_script = ldlang_sysrooted_script;
ldlang_sysrooted_script = entry->sysrooted;
+ save_as_needed = as_needed;
+ as_needed = entry->as_needed;
+ save_add_needed = add_needed;
+ add_needed = entry->add_needed;
ldfile_assumed_script = TRUE;
parser_input = input_script;
+ /* We want to use the same -Bdynamic/-Bstatic as the one for
+ ENTRY. */
+ config.dynamic_link = entry->dynamic;
yyparse ();
ldfile_assumed_script = FALSE;
ldlang_sysrooted_script = save_ldlang_sysrooted_script;
+ as_needed = save_as_needed;
+ add_needed = save_add_needed;
stat_ptr = hold;
return ! bad_load;
@@ -1436,6 +2489,8 @@ load_symbols (lang_input_statement_type *entry,
break;
case bfd_archive:
+ check_excluded_libs (entry->the_bfd);
+
if (entry->whole_archive)
{
bfd *member = NULL;
@@ -1493,19 +2548,33 @@ wild (lang_wild_statement_type *s,
{
struct wildcard_list *sec;
- walk_wild (s, output_section_callback, output);
-
- for (sec = s->section_list; sec != NULL; sec = sec->next)
+ if (s->handler_data[0]
+ && s->handler_data[0]->spec.sorted == by_name
+ && !s->filenames_sorted)
{
- if (default_common_section != NULL)
- break;
+ lang_section_bst_type *tree;
+
+ walk_wild (s, output_section_callback_fast, output);
+
+ tree = s->tree;
+ if (tree)
+ {
+ output_section_callback_tree_to_list (s, tree, output);
+ s->tree = NULL;
+ }
+ }
+ else
+ walk_wild (s, output_section_callback, output);
+
+ if (default_common_section == NULL)
+ for (sec = s->section_list; sec != NULL; sec = sec->next)
if (sec->spec.name != NULL && strcmp (sec->spec.name, "COMMON") == 0)
{
/* Remember the section that common is going to in case we
later get something which doesn't know where to put it. */
default_common_section = output;
+ break;
}
- }
}
/* Return TRUE iff target is the sought target. */
@@ -1730,7 +2799,8 @@ open_output (const char *name)
/* Oh dear - we could not find any targets that
satisfy our requirements. */
if (winner == NULL)
- einfo (_("%P: warning: could not find any targets that match endianness requirement\n"));
+ einfo (_("%P: warning: could not find any targets"
+ " that match endianness requirement\n"));
else
output_target = winner->name;
}
@@ -1750,10 +2820,6 @@ open_output (const char *name)
delete_output_file_on_failure = TRUE;
-#if 0
- output->flags |= D_PAGED;
-#endif
-
if (! bfd_set_format (output, bfd_object))
einfo (_("%P%F:%s: can not make object file: %E\n"), name);
if (! bfd_set_arch_mach (output,
@@ -1763,7 +2829,7 @@ open_output (const char *name)
link_info.hash = bfd_link_hash_table_create (output);
if (link_info.hash == NULL)
- einfo (_("%P%F: can not create link hash table: %E\n"));
+ einfo (_("%P%F: can not create hash table: %E\n"));
bfd_set_gp_size (output, g_switch_value);
return output;
@@ -1873,8 +2939,8 @@ open_input_bfds (lang_statement_union_type *s, bfd_boolean force)
s->input_statement.target = current_target;
/* If we are being called from within a group, and this
- is an archive which has already been searched, then
- force it to be researched unless the whole archive
+ is an archive which has already been searched, then
+ force it to be researched unless the whole archive
has been loaded already. */
if (force
&& !s->input_statement.whole_archive
@@ -1901,31 +2967,6 @@ open_input_bfds (lang_statement_union_type *s, bfd_boolean force)
}
}
-/* If there are [COMMONS] statements, put a wild one into the bss
- section. */
-
-static void
-lang_reasonable_defaults (void)
-{
-#if 0
- lang_output_section_statement_lookup (".text");
- lang_output_section_statement_lookup (".data");
-
- default_common_section = lang_output_section_statement_lookup (".bss");
-
- if (!placed_commons)
- {
- lang_wild_statement_type *new =
- new_stat (lang_wild_statement,
- &default_common_section->children);
-
- new->section_name = "COMMON";
- new->filename = NULL;
- lang_list_init (&new->children);
- }
-#endif
-}
-
/* Add a symbol to a hash of symbols used in DEFINED (NAME) expressions. */
void
@@ -2061,26 +3102,147 @@ lang_place_undefineds (void)
insert_undefined (ptr->name);
}
+/* Check for all readonly or some readwrite sections. */
+
+static void
+check_input_sections
+ (lang_statement_union_type *s,
+ lang_output_section_statement_type *output_section_statement)
+{
+ for (; s != (lang_statement_union_type *) NULL; s = s->header.next)
+ {
+ switch (s->header.type)
+ {
+ case lang_wild_statement_enum:
+ walk_wild (&s->wild_statement, check_section_callback,
+ output_section_statement);
+ if (! output_section_statement->all_input_readonly)
+ return;
+ break;
+ case lang_constructors_statement_enum:
+ check_input_sections (constructor_list.head,
+ output_section_statement);
+ if (! output_section_statement->all_input_readonly)
+ return;
+ break;
+ case lang_group_statement_enum:
+ check_input_sections (s->group_statement.children.head,
+ output_section_statement);
+ if (! output_section_statement->all_input_readonly)
+ return;
+ break;
+ default:
+ break;
+ }
+ }
+}
+
+/* Update wildcard statements if needed. */
+
+static void
+update_wild_statements (lang_statement_union_type *s)
+{
+ struct wildcard_list *sec;
+
+ switch (sort_section)
+ {
+ default:
+ FAIL ();
+
+ case none:
+ break;
+
+ case by_name:
+ case by_alignment:
+ for (; s != NULL; s = s->header.next)
+ {
+ switch (s->header.type)
+ {
+ default:
+ break;
+
+ case lang_wild_statement_enum:
+ sec = s->wild_statement.section_list;
+ for (sec = s->wild_statement.section_list; sec != NULL;
+ sec = sec->next)
+ {
+ switch (sec->spec.sorted)
+ {
+ case none:
+ sec->spec.sorted = sort_section;
+ break;
+ case by_name:
+ if (sort_section == by_alignment)
+ sec->spec.sorted = by_name_alignment;
+ break;
+ case by_alignment:
+ if (sort_section == by_name)
+ sec->spec.sorted = by_alignment_name;
+ break;
+ default:
+ break;
+ }
+ }
+ break;
+
+ case lang_constructors_statement_enum:
+ update_wild_statements (constructor_list.head);
+ break;
+
+ case lang_output_section_statement_enum:
+ update_wild_statements
+ (s->output_section_statement.children.head);
+ break;
+
+ case lang_group_statement_enum:
+ update_wild_statements (s->group_statement.children.head);
+ break;
+ }
+ }
+ break;
+ }
+}
+
/* Open input files and attach to output sections. */
static void
map_input_to_output_sections
(lang_statement_union_type *s, const char *target,
- lang_output_section_statement_type *output_section_statement)
+ lang_output_section_statement_type *os)
{
+ flagword flags;
+
for (; s != NULL; s = s->header.next)
{
switch (s->header.type)
{
case lang_wild_statement_enum:
- wild (&s->wild_statement, target, output_section_statement);
+ wild (&s->wild_statement, target, os);
break;
case lang_constructors_statement_enum:
map_input_to_output_sections (constructor_list.head,
target,
- output_section_statement);
+ os);
break;
case lang_output_section_statement_enum:
+ if (s->output_section_statement.constraint)
+ {
+ if (s->output_section_statement.constraint != ONLY_IF_RW
+ && s->output_section_statement.constraint != ONLY_IF_RO)
+ break;
+ s->output_section_statement.all_input_readonly = TRUE;
+ check_input_sections (s->output_section_statement.children.head,
+ &s->output_section_statement);
+ if ((s->output_section_statement.all_input_readonly
+ && s->output_section_statement.constraint == ONLY_IF_RW)
+ || (!s->output_section_statement.all_input_readonly
+ && s->output_section_statement.constraint == ONLY_IF_RO))
+ {
+ s->output_section_statement.constraint = -1;
+ break;
+ }
+ }
+
map_input_to_output_sections (s->output_section_statement.children.head,
target,
&s->output_section_statement);
@@ -2093,27 +3255,35 @@ map_input_to_output_sections
case lang_group_statement_enum:
map_input_to_output_sections (s->group_statement.children.head,
target,
- output_section_statement);
+ os);
break;
case lang_data_statement_enum:
/* Make sure that any sections mentioned in the expression
are initialized. */
exp_init_os (s->data_statement.exp);
- /* FALLTHROUGH */
- case lang_fill_statement_enum:
+ flags = SEC_HAS_CONTENTS;
+ /* The output section gets contents, and then we inspect for
+ any flags set in the input script which override any ALLOC. */
+ if (!(os->flags & SEC_NEVER_LOAD))
+ flags |= SEC_ALLOC | SEC_LOAD;
+ if (os->bfd_section == NULL)
+ init_os (os, NULL, flags);
+ else
+ os->bfd_section->flags |= flags;
+ break;
case lang_input_section_enum:
+ break;
+ case lang_fill_statement_enum:
case lang_object_symbols_statement_enum:
case lang_reloc_statement_enum:
case lang_padding_statement_enum:
case lang_input_statement_enum:
- if (output_section_statement != NULL
- && output_section_statement->bfd_section == NULL)
- init_os (output_section_statement);
+ if (os != NULL && os->bfd_section == NULL)
+ init_os (os, NULL, 0);
break;
case lang_assignment_statement_enum:
- if (output_section_statement != NULL
- && output_section_statement->bfd_section == NULL)
- init_os (output_section_statement);
+ if (os != NULL && os->bfd_section == NULL)
+ init_os (os, NULL, 0);
/* Make sure that any sections mentioned in the assignment
are initialized. */
@@ -2123,16 +3293,27 @@ map_input_to_output_sections
FAIL ();
break;
case lang_address_statement_enum:
- /* Mark the specified section with the supplied address. */
- {
- lang_output_section_statement_type *os =
- lang_output_section_statement_lookup
- (s->address_statement.section_name);
+ /* Mark the specified section with the supplied address.
+
+ If this section was actually a segment marker, then the
+ directive is ignored if the linker script explicitly
+ processed the segment marker. Originally, the linker
+ treated segment directives (like -Ttext on the
+ command-line) as section directives. We honor the
+ section directive semantics for backwards compatibilty;
+ linker scripts that do not specifically check for
+ SEGMENT_START automatically get the old semantics. */
+ if (!s->address_statement.segment
+ || !s->address_statement.segment->used)
+ {
+ lang_output_section_statement_type *aos
+ = (lang_output_section_statement_lookup
+ (s->address_statement.section_name));
- if (os->bfd_section == NULL)
- init_os (os);
- os->addr_tree = s->address_statement.address;
- }
+ if (aos->bfd_section == NULL)
+ init_os (aos, NULL, 0);
+ aos->addr_tree = s->address_statement.address;
+ }
break;
}
}
@@ -2142,35 +3323,75 @@ map_input_to_output_sections
added. For example, ldemul_before_allocation can remove dynamic
sections if they turn out to be not needed. Clean them up here. */
-static void
+void
strip_excluded_output_sections (void)
{
- lang_statement_union_type *u;
+ lang_output_section_statement_type *os;
- for (u = lang_output_section_statement.head;
- u != NULL;
- u = u->output_section_statement.next)
+ /* Run lang_size_sections (if not already done). */
+ if (expld.phase != lang_mark_phase_enum)
{
- lang_output_section_statement_type *os;
- asection *s;
+ expld.phase = lang_mark_phase_enum;
+ expld.dataseg.phase = exp_dataseg_none;
+ one_lang_size_sections_pass (NULL, FALSE);
+ lang_reset_memory_regions ();
+ }
- os = &u->output_section_statement;
- s = os->bfd_section;
- if (s != NULL && (s->flags & SEC_EXCLUDE) != 0)
- {
- asection **p;
+ for (os = &lang_output_section_statement.head->output_section_statement;
+ os != NULL;
+ os = os->next)
+ {
+ asection *output_section;
+ bfd_boolean exclude;
- os->bfd_section = NULL;
+ if (os->constraint == -1)
+ continue;
+
+ output_section = os->bfd_section;
+ if (output_section == NULL)
+ continue;
- for (p = &output_bfd->sections; *p; p = &(*p)->next)
- if (*p == s)
+ exclude = (output_section->rawsize == 0
+ && (output_section->flags & SEC_KEEP) == 0
+ && !bfd_section_removed_from_list (output_bfd,
+ output_section));
+
+ /* Some sections have not yet been sized, notably .gnu.version,
+ .dynsym, .dynstr and .hash. These all have SEC_LINKER_CREATED
+ input sections, so don't drop output sections that have such
+ input sections unless they are also marked SEC_EXCLUDE. */
+ if (exclude && output_section->map_head.s != NULL)
+ {
+ asection *s;
+
+ for (s = output_section->map_head.s; s != NULL; s = s->map_head.s)
+ if ((s->flags & SEC_LINKER_CREATED) != 0
+ && (s->flags & SEC_EXCLUDE) == 0)
{
- bfd_section_list_remove (output_bfd, p);
- output_bfd->section_count--;
+ exclude = FALSE;
break;
}
}
+
+ /* TODO: Don't just junk map_head.s, turn them into link_orders. */
+ output_section->map_head.link_order = NULL;
+ output_section->map_tail.link_order = NULL;
+
+ if (exclude)
+ {
+ /* We don't set bfd_section to NULL since bfd_section of the
+ removed output section statement may still be used. */
+ if (!os->section_relative_symbol)
+ os->ignored = TRUE;
+ output_section->flags |= SEC_EXCLUDE;
+ bfd_section_list_remove (output_bfd, output_section);
+ output_bfd->section_count--;
+ }
}
+
+ /* Stop future calls to lang_add_section from messing with map_head
+ and map_tail link_order fields. */
+ stripped_excluded_sections = TRUE;
}
static void
@@ -2200,16 +3421,10 @@ print_output_section_statement
++len;
}
- minfo ("0x%V %W", section->vma, section->_raw_size);
+ minfo ("0x%V %W", section->vma, section->size);
- if (output_section_statement->load_base != NULL)
- {
- bfd_vma addr;
-
- addr = exp_get_abs_int (output_section_statement->load_base, 0,
- "load base", lang_final_phase_enum);
- minfo (_(" load address 0x%V"), addr);
- }
+ if (section->vma != section->lma)
+ minfo (_(" load address 0x%V"), section->lma);
}
print_nl ();
@@ -2219,29 +3434,117 @@ print_output_section_statement
output_section_statement);
}
+/* Scan for the use of the destination in the right hand side
+ of an expression. In such cases we will not compute the
+ correct expression, since the value of DST that is used on
+ the right hand side will be its final value, not its value
+ just before this expression is evaluated. */
+
+static bfd_boolean
+scan_for_self_assignment (const char * dst, etree_type * rhs)
+{
+ if (rhs == NULL || dst == NULL)
+ return FALSE;
+
+ switch (rhs->type.node_class)
+ {
+ case etree_binary:
+ return scan_for_self_assignment (dst, rhs->binary.lhs)
+ || scan_for_self_assignment (dst, rhs->binary.rhs);
+
+ case etree_trinary:
+ return scan_for_self_assignment (dst, rhs->trinary.lhs)
+ || scan_for_self_assignment (dst, rhs->trinary.rhs);
+
+ case etree_assign:
+ case etree_provided:
+ case etree_provide:
+ if (strcmp (dst, rhs->assign.dst) == 0)
+ return TRUE;
+ return scan_for_self_assignment (dst, rhs->assign.src);
+
+ case etree_unary:
+ return scan_for_self_assignment (dst, rhs->unary.child);
+
+ case etree_value:
+ if (rhs->value.str)
+ return strcmp (dst, rhs->value.str) == 0;
+ return FALSE;
+
+ case etree_name:
+ if (rhs->name.name)
+ return strcmp (dst, rhs->name.name) == 0;
+ return FALSE;
+
+ default:
+ break;
+ }
+
+ return FALSE;
+}
+
+
static void
print_assignment (lang_assignment_statement_type *assignment,
lang_output_section_statement_type *output_section)
{
- int i;
- etree_value_type result;
+ unsigned int i;
+ bfd_boolean is_dot;
+ bfd_boolean computation_is_valid = TRUE;
+ etree_type *tree;
for (i = 0; i < SECTION_NAME_MAP_LENGTH; i++)
print_space ();
- result = exp_fold_tree (assignment->exp->assign.src, output_section,
- lang_final_phase_enum, print_dot, &print_dot);
- if (result.valid_p)
+ if (assignment->exp->type.node_class == etree_assert)
+ {
+ is_dot = FALSE;
+ tree = assignment->exp->assert_s.child;
+ computation_is_valid = TRUE;
+ }
+ else
+ {
+ const char *dst = assignment->exp->assign.dst;
+
+ is_dot = (dst[0] == '.' && dst[1] == 0);
+ tree = assignment->exp->assign.src;
+ computation_is_valid = is_dot || (scan_for_self_assignment (dst, tree) == FALSE);
+ }
+
+ exp_fold_tree (tree, output_section->bfd_section, &print_dot);
+ if (expld.result.valid_p)
{
- const char *dst;
bfd_vma value;
- value = result.value + result.section->bfd_section->vma;
- dst = assignment->exp->assign.dst;
+ if (computation_is_valid)
+ {
+ value = expld.result.value;
+
+ if (expld.result.section)
+ value += expld.result.section->vma;
+
+ minfo ("0x%V", value);
+ if (is_dot)
+ print_dot = value;
+ }
+ else
+ {
+ struct bfd_link_hash_entry *h;
+
+ h = bfd_link_hash_lookup (link_info.hash, assignment->exp->assign.dst,
+ FALSE, FALSE, TRUE);
+ if (h)
+ {
+ value = h->u.def.value;
- minfo ("0x%V", value);
- if (dst[0] == '.' && dst[1] == 0)
- print_dot = value;
+ if (expld.result.section)
+ value += expld.result.section->vma;
+
+ minfo ("[0x%V]", value);
+ }
+ else
+ minfo ("[unresolved]");
+ }
}
else
{
@@ -2252,9 +3555,7 @@ print_assignment (lang_assignment_statement_type *assignment,
}
minfo (" ");
-
exp_print_tree (assignment->exp);
-
print_nl ();
}
@@ -2268,7 +3569,7 @@ print_input_statement (lang_input_statement_type *statm)
}
/* Print all symbols defined in a particular section. This is called
- via bfd_link_hash_traverse. */
+ via bfd_link_hash_traverse, or by print_all_symbols. */
static bfd_boolean
print_one_symbol (struct bfd_link_hash_entry *hash_entry, void *ptr)
@@ -2294,63 +3595,81 @@ print_one_symbol (struct bfd_link_hash_entry *hash_entry, void *ptr)
return TRUE;
}
+static void
+print_all_symbols (asection *sec)
+{
+ struct fat_user_section_struct *ud = get_userdata (sec);
+ struct map_symbol_def *def;
+
+ if (!ud)
+ return;
+
+ *ud->map_symbol_def_tail = 0;
+ for (def = ud->map_symbol_def_head; def; def = def->next)
+ print_one_symbol (def->entry, sec);
+}
+
/* Print information about an input section to the map file. */
static void
-print_input_section (lang_input_section_type *in)
+print_input_section (asection *i)
{
- asection *i = in->section;
- bfd_size_type size = i->_cooked_size != 0 ? i->_cooked_size : i->_raw_size;
+ bfd_size_type size = i->size;
+ int len;
+ bfd_vma addr;
init_opb ();
- if (size != 0)
- {
- print_space ();
- minfo ("%s", i->name);
+ print_space ();
+ minfo ("%s", i->name);
- if (i->output_section != NULL)
- {
- int len;
+ len = 1 + strlen (i->name);
+ if (len >= SECTION_NAME_MAP_LENGTH - 1)
+ {
+ print_nl ();
+ len = 0;
+ }
+ while (len < SECTION_NAME_MAP_LENGTH)
+ {
+ print_space ();
+ ++len;
+ }
- len = 1 + strlen (i->name);
- if (len >= SECTION_NAME_MAP_LENGTH - 1)
- {
- print_nl ();
- len = 0;
- }
- while (len < SECTION_NAME_MAP_LENGTH)
- {
- print_space ();
- ++len;
- }
+ if (i->output_section != NULL && i->output_section->owner == output_bfd)
+ addr = i->output_section->vma + i->output_offset;
+ else
+ {
+ addr = print_dot;
+ size = 0;
+ }
- minfo ("0x%V %W %B\n",
- i->output_section->vma + i->output_offset, TO_ADDR (size),
- i->owner);
+ minfo ("0x%V %W %B\n", addr, TO_ADDR (size), i->owner);
- if (i->_cooked_size != 0 && i->_cooked_size != i->_raw_size)
- {
- len = SECTION_NAME_MAP_LENGTH + 3;
+ if (size != i->rawsize && i->rawsize != 0)
+ {
+ len = SECTION_NAME_MAP_LENGTH + 3;
#ifdef BFD64
- len += 16;
+ len += 16;
#else
- len += 8;
+ len += 8;
#endif
- while (len > 0)
- {
- print_space ();
- --len;
- }
+ while (len > 0)
+ {
+ print_space ();
+ --len;
+ }
- minfo (_("%W (size before relaxing)\n"), i->_raw_size);
- }
+ minfo (_("%W (size before relaxing)\n"), i->rawsize);
+ }
- bfd_link_hash_traverse (link_info.hash, print_one_symbol, i);
+ if (i->output_section != NULL && i->output_section->owner == output_bfd)
+ {
+ if (link_info.reduce_memory_overheads)
+ bfd_link_hash_traverse (link_info.hash, print_one_symbol, i);
+ else
+ print_all_symbols (i);
- print_dot = (i->output_section->vma + i->output_offset
- + TO_ADDR (size));
- }
+ print_dot = addr + TO_ADDR (size);
}
}
@@ -2377,7 +3696,7 @@ print_data_statement (lang_data_statement_type *data)
for (i = 0; i < SECTION_NAME_MAP_LENGTH; i++)
print_space ();
- addr = data->output_vma;
+ addr = data->output_offset;
if (data->output_section != NULL)
addr += data->output_section->vma;
@@ -2444,7 +3763,7 @@ print_reloc_statement (lang_reloc_statement_type *reloc)
for (i = 0; i < SECTION_NAME_MAP_LENGTH; i++)
print_space ();
- addr = reloc->output_vma;
+ addr = reloc->output_offset;
if (reloc->output_section != NULL)
addr += reloc->output_section->vma;
@@ -2483,7 +3802,7 @@ print_padding_statement (lang_padding_statement_type *s)
addr = s->output_offset;
if (s->output_section != NULL)
addr += s->output_section->vma;
- minfo ("0x%V %W ", addr, s->size);
+ minfo ("0x%V %W ", addr, (bfd_vma) s->size);
if (s->fill->size != 0)
{
@@ -2611,7 +3930,7 @@ print_statement (lang_statement_union_type *s,
print_reloc_statement (&s->reloc_statement);
break;
case lang_input_section_enum:
- print_input_section (&s->input_section);
+ print_input_section (s->input_section.section);
break;
case lang_padding_statement_enum:
print_padding_statement (&s->padding_statement);
@@ -2683,16 +4002,22 @@ insert_pad (lang_statement_union_type **ptr,
bfd_vma dot)
{
static fill_type zero_fill = { 1, { 0 } };
- lang_statement_union_type *pad;
+ lang_statement_union_type *pad = NULL;
- pad = ((lang_statement_union_type *)
- ((char *) ptr - offsetof (lang_statement_union_type, header.next)));
- if (ptr != &statement_list.head
+ if (ptr != &statement_list.head)
+ pad = ((lang_statement_union_type *)
+ ((char *) ptr - offsetof (lang_statement_union_type, header.next)));
+ if (pad != NULL
&& pad->header.type == lang_padding_statement_enum
&& pad->padding_statement.output_section == output_section)
{
- /* Use the existing pad statement. The above test on output
- section is probably redundant, but it doesn't hurt to check. */
+ /* Use the existing pad statement. */
+ }
+ else if ((pad = *ptr) != NULL
+ && pad->header.type == lang_padding_statement_enum
+ && pad->padding_statement.output_section == output_section)
+ {
+ /* Use the existing pad statement. */
}
else
{
@@ -2708,21 +4033,23 @@ insert_pad (lang_statement_union_type **ptr,
}
pad->padding_statement.output_offset = dot - output_section->vma;
pad->padding_statement.size = alignment_needed;
- output_section->_raw_size += alignment_needed;
+ output_section->size += alignment_needed;
}
/* Work out how much this section will move the dot point. */
static bfd_vma
-size_input_section (lang_statement_union_type **this_ptr,
- lang_output_section_statement_type *output_section_statement,
- fill_type *fill,
- bfd_vma dot)
+size_input_section
+ (lang_statement_union_type **this_ptr,
+ lang_output_section_statement_type *output_section_statement,
+ fill_type *fill,
+ bfd_vma dot)
{
lang_input_section_type *is = &((*this_ptr)->input_section);
asection *i = is->section;
- if (!is->ifile->just_syms_flag)
+ if (!((lang_input_statement_type *) i->owner->usrdata)->just_syms_flag
+ && (i->flags & SEC_EXCLUDE) == 0)
{
unsigned int alignment_needed;
asection *o;
@@ -2752,11 +4079,8 @@ size_input_section (lang_statement_union_type **this_ptr,
i->output_offset = dot - o->vma;
/* Mark how big the output section must be to contain this now. */
- if (i->_cooked_size != 0)
- dot += TO_ADDR (i->_cooked_size);
- else
- dot += TO_ADDR (i->_raw_size);
- o->_raw_size = TO_SIZE (dot - o->vma);
+ dot += TO_ADDR (i->size);
+ o->size = TO_SIZE (dot - o->vma);
}
else
{
@@ -2766,67 +4090,91 @@ size_input_section (lang_statement_union_type **this_ptr,
return dot;
}
-#define IGNORE_SECTION(bfd, s) \
- (((bfd_get_section_flags (bfd, s) & SEC_THREAD_LOCAL) \
- ? ((bfd_get_section_flags (bfd, s) & (SEC_LOAD | SEC_NEVER_LOAD)) \
- != SEC_LOAD) \
- : ((bfd_get_section_flags (bfd, s) & (SEC_ALLOC | SEC_NEVER_LOAD)) \
- != SEC_ALLOC)) \
- || bfd_section_size (bfd, s) == 0)
+static int
+sort_sections_by_lma (const void *arg1, const void *arg2)
+{
+ const asection *sec1 = *(const asection **) arg1;
+ const asection *sec2 = *(const asection **) arg2;
+
+ if (bfd_section_lma (sec1->owner, sec1)
+ < bfd_section_lma (sec2->owner, sec2))
+ return -1;
+ else if (bfd_section_lma (sec1->owner, sec1)
+ > bfd_section_lma (sec2->owner, sec2))
+ return 1;
+
+ return 0;
+}
+
+#define IGNORE_SECTION(s) \
+ ((s->flags & SEC_NEVER_LOAD) != 0 \
+ || (s->flags & SEC_ALLOC) == 0 \
+ || ((s->flags & SEC_THREAD_LOCAL) != 0 \
+ && (s->flags & SEC_LOAD) == 0))
/* Check to see if any allocated sections overlap with other allocated
- sections. This can happen when the linker script specifically specifies
- the output section addresses of the two sections. */
+ sections. This can happen if a linker script specifies the output
+ section addresses of the two sections. */
static void
lang_check_section_addresses (void)
{
- asection *s;
+ asection *s, *os;
+ asection **sections, **spp;
+ unsigned int count;
+ bfd_vma s_start;
+ bfd_vma s_end;
+ bfd_vma os_start;
+ bfd_vma os_end;
+ bfd_size_type amt;
+
+ if (bfd_count_sections (output_bfd) <= 1)
+ return;
+
+ amt = bfd_count_sections (output_bfd) * sizeof (asection *);
+ sections = xmalloc (amt);
/* Scan all sections in the output list. */
+ count = 0;
for (s = output_bfd->sections; s != NULL; s = s->next)
{
- asection *os;
-
- /* Ignore sections which are not loaded or which have no contents. */
- if (IGNORE_SECTION (output_bfd, s))
+ /* Only consider loadable sections with real contents. */
+ if (IGNORE_SECTION (s) || s->size == 0)
continue;
- /* Once we reach section 's' stop our seach. This prevents two
- warning messages from being produced, one for 'section A overlaps
- section B' and one for 'section B overlaps section A'. */
- for (os = output_bfd->sections; os != s; os = os->next)
- {
- bfd_vma s_start;
- bfd_vma s_end;
- bfd_vma os_start;
- bfd_vma os_end;
-
- /* Only consider loadable sections with real contents. */
- if (IGNORE_SECTION (output_bfd, os))
- continue;
-
- /* We must check the sections' LMA addresses not their
- VMA addresses because overlay sections can have
- overlapping VMAs but they must have distinct LMAs. */
- s_start = bfd_section_lma (output_bfd, s);
- os_start = bfd_section_lma (output_bfd, os);
- s_end = s_start + TO_ADDR (bfd_section_size (output_bfd, s)) - 1;
- os_end = os_start + TO_ADDR (bfd_section_size (output_bfd, os)) - 1;
+ sections[count] = s;
+ count++;
+ }
- /* Look for an overlap. */
- if ((s_end < os_start) || (s_start > os_end))
- continue;
+ if (count <= 1)
+ return;
- einfo (
-_("%X%P: section %s [%V -> %V] overlaps section %s [%V -> %V]\n"),
- s->name, s_start, s_end, os->name, os_start, os_end);
+ qsort (sections, (size_t) count, sizeof (asection *),
+ sort_sections_by_lma);
- /* Once we have found one overlap for this section,
- stop looking for others. */
- break;
- }
+ spp = sections;
+ s = *spp++;
+ s_start = bfd_section_lma (output_bfd, s);
+ s_end = s_start + TO_ADDR (s->size) - 1;
+ for (count--; count; count--)
+ {
+ /* We must check the sections' LMA addresses not their VMA
+ addresses because overlay sections can have overlapping VMAs
+ but they must have distinct LMAs. */
+ os = s;
+ os_start = s_start;
+ os_end = s_end;
+ s = *spp++;
+ s_start = bfd_section_lma (output_bfd, s);
+ s_end = s_start + TO_ADDR (s->size) - 1;
+
+ /* Look for an overlap. */
+ if (s_end >= os_start && s_start <= os_end)
+ einfo (_("%X%P: section %s [%V -> %V] overlaps section %s [%V -> %V]\n"),
+ s->name, s_start, s_end, os->name, os_start, os_end);
}
+
+ free (sections);
}
/* Make sure the new address is within the region. We explicitly permit the
@@ -2847,7 +4195,8 @@ os_region_check (lang_output_section_statement_type *os,
{
if (tree != NULL)
{
- einfo (_("%X%P: address 0x%v of %B section %s is not within region %s\n"),
+ einfo (_("%X%P: address 0x%v of %B section %s"
+ " is not within region %s\n"),
region->current,
os->bfd_section->owner,
os->bfd_section->name,
@@ -2884,36 +4233,55 @@ lang_size_sections_1
{
case lang_output_section_statement_enum:
{
- bfd_vma after;
+ bfd_vma newdot, after;
lang_output_section_statement_type *os;
+ lang_memory_region_type *r;
os = &s->output_section_statement;
+ if (os->addr_tree != NULL)
+ {
+ os->processed_vma = FALSE;
+ exp_fold_tree (os->addr_tree, bfd_abs_section_ptr, &dot);
+
+ if (!expld.result.valid_p
+ && expld.phase != lang_mark_phase_enum)
+ einfo (_("%F%S: non constant or forward reference"
+ " address expression for section %s\n"),
+ os->name);
+
+ dot = expld.result.value + expld.result.section->vma;
+ }
+
if (os->bfd_section == NULL)
- /* This section was never actually created. */
+ /* This section was removed or never actually created. */
break;
/* If this is a COFF shared library section, use the size and
address from the input section. FIXME: This is COFF
specific; it would be cleaner if there were some other way
to do this, but nothing simple comes to mind. */
- if ((os->bfd_section->flags & SEC_COFF_SHARED_LIBRARY) != 0)
+ if ((bfd_get_flavour (output_bfd) == bfd_target_ecoff_flavour
+ || bfd_get_flavour (output_bfd) == bfd_target_coff_flavour)
+ && (os->bfd_section->flags & SEC_COFF_SHARED_LIBRARY) != 0)
{
asection *input;
if (os->children.head == NULL
|| os->children.head->header.next != NULL
- || os->children.head->header.type != lang_input_section_enum)
- einfo (_("%P%X: Internal error on COFF shared library section %s\n"),
- os->name);
+ || (os->children.head->header.type
+ != lang_input_section_enum))
+ einfo (_("%P%X: Internal error on COFF shared library"
+ " section %s\n"), os->name);
input = os->children.head->input_section.section;
bfd_set_section_vma (os->bfd_section->owner,
os->bfd_section,
bfd_section_vma (input->owner, input));
- os->bfd_section->_raw_size = input->_raw_size;
+ os->bfd_section->size = input->size;
break;
}
+ newdot = dot;
if (bfd_is_abs_section (os->bfd_section))
{
/* No matter what happens, an abs section starts at zero. */
@@ -2921,15 +4289,17 @@ lang_size_sections_1
}
else
{
+ int align;
+
if (os->addr_tree == NULL)
{
/* No address specified for this section, get one
from the region specification. */
if (os->region == NULL
- || (((bfd_get_section_flags (output_bfd, os->bfd_section)
- & (SEC_ALLOC | SEC_LOAD)) != 0)
+ || ((os->bfd_section->flags & (SEC_ALLOC | SEC_LOAD))
&& os->region->name[0] == '*'
- && strcmp (os->region->name, DEFAULT_MEMORY_REGION) == 0))
+ && strcmp (os->region->name,
+ DEFAULT_MEMORY_REGION) == 0))
{
os->region = lang_memory_default (os->bfd_section);
}
@@ -2937,106 +4307,188 @@ lang_size_sections_1
/* If a loadable section is using the default memory
region, and some non default memory regions were
defined, issue an error message. */
- if (!IGNORE_SECTION (output_bfd, os->bfd_section)
+ if (!os->ignored
+ && !IGNORE_SECTION (os->bfd_section)
&& ! link_info.relocatable
&& check_regions
- && strcmp (os->region->name, DEFAULT_MEMORY_REGION) == 0
+ && strcmp (os->region->name,
+ DEFAULT_MEMORY_REGION) == 0
&& lang_memory_region_list != NULL
&& (strcmp (lang_memory_region_list->name,
DEFAULT_MEMORY_REGION) != 0
- || lang_memory_region_list->next != NULL))
+ || lang_memory_region_list->next != NULL)
+ && expld.phase != lang_mark_phase_enum)
{
/* By default this is an error rather than just a
warning because if we allocate the section to the
default memory region we can end up creating an
excessively large binary, or even seg faulting when
attempting to perform a negative seek. See
- http://sources.redhat.com/ml/binutils/2003-04/msg00423.html
+ sources.redhat.com/ml/binutils/2003-04/msg00423.html
for an example of this. This behaviour can be
overridden by the using the --no-check-sections
switch. */
if (command_line.check_section_addresses)
- einfo (_("%P%F: error: no memory region specified for loadable section `%s'\n"),
+ einfo (_("%P%F: error: no memory region specified"
+ " for loadable section `%s'\n"),
bfd_get_section_name (output_bfd,
os->bfd_section));
else
- einfo (_("%P: warning: no memory region specified for loadable section `%s'\n"),
+ einfo (_("%P: warning: no memory region specified"
+ " for loadable section `%s'\n"),
bfd_get_section_name (output_bfd,
os->bfd_section));
}
- dot = os->region->current;
-
- if (os->section_alignment == -1)
- {
- bfd_vma olddot;
-
- olddot = dot;
- dot = align_power (dot,
- os->bfd_section->alignment_power);
-
- if (dot != olddot && config.warn_section_align)
- einfo (_("%P: warning: changing start of section %s by %u bytes\n"),
- os->name, (unsigned int) (dot - olddot));
- }
+ newdot = os->region->current;
+ align = os->bfd_section->alignment_power;
}
else
- {
- etree_value_type r;
-
- os->processed = -1;
- r = exp_fold_tree (os->addr_tree,
- abs_output_section,
- lang_allocating_phase_enum,
- dot, &dot);
- os->processed = 0;
-
- if (!r.valid_p)
- einfo (_("%F%S: non constant or forward reference address expression for section %s\n"),
- os->name);
+ align = os->section_alignment;
- dot = r.value + r.section->bfd_section->vma;
+ /* Align to what the section needs. */
+ if (align > 0)
+ {
+ bfd_vma savedot = newdot;
+ newdot = align_power (newdot, align);
+
+ if (newdot != savedot
+ && (config.warn_section_align
+ || os->addr_tree != NULL)
+ && expld.phase != lang_mark_phase_enum)
+ einfo (_("%P: warning: changing start of section"
+ " %s by %lu bytes\n"),
+ os->name, (unsigned long) (newdot - savedot));
}
- /* The section starts here.
- First, align to what the section needs. */
-
- if (os->section_alignment != -1)
- dot = align_power (dot, os->section_alignment);
-
- bfd_set_section_vma (0, os->bfd_section, dot);
+ bfd_set_section_vma (0, os->bfd_section, newdot);
os->bfd_section->output_offset = 0;
}
lang_size_sections_1 (os->children.head, os, &os->children.head,
- os->fill, dot, relax, check_regions);
+ os->fill, newdot, relax, check_regions);
- /* Put the section within the requested block size, or
- align at the block boundary. */
- after = ((os->bfd_section->vma
- + TO_ADDR (os->bfd_section->_raw_size)
- + os->block_value - 1)
- & - (bfd_vma) os->block_value);
+ os->processed_vma = TRUE;
- if (bfd_is_abs_section (os->bfd_section))
- ASSERT (after == os->bfd_section->vma);
+ if (bfd_is_abs_section (os->bfd_section) || os->ignored)
+ /* Except for some special linker created sections,
+ no output section should change from zero size
+ after strip_excluded_output_sections. A non-zero
+ size on an ignored section indicates that some
+ input section was not sized early enough. */
+ ASSERT (os->bfd_section->size == 0);
else
- os->bfd_section->_raw_size
- = TO_SIZE (after - os->bfd_section->vma);
+ {
+ dot = os->bfd_section->vma;
+
+ /* Put the section within the requested block size, or
+ align at the block boundary. */
+ after = ((dot
+ + TO_ADDR (os->bfd_section->size)
+ + os->block_value - 1)
+ & - (bfd_vma) os->block_value);
+
+ os->bfd_section->size = TO_SIZE (after - os->bfd_section->vma);
+ }
+
+ /* Set section lma. */
+ r = os->region;
+ if (r == NULL)
+ r = lang_memory_region_lookup (DEFAULT_MEMORY_REGION, FALSE);
+
+ if (os->load_base)
+ {
+ bfd_vma lma = exp_get_abs_int (os->load_base, 0, "load base");
+ os->bfd_section->lma = lma;
+ }
+ else if (os->region != NULL
+ && os->lma_region != NULL
+ && os->lma_region != os->region)
+ {
+ bfd_vma lma = os->lma_region->current;
+
+ if (os->section_alignment != -1)
+ lma = align_power (lma, os->section_alignment);
+ os->bfd_section->lma = lma;
+ }
+ else if (r->last_os != NULL
+ && (os->bfd_section->flags & SEC_ALLOC) != 0)
+ {
+ bfd_vma lma;
+ asection *last;
+
+ last = r->last_os->output_section_statement.bfd_section;
+
+ /* A backwards move of dot should be accompanied by
+ an explicit assignment to the section LMA (ie.
+ os->load_base set) because backwards moves can
+ create overlapping LMAs. */
+ if (dot < last->vma
+ && os->bfd_section->size != 0
+ && dot + os->bfd_section->size <= last->vma)
+ {
+ /* If dot moved backwards then leave lma equal to
+ vma. This is the old default lma, which might
+ just happen to work when the backwards move is
+ sufficiently large. Nag if this changes anything,
+ so people can fix their linker scripts. */
+
+ if (last->vma != last->lma)
+ einfo (_("%P: warning: dot moved backwards before `%s'\n"),
+ os->name);
+ }
+ else
+ {
+ /* If this is an overlay, set the current lma to that
+ at the end of the previous section. */
+ if (os->sectype == overlay_section)
+ lma = last->lma + last->size;
+
+ /* Otherwise, keep the same lma to vma relationship
+ as the previous section. */
+ else
+ lma = dot + last->lma - last->vma;
+
+ if (os->section_alignment != -1)
+ lma = align_power (lma, os->section_alignment);
+ os->bfd_section->lma = lma;
+ }
+ }
+ os->processed_lma = TRUE;
+
+ if (bfd_is_abs_section (os->bfd_section) || os->ignored)
+ break;
+
+ /* Keep track of normal sections using the default
+ lma region. We use this to set the lma for
+ following sections. Overlays or other linker
+ script assignment to lma might mean that the
+ default lma == vma is incorrect.
+ To avoid warnings about dot moving backwards when using
+ -Ttext, don't start tracking sections until we find one
+ of non-zero size or with lma set differently to vma. */
+ if (((os->bfd_section->flags & SEC_HAS_CONTENTS) != 0
+ || (os->bfd_section->flags & SEC_THREAD_LOCAL) == 0)
+ && (os->bfd_section->flags & SEC_ALLOC) != 0
+ && (os->bfd_section->size != 0
+ || (r->last_os == NULL
+ && os->bfd_section->vma != os->bfd_section->lma)
+ || (r->last_os != NULL
+ && dot >= (r->last_os->output_section_statement
+ .bfd_section->vma)))
+ && os->lma_region == NULL
+ && !link_info.relocatable)
+ r->last_os = s;
- dot = os->bfd_section->vma;
/* .tbss sections effectively have zero size. */
if ((os->bfd_section->flags & SEC_HAS_CONTENTS) != 0
|| (os->bfd_section->flags & SEC_THREAD_LOCAL) == 0
|| link_info.relocatable)
- dot += TO_ADDR (os->bfd_section->_raw_size);
-
- os->processed = 1;
+ dot += TO_ADDR (os->bfd_section->size);
if (os->update_dot_tree != 0)
- exp_fold_tree (os->update_dot_tree, abs_output_section,
- lang_allocating_phase_enum, dot, &dot);
+ exp_fold_tree (os->update_dot_tree, bfd_abs_section_ptr, &dot);
/* Update dot in the region ?
We only do this if the section is going to be allocated,
@@ -3047,10 +4499,8 @@ lang_size_sections_1
addresses of sections after it. We have to update
dot. */
if (os->region != NULL
- && ((bfd_get_section_flags (output_bfd, os->bfd_section)
- & SEC_NEVER_LOAD) == 0
- || (bfd_get_section_flags (output_bfd, os->bfd_section)
- & (SEC_ALLOC | SEC_LOAD))))
+ && ((os->bfd_section->flags & SEC_NEVER_LOAD) == 0
+ || (os->bfd_section->flags & (SEC_ALLOC | SEC_LOAD))))
{
os->region->current = dot;
@@ -3059,17 +4509,11 @@ lang_size_sections_1
os_region_check (os, os->region, os->addr_tree,
os->bfd_section->vma);
- /* If there's no load address specified, use the run
- region as the load region. */
- if (os->lma_region == NULL && os->load_base == NULL)
- os->lma_region = os->region;
-
if (os->lma_region != NULL && os->lma_region != os->region)
{
- /* Set load_base, which will be handled later. */
- os->load_base = exp_intop (os->lma_region->current);
- os->lma_region->current +=
- TO_ADDR (os->bfd_section->_raw_size);
+ os->lma_region->current
+ = os->bfd_section->lma + TO_ADDR (os->bfd_section->size);
+
if (check_regions)
os_region_check (os, os->lma_region, NULL,
os->bfd_section->lma);
@@ -3089,15 +4533,14 @@ lang_size_sections_1
{
unsigned int size = 0;
- s->data_statement.output_vma =
+ s->data_statement.output_offset =
dot - output_section_statement->bfd_section->vma;
s->data_statement.output_section =
output_section_statement->bfd_section;
/* We might refer to provided symbols in the expression, and
need to mark them as needed. */
- exp_fold_tree (s->data_statement.exp, abs_output_section,
- lang_allocating_phase_enum, dot, &dot);
+ exp_fold_tree (s->data_statement.exp, bfd_abs_section_ptr, &dot);
switch (s->data_statement.type)
{
@@ -3120,15 +4563,7 @@ lang_size_sections_1
if (size < TO_SIZE ((unsigned) 1))
size = TO_SIZE ((unsigned) 1);
dot += TO_ADDR (size);
- output_section_statement->bfd_section->_raw_size += size;
- /* The output section gets contents, and then we inspect for
- any flags set in the input script which override any ALLOC. */
- output_section_statement->bfd_section->flags |= SEC_HAS_CONTENTS;
- if (!(output_section_statement->flags & SEC_NEVER_LOAD))
- {
- output_section_statement->bfd_section->flags |=
- SEC_ALLOC | SEC_LOAD;
- }
+ output_section_statement->bfd_section->size += size;
}
break;
@@ -3136,43 +4571,38 @@ lang_size_sections_1
{
int size;
- s->reloc_statement.output_vma =
+ s->reloc_statement.output_offset =
dot - output_section_statement->bfd_section->vma;
s->reloc_statement.output_section =
output_section_statement->bfd_section;
size = bfd_get_reloc_size (s->reloc_statement.howto);
dot += TO_ADDR (size);
- output_section_statement->bfd_section->_raw_size += size;
+ output_section_statement->bfd_section->size += size;
}
break;
case lang_wild_statement_enum:
-
dot = lang_size_sections_1 (s->wild_statement.children.head,
output_section_statement,
&s->wild_statement.children.head,
fill, dot, relax, check_regions);
-
break;
case lang_object_symbols_statement_enum:
link_info.create_object_symbols_section =
output_section_statement->bfd_section;
break;
+
case lang_output_statement_enum:
case lang_target_statement_enum:
break;
+
case lang_input_section_enum:
{
asection *i;
i = (*prev)->input_section.section;
- if (! relax)
- {
- if (i->_cooked_size == 0)
- i->_cooked_size = i->_raw_size;
- }
- else
+ if (relax)
{
bfd_boolean again;
@@ -3185,33 +4615,43 @@ lang_size_sections_1
output_section_statement->fill, dot);
}
break;
+
case lang_input_statement_enum:
break;
+
case lang_fill_statement_enum:
s->fill_statement.output_section =
output_section_statement->bfd_section;
fill = s->fill_statement.fill;
break;
+
case lang_assignment_statement_enum:
{
bfd_vma newdot = dot;
+ etree_type *tree = s->assignment_statement.exp;
- exp_fold_tree (s->assignment_statement.exp,
- output_section_statement,
- lang_allocating_phase_enum,
- dot,
+ exp_fold_tree (tree,
+ output_section_statement->bfd_section,
&newdot);
- if (newdot != dot)
+ /* This symbol is relative to this section. */
+ if ((tree->type.node_class == etree_provided
+ || tree->type.node_class == etree_assign)
+ && (tree->assign.dst [0] != '.'
+ || tree->assign.dst [1] != '\0'))
+ output_section_statement->section_relative_symbol = 1;
+
+ if (!output_section_statement->ignored)
{
if (output_section_statement == abs_output_section)
{
/* If we don't have an output section, then just adjust
the default memory address. */
- lang_memory_region_lookup (DEFAULT_MEMORY_REGION, FALSE)->current = newdot;
+ lang_memory_region_lookup (DEFAULT_MEMORY_REGION,
+ FALSE)->current = newdot;
}
- else
+ else if (newdot != dot)
{
/* Insert a pad after this statement. We can't
put the pad before when relaxing, in case the
@@ -3221,14 +4661,15 @@ lang_size_sections_1
/* Don't neuter the pad below when relaxing. */
s = s->header.next;
- }
-
- /* If dot is advanced, this implies that the section should
- have space allocated to it, unless the user has explicitly
- stated that the section should never be loaded. */
- if (!(output_section_statement->flags & (SEC_NEVER_LOAD | SEC_ALLOC)))
- output_section_statement->bfd_section->flags |= SEC_ALLOC;
+ /* If dot is advanced, this implies that the section
+ should have space allocated to it, unless the
+ user has explicitly stated that the section
+ should never be loaded. */
+ if (!(output_section_statement->flags
+ & (SEC_NEVER_LOAD | SEC_ALLOC)))
+ output_section_statement->bfd_section->flags |= SEC_ALLOC;
+ }
dot = newdot;
}
}
@@ -3271,64 +4712,143 @@ lang_size_sections_1
return dot;
}
-bfd_vma
-lang_size_sections
- (lang_statement_union_type *s,
- lang_output_section_statement_type *output_section_statement,
- lang_statement_union_type **prev,
- fill_type *fill,
- bfd_vma dot,
- bfd_boolean *relax,
- bfd_boolean check_regions)
-{
- bfd_vma result;
- asection *o;
+/* Callback routine that is used in _bfd_elf_map_sections_to_segments.
+ The BFD library has set NEW_SEGMENT to TRUE iff it thinks that
+ CURRENT_SECTION and PREVIOUS_SECTION ought to be placed into different
+ segments. We are allowed an opportunity to override this decision. */
+
+bfd_boolean
+ldlang_override_segment_assignment (struct bfd_link_info * info ATTRIBUTE_UNUSED,
+ bfd * abfd ATTRIBUTE_UNUSED,
+ asection * current_section,
+ asection * previous_section,
+ bfd_boolean new_segment)
+{
+ lang_output_section_statement_type * cur;
+ lang_output_section_statement_type * prev;
+
+ /* The checks below are only necessary when the BFD library has decided
+ that the two sections ought to be placed into the same segment. */
+ if (new_segment)
+ return TRUE;
+
+ /* Paranoia checks. */
+ if (current_section == NULL || previous_section == NULL)
+ return new_segment;
+
+ /* Find the memory regions associated with the two sections.
+ We call lang_output_section_find() here rather than scanning the list
+ of output sections looking for a matching section pointer because if
+ we have a large number of sections then a hash lookup is faster. */
+ cur = lang_output_section_find (current_section->name);
+ prev = lang_output_section_find (previous_section->name);
+
+ /* More paranoia. */
+ if (cur == NULL || prev == NULL)
+ return new_segment;
+
+ /* If the regions are different then force the sections to live in
+ different segments. See the email thread starting at the following
+ URL for the reasons why this is necessary:
+ http://sourceware.org/ml/binutils/2007-02/msg00216.html */
+ return cur->region != prev->region;
+}
- /* Callers of exp_fold_tree need to increment this. */
+void
+one_lang_size_sections_pass (bfd_boolean *relax, bfd_boolean check_regions)
+{
lang_statement_iteration++;
+ lang_size_sections_1 (statement_list.head, abs_output_section,
+ &statement_list.head, 0, 0, relax, check_regions);
+}
- exp_data_seg.phase = exp_dataseg_none;
- result = lang_size_sections_1 (s, output_section_statement, prev, fill,
- dot, relax, check_regions);
- if (exp_data_seg.phase == exp_dataseg_end_seen)
+void
+lang_size_sections (bfd_boolean *relax, bfd_boolean check_regions)
+{
+ expld.phase = lang_allocating_phase_enum;
+ expld.dataseg.phase = exp_dataseg_none;
+
+ one_lang_size_sections_pass (relax, check_regions);
+ if (expld.dataseg.phase == exp_dataseg_end_seen
+ && link_info.relro && expld.dataseg.relro_end)
+ {
+ /* If DATA_SEGMENT_ALIGN DATA_SEGMENT_RELRO_END pair was seen, try
+ to put expld.dataseg.relro on a (common) page boundary. */
+ bfd_vma old_min_base, relro_end, maxpage;
+
+ expld.dataseg.phase = exp_dataseg_relro_adjust;
+ old_min_base = expld.dataseg.min_base;
+ maxpage = expld.dataseg.maxpagesize;
+ expld.dataseg.base += (-expld.dataseg.relro_end
+ & (expld.dataseg.pagesize - 1));
+ /* Compute the expected PT_GNU_RELRO segment end. */
+ relro_end = (expld.dataseg.relro_end + expld.dataseg.pagesize - 1)
+ & ~(expld.dataseg.pagesize - 1);
+ if (old_min_base + maxpage < expld.dataseg.base)
+ {
+ expld.dataseg.base -= maxpage;
+ relro_end -= maxpage;
+ }
+ lang_reset_memory_regions ();
+ one_lang_size_sections_pass (relax, check_regions);
+ if (expld.dataseg.relro_end > relro_end)
+ {
+ /* The alignment of sections between DATA_SEGMENT_ALIGN
+ and DATA_SEGMENT_RELRO_END caused huge padding to be
+ inserted at DATA_SEGMENT_RELRO_END. Try some other base. */
+ asection *sec;
+ unsigned int max_alignment_power = 0;
+
+ /* Find maximum alignment power of sections between
+ DATA_SEGMENT_ALIGN and DATA_SEGMENT_RELRO_END. */
+ for (sec = output_bfd->sections; sec; sec = sec->next)
+ if (sec->vma >= expld.dataseg.base
+ && sec->vma < expld.dataseg.relro_end
+ && sec->alignment_power > max_alignment_power)
+ max_alignment_power = sec->alignment_power;
+
+ if (((bfd_vma) 1 << max_alignment_power) < expld.dataseg.pagesize)
+ {
+ if (expld.dataseg.base - (1 << max_alignment_power)
+ < old_min_base)
+ expld.dataseg.base += expld.dataseg.pagesize;
+ expld.dataseg.base -= (1 << max_alignment_power);
+ lang_reset_memory_regions ();
+ one_lang_size_sections_pass (relax, check_regions);
+ }
+ }
+ link_info.relro_start = expld.dataseg.base;
+ link_info.relro_end = expld.dataseg.relro_end;
+ }
+ else if (expld.dataseg.phase == exp_dataseg_end_seen)
{
/* If DATA_SEGMENT_ALIGN DATA_SEGMENT_END pair was seen, check whether
a page could be saved in the data segment. */
bfd_vma first, last;
- first = -exp_data_seg.base & (exp_data_seg.pagesize - 1);
- last = exp_data_seg.end & (exp_data_seg.pagesize - 1);
+ first = -expld.dataseg.base & (expld.dataseg.pagesize - 1);
+ last = expld.dataseg.end & (expld.dataseg.pagesize - 1);
if (first && last
- && ((exp_data_seg.base & ~(exp_data_seg.pagesize - 1))
- != (exp_data_seg.end & ~(exp_data_seg.pagesize - 1)))
- && first + last <= exp_data_seg.pagesize)
+ && ((expld.dataseg.base & ~(expld.dataseg.pagesize - 1))
+ != (expld.dataseg.end & ~(expld.dataseg.pagesize - 1)))
+ && first + last <= expld.dataseg.pagesize)
{
- exp_data_seg.phase = exp_dataseg_adjust;
- lang_statement_iteration++;
- result = lang_size_sections_1 (s, output_section_statement, prev,
- fill, dot, relax, check_regions);
+ expld.dataseg.phase = exp_dataseg_adjust;
+ lang_reset_memory_regions ();
+ one_lang_size_sections_pass (relax, check_regions);
}
}
- /* Some backend relaxers want to refer to the output section size. Give
- them a section size that does not change on the next call while they
- relax. We can't set this at top because lang_reset_memory_regions
- which is called before we get here, sets _raw_size to 0 on relaxing
- rounds. */
- for (o = output_bfd->sections; o != NULL; o = o->next)
- o->_cooked_size = o->_raw_size;
-
- return result;
+ expld.phase = lang_final_phase_enum;
}
/* Worker function for lang_do_assignments. Recursiveness goes here. */
static bfd_vma
-lang_do_assignments_1
- (lang_statement_union_type *s,
- lang_output_section_statement_type *output_section_statement,
- fill_type *fill,
- bfd_vma dot)
+lang_do_assignments_1 (lang_statement_union_type *s,
+ lang_output_section_statement_type *current_os,
+ fill_type *fill,
+ bfd_vma dot)
{
for (; s != NULL; s = s->header.next)
{
@@ -3336,9 +4856,7 @@ lang_do_assignments_1
{
case lang_constructors_statement_enum:
dot = lang_do_assignments_1 (constructor_list.head,
- output_section_statement,
- fill,
- dot);
+ current_os, fill, dot);
break;
case lang_output_section_statement_enum:
@@ -3346,54 +4864,39 @@ lang_do_assignments_1
lang_output_section_statement_type *os;
os = &(s->output_section_statement);
- if (os->bfd_section != NULL)
+ if (os->bfd_section != NULL && !os->ignored)
{
dot = os->bfd_section->vma;
+
lang_do_assignments_1 (os->children.head, os, os->fill, dot);
- dot = (os->bfd_section->vma
- + TO_ADDR (os->bfd_section->_raw_size));
- }
- if (os->load_base)
- {
- /* If nothing has been placed into the output section then
- it won't have a bfd_section. */
- if (os->bfd_section)
- {
- os->bfd_section->lma
- = exp_get_abs_int (os->load_base, 0, "load base",
- lang_final_phase_enum);
- }
+ /* .tbss sections effectively have zero size. */
+ if ((os->bfd_section->flags & SEC_HAS_CONTENTS) != 0
+ || (os->bfd_section->flags & SEC_THREAD_LOCAL) == 0
+ || link_info.relocatable)
+ dot += TO_ADDR (os->bfd_section->size);
}
}
break;
+
case lang_wild_statement_enum:
dot = lang_do_assignments_1 (s->wild_statement.children.head,
- output_section_statement,
- fill, dot);
-
+ current_os, fill, dot);
break;
case lang_object_symbols_statement_enum:
case lang_output_statement_enum:
case lang_target_statement_enum:
-#if 0
- case lang_common_statement_enum:
-#endif
break;
+
case lang_data_statement_enum:
- {
- etree_value_type value;
-
- value = exp_fold_tree (s->data_statement.exp,
- abs_output_section,
- lang_final_phase_enum, dot, &dot);
- if (!value.valid_p)
- einfo (_("%F%P: invalid data statement\n"));
- s->data_statement.value
- = value.value + value.section->bfd_section->vma;
- }
+ exp_fold_tree (s->data_statement.exp, bfd_abs_section_ptr, &dot);
+ if (expld.result.valid_p)
+ s->data_statement.value = (expld.result.value
+ + expld.result.section->vma);
+ else
+ einfo (_("%F%P: invalid data statement\n"));
{
unsigned int size;
switch (s->data_statement.type)
@@ -3421,16 +4924,12 @@ lang_do_assignments_1
break;
case lang_reloc_statement_enum:
- {
- etree_value_type value;
-
- value = exp_fold_tree (s->reloc_statement.addend_exp,
- abs_output_section,
- lang_final_phase_enum, dot, &dot);
- s->reloc_statement.addend_value = value.value;
- if (!value.valid_p)
- einfo (_("%F%P: invalid reloc statement\n"));
- }
+ exp_fold_tree (s->reloc_statement.addend_exp,
+ bfd_abs_section_ptr, &dot);
+ if (expld.result.valid_p)
+ s->reloc_statement.addend_value = expld.result.value;
+ else
+ einfo (_("%F%P: invalid reloc statement\n"));
dot += TO_ADDR (bfd_get_reloc_size (s->reloc_statement.howto));
break;
@@ -3438,59 +4937,49 @@ lang_do_assignments_1
{
asection *in = s->input_section.section;
- if (in->_cooked_size != 0)
- dot += TO_ADDR (in->_cooked_size);
- else
- dot += TO_ADDR (in->_raw_size);
+ if ((in->flags & SEC_EXCLUDE) == 0)
+ dot += TO_ADDR (in->size);
}
break;
case lang_input_statement_enum:
break;
+
case lang_fill_statement_enum:
fill = s->fill_statement.fill;
break;
- case lang_assignment_statement_enum:
- {
- exp_fold_tree (s->assignment_statement.exp,
- output_section_statement,
- lang_final_phase_enum,
- dot,
- &dot);
- }
+ case lang_assignment_statement_enum:
+ exp_fold_tree (s->assignment_statement.exp,
+ current_os->bfd_section,
+ &dot);
break;
+
case lang_padding_statement_enum:
dot += TO_ADDR (s->padding_statement.size);
break;
case lang_group_statement_enum:
dot = lang_do_assignments_1 (s->group_statement.children.head,
- output_section_statement,
- fill, dot);
-
+ current_os, fill, dot);
break;
default:
FAIL ();
break;
+
case lang_address_statement_enum:
break;
}
-
}
return dot;
}
void
-lang_do_assignments (lang_statement_union_type *s,
- lang_output_section_statement_type *output_section_statement,
- fill_type *fill,
- bfd_vma dot)
+lang_do_assignments (void)
{
- /* Callers of exp_fold_tree need to increment this. */
lang_statement_iteration++;
- lang_do_assignments_1 (s, output_section_statement, fill, dot);
+ lang_do_assignments_1 (statement_list.head, abs_output_section, NULL, 0);
}
/* Fix any .startof. or .sizeof. symbols. When the assemblers see the
@@ -3531,10 +5020,7 @@ lang_set_startof (void)
if (h != NULL && h->type == bfd_link_hash_undefined)
{
h->type = bfd_link_hash_defined;
- if (s->_cooked_size != 0)
- h->u.def.value = TO_ADDR (s->_cooked_size);
- else
- h->u.def.value = TO_ADDR (s->_raw_size);
+ h->u.def.value = TO_ADDR (s->size);
h->u.def.section = bfd_abs_section_ptr;
}
@@ -3543,7 +5029,7 @@ lang_set_startof (void)
}
static void
-lang_finish (void)
+lang_end (void)
{
struct bfd_link_hash_entry *h;
bfd_boolean warn;
@@ -3555,9 +5041,9 @@ lang_finish (void)
if (entry_symbol.name == NULL)
{
- /* No entry has been specified. Look for start, but don't warn
- if we don't find it. */
- entry_symbol.name = "start";
+ /* No entry has been specified. Look for the default entry, but
+ don't warn if we don't find it. */
+ entry_symbol.name = entry_symbol_default;
warn = FALSE;
}
@@ -3583,7 +5069,7 @@ lang_finish (void)
const char *send;
/* We couldn't find the entry symbol. Try parsing it as a
- number. */
+ number. */
val = bfd_scan_vma (entry_symbol.name, &send, 0);
if (*send == '\0')
{
@@ -3600,7 +5086,8 @@ lang_finish (void)
if (ts != NULL)
{
if (warn)
- einfo (_("%P: warning: cannot find entry symbol %s; defaulting to %V\n"),
+ einfo (_("%P: warning: cannot find entry symbol %s;"
+ " defaulting to %V\n"),
entry_symbol.name,
bfd_get_section_vma (output_bfd, ts));
if (! bfd_set_start_address (output_bfd,
@@ -3611,13 +5098,15 @@ lang_finish (void)
else
{
if (warn)
- einfo (_("%P: warning: cannot find entry symbol %s; not setting start address\n"),
+ einfo (_("%P: warning: cannot find entry symbol %s;"
+ " not setting start address\n"),
entry_symbol.name);
}
}
}
- bfd_hash_table_free (&lang_definedness_table);
+ /* Don't bfd_hash_table_free (&lang_definedness_table);
+ map file output may result in a call of lang_track_definedness. */
}
/* This is a small function used when we want to ignore errors from
@@ -3643,8 +5132,9 @@ lang_check (void)
for (file = file_chain.head; file != NULL; file = file->input_statement.next)
{
input_bfd = file->input_statement.the_bfd;
- compatible = bfd_arch_get_compatible (input_bfd, output_bfd,
- command_line.accept_unknown_input_arch);
+ compatible
+ = bfd_arch_get_compatible (input_bfd, output_bfd,
+ command_line.accept_unknown_input_arch);
/* In general it is not possible to perform a relocatable
link between differing object formats when the input
@@ -3657,7 +5147,8 @@ lang_check (void)
|| bfd_get_flavour (input_bfd) != bfd_get_flavour (output_bfd))
&& (bfd_get_file_flags (input_bfd) & HAS_RELOC) != 0)
{
- einfo (_("%P%F: Relocatable linking with relocations from format %s (%B) to format %s (%B) is not supported\n"),
+ einfo (_("%P%F: Relocatable linking with relocations from"
+ " format %s (%B) to format %s (%B) is not supported\n"),
bfd_get_target (input_bfd), input_bfd,
bfd_get_target (output_bfd), output_bfd);
/* einfo with %F exits. */
@@ -3666,7 +5157,8 @@ lang_check (void)
if (compatible == NULL)
{
if (command_line.warn_mismatch)
- einfo (_("%P: warning: %s architecture of input file `%B' is incompatible with %s output\n"),
+ einfo (_("%P%X: %s architecture of input file `%B'"
+ " is incompatible with %s output\n"),
bfd_printable_name (input_bfd), input_bfd,
bfd_printable_name (output_bfd));
}
@@ -3678,17 +5170,17 @@ lang_check (void)
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. */
+ 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 (_("%P%X: failed to merge target specific data of file %B\n"),
- input_bfd);
+ einfo (_("%P%X: failed to merge target specific data"
+ " of file %B\n"), input_bfd);
}
if (! command_line.warn_mismatch)
bfd_set_error_handler (pfn);
@@ -3742,8 +5234,8 @@ lang_one_common (struct bfd_link_hash_entry *h, void *info)
section = h->u.c.p->section;
/* Increase the size of the section to align the common sym. */
- section->_cooked_size += ((bfd_vma) 1 << (power_of_two + opb_shift)) - 1;
- section->_cooked_size &= (- (bfd_vma) 1 << (power_of_two + opb_shift));
+ section->size += ((bfd_vma) 1 << (power_of_two + opb_shift)) - 1;
+ section->size &= (- (bfd_vma) 1 << (power_of_two + opb_shift));
/* Adjust the alignment if necessary. */
if (power_of_two > section->alignment_power)
@@ -3752,10 +5244,10 @@ lang_one_common (struct bfd_link_hash_entry *h, void *info)
/* Change the symbol from common to defined. */
h->type = bfd_link_hash_defined;
h->u.def.section = section;
- h->u.def.value = section->_cooked_size;
+ h->u.def.value = section->size;
/* Increase the size of the section. */
- section->_cooked_size += size;
+ section->size += size;
/* Make sure the section is allocated in memory, and make sure that
it is no longer a common section. */
@@ -3776,10 +5268,19 @@ lang_one_common (struct bfd_link_hash_entry *h, void *info)
header_printed = TRUE;
}
- name = demangle (h->root.string);
- minfo ("%s", name);
- len = strlen (name);
- free (name);
+ name = bfd_demangle (output_bfd, h->root.string,
+ DMGL_ANSI | DMGL_PARAMS);
+ if (name == NULL)
+ {
+ minfo ("%s", h->root.string);
+ len = strlen (h->root.string);
+ }
+ else
+ {
+ minfo ("%s", name);
+ len = strlen (name);
+ free (name);
+ }
if (len >= 19)
{
@@ -3828,12 +5329,12 @@ lang_place_orphans (void)
if (s->output_section == NULL)
{
/* This section of the file is not attached, root
- around for a sensible place for it to go. */
+ around for a sensible place for it to go. */
if (file->just_syms_flag)
- {
- abort ();
- }
+ bfd_link_just_syms (file->the_bfd, s, &link_info);
+ else if ((s->flags & SEC_EXCLUDE) != 0)
+ s->output_section = bfd_abs_section_ptr;
else if (strcmp (s->name, "COMMON") == 0)
{
/* This is a lonely common section which must have
@@ -3844,28 +5345,22 @@ lang_place_orphans (void)
{
if (default_common_section == NULL)
{
-#if 0
- /* This message happens when using the
- svr3.ifile linker script, so I have
- disabled it. */
- info_msg (_("%P: no [COMMON] command, defaulting to .bss\n"));
-#endif
default_common_section =
lang_output_section_statement_lookup (".bss");
}
lang_add_section (&default_common_section->children, s,
- default_common_section, file);
+ default_common_section);
}
}
- else if (ldemul_place_orphan (file, s))
+ else if (ldemul_place_orphan (s))
;
else
{
lang_output_section_statement_type *os;
os = lang_output_section_statement_lookup (s->name);
- lang_add_section (&os->children, s, os, file);
+ lang_add_section (&os->children, s, os);
}
}
}
@@ -3941,8 +5436,6 @@ lang_for_each_file (void (*func) (lang_input_statement_type *))
void
ldlang_add_file (lang_input_statement_type *entry)
{
- bfd **pp;
-
lang_statement_append (&file_chain,
(lang_statement_union_type *) entry,
&entry->next);
@@ -3951,9 +5444,9 @@ ldlang_add_file (lang_input_statement_type *entry)
a link. */
ASSERT (entry->the_bfd->link_next == NULL);
ASSERT (entry->the_bfd != output_bfd);
- for (pp = &link_info.input_bfds; *pp != NULL; pp = &(*pp)->link_next)
- ;
- *pp = entry->the_bfd;
+
+ *link_info.input_bfds_tail = entry->the_bfd;
+ link_info.input_bfds_tail = &entry->the_bfd->link_next;
entry->the_bfd->usrdata = entry;
bfd_set_gp_size (entry->the_bfd, g_switch_value);
@@ -4008,19 +5501,15 @@ lang_enter_output_section_statement (const char *output_section_statement_name,
enum section_type sectype,
etree_type *align,
etree_type *subalign,
- etree_type *ebase)
+ etree_type *ebase,
+ int constraint)
{
lang_output_section_statement_type *os;
- current_section =
- os =
- lang_output_section_statement_lookup (output_section_statement_name);
+ os = lang_output_section_statement_lookup_1 (output_section_statement_name,
+ constraint);
+ current_section = os;
- /* Add this statement to tree. */
-#if 0
- add_statement (lang_output_section_statement_enum,
- output_section_statement);
-#endif
/* Make next things chain into subchain of this. */
if (os->addr_tree == NULL)
@@ -4036,9 +5525,9 @@ lang_enter_output_section_statement (const char *output_section_statement_name,
stat_ptr = &os->children;
os->subsection_alignment =
- topower (exp_get_value_int (subalign, -1, "subsection alignment", 0));
+ topower (exp_get_value_int (subalign, -1, "subsection alignment"));
os->section_alignment =
- topower (exp_get_value_int (align, -1, "section alignment", 0));
+ topower (exp_get_value_int (align, -1, "section alignment"));
os->load_base = ebase;
return os;
@@ -4047,9 +5536,9 @@ lang_enter_output_section_statement (const char *output_section_statement_name,
void
lang_final (void)
{
- lang_output_statement_type *new =
- new_stat (lang_output_statement, stat_ptr);
+ lang_output_statement_type *new;
+ new = new_stat (lang_output_statement, stat_ptr);
new->name = output_filename;
}
@@ -4060,19 +5549,31 @@ lang_reset_memory_regions (void)
{
lang_memory_region_type *p = lang_memory_region_list;
asection *o;
+ lang_output_section_statement_type *os;
for (p = lang_memory_region_list; p != NULL; p = p->next)
{
- p->old_length = (bfd_size_type) (p->current - p->origin);
p->current = p->origin;
+ p->last_os = NULL;
+ }
+
+ for (os = &lang_output_section_statement.head->output_section_statement;
+ os != NULL;
+ os = os->next)
+ {
+ os->processed_vma = FALSE;
+ os->processed_lma = FALSE;
}
for (o = output_bfd->sections; o != NULL; o = o->next)
- o->_raw_size = 0;
+ {
+ /* Save the last size for possible use by bfd_relax_section. */
+ o->rawsize = o->size;
+ o->size = 0;
+ }
}
-/* If the wild pattern was marked KEEP, the member sections
- should be as well. */
+/* Worker for lang_gc_sections_1. */
static void
gc_section_callback (lang_wild_statement_type *ptr,
@@ -4081,18 +5582,12 @@ gc_section_callback (lang_wild_statement_type *ptr,
lang_input_statement_type *file ATTRIBUTE_UNUSED,
void *data ATTRIBUTE_UNUSED)
{
+ /* If the wild pattern was marked KEEP, the member sections
+ should be as well. */
if (ptr->keep_sections)
section->flags |= SEC_KEEP;
}
-/* Handle a wild statement, marking it against GC. */
-
-static void
-lang_gc_wild (lang_wild_statement_type *s)
-{
- walk_wild (s, gc_section_callback, NULL);
-}
-
/* Iterate over sections marking them against GC. */
static void
@@ -4103,7 +5598,7 @@ lang_gc_sections_1 (lang_statement_union_type *s)
switch (s->header.type)
{
case lang_wild_statement_enum:
- lang_gc_wild (&s->wild_statement);
+ walk_wild (&s->wild_statement, gc_section_callback, NULL);
break;
case lang_constructors_statement_enum:
lang_gc_sections_1 (constructor_list.head);
@@ -4147,13 +5642,64 @@ lang_gc_sections (void)
}
}
- bfd_gc_sections (output_bfd, &link_info);
+ /* SEC_EXCLUDE is ignored when doing a relocatable link, except in
+ the special case of debug info. (See bfd/stabs.c)
+ Twiddle the flag here, to simplify later linker code. */
+ if (link_info.relocatable)
+ {
+ LANG_FOR_EACH_INPUT_STATEMENT (f)
+ {
+ asection *sec;
+ for (sec = f->the_bfd->sections; sec != NULL; sec = sec->next)
+ if ((sec->flags & SEC_DEBUGGING) == 0)
+ sec->flags &= ~SEC_EXCLUDE;
+ }
+ }
+
+ if (link_info.gc_sections)
+ bfd_gc_sections (output_bfd, &link_info);
+}
+
+/* Relax all sections until bfd_relax_section gives up. */
+
+static void
+relax_sections (void)
+{
+ /* Keep relaxing until bfd_relax_section gives up. */
+ bfd_boolean relax_again;
+
+ link_info.relax_trip = -1;
+ do
+ {
+ relax_again = FALSE;
+ link_info.relax_trip++;
+
+ /* Note: pe-dll.c does something like this also. If you find
+ you need to change this code, you probably need to change
+ pe-dll.c also. DJ */
+
+ /* Do all the assignments with our current guesses as to
+ section sizes. */
+ lang_do_assignments ();
+
+ /* We must do this after lang_do_assignments, because it uses
+ size. */
+ lang_reset_memory_regions ();
+
+ /* Perform another relax pass - this time we know where the
+ globals are, so can make a better guess. */
+ lang_size_sections (&relax_again, FALSE);
+ }
+ while (relax_again);
}
void
lang_process (void)
{
- lang_reasonable_defaults ();
+ /* Finalize dynamic list. */
+ if (link_info.dynamic_list)
+ lang_finalize_version_expr_head (&link_info.dynamic_list->head);
+
current_target = default_target;
/* Open the output file. */
@@ -4165,7 +5711,8 @@ lang_process (void)
/* Add to the hash table all undefineds on the command line. */
lang_place_undefineds ();
- already_linked_table_init ();
+ if (!bfd_section_already_linked_table_init ())
+ einfo (_("%P%F: Failed to create hash table\n"));
/* Create a bfd for each input file. */
current_target = default_target;
@@ -4177,7 +5724,7 @@ lang_process (void)
ldemul_after_open ();
- already_linked_table_free ();
+ bfd_section_already_linked_table_free ();
/* Make sure that we're not mixing architectures. We call this
after all the input files have been opened, but before we do any
@@ -4195,18 +5742,14 @@ lang_process (void)
ldctor_build_sets ();
/* Remove unreferenced sections if asked to. */
- if (command_line.gc_sections)
- lang_gc_sections ();
-
- /* If there were any SEC_MERGE sections, finish their merging, so that
- section sizes can be computed. This has to be done after GC of sections,
- so that GCed sections are not merged, but before assigning output
- sections, since removing whole input sections is hard then. */
- bfd_merge_sections (output_bfd, &link_info);
+ lang_gc_sections ();
/* Size up the common data. */
lang_common ();
+ /* Update wild statements. */
+ update_wild_statements (statement_list.head);
+
/* Run through the contours of the script and attach input sections
to the correct output sections. */
map_input_to_output_sections (statement_list.head, NULL, NULL);
@@ -4216,8 +5759,16 @@ lang_process (void)
if (! link_info.relocatable)
{
+ asection *found;
+
+ /* Merge SEC_MERGE sections. This has to be done after GC of
+ sections, so that GCed sections are not merged, but before
+ assigning dynamic symbols, since removing whole input sections
+ is hard then. */
+ bfd_merge_sections (output_bfd, &link_info);
+
/* Look for a text section and set the readonly attribute in it. */
- asection *found = bfd_get_section_by_name (output_bfd, ".text");
+ found = bfd_get_section_by_name (output_bfd, ".text");
if (found != NULL)
{
@@ -4232,61 +5783,32 @@ lang_process (void)
and other back-ends size dynamic sections. */
ldemul_before_allocation ();
- if (!link_info.relocatable)
- strip_excluded_output_sections ();
-
/* We must record the program headers before we try to fix the
section positions, since they will affect SIZEOF_HEADERS. */
lang_record_phdrs ();
/* Size up the sections. */
- lang_size_sections (statement_list.head, abs_output_section,
- &statement_list.head, 0, 0, NULL,
- command_line.relax ? FALSE : TRUE);
+ lang_size_sections (NULL, !command_line.relax);
/* Now run around and relax if we can. */
if (command_line.relax)
{
- /* Keep relaxing until bfd_relax_section gives up. */
- bfd_boolean relax_again;
-
- do
- {
- relax_again = FALSE;
-
- /* Note: pe-dll.c does something like this also. If you find
- you need to change this code, you probably need to change
- pe-dll.c also. DJ */
-
- /* Do all the assignments with our current guesses as to
- section sizes. */
- lang_do_assignments (statement_list.head, abs_output_section,
- NULL, 0);
+ /* We may need more than one relaxation pass. */
+ int i = link_info.relax_pass;
- /* We must do this after lang_do_assignments, because it uses
- _raw_size. */
- lang_reset_memory_regions ();
-
- /* Perform another relax pass - this time we know where the
- globals are, so can make a better guess. */
- lang_size_sections (statement_list.head, abs_output_section,
- &statement_list.head, 0, 0, &relax_again, FALSE);
+ /* The backend can use it to determine the current pass. */
+ link_info.relax_pass = 0;
- /* If the normal relax is done and the relax finalize pass
- is not performed yet, we perform another relax pass. */
- if (!relax_again && link_info.need_relax_finalize)
- {
- link_info.need_relax_finalize = FALSE;
- relax_again = TRUE;
- }
+ while (i--)
+ {
+ relax_sections ();
+ link_info.relax_pass++;
}
- while (relax_again);
/* Final extra sizing to report errors. */
- lang_do_assignments (statement_list.head, abs_output_section, NULL, 0);
+ lang_do_assignments ();
lang_reset_memory_regions ();
- lang_size_sections (statement_list.head, abs_output_section,
- &statement_list.head, 0, 0, NULL, TRUE);
+ lang_size_sections (NULL, TRUE);
}
/* See if anything special should be done now we know how big
@@ -4299,17 +5821,16 @@ lang_process (void)
/* Do all the assignments, now that we know the final resting places
of all the symbols. */
- lang_do_assignments (statement_list.head, abs_output_section, NULL, 0);
+ lang_do_assignments ();
+
+ ldemul_finish ();
/* Make sure that the section addresses make sense. */
if (! link_info.relocatable
&& command_line.check_section_addresses)
lang_check_section_addresses ();
- /* Final stuffs. */
-
- ldemul_finish ();
- lang_finish ();
+ lang_end ();
}
/* EXPORTED TO YACC */
@@ -4348,21 +5869,24 @@ lang_add_wild (struct wildcard_spec *filespec,
if (filespec != NULL)
{
new->filename = filespec->name;
- new->filenames_sorted = filespec->sorted;
+ new->filenames_sorted = filespec->sorted == by_name;
}
new->section_list = section_list;
new->keep_sections = keep_sections;
lang_list_init (&new->children);
+ analyze_walk_wild_section_handler (new);
}
void
-lang_section_start (const char *name, etree_type *address)
+lang_section_start (const char *name, etree_type *address,
+ const segment_type *segment)
{
lang_address_statement_type *ad;
ad = new_stat (lang_address_statement, stat_ptr);
ad->section_name = name;
ad->address = address;
+ ad->segment = segment;
}
/* Set the start symbol to NAME. CMDLINE is nonzero if this is called
@@ -4382,14 +5906,23 @@ lang_add_entry (const char *name, bfd_boolean cmdline)
}
}
+/* Set the default start symbol to NAME. .em files should use this,
+ not lang_add_entry, to override the use of "start" if neither the
+ linker script nor the command line specifies an entry point. NAME
+ must be permanently allocated. */
+void
+lang_default_entry (const char *name)
+{
+ entry_symbol_default = name;
+}
+
void
lang_add_target (const char *name)
{
- lang_target_statement_type *new = new_stat (lang_target_statement,
- stat_ptr);
+ lang_target_statement_type *new;
+ new = new_stat (lang_target_statement, stat_ptr);
new->target = name;
-
}
void
@@ -4410,22 +5943,20 @@ lang_add_map (const char *name)
void
lang_add_fill (fill_type *fill)
{
- lang_fill_statement_type *new = new_stat (lang_fill_statement,
- stat_ptr);
+ lang_fill_statement_type *new;
+ new = new_stat (lang_fill_statement, stat_ptr);
new->fill = fill;
}
void
lang_add_data (int type, union etree_union *exp)
{
+ lang_data_statement_type *new;
- lang_data_statement_type *new = new_stat (lang_data_statement,
- stat_ptr);
-
+ new = new_stat (lang_data_statement, stat_ptr);
new->exp = exp;
new->type = type;
-
}
/* Create a new reloc statement. RELOC is the BFD relocation type to
@@ -4452,15 +5983,15 @@ lang_add_reloc (bfd_reloc_code_real_type reloc,
p->addend_value = 0;
p->output_section = NULL;
- p->output_vma = 0;
+ p->output_offset = 0;
}
lang_assignment_statement_type *
lang_add_assignment (etree_type *exp)
{
- lang_assignment_statement_type *new = new_stat (lang_assignment_statement,
- stat_ptr);
+ lang_assignment_statement_type *new;
+ new = new_stat (lang_assignment_statement, stat_ptr);
new->exp = exp;
return new;
}
@@ -4468,7 +5999,7 @@ lang_add_assignment (etree_type *exp)
void
lang_add_attribute (enum statement_enum attribute)
{
- new_statement (attribute, sizeof (lang_statement_union_type), stat_ptr);
+ new_statement (attribute, sizeof (lang_statement_header_type), stat_ptr);
}
void
@@ -4476,7 +6007,7 @@ lang_startup (const char *name)
{
if (startup_file != NULL)
{
- einfo (_("%P%Fmultiple STARTUP files\n"));
+ einfo (_("%P%F: multiple STARTUP files\n"));
}
first_file->filename = name;
first_file->local_sym_name = name;
@@ -4513,8 +6044,9 @@ lang_get_regions (lang_memory_region_type **region,
{
*lma_region = lang_memory_region_lookup (lma_memspec, FALSE);
- /* If no runtime region or VMA has been specified, but the load region has
- been specified, then use the load region for the runtime region as well. */
+ /* If no runtime region or VMA has been specified, but the load region
+ has been specified, then use the load region for the runtime region
+ as well. */
if (lma_memspec != NULL
&& ! have_vma
&& strcmp (memspec, DEFAULT_MEMORY_REGION) == 0)
@@ -4598,7 +6130,7 @@ lang_abs_symbol_at_end_of (const char *secname, const char *name)
h->u.def.value = 0;
else
h->u.def.value = (bfd_get_section_vma (output_bfd, sec)
- + TO_ADDR (bfd_section_size (output_bfd, sec)));
+ + TO_ADDR (sec->size));
h->u.def.section = bfd_abs_section_ptr;
}
@@ -4674,8 +6206,7 @@ lang_new_phdr (const char *name,
n = stat_alloc (sizeof (struct lang_phdr));
n->next = NULL;
n->name = name;
- n->type = exp_get_value_int (type, 0, "program header type",
- lang_final_phase_enum);
+ n->type = exp_get_value_int (type, 0, "program header type");
n->filehdr = filehdr;
n->phdrs = phdrs;
n->at = at;
@@ -4696,11 +6227,12 @@ lang_record_phdrs (void)
asection **secs;
lang_output_section_phdr_list *last;
struct lang_phdr *l;
- lang_statement_union_type *u;
+ lang_output_section_statement_type *os;
alc = 10;
secs = xmalloc (alc * sizeof (asection *));
last = NULL;
+
for (l = lang_phdr_list; l != NULL; l = l->next)
{
unsigned int c;
@@ -4708,14 +6240,14 @@ lang_record_phdrs (void)
bfd_vma at;
c = 0;
- for (u = lang_output_section_statement.head;
- u != NULL;
- u = u->output_section_statement.next)
+ for (os = &lang_output_section_statement.head->output_section_statement;
+ os != NULL;
+ os = os->next)
{
- lang_output_section_statement_type *os;
lang_output_section_phdr_list *pl;
- os = &u->output_section_statement;
+ if (os->constraint == -1)
+ continue;
pl = os->phdrs;
if (pl != NULL)
@@ -4726,7 +6258,26 @@ lang_record_phdrs (void)
|| os->bfd_section == NULL
|| (os->bfd_section->flags & SEC_ALLOC) == 0)
continue;
- pl = last;
+
+ if (last)
+ pl = last;
+ else
+ {
+ lang_output_section_statement_type * tmp_os;
+
+ /* If we have not run across a section with a program
+ header assigned to it yet, then scan forwards to find
+ one. This prevents inconsistencies in the linker's
+ behaviour when a script has specified just a single
+ header and there are sections in that script which are
+ not assigned to it, and which occur before the first
+ use of that header. See here for more details:
+ http://sourceware.org/ml/binutils/2007-02/msg00291.html */
+ for (tmp_os = os; tmp_os; tmp_os = tmp_os->next)
+ if (tmp_os->phdrs)
+ break;
+ pl = tmp_os->phdrs;
+ }
}
if (os->bfd_section == NULL)
@@ -4751,14 +6302,12 @@ lang_record_phdrs (void)
if (l->flags == NULL)
flags = 0;
else
- flags = exp_get_vma (l->flags, 0, "phdr flags",
- lang_final_phase_enum);
+ flags = exp_get_vma (l->flags, 0, "phdr flags");
if (l->at == NULL)
at = 0;
else
- at = exp_get_vma (l->at, 0, "phdr load address",
- lang_final_phase_enum);
+ at = exp_get_vma (l->at, 0, "phdr load address");
if (! bfd_record_phdr (output_bfd, l->type,
l->flags != NULL, flags, l->at != NULL,
@@ -4769,21 +6318,22 @@ lang_record_phdrs (void)
free (secs);
/* Make sure all the phdr assignments succeeded. */
- for (u = lang_output_section_statement.head;
- u != NULL;
- u = u->output_section_statement.next)
+ for (os = &lang_output_section_statement.head->output_section_statement;
+ os != NULL;
+ os = os->next)
{
lang_output_section_phdr_list *pl;
- if (u->output_section_statement.bfd_section == NULL)
+ if (os->constraint == -1
+ || os->bfd_section == NULL)
continue;
- for (pl = u->output_section_statement.phdrs;
+ for (pl = os->phdrs;
pl != NULL;
pl = pl->next)
if (! pl->used && strcmp (pl->name, "NONE") != 0)
einfo (_("%X%P: section `%s' assigned to non-existent phdr `%s'\n"),
- u->output_section_statement.name, pl->name);
+ os->name, pl->name);
}
}
@@ -4846,8 +6396,8 @@ lang_enter_overlay_section (const char *name)
struct overlay_list *n;
etree_type *size;
- lang_enter_output_section_statement (name, overlay_vma, normal_section,
- 0, overlay_subalign, 0);
+ lang_enter_output_section_statement (name, overlay_vma, overlay_section,
+ 0, overlay_subalign, 0, 0);
/* If this is the first section, then base the VMA of future
sections on this one. This will work correctly even if `.' is
@@ -4901,15 +6451,17 @@ lang_leave_overlay_section (fill_type *fill,
buf = xmalloc (strlen (clean) + sizeof "__load_start_");
sprintf (buf, "__load_start_%s", clean);
- lang_add_assignment (exp_assop ('=', buf,
- exp_nameop (LOADADDR, name)));
+ lang_add_assignment (exp_provide (buf,
+ exp_nameop (LOADADDR, name),
+ FALSE));
buf = xmalloc (strlen (clean) + sizeof "__load_stop_");
sprintf (buf, "__load_stop_%s", clean);
- lang_add_assignment (exp_assop ('=', buf,
- exp_binop ('+',
- exp_nameop (LOADADDR, name),
- exp_nameop (SIZEOF, name))));
+ lang_add_assignment (exp_provide (buf,
+ exp_binop ('+',
+ exp_nameop (LOADADDR, name),
+ exp_nameop (SIZEOF, name)),
+ FALSE));
free (clean);
}
@@ -4958,12 +6510,10 @@ lang_leave_overlay (etree_type *lma_expr,
The base address is not needed (and should be null) if
an LMA region was specified. */
if (l->next == 0)
- l->os->load_base = lma_expr;
- else if (lma_region == 0)
- l->os->load_base = exp_binop ('+',
- exp_nameop (LOADADDR, l->next->os->name),
- exp_nameop (SIZEOF, l->next->os->name));
-
+ {
+ l->os->load_base = lma_expr;
+ l->os->sectype = normal_section;
+ }
if (phdrs != NULL && l->os->phdrs == NULL)
l->os->phdrs = phdrs;
@@ -5036,8 +6586,8 @@ lang_vers_match (struct bfd_elf_version_expr_head *head,
while (expr && strcmp (expr->symbol, sym) == 0)
if (expr->mask == BFD_ELF_VERSION_C_TYPE)
goto out_ret;
- else
- expr = expr->next;
+ else
+ expr = expr->next;
}
/* Fallthrough */
case BFD_ELF_VERSION_C_TYPE:
@@ -5048,8 +6598,8 @@ lang_vers_match (struct bfd_elf_version_expr_head *head,
while (expr && strcmp (expr->symbol, cxx_sym) == 0)
if (expr->mask == BFD_ELF_VERSION_CXX_TYPE)
goto out_ret;
- else
- expr = expr->next;
+ else
+ expr = expr->next;
}
/* Fallthrough */
case BFD_ELF_VERSION_CXX_TYPE:
@@ -5060,8 +6610,8 @@ lang_vers_match (struct bfd_elf_version_expr_head *head,
while (expr && strcmp (expr->symbol, java_sym) == 0)
if (expr->mask == BFD_ELF_VERSION_JAVA_TYPE)
goto out_ret;
- else
- expr = expr->next;
+ else
+ expr = expr->next;
}
/* Fallthrough */
default:
@@ -5074,10 +6624,13 @@ lang_vers_match (struct bfd_elf_version_expr_head *head,
expr = head->remaining;
else
expr = prev->next;
- while (expr)
+ for (; expr; expr = expr->next)
{
const char *s;
+ if (!expr->pattern)
+ continue;
+
if (expr->pattern[0] == '*' && expr->pattern[1] == '\0')
break;
@@ -5089,7 +6642,6 @@ lang_vers_match (struct bfd_elf_version_expr_head *head,
s = sym;
if (fnmatch (expr->pattern, s, 0) == 0)
break;
- expr = expr->next;
}
out_ret:
@@ -5144,21 +6696,24 @@ realsymbol (const char *pattern)
}
}
-/* This is called for each variable name or match expression. */
+/* This is called for each variable name or match expression. NEW is
+ the name of the symbol to match, or, if LITERAL_P is FALSE, a glob
+ pattern to be matched against symbol names. */
struct bfd_elf_version_expr *
lang_new_vers_pattern (struct bfd_elf_version_expr *orig,
const char *new,
- const char *lang)
+ const char *lang,
+ bfd_boolean literal_p)
{
struct bfd_elf_version_expr *ret;
ret = xmalloc (sizeof *ret);
ret->next = orig;
- ret->pattern = new;
+ ret->pattern = literal_p ? NULL : new;
ret->symver = 0;
ret->script = 0;
- ret->symbol = realsymbol (new);
+ ret->symbol = literal_p ? new : realsymbol (new);
if (lang == NULL || strcasecmp (lang, "C") == 0)
ret->mask = BFD_ELF_VERSION_C_TYPE;
@@ -5310,7 +6865,8 @@ lang_register_vers_node (const char *name,
if ((name[0] == '\0' && lang_elf_version_info != NULL)
|| (lang_elf_version_info && lang_elf_version_info->name[0] == '\0'))
{
- einfo (_("%X%P: anonymous version tag cannot be combined with other version tags\n"));
+ einfo (_("%X%P: anonymous version tag cannot be combined"
+ " with other version tags\n"));
free (version);
return;
}
@@ -5338,16 +6894,17 @@ lang_register_vers_node (const char *name,
while (e2 && strcmp (e1->symbol, e2->symbol) == 0)
{
if (e1->mask == e2->mask)
- einfo (_("%X%P: duplicate expression `%s' in version information\n"),
- e1->symbol);
+ einfo (_("%X%P: duplicate expression `%s'"
+ " in version information\n"), e1->symbol);
e2 = e2->next;
}
}
else if (!e1->symbol)
for (e2 = t->locals.remaining; e2 != NULL; e2 = e2->next)
- if (strcmp (e1->pattern, e2->pattern) == 0 && e1->mask == e2->mask)
- einfo (_("%X%P: duplicate expression `%s' in version information\n"),
- e1->pattern);
+ if (strcmp (e1->pattern, e2->pattern) == 0
+ && e1->mask == e2->mask)
+ einfo (_("%X%P: duplicate expression `%s'"
+ " in version information\n"), e1->pattern);
}
}
@@ -5363,16 +6920,18 @@ lang_register_vers_node (const char *name,
while (e2 && strcmp (e1->symbol, e2->symbol) == 0)
{
if (e1->mask == e2->mask)
- einfo (_("%X%P: duplicate expression `%s' in version information\n"),
+ einfo (_("%X%P: duplicate expression `%s'"
+ " in version information\n"),
e1->symbol);
e2 = e2->next;
}
}
else if (!e1->symbol)
for (e2 = t->globals.remaining; e2 != NULL; e2 = e2->next)
- if (strcmp (e1->pattern, e2->pattern) == 0 && e1->mask == e2->mask)
- einfo (_("%X%P: duplicate expression `%s' in version information\n"),
- e1->pattern);
+ if (strcmp (e1->pattern, e2->pattern) == 0
+ && e1->mask == e2->mask)
+ einfo (_("%X%P: duplicate expression `%s'"
+ " in version information\n"), e1->pattern);
}
}
@@ -5430,7 +6989,7 @@ lang_do_version_exports_section (void)
if (sec == NULL)
continue;
- len = bfd_section_size (is->the_bfd, sec);
+ len = sec->size;
contents = xmalloc (len);
if (!bfd_get_section_contents (is->the_bfd, sec, contents, 0, len))
einfo (_("%X%P: unable to read .exports section contents\n"), sec);
@@ -5438,18 +6997,17 @@ lang_do_version_exports_section (void)
p = contents;
while (p < contents + len)
{
- greg = lang_new_vers_pattern (greg, p, NULL);
+ greg = lang_new_vers_pattern (greg, p, NULL, FALSE);
p = strchr (p, '\0') + 1;
}
/* Do not free the contents, as we used them creating the regex. */
/* Do not include this section in the link. */
- bfd_set_section_flags (is->the_bfd, sec,
- bfd_get_section_flags (is->the_bfd, sec) | SEC_EXCLUDE);
+ sec->flags |= SEC_EXCLUDE | SEC_KEEP;
}
- lreg = lang_new_vers_pattern (NULL, "*", NULL);
+ lreg = lang_new_vers_pattern (NULL, "*", NULL, FALSE);
lang_register_vers_node (command_line.version_exports_section,
lang_new_vers_node (greg, lreg), NULL);
}
@@ -5468,3 +7026,69 @@ lang_add_unique (const char *name)
ent->next = unique_section_list;
unique_section_list = ent;
}
+
+/* Append the list of dynamic symbols to the existing one. */
+
+void
+lang_append_dynamic_list (struct bfd_elf_version_expr *dynamic)
+{
+ if (link_info.dynamic_list)
+ {
+ struct bfd_elf_version_expr *tail;
+ for (tail = dynamic; tail->next != NULL; tail = tail->next)
+ ;
+ tail->next = link_info.dynamic_list->head.list;
+ link_info.dynamic_list->head.list = dynamic;
+ }
+ else
+ {
+ struct bfd_elf_dynamic_list *d;
+
+ d = xcalloc (1, sizeof *d);
+ d->head.list = dynamic;
+ d->match = lang_vers_match;
+ link_info.dynamic_list = d;
+ }
+}
+
+/* Append the list of C++ typeinfo dynamic symbols to the existing
+ one. */
+
+void
+lang_append_dynamic_list_cpp_typeinfo (void)
+{
+ const char * symbols [] =
+ {
+ "typeinfo name for*",
+ "typeinfo for*"
+ };
+ struct bfd_elf_version_expr *dynamic = NULL;
+ unsigned int i;
+
+ for (i = 0; i < ARRAY_SIZE (symbols); i++)
+ dynamic = lang_new_vers_pattern (dynamic, symbols [i], "C++",
+ FALSE);
+
+ lang_append_dynamic_list (dynamic);
+}
+
+/* Append the list of C++ operator new and delete dynamic symbols to the
+ existing one. */
+
+void
+lang_append_dynamic_list_cpp_new (void)
+{
+ const char * symbols [] =
+ {
+ "operator new*",
+ "operator delete*"
+ };
+ struct bfd_elf_version_expr *dynamic = NULL;
+ unsigned int i;
+
+ for (i = 0; i < ARRAY_SIZE (symbols); i++)
+ dynamic = lang_new_vers_pattern (dynamic, symbols [i], "C++",
+ FALSE);
+
+ lang_append_dynamic_list (dynamic);
+}
diff --git a/contrib/binutils/ld/ldlang.h b/contrib/binutils/ld/ldlang.h
index 649fea1..f52f46f 100644
--- a/contrib/binutils/ld/ldlang.h
+++ b/contrib/binutils/ld/ldlang.h
@@ -1,6 +1,6 @@
/* ldlang.h - linker command language support
Copyright 1991, 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999, 2000,
- 2001, 2002, 2003, 2004
+ 2001, 2002, 2003, 2004, 2005, 2006
Free Software Foundation, Inc.
This file is part of GLD, the Gnu Linker.
@@ -17,8 +17,8 @@
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. */
+ Software Foundation, 51 Franklin Street - Fifth Floor, Boston, MA
+ 02110-1301, USA. */
#ifndef LDLANG_H
#define LDLANG_H
@@ -54,7 +54,7 @@ typedef struct memory_region_struct
bfd_vma origin;
bfd_size_type length;
bfd_vma current;
- bfd_size_type old_length;
+ union lang_statement_union *last_os;
flagword flags;
flagword not_flags;
bfd_boolean had_full_message;
@@ -108,11 +108,9 @@ typedef struct lang_output_statement_struct
enum section_type
{
normal_section,
- dsect_section,
- copy_section,
+ overlay_section,
noload_section,
- info_section,
- overlay_section
+ noalloc_section
};
/* This structure holds a list of program headers describing
@@ -128,25 +126,15 @@ typedef struct lang_output_section_phdr_list
typedef struct lang_output_section_statement_struct
{
lang_statement_header_type header;
- union etree_union *addr_tree;
lang_statement_list_type children;
- const char *memspec;
- union lang_statement_union *next;
+ struct lang_output_section_statement_struct *next;
+ struct lang_output_section_statement_struct *prev;
const char *name;
-
- int processed;
-
asection *bfd_section;
- flagword flags; /* Or together of all input sections. */
- enum section_type sectype;
lang_memory_region_type *region;
lang_memory_region_type *lma_region;
- size_t block_value;
fill_type *fill;
-
- int subsection_alignment; /* Alignment of components. */
- int section_alignment; /* Alignment of start of section. */
-
+ union etree_union *addr_tree;
union etree_union *load_base;
/* If non-null, an expression to evaluate after setting the section's
@@ -156,6 +144,20 @@ typedef struct lang_output_section_statement_struct
union etree_union *update_dot_tree;
lang_output_section_phdr_list *phdrs;
+
+ unsigned int block_value;
+ int subsection_alignment; /* Alignment of components. */
+ int section_alignment; /* Alignment of start of section. */
+ int constraint;
+ flagword flags;
+ enum section_type sectype;
+ unsigned int processed_vma : 1;
+ unsigned int processed_lma : 1;
+ unsigned int all_input_readonly : 1;
+ /* If this section should be ignored. */
+ unsigned int ignored : 1;
+ /* If there is a symbol relative to this section. */
+ unsigned int section_relative_symbol : 1;
} lang_output_section_statement_type;
typedef struct
@@ -183,7 +185,7 @@ typedef struct
union etree_union *exp;
bfd_vma value;
asection *output_section;
- bfd_vma output_vma;
+ bfd_vma output_offset;
} lang_data_statement_type;
/* Generate a reloc in the output file. */
@@ -215,8 +217,8 @@ typedef struct
/* Output section where reloc should be performed. */
asection *output_section;
- /* VMA within output section. */
- bfd_vma output_vma;
+ /* Offset within output section. */
+ bfd_vma output_offset;
} lang_reloc_statement_type;
typedef struct lang_input_statement_struct
@@ -231,7 +233,6 @@ typedef struct lang_input_statement_struct
bfd *the_bfd;
- bfd_boolean closed;
file_ptr passive_position;
/* Symbol table of the file. */
@@ -245,47 +246,48 @@ typedef struct lang_input_statement_struct
/* Point to the next file, but skips archive contents. */
union lang_statement_union *next_real_file;
- bfd_boolean is_archive;
+ const char *target;
+
+ unsigned int closed : 1;
+ unsigned int is_archive : 1;
/* 1 means search a set of directories for this file. */
- bfd_boolean search_dirs_flag;
+ unsigned int search_dirs_flag : 1;
/* 1 means this was found in a search directory marked as sysrooted,
if search_dirs_flag is false, otherwise, that it should be
searched in ld_sysroot before any other location, as long as it
starts with a slash. */
- bfd_boolean sysrooted;
+ unsigned int sysrooted : 1;
/* 1 means this is base file of incremental load.
Do not load this file's text or data.
Also default text_start to after this file's bss. */
- bfd_boolean just_syms_flag;
+ unsigned int just_syms_flag : 1;
/* Whether to search for this entry as a dynamic archive. */
- bfd_boolean dynamic;
+ unsigned int dynamic : 1;
+
+ /* Whether DT_NEEDED tags should be added for dynamic libraries in
+ DT_NEEDED tags from this entry. */
+ unsigned int add_needed : 1;
/* Whether this entry should cause a DT_NEEDED tag only when
satisfying references from regular files, or always. */
- bfd_boolean as_needed;
+ unsigned int as_needed : 1;
/* Whether to include the entire contents of an archive. */
- bfd_boolean whole_archive;
+ unsigned int whole_archive : 1;
- bfd_boolean loaded;
+ unsigned int loaded : 1;
-#if 0
- unsigned int globals_in_this_file;
-#endif
- const char *target;
- bfd_boolean real;
+ unsigned int real : 1;
} lang_input_statement_type;
typedef struct
{
lang_statement_header_type header;
asection *section;
- lang_input_statement_type *ifile;
-
} lang_input_section_type;
typedef struct
@@ -295,7 +297,29 @@ typedef struct
union lang_statement_union *file;
} lang_afile_asection_pair_statement_type;
-typedef struct lang_wild_statement_struct
+typedef struct lang_wild_statement_struct lang_wild_statement_type;
+
+typedef void (*callback_t) (lang_wild_statement_type *, struct wildcard_list *,
+ asection *, lang_input_statement_type *, void *);
+
+typedef void (*walk_wild_section_handler_t) (lang_wild_statement_type *,
+ lang_input_statement_type *,
+ callback_t callback,
+ void *data);
+
+typedef bfd_boolean (*lang_match_sec_type_func) (bfd *, const asection *,
+ bfd *, const asection *);
+
+/* Binary search tree structure to efficiently sort sections by
+ name. */
+typedef struct lang_section_bst
+{
+ asection *section;
+ struct lang_section_bst *left;
+ struct lang_section_bst *right;
+} lang_section_bst_type;
+
+struct lang_wild_statement_struct
{
lang_statement_header_type header;
const char *filename;
@@ -303,13 +327,18 @@ typedef struct lang_wild_statement_struct
struct wildcard_list *section_list;
bfd_boolean keep_sections;
lang_statement_list_type children;
-} lang_wild_statement_type;
+
+ walk_wild_section_handler_t walk_wild_section_handler;
+ struct wildcard_list *handler_data[4];
+ lang_section_bst_type *tree;
+};
typedef struct lang_address_statement_struct
{
lang_statement_header_type header;
const char *section_name;
union etree_union *address;
+ const segment_type *segment;
} lang_address_statement_type;
typedef struct
@@ -367,6 +396,8 @@ struct lang_phdr
etree_type *flags;
};
+extern struct lang_phdr *lang_phdr_list;
+
/* This structure is used to hold a list of sections which may not
cross reference each other. */
@@ -404,7 +435,16 @@ struct lang_definedness_hash_entry
int iteration;
};
-extern struct unique_sections *unique_section_list;
+/* Used by place_orphan to keep track of orphan sections and statements. */
+
+struct orphan_save {
+ const char *name;
+ flagword flags;
+ lang_output_section_statement_type *os;
+ asection **section;
+ lang_statement_union_type **stmt;
+ lang_output_section_statement_type **os_tail;
+};
extern lang_output_section_statement_type *abs_output_section;
extern lang_statement_list_type lang_output_section_statement;
@@ -417,11 +457,14 @@ extern struct bfd_sym_chain entry_symbol;
extern const char *entry_section;
extern bfd_boolean entry_from_cmdline;
extern lang_statement_list_type file_chain;
+extern lang_statement_list_type input_file_chain;
extern int lang_statement_iteration;
extern void lang_init
(void);
+extern void lang_finish
+ (void);
extern lang_memory_region_type *lang_memory_region_lookup
(const char *const, bfd_boolean);
extern lang_memory_region_type *lang_memory_region_default
@@ -438,15 +481,17 @@ extern lang_output_section_statement_type *lang_enter_output_section_statement
enum section_type sectype,
etree_type *align,
etree_type *subalign,
- etree_type *);
+ etree_type *, int);
extern void lang_final
(void);
extern void lang_process
(void);
extern void lang_section_start
- (const char *, union etree_union *);
+ (const char *, union etree_union *, const segment_type *);
extern void lang_add_entry
(const char *, bfd_boolean);
+extern void lang_default_entry
+ (const char *);
extern void lang_add_target
(const char *);
extern void lang_add_wild
@@ -480,8 +525,7 @@ extern void lang_for_each_file
extern void lang_reset_memory_regions
(void);
extern void lang_do_assignments
- (lang_statement_union_type *, lang_output_section_statement_type *,
- fill_type *, bfd_vma);
+ (void);
#define LANG_FOR_EACH_INPUT_STATEMENT(statement) \
lang_input_statement_type *statement; \
@@ -495,6 +539,12 @@ extern void ldlang_add_file
(lang_input_statement_type *);
extern lang_output_section_statement_type *lang_output_section_find
(const char * const);
+extern lang_output_section_statement_type *lang_output_section_find_by_flags
+ (const asection *, lang_output_section_statement_type **,
+ lang_match_sec_type_func);
+extern lang_output_section_statement_type *lang_insert_orphan
+ (asection *, const char *, lang_output_section_statement_type *,
+ struct orphan_save *, etree_type *, lang_statement_list_type *);
extern lang_input_statement_type *lang_add_input_file
(const char *, lang_input_file_enum_type, const char *);
extern void lang_add_keepsyms_file
@@ -517,19 +567,21 @@ extern void lang_for_each_statement
(void (*) (lang_statement_union_type *));
extern void *stat_alloc
(size_t);
+extern void strip_excluded_output_sections
+ (void);
extern void dprint_statement
(lang_statement_union_type *, int);
-extern bfd_vma lang_size_sections
- (lang_statement_union_type *, lang_output_section_statement_type *,
- lang_statement_union_type **, fill_type *, bfd_vma, bfd_boolean *,
- bfd_boolean);
+extern void lang_size_sections
+ (bfd_boolean *, bfd_boolean);
+extern void one_lang_size_sections_pass
+ (bfd_boolean *, bfd_boolean);
extern void lang_enter_group
(void);
extern void lang_leave_group
(void);
extern void lang_add_section
(lang_statement_list_type *, asection *,
- lang_output_section_statement_type *, lang_input_statement_type *);
+ lang_output_section_statement_type *);
extern void lang_new_phdr
(const char *, etree_type *, bfd_boolean, bfd_boolean, etree_type *,
etree_type *);
@@ -548,15 +600,18 @@ extern void lang_leave_overlay
extern struct bfd_elf_version_tree *lang_elf_version_info;
extern struct bfd_elf_version_expr *lang_new_vers_pattern
- (struct bfd_elf_version_expr *, const char *, const char *);
+ (struct bfd_elf_version_expr *, const char *, const char *, bfd_boolean);
extern struct bfd_elf_version_tree *lang_new_vers_node
(struct bfd_elf_version_expr *, struct bfd_elf_version_expr *);
extern struct bfd_elf_version_deps *lang_add_vers_depend
(struct bfd_elf_version_deps *, const char *);
extern void lang_register_vers_node
(const char *, struct bfd_elf_version_tree *, struct bfd_elf_version_deps *);
+extern void lang_append_dynamic_list (struct bfd_elf_version_expr *);
+extern void lang_append_dynamic_list_cpp_typeinfo (void);
+extern void lang_append_dynamic_list_cpp_new (void);
bfd_boolean unique_section_p
- (const char *);
+ (const asection *);
extern void lang_add_unique
(const char *);
extern const char *lang_get_output_target
@@ -566,4 +621,12 @@ extern int lang_symbol_definition_iteration (const char *);
extern void lang_update_definedness
(const char *, struct bfd_link_hash_entry *);
+extern void add_excluded_libs (const char *);
+extern bfd_boolean load_symbols
+ (lang_input_statement_type *, lang_statement_list_type *);
+
+extern bfd_boolean
+ldlang_override_segment_assignment
+ (struct bfd_link_info *, bfd *, asection *, asection *, bfd_boolean);
+
#endif
diff --git a/contrib/binutils/ld/ldlex.h b/contrib/binutils/ld/ldlex.h
index f956e9c..f274c68 100644
--- a/contrib/binutils/ld/ldlex.h
+++ b/contrib/binutils/ld/ldlex.h
@@ -16,8 +16,8 @@
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. */
+ Software Foundation, 51 Franklin Street - Fifth Floor, Boston, MA
+ 02110-1301, USA. */
#ifndef LDLEX_H
#define LDLEX_H
@@ -30,6 +30,7 @@ typedef enum input_enum {
input_script,
input_mri_script,
input_version_script,
+ input_dynamic_list,
input_defsym
} input_type;
diff --git a/contrib/binutils/ld/ldlex.l b/contrib/binutils/ld/ldlex.l
index aeac817..b0313d9 100644
--- a/contrib/binutils/ld/ldlex.l
+++ b/contrib/binutils/ld/ldlex.l
@@ -1,40 +1,33 @@
%{
/* Copyright 1991, 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999,
- 2000, 2001, 2002, 2003 Free Software Foundation, Inc.
+ 2000, 2001, 2002, 2003, 2004, 2005, 2007
+ Free Software Foundation, Inc.
-This file is part of GLD, the Gnu Linker.
+ This file is part of GLD, the Gnu Linker.
-GLD 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, or (at your option)
-any later version.
+ GLD 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, or (at your option)
+ any later version.
-GLD 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.
+ GLD 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 GLD; see the file COPYING. If not, write to the Free
-Software Foundation, 59 Temple Place - Suite 330, Boston, MA
-02111-1307, USA. */
+ 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, 51 Franklin Street - Fifth Floor, Boston, MA
+ 02110-1301, USA. */
/*
This was written by steve chamberlain
sac@cygnus.com
*/
-
-#include <stdio.h>
-
-#ifdef MPW
-/* Prevent enum redefinition problems. */
-#define TRUE_FALSE_ALREADY_DEFINED
-#endif /* MPW */
-
-#include "bfd.h"
#include "sysdep.h"
+#include "bfd.h"
#include "safe-ctype.h"
#include "bfdlink.h"
#include "ld.h"
@@ -70,6 +63,8 @@ const char *lex_string = NULL;
#undef YY_INPUT
#define YY_INPUT(buf,result,max_size) yy_input (buf, &result, max_size)
+#define YY_NO_UNPUT
+
#define MAX_INCLUDE_DEPTH 10
static YY_BUFFER_STATE include_stack[MAX_INCLUDE_DEPTH];
static const char *file_name_stack[MAX_INCLUDE_DEPTH];
@@ -135,6 +130,7 @@ V_IDENTIFIER [*?.$_a-zA-Z\[\]\-\!\^\\]([*?.$_a-zA-Z0-9\[\]\-\!\^\\]|::)*
case input_script: return INPUT_SCRIPT; break;
case input_mri_script: return INPUT_MRI_SCRIPT; break;
case input_version_script: return INPUT_VERSION_SCRIPT; break;
+ case input_dynamic_list: return INPUT_DYNAMIC_LIST; break;
case input_defsym: return INPUT_DEFSYM; break;
default: abort ();
}
@@ -239,88 +235,99 @@ V_IDENTIFIER [*?.$_a-zA-Z\[\]\-\!\^\\]([*?.$_a-zA-Z0-9\[\]\-\!\^\\]|::)*
<BOTH,SCRIPT,EXPRESSION,MRI>"/" { RTOKEN('/');}
<BOTH,SCRIPT,EXPRESSION,MRI>"%" { RTOKEN('%');}
<BOTH,SCRIPT,EXPRESSION,MRI>"<" { RTOKEN('<');}
-<BOTH,SCRIPT,EXPRESSION,MRI>"=" { RTOKEN('=');}
-<BOTH,SCRIPT,EXPRESSION,MRI>"}" { RTOKEN('}') ; }
-<BOTH,SCRIPT,EXPRESSION,MRI>"{" { RTOKEN('{'); }
-<BOTH,SCRIPT,EXPRESSION,MRI>")" { RTOKEN(')');}
-<BOTH,SCRIPT,EXPRESSION,MRI>"(" { RTOKEN('(');}
+<BOTH,SCRIPT,EXPRESSION,MRI>"=" { RTOKEN('=');}
+<BOTH,SCRIPT,EXPRESSION,MRI>"}" { RTOKEN('}') ; }
+<BOTH,SCRIPT,EXPRESSION,MRI>"{" { RTOKEN('{'); }
+<BOTH,SCRIPT,EXPRESSION,MRI>")" { RTOKEN(')');}
+<BOTH,SCRIPT,EXPRESSION,MRI>"(" { RTOKEN('(');}
<BOTH,SCRIPT,EXPRESSION,MRI>":" { RTOKEN(':'); }
<BOTH,SCRIPT,EXPRESSION,MRI>";" { RTOKEN(';');}
-<BOTH,SCRIPT>"MEMORY" { RTOKEN(MEMORY);}
-<BOTH,SCRIPT>"ORIGIN" { RTOKEN(ORIGIN);}
-<BOTH,SCRIPT>"VERSION" { RTOKEN(VERSIONK);}
+<BOTH,SCRIPT>"MEMORY" { RTOKEN(MEMORY);}
+<BOTH,SCRIPT,EXPRESSION>"ORIGIN" { RTOKEN(ORIGIN);}
+<BOTH,SCRIPT>"VERSION" { RTOKEN(VERSIONK);}
<EXPRESSION,BOTH,SCRIPT>"BLOCK" { RTOKEN(BLOCK);}
<EXPRESSION,BOTH,SCRIPT>"BIND" { RTOKEN(BIND);}
-<BOTH,SCRIPT>"LENGTH" { RTOKEN(LENGTH);}
-<EXPRESSION,BOTH,SCRIPT>"ALIGN" { RTOKEN(ALIGN_K);}
+<BOTH,SCRIPT,EXPRESSION>"LENGTH" { RTOKEN(LENGTH);}
+<EXPRESSION,BOTH,SCRIPT>"ALIGN" { RTOKEN(ALIGN_K);}
<EXPRESSION,BOTH,SCRIPT>"DATA_SEGMENT_ALIGN" { RTOKEN(DATA_SEGMENT_ALIGN);}
+<EXPRESSION,BOTH,SCRIPT>"DATA_SEGMENT_RELRO_END" { RTOKEN(DATA_SEGMENT_RELRO_END);}
<EXPRESSION,BOTH,SCRIPT>"DATA_SEGMENT_END" { RTOKEN(DATA_SEGMENT_END);}
-<EXPRESSION,BOTH,SCRIPT>"ADDR" { RTOKEN(ADDR);}
-<EXPRESSION,BOTH,SCRIPT>"LOADADDR" { RTOKEN(LOADADDR);}
+<EXPRESSION,BOTH,SCRIPT>"ADDR" { RTOKEN(ADDR);}
+<EXPRESSION,BOTH,SCRIPT>"LOADADDR" { RTOKEN(LOADADDR);}
+<EXPRESSION,BOTH,SCRIPT>"ALIGNOF" { RTOKEN(ALIGNOF); }
<EXPRESSION,BOTH>"MAX" { RTOKEN(MAX_K); }
<EXPRESSION,BOTH>"MIN" { RTOKEN(MIN_K); }
-<EXPRESSION,BOTH>"ASSERT" { RTOKEN(ASSERT_K); }
+<EXPRESSION,BOTH,SCRIPT>"ASSERT" { RTOKEN(ASSERT_K); }
<BOTH,SCRIPT>"ENTRY" { RTOKEN(ENTRY);}
<BOTH,SCRIPT,MRI>"EXTERN" { RTOKEN(EXTERN);}
-<EXPRESSION,BOTH,SCRIPT>"NEXT" { RTOKEN(NEXT);}
+<EXPRESSION,BOTH,SCRIPT>"NEXT" { RTOKEN(NEXT);}
<EXPRESSION,BOTH,SCRIPT>"sizeof_headers" { RTOKEN(SIZEOF_HEADERS);}
<EXPRESSION,BOTH,SCRIPT>"SIZEOF_HEADERS" { RTOKEN(SIZEOF_HEADERS);}
+<EXPRESSION,BOTH,SCRIPT>"SEGMENT_START" { RTOKEN(SEGMENT_START);}
<BOTH,SCRIPT>"MAP" { RTOKEN(MAP);}
-<EXPRESSION,BOTH,SCRIPT>"SIZEOF" { RTOKEN(SIZEOF);}
-<BOTH,SCRIPT>"TARGET" { RTOKEN(TARGET_K);}
+<EXPRESSION,BOTH,SCRIPT>"SIZEOF" { RTOKEN(SIZEOF);}
+<BOTH,SCRIPT>"TARGET" { RTOKEN(TARGET_K);}
<BOTH,SCRIPT>"SEARCH_DIR" { RTOKEN(SEARCH_DIR);}
-<BOTH,SCRIPT>"OUTPUT" { RTOKEN(OUTPUT);}
+<BOTH,SCRIPT>"OUTPUT" { RTOKEN(OUTPUT);}
<BOTH,SCRIPT>"INPUT" { RTOKEN(INPUT);}
<EXPRESSION,BOTH,SCRIPT>"GROUP" { RTOKEN(GROUP);}
-<EXPRESSION,BOTH,SCRIPT>"DEFINED" { RTOKEN(DEFINED);}
+<EXPRESSION,BOTH,SCRIPT>"AS_NEEDED" { RTOKEN(AS_NEEDED);}
+<EXPRESSION,BOTH,SCRIPT>"DEFINED" { RTOKEN(DEFINED);}
<BOTH,SCRIPT>"CREATE_OBJECT_SYMBOLS" { RTOKEN(CREATE_OBJECT_SYMBOLS);}
<BOTH,SCRIPT>"CONSTRUCTORS" { RTOKEN( CONSTRUCTORS);}
-<BOTH,SCRIPT>"FORCE_COMMON_ALLOCATION" { RTOKEN(FORCE_COMMON_ALLOCATION);}
+<BOTH,SCRIPT>"FORCE_COMMON_ALLOCATION" { RTOKEN(FORCE_COMMON_ALLOCATION);}
<BOTH,SCRIPT>"INHIBIT_COMMON_ALLOCATION" { RTOKEN(INHIBIT_COMMON_ALLOCATION);}
-<BOTH,SCRIPT>"SECTIONS" { RTOKEN(SECTIONS);}
+<BOTH,SCRIPT>"SECTIONS" { RTOKEN(SECTIONS);}
<BOTH,SCRIPT>"FILL" { RTOKEN(FILL);}
-<BOTH,SCRIPT>"STARTUP" { RTOKEN(STARTUP);}
+<BOTH,SCRIPT>"STARTUP" { RTOKEN(STARTUP);}
<BOTH,SCRIPT>"OUTPUT_FORMAT" { RTOKEN(OUTPUT_FORMAT);}
<BOTH,SCRIPT>"OUTPUT_ARCH" { RTOKEN( OUTPUT_ARCH);}
<BOTH,SCRIPT>"HLL" { RTOKEN(HLL);}
-<BOTH,SCRIPT>"SYSLIB" { RTOKEN(SYSLIB);}
+<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);}
-<BOTH,SCRIPT>"NOFLOAT" { RTOKEN(NOFLOAT);}
+<BOTH,SCRIPT>"NOFLOAT" { RTOKEN(NOFLOAT);}
<EXPRESSION,BOTH,SCRIPT>"NOCROSSREFS" { RTOKEN(NOCROSSREFS);}
<BOTH,SCRIPT>"OVERLAY" { RTOKEN(OVERLAY); }
-<BOTH,SCRIPT>"SORT" { RTOKEN(SORT); }
+<BOTH,SCRIPT>"SORT_BY_NAME" { RTOKEN(SORT_BY_NAME); }
+<BOTH,SCRIPT>"SORT_BY_ALIGNMENT" { RTOKEN(SORT_BY_ALIGNMENT); }
+<BOTH,SCRIPT>"SORT" { RTOKEN(SORT_BY_NAME); }
<EXPRESSION,BOTH,SCRIPT>"NOLOAD" { RTOKEN(NOLOAD);}
<EXPRESSION,BOTH,SCRIPT>"DSECT" { RTOKEN(DSECT);}
<EXPRESSION,BOTH,SCRIPT>"COPY" { RTOKEN(COPY);}
<EXPRESSION,BOTH,SCRIPT>"INFO" { RTOKEN(INFO);}
<EXPRESSION,BOTH,SCRIPT>"OVERLAY" { RTOKEN(OVERLAY);}
+<EXPRESSION,BOTH,SCRIPT>"ONLY_IF_RO" { RTOKEN(ONLY_IF_RO); }
+<EXPRESSION,BOTH,SCRIPT>"ONLY_IF_RW" { RTOKEN(ONLY_IF_RW); }
+<EXPRESSION,BOTH,SCRIPT>"SPECIAL" { RTOKEN(SPECIAL); }
<BOTH,SCRIPT>"o" { RTOKEN(ORIGIN);}
<BOTH,SCRIPT>"org" { RTOKEN(ORIGIN);}
<BOTH,SCRIPT>"l" { RTOKEN( LENGTH);}
<BOTH,SCRIPT>"len" { RTOKEN( LENGTH);}
<BOTH,SCRIPT>"INCLUDE" { RTOKEN(INCLUDE);}
<BOTH,SCRIPT>"PHDRS" { RTOKEN (PHDRS); }
-<EXPRESSION,BOTH,SCRIPT>"AT" { RTOKEN(AT);}
-<EXPRESSION,BOTH,SCRIPT>"SUBALIGN" { RTOKEN(SUBALIGN);}
-<EXPRESSION,BOTH,SCRIPT>"PROVIDE" { RTOKEN(PROVIDE); }
+<EXPRESSION,BOTH,SCRIPT>"AT" { RTOKEN(AT);}
+<EXPRESSION,BOTH,SCRIPT>"SUBALIGN" { RTOKEN(SUBALIGN);}
+<EXPRESSION,BOTH,SCRIPT>"PROVIDE" { RTOKEN(PROVIDE); }
+<EXPRESSION,BOTH,SCRIPT>"PROVIDE_HIDDEN" { RTOKEN(PROVIDE_HIDDEN); }
<EXPRESSION,BOTH,SCRIPT>"KEEP" { RTOKEN(KEEP); }
-<EXPRESSION,BOTH,SCRIPT>"EXCLUDE_FILE" { RTOKEN(EXCLUDE_FILE); }
+<EXPRESSION,BOTH,SCRIPT>"EXCLUDE_FILE" { RTOKEN(EXCLUDE_FILE); }
+<EXPRESSION,BOTH,SCRIPT>"CONSTANT" { RTOKEN(CONSTANT);}
<MRI>"#".*\n? { ++ lineno; }
<MRI>"\n" { ++ lineno; RTOKEN(NEWLINE); }
<MRI>"*".* { /* Mri comment line */ }
<MRI>";".* { /* Mri comment line */ }
<MRI>"END" { RTOKEN(ENDWORD); }
-<MRI>"ALIGNMOD" { RTOKEN(ALIGNMOD);}
-<MRI>"ALIGN" { RTOKEN(ALIGN_K);}
+<MRI>"ALIGNMOD" { RTOKEN(ALIGNMOD);}
+<MRI>"ALIGN" { RTOKEN(ALIGN_K);}
<MRI>"CHIP" { RTOKEN(CHIP); }
<MRI>"BASE" { RTOKEN(BASE); }
-<MRI>"ALIAS" { RTOKEN(ALIAS); }
-<MRI>"TRUNCATE" { RTOKEN(TRUNCATE); }
+<MRI>"ALIAS" { RTOKEN(ALIAS); }
+<MRI>"TRUNCATE" { RTOKEN(TRUNCATE); }
<MRI>"LOAD" { RTOKEN(LOAD); }
<MRI>"PUBLIC" { RTOKEN(PUBLIC); }
<MRI>"ORDER" { RTOKEN(ORDER); }
@@ -332,12 +339,12 @@ V_IDENTIFIER [*?.$_a-zA-Z\[\]\-\!\^\\]([*?.$_a-zA-Z0-9\[\]\-\!\^\\]|::)*
<MRI>"SECT" { RTOKEN(SECT); }
<EXPRESSION,BOTH,SCRIPT,MRI>"ABSOLUTE" { RTOKEN(ABSOLUTE); }
<MRI>"end" { RTOKEN(ENDWORD); }
-<MRI>"alignmod" { RTOKEN(ALIGNMOD);}
-<MRI>"align" { RTOKEN(ALIGN_K);}
+<MRI>"alignmod" { RTOKEN(ALIGNMOD);}
+<MRI>"align" { RTOKEN(ALIGN_K);}
<MRI>"chip" { RTOKEN(CHIP); }
<MRI>"base" { RTOKEN(BASE); }
-<MRI>"alias" { RTOKEN(ALIAS); }
-<MRI>"truncate" { RTOKEN(TRUNCATE); }
+<MRI>"alias" { RTOKEN(ALIAS); }
+<MRI>"truncate" { RTOKEN(TRUNCATE); }
<MRI>"load" { RTOKEN(LOAD); }
<MRI>"public" { RTOKEN(PUBLIC); }
<MRI>"order" { RTOKEN(ORDER); }
@@ -357,11 +364,19 @@ V_IDENTIFIER [*?.$_a-zA-Z\[\]\-\!\^\\]([*?.$_a-zA-Z0-9\[\]\-\!\^\\]|::)*
}
-<BOTH,EXPRESSION>{FILENAMECHAR1}{FILENAMECHAR}* {
+<BOTH>{FILENAMECHAR1}{FILENAMECHAR}* {
+ yylval.name = xstrdup (yytext);
+ return NAME;
+ }
+<BOTH>"-l"{FILENAMECHAR}+ {
+ yylval.name = xstrdup (yytext + 2);
+ return LNAME;
+ }
+<EXPRESSION>{FILENAMECHAR1}{NOCFILENAMECHAR}* {
yylval.name = xstrdup (yytext);
return NAME;
}
-<BOTH,EXPRESSION>"-l"{FILENAMECHAR}+ {
+<EXPRESSION>"-l"{NOCFILENAMECHAR}+ {
yylval.name = xstrdup (yytext + 2);
return LNAME;
}
diff --git a/contrib/binutils/ld/ldmain.c b/contrib/binutils/ld/ldmain.c
index d0e0b12..354c41a 100644
--- a/contrib/binutils/ld/ldmain.c
+++ b/contrib/binutils/ld/ldmain.c
@@ -1,6 +1,6 @@
/* Main program of GNU linker.
Copyright 1991, 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001,
- 2002, 2003, 2004
+ 2002, 2003, 2004, 2005, 2006, 2007
Free Software Foundation, Inc.
Written by Steve Chamberlain steve@cygnus.com
@@ -18,12 +18,11 @@
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. */
+ Software Foundation, 51 Franklin Street - Fifth Floor, Boston, MA
+ 02110-1301, USA. */
-#include "bfd.h"
#include "sysdep.h"
-#include <stdio.h>
+#include "bfd.h"
#include "safe-ctype.h"
#include "libiberty.h"
#include "progress.h"
@@ -50,7 +49,7 @@
#include <string.h>
#ifdef HAVE_SBRK
-#ifdef NEED_DECLARATION_SBRK
+#if !HAVE_DECL_SBRK
extern void *sbrk ();
#endif
#endif
@@ -68,7 +67,7 @@ const char *output_filename = "a.out";
char *program_name;
/* The prefix for system library directories. */
-char *ld_sysroot;
+const char *ld_sysroot;
/* The canonical representation of ld_sysroot. */
char * ld_canon_sysroot;
@@ -97,6 +96,10 @@ bfd_boolean whole_archive;
actually satisfies some reference in a regular object. */
bfd_boolean as_needed;
+/* Nonzero means never create DT_NEEDED entries for dynamic libraries
+ in DT_NEEDED tags. */
+bfd_boolean add_needed = TRUE;
+
/* TRUE if we should demangle symbol names. */
bfd_boolean demangling;
@@ -104,6 +107,10 @@ args_type command_line;
ld_config_type config;
+sort_type sort_section;
+
+static const char *get_sysroot
+ (int, char **);
static char *get_emulation
(int, char **);
static void set_scripts_dir
@@ -131,8 +138,8 @@ static bfd_boolean undefined_symbol
(struct bfd_link_info *, const char *, bfd *, asection *, bfd_vma,
bfd_boolean);
static bfd_boolean reloc_overflow
- (struct bfd_link_info *, const char *, const char *, bfd_vma,
- bfd *, asection *, bfd_vma);
+ (struct bfd_link_info *, struct bfd_link_hash_entry *, const char *,
+ const char *, bfd_vma, bfd *, asection *, bfd_vma);
static bfd_boolean reloc_dangerous
(struct bfd_link_info *, const char *, bfd *, asection *, bfd_vma);
static bfd_boolean unattached_reloc
@@ -153,7 +160,10 @@ static struct bfd_link_callbacks link_callbacks =
reloc_dangerous,
unattached_reloc,
notice,
- error_handler
+ einfo,
+ info_msg,
+ minfo,
+ ldlang_override_segment_assignment
};
struct bfd_link_info link_info;
@@ -166,7 +176,7 @@ remove_output (void)
if (output_bfd)
bfd_cache_close (output_bfd);
if (delete_output_file_on_failure)
- unlink (output_filename);
+ unlink_if_ordinary (output_filename);
}
}
@@ -190,53 +200,26 @@ main (int argc, char **argv)
START_PROGRESS (program_name, 0);
+ expandargv (&argc, &argv);
+
bfd_init ();
bfd_set_error_program_name (program_name);
xatexit (remove_output);
-#ifdef TARGET_SYSTEM_ROOT_RELOCATABLE
- ld_sysroot = make_relative_prefix (program_name, BINDIR,
- TARGET_SYSTEM_ROOT);
-
- if (ld_sysroot)
- {
- struct stat s;
- int res = stat (ld_sysroot, &s) == 0 && S_ISDIR (s.st_mode);
-
- if (!res)
- {
- free (ld_sysroot);
- ld_sysroot = NULL;
- }
- }
-
- if (! ld_sysroot)
+ /* Set up the sysroot directory. */
+ ld_sysroot = get_sysroot (argc, argv);
+ if (*ld_sysroot)
{
- ld_sysroot = make_relative_prefix (program_name, TOOLBINDIR,
- TARGET_SYSTEM_ROOT);
-
- if (ld_sysroot)
+ if (*TARGET_SYSTEM_ROOT == 0)
{
- struct stat s;
- int res = stat (ld_sysroot, &s) == 0 && S_ISDIR (s.st_mode);
-
- if (!res)
- {
- free (ld_sysroot);
- ld_sysroot = NULL;
- }
+ einfo ("%P%F: this linker was not configured to use sysroots\n");
+ ld_sysroot = "";
}
+ else
+ ld_canon_sysroot = lrealpath (ld_sysroot);
}
-
- if (! ld_sysroot)
-#endif
- ld_sysroot = TARGET_SYSTEM_ROOT;
-
- if (ld_sysroot && *ld_sysroot)
- ld_canon_sysroot = lrealpath (ld_sysroot);
-
if (ld_canon_sysroot)
ld_canon_sysroot_len = strlen (ld_canon_sysroot);
else
@@ -259,21 +242,17 @@ main (int argc, char **argv)
}
#endif
- /* Initialize the data about options. */
- trace_files = trace_file_tries = version_printed = FALSE;
- whole_archive = FALSE;
config.build_constructors = TRUE;
- config.dynamic_link = FALSE;
- config.has_shared = FALSE;
+ config.rpath_separator = ':';
config.split_by_reloc = (unsigned) -1;
config.split_by_file = (bfd_size_type) -1;
- command_line.force_common_definition = FALSE;
- command_line.inhibit_common_definition = FALSE;
- command_line.interpreter = NULL;
- command_line.rpath = NULL;
+ config.make_executable = TRUE;
+ config.magic_demand_paged = TRUE;
+ config.text_read_only = TRUE;
+
command_line.warn_mismatch = TRUE;
+ command_line.warn_search_mismatch = TRUE;
command_line.check_section_addresses = TRUE;
- command_line.accept_unknown_input_arch = FALSE;
/* We initialize DEMANGLING based on the environment variable
COLLECT_NO_DEMANGLE. The gcc collect2 program will demangle the
@@ -282,58 +261,22 @@ main (int argc, char **argv)
interface by default. */
demangling = getenv ("COLLECT_NO_DEMANGLE") == NULL;
- link_info.relocatable = FALSE;
- link_info.emitrelocations = FALSE;
- link_info.task_link = FALSE;
- link_info.shared = FALSE;
- link_info.pie = FALSE;
- link_info.executable = FALSE;
- link_info.symbolic = FALSE;
- link_info.export_dynamic = FALSE;
- link_info.static_link = FALSE;
- link_info.traditional_format = FALSE;
- link_info.optimize = FALSE;
- link_info.unresolved_syms_in_objects = RM_NOT_YET_SET;
- link_info.unresolved_syms_in_shared_libs = RM_NOT_YET_SET;
- link_info.allow_multiple_definition = FALSE;
link_info.allow_undefined_version = TRUE;
link_info.keep_memory = TRUE;
- link_info.notice_all = FALSE;
- link_info.nocopyreloc = FALSE;
- link_info.new_dtags = FALSE;
link_info.combreloc = TRUE;
- link_info.eh_frame_hdr = FALSE;
link_info.strip_discarded = TRUE;
- link_info.strip = strip_none;
- link_info.discard = discard_sec_merge;
- link_info.common_skip_ar_aymbols = bfd_link_common_skip_none;
+ link_info.emit_hash = TRUE;
link_info.callbacks = &link_callbacks;
- link_info.hash = NULL;
- link_info.keep_hash = NULL;
- link_info.notice_hash = NULL;
- link_info.wrap_hash = NULL;
- link_info.input_bfds = NULL;
- link_info.create_object_symbols_section = NULL;
- link_info.gc_sym_list = NULL;
- link_info.base_file = NULL;
+ link_info.input_bfds_tail = &link_info.input_bfds;
/* SVR4 linkers seem to set DT_INIT and DT_FINI based on magic _init
and _fini symbols. We are compatible. */
link_info.init_function = "_init";
link_info.fini_function = "_fini";
+ link_info.relax_pass = 1;
link_info.pei386_auto_import = -1;
- link_info.pei386_runtime_pseudo_reloc = FALSE;
link_info.spare_dynamic_tags = 5;
- link_info.flags = 0;
- link_info.flags_1 = 0;
- link_info.need_relax_finalize = FALSE;
ldfile_add_arch ("");
-
- config.make_executable = TRUE;
- force_make_executable = FALSE;
- config.magic_demand_paged = TRUE;
- config.text_read_only = TRUE;
-
emulation = get_emulation (argc, argv);
ldemul_choose_mode (emulation);
default_target = ldemul_choose_target (argc, argv);
@@ -342,11 +285,14 @@ main (int argc, char **argv)
lang_has_input_file = FALSE;
parse_args (argc, argv);
+ if (config.hash_table_size != 0)
+ bfd_hash_set_default_size (config.hash_table_size);
+
ldemul_set_symbols ();
if (link_info.relocatable)
{
- if (command_line.gc_sections)
+ if (link_info.gc_sections)
einfo ("%P%F: --gc-sections and -r may not be used together\n");
else if (command_line.relax)
einfo (_("%P%F: --relax and -r may not be used together\n"));
@@ -354,6 +300,43 @@ main (int argc, char **argv)
einfo (_("%P%F: -r and -shared may not be used together\n"));
}
+ /* We may have -Bsymbolic, -Bsymbolic-functions, --dynamic-list-data,
+ --dynamic-list-cpp-new, --dynamic-list-cpp-typeinfo and
+ --dynamic-list FILE. -Bsymbolic and -Bsymbolic-functions are
+ for shared libraries. -Bsymbolic overrides all others and vice
+ versa. */
+ switch (command_line.symbolic)
+ {
+ case symbolic_unset:
+ break;
+ case symbolic:
+ /* -Bsymbolic is for shared library only. */
+ if (link_info.shared)
+ {
+ link_info.symbolic = TRUE;
+ /* Should we free the unused memory? */
+ link_info.dynamic_list = NULL;
+ command_line.dynamic_list = dynamic_list_unset;
+ }
+ break;
+ case symbolic_functions:
+ /* -Bsymbolic-functions is for shared library only. */
+ if (link_info.shared)
+ command_line.dynamic_list = dynamic_list_data;
+ break;
+ }
+
+ switch (command_line.dynamic_list)
+ {
+ case dynamic_list_unset:
+ break;
+ case dynamic_list_data:
+ link_info.dynamic_data = TRUE;
+ case dynamic_list:
+ link_info.dynamic = TRUE;
+ break;
+ }
+
if (! link_info.shared)
{
if (command_line.filter_shlib)
@@ -379,6 +362,16 @@ main (int argc, char **argv)
the -L's in argv have been processed. */
set_scripts_dir ();
+ /* If we have not already opened and parsed a linker script,
+ try the default script from command line first. */
+ if (saved_script_handle == NULL
+ && command_line.default_script != NULL)
+ {
+ ldfile_open_command_file (command_line.default_script);
+ parser_input = input_script;
+ yyparse ();
+ }
+
/* If we have not already opened and parsed a linker script
read the emulation's appropriate default script. */
if (saved_script_handle == NULL)
@@ -481,6 +474,8 @@ main (int argc, char **argv)
if (nocrossref_list != NULL)
check_nocrossrefs ();
+ lang_finish ();
+
/* Even if we're producing relocatable output, some non-fatal errors should
be reported in the exit status. (What non-fatal errors, if any, do we
want to ignore for relocatable output?) */
@@ -568,6 +563,51 @@ main (int argc, char **argv)
return 0;
}
+/* If the configured sysroot is relocatable, try relocating it based on
+ default prefix FROM. Return the relocated directory if it exists,
+ otherwise return null. */
+
+static char *
+get_relative_sysroot (const char *from ATTRIBUTE_UNUSED)
+{
+#ifdef TARGET_SYSTEM_ROOT_RELOCATABLE
+ char *path;
+ struct stat s;
+
+ path = make_relative_prefix (program_name, from, TARGET_SYSTEM_ROOT);
+ if (path)
+ {
+ if (stat (path, &s) == 0 && S_ISDIR (s.st_mode))
+ return path;
+ free (path);
+ }
+#endif
+ return 0;
+}
+
+/* Return the sysroot directory. Return "" if no sysroot is being used. */
+
+static const char *
+get_sysroot (int argc, char **argv)
+{
+ int i;
+ const char *path;
+
+ for (i = 1; i < argc; i++)
+ if (CONST_STRNEQ (argv[i], "--sysroot="))
+ return argv[i] + strlen ("--sysroot=");
+
+ path = get_relative_sysroot (BINDIR);
+ if (path)
+ return path;
+
+ path = get_relative_sysroot (TOOLBINDIR);
+ if (path)
+ return path;
+
+ return TARGET_SYSTEM_ROOT;
+}
+
/* We need to find any explicitly given emulation in order to initialize the
state that's needed by the lex&yacc argument parser (parse_args). */
@@ -583,7 +623,7 @@ get_emulation (int argc, char **argv)
for (i = 1; i < argc; i++)
{
- if (!strncmp (argv[i], "-m", 2))
+ if (CONST_STRNEQ (argv[i], "-m"))
{
if (argv[i][2] == '\0')
{
@@ -737,9 +777,10 @@ add_ysym (const char *name)
if (link_info.notice_hash == NULL)
{
link_info.notice_hash = xmalloc (sizeof (struct bfd_hash_table));
- if (! bfd_hash_table_init_n (link_info.notice_hash,
- bfd_hash_newfunc,
- 61))
+ if (!bfd_hash_table_init_n (link_info.notice_hash,
+ bfd_hash_newfunc,
+ sizeof (struct bfd_hash_entry),
+ 61))
einfo (_("%P%F: bfd_hash_table_init failed: %E\n"));
}
@@ -755,9 +796,10 @@ add_wrap (const char *name)
if (link_info.wrap_hash == NULL)
{
link_info.wrap_hash = xmalloc (sizeof (struct bfd_hash_table));
- if (! bfd_hash_table_init_n (link_info.wrap_hash,
- bfd_hash_newfunc,
- 61))
+ if (!bfd_hash_table_init_n (link_info.wrap_hash,
+ bfd_hash_newfunc,
+ sizeof (struct bfd_hash_entry),
+ 61))
einfo (_("%P%F: bfd_hash_table_init failed: %E\n"));
}
@@ -787,7 +829,8 @@ add_keepsyms_file (const char *filename)
}
link_info.keep_hash = xmalloc (sizeof (struct bfd_hash_table));
- if (! bfd_hash_table_init (link_info.keep_hash, bfd_hash_newfunc))
+ if (!bfd_hash_table_init (link_info.keep_hash, bfd_hash_newfunc,
+ sizeof (struct bfd_hash_entry)))
einfo (_("%P%F: bfd_hash_table_init failed: %E\n"));
bufsize = 100;
@@ -835,7 +878,7 @@ add_keepsyms_file (const char *filename)
a link. */
static bfd_boolean
-add_archive_element (struct bfd_link_info *info ATTRIBUTE_UNUSED,
+add_archive_element (struct bfd_link_info *info,
bfd *abfd,
const char *name)
{
@@ -866,7 +909,7 @@ add_archive_element (struct bfd_link_info *info ATTRIBUTE_UNUSED,
bfd *from;
int len;
- h = bfd_link_hash_lookup (link_info.hash, name, FALSE, FALSE, TRUE);
+ h = bfd_link_hash_lookup (info->hash, name, FALSE, FALSE, TRUE);
if (h == NULL)
from = NULL;
@@ -1107,7 +1150,7 @@ constructor_callback (struct bfd_link_info *info,
/* Ensure that BFD_RELOC_CTOR exists now, so that we can give a
useful error message. */
if (bfd_reloc_type_lookup (output_bfd, BFD_RELOC_CTOR) == NULL
- && (link_info.relocatable
+ && (info->relocatable
|| bfd_reloc_type_lookup (abfd, BFD_RELOC_CTOR) == NULL))
einfo (_("%P%F: BFD backend error: BFD_RELOC_CTOR unsupported\n"));
@@ -1163,11 +1206,11 @@ warning_callback (struct bfd_link_info *info ATTRIBUTE_UNUSED,
return TRUE;
if (section != NULL)
- einfo ("%C: %s\n", abfd, section, address, warning);
+ einfo ("%C: %s%s\n", abfd, section, address, _("warning: "), warning);
else if (abfd == NULL)
- einfo ("%P: %s\n", warning);
+ einfo ("%P: %s%s\n", _("warning: "), warning);
else if (symbol == NULL)
- einfo ("%B: %s\n", abfd, warning);
+ einfo ("%B: %s%s\n", abfd, _("warning: "), warning);
else
{
lang_input_statement_type *entry;
@@ -1205,7 +1248,7 @@ warning_callback (struct bfd_link_info *info ATTRIBUTE_UNUSED,
bfd_map_over_sections (abfd, warning_find_reloc, &info);
if (! info.found)
- einfo ("%B: %s\n", abfd, warning);
+ einfo ("%B: %s%s\n", abfd, _("warning: "), warning);
if (entry == NULL)
free (asymbols);
@@ -1253,7 +1296,8 @@ warning_find_reloc (bfd *abfd, asection *sec, void *iarg)
&& strcmp (bfd_asymbol_name (*q->sym_ptr_ptr), info->symbol) == 0)
{
/* We found a reloc for the symbol we are looking for. */
- einfo ("%C: %s\n", abfd, sec, q->address, info->warning);
+ einfo ("%C: %s%s\n", abfd, sec, q->address, _("warning: "),
+ info->warning);
info->found = TRUE;
break;
}
@@ -1285,7 +1329,8 @@ undefined_symbol (struct bfd_link_info *info ATTRIBUTE_UNUSED,
if (hash == NULL)
{
hash = xmalloc (sizeof (struct bfd_hash_table));
- if (! bfd_hash_table_init (hash, bfd_hash_newfunc))
+ if (!bfd_hash_table_init (hash, bfd_hash_newfunc,
+ sizeof (struct bfd_hash_entry)))
einfo (_("%F%P: bfd_hash_table_init failed: %E\n"));
}
@@ -1372,6 +1417,7 @@ int overflow_cutoff_limit = 10;
static bfd_boolean
reloc_overflow (struct bfd_link_info *info ATTRIBUTE_UNUSED,
+ struct bfd_link_hash_entry *entry,
const char *name,
const char *reloc_name,
bfd_vma addend,
@@ -1382,10 +1428,7 @@ reloc_overflow (struct bfd_link_info *info ATTRIBUTE_UNUSED,
if (overflow_cutoff_limit == -1)
return TRUE;
- if (abfd == NULL)
- einfo (_("%P%X: generated"));
- else
- einfo ("%X%C:", abfd, section, address);
+ einfo ("%X%C:", abfd, section, address);
if (overflow_cutoff_limit >= 0
&& overflow_cutoff_limit-- == 0)
@@ -1394,7 +1437,34 @@ reloc_overflow (struct bfd_link_info *info ATTRIBUTE_UNUSED,
return TRUE;
}
- einfo (_(" relocation truncated to fit: %s %T"), reloc_name, name);
+ if (entry)
+ {
+ while (entry->type == bfd_link_hash_indirect
+ || entry->type == bfd_link_hash_warning)
+ entry = entry->u.i.link;
+ switch (entry->type)
+ {
+ case bfd_link_hash_undefined:
+ case bfd_link_hash_undefweak:
+ einfo (_(" relocation truncated to fit: %s against undefined symbol `%T'"),
+ reloc_name, entry->root.string);
+ break;
+ case bfd_link_hash_defined:
+ case bfd_link_hash_defweak:
+ einfo (_(" relocation truncated to fit: %s against symbol `%T' defined in %A section in %B"),
+ reloc_name, entry->root.string,
+ entry->u.def.section,
+ entry->u.def.section == bfd_abs_section_ptr
+ ? output_bfd : entry->u.def.section->owner);
+ break;
+ default:
+ abort ();
+ break;
+ }
+ }
+ else
+ einfo (_(" relocation truncated to fit: %s against `%T'"),
+ reloc_name, name);
if (addend != 0)
einfo ("+%v", addend);
einfo ("\n");
@@ -1410,11 +1480,8 @@ reloc_dangerous (struct bfd_link_info *info ATTRIBUTE_UNUSED,
asection *section,
bfd_vma address)
{
- if (abfd == NULL)
- einfo (_("%P%X: generated"));
- else
- einfo ("%X%C:", abfd, section, address);
- einfo (_("dangerous relocation: %s\n"), message);
+ einfo (_("%X%C: dangerous relocation: %s\n"),
+ abfd, section, address, message);
return TRUE;
}
@@ -1428,11 +1495,8 @@ unattached_reloc (struct bfd_link_info *info ATTRIBUTE_UNUSED,
asection *section,
bfd_vma address)
{
- if (abfd == NULL)
- einfo (_("%P%X: generated"));
- else
- einfo ("%X%C:", abfd, section, address);
- einfo (_(" reloc refers to symbol `%T' which is not being output\n"), name);
+ einfo (_("%X%C: reloc refers to symbol `%T' which is not being output\n"),
+ abfd, section, address, name);
return TRUE;
}
@@ -1447,6 +1511,13 @@ notice (struct bfd_link_info *info,
asection *section,
bfd_vma value)
{
+ if (name == NULL)
+ {
+ if (command_line.cref || nocrossref_list != NULL)
+ return handle_asneeded_cref (abfd, value);
+ return TRUE;
+ }
+
if (! info->notice_all
|| (info->notice_hash != NULL
&& bfd_hash_lookup (info->notice_hash, name, FALSE, FALSE) != NULL))
diff --git a/contrib/binutils/ld/ldmain.h b/contrib/binutils/ld/ldmain.h
index 8cab5fe..4f15d55 100644
--- a/contrib/binutils/ld/ldmain.h
+++ b/contrib/binutils/ld/ldmain.h
@@ -1,6 +1,6 @@
/* ldmain.h -
- Copyright 1991, 1992, 1993, 1994, 1995, 1996, 1999, 2002, 2003, 2004
- Free Software Foundation, Inc.
+ Copyright 1991, 1992, 1993, 1994, 1995, 1996, 1999, 2002, 2003, 2004,
+ 2005 Free Software Foundation, Inc.
This file is part of GLD, the Gnu Linker.
@@ -16,14 +16,14 @@
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. */
+ Software Foundation, 51 Franklin Street - Fifth Floor, Boston, MA
+ 02110-1301, USA. */
#ifndef LDMAIN_H
#define LDMAIN_H
extern char *program_name;
-extern char *ld_sysroot;
+extern const char *ld_sysroot;
extern char *ld_canon_sysroot;
extern int ld_canon_sysroot_len;
extern bfd *output_bfd;
@@ -33,6 +33,7 @@ extern bfd_boolean trace_file_tries;
extern bfd_boolean version_printed;
extern bfd_boolean whole_archive;
extern bfd_boolean as_needed;
+extern bfd_boolean add_needed;
extern bfd_boolean demangling;
extern int g_switch_value;
extern const char *output_filename;
diff --git a/contrib/binutils/ld/ldmisc.c b/contrib/binutils/ld/ldmisc.c
index def598d..292fc45 100644
--- a/contrib/binutils/ld/ldmisc.c
+++ b/contrib/binutils/ld/ldmisc.c
@@ -1,6 +1,6 @@
/* ldmisc.c
- Copyright 1991, 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999,
- 2000, 2002, 2003
+ Copyright 1991, 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999, 2000,
+ 2001, 2002, 2003, 2004, 2005, 2006, 2007
Free Software Foundation, Inc.
Written by Steve Chamberlain of Cygnus Support.
@@ -18,12 +18,12 @@
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. */
+ Software Foundation, 51 Franklin Street - Fifth Floor, Boston, MA
+ 02110-1301, USA. */
+#include "sysdep.h"
#include "bfd.h"
#include "bfdlink.h"
-#include "sysdep.h"
#include "libiberty.h"
#include "demangle.h"
#include <stdarg.h>
@@ -35,31 +35,35 @@
#include "ldlex.h"
#include "ldmain.h"
#include "ldfile.h"
+#include "elf-bfd.h"
/*
%% literal %
+ %A section name from a section
+ %B filename from a bfd
+ %C clever filename:linenumber with function
+ %D like %C, but no function name
+ %E current bfd error or errno
%F error is fatal
+ %G like %D, but only function name
+ %I filename from a lang_input_statement_type
%P print program name
+ %R info about a relent
%S print script file and linenumber
- %E current bfd error or errno
- %I filename from a lang_input_statement_type
- %B filename from a bfd
%T symbol name
- %X no object output, fail return
%V hex bfd_vma
- %v hex bfd_vma, no leading zeros
%W hex bfd_vma with 0x with no leading zeros taking up 8 spaces
- %C clever filename:linenumber with function
- %D like %C, but no function name
- %G like %D, but only function name
- %R info about a relent
- %s arbitrary string, like printf
+ %X no object output, fail return
%d integer, like printf
+ %ld long, like printf
+ %lu unsigned long, like printf
+ %s arbitrary string, like printf
%u integer, like printf
+ %v hex bfd_vma, no leading zeros
*/
static void
-vfinfo (FILE *fp, const char *fmt, va_list arg)
+vfinfo (FILE *fp, const char *fmt, va_list arg, bfd_boolean is_warning)
{
bfd_boolean fatal = FALSE;
@@ -76,10 +80,6 @@ vfinfo (FILE *fp, const char *fmt, va_list arg)
fmt++;
switch (*fmt++)
{
- default:
- fprintf (fp, "%%%c", fmt[-1]);
- break;
-
case '%':
/* literal % */
putc ('%', fp);
@@ -144,17 +144,48 @@ vfinfo (FILE *fp, const char *fmt, va_list arg)
const char *name = va_arg (arg, const char *);
if (name == NULL || *name == 0)
- fprintf (fp, _("no symbol"));
- else if (! demangling)
- fprintf (fp, "%s", name);
- else
+ {
+ fprintf (fp, _("no symbol"));
+ break;
+ }
+ else if (demangling)
{
char *demangled;
- demangled = demangle (name);
- fprintf (fp, "%s", demangled);
- free (demangled);
+ demangled = bfd_demangle (output_bfd, name,
+ DMGL_ANSI | DMGL_PARAMS);
+ if (demangled != NULL)
+ {
+ fprintf (fp, "%s", demangled);
+ free (demangled);
+ break;
+ }
}
+ fprintf (fp, "%s", name);
+ }
+ break;
+
+ case 'A':
+ /* section name from a section */
+ {
+ asection *sec = va_arg (arg, asection *);
+ bfd *abfd = sec->owner;
+ const char *group = NULL;
+ struct coff_comdat_info *ci;
+
+ fprintf (fp, "%s", sec->name);
+ if (abfd != NULL
+ && bfd_get_flavour (abfd) == bfd_target_elf_flavour
+ && elf_next_in_group (sec) != NULL
+ && (sec->flags & SEC_GROUP) == 0)
+ group = elf_group_name (sec);
+ else if (abfd != NULL
+ && bfd_get_flavour (abfd) == bfd_target_coff_flavour
+ && (ci = bfd_coff_get_comdat_section (sec->owner,
+ sec)) != NULL)
+ group = ci->name;
+ if (group != NULL)
+ fprintf (fp, "[%s]", group);
}
break;
@@ -162,7 +193,10 @@ vfinfo (FILE *fp, const char *fmt, va_list arg)
/* filename from a bfd */
{
bfd *abfd = va_arg (arg, bfd *);
- if (abfd->my_archive)
+
+ if (abfd == NULL)
+ fprintf (fp, "%s generated", program_name);
+ else if (abfd->my_archive)
fprintf (fp, "%s(%s)", abfd->my_archive->filename,
abfd->filename);
else
@@ -246,40 +280,62 @@ vfinfo (FILE *fp, const char *fmt, va_list arg)
section = va_arg (arg, asection *);
offset = va_arg (arg, bfd_vma);
- entry = (lang_input_statement_type *) abfd->usrdata;
- if (entry != (lang_input_statement_type *) NULL
- && entry->asymbols != (asymbol **) NULL)
- asymbols = entry->asymbols;
+ if (abfd == NULL)
+ {
+ entry = NULL;
+ asymbols = NULL;
+ }
else
{
- long symsize;
- long symbol_count;
-
- symsize = bfd_get_symtab_upper_bound (abfd);
- if (symsize < 0)
- einfo (_("%B%F: could not read symbols\n"), abfd);
- asymbols = xmalloc (symsize);
- symbol_count = bfd_canonicalize_symtab (abfd, asymbols);
- if (symbol_count < 0)
- einfo (_("%B%F: could not read symbols\n"), abfd);
- if (entry != (lang_input_statement_type *) NULL)
+ entry = (lang_input_statement_type *) abfd->usrdata;
+ if (entry != (lang_input_statement_type *) NULL
+ && entry->asymbols != (asymbol **) NULL)
+ asymbols = entry->asymbols;
+ else
{
- entry->asymbols = asymbols;
- entry->symbol_count = symbol_count;
+ long symsize;
+ long sym_count;
+
+ symsize = bfd_get_symtab_upper_bound (abfd);
+ if (symsize < 0)
+ einfo (_("%B%F: could not read symbols\n"), abfd);
+ asymbols = xmalloc (symsize);
+ sym_count = bfd_canonicalize_symtab (abfd, asymbols);
+ if (sym_count < 0)
+ einfo (_("%B%F: could not read symbols\n"), abfd);
+ if (entry != (lang_input_statement_type *) NULL)
+ {
+ entry->asymbols = asymbols;
+ entry->symbol_count = sym_count;
+ }
}
}
- lfinfo (fp, "%B(%s+0x%v)", abfd, section->name, offset);
+ /* The GNU Coding Standard requires that error messages
+ be of the form:
+
+ source-file-name:lineno: message
+ We do not always have a line number available so if
+ we cannot find them we print out the section name and
+ offset instread. */
discard_last = TRUE;
- if (bfd_find_nearest_line (abfd, section, asymbols, offset,
- &filename, &functionname,
- &linenumber))
+ if (abfd != NULL
+ && bfd_find_nearest_line (abfd, section, asymbols, offset,
+ &filename, &functionname,
+ &linenumber))
{
- bfd_boolean need_colon = TRUE;
-
if (functionname != NULL && fmt[-1] == 'C')
{
+ /* Detect the case where we are printing out a
+ message for the same function as the last
+ call to vinfo ("%C"). In this situation do
+ not print out the ABFD filename or the
+ function name again. Note - we do still
+ print out the source filename, as this will
+ allow programs that parse the linker's output
+ (eg emacs) to correctly locate multiple
+ errors in the same source file. */
if (last_bfd == NULL
|| last_file == NULL
|| last_function == NULL
@@ -288,9 +344,8 @@ vfinfo (FILE *fp, const char *fmt, va_list arg)
&& strcmp (last_file, filename) != 0)
|| strcmp (last_function, functionname) != 0)
{
- lfinfo (fp, _(": In function `%T':\n"),
- functionname);
- need_colon = FALSE;
+ lfinfo (fp, _("%B: In function `%T':\n"),
+ abfd, functionname);
last_bfd = abfd;
if (last_file != NULL)
@@ -304,19 +359,21 @@ vfinfo (FILE *fp, const char *fmt, va_list arg)
}
discard_last = FALSE;
}
+ else
+ lfinfo (fp, "%B:", abfd);
if (filename != NULL)
- {
- if (need_colon)
- putc (':', fp);
- fputs (filename, fp);
- }
+ fprintf (fp, "%s:", filename);
if (functionname != NULL && fmt[-1] == 'G')
- lfinfo (fp, ":%T", functionname);
+ lfinfo (fp, "%T", functionname);
else if (filename != NULL && linenumber != 0)
- fprintf (fp, ":%u", linenumber);
+ fprintf (fp, "%u", linenumber);
+ else
+ lfinfo (fp, "(%A+0x%v)", section, offset);
}
+ else
+ lfinfo (fp, "%B:(%A+0x%v)", abfd, section, offset);
if (asymbols != NULL && entry == NULL)
free (asymbols);
@@ -352,59 +409,36 @@ vfinfo (FILE *fp, const char *fmt, va_list arg)
/* unsigned integer, like printf */
fprintf (fp, "%u", va_arg (arg, unsigned int));
break;
+
+ case 'l':
+ if (*fmt == 'd')
+ {
+ fprintf (fp, "%ld", va_arg (arg, long));
+ ++fmt;
+ break;
+ }
+ else if (*fmt == 'u')
+ {
+ fprintf (fp, "%lu", va_arg (arg, unsigned long));
+ ++fmt;
+ break;
+ }
+ /* Fall thru */
+
+ default:
+ fprintf (fp, "%%%c", fmt[-1]);
+ break;
}
}
}
- if (config.fatal_warnings)
+ if (is_warning && config.fatal_warnings)
config.make_executable = FALSE;
if (fatal)
xexit (1);
}
-/* Wrapper around cplus_demangle. Strips leading underscores and
- other such chars that would otherwise confuse the demangler. */
-
-char *
-demangle (const char *name)
-{
- char *res;
- const char *p;
-
- if (output_bfd != NULL
- && bfd_get_symbol_leading_char (output_bfd) == name[0])
- ++name;
-
- /* This is a hack for better error reporting on XCOFF, PowerPC64-ELF
- or the MS PE format. These formats have a number of leading '.'s
- on at least some symbols, so we remove all dots to avoid
- confusing the demangler. */
- p = name;
- while (*p == '.')
- ++p;
-
- res = cplus_demangle (p, DMGL_ANSI | DMGL_PARAMS);
- if (res)
- {
- size_t dots = p - name;
-
- /* Now put back any stripped dots. */
- if (dots != 0)
- {
- size_t len = strlen (res) + 1;
- char *add_dots = xmalloc (len + dots);
-
- memcpy (add_dots, name, dots);
- memcpy (add_dots + dots, res, len);
- free (res);
- res = add_dots;
- }
- return res;
- }
- return xstrdup (name);
-}
-
/* Format info message and print on stdout. */
/* (You would think this should be called just "info", but then you
@@ -416,7 +450,7 @@ info_msg (const char *fmt, ...)
va_list arg;
va_start (arg, fmt);
- vfinfo (stdout, fmt, arg);
+ vfinfo (stdout, fmt, arg, FALSE);
va_end (arg);
}
@@ -428,7 +462,7 @@ einfo (const char *fmt, ...)
va_list arg;
va_start (arg, fmt);
- vfinfo (stderr, fmt, arg);
+ vfinfo (stderr, fmt, arg, TRUE);
va_end (arg);
}
@@ -443,11 +477,14 @@ info_assert (const char *file, unsigned int line)
void
minfo (const char *fmt, ...)
{
- va_list arg;
+ if (config.map_file != NULL)
+ {
+ va_list arg;
- va_start (arg, fmt);
- vfinfo (config.map_file, fmt, arg);
- va_end (arg);
+ va_start (arg, fmt);
+ vfinfo (config.map_file, fmt, arg, FALSE);
+ va_end (arg);
+ }
}
void
@@ -456,7 +493,7 @@ lfinfo (FILE *file, const char *fmt, ...)
va_list arg;
va_start (arg, fmt);
- vfinfo (file, fmt, arg);
+ vfinfo (file, fmt, arg, FALSE);
va_end (arg);
}
@@ -489,64 +526,3 @@ ld_abort (const char *file, int line, const char *fn)
einfo (_("%P%F: please report this bug\n"));
xexit (1);
}
-
-bfd_boolean
-error_handler (int id, const char *fmt, ...)
-{
- va_list arg;
-
- va_start (arg, fmt);
-
- switch (id)
- {
- default:
- break;
-
- /* We can be called with
-
- error_handler (-LD_DEFINITION_IN_DISCARDED_SECTION, "", 0);
-
- to make this error non-fatal and
-
- error_handler (-LD_DEFINITION_IN_DISCARDED_SECTION, "", 1);
-
- to make this error fatal. */
- case -LD_DEFINITION_IN_DISCARDED_SECTION:
- case LD_DEFINITION_IN_DISCARDED_SECTION:
- {
- static struct bfd_hash_table *hash;
- static int fatal = 1;
- const char *name;
-
- if (id == -LD_DEFINITION_IN_DISCARDED_SECTION)
- {
- fatal = va_arg (arg, int);
- goto out;
- }
-
- name = va_arg (arg, const char *);
- /* Only warn once about a particular undefined symbol. */
- if (hash == NULL)
- {
- hash = xmalloc (sizeof (struct bfd_hash_table));
- if (! bfd_hash_table_init (hash, bfd_hash_newfunc))
- einfo (_("%F%P: bfd_hash_table_init failed: %E\n"));
- }
-
- if (bfd_hash_lookup (hash, name, FALSE, FALSE) != NULL)
- goto out;
-
- if (bfd_hash_lookup (hash, name, TRUE, TRUE) == NULL)
- einfo (_("%F%P: bfd_hash_lookup failed: %E\n"));
-
- if (fatal)
- config.make_executable = FALSE;
- }
- break;
- }
- vfinfo (stderr, fmt, arg);
-
-out:
- va_end (arg);
- return TRUE;
-}
diff --git a/contrib/binutils/ld/ldmisc.h b/contrib/binutils/ld/ldmisc.h
index b2812fb..92f4e2a 100644
--- a/contrib/binutils/ld/ldmisc.h
+++ b/contrib/binutils/ld/ldmisc.h
@@ -1,5 +1,5 @@
/* ldmisc.h -
- Copyright 1991, 1992, 1993, 1994, 1996, 1997, 2001, 2003
+ Copyright 1991, 1992, 1993, 1994, 1996, 1997, 2001, 2003, 2004, 2007
Free Software Foundation, Inc.
This file is part of GLD, the Gnu Linker.
@@ -16,13 +16,12 @@
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. */
+ Software Foundation, 51 Franklin Street - Fifth Floor, Boston,
+ MA 02110-1301, USA. */
#ifndef LDMISC_H
#define LDMISC_H
-extern bfd_boolean error_handler (int, const char *, ...);
extern void einfo (const char *, ...);
extern void minfo (const char *, ...);
extern void info_msg (const char *, ...);
@@ -41,6 +40,5 @@ do { info_assert(__FILE__,__LINE__); } while (0)
extern void print_space (void);
extern void print_nl (void);
-extern char *demangle (const char *);
#endif
diff --git a/contrib/binutils/ld/ldver.c b/contrib/binutils/ld/ldver.c
index 710bf90..776c722 100644
--- a/contrib/binutils/ld/ldver.c
+++ b/contrib/binutils/ld/ldver.c
@@ -1,27 +1,26 @@
/* ldver.c -- Print linker version.
- Copyright 1991, 1992, 1993, 1994, 1995, 1996, 1997, 2000, 2001, 2002
- Free Software Foundation, Inc.
+ Copyright 1991, 1992, 1993, 1994, 1995, 1996, 1997, 2000, 2001, 2002,
+ 2003, 2007 Free Software Foundation, Inc.
-This file is part of GLD, the Gnu Linker.
+ This file is part of GLD, the Gnu Linker.
-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 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.
+ 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. */
+ 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., 51 Franklin Street - Fifth Floor, Boston, MA 02110-1301, USA. */
-#include <stdio.h>
+#include "sysdep.h"
#include "bfd.h"
#include "bfdver.h"
-#include "sysdep.h"
#include "ld.h"
#include "ldver.h"
@@ -35,11 +34,11 @@ void
ldversion (int noisy)
{
/* Output for noisy == 2 is intended to follow the GNU standards. */
- fprintf (stdout, _("GNU ld version %s\n"), BFD_VERSION_STRING);
+ fprintf (stdout, _("GNU ld %s\n"), BFD_VERSION_STRING);
if (noisy & 2)
{
- printf (_("Copyright 2002 Free Software Foundation, Inc.\n"));
+ printf (_("Copyright 2007 Free Software Foundation, Inc.\n"));
printf (_("\
This program is free software; you may redistribute it under the terms of\n\
the GNU General Public License. This program has absolutely no warranty.\n"));
diff --git a/contrib/binutils/ld/ldver.h b/contrib/binutils/ld/ldver.h
index fd840a8..96e74ce 100644
--- a/contrib/binutils/ld/ldver.h
+++ b/contrib/binutils/ld/ldver.h
@@ -1,5 +1,6 @@
/* ldver.h -- Header file for ldver.c.
- Copyright 1991, 1992, 1993, 1996, 2003 Free Software Foundation, Inc.
+ Copyright 1991, 1992, 1993, 1996, 2001, 2003
+ Free Software Foundation, Inc.
This file is part of GLD, the Gnu Linker.
@@ -15,6 +16,6 @@ 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. */
+Foundation, Inc., 51 Franklin Street - Fifth Floor, Boston, MA 02110-1301, USA. */
void ldversion (int);
diff --git a/contrib/binutils/ld/ldver.texi b/contrib/binutils/ld/ldver.texi
deleted file mode 100644
index 3610a96..0000000
--- a/contrib/binutils/ld/ldver.texi
+++ /dev/null
@@ -1 +0,0 @@
-@set VERSION 2.15
diff --git a/contrib/binutils/ld/ldwrite.c b/contrib/binutils/ld/ldwrite.c
index e4bec32..7c02ff6 100644
--- a/contrib/binutils/ld/ldwrite.c
+++ b/contrib/binutils/ld/ldwrite.c
@@ -1,6 +1,6 @@
/* ldwrite.c -- write out the linked file
- Copyright 1991, 1992, 1993, 1994, 1995, 1996, 1997, 1998, 2000, 2002, 2003
- Free Software Foundation, Inc.
+ Copyright 1991, 1992, 1993, 1994, 1995, 1996, 1997, 1998, 2000, 2002,
+ 2003, 2004, 2005, 2006, 2007 Free Software Foundation, Inc.
Written by Steve Chamberlain sac@cygnus.com
This file is part of GLD, the Gnu Linker.
@@ -17,10 +17,10 @@ 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. */
+Foundation, Inc., 51 Franklin Street - Fifth Floor, Boston, MA 02110-1301, USA. */
-#include "bfd.h"
#include "sysdep.h"
+#include "bfd.h"
#include "bfdlink.h"
#include "libiberty.h"
#include "safe-ctype.h"
@@ -55,7 +55,7 @@ build_link_order (lang_statement_union_type *statement)
einfo (_("%P%F: bfd_new_link_order failed\n"));
link_order->type = bfd_data_link_order;
- link_order->offset = statement->data_statement.output_vma;
+ link_order->offset = statement->data_statement.output_offset;
link_order->u.data.contents = xmalloc (QUAD_SIZE);
value = statement->data_statement.value;
@@ -190,7 +190,7 @@ build_link_order (lang_statement_union_type *statement)
if (link_order == NULL)
einfo (_("%P%F: bfd_new_link_order failed\n"));
- link_order->offset = rs->output_vma;
+ link_order->offset = rs->output_offset;
link_order->size = bfd_get_reloc_size (rs->howto);
link_order->u.reloc.p = xmalloc (sizeof (struct bfd_link_order_reloc));
@@ -218,45 +218,46 @@ build_link_order (lang_statement_union_type *statement)
break;
case lang_input_section_enum:
- /* Create a new link_order in the output section with this
- attached */
- if (!statement->input_section.ifile->just_syms_flag)
- {
- asection *i = statement->input_section.section;
- asection *output_section = i->output_section;
+ {
+ /* Create a new link_order in the output section with this
+ attached */
+ asection *i = statement->input_section.section;
- ASSERT (output_section->owner == output_bfd);
+ if (!((lang_input_statement_type *) i->owner->usrdata)->just_syms_flag
+ && (i->flags & SEC_EXCLUDE) == 0)
+ {
+ asection *output_section = i->output_section;
- if ((output_section->flags & SEC_HAS_CONTENTS) != 0
- || ((output_section->flags & SEC_LOAD) != 0
- && (output_section->flags & SEC_THREAD_LOCAL)))
- {
- struct bfd_link_order *link_order;
+ ASSERT (output_section->owner == output_bfd);
- link_order = bfd_new_link_order (output_bfd, output_section);
+ if ((output_section->flags & SEC_HAS_CONTENTS) != 0
+ || ((output_section->flags & SEC_LOAD) != 0
+ && (output_section->flags & SEC_THREAD_LOCAL)))
+ {
+ struct bfd_link_order *link_order;
- if (i->flags & SEC_NEVER_LOAD)
- {
- /* We've got a never load section inside one which
- is going to be output, we'll change it into a
- fill. */
- link_order->type = bfd_data_link_order;
- link_order->u.data.contents = "";
- link_order->u.data.size = 1;
- }
- else
- {
- link_order->type = bfd_indirect_link_order;
- link_order->u.indirect.section = i;
- ASSERT (i->output_section == output_section);
- }
- if (i->_cooked_size)
- link_order->size = i->_cooked_size;
- else
- link_order->size = bfd_get_section_size_before_reloc (i);
- link_order->offset = i->output_offset;
- }
- }
+ link_order = bfd_new_link_order (output_bfd, output_section);
+
+ if (i->flags & SEC_NEVER_LOAD)
+ {
+ /* We've got a never load section inside one which
+ is going to be output, we'll change it into a
+ fill. */
+ link_order->type = bfd_data_link_order;
+ link_order->u.data.contents = (unsigned char *) "";
+ link_order->u.data.size = 1;
+ }
+ else
+ {
+ link_order->type = bfd_indirect_link_order;
+ link_order->u.indirect.section = i;
+ ASSERT (i->output_section == output_section);
+ }
+ link_order->size = i->size;
+ link_order->offset = i->output_offset;
+ }
+ }
+ }
break;
case lang_padding_statement_enum:
@@ -292,7 +293,7 @@ build_link_order (lang_statement_union_type *statement)
static bfd_boolean
unsplittable_name (const char *name)
{
- if (strncmp (name, ".stab", 5) == 0)
+ if (CONST_STRNEQ (name, ".stab"))
{
/* There are several stab like string sections. We pattern match on
".stab...str" */
@@ -337,7 +338,7 @@ clone_section (bfd *abfd, asection *s, const char *name, int *count)
{
/* Some section names cannot be truncated, as the name is
used to locate some other section. */
- if (strncmp (name, ".stab", 5) == 0
+ if (CONST_STRNEQ (name, ".stab")
|| strcmp (name, "$GDB_SYMBOLS$") == 0)
{
einfo (_ ("%F%P: cannot create split section name for %s\n"), name);
@@ -367,8 +368,7 @@ clone_section (bfd *abfd, asection *s, const char *name, int *count)
n->vma = s->vma;
n->user_set_vma = s->user_set_vma;
n->lma = s->lma;
- n->_cooked_size = 0;
- n->_raw_size = 0;
+ n->size = 0;
n->output_offset = s->output_offset;
n->output_section = n;
n->orelocation = 0;
@@ -381,8 +381,8 @@ clone_section (bfd *abfd, asection *s, const char *name, int *count)
static void
ds (asection *s)
{
- struct bfd_link_order *l = s->link_order_head;
- printf ("vma %x size %x\n", s->vma, s->_raw_size);
+ struct bfd_link_order *l = s->map_head.link_order;
+ printf ("vma %x size %x\n", s->vma, s->size);
while (l)
{
if (l->type == bfd_indirect_link_order)
@@ -413,7 +413,7 @@ sanity_check (bfd *abfd)
{
struct bfd_link_order *p;
bfd_vma prev = 0;
- for (p = s->link_order_head; p; p = p->next)
+ for (p = s->map_head.link_order; p; p = p->next)
{
if (p->offset > 100000)
abort ();
@@ -450,7 +450,7 @@ split_sections (bfd *abfd, struct bfd_link_info *info)
/* Count up the relocations and line entries to see if anything
would be too big to fit. Accumulate section size too. */
- for (l = NULL, p = cursor->link_order_head; p != NULL; p = l->next)
+ for (l = NULL, p = cursor->map_head.link_order; p != NULL; p = l->next)
{
unsigned int thislines = 0;
unsigned int thisrelocs = 0;
@@ -468,10 +468,7 @@ split_sections (bfd *abfd, struct bfd_link_info *info)
if (info->relocatable)
thisrelocs = sec->reloc_count;
- if (sec->_cooked_size != 0)
- thissize = sec->_cooked_size;
- else
- thissize = sec->_raw_size;
+ thissize = sec->size;
}
else if (info->relocatable
@@ -494,9 +491,9 @@ split_sections (bfd *abfd, struct bfd_link_info *info)
/* Attach the link orders to the new section and snip
them off from the old section. */
- n->link_order_head = p;
- n->link_order_tail = cursor->link_order_tail;
- cursor->link_order_tail = l;
+ n->map_head.link_order = p;
+ n->map_tail.link_order = cursor->map_tail.link_order;
+ cursor->map_tail.link_order = l;
l->next = NULL;
l = p;
@@ -506,13 +503,8 @@ split_sections (bfd *abfd, struct bfd_link_info *info)
dump ("before snip", cursor, n);
shift_offset = p->offset;
- if (cursor->_cooked_size != 0)
- {
- n->_cooked_size = cursor->_cooked_size - shift_offset;
- cursor->_cooked_size = shift_offset;
- }
- n->_raw_size = cursor->_raw_size - shift_offset;
- cursor->_raw_size = shift_offset;
+ n->size = cursor->size - shift_offset;
+ cursor->size = shift_offset;
vma += shift_offset;
n->lma = n->vma = vma;
diff --git a/contrib/binutils/ld/ldwrite.h b/contrib/binutils/ld/ldwrite.h
index 13617c0..1851a86 100644
--- a/contrib/binutils/ld/ldwrite.h
+++ b/contrib/binutils/ld/ldwrite.h
@@ -15,7 +15,7 @@
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. */
+ the Free Software Foundation, 51 Franklin Street - Fifth Floor,
+ Boston, MA 02110-1301, USA. */
void ldwrite (void);
diff --git a/contrib/binutils/ld/lexsup.c b/contrib/binutils/ld/lexsup.c
index ea3a558..6ef5053 100644
--- a/contrib/binutils/ld/lexsup.c
+++ b/contrib/binutils/ld/lexsup.c
@@ -1,6 +1,6 @@
/* Parse options for the GNU linker.
Copyright 1991, 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999, 2000,
- 2001, 2002, 2003, 2004
+ 2001, 2002, 2003, 2004, 2005, 2006, 2007
Free Software Foundation, Inc.
This file is part of GLD, the Gnu Linker.
@@ -17,11 +17,12 @@
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. */
+ Software Foundation, 51 Franklin Street - Fifth Floor, Boston, MA
+ 02110-1301, USA. */
-#include "bfd.h"
#include "sysdep.h"
+#include "bfd.h"
+#include "bfdver.h"
#include "libiberty.h"
#include <stdio.h>
#include <string.h>
@@ -55,6 +56,7 @@
static void set_default_dirlist (char *);
static void set_section_start (char *, char *);
+static void set_segment_start (const char *, char *);
static void help (void);
/* Non-zero if we are processing a --defsym from the command line. */
@@ -70,6 +72,7 @@ enum option_values
OPTION_DEFSYM,
OPTION_DEMANGLE,
OPTION_DYNAMIC_LINKER,
+ OPTION_SYSROOT,
OPTION_EB,
OPTION_EL,
OPTION_EMBEDDED_RELOCS,
@@ -80,6 +83,7 @@ enum option_values
OPTION_NO_DEMANGLE,
OPTION_NO_KEEP_MEMORY,
OPTION_NO_WARN_MISMATCH,
+ OPTION_NO_WARN_SEARCH_MISMATCH,
OPTION_NOINHIBIT_EXEC,
OPTION_NON_SHARED,
OPTION_NO_WHOLE_ARCHIVE,
@@ -91,8 +95,10 @@ enum option_values
OPTION_SHARED,
OPTION_SONAME,
OPTION_SORT_COMMON,
+ OPTION_SORT_SECTION,
OPTION_STATS,
OPTION_SYMBOLIC,
+ OPTION_SYMBOLIC_FUNCTIONS,
OPTION_TASK_LINK,
OPTION_TBSS,
OPTION_TDATA,
@@ -103,6 +109,10 @@ enum option_values
OPTION_VERSION,
OPTION_VERSION_SCRIPT,
OPTION_VERSION_EXPORTS_SECTION,
+ OPTION_DYNAMIC_LIST,
+ OPTION_DYNAMIC_LIST_CPP_NEW,
+ OPTION_DYNAMIC_LIST_CPP_TYPEINFO,
+ OPTION_DYNAMIC_LIST_DATA,
OPTION_WARN_COMMON,
OPTION_WARN_CONSTRUCTORS,
OPTION_WARN_FATAL,
@@ -112,12 +122,17 @@ enum option_values
OPTION_SPLIT_BY_RELOC,
OPTION_SPLIT_BY_FILE ,
OPTION_WHOLE_ARCHIVE,
+ OPTION_ADD_NEEDED,
+ OPTION_NO_ADD_NEEDED,
OPTION_AS_NEEDED,
OPTION_NO_AS_NEEDED,
OPTION_WRAP,
OPTION_FORCE_EXE_SUFFIX,
OPTION_GC_SECTIONS,
OPTION_NO_GC_SECTIONS,
+ OPTION_PRINT_GC_SECTIONS,
+ OPTION_NO_PRINT_GC_SECTIONS,
+ OPTION_HASH_SIZE,
OPTION_CHECK_SECTIONS,
OPTION_NO_CHECK_SECTIONS,
OPTION_NO_UNDEFINED,
@@ -130,6 +145,8 @@ enum option_values
OPTION_NO_ALLOW_SHLIB_UNDEFINED,
OPTION_ALLOW_MULTIPLE_DEFINITION,
OPTION_NO_UNDEFINED_VERSION,
+ OPTION_DEFAULT_SYMVER,
+ OPTION_DEFAULT_IMPORTED_SYMVER,
OPTION_DISCARD_NONE,
OPTION_SPARE_DYNAMIC_TAGS,
OPTION_NO_DEFINE_COMMON,
@@ -142,7 +159,10 @@ enum option_values
OPTION_PIE,
OPTION_UNRESOLVED_SYMBOLS,
OPTION_WARN_UNRESOLVED_SYMBOLS,
- OPTION_ERROR_UNRESOLVED_SYMBOLS
+ OPTION_ERROR_UNRESOLVED_SYMBOLS,
+ OPTION_WARN_SHARED_TEXTREL,
+ OPTION_REDUCE_MEMORY_OVERHEADS,
+ OPTION_DEFAULT_SCRIPT
};
/* The long options. This structure is used for both the option
@@ -182,270 +202,356 @@ struct ld_option
static const struct ld_option ld_options[] =
{
{ {NULL, required_argument, NULL, '\0'},
- 'a', N_("KEYWORD"), N_("Shared library control for HP/UX compatibility"),
- ONE_DASH },
+ 'a', N_("KEYWORD"), N_("Shared library control for HP/UX compatibility"),
+ ONE_DASH },
{ {"architecture", required_argument, NULL, 'A'},
- 'A', N_("ARCH"), N_("Set architecture") , TWO_DASHES },
+ 'A', N_("ARCH"), N_("Set architecture") , TWO_DASHES },
{ {"format", required_argument, NULL, 'b'},
- 'b', N_("TARGET"), N_("Specify target for following input files"), TWO_DASHES },
+ 'b', N_("TARGET"), N_("Specify target for following input files"),
+ TWO_DASHES },
{ {"mri-script", required_argument, NULL, 'c'},
- 'c', N_("FILE"), N_("Read MRI format linker script"), TWO_DASHES },
+ 'c', N_("FILE"), N_("Read MRI format linker script"), TWO_DASHES },
{ {"dc", no_argument, NULL, 'd'},
- 'd', NULL, N_("Force common symbols to be defined"), ONE_DASH },
+ 'd', NULL, N_("Force common symbols to be defined"), ONE_DASH },
{ {"dp", no_argument, NULL, 'd'},
- '\0', NULL, NULL, ONE_DASH },
+ '\0', NULL, NULL, ONE_DASH },
{ {"entry", required_argument, NULL, 'e'},
- 'e', N_("ADDRESS"), N_("Set start address"), TWO_DASHES },
+ 'e', N_("ADDRESS"), N_("Set start address"), TWO_DASHES },
{ {"export-dynamic", no_argument, NULL, OPTION_EXPORT_DYNAMIC},
- 'E', NULL, N_("Export all dynamic symbols"), TWO_DASHES },
+ 'E', NULL, N_("Export all dynamic symbols"), TWO_DASHES },
{ {"EB", no_argument, NULL, OPTION_EB},
- '\0', NULL, N_("Link big-endian objects"), ONE_DASH },
+ '\0', NULL, N_("Link big-endian objects"), ONE_DASH },
{ {"EL", no_argument, NULL, OPTION_EL},
- '\0', NULL, N_("Link little-endian objects"), ONE_DASH },
+ '\0', NULL, N_("Link little-endian objects"), ONE_DASH },
{ {"auxiliary", required_argument, NULL, 'f'},
- 'f', N_("SHLIB"), N_("Auxiliary filter for shared object symbol table"),
- TWO_DASHES },
+ 'f', N_("SHLIB"), N_("Auxiliary filter for shared object symbol table"),
+ TWO_DASHES },
{ {"filter", required_argument, NULL, 'F'},
- 'F', N_("SHLIB"), N_("Filter for shared object symbol table"), TWO_DASHES },
+ 'F', N_("SHLIB"), N_("Filter for shared object symbol table"),
+ TWO_DASHES },
{ {NULL, no_argument, NULL, '\0'},
- 'g', NULL, N_("Ignored"), ONE_DASH },
+ 'g', NULL, N_("Ignored"), ONE_DASH },
{ {"gpsize", required_argument, NULL, 'G'},
- 'G', N_("SIZE"), N_("Small data size (if no size, same as --shared)"),
- TWO_DASHES },
+ 'G', N_("SIZE"), N_("Small data size (if no size, same as --shared)"),
+ TWO_DASHES },
{ {"soname", required_argument, NULL, OPTION_SONAME},
- 'h', N_("FILENAME"), N_("Set internal name of shared library"), ONE_DASH },
+ 'h', N_("FILENAME"), N_("Set internal name of shared library"), ONE_DASH },
{ {"dynamic-linker", required_argument, NULL, OPTION_DYNAMIC_LINKER},
- 'I', N_("PROGRAM"), N_("Set PROGRAM as the dynamic linker to use"), TWO_DASHES },
+ 'I', N_("PROGRAM"), N_("Set PROGRAM as the dynamic linker to use"),
+ TWO_DASHES },
{ {"library", required_argument, NULL, 'l'},
- 'l', N_("LIBNAME"), N_("Search for library LIBNAME"), TWO_DASHES },
+ 'l', N_("LIBNAME"), N_("Search for library LIBNAME"), TWO_DASHES },
{ {"library-path", required_argument, NULL, 'L'},
- 'L', N_("DIRECTORY"), N_("Add DIRECTORY to library search path"), TWO_DASHES },
+ 'L', N_("DIRECTORY"), N_("Add DIRECTORY to library search path"),
+ TWO_DASHES },
+ { {"sysroot=<DIRECTORY>", required_argument, NULL, OPTION_SYSROOT},
+ '\0', NULL, N_("Override the default sysroot location"), TWO_DASHES },
{ {NULL, required_argument, NULL, '\0'},
- 'm', N_("EMULATION"), N_("Set emulation"), ONE_DASH },
+ 'm', N_("EMULATION"), N_("Set emulation"), ONE_DASH },
{ {"print-map", no_argument, NULL, 'M'},
- 'M', NULL, N_("Print map file on standard output"), TWO_DASHES },
+ 'M', NULL, N_("Print map file on standard output"), TWO_DASHES },
{ {"nmagic", no_argument, NULL, 'n'},
- 'n', NULL, N_("Do not page align data"), TWO_DASHES },
+ 'n', NULL, N_("Do not page align data"), TWO_DASHES },
{ {"omagic", no_argument, NULL, 'N'},
- 'N', NULL, N_("Do not page align data, do not make text readonly"),
- EXACTLY_TWO_DASHES },
+ 'N', NULL, N_("Do not page align data, do not make text readonly"),
+ EXACTLY_TWO_DASHES },
{ {"no-omagic", no_argument, NULL, OPTION_NO_OMAGIC},
- '\0', NULL, N_("Page align data, make text readonly"), EXACTLY_TWO_DASHES },
+ '\0', NULL, N_("Page align data, make text readonly"),
+ EXACTLY_TWO_DASHES },
{ {"output", required_argument, NULL, 'o'},
- 'o', N_("FILE"), N_("Set output file name"), EXACTLY_TWO_DASHES },
+ 'o', N_("FILE"), N_("Set output file name"), EXACTLY_TWO_DASHES },
{ {NULL, required_argument, NULL, '\0'},
- 'O', NULL, N_("Optimize output file"), ONE_DASH },
+ 'O', NULL, N_("Optimize output file"), ONE_DASH },
{ {"Qy", no_argument, NULL, OPTION_IGNORE},
- '\0', NULL, N_("Ignored for SVR4 compatibility"), ONE_DASH },
+ '\0', NULL, N_("Ignored for SVR4 compatibility"), ONE_DASH },
{ {"emit-relocs", no_argument, NULL, 'q'},
- 'q', NULL, "Generate relocations in final output", TWO_DASHES },
+ 'q', NULL, "Generate relocations in final output", TWO_DASHES },
{ {"relocatable", no_argument, NULL, 'r'},
- 'r', NULL, N_("Generate relocatable output"), TWO_DASHES },
+ 'r', NULL, N_("Generate relocatable output"), TWO_DASHES },
{ {NULL, no_argument, NULL, '\0'},
- 'i', NULL, NULL, ONE_DASH },
+ 'i', NULL, NULL, ONE_DASH },
{ {"just-symbols", required_argument, NULL, 'R'},
- 'R', N_("FILE"), N_("Just link symbols (if directory, same as --rpath)"),
- TWO_DASHES },
+ 'R', N_("FILE"), N_("Just link symbols (if directory, same as --rpath)"),
+ TWO_DASHES },
{ {"strip-all", no_argument, NULL, 's'},
- 's', NULL, N_("Strip all symbols"), TWO_DASHES },
+ 's', NULL, N_("Strip all symbols"), TWO_DASHES },
{ {"strip-debug", no_argument, NULL, 'S'},
- 'S', NULL, N_("Strip debugging symbols"), TWO_DASHES },
+ 'S', NULL, N_("Strip debugging symbols"), TWO_DASHES },
{ {"strip-discarded", no_argument, NULL, OPTION_STRIP_DISCARDED},
- '\0', NULL, N_("Strip symbols in discarded sections"), TWO_DASHES },
+ '\0', NULL, N_("Strip symbols in discarded sections"), TWO_DASHES },
{ {"no-strip-discarded", no_argument, NULL, OPTION_NO_STRIP_DISCARDED},
- '\0', NULL, N_("Do not strip symbols in discarded sections"), TWO_DASHES },
+ '\0', NULL, N_("Do not strip symbols in discarded sections"), TWO_DASHES },
{ {"trace", no_argument, NULL, 't'},
- 't', NULL, N_("Trace file opens"), TWO_DASHES },
+ 't', NULL, N_("Trace file opens"), TWO_DASHES },
{ {"script", required_argument, NULL, 'T'},
- 'T', N_("FILE"), N_("Read linker script"), TWO_DASHES },
+ 'T', N_("FILE"), N_("Read linker script"), TWO_DASHES },
+ { {"default-script", required_argument, NULL, OPTION_DEFAULT_SCRIPT},
+ '\0', N_("FILE"), N_("Read default linker script"), TWO_DASHES },
+ { {"dT", required_argument, NULL, OPTION_DEFAULT_SCRIPT},
+ '\0', NULL, NULL, ONE_DASH },
{ {"undefined", required_argument, NULL, 'u'},
- 'u', N_("SYMBOL"), N_("Start with undefined reference to SYMBOL"), TWO_DASHES },
+ 'u', N_("SYMBOL"), N_("Start with undefined reference to SYMBOL"),
+ TWO_DASHES },
{ {"unique", optional_argument, NULL, OPTION_UNIQUE},
- '\0', N_("[=SECTION]"), N_("Don't merge input [SECTION | orphan] sections"), TWO_DASHES },
+ '\0', N_("[=SECTION]"),
+ N_("Don't merge input [SECTION | orphan] sections"), TWO_DASHES },
{ {"Ur", no_argument, NULL, OPTION_UR},
- '\0', NULL, N_("Build global constructor/destructor tables"), ONE_DASH },
+ '\0', NULL, N_("Build global constructor/destructor tables"), ONE_DASH },
{ {"version", no_argument, NULL, OPTION_VERSION},
- 'v', NULL, N_("Print version information"), TWO_DASHES },
+ 'v', NULL, N_("Print version information"), TWO_DASHES },
{ {NULL, no_argument, NULL, '\0'},
- 'V', NULL, N_("Print version and emulation information"), ONE_DASH },
+ 'V', NULL, N_("Print version and emulation information"), ONE_DASH },
{ {"discard-all", no_argument, NULL, 'x'},
- 'x', NULL, N_("Discard all local symbols"), TWO_DASHES },
+ 'x', NULL, N_("Discard all local symbols"), TWO_DASHES },
{ {"discard-locals", no_argument, NULL, 'X'},
- 'X', NULL, N_("Discard temporary local symbols (default)"), TWO_DASHES },
+ 'X', NULL, N_("Discard temporary local symbols (default)"), TWO_DASHES },
{ {"discard-none", no_argument, NULL, OPTION_DISCARD_NONE},
- '\0', NULL, N_("Don't discard any local symbols"), TWO_DASHES },
+ '\0', NULL, N_("Don't discard any local symbols"), TWO_DASHES },
{ {"trace-symbol", required_argument, NULL, 'y'},
- 'y', N_("SYMBOL"), N_("Trace mentions of SYMBOL"), TWO_DASHES },
+ 'y', N_("SYMBOL"), N_("Trace mentions of SYMBOL"), TWO_DASHES },
{ {NULL, required_argument, NULL, '\0'},
- 'Y', N_("PATH"), N_("Default search path for Solaris compatibility"), ONE_DASH },
+ 'Y', N_("PATH"), N_("Default search path for Solaris compatibility"),
+ ONE_DASH },
{ {"start-group", no_argument, NULL, '('},
- '(', NULL, N_("Start a group"), TWO_DASHES },
+ '(', NULL, N_("Start a group"), TWO_DASHES },
{ {"end-group", no_argument, NULL, ')'},
- ')', NULL, N_("End a group"), TWO_DASHES },
- { {"accept-unknown-input-arch", no_argument, NULL, OPTION_ACCEPT_UNKNOWN_INPUT_ARCH},
- '\0', NULL, N_("Accept input files whose architecture cannot be determined"), TWO_DASHES },
- { {"no-accept-unknown-input-arch", no_argument, NULL, OPTION_NO_ACCEPT_UNKNOWN_INPUT_ARCH},
- '\0', NULL, N_("Reject input files whose architecture is unknown"), TWO_DASHES },
+ ')', NULL, N_("End a group"), TWO_DASHES },
+ { {"accept-unknown-input-arch", no_argument, NULL,
+ OPTION_ACCEPT_UNKNOWN_INPUT_ARCH},
+ '\0', NULL,
+ N_("Accept input files whose architecture cannot be determined"),
+ TWO_DASHES },
+ { {"no-accept-unknown-input-arch", no_argument, NULL,
+ OPTION_NO_ACCEPT_UNKNOWN_INPUT_ARCH},
+ '\0', NULL, N_("Reject input files whose architecture is unknown"),
+ TWO_DASHES },
+ { {"add-needed", no_argument, NULL, OPTION_ADD_NEEDED},
+ '\0', NULL, N_("Set DT_NEEDED tags for DT_NEEDED entries in\n"
+ "\t\t\t\tfollowing dynamic libs"), TWO_DASHES },
+ { {"no-add-needed", no_argument, NULL, OPTION_NO_ADD_NEEDED},
+ '\0', NULL, N_("Do not set DT_NEEDED tags for DT_NEEDED entries\n"
+ "\t\t\t\tin following dynamic libs"), TWO_DASHES },
+ { {"as-needed", no_argument, NULL, OPTION_AS_NEEDED},
+ '\0', NULL, N_("Only set DT_NEEDED for following dynamic libs if used"),
+ TWO_DASHES },
+ { {"no-as-needed", no_argument, NULL, OPTION_NO_AS_NEEDED},
+ '\0', NULL, N_("Always set DT_NEEDED for following dynamic libs"),
+ TWO_DASHES },
{ {"assert", required_argument, NULL, OPTION_ASSERT},
- '\0', N_("KEYWORD"), N_("Ignored for SunOS compatibility"), ONE_DASH },
+ '\0', N_("KEYWORD"), N_("Ignored for SunOS compatibility"), ONE_DASH },
{ {"Bdynamic", no_argument, NULL, OPTION_CALL_SHARED},
- '\0', NULL, N_("Link against shared libraries"), ONE_DASH },
+ '\0', NULL, N_("Link against shared libraries"), ONE_DASH },
{ {"dy", no_argument, NULL, OPTION_CALL_SHARED},
- '\0', NULL, NULL, ONE_DASH },
+ '\0', NULL, NULL, ONE_DASH },
{ {"call_shared", no_argument, NULL, OPTION_CALL_SHARED},
- '\0', NULL, NULL, ONE_DASH },
+ '\0', NULL, NULL, ONE_DASH },
{ {"Bstatic", no_argument, NULL, OPTION_NON_SHARED},
- '\0', NULL, N_("Do not link against shared libraries"), ONE_DASH },
+ '\0', NULL, N_("Do not link against shared libraries"), ONE_DASH },
{ {"dn", no_argument, NULL, OPTION_NON_SHARED},
- '\0', NULL, NULL, ONE_DASH },
+ '\0', NULL, NULL, ONE_DASH },
{ {"non_shared", no_argument, NULL, OPTION_NON_SHARED},
- '\0', NULL, NULL, ONE_DASH },
+ '\0', NULL, NULL, ONE_DASH },
{ {"static", no_argument, NULL, OPTION_NON_SHARED},
- '\0', NULL, NULL, ONE_DASH },
+ '\0', NULL, NULL, ONE_DASH },
{ {"Bsymbolic", no_argument, NULL, OPTION_SYMBOLIC},
- '\0', NULL, N_("Bind global references locally"), ONE_DASH },
+ '\0', NULL, N_("Bind global references locally"), ONE_DASH },
+ { {"Bsymbolic-functions", no_argument, NULL, OPTION_SYMBOLIC_FUNCTIONS},
+ '\0', NULL, N_("Bind global function references locally"), ONE_DASH },
{ {"check-sections", no_argument, NULL, OPTION_CHECK_SECTIONS},
- '\0', NULL, N_("Check section addresses for overlaps (default)"), TWO_DASHES },
+ '\0', NULL, N_("Check section addresses for overlaps (default)"),
+ TWO_DASHES },
{ {"no-check-sections", no_argument, NULL, OPTION_NO_CHECK_SECTIONS},
- '\0', NULL, N_("Do not check section addresses for overlaps"),
- TWO_DASHES },
+ '\0', NULL, N_("Do not check section addresses for overlaps"),
+ TWO_DASHES },
{ {"cref", no_argument, NULL, OPTION_CREF},
- '\0', NULL, N_("Output cross reference table"), TWO_DASHES },
+ '\0', NULL, N_("Output cross reference table"), TWO_DASHES },
{ {"defsym", required_argument, NULL, OPTION_DEFSYM},
- '\0', N_("SYMBOL=EXPRESSION"), N_("Define a symbol"), TWO_DASHES },
+ '\0', N_("SYMBOL=EXPRESSION"), N_("Define a symbol"), TWO_DASHES },
{ {"demangle", optional_argument, NULL, OPTION_DEMANGLE},
- '\0', N_("[=STYLE]"), N_("Demangle symbol names [using STYLE]"), TWO_DASHES },
+ '\0', N_("[=STYLE]"), N_("Demangle symbol names [using STYLE]"),
+ TWO_DASHES },
{ {"embedded-relocs", no_argument, NULL, OPTION_EMBEDDED_RELOCS},
- '\0', NULL, N_("Generate embedded relocs"), TWO_DASHES},
+ '\0', NULL, N_("Generate embedded relocs"), TWO_DASHES},
+ { {"fatal-warnings", no_argument, NULL, OPTION_WARN_FATAL},
+ '\0', NULL, N_("Treat warnings as errors"),
+ TWO_DASHES },
{ {"fini", required_argument, NULL, OPTION_FINI},
- '\0', N_("SYMBOL"), N_("Call SYMBOL at unload-time"), ONE_DASH },
+ '\0', N_("SYMBOL"), N_("Call SYMBOL at unload-time"), ONE_DASH },
{ {"force-exe-suffix", no_argument, NULL, OPTION_FORCE_EXE_SUFFIX},
- '\0', NULL, N_("Force generation of file with .exe suffix"), TWO_DASHES},
+ '\0', NULL, N_("Force generation of file with .exe suffix"), TWO_DASHES},
{ {"gc-sections", no_argument, NULL, OPTION_GC_SECTIONS},
- '\0', NULL, N_("Remove unused sections (on some targets)"),
- TWO_DASHES },
+ '\0', NULL, N_("Remove unused sections (on some targets)"),
+ TWO_DASHES },
{ {"no-gc-sections", no_argument, NULL, OPTION_NO_GC_SECTIONS},
- '\0', NULL, N_("Don't remove unused sections (default)"),
- TWO_DASHES },
+ '\0', NULL, N_("Don't remove unused sections (default)"),
+ TWO_DASHES },
+ { {"print-gc-sections", no_argument, NULL, OPTION_PRINT_GC_SECTIONS},
+ '\0', NULL, N_("List removed unused sections on stderr"),
+ TWO_DASHES },
+ { {"no-print-gc-sections", no_argument, NULL, OPTION_NO_PRINT_GC_SECTIONS},
+ '\0', NULL, N_("Do not list removed unused sections"),
+ TWO_DASHES },
+ { {"hash-size=<NUMBER>", required_argument, NULL, OPTION_HASH_SIZE},
+ '\0', NULL, N_("Set default hash table size close to <NUMBER>"),
+ TWO_DASHES },
{ {"help", no_argument, NULL, OPTION_HELP},
- '\0', NULL, N_("Print option help"), TWO_DASHES },
+ '\0', NULL, N_("Print option help"), TWO_DASHES },
{ {"init", required_argument, NULL, OPTION_INIT},
- '\0', N_("SYMBOL"), N_("Call SYMBOL at load-time"), ONE_DASH },
+ '\0', N_("SYMBOL"), N_("Call SYMBOL at load-time"), ONE_DASH },
{ {"Map", required_argument, NULL, OPTION_MAP},
- '\0', N_("FILE"), N_("Write a map file"), ONE_DASH },
+ '\0', N_("FILE"), N_("Write a map file"), ONE_DASH },
{ {"no-define-common", no_argument, NULL, OPTION_NO_DEFINE_COMMON},
- '\0', NULL, N_("Do not define Common storage"), TWO_DASHES },
+ '\0', NULL, N_("Do not define Common storage"), TWO_DASHES },
{ {"no-demangle", no_argument, NULL, OPTION_NO_DEMANGLE },
- '\0', NULL, N_("Do not demangle symbol names"), TWO_DASHES },
+ '\0', NULL, N_("Do not demangle symbol names"), TWO_DASHES },
{ {"no-keep-memory", no_argument, NULL, OPTION_NO_KEEP_MEMORY},
- '\0', NULL, N_("Use less memory and more disk I/O"), TWO_DASHES },
+ '\0', NULL, N_("Use less memory and more disk I/O"), TWO_DASHES },
{ {"no-undefined", no_argument, NULL, OPTION_NO_UNDEFINED},
- '\0', NULL, N_("Do not allow unresolved references in object files"), TWO_DASHES },
+ '\0', NULL, N_("Do not allow unresolved references in object files"),
+ TWO_DASHES },
{ {"allow-shlib-undefined", no_argument, NULL, OPTION_ALLOW_SHLIB_UNDEFINED},
- '\0', NULL, N_("Allow unresolved references in shared libaries"), TWO_DASHES },
- { {"no-allow-shlib-undefined", no_argument, NULL, OPTION_NO_ALLOW_SHLIB_UNDEFINED},
- '\0', NULL, N_("Do not allow unresolved references in shared libs"), TWO_DASHES },
- { {"allow-multiple-definition", no_argument, NULL, OPTION_ALLOW_MULTIPLE_DEFINITION},
- '\0', NULL, N_("Allow multiple definitions"), TWO_DASHES },
+ '\0', NULL, N_("Allow unresolved references in shared libaries"),
+ TWO_DASHES },
+ { {"no-allow-shlib-undefined", no_argument, NULL,
+ OPTION_NO_ALLOW_SHLIB_UNDEFINED},
+ '\0', NULL, N_("Do not allow unresolved references in shared libs"),
+ TWO_DASHES },
+ { {"allow-multiple-definition", no_argument, NULL,
+ OPTION_ALLOW_MULTIPLE_DEFINITION},
+ '\0', NULL, N_("Allow multiple definitions"), TWO_DASHES },
{ {"no-undefined-version", no_argument, NULL, OPTION_NO_UNDEFINED_VERSION},
- '\0', NULL, N_("Disallow undefined version"), TWO_DASHES },
+ '\0', NULL, N_("Disallow undefined version"), TWO_DASHES },
+ { {"default-symver", no_argument, NULL, OPTION_DEFAULT_SYMVER},
+ '\0', NULL, N_("Create default symbol version"), TWO_DASHES },
+ { {"default-imported-symver", no_argument, NULL,
+ OPTION_DEFAULT_IMPORTED_SYMVER},
+ '\0', NULL, N_("Create default symbol version for imported symbols"),
+ TWO_DASHES },
{ {"no-warn-mismatch", no_argument, NULL, OPTION_NO_WARN_MISMATCH},
- '\0', NULL, N_("Don't warn about mismatched input files"), TWO_DASHES},
+ '\0', NULL, N_("Don't warn about mismatched input files"), TWO_DASHES},
+ { {"no-warn-search-mismatch", no_argument, NULL,
+ OPTION_NO_WARN_SEARCH_MISMATCH},
+ '\0', NULL, N_("Don't warn on finding an incompatible library"),
+ TWO_DASHES},
{ {"no-whole-archive", no_argument, NULL, OPTION_NO_WHOLE_ARCHIVE},
- '\0', NULL, N_("Turn off --whole-archive"), TWO_DASHES },
+ '\0', NULL, N_("Turn off --whole-archive"), TWO_DASHES },
{ {"noinhibit-exec", no_argument, NULL, OPTION_NOINHIBIT_EXEC},
- '\0', NULL, N_("Create an output file even if errors occur"), TWO_DASHES },
+ '\0', NULL, N_("Create an output file even if errors occur"),
+ TWO_DASHES },
{ {"noinhibit_exec", no_argument, NULL, OPTION_NOINHIBIT_EXEC},
- '\0', NULL, NULL, NO_HELP },
+ '\0', NULL, NULL, NO_HELP },
{ {"nostdlib", no_argument, NULL, OPTION_NOSTDLIB},
- '\0', NULL, N_("Only use library directories specified on\n\t\t\t\tthe command line"), ONE_DASH },
+ '\0', NULL, N_("Only use library directories specified on\n"
+ "\t\t\t\tthe command line"), ONE_DASH },
{ {"oformat", required_argument, NULL, OPTION_OFORMAT},
- '\0', N_("TARGET"), N_("Specify target of output file"), EXACTLY_TWO_DASHES },
+ '\0', N_("TARGET"), N_("Specify target of output file"),
+ EXACTLY_TWO_DASHES },
{ {"qmagic", no_argument, NULL, OPTION_IGNORE},
- '\0', NULL, N_("Ignored for Linux compatibility"), ONE_DASH },
+ '\0', NULL, N_("Ignored for Linux compatibility"), ONE_DASH },
+ { {"reduce-memory-overheads", no_argument, NULL,
+ OPTION_REDUCE_MEMORY_OVERHEADS},
+ '\0', NULL, N_("Reduce memory overheads, possibly taking much longer"),
+ TWO_DASHES },
{ {"relax", no_argument, NULL, OPTION_RELAX},
- '\0', NULL, N_("Relax branches on certain targets"), TWO_DASHES },
+ '\0', NULL, N_("Relax branches on certain targets"), TWO_DASHES },
{ {"retain-symbols-file", required_argument, NULL,
- OPTION_RETAIN_SYMBOLS_FILE},
- '\0', N_("FILE"), N_("Keep only symbols listed in FILE"), TWO_DASHES },
+ OPTION_RETAIN_SYMBOLS_FILE},
+ '\0', N_("FILE"), N_("Keep only symbols listed in FILE"), TWO_DASHES },
{ {"rpath", required_argument, NULL, OPTION_RPATH},
- '\0', N_("PATH"), N_("Set runtime shared library search path"), ONE_DASH },
+ '\0', N_("PATH"), N_("Set runtime shared library search path"), ONE_DASH },
{ {"rpath-link", required_argument, NULL, OPTION_RPATH_LINK},
- '\0', N_("PATH"), N_("Set link time shared library search path"), ONE_DASH },
+ '\0', N_("PATH"), N_("Set link time shared library search path"),
+ ONE_DASH },
{ {"shared", no_argument, NULL, OPTION_SHARED},
- '\0', NULL, N_("Create a shared library"), ONE_DASH },
+ '\0', NULL, N_("Create a shared library"), ONE_DASH },
{ {"Bshareable", no_argument, NULL, OPTION_SHARED }, /* FreeBSD. */
- '\0', NULL, NULL, ONE_DASH },
+ '\0', NULL, NULL, ONE_DASH },
{ {"pie", no_argument, NULL, OPTION_PIE},
- '\0', NULL, N_("Create a position independent executable"), ONE_DASH },
+ '\0', NULL, N_("Create a position independent executable"), ONE_DASH },
{ {"pic-executable", no_argument, NULL, OPTION_PIE},
- '\0', NULL, NULL, TWO_DASHES },
+ '\0', NULL, NULL, TWO_DASHES },
{ {"sort-common", no_argument, NULL, OPTION_SORT_COMMON},
- '\0', NULL, N_("Sort common symbols by size"), TWO_DASHES },
+ '\0', NULL, N_("Sort common symbols by size"), TWO_DASHES },
{ {"sort_common", no_argument, NULL, OPTION_SORT_COMMON},
- '\0', NULL, NULL, NO_HELP },
+ '\0', NULL, NULL, NO_HELP },
+ { {"sort-section", required_argument, NULL, OPTION_SORT_SECTION},
+ '\0', N_("name|alignment"),
+ N_("Sort sections by name or maximum alignment"), TWO_DASHES },
{ {"spare-dynamic-tags", required_argument, NULL, OPTION_SPARE_DYNAMIC_TAGS},
- '\0', N_("COUNT"), N_("How many tags to reserve in .dynamic section"), TWO_DASHES },
+ '\0', N_("COUNT"), N_("How many tags to reserve in .dynamic section"),
+ TWO_DASHES },
{ {"split-by-file", optional_argument, NULL, OPTION_SPLIT_BY_FILE},
- '\0', N_("[=SIZE]"), N_("Split output sections every SIZE octets"), TWO_DASHES },
+ '\0', N_("[=SIZE]"), N_("Split output sections every SIZE octets"),
+ TWO_DASHES },
{ {"split-by-reloc", optional_argument, NULL, OPTION_SPLIT_BY_RELOC},
- '\0', N_("[=COUNT]"), N_("Split output sections every COUNT relocs"), TWO_DASHES },
+ '\0', N_("[=COUNT]"), N_("Split output sections every COUNT relocs"),
+ TWO_DASHES },
{ {"stats", no_argument, NULL, OPTION_STATS},
- '\0', NULL, N_("Print memory usage statistics"), TWO_DASHES },
+ '\0', NULL, N_("Print memory usage statistics"), TWO_DASHES },
{ {"target-help", no_argument, NULL, OPTION_TARGET_HELP},
- '\0', NULL, N_("Display target specific options"), TWO_DASHES },
+ '\0', NULL, N_("Display target specific options"), TWO_DASHES },
{ {"task-link", required_argument, NULL, OPTION_TASK_LINK},
- '\0', N_("SYMBOL"), N_("Do task level linking"), TWO_DASHES },
+ '\0', N_("SYMBOL"), N_("Do task level linking"), TWO_DASHES },
{ {"traditional-format", no_argument, NULL, OPTION_TRADITIONAL_FORMAT},
- '\0', NULL, N_("Use same format as native linker"), TWO_DASHES },
+ '\0', NULL, N_("Use same format as native linker"), TWO_DASHES },
{ {"section-start", required_argument, NULL, OPTION_SECTION_START},
- '\0', N_("SECTION=ADDRESS"), N_("Set address of named section"), TWO_DASHES },
+ '\0', N_("SECTION=ADDRESS"), N_("Set address of named section"),
+ TWO_DASHES },
{ {"Tbss", required_argument, NULL, OPTION_TBSS},
- '\0', N_("ADDRESS"), N_("Set address of .bss section"), ONE_DASH },
+ '\0', N_("ADDRESS"), N_("Set address of .bss section"), ONE_DASH },
{ {"Tdata", required_argument, NULL, OPTION_TDATA},
- '\0', N_("ADDRESS"), N_("Set address of .data section"), ONE_DASH },
+ '\0', N_("ADDRESS"), N_("Set address of .data section"), ONE_DASH },
{ {"Ttext", required_argument, NULL, OPTION_TTEXT},
- '\0', N_("ADDRESS"), N_("Set address of .text section"), ONE_DASH },
- { {"unresolved-symbols=<method>", required_argument, NULL, OPTION_UNRESOLVED_SYMBOLS},
- '\0', NULL, N_("How to handle unresolved symbols. <method> is:\n\t\t\t\tignore-all, report-all, ignore-in-object-files,\n\t\t\t\tignore-in-shared-libs"),
- TWO_DASHES },
+ '\0', N_("ADDRESS"), N_("Set address of .text section"), ONE_DASH },
+ { {"unresolved-symbols=<method>", required_argument, NULL,
+ OPTION_UNRESOLVED_SYMBOLS},
+ '\0', NULL, N_("How to handle unresolved symbols. <method> is:\n"
+ "\t\t\t\tignore-all, report-all, ignore-in-object-files,\n"
+ "\t\t\t\tignore-in-shared-libs"), TWO_DASHES },
{ {"verbose", no_argument, NULL, OPTION_VERBOSE},
- '\0', NULL, N_("Output lots of information during link"), TWO_DASHES },
+ '\0', NULL, N_("Output lots of information during link"), TWO_DASHES },
{ {"dll-verbose", no_argument, NULL, OPTION_VERBOSE}, /* Linux. */
- '\0', NULL, NULL, NO_HELP },
+ '\0', NULL, NULL, NO_HELP },
{ {"version-script", required_argument, NULL, OPTION_VERSION_SCRIPT },
- '\0', N_("FILE"), N_("Read version information script"), TWO_DASHES },
+ '\0', N_("FILE"), N_("Read version information script"), TWO_DASHES },
{ {"version-exports-section", required_argument, NULL,
OPTION_VERSION_EXPORTS_SECTION },
- '\0', N_("SYMBOL"), N_("Take export symbols list from .exports, using\n\t\t\t\tSYMBOL as the version."),
- TWO_DASHES },
+ '\0', N_("SYMBOL"), N_("Take export symbols list from .exports, using\n"
+ "\t\t\t\tSYMBOL as the version."), TWO_DASHES },
+ { {"dynamic-list-data", no_argument, NULL, OPTION_DYNAMIC_LIST_DATA},
+ '\0', NULL, N_("Add data symbols to dynamic list"), TWO_DASHES },
+ { {"dynamic-list-cpp-new", no_argument, NULL, OPTION_DYNAMIC_LIST_CPP_NEW},
+ '\0', NULL, N_("Use C++ operator new/delete dynamic list"), TWO_DASHES },
+ { {"dynamic-list-cpp-typeinfo", no_argument, NULL, OPTION_DYNAMIC_LIST_CPP_TYPEINFO},
+ '\0', NULL, N_("Use C++ typeinfo dynamic list"), TWO_DASHES },
+ { {"dynamic-list", required_argument, NULL, OPTION_DYNAMIC_LIST},
+ '\0', N_("FILE"), N_("Read dynamic list"), TWO_DASHES },
{ {"warn-common", no_argument, NULL, OPTION_WARN_COMMON},
- '\0', NULL, N_("Warn about duplicate common symbols"), TWO_DASHES },
+ '\0', NULL, N_("Warn about duplicate common symbols"), TWO_DASHES },
{ {"warn-constructors", no_argument, NULL, OPTION_WARN_CONSTRUCTORS},
- '\0', NULL, N_("Warn if global constructors/destructors are seen"),
- TWO_DASHES },
+ '\0', NULL, N_("Warn if global constructors/destructors are seen"),
+ TWO_DASHES },
{ {"warn-multiple-gp", no_argument, NULL, OPTION_WARN_MULTIPLE_GP},
- '\0', NULL, N_("Warn if the multiple GP values are used"), TWO_DASHES },
+ '\0', NULL, N_("Warn if the multiple GP values are used"), TWO_DASHES },
{ {"warn-once", no_argument, NULL, OPTION_WARN_ONCE},
- '\0', NULL, N_("Warn only once per undefined symbol"), TWO_DASHES },
+ '\0', NULL, N_("Warn only once per undefined symbol"), TWO_DASHES },
{ {"warn-section-align", no_argument, NULL, OPTION_WARN_SECTION_ALIGN},
- '\0', NULL, N_("Warn if start of section changes due to alignment"),
- TWO_DASHES },
- { {"warn-unresolved-symbols", no_argument, NULL, OPTION_WARN_UNRESOLVED_SYMBOLS},
+ '\0', NULL, N_("Warn if start of section changes due to alignment"),
+ TWO_DASHES },
+ { {"warn-shared-textrel", no_argument, NULL, OPTION_WARN_SHARED_TEXTREL},
+ '\0', NULL, N_("Warn if shared object has DT_TEXTREL"),
+ TWO_DASHES },
+ { {"warn-unresolved-symbols", no_argument, NULL,
+ OPTION_WARN_UNRESOLVED_SYMBOLS},
'\0', NULL, N_("Report unresolved symbols as warnings"), TWO_DASHES },
- { {"error-unresolved-symbols", no_argument, NULL, OPTION_ERROR_UNRESOLVED_SYMBOLS},
+ { {"error-unresolved-symbols", no_argument, NULL,
+ OPTION_ERROR_UNRESOLVED_SYMBOLS},
'\0', NULL, N_("Report unresolved symbols as errors"), TWO_DASHES },
- { {"fatal-warnings", no_argument, NULL, OPTION_WARN_FATAL},
- '\0', NULL, N_("Treat warnings as errors"),
- TWO_DASHES },
{ {"whole-archive", no_argument, NULL, OPTION_WHOLE_ARCHIVE},
- '\0', NULL, N_("Include all objects from following archives"), TWO_DASHES },
- { {"as-needed", no_argument, NULL, OPTION_AS_NEEDED},
- '\0', NULL, N_("Only set DT_NEEDED for following dynamic libs if used"), TWO_DASHES },
- { {"no-as-needed", no_argument, NULL, OPTION_NO_AS_NEEDED},
- '\0', NULL, N_("Always set DT_NEEDED for following dynamic libs"), TWO_DASHES },
+ '\0', NULL, N_("Include all objects from following archives"),
+ TWO_DASHES },
{ {"wrap", required_argument, NULL, OPTION_WRAP},
- '\0', N_("SYMBOL"), N_("Use wrapper functions for SYMBOL"), TWO_DASHES }
+ '\0', N_("SYMBOL"), N_("Use wrapper functions for SYMBOL"), TWO_DASHES },
};
#define OPTION_COUNT ARRAY_SIZE (ld_options)
@@ -593,6 +699,8 @@ parse_args (unsigned argc, char **argv)
{
case '?':
einfo (_("%P: unrecognized option '%s'\n"), argv[last_optind]);
+ /* Fall through. */
+
default:
einfo (_("%P%F: use the --help option for usage information\n"));
@@ -678,6 +786,9 @@ parse_args (unsigned argc, char **argv)
case OPTION_DYNAMIC_LINKER:
command_line.interpreter = optarg;
break;
+ case OPTION_SYSROOT:
+ /* Already handled in ldmain.c. */
+ break;
case OPTION_EB:
command_line.endian = ENDIAN_BIG;
break;
@@ -734,7 +845,10 @@ parse_args (unsigned argc, char **argv)
/* Ignore. */
break;
case OPTION_GC_SECTIONS:
- command_line.gc_sections = TRUE;
+ link_info.gc_sections = TRUE;
+ break;
+ case OPTION_PRINT_GC_SECTIONS:
+ link_info.print_gc_sections = TRUE;
break;
case OPTION_HELP:
help ();
@@ -777,19 +891,24 @@ parse_args (unsigned argc, char **argv)
demangling = FALSE;
break;
case OPTION_NO_GC_SECTIONS:
- command_line.gc_sections = FALSE;
+ link_info.gc_sections = FALSE;
+ break;
+ case OPTION_NO_PRINT_GC_SECTIONS:
+ link_info.print_gc_sections = FALSE;
break;
case OPTION_NO_KEEP_MEMORY:
link_info.keep_memory = FALSE;
break;
case OPTION_NO_UNDEFINED:
- link_info.unresolved_syms_in_objects = how_to_report_unresolved_symbols;
+ link_info.unresolved_syms_in_objects
+ = how_to_report_unresolved_symbols;
break;
case OPTION_ALLOW_SHLIB_UNDEFINED:
link_info.unresolved_syms_in_shared_libs = RM_IGNORE;
break;
case OPTION_NO_ALLOW_SHLIB_UNDEFINED:
- link_info.unresolved_syms_in_shared_libs = how_to_report_unresolved_symbols;
+ link_info.unresolved_syms_in_shared_libs
+ = how_to_report_unresolved_symbols;
break;
case OPTION_UNRESOLVED_SYMBOLS:
if (strcmp (optarg, "ignore-all") == 0)
@@ -799,17 +918,21 @@ parse_args (unsigned argc, char **argv)
}
else if (strcmp (optarg, "report-all") == 0)
{
- link_info.unresolved_syms_in_objects = how_to_report_unresolved_symbols;
- link_info.unresolved_syms_in_shared_libs = how_to_report_unresolved_symbols;
+ link_info.unresolved_syms_in_objects
+ = how_to_report_unresolved_symbols;
+ link_info.unresolved_syms_in_shared_libs
+ = how_to_report_unresolved_symbols;
}
else if (strcmp (optarg, "ignore-in-object-files") == 0)
{
link_info.unresolved_syms_in_objects = RM_IGNORE;
- link_info.unresolved_syms_in_shared_libs = how_to_report_unresolved_symbols;
+ link_info.unresolved_syms_in_shared_libs
+ = how_to_report_unresolved_symbols;
}
else if (strcmp (optarg, "ignore-in-shared-libs") == 0)
{
- link_info.unresolved_syms_in_objects = how_to_report_unresolved_symbols;
+ link_info.unresolved_syms_in_objects
+ = how_to_report_unresolved_symbols;
link_info.unresolved_syms_in_shared_libs = RM_IGNORE;
}
else
@@ -822,23 +945,32 @@ parse_args (unsigned argc, char **argv)
if (link_info.unresolved_syms_in_shared_libs == RM_GENERATE_ERROR)
link_info.unresolved_syms_in_shared_libs = RM_GENERATE_WARNING;
break;
-
+
case OPTION_ERROR_UNRESOLVED_SYMBOLS:
how_to_report_unresolved_symbols = RM_GENERATE_ERROR;
if (link_info.unresolved_syms_in_objects == RM_GENERATE_WARNING)
link_info.unresolved_syms_in_objects = RM_GENERATE_ERROR;
if (link_info.unresolved_syms_in_shared_libs == RM_GENERATE_WARNING)
link_info.unresolved_syms_in_shared_libs = RM_GENERATE_ERROR;
- break;
+ break;
case OPTION_ALLOW_MULTIPLE_DEFINITION:
link_info.allow_multiple_definition = TRUE;
break;
case OPTION_NO_UNDEFINED_VERSION:
link_info.allow_undefined_version = FALSE;
break;
+ case OPTION_DEFAULT_SYMVER:
+ link_info.create_default_symver = TRUE;
+ break;
+ case OPTION_DEFAULT_IMPORTED_SYMVER:
+ link_info.default_imported_symver = TRUE;
+ break;
case OPTION_NO_WARN_MISMATCH:
command_line.warn_mismatch = FALSE;
break;
+ case OPTION_NO_WARN_SEARCH_MISMATCH:
+ command_line.warn_search_mismatch = FALSE;
+ break;
case OPTION_NOINHIBIT_EXEC:
force_make_executable = TRUE;
break;
@@ -920,17 +1052,14 @@ parse_args (unsigned argc, char **argv)
/* First see whether OPTARG is already in the path. */
do
{
- size_t idx = 0;
-
- while (optarg[idx] != '\0' && optarg[idx] == cp[idx])
- ++idx;
- if (optarg[idx] == '\0'
- && (cp[idx] == '\0' || cp[idx] == ':'))
+ if (strncmp (optarg, cp, optarg_len) == 0
+ && (cp[optarg_len] == 0
+ || cp[optarg_len] == config.rpath_separator))
/* We found it. */
break;
/* Not yet found. */
- cp = strchr (cp, ':');
+ cp = strchr (cp, config.rpath_separator);
if (cp != NULL)
++cp;
}
@@ -939,7 +1068,8 @@ parse_args (unsigned argc, char **argv)
if (cp == NULL)
{
buf = xmalloc (rpath_len + optarg_len + 2);
- sprintf (buf, "%s:%s", command_line.rpath, optarg);
+ sprintf (buf, "%s%c%s", command_line.rpath,
+ config.rpath_separator, optarg);
free (command_line.rpath);
command_line.rpath = buf;
}
@@ -955,7 +1085,8 @@ parse_args (unsigned argc, char **argv)
buf = xmalloc (strlen (command_line.rpath_link)
+ strlen (optarg)
+ 2);
- sprintf (buf, "%s:%s", command_line.rpath_link, optarg);
+ sprintf (buf, "%s%c%s", command_line.rpath_link,
+ config.rpath_separator, optarg);
free (command_line.rpath_link);
command_line.rpath_link = buf;
}
@@ -1008,11 +1139,23 @@ parse_args (unsigned argc, char **argv)
case OPTION_SORT_COMMON:
config.sort_common = TRUE;
break;
+ case OPTION_SORT_SECTION:
+ if (strcmp (optarg, N_("name")) == 0)
+ sort_section = by_name;
+ else if (strcmp (optarg, N_("alignment")) == 0)
+ sort_section = by_alignment;
+ else
+ einfo (_("%P%F: invalid section sorting option: %s\n"),
+ optarg);
+ break;
case OPTION_STATS:
config.stats = TRUE;
break;
case OPTION_SYMBOLIC:
- link_info.symbolic = TRUE;
+ command_line.symbolic = symbolic;
+ break;
+ case OPTION_SYMBOLIC_FUNCTIONS:
+ command_line.symbolic = symbolic_functions;
break;
case 't':
trace_files = TRUE;
@@ -1022,6 +1165,9 @@ parse_args (unsigned argc, char **argv)
parser_input = input_script;
yyparse ();
break;
+ case OPTION_DEFAULT_SCRIPT:
+ command_line.default_script = optarg;
+ break;
case OPTION_SECTION_START:
{
char *optarg2;
@@ -1031,13 +1177,15 @@ parse_args (unsigned argc, char **argv)
/* Check for <something>=<somthing>... */
optarg2 = strchr (optarg, '=');
if (optarg2 == NULL)
- einfo (_("%P%F: invalid argument to option \"--section-start\"\n"));
+ einfo (_("%P%F: invalid argument to option"
+ " \"--section-start\"\n"));
optarg2++;
/* So far so good. Are all the args present? */
if ((*optarg == '\0') || (*optarg2 == '\0'))
- einfo (_("%P%F: missing argument(s) to option \"--section-start\"\n"));
+ einfo (_("%P%F: missing argument(s) to option"
+ " \"--section-start\"\n"));
/* We must copy the section name as set_section_start
doesn't do it for us. */
@@ -1055,13 +1203,13 @@ parse_args (unsigned argc, char **argv)
ldemul_list_emulation_options (stdout);
exit (0);
case OPTION_TBSS:
- set_section_start (".bss", optarg);
+ set_segment_start (".bss", optarg);
break;
case OPTION_TDATA:
- set_section_start (".data", optarg);
+ set_segment_start (".data", optarg);
break;
case OPTION_TTEXT:
- set_section_start (".text", optarg);
+ set_segment_start (".text", optarg);
break;
case OPTION_TRADITIONAL_FORMAT:
link_info.traditional_format = TRUE;
@@ -1123,6 +1271,43 @@ parse_args (unsigned argc, char **argv)
.exports sections. */
command_line.version_exports_section = optarg;
break;
+ case OPTION_DYNAMIC_LIST_DATA:
+ command_line.dynamic_list = dynamic_list_data;
+ if (command_line.symbolic == symbolic)
+ command_line.symbolic = symbolic_unset;
+ break;
+ case OPTION_DYNAMIC_LIST_CPP_TYPEINFO:
+ lang_append_dynamic_list_cpp_typeinfo ();
+ if (command_line.dynamic_list != dynamic_list_data)
+ command_line.dynamic_list = dynamic_list;
+ if (command_line.symbolic == symbolic)
+ command_line.symbolic = symbolic_unset;
+ break;
+ case OPTION_DYNAMIC_LIST_CPP_NEW:
+ lang_append_dynamic_list_cpp_new ();
+ if (command_line.dynamic_list != dynamic_list_data)
+ command_line.dynamic_list = dynamic_list;
+ if (command_line.symbolic == symbolic)
+ command_line.symbolic = symbolic_unset;
+ break;
+ case OPTION_DYNAMIC_LIST:
+ /* This option indicates a small script that only specifies
+ a dynamic list. Read it, but don't assume that we've
+ seen a linker script. */
+ {
+ FILE *hold_script_handle;
+
+ hold_script_handle = saved_script_handle;
+ ldfile_open_command_file (optarg);
+ saved_script_handle = hold_script_handle;
+ parser_input = input_dynamic_list;
+ yyparse ();
+ }
+ if (command_line.dynamic_list != dynamic_list_data)
+ command_line.dynamic_list = dynamic_list;
+ if (command_line.symbolic == symbolic)
+ command_line.symbolic = symbolic_unset;
+ break;
case OPTION_WARN_COMMON:
config.warn_common = TRUE;
break;
@@ -1141,9 +1326,18 @@ parse_args (unsigned argc, char **argv)
case OPTION_WARN_SECTION_ALIGN:
config.warn_section_align = TRUE;
break;
+ case OPTION_WARN_SHARED_TEXTREL:
+ link_info.warn_shared_textrel = TRUE;
+ break;
case OPTION_WHOLE_ARCHIVE:
whole_archive = TRUE;
break;
+ case OPTION_ADD_NEEDED:
+ add_needed = TRUE;
+ break;
+ case OPTION_NO_ADD_NEEDED:
+ add_needed = FALSE;
+ break;
case OPTION_AS_NEEDED:
/* XXX: --as-needed is broken on powerpc64 */
#ifndef __powerpc64__
@@ -1166,7 +1360,7 @@ parse_args (unsigned argc, char **argv)
link_info.discard = discard_all;
break;
case 'Y':
- if (strncmp (optarg, "P,", 2) == 0)
+ if (CONST_STRNEQ (optarg, "P,"))
optarg += 2;
if (default_dirlist != NULL)
free (default_dirlist);
@@ -1224,6 +1418,24 @@ parse_args (unsigned argc, char **argv)
case OPTION_FINI:
link_info.fini_function = optarg;
break;
+
+ case OPTION_REDUCE_MEMORY_OVERHEADS:
+ link_info.reduce_memory_overheads = TRUE;
+ if (config.hash_table_size == 0)
+ config.hash_table_size = 1021;
+ break;
+
+ case OPTION_HASH_SIZE:
+ {
+ bfd_size_type new_size;
+
+ new_size = strtoul (optarg, NULL, 0);
+ if (new_size)
+ config.hash_table_size = new_size;
+ else
+ einfo (_("%P%X: --hash-size needs a numeric argument\n"));
+ }
+ break;
}
}
@@ -1239,7 +1451,7 @@ parse_args (unsigned argc, char **argv)
if (link_info.unresolved_syms_in_objects == RM_NOT_YET_SET)
/* FIXME: Should we allow emulations a chance to set this ? */
link_info.unresolved_syms_in_objects = how_to_report_unresolved_symbols;
-
+
if (link_info.unresolved_syms_in_shared_libs == RM_NOT_YET_SET)
/* FIXME: Should we allow emulations a chance to set this ? */
link_info.unresolved_syms_in_shared_libs = how_to_report_unresolved_symbols;
@@ -1273,8 +1485,44 @@ set_section_start (char *sect, char *valstr)
bfd_vma val = bfd_scan_vma (valstr, &end, 16);
if (*end)
einfo (_("%P%F: invalid hex number `%s'\n"), valstr);
- lang_section_start (sect, exp_intop (val));
+ lang_section_start (sect, exp_intop (val), NULL);
}
+
+static void
+set_segment_start (const char *section, char *valstr)
+{
+ const char *name;
+ const char *end;
+ segment_type *seg;
+
+ bfd_vma val = bfd_scan_vma (valstr, &end, 16);
+ if (*end)
+ einfo (_("%P%F: invalid hex number `%s'\n"), valstr);
+ /* If we already have an entry for this segment, update the existing
+ value. */
+ name = section + 1;
+ for (seg = segments; seg; seg = seg->next)
+ if (strcmp (seg->name, name) == 0)
+ {
+ seg->value = val;
+ return;
+ }
+ /* There was no existing value so we must create a new segment
+ entry. */
+ seg = stat_alloc (sizeof (*seg));
+ seg->name = name;
+ seg->value = val;
+ seg->used = FALSE;
+ /* Add it to the linked list of segments. */
+ seg->next = segments;
+ segments = seg;
+ /* Historically, -Ttext and friends set the base address of a
+ particular section. For backwards compatibility, we still do
+ that. If a SEGMENT_START directive is seen, the section address
+ assignment will be disabled. */
+ lang_section_start (section, exp_intop (val), seg);
+}
+
/* Print help messages for the options. */
@@ -1283,6 +1531,7 @@ help (void)
{
unsigned i;
const char **targets, **pp;
+ int len;
printf (_("Usage: %s [options] file...\n"), program_name);
@@ -1292,7 +1541,6 @@ help (void)
if (ld_options[i].doc != NULL)
{
bfd_boolean comma;
- int len;
unsigned j;
printf (" ");
@@ -1365,6 +1613,10 @@ help (void)
printf ("%s\n", _(ld_options[i].doc));
}
}
+ printf (_(" @FILE"));
+ for (len = strlen (" @FILE"); len < 30; len++)
+ putchar (' ');
+ printf (_("Read options from FILE\n"));
/* Note: Various tools (such as libtool) depend upon the
format of the listings below - do not change them. */
@@ -1386,5 +1638,6 @@ help (void)
ldemul_list_emulation_options (stdout);
printf ("\n");
- printf (_("Report bugs to %s\n"), REPORT_BUGS_TO);
+ if (REPORT_BUGS_TO[0])
+ printf (_("Report bugs to %s\n"), REPORT_BUGS_TO);
}
diff --git a/contrib/binutils/ld/mri.c b/contrib/binutils/ld/mri.c
index f7edd88..8fe0160 100644
--- a/contrib/binutils/ld/mri.c
+++ b/contrib/binutils/ld/mri.c
@@ -1,6 +1,6 @@
/* mri.c -- handle MRI style linker scripts
- Copyright 1991, 1992, 1993, 1994, 1996, 1997, 1998, 1999, 2000, 2002,
- 2003, 2004 Free Software Foundation, Inc.
+ Copyright 1991, 1992, 1993, 1994, 1996, 1997, 1998, 1999, 2000, 2001,
+ 2002, 2003, 2004, 2005, 2007 Free Software Foundation, Inc.
This file is part of GLD, the Gnu Linker.
@@ -16,16 +16,16 @@ 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.
+Software Foundation, 51 Franklin Street - Fifth Floor, Boston, MA
+02110-1301, USA.
This bit does the tree decoration when MRI style link scripts
are parsed.
Contributed by Steve Chamberlain <sac@cygnus.com>. */
-#include "bfd.h"
#include "sysdep.h"
+#include "bfd.h"
#include "ld.h"
#include "ldexp.h"
#include "ldlang.h"
@@ -44,14 +44,14 @@ struct section_name_struct {
int ok_to_load;
};
-unsigned int symbol_truncate = 10000;
-struct section_name_struct *order;
-struct section_name_struct *only_load;
-struct section_name_struct *address;
-struct section_name_struct *alias;
+static unsigned int symbol_truncate = 10000;
+static struct section_name_struct *order;
+static struct section_name_struct *only_load;
+static struct section_name_struct *address;
+static struct section_name_struct *alias;
-struct section_name_struct *alignment;
-struct section_name_struct *subalignment;
+static struct section_name_struct *alignment;
+static struct section_name_struct *subalignment;
static struct section_name_struct **
lookup (const char *name, struct section_name_struct **list)
@@ -120,19 +120,6 @@ mri_draw_tree (void)
if (done_tree)
return;
-#if 0 /* We don't bother with memory regions. */
- /* Create the regions. */
- {
- lang_memory_region_type *r;
-
- r = lang_memory_region_lookup("long");
- r->current = r->origin = exp_get_vma (base, (bfd_vma)0, "origin",
- lang_first_phase_enum);
- r->length = (bfd_size_type) exp_get_vma (0, ~(bfd_vma) 0, "length",
- lang_first_phase_enum);
- }
-#endif
-
/* Now build the statements for the ldlang machine. */
/* Attach the addresses of any which have addresses,
@@ -220,13 +207,13 @@ mri_draw_tree (void)
lang_enter_output_section_statement (p->name, base,
p->ok_to_load ? 0 : noload_section,
- align, subalign, NULL);
+ align, subalign, NULL, 0);
base = 0;
tmp = xmalloc (sizeof *tmp);
tmp->next = NULL;
tmp->spec.name = p->name;
tmp->spec.exclude_name_list = NULL;
- tmp->spec.sorted = FALSE;
+ tmp->spec.sorted = none;
lang_add_wild (NULL, tmp, FALSE);
/* If there is an alias for this section, add it too. */
@@ -237,7 +224,7 @@ mri_draw_tree (void)
tmp->next = NULL;
tmp->spec.name = aptr->name;
tmp->spec.exclude_name_list = NULL;
- tmp->spec.sorted = FALSE;
+ tmp->spec.sorted = none;
lang_add_wild (NULL, tmp, FALSE);
}
@@ -255,9 +242,6 @@ mri_load (const char *name)
{
base = 0;
lang_add_input_file (name, lang_input_file_is_file_enum, NULL);
-#if 0
- lang_leave_output_section_statement (0, "*default*");
-#endif
}
void
diff --git a/contrib/binutils/ld/mri.h b/contrib/binutils/ld/mri.h
index b430d20..fcfba78 100644
--- a/contrib/binutils/ld/mri.h
+++ b/contrib/binutils/ld/mri.h
@@ -15,13 +15,11 @@ 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. */
+Foundation, Inc., 51 Franklin Street - Fifth Floor, Boston, MA 02110-1301, USA. */
#ifndef MRI_H
#define MRI_H
-extern unsigned int symbol_truncate;
-
extern void mri_output_section (const char *, etree_type *);
extern void mri_only_load (const char *);
extern void mri_base (etree_type *);
diff --git a/contrib/binutils/ld/pe-dll.c b/contrib/binutils/ld/pe-dll.c
index 45d00ae..ab743ee 100644
--- a/contrib/binutils/ld/pe-dll.c
+++ b/contrib/binutils/ld/pe-dll.c
@@ -1,5 +1,5 @@
/* Routines to help build PEI-format DLLs (Win32 etc)
- Copyright 1998, 1999, 2000, 2001, 2002, 2003, 2004
+ Copyright 1998, 1999, 2000, 2001, 2002, 2003, 2004, 2005, 2006, 2007
Free Software Foundation, Inc.
Written by DJ Delorie <dj@cygnus.com>
@@ -17,11 +17,11 @@
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. */
+ Software Foundation, 51 Franklin Street - Fifth Floor, Boston, MA
+ 02110-1301, USA. */
-#include "bfd.h"
#include "sysdep.h"
+#include "bfd.h"
#include "bfdlink.h"
#include "libiberty.h"
#include "safe-ctype.h"
@@ -42,6 +42,29 @@
#include "deffile.h"
#include "pe-dll.h"
+#ifdef pe_use_x86_64
+
+#define PE_IDATA4_SIZE 8
+#define PE_IDATA5_SIZE 8
+#include "pep-dll.h"
+#undef AOUTSZ
+#define AOUTSZ PEPAOUTSZ
+#define PEAOUTHDR PEPAOUTHDR
+
+#else
+
+#include "pe-dll.h"
+
+#endif
+
+#ifndef PE_IDATA4_SIZE
+#define PE_IDATA4_SIZE 4
+#endif
+
+#ifndef PE_IDATA5_SIZE
+#define PE_IDATA5_SIZE 4
+#endif
+
/* This file turns a regular Windows PE image into a DLL. Because of
the complexity of this operation, it has been broken down into a
number of separate modules which are all called by the main function
@@ -49,7 +72,7 @@
normally only called once, so static variables are used to reduce
the number of parameters and return values required.
- See also: ld/emultempl/pe.em. */
+ See also: ld/emultempl/pe.em and ld/emultempl/pep.em. */
/* Auto-import feature by Paul Sokolovsky
@@ -95,13 +118,13 @@
For each reference of data symbol to be imported from DLL (to set of which
belong symbols with name <sym>, if __imp_<sym> is found in implib), the
import fixup entry is generated. That entry is of type
- IMAGE_IMPORT_DESCRIPTOR and stored in .idata$3 subsection. Each
+ IMAGE_IMPORT_DESCRIPTOR and stored in .idata$2 subsection. Each
fixup entry contains pointer to symbol's address within .text section
(marked with __fuN_<sym> symbol, where N is integer), pointer to DLL name
(so, DLL name is referenced by multiple entries), and pointer to symbol
name thunk. Symbol name thunk is singleton vector (__nm_th_<symbol>)
pointing to IMAGE_IMPORT_BY_NAME structure (__nm_<symbol>) directly
- containing imported name. Here comes that "om the edge" problem mentioned
+ containing imported name. Here comes that "on the edge" problem mentioned
above: PE specification rambles that name vector (OriginalFirstThunk)
should run in parallel with addresses vector (FirstThunk), i.e. that they
should have same number of elements and terminated with zero. We violate
@@ -119,7 +142,7 @@
not, prohibiting that (detecting violation) would require more work on
behalf of loader than not doing it.
- See also: ld/emultempl/pe.em. */
+ See also: ld/emultempl/pe.em and ld/emultempl/pep.em. */
static void add_bfd_to_link (bfd *, const char *, struct bfd_link_info *);
@@ -144,38 +167,87 @@ static size_t edata_sz, reloc_sz;
static int runtime_pseudo_relocs_created = 0;
typedef struct
- {
- char *target_name;
- char *object_target;
- unsigned int imagebase_reloc;
- int pe_arch;
- int bfd_arch;
- int underscored;
- }
-pe_details_type;
+{
+ const char *name;
+ int len;
+}
+autofilter_entry_type;
typedef struct
- {
- char *name;
- int len;
- }
-autofilter_entry_type;
+{
+ const char *target_name;
+ const char *object_target;
+ unsigned int imagebase_reloc;
+ int pe_arch;
+ int bfd_arch;
+ bfd_boolean underscored;
+ const autofilter_entry_type* autofilter_symbollist;
+}
+pe_details_type;
-#define PE_ARCH_i386 1
-#define PE_ARCH_sh 2
-#define PE_ARCH_mips 3
-#define PE_ARCH_arm 4
+static const autofilter_entry_type autofilter_symbollist_generic[] =
+{
+ { STRING_COMMA_LEN (".text") },
+ /* Entry point symbols. */
+ { STRING_COMMA_LEN ("DllMain") },
+ { STRING_COMMA_LEN ("DllMainCRTStartup") },
+ { STRING_COMMA_LEN ("_DllMainCRTStartup") },
+ /* Runtime pseudo-reloc. */
+ { STRING_COMMA_LEN ("_pei386_runtime_relocator") },
+ { STRING_COMMA_LEN ("do_pseudo_reloc") },
+ { STRING_COMMA_LEN (NULL) }
+};
+
+static const autofilter_entry_type autofilter_symbollist_i386[] =
+{
+ { STRING_COMMA_LEN (".text") },
+ /* Entry point symbols, and entry hooks. */
+ { STRING_COMMA_LEN ("cygwin_crt0") },
+ { STRING_COMMA_LEN ("DllMain@12") },
+ { STRING_COMMA_LEN ("DllEntryPoint@0") },
+ { STRING_COMMA_LEN ("DllMainCRTStartup@12") },
+ { STRING_COMMA_LEN ("_cygwin_dll_entry@12") },
+ { STRING_COMMA_LEN ("_cygwin_crt0_common@8") },
+ { STRING_COMMA_LEN ("_cygwin_noncygwin_dll_entry@12") },
+ { STRING_COMMA_LEN ("cygwin_attach_dll") },
+ { STRING_COMMA_LEN ("cygwin_premain0") },
+ { STRING_COMMA_LEN ("cygwin_premain1") },
+ { STRING_COMMA_LEN ("cygwin_premain2") },
+ { STRING_COMMA_LEN ("cygwin_premain3") },
+ /* Runtime pseudo-reloc. */
+ { STRING_COMMA_LEN ("_pei386_runtime_relocator") },
+ { STRING_COMMA_LEN ("do_pseudo_reloc") },
+ /* Global vars that should not be exported. */
+ { STRING_COMMA_LEN ("impure_ptr") },
+ { STRING_COMMA_LEN ("_impure_ptr") },
+ { STRING_COMMA_LEN ("_fmode") },
+ { STRING_COMMA_LEN ("environ") },
+ { STRING_COMMA_LEN (NULL) }
+};
+
+#define PE_ARCH_i386 1
+#define PE_ARCH_sh 2
+#define PE_ARCH_mips 3
+#define PE_ARCH_arm 4
#define PE_ARCH_arm_epoc 5
+#define PE_ARCH_arm_wince 6
-static pe_details_type pe_detail_list[] =
+static const pe_details_type pe_detail_list[] =
{
{
+#ifdef pe_use_x86_64
+ "pei-x86-64",
+ "pe-x86-64",
+ 3 /* R_IMAGEBASE */,
+#else
"pei-i386",
"pe-i386",
7 /* R_IMAGEBASE */,
+#endif
PE_ARCH_i386,
bfd_arch_i386,
- 1
+ TRUE,
+ autofilter_symbollist_i386
},
{
"pei-shl",
@@ -183,7 +255,8 @@ static pe_details_type pe_detail_list[] =
16 /* R_SH_IMAGEBASE */,
PE_ARCH_sh,
bfd_arch_sh,
- 1
+ TRUE,
+ autofilter_symbollist_generic
},
{
"pei-mips",
@@ -191,7 +264,8 @@ static pe_details_type pe_detail_list[] =
34 /* MIPS_R_RVA */,
PE_ARCH_mips,
bfd_arch_mips,
- 0
+ FALSE,
+ autofilter_symbollist_generic
},
{
"pei-arm-little",
@@ -199,7 +273,8 @@ static pe_details_type pe_detail_list[] =
11 /* ARM_RVA32 */,
PE_ARCH_arm,
bfd_arch_arm,
- 1
+ TRUE,
+ autofilter_symbollist_generic
},
{
"epoc-pei-arm-little",
@@ -207,83 +282,72 @@ static pe_details_type pe_detail_list[] =
11 /* ARM_RVA32 */,
PE_ARCH_arm_epoc,
bfd_arch_arm,
- 0
+ FALSE,
+ autofilter_symbollist_generic
+ },
+ {
+ "pei-arm-wince-little",
+ "pe-arm-wince-little",
+ 2, /* ARM_RVA32 on Windows CE, see bfd/coff-arm.c. */
+ PE_ARCH_arm_wince,
+ bfd_arch_arm,
+ FALSE,
+ autofilter_symbollist_generic
},
- { NULL, NULL, 0, 0, 0, 0 }
+ { NULL, NULL, 0, 0, 0, FALSE, NULL }
};
-static pe_details_type *pe_details;
-
-static autofilter_entry_type autofilter_symbollist[] =
-{
- { "DllMain@12", 10 },
- { "DllEntryPoint@0", 15 },
- { "DllMainCRTStartup@12", 20 },
- { "_cygwin_dll_entry@12", 20 },
- { "_cygwin_crt0_common@8", 21 },
- { "_cygwin_noncygwin_dll_entry@12", 30 },
- { "impure_ptr", 10 },
- { "_pei386_runtime_relocator", 25 },
- { "do_pseudo_reloc", 15 },
- { "cygwin_crt0", 11 },
- { NULL, 0 }
-};
+static const pe_details_type *pe_details;
/* Do not specify library suffix explicitly, to allow for dllized versions. */
-static autofilter_entry_type autofilter_liblist[] =
+static const autofilter_entry_type autofilter_liblist[] =
{
- { "libcygwin", 9 },
- { "libgcc", 6 },
- { "libstdc++", 9 },
- { "libmingw32", 10 },
- { "libmingwex", 10 },
- { "libg2c", 6 },
- { "libsupc++", 9 },
- { "libobjc", 7 },
- { "libgcj", 6 },
- { NULL, 0 }
+ { STRING_COMMA_LEN ("libcegcc") },
+ { STRING_COMMA_LEN ("libcygwin") },
+ { STRING_COMMA_LEN ("libgcc") },
+ { STRING_COMMA_LEN ("libstdc++") },
+ { STRING_COMMA_LEN ("libmingw32") },
+ { STRING_COMMA_LEN ("libmingwex") },
+ { STRING_COMMA_LEN ("libg2c") },
+ { STRING_COMMA_LEN ("libsupc++") },
+ { STRING_COMMA_LEN ("libobjc") },
+ { STRING_COMMA_LEN ("libgcj") },
+ { STRING_COMMA_LEN (NULL) }
};
-static autofilter_entry_type autofilter_objlist[] =
+static const autofilter_entry_type autofilter_objlist[] =
{
- { "crt0.o", 6 },
- { "crt1.o", 6 },
- { "crt2.o", 6 },
- { "dllcrt1.o", 9 },
- { "dllcrt2.o", 9 },
- { "gcrt0.o", 7 },
- { "gcrt1.o", 7 },
- { "gcrt2.o", 7 },
- { "crtbegin.o", 10 },
- { "crtend.o", 8 },
- { NULL, 0 }
+ { STRING_COMMA_LEN ("crt0.o") },
+ { STRING_COMMA_LEN ("crt1.o") },
+ { STRING_COMMA_LEN ("crt2.o") },
+ { STRING_COMMA_LEN ("dllcrt1.o") },
+ { STRING_COMMA_LEN ("dllcrt2.o") },
+ { STRING_COMMA_LEN ("gcrt0.o") },
+ { STRING_COMMA_LEN ("gcrt1.o") },
+ { STRING_COMMA_LEN ("gcrt2.o") },
+ { STRING_COMMA_LEN ("crtbegin.o") },
+ { STRING_COMMA_LEN ("crtend.o") },
+ { STRING_COMMA_LEN (NULL) }
};
-static autofilter_entry_type autofilter_symbolprefixlist[] =
+static const autofilter_entry_type autofilter_symbolprefixlist[] =
{
- /* { "__imp_", 6 }, */
- /* Do __imp_ explicitly to save time. */
- { "__rtti_", 7 },
+ /* _imp_ is treated specially, as it is always underscored. */
+ /* { STRING_COMMA_LEN ("_imp_") }, */
+ /* Don't export some c++ symbols. */
+ { STRING_COMMA_LEN ("__rtti_") },
+ { STRING_COMMA_LEN ("__builtin_") },
/* Don't re-export auto-imported symbols. */
- { "_nm_", 4 },
- { "__builtin_", 10 },
+ { STRING_COMMA_LEN ("_nm_") },
/* Don't export symbols specifying internal DLL layout. */
- { "_head_", 6 },
- { "_fmode", 6 },
- { "_impure_ptr", 11 },
- { "cygwin_attach_dll", 17 },
- { "cygwin_premain0", 15 },
- { "cygwin_premain1", 15 },
- { "cygwin_premain2", 15 },
- { "cygwin_premain3", 15 },
- { "environ", 7 },
- { NULL, 0 }
+ { STRING_COMMA_LEN ("_head_") },
+ { STRING_COMMA_LEN (NULL) }
};
-static autofilter_entry_type autofilter_symbolsuffixlist[] =
+static const autofilter_entry_type autofilter_symbolsuffixlist[] =
{
- { "_iname", 6 },
- { NULL, 0 }
+ { STRING_COMMA_LEN ("_iname") },
+ { STRING_COMMA_LEN (NULL) }
};
#define U(str) (pe_details->underscored ? "_" str : str)
@@ -383,6 +447,11 @@ pe_dll_add_excludes (const char *new_excludes, const int type)
free (local_copy);
}
+static bfd_boolean
+is_import (const char* n)
+{
+ return (CONST_STRNEQ (n, "__imp_"));
+}
/* abfd is a bfd containing n (or NULL)
It can be used for contextual checks. */
@@ -392,15 +461,11 @@ auto_export (bfd *abfd, def_file *d, const char *n)
{
int i;
struct exclude_list_struct *ex;
- autofilter_entry_type *afptr;
+ const autofilter_entry_type *afptr;
const char * libname = 0;
if (abfd && abfd->my_archive)
libname = lbasename (abfd->my_archive->filename);
- /* We should not re-export imported stuff. */
- if (strncmp (n, "_imp__", 6) == 0)
- return 0;
-
for (i = 0; i < d->num_exports; i++)
if (strcmp (d->exports[i].name, n) == 0)
return 0;
@@ -443,10 +508,10 @@ auto_export (bfd *abfd, def_file *d, const char *n)
/* Don't try to blindly exclude all symbols
that begin with '__'; this was tried and
- it is too restrictive. */
+ it is too restrictive. Instead we have
+ a target specific list to use: */
+ afptr = pe_details->autofilter_symbollist;
- /* Then, exclude specific symbols. */
- afptr = autofilter_symbollist;
while (afptr->name)
{
if (strcmp (n, afptr->name) == 0)
@@ -515,7 +580,7 @@ process_def_file (bfd *abfd ATTRIBUTE_UNUSED, struct bfd_link_info *info)
s = bfd_get_section_by_name (b, ".drectve");
if (s)
{
- int size = bfd_get_section_size_before_reloc (s);
+ long size = s->size;
char *buf = xmalloc (size);
bfd_get_section_contents (b, s, buf, 0, size);
@@ -527,7 +592,7 @@ process_def_file (bfd *abfd ATTRIBUTE_UNUSED, struct bfd_link_info *info)
/* If we are not building a DLL, when there are no exports
we do not build an export table at all. */
if (!pe_dll_export_everything && pe_def_file->num_exports == 0
- && !info->shared)
+ && info->executable)
return;
/* Now, maybe export everything else the default way. */
@@ -555,8 +620,12 @@ process_def_file (bfd *abfd ATTRIBUTE_UNUSED, struct bfd_link_info *info)
/* We should not re-export imported stuff. */
{
- char *name = xmalloc (strlen (sn) + 2 + 6);
- sprintf (name, "%s%s", U("_imp_"), sn);
+ char *name;
+ if (is_import (sn))
+ continue;
+
+ name = xmalloc (strlen ("__imp_") + strlen (sn) + 1);
+ sprintf (name, "%s%s", "__imp_", sn);
blhe = bfd_link_hash_lookup (info->hash, name,
FALSE, FALSE, FALSE);
@@ -566,7 +635,7 @@ process_def_file (bfd *abfd ATTRIBUTE_UNUSED, struct bfd_link_info *info)
continue;
}
- if (*sn == '_')
+ if (pe_details->underscored && *sn == '_')
sn++;
if (auto_export (b, pe_def_file, sn))
@@ -596,8 +665,13 @@ process_def_file (bfd *abfd ATTRIBUTE_UNUSED, struct bfd_link_info *info)
have. */
int lead_at = (*pe_def_file->exports[i].name == '@');
char *tmp = xstrdup (pe_def_file->exports[i].name + lead_at);
+ char *tmp_at = strchr (tmp, '@');
- *(strchr (tmp, '@')) = 0;
+ if (tmp_at)
+ *tmp_at = 0;
+ else
+ einfo (_("%XCannot export %s: invalid export name\n"),
+ pe_def_file->exports[i].name);
pe_def_file->exports[i].name = tmp;
}
}
@@ -607,6 +681,9 @@ process_def_file (bfd *abfd ATTRIBUTE_UNUSED, struct bfd_link_info *info)
{
for (i = 0; i < NE; i++)
{
+ if (is_import (pe_def_file->exports[i].name))
+ continue;
+
if (strchr (pe_def_file->exports[i].name, '@'))
{
int lead_at = (*pe_def_file->exports[i].name == '@');
@@ -680,6 +757,27 @@ process_def_file (bfd *abfd ATTRIBUTE_UNUSED, struct bfd_link_info *info)
{
char *name;
+ /* Check for forward exports */
+ if (strchr (pe_def_file->exports[i].internal_name, '.'))
+ {
+ count_exported++;
+ if (!pe_def_file->exports[i].flag_noname)
+ count_exported_byname++;
+
+ pe_def_file->exports[i].flag_forward = 1;
+
+ if (pe_def_file->exports[i].ordinal != -1)
+ {
+ if (max_ordinal < pe_def_file->exports[i].ordinal)
+ max_ordinal = pe_def_file->exports[i].ordinal;
+ if (min_ordinal > pe_def_file->exports[i].ordinal)
+ min_ordinal = pe_def_file->exports[i].ordinal;
+ count_with_ordinals++;
+ }
+
+ continue;
+ }
+
name = xmalloc (strlen (pe_def_file->exports[i].internal_name) + 2);
if (pe_details->underscored
&& (*pe_def_file->exports[i].internal_name != '@'))
@@ -757,7 +855,7 @@ build_filler_bfd (int include_edata)
bfd_get_arch (output_bfd),
bfd_get_mach (output_bfd)))
{
- einfo ("%X%P: can not create BFD %E\n");
+ einfo ("%X%P: can not create BFD: %E\n");
return;
}
@@ -837,7 +935,8 @@ generate_edata (bfd *abfd, struct bfd_link_info *info ATTRIBUTE_UNUSED)
/* Now we need to assign ordinals to those that don't have them. */
for (i = 0; i < NE; i++)
{
- if (exported_symbol_sections[i])
+ if (exported_symbol_sections[i] ||
+ pe_def_file->exports[i].flag_forward)
{
if (pe_def_file->exports[i].ordinal != -1)
{
@@ -856,19 +955,26 @@ generate_edata (bfd *abfd, struct bfd_link_info *info ATTRIBUTE_UNUSED)
}
name_table_size += strlen (pe_def_file->exports[i].name) + 1;
}
+
+ /* Reserve space for the forward name. */
+ if (pe_def_file->exports[i].flag_forward)
+ {
+ name_table_size += strlen (pe_def_file->exports[i].internal_name) + 1;
+ }
}
next_ordinal = min_ordinal;
for (i = 0; i < NE; i++)
- if (exported_symbol_sections[i])
- if (pe_def_file->exports[i].ordinal == -1)
- {
- while (exported_symbols[next_ordinal - min_ordinal] != -1)
- next_ordinal++;
+ if ((exported_symbol_sections[i] ||
+ pe_def_file->exports[i].flag_forward) &&
+ pe_def_file->exports[i].ordinal == -1)
+ {
+ while (exported_symbols[next_ordinal - min_ordinal] != -1)
+ next_ordinal++;
- exported_symbols[next_ordinal - min_ordinal] = i;
- pe_def_file->exports[i].ordinal = next_ordinal;
- }
+ exported_symbols[next_ordinal - min_ordinal] = i;
+ pe_def_file->exports[i].ordinal = next_ordinal;
+ }
/* OK, now we can allocate some memory. */
edata_sz = (40 /* directory */
@@ -920,7 +1026,7 @@ fill_edata (bfd *abfd, struct bfd_link_info *info ATTRIBUTE_UNUSED)
unsigned char *eaddresses;
unsigned char *enameptrs;
unsigned char *eordinals;
- unsigned char *enamestr;
+ char *enamestr;
time_t now;
time (&now);
@@ -932,7 +1038,7 @@ fill_edata (bfd *abfd, struct bfd_link_info *info ATTRIBUTE_UNUSED)
eaddresses = edata_d + 40;
enameptrs = eaddresses + 4 * export_table_size;
eordinals = enameptrs + 4 * count_exported_byname;
- enamestr = eordinals + 2 * count_exported_byname;
+ enamestr = (char *) eordinals + 2 * count_exported_byname;
#define ERVA(ptr) (((unsigned char *)(ptr) - edata_d) \
+ edata_s->output_section->vma - image_base)
@@ -967,15 +1073,28 @@ fill_edata (bfd *abfd, struct bfd_link_info *info ATTRIBUTE_UNUSED)
for (s = 0; s < NE; s++)
{
struct bfd_section *ssec = exported_symbol_sections[s];
- if (ssec && pe_def_file->exports[s].ordinal != -1)
+ if (pe_def_file->exports[s].ordinal != -1 &&
+ (pe_def_file->exports[s].flag_forward || ssec != NULL))
{
- unsigned long srva = (exported_symbol_offsets[s]
- + ssec->output_section->vma
- + ssec->output_offset);
int ord = pe_def_file->exports[s].ordinal;
- bfd_put_32 (abfd, srva - image_base,
- eaddresses + 4 * (ord - min_ordinal));
+ if (pe_def_file->exports[s].flag_forward)
+ {
+ bfd_put_32 (abfd, ERVA (enamestr),
+ eaddresses + 4 * (ord - min_ordinal));
+
+ strcpy (enamestr, pe_def_file->exports[s].internal_name);
+ enamestr += strlen (pe_def_file->exports[s].internal_name) + 1;
+ }
+ else
+ {
+ unsigned long srva = (exported_symbol_offsets[s]
+ + ssec->output_section->vma
+ + ssec->output_offset);
+
+ bfd_put_32 (abfd, srva - image_base,
+ eaddresses + 4 * (ord - min_ordinal));
+ }
if (!pe_def_file->exports[s].flag_noname)
{
@@ -1134,6 +1253,12 @@ generate_reloc (bfd *abfd, struct bfd_link_info *info)
switch BITS_AND_SHIFT (relocs[i]->howto->bitsize,
relocs[i]->howto->rightshift)
{
+#ifdef pe_use_x86_64
+ case BITS_AND_SHIFT (64, 0):
+ reloc_data[total_relocs].type = 10;
+ total_relocs++;
+ break;
+#endif
case BITS_AND_SHIFT (32, 0):
reloc_data[total_relocs].type = 3;
total_relocs++;
@@ -1178,9 +1303,6 @@ generate_reloc (bfd *abfd, struct bfd_link_info *info)
free (relocs);
/* Warning: the allocated symbols are remembered in BFD and
reused later, so don't free them! */
-#if 0
- free (symbol);
-#endif
}
}
@@ -1252,7 +1374,7 @@ generate_reloc (bfd *abfd, struct bfd_link_info *info)
if (page_ptr != (unsigned long) -1)
bfd_put_32 (abfd, reloc_sz - page_ptr, reloc_d + page_ptr + 4);
- while (reloc_sz < reloc_s->_raw_size)
+ while (reloc_sz < reloc_s->size)
reloc_d[reloc_sz++] = 0;
}
@@ -1602,21 +1724,21 @@ make_head (bfd *parent)
quick_reloc (abfd, 16, BFD_RELOC_RVA, 1);
save_relocs (id2);
- bfd_set_section_size (abfd, id5, 4);
- d5 = xmalloc (4);
+ bfd_set_section_size (abfd, id5, PE_IDATA5_SIZE);
+ d5 = xmalloc (PE_IDATA5_SIZE);
id5->contents = d5;
- memset (d5, 0, 4);
+ memset (d5, 0, PE_IDATA5_SIZE);
- bfd_set_section_size (abfd, id4, 4);
- d4 = xmalloc (4);
+ bfd_set_section_size (abfd, id4, PE_IDATA4_SIZE);
+ d4 = xmalloc (PE_IDATA4_SIZE);
id4->contents = d4;
- memset (d4, 0, 4);
+ memset (d4, 0, PE_IDATA4_SIZE);
bfd_set_symtab (abfd, symtab, symptr);
bfd_set_section_contents (abfd, id2, d2, 0, 20);
- bfd_set_section_contents (abfd, id5, d5, 0, 4);
- bfd_set_section_contents (abfd, id4, d4, 0, 4);
+ bfd_set_section_contents (abfd, id5, d5, 0, PE_IDATA5_SIZE);
+ bfd_set_section_contents (abfd, id4, d4, 0, PE_IDATA4_SIZE);
bfd_make_readable (abfd);
return abfd;
@@ -1624,8 +1746,10 @@ make_head (bfd *parent)
/* .section .idata$4
.long 0
+ [.long 0] for PE+
.section .idata$5
.long 0
+ [.long 0] for PE+
.section idata$7
.global __my_dll_iname
__my_dll_iname:
@@ -1658,15 +1782,15 @@ make_tail (bfd *parent)
id7 = quick_section (abfd, ".idata$7", SEC_HAS_CONTENTS, 2);
quick_symbol (abfd, U (""), dll_symname, "_iname", id7, BSF_GLOBAL, 0);
- bfd_set_section_size (abfd, id4, 4);
- d4 = xmalloc (4);
+ bfd_set_section_size (abfd, id4, PE_IDATA4_SIZE);
+ d4 = xmalloc (PE_IDATA4_SIZE);
id4->contents = d4;
- memset (d4, 0, 4);
+ memset (d4, 0, PE_IDATA4_SIZE);
- bfd_set_section_size (abfd, id5, 4);
- d5 = xmalloc (4);
+ bfd_set_section_size (abfd, id5, PE_IDATA5_SIZE);
+ d5 = xmalloc (PE_IDATA5_SIZE);
id5->contents = d5;
- memset (d5, 0, 4);
+ memset (d5, 0, PE_IDATA5_SIZE);
len = strlen (dll_filename) + 1;
if (len & 1)
@@ -1674,12 +1798,16 @@ make_tail (bfd *parent)
bfd_set_section_size (abfd, id7, len);
d7 = xmalloc (len);
id7->contents = d7;
- strcpy (d7, dll_filename);
+ strcpy ((char *) d7, dll_filename);
+ /* If len was odd, the above
+ strcpy leaves behind an undefined byte. That is harmless,
+ but we set it to 0 just so the binary dumps are pretty. */
+ d7[len - 1] = 0;
bfd_set_symtab (abfd, symtab, symptr);
- bfd_set_section_contents (abfd, id4, d4, 0, 4);
- bfd_set_section_contents (abfd, id5, d5, 0, 4);
+ bfd_set_section_contents (abfd, id4, d4, 0, PE_IDATA4_SIZE);
+ bfd_set_section_contents (abfd, id5, d5, 0, PE_IDATA5_SIZE);
bfd_set_section_contents (abfd, id7, d7, 0, len);
bfd_make_readable (abfd);
@@ -1707,7 +1835,7 @@ make_tail (bfd *parent)
.short <hint>
.asciz "function" xlate? (add underscore, kill at) */
-static unsigned char jmp_ix86_bytes[] =
+static const unsigned char jmp_ix86_bytes[] =
{
0xff, 0x25, 0x00, 0x00, 0x00, 0x00, 0x90, 0x90
};
@@ -1719,7 +1847,7 @@ static unsigned char jmp_ix86_bytes[] =
nop
.dw __imp_function */
-static unsigned char jmp_sh_bytes[] =
+static const unsigned char jmp_sh_bytes[] =
{
0x01, 0xd0, 0x02, 0x60, 0x2b, 0x40, 0x09, 0x00, 0x00, 0x00, 0x00, 0x00
};
@@ -1730,39 +1858,62 @@ static unsigned char jmp_sh_bytes[] =
jr $t0
nop */
-static unsigned char jmp_mips_bytes[] =
+static const unsigned char jmp_mips_bytes[] =
{
0x00, 0x00, 0x08, 0x3c, 0x00, 0x00, 0x08, 0x8d,
0x08, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x00
};
+static const unsigned char jmp_arm_bytes[] =
+{
+ 0x00, 0xc0, 0x9f, 0xe5, /* ldr ip, [pc] */
+ 0x00, 0xf0, 0x9c, 0xe5, /* ldr pc, [ip] */
+ 0, 0, 0, 0
+};
+
+
static bfd *
-make_one (def_file_export *exp, bfd *parent)
+make_one (def_file_export *exp, bfd *parent, bfd_boolean include_jmp_stub)
{
asection *tx, *id7, *id5, *id4, *id6;
unsigned char *td = NULL, *d7, *d5, *d4, *d6 = NULL;
int len;
char *oname;
bfd *abfd;
- unsigned char *jmp_bytes = NULL;
+ const unsigned char *jmp_bytes = NULL;
int jmp_byte_count = 0;
- switch (pe_details->pe_arch)
+ /* Include the jump stub section only if it is needed. A jump
+ stub is needed if the symbol being imported <sym> is a function
+ symbol and there is at least one undefined reference to that
+ symbol. In other words, if all the import references to <sym> are
+ explicitly through _declspec(dllimport) then the jump stub is not
+ needed. */
+ if (include_jmp_stub)
{
- case PE_ARCH_i386:
- jmp_bytes = jmp_ix86_bytes;
- jmp_byte_count = sizeof (jmp_ix86_bytes);
- break;
- case PE_ARCH_sh:
- jmp_bytes = jmp_sh_bytes;
- jmp_byte_count = sizeof (jmp_sh_bytes);
- break;
- case PE_ARCH_mips:
- jmp_bytes = jmp_mips_bytes;
- jmp_byte_count = sizeof (jmp_mips_bytes);
- break;
- default:
- abort ();
+ switch (pe_details->pe_arch)
+ {
+ case PE_ARCH_i386:
+ jmp_bytes = jmp_ix86_bytes;
+ jmp_byte_count = sizeof (jmp_ix86_bytes);
+ break;
+ case PE_ARCH_sh:
+ jmp_bytes = jmp_sh_bytes;
+ jmp_byte_count = sizeof (jmp_sh_bytes);
+ break;
+ case PE_ARCH_mips:
+ jmp_bytes = jmp_mips_bytes;
+ jmp_byte_count = sizeof (jmp_mips_bytes);
+ break;
+ case PE_ARCH_arm:
+ case PE_ARCH_arm_epoc:
+ case PE_ARCH_arm_wince:
+ jmp_bytes = jmp_arm_bytes;
+ jmp_byte_count = sizeof (jmp_arm_bytes);
+ break;
+ default:
+ abort ();
+ }
}
oname = xmalloc (20);
@@ -1788,9 +1939,9 @@ make_one (def_file_export *exp, bfd *parent)
{
quick_symbol (abfd, U ("_head_"), dll_symname, "", UNDSEC,
BSF_GLOBAL, 0);
- if (! exp->flag_data)
+ if (include_jmp_stub)
quick_symbol (abfd, "", exp->internal_name, "", tx, BSF_GLOBAL, 0);
- quick_symbol (abfd, U ("_imp_"), exp->internal_name, "", id5,
+ quick_symbol (abfd, "__imp_", exp->internal_name, "", id5,
BSF_GLOBAL, 0);
/* Fastcall applies only to functions,
so no need for auto-import symbol. */
@@ -1799,22 +1950,22 @@ make_one (def_file_export *exp, bfd *parent)
{
quick_symbol (abfd, U ("_head_"), dll_symname, "", UNDSEC,
BSF_GLOBAL, 0);
- if (! exp->flag_data)
+ if (include_jmp_stub)
quick_symbol (abfd, U (""), exp->internal_name, "", tx,
BSF_GLOBAL, 0);
- quick_symbol (abfd, U ("_imp__"), exp->internal_name, "", id5,
+ quick_symbol (abfd, "__imp_", U (""), exp->internal_name, id5,
BSF_GLOBAL, 0);
/* Symbol to reference ord/name of imported
data symbol, used to implement auto-import. */
if (exp->flag_data)
- quick_symbol (abfd, U("_nm__"), exp->internal_name, "", id6,
+ quick_symbol (abfd, U ("_nm_"), U (""), exp->internal_name, id6,
BSF_GLOBAL,0);
}
if (pe_dll_compat_implib)
quick_symbol (abfd, U ("__imp_"), exp->internal_name, "", id5,
BSF_GLOBAL, 0);
- if (! exp->flag_data)
+ if (include_jmp_stub)
{
bfd_set_section_size (abfd, tx, jmp_byte_count);
td = xmalloc (jmp_byte_count);
@@ -1824,7 +1975,11 @@ make_one (def_file_export *exp, bfd *parent)
switch (pe_details->pe_arch)
{
case PE_ARCH_i386:
- quick_reloc (abfd, 2, BFD_RELOC_32, 2);
+#ifdef pe_use_x86_64
+ quick_reloc (abfd, 2, BFD_RELOC_32_PCREL, 2);
+#else
+ quick_reloc (abfd, 2, BFD_RELOC_32, 2);
+#endif
break;
case PE_ARCH_sh:
quick_reloc (abfd, 8, BFD_RELOC_32, 2);
@@ -1834,11 +1989,18 @@ make_one (def_file_export *exp, bfd *parent)
quick_reloc (abfd, 0, BFD_RELOC_LO16, 0); /* MIPS_R_PAIR */
quick_reloc (abfd, 4, BFD_RELOC_LO16, 2);
break;
+ case PE_ARCH_arm:
+ case PE_ARCH_arm_epoc:
+ case PE_ARCH_arm_wince:
+ quick_reloc (abfd, 8, BFD_RELOC_32, 2);
+ break;
default:
abort ();
}
save_relocs (tx);
}
+ else
+ bfd_set_section_size (abfd, tx, 0);
bfd_set_section_size (abfd, id7, 4);
d7 = xmalloc (4);
@@ -1847,16 +2009,16 @@ make_one (def_file_export *exp, bfd *parent)
quick_reloc (abfd, 0, BFD_RELOC_RVA, 5);
save_relocs (id7);
- bfd_set_section_size (abfd, id5, 4);
- d5 = xmalloc (4);
+ bfd_set_section_size (abfd, id5, PE_IDATA5_SIZE);
+ d5 = xmalloc (PE_IDATA5_SIZE);
id5->contents = d5;
- memset (d5, 0, 4);
+ memset (d5, 0, PE_IDATA5_SIZE);
if (exp->flag_noname)
{
d5[0] = exp->ordinal;
d5[1] = exp->ordinal >> 8;
- d5[3] = 0x80;
+ d5[PE_IDATA5_SIZE - 1] = 0x80;
}
else
{
@@ -1864,16 +2026,16 @@ make_one (def_file_export *exp, bfd *parent)
save_relocs (id5);
}
- bfd_set_section_size (abfd, id4, 4);
- d4 = xmalloc (4);
+ bfd_set_section_size (abfd, id4, PE_IDATA4_SIZE);
+ d4 = xmalloc (PE_IDATA4_SIZE);
id4->contents = d4;
- memset (d4, 0, 4);
+ memset (d4, 0, PE_IDATA4_SIZE);
if (exp->flag_noname)
{
d4[0] = exp->ordinal;
d4[1] = exp->ordinal >> 8;
- d4[3] = 0x80;
+ d4[PE_IDATA4_SIZE - 1] = 0x80;
}
else
{
@@ -1888,7 +2050,8 @@ make_one (def_file_export *exp, bfd *parent)
}
else
{
- len = strlen (exp->name) + 3;
+ /* { short, asciz } */
+ len = 2 + strlen (exp->name) + 1;
if (len & 1)
len++;
bfd_set_section_size (abfd, id6, len);
@@ -1897,15 +2060,16 @@ make_one (def_file_export *exp, bfd *parent)
memset (d6, 0, len);
d6[0] = exp->hint & 0xff;
d6[1] = exp->hint >> 8;
- strcpy (d6 + 2, exp->name);
+ strcpy ((char *) d6 + 2, exp->name);
}
bfd_set_symtab (abfd, symtab, symptr);
- bfd_set_section_contents (abfd, tx, td, 0, jmp_byte_count);
+ if (include_jmp_stub)
+ bfd_set_section_contents (abfd, tx, td, 0, jmp_byte_count);
bfd_set_section_contents (abfd, id7, d7, 0, 4);
- bfd_set_section_contents (abfd, id5, d5, 0, 4);
- bfd_set_section_contents (abfd, id4, d4, 0, 4);
+ bfd_set_section_contents (abfd, id5, d5, 0, PE_IDATA5_SIZE);
+ bfd_set_section_contents (abfd, id4, d4, 0, PE_IDATA4_SIZE);
if (!exp->flag_noname)
bfd_set_section_contents (abfd, id6, d6, 0, len);
@@ -1939,16 +2103,17 @@ make_singleton_name_thunk (const char *import, bfd *parent)
quick_symbol (abfd, U ("_nm_thnk_"), import, "", id4, BSF_GLOBAL, 0);
quick_symbol (abfd, U ("_nm_"), import, "", UNDSEC, BSF_GLOBAL, 0);
- bfd_set_section_size (abfd, id4, 8);
- d4 = xmalloc (4);
+ /* We need space for the real thunk and for the null terminator. */
+ bfd_set_section_size (abfd, id4, PE_IDATA4_SIZE * 2);
+ d4 = xmalloc (PE_IDATA4_SIZE * 2);
id4->contents = d4;
- memset (d4, 0, 8);
+ memset (d4, 0, PE_IDATA4_SIZE * 2);
quick_reloc (abfd, 0, BFD_RELOC_RVA, 2);
save_relocs (id4);
bfd_set_symtab (abfd, symtab, symptr);
- bfd_set_section_contents (abfd, id4, d4, 0, 8);
+ bfd_set_section_contents (abfd, id4, d4, 0, PE_IDATA4_SIZE * 2);
bfd_make_readable (abfd);
return abfd;
@@ -1992,19 +2157,10 @@ make_import_fixup_mark (arelent *rel)
current_sec, /* sym->section, */
rel->address, NULL, TRUE, FALSE, &bh);
- if (0)
- {
- struct coff_link_hash_entry *myh;
-
- myh = (struct coff_link_hash_entry *) bh;
- printf ("type:%d\n", myh->type);
- printf ("%s\n", myh->root.u.def.section->name);
- }
-
return fixup_name;
}
-/* .section .idata$3
+/* .section .idata$2
.rva __nm_thnk_SYM (singleton thunk with name of func)
.long 0
.long 0
@@ -2017,8 +2173,8 @@ make_import_fixup_entry (const char *name,
const char *dll_symname,
bfd *parent)
{
- asection *id3;
- unsigned char *d3;
+ asection *id2;
+ unsigned char *d2;
char *oname;
bfd *abfd;
@@ -2035,28 +2191,25 @@ make_import_fixup_entry (const char *name,
symptr = 0;
symtab = xmalloc (6 * sizeof (asymbol *));
- id3 = quick_section (abfd, ".idata$3", SEC_HAS_CONTENTS, 2);
+ id2 = quick_section (abfd, ".idata$2", SEC_HAS_CONTENTS, 2);
-#if 0
- quick_symbol (abfd, U ("_head_"), dll_symname, "", id2, BSF_GLOBAL, 0);
-#endif
quick_symbol (abfd, U ("_nm_thnk_"), name, "", UNDSEC, BSF_GLOBAL, 0);
quick_symbol (abfd, U (""), dll_symname, "_iname", UNDSEC, BSF_GLOBAL, 0);
quick_symbol (abfd, "", fixup_name, "", UNDSEC, BSF_GLOBAL, 0);
- bfd_set_section_size (abfd, id3, 20);
- d3 = xmalloc (20);
- id3->contents = d3;
- memset (d3, 0, 20);
+ bfd_set_section_size (abfd, id2, 20);
+ d2 = xmalloc (20);
+ id2->contents = d2;
+ memset (d2, 0, 20);
quick_reloc (abfd, 0, BFD_RELOC_RVA, 1);
quick_reloc (abfd, 12, BFD_RELOC_RVA, 2);
quick_reloc (abfd, 16, BFD_RELOC_RVA, 3);
- save_relocs (id3);
+ save_relocs (id2);
bfd_set_symtab (abfd, symtab, symptr);
- bfd_set_section_contents (abfd, id3, d3, 0, 20);
+ bfd_set_section_contents (abfd, id2, d2, 0, 20);
bfd_make_readable (abfd);
return abfd;
@@ -2138,7 +2291,7 @@ pe_create_runtime_relocator_reference (bfd *parent)
symtab = xmalloc (2 * sizeof (asymbol *));
extern_rt_rel = quick_section (abfd, ".rdata", SEC_HAS_CONTENTS, 2);
- quick_symbol (abfd, "", "__pei386_runtime_relocator", "", UNDSEC,
+ quick_symbol (abfd, "", U ("_pei386_runtime_relocator"), "", UNDSEC,
BSF_NO_FLAGS, 0);
bfd_set_section_size (abfd, extern_rt_rel, 4);
@@ -2231,7 +2384,7 @@ pe_dll_generate_implib (def_file *def, const char *impfilename)
if (!ISALNUM (dll_symname[i]))
dll_symname[i] = '_';
- unlink (impfilename);
+ unlink_if_ordinary (impfilename);
outarch = bfd_openw (impfilename, 0);
@@ -2243,8 +2396,8 @@ pe_dll_generate_implib (def_file *def, const char *impfilename)
}
/* xgettext:c-format */
- einfo (_("Creating library file: %s\n"), impfilename);
-
+ info_msg (_("Creating library file: %s\n"), impfilename);
+
bfd_set_format (outarch, bfd_archive);
outarch->has_armap = 1;
@@ -2261,8 +2414,9 @@ pe_dll_generate_implib (def_file *def, const char *impfilename)
if (pe_def_file->exports[i].flag_private)
continue;
def->exports[i].internal_name = def->exports[i].name;
- n = make_one (def->exports + i, outarch);
- n->next = head;
+ n = make_one (def->exports + i, outarch,
+ ! (def->exports + i)->flag_data);
+ n->archive_next = head;
head = n;
def->exports[i].internal_name = internal;
}
@@ -2273,19 +2427,19 @@ pe_dll_generate_implib (def_file *def, const char *impfilename)
return;
/* Now stick them all into the archive. */
- ar_head->next = head;
- ar_tail->next = ar_head;
+ ar_head->archive_next = head;
+ ar_tail->archive_next = ar_head;
head = ar_tail;
if (! bfd_set_archive_head (outarch, head))
- einfo ("%Xbfd_set_archive_head: %s\n", bfd_errmsg (bfd_get_error ()));
+ einfo ("%Xbfd_set_archive_head: %E\n");
if (! bfd_close (outarch))
- einfo ("%Xbfd_close %s: %s\n", impfilename, bfd_errmsg (bfd_get_error ()));
+ einfo ("%Xbfd_close %s: %E\n", impfilename);
while (head != NULL)
{
- bfd *n = head->next;
+ bfd *n = head->archive_next;
bfd_close (head);
head = n;
}
@@ -2303,7 +2457,7 @@ add_bfd_to_link (bfd *abfd, const char *name, struct bfd_link_info *link_info)
ldlang_add_file (fake_file);
if (!bfd_link_add_symbols (abfd, link_info))
- einfo ("%Xaddsym %s: %s\n", name, bfd_errmsg (bfd_get_error ()));
+ einfo ("%Xaddsym %s: %E\n", name);
}
void
@@ -2337,9 +2491,10 @@ pe_process_import_defs (bfd *output_bfd, struct bfd_link_info *link_info)
/* See if we need this import. */
size_t len = strlen (pe_def_file->imports[i].internal_name);
char *name = xmalloc (len + 2 + 6);
+ bfd_boolean include_jmp_stub = FALSE;
if (lead_at)
- sprintf (name, "%s%s", "",
+ sprintf (name, "%s",
pe_def_file->imports[i].internal_name);
else
sprintf (name, "%s%s",U (""),
@@ -2348,18 +2503,23 @@ pe_process_import_defs (bfd *output_bfd, struct bfd_link_info *link_info)
blhe = bfd_link_hash_lookup (link_info->hash, name,
FALSE, FALSE, FALSE);
+ /* Include the jump stub for <sym> only if the <sym>
+ is undefined. */
if (!blhe || (blhe && blhe->type != bfd_link_hash_undefined))
{
if (lead_at)
- sprintf (name, "%s%s", U ("_imp_"),
+ sprintf (name, "%s%s", "__imp_",
pe_def_file->imports[i].internal_name);
else
- sprintf (name, "%s%s", U ("_imp__"),
+ sprintf (name, "%s%s%s", "__imp_", U (""),
pe_def_file->imports[i].internal_name);
blhe = bfd_link_hash_lookup (link_info->hash, name,
FALSE, FALSE, FALSE);
}
+ else
+ include_jmp_stub = TRUE;
+
free (name);
if (blhe && blhe->type == bfd_link_hash_undefined)
@@ -2380,7 +2540,7 @@ pe_process_import_defs (bfd *output_bfd, struct bfd_link_info *link_info)
exp.flag_constant = 0;
exp.flag_data = pe_def_file->imports[i].data;
exp.flag_noname = exp.name ? 0 : 1;
- one = make_one (&exp, output_bfd);
+ one = make_one (&exp, output_bfd, (! exp.flag_data) && include_jmp_stub);
add_bfd_to_link (one, one->filename, link_info);
}
}
@@ -2418,18 +2578,6 @@ pe_get32 (bfd *abfd, int where)
return b[0] + (b[1] << 8) + (b[2] << 16) + (b[3] << 24);
}
-#if 0 /* This is not currently used. */
-
-static unsigned int
-pe_as16 (void *ptr)
-{
- unsigned char *b = ptr;
-
- return b[0] + (b[1] << 8);
-}
-
-#endif
-
static unsigned int
pe_as32 (void *ptr)
{
@@ -2445,7 +2593,8 @@ pe_implied_import_dll (const char *filename)
unsigned long pe_header_offset, opthdr_ofs, num_entries, i;
unsigned long export_rva, export_size, nsections, secptr, expptr;
unsigned long exp_funcbase;
- unsigned char *expdata, *erva;
+ unsigned char *expdata;
+ char *erva;
unsigned long name_rvas, ordinals, nexp, ordbase;
const char *dll_name;
/* Initialization with start > end guarantees that is_data
@@ -2462,7 +2611,7 @@ pe_implied_import_dll (const char *filename)
dll = bfd_openr (filename, pe_details->target_name);
if (!dll)
{
- einfo ("%Xopen %s: %s\n", filename, bfd_errmsg (bfd_get_error ()));
+ einfo ("%Xopen %s: %E\n", filename);
return FALSE;
}
@@ -2476,13 +2625,23 @@ pe_implied_import_dll (const char *filename)
/* Get pe_header, optional header and numbers of export entries. */
pe_header_offset = pe_get32 (dll, 0x3c);
opthdr_ofs = pe_header_offset + 4 + 20;
+#ifdef pe_use_x86_64
+ num_entries = pe_get32 (dll, opthdr_ofs + 92 + 4 * 4); /* & NumberOfRvaAndSizes. */
+#else
num_entries = pe_get32 (dll, opthdr_ofs + 92);
+#endif
if (num_entries < 1) /* No exports. */
return FALSE;
+#ifdef pe_use_x86_64
+ export_rva = pe_get32 (dll, opthdr_ofs + 96 + 4 * 4);
+ export_size = pe_get32 (dll, opthdr_ofs + 100 + 4 * 4);
+#else
export_rva = pe_get32 (dll, opthdr_ofs + 96);
export_size = pe_get32 (dll, opthdr_ofs + 100);
+#endif
+
nsections = pe_get16 (dll, pe_header_offset + 4 + 2);
secptr = (pe_header_offset + 4 + 20 +
pe_get16 (dll, pe_header_offset + 4 + 16));
@@ -2555,7 +2714,7 @@ pe_implied_import_dll (const char *filename)
expdata = xmalloc (export_size);
bfd_seek (dll, (file_ptr) expptr, SEEK_SET);
bfd_bread (expdata, (bfd_size_type) export_size, dll);
- erva = expdata - export_rva;
+ erva = (char *) expdata - export_rva;
if (pe_def_file == 0)
pe_def_file = def_file_empty ();
@@ -2568,7 +2727,7 @@ pe_implied_import_dll (const char *filename)
/* Use internal dll name instead of filename
to enable symbolic dll linking. */
- dll_name = pe_as32 (expdata + 12) + erva;
+ dll_name = erva + pe_as32 (expdata + 12);
/* Check to see if the dll has already been added to
the definition list and if so return without error.
@@ -2592,7 +2751,7 @@ pe_implied_import_dll (const char *filename)
/* Skip unwanted symbols, which are
exported in buggy auto-import releases. */
- if (strncmp (erva + name_rva, "_nm_", 4) != 0)
+ if (! CONST_STRNEQ (erva + name_rva, "_nm_"))
{
/* is_data is true if the address is in the data, rdata or bss
segment. */
@@ -2653,19 +2812,19 @@ pe_dll_fill_sections (bfd *abfd, struct bfd_link_info *info)
bfd_set_section_size (filler_bfd, reloc_s, reloc_sz);
/* Resize the sections. */
- lang_size_sections (stat_ptr->head, abs_output_section,
- &stat_ptr->head, 0, 0, NULL, TRUE);
+ lang_reset_memory_regions ();
+ lang_size_sections (NULL, TRUE);
/* Redo special stuff. */
ldemul_after_allocation ();
/* Do the assignments again. */
- lang_do_assignments (stat_ptr->head, abs_output_section, NULL, 0);
+ lang_do_assignments ();
}
fill_edata (abfd, info);
- if (info->shared)
+ if (info->shared && !info->pie)
pe_data (abfd)->dll = 1;
edata_s->contents = edata_d;
@@ -2684,14 +2843,22 @@ pe_exe_fill_sections (bfd *abfd, struct bfd_link_info *info)
bfd_set_section_size (filler_bfd, reloc_s, reloc_sz);
/* Resize the sections. */
- lang_size_sections (stat_ptr->head, abs_output_section,
- &stat_ptr->head, 0, 0, NULL, TRUE);
+ lang_reset_memory_regions ();
+ lang_size_sections (NULL, TRUE);
/* Redo special stuff. */
ldemul_after_allocation ();
/* Do the assignments again. */
- lang_do_assignments (stat_ptr->head, abs_output_section, NULL, 0);
+ lang_do_assignments ();
}
reloc_s->contents = reloc_d;
}
+
+bfd_boolean
+pe_bfd_is_dll (bfd *abfd)
+{
+ return (bfd_get_format (abfd) == bfd_object
+ && obj_pe (abfd)
+ && pe_data (abfd)->dll);
+}
diff --git a/contrib/binutils/ld/pe-dll.h b/contrib/binutils/ld/pe-dll.h
index 029bf33..03b755d 100644
--- a/contrib/binutils/ld/pe-dll.h
+++ b/contrib/binutils/ld/pe-dll.h
@@ -1,5 +1,6 @@
/* pe-dll.h: Header file for routines used to build Windows DLLs.
- Copyright 1999, 2000, 2002, 2003 Free Software Foundation, Inc.
+ Copyright 1999, 2000, 2001, 2002, 2003, 2007
+ Free Software Foundation, Inc.
This file is part of GLD, the Gnu Linker.
@@ -15,14 +16,14 @@
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. */
+ Software Foundation, 51 Franklin Street - Fifth Floor, Boston, MA
+ 02110-1301, USA. */
#ifndef PE_DLL_H
#define PE_DLL_H
-#include "bfd.h"
#include "sysdep.h"
+#include "bfd.h"
#include "bfdlink.h"
#include "deffile.h"
@@ -59,4 +60,7 @@ extern void pe_walk_relocs_of_symbol
(struct bfd_link_info *, const char *, int (*) (arelent *, asection *));
extern void pe_create_import_fixup
(arelent * rel, asection *, int);
+extern bfd_boolean pe_bfd_is_dll
+ (bfd *);
+
#endif /* PE_DLL_H */
diff --git a/contrib/binutils/ld/pep-dll.c b/contrib/binutils/ld/pep-dll.c
new file mode 100644
index 0000000..e1826db
--- /dev/null
+++ b/contrib/binutils/ld/pep-dll.c
@@ -0,0 +1,58 @@
+/* Routines to help build PEPI-format DLLs (Win64 etc)
+ Copyright 2006 Free Software Foundation, Inc.
+
+ This file is part of BFD, the Binary File Descriptor library.
+
+ 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., 51 Franklin Street - Fifth Floor, Boston, MA 02110-1301, USA.
+
+ Written by Kai Tietz, OneVision Software GmbH&CoKg. */
+
+#define COFF_IMAGE_WITH_PE
+#define COFF_WITH_PE
+#define COFF_WITH_pex64
+
+/* Local defined globals. */
+#define pe_def_file pep_def_file
+#define pe_details pep_details
+#define pe_dll_compat_implib pep_dll_compat_implib
+#define pe_dll_extra_pe_debug pep_dll_extra_pe_debug
+#define pe_dll_export_everything pep_dll_export_everything
+#define pe_dll_do_default_excludes pep_dll_do_default_excludes
+#define pe_dll_kill_ats pep_dll_kill_ats
+#define pe_dll_stdcall_aliases pep_dll_stdcall_aliases
+#define pe_dll_warn_dup_exports pep_dll_warn_dup_exports
+
+/* External globals. */
+#define pe_data_import_dll pep_data_import_dll
+
+/* Unique global name for functions to avoid double defined symbols. */
+#define pe_create_import_fixup pep_create_import_fixup
+#define pe_dll_generate_def_file pep_dll_generate_def_file
+#define pe_process_import_defs pep_process_import_defs
+#define pe_dll_id_target pep_dll_id_target
+#define pe_implied_import_dll pep_implied_import_dll
+#define pe_dll_build_sections pep_dll_build_sections
+#define pe_exe_build_sections pep_exe_build_sections
+#define pe_dll_fill_sections pep_dll_fill_sections
+#define pe_exe_fill_sections pep_exe_fill_sections
+#define pe_dll_generate_implib pep_dll_generate_implib
+#define pe_dll_add_excludes pep_dll_add_excludes
+#define pe_walk_relocs_of_symbol pep_walk_relocs_of_symbol
+#define pe_bfd_is_dll pep_bfd_is_dll
+
+/* Uses x86_64 PE+. */
+#define pe_use_x86_64
+
+#include "pe-dll.c"
diff --git a/contrib/binutils/ld/pep-dll.h b/contrib/binutils/ld/pep-dll.h
new file mode 100644
index 0000000..ee8a44a
--- /dev/null
+++ b/contrib/binutils/ld/pep-dll.h
@@ -0,0 +1,54 @@
+/* pep-dll.h: Header file for routines used to build Windows DLLs.
+ Copyright 2006, 2007 Free Software Foundation, Inc.
+
+ This file is part of BFD, the Binary File Descriptor library.
+
+ 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., 51 Franklin Street - Fifth Floor, Boston, MA 02110-1301, USA.
+
+ Written by Kai Tietz, OneVision Software GmbH&CoKg. */
+
+#ifndef PEP_DLL_H
+#define PEP_DLL_H
+
+#include "sysdep.h"
+#include "bfd.h"
+#include "bfdlink.h"
+#include "deffile.h"
+
+extern def_file * pep_def_file;
+extern int pep_dll_export_everything;
+extern int pep_dll_do_default_excludes;
+extern int pep_dll_kill_ats;
+extern int pep_dll_stdcall_aliases;
+extern int pep_dll_warn_dup_exports;
+extern int pep_dll_compat_implib;
+extern int pep_dll_extra_pe_debug;
+
+extern void pep_dll_id_target (const char *);
+extern void pep_dll_add_excludes (const char *, const int);
+extern void pep_dll_generate_def_file (const char *);
+extern void pep_dll_generate_implib (def_file *, const char *);
+extern void pep_process_import_defs (bfd *, struct bfd_link_info *);
+extern bfd_boolean pep_implied_import_dll (const char *);
+extern void pep_dll_build_sections (bfd *, struct bfd_link_info *);
+extern void pep_exe_build_sections (bfd *, struct bfd_link_info *);
+extern void pep_dll_fill_sections (bfd *, struct bfd_link_info *);
+extern void pep_exe_fill_sections (bfd *, struct bfd_link_info *);
+extern void pep_walk_relocs_of_symbol
+ (struct bfd_link_info *, const char *, int (*) (arelent *, asection *));
+extern void pep_create_import_fixup (arelent * rel, asection *, int);
+extern bfd_boolean pep_bfd_is_dll (bfd *);
+
+#endif /* PEP_DLL_H */
diff --git a/contrib/binutils/ld/po/Make-in b/contrib/binutils/ld/po/Make-in
index 4291090..b4ffbb7 100644
--- a/contrib/binutils/ld/po/Make-in
+++ b/contrib/binutils/ld/po/Make-in
@@ -1,7 +1,8 @@
# Makefile for program source directory in GNU NLS utilities package.
# Copyright (C) 1995, 1996, 1997 by Ulrich Drepper <drepper@gnu.ai.mit.edu>
+# Copyright 2003, 2006 Free Software Foundation, Inc.
#
-# This file file be copied and used freely without restrictions. It can
+# This file may be copied and used freely without restrictions. It can
# be used in projects which are not available under the GNU Public License
# but which still want to provide support for the GNU gettext functionality.
# Please note that the actual code is *not* freely available.
@@ -15,6 +16,7 @@ SHELL = /bin/sh
srcdir = @srcdir@
top_srcdir = @top_srcdir@
VPATH = @srcdir@
+top_builddir = @top_builddir@
prefix = @prefix@
exec_prefix = @exec_prefix@
@@ -24,6 +26,8 @@ gnulocaledir = $(prefix)/share/locale
gettextsrcdir = $(prefix)/share/gettext/po
subdir = po
+DESTDIR =
+
INSTALL = @INSTALL@
INSTALL_DATA = @INSTALL_DATA@
MKINSTALLDIRS = @MKINSTALLDIRS@
@@ -69,7 +73,7 @@ INSTOBJEXT = @INSTOBJEXT@
$(MSGFMT) -o $@ $<
.po.gmo:
- file=$(srcdir)/`echo $* | sed 's,.*/,,'`.gmo \
+ file=`echo $* | sed 's,.*/,,'`.gmo \
&& rm -f $$file && $(GMSGFMT) -o $$file $<
.po.cat:
@@ -107,13 +111,14 @@ $(srcdir)/stamp-cat-id: $(PACKAGE).pot
install: install-exec install-data
install-exec:
install-info:
+install-html:
install-data: install-data-@USE_NLS@
install-data-no: all
install-data-yes: all
if test -r $(MKINSTALLDIRS); then \
- $(MKINSTALLDIRS) $(datadir); \
+ $(MKINSTALLDIRS) $(DESTDIR)$(datadir); \
else \
- $(top_srcdir)/mkinstalldirs $(datadir); \
+ $(top_srcdir)/mkinstalldirs $(DESTDIR)$(datadir); \
fi
@catalogs='$(CATALOGS)'; \
for cat in $$catalogs; do \
@@ -123,7 +128,7 @@ install-data-yes: all
*) destdir=$(localedir);; \
esac; \
lang=`echo $$cat | sed 's/\$(CATOBJEXT)$$//'`; \
- dir=$$destdir/$$lang/LC_MESSAGES; \
+ dir=$(DESTDIR)$$destdir/$$lang/LC_MESSAGES; \
if test -r $(MKINSTALLDIRS); then \
$(MKINSTALLDIRS) $$dir; \
else \
@@ -153,12 +158,12 @@ install-data-yes: all
done
if test "$(PACKAGE)" = "gettext"; then \
if test -r $(MKINSTALLDIRS); then \
- $(MKINSTALLDIRS) $(gettextsrcdir); \
+ $(MKINSTALLDIRS) $(DESTDIR)$(gettextsrcdir); \
else \
- $(top_srcdir)/mkinstalldirs $(gettextsrcdir); \
+ $(top_srcdir)/mkinstalldirs $(DESTDIR)$(gettextsrcdir); \
fi; \
$(INSTALL_DATA) $(srcdir)/Makefile.in.in \
- $(gettextsrcdir)/Makefile.in.in; \
+ $(DESTDIR)$(gettextsrcdir)/Makefile.in.in; \
else \
: ; \
fi
@@ -171,18 +176,18 @@ uninstall:
for cat in $$catalogs; do \
cat=`basename $$cat`; \
lang=`echo $$cat | sed 's/\$(CATOBJEXT)$$//'`; \
- rm -f $(localedir)/$$lang/LC_MESSAGES/$(PACKAGE)$(INSTOBJEXT); \
- rm -f $(localedir)/$$lang/LC_MESSAGES/$(PACKAGE)$(INSTOBJEXT).m; \
- rm -f $(gnulocaledir)/$$lang/LC_MESSAGES/$(PACKAGE)$(INSTOBJEXT); \
- rm -f $(gnulocaledir)/$$lang/LC_MESSAGES/$(PACKAGE)$(INSTOBJEXT).m; \
+ rm -f $(DESTDIR)$(localedir)/$$lang/LC_MESSAGES/$(PACKAGE)$(INSTOBJEXT); \
+ rm -f $(DESTDIR)$(localedir)/$$lang/LC_MESSAGES/$(PACKAGE)$(INSTOBJEXT).m; \
+ rm -f $(DESTDIR)$(gnulocaledir)/$$lang/LC_MESSAGES/$(PACKAGE)$(INSTOBJEXT); \
+ rm -f $(DESTDIR)$(gnulocaledir)/$$lang/LC_MESSAGES/$(PACKAGE)$(INSTOBJEXT).m; \
done
- rm -f $(gettextsrcdir)/po-Makefile.in.in
+ rm -f $(DESTDIR)$(gettextsrcdir)/po-Makefile.in.in
check: all
cat-id-tbl.o: ../intl/libgettext.h
-dvi info tags TAGS ID:
+html dvi pdf ps info tags TAGS ID:
mostlyclean:
rm -f core core.* *.pox $(PACKAGE).po *.old.po cat-id-tbl.tmp
diff --git a/contrib/binutils/ld/po/POTFILES.in b/contrib/binutils/ld/po/POTFILES.in
index f7a614d..3118cfa 100644
--- a/contrib/binutils/ld/po/POTFILES.in
+++ b/contrib/binutils/ld/po/POTFILES.in
@@ -1,7 +1,7 @@
deffile.h
+elf-hints-local.h
emultempl/armcoff.em
emultempl/pe.em
-ld.h
ldcref.c
ldctor.c
ldctor.h
@@ -11,6 +11,7 @@ ldexp.c
ldexp.h
ldfile.c
ldfile.h
+ld.h
ldlang.c
ldlang.h
ldlex.h
@@ -27,3 +28,5 @@ mri.c
mri.h
pe-dll.c
pe-dll.h
+pep-dll.c
+pep-dll.h
diff --git a/contrib/binutils/ld/po/ld.pot b/contrib/binutils/ld/po/ld.pot
index 87119b5..155f20e 100644
--- a/contrib/binutils/ld/po/ld.pot
+++ b/contrib/binutils/ld/po/ld.pot
@@ -7,7 +7,8 @@
msgid ""
msgstr ""
"Project-Id-Version: PACKAGE VERSION\n"
-"POT-Creation-Date: 2002-10-30 10:08-0500\n"
+"Report-Msgid-Bugs-To: \n"
+"POT-Creation-Date: 2007-06-27 16:44+0930\n"
"PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n"
"Last-Translator: FULL NAME <EMAIL@ADDRESS>\n"
"Language-Team: LANGUAGE <LL@li.org>\n"
@@ -15,195 +16,247 @@ msgstr ""
"Content-Type: text/plain; charset=CHARSET\n"
"Content-Transfer-Encoding: 8bit\n"
-#: emultempl/armcoff.em:71
+#: emultempl/armcoff.em:72
+#, c-format
msgid " --support-old-code Support interworking with old code\n"
msgstr ""
-#: emultempl/armcoff.em:72
+#: emultempl/armcoff.em:73
+#, c-format
msgid " --thumb-entry=<sym> Set the entry point to be Thumb symbol <sym>\n"
msgstr ""
-#: emultempl/armcoff.em:141
+#: emultempl/armcoff.em:121
#, c-format
msgid "Errors encountered processing file %s"
msgstr ""
-#: emultempl/armcoff.em:207 emultempl/pe.em:1422
+#: emultempl/armcoff.em:189 emultempl/pe.em:1528
msgid "%P: warning: '--thumb-entry %s' is overriding '-e %s'\n"
msgstr ""
-#: emultempl/armcoff.em:212 emultempl/pe.em:1427
+#: emultempl/armcoff.em:194 emultempl/pe.em:1533
msgid "%P: warning: connot find thumb start symbol %s\n"
msgstr ""
-#: emultempl/pe.em:317
+#: emultempl/pe.em:311
+#, c-format
msgid ""
" --base_file <basefile> Generate a base file for relocatable "
"DLLs\n"
msgstr ""
-#: emultempl/pe.em:318
+#: emultempl/pe.em:312
+#, c-format
msgid ""
" --dll Set image base to the default for DLLs\n"
msgstr ""
-#: emultempl/pe.em:319
+#: emultempl/pe.em:313
+#, c-format
msgid " --file-alignment <size> Set file alignment\n"
msgstr ""
-#: emultempl/pe.em:320
+#: emultempl/pe.em:314
+#, c-format
msgid " --heap <size> Set initial size of the heap\n"
msgstr ""
-#: emultempl/pe.em:321
+#: emultempl/pe.em:315
+#, c-format
msgid ""
" --image-base <address> Set start address of the executable\n"
msgstr ""
-#: emultempl/pe.em:322
+#: emultempl/pe.em:316
+#, c-format
msgid ""
" --major-image-version <number> Set version number of the executable\n"
msgstr ""
-#: emultempl/pe.em:323
+#: emultempl/pe.em:317
+#, c-format
msgid " --major-os-version <number> Set minimum required OS version\n"
msgstr ""
-#: emultempl/pe.em:324
+#: emultempl/pe.em:318
+#, c-format
msgid ""
" --major-subsystem-version <number> Set minimum required OS subsystem "
"version\n"
msgstr ""
-#: emultempl/pe.em:325
+#: emultempl/pe.em:319
+#, c-format
msgid ""
" --minor-image-version <number> Set revision number of the executable\n"
msgstr ""
-#: emultempl/pe.em:326
+#: emultempl/pe.em:320
+#, c-format
msgid " --minor-os-version <number> Set minimum required OS revision\n"
msgstr ""
-#: emultempl/pe.em:327
+#: emultempl/pe.em:321
+#, c-format
msgid ""
" --minor-subsystem-version <number> Set minimum required OS subsystem "
"revision\n"
msgstr ""
-#: emultempl/pe.em:328
+#: emultempl/pe.em:322
+#, c-format
msgid " --section-alignment <size> Set section alignment\n"
msgstr ""
-#: emultempl/pe.em:329
+#: emultempl/pe.em:323
+#, c-format
msgid " --stack <size> Set size of the initial stack\n"
msgstr ""
-#: emultempl/pe.em:330
+#: emultempl/pe.em:324
+#, c-format
msgid ""
" --subsystem <name>[:<version>] Set required OS subsystem [& version]\n"
msgstr ""
-#: emultempl/pe.em:331
+#: emultempl/pe.em:325
+#, c-format
msgid ""
" --support-old-code Support interworking with old code\n"
msgstr ""
-#: emultempl/pe.em:332
+#: emultempl/pe.em:326
+#, c-format
msgid ""
" --thumb-entry=<symbol> Set the entry point to be Thumb "
"<symbol>\n"
msgstr ""
-#: emultempl/pe.em:334
+#: emultempl/pe.em:328
+#, c-format
msgid ""
" --add-stdcall-alias Export symbols with and without @nn\n"
msgstr ""
-#: emultempl/pe.em:335
+#: emultempl/pe.em:329
+#, c-format
msgid " --disable-stdcall-fixup Don't link _sym to _sym@nn\n"
msgstr ""
-#: emultempl/pe.em:336
+#: emultempl/pe.em:330
+#, c-format
msgid ""
" --enable-stdcall-fixup Link _sym to _sym@nn without warnings\n"
msgstr ""
-#: emultempl/pe.em:337
+#: emultempl/pe.em:331
+#, c-format
msgid ""
" --exclude-symbols sym,sym,... Exclude symbols from automatic export\n"
msgstr ""
-#: emultempl/pe.em:338
+#: emultempl/pe.em:332
+#, c-format
msgid ""
" --exclude-libs lib,lib,... Exclude libraries from automatic "
"export\n"
msgstr ""
-#: emultempl/pe.em:339
+#: emultempl/pe.em:333
+#, c-format
msgid ""
" --export-all-symbols Automatically export all globals to "
"DLL\n"
msgstr ""
-#: emultempl/pe.em:340
+#: emultempl/pe.em:334
+#, c-format
msgid " --kill-at Remove @nn from exported symbols\n"
msgstr ""
-#: emultempl/pe.em:341
+#: emultempl/pe.em:335
+#, c-format
msgid " --out-implib <file> Generate import library\n"
msgstr ""
-#: emultempl/pe.em:342
+#: emultempl/pe.em:336
+#, c-format
msgid ""
" --output-def <file> Generate a .DEF file for the built DLL\n"
msgstr ""
-#: emultempl/pe.em:343
+#: emultempl/pe.em:337
+#, c-format
msgid " --warn-duplicate-exports Warn about duplicate exports.\n"
msgstr ""
-#: emultempl/pe.em:344
+#: emultempl/pe.em:338
+#, c-format
msgid ""
" --compat-implib Create backward compatible import "
"libs;\n"
" create __imp_<SYMBOL> as well.\n"
msgstr ""
-#: emultempl/pe.em:346
+#: emultempl/pe.em:340
+#, c-format
msgid ""
" --enable-auto-image-base Automatically choose image base for "
"DLLs\n"
" unless user specifies one\n"
msgstr ""
-#: emultempl/pe.em:348
+#: emultempl/pe.em:342
+#, c-format
msgid ""
" --disable-auto-image-base Do not auto-choose image base. "
"(default)\n"
msgstr ""
-#: emultempl/pe.em:349
+#: emultempl/pe.em:343
+#, c-format
msgid ""
" --dll-search-prefix=<string> When linking dynamically to a dll "
-"without an\n"
-" importlib, use <string><basename>."
-"dll \n"
+"without\n"
+" an importlib, use <string><basename>."
+"dll\n"
" in preference to lib<basename>.dll \n"
msgstr ""
-#: emultempl/pe.em:352
+#: emultempl/pe.em:346
+#, c-format
msgid ""
-" --enable-auto-import Do sophistcated linking of _sym to \n"
+" --enable-auto-import Do sophistcated linking of _sym to\n"
" __imp_sym for DATA references\n"
msgstr ""
-#: emultempl/pe.em:354
+#: emultempl/pe.em:348
+#, c-format
msgid ""
" --disable-auto-import Do not auto-import DATA items from "
"DLLs\n"
msgstr ""
-#: emultempl/pe.em:355
+#: emultempl/pe.em:349
+#, c-format
+msgid ""
+" --enable-runtime-pseudo-reloc Work around auto-import limitations by\n"
+" adding pseudo-relocations resolved "
+"at\n"
+" runtime.\n"
+msgstr ""
+
+#: emultempl/pe.em:352
+#, c-format
+msgid ""
+" --disable-runtime-pseudo-reloc Do not add runtime pseudo-relocations "
+"for\n"
+" auto-imported DATA.\n"
+msgstr ""
+
+#: emultempl/pe.em:354
+#, c-format
msgid ""
" --enable-extra-pe-debug Enable verbose debug output when "
"building\n"
@@ -211,119 +264,127 @@ msgid ""
"import)\n"
msgstr ""
+#: emultempl/pe.em:357
+#, c-format
+msgid ""
+" --large-address-aware Executable supports virtual addresses\n"
+" greater than 2 gigabytes\n"
+msgstr ""
+
#: emultempl/pe.em:424
msgid "%P: warning: bad version number in -subsystem option\n"
msgstr ""
-#: emultempl/pe.em:460
+#: emultempl/pe.em:455
msgid "%P%F: invalid subsystem type %s\n"
msgstr ""
-#: emultempl/pe.em:475
+#: emultempl/pe.em:494
msgid "%P%F: invalid hex number for PE parameter '%s'\n"
msgstr ""
-#: emultempl/pe.em:493
+#: emultempl/pe.em:511
msgid "%P%F: strange hex info for PE parameter '%s'\n"
msgstr ""
-#: emultempl/pe.em:532
+#: emultempl/pe.em:528
#, c-format
msgid "%s: Can't open base file %s\n"
msgstr ""
-#: emultempl/pe.em:738
+#: emultempl/pe.em:744
msgid "%P: warning, file alignment > section alignment.\n"
msgstr ""
-#: emultempl/pe.em:822 emultempl/pe.em:848
+#: emultempl/pe.em:831 emultempl/pe.em:858
#, c-format
msgid "Warning: resolving %s by linking to %s\n"
msgstr ""
-#: emultempl/pe.em:827 emultempl/pe.em:853
+#: emultempl/pe.em:836 emultempl/pe.em:863
msgid "Use --enable-stdcall-fixup to disable these warnings\n"
msgstr ""
-#: emultempl/pe.em:828 emultempl/pe.em:854
+#: emultempl/pe.em:837 emultempl/pe.em:864
msgid "Use --disable-stdcall-fixup to disable these fixups\n"
msgstr ""
-#: emultempl/pe.em:879
+#: emultempl/pe.em:883
#, c-format
msgid "%C: Cannot get section contents - auto-import exception\n"
msgstr ""
-#: emultempl/pe.em:887
-msgid ""
-"%C: variable '%T' can't be auto-imported. Please read the documentation for "
-"ld's --enable-auto-import for details.\n"
-msgstr ""
-
-#: emultempl/pe.em:916
+#: emultempl/pe.em:920
#, c-format
msgid "Info: resolving %s by linking to %s (auto-import)\n"
msgstr ""
-#: emultempl/pe.em:997
-msgid "%F%P: PE operations on non PE file.\n"
+#: emultempl/pe.em:992
+msgid "%F%P: cannot perform PE operations on non PE output file '%B'.\n"
msgstr ""
-#: emultempl/pe.em:1226
+#: emultempl/pe.em:1334
#, c-format
msgid "Errors encountered processing file %s\n"
msgstr ""
-#: emultempl/pe.em:1249
+#: emultempl/pe.em:1357
#, c-format
msgid "Errors encountered processing file %s for interworking"
msgstr ""
-#: emultempl/pe.em:1305 ldlang.c:2071 ldlang.c:4613 ldlang.c:4646
-#: ldmain.c:1062
+#: emultempl/pe.em:1418 ldexp.c:530 ldlang.c:3082 ldlang.c:6087 ldlang.c:6118
+#: ldmain.c:1167
msgid "%P%F: bfd_link_hash_lookup failed: %E\n"
msgstr ""
-#: ldcref.c:158
+#: ldcref.c:166
msgid "%X%P: bfd_hash_table_init of cref table failed: %E\n"
msgstr ""
-#: ldcref.c:164
+#: ldcref.c:172
msgid "%X%P: cref_hash_lookup failed: %E\n"
msgstr ""
-#: ldcref.c:235
+#: ldcref.c:182
+msgid "%X%P: cref alloc failed: %E\n"
+msgstr ""
+
+#: ldcref.c:362
+#, c-format
msgid ""
"\n"
"Cross Reference Table\n"
"\n"
msgstr ""
-#: ldcref.c:236
+#: ldcref.c:363
msgid "Symbol"
msgstr ""
-#: ldcref.c:244
+#: ldcref.c:371
+#, c-format
msgid "File\n"
msgstr ""
-#: ldcref.c:248
+#: ldcref.c:375
+#, c-format
msgid "No symbols\n"
msgstr ""
-#: ldcref.c:400
-msgid "%P: symbol `%T' missing from main hash table\n"
-msgstr ""
-
-#: ldcref.c:465
+#: ldcref.c:496 ldcref.c:618
msgid "%B%F: could not read symbols; %E\n"
msgstr ""
-#: ldcref.c:469 ldmain.c:1128 ldmain.c:1132
+#: ldcref.c:500 ldcref.c:622 ldmain.c:1232 ldmain.c:1236
msgid "%B%F: could not read symbols: %E\n"
msgstr ""
-#: ldcref.c:537 ldcref.c:544 ldmain.c:1178 ldmain.c:1185
+#: ldcref.c:551
+msgid "%P: symbol `%T' missing from main hash table\n"
+msgstr ""
+
+#: ldcref.c:693 ldcref.c:700 ldmain.c:1279 ldmain.c:1286
msgid "%B%F: could not read relocs: %E\n"
msgstr ""
@@ -331,1233 +392,1417 @@ msgstr ""
#. in OUTSECNAME. This reloc is from a section which is
#. mapped into a section from which references to OUTSECNAME
#. are prohibited. We must report an error.
-#: ldcref.c:563
+#: ldcref.c:727
msgid "%X%C: prohibited cross reference from %s to `%T' in %s\n"
msgstr ""
-#: ldctor.c:88
+#: ldctor.c:84
msgid "%P%X: Different relocs used in set %s\n"
msgstr ""
-#: ldctor.c:106
+#: ldctor.c:102
msgid "%P%X: Different object file formats composing set %s\n"
msgstr ""
-#: ldctor.c:288 ldctor.c:302
+#: ldctor.c:281 ldctor.c:295
msgid "%P%X: %s does not support reloc %s for set %s\n"
msgstr ""
-#: ldctor.c:323
+#: ldctor.c:316
msgid "%P%X: Unsupported size %d for set %s\n"
msgstr ""
-#: ldctor.c:344
+#: ldctor.c:337
msgid ""
"\n"
"Set Symbol\n"
"\n"
msgstr ""
-#: ldemul.c:225
+#: ldemul.c:235
#, c-format
msgid "%S SYSLIB ignored\n"
msgstr ""
-#: ldemul.c:232
+#: ldemul.c:241
#, c-format
msgid "%S HLL ignored\n"
msgstr ""
-#: ldemul.c:253
+#: ldemul.c:261
msgid "%P: unrecognised emulation mode: %s\n"
msgstr ""
-#: ldemul.c:254
+#: ldemul.c:262
msgid "Supported emulations: "
msgstr ""
-#: ldemul.c:298
+#: ldemul.c:304
+#, c-format
msgid " no emulation specific options.\n"
msgstr ""
-#: ldexp.c:184
-msgid "%F%P: %s uses undefined section %s\n"
-msgstr ""
-
-#: ldexp.c:186
-msgid "%F%P: %s forward reference of section %s\n"
-msgstr ""
-
-#: ldexp.c:400
+#: ldexp.c:344
#, c-format
msgid "%F%S %% by zero\n"
msgstr ""
-#: ldexp.c:407
+#: ldexp.c:352
#, c-format
msgid "%F%S / by zero\n"
msgstr ""
-#: ldexp.c:581
+#: ldexp.c:544
#, c-format
msgid "%X%S: unresolvable symbol `%s' referenced in expression\n"
msgstr ""
-#: ldexp.c:601
+#: ldexp.c:555
#, c-format
msgid "%F%S: undefined symbol `%s' referenced in expression\n"
msgstr ""
-#: ldexp.c:726
+#: ldexp.c:576 ldexp.c:593 ldexp.c:619
+#, c-format
+msgid "%F%S: undefined section `%s' referenced in expression\n"
+msgstr ""
+
+#: ldexp.c:645 ldexp.c:658
+#, c-format
+msgid "%F%S: undefined MEMORY region `%s' referenced in expression\n"
+msgstr ""
+
+#: ldexp.c:669
+#, c-format
+msgid "%F%S: unknown constant `%s' referenced in expression\n"
+msgstr ""
+
+#: ldexp.c:730
#, c-format
msgid "%F%S can not PROVIDE assignment to location counter\n"
msgstr ""
-#: ldexp.c:736
+#: ldexp.c:744
#, c-format
msgid "%F%S invalid assignment to location counter\n"
msgstr ""
-#: ldexp.c:740
+#: ldexp.c:747
#, c-format
msgid "%F%S assignment to location counter invalid outside of SECTION\n"
msgstr ""
-#: ldexp.c:749
+#: ldexp.c:756
msgid "%F%S cannot move location counter backwards (from %V to %V)\n"
msgstr ""
-#: ldexp.c:776
+#: ldexp.c:795
msgid "%P%F:%s: hash creation failed\n"
msgstr ""
-#: ldexp.c:1078 ldexp.c:1112
+#: ldexp.c:1054 ldexp.c:1079
#, c-format
msgid "%F%S nonconstant expression for %s\n"
msgstr ""
-#: ldexp.c:1167
+#: ldexp.c:1138
#, c-format
-msgid "%F%S non constant expression for %s\n"
+msgid "%F%S: nonconstant expression for %s\n"
msgstr ""
-#: ldfile.c:105
+#: ldfile.c:139
#, c-format
msgid "attempt to open %s failed\n"
msgstr ""
-#: ldfile.c:107
+#: ldfile.c:141
#, c-format
msgid "attempt to open %s succeeded\n"
msgstr ""
-#: ldfile.c:113
+#: ldfile.c:147
msgid "%F%P: invalid BFD target `%s'\n"
msgstr ""
-#: ldfile.c:218 ldfile.c:234
+#: ldfile.c:256 ldfile.c:285
msgid "%P: skipping incompatible %s when searching for %s\n"
msgstr ""
-#: ldfile.c:326
-msgid "%F%P: cannot open %s for %s: %E\n"
+#: ldfile.c:269
+msgid "%F%P: attempted static link of dynamic object `%s'\n"
+msgstr ""
+
+#: ldfile.c:388
+msgid "%F%P: %s (%s): No such file: %E\n"
msgstr ""
-#: ldfile.c:329
-msgid "%F%P: cannot open %s: %E\n"
+#: ldfile.c:391
+msgid "%F%P: %s: No such file: %E\n"
msgstr ""
-#: ldfile.c:359
+#: ldfile.c:421
+msgid "%F%P: cannot find %s inside %s\n"
+msgstr ""
+
+#: ldfile.c:424
msgid "%F%P: cannot find %s\n"
msgstr ""
-#: ldfile.c:378 ldfile.c:394
+#: ldfile.c:441 ldfile.c:457
#, c-format
msgid "cannot find script file %s\n"
msgstr ""
-#: ldfile.c:380 ldfile.c:396
+#: ldfile.c:443 ldfile.c:459
#, c-format
msgid "opened script file %s\n"
msgstr ""
-#: ldfile.c:445
+#: ldfile.c:503
msgid "%P%F: cannot open linker script file %s: %E\n"
msgstr ""
-#: ldfile.c:483
-msgid "%P%F: unknown architecture: %s\n"
+#: ldfile.c:550
+msgid "%P%F: cannot represent machine `%s'\n"
msgstr ""
-#: ldfile.c:499
-msgid "%P%F: target architecture respecified\n"
+#: ldlang.c:1069 ldlang.c:1111 ldlang.c:2831
+msgid "%P%F: can not create hash table: %E\n"
msgstr ""
-#: ldfile.c:553
-msgid "%P%F: cannot represent machine `%s'\n"
+#: ldlang.c:1154
+msgid "%P:%S: warning: redeclaration of memory region '%s'\n"
+msgstr ""
+
+#: ldlang.c:1160
+msgid "%P:%S: warning: memory region %s not declared\n"
+msgstr ""
+
+#: ldlang.c:1240 ldlang.c:1270
+msgid "%P%F: failed creating section `%s': %E\n"
+msgstr ""
+
+#: ldlang.c:1754
+#, c-format
+msgid ""
+"\n"
+"Discarded input sections\n"
+"\n"
msgstr ""
-#: ldlang.c:784
+#: ldlang.c:1762
msgid ""
"\n"
"Memory Configuration\n"
"\n"
msgstr ""
-#: ldlang.c:786
+#: ldlang.c:1764
msgid "Name"
msgstr ""
-#: ldlang.c:786
+#: ldlang.c:1764
msgid "Origin"
msgstr ""
-#: ldlang.c:786
+#: ldlang.c:1764
msgid "Length"
msgstr ""
-#: ldlang.c:786
+#: ldlang.c:1764
msgid "Attributes"
msgstr ""
-#: ldlang.c:828
+#: ldlang.c:1804
+#, c-format
msgid ""
"\n"
"Linker script and memory map\n"
"\n"
msgstr ""
-#: ldlang.c:845
+#: ldlang.c:1871
msgid "%P%F: Illegal use of `%s' section\n"
msgstr ""
-#: ldlang.c:855
+#: ldlang.c:1879
msgid "%P%F: output format %s cannot represent section called %s\n"
msgstr ""
-#: ldlang.c:1016
-msgid "%P: %B: warning: ignoring duplicate section `%s'\n"
-msgstr ""
-
-#: ldlang.c:1019
-msgid "%P: %B: warning: ignoring duplicate `%s' section symbol `%s'\n"
-msgstr ""
-
-#: ldlang.c:1033
-msgid "%P: %B: warning: duplicate section `%s' has different size\n"
-msgstr ""
-
-#: ldlang.c:1084
-msgid "%P%F: Failed to create hash table\n"
-msgstr ""
-
-#: ldlang.c:1503
+#: ldlang.c:2429
msgid "%B: file not recognized: %E\n"
msgstr ""
-#: ldlang.c:1504
+#: ldlang.c:2430
msgid "%B: matching formats:"
msgstr ""
-#: ldlang.c:1511
+#: ldlang.c:2437
msgid "%F%B: file not recognized: %E\n"
msgstr ""
-#: ldlang.c:1567
+#: ldlang.c:2507
msgid "%F%B: member %B in archive is not an object\n"
msgstr ""
-#: ldlang.c:1578 ldlang.c:1592
+#: ldlang.c:2518 ldlang.c:2532
msgid "%F%B: could not read symbols: %E\n"
msgstr ""
-#: ldlang.c:1859
+#: ldlang.c:2801
msgid ""
"%P: warning: could not find any targets that match endianness requirement\n"
msgstr ""
-#: ldlang.c:1872
+#: ldlang.c:2815
msgid "%P%F: target %s not found\n"
msgstr ""
-#: ldlang.c:1874
+#: ldlang.c:2817
msgid "%P%F: cannot open output file %s: %E\n"
msgstr ""
-#: ldlang.c:1884
+#: ldlang.c:2823
msgid "%P%F:%s: can not make object file: %E\n"
msgstr ""
-#: ldlang.c:1888
+#: ldlang.c:2827
msgid "%P%F:%s: can not set architecture: %E\n"
msgstr ""
-#: ldlang.c:1892
-msgid "%P%F: can not create link hash table: %E\n"
+#: ldlang.c:2975
+msgid "%P%F: bfd_hash_lookup failed creating symbol %s\n"
+msgstr ""
+
+#: ldlang.c:2993
+msgid "%P%F: bfd_hash_allocate failed creating symbol %s\n"
msgstr ""
-#: ldlang.c:2241
+#: ldlang.c:3426
msgid " load address 0x%V"
msgstr ""
-#: ldlang.c:2381
+#: ldlang.c:3661
msgid "%W (size before relaxing)\n"
msgstr ""
-#: ldlang.c:2468
+#: ldlang.c:3747
#, c-format
msgid "Address of section %s set to "
msgstr ""
-#: ldlang.c:2629
+#: ldlang.c:3900
#, c-format
msgid "Fail with %d\n"
msgstr ""
-#: ldlang.c:2874
+#: ldlang.c:4172
msgid "%X%P: section %s [%V -> %V] overlaps section %s [%V -> %V]\n"
msgstr ""
-#: ldlang.c:2903
+#: ldlang.c:4197
msgid "%X%P: address 0x%v of %B section %s is not within region %s\n"
msgstr ""
-#: ldlang.c:2911
+#: ldlang.c:4206
msgid "%X%P: region %s is full (%B section %s)\n"
msgstr ""
-#: ldlang.c:2961
+#: ldlang.c:4247
+#, c-format
+msgid ""
+"%F%S: non constant or forward reference address expression for section %s\n"
+msgstr ""
+
+#: ldlang.c:4272
msgid "%P%X: Internal error on COFF shared library section %s\n"
msgstr ""
-#: ldlang.c:3005
-msgid "%P: warning: no memory region specified for section `%s'\n"
+#: ldlang.c:4331
+msgid "%P%F: error: no memory region specified for loadable section `%s'\n"
msgstr ""
-#: ldlang.c:3020
-msgid "%P: warning: changing start of section %s by %u bytes\n"
+#: ldlang.c:4336
+msgid "%P: warning: no memory region specified for loadable section `%s'\n"
msgstr ""
-#: ldlang.c:3033
-#, c-format
-msgid "%F%S: non constant address expression for section %s\n"
+#: ldlang.c:4358
+msgid "%P: warning: changing start of section %s by %lu bytes\n"
+msgstr ""
+
+#: ldlang.c:4437
+msgid "%P: warning: dot moved backwards before `%s'\n"
msgstr ""
-#: ldlang.c:3208
+#: ldlang.c:4609
msgid "%P%F: can't relax section: %E\n"
msgstr ""
-#: ldlang.c:3403
+#: ldlang.c:4898
msgid "%F%P: invalid data statement\n"
msgstr ""
-#: ldlang.c:3440
+#: ldlang.c:4931
msgid "%F%P: invalid reloc statement\n"
msgstr ""
-#: ldlang.c:3579
+#: ldlang.c:5063
msgid "%P%F:%s: can't set start address\n"
msgstr ""
-#: ldlang.c:3592 ldlang.c:3610
+#: ldlang.c:5076 ldlang.c:5095
msgid "%P%F: can't set start address\n"
msgstr ""
-#: ldlang.c:3604
+#: ldlang.c:5088
msgid "%P: warning: cannot find entry symbol %s; defaulting to %V\n"
msgstr ""
-#: ldlang.c:3615
+#: ldlang.c:5100
msgid "%P: warning: cannot find entry symbol %s; not setting start address\n"
msgstr ""
-#: ldlang.c:3665
+#: ldlang.c:5149
msgid ""
"%P%F: Relocatable linking with relocations from format %s (%B) to format %s "
"(%B) is not supported\n"
msgstr ""
-#: ldlang.c:3674
+#: ldlang.c:5159
msgid ""
-"%P: warning: %s architecture of input file `%B' is incompatible with %s "
-"output\n"
+"%P%X: %s architecture of input file `%B' is incompatible with %s output\n"
msgstr ""
-#: ldlang.c:3695
-msgid "%E%X: failed to merge target specific data of file %B\n"
+#: ldlang.c:5181
+msgid "%P%X: failed to merge target specific data of file %B\n"
msgstr ""
-#: ldlang.c:3784
+#: ldlang.c:5265
msgid ""
"\n"
"Allocating common symbols\n"
msgstr ""
-#: ldlang.c:3785
+#: ldlang.c:5266
msgid ""
"Common symbol size file\n"
"\n"
msgstr ""
-#. This message happens when using the
-#. svr3.ifile linker script, so I have
-#. disabled it.
-#: ldlang.c:3863
-msgid "%P: no [COMMON] command, defaulting to .bss\n"
+#: ldlang.c:5401
+msgid "%P%F: invalid syntax in flags\n"
msgstr ""
-#: ldlang.c:3922
-msgid "%P%F: invalid syntax in flags\n"
+#: ldlang.c:5714
+msgid "%P%F: Failed to create hash table\n"
msgstr ""
-#: ldlang.c:4537
-msgid "%P%Fmultiple STARTUP files\n"
+#: ldlang.c:6009
+msgid "%P%F: multiple STARTUP files\n"
msgstr ""
-#: ldlang.c:4580
+#: ldlang.c:6057
msgid "%X%P:%S: section has both a load address and a load region\n"
msgstr ""
-#: ldlang.c:4830
+#: ldlang.c:6314
msgid "%F%P: bfd_record_phdr failed: %E\n"
msgstr ""
-#: ldlang.c:4849
+#: ldlang.c:6334
msgid "%X%P: section `%s' assigned to non-existent phdr `%s'\n"
msgstr ""
-#: ldlang.c:5150
+#: ldlang.c:6725
msgid "%X%P: unknown language `%s' in version information\n"
msgstr ""
-#: ldlang.c:5202
+#: ldlang.c:6867
msgid ""
"%X%P: anonymous version tag cannot be combined with other version tags\n"
msgstr ""
-#: ldlang.c:5209
+#: ldlang.c:6876
msgid "%X%P: duplicate version tag `%s'\n"
msgstr ""
-#: ldlang.c:5222 ldlang.c:5235
+#: ldlang.c:6896 ldlang.c:6905 ldlang.c:6922 ldlang.c:6932
msgid "%X%P: duplicate expression `%s' in version information\n"
msgstr ""
-#: ldlang.c:5277
+#: ldlang.c:6972
msgid "%X%P: unable to find version dependency `%s'\n"
msgstr ""
-#: ldlang.c:5299
+#: ldlang.c:6994
msgid "%X%P: unable to read .exports section contents\n"
msgstr ""
-#: ldmain.c:198
+#: ldmain.c:234
msgid "%X%P: can't set BFD default target to `%s': %E\n"
msgstr ""
-#: ldmain.c:291
-msgid "%P%F: -r and --mpc860c0 may not be used together\n"
-msgstr ""
-
-#: ldmain.c:293
+#: ldmain.c:298
msgid "%P%F: --relax and -r may not be used together\n"
msgstr ""
-#: ldmain.c:295
+#: ldmain.c:300
msgid "%P%F: -r and -shared may not be used together\n"
msgstr ""
-#: ldmain.c:301
+#: ldmain.c:343
msgid "%P%F: -F may not be used without -shared\n"
msgstr ""
-#: ldmain.c:303
+#: ldmain.c:345
msgid "%P%F: -f may not be used without -shared\n"
msgstr ""
-#: ldmain.c:342
+#: ldmain.c:397
msgid "using external linker script:"
msgstr ""
-#: ldmain.c:344
+#: ldmain.c:399
msgid "using internal linker script:"
msgstr ""
-#: ldmain.c:378
+#: ldmain.c:433
msgid "%P%F: no input files\n"
msgstr ""
-#: ldmain.c:383
+#: ldmain.c:437
msgid "%P: mode %s\n"
msgstr ""
-#: ldmain.c:400
+#: ldmain.c:453
msgid "%P%F: cannot open map file %s: %E\n"
msgstr ""
-#: ldmain.c:433
+#: ldmain.c:485
msgid "%P: link errors found, deleting executable `%s'\n"
msgstr ""
-#: ldmain.c:444
+#: ldmain.c:494
msgid "%F%B: final close failed: %E\n"
msgstr ""
-#: ldmain.c:468
+#: ldmain.c:520
msgid "%X%P: unable to open for source of copy `%s'\n"
msgstr ""
-#: ldmain.c:470
+#: ldmain.c:523
msgid "%X%P: unable to open for destination of copy `%s'\n"
msgstr ""
-#: ldmain.c:476
+#: ldmain.c:530
msgid "%P: Error writing file `%s'\n"
msgstr ""
-#: ldmain.c:482 pe-dll.c:1465
+#: ldmain.c:535 pe-dll.c:1572
#, c-format
msgid "%P: Error closing file `%s'\n"
msgstr ""
-#: ldmain.c:499
+#: ldmain.c:551
#, c-format
msgid "%s: total time in link: %ld.%06ld\n"
msgstr ""
-#: ldmain.c:502
+#: ldmain.c:554
#, c-format
msgid "%s: data size %ld\n"
msgstr ""
-#: ldmain.c:543
+#: ldmain.c:637
msgid "%P%F: missing argument to -m\n"
msgstr ""
-#: ldmain.c:671 ldmain.c:692 ldmain.c:723
+#: ldmain.c:784 ldmain.c:803 ldmain.c:834
msgid "%P%F: bfd_hash_table_init failed: %E\n"
msgstr ""
-#: ldmain.c:676 ldmain.c:695
+#: ldmain.c:788 ldmain.c:807
msgid "%P%F: bfd_hash_lookup failed: %E\n"
msgstr ""
-#: ldmain.c:710
+#: ldmain.c:821
msgid "%X%P: error: duplicate retain-symbols-file\n"
msgstr ""
-#: ldmain.c:754
+#: ldmain.c:864
msgid "%P%F: bfd_hash_lookup for insertion failed: %E\n"
msgstr ""
-#: ldmain.c:759
+#: ldmain.c:869
msgid "%P: `-retain-symbols-file' overrides `-s' and `-S'\n"
msgstr ""
-#: ldmain.c:835
+#: ldmain.c:944
+#, c-format
msgid ""
"Archive member included because of file (symbol)\n"
"\n"
msgstr ""
-#: ldmain.c:906
+#: ldmain.c:1014
msgid "%X%C: multiple definition of `%T'\n"
msgstr ""
-#: ldmain.c:909
+#: ldmain.c:1017
msgid "%D: first defined here\n"
msgstr ""
-#: ldmain.c:913
+#: ldmain.c:1021
msgid "%P: Disabling relaxation: it will not work with multiple definitions\n"
msgstr ""
-#: ldmain.c:944
+#: ldmain.c:1051
msgid "%B: warning: definition of `%T' overriding common\n"
msgstr ""
-#: ldmain.c:947
+#: ldmain.c:1054
msgid "%B: warning: common is here\n"
msgstr ""
-#: ldmain.c:954
+#: ldmain.c:1061
msgid "%B: warning: common of `%T' overridden by definition\n"
msgstr ""
-#: ldmain.c:957
+#: ldmain.c:1064
msgid "%B: warning: defined here\n"
msgstr ""
-#: ldmain.c:964
+#: ldmain.c:1071
msgid "%B: warning: common of `%T' overridden by larger common\n"
msgstr ""
-#: ldmain.c:967
+#: ldmain.c:1074
msgid "%B: warning: larger common is here\n"
msgstr ""
-#: ldmain.c:971
+#: ldmain.c:1078
msgid "%B: warning: common of `%T' overriding smaller common\n"
msgstr ""
-#: ldmain.c:974
+#: ldmain.c:1081
msgid "%B: warning: smaller common is here\n"
msgstr ""
-#: ldmain.c:978
+#: ldmain.c:1085
msgid "%B: warning: multiple common of `%T'\n"
msgstr ""
-#: ldmain.c:980
+#: ldmain.c:1087
msgid "%B: warning: previous common is here\n"
msgstr ""
-#: ldmain.c:1001 ldmain.c:1040
+#: ldmain.c:1107 ldmain.c:1145
msgid "%P: warning: global constructor %s used\n"
msgstr ""
-#: ldmain.c:1050
+#: ldmain.c:1155
msgid "%P%F: BFD backend error: BFD_RELOC_CTOR unsupported\n"
msgstr ""
-#: ldmain.c:1234
+#. We found a reloc for the symbol we are looking for.
+#: ldmain.c:1209 ldmain.c:1211 ldmain.c:1213 ldmain.c:1251 ldmain.c:1299
+msgid "warning: "
+msgstr ""
+
+#: ldmain.c:1334
msgid "%F%P: bfd_hash_table_init failed: %E\n"
msgstr ""
-#: ldmain.c:1241
+#: ldmain.c:1341
msgid "%F%P: bfd_hash_lookup failed: %E\n"
msgstr ""
-#: ldmain.c:1261
-msgid "%C: undefined reference to `%T'\n"
+#: ldmain.c:1362
+msgid "%X%C: undefined reference to `%T'\n"
+msgstr ""
+
+#: ldmain.c:1365
+msgid "%C: warning: undefined reference to `%T'\n"
+msgstr ""
+
+#: ldmain.c:1371
+msgid "%X%D: more undefined references to `%T' follow\n"
+msgstr ""
+
+#: ldmain.c:1374
+msgid "%D: warning: more undefined references to `%T' follow\n"
+msgstr ""
+
+#: ldmain.c:1385
+msgid "%X%B: undefined reference to `%T'\n"
+msgstr ""
+
+#: ldmain.c:1388
+msgid "%B: warning: undefined reference to `%T'\n"
msgstr ""
-#: ldmain.c:1267
-msgid "%D: more undefined references to `%T' follow\n"
+#: ldmain.c:1394
+msgid "%X%B: more undefined references to `%T' follow\n"
msgstr ""
-#: ldmain.c:1274
-msgid "%B: undefined reference to `%T'\n"
+#: ldmain.c:1397
+msgid "%B: warning: more undefined references to `%T' follow\n"
msgstr ""
-#: ldmain.c:1280
-msgid "%B: more undefined references to `%T' follow\n"
+#: ldmain.c:1436
+msgid " additional relocation overflows omitted from the output\n"
msgstr ""
-#: ldmain.c:1300 ldmain.c:1321 ldmain.c:1340
-msgid "%P%X: generated"
+#: ldmain.c:1449
+msgid " relocation truncated to fit: %s against undefined symbol `%T'"
+msgstr ""
+
+#: ldmain.c:1454
+msgid ""
+" relocation truncated to fit: %s against symbol `%T' defined in %A section "
+"in %B"
msgstr ""
-#: ldmain.c:1303
-msgid " relocation truncated to fit: %s %T"
+#: ldmain.c:1466
+msgid " relocation truncated to fit: %s against `%T'"
msgstr ""
-#: ldmain.c:1324
+#: ldmain.c:1483
#, c-format
-msgid "dangerous relocation: %s\n"
+msgid "%X%C: dangerous relocation: %s\n"
msgstr ""
-#: ldmain.c:1343
-msgid " reloc refers to symbol `%T' which is not being output\n"
+#: ldmain.c:1498
+msgid "%X%C: reloc refers to symbol `%T' which is not being output\n"
msgstr ""
-#: ldmisc.c:157
+#: ldmisc.c:148
+#, c-format
msgid "no symbol"
msgstr ""
-#: ldmisc.c:221
+#: ldmisc.c:245
#, c-format
msgid "built in linker script:%u"
msgstr ""
-#: ldmisc.c:271 ldmisc.c:275
+#: ldmisc.c:301 ldmisc.c:305
msgid "%B%F: could not read symbols\n"
msgstr ""
-#. We use abfd->filename in this initial line,
-#. in case filename is a .h file or something
-#. similarly unhelpful.
-#: ldmisc.c:311
+#: ldmisc.c:347
msgid "%B: In function `%T':\n"
msgstr ""
-#: ldmisc.c:463
+#: ldmisc.c:472
msgid "%F%P: internal error %s %d\n"
msgstr ""
-#: ldmisc.c:513
+#: ldmisc.c:521
msgid "%P: internal error: aborting at %s line %d in %s\n"
msgstr ""
-#: ldmisc.c:516
+#: ldmisc.c:524
msgid "%P: internal error: aborting at %s line %d\n"
msgstr ""
-#: ldmisc.c:518
+#: ldmisc.c:526
msgid "%P%F: please report this bug\n"
msgstr ""
#. Output for noisy == 2 is intended to follow the GNU standards.
-#: ldver.c:38
+#: ldver.c:37
#, c-format
-msgid "GNU ld version %s\n"
+msgid "GNU ld %s\n"
msgstr ""
-#: ldver.c:42
-msgid "Copyright 2002 Free Software Foundation, Inc.\n"
+#: ldver.c:41
+#, c-format
+msgid "Copyright 2007 Free Software Foundation, Inc.\n"
msgstr ""
-#: ldver.c:43
+#: ldver.c:42
+#, c-format
msgid ""
"This program is free software; you may redistribute it under the terms of\n"
"the GNU General Public License. This program has absolutely no warranty.\n"
msgstr ""
-#: ldver.c:52
+#: ldver.c:51
+#, c-format
msgid " Supported emulations:\n"
msgstr ""
-#: ldwrite.c:59 ldwrite.c:195
+#: ldwrite.c:55 ldwrite.c:191
msgid "%P%F: bfd_new_link_order failed\n"
msgstr ""
-#: ldwrite.c:325
+#: ldwrite.c:344
+msgid "%F%P: cannot create split section name for %s\n"
+msgstr ""
+
+#: ldwrite.c:356
msgid "%F%P: clone section failed: %E\n"
msgstr ""
-#: ldwrite.c:364
+#: ldwrite.c:394
#, c-format
msgid "%8x something else\n"
msgstr ""
-#: ldwrite.c:547
+#: ldwrite.c:564
msgid "%F%P: final link failed: %E\n"
msgstr ""
-#: lexsup.c:173 lexsup.c:268
+#: lexsup.c:205 lexsup.c:341
msgid "KEYWORD"
msgstr ""
-#: lexsup.c:173
+#: lexsup.c:205
msgid "Shared library control for HP/UX compatibility"
msgstr ""
-#: lexsup.c:176
+#: lexsup.c:208
msgid "ARCH"
msgstr ""
-#: lexsup.c:176
+#: lexsup.c:208
msgid "Set architecture"
msgstr ""
-#: lexsup.c:178 lexsup.c:339
+#: lexsup.c:210 lexsup.c:447
msgid "TARGET"
msgstr ""
-#: lexsup.c:178
+#: lexsup.c:210
msgid "Specify target for following input files"
msgstr ""
-#: lexsup.c:180 lexsup.c:221 lexsup.c:233 lexsup.c:242 lexsup.c:313
-#: lexsup.c:346 lexsup.c:386
+#: lexsup.c:213 lexsup.c:262 lexsup.c:274 lexsup.c:287 lexsup.c:289
+#: lexsup.c:402 lexsup.c:459 lexsup.c:516 lexsup.c:528
msgid "FILE"
msgstr ""
-#: lexsup.c:180
+#: lexsup.c:213
msgid "Read MRI format linker script"
msgstr ""
-#: lexsup.c:182
+#: lexsup.c:215
msgid "Force common symbols to be defined"
msgstr ""
-#: lexsup.c:186 lexsup.c:376 lexsup.c:378 lexsup.c:380
+#: lexsup.c:219 lexsup.c:501 lexsup.c:503 lexsup.c:505
msgid "ADDRESS"
msgstr ""
-#: lexsup.c:186
+#: lexsup.c:219
msgid "Set start address"
msgstr ""
-#: lexsup.c:188
+#: lexsup.c:221
msgid "Export all dynamic symbols"
msgstr ""
-#: lexsup.c:190
+#: lexsup.c:223
msgid "Link big-endian objects"
msgstr ""
-#: lexsup.c:192
+#: lexsup.c:225
msgid "Link little-endian objects"
msgstr ""
-#: lexsup.c:194 lexsup.c:197
+#: lexsup.c:227 lexsup.c:230
msgid "SHLIB"
msgstr ""
-#: lexsup.c:194
+#: lexsup.c:227
msgid "Auxiliary filter for shared object symbol table"
msgstr ""
-#: lexsup.c:197
+#: lexsup.c:230
msgid "Filter for shared object symbol table"
msgstr ""
-#: lexsup.c:199
+#: lexsup.c:233
msgid "Ignored"
msgstr ""
-#: lexsup.c:201
+#: lexsup.c:235
msgid "SIZE"
msgstr ""
-#: lexsup.c:201
+#: lexsup.c:235
msgid "Small data size (if no size, same as --shared)"
msgstr ""
-#: lexsup.c:204
+#: lexsup.c:238
msgid "FILENAME"
msgstr ""
-#: lexsup.c:204
+#: lexsup.c:238
msgid "Set internal name of shared library"
msgstr ""
-#: lexsup.c:206
+#: lexsup.c:240
msgid "PROGRAM"
msgstr ""
-#: lexsup.c:206
+#: lexsup.c:240
msgid "Set PROGRAM as the dynamic linker to use"
msgstr ""
-#: lexsup.c:208
+#: lexsup.c:243
msgid "LIBNAME"
msgstr ""
-#: lexsup.c:208
+#: lexsup.c:243
msgid "Search for library LIBNAME"
msgstr ""
-#: lexsup.c:210
+#: lexsup.c:245
msgid "DIRECTORY"
msgstr ""
-#: lexsup.c:210
+#: lexsup.c:245
msgid "Add DIRECTORY to library search path"
msgstr ""
-#: lexsup.c:212
+#: lexsup.c:248
+msgid "Override the default sysroot location"
+msgstr ""
+
+#: lexsup.c:250
msgid "EMULATION"
msgstr ""
-#: lexsup.c:212
+#: lexsup.c:250
msgid "Set emulation"
msgstr ""
-#: lexsup.c:214
+#: lexsup.c:252
msgid "Print map file on standard output"
msgstr ""
-#: lexsup.c:216
+#: lexsup.c:254
msgid "Do not page align data"
msgstr ""
-#: lexsup.c:218
+#: lexsup.c:256
msgid "Do not page align data, do not make text readonly"
msgstr ""
-#: lexsup.c:221
+#: lexsup.c:259
+msgid "Page align data, make text readonly"
+msgstr ""
+
+#: lexsup.c:262
msgid "Set output file name"
msgstr ""
-#: lexsup.c:223
+#: lexsup.c:264
msgid "Optimize output file"
msgstr ""
-#: lexsup.c:225
+#: lexsup.c:266
msgid "Ignored for SVR4 compatibility"
msgstr ""
-#: lexsup.c:229
-msgid "Generate relocateable output"
+#: lexsup.c:270
+msgid "Generate relocatable output"
msgstr ""
-#: lexsup.c:233
+#: lexsup.c:274
msgid "Just link symbols (if directory, same as --rpath)"
msgstr ""
-#: lexsup.c:236
+#: lexsup.c:277
msgid "Strip all symbols"
msgstr ""
-#: lexsup.c:238
+#: lexsup.c:279
msgid "Strip debugging symbols"
msgstr ""
-#: lexsup.c:240
+#: lexsup.c:281
+msgid "Strip symbols in discarded sections"
+msgstr ""
+
+#: lexsup.c:283
+msgid "Do not strip symbols in discarded sections"
+msgstr ""
+
+#: lexsup.c:285
msgid "Trace file opens"
msgstr ""
-#: lexsup.c:242
+#: lexsup.c:287
msgid "Read linker script"
msgstr ""
-#: lexsup.c:244 lexsup.c:260 lexsup.c:299 lexsup.c:311 lexsup.c:370
-#: lexsup.c:389 lexsup.c:409
+#: lexsup.c:289
+msgid "Read default linker script"
+msgstr ""
+
+#: lexsup.c:293 lexsup.c:311 lexsup.c:379 lexsup.c:400 lexsup.c:494
+#: lexsup.c:519 lexsup.c:554
msgid "SYMBOL"
msgstr ""
-#: lexsup.c:244
+#: lexsup.c:293
msgid "Start with undefined reference to SYMBOL"
msgstr ""
-#: lexsup.c:246
+#: lexsup.c:296
msgid "[=SECTION]"
msgstr ""
-#: lexsup.c:246
+#: lexsup.c:297
msgid "Don't merge input [SECTION | orphan] sections"
msgstr ""
-#: lexsup.c:248
+#: lexsup.c:299
msgid "Build global constructor/destructor tables"
msgstr ""
-#: lexsup.c:250
+#: lexsup.c:301
msgid "Print version information"
msgstr ""
-#: lexsup.c:252
+#: lexsup.c:303
msgid "Print version and emulation information"
msgstr ""
-#: lexsup.c:254
+#: lexsup.c:305
msgid "Discard all local symbols"
msgstr ""
-#: lexsup.c:256
+#: lexsup.c:307
msgid "Discard temporary local symbols (default)"
msgstr ""
-#: lexsup.c:258
+#: lexsup.c:309
msgid "Don't discard any local symbols"
msgstr ""
-#: lexsup.c:260
+#: lexsup.c:311
msgid "Trace mentions of SYMBOL"
msgstr ""
-#: lexsup.c:262 lexsup.c:348 lexsup.c:350
+#: lexsup.c:313 lexsup.c:461 lexsup.c:463
msgid "PATH"
msgstr ""
-#: lexsup.c:262
+#: lexsup.c:313
msgid "Default search path for Solaris compatibility"
msgstr ""
-#: lexsup.c:264
+#: lexsup.c:316
msgid "Start a group"
msgstr ""
-#: lexsup.c:266
+#: lexsup.c:318
msgid "End a group"
msgstr ""
-#: lexsup.c:268
+#: lexsup.c:322
+msgid "Accept input files whose architecture cannot be determined"
+msgstr ""
+
+#: lexsup.c:326
+msgid "Reject input files whose architecture is unknown"
+msgstr ""
+
+#: lexsup.c:329
+msgid ""
+"Set DT_NEEDED tags for DT_NEEDED entries in\n"
+"\t\t\t\tfollowing dynamic libs"
+msgstr ""
+
+#: lexsup.c:332
+msgid ""
+"Do not set DT_NEEDED tags for DT_NEEDED entries\n"
+"\t\t\t\tin following dynamic libs"
+msgstr ""
+
+#: lexsup.c:335
+msgid "Only set DT_NEEDED for following dynamic libs if used"
+msgstr ""
+
+#: lexsup.c:338
+msgid "Always set DT_NEEDED for following dynamic libs"
+msgstr ""
+
+#: lexsup.c:341
msgid "Ignored for SunOS compatibility"
msgstr ""
-#: lexsup.c:270
+#: lexsup.c:343
msgid "Link against shared libraries"
msgstr ""
-#: lexsup.c:276
+#: lexsup.c:349
msgid "Do not link against shared libraries"
msgstr ""
-#: lexsup.c:284
+#: lexsup.c:357
msgid "Bind global references locally"
msgstr ""
-#: lexsup.c:286
+#: lexsup.c:359
+msgid "Bind global function references locally"
+msgstr ""
+
+#: lexsup.c:361
msgid "Check section addresses for overlaps (default)"
msgstr ""
-#: lexsup.c:288
+#: lexsup.c:364
msgid "Do not check section addresses for overlaps"
msgstr ""
-#: lexsup.c:291
+#: lexsup.c:367
msgid "Output cross reference table"
msgstr ""
-#: lexsup.c:293
+#: lexsup.c:369
msgid "SYMBOL=EXPRESSION"
msgstr ""
-#: lexsup.c:293
+#: lexsup.c:369
msgid "Define a symbol"
msgstr ""
-#: lexsup.c:295
+#: lexsup.c:371
msgid "[=STYLE]"
msgstr ""
-#: lexsup.c:295
+#: lexsup.c:371
msgid "Demangle symbol names [using STYLE]"
msgstr ""
-#: lexsup.c:297
+#: lexsup.c:374
msgid "Generate embedded relocs"
msgstr ""
-#: lexsup.c:299
+#: lexsup.c:376
+msgid "Treat warnings as errors"
+msgstr ""
+
+#: lexsup.c:379
msgid "Call SYMBOL at unload-time"
msgstr ""
-#: lexsup.c:301
+#: lexsup.c:381
msgid "Force generation of file with .exe suffix"
msgstr ""
-#: lexsup.c:303
+#: lexsup.c:383
msgid "Remove unused sections (on some targets)"
msgstr ""
-#: lexsup.c:306
+#: lexsup.c:386
msgid "Don't remove unused sections (default)"
msgstr ""
-#: lexsup.c:309
+#: lexsup.c:389
+msgid "List removed unused sections on stderr"
+msgstr ""
+
+#: lexsup.c:392
+msgid "Do not list removed unused sections"
+msgstr ""
+
+#: lexsup.c:395
+msgid "Set default hash table size close to <NUMBER>"
+msgstr ""
+
+#: lexsup.c:398
msgid "Print option help"
msgstr ""
-#: lexsup.c:311
+#: lexsup.c:400
msgid "Call SYMBOL at load-time"
msgstr ""
-#: lexsup.c:313
+#: lexsup.c:402
msgid "Write a map file"
msgstr ""
-#: lexsup.c:315
+#: lexsup.c:404
msgid "Do not define Common storage"
msgstr ""
-#: lexsup.c:317
+#: lexsup.c:406
msgid "Do not demangle symbol names"
msgstr ""
-#: lexsup.c:319
+#: lexsup.c:408
msgid "Use less memory and more disk I/O"
msgstr ""
-#: lexsup.c:321
-msgid "Allow no undefined symbols"
+#: lexsup.c:410
+msgid "Do not allow unresolved references in object files"
msgstr ""
-#: lexsup.c:323
-msgid "Allow undefined symbols in shared objects"
+#: lexsup.c:413
+msgid "Allow unresolved references in shared libaries"
msgstr ""
-#: lexsup.c:325
+#: lexsup.c:417
+msgid "Do not allow unresolved references in shared libs"
+msgstr ""
+
+#: lexsup.c:421
msgid "Allow multiple definitions"
msgstr ""
-#: lexsup.c:327
+#: lexsup.c:423
msgid "Disallow undefined version"
msgstr ""
-#: lexsup.c:329
+#: lexsup.c:425
+msgid "Create default symbol version"
+msgstr ""
+
+#: lexsup.c:428
+msgid "Create default symbol version for imported symbols"
+msgstr ""
+
+#: lexsup.c:431
msgid "Don't warn about mismatched input files"
msgstr ""
-#: lexsup.c:331
+#: lexsup.c:434
+msgid "Don't warn on finding an incompatible library"
+msgstr ""
+
+#: lexsup.c:437
msgid "Turn off --whole-archive"
msgstr ""
-#: lexsup.c:333
+#: lexsup.c:439
msgid "Create an output file even if errors occur"
msgstr ""
-#: lexsup.c:337
+#: lexsup.c:444
msgid ""
"Only use library directories specified on\n"
"\t\t\t\tthe command line"
msgstr ""
-#: lexsup.c:339
+#: lexsup.c:447
msgid "Specify target of output file"
msgstr ""
-#: lexsup.c:341
+#: lexsup.c:450
msgid "Ignored for Linux compatibility"
msgstr ""
-#: lexsup.c:343
+#: lexsup.c:453
+msgid "Reduce memory overheads, possibly taking much longer"
+msgstr ""
+
+#: lexsup.c:456
msgid "Relax branches on certain targets"
msgstr ""
-#: lexsup.c:346
+#: lexsup.c:459
msgid "Keep only symbols listed in FILE"
msgstr ""
-#: lexsup.c:348
+#: lexsup.c:461
msgid "Set runtime shared library search path"
msgstr ""
-#: lexsup.c:350
+#: lexsup.c:463
msgid "Set link time shared library search path"
msgstr ""
-#: lexsup.c:352
+#: lexsup.c:466
msgid "Create a shared library"
msgstr ""
-#: lexsup.c:356
+#: lexsup.c:470
+msgid "Create a position independent executable"
+msgstr ""
+
+#: lexsup.c:474
msgid "Sort common symbols by size"
msgstr ""
-#: lexsup.c:360
+#: lexsup.c:478
+msgid "name|alignment"
+msgstr ""
+
+#: lexsup.c:479
+msgid "Sort sections by name or maximum alignment"
+msgstr ""
+
+#: lexsup.c:481
msgid "COUNT"
msgstr ""
-#: lexsup.c:360
+#: lexsup.c:481
msgid "How many tags to reserve in .dynamic section"
msgstr ""
-#: lexsup.c:362
+#: lexsup.c:484
msgid "[=SIZE]"
msgstr ""
-#: lexsup.c:362
+#: lexsup.c:484
msgid "Split output sections every SIZE octets"
msgstr ""
-#: lexsup.c:364
+#: lexsup.c:487
msgid "[=COUNT]"
msgstr ""
-#: lexsup.c:364
+#: lexsup.c:487
msgid "Split output sections every COUNT relocs"
msgstr ""
-#: lexsup.c:366
+#: lexsup.c:490
msgid "Print memory usage statistics"
msgstr ""
-#: lexsup.c:368
+#: lexsup.c:492
msgid "Display target specific options"
msgstr ""
-#: lexsup.c:370
+#: lexsup.c:494
msgid "Do task level linking"
msgstr ""
-#: lexsup.c:372
+#: lexsup.c:496
msgid "Use same format as native linker"
msgstr ""
-#: lexsup.c:374
+#: lexsup.c:498
msgid "SECTION=ADDRESS"
msgstr ""
-#: lexsup.c:374
+#: lexsup.c:498
msgid "Set address of named section"
msgstr ""
-#: lexsup.c:376
+#: lexsup.c:501
msgid "Set address of .bss section"
msgstr ""
-#: lexsup.c:378
+#: lexsup.c:503
msgid "Set address of .data section"
msgstr ""
-#: lexsup.c:380
+#: lexsup.c:505
msgid "Set address of .text section"
msgstr ""
-#: lexsup.c:382
+#: lexsup.c:508
+msgid ""
+"How to handle unresolved symbols. <method> is:\n"
+"\t\t\t\tignore-all, report-all, ignore-in-object-files,\n"
+"\t\t\t\tignore-in-shared-libs"
+msgstr ""
+
+#: lexsup.c:512
msgid "Output lots of information during link"
msgstr ""
-#: lexsup.c:386
+#: lexsup.c:516
msgid "Read version information script"
msgstr ""
-#: lexsup.c:389
+#: lexsup.c:519
msgid ""
"Take export symbols list from .exports, using\n"
"\t\t\t\tSYMBOL as the version."
msgstr ""
-#: lexsup.c:392
+#: lexsup.c:522
+msgid "Add data symbols to dynamic list"
+msgstr ""
+
+#: lexsup.c:524
+msgid "Use C++ operator new/delete dynamic list"
+msgstr ""
+
+#: lexsup.c:526
+msgid "Use C++ typeinfo dynamic list"
+msgstr ""
+
+#: lexsup.c:528
+msgid "Read dynamic list"
+msgstr ""
+
+#: lexsup.c:530
msgid "Warn about duplicate common symbols"
msgstr ""
-#: lexsup.c:394
+#: lexsup.c:532
msgid "Warn if global constructors/destructors are seen"
msgstr ""
-#: lexsup.c:397
+#: lexsup.c:535
msgid "Warn if the multiple GP values are used"
msgstr ""
-#: lexsup.c:399
+#: lexsup.c:537
msgid "Warn only once per undefined symbol"
msgstr ""
-#: lexsup.c:401
+#: lexsup.c:539
msgid "Warn if start of section changes due to alignment"
msgstr ""
-#: lexsup.c:404
-msgid "Treat warnings as errors"
+#: lexsup.c:542
+msgid "Warn if shared object has DT_TEXTREL"
msgstr ""
-#: lexsup.c:407
-msgid "Include all objects from following archives"
+#: lexsup.c:546
+msgid "Report unresolved symbols as warnings"
msgstr ""
-#: lexsup.c:409
-msgid "Use wrapper functions for SYMBOL"
+#: lexsup.c:549
+msgid "Report unresolved symbols as errors"
msgstr ""
-#: lexsup.c:411
-msgid "[=WORDS]"
+#: lexsup.c:551
+msgid "Include all objects from following archives"
msgstr ""
-#: lexsup.c:411
-msgid ""
-"Modify problematic branches in last WORDS (1-10,\n"
-"\t\t\t\tdefault 5) words of a page"
+#: lexsup.c:554
+msgid "Use wrapper functions for SYMBOL"
msgstr ""
-#: lexsup.c:577
+#: lexsup.c:701
msgid "%P: unrecognized option '%s'\n"
msgstr ""
-#: lexsup.c:579
+#: lexsup.c:705
msgid "%P%F: use the --help option for usage information\n"
msgstr ""
-#: lexsup.c:598
+#: lexsup.c:723
msgid "%P%F: unrecognized -a option `%s'\n"
msgstr ""
-#: lexsup.c:611
+#: lexsup.c:736
msgid "%P%F: unrecognized -assert option `%s'\n"
msgstr ""
-#: lexsup.c:654
+#: lexsup.c:779
msgid "%F%P: unknown demangling style `%s'"
msgstr ""
-#: lexsup.c:714
+#: lexsup.c:841
msgid "%P%F: invalid number `%s'\n"
msgstr ""
+#: lexsup.c:939
+msgid "%P%F: bad --unresolved-symbols option: %s\n"
+msgstr ""
+
#. This can happen if the user put "-rpath,a" on the command
#. line. (Or something similar. The comma is important).
#. Getopt becomes confused and thinks that this is a -r option
@@ -1566,128 +1811,167 @@ msgstr ""
#. an error message here. We cannot just make this a warning,
#. increment optind, and continue because getopt is too confused
#. and will seg-fault the next time around.
-#: lexsup.c:818
+#: lexsup.c:1013
msgid "%P%F: bad -rpath option\n"
msgstr ""
-#: lexsup.c:916
+#: lexsup.c:1124
msgid "%P%F: -shared not supported\n"
msgstr ""
-#: lexsup.c:948
+#: lexsup.c:1133
+msgid "%P%F: -pie not supported\n"
+msgstr ""
+
+#: lexsup.c:1143
+msgid "name"
+msgstr ""
+
+#: lexsup.c:1145
+msgid "alignment"
+msgstr ""
+
+#: lexsup.c:1148
+msgid "%P%F: invalid section sorting option: %s\n"
+msgstr ""
+
+#: lexsup.c:1180
msgid "%P%F: invalid argument to option \"--section-start\"\n"
msgstr ""
-#: lexsup.c:954
+#: lexsup.c:1187
msgid "%P%F: missing argument(s) to option \"--section-start\"\n"
msgstr ""
-#: lexsup.c:1103
+#: lexsup.c:1398
msgid "%P%F: may not nest groups (--help for usage)\n"
msgstr ""
-#: lexsup.c:1110
+#: lexsup.c:1405
msgid "%P%F: group ended before it began (--help for usage)\n"
msgstr ""
-#: lexsup.c:1124
-msgid "%P%F: invalid argument to option \"mpc860c0\"\n"
+#: lexsup.c:1433
+msgid "%P%X: --hash-size needs a numeric argument\n"
msgstr ""
-#: lexsup.c:1179
+#: lexsup.c:1484 lexsup.c:1497
msgid "%P%F: invalid hex number `%s'\n"
msgstr ""
-#: lexsup.c:1191
+#: lexsup.c:1533
#, c-format
msgid "Usage: %s [options] file...\n"
msgstr ""
-#: lexsup.c:1193
+#: lexsup.c:1535
+#, c-format
msgid "Options:\n"
msgstr ""
+#: lexsup.c:1613
+#, c-format
+msgid " @FILE"
+msgstr ""
+
+#: lexsup.c:1616
+#, c-format
+msgid "Read options from FILE\n"
+msgstr ""
+
#. Note: Various tools (such as libtool) depend upon the
#. format of the listings below - do not change them.
-#: lexsup.c:1276
+#: lexsup.c:1621
#, c-format
msgid "%s: supported targets:"
msgstr ""
-#: lexsup.c:1284
+#: lexsup.c:1629
#, c-format
msgid "%s: supported emulations: "
msgstr ""
-#: lexsup.c:1289
+#: lexsup.c:1634
#, c-format
msgid "%s: emulation specific options:\n"
msgstr ""
-#: lexsup.c:1293
+#: lexsup.c:1639
#, c-format
msgid "Report bugs to %s\n"
msgstr ""
-#: mri.c:334
+#: mri.c:291
msgid "%P%F: unknown format type %s\n"
msgstr ""
-#: pe-dll.c:323
+#: pe-dll.c:367
#, c-format
msgid "%XUnsupported PEI architecture: %s\n"
msgstr ""
#: pe-dll.c:673
#, c-format
+msgid "%XCannot export %s: invalid export name\n"
+msgstr ""
+
+#: pe-dll.c:729
+#, c-format
msgid "%XError, duplicate EXPORT with ordinals: %s (%d vs %d)\n"
msgstr ""
-#: pe-dll.c:680
+#: pe-dll.c:736
#, c-format
msgid "Warning, duplicate EXPORT: %s\n"
msgstr ""
-#: pe-dll.c:744
+#: pe-dll.c:823
#, c-format
msgid "%XCannot export %s: symbol not defined\n"
msgstr ""
-#: pe-dll.c:750
+#: pe-dll.c:829
#, c-format
msgid "%XCannot export %s: symbol wrong type (%d vs %d)\n"
msgstr ""
-#: pe-dll.c:757
+#: pe-dll.c:836
#, c-format
msgid "%XCannot export %s: symbol not found\n"
msgstr ""
-#: pe-dll.c:872
+#: pe-dll.c:949
#, c-format
msgid "%XError, ordinal used twice: %d (%s vs %s)\n"
msgstr ""
-#: pe-dll.c:1183
+#: pe-dll.c:1297
#, c-format
msgid "%XError: %d-bit reloc in dll\n"
msgstr ""
-#: pe-dll.c:1318
+#: pe-dll.c:1425
#, c-format
msgid "%s: Can't open output def file %s\n"
msgstr ""
-#: pe-dll.c:1461
+#: pe-dll.c:1568
+#, c-format
msgid "; no contents available\n"
msgstr ""
-#: pe-dll.c:2137
+#: pe-dll.c:2364
+msgid ""
+"%C: variable '%T' can't be auto-imported. Please read the documentation for "
+"ld's --enable-auto-import for details.\n"
+msgstr ""
+
+#: pe-dll.c:2394
#, c-format
msgid "%XCan't open .lib file: %s\n"
msgstr ""
-#: pe-dll.c:2142
+#: pe-dll.c:2399
#, c-format
msgid "Creating library file: %s\n"
msgstr ""
diff --git a/contrib/binutils/ld/scripttempl/elf.sc b/contrib/binutils/ld/scripttempl/elf.sc
index 187a289..205d162 100644
--- a/contrib/binutils/ld/scripttempl/elf.sc
+++ b/contrib/binutils/ld/scripttempl/elf.sc
@@ -3,6 +3,8 @@
# NOP - four byte opcode for no-op (defaults to 0)
# NO_SMALL_DATA - no .sbss/.sbss2/.sdata/.sdata2 sections if not
# empty.
+# SMALL_DATA_CTOR - .ctors contains small data.
+# SMALL_DATA_DTOR - .dtors contains small data.
# 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 ...
@@ -10,20 +12,29 @@
# OTHER_TEXT_SECTIONS - these get put in .text when relocating
# OTHER_READWRITE_SECTIONS - other than .data .bss .ctors .sdata ...
# (e.g., .PARISC.global)
+# OTHER_RELRO_SECTIONS - other than .data.rel.ro ...
+# (e.g. PPC32 .fixup, .got[12])
# OTHER_BSS_SECTIONS - other than .bss .sbss ...
+# ATTRS_SECTIONS - at the end
# OTHER_SECTIONS - at the end
# EXECUTABLE_SYMBOLS - symbols that must be defined for an
# executable (e.g., _DYNAMIC_LINK)
+# TEXT_START_ADDR - the first byte of the text segment, after any
+# headers.
+# TEXT_BASE_ADDRESS - the first byte of the text segment.
# TEXT_START_SYMBOLS - symbols that appear at the start of the
# .text section.
# DATA_START_SYMBOLS - symbols that appear at the start of the
# .data section.
+# DATA_END_SYMBOLS - symbols that appear at the end of the
+# writeable data sections.
# OTHER_GOT_SYMBOLS - symbols defined just before .got.
# OTHER_GOT_SECTIONS - sections just after .got.
# OTHER_SDATA_SECTIONS - sections just after .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.
+# PLT_BEFORE_GOT - .plt just before .got when .plt is in data segement.
# BSS_PLT - .plt should be in bss segment
# TEXT_DYNAMIC - .dynamic in text segment, not data segment.
# EMBEDDED - whether this is for an embedded system.
@@ -36,7 +47,14 @@
# FINI_START, FINI_END - statements just before and just after
# combination of .fini sections.
# STACK_ADDR - start of a .stack section.
-# OTHER_END_SYMBOLS - symbols to place right at the end of the script.
+# OTHER_SYMBOLS - symbols to place right at the end of the script.
+# ETEXT_NAME - name of a symbol for the end of the text section,
+# normally etext.
+# SEPARATE_GOTPLT - if set, .got.plt should be separate output section,
+# so that .got can be in the RELRO area. It should be set to
+# the number of bytes in the beginning of .got.plt which can be
+# in the RELRO area as well.
+# USER_LABEL_PREFIX - prefix to add to user-visible symbols.
#
# When adding sections, do note that the names of some sections are used
# when specifying the start address of the next.
@@ -62,6 +80,9 @@
# .debug_info .gnu.linkonce.wi.foo
# .tdata .gnu.linkonce.td.foo
# .tbss .gnu.linkonce.tb.foo
+# .lrodata .gnu.linkonce.lr.foo
+# .ldata .gnu.linkonce.l.foo
+# .lbss .gnu.linkonce.lb.foo
#
# Each of these can also have corresponding .rel.* and .rela.* sections.
@@ -72,30 +93,47 @@ if [ -z "$MACHINE" ]; then OUTPUT_ARCH=${ARCH}; else OUTPUT_ARCH=${ARCH}:${MACHI
test -z "${ELFSIZE}" && ELFSIZE=32
test -z "${ALIGNMENT}" && ALIGNMENT="${ELFSIZE} / 8"
test "$LD_FLAG" = "N" && DATA_ADDR=.
+test -z "${ETEXT_NAME}" && ETEXT_NAME=etext
test -n "$CREATE_SHLIB$CREATE_PIE" && test -n "$SHLIB_DATA_ADDR" && COMMONPAGESIZE=""
test -z "$CREATE_SHLIB$CREATE_PIE" && test -n "$DATA_ADDR" && COMMONPAGESIZE=""
+test -n "$RELRO_NOW" && unset SEPARATE_GOTPLT
+test -z "$ATTRS_SECTIONS" && ATTRS_SECTIONS=".gnu.attributes 0 : { KEEP (*(.gnu.attributes)) }"
DATA_SEGMENT_ALIGN="ALIGN(${SEGMENT_SIZE}) + (. & (${MAXPAGESIZE} - 1))"
+DATA_SEGMENT_RELRO_END=""
DATA_SEGMENT_END=""
if test -n "${COMMONPAGESIZE}"; then
DATA_SEGMENT_ALIGN="ALIGN (${SEGMENT_SIZE}) - ((${MAXPAGESIZE} - .) & (${MAXPAGESIZE} - 1)); . = DATA_SEGMENT_ALIGN (${MAXPAGESIZE}, ${COMMONPAGESIZE})"
DATA_SEGMENT_END=". = DATA_SEGMENT_END (.);"
+ DATA_SEGMENT_RELRO_END=". = DATA_SEGMENT_RELRO_END (${SEPARATE_GOTPLT-0}, .);"
+fi
+if test -z "${INITIAL_READONLY_SECTIONS}${CREATE_SHLIB}"; then
+ INITIAL_READONLY_SECTIONS=".interp ${RELOCATING-0} : { *(.interp) }"
+fi
+if test -z "$PLT"; then
+ PLT=".plt ${RELOCATING-0} : { *(.plt) }"
+fi
+test -n "${DATA_PLT-${BSS_PLT-text}}" && TEXT_PLT=yes
+if test -z "$GOT"; then
+ if test -z "$SEPARATE_GOTPLT"; then
+ GOT=".got ${RELOCATING-0} : { *(.got.plt) *(.got) }"
+ else
+ GOT=".got ${RELOCATING-0} : { *(.got) }"
+ GOTPLT=".got.plt ${RELOCATING-0} : { *(.got.plt) }"
+ fi
fi
-INTERP=".interp ${RELOCATING-0} : { *(.interp) }"
-PLT=".plt ${RELOCATING-0} : { *(.plt) }"
-test -z "$GOT" && GOT=".got ${RELOCATING-0} : { *(.got.plt) *(.got) }"
DYNAMIC=".dynamic ${RELOCATING-0} : { *(.dynamic) }"
RODATA=".rodata ${RELOCATING-0} : { *(.rodata${RELOCATING+ .rodata.* .gnu.linkonce.r.*}) }"
+DATARELRO=".data.rel.ro : { *(.data.rel.ro.local* .gnu.linkonce.d.rel.ro.local.*) *(.data.rel.ro* .gnu.linkonce.d.rel.ro.*) }"
STACKNOTE="/DISCARD/ : { *(.note.GNU-stack) }"
if test -z "${NO_SMALL_DATA}"; then
SBSS=".sbss ${RELOCATING-0} :
{
- ${RELOCATING+PROVIDE (__sbss_start = .);}
- ${RELOCATING+PROVIDE (___sbss_start = .);}
+ ${RELOCATING+${SBSS_START_SYMBOLS}}
+ ${CREATE_SHLIB+*(.sbss2 .sbss2.* .gnu.linkonce.sb2.*)}
*(.dynsbss)
*(.sbss${RELOCATING+ .sbss.* .gnu.linkonce.sb.*})
*(.scommon)
- ${RELOCATING+PROVIDE (__sbss_end = .);}
- ${RELOCATING+PROVIDE (___sbss_end = .);}
+ ${RELOCATING+${SBSS_END_SYMBOLS}}
}"
SBSS2=".sbss2 ${RELOCATING-0} : { *(.sbss2${RELOCATING+ .sbss2.* .gnu.linkonce.sb2.*}) }"
SDATA="/* We want the small data sections together, so single-instruction offsets
@@ -104,9 +142,14 @@ if test -z "${NO_SMALL_DATA}"; then
.sdata ${RELOCATING-0} :
{
${RELOCATING+${SDATA_START_SYMBOLS}}
+ ${CREATE_SHLIB+*(.sdata2 .sdata2.* .gnu.linkonce.s2.*)}
*(.sdata${RELOCATING+ .sdata.* .gnu.linkonce.s.*})
}"
- SDATA2=".sdata2 ${RELOCATING-0} : { *(.sdata2${RELOCATING+ .sdata2.* .gnu.linkonce.s2.*}) }"
+ SDATA2=".sdata2 ${RELOCATING-0} :
+ {
+ ${RELOCATING+${SDATA2_START_SYMBOLS}}
+ *(.sdata2${RELOCATING+ .sdata2.* .gnu.linkonce.s2.*})
+ }"
REL_SDATA=".rel.sdata ${RELOCATING-0} : { *(.rel.sdata${RELOCATING+ .rel.sdata.* .rel.gnu.linkonce.s.*}) }
.rela.sdata ${RELOCATING-0} : { *(.rela.sdata${RELOCATING+ .rela.sdata.* .rela.gnu.linkonce.s.*}) }"
REL_SBSS=".rel.sbss ${RELOCATING-0} : { *(.rel.sbss${RELOCATING+ .rel.sbss.* .rel.gnu.linkonce.sb.*}) }
@@ -115,7 +158,45 @@ if test -z "${NO_SMALL_DATA}"; then
.rela.sdata2 ${RELOCATING-0} : { *(.rela.sdata2${RELOCATING+ .rela.sdata2.* .rela.gnu.linkonce.s2.*}) }"
REL_SBSS2=".rel.sbss2 ${RELOCATING-0} : { *(.rel.sbss2${RELOCATING+ .rel.sbss2.* .rel.gnu.linkonce.sb2.*}) }
.rela.sbss2 ${RELOCATING-0} : { *(.rela.sbss2${RELOCATING+ .rela.sbss2.* .rela.gnu.linkonce.sb2.*}) }"
+else
+ NO_SMALL_DATA=" "
+fi
+if test -z "${DATA_GOT}"; then
+ if test -n "${NO_SMALL_DATA}"; then
+ DATA_GOT=" "
+ fi
+fi
+if test -z "${SDATA_GOT}"; then
+ if test -z "${NO_SMALL_DATA}"; then
+ SDATA_GOT=" "
+ fi
fi
+test -n "$SEPARATE_GOTPLT" && SEPARATE_GOTPLT=" "
+test "${LARGE_SECTIONS}" = "yes" && REL_LARGE="
+ .rel.ldata ${RELOCATING-0} : { *(.rel.ldata${RELOCATING+ .rel.ldata.* .rel.gnu.linkonce.l.*}) }
+ .rela.ldata ${RELOCATING-0} : { *(.rela.ldata${RELOCATING+ .rela.ldata.* .rela.gnu.linkonce.l.*}) }
+ .rel.lbss ${RELOCATING-0} : { *(.rel.lbss${RELOCATING+ .rel.lbss.* .rel.gnu.linkonce.lb.*}) }
+ .rela.lbss ${RELOCATING-0} : { *(.rela.lbss${RELOCATING+ .rela.lbss.* .rela.gnu.linkonce.lb.*}) }
+ .rel.lrodata ${RELOCATING-0} : { *(.rel.lrodata${RELOCATING+ .rel.lrodata.* .rel.gnu.linkonce.lr.*}) }
+ .rela.lrodata ${RELOCATING-0} : { *(.rela.lrodata${RELOCATING+ .rela.lrodata.* .rela.gnu.linkonce.lr.*}) }"
+test "${LARGE_SECTIONS}" = "yes" && OTHER_BSS_SECTIONS="
+ ${OTHER_BSS_SECTIONS}
+ .lbss ${RELOCATING-0} :
+ {
+ *(.dynlbss)
+ *(.lbss${RELOCATING+ .lbss.* .gnu.linkonce.lb.*})
+ *(LARGE_COMMON)
+ }"
+test "${LARGE_SECTIONS}" = "yes" && LARGE_SECTIONS="
+ .lrodata ${RELOCATING-0} ${RELOCATING+ALIGN(${MAXPAGESIZE}) + (. & (${MAXPAGESIZE} - 1))} :
+ {
+ *(.lrodata${RELOCATING+ .lrodata.* .gnu.linkonce.lr.*})
+ }
+ .ldata ${RELOCATING-0} ${RELOCATING+ALIGN(${MAXPAGESIZE}) + (. & (${MAXPAGESIZE} - 1))} :
+ {
+ *(.ldata${RELOCATING+ .ldata.* .gnu.linkonce.l.*})
+ ${RELOCATING+. = ALIGN(. != 0 ? ${ALIGNMENT} : 1);}
+ }"
CTOR=".ctors ${CONSTRUCTING-0} :
{
${CONSTRUCTING+${CTOR_START}}
@@ -129,14 +210,15 @@ CTOR=".ctors ${CONSTRUCTING-0} :
doesn't matter which directory crtbegin.o
is in. */
- KEEP (*crtbegin*.o(.ctors))
+ KEEP (*crtbegin.o(.ctors))
+ KEEP (*crtbegin?.o(.ctors))
/* We don't want to include the .ctor section from
- from the crtend.o file until after the sorted ctors.
+ the crtend.o file until after the sorted ctors.
The .ctor section from the crtend file contains the
end of ctors marker and it must be last */
- KEEP (*(EXCLUDE_FILE (*crtend*.o $OTHER_EXCLUDE_FILES) .ctors))
+ KEEP (*(EXCLUDE_FILE (*crtend.o *crtend?.o $OTHER_EXCLUDE_FILES) .ctors))
KEEP (*(SORT(.ctors.*)))
KEEP (*(.ctors))
${CONSTRUCTING+${CTOR_END}}
@@ -144,8 +226,9 @@ CTOR=".ctors ${CONSTRUCTING-0} :
DTOR=".dtors ${CONSTRUCTING-0} :
{
${CONSTRUCTING+${DTOR_START}}
- KEEP (*crtbegin*.o(.dtors))
- KEEP (*(EXCLUDE_FILE (*crtend*.o $OTHER_EXCLUDE_FILES) .dtors))
+ KEEP (*crtbegin.o(.dtors))
+ KEEP (*crtbegin?.o(.dtors))
+ KEEP (*(EXCLUDE_FILE (*crtend.o *crtend?.o $OTHER_EXCLUDE_FILES) .dtors))
KEEP (*(SORT(.dtors.*)))
KEEP (*(.dtors))
${CONSTRUCTING+${DTOR_END}}
@@ -170,8 +253,6 @@ OUTPUT_ARCH(${OUTPUT_ARCH})
ENTRY(${ENTRY})
${RELOCATING+${LIB_SEARCH_DIRS}}
-${RELOCATING+/* Do we need any of these for elf?
- __DYNAMIC = 0; ${STACKZERO+${STACKZERO}} ${SHLIB_PATH+${SHLIB_PATH}} */}
${RELOCATING+${EXECUTABLE_SYMBOLS}}
${RELOCATING+${INPUT_FILES}}
${RELOCATING- /* For some reason, the Solaris linker makes bad executables
@@ -185,10 +266,10 @@ SECTIONS
${CREATE_SHLIB-${CREATE_PIE-${RELOCATING+PROVIDE (__executable_start = ${TEXT_START_ADDR}); . = ${TEXT_BASE_ADDRESS};}}}
${CREATE_SHLIB+${RELOCATING+. = ${SHLIB_TEXT_START_ADDR:-0} + SIZEOF_HEADERS;}}
${CREATE_PIE+${RELOCATING+. = ${SHLIB_TEXT_START_ADDR:-0} + SIZEOF_HEADERS;}}
- ${CREATE_SHLIB-${INTERP}}
${INITIAL_READONLY_SECTIONS}
${TEXT_DYNAMIC+${DYNAMIC}}
.hash ${RELOCATING-0} : { *(.hash) }
+ .gnu.hash ${RELOCATING-0} : { *(.gnu.hash) }
.dynsym ${RELOCATING-0} : { *(.dynsym) }
.dynstr ${RELOCATING-0} : { *(.dynstr) }
.gnu.version ${RELOCATING-0} : { *(.gnu.version) }
@@ -211,6 +292,8 @@ eval $COMBRELOCCAT <<EOF
.rel.rodata ${RELOCATING-0} : { *(.rel.rodata${RELOCATING+ .rel.rodata.* .rel.gnu.linkonce.r.*}) }
.rela.rodata ${RELOCATING-0} : { *(.rela.rodata${RELOCATING+ .rela.rodata.* .rela.gnu.linkonce.r.*}) }
${OTHER_READONLY_RELOC_SECTIONS}
+ .rel.data.rel.ro ${RELOCATING-0} : { *(.rel.data.rel.ro${RELOCATING+* .rel.gnu.linkonce.d.rel.ro.*}) }
+ .rela.data.rel.ro ${RELOCATING-0} : { *(.rela.data.rel.ro${RELOCATING+* .rela.gnu.linkonce.d.rel.ro.*}) }
.rel.data ${RELOCATING-0} : { *(.rel.data${RELOCATING+ .rel.data.* .rel.gnu.linkonce.d.*}) }
.rela.data ${RELOCATING-0} : { *(.rela.data${RELOCATING+ .rela.data.* .rela.gnu.linkonce.d.*}) }
.rel.tdata ${RELOCATING-0} : { *(.rel.tdata${RELOCATING+ .rel.tdata.* .rel.gnu.linkonce.td.*}) }
@@ -230,6 +313,7 @@ eval $COMBRELOCCAT <<EOF
${REL_SBSS2}
.rel.bss ${RELOCATING-0} : { *(.rel.bss${RELOCATING+ .rel.bss.* .rel.gnu.linkonce.b.*}) }
.rela.bss ${RELOCATING-0} : { *(.rela.bss${RELOCATING+ .rela.bss.* .rela.gnu.linkonce.b.*}) }
+ ${REL_LARGE}
EOF
if [ -n "$COMBRELOC" ]; then
cat <<EOF
@@ -259,11 +343,13 @@ cat <<EOF
${RELOCATING+${INIT_END}}
} =${NOP-0}
- ${DATA_PLT-${BSS_PLT-${PLT}}}
+ ${TEXT_PLT+${PLT}}
+ ${TINY_READONLY_SECTION}
.text ${RELOCATING-0} :
{
${RELOCATING+${TEXT_START_SYMBOLS}}
*(.text .stub${RELOCATING+ .text.* .gnu.linkonce.t.*})
+ KEEP (*(.text.*personality*))
/* .gnu.warning sections are handled specially by elf32.em. */
*(.gnu.warning)
${RELOCATING+${OTHER_TEXT_SECTIONS}}
@@ -274,15 +360,17 @@ cat <<EOF
KEEP (*(.fini))
${RELOCATING+${FINI_END}}
} =${NOP-0}
- ${RELOCATING+PROVIDE (__etext = .);}
- ${RELOCATING+PROVIDE (_etext = .);}
- ${RELOCATING+PROVIDE (etext = .);}
+ ${RELOCATING+PROVIDE (__${ETEXT_NAME} = .);}
+ ${RELOCATING+PROVIDE (_${ETEXT_NAME} = .);}
+ ${RELOCATING+PROVIDE (${ETEXT_NAME} = .);}
${WRITABLE_RODATA-${RODATA}}
.rodata1 ${RELOCATING-0} : { *(.rodata1) }
${CREATE_SHLIB-${SDATA2}}
${CREATE_SHLIB-${SBSS2}}
${OTHER_READONLY_SECTIONS}
.eh_frame_hdr : { *(.eh_frame_hdr) }
+ .eh_frame ${RELOCATING-0} : ONLY_IF_RO { KEEP (*(.eh_frame)) }
+ .gcc_except_table ${RELOCATING-0} : ONLY_IF_RO { *(.gcc_except_table .gcc_except_table.*) }
/* Adjust the address for the data segment. We want to adjust up to
the same address within the page on the next page up. */
@@ -290,50 +378,69 @@ cat <<EOF
${CREATE_SHLIB+${RELOCATING+. = ${SHLIB_DATA_ADDR-${DATA_SEGMENT_ALIGN}};}}
${CREATE_PIE+${RELOCATING+. = ${SHLIB_DATA_ADDR-${DATA_SEGMENT_ALIGN}};}}
- /* Ensure the __preinit_array_start label is properly aligned. We
- could instead move the label definition inside the section, but
- the linker would then create the section even if it turns out to
- be empty, which isn't pretty. */
- ${RELOCATING+. = ALIGN(${ALIGNMENT});}
- ${RELOCATING+${CREATE_SHLIB-PROVIDE (__preinit_array_start = .);}}
- .preinit_array ${RELOCATING-0} : { *(.preinit_array) }
- ${RELOCATING+${CREATE_SHLIB-PROVIDE (__preinit_array_end = .);}}
+ /* Exception handling */
+ .eh_frame ${RELOCATING-0} : ONLY_IF_RW { KEEP (*(.eh_frame)) }
+ .gcc_except_table ${RELOCATING-0} : ONLY_IF_RW { *(.gcc_except_table .gcc_except_table.*) }
- ${RELOCATING+${CREATE_SHLIB-PROVIDE (__init_array_start = .);}}
- .init_array ${RELOCATING-0} : { *(.init_array) }
- ${RELOCATING+${CREATE_SHLIB-PROVIDE (__init_array_end = .);}}
+ /* Thread Local Storage sections */
+ .tdata ${RELOCATING-0} : { *(.tdata${RELOCATING+ .tdata.* .gnu.linkonce.td.*}) }
+ .tbss ${RELOCATING-0} : { *(.tbss${RELOCATING+ .tbss.* .gnu.linkonce.tb.*})${RELOCATING+ *(.tcommon)} }
- ${RELOCATING+${CREATE_SHLIB-PROVIDE (__fini_array_start = .);}}
- .fini_array ${RELOCATING-0} : { *(.fini_array) }
- ${RELOCATING+${CREATE_SHLIB-PROVIDE (__fini_array_end = .);}}
+ .preinit_array ${RELOCATING-0} :
+ {
+ ${RELOCATING+${CREATE_SHLIB-PROVIDE_HIDDEN (${USER_LABEL_PREFIX}__preinit_array_start = .);}}
+ KEEP (*(.preinit_array))
+ ${RELOCATING+${CREATE_SHLIB-PROVIDE_HIDDEN (${USER_LABEL_PREFIX}__preinit_array_end = .);}}
+ }
+ .init_array ${RELOCATING-0} :
+ {
+ ${RELOCATING+${CREATE_SHLIB-PROVIDE_HIDDEN (${USER_LABEL_PREFIX}__init_array_start = .);}}
+ KEEP (*(SORT(.init_array.*)))
+ KEEP (*(.init_array))
+ ${RELOCATING+${CREATE_SHLIB-PROVIDE_HIDDEN (${USER_LABEL_PREFIX}__init_array_end = .);}}
+ }
+ .fini_array ${RELOCATING-0} :
+ {
+ ${RELOCATING+${CREATE_SHLIB-PROVIDE_HIDDEN (${USER_LABEL_PREFIX}__fini_array_start = .);}}
+ KEEP (*(.fini_array))
+ KEEP (*(SORT(.fini_array.*)))
+ ${RELOCATING+${CREATE_SHLIB-PROVIDE_HIDDEN (${USER_LABEL_PREFIX}__fini_array_end = .);}}
+ }
+ ${SMALL_DATA_CTOR-${RELOCATING+${CTOR}}}
+ ${SMALL_DATA_DTOR-${RELOCATING+${DTOR}}}
+ .jcr ${RELOCATING-0} : { KEEP (*(.jcr)) }
+
+ ${RELOCATING+${DATARELRO}}
+ ${OTHER_RELRO_SECTIONS}
+ ${TEXT_DYNAMIC-${DYNAMIC}}
+ ${DATA_GOT+${RELRO_NOW+${GOT}}}
+ ${DATA_GOT+${RELRO_NOW+${GOTPLT}}}
+ ${DATA_GOT+${RELRO_NOW-${SEPARATE_GOTPLT+${GOT}}}}
+ ${RELOCATING+${DATA_SEGMENT_RELRO_END}}
+ ${DATA_GOT+${RELRO_NOW-${SEPARATE_GOTPLT-${GOT}}}}
+ ${DATA_GOT+${RELRO_NOW-${GOTPLT}}}
+
+ ${DATA_PLT+${PLT_BEFORE_GOT-${PLT}}}
.data ${RELOCATING-0} :
{
${RELOCATING+${DATA_START_SYMBOLS}}
*(.data${RELOCATING+ .data.* .gnu.linkonce.d.*})
+ ${RELOCATING+KEEP (*(.gnu.linkonce.d.*personality*))}
${CONSTRUCTING+SORT(CONSTRUCTORS)}
}
.data1 ${RELOCATING-0} : { *(.data1) }
- .tdata ${RELOCATING-0} : { *(.tdata${RELOCATING+ .tdata.* .gnu.linkonce.td.*}) }
- .tbss ${RELOCATING-0} : { *(.tbss${RELOCATING+ .tbss.* .gnu.linkonce.tb.*})${RELOCATING+ *(.tcommon)} }
- .eh_frame ${RELOCATING-0} : { KEEP (*(.eh_frame)) }
- .gcc_except_table ${RELOCATING-0} : { *(.gcc_except_table) }
${WRITABLE_RODATA+${RODATA}}
${OTHER_READWRITE_SECTIONS}
- ${TEXT_DYNAMIC-${DYNAMIC}}
- ${RELOCATING+${CTOR}}
- ${RELOCATING+${DTOR}}
- .jcr ${RELOCATING-0} : { KEEP (*(.jcr)) }
- ${DATA_PLT+${PLT}}
- ${RELOCATING+${OTHER_GOT_SYMBOLS}}
- ${GOT}
- ${OTHER_GOT_SECTIONS}
- ${CREATE_SHLIB+${SDATA2}}
- ${CREATE_SHLIB+${SBSS2}}
+ ${SMALL_DATA_CTOR+${RELOCATING+${CTOR}}}
+ ${SMALL_DATA_DTOR+${RELOCATING+${DTOR}}}
+ ${DATA_PLT+${PLT_BEFORE_GOT+${PLT}}}
+ ${SDATA_GOT+${RELOCATING+${OTHER_GOT_SYMBOLS}}}
+ ${SDATA_GOT+${GOT}}
+ ${SDATA_GOT+${OTHER_GOT_SECTIONS}}
${SDATA}
${OTHER_SDATA_SECTIONS}
- ${RELOCATING+_edata = .;}
- ${RELOCATING+PROVIDE (edata = .);}
+ ${RELOCATING+${DATA_END_SYMBOLS-${USER_LABEL_PREFIX}_edata = .; PROVIDE (${USER_LABEL_PREFIX}edata = .);}}
${RELOCATING+__bss_start = .;}
${RELOCATING+${OTHER_BSS_SYMBOLS}}
${SBSS}
@@ -345,14 +452,18 @@ cat <<EOF
*(COMMON)
/* Align here to ensure that the .bss section occupies space up to
_end. Align after .bss to ensure correct alignment even if the
- .bss section disappears because there are no input sections. */
- ${RELOCATING+. = ALIGN(${ALIGNMENT});}
+ .bss section disappears because there are no input sections.
+ FIXME: Why do we need it? When there is no .bss section, we don't
+ pad the .data section. */
+ ${RELOCATING+. = ALIGN(. != 0 ? ${ALIGNMENT} : 1);}
}
${OTHER_BSS_SECTIONS}
- ${RELOCATING+. = ALIGN(${ALIGNMENT});}
- ${RELOCATING+_end = .;}
${RELOCATING+${OTHER_BSS_END_SYMBOLS}}
- ${RELOCATING+PROVIDE (end = .);}
+ ${RELOCATING+. = ALIGN(${ALIGNMENT});}
+ ${LARGE_SECTIONS}
+ ${RELOCATING+. = ALIGN(${ALIGNMENT});}
+ ${RELOCATING+${OTHER_END_SYMBOLS}}
+ ${RELOCATING+${END_SYMBOLS-${USER_LABEL_PREFIX}_end = .; PROVIDE (${USER_LABEL_PREFIX}end = .);}}
${RELOCATING+${DATA_SEGMENT_END}}
/* Stabs debugging sections. */
@@ -382,7 +493,7 @@ cat <<EOF
.debug_pubnames 0 : { *(.debug_pubnames) }
/* DWARF 2 */
- .debug_info 0 : { *(.debug_info .gnu.linkonce.wi.*) }
+ .debug_info 0 : { *(.debug_info${RELOCATING+ .gnu.linkonce.wi.*}) }
.debug_abbrev 0 : { *(.debug_abbrev) }
.debug_line 0 : { *(.debug_line) }
.debug_frame 0 : { *(.debug_frame) }
@@ -396,9 +507,17 @@ cat <<EOF
.debug_typenames 0 : { *(.debug_typenames) }
.debug_varnames 0 : { *(.debug_varnames) }
+ /* DWARF 3 */
+ .debug_pubtypes 0 : { *(.debug_pubtypes) }
+ .debug_ranges 0 : { *(.debug_ranges) }
+
+ ${TINY_DATA_SECTION}
+ ${TINY_BSS_SECTION}
+
${STACK_ADDR+${STACK}}
+ ${ATTRS_SECTIONS}
${OTHER_SECTIONS}
- ${RELOCATING+${OTHER_END_SYMBOLS}}
+ ${RELOCATING+${OTHER_SYMBOLS}}
${RELOCATING+${STACKNOTE}}
}
EOF
diff --git a/contrib/binutils/ld/scripttempl/elf32cr16.sc b/contrib/binutils/ld/scripttempl/elf32cr16.sc
new file mode 100644
index 0000000..2e62fa2
--- /dev/null
+++ b/contrib/binutils/ld/scripttempl/elf32cr16.sc
@@ -0,0 +1,175 @@
+# Linker Script for National Semiconductor's CR16-ELF32.
+
+# The next line should be uncommented if it is desired to link
+# without libstart.o and directly enter main.
+
+# ENTRY=_main
+
+test -z "$ENTRY" && ENTRY=_start
+cat <<EOF
+
+/* Example Linker Script for linking NS CR16 elf32 files. */
+
+/* The next line forces the entry point (${ENTRY} in this script)
+ to be entered in the output file as an undefined symbol.
+ It is needed in case the entry point is not called explicitly
+ (which is the usual case) AND is in an archive. */
+
+OUTPUT_FORMAT("${OUTPUT_FORMAT}")
+OUTPUT_ARCH(${ARCH})
+EXTERN(${ENTRY})
+ENTRY(${ENTRY})
+
+/* Define memory regions. */
+MEMORY
+{
+ rom : ORIGIN = 0x2, LENGTH = 3M
+ ram : ORIGIN = 4M, LENGTH = 10M
+}
+
+/* Many sections come in three flavours. There is the 'real' section,
+ like ".data". Then there are the per-procedure or per-variable
+ sections, generated by -ffunction-sections and -fdata-sections in GCC,
+ and useful for --gc-sections, which for a variable "foo" might be
+ ".data.foo". Then there are the linkonce sections, for which the linker
+ eliminates duplicates, which are named like ".gnu.linkonce.d.foo".
+ The exact correspondences are:
+
+ Section Linkonce section
+ .text .gnu.linkonce.t.foo
+ .rdata .gnu.linkonce.r.foo
+ .data .gnu.linkonce.d.foo
+ .bss .gnu.linkonce.b.foo
+ .debug_info .gnu.linkonce.wi.foo */
+
+SECTIONS
+{
+ .init :
+ {
+ __INIT_START = .;
+ KEEP (*(.init))
+ __INIT_END = .;
+ } > rom
+
+ .fini :
+ {
+ __FINI_START = .;
+ KEEP (*(.fini))
+ __FINI_END = .;
+ } > rom
+
+ .jcr :
+ {
+ KEEP (*(.jcr))
+ } > rom
+
+ .text :
+ {
+ __TEXT_START = .;
+ *(.text) *(.text.*) *(.gnu.linkonce.t.*)
+ __TEXT_END = .;
+ } > rom
+
+ .rdata :
+ {
+ __RDATA_START = .;
+ *(.rdata_4) *(.rdata_2) *(.rdata_1) *(.rdata.*) *(.gnu.linkonce.r.*) *(.rodata*)
+ __RDATA_END = .;
+ } > rom
+
+ .ctor ALIGN(4) :
+ {
+ __CTOR_START = .;
+ /* The compiler uses crtbegin.o to find the start
+ of the constructors, so we make sure it is
+ first. Because this is a wildcard, it
+ doesn't matter if the user does not
+ actually link against crtbegin.o; the
+ linker won't look for a file to match a
+ wildcard. The wildcard also means that it
+ doesn't matter which directory crtbegin.o
+ is in. */
+
+ KEEP (*crtbegin*.o(.ctors))
+
+ /* We don't want to include the .ctor section from
+ the crtend.o file until after the sorted ctors.
+ The .ctor section from the crtend file contains the
+ end of ctors marker and it must be last */
+
+ KEEP (*(EXCLUDE_FILE (*crtend*.o) .ctors))
+ KEEP (*(SORT(.ctors.*)))
+ KEEP (*(.ctors))
+ __CTOR_END = .;
+ } > rom
+
+ .dtor ALIGN(4) :
+ {
+ __DTOR_START = .;
+ KEEP (*crtbegin*.o(.dtors))
+ KEEP (*(EXCLUDE_FILE (*crtend*.o) .dtors))
+ KEEP (*(SORT(.dtors.*)))
+ KEEP (*(.dtors))
+ __DTOR_END = .;
+ } > rom
+
+ .data :
+ {
+ __DATA_START = .;
+ *(.data_4) *(.data_2) *(.data_1) *(.data) *(.data.*) *(.gnu.linkonce.d.*)
+ __DATA_END = .;
+ } > ram AT > rom
+
+ .bss (NOLOAD) :
+ {
+ __BSS_START = .;
+ *(.bss_4) *(.bss_2) *(.bss_1) *(.bss) *(COMMON) *(.bss.*) *(.gnu.linkonce.b.*)
+ __BSS_END = .;
+ } > ram
+
+/* You may change the sizes of the following sections to fit the actual
+ size your program requires.
+
+ The heap and stack are aligned to the bus width, as a speed optimization
+ for accessing data located there. */
+
+ .heap :
+ {
+ . = ALIGN(4);
+ __HEAP_START = .;
+ . += 0x2000; __HEAP_MAX = .;
+ } > ram
+
+ .stack :
+ {
+ . = ALIGN(4);
+ . += 0x6000;
+ __STACK_START = .;
+ } > ram
+
+ .istack :
+ {
+ . = ALIGN(4);
+ . += 0x100;
+ __ISTACK_START = .;
+ } > ram
+
+ .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. */
+
+ .debug_aranges 0 : { *(.debug_aranges) }
+ .debug_pubnames 0 : { *(.debug_pubnames) }
+ .debug_info 0 : { *(.debug_info .gnu.linkonce.wi.*) }
+ .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) }
+}
+
+__DATA_IMAGE_START = LOADADDR(.data);
+EOF
diff --git a/contrib/binutils/ld/scripttempl/mep.sc b/contrib/binutils/ld/scripttempl/mep.sc
new file mode 100644
index 0000000..0d459c6
--- /dev/null
+++ b/contrib/binutils/ld/scripttempl/mep.sc
@@ -0,0 +1,446 @@
+#
+# Unusual variables checked by this code:
+# NOP - four byte opcode for no-op (defaults to 0)
+# NO_SMALL_DATA - no .sbss/.sbss2/.sdata/.sdata2 sections if not
+# empty.
+# SMALL_DATA_CTOR - .ctors contains small data.
+# SMALL_DATA_DTOR - .dtors contains small data.
+# 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_RELRO_SECTIONS - other than .data.rel.ro ...
+# (e.g. PPC32 .fixup, .got[12])
+# OTHER_BSS_SECTIONS - other than .bss .sbss ...
+# OTHER_SECTIONS - at the end
+# EXECUTABLE_SYMBOLS - symbols that must be defined for an
+# executable (e.g., _DYNAMIC_LINK)
+# TEXT_START_ADDR - the first byte of the text segment, after any
+# headers.
+# TEXT_BASE_ADDRESS - the first byte of the text segment.
+# TEXT_START_SYMBOLS - symbols that appear at the start of the
+# .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.
+# OTHER_SDATA_SECTIONS - sections just after .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.
+# PLT_BEFORE_GOT - .plt just before .got when .plt is in data segement.
+# BSS_PLT - .plt should be in bss 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.
+# INPUT_FILES - INPUT command of files to always include
+# WRITABLE_RODATA - if set, the .rodata section should be writable
+# INIT_START, INIT_END - statements just before and just after
+# combination of .init sections.
+# FINI_START, FINI_END - statements just before and just after
+# combination of .fini sections.
+# STACK_ADDR - start of a .stack section.
+# OTHER_END_SYMBOLS - symbols to place right at the end of the script.
+# SEPARATE_GOTPLT - if set, .got.plt should be separate output section,
+# so that .got can be in the RELRO area. It should be set to
+# the number of bytes in the beginning of .got.plt which can be
+# in the RELRO area as well.
+#
+# When adding sections, do note that the names of some sections are used
+# when specifying the start address of the next.
+#
+
+# Many sections come in three flavours. There is the 'real' section,
+# like ".data". Then there are the per-procedure or per-variable
+# sections, generated by -ffunction-sections and -fdata-sections in GCC,
+# and useful for --gc-sections, which for a variable "foo" might be
+# ".data.foo". Then there are the linkonce sections, for which the linker
+# eliminates duplicates, which are named like ".gnu.linkonce.d.foo".
+# The exact correspondences are:
+#
+# Section Linkonce section
+# .text .gnu.linkonce.t.foo
+# .rodata .gnu.linkonce.r.foo
+# .data .gnu.linkonce.d.foo
+# .bss .gnu.linkonce.b.foo
+# .sdata .gnu.linkonce.s.foo
+# .sbss .gnu.linkonce.sb.foo
+# .sdata2 .gnu.linkonce.s2.foo
+# .sbss2 .gnu.linkonce.sb2.foo
+# .debug_info .gnu.linkonce.wi.foo
+# .tdata .gnu.linkonce.td.foo
+# .tbss .gnu.linkonce.tb.foo
+#
+# Each of these can also have corresponding .rel.* and .rela.* sections.
+
+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 -z "${ALIGNMENT}" && ALIGNMENT="${ELFSIZE} / 8"
+test "$LD_FLAG" = "N" && DATA_ADDR=.
+test -n "$CREATE_SHLIB$CREATE_PIE" && test -n "$SHLIB_DATA_ADDR" && COMMONPAGESIZE=""
+test -z "$CREATE_SHLIB$CREATE_PIE" && test -n "$DATA_ADDR" && COMMONPAGESIZE=""
+test -n "$RELRO_NOW" && unset SEPARATE_GOTPLT
+DATA_SEGMENT_ALIGN="ALIGN(${SEGMENT_SIZE}) + (. & (${MAXPAGESIZE} - 1))"
+DATA_SEGMENT_RELRO_END=""
+DATA_SEGMENT_RELRO_GOTPLT_END=""
+DATA_SEGMENT_END=""
+if test -n "${COMMONPAGESIZE}"; then
+ DATA_SEGMENT_ALIGN="ALIGN (${SEGMENT_SIZE}) - ((${MAXPAGESIZE} - .) & (${MAXPAGESIZE} - 1)); . = DATA_SEGMENT_ALIGN (${MAXPAGESIZE}, ${COMMONPAGESIZE})"
+ DATA_SEGMENT_END=". = DATA_SEGMENT_END (.);"
+ if test -n "${SEPARATE_GOTPLT}"; then
+ DATA_SEGMENT_RELRO_GOTPLT_END=". = DATA_SEGMENT_RELRO_END (${SEPARATE_GOTPLT}, .);"
+ else
+ DATA_SEGMENT_RELRO_END=". = DATA_SEGMENT_RELRO_END (0, .);"
+ fi
+fi
+INTERP=".interp ${RELOCATING-0} : { *(.interp) }"
+PLT=".plt ${RELOCATING-0} : { *(.plt) }"
+if test -z "$GOT"; then
+ if test -z "$SEPARATE_GOTPLT"; then
+ GOT=".got ${RELOCATING-0} : { *(.got.plt) *(.got) }"
+ else
+ GOT=".got ${RELOCATING-0} : { *(.got) }"
+ GOTPLT="${RELOCATING+${DATA_SEGMENT_RELRO_GOTPLT_END}}
+ .got.plt ${RELOCATING-0} : { *(.got.plt) }"
+ fi
+fi
+DYNAMIC=".dynamic ${RELOCATING-0} : { *(.dynamic) }"
+RODATA=".rodata ${RELOCATING-0} : { *(.rodata${RELOCATING+ .rodata.* .gnu.linkonce.r.*}) }"
+DATARELRO=".data.rel.ro : { *(.data.rel.ro.local) *(.data.rel.ro*) }"
+STACKNOTE="/DISCARD/ : { *(.note.GNU-stack) }"
+if test -z "${NO_SMALL_DATA}"; then
+ SBSS=".sbss ${RELOCATING-0} :
+ {
+ ${RELOCATING+PROVIDE (__sbss_start = .);}
+ ${RELOCATING+PROVIDE (___sbss_start = .);}
+ ${CREATE_SHLIB+*(.sbss2 .sbss2.* .gnu.linkonce.sb2.*)}
+ *(.dynsbss)
+ *(.sbss${RELOCATING+ .sbss.* .gnu.linkonce.sb.*})
+ *(.scommon)
+ ${RELOCATING+PROVIDE (__sbss_end = .);}
+ ${RELOCATING+PROVIDE (___sbss_end = .);}
+ }"
+ SBSS2=".sbss2 ${RELOCATING-0} : { *(.sbss2${RELOCATING+ .sbss2.* .gnu.linkonce.sb2.*}) }"
+ SDATA="/* 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} :
+ {
+ ${RELOCATING+${SDATA_START_SYMBOLS}}
+ ${CREATE_SHLIB+*(.sdata2 .sdata2.* .gnu.linkonce.s2.*)}
+ *(.sdata${RELOCATING+ .sdata.* .gnu.linkonce.s.*})
+ }"
+ SDATA2=".sdata2 ${RELOCATING-0} : { *(.sdata2${RELOCATING+ .sdata2.* .gnu.linkonce.s2.*}) }"
+ REL_SDATA=".rel.sdata ${RELOCATING-0} : { *(.rel.sdata${RELOCATING+ .rel.sdata.* .rel.gnu.linkonce.s.*}) }
+ .rela.sdata ${RELOCATING-0} : { *(.rela.sdata${RELOCATING+ .rela.sdata.* .rela.gnu.linkonce.s.*}) }"
+ REL_SBSS=".rel.sbss ${RELOCATING-0} : { *(.rel.sbss${RELOCATING+ .rel.sbss.* .rel.gnu.linkonce.sb.*}) }
+ .rela.sbss ${RELOCATING-0} : { *(.rela.sbss${RELOCATING+ .rela.sbss.* .rela.gnu.linkonce.sb.*}) }"
+ REL_SDATA2=".rel.sdata2 ${RELOCATING-0} : { *(.rel.sdata2${RELOCATING+ .rel.sdata2.* .rel.gnu.linkonce.s2.*}) }
+ .rela.sdata2 ${RELOCATING-0} : { *(.rela.sdata2${RELOCATING+ .rela.sdata2.* .rela.gnu.linkonce.s2.*}) }"
+ REL_SBSS2=".rel.sbss2 ${RELOCATING-0} : { *(.rel.sbss2${RELOCATING+ .rel.sbss2.* .rel.gnu.linkonce.sb2.*}) }
+ .rela.sbss2 ${RELOCATING-0} : { *(.rela.sbss2${RELOCATING+ .rela.sbss2.* .rela.gnu.linkonce.sb2.*}) }"
+else
+ NO_SMALL_DATA=" "
+fi
+test -n "$SEPARATE_GOTPLT" && SEPARATE_GOTPLT=" "
+CTOR=".ctors ${CONSTRUCTING-0} :
+ {
+ ${CONSTRUCTING+${CTOR_START}}
+ /* gcc uses crtbegin.o to find the start of
+ the constructors, so we make sure it is
+ first. Because this is a wildcard, it
+ doesn't matter if the user does not
+ actually link against crtbegin.o; the
+ linker won't look for a file to match a
+ wildcard. The wildcard also means that it
+ doesn't matter which directory crtbegin.o
+ is in. */
+
+ KEEP (*crtbegin*.o(.ctors))
+
+ /* We don't want to include the .ctor section from
+ from the crtend.o file until after the sorted ctors.
+ The .ctor section from the crtend file contains the
+ end of ctors marker and it must be last */
+
+ KEEP (*(EXCLUDE_FILE (*crtend*.o $OTHER_EXCLUDE_FILES) .ctors))
+ KEEP (*(SORT(.ctors.*)))
+ KEEP (*(.ctors))
+ ${CONSTRUCTING+${CTOR_END}}
+ }"
+DTOR=".dtors ${CONSTRUCTING-0} :
+ {
+ ${CONSTRUCTING+${DTOR_START}}
+ KEEP (*crtbegin*.o(.dtors))
+ KEEP (*(EXCLUDE_FILE (*crtend*.o $OTHER_EXCLUDE_FILES) .dtors))
+ KEEP (*(SORT(.dtors.*)))
+ KEEP (*(.dtors))
+ ${CONSTRUCTING+${DTOR_END}}
+ }"
+STACK=" .stack ${RELOCATING-0}${RELOCATING+${STACK_ADDR}} :
+ {
+ ${RELOCATING+_stack = .;}
+ *(.stack)
+ }"
+
+# if this is for an embedded system, don't add SIZEOF_HEADERS.
+if [ -z "$EMBEDDED" ]; then
+ test -z "${TEXT_BASE_ADDRESS}" && TEXT_BASE_ADDRESS="${TEXT_START_ADDR} + SIZEOF_HEADERS"
+else
+ test -z "${TEXT_BASE_ADDRESS}" && TEXT_BASE_ADDRESS="${TEXT_START_ADDR}"
+fi
+
+cat <<EOF
+OUTPUT_FORMAT("${OUTPUT_FORMAT}", "${BIG_OUTPUT_FORMAT}",
+ "${LITTLE_OUTPUT_FORMAT}")
+OUTPUT_ARCH(${OUTPUT_ARCH})
+ENTRY(${ENTRY})
+
+${RELOCATING+${LIB_SEARCH_DIRS}}
+${RELOCATING+/* Do we need any of these for elf?
+ __DYNAMIC = 0; ${STACKZERO+${STACKZERO}} ${SHLIB_PATH+${SHLIB_PATH}} */}
+${RELOCATING+${EXECUTABLE_SYMBOLS}}
+${RELOCATING+${INPUT_FILES}}
+${RELOCATING- /* For some reason, the Solaris linker makes bad executables
+ if gld -r is used and the intermediate file has sections starting
+ at non-zero addresses. Could be a Solaris ld bug, could be a GNU ld
+ bug. But for now assigning the zero vmas works. */}
+
+SECTIONS
+{
+ /* Read-only sections, merged into text segment: */
+ ${CREATE_SHLIB-${CREATE_PIE-${RELOCATING+PROVIDE (__executable_start = ${TEXT_START_ADDR}); . = ${TEXT_BASE_ADDRESS};}}}
+ ${CREATE_SHLIB+${RELOCATING+. = ${SHLIB_TEXT_START_ADDR:-0} + SIZEOF_HEADERS;}}
+ ${CREATE_PIE+${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) }
+ .gnu.version ${RELOCATING-0} : { *(.gnu.version) }
+ .gnu.version_d ${RELOCATING-0}: { *(.gnu.version_d) }
+ .gnu.version_r ${RELOCATING-0}: { *(.gnu.version_r) }
+
+EOF
+if [ "x$COMBRELOC" = x ]; then
+ COMBRELOCCAT=cat
+else
+ COMBRELOCCAT="cat > $COMBRELOC"
+fi
+eval $COMBRELOCCAT <<EOF
+ .rel.init ${RELOCATING-0} : { *(.rel.init) }
+ .rela.init ${RELOCATING-0} : { *(.rela.init) }
+ .rel.text ${RELOCATING-0} : { *(.rel.text${RELOCATING+ .rel.text.* .rel.gnu.linkonce.t.*}) }
+ .rela.text ${RELOCATING-0} : { *(.rela.text${RELOCATING+ .rela.text.* .rela.gnu.linkonce.t.*}) }
+ .rel.fini ${RELOCATING-0} : { *(.rel.fini) }
+ .rela.fini ${RELOCATING-0} : { *(.rela.fini) }
+ .rel.rodata ${RELOCATING-0} : { *(.rel.rodata${RELOCATING+ .rel.rodata.* .rel.gnu.linkonce.r.*}) }
+ .rela.rodata ${RELOCATING-0} : { *(.rela.rodata${RELOCATING+ .rela.rodata.* .rela.gnu.linkonce.r.*}) }
+ ${OTHER_READONLY_RELOC_SECTIONS}
+ .rel.data.rel.ro ${RELOCATING-0} : { *(.rel.data.rel.ro${RELOCATING+*}) }
+ .rela.data.rel.ro ${RELOCATING-0} : { *(.rel.data.rel.ro${RELOCATING+*}) }
+ .rel.data ${RELOCATING-0} : { *(.rel.data${RELOCATING+ .rel.data.* .rel.gnu.linkonce.d.*}) }
+ .rela.data ${RELOCATING-0} : { *(.rela.data${RELOCATING+ .rela.data.* .rela.gnu.linkonce.d.*}) }
+ .rel.tdata ${RELOCATING-0} : { *(.rel.tdata${RELOCATING+ .rel.tdata.* .rel.gnu.linkonce.td.*}) }
+ .rela.tdata ${RELOCATING-0} : { *(.rela.tdata${RELOCATING+ .rela.tdata.* .rela.gnu.linkonce.td.*}) }
+ .rel.tbss ${RELOCATING-0} : { *(.rel.tbss${RELOCATING+ .rel.tbss.* .rel.gnu.linkonce.tb.*}) }
+ .rela.tbss ${RELOCATING-0} : { *(.rela.tbss${RELOCATING+ .rela.tbss.* .rela.gnu.linkonce.tb.*}) }
+ .rel.ctors ${RELOCATING-0} : { *(.rel.ctors) }
+ .rela.ctors ${RELOCATING-0} : { *(.rela.ctors) }
+ .rel.dtors ${RELOCATING-0} : { *(.rel.dtors) }
+ .rela.dtors ${RELOCATING-0} : { *(.rela.dtors) }
+ .rel.got ${RELOCATING-0} : { *(.rel.got) }
+ .rela.got ${RELOCATING-0} : { *(.rela.got) }
+ ${OTHER_GOT_RELOC_SECTIONS}
+ ${REL_SDATA}
+ ${REL_SBSS}
+ ${REL_SDATA2}
+ ${REL_SBSS2}
+ .rel.bss ${RELOCATING-0} : { *(.rel.bss${RELOCATING+ .rel.bss.* .rel.gnu.linkonce.b.*}) }
+ .rela.bss ${RELOCATING-0} : { *(.rela.bss${RELOCATING+ .rela.bss.* .rela.gnu.linkonce.b.*}) }
+EOF
+if [ -n "$COMBRELOC" ]; then
+cat <<EOF
+ .rel.dyn ${RELOCATING-0} :
+ {
+EOF
+sed -e '/^[ ]*[{}][ ]*$/d;/:[ ]*$/d;/\.rela\./d;s/^.*: { *\(.*\)}$/ \1/' $COMBRELOC
+cat <<EOF
+ }
+ .rela.dyn ${RELOCATING-0} :
+ {
+EOF
+sed -e '/^[ ]*[{}][ ]*$/d;/:[ ]*$/d;/\.rel\./d;s/^.*: { *\(.*\)}/ \1/' $COMBRELOC
+cat <<EOF
+ }
+EOF
+fi
+cat <<EOF
+ .rel.plt ${RELOCATING-0} : { *(.rel.plt) }
+ .rela.plt ${RELOCATING-0} : { *(.rela.plt) }
+ ${OTHER_PLT_RELOC_SECTIONS}
+
+ .init ${RELOCATING-0} :
+ {
+ ${RELOCATING+${INIT_START}}
+ KEEP (*(.init))
+ ${RELOCATING+${INIT_END}}
+ } =${NOP-0}
+
+ ${DATA_PLT-${BSS_PLT-${PLT}}}
+ .text ${RELOCATING-0} :
+ {
+ ${RELOCATING+${TEXT_START_SYMBOLS}}
+ *(.text .stub${RELOCATING+ .text.* .gnu.linkonce.t.*})
+ KEEP (*(.text.*personality*))
+ /* .gnu.warning sections are handled specially by elf32.em. */
+ *(.gnu.warning)
+ ${RELOCATING+${OTHER_TEXT_SECTIONS}}
+ } =${NOP-0}
+ .fini ${RELOCATING-0} :
+ {
+ ${RELOCATING+${FINI_START}}
+ KEEP (*(.fini))
+ ${RELOCATING+${FINI_END}}
+ } =${NOP-0}
+ ${RELOCATING+PROVIDE (__etext = .);}
+ ${RELOCATING+PROVIDE (_etext = .);}
+ ${RELOCATING+PROVIDE (etext = .);}
+ ${WRITABLE_RODATA-${RODATA}}
+ .rodata1 ${RELOCATING-0} : { *(.rodata1) }
+ ${CREATE_SHLIB-${SDATA2}}
+ ${CREATE_SHLIB-${SBSS2}}
+ ${OTHER_READONLY_SECTIONS}
+ .eh_frame_hdr : { *(.eh_frame_hdr) }
+ .eh_frame ${RELOCATING-0} : ONLY_IF_RO { KEEP (*(.eh_frame)) }
+ .gcc_except_table ${RELOCATING-0} : ONLY_IF_RO { KEEP (*(.gcc_except_table)) *(.gcc_except_table.*) }
+
+ /* Adjust the address for the data segment. We want to adjust up to
+ the same address within the page on the next page up. */
+ ${CREATE_SHLIB-${CREATE_PIE-${RELOCATING+. = ${DATA_ADDR-${DATA_SEGMENT_ALIGN}};}}}
+ ${CREATE_SHLIB+${RELOCATING+. = ${SHLIB_DATA_ADDR-${DATA_SEGMENT_ALIGN}};}}
+ ${CREATE_PIE+${RELOCATING+. = ${SHLIB_DATA_ADDR-${DATA_SEGMENT_ALIGN}};}}
+
+ /* Exception handling */
+ .eh_frame ${RELOCATING-0} : ONLY_IF_RW { KEEP (*(.eh_frame)) }
+ .gcc_except_table ${RELOCATING-0} : ONLY_IF_RW { KEEP (*(.gcc_except_table)) *(.gcc_except_table.*) }
+
+ /* Thread Local Storage sections */
+ .tdata ${RELOCATING-0} : { *(.tdata${RELOCATING+ .tdata.* .gnu.linkonce.td.*}) }
+ .tbss ${RELOCATING-0} : { *(.tbss${RELOCATING+ .tbss.* .gnu.linkonce.tb.*})${RELOCATING+ *(.tcommon)} }
+
+ .preinit_array ${RELOCATING-0} : { KEEP (*(.preinit_array)) }
+ .init_array ${RELOCATING-0} : { KEEP (*(.init_array)) }
+ .fini_array ${RELOCATING-0} : { KEEP (*(.fini_array)) }
+
+ ${SMALL_DATA_CTOR-${RELOCATING+${CTOR}}}
+ ${SMALL_DATA_DTOR-${RELOCATING+${DTOR}}}
+ .jcr ${RELOCATING-0} : { KEEP (*(.jcr)) }
+
+ ${RELOCATING+${DATARELRO}}
+ ${OTHER_RELRO_SECTIONS}
+ ${TEXT_DYNAMIC-${DYNAMIC}}
+ ${NO_SMALL_DATA+${RELRO_NOW+${GOT}}}
+ ${NO_SMALL_DATA+${RELRO_NOW-${SEPARATE_GOTPLT+${GOT}}}}
+ ${NO_SMALL_DATA+${RELRO_NOW-${SEPARATE_GOTPLT+${GOTPLT}}}}
+ ${RELOCATING+${DATA_SEGMENT_RELRO_END}}
+ ${NO_SMALL_DATA+${RELRO_NOW-${SEPARATE_GOTPLT-${GOT}}}}
+
+ ${DATA_PLT+${PLT_BEFORE_GOT-${PLT}}}
+
+ .data ${RELOCATING-0} :
+ {
+ ${RELOCATING+${DATA_START_SYMBOLS}}
+ *(.data${RELOCATING+ .data.* .gnu.linkonce.d.*})
+ KEEP (*(.gnu.linkonce.d.*personality*))
+ ${CONSTRUCTING+SORT(CONSTRUCTORS)}
+ }
+ .data1 ${RELOCATING-0} : { *(.data1) }
+ ${WRITABLE_RODATA+${RODATA}}
+ ${OTHER_READWRITE_SECTIONS}
+ ${SMALL_DATA_CTOR+${RELOCATING+${CTOR}}}
+ ${SMALL_DATA_DTOR+${RELOCATING+${DTOR}}}
+ ${DATA_PLT+${PLT_BEFORE_GOT+${PLT}}}
+ ${RELOCATING+${OTHER_GOT_SYMBOLS}}
+ ${NO_SMALL_DATA-${GOT}}
+ ${OTHER_GOT_SECTIONS}
+ ${SDATA}
+ ${OTHER_SDATA_SECTIONS}
+ ${RELOCATING+_edata = .;}
+ ${RELOCATING+PROVIDE (edata = .);}
+ ${RELOCATING+__bss_start = .;}
+ ${RELOCATING+${OTHER_BSS_SYMBOLS}}
+ ${SBSS}
+ ${BSS_PLT+${PLT}}
+ .bss ${RELOCATING-0} :
+ {
+ *(.dynbss)
+ *(.bss${RELOCATING+ .bss.* .gnu.linkonce.b.*})
+ *(COMMON)
+ /* Align here to ensure that the .bss section occupies space up to
+ _end. Align after .bss to ensure correct alignment even if the
+ .bss section disappears because there are no input sections. */
+ ${RELOCATING+. = ALIGN(${ALIGNMENT});}
+ }
+ ${OTHER_BSS_SECTIONS}
+ ${RELOCATING+. = ALIGN(${ALIGNMENT});}
+ ${RELOCATING+_end = .;}
+ ${RELOCATING+${OTHER_BSS_END_SYMBOLS}}
+ ${RELOCATING+PROVIDE (end = .);}
+ ${RELOCATING+${DATA_SEGMENT_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 .gnu.linkonce.wi.*) }
+ .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) }
+
+ ${STACK_ADDR+${STACK}}
+ ${OTHER_SECTIONS}
+ ${RELOCATING+${OTHER_END_SYMBOLS}}
+ ${RELOCATING+${STACKNOTE}}
+}
+EOF
diff --git a/contrib/binutils/ld/scripttempl/mips.sc b/contrib/binutils/ld/scripttempl/mips.sc
index d60aeed..972351f 100644
--- a/contrib/binutils/ld/scripttempl/mips.sc
+++ b/contrib/binutils/ld/scripttempl/mips.sc
@@ -29,9 +29,6 @@ SECTIONS
*(.init)
${RELOCATING+ eprol = .};
*(.text)
- ${RELOCATING+PROVIDE (__runtime_reloc_start = .);}
- *(.rel.sdata)
- ${RELOCATING+PROVIDE (__runtime_reloc_stop = .);}
*(.fini)
${RELOCATING+ etext = .};
${RELOCATING+ _etext = .};
diff --git a/contrib/binutils/ld/scripttempl/pe.sc b/contrib/binutils/ld/scripttempl/pe.sc
index da09eb4..c9931b5 100644
--- a/contrib/binutils/ld/scripttempl/pe.sc
+++ b/contrib/binutils/ld/scripttempl/pe.sc
@@ -24,7 +24,11 @@ if test "${RELOCATING}"; then
SORT(*)(.idata$5)
SORT(*)(.idata$6)
SORT(*)(.idata$7)'
- R_CRT='*(SORT(.CRT$*))'
+ R_CRT_XC='*(SORT(.CRT$XC*)) /* C initialization */'
+ R_CRT_XI='*(SORT(.CRT$XI*)) /* C++ initialization */'
+ R_CRT_XL='*(SORT(.CRT$XL*)) /* TLS callbacks */'
+ R_CRT_XP='*(SORT(.CRT$XP*)) /* Pre-termination */'
+ R_CRT_XT='*(SORT(.CRT$XT*)) /* Termination */'
R_TLS='
*(.tls)
*(.tls$)
@@ -46,11 +50,13 @@ ${OUTPUT_ARCH+OUTPUT_ARCH(${OUTPUT_ARCH})}
${LIB_SEARCH_DIRS}
-ENTRY(${ENTRY})
-
SECTIONS
{
- .text ${RELOCATING+ __image_base__ + __section_alignment__ } :
+ ${RELOCATING+/* Make the virtual address and file offset synced if the alignment is}
+ ${RELOCATING+ lower than the target page size. */}
+ ${RELOCATING+. = SIZEOF_HEADERS;}
+ ${RELOCATING+. = ALIGN(__section_alignment__);}
+ .text ${RELOCATING+ __image_base__ + ( __section_alignment__ < ${TARGET_PAGE_SIZE} ? . : __section_alignment__ )} :
{
${RELOCATING+ *(.init)}
*(.text)
@@ -58,9 +64,9 @@ SECTIONS
*(.glue_7t)
*(.glue_7)
${CONSTRUCTING+ ___CTOR_LIST__ = .; __CTOR_LIST__ = . ;
- LONG (-1); *(SORT(.ctors.*)); *(.ctors); *(.ctor); LONG (0); }
+ LONG (-1);*(.ctors); *(.ctor); *(SORT(.ctors.*)); LONG (0); }
${CONSTRUCTING+ ___DTOR_LIST__ = .; __DTOR_LIST__ = . ;
- LONG (-1); *(SORT(.dtors.*)); *(.dtors); *(.dtor); LONG (0); }
+ LONG (-1); *(.dtors); *(.dtor); *(SORT(.dtors.*)); LONG (0); }
${RELOCATING+ *(.fini)}
/* ??? Why is .gcc_exc here? */
${RELOCATING+ *(.gcc_exc)}
@@ -80,6 +86,7 @@ SECTIONS
*(.data)
*(.data2)
${R_DATA}
+ *(.jcr)
${RELOCATING+__data_end__ = . ;}
${RELOCATING+*(.data_cygwin_nocopy)}
}
@@ -130,12 +137,28 @@ SECTIONS
}
.CRT ${RELOCATING+BLOCK(__section_alignment__)} :
{
- ${R_CRT}
+ ${RELOCATING+___crt_xc_start__ = . ;}
+ ${R_CRT_XC}
+ ${RELOCATING+___crt_xc_end__ = . ;}
+ ${RELOCATING+___crt_xi_start__ = . ;}
+ ${R_CRT_XI}
+ ${RELOCATING+___crt_xi_end__ = . ;}
+ ${RELOCATING+___crt_xl_start__ = . ;}
+ ${R_CRT_XL}
+ /* ___crt_xl_end__ is defined in the TLS Directory support code */
+ ${RELOCATING+___crt_xp_start__ = . ;}
+ ${R_CRT_XP}
+ ${RELOCATING+___crt_xp_end__ = . ;}
+ ${RELOCATING+___crt_xt_start__ = . ;}
+ ${R_CRT_XT}
+ ${RELOCATING+___crt_xt_end__ = . ;}
}
.tls ${RELOCATING+BLOCK(__section_alignment__)} :
{
+ ${RELOCATING+___tls_start__ = . ;}
${R_TLS}
+ ${RELOCATING+___tls_end__ = . ;}
}
.endjunk ${RELOCATING+BLOCK(__section_alignment__)} :
@@ -159,13 +182,91 @@ SECTIONS
.stab ${RELOCATING+BLOCK(__section_alignment__)} ${RELOCATING+(NOLOAD)} :
{
- [ .stab ]
+ *(.stab)
}
.stabstr ${RELOCATING+BLOCK(__section_alignment__)} ${RELOCATING+(NOLOAD)} :
{
- [ .stabstr ]
+ *(.stabstr)
+ }
+
+ /* DWARF debug sections.
+ Symbols in the DWARF debugging sections are relative to the beginning
+ of the section. Unlike other targets that fake this by putting the
+ section VMA at 0, the PE format will not allow it. */
+
+ /* DWARF 1.1 and DWARF 2. */
+ .debug_aranges ${RELOCATING+BLOCK(__section_alignment__)} ${RELOCATING+(NOLOAD)} :
+ {
+ *(.debug_aranges)
+ }
+
+ .debug_pubnames ${RELOCATING+BLOCK(__section_alignment__)} ${RELOCATING+(NOLOAD)} :
+ {
+ *(.debug_pubnames)
+ }
+
+ /* DWARF 2. */
+ .debug_info ${RELOCATING+BLOCK(__section_alignment__)} ${RELOCATING+(NOLOAD)} :
+ {
+ *(.debug_info) *(.gnu.linkonce.wi.*)
+ }
+
+ .debug_abbrev ${RELOCATING+BLOCK(__section_alignment__)} ${RELOCATING+(NOLOAD)} :
+ {
+ *(.debug_abbrev)
+ }
+
+ .debug_line ${RELOCATING+BLOCK(__section_alignment__)} ${RELOCATING+(NOLOAD)} :
+ {
+ *(.debug_line)
+ }
+
+ .debug_frame ${RELOCATING+BLOCK(__section_alignment__)} ${RELOCATING+(NOLOAD)} :
+ {
+ *(.debug_frame)
+ }
+
+ .debug_str ${RELOCATING+BLOCK(__section_alignment__)} ${RELOCATING+(NOLOAD)} :
+ {
+ *(.debug_str)
+ }
+
+ .debug_loc ${RELOCATING+BLOCK(__section_alignment__)} ${RELOCATING+(NOLOAD)} :
+ {
+ *(.debug_loc)
}
+ .debug_macinfo ${RELOCATING+BLOCK(__section_alignment__)} ${RELOCATING+(NOLOAD)} :
+ {
+ *(.debug_macinfo)
+ }
+
+ /* SGI/MIPS DWARF 2 extensions. */
+ .debug_weaknames ${RELOCATING+BLOCK(__section_alignment__)} ${RELOCATING+(NOLOAD)} :
+ {
+ *(.debug_weaknames)
+ }
+
+ .debug_funcnames ${RELOCATING+BLOCK(__section_alignment__)} ${RELOCATING+(NOLOAD)} :
+ {
+ *(.debug_funcnames)
+ }
+
+ .debug_typenames ${RELOCATING+BLOCK(__section_alignment__)} ${RELOCATING+(NOLOAD)} :
+ {
+ *(.debug_typenames)
+ }
+
+ .debug_varnames ${RELOCATING+BLOCK(__section_alignment__)} ${RELOCATING+(NOLOAD)} :
+ {
+ *(.debug_varnames)
+ }
+
+ /* DWARF 3. */
+ .debug_ranges ${RELOCATING+BLOCK(__section_alignment__)} ${RELOCATING+(NOLOAD)} :
+ {
+ *(.debug_ranges)
+ }
}
EOF
diff --git a/contrib/binutils/ld/scripttempl/pep.sc b/contrib/binutils/ld/scripttempl/pep.sc
new file mode 100644
index 0000000..edad5ee
--- /dev/null
+++ b/contrib/binutils/ld/scripttempl/pep.sc
@@ -0,0 +1,272 @@
+# 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.
+# Sorting of the .foo$* sections is required by the definition of
+# grouped sections in PE.
+# Sorting of the file names in R_IDATA is required by the
+# current implementation of dlltool (this could probably be changed to
+# use grouped sections instead).
+if test "${RELOCATING}"; then
+ R_TEXT='*(SORT(.text$*))'
+ R_DATA='*(SORT(.data$*))'
+ R_RDATA='*(SORT(.rdata$*))'
+ R_IDATA='
+ SORT(*)(.idata$2)
+ SORT(*)(.idata$3)
+ /* These zeroes mark the end of the import list. */
+ LONG (0); LONG (0); LONG (0); LONG (0); LONG (0);
+ SORT(*)(.idata$4)
+ SORT(*)(.idata$5)
+ SORT(*)(.idata$6)
+ SORT(*)(.idata$7)'
+ R_CRT_XC='*(SORT(.CRT$XC*)) /* C initialization */'
+ R_CRT_XI='*(SORT(.CRT$XI*)) /* C++ initialization */'
+ R_CRT_XL='*(SORT(.CRT$XL*)) /* TLS callbacks */'
+ R_CRT_XP='*(SORT(.CRT$XP*)) /* Pre-termination */'
+ R_CRT_XT='*(SORT(.CRT$XT*)) /* Termination */'
+ R_TLS='
+ *(.tls)
+ *(.tls$)
+ *(SORT(.tls$*))'
+ R_RSRC='*(SORT(.rsrc$*))'
+else
+ R_TEXT=
+ R_DATA=
+ R_RDATA=
+ R_IDATA=
+ R_CRT=
+ R_RSRC=
+fi
+
+cat <<EOF
+${RELOCATING+OUTPUT_FORMAT(${OUTPUT_FORMAT})}
+${RELOCATING-OUTPUT_FORMAT(${RELOCATEABLE_OUTPUT_FORMAT})}
+${OUTPUT_ARCH+OUTPUT_ARCH(${OUTPUT_ARCH})}
+
+${LIB_SEARCH_DIRS}
+
+SECTIONS
+{
+ ${RELOCATING+/* Make the virtual address and file offset synced if the alignment is}
+ ${RELOCATING+ lower than the target page size. */}
+ ${RELOCATING+. = SIZEOF_HEADERS;}
+ ${RELOCATING+. = ALIGN(__section_alignment__);}
+ .text ${RELOCATING+ __image_base__ + ( __section_alignment__ < ${TARGET_PAGE_SIZE} ? . : __section_alignment__ )} :
+ {
+ ${RELOCATING+ *(.init)}
+ *(.text)
+ ${R_TEXT}
+ *(.glue_7t)
+ *(.glue_7)
+ ${CONSTRUCTING+ ___CTOR_LIST__ = .; __CTOR_LIST__ = . ;
+ LONG (-1);*(.ctors); *(.ctor); *(SORT(.ctors.*)); LONG (0); }
+ ${CONSTRUCTING+ ___DTOR_LIST__ = .; __DTOR_LIST__ = . ;
+ LONG (-1); *(.dtors); *(.dtor); *(SORT(.dtors.*)); LONG (0); }
+ ${RELOCATING+ *(.fini)}
+ /* ??? Why is .gcc_exc here? */
+ ${RELOCATING+ *(.gcc_exc)}
+ ${RELOCATING+PROVIDE (etext = .);}
+ *(.gcc_except_table)
+ }
+
+ /* 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__)} :
+ {
+ ${RELOCATING+__data_start__ = . ;}
+ *(.data)
+ *(.data2)
+ ${R_DATA}
+ *(.jcr)
+ ${RELOCATING+__data_end__ = . ;}
+ ${RELOCATING+*(.data_cygwin_nocopy)}
+ }
+
+ .rdata ${RELOCATING+BLOCK(__section_alignment__)} :
+ {
+ *(.rdata)
+ ${R_RDATA}
+ *(.eh_frame)
+ ${RELOCATING+___RUNTIME_PSEUDO_RELOC_LIST__ = .;}
+ ${RELOCATING+__RUNTIME_PSEUDO_RELOC_LIST__ = .;}
+ *(.rdata_runtime_pseudo_reloc)
+ ${RELOCATING+___RUNTIME_PSEUDO_RELOC_LIST_END__ = .;}
+ ${RELOCATING+__RUNTIME_PSEUDO_RELOC_LIST_END__ = .;}
+ }
+
+ .pdata ${RELOCATING+BLOCK(__section_alignment__)} :
+ {
+ *(.pdata)
+ }
+
+ .bss ${RELOCATING+BLOCK(__section_alignment__)} :
+ {
+ ${RELOCATING+__bss_start__ = . ;}
+ *(.bss)
+ *(COMMON)
+ ${RELOCATING+__bss_end__ = . ;}
+ }
+
+ .edata ${RELOCATING+BLOCK(__section_alignment__)} :
+ {
+ *(.edata)
+ }
+
+ /DISCARD/ :
+ {
+ *(.debug\$S)
+ *(.debug\$T)
+ *(.debug\$F)
+ *(.drectve)
+ }
+
+ .idata ${RELOCATING+BLOCK(__section_alignment__)} :
+ {
+ /* This cannot currently be handled with grouped sections.
+ See pep.em:sort_sections. */
+ ${R_IDATA}
+ }
+ .CRT ${RELOCATING+BLOCK(__section_alignment__)} :
+ {
+ ${RELOCATING+___crt_xc_start__ = . ;}
+ ${R_CRT_XC}
+ ${RELOCATING+___crt_xc_end__ = . ;}
+ ${RELOCATING+___crt_xi_start__ = . ;}
+ ${R_CRT_XI}
+ ${RELOCATING+___crt_xi_end__ = . ;}
+ ${RELOCATING+___crt_xl_start__ = . ;}
+ ${R_CRT_XL}
+ /* ___crt_xl_end__ is defined in the TLS Directory support code */
+ ${RELOCATING+___crt_xp_start__ = . ;}
+ ${R_CRT_XP}
+ ${RELOCATING+___crt_xp_end__ = . ;}
+ ${RELOCATING+___crt_xt_start__ = . ;}
+ ${R_CRT_XT}
+ ${RELOCATING+___crt_xt_end__ = . ;}
+ }
+
+ .tls ${RELOCATING+BLOCK(__section_alignment__)} :
+ {
+ ${RELOCATING+___tls_start__ = . ;}
+ ${R_TLS}
+ ${RELOCATING+___tls_end__ = . ;}
+ }
+
+ .endjunk ${RELOCATING+BLOCK(__section_alignment__)} :
+ {
+ /* end is deprecated, don't use it */
+ ${RELOCATING+PROVIDE (end = .);}
+ ${RELOCATING+PROVIDE ( _end = .);}
+ ${RELOCATING+ __end__ = .;}
+ }
+
+ .rsrc ${RELOCATING+BLOCK(__section_alignment__)} :
+ {
+ *(.rsrc)
+ ${R_RSRC}
+ }
+
+ .reloc ${RELOCATING+BLOCK(__section_alignment__)} :
+ {
+ *(.reloc)
+ }
+
+ .stab ${RELOCATING+BLOCK(__section_alignment__)} ${RELOCATING+(NOLOAD)} :
+ {
+ *(.stab)
+ }
+
+ .stabstr ${RELOCATING+BLOCK(__section_alignment__)} ${RELOCATING+(NOLOAD)} :
+ {
+ *(.stabstr)
+ }
+
+ /* DWARF debug sections.
+ Symbols in the DWARF debugging sections are relative to the beginning
+ of the section. Unlike other targets that fake this by putting the
+ section VMA at 0, the PE format will not allow it. */
+
+ /* DWARF 1.1 and DWARF 2. */
+ .debug_aranges ${RELOCATING+BLOCK(__section_alignment__)} ${RELOCATING+(NOLOAD)} :
+ {
+ *(.debug_aranges)
+ }
+
+ .debug_pubnames ${RELOCATING+BLOCK(__section_alignment__)} ${RELOCATING+(NOLOAD)} :
+ {
+ *(.debug_pubnames)
+ }
+
+ /* DWARF 2. */
+ .debug_info ${RELOCATING+BLOCK(__section_alignment__)} ${RELOCATING+(NOLOAD)} :
+ {
+ *(.debug_info) *(.gnu.linkonce.wi.*)
+ }
+
+ .debug_abbrev ${RELOCATING+BLOCK(__section_alignment__)} ${RELOCATING+(NOLOAD)} :
+ {
+ *(.debug_abbrev)
+ }
+
+ .debug_line ${RELOCATING+BLOCK(__section_alignment__)} ${RELOCATING+(NOLOAD)} :
+ {
+ *(.debug_line)
+ }
+
+ .debug_frame ${RELOCATING+BLOCK(__section_alignment__)} ${RELOCATING+(NOLOAD)} :
+ {
+ *(.debug_frame)
+ }
+
+ .debug_str ${RELOCATING+BLOCK(__section_alignment__)} ${RELOCATING+(NOLOAD)} :
+ {
+ *(.debug_str)
+ }
+
+ .debug_loc ${RELOCATING+BLOCK(__section_alignment__)} ${RELOCATING+(NOLOAD)} :
+ {
+ *(.debug_loc)
+ }
+
+ .debug_macinfo ${RELOCATING+BLOCK(__section_alignment__)} ${RELOCATING+(NOLOAD)} :
+ {
+ *(.debug_macinfo)
+ }
+
+ /* SGI/MIPS DWARF 2 extensions. */
+ .debug_weaknames ${RELOCATING+BLOCK(__section_alignment__)} ${RELOCATING+(NOLOAD)} :
+ {
+ *(.debug_weaknames)
+ }
+
+ .debug_funcnames ${RELOCATING+BLOCK(__section_alignment__)} ${RELOCATING+(NOLOAD)} :
+ {
+ *(.debug_funcnames)
+ }
+
+ .debug_typenames ${RELOCATING+BLOCK(__section_alignment__)} ${RELOCATING+(NOLOAD)} :
+ {
+ *(.debug_typenames)
+ }
+
+ .debug_varnames ${RELOCATING+BLOCK(__section_alignment__)} ${RELOCATING+(NOLOAD)} :
+ {
+ *(.debug_varnames)
+ }
+
+ /* DWARF 3. */
+ .debug_ranges ${RELOCATING+BLOCK(__section_alignment__)} ${RELOCATING+(NOLOAD)} :
+ {
+ *(.debug_ranges)
+ }
+}
+EOF
diff --git a/contrib/binutils/ld/sysdep.h b/contrib/binutils/ld/sysdep.h
index f164e74..4c5e994 100644
--- a/contrib/binutils/ld/sysdep.h
+++ b/contrib/binutils/ld/sysdep.h
@@ -16,8 +16,8 @@
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. */
+ Software Foundation, 51 Franklin Street - Fifth Floor, Boston, MA
+ 02110-1301, USA. */
#ifndef LD_SYSDEP_H
#define LD_SYSDEP_H
@@ -77,19 +77,19 @@ extern char *strrchr ();
#include "fopen-same.h"
#endif
-#ifdef NEED_DECLARATION_STRSTR
+#if !HAVE_DECL_STRSTR
extern char *strstr ();
#endif
-#ifdef NEED_DECLARATION_FREE
+#if !HAVE_DECL_FREE
extern void free ();
#endif
-#ifdef NEED_DECLARATION_GETENV
+#if !HAVE_DECL_GETENV
extern char *getenv ();
#endif
-#ifdef NEED_DECLARATION_ENVIRON
+#if !HAVE_DECL_ENVIRON
extern char **environ;
#endif
OpenPOWER on IntegriCloud