summaryrefslogtreecommitdiffstats
path: root/contrib/binutils/ld
diff options
context:
space:
mode:
authorobrien <obrien@FreeBSD.org>2009-01-19 17:25:17 +0000
committerobrien <obrien@FreeBSD.org>2009-01-19 17:25:17 +0000
commit2b02dfaa48ad11ff3ee427ee1db57fb6017a8a5e (patch)
treeaf590d7b357b1c28ab81f0cde1b0ea76a098fb7e /contrib/binutils/ld
parentcd5f96a9efbe194cb6e0506e727cb6d287247d69 (diff)
downloadFreeBSD-src-2b02dfaa48ad11ff3ee427ee1db57fb6017a8a5e.zip
FreeBSD-src-2b02dfaa48ad11ff3ee427ee1db57fb6017a8a5e.tar.gz
Rename vendor/binutils/*/contrib to vendor/binutils/*/x
Binutils has a "contrib" subdirectory - thus flattening cannot happen without renaming the upper level contrib directory in a first pass. Also, don't record this move and remove any keyword expansion.
Diffstat (limited to 'contrib/binutils/ld')
-rw-r--r--contrib/binutils/ld/ChangeLog323
-rw-r--r--contrib/binutils/ld/ChangeLog-00013376
-rw-r--r--contrib/binutils/ld/ChangeLog-02033580
-rw-r--r--contrib/binutils/ld/ChangeLog-91977601
-rw-r--r--contrib/binutils/ld/ChangeLog-98992108
-rw-r--r--contrib/binutils/ld/MAINTAINERS1
-rw-r--r--contrib/binutils/ld/Makefile.am1765
-rw-r--r--contrib/binutils/ld/Makefile.in2469
-rw-r--r--contrib/binutils/ld/NEWS296
-rw-r--r--contrib/binutils/ld/README67
-rw-r--r--contrib/binutils/ld/TODO9
-rw-r--r--contrib/binutils/ld/acconfig.h22
-rw-r--r--contrib/binutils/ld/acinclude.m416
-rw-r--r--contrib/binutils/ld/aclocal.m4204
-rw-r--r--contrib/binutils/ld/config.in177
-rw-r--r--contrib/binutils/ld/configdoc.texi14
-rwxr-xr-xcontrib/binutils/ld/configure5635
-rw-r--r--contrib/binutils/ld/configure.host247
-rw-r--r--contrib/binutils/ld/configure.in265
-rw-r--r--contrib/binutils/ld/configure.tgt624
-rw-r--r--contrib/binutils/ld/deffile.h103
-rw-r--r--contrib/binutils/ld/deffilep.y1067
-rw-r--r--contrib/binutils/ld/dep-in.sed20
-rw-r--r--contrib/binutils/ld/emulparams/README2
-rw-r--r--contrib/binutils/ld/emulparams/alpha.sh3
-rw-r--r--contrib/binutils/ld/emulparams/arcelf.sh11
-rw-r--r--contrib/binutils/ld/emulparams/armaoutb.sh7
-rw-r--r--contrib/binutils/ld/emulparams/armaoutl.sh7
-rw-r--r--contrib/binutils/ld/emulparams/armcoff.sh6
-rw-r--r--contrib/binutils/ld/emulparams/armelf.sh28
-rw-r--r--contrib/binutils/ld/emulparams/armelf_fbsd.sh2
-rw-r--r--contrib/binutils/ld/emulparams/armelf_linux.sh21
-rw-r--r--contrib/binutils/ld/emulparams/armelf_linux26.sh20
-rw-r--r--contrib/binutils/ld/emulparams/armelf_nbsd.sh6
-rw-r--r--contrib/binutils/ld/emulparams/armelf_oabi.sh23
-rw-r--r--contrib/binutils/ld/emulparams/armelfb_nbsd.sh2
-rw-r--r--contrib/binutils/ld/emulparams/armnbsd.sh7
-rw-r--r--contrib/binutils/ld/emulparams/armpe.sh13
-rw-r--r--contrib/binutils/ld/emulparams/coff_sparc.sh7
-rw-r--r--contrib/binutils/ld/emulparams/elf32_sparc.sh14
-rw-r--r--contrib/binutils/ld/emulparams/elf32b4300.sh10
-rw-r--r--contrib/binutils/ld/emulparams/elf32bmip.sh37
-rw-r--r--contrib/binutils/ld/emulparams/elf32bmipn32-defs.sh58
-rwxr-xr-xcontrib/binutils/ld/emulparams/elf32bmipn32.sh22
-rwxr-xr-xcontrib/binutils/ld/emulparams/elf32bsmip.sh3
-rw-r--r--contrib/binutils/ld/emulparams/elf32btsmip.sh9
-rw-r--r--contrib/binutils/ld/emulparams/elf32btsmipn32.sh15
-rw-r--r--contrib/binutils/ld/emulparams/elf32ebmip.sh2
-rw-r--r--contrib/binutils/ld/emulparams/elf32elmip.sh2
-rw-r--r--contrib/binutils/ld/emulparams/elf32l4300.sh4
-rw-r--r--contrib/binutils/ld/emulparams/elf32lmip.sh7
-rw-r--r--contrib/binutils/ld/emulparams/elf32lppc.sh5
-rw-r--r--contrib/binutils/ld/emulparams/elf32lppcsim.sh2
-rwxr-xr-xcontrib/binutils/ld/emulparams/elf32lsmip.sh2
-rw-r--r--contrib/binutils/ld/emulparams/elf32ltsmip.sh2
-rw-r--r--contrib/binutils/ld/emulparams/elf32ltsmipn32.sh4
-rw-r--r--contrib/binutils/ld/emulparams/elf32mipswindiss.sh27
-rw-r--r--contrib/binutils/ld/emulparams/elf32ppc.sh41
-rw-r--r--contrib/binutils/ld/emulparams/elf32ppc_fbsd.sh2
-rw-r--r--contrib/binutils/ld/emulparams/elf32ppclinux.sh8
-rw-r--r--contrib/binutils/ld/emulparams/elf32ppcsim.sh2
-rw-r--r--contrib/binutils/ld/emulparams/elf64_ia64.sh35
-rw-r--r--contrib/binutils/ld/emulparams/elf64_ia64_fbsd.sh4
-rw-r--r--contrib/binutils/ld/emulparams/elf64_s390.sh34
-rw-r--r--contrib/binutils/ld/emulparams/elf64_sparc.sh51
-rw-r--r--contrib/binutils/ld/emulparams/elf64_sparc_fbsd.sh2
-rw-r--r--contrib/binutils/ld/emulparams/elf64alpha.sh21
-rw-r--r--contrib/binutils/ld/emulparams/elf64alpha_fbsd.sh3
-rw-r--r--contrib/binutils/ld/emulparams/elf64alpha_nbsd.sh2
-rwxr-xr-xcontrib/binutils/ld/emulparams/elf64bmip.sh23
-rw-r--r--contrib/binutils/ld/emulparams/elf64btsmip.sh16
-rw-r--r--contrib/binutils/ld/emulparams/elf64lppc.sh3
-rw-r--r--contrib/binutils/ld/emulparams/elf64ltsmip.sh4
-rw-r--r--contrib/binutils/ld/emulparams/elf64ppc.sh49
-rw-r--r--contrib/binutils/ld/emulparams/elf_fbsd.sh1
-rw-r--r--contrib/binutils/ld/emulparams/elf_i386.sh13
-rw-r--r--contrib/binutils/ld/emulparams/elf_i386_chaos.sh11
-rw-r--r--contrib/binutils/ld/emulparams/elf_i386_fbsd.sh3
-rw-r--r--contrib/binutils/ld/emulparams/elf_i386_ldso.sh12
-rw-r--r--contrib/binutils/ld/emulparams/elf_s390.sh12
-rw-r--r--contrib/binutils/ld/emulparams/elf_x86_64.sh31
-rw-r--r--contrib/binutils/ld/emulparams/elf_x86_64_fbsd.sh2
-rw-r--r--contrib/binutils/ld/emulparams/i386aout.sh6
-rw-r--r--contrib/binutils/ld/emulparams/i386bsd.sh6
-rw-r--r--contrib/binutils/ld/emulparams/i386coff.sh5
-rw-r--r--contrib/binutils/ld/emulparams/i386linux.sh7
-rw-r--r--contrib/binutils/ld/emulparams/i386moss.sh10
-rw-r--r--contrib/binutils/ld/emulparams/i386nbsd.sh6
-rw-r--r--contrib/binutils/ld/emulparams/i386nto.sh12
-rw-r--r--contrib/binutils/ld/emulparams/i386nw.sh9
-rw-r--r--contrib/binutils/ld/emulparams/i386pe.sh8
-rw-r--r--contrib/binutils/ld/emulparams/i386pe_posix.sh9
-rw-r--r--contrib/binutils/ld/emulparams/mipsbig.sh6
-rw-r--r--contrib/binutils/ld/emulparams/mipsbsd.sh7
-rw-r--r--contrib/binutils/ld/emulparams/mipsidt.sh11
-rw-r--r--contrib/binutils/ld/emulparams/mipsidtl.sh11
-rw-r--r--contrib/binutils/ld/emulparams/mipslit.sh6
-rw-r--r--contrib/binutils/ld/emulparams/mipslnews.sh9
-rw-r--r--contrib/binutils/ld/emulparams/mipspe.sh9
-rw-r--r--contrib/binutils/ld/emulparams/ppcmacos.sh6
-rw-r--r--contrib/binutils/ld/emulparams/ppcnw.sh7
-rw-r--r--contrib/binutils/ld/emulparams/ppcpe.sh7
-rw-r--r--contrib/binutils/ld/emulparams/sh.sh8
-rw-r--r--contrib/binutils/ld/emulparams/shl.sh2
-rwxr-xr-xcontrib/binutils/ld/emulparams/shlelf.sh2
-rw-r--r--contrib/binutils/ld/emulparams/sparcaout.sh8
-rw-r--r--contrib/binutils/ld/emulparams/sparclinux.sh7
-rw-r--r--contrib/binutils/ld/emulparams/sparcnbsd.sh5
-rw-r--r--contrib/binutils/ld/emulparams/sun4.sh8
-rw-r--r--contrib/binutils/ld/emulparams/vanilla.sh5
-rw-r--r--contrib/binutils/ld/emulparams/vsta.sh8
-rw-r--r--contrib/binutils/ld/emultempl/README3
-rw-r--r--contrib/binutils/ld/emultempl/alphaelf.em80
-rw-r--r--contrib/binutils/ld/emultempl/armcoff.em277
-rw-r--r--contrib/binutils/ld/emultempl/armelf.em220
-rw-r--r--contrib/binutils/ld/emultempl/armelf_oabi.em176
-rw-r--r--contrib/binutils/ld/emultempl/astring.sed13
-rw-r--r--contrib/binutils/ld/emultempl/elf32.em1780
-rw-r--r--contrib/binutils/ld/emultempl/generic.em148
-rw-r--r--contrib/binutils/ld/emultempl/ia64elf.em62
-rw-r--r--contrib/binutils/ld/emultempl/linux.em207
-rw-r--r--contrib/binutils/ld/emultempl/mipsecoff.em248
-rw-r--r--contrib/binutils/ld/emultempl/mipself.em177
-rw-r--r--contrib/binutils/ld/emultempl/needrelax.em38
-rw-r--r--contrib/binutils/ld/emultempl/netbsd.em13
-rw-r--r--contrib/binutils/ld/emultempl/ostring.sed4
-rw-r--r--contrib/binutils/ld/emultempl/pe.em1952
-rw-r--r--contrib/binutils/ld/emultempl/ppc32elf.em80
-rw-r--r--contrib/binutils/ld/emultempl/ppc64elf.em529
-rw-r--r--contrib/binutils/ld/emultempl/stringify.sed4
-rw-r--r--contrib/binutils/ld/emultempl/sunos.em1031
-rw-r--r--contrib/binutils/ld/emultempl/ticoff.em182
-rw-r--r--contrib/binutils/ld/emultempl/vanilla.em85
-rw-r--r--contrib/binutils/ld/fdl.texi367
-rw-r--r--contrib/binutils/ld/gen-doc.texi20
-rwxr-xr-xcontrib/binutils/ld/genscripts.sh342
-rw-r--r--contrib/binutils/ld/h8-doc.texi14
-rw-r--r--contrib/binutils/ld/ld.11929
-rw-r--r--contrib/binutils/ld/ld.h249
-rw-r--r--contrib/binutils/ld/ld.texinfo5737
-rw-r--r--contrib/binutils/ld/ldcref.c550
-rw-r--r--contrib/binutils/ld/ldctor.c376
-rw-r--r--contrib/binutils/ld/ldctor.h60
-rw-r--r--contrib/binutils/ld/ldemul.c313
-rw-r--r--contrib/binutils/ld/ldemul.h196
-rw-r--r--contrib/binutils/ld/ldexp.c1091
-rw-r--r--contrib/binutils/ld/ldexp.h142
-rw-r--r--contrib/binutils/ld/ldfile.c596
-rw-r--r--contrib/binutils/ld/ldfile.h65
-rw-r--r--contrib/binutils/ld/ldgram.y1197
-rw-r--r--contrib/binutils/ld/ldint.texinfo1058
-rw-r--r--contrib/binutils/ld/ldlang.c5470
-rw-r--r--contrib/binutils/ld/ldlang.h569
-rw-r--r--contrib/binutils/ld/ldlex.h63
-rw-r--r--contrib/binutils/ld/ldlex.l676
-rw-r--r--contrib/binutils/ld/ldmain.c1464
-rw-r--r--contrib/binutils/ld/ldmain.h46
-rw-r--r--contrib/binutils/ld/ldmisc.c552
-rw-r--r--contrib/binutils/ld/ldmisc.h46
-rw-r--r--contrib/binutils/ld/ldver.c59
-rw-r--r--contrib/binutils/ld/ldver.h20
-rw-r--r--contrib/binutils/ld/ldver.texi1
-rw-r--r--contrib/binutils/ld/ldwrite.c576
-rw-r--r--contrib/binutils/ld/ldwrite.h21
-rw-r--r--contrib/binutils/ld/lexsup.c1387
-rw-r--r--contrib/binutils/ld/mri.c332
-rw-r--r--contrib/binutils/ld/mri.h39
-rw-r--r--contrib/binutils/ld/pe-dll.c2697
-rw-r--r--contrib/binutils/ld/pe-dll.h62
-rw-r--r--contrib/binutils/ld/po/Make-in251
-rw-r--r--contrib/binutils/ld/po/POTFILES.in29
-rw-r--r--contrib/binutils/ld/po/ld.pot1693
-rw-r--r--contrib/binutils/ld/scripttempl/README4
-rw-r--r--contrib/binutils/ld/scripttempl/alpha.sc74
-rw-r--r--contrib/binutils/ld/scripttempl/aout.sc57
-rw-r--r--contrib/binutils/ld/scripttempl/armaout.sc35
-rw-r--r--contrib/binutils/ld/scripttempl/armcoff.sc84
-rw-r--r--contrib/binutils/ld/scripttempl/elf.sc404
-rw-r--r--contrib/binutils/ld/scripttempl/elfppc.sc288
-rw-r--r--contrib/binutils/ld/scripttempl/i386coff.sc43
-rw-r--r--contrib/binutils/ld/scripttempl/mips.sc72
-rw-r--r--contrib/binutils/ld/scripttempl/mipsbsd.sc30
-rw-r--r--contrib/binutils/ld/scripttempl/nw.sc130
-rw-r--r--contrib/binutils/ld/scripttempl/pe.sc171
-rw-r--r--contrib/binutils/ld/scripttempl/ppcpe.sc198
-rw-r--r--contrib/binutils/ld/scripttempl/sh.sc64
-rw-r--r--contrib/binutils/ld/scripttempl/sparccoff.sc48
-rw-r--r--contrib/binutils/ld/scripttempl/tic30aout.sc34
-rw-r--r--contrib/binutils/ld/scripttempl/tic30coff.sc58
-rw-r--r--contrib/binutils/ld/scripttempl/v850.sc230
-rw-r--r--contrib/binutils/ld/scripttempl/vanilla.sc1
-rw-r--r--contrib/binutils/ld/scripttempl/z8000.sc57
-rw-r--r--contrib/binutils/ld/stamp-h.in1
-rw-r--r--contrib/binutils/ld/sysdep.h96
194 files changed, 0 insertions, 70817 deletions
diff --git a/contrib/binutils/ld/ChangeLog b/contrib/binutils/ld/ChangeLog
deleted file mode 100644
index 4b3c1f9..0000000
--- a/contrib/binutils/ld/ChangeLog
+++ /dev/null
@@ -1,323 +0,0 @@
-2004-05-13 Joel Sherrill <joel@oarcorp.com>
-
- * configure.tgt (or32-*-rtems*): Switch to elf and
- support versioned targets.
-
-2004-05-13 Nick Clifton <nickc@redhat.com>
-
- * po/fr.po: Updated French translation.
-
-2004-05-05 Alexandre Oliva <aoliva@redhat.com>
-
- * emulparams/elf32frvfd.sh (OUTPUT_FORMAT): Switch to new
- elf32-frvfdpic.
-
-2004-04-29 Alan Modra <amodra@bigpond.net.au>
-
- * pe-dll.c: Revert changes accidentally committed 2004-03-08.
- (fill_edata): Correct pointer arithmetic.
-
-2004-04-21 Hans-Peter Nilsson <hp@axis.com>
-
- * NEWS: Mention change in DEFINED semantics.
-
-2004-04-20 Chris Demetriou <cgd@broadcom.com>
-
- * NEWS: Note that MIPS --embedded-relocs option is deprecated.
-
-2004-04-11 Thiemo Seufer <seufer@csv.ica.uni-stuttgart.de>
-
- * configure.host: Remove mips*-dec-bsd* target.
- * configure.tgt: Likewise.
-
-2004-04-09 Daniel Jacobowitz <drow@mvista.com>
-
- Merge from mainline:
- 2004-03-30 Nick Clifton <nickc@redhat.com>
- * po/sv.po: Updated Swedish translation.
-
- 2004-03-20 Alexandre Oliva <aoliva@redhat.com>
- * emulparams/elf32frvfd.sh (MAXPAGESIZE): Change to 16Kb.
-
- 2004-03-08 Danny Smith <dannysmith@users.sourceforge.net>
- * pe-dll.c (pe_dll_generate_implib): Skip sections marked as
- private when building implib.
-
- 2004-03-01 Andreas Schwab <schwab@suse.de>
- * ld.texinfo (Options): Fix example for --wrap.
-
- 2004-02-25 Danny Smith <dannysmith@users.sourceforge.net>
- * pe-dll.c (fill_edata): Check that exported_symbol_sections is
- not NULL.
-
- 2004-02-23 Ian Lance Taylor <ian@wasabisystems.com>
- * ldlang.c (lang_check): Use %P, not %E, in error message.
-
-2004-04-08 Richard Sandiford <rsandifo@redhat.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.
-
-2004-04-08 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.
-
- 2004-03-25 Alan Modra <amodra@bigpond.net.au>
- * emultempl/elf32.em (gld${EMULATION_NAME}_before_allocation): Update
- size_dynamic_sections call.
-
- 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.
-
- 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.
-
-2004-03-23 Alan Modra <amodra@bigpond.net.au>
-
- PR 51.
- * emultempl/ppc64elf.em (ppc_create_output_section_statements): Set
- link_info.wrap_char.
-
-2004-03-17 Ralf Corsepius <corsepiu@faw.uni-ulm.de>
-
- * configure.tgt: Switch sh-*-rtems* to ELF. Add sh-*-rtemscoff*.
-
-2004-03-05 Nathan Sidwell <nathan@codesourcery.com>
-
- * 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.
-
-2004-02-23 Nathan Sidwell <nathan@codesourcery.com>
-
- * 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.
-
-2004-02-23 Alan Modra <amodra@bigpond.net.au>
-
- * ldexp.c (fold_tree): Follow indirect symbols.
-
-2004-02-20 Nathan Sidwell <nathan@codesourcery.com>
-
- * ldgram.y (exp): Add two operand ALIGN.
- * ldexp.c (fold_binary): Add ALIGN_K case.
- * ld.texinfo (ALIGN): Document two operand version.
-
-2004-02-19 Nathan Sidwell <nathan@codesourcery.com>
-
- * 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.
-
-2004-02-18 Nathan Sidwell <nathan@codesourcery.com>
-
- * ldgram.y (statement_anywhere): Add assert rule.
- * ldlang.c (exp_init_os): Add assert case.
-
-2004-02-14 Andrew Cagney <cagney@redhat.com>
-
- * ldmain.c (remove_output): Call bfd_cache_close.
-
-2004-02-14 Richard Sandiford <rsandifo@redhat.com>
-
- * emulparams/elf32bmipn32-defs.sh (OTHER_SECTIONS): Discard
- .MIPS.content* and .MIPS.events* sections.
-
-2004-02-09 Daniel Jacobowitz <drow@mvista.com>
-
- * emulparams/armelf.sh, emulparams/armelf_linux.sh: Move
- .note.gnu.arm.ident to after allocated sections. Mark its
- address as 0.
-
-2004-02-09 Daniel Jacobowitz <drow@mvista.com>
-
- * emulparams/armelf_linux.sh (COMMONPAGESIZE): Set to 4KB.
- * emulparams/elf32bmip.sh (COMMONPAGESIZE): Likewise.
- * emulparams/elf32bmipn32.sh (COMMONPAGESIZE): Likewise.
- * emulparams/elf32btsmipn32.sh (COMMONPAGESIZE): Likewise.
- * emulparams/shlelf_linux.sh (COMMONPAGESIZE): Likewise.
-
-2004-02-05 Nick Clifton <nickc@redhat.com>
-
- * emultempl/pe.em (_after_open): Fix typo in previous delta.
-
-2004-02-04 Danny Smith <dannysmith@users.sourceforge.net>
-
- * emultempl/pe.em (_after_open): Fix thinko in 2003-12-18 patch.
-
-2004-01-28 Alan Modra <amodra@bigpond.net.au>
-
- * genscripts.sh: Fix typo.
-
- * genscripts.sh: Apply $LIBPATH_SUFFIX to $tool_lib and $libdir too.
-
-2004-01-24 Jakub Jelinek <jakub@redhat.com>
-
- * emulparams/elf64_ia64.sh: Put .rela.opd into
- OTHER_GOT_RELOC_SECTIONS instead of OTHER_PLT_RELOC_SECTIONS.
-
-2004-01-20 Danny Smith <dannysmith@users.sourceforge.net>
-
- * pe-dll.c (pe_create_import_fixup): Clear WP_TEXT flag.
- * ld.texinfo (--omagic): Note that writable text section
- does not conform to published PE-COFF specs.
- (--enable-auto-import): Likewise.
-
-2004-01-15 Alan Modra <amodra@bigpond.net.au>
-
- * emulparams/elf32ppc.sh (COMMONPAGESIZE): Define.
-
-2004-01-13 Nick Clifton <nickc@redhat.com>
-
- * ldlang.c (lang_get_regions): Add extra parameter 'have_vma'
- which if true will prevent the LMA region being used as a
- replacement for a default VMA region.
- (lang_leave_output_section_statement): Pass extra parameter.
- (lang_leave_overlay): Likewise.
- * ld.texinfo (Output Section LMA): Document that the LMA
- region can be set to the VMA region if no VMA has been set.
- * ldlang.h (struct lang_output_section_phdr_list): Create a
- typedef for this type. Minor formatting fixes.
-
-2004-01-13 Nick Clifton <nickc@redhat.com>
-
- * ldlang.c (lang_size_sections_1): If dot is advanced, then
- assume that the section should be allocated.
-
-2004-01-13 Alan Modra <amodra@bigpond.net.au>
-
- * ldlang.c (IGNORE_SECTION): Don't ignore SEC_ALLOC && !SEC_LOAD
- sections. Do ignore SEC_NEVER_LOAD sections.
- (lang_size_sections_1): Remove test made redundant with the above.
-
-2004-01-09 Alan Modra <amodra@bigpond.net.au>
-
- * emultempl/ppc64elf.em (ppc_before_allocation): Clear cached
- program_header_size.
-
-2004-01-06 Alexandre Oliva <aoliva@redhat.com>
-
- 2003-11-28 Alexandre Oliva <aoliva@redhat.com>
- * emulparams/elf32frvfd.sh (EMBEDDED): Clear.
- 2003-11-05 Alexandre Oliva <aoliva@redhat.com>
- * emulparams/elf32frvfd.sh (STACK_ADDR): Unset.
- (MAXPAGESIZE): Set to 64Kb.
- (OTHER_READONLY_SECTIONS): Define __ROFIXUP_LIST__ and
- __ROFIXUP_END__. Don't map .rofixup.got any more.
- * emulparams/elf32frv.sh (NOP): Set.
- 2003-10-31 Alexandre Oliva <aoliva@redhat.com>
- * configure.tgt: Add frv-*-*linux*.
- 2003-09-30 Alexandre Oliva <aoliva@redhat.com>
- * Makefile.am (ALL_EMULATIONS): Added eelf32frvfd.o.
- (eelf32frvfd.c): New.
- * configure.tgt <frv-*-*>: Added it to targ_extra_emuls.
- * emulparams/elf32frv.sh: Reverted previous two patches.
- * emulparams/elf32frvfd.sh: New.
- * Makefile.in: Rebuilt.
- 2003-09-18 Alexandre Oliva <aoliva@redhat.com>
- * emulparams/elf32frv.sh (OTHER_READONLY_SECTIONS): Added
- .rofixup.got to .rofixup.
- 2003-09-15 Alexandre Oliva <aoliva@redhat.com>
- * emulparams/elf32frv.sh (MAXPAGESIZE): Make it 256KiB, not 256B.
- (TEMPLATE_NAME, GENERATE_SHLIB_SCRIPT): Set.
-
-2004-01-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
-
-Local Variables:
-mode: change-log
-left-margin: 8
-fill-column: 74
-version-control: never
-End:
diff --git a/contrib/binutils/ld/ChangeLog-0001 b/contrib/binutils/ld/ChangeLog-0001
deleted file mode 100644
index 9183afe..0000000
--- a/contrib/binutils/ld/ChangeLog-0001
+++ /dev/null
@@ -1,3376 +0,0 @@
-2001-12-21 Tom Rix <trix@redhat.com>
-
- (gld*_create_output_section_statements): New function.
- For -binitfini support.
- * emultempl/aix.em (gld*_before_parse): Fix comment.
- * emultempl/aix.em (gld*_parse_args): Fix comment.
-
-2001-12-20 Jason Thorpe <thorpej@wasabisystems.com>
-
- * configure.tgt (mips*-dec-netbsd*): Delete alias for
- mips*el-*-netbsd*.
- (sparc64-*-netbsd*): Add elf32_sparc to targ_extra_emuls.
-
- * configure.tgt (arm-*-netbsdelf*): Add target.
- (arm-*-netbsd*): Add armelf and armelf_nbsd to targ_extra_emuls.
- * emulparams/armelf_nbsd.sh: Added.
- * Makefile.am: Add rules for earmelf_nbsd.
- * Makefile.in: Regenerate.
-
-2001-12-19 Andreas Jaeger <aj@suse.de>,
- Susanne Oberhauser <froh@suse.de>
-
- * configure.host: Add rules for x86_64-*linux-gnu. Change
- s390x-linux entry to use gcc to report configuration, replace gcc
- with $CC in s390-linux
-
-2001-12-19 Andreas Jaeger <aj@suse.de>
-
- * ld.texinfo (VERSION): Fix markup.
-
-2001-12-18 matthew green <mrg@eterna.com.au>
-
- * Makefile.am (ALL_EMULATIONS): Add m68kelfnbsd.o.
- (m68kelfnbsd.c): New rule.
- * Makefile.in: Regenerate.
- * configure.tgt (m68*-hp-netbsd*): Renamed to ..
- (m68*-*-netbsd*4k*): .. this.
- (m68*-*-netbsdelf*): New target.
- (m68*-*-netbsd*): Also include ELF support.
- (m68*-*-netbsdaout*): New alias for m68*-*-netbsd*.
- * emulparams/m68kelfnbsd.sh: New emulation.
-
-2001-12-18 Jakub Jelinek <jakub@redhat.com>
-
- * ldgram.y (vers_node): Support anonymous version tags.
- * ldlang.c (lang_register_vers_node): Ensure anonymous version
- tag is not defined together with non-anonymous versions.
- * ld.texinfo: Document it.
-
-2001-12-18 Nick Clifton <nickc@cambridge.redhat.com>
-
- * po/tr.po: New file: Turkish translation.
- * configure.in (ALL_LINGUAS): Add tr.
- * configure: Regenerate.
-
-2001-12-17 Jason Thorpe <thorpej@wasabisystems.com>
-
- * Makefile.am: Add rules for eelf64alpha_nbsd.
- * Makefile.in: Regenerate.
- * configure.tgt (alpha*-*-netbsd*): Set
- targ_emul to elf64alpha_nbsd.
- * emulparams/elf64alpha_nbsd.sh: Added.
-
-2001-12-17 Alan Modra <amodra@bigpond.net.au>
-
- * emultempl/elf32.em (gld${EMULATION_NAME}_place_orphan): Adjust
- section_tail when fiddling with section list.
- (gld${EMULATION_NAME}_list_options): Ensure sentences aren't
- broken into separate strings to make translation easier.
- * emultempl/mmo.em (mmo_place_orphan): Adjust section_tail when
- fiddling with section list.
- * emultempl/pe.em (gld_${EMULATION_NAME}_place_orphan): Likewise.
-
-2001-12-16 Hans-Peter Nilsson <hp@bitrange.com>
-
- * scripttempl/mmo.sc: Add .debug_ranges to listed sections.
-
-2001-12-15 Alan Modra <amodra@bigpond.net.au>
-
- * ldmain.c (main): Initialise link_info.eh_frame_hdr.
-
-2001-12-13 Jakub Jelinek <jakub@redhat.com>
-
- * emultempl/elf32.em (finish): Supply output_bfd
- to bfd_elf*_discard_info.
- (OPTION_EH_FRAME_HDR): Define.
- (longopts): Add --eh-frame-hdr.
- (parse_args): Handle it.
- (list_options): Add --eh-frame-hdr to help.
- * emultempl/hppaelf.em (finish): Supply output_bfd
- to bfd_elf*_discard_info.
- * scripttempl/elf.sc (.eh_frame_hdr): Add.
-
-2001-12-13 Alan Modra <amodra@bigpond.net.au>
-
- * lexsup.c (parse_args): Don't pass shortopts to second call to
- getopt functions. Restore optind rather than decrementing before
- second call. Remove errind as it now duplicates last_optind.
-
-2001-12-11 Christopher Faylor <cgf@redhat.com>
-
- * emultempl/pe.em (gld_${EMULATION_NAME}_list_options): Fix typo.
-
-2001-12-07 Geoffrey Keating <geoffk@redhat.com>
- Richard Henderson <rth@redhat.com>
-
- * Makefile.am: Add support for xstormy16.
- * configure.tgt: Add support for xstormy16.
- * Makefile.in: Regenerate.
- * emulparams/elf32xstormy16.sh: New file.
- * scripttempl/xstormy16.sc: New file.
-
-2001-10-01 Christopher Faylor <cgf@cygnus.com>
-
- * Makefile.in (LIB_PATH): Make configurable.
- (GENSCRIPTS): Set LIB_PATH in environment.
- * configure.in: Substitute LIB_PATH.
- * configure: Regenerate.
- * configure.tgt (*cygwin): Set LIB_PATH for cross build.
- * configure.host (*cygwin): Add /usr/lib/w32api to NATIVE_LIB_DIRS.
-
-2001-12-07 Nick Clifton <nickc@cambridge.redhat.com>
-
- * lexsup.c (ld_options): Insert 'PROGRAM' into the text string
- describing the -N option so that it is easier to translate into
- foreign languages.
-
-2001-12-05 Nick Clifton <nickc@cambridge.redhat.com>
-
- * emultempl/pe.em (..._list_options): Replace multiple fprintf
- statements describing a single option with a single, newline
- escaped fprintf. This allows better translation into other
- languages.
-
- * ldmain.c (add_archive_element): Combine multiple strings
- into a single string to permit better translation into other
- languages.
-
-2001-12-05 Tom Rix <trix@redhat.com>
-
- * Makefile.am: Remove eaixppc64.
- * Makefile.in: Regenerate.
-
-2001-12-04 Tom Rix <trix@redhat.com>
-
- * emultempl/aix.em (choose_target): Change default target to
- OUTPUT_FORMAT for ppcmacos. Add braces to remove compiler
- warning.
- (gld*_read_file): Fix typo.
- (change_symbol_mode): Add prototype.
- (is_syscall): Same.
-
- * emulparams/aixppc.sh (SYSCALL_MASK, SYMBOL_MODE_MASK): Delete.
- * emulparams/aixrs6.sh : Same.
- * emulparams/ppcmacos.sh : Same.
- * emulparams/aixppc64.sh : Delete file.
- * emultempl/aix.em : Formatting changes.
-
-2001-12-04 Hans-Peter Nilsson <hp@axis.com>
-
- * emulparams/criself.sh (NO_SMALL_DATA): Set, to yes.
- (OTHER_BSS_END_SYMBOLS): Don't refer to .sbss when setting
- __Sbss.
- (OTHER_END_SYMBOLS): Fix formatting.
- * emulparams/crislinux.sh (NO_SMALL_DATA): Set, to yes.
- (OTHER_END_SYMBOLS): Fix formatting.
-
-2001-12-04 Alan Modra <amodra@bigpond.net.au>
-
- * ldexp.c (exp_print_token): Correct "table" entry for RSHIFT.
-
-2001-12-02 Tom Rix <trix@redhat.com>
-
- * configure.tgt : Remove eaixppc64 emulations.
- * Makefile.in : Remove eaixppc64.c
- * ldemul.c (ldemul_choose_target): New parameters argc, argv.
- (ldemul_default_target): Same.
- * emultempl/gld960.em (gld960_choose_target): Same.
- * emultempl/gld960c.em (gld960_choose_target): Same.
- * scripttempl/aix.sc: Remove OUTPUT_FORMAT.
- * emultempl/aix.em (is_syscall): syscall_mask now a variable.
- * emultempl/aix.em (gld*_read_file): symbol_mode_mask now a variable.
- * emultempl/aix.em (gld*_parse_args): Handle -b32 -b64 emulation.
- * emultempl/aix.em (choose_target): New function. Handle emulation of
- -b32 and -b64.
-
-2001-11-27 H.J. Lu <hjl@gnu.org>
-
- * emulparams/elf_i386.sh (NO_SMALL_DATA): Set to yes.
- * emulparams/elf_i386_be.sh (NO_SMALL_DATA): Likewise.
- * emulparams/elf_i386_chaos.sh (NO_SMALL_DATA): Likewise.
- * emulparams/elf_i386_ldso.sh (NO_SMALL_DATA): Likewise.
- * emulparams/elf_x86_64.sh (NO_SMALL_DATA): Likewise.
- * emulparams/m68kelf.sh (NO_SMALL_DATA): Likewise.
- * emulparams/elf32_sparc.sh (NO_SMALL_DATA): Likewise.
- * emulparams/elf64_sparc.sh (NO_SMALL_DATA): Likewise.
-
- * scripttempl/elf.sc (SBSS): New. Define if ${NO_SMALL_DATA}
- is not empty.
- (SDATA): Likewise.
- (REL_SDATA): Likewise.
- (REL_SBSS): Likewise.
- (REL_SDATA2): Likewise.
- (REL_SBSS2): Likewise.
- (SBSS2): Define if ${NO_SMALL_DATA} is not empty.
- (SDATA2): Likewise.
-
-2001-11-25 Stephane Carrez <Stephane.Carrez@worldnet.fr>
-
- * scripttempl/elfm68hc11.sc (CTOR, DTOR): Put constructor and
- destructor in rom.
- * scripttempl/elfm68hc12.sc (CTOR, DTOR): Likewise.
-
-2001-11-22 H.J. Lu <hjl@gnu.org>
-
- * Makefile.in: Regenerated with automake based on automake
- 1.4-8 in RedHat 7.1.
-
-2001-11-22 Alan Modra <amodra@bigpond.net.au>
-
- * Makefile.am (CONFIG_STATUS_DEPENDENCIES): Define.
- (config.status): Delete rule.
- Add extra dependencies to cover sourced emulparams files.
- * Makefile.in: Regenerate.
-
- * scripttempl/elf.sc: Order <section>, <section>.* and
- corresponding linkonce sections as seen in input files.
- Formatting fixes. Zero vma of all sections if not relocating.
- (STACK): Define and insert if STACK_ADDR defined.
- (OTHER_RELOCATING_SECTIONS): Delete.
- (OTHER_END_SYMBOLS): Define.
- (OTHER_READONLY_SECTIONS): Always insert, not just when relocating.
- (OTHER_READWRITE_SECTIONS): Likewise.
- (OTHER_GOT_SECTIONS): Likewise.
- (OTHER_SDATA_SECTIONS): Likewise.
- (OTHER_BSS_SECTIONS): Likewise.
- * scripttempl/elfi370.sc (OTHER_READONLY_SECTIONS): Likewise.
- (OTHER_READWRITE_SECTIONS): Likewise.
- * scripttempl/nw.sc (OTHER_READONLY_SECTIONS): Likewise.
- (OTHER_READWRITE_SECTIONS): Likewise.
-
- * emulparams/armelf.sh (OTHER_RELOCATING_SECTIONS): Delete.
- (STACK_ADDR): Define.
- * emulparams/armelf_oabi.sh: As for armelf.sh.
- * emulparams/elf32mcore.sh: As for armelf.sh.
- * emulparams/h8300elf.sh: As for armelf.sh.
- * emulparams/mn10200.sh: As for armelf.sh.
- * emulparams/shelf.sh: As for armelf.sh.
-
- * emulparams/elf32fr30.sh (OTHER_RELOCATING_SECTIONS): Delete.
- (OTHER_END_SYMBOLS): Define.
- * emulparams/m32relf.sh: As for elf32fr30.sh.
- * emulparams/h8300helf.sh: As for elf32fr30.sh.
- * emulparams/h8300self.sh: As for elf32fr30.sh.
-
- * emulparams/criself.sh (OTHER_READONLY_SECTIONS): Protect symbol
- defines with RELOCATING test.
- (OTHER_SDATA_SECTIONS): Likewise.
- (OTHER_RELOCATING_SECTIONS): Delete, replacing with..
- (OTHER_END_SYMBOLS): ..this.
- * emulparams/crislinux.sh: As for criself.sh.
-
- * emulparams/elf32bmipn32.sh (OTHER_SDATA_SECTIONS): Zero vma
- if not relocating.
- (OTHER_RELOCATING_SECTIONS): Delete, replacing with..
- (OTHER_SECTIONS): ..this. Zero vma if not relocating. Order
- normal and linkonce sections as seen in input files.
- * emulparams/elf32bmip.sh (DATA_ADDR): Don't define if EMBEDDED.
- (TEXT_DYNAMIC): Likewise.
- (INITIAL_READONLY_SECTIONS): Zero vma if not relocating.
- (OTHER_SDATA_SECTIONS): Likewise.
- * emulparams/elf32ppc.sh (OTHER_READWRITE_SECTIONS): Likewise.
- * emulparams/shlelf_linux.sh (OTHER_READWRITE_SECTIONS): Likewise.
- * emulparams/elf64alpha.sh (OTHER_READONLY_SECTIONS): Likewise.
- * emulparams/hppalinux.sh (OTHER_READONLY_SECTIONS): Likewise.
- * emulparams/elf64_aix.sh (OTHER_GOT_SECTIONS): Likewise.
- (OTHER_PLT_RELOC_SECTIONS): Likewise.
- (OTHER_READONLY_SECTIONS): Likewise. Order normal and linkonce
- sections as seen in input files.
- * emulparams/elf64_ia64.sh: As for emulparams/elf64_aix.sh.
- * emulparams/hppa64linux.sh (OTHER_READONLY_SECTIONS): Zero vma
- if not relocating.
- (OTHER_READWRITE_SECTIONS, OTHER_BSS_SECTIONS): Likewise.
- (OTHER_BSS_END_SYMBOLS): Merge from elf64hppa.sh.
- * emulparams/elf64mmix.sh (OTHER_RELOCATING_SECTIONS): Delete.
- (OTHER_SECTIONS): Instead, use this..
- (OTHER_END_SYMBOLS): ..and this.
-
- * emulparams/elf32b4300.sh: Source elf32bmip.sh, remove duplicates.
- * emulparams/elf32bsmip.sh: Likewise.
- * emulparams/elf32btsmip.sh: Likewise.
- * emulparams/elf32ebmip.sh: Likewise.
- * emulparams/elf32lmip.sh: Likewise.
- * emulparams/elf32elmip.sh: Source elf32lmip.sh, remove duplicates.
- * emulparams/elf32lsmip.sh: Likewise.
- * emulparams/elf32ltsmip.sh: Source elf32btsmip.sh, remove duplicates.
- * emulparams/elf32l4300.sh: Source elf32b4300.sh, remove duplicates.
- * emulparams/elf64bmip.sh: Source elf32bmipn32.sh, remove duplicates.
- * emulparams/elf64btsmip.sh: Likewise.
- * emulparams/elf64ltsmip.sh: Source elf64btsmip.sh, remove duplicates.
- * emulparams/elf32lppc.sh: Source elf32ppc.sh, remove duplicates.
- * emulparams/elf32ppclinux.sh: Likewise.
- * emulparams/elf32ppcsim.sh: Likewise.
- * emulparams/elf32lppcsim.sh: Source elf32lppc.sh, remove duplicates.
- * emulparams/elf64hppa.sh: Source hppa64linux.sh, remove duplicates.
- * emulparams/h8300helf.sh: Source h8300elf.sh, remove duplicates.
- * emulparams/h8300self.sh: Likewise.
- * emulparams/mn10300.sh: Source mn10200.sh, remove duplicates.
- * emulparams/sh.sh: Comment.
- * emulparams/shl.sh: Source sh.sh, remove duplicates.
- * emulparams/shlelf.sh: Source shelf.sh, remove duplicates.
- * emulparams/shelf_linux.sh: Source shlelf_linux.sh, remove duplicates.
-
-2001-11-21 David Heine <dlheine@tensilica.com>
- Alan Modra <amodra@bigpond.net.au>
-
- * ldlang.c (map_input_to_output_sections): Replace "break"
- accidentally removed with 2001-08-03 change.
- (lang_gc_sections_1): Likewise.
-
-2001-11-21 Alan Modra <amodra@bigpond.net.au>
-
- * ldlang.c (walk_wild_section): Move sec == NULL case out of loop.
-
-2001-11-20 Angela Marie Thomas <angela@redhat.com>
-
- * emultempl/elf32.em (gld${EMULATION_NAME}_finish): Use NULL instead
- of false when calling lang_size_sections.
- * emultempl/hppaelf.em (hppaelf_layout_sections_again): Likewise.
-
-2001-11-15 Alan Modra <amodra@bigpond.net.au>
-
- * emultempl/elf32.em (gld${EMULATION_NAME}_finish): Only emit this
- function when LDEMUL_FINISH isn't set to the same name. Don't
- call ${LDEMUL_FINISH}.
- (ld_${EMULATION_NAME}_emulation): Call $LDEMUL_FINISH if defined.
- * emultempl/armelf.em (arm_elf_finish): Call
- gld${EMULATION_NAME}_finish.
- * emultempl/hppaelf.em (hppaelf_finish): Rename to
- gld${EMULATION_NAME}_finish. Call bfd_elf32_discard_info and
- hppaelf_layout_sections_again if necessary.
- (need_laying_out): New var.
- (hppaelf_layaout_sections_again): Rename to
- hppaelf_layout_sections_again. Clear need_laying_out.
- (PARSE_AND_LIST_OPTIONS): Format text.
-
-2001-11-14 H.J. Lu <hjl@gnu.org>
-
- * emultempl/armelf.em (arm_elf_finish): Renamed from
- gld${EMULATION_NAME}_finish.
- (LDEMUL_FINISH): Set to arm_elf_finish.
-
-2001-11-14 Daniel Jacobowitz <drow@mvista.com>
-
- * emultempl/elf32.em (gld${EMULATION_NAME}_finish): New.
- (struct ld_emulation_xfer_struct): Use it.
-
-2001-11-13 Ross Alexander <ross.alexander@uk.neceur.com>
-
- * emulparams/elf64hppa.sh (OTHER_BSS_END_SYMBOLS): Add
- additional symbols referenced by newer crt0.o files from HP.
-
-2001-11-12 Anthony Green <green@redhat.com>
-
- * emulparams/armelf.sh (DATA_START_SYMBOLS): New symbol.
-
-2001-11-12 Alfred M. Szmidt <ams@kemisten.nu>
-
- * Makefile.am (GENSCRIPTS): Quote ${exec_prefix}.
- * Makefile.in: Regenerate.
-
-2001-11-02 Stephane Carrez <Stephane.Carrez@worldnet.fr>
-
- * ld.texinfo: Use @command for commands, @option for options.
- * Makefile.am (POD2MAN): Use 'GNU Development Tools' for
- the page man title.
- * Makefile.in: Rebuild.
-
-2001-11-04 Chris Demetriou <cgd@broadcom.com>
-
- * configure.tgt (mips*el-*-netbsd*, mips*-*-netbsd*):
- Add support for targets.
-
-2001-11-02 Nick Clifton <nickc@cambridge.redhat.com>
-
- * configure.in (ALL_LINGUAS): Add "fr" and "sv"
- * configure: Regernate.
- * po/fr.po: New file.
- * po/sv.po: New file.
-
-2001-11-01 NIIBE Yutaka <gniibe@m17n.org>
-
- * configure.tgt (sh-*-linux): Set targ_emul, targ_extra_emuls
- as little endian default and to support big endian.
-
-2001-11-01 Chris Demetriou <cgd@broadcom.com>
-
- * ld.texinfo (Options): Document new option, -nostdlib.
- * lexsup.c (OPTION_NOSTDLIB): New definition.
- (ld_options): Add entry for "nostdlib".
- (parse_args): Handle OPTIONS_NOSTDLIB.
- * ldfile.c (ldfile_add_library_path): Don't add directories
- to the search path if they weren't specified on the command line
- and -nostdlib was specified.
- * ld.h (ld_config_type): New member only_cmd_line_lib_dirs.
-
-2001-10-31 Nick Clifton <nickc@cambridge.redhat.com>
-
- * lexsup.c (parse_args): Prevent infinite parsing loop when
- "-rpath.a" is specified on the command line.
- Replace calls to fprintf with calls to einfo.
-
-2001-10-31 John Marshall <jmarshall@acm.org>
-
- * ld.texinfo: A historical requirement that MEMORY and SECTIONS
- appear only once across all the linker scripts involved in a link
- invocation no longer applies. Make the documentation reflect
- that.
-
-2001-10-31 NIIBE Yutaka <gniibe@m17n.org>
-
- * configure.tgt: Supports sh3/sh4/sh3eb/sh4eb-unknown-linux-gnu
- targets.
- (sh-*-linux*): Added targ_extra_libpath.
-
-2001-10-31 David Heine <dlheine@tensilica.com>
-
- * ldlang.c (lang_size_sections): Keep a valid output_offset field
- for padding statements.
-
-2001-10-30 Hans-Peter Nilsson <hp@bitrange.com>
-
- * configure.tgt (mmix-*-*): New target.
- * Makefile.am (ALL_EMULATIONS): Add eelf64mmix.o and emmo.o.
- Add dependencies to match.
- * emulparams/mmo.sh, emulparams/elf64mmix.sh, emultempl/mmo.em,
- emultempl/mmix-elfnmmo.em, emultempl/mmixelf.em,
- scripttempl/mmo.sc: New files.
- * gen-doc.texi: @set MMIX.
- * ld.texinfo: Ditto.
- [MMIX] Add MMIX node.
- * Makefile.in: Regenerate.
-
-2001-10-29 Kazu Hirata <kazu@hxi.com>
-
- * ldlang.c: Fix a comment typo.
-
-2001-10-23 Alan Modra <amodra@bigpond.net.au>
-
- * configure.host: Move alpha*-*-linux-gnu* entry to generic
- entries, and match *-*-linux*.
-
-2001-10-20 Alan Modra <amodra@bigpond.net.au>
-
- * ldgram.y (mri_script_command): Surround processing of INCLUDE
- with ldlex_script, ldlex_popstate.
- (ifile_p1): Likewise.
- * ldlex.l (EOF): Don't BEGIN(SCRIPT). Restore lineno from the
- correct slot.
- (lex_push_file): Save current lineno to lineno_stack. Set lineno
- to 1. Don't BEGIN(SCRIPT).
- (lex_redirect): Similarly.
- * ldmain.c (main): Set yydebug non-zero if YYDEBUG.
-
-2001-10-20 Nick Clifton <nickc@cambridge.redhat.com>
-
- * scripttempl/armcoff.sc: Define __EH_FRAME_BEGIN__ and
- __EH_FRAME_END__ and accept eh frames into data section.
- Add ctor and dtor sections.
-
-2001-10-19 Danny Smith <danny_r_smith_2001@yahoo.co.nz>
-
- * pe-dll.c (autofilter_objectlist): Add gcrt0.o.
- (auto-export): Fix indentation.
-
-2001-10-18 Danny Smith <danny_r_smith_2001@yahoo.co.nz>
-
- * pe-dll.c (autofilter_objectlist): Add startup objects
- for profiling.
- (auto-export): Constify char * p.
- Extract file basename and use strcmp rather than ststr
- for object lookup.
-
-2001-10-18 Chris Demetriou <cgd@broadcom.com>
-
- * ldmain.c (get_emulation): Improve comment about the handling
- of -mipsN options.
-
-2001-10-17 Alan Modra <amodra@bigpond.net.au>
-
- * po/POTFILES.in: Regenerate.
-
-2001-10-16 Vassili Karpov <malc@pulsesoft.com>
-
- * emultempl/elf32.em (gld*_list_options): Remove extra '\t' from
- -z nocopyreloc and -z nocombreloc usage strings.
-
-2001-10-12 Vassili Karpov <malc@pulsesoft.com>
-
- * emultempl/elf32.em (gld*_list_options): Include -z nocopyreloc
- in usage.
-
-2001-10-11 Aleksey Romanov <aromanov@ennovatenetworks.com>
-
- * scripttempl/armaout.sc: Place .bss section after end of aligned
- data section to match behaviour of aout code in constructrion of
- header.
-
-2001-10-11 Danny Smith <danny_r_smith_2001@yahoo.co.nz>
-
- * pe-dll.c (autofilter_entry_type autofilter_liblist: Add
- startup files for mingw32 dlls to list.
-
-2001-10-10 Chris Demetriou <cgd@broadcom.com>
-
- * emultempl/elf32.em: Fix shell 'if' usage for portability.
-
-2001-10-08 Aldy Hernandez <aldyh@redhat.com>
-
- * configure.tgt (targ): Add arm9e-*-elf.
-
-2001-10-05 H.J. Lu <hjl@gnu.org>
-
- * genscripts.sh: Fix a typo in the last change.
-
-2001-10-05 Jakub Jelinek <jakub@redhat.com>
-
- * emultempl/elf32.em (gld_*_list_options): Include -z combreloc and
- -z nocombreloc in usage.
-
-2001-10-03 Jim Blandy <jimb@redhat.com>
-
- * genscripts.sh: Include a comment at the top of each generated
- script, explaining its purpose.
-
-2001-10-03 Vassili Karpov <malc@pulsesoft.com>
-
- * emultempl/elf32.em (parse_args): Handle -z nocopyreloc.
- * NEWS: Mention -z nocopyreloc.
- * ld.texinfo (Options): Describe nocopyreloc.
-
-2001-10-03 Alan Modra <amodra@bigpond.net.au>
-
- * configure: Regenerate.
-
-2001-10-02 Alan Modra <amodra@bigpond.net.au>
-
- * ldver.h (ld_program_version): Remove declaration.
- * lexsup.c (parse_args): Move printing of copyright message..
- * ldver.c (ldversion): .. to here.
- Use BFD_VERSION_STRING in place of BFD_VERSION.
- (ld_program_version): Remove.
- * Makefile.am (Makefile): Depend on bfd/configure.in.
- Run "make dep-am".
- * Makefile.in: Regenerate.
-
-2001-09-30 Hans-Peter Nilsson <hp@bitrange.com>
-
- * Makefile.am: Update dependencies with "make dep-am".
- * Makefile.in: Regenerate.
-
-2001-09-29 John Reiser <jreiser@BitWagon.com>
-
- * ldlang.c (lang_common): Conditionally inhibit Common allocation.
- * lexsup.c: Add --no-define-common commandline option.
- * ldgram.y: Add INHIBIT_COMMON_ALLOCATION script command.
- * ldlex.l: Likewise.
- * ld.h: Add command_line.inhibit_common_definition.
- * ldmain.c (main): Initialize.
- * ld.texinfo: Document.
-
-2001-09-29 Alan Modra <amodra@bigpond.net.au>
-
- * ldlang.c (section_already_linked): Remove assignment to kept_section.
-
-2001-09-26 Alan Modra <amodra@bigpond.net.au>
-
- * ldmisc.c (USE_STDARG): Remove.
- (info_msg): Define using VPARAMS, VA_OPEN, VA_FIXEDARG, VA_CLOSE.
- (einfo): Likewise.
- (minfo): Likewise.
- (lfinfo): Likewise.
-
- * ldmisc.h: Remove #ifdef ANSI_PROTOTYPES and non-ansi
- declarations. Update copyright.
-
-2001-09-24 Charles Wilson <cwilson@ece.gatech.edu>
-
- * pe-dll.c: Remove obsoleted declaration of
- pe_get_data_import_dll_name.
- (pe_create_import_fixup): Fix thinko.
-
- * ld.texinfo(enable-auto-import): Clarify the explanation.
-
-2001-09-24 Nick Clifton <nickc@cambridge.redhat.com>
-
- * pe-dll.c (pe_create_import_fixup): Revert previous patch.
- * emultemp/pe.em (pe_data_import_dll): Move definition outside of
- DLL_SUPPORT controlled code.
-
-2001-09-24 Charles Wilson <cwilson@ece.gatech.edu>
-
- * emultempl/pe.em(pe_data_import_dll): Make static.
- (pe_get_data_import_dll_name): New accessor function.
- * pe-dll.c(pe_create_import_fixup): call
- pe_get_data_import_dll_name() from pe.em, instead of
- directly accessing pe_data_import_dll variable from pe.em.
-
-2001-09-18 Bruno Haible <haible@clisp.cons.org>
-
- * deffilep.y: Include "safe-ctype.h" instead of <ctype.h>.
- (def_file_add_directive): Use ISSPACE instead of isspace.
- (def_lex): Use ISDIGIT/ISXDIGIT/ISALPHA/ISALNUM instead of
- isdigit/isxdigit/isalpha/isalnum.
- * emultempl/aix.em: Include "safe-ctype.h" instead of <ctype.h>.
- (gld${EMULATION_NAME}_read_file): Use ISSPACE instead of isspace.
- * emultempl/elf32.em: Include "safe-ctype.h" instead of <ctype.h>.
- (gld${EMULATION_NAME}_place_orphan): Use ISALNUM instead of
- isalnum.
- * emultempl/gld960c.em: Include "safe-ctype.h" instead of <ctype.h>.
- (gld960_set_output_arch): Use ISUPPER/TOLOWER instead of
- isupper/tolower.
- * emultempl/sunos.em: Include "safe-ctype.h" instead of <ctype.h>.
- (gld${EMULATION_NAME}_search_dir): Use ISDIGIT instead of isdigit.
- * ldctor.c: Include "safe-ctype.h" instead of <ctype.h>.
- (ctor_prio): Use ISDIGIT instead of isdigit.
- * ldfile.c: Include "safe-ctype.h" instead of <ctype.h>.
- (ldfile_open_file_search): Use ISALPHA instead of isalpha.
- (ldfile_add_arch): Use ISUPPER/TOLOWER instead of
- isupper/tolower.
- * ldlang.c: Include "safe-ctype.h" instead of <ctype.h>.
- (stricpy): Use TOLOWER instead of isupper/tolower.
- (lang_leave_overlay_section): Use ISALNUM instead of isalnum.
- * ldlex.l: Include "safe-ctype.h" instead of <ctype.h>.
- (lex_warn_invalid): Use ISPRINT instead of isprint.
- * ldmain.c: Include "safe-ctype.h" instead of <ctype.h>.
- (main): For gettext, also set the LC_CTYPE locate facet.
- (add_keepsyms_file): Use ISSPACE instead of isspace.
- * lexsup.c: Include "safe-ctype.h" instead of <ctype.h>.
- (is_num, parse_args): Use ISDIGIT instead of isdigit.
- * mpw-elfmips.c: Include "safe-ctype.h" instead of <ctype.h>.
- (gldelf32ebmip_place_orphan): Use ISALNUM instead of isalnum.
- * mpw-eppcmac.c: Include "safe-ctype.h" instead of <ctype.h>.
- (gldppcmacos_read_file): Use ISSPACE instead of isspace.
- * pe-dll.c: Include "safe-ctype.h" instead of <ctype.h>.
- (quoteput): Use ISSPACE instead of isspace.
- (pe_dll_generate_implib, pe_process_import_defs): Use ISALNUM
- instead of isalnum.
-
-2001-09-18 Alan Modra <amodra@bigpond.net.au>
-
- * deffilep.y (def_stash_module): Constify "name" param.
-
- * pe-dll.c: Replace CONST with const throughout.
- (quick_symbol): Constify "n1", "n2", "n3" params.
- (make_singleton_name_thunk): Constify "import" param. Make
- "buffer_len" a size_t.
- (make_import_fixup_entry): Constify "name", "fixup_name",
- "dll_symname" params.
- (pe_get16): Cast args of bfd_seek. Replace bfd_read with bfd_bread.
- (pe_get32): Likewise.
- (pe_implied_import_dll): Likewise.
-
- * emultempl/beos.em (sort_by_file_name): Constify "ra", "rb".
- (sort_by_section_name): Likewise.
-
- * emultempl/pe.em: Move defines for arm_epoc_pe before bfd.h included.
- (make_import_fixup): Cast printf arg, rel->address to long rather
- than int.
- (gld_${EMULATION_NAME}_after_open): Don't compare NULL against int.
-
-2001-09-15 Alan Modra <amodra@bigpond.net.au>
-
- * ldmain.c (main): Rename BufferSize to ld_bufsz because HPUX
- defines BufferSize. Increase buffer size by one.
-
-2001-09-14 Ralf Habacker <Ralf.Habacker@freenet.de>
-
- * pe-dll.c (pe_walk_relocs_of_symbol): Fix memory leak.
-
-2001-09-14 Kevin Lo <kevlo@openbsd.org>
-
- * configure.tgt: Add arm-openbsd target.
-
-2001-09-12 H.J. Lu <hjl@gnu.org>
-
- * Makefile.am (ALL_EMULATIONS): Move eelf64ppc.o and
- eelf64lppc.o to ...
- (ALL_64_EMULATIONS): Here.
- * Makefile.in: Regenerated.
-
-2001-09-12 Paul Sokolovsky <Paul.Sokolovsky@technologist.com>
-
- * emultempl/pe.em(make_import_fixup): change signature to
- take asection as well as arelec; we need this for proper
- error reporting. Only call pe_create_import_fixup() if
- there is no attempt to add a constant addend to the reloc;
- otherwise, report error condition.
- * pe-dll.c(pe_walk_relocs_of_symbol): change signature,
- since final argument is a pointer to make_import_fixup().
- Change call to cb() to match make_import_fixup() signature.
- (make_import_fixup_mark): make buffer_len unsigned.
- * pe-dll.h: change signature of pe_walk_relocs_of_symbol.
-
-2001-09-12 Charles Wilson <cwilson@ece.gatech.edu>
-
- * ld.texinfo: add verbose documentation for auto-import
- direct-addressing workaround, to compliment the terse
- error message.
-
-2001-09-12 Andrew MacLeod <amacleod@redhat.com>
-
- * scripttempl/v850.sc: Add gcc_except_table sections.
-
-2001-09-11 Jeffrey A Law (law@cygnus.com)
-
- * emulparams/h8300helf.sh: Move stack to a much higher memory address.
- * emulparams/h8300self.sh: Similarly.
-
-2001-09-05 Danny Smith <dannysmith@users.souceforge.net>
-
- * ld.texinfo (Options, --stack): Correct default value for stack
- reserve.
-
-2001-09-05 Tom Rix <trix@redhat.com>
-
- * emultempl/aix.em : Handle import file XMC_XO and syscall symbols.
-
-2001-09-03 Andreas Jaeger <aj@suse.de>
-
- * emultempl/beos.em: Declare prototypes for comparions functions,
- adjust definitions.
-
-2001-09-02 Andreas Jaeger <aj@suse.de>
-
- * emultempl/aix.em: Add missing prototype.
- * emultempl/lnk960.em: Likewise.
- * emultempl/vanilla.em: Likewise.
- * emultempl/armcoff.em: Likewise.
- * emultempl/armelf_oabi.em: Likewise.
- * emultempl/beos.em: Likewise.
- * emultempl/gld960c.em: Likewise.
- * emultempl/gld960.em: Likewise.
-
- * emulparams/elf64alpha.sh (PARSE_AND_LIST_PROLOGUE): Add parameter
- for prototype declaration.
-
-2001-08-31 Eric Christopher <echristo@redhat.com>
- Jason Eckhardt <jle@redhat.com>
-
- * ldmain.c (get_emulation): Add support for -mips32 and -mips64.
-
-2001-08-31 Andreas Jaeger <aj@suse.de>
-
- * emultempl/pe.em: Add missing prototypes.
- (gld_${EMULATION_NAME}_after_open): Remove extra args to
- pe_find_data_imports.
- (pr_sym): Add unused attribute.
-
-2001-08-29 Joel Sherrill <joel@OARcorp.com>
-
- * configure.tgt (i[3456]86-*-rtems*, m68*-*-rtems*): Change
- default from coff to elf.
-
-2001-08-29 Jeff Law <law@redhat.com>
-
- * emulparams/h8300helf.sh: Resync with h8300elf.sh. Update
- ARCH specification.
- * emulparams/h8300self.sh: Similarly.
-
-2001-08-28 J"orn Rennecke <amylaar@redhat.com>
-
- * Makefile.am (ALL_EMULATIONS): Add eh8300elf.o, eh8300elf.o and
- eh8300self.o .
- (eh8300elf.c, eh8300helf.c, eh8300self.c): New targets.
- * configure.tgt (h8300-*-elf*): New case.
- * emulparams/h8300elf.sh, emulparams/h8300helf.sh: New files.
- * emulparams/h8300self.sh: New file.
- * Makefile.in: Regenerated.
-
-2001-08-28 Nick Clifton <nickc@cambridge.redhat.com>
-
- * ldmain.c (main): Rename BSIZE to BufferSize to avoid collision
- with macro name.
-
-2001-08-27 Linus Nordberg <linus@swox.com>
- Alan Modra <amodra@bigpond.net.au>
-
- * Makefile.am (ALL_EMULATIONS): Add eelf64ppc.o and eelf64lppc.o.
- (eelf64ppc.c, eelf64lppc.c): Add make targets.
- Run "make dep-am"
- * Makefile.in: Regenerate.
- * configure.tgt: Add powerpc64 support. Move pdp11, pjl, pj
- entries to correct alphabetical position.
- * emulparams/elf64ppc.sh: New.
- * emulparams/elf64lppc.sh: New.
-
-2001-08-27 Nick Clifton <nickc@cambridge.redhat.com>
-
- * ldmain.c (main): Declare BSIZE as static.
-
-2001-08-23 Jakub Jelinek <jakub@redhat.com>
-
- * emultempl/elf32.em (place_orphan): Place orphan .rel* sections
- into .rel.dyn resp. .rela.dyn if combreloc.
- (get_script): If .x linker script is equal to .xn, only put it
- once into the binary.
- Add .xc and .xsc scripts.
- (parse_args): Handle -z combreloc and -z nocombreloc.
- * scripttempl/elf.sc (.rela.sbss): Fix a typo.
- For .xc and .xsc scripts put all .rel* or .rela* input sections
- but .rel*.plt and PLT-like sections into .rel.dyn resp. .rela.dyn.
- * genscripts.sh (GENERATE_COMBRELOC_SCRIPT): Set if SCRIPT_NAME
- is elf.
- Strip trailing whitespace from script.
- Generate .xc and .xsc scripts if requested.
- * ldmain.c (main): Initialize link_info.combreloc and
- link_info.spare_dynamic_tags.
- * lexsup.c (OPTION_SPARE_DYNAMIC_TAGS): Define.
- (ld_options): Add --spare-dynamic-tags option.
- (parse_args): Likewise.
- * ld.texinfo: Document -z combreloc and -z nocombreloc.
- * ldint.texinfo: Document .xc and .xsc linker scripts.
- * NEWS: Add notes about -z combreloc and SHF_MERGE.
-
-2001-08-22 H.J. Lu <hjl@gnu.org>
-
- * emulparams/elf32fr30.sh: Add a newline.
-
-2001-08-21 Andreas Jaeger <aj@suse.de>
-
- * deffilep.y: Add missing prototypes.
- * pe-dll.c: Likewise.
-
-2001-08-20 Alan Modra <amodra@bigpond.net.au>
-
- * ldlang.c (insert_pad): Fix typos in last patch.
-
- * ldlang.c: When traversing lang_statement_union_type lists,
- consistently use "header.next" rather than "next".
- * mpw-eppcmac.c: Likewise.
- * emultempl/beos.em: Likewise.
- * emultempl/hppaelf.em: Likewise.
- * emultempl/pe.em: Likewise.
- * ldlang.h (union lang_statement_union): Remove "next" field.
-
- * ldlang.c (insert_pad): Use offsetof macro.
- (lang_size_sections): Always neuter padding statements.
- * emultempl/hppaelf.em (hppaelf_delete_padding_statements): Delete.
-
- * pe-dll.c (pe_dll_fill_sections): Correct type of "relax" param
- passed to lang_size_sections.
- (pe_exe_fill_sections): Likewise.
- * emultempl/pe.em (output_prev_sec_find): Copied from elf32.em.
- (gld_${EMULATION_NAME}_place_orphan): Merge from elf32.em.
-
-2001-08-18 Alan Modra <amodra@bigpond.net.au>
-
- * emultempl/aix.em: Formatting fixes.
-
-2001-08-18 Alan Modra <amodra@bigpond.net.au>
-
- * ldlang.c (insert_pad): Make use of an existing pad statement if
- available. Move code calculating alignment, adjusting section
- alignment power, and adjusting dot to ..
- (size_input_section): .. here. Remove unused relax param.
- (lang_size_sections): Change boolean `relax' param to boolean *.
- Adjust call to size_input_section. Make use of insert_pad to
- place pad after the assignment statement. If relaxing, zap
- padding statements.
- (reset_memory_regions): Reset output_bfd section sizes too.
- (relax_again): Move to..
- (lang_process): ..here. Adjust call to lang_size_sections, and
- remove duplicated code.
- * ldlang.h (lang_size_sections): Change `relax' param to boolean *.
-
-2001-08-17 Alan Modra <amodra@bigpond.net.au>
-
- * ld.texinfo: Document that fill values now use the four least
- significant bytes.
- * emulparams/elf32fr30.sh (NOP): Update.
- * emulparams/elf32mcore.sh: Likewise.
- * emulparams/elf64_s390.sh: Likewise.
- * emulparams/elf_i386.sh: Likewise.
- * emulparams/elf_i386_be.sh: Likewise.
- * emulparams/elf_i386_chaos.sh: Likewise.
- * emulparams/elf_i386_ldso.sh: Likewise.
- * emulparams/elf_s390.sh: Likewise.
- * emulparams/elf_x86_64.sh: Likewise.
- * emulparams/i386moss.sh: Likewise.
- * emulparams/i386nw.sh: Likewise.
- * emulparams/m68kelf.sh: Likewise.
- * scripttempl/elf.sc: Update NOP comment.
- * scripttempl/elfi370.sc: Likewise.
- * scripttempl/elfm68hc11.sc: Likewise.
- * scripttempl/elfm68hc12.sc: Likewise.
- * scripttempl/nw.sc: Likewise.
-
-2001-08-15 Tom Rix <trix@redhat.com>
-
- * ldgram.y (saved_script_handle): Initialize to NULL.
- * ldmain.c (main): Change check on saved_script_handle.
-
-2001-08-14 Alan Modra <amodra@bigpond.net.au>
-
- * emultempl/elf32.em: Formatting fixes.
- (output_prev_sec_find): Test for bfd_ind_section too; do so by
- looking at sec->owner.
- (output_rel_find): Move function inside LDEMUL_PLACE_ORPHAN test.
- (gld${EMULATION_NAME}_place_orphan): Add a few comments. Remove
- unused code, and reorganize orphan section placement code.
-
- * ldlang.c (wild_doit): Rename to lang_add_section.
- * ldlang.h: Here too.
- * mpw-elfmips.c: And here.
- * emultempl/beos.em: And here.
- * emultempl/elf32.em: And here.
- * emultempl/hppaelf.em: And here.
- * emultempl/pe.em: And here.
-
-2001-08-13 Richard Henderson <rth@redhat.com>
-
- * emultempl/needrelax.em: New file.
- * emulparams/elf64_ia64.sh (EXTRA_EM_FILE): Reference it.
- * Makefile.am (eelf64_ia64.c): Depend on it.
- * Makefile.in: Rebuild.
-
-2001-08-13 Alan Modra <amodra@bigpond.net.au>
-
- * emultempl/elf32.em: For SEC_EXCLUDE sections, ensure that
- output_section is set non-NULL.
-
- * emultempl/elf32.em (gld${EMULATION_NAME}_place_orphan): Return
- `true' for SEC_EXCLUDE sections so that the generic code doesn't
- needlessly create an output_section_statement. Treat a correctly
- named output_section_statement with NULL bfd_section as compatible.
-
-2001-08-13 Hans-Peter Nilsson <hp@bitrange.com>
-
- * emultempl/generic.em: Support EXTRA_EM_FILE.
- (ld_${EMULATION_NAME}_emulation): Support emulation parameters
- LDEMUL_BEFORE_PARSE, LDEMUL_SYSLIB, LDEMUL_HLL,
- LDEMUL_AFTER_PARSE, LDEMUL_AFTER_OPEN, LDEMUL_AFTER_ALLOCATION,
- LDEMUL_SET_OUTPUT_ARCH, LDEMUL_CHOOSE_TARGET,
- LDEMUL_BEFORE_ALLOCATION, LDEMUL_GET_SCRIPT, LDEMUL_FINISH,
- LDEMUL_CREATE_OUTPUT_SECTION_STATEMENTS,
- LDEMUL_OPEN_DYNAMIC_ARCHIVE, LDEMUL_PLACE_ORPHAN,
- LDEMUL_SET_SYMBOLS, LDEMUL_PARSE_ARGS, LDEMUL_UNRECOGNIZED_FILE,
- LDEMUL_LIST_OPTIONS, LDEMUL_RECOGNIZED_FILE,
- LDEMUL_FIND_POTENTIAL_LIBRARIES.
-
-2001-08-12 Richard Henderson <rth@redhat.com>
-
- * scripttempl/elf.sc, scripttempl/elfd30v.sc,
- scripttempl/elfm68hc11.sc, scripttempl/elfm68hc12.sc,
- scripttempl/v850.sc: Keep .jcr data.
-
-2001-08-12 H.J. Lu <hjl@gnu.org>
- Andrew Haley <aph@cambridge.redhat.com>
- Nick Clifton <nickc@redhat.com>
-
- * ldgram.y (had_script): Change name to saved_script_handle.
- Change type to file handle.
- * ld.h (had_script): Rename and retype.
- * ldfile.c (ldfile_open_command_file): Save the file handle
- used in saved_script_handle.
- * lexsup.c (parse_args): Do not allow -c option to alter
- saved_script_handle.
- * ldmain.c (main): Print out the linker script used if
- --verbose is given. Check saved_script_handle to obtain the
- external linker script used, or if NULL, dump the builtin
- script.
- * ld.texinfo: Document that --verbose now dumps the linker
- script used, regardless of whether it was an internal or an
- external script.
-
-2001-08-10 Andreas Jaeger <aj@suse.de>
-
- * configure.in: Add -Wstrict-prototypes and -Wmissing-prototypes
- to build warnings.
- * configure: Regenerate.
-
-2001-08-09 Alan Modra <amodra@bigpond.net.au>
-
- * emultempl/elf32.em (output_prev_sec_find): Add missing prototype.
-
- * scripttempl/elf.sc: Move non-text .dynamic section before
- .plt/.got/.sdata* group.
- (OTHER_GOT_SECTIONS): Move to immediately after .got.
- (OTHER_SDATA_SECTIONS): Add.
- * emulparams/criself.sh: Use OTHER_SDATA_SECTIONS rather than
- OTHER_GOT_SECTIONS.
- * emulparams/crislinux.sh: Likewise.
- * emulparams/elf32b4300.sh: Likewise.
- * emulparams/elf32bmip.sh: Likewise.
- * emulparams/elf32bmipn32.sh: Likewise.
- * emulparams/elf32bsmip.sh: Likewise.
- * emulparams/elf32btsmip.sh: Likewise.
- * emulparams/elf32ebmip.sh: Likewise.
- * emulparams/elf32elmip.sh: Likewise.
- * emulparams/elf32l4300.sh: Likewise.
- * emulparams/elf32lmip.sh: Likewise.
- * emulparams/elf32lsmip.sh: Likewise.
- * emulparams/elf32ltsmip.sh: Likewise.
- * emulparams/elf64bmip.sh: Likewise.
- * emulparams/elf64btsmip.sh: Likewise.
- * emulparams/elf64ltsmip.sh: Likewise.
-
-2001-08-08 Alan Modra <amodra@bigpond.net.au>
-
- * genscripts.sh: Source the emulparams script before each output
- script is generated so that variables like `RELOCATING' may affect
- variables defined in the emulparams script.
-
-2001-08-04 Alan Modra <amodra@bigpond.net.au>
-
- * emultempl/aix.em: ldexp.h,ldlang.h,ldfile.h,ldemul.h go in this
- order.
-
- * emultempl/beos.em (sort_sections): Modify for 2001-08-03 change,
- ie. iterate over wild_statement.section_list.
- (gld${EMULATION_NAME}_place_orphan): Likewise.
-
-2001-08-03 Stephane Carrez <Stephane.Carrez@worldnet.fr>
-
- * scripttempl/elfm68hc12.sc (FINISH_CODE, FINISH_RELOC): New to handle
- .fini[0-4] sections used by _exit
- (CTOR, DTOR): Export ctor/dtor symbols; move them to ROM.
- (*.text,*.data,*.bss): Take into account .text.*, .data.*, .bss.*.
- * scripttempl/elfm68hc11.sc: Likewise.
-
-2001-08-03 H.J. Lu <hjl@gnu.org>
-
- * emultempl/beos.em (init): Add the missing initialization.
-
-2001-08-03 Alan Modra <amodra@bigpond.net.au>
-
- * ld.texinfo (Input Section Basics): Clarify ordering of output
- sections.
- * ldlang.c (callback_t): Add wildcard_list param.
- (walk_wild_section): Remove "section" param. Rewrite for
- lang_wild_statement_type change. Remove unique_section_p test.
- (walk_wild_file): Remove "section" param.
- (walk_wild): Remove "section" and "file" params.
- (lang_gc_wild): Likewise.
- (wild): Likewise. Modify for lang_wild_statement_type change.
- (wild_sort): Likewise. Add "sec" param.
- (gc_section_callback): Likewise.
- (output_section_callback): Likewise. Do unique_section_p test.
- (map_input_to_output_sections): Modify call to wild.
- (lang_gc_sections_1): Likewise.
- (print_wild_statement): Modify for lang_wild_statement_type
- change.
- (lang_add_wild): Replace filename, filenames_sorted param with
- filespec. Replace section_name, sections_sorted,
- exclude_filename_list with section_list.
- * ldlang.h (lang_add_wild): Here too.
- (lang_wild_statement_type): Replace section_name, sections_sorted,
- and exclude_filename_list with section_list.
- * ldgram.y (current_file): Delete.
- (%union): Add wildcard_list.
- (file_NAME_list): Set type to wildcard_list. Build a linked list
- rather than calling lang_add_wild for each entry.
- (input_section_spec_no_keep): Call lang_add_wild here instead.
- * ld.h (struct wildcard_list): Declare.
- * mri.c (mri_draw_tree): Modify to suit new lang_add_wild.
-
-2001-08-02 Charles Wilson <cwilson@ece.gatech.edu>
-
- * ldmain.c (main): initialize link_info.pei386_auto_import
- * pe-dll.c: new tables for auto-export filtering
- (auto_export): change API, pass abfd for contextual filtering.
- Loop thru tables of excluded symbols instead of comparing
- "by hand".
-
-2001-08-02 Paul Sokolovsky <paul.sokolovsky@technologist.com>
-
- * pe-dll.c: new variable pe_dll_enable_extra_debug. New
- static variable current_sec (static struct sec *). Add
- forward declaration for add_bfd_to_link.
- (process_def_file): Don't export undefined symbols. Do not
- export symbols starting with "_imp__". Call auto_export()
- with new API.
- (pe_walk_relocs_of_symbol): New function.
- (generate_reloc): add optional extra debugging
- (pe_dll_generate_def_file): eliminate extraneous initial blank
- line in output
- (make_one): enlarge symtab to make room for __nm__ symbols
- (DATA auto-import support).
- (make_singleton_name_thunk): New function.
- (make_import_fixup_mark): New function.
- (make_import_fixup_entry): New function.
- (pe_create_import_fixup): New function.
- (add_bfd_to_link): Specify that 'name' argument is a CONST
- char *.
- * pe-dll.h: declare new variable pe_dll_extra_pe_debug;
- declare new functions pe_walk_relocs_of_symbol and
- pe_create_import_fixup.
- * emultempl/pe.em: add new options --enable-auto-import,
- --disable-auto-import, and --enable-extra-pe-debug.
- (make_import_fixup): New function.
- (pe_find_data_imports): New function.
- (pr_sym): New function.
- (gld_${EMULATION_NAME}_after_open): Add optional extra pe
- debugging. Call pe_find_data_imports. Mark .idata as DATA, not
- CODE.
-
-2001-08-02 Charles Wilson <cwilson@ece.gatech.edu>
-
- * ld.texinfo: add additional documentation for
- --export-all-symbols. Document --out-implib,
- --enable-auto-image-base, --disable-auto-image-base,
- --dll-search-prefix, --enable-auto-import, and
- --disable-auto-import.
- * ldint.texinfo: Add detailed documentation on auto-import
- implementation.
-
-2001-07-30 Nick Clifton <nickc@cambridge.redhat.com>
-
- * ld.texinfo (Simple Assignments): Fix computation in SECTIONS
- example.
-
-2001-07-24 Alan Modra <amodra@bigpond.net.au>
-
- * Makefile.am: Update dependencies with "make dep-am".
- * Makefile.in: Regenerate
-
-2001-07-23 Alan Modra <amodra@bigpond.net.au>
-
- * ldcref.c (check_section_sym_xref): New function.
- (check_nocrossrefs): Call it.
- (check_nocrossref): Interate over h->refs here instead of..
- (check_refs): ..here. Pass in the symbol name, section, and bfd
- rather than hash_entry pointers.
- (struct check_refs_info): Keep symbol name rather than hash entry.
- Remove "same".
- (check_reloc_refs): Tweak for above changes in check_refs_info.
- Only report references to section syms when symname is NULL to
- prevent duplicate messages for the same reloc.
-
-2001-07-19 Nick Clifton <nickc@cambridge.redhat.com>
-
- * ldexp.c (exp_print_tree): Use stderr if config.map_file is not
- available. Do not print NULL trees.
- (exp_print_token): Print unknown tokens with values > 126 as
- decimal values not ASCII characters.
-
- * ldlang.c (lang_leave_overlay): If a region is specified assign
- it to all sections inside the overlay unless they have been
- assigned to the own, non-default, memory region.
-
- * README: Add header for consistency with other README files.
-
-2001-07-14 H.J. Lu <hjl@gnu.org>
-
- * emultempl/elf32.em (output_prev_sec_find): Never return
- bfd_abs_section_ptr, bfd_com_section_ptr nor
- bfd_und_section_ptr.
-
-2001-07-14 Nick Clifton <nickc@cambridge.redhat.com>
-
- * Makefile.am (em32relf.c): Change dependency from generic.em to
- elf32.em.
- * Makefile.in: Regenerate.
-
-2001-07-14 matthew green <mrg@eterna.com.au>
-
- * configure.tgt (i386-*-netbsdelf*): New target.
- (i386-*-netbsd*): Set targ_extra_emuls to `elf_i386'
-
-2001-07-13 Jakub Jelinek <jakub@redhat.com>
-
- * emultempl/elf32.em (output_prev_sec_find): New.
- (place_orphan): Use it.
-
-2001-07-11 H.J. Lu <hjl@gnu.org>
-
- * ldmain.c (main): Fix typos in the last change.
-
-2001-07-11 Jakub Jelinek <jakub@redhat.com>
-
- * ldmain.c (main): Disallow -F and -f without -shared.
-
-2001-07-11 Nick Clifton <nickc@cambridge.redhat.com>
-
- * emultempl/pe.em (after_open): Check for the output_bfd not
- having any coff_data structure allocated to it.
-
-2001-07-09 David O'Brien <obrien@FreeBSD.org>
-
- * emultempl/elf32.em: Do not assuming that contents of the buffer
- returned from basename function will remain unchanged accross other
- function calls.
-
-2001-07-03 H.J. Lu <hjl@gnu.org>
-
- * scripttempl/elf.sc (DYNAMIC_PAD): Revert the change made on
- 2001-07-03. It creates dynamic entries even for static binaries.
-
-2001-07-03 Jakub Jelinek <jakub@redhat.com>
-
- * scripttempl/elf.sc (DYNAMIC_PAD): New variable.
- (DYNAMIC): Use it to reserve few dynamic entries for
- post-linking tools.
-
-2001-06-27 Alan Modra <amodra@bigpond.net.au>
-
- * emulparams/hppa64linux.sh: New file.
- * configure.tgt: hppa*64*-*-linux* uses hppa64linux.sh
- * Makefile.am (ALL_64_EMULATIONS): Add ehppa64linux.o
- (ehppa64linux.c): Add rule to make it.
- Run "make dep-am".
- * Makefile.in: Regenerate.
-
-2001-06-21 Hans-Peter Nilsson <hp@axis.com>
-
- * ld.texinfo (Options, -r): Mention restrictions when using
- different object formats.
-
-2001-06-19 Hans-Peter Nilsson <hp@axis.com>
-
- * ldlang.c (lang_check): Emit fatal error if relocatable link
- between different object flavours with relocations in input.
-
-2001-06-19 H.J. Lu <hjl@gnu.org>
-
- * ld.texinfo (-E, --export-dynamic): Mention --version-script.
- (--version-script): Mention the language support.
-
-2001-06-19 H.J. Lu <hjl@gnu.org>
-
- * ldlang.c (lang_check): Revert the change mode on 2001-06-15.
-
-2001-06-18 H.J. Lu <hjl@gnu.org>
-
- * Makefile.am (ld.1): Remove the prefix `$(srcdir)/'.
- (diststuff): Add $(MANS).
- * Makefile.in: Regenerated.
-
- * ld.1: Removed.
-
-2001-06-18 Hans-Peter Nilsson <hp@axis.com>
-
- * emultempl/elf32.em (gld${EMULATION_NAME}_before_allocation):
- Update for API change in bfd_elf${ELFSIZE}_size_dynamic_sections.
- * mpw-elfmips.c (gldelf32ebmip_before_allocation): Ditto.
- * ld.h (args_type): Remove member export_dynamic. All users
- changed to use struct bfd_link_info member.
-
- * Makefile.am (ecriself.c, ed10velf.c, ei386moss.c): Depend on
- $(srcdir)/emultempl/elf32.em, not $(srcdir)/emultempl/generic.em.
- * Makefile.in: Regenerate.
-
-2001-06-18 H.J. Lu <hjl@gnu.org>
-
- * ldlang.c (init_os): Add the newline to the einfo call.
- (lang_check): Likewise.
- (lang_do_version_exports_section): Likewise.
-
-2001-06-15 H.J. Lu <hjl@gnu.org>
-
- * lexsup.c (parse_args); Save optind to report unrecognized
- option.
-
-2001-06-15 Hans-Peter Nilsson <hp@axis.com>
-
- * ldlang.c (lang_check): Emit fatal error if relocatable link
- between different object flavours.
-
- * lexsup.c (parse_args) <case OPTION_EXPORT_DYNAMIC, case 'E'>:
- Set new link_info member export_dynamic.
- * ldmain.c (main): Initialize new link_info member export_dynamic.
-
-2001-06-12 Nick Clifton <nickc@cambridge.redhat.com>
-
- * ldlang.c (walk_wild): Only call walk_wild_file if
- lookup_name returns something.
- (lookup_name): If load_symbols fails, return NULL.
- (load_symbols): Change to a boolean function.
- (open_input_bfds): If load_symbols fails then do not make the
- executable.
-
-2001-06-08 Alan Modra <amodra@bigpond.net.au>
-
- * ldlang.c (record_bfd_errors): Remove.
-
- * emultempl/aix.em: Fix copyright dates.
-
-2001-06-07 Andreas Jaeger <aj@suse.de>
-
- * elf_x86_64.sh (NONPAGED_TEXT_START_ADDR): Increase.
- (TEXT_START_ADDR): Likewise.
-
-2001-06-06 Martin Schwidefsky <schwidefsky@de.ibm.com>
-
- * configure.host: Set HOSTING_CRT0/HOSTING_LIBS correctly for s/390.
-
-2001-06-05 Danny Smith <danny_r_smith_2001@yahoo.co.nz>
-
- * emultempl/pe.em (init): Reduce default stack reserve to 0x200000.
-
-2001-05-31 H.J. Lu <hjl@gnu.org>
-
- * ldlang.c (open_input_bfds): Don't change the bfd error
- handler whilst loading symbols.
-
-2001-05-28 Nick Clifton <nickc@cambridge.redhat.com>
-
- * configure.tgt: Remove i370-mvs architecture, it is not currently
- supported.
-
-2001-05-25 H.J. Lu <hjl@gnu.org>
-
- * emulparams/ppcmacos.sh: Add SYSCALL_MASK and SYMBOL_MODE_MASK
- like emulparams/aixppc.sh.
-
-2001-05-25 H.J. Lu <hjl@gnu.org>
-
- * emultempl/beos.em (gld${EMULATION_NAME}_before_parse): Move
- setting of output_filename after bfd_scan_arch.
- * emultempl/pe.em: Likewise.
-
-2001-05-25 H.J. Lu <hjl@gnu.org>
-
- * emulparams/aixrs6.sh: Add SYSCALL_MASK and SYMBOL_MODE_MASK
- like emulparams/aixppc.sh.
-
- * emultempl/aix.em (sc): Use ${srcdir}/emultempl/ostring.sed
- instead of ${srcdir}/emultempl/stringify.sed.
-
-2001-05-25 Timothy Wall <twall@oculustech.com>
-
- * emulparams/elf64_aix.sh: Change settings to match IBM linker
- output.
-
-2001-05-25 Alan Modra <amodra@one.net.au>
-
- * configure.host: Replace linuxoldld with linux*oldld.
- * configure.tgt: Likewise.
-
-2001-05-24 H.J. Lu <hjl@gnu.org>
-
- * emultempl/stringify.sed: Removed again.
-
-2001-05-24 H.J. Lu <hjl@gnu.org>
-
- * emultempl/aix.em (OUTPUT_ARCH): Defined.
- (gld${EMULATION_NAME}_before_parse): Initialize
- ldfile_output_architecture, ldfile_output_machine and
- ldfile_output_machine_name from ${OUTPUT_ARCH} if possible.
- * emultempl/beos.em: Likewise.
- * emultempl/elf32.em: Likewise.
- * emultempl/linux.em: Likewise.
- * emultempl/mipsecoff.em: Likewise.
- * emultempl/pe.em: Likewise.
- * emultempl/sunos.em: Likewise.
-
-2001-05-24 Tom Rix <trix@redhat.com>
-
- * emultempl/aix.em : (gld${EMULATION_NAME}_read_file)
- udate import file format.
- (change_symbol_mode) New, same
- (is_syscall) New, same
- * emulparams/aixppc.sh : add SYSCALL_MASK and SYMBOL_MODE_MASK
- * emulparams/aixppc64.sh : same
- * emulparams/aixrs6.sh : same
- * emulparams/ppcmacos.sh : same
- * emultempl/aix.em : use strtoull to parse options
- * Makefile.am : add eaixppc64 emulation for xcoff64
- * Makefile.in : same
- * configure.tgt : same
-
- * scripttempl/aix.sc : default text section offset to 0x10000000
- default data section offset to 0x20000000
- add .sv3264 and .sv64 pseudo sections
- loader and debug sections use the currect section offset.
-
- * emultempl/aix.em : Add xcoff64 support
- Add -binitfini support
- (gld${EMULATION_NAME}_before_parse) -binitfini
- (gld${EMULATION_NAME}_parse_args) same
- (gld${EMULATION_NAME}_before_allocation) format change for special
- sections
-
- * emulparams/aixppc64.sh : New file for xcoff64 support
-
-2001-05-23 Alexandre Oliva <aoliva@redhat.com>
-
- * emultempl/elf32.em (ELF_INTERPRETER_SET_DEFAULT): Use this new
- variable to avoid non-portable shell construct.
-
-2001-05-23 Thiemo Seufer <seufer@csv.ica.uni-stuttgart.de>
-
- * ldmain.c (get_emulation): Add -mips5 command line argument.
-
-2001-05-22 Alexandre Oliva <aoliva@redhat.com>
-
- * emulparams/elf_i386_ldso.sh: New, copied from elf_i386.sh.
- (ELF_INTERPRETER_NAME): Define it.
- * emultempl/elf32.em (gld${EMULATION_NAME}_before_allocation): Use
- it.
- * configure.tgt (targ_emul, targ_extra_emuls)
- [i[3456]86-*-solaris2*, i[3456]86-*-solaris*]: Use elf_i386_ldso
- as primary, elf_i386 as extra.
- * Makefile.am (ALL_EMULATIONS): Added eelf_i386_ldso.o.
- (eelf_i386_ldso.c): New rule.
- * Makefile.in: Rebuilt.
-
-2001-05-22 Nick Clifton <nickc@redhat.com>
-
- * lexsup.c (ld_options): Allow -I to be an alias for
- --dynamic-linker. This is for Solaris compatability.
- * ld.texinfo: Document that -I can be used.
- * ld.1: Regenerate.
-
-2001-05-16 Alan Modra <amodra@one.net.au>
-
- * ldlang.c (wild_doit): Use linker_has_input to reliably determine
- whether an input section is the first one assigned to an output
- section.
- Assorted formatting fixes.
-
-2001-05-14 DJ Delorie <dj@delorie.com>
-
- * Makefile.am (ld.dvi): Search bfd/doc for texinfo files.
- * Makefile.in: Ditto.
-
-2001-05-11 Jakub Jelinek <jakub@redhat.com>
-
- * emulparams/elf64_ia64.sh (OTHER_READONLY_SECTIONS): Put
- .gnu.linkonce.ia64unw{,i} sections into corresponding .IA_64.unwind*
- output sections.
- * emulparams/elf64_aix.sh (OTHER_READONLY_SECTIONS): Likewise.
-
-2001-05-11 Jakub Jelinek <jakub@redhat.com>
-
- * ldlang.c (lang_process): Call bfd_merge_sections.
-
-2001-05-07 Thiemo Seufer <seufer@csv.ica.uni-stuttgart.de>
-
- * ldgram.y: Fix typo.
-
-2001-05-03 H.J. Lu <hjl@gnu.org>
-
- * emultempl/elf32.em: Include "libiberty.h".
- (gld${EMULATION_NAME}_vercheck): Call basename () to get the
- basename of the bfd filename.
- (gld${EMULATION_NAME}_stat_needed): Likewise.
- (gld${EMULATION_NAME}_try_needed): Likewise.
- (gld${EMULATION_NAME}_open_dynamic_archive): Likewise.
-
-2001-05-02 H.J. Lu <hjl@gnu.org>
-
- * emultempl/pe.em: Include <ctype.h>.
-
-2001-05-02 Johan Rydberg <jrydberg@opencores.org>
-
- * emulparams/elf32openrisc.sh: New file.
-
- * Makefile.am: Add OpenRISC target.
- * Makefile.in: Regenerated.
-
- * configure.tgt: Add openrisc-*-* mapping.
-
-2001-05-02 Nick Clifton <nickc@redhat.com>
-
- * emultempl/aix.em: Replace buystring with xstrdup.
- * emultempl/beos.em: Replace buystring with xstrdup.
-
-2001-05-02 H.J. Lu <hjl@gnu.org>
-
- * ldfile.c: Include "libiberty.h".
- * ldlex.l: Likewise.
-
- * ldmisc.c (buystring): Removed.
- * ldmisc.h: Likewise.
-
- * ldfile.c: Replace buystring with xstrdup.
- * ldlang.c: Likewise.
- * ldlex.l: Likewise.
- * ldmain.c: Likewise.
- * ldmisc.c: Likewise.
- * lexsup.c: Likewise.
- * mpw-eppcmac.c: Likewise.
-
-2001-04-30 Andreas Jaeger <aj@suse.de>
-
- * emulparms/elf_x86_64.sh (MAXPAGESIZE): Fix value.
-
-2001-04-28 Paul Sokolovsky <Paul.Sokolovsky@technologist.com>
-
- * ldlang.c (load_symbols): Give emulation a chance
- to process unrecognized file before fatal error is
- reported, not after.
-
-2001-04-27 Sean McNeil <sean@mcneil.com>
-
- * configure.tgt: Add arm-vxworks target.
- * scripttempl/armcoff.sc: Support .text or .data as a section name
- prefix.
- Define _etext.
-
-2001-04-13 J.T. Conklin <jtc@redback.com>
-
- * ld.texinfo: Document --fatal-warnings.
- * ld.1: Regenerate.
-
- * ldmisc.c (vfinfo): Set flag to inhibit making executable if
- warnings have been turned into errors.
- * lexsup.c (OPTION_WARN_FATAL): Define.
- (ld_options): Entry for --fatal-warnings.
- (parse_args): Handle OPTION_WARN_FATAL.
- * ld.h (ld_config_type): Add fatal_warnings field.
-
-2001-04-13 Jakub Jelinek <jakub@redhat.com>
-
- * ldmain.c (main): Default to discard_sec_merge.
- * lexsup.c (OPTION_DISCARD_NONE): Define.
- (ld_options): Add --discard-none.
- (parse_args): Handle OPTION_DISCARD_NONE.
- * ldlang.c (wild_doit): SEC_MERGE should be set in the output
- section only if SEC_MERGE and SEC_STRINGS flags and entsize of
- all its input sections match.
-
-2001-04-05 Steven J. Hill <sjhill@cotw.com>
-
- * Makefile.am (ALL_EMULATIONS): Add eelf32ltsmip.o.
- (ALL_64_EMULATIONS): Add eelf64btsmip.o and eelf64ltsmip.o.
- (eelf32ltsmip.c): New target.
- (eelf64btsmip.c): Likewise.
- (eelf64ltsmip.c): Likewise.
- * Makefile.in: Regenerated.
-
- * configure.tgt (mips*el-*-linux-gnu): Uses traditional MIPS
- target.
- (mips*-*-linux-gnu*): Likewise.
-
- * emulparams/elf32ltsmip.sh: New. Traditional little endian
- MIPS taget.
- * emulparams/elf64btsmip.sh: New. Traditional 64bit big endian
- target.
- * emulparams/elf64ltsmip.sh: New. Traditional 64bit little
- endian target.
-
-2001-04-05 Hans-Peter Nilsson <hp@axis.com>
-
- * emulparams/criself.sh (EXECUTABLE_SYMBOLS): Cannot provide
- correct value of __Stext here.
- (TEXT_START_SYMBOLS): Define; always define __Stext, to start of
- .startup section.
-
- * emulparams/crislinux.sh: Remove FIXME.
-
-2001-04-02 Alan Modra <alan@linuxcare.com.au>
-
- * emulparams/hppalinux.sh (MAXPAGESIZE): Set to 64k.
- (TEXT_START_ADDR, TARGET_PAGE_SIZE): Likewise.
-
-2001-03-27 Hans-Peter Nilsson <hp@axis.com>
-
- * configure.tgt (cris-*-*): Change default emulation to criself.
- (cris-*-*aout*): New rule.
-
-2001-03-27 Matthew Wilcox <willy@ldl.fc.hp.com>
-
- * emulparams/hppalinux.sh (MAXPAGESIZE): Set to 0x4000.
- (TEXT_START_ADDR, TARGET_PAGE_SIZE): Ditto.
-
-2001-03-26 Andreas Jaeger <aj@suse.de>
-
- * ld.texinfo (Overview): Fix syntax in texi code.
-
-2001-03-25 Stephane Carrez <Stephane.Carrez@worldnet.fr>
-
- * ld.texinfo: Put @c man indications to generate the ld man page.
- When generating man, define all the variables. Define SEEALSO
- and SYNOPSIS. Re-organize some lines to avoid the cross references.
- * Makefile.am (MANCONF, TEXI2POD, POD2MAN): New variables.
- (ld.1): Generate from ld.texinfo.
- * Makefile.in: Regenerate.
-
-2001-03-23 Mark Elbrecht <snowball3@bigfoot.com>
-
- * scripttempl/i386go32.sc: Support the GCC flags '-ffunction-sections'
- and '-fdata-sections'. Set the VMA of STABS sections to zero.
-
-2001-03-17 Ulrich Drepper <drepper@redhat.com>
-
- * emultmpl/elf32.em (gld${EMULATION_NAME}_search_needed): If NAME
- is an absolute path look only for this file and not along the path.
-
-2001-03-17 Ulrich Drepper <drepper@redhat.com>
-
- * emultempl/elf32.em (OPTION_GROUP): New macro.
- Add new option Bgroup to longopts.
- (gld*_parse_args): Handle GROUP_OPTION and recognize -z defs.
- (gld*_list_options): Add -Bgroup and -z defs.
- * ld.1: Document -Bgroup and -z defs.
- * ld.texinfo: Likewise.
-
-2001-03-07 Michael Meissner <meissner@redhat.com>
-
- * scripttempl/elfd10v.sc (.rodata,.rodata1,.data1,.sdata): Deal
- with sections created by -fdata-sections.
- (.dynbss,.bss): Ditto.
-
-2001-03-05 Alan Modra <alan@linuxcare.com.au>
-
- * emultempl/m68kelf.em (m68k_elf_after_allocation): Call
- after_allocation_default, not gld..._before_allocation.
-
-2001-02-27 Alan Modra <alan@linuxcare.com.au>
-
- * configure.in (BFD_VERSION): New.
- (AM_INIT_AUTOMAKE): Use $BFD_VERSION.
- * configure: Regenerate.
- * Makefile.am: Run "make dep-am"
- * Makefile.in: Regenerate.
-
-2001-02-26 Timothy Wall <twall@cygnus.com>
-
- * emulparams/elf64_aix.sh: Add additional read-only sections;
- uncomment lines which are now required.
-
-2001-02-26 H.J. Lu <hjl@gnu.org>
-
- * ldlang.c (open_input_bfds): Set the bfd error handler so
- that problems can be caught whilst loading symbols.
- (record_bfd_errors): New function: Report BFD errors and mark
- the executable output as being invalid.
-
-2001-02-22 Timothy Wall <twall@cygnus.com>
-
- * configure.host: Add configuration for ia64-*-aix*.
- * Makefile.am (ALL_64_EMULATIONS): Add emulation for ia64-*-aix*.
- Add dependencies for eelf64_aix.c.
- * Makefile.in: Regenerate.
- * configure.tgt: Add ia64-*-aix* mapping.
- * emulparams/elf64_aix.sh: Add settings for elf64 on aix5.
-
-2001-02-20 H.J. Lu <hjl@gnu.org>
-
- * ldfile.c (ldfile_open_file): Set entry->search_dirs_flag to
- false if we found the file.
-
-2001-02-18 David O'Brien <obrien@FreeBSD.org>
-
- * configure.tgt: Add FreeBSD/Alpha, FreeBSD/x86-64, FreeBSD/ia64,
- FreeBSD/PowerPC, FreeBSD/arm, and FreeBSD/sparc64 entries.
-
-2001-02-18 lars brinkhoff <lars@nocrew.org>
-
- * Makefile.am: Add PDP-11 target.
- * configure.tgt: Likewise.
- * emulparams/pdp11.sh: New file.
-
-2001-02-17 David O'Brien <obrien@FreeBSD.org>
-
- * configure.host: Add a generic FreeBSD configuration entry such that
- all [modern] FreeBSD systems on all platforms will look the same.
-
-2001-02-14 H.J. Lu <hjl@gnu.org>
-
- * configure.tgt: Remove mention of earmelf_linux26.
-
-2001-02-13 Richard Henderson <rth@redhat.com>
-
- * emulparams/elf64_ia64.sh (OTHER_GOT_SYMBOLS): Remove.
-
-2001-02-13 H.J. Lu <hjl@gnu.org>
-
- * ldexp.h (node_type): Add etree_provided.
- * ldexp.c (exp_fold_tree): Handle etree_provided. Set the node
- type to etree_provided if defined by PROVIDE. Allow updating
- for etree_provided.
- (exp_print_tree): Handle etree_provided.
- * mpw-elfmips.c (gldelf32ebmip_find_exp_assignment): Handle
- etree_provided.
-
-2001-02-09 David Mosberger <davidm@hpl.hp.com>
-
- * emulparams/elf64_ia64.sh (OTHER_READONLY_SECTIONS): Add
- .IA_64.unwind.* pattern to unwind table section and
- .IA_64.unwind_info* pattern to unwind info section.
-
-2001-02-09 Martin Schwidefsky <schwidefsky@de.ibm.com>
-
- * Makefile.am: Add linux target for S/390.
- * Makefile.in: Likewise.
- * configure.host: Likewise.
- * configure.tgt: Likewise.
- * emulparams/elf64_s390.sh: New file.
- * emulparams/elf_s390.sh: New file.
-
-2001-02-09 Jakub Jelinek <jakub@redhat.com>
-
- * configure.tgt (sparc64-*-linux-gnu*): Add elf32_sparc into
- targ_extra_libpath.
- (sparc-*-linux-gnu*): Add elf64_sparc into targ_extra_libpath.
-
-2001-02-06 Philip Blundell <philb@gnu.org>
-
- * Makefile.am: Remove mention of earmelf_linux26.
- * Makefile.in: Regenerate.
-
-2001-02-04 Philip Blundell <philb@gnu.org>
-
- * emulparams/armelf_linux.sh (TEXT_START_ADDR): Set to 0x8000.
- * emulparams/armelf_linux26.sh: Delete.
- * configure.tgt: Remove mention of armelf_linux26 emulation.
-
-2001-02-01 Nick Clifton <nickc@redhat.com>
-
- * ld.1: Replace occurances of -oformat with --oformat.
-
-2001-01-25 Jim Driftmyer <jdrift@stny.rr.com>
-
- * ldlang.c (lang_leave_overlay): Don't set lma_region when
- load_base is specified.
-
-2001-01-24 Hans-Peter Nilsson <hp@axis.com>
-
- * emultempl/elf32.em: Correct spelling in comments and listed
- options.
-
-2001-01-23 Alan Modra <alan@linuxcare.com.au>
-
- * ldlang.c (lang_leave_overlay): Only set lma_region from the
- default for the first section of a group of overlay sections.
-
-2001-01-22 Alan Modra <alan@linuxcare.com.au>
-
- * Makefile.am (GENSCRIPTS): Pass exec_prefix.
- * Makefile.in: Regenerate.
- * genscripts.sh: Use exec_prefix parameter to specify tool lib.
- Check for null tool_dir.
-
-2001-01-16 Jim Wilson <wilson@redhat.com>
-
- * emulparams/elf64_ia64.sh (OTHER_READONLY_SECTIONS): Add IA_64.unwind
- and IA_64.unwind.info.
-
-2001-01-16 H.J. Lu <hjl@gnu.org>
-
- * ldlang.c (lang_check): Merge the private data only if the
- input file has contents.
-
-2001-01-14 Alan Modra <alan@linuxcare.com.au>
-
- * emulparams/hppalinux.sh (OUTPUT_FORMAT): Set to elf32-hppa-linux.
-
- * emultempl/hppaelf.em (hppaelf_after_parse): New function,
- enabling search for libmilli. On a relocatable link, make .text
- sections unique.
- (LDEMUL_AFTER_PARSE): Define.
- (hppaelf_finish): Correct spelling of relocatable in comments.
-
- * emultempl/elf32.em (gld${EMULATION_NAME}_place_orphan): Don't
- rummage through the script for sections on the unique list.
- Correct length of strncmp for ".note".
- (gld${EMULATION_NAME}_check_needed): Rearrange function.
-
- * ldlang.c (unique_section_list): New var.
- (unique_section_p): New function.
- (walk_wild_section): Don't match sections on unique_section_list.
- (lang_add_unique): New function.
- Correct spelling of relocatable in comments.
-
- * ldlang.h (struct unique_sections): Declare.
- (unique_section_list): Declare.
- (unique_section_p): Declare.
- (lang_add_unique): Declare.
-
- * lexsup.c (ld_options): Allow --unique to take an optional arg.
- (parse_args [OPTION_UNIQUE]): Call lang_add_unique.
-
- * ld.texinfo (--unique): Update.
-
-2001-01-13 Nick Clifton <nickc@redhat.com>
-
- * lexsup.c (parse_args): Remove spurious white space.
-
-2001-01-12 Nick Clifton <nickc@redhat.com>
-
- * lexsup.c (parse_args): Update copyright date.
-
-2001-01-12 Philip Blundell <pb@futuretv.com>
-
- * configure.host: Set HOSTING_LIBS appropriately for ix86-cygwin.
-
-2001-01-10 Kazu Hirata <kazu@hxi.com>
-
- * scripttempl/h8300.sc: Fix formatting. Fix a comment typo.
- * scripttempl/h8300h.sc: Fix formatting.
- * scripttempl/h8300s.sc: Likewise.
- * scripttempl/h8500.sc: Likewise.
- * scripttempl/h8500b.sc: Likewise.
- * scripttempl/h8500c.sc: Likewise.
- * scripttempl/h8500m.sc: Likewise.
- * scripttempl/h8500s.sc: Likewise.
-
-2000-01-07 David O'Brien <obrien@BSDi.com>
-
- * emultempl/elf32.em: Only perform Linux ld hints processing when
- targeting Linux.
-
-2001-01-07 Philip Blundell <philb@gnu.org>
-
- * ld.texinfo (Bug Reporting): Update email address for reports.
-
-2000-12-31 Nick Clifton <nickc@redhat.com>
-
- * lexsup.c (parse_args): Set opterr to 0 and detect unparsed long
- options by checking for a return value of '?' not -1.
-
-2000-12-28 Nick Clifton <nickc@redhat.com>
-
- * lexsup.c (struct ld_option): Add new enum value:
- EXACTLY_TWO_DASHES.
- (ld_options[]): Change -omagic, -output and -oformat options
- to be EXACTLY_TWO_DASHES.
- (OUTPUT_COUNT): Use ARRAY_SIZE.
- (parse_args): Change parameter 'argc' to unsigned.
- Place EXACTLY_TWO_DASHES options into new really_longopts
- array.
- If getopt_long_only fails, try calling getopt_long using the
- really_longopts array.
- (help): Print a double dash for both EXACTLY_TWO_DASHES and
- TWO_DASHES options.
-
- * ldlex.h: Fix prototype of parse_args.
-
- * ld.texinfo: Document that long options starting with 'o'
- must be preceeded by two dashes. Change example of a single
- dashed long option from -oformat to -trace-symbol.
-
-2000-12-26 Danny Smith <danny_r_smith_2001@yahoo.co.nz>
-
- * emultempl/pe.em (OPTION_NO_DEFAULT_EXCLUDES): Define.
- (longopts[]): New --no-default-excludes option.
- (gld_${EMULATION_NAME}_list_options): Document.
- (gld_${EMULATION_NAME}_parse_args): Handle.
-
-2000-12-13 Michael Sokolov <msokolov@ivan.Harhan.ORG>
-
- * ldlang.c (new_stat): Revert the last beautification with "innocent"
- whitespace, it breaks the K&R C preprocessor.
-
-2000-12-11 DJ Delorie <dj@redhat.com>
-
- * ld.texinfo: Add notes about --whole-archive and gcc.
-
-2000-11-18 Fred Fish <fnf@be.com>
-
- * lexsup.c (OPTION_ALLOW_SHLIB_UNDEFINED): Define.
- (ld_options): Entry for --allow-shlib-undefined.
- (parse_args): Handle OPTION_ALLOW_SHLIB_UNDEFINED.
- * ldmain.c (main): Initialize link_info.allow_shlib_undefined
- to false.
- * ld.texinfo: Document new command line switch.
-
-2000-12-12 Geoffrey Keating <geoffk@redhat.com>
-
- * emulparams/elf32ppc.sh (OTHER_READWRITE_SECTIONS):
- .fixup is actually read/write.
- * emulparams/elf32lppc.sh (OTHER_READWRITE_SECTIONS): Likewise.
- * emulparams/elf32ppcsim.sh (OTHER_READWRITE_SECTIONS): Likewise.
- * emulparams/elf32lppcsim.sh (OTHER_READWRITE_SECTIONS): Likewise.
-
-2000-12-11 Jan Hubicka <jh@suse.cz>
-
- * NEWS: Add note about x86_64 architecture.
-
-2000-12-06 Mark Elbrecht <snowball3@bigfoot.com>
-
- * scripttempl/i386go32.sc: Use PROVIDE with _etext, _edata, _end.
- Set DWARF2 sections to a VMA of zero.
-
-2000-12-01 Joel Sherrill <joel@OARcorp.com>
-
- * configure.tgt (arm-*-rtems*, a29k-*rtems*, h8300-*-rtems*):
- New targets.
- (sparc*-*-rtemself*, sparc*-*-rtemsaout*): New targets.
- (sparc*-*-rtems*): Switched from a.out to ELF.
-
-2000-11-30 Jan Hubicka <jh@suse.cz>
-
- * Makefile.am (ALL_EMULATIONS): Add eelf_x86_64.o
- (eelf_x86_64.c): New.
- * Makefile.in: Regenerate.
- * configure.tgt: Add support for x86_64-*-linux-gnu*.
- * emulparams/elf_x86_64.sh: New.
-
-2000-11-30 Hans-Peter Nilsson <hp@axis.com>
-
- * emulparams/crislinux.sh (ENTRY): Change back to _start.
- (TEXT_START_SYMBOLS): Remove conditional setting of __start.
-
- * scripttempl/crisaout.sc: Change all RELOCATING not related to
- merging non-a.out sections into CONSTRUCTING.
-
-2000-11-28 Nick Clifton <nickc@redhat.com>
-
- * ld.1 (COPYING): Mention that the GNU Free Documentation
- License is present in the sources, but not the output, and
- also available from the GNU website.
- (GNU Free Documentation License): Comment out this section.
-
-2000-11-28 David O'Brien <obrien@dragon.nuxi.com>
-
- * emulparams/elf64alpha.sh (ENTRY): Remove leading underscore as ELF
- does not use them.
-
-2000-11-25 David O'Brien <obrien@FreeBSD.org>
-
- * ld.1: Remove old date so it does not give the impression the manpage
- is way out of date.
-
-2000-11-24 Nick Clifton <nickc@redhat.com>
-
- * configure.tgt (xscale-coff): Add target.
- (xscale-elf): Add target.
-
-2000-11-24 Fred Fish <fnf@be.com>
-
- * ldmain.c (main): Remove redundant init of config.make_executable
- to true.
-
-2000-11-15 Richard Henderson <rth@redhat.com>
-
- * emulparams/elf64alpha.sh (MAXPAGESIZE): Typo -- 64k, not 1M.
-
-2000-11-14 Kazu Hirata <kazu@hxi.com>
-
- * scripttempl/h8300.sc: Fix formatting.
- * scripttempl/h8300h.sc: Likewise.
- * scripttempl/h8300s.sc: Likewise.
-
-2000-11-14 Denis Chertykov <denisc@overta.ru>
-
- * scripttempl/elf32avr.sc: Fix bug in .eeprom segment.
-
-2000-11-09 Philip Blundell <pb@futuretv.com>
-
- * emultempl/pe.em: Define ___start_SECNAME and ___stop_SECNAME
- around orphan sections whose names can be represented in C.
-
-2000-11-07 Jim Wilson <wilson@redhat.com>
-
- * emultempl/elf32.em (gld${EMULATION_NAME}_place_orphan): New local
- hold_sdata. If SEC_SMALL_DATA set, set place to hold_sdata.
-
-2000-11-06 Nick Clifton <nickc@redhat.com>
-
- * ld.texinfo: Add GNU Free Documentation License.
- * ldint.texinfo: Add GNU Free Documentation License.
- * ld.1: Add GNU Free Documentation License.
-
-2000-11-05 Alan Modra <alan@linuxcare.com.au>
-
- * ldlex.l (yy_create_string_buffer): Init yy_is_our_buffer,
- yy_is_interactive, yy_at_bol, and yy_fill_buffer.
-
- * Makefile.am (DISTCLEANFILES): Add stringify.sed.
- Move 2000-11-02 Makefile.in changes to this file.
- * Makefile.in: Regenerate.
-
-2000-11-03 Nick Clifton <nickc@redhat.com>
-
- * scripttempl/h8300.sc: Use ${CONSTRUCTING...} to enclose
- constructors and destructors.
- * scripttempl/h8300h.sc: Ditto.
- * scripttempl/h8300s.sc: Ditto.
- * scripttempl/h8500.sc: Ditto.
- * scripttempl/h8500b.sc: Ditto.
- * scripttempl/h8500c.sc: Ditto.
- * scripttempl/h8500m.sc: Ditto.
- * scripttempl/h8500s.sc: Ditto.
- * scripttempl/v850.sc: Ditto.
- * scripttempl/w65.sc: Ditto.
- * scripttempl/z8000.sc: Ditto.
-
-2000-11-02 Per Lundberg <plundis@chaosdev.org>
-
- * Makefile.in (e_i386_chaos.c): New rule.
- (ALL_EMULATIONS): Added e_i386_chaos.o.
- * emulparams/elf_i386_chaos.sh: New file.
- * configure.tgt: Recognise i[3456]86-chaosdev-storm-chaos.
-
-2000-10-20 Jakub Jelinek <jakub@redhat.com>
-
- * emulparams/elf64_sparc.sh (TEXT_START_ADDR,
- NONPAGED_TEXT_START_ADDR): Set to 4GB for Solaris targets.
- Fix sed invocation, so that it coped with '/' in Solaris 64bit
- library path suffix.
- Based on patch by Andrew Macleod <amacleod@cygnus.com>.
-
-2000-10-18 Hans-Peter Nilsson <hp@axis.com>
-
- * scripttempl/crisaout.sc (.text, .data): Pad, with ALIGN (32),
- for consecutive sections.
-
-2000-10-17 Chandrakala Chavva <cchavva@redhat.com>
-
- * lexsup.c: New option OPTION_TARGET_HELP. Prints all target specific
- options.
- * ld.texinfo: Added notes about this new option.
-
-2000-10-16 Nick Clifton <nickc@redhat.com>
-
- * emultempl/pe.em (_after_open): Add tests of return values from
- bfd functions. Emit appropriate error messages if necessary.
-
-2000-10-13 Nick Clifton <nickc@redhat.com>
-
- * emultempl/pe.em (_after_open): Delete 'is2' and 'nsyms'
- local variables - they are not used, but leave in the call to
- bfd_canonicalize_symtab.
- (_open_dynamic_archive): Add #ifdef DLL_SUPPORT around use of
- pe_dll_search_prefix.
-
-2000-10-12 Charles Wilson <cwilson@ece.gatech.edu>
-
- * emultempl/pe.em (pe_dll_search_prefix): New variable,
- (longopts): New --dll-search-prefix option.
- (gld_${EMULATION_NAME}_list_options): Document.
- (gld_${EMULATION_NAME}_parse_args): Handle.
- (gld_${EMULATION_NAME}_open_dynamic_archive): When linking
- dynamically, search for a dll named '<prefix><basename>.dll'
- in preference to 'lib<basename>.dll' if --dll-search-prefix
- is specified.
-
-2000-10-12 Alan Modra <alan@linuxcare.com.au>
-
- * ldlang.c (section_already_linked): Set kept_section instead of
- sec->comdat->sec.
-
-2000-10-10 Kazu Hirata <kazu@hxi.com>
-
- * deffile.h: Fix formatting.
- * lexsup.c: Likewise.
- * mri.c: Likewise.
-
-2000-10-09 Paul Sokolovsky <Paul.Sokolovsky@technologist.com>
-
- * pe-dll.c (make_one): Do not generate code thunk for DATA
- exports.
- (process_def_file): deduce DATA flag for auto-export sumbols.
-
-2000-10-09 Kazu Hirata <kazu@hxi.com>
-
- * ld.h: Fix formatting.
- * ldcref.c: Likewise.
- * ldctor.h: Likewise.
- * ldemul.c: Likewise.
- * ldemul.h: Likewise.
- * ldexp.c: Likewise.
- * ldexp.h: Likewise.
- * ldfile.c: Likewise.
- * ldfile.h: Likewise.
- * ldlang.c: Likewise.
- * ldlang.h: Likewise.
- * ldmain.c: Likewise.
- * pe-dll.c: Likewise.
-
- * pe-dll.c: Revert some formatting fixes.
-
-2000-10-08 Kazu Hirata <kazu@hxi.com>
-
- * pe-dll.c: Fix formatting.
-
-2000-10-05 Kazu Hirata <kazu@hxi.com>
-
- * ldlang.c: Fix formatting.
-
-2000-10-03 DJ Delorie <dj@redhat.com>
-
- * pe-dll.c (fill_edata): initialize entire block
- (make_one): fill in correct section.
-
-2000-10-03 Kazu Hirata <kazu@hxi.com>
-
- * ldexp.c: Fix formatting.
-
-2000-10-02 DJ Delorie <dj@redhat.com>
-
- * emultempl/pe.em (gld_*_after_open): detect case where there two
- import libraries for same dll; rename one to ensure proper link
- order.
-
- * pe-dll.c (process_def_file): compare ordinals to -1, not 0; fix
- typo
- (generate_edata): fix typo
-
-2000-09-29 Hans-Peter Nilsson <hp@axis.com>
-
- * scripttempl/crisaout.sc (ENTRY): Now __start.
- (.text): Add default setting for __start.
- Remove CONSTRUCTORS handling.
- (/DISCARD/): Add .gnu.warning.*.
- * emulparams/crislinux.sh (ENTRY): Now __start.
- (TEXT_START_SYMBOLS): New; provide __Stext and __start default.
- * emulparams/criself.sh (OUTPUT_FORMAT): Now elf32-us-cris.
- (ENTRY): Now __start.
- (INITIAL_READONLY_SECTIONS): Add KEEP for .startup.
- (EXECUTABLE_SYMBOLS): Add default setting for __start.
-
-2000-09-29 Kazu Hirata <kazu@hxi.com>
-
- * deffile.h: Fix formatting.
- * ld.h: Likewise.
- * ldcref.c: Likewise.
- * ldctor.c: Likewise.
- * ldctor.h: Likewise.
- * ldemul.c: Likewise.
- * ldemul.h: Likewise.
- * ldexp.c: Likewise.
- * ldexp.h: Likewise.
- * ldfile.c: Likewise.
- * ldfile.h: Likewise.
- * ldlang.c: Likewise.
- * ldlang.h: Likewise.
- * lexsup.c: Likewise.
- * mri.c: Likewise.
- * pe-dll.c: Likewise.
-
-2000-09-28 Paul Sokolovsky <Paul.Sokolovsky@technologist.com>
-
- * pe-dll.c (process_def_file): Uninitialized data wasn't
- exported with --export-all-symbols switch.
-
-2000-09-28 DJ Delorie <dj@redhat.com>
-
- * pe-dll.c (fill_edata): rearrange the data so that ordinals and
- noname work properly.
-
-2000-09-28 Alan Modra <alan@linuxcare.com.au>
-
- * ld.texinfo (HPPA ELF32): New section.
-
- * emultempl/hppaelf.em (group_size): New.
- (hppaelf_finish): Pass group_size to elf32_hppa_size_stubs.
- (PARSE_AND_LIST_PROLOGUE): Add OPTION_STUBGROUP_SIZE.
- (PARSE_AND_LIST_LONGOPTS): Add --stub-group-size. Duplicate
- options to prevent abbreviations matching.
- (PARSE_AND_LIST_OPTIONS): Describe the above. Reformat.
- (PARSE_AND_LIST_ARGS_CASES): Handle it.
-
-2000-09-21 Michael Sokolov <msokolov@ivan.Harhan.ORG>
-
- * emultempl/m68kelf.em: Conditionalise the embedded relocs feature
- on the m68*-*-elf target. Make it support COFF input objects.
-
-2000-09-21 Kazu Hirata <kazu@hxi.com>
-
- * ldmain.c: Fix formatting.
- * ldmisc.c: Likewise.
- * ldver.c: Likewise.
- * ldwrite.c: Likewise.
-
-2000-09-21 Alan Modra <alan@linuxcare.com.au>
-
- * ldwrite.c (clone_section): Silence gcc warnings.
-
-2000-09-20 Alan Modra <alan@linuxcare.com.au>
-
- * emultempl/elf32.em (gld${EMULATION_NAME}_place_orphan): Handle
- out of memory failure.
-
- * ldwrite.c (ldwrite): Remove unnecessary einfo arg.
- (clone_section): Handle out of memory failures. Rename var to
- avoid c++ reserved word.
-
-2000-09-18 Alan Modra <alan@linuxcare.com.au>
-
- * emultempl/hppaelf.em (hppaelf_add_stub_section): Rename
- stub_name param to stub_sec_name.
- (hppaelf_finish): Modify call to elf32_hppa_size_stubs.
-
-2000-09-10 Michael Sokolov <msokolov@ivan.Harhan.ORG>
-
- * emultempl/m68kelf.em: New file.
- * emulparams/m68kelf.sh (EXTRA_EM_FILE): Use it.
- * Makefile.am (em68kelf.c): Add dependency on m68kelf.em.
- * Makefile.in: Regenerate.
-
-2000-09-15 Alan Modra <alan@linuxcare.com.au>
-
- * emulparams/hppalinux.sh (DATA_START_SYMBOLS): Provide $global$
- only as needed.
-
-2000-09-13 Nick Clifton <nickc@redhat.com>
-
- * ldmain.c (multiple_definition): Disable relaxation if
- multiple symbol definitions are encountered - otherwise the
- linker could abort with an assertion failure.
-
-2000-09-10 Nick Clifton <nickc@redhat.com>
-
- * mri.c: Fix formatting.
-
-2000-09-07 H.J. Lu <hjl@gnu.org>
-
- * configure.in (AC_ISC_POSIX): Put after AC_CANONICAL_SYSTEM.
- * configure: Rebuild.
-
-2000-09-07 H.J. Lu <hjl@gnu.org>
-
- * Makefile.am (lexsup.o): Also depend on $(INCDIR)/demangle.h.
- * Makefile.in: Rebuild.
-
-2000-09-07 Alan Modra <alan@linuxcare.com.au>
-
- * emultempl/elf32.em (gld${EMULATION_NAME}_place_orphan): Fix
- broken list handling. Create __start_SECNAME and __stop_SECNAME
- when no place-holder. Add some comments. Test both SEC_CODE and
- SEC_READONLY for hold_text to prevent .rodata orphan poisoning.
- Handle case where no output section statement created.
-
-2000-09-07 Niibe Yutaka <gniibe@m17n.org>, Kaz Kojima <kkojima@rr.iij4u.or.jp>, Alexandre Oliva <aoliva@redhat.com>
-
- * configure.tgt (sh-*-linux*): Added.
- * Makefile.am: Added eshelf_linux and eshlelf_linux.
- * Makefile.in: Rebuilt.
- * emulparams/shelf_linux.sh: New file.
- * emulparams/shlelf_linux.sh: New file.
-
-2000-09-06 Alan Modra <alan@linuxcare.com.au>
-
- * emultempl/elf32.em (gld${EMULATION_NAME}_place_orphan): Don't
- try shuffling sections when the orphan happens to be the place
- holder. Keep count of unique section names generated so we speed
- the search for a new name.
-
-2000-09-06 Alexandre Oliva <aoliva@redhat.com>
-
- * configure: Rebuilt with new libtool.m4.
-
-2000-09-05 Nick Clifton <nickc@redhat.com>
-
- * Makefile.in: Regenerate.
- * aclocal.m4: Regenerate.
- * configure: Regenerate.
- * config.in: Regenerate.
- * po/ld.pot: Regenerate.
-
- * ldint.texinfo: Remove CVS revision marker - it foils local
- comparisons.
-
- * emultempl/ticoff.em: Remove extraneous comma.
-
-2000-09-05 Alan Modra <alan@linuxcare.com.au>
-
- * emultempl/hppaelf.em (hppaelf_add_stub_section): Add SEC_RELOC
- to stub section flags.
- (hppa_for_each_input_file_wrapper): New.
- (hppa_lang_for_each_input_file): New.
- (lang_for_each_input_file): Define to call above.
- (multi_subspace): New.
- (hppaelf_finish): Pass multi_subspace to elf32_hppa_size_stubs.
- (PARSE_AND_LIST_PROLOGUE): Define.
- (PARSE_AND_LIST_LONGOPTS): Define.
- (PARSE_AND_LIST_OPTIONS): Define.
- (PARSE_AND_LIST_ARGS_CASES): Define.
- (hppaelf_finish): Call elf32_hppa_set_gp.
- (hppaelf_set_output_arch): Remove.
- (LDEMUL_SET_OUTPUT_ARCH): Remove.
-
- * emulparams/hppalinux.sh (ELFSIZE): Define.
- (MACHINE): Define.
- (OTHER_READONLY_SECTIONS): Define.
- (DATA_PLT): Define.
- (GENERATE_SHLIB_SCRIPT): Define.
-
- * ldlang.c: Add missing prototypes, and tidy others. Change CONST
- to const throughout. Change `void *' to `PTR' throughout.
- (lang_memory_default): Function is local to file, add `static'.
-
- * Makefile.am (ehppaelf.c): Depend on emultempl/elf32.em.
- (ehppalinux.c): Likewise.
- (earmelf.c): Likewise.
- (earmelf_linux.c): Likewise.
- (earmelf_linux26.c): Likewise.
- * Makefile.in: Regenerate.
-
- * ld.h (ld_config_type): Add unique_orphan_sections.
- * lexsup.c (OPTION_UNIQUE): Define.
- (ld_options): Add "--unique".
- (parse_args): Handle it.
- * emultempl/elf32.em (gld${EMULATION_NAME}_place_orphan): Don't
- search for an existing output section if unique_orphan_sections is
- set. Make use of bfd_get_unique_section_name rather than
- duplicating code here.
- * ld.texinfo: Describe --unique.
-
- * lexsup.c (ld_options): Make split-by-reloc arg optional. Add
- optional arg to split-by-file.
- (parse_args): Handle them.
- * ld.texinfo: Update description of these options.
- * ldwrite.c (clone_section): Pass in the section name. Replace
- local code with bfd_get_unique_section_name.
- (split_sections): Tidy code and comments. Use a list traversal
- more appropriate to the list construction. Handle cooked section
- sizes. Split when split_by_reloc reached rather than exceeded.
- Track section size and split when split_by_file reached. Fix
- link_order_tail (even though it's not used).
- (ldwrite): Modify condition for calling split_sections to suit
- changed split_by_reloc and split_by_file.
- * ldmain.c (main): Init config.split_by_reloc and
- config.split_by_file to -1.
- * ld.h (ld_config_type): Change split_by_reloc to unsigned.
- Change split_by_file to bfd_size_type.
-
-2000-09-02 Nick Clifton <nickc@redhat.com>
-
- * configure.in: Increase version number to 2.10.91.
- * NEWS: Mention new ability to support removal of duplicate DWARF2
- debug information.
- * configure: Regenerate.
- * aclocal.m4: Regenerate.
- * config.in: Regenerate.
-
-2000-09-02 Daniel Berlin <dberlin@redhat.com>
-
- * scripttempl/elf.sc: Add .gnu.linkonce.wi.* to .debug_info
- sections.
- * scripttempl/elf32avr.sc: Ditto.
- * scripttempl/elfd10v.sc: Ditto.
- * scripttempl/elfd30v.sc: Ditto.
- * scripttempl/elfi370.sc: Ditto.
- * scripttempl/elfm68hc11.sc: Ditto.
- * scripttempl/elfm68hc12.sc: Ditto.
- * scripttempl/elfi386beos.sc: Ditto.
- * scripttempl/v850.sc: Ditto.
-
-2000-08-31 Alexandre Oliva <aoliva@redhat.com>
-
- * acinclude.m4: Include libtool and gettext macros from the
- top level.
- * aclocal.m4, configure: Rebuilt.
-
-2000-08-25 Nick Clifton <nickc@redhat.com>
-
- * ldlang.c (open_output): When choosing the target for a
- particular endianness, do nothing if the target is not
- supported.
-
-2000-08-25 H.J. Lu <hjl@gnu.org>
-
- * emultempl/elf32.em (gld${EMULATION_NAME}_after_open): Don't
- check -rpath nor LD_RUN_PATH for cross link.
- * ld.texinfo: Document the change.
-
-2000-08-24 Hans-Peter Nilsson <hp@axis.com>
-
- * NEWS: Mention support for CRIS.
-
-2000-08-23 H.J. Lu <hjl@gnu.org>
-
- * emultempl/elf32.em (gld${EMULATION_NAME}_after_open): Get
- the current runpath list from bfd_elf_get_runpath_list ()
- before search.
-
-2000-08-22 H.J. Lu <hjl@gnu.org>
-
- * emultempl/elf32.em (gld${EMULATION_NAME}_after_open): Search
- the DT_RPATH/DT_RUNPATH entries for DT_NEEDED after
- LD_LIBRARY_PATH for native linker. Display the needed DSO if
- trace_file_tries is non-zero.
- (gld${EMULATION_NAME}_try_needed): Report the needed DSO found
- if trace_file_tries is non-zero.
-
- * ld.texinfo: Document the usage of DT_RPATH/DT_RUNPATH.
- * NEWS: Mention it.
-
-2000-08-14 Jason Eckhardt <jle@cygnus.com>
-
- * NEWS: Mention i860 support.
-
-2000-08-14 Andreas Schwab <schwab@suse.de>
-
- * scripttempl/elf.sc: Fix last change to use correct comment
- syntax.
-
-2000-08-10 Geoff Keating <geoffk@cygnus.com>
-
- * scripttempl/elf.sc: Add a comment giving the correspondence
- between sections, per-datum sections, and linkonce sections. Make
- the comment true even for .bss, .sdata, .sdata2, .sbss, and
- .sbss2.
-
-2000-08-10 Jason Eckhardt <jle@cygnus.com>
-
- * emulparams/elf32_i860.sh: New file.
- * configure.tgt: Recognize new target i860-stardent-{sysv4*|elf*}.
- * Makefile.am (ALL_EMULATIONS): Add eelf32_i860.o.
- (eelf32_i860.c): New rule.
- * Makefile.in: Regenerate.
-
-2000-08-10 Nick Clifton <nickc@cygnus.com>
-
- * emulparams/mipspe.sh (ENTRY): Add definition.
-
-2000-08-08 Peter Jeremy <peter.jeremy@alcatel.com.au>
-
- * emultempl/elf32.em (_after_close): Refer to -rpath not --rpath
- in error message.
-
-2000-08-08 Stephane Carrez <Stephane.Carrez@worldnet.fr>
-
- * scripttempl/elfm68hc11.sc: Define __bss_size symbol to indicate
- the final size of .bss section.
- * scripttempl/elfm68hc12.sc: Likewise.
-
-2000-08-04 Alan Modra <alan@linuxcare.com.au>
-
- * emultempl/elf32.em (gld_${EMULATION_NAME}_parse_args): Rename to
- gld${EMULATION_NAME}_parse_args for consistency. Combine
- lastoptind and prevoptind vars, and keep track of last optind.
- (gld_${EMULATION_NAME}_list_options): Rename to
- gld${EMULATION_NAME}_list_options.
-
-2000-08-03 Rodney Brown <RodneyBrown@pmsc.com>
-
- * configure.tgt: Select targ_emul=elf_i386 for Unixware 7
- (i586-sco-sysv5uw7.1.0).
-
-2000-07-27 H.J. Lu <hjl@gnu.org>
-
- * emulparams/elf64alpha.sh (PARSE_AND_LIST_ARGS): Removed.
- (PARSE_AND_LIST_PROLOGUE): New.
- (PARSE_AND_LIST_LONGOPTS): Likewise.
- (PARSE_AND_LIST_OPTIONS): Likewise.
- (PARSE_AND_LIST_ARGS_CASES): Likewise.
- (PARSE_AND_LIST_EPILOGUE): Likewise.
-
-2000-07-28 Alan Modra <alan@linuxcare.com.au>
-
- * emultempl/armelf.em: Elide functions common to elf32.em,
- ie. most of the file.
- (arm_elf_after_open): New. Do arm specific things then call
- gld${EMULATION_NAME}_after_open.
- (arm_elf_before_allocation): New. Call
- gld${EMULATION_NAME}_before_allocation then do arm specifics.
- (PARSE_AND_LIST_PROLOGUE): Define.
- (PARSE_AND_LIST_SHORTOPTS): Define.
- (PARSE_AND_LIST_LONGOPTS): Define.
- (PARSE_AND_LIST_OPTIONS): Define.
- (PARSE_AND_LIST_ARGS_CASES): Define.
- (LDEMUL_AFTER_OPEN): Define.
- (LDEMUL_BEFORE_ALLOCATION): Define.
- (LDEMUL_BEFORE_PARSE): Define.
- (LDEMUL_FINISH): Define.
-
- * emultempl/hppaelf.em: Similarly zap most of this file.
- (hppaelf_add_stub_section): Prototype.
- (hppaelf_layaout_sections_again): Prototype.
- (hook_in_stub): Prototype.
- (LDEMUL_SET_OUTPUT_ARCH): Define.
- (LDEMUL_FINISH): Define.
- (LDEMUL_CREATE_OUTPUT_SECTION_STATEMENTS): Define.
-
- * emulparams/armelf.sh (TEMPLATE_NAME): Use elf32.
- (EXTRA_EM_FILE): New.
- * emulparams/armelf_linux.sh: Likewise.
- * emulparams/armelf_linux26.sh: Likewise.
- * emulparams/hppalinux.sh: Likewise.
- * emulparams/hppaelf.sh: Likewise.
- (NOP): Define.
-
- * emultempl/elf32.em: Fix formatting.
- (EXTRA_EM_FILE): Source it.
- (LDEMUL_BEFORE_PARSE, LDEMUL_SYSLIB, LDEMUL_HLL,
- LDEMUL_AFTER_PARSE, LDEMUL_AFTER_OPEN, LDEMUL_AFTER_ALLOCATION,
- LDEMUL_SET_OUTPUT_ARCH, LDEMUL_CHOOSE_TARGET,
- LDEMUL_BEFORE_ALLOCATION, LDEMUL_GET_SCRIPT, LDEMUL_FINISH,
- LDEMUL_CREATE_OUTPUT_SECTION_STATEMENTS,
- LDEMUL_OPEN_DYNAMIC_ARCHIVE, LDEMUL_PLACE_ORPHAN,
- LDEMUL_SET_SYMBOLS, LDEMUL_PARSE_ARGS, LDEMUL_UNRECOGNIZED_FILE,
- LDEMUL_LIST_OPTIONS, LDEMUL_RECOGNIZED_FILE,
- LDEMUL_FIND_POTENTIAL_LIBRARIES): New shell vars. Add code to
- allow functions in this file to be overridden.
- (PARSE_AND_LIST_SHORTOPTS): Handle it.
-
- * emultempl/m68kcoff.em: Include ldfile.h before ldemul.h.
-
- * emultempl/elf32.em: Reorganize file.
-
-2000-07-27 Ivan Kokshaysky <ink@jurassic.park.msu.ru>
-
- * emulparams/elf64alpha.sh: Implement "-taso" emulation
- specific option to fit 64-bit executable in the lower
- 31-bit address range. This is done by changing start
- address of .interp (the very first section of executable)
- and then setting EF_ALPHA_32BIT elf header flag.
-
-2000-07-21 Michael Sokolov <msokolov@ivan.Harhan.ORG>
-
- * emultempl/m68kcoff.em: New file.
- * emulparams/m68kcoff.sh (TEMPLATE_NAME): Use m68kcoff template.
- * Makefile.am (em68kcoff.c): Depend on m68kcoff.em rather than
- generic.em.
- * Makefile.in: Regenerate.
-
-2000-07-20 H.J. Lu <hjl@gnu.org>
-
- * emultempl/elf32.em (longopts): Duplicate "disable-new-dtags"
- and "disable-new-dtags" to stop getopt from treating -d/-e as
- abbreviations for these options.
-
-2000-07-20 H.J. Lu <hjl@gnu.org>
-
- * ld.texinfo: Add documentation for --disable-new-dtags and
- --enable-new-dtags.
-
- * ldmain.c (main): Initialize link_info.new_dtags to false.
-
- * emultempl/elf32.em (gld_${EMULATION_NAME}_parse_args): Add
- --disable-new-dtags and --enable-new-dtags.
- (gld_${EMULATION_NAME}_list_options): Likewise.
-
-2000-07-05 Kenneth Block <krblock@computer.org>
-
- * lexsup.c: Add optional style to demangle switch
- * ld.texinfo: Document optional style to demangle switch.
-
-2000-07-20 Hans-Peter Nilsson <hp@axis.com>
-
- * Makefile.am (ALL_EMULATIONS): Add ecrisaout.o, ecriself.o,
- ecrislinux.o.
- (ecrisaout.c, ecriself.c, ecrislinux.c): New rules.
- Regenerate dependencies.
- * Makefile.in: Rebuild.
- * configure.tgt (cris-*-*): New target.
- * emulparams/crisaout.sh, emulparams/criself.sh,
- emulparams/crislinux.sh, scripttempl/crisaout.sc: New files.
- * po/POTFILES.in, po/ld.pot: Regenerate.
-
-2000-07-20 H.J. Lu <hjl@gnu.org>
-
- * emultempl/elf32.em (gld_${EMULATION_NAME}_list_options):
- Print out ignored -z options.
-
-2000-07-19 H.J. Lu <hjl@gnu.org>
-
- * emulparams/elf32mcore.sh (PARSE_AND_LIST_ARGS): Removed.
- (PARSE_AND_LIST_PROLOGUE): New.
- (PARSE_AND_LIST_LONGOPTS): Likewise.
- (PARSE_AND_LIST_OPTIONS): Likewise.
- (PARSE_AND_LIST_ARGS_CASES): Likewise.
-
- * ldmain.c (main): Clear link_info.flags and link_info.flags_1.
-
- * lexsup.c (ld_options): Comment out 'z'.
- (parse_args): Likewise.
-
- * emultempl/elf32.em: Include "elf/common.h".
- (gld_${EMULATION_NAME}_parse_args): Defined. Handle some -z
- options.
- (gld_${EMULATION_NAME}_list_options): Likewise.
-
- * ld.texinfo: Add documentation for the recognized -z options.
-
-2000-07-19 H.J. Lu <hjl@gnu.org>
-
- * emultempl/elf32.em (gld${EMULATION_NAME}_try_needed): Call
- bfd_elf_set_dt_needed_soname ().
-
-2000-07-18 DJ Delorie <dj@cygnus.com>
-
- * pe-dll.c (pe_dll_id_target): check object target name also
-
-2000-07-18 Hans-Peter Nilsson <hp@axis.com>
-
- * scripttempl/elf.sc (.init): Only do ${INIT_START} and
- ${INIT_END} if relocating.
- (.fini): Likewise ${FINI_START} and ${FINI_END}.
-
-2000-07-16 Charles Wilson <cwilson@ece.gatech.edu>
-
- * emultempl/pe.em (gld_*_open_dynamic_archive): New search
- order for dynamic library '-lfoo' on pei386: libfoo.dll.a,
- foo.dll.a, libfoo.a, libfoo.dll, foo.dll. This fixes compatibility
- errors introduced by the old dynamic lib search order.
-
-2000-07-17 DJ Delorie <dj@cygnus.com>
-
- * pe-dll.c (process_def_file): auto-export data items also
- (pe_process_import_defs): also see if _imp_ form needed
-
-2000-07-12 Charles Wilson <cwilson@ece.gatech.edu>
-
- * pe-dll.c (make_one): fix a typo in the __imp_ name decoration
- for dll import libraries
-
-2000-07-12 Mark Elbrecht <snowball3@bigfoot.com>
-
- * scripttempl/i386go32.sc: Support the g++ attribute init_priority in
- gcc 2.95.2 and later.
-
-2000-07-11 Kazu Hirata <kazu@hxi.com>
-
- * ldfile.c (ldfile_try_open_bfd): Output '\n' after an error
- message.
-
-2000-07-10 Alan Modra <alan@linuxcare.com.au>
-
- * ldemul.h (struct lang_input_statement_struct): Remove forward
- declaration.
- (struct search_dirs): Likewise.
- * ldfile.h (struct lang_input_statement_struct): Likewise.
- Protect file from multiple inclusion.
- * ldlang.h (LANG_FOR_EACH_INPUT_STATEMENT): Move file_chain
- declaration from macro to file scope.
-
- * ldemul.c: ldexp.h,ldlang.h,ldfile.h,ldemul.h go in this order.
- * ldgram.y: Likewise here.
- * ldlang.c: And here.
- * ldmain.c: And here.
- * mpw-elfmips.c: And here.
- * mpw-eppcmac.c: And here.
- * emultempl/aix.em: And here.
- * emultempl/armcoff.em: And here.
- * emultempl/armelf.em: And here.
- * emultempl/armelf_oabi.em: And here.
- * emultempl/beos.em: And here.
- * emultempl/elf32.em: And here.
- * emultempl/hppaelf.em: And here.
- * emultempl/linux.em: And here.
- * emultempl/lnk960.em: And here.
- * emultempl/pe.em: And here.
- * emultempl/sunos.em: And here.
- * mpw-esh.c: And here. Include ldexp.h and ldlang.h too.
- * mpw-idtmips.c: Ditto.
- * emultempl/generic.em: Ditto.
- * emultempl/gld960.em: Ditto.
- * emultempl/gld960c.em: Ditto.
- * emultempl/mipsecoff.em: Ditto.
- * emultempl/ticoff.em: Ditto.
- * emultempl/vanilla.em: Ditto.
-
- * pe-dll.c: Include ldfile.h
- * ldver.c: Include ldexp.h, ldlang.h, ldfile.h
-
- * mpw-elfmips.c: (gldelf32ebmip_before_allocation): Add missing
- arguments to bfd_elf32_size_dynamic_sections call.
- (gldelf32ebmip_place_orphan): Add missing arguments to
- lang_leave_output_section_statement call.
-
-2000-07-10 H.J. Lu <hjl@gnu.org>
-
- * emultempl/pe.em (pe_enable_stdcall_fixup): Protect with
- DLL_SUPPORT.
- (strhash): Likewise.
- (compute_dll_image_base): Likewise.
- (pe_undef_found_sym): Likewise.
- (pe_undef_cdecl_match): Likewise.
- (gld_${EMULATION_NAME}_open_dynamic_archive): Mark the
- argument "arch" with ATTRIBUTE_UNUSED.
-
-2000-07-10 Alan Modra <alan@linuxcare.com.au>
-
- * configure.tgt: Remove extraneous hppa*-*-linux-gnu*.
-
- From Ryan Bradetich <rbradetich@uswest.net>
- * ldwrite.c (SSIZE): Remove to cure macro redefinition warning.
-
-2000-07-09 Alan Modra <alan@linuxcare.com.au>
-
- Changes to create multiple linker stubs, positioned immediately
- before the section where they are required.
- * emultempl/hppaelf.em: Include elf32-hppa.h.
- (stub_sec, file_chain): Delete.
- (hppaelf_create_output_section_statements): Don't make a stub
- section here.
- (hook_stub_info): New struct.
- (hook_in_stub): New function.
- (hppaelf_add_stub_section): New function.
- (hppaelf_finish): Do nothing for relocateable links. Modify the
- call to elf32_hppa_size_stubs. Move code for updating section
- layout from here...
- (hppaelf_layaout_sections_again): ..to here, a new function.
-
- * emultempl/hppaelf.em (hppaelf_delete_padding_statements): Fix
- broken list handling. Pass in a pointer to the list.
- (hppaelf_finish): Update call to hppaelf_delete_padding_statements
- for above changes.
- (hppaelf_before_parse): Prototype.
- (hppaelf_set_output_arch): Prototype.
- (hppaelf_create_output_section_statements): Prototype.
- (hppaelf_delete_padding_statements): Prototype.
- (hppaelf_finish): Prototype.
-
- Merge from elf32.em
- * emultempl/hppaelf.em: Include ctype.h.
- (struct orphan_save): New.
- (gld${EMULATION_NAME}_place_orphan): New.
- (output_rel_find): New.
- (hppaelf_get_script): Update from elf32.em.
- (ld_hppaelf_emulation): Rename to ld_${EMULATION_NAME}_emulation.
- Change emulation_name field to "${EMULATION_NAME}". Add
- gld${EMULATION_NAME}_place_orphan.
-
- * Makefile.am (ALL_EMULATIONS): Reinstate ehppaelf.o, add
- ehppalinux.o, sort it. Regenerate dependencies.
- (ehppalinux.c): Depend on hppaelf.em
- * Makefile.in: Regenerate.
-
- * configure.tgt: targ_emul=hppalinux for hppa*linux
-
- * emulparams/hppalinux.sh: New.
- * emulparams/hppaelf.sh (TARGET_PAGE_SIZE): Write in hex.
-
-2000-07-08 Alan Modra <alan@linuxcare.com.au>
-
- * lexsup.c (parse_args): Copy section name.
-
-2000-07-07 Charles Wilson <cwilson@ece.gatech.edu>
-
- * emultempl/pe.em: institute the following search order for
- dynamic libraries on pei386: libfoo.dll.a, foo.dll.a (import
- libs), libfoo.dll, foo.dll (link direct to dll). Fall back to
- static lib (libfoo.a) if none of the above are found.
-
-2000-07-07 Mumit Khan <khan@xraylith.wisc.edu>
-
- * emultempl/pe.em (pe_enable_auto_image_base): New variable.
- (longopts): New --{enable,disable}-auto-image-base options.
- (gld_${EMULATION_NAME}_list_options): Document.
- (gld_${EMULATION_NAME}_parse): Handle.
- (strhash): New static function.
- (compute_dll_image_base): New static function.
- (gld_${EMULATION_NAME}_set_symbols): Use.
-
-2000-07-05 DJ Delorie <dj@redhat.com>
-
- * MAINTAINERS: new
-
-2000-07-01 Koundinya K <kk@ddeorg.soft.net>
-
- * configure.tgt: Add traditional mips (mips*-*-sysv4*) target.
- * emulparams/elf32btsmip.sh: New file.
- * Makefile.am: Add traditional mips target.
- * Makefile.in: Rebuild.
-
-2000-07-01 H.J. Lu <hjl@gnu.org>
-
- * Makefile.am (EXTRA_ld_new_SOURCES): Set to deffilep.y for
- automake to use YLWRAP.
- * Makefile.in: Rebuild.
-
-2000-07-01 Alan Modra <alan@linuxcare.com.au>
-
- * Makefile.am (DEP): Fix 2000-06-22. grep after running dep.sed
- (CLEANFILES): Add DEPA.
- * Makefile.in: Regenerate.
-
-2000-06-30 Timothy Wall <twall@ppc>
-
- * scripttempl/tic54xcoff.sc: PAGE N is not implemented, so encode
- the page in the upper octet of the address.
-
-2000-06-26 Marek Michalkiewicz <marekm@linux.org.pl>
-
- * emulparams/avrmega161.sh (ARCH): Change to avr:5.
-
-2000-06-24 Alan Modra <alan@linuxcare.com.au>
-
- * NEWS: arm-elf does --gc-sections too.
-
-2000-06-22 Alan Modra <alan@linuxcare.com.au>
-
- * Makefile.am (DEP): grep for leading `/' in DEP1, and fail if we
- find one.
- * Makefile.in: Regenerate.
-
-2000-06-21 H.J. Lu <hjl@gnu.org>
-
- * Makefile.am: Rebuild dependency.
- * Makefile.in: Rebuild.
-
-2000-06-20 H.J. Lu <hjl@gnu.org>
-
- * Makefile.am: Rebuild dependency.
- * Makefile.in: Rebuild.
-
-2000-06-20 Timothy Wall <twall@cygnus.com>
-
- * scripttempl/tic54xcoff.sc: New.
- * ldlang.c (wild_doit): Propagate SEC_BLOCK flag.
- * gen-doc.texi: Add flag for TI COFF.
- * ld.texinfo: Add documentation for TI COFF handling switches.
- * emultempl/ticoff.em: New. TI COFF handling.
- * configure.tgt: Add tic54x target.
- * Makefile.am: Add tic54x target.
- * Makefile.in: Ditto.
-
-2000-06-20 Alan Modra <alan@linuxcare.com.au>
-
- * ldmain.c (set_scripts_dir): Correct pointer comparison when
- checking for backslashes.
-
-2000-06-19 Alan Modra <alan@linuxcare.com.au>
-
- * NEWS: Move entries not in 2.10 above "Changes in version 2.10".
-
-2000-06-18 Alan Modra <alan@linuxcare.com.au>
-
- * NEWS: Update list of targets supporting --gc-sections.
-
- * scripttempl/elf.sc: KEEP .eh_frame contents.
- * scripttempl/elfd30v.sc: Same here.
-
-2000-06-18 Stephane Carrez <stcarrez@worldnet.fr>
-
- * Makefile.am (ALL_EMULATIONS): Added new emulation for m68hc12
- and m68hc11 (elf).
- * Makefile.in: Rebuild.
- * configure.tgt: Recognize m68hc12 and m68hc11.
- * scripttempl/elfm68hc12.sc: New file.
- * emulparams/m68hc12elfb: New emulation.
- * emulparams/m68hc12elf: New emulation.
- * emulparams/m68hc11elfb.sh: New file. User configurable emulation
- (includes a memory.x script to define the ROM and RAM banks).
- * scripttempl/elfm68hc11.sc, emulparams/m68hc11elf.sh:
- New configuration files for support of Motorola 68hc11
-
-2000-06-15 Alan Modra <alan@linuxcare.com.au>
-
- * ldmain.c (main): Only change SEC_READONLY for final link.
-
-2000-06-13 H.J. Lu <hjl@gnu.org>
-
- * configure: Regenerate.
-
-2000-06-08 David O'Brien <obrien@FreeBSD.org>
-
- * configure.in (VERSION): Update to show this is the CVS mainline.
-
-2000-06-07 Michael Sokolov <msokolov@ivan.Harhan.ORG>
-
- * emultempl/mipsecoff.em (gld{EMULATION_NAME}_after_open): Require all
- input objects to be ECOFF.
- (check_sections): einfo takes %B, not %P, to print a BFD name.
-
-2000-06-05 Michael Matz <matz@ifh.de>
-
- * ldgram.y (vers_defns): Handle 'extern "C++" { ... }' in
- version scripts.
-
- * ldlex.l (V_IDENTIFIER): Accept `::' in symbols.
-
-2000-05-23 Marek Michalkiewicz <marekm@linux.org.pl>
-
- * emulparams/avr1200.sh (STACK): Define as 0.
- * emulparams/avr23xx.sh (STACK): Define as last internal SRAM address.
- * emulparams/avr4433.sh (STACK): Likewise.
- * emulparams/avr44x4.sh (STACK): Likewise.
- * emulparams/avr85xx.sh (STACK): Likewise.
- * emulparams/avrmega103.sh (STACK): Likewise.
- * emulparams/avrmega161.sh (STACK): Likewise.
- * emulparams/avrmega603.sh (STACK): Likewise.
- * scripttempl/elf32avr.sc (__data_start): Define for gcrt1.
- (__stack): Define from ${STACK} for main().
-
-2000-05-26 Alan Modra <alan@linuxcare.com.au>
-
- * Makefile.am: Update dependencies with "make dep-am"
- * Makefile.in: Regenerate.
-
-2000-05-26 Eli Zaretskii <eliz@is.elta.co.il>
-
- * ldmain.c: Include filenames.h.
- (set_scripts_dir): Support backslashes in program name.
-
-2000-05-22 Igor Shevlyakov <igor@windriver.com>
-
- * ldmain.c (main): When deciding if ".text" section should be
- read-only, don't forget to reset SEC_READONLY because it
- could be already set.
-
-2000-05-22 Thomas de Lellis <tdel@windriver.com>
-
- * ld.1: Add documentation for new command line option:
- --section-start <sectionname>=<sectionorg>
- This is a generic version of -Ttext etc. which accepts
- any section name as a parameter instead of just text/data/
- bss.
- * ld.texinfo: More docs.
- * NEWS: More docs.
- * lexsup.c: (parse_args): Recognize new command line option.
- (ld_options): Add new option.
-
-2000-05-18 H.J. Lu <hjl@gnu.org>
-
- * lexsup.c (parse_args): `i' == `r', not `q'.
-
-2000-05-18 Jeffrey A Law (law@cygnus.com)
-
- * configure.tgt (hppa*64*-*-*): Enable PA64 target.
-
-2000-05-17 S. Bharadwaj Yadavalli <sby@scrugs.lkg.dec.com>
- Rick Gorton <gorton@scrugs.lkg.dec.com>
-
- Add support for '-q' == '--emit-relocs' switch.
- * ldmain.c (main): Default to false.
- * lexsup.c (parse_args): Turn on emitrelocations flag if set.
- * NEWS: Describe the emitrelocations switch.
- * ld.texinfo: Describe the emitrelocations switch.
-
-2000-05-16 Charles Wilson <cwilson@ece.gatech.edu>
-
- * emultempl/pe.em (_open_dynamic_archive): New function: Search
- the library path for "foo.dll" and "libfoo.dll" dynamic libraries
- before searching for 'libfoo.a' in response to a '-Bdynamic -lfoo'
- link options.
-
-2000-05-15 David O'Brien <obrien@FreeBSD.org>
-
- * lexsup.c (parse_args): Update the year in the copyright notice.
-
-2000-05-13 Alan Modra <alan@linuxcare.com.au>
-
- * ld.h (gettext, dgettext, dcgettext, textdomain, bindtextdomain):
- Replace defines with those from intl/libgettext.h to quieten gcc
- warnings.
-
-2000-05-10 H.J. Lu <hjl@gnu.org>
-
- * ldlang.c (open_input_bfds): Don't load the same file within
- a group again if the whole archive has been loaded already.
-
-2000-05-03 Alan Modra <alan@linuxcare.com.au>
-
- From Ulf Carlsson <ulfc@engr.sgi.com> and Andreas Jaeger <aj@suse.de>
- * lexsup.c (set_section_start): Use bfd_scan_vma rather than
- strtoul.
-
-2000-05-01 Jim Wilson <wilson@cygnus.com>
-
- * configure.host (ia64-*-linux-gnu*): Change gcc to ${CC}.
-
- * configure.host: Added HOSTING_CRT0, HOSTING_LIBS for
- host "ia64-*-linux-gnu*".
-
-2000-04-29 Andreas Jaeger <aj@suse.de>
-
- * ld.h: Correctly check GCC version.
-
-2000-04-25 Jeffrey A Law (law@cygnus.com)
-
- * Makefile.am: Add PA64 support. Add missing dependencies for
- PA32 elf support.
- * Makefile.in: Rebuilt.
- * configure.tgt: Add PA64 support (currently disabled).
-
-2000-04-25 Alan Modra <alan@linuxcare.com.au>
-
- * emultempl/elf32.em (gld${EMULATION_NAME}_place_section): Delete.
- (output_rel_find): New function.
- (hold_section, hold_use): Delete.
- (hold_text, hold_rodata, hold_data, hold_bss, hold_rel,
- hold_interp): Make local to place_orphan.
- (gld${EMULATION_NAME}_place_orphan): Use lang_output_section_find
- rather than place_section to find possible previous use of orphan.
- Similarly find the place-holder output sections. Use returned
- value from lang_enter_output_section_statement rather than calling
- lang_output_section_statement_lookup.
- * emultempl/armelf.em: Same here.
- * emultempl/pe.em: Similar to above, but no need for output_rel_find.
-
- * ldlang.c (lang_enter_output_section_statement): Return output
- section statement.
- * ldlang.h (lang_enter_output_section_statement): Change
- declaration too.
-
- * ldlang.h (lang_output_section_statement): Export it.
- * ldlang.c (lang_output_section_statement): Ditto.
-
-2000-04-24 Nick Clifton <nickc@cygnus.com>
-
- * ld.texinfo (Output Section Data): Add note that section data
- commands cannot appear outside of section directives.
-
-2000-04-2 Matthew Green <mrg@cygnus.com>
-
- * configure.tgt: Add NetBSD/sparc ELF, and NetBSD/sparc64 support.
-
-2000-04-21 Richard Henderson <rth@cygnus.com>
- David Mosberger <davidm@hpl.hp.com>
-
- * Makefile.am (ALL_64_EMULATIONS): Add eelf64_ia64.o.
- (eelf64_ia64.c): New rule.
- * Makefile.in: Rebuild.
- * configure.tgt (ia64-*-elf*, ia64-*-linux*): New targets.
- * emulparams/elf64_ia64.sh: New file.
-
-2000-04-21 Richard Henderson <rth@cygnus.com>
-
- * scripttempl/elfd30v.sc: Place .gcc_except_table.
-
-2000-04-19 Alan Modra <alan@linuxcare.com.au>
-
- * dep-in.sed: Match space at start of file name, not at end.
-
-2000-04-18 H.J. Lu <hjl@gnu.org>
-
- * emultempl/elf32.em (gld${EMULATION_NAME}_place_orphan): Call
- lang_leave_output_section_statement () after calling
- lang_enter_output_section_statement ().
- * emultempl/armelf.em: Likewise.
-
-2000-04-18 Alan Modra <alan@linuxcare.com.au>
-
- * emultempl/elf32.em (struct orphan_save): Add section field.
- (gld${EMULATION_NAME}_place_orphan): Use above to keep sections in
- better order, and place first orphan section as we did before the
- 2000-04-12 patch. Ignore ~SEC_ALLOC sections when choosing place.
- Don't call make_bfd_section here, let wild_doit do the job for us.
- Don't build a statement list when we'll only throw it away.
- * emultempl/armelf.em: Ditto.
- * emultempl/pe.em: Similarly.
-
-2000-04-14 Geoff Keating <geoffk@cygnus.com>
-
- * scripttempl/elfppc.sc: Remove.
- * emulparams/elf32ppc.sh: Use elf.sc.
- * emulparams/elf32lppc.sh: Use elf.sc.
- * emulparams/elf32ppclinux.sh: Use elf.sc.
- * emulparams/elf32ppcsim.sh: New file.
- * emulparams/elf32lppcsim.sh: New file.
- * Makefile.am: Update dependencies. Add elf32ppcsim ad elf32lppcsim.
- (ALL_EMULATIONS): Add elf32ppcsim ad elf32lppcsim.
- * Makefile.in: Regenerate.
- * configure.tgt (powerpc-*): Add elf32ppcsim and elf32lppcsim.
-
-2000-04-14 Alan Modra <alan@linuxcare.com.au>
-
- * emultempl/elf32.em (gld${EMULATION_NAME}_place_orphan): Process
- ~SEC_ALLOC sections too. Init start address of debug sections.
- * emultempl/armelf.em (gld${EMULATION_NAME}_place_orphan): Ditto.
- * emultempl/pe.em (gld${EMULATION_NAME}_place_orphan): Ditto.
- Also set all relocateable section start addresses.
-
-2000-04-13 Geoff Keating <geoffk@cygnus.com>
-
- * scripttempl/elf.sc: Add support for .sbss2 and .sdata2 sections.
- Add new BSS_PLT variable for when .plt need not be contained in
- the file. Move _etext so that it is also after .fini, and provide
- both etext and _etext with a leading underscore. Mark the start
- and end of .sbss.
-
-2000-04-12 Alan Modra <alan@linuxcare.com.au>
-
- * emultempl/elf32.em (struct orphan_save): New.
- (hold_text, hold_rodata, hold_data, hold_bss, hold_rel,
- hold_interp): Make them struct orphan_save.
- (gld${EMULATION_NAME}_place_section): Modify for new hold_*.
- (gld${EMULATION_NAME}_place_orphan): Add new orphan sections to
- the end of the relevant section list. Also add associated section
- statements to the end of any previous orphan statements.
- * emultempl/armelf.em: Similarly.
- * emultempl/pe.em: Similarly.
-
-2000-04-11 Alan Modra <alan@linuxcare.com.au>
-
- * ld.texinfo (Simple Example): Remove extraneous paragraph.
-
-2000-04-07 Andrew Cagney <cagney@b1.cygnus.com>
-
- * configure.in (WARN_CFLAGS): Set to -W -Wall by default. Add
- --enable-build-warnings option.
- * Makefile.am (AM_CFLAGS, WARN_CFLAGS): Add definitions.
- * Makefile.in, configure: Re-generate.
-
-2000-04-04 Alan Modra <alan@linuxcare.com.au>
-
- * po/ld.pot: Regenerate.
-
- * lexsup.c (help): Restore translated part of bug string.
-
- * Makefile.am (MKDEP): Use gcc -MM rather than mkdep.
- (DEP): Quote when passing vars to sub-make. Add warning message
- to end.
- (DEP1): Rewrite for "gcc -MM".
- (CLEANFILES): Add DEP2.
- Update dependencies.
- * Makefile.in: Regenerate.
-
-2000-04-03 Alan Modra <alan@linuxcare.com.au>
-
- * ld.h: #include "bin-bugs.h"
- * lexsup.c (help): Use REPORT_BUGS_TO.
-
-2000-03-27 Denis Chertykov <denisc@overta.ru>
-
- * configure.tgt (avr-*-*): New target support.
- * Makefile.am: Likewise.
- * scripttempl/elf32avr.sc: New script file.
- * emulparams/avr1200.sh: New file.
- * emulparams/avr23xx.sh: New file.
- * emulparams/avr4433.sh New file.
- * emulparams/avr44x4.sh New file.
- * emulparams/avr85xx.sh New file.
- * emulparams/avrmega103.sh New file.
- * emulparams/avrmega161.sh New file.
- * emulparams/avrmega603.sh New file.
- * Makefile.in: Regenerate.
-
-2000-03-09 Andreas Jaeger <aj@suse.de>
-
- * Makefile.am (check-DEJAGNU): Also unset LANG.
- * Makefile.in: Rebuild.
-
-2000-03-06 Ian Lance Taylor <ian@zembu.com>
-
- * ldfile.c (ldfile_try_open_bfd): Don't crash if we see an empty
- archive.
-
-2000-03-02 H.J. Lu <hjl@gnu.org>
-
- * emulparams/elf32mcore.sh: Include "getopt.h".
-
-2000-03-01 Ian Lance Taylor <ian@zembu.com>
-
- * configure.tgt: Remove *-*-aout, *-*-coff, and *-*-netware.
-
-2000-03-01 H.J. Lu <hjl@gnu.org>
-
- * emulparams/mipspe.sh: Add SUBSYSTEM and INITIAL_SYMBOL_CHAR.
- * emulparams/shpe.sh: Likewise.
-
-2000-03-01 Nick Clifton <nickc@cygnus.com>
-
- * pe-dll.c: Remove unused variables and add ATTRIBUTE_UNUSED
- to unused parameters.
-
- * emultempl/pe.em: Add "#ifdef DLL_SUPPORT" around static
- functions only used by DLL code.
- (_place_orphan): Initialise 'dollar'.
-
-2000-03-01 H.J. Lu <hjl@gnu.org>
-
- * ldmain.c (undefined_symbol): Take one more arg, fatal, to
- indicate if the undefined symbol is a fatal error or not.
- Don't delete the output file if "fatal" is false.
-
-2000-02-29 H.J. Lu <hjl@gnu.org>
-
- * Makefile.am (check-DEJAGNU): Also pass LIBS="$(LIBS)".
- Set LC_COLLATE and LC_ALL to null and export them. It is for
- sort which expects the C locale.
- Add $(LIBS) to all $(HOSTING_LIBS).
- * Makefile.in: Rebuild.
-
-2000-02-29 Alan Modra <alan@spri.levels.unisa.edu.au>
-
- * emultempl/{aix.em, armcoff.em, armelf.em, armelf_oabi.em,
- beos.em, elf32.em, generic.em, gld960.em, gld960c.em, hppaelf.em,
- linux.em, lnk960.em, mipsecoff.em, sunos.em, vanilla.em}
- (ld_emulation_xfer_struct): Add missing NULL initialiser for
- find_potential_libraries.
-
-2000-02-28 Jim Blandy <jimb@redhat.com>
-
- * ldgram.y (exclude_name_list): Don't require a comma to separate
- list entries; the lexer considers commas to be valid part of a
- filename, so in something like `foo, bar' the comma is considered
- part of the first filename, `foo,'.
- * ld.texinfo: Update section on EXCLUDE_FILE lists.
-
-2000-02-27 Loren J. Rittle <ljrittle@acm.org>
-
- * configure.host: Added HOSTING_CRT0, HOSTING_LIBS for
- host "i[3456]86-*-freebsdelf*".
-
-2000-02-27 Mark Elbrecht <snowball3@bigfoot.com>
-
- * scripttempl/i386go32.sc: Move misplaced semicolons.
-
-2000-02-25 Ian Lance Taylor <ian@zembu.com>
-
- * Makefile.am (ALL_EMULATIONS): Remove ehppaelf.o.
- (ALL_64_EMULATIONS): Remove eelf64hppa.o.
- (eelf64hppa.c, ehppaelf.c): Remove targets.
- * Makefile.in: Rebuild.
-
-2000-02-25 Alexandre Oliva <oliva@lsd.ic.unicamp.br>
-
- * configure.tgt (targ_extra_ofiles): Enable elf64_sparc on
- GNU/Linux/sparc, but keep the default as 32.
-
- * configure.tgt: Enable elf64_sparc on Solaris7+/sparc. And make
- it default if sparcv9 or sparc64.
-
-2000-02-24 Nick Clifton <nickc@cygnus.com>
-
- * Makefile.am: Add rules to build emipspe.o and earmpe.o.
- * Makefile.in: Regenerate.
- * configure.tgt: Add targets for arm-wince, sh-pe and mips-pe.
-
- * ldemul.h (ld_emulation_xfer_struct): Add new field:
- find_potential_libraries.
- * ldemul.c (ldemul_find_potential_libraries): New function.
-
- * ldfile.c (ldfile_open_file_search): Allow function to be
- exported.
- (ldfile_open_file): Call ldemul_find_potential_libraries.
- * ldfile.h: Add prototype for ldfile_open_file_search.
-
- * pe-dll.c: Add support for ARM, MIPS and SH targets.
-
- * emulparams/mipspe.sh: New file. Parameters for mips-pe target.
- * emulparams/shpe.sh: New file. Parameters for sh-pe target.
-
- * emultempl/pe.em: Add support for ARM, MIPS and SH DLLs.
- (gld_X_find_potential_libraries): New function. Search for
- libraries called "*.lib".
-
- * scripttempl/pe.sc: Add .pdata section.
-
-2000-02-23 Richard Henderson <rth@cygnus.com>
-
- * scripttempl/elfd10v.sc: Remove dynamic linking hooks.
- Add and use memory regions.
-
-2000-02-23 Linas Vepstas (linas@linas.org)
-
- * emulparams/elf32i370.sh, scripttempl/elfi370.sc: New.
-
- * Makefile.am: Add support for Linux/IBM 370.
- * configure.tgt: Likewise.
-
- * Makefile.in: Regenerate.
-
-2000-02-21 Alan Modra <alan@spri.levels.unisa.edu.au>
-
- * ldlang.c (print_input_section, print_data_statement,
- print_reloc_statement, print_padding_statement, insert_pad,
- size_input_section, lang_check_section_addresses,
- lang_size_sections, lang_do_assignments, lang_set_startof,
- lang_one_common): Change `opb' to unsigned.
- (lang_do_assignments): Also change `size' to unsigned.
-
-2000-02-16 Richard Henderson <rth@cygnus.com>
-
- * scripttempl/elf.sc: Place OTHER_PLT_RELOC_SECTION.
-
-2000-02-16 Timothy Wall <twall@cygnus.com>
-
- * mri.c (mri_draw_tree): Add default LMA region argument to call
- to lang_leave_output_section_statement.
- * ldlang.h: Update prototypes with LMA region arguments.
- * ldlang.c (lang_size_sections): Encapsulate region bounds
- checking in os_check_region call.
- (os_check_region): New function.
- (lang_output_section_statement_lookup): Initialize lma_region.
- (lang_leave_output_section_statement): Add LMA region argument.
- (lang_leave_overlay): Ditto.
- * ldgram.y: Handle LMA region syntax.
- * ld.texinfo (Output Section Description): Describe LMA region usage.
- * emultempl/armelf.em (gld$place_orphan): Add default value for
- lma region in call to lang_leave_output_section_statement.
- * emultempl/elf32.em (gld$place_orphan): Add default value for
- lma region in call to lang_leave_output_section_statement.
- * emultempl/pe.em (gld$place_orphan): Add default value for
- lma region in call to lang_leave_output_section_statement.
-
-
-2000-02-04 Timothy Wall <twall@redhat.com>
-
- * ldlang.c (lang_check_section_addresses): Use bytes instead of
- octets when calculating section end addresses.
-
-2000-02-04 Timothy Wall <twall@redhat.com>
-
- * ldlang.c (lang_size_sections): Fix typo in ALIGN_N invocation.
-
-2000-02-03 Timothy Wall <twall@redhat.com>
-
- * ldexp.c (fold_name): Make SIZEOF operator return byte count, not
- octet count.
- * ldlang.c (print_input_section, print_data_statement,
- print_reloc_statement, print_padding_statement): Print target
- address values and section sizes as bytes, not octets.
- (insert_pad) Calculate padding size in octets, and adjust "dot"
- by bytes.
- (size_input_section) Always adjust "dot" by bytes, not octets.
- (lang_check_section_addresses, lang_do_assignments) Adjust
- "dot" by bytes, not octets. Use the larger of the directive size
- or octets_per_byte for the number of octets actually allocated in
- the output section.
- (lang_set_startof) Make sure STARTOF returns a target address.
- (lang_one_common) Record size changes in octets.
- (lang_abs_symbol_at_end_of) Section end symbol's value is
- recorded in target bytes.
- * ld.texinfo: Updated description of BYTE, SHORT, LONG, etc.
- to be clear about behavior when an octet is smaller than one byte.
-
-2000-01-27 Alan Modra <alan@spri.levels.unisa.edu.au>
-
- * ldcref.c (output_cref): Don't pass message strings to printf
- as format arg.
- Update copyright.
-
- * ldmisc.c (vfinfo): Same here.
- Update copyright.
-
-2000-01-23 Alan Modra <alan@spri.levels.unisa.edu.au>
-
- * emultempl/{armcoff.em,armelf.em,armelf_oabi.em,beos.em,
- generic.em,gld960.em,gld960c.em,hppaelf.em,linux.em,lnk960.em,
- mipsecoff.em,sunos.em,vanilla.em} (ld_emulation_xfer_struct):
- Add missing NULL initialisers, and comments.
-
-2000-01-21 Nick Clifton <nickc@cygnus.com>
-
- * ldlang.c (lang_size_sections): Fix typo in comment.
-
-2000-01-18 H.J. Lu <hjl@gnu.org>
-
- * ldlang.c (lang_size_sections): Also update the current
- address of a region if the SEC_NEVER_LOAD bit is not set.
-
-2000-01-10 Philip Blundell <pb@futuretv.com>
-
- * configure.tgt (arm*-*-conix*): New target.
-
-2000-01-07 Nick Clifton <nickc@cygnus.com>
-
- * ld.texinfo (Options): Remind users to preceed linker command
- line switches with -Wl, (or whatever is appropriate) if it is
- being invoked by a comnpiler driver program.
- Fix description of the behaviour of the -n command line switch.
-
-2000-01-05 Catherine Moore <clm@cygnus.com>
-
- * ld.h (wildcard_spec): Change exclude_name to exclude_name_list.
- (name_list): New.
- * ld.texinfo (EXCLUDE_FILE): Update documentation.
- * ldgram.y (wildcard_spec): Support a list of excluded_files.
- (exclude_name_list): New.
- ldlang.c (walk_wild_section): Support list of excluded files.
- (print_wild_statement): Likewise.
- (lang_add_wild): Likewise.
- * ldlang.h (lang_wild_statement_type): Likewise.
- * scripttempl/elf.sc (OTHER_EXCLUDE_FILES): Support.
-
-2000-01-04 Mumit Khan <khan@xraylith.wisc.edu>
-
- * pe-dll.c (pe_dll_warn_dup_exports): New variable.
- (process_def_file): Use.
- (pe_dll_compat_implib): New variable.
- (make_one): Use.
-
- * pe-dll.h: Add exports of pe_dll_warn_dup_exports and
- pe_dll_compat_implib.
-
- * emultempl/pe.em (longopts): Add warn-duplicate-exports and
- compat-implib options.
- (gld_${EMULATION_NAME}_list_options): List new options.
- (gld_${EMULATION_NAME}_parse_args): Handle.
-
- * pe-dll.c (pe_dll_generate_implib): Use the correct name for output
- dll.
-
- * deffilep.y (opt_name): Allow "." in name.
-
-For older changes see ChangeLog-9899
-
-Local Variables:
-mode: change-log
-left-margin: 8
-fill-column: 74
-version-control: never
-End:
diff --git a/contrib/binutils/ld/ChangeLog-0203 b/contrib/binutils/ld/ChangeLog-0203
deleted file mode 100644
index ee5354d..0000000
--- a/contrib/binutils/ld/ChangeLog-0203
+++ /dev/null
@@ -1,3580 +0,0 @@
-2003-12-19 Kazuhiro Inaoka <inaoka.kazuhiro@renesas.com>
-
- Add m32r-linux and PIC support. Add new ABI that uses RELA.
- * Makefile.am: Added em32rlelf.c, em32relf_linux.c,
- em32rlelf_linux.c.
- * Makefile.in: Regenerate.
- * configure.tgt (m32r*-*-linux*, m32r*le-*-linux*, m32r*le-*-*):Added.
- * emulparams/m32relf_linux.sh: Added.
- * emulparams/m32rlelf.sh: Ditto.
- * emulparams/m32rlelf_linux.sh: Ditto.
- * NEWS: Mention support m32r Linux.
-
-2003-12-18 Eric Youngdale <eric@mkssoftware.com>
- Nick Clifton <nickc@redhat.com>
-
- * emultempl/pe.em (_after_open): When scanning MS import
- libraries allow for the possible presence of static objects.
-
-2003-12-07 H.J. Lu <hongjiu.lu@intel.com>
-
- * ldlang.c (lang_vers_match): Pass "DMGL_PARAMS | DMGL_ANSI" to
- cplus_demangle.
-
-2003-12-07 Kazu Hirata <kazu@cs.umass.edu>
-
- * ldemul.c: Convert to ISO-C.
- * ldver.c: Likewise.
-
-2003-12-06 Kazu Hirata <kazu@cs.umass.edu>
-
- * lexsup.c (is_num): Remove.
-
-2003-12-05 Dmitry Semyonov <Dmitry.Semyonov@oktet.ru>
-
- * pe-dll.c (generate_reloc): Remap ARM_26D relocation from 5 to
- 0. This fixes "bad fixup" error generated by MS linker.
-
-2003-12-04 H.J. Lu <hongjiu.lu@intel.com>
-
- * emultempl/ia64elf.em (gld${EMULATION_NAME}_after_parse): Set
- link_info.need_relax_finalize to TRUE.
-
- * ldlang.c (lang_process): Use link_info.need_relax_finalize
- instead of link_info.relax_finalizing.
- * ldmain.c (main): Likewise.
-
-2003-12-04 Dmitry Semyonov <Dmitry.Semyonov@oktet.ru>
-
- * armpe.sh (RELOCATEABLE_OUTPUT_FORMAT): Define.
-
-2003-12-04 Alan Modra <amodra@bigpond.net.au>
-
- * ldlang.c (lang_do_assignments): Function return is void.
- * ldlang.h (lang_do_assignments): Ditto.
- * emultempl/netbsd.em (gld${EMULATION_NAME}_before_parse): Declare.
- * Makefile.am (ens32knbsd.c): Depend on netbsd.em.
- * Makefile.in: Regenerate.
-
-2003-12-03 Dave Airlie <airlied@linux.ie>
-
- * configure.tgt: Add vax-linux-gnu target.
-
-2003-12-03 Dmitry Diky <diwil@mail.ru>
-
- * scripttempl/elf32msp430.sc (HEAP_SECTION_MSP430): New section for
- forthcoming devices.
- (_etext): provide this defenition for all scripts.
-
-2003-12-02 Kazu Hirata <kazu@cs.umass.edu>
-
- * emultempl/beos.em: Remove ARGSUSED.
-
-2003-12-03 Alan Modra <amodra@bigpond.net.au>
-
- * emultempl/pe.em (pe_fixup_stdcalls): Update for renamed
- bfd_link_hash_entry field "next" -> "und_next".
- (pe_find_data_imports): Likewise.
- (gld_${EMULATION_NAME}_after_open): Likewise.
- * emultempl/sunos.em (before_allocation): Likewise.
-
-2003-12-02 Nick Clifton <nickc@redhat.com>
-
- * ld.texinfo (Options): --ignore-all is no longer the default
- behaviour for shared libraries and dynamic executables.
-
-2003-12-02 Alan Modra <amodra@bigpond.net.au>
-
- * Makefile.am: Run "make dep-am".
- * Makefile.in: Regenerate.
-
-2003-12-02 Alan Modra <amodra@bigpond.net.au>
-
- * ldmain.c (main): Remove mpc860c0 code.
- * lexsup.c (enum option_values): Delete OPTION_MPC860C0.
- (ld_options): Delete mpc860c0 entry.
- (parse_args): Likewise.
-
-2003-12-01 Alan Modra <amodra@bigpond.net.au>
-
- * emultempl/elf32.em (gld${EMULATION_NAME}_before_allocation): Test
- hash table type rather than testing creator flavour.
- * emultempl/hppaelf.em (hppaelf_create_output_section_statements):
- Only create stub_file bfd if hash table creator is as expected.
- (gld${EMULATION_NAME}_finish): Test stub_file.
-
-2003-11-28 Marcel Moolenaar <marcel@xcllnt.net>
-
- * emulparams/elf64_ia64_fbsd.sh (TEXT_START_ADDR): Define.
- (DATA_ADDR): Unset.
-
-2003-11-18 James E Wilson <wilson@specifixinc.com>
-
- * ldlang.c (lang_process): Move lang_reset_memory_regions call after
- lang_do_assignments call.
-
- * emulparams/elf64_ia64.sh (OTHER_PLT_RELOC_SECTIONS): Include
- .rela.opd if -pie.
-
-2003-11-10 Jonathan Wilson <jonwil@tpgi.com.au>
-
- * scripttempl/pe.sc: Add support for TLS sections.
-
-2003-11-09 Alan Modra <amodra@bigpond.net.au>
-
- * configure.host (HOSTING_LIBS): Group libgcc and libc with
- --start-group, --end-group pair.
- (*-*-netbsd*, am33_2.0-*-linux*): Use the default HOSTING_LIBS.
- (am33_2.0-*-linux*): Edit default HOSTING_CRT0.
- (arm*-*-linux-gnu*): Remove extraneous '*' in sed expression.
- (hppa*64*-*-linux*, hppa*-*-linux*): Remove target specific case.
-
-2003-11-07 Jonathan R. Grant <jg-binutils@jguk.org>
-
- * ldfile.c (ldfile_open_file): Use "No such file" error message.
-
-2003-11-06 Bruno Rohee <bruno@rohee.com>
-
- * ls.texinfo: Fix "the the" typo.
-
-2003-11-05 Alan Modra <amodra@bigpond.net.au>
-
- * emultempl/pe.em (gld_${EMULATION_NAME}_after_open): Only do
- pe_dll_extra_pe_debug stuff when DLL_SUPPORT defined.
- (pr_sym): Move inside #ifdef DLL_SUPPORT.
-
- * emultempl/ppc64elf.em (gld${EMULATION_NAME}_new_vers_pattern): Zap
- unused variable.
-
- * emulparams/elf32_i860.sh (TEXT_START_ADDR): Define.
-
-2003-11-04 Alan Modra <amodra@bigpond.net.au>
-
- * emultempl/elf32.em (gld${EMULATION_NAME}_before_allocation): Call
- _bfd_elf_tls_setup.
-
-2003-10-31 Nick Clifton <nickc@redhat.com>
-
- * ldlang.c (lookup_name): When looking for a previously loaded
- file compare the local_sym_name not the filename, as the
- filename might have been transformed via the search directory
- path lookup.
- If the sought-for file has not been found in the input file
- chain then create a new node with the search_dirs_flag set so
- that the entire set of directory paths will be scanned for it.
-
-2003-10-30 Andrew Cagney <cagney@redhat.com>
-
- * emultempl/pe.em, pe-dll.c: Replace "struct symbol_cache_entry"
- with "struct bfd_symbol".
-
-2003-10-30 Phil Edwards <phil@codesourcery.com>
-
- * Makefile.am (ALL_EMULATIONS): Add elf32mipswindiss.o.
- (eelf32mipswindiss.c): New target.
- * Makefile.in: Regenerated.
- * emulparams/elf32mipswindiss.sh: New file.
- * configure.tgt (i[3-7]86-*-vxworks*, arm-*-vxworks, sh-*-vxworks,
- mips*-*-vxworks*): Use ELF now.
- (mips*-*-windiss): New stanza, use elf32mipswindiss.
-
-2003-10-27 Stephane Carrez <stcarrez@nerim.fr>
-
- * scripttempl/elfm68hc12.sc: Define eeprom memory region.
-
-2003-10-25 Kazu Hirata <kazu@cs.umass.edu>
-
- * ChangeLog-9197: Fix typos.
- * NEWS: Likewise.
- * ld.texinfo: Likewise.
- * ldlang.c: Fix comment typos.
-
-2003-10-24 H.J. Lu <hongjiu.lu@intel.com>
-
- * ldlang.c (lang_vers_match): Fix a typo.
-
-2003-10-24 H.J. Lu <hongjiu.lu@intel.com>
-
- * ldlang.c (lang_vers_match): Check demangled symbols.
-
-2003-10-24 H.J. Lu <hongjiu.lu@intel.com>
-
- * ldlang.c (lang_vers_match): Check "symbol" instead of
- "wildcard" and "pattern". Fix a typo.
- (lang_finalize_version_expr_head): Likewise.
- (lang_register_vers_node): Likewise.
- (realsymbol): New function.
- (lang_new_vers_pattern): Set "symbol" and remove "wildcard".
-
- * ldlex.l (V_IDENTIFIER): Allow '\\'.
-
-2003-10-24 Nick Clifton <nickc@redhat.com>
-
- * emultempl/m68hc1xelf.em (before_allocation): Add missing second
- parameter to lang_memory_region_lookup.
-
-2003-10-22 Jakub Jelinek <jakub@redhat.com>
-
- * ldlang.c: Include hashtab.h.
- (lang_vers_match_lang_c, lang_vers_match_lang_cplusplus,
- lang_vers_match_lang_java): Remove.
- (lang_vers_match): New function.
- (lang_new_vers_pattern): Initialize wildcard and mask
- fields, don't initialize match.
- (lang_new_vers_node): Use xcalloc. Adjust for globals and
- locals field type changes. Set match field.
- (version_expr_head_hash, version_expr_head_eq): New functions.
- (lang_finalize_version_expr_head): New function.
- (lang_register_vers_node): Call lang_finalize_version_expr_head.
- Search in hash table if not wildcard when looking for duplicates.
- * emultempl/ppc64elf.em (new_vers_pattern): Don't bother with
- duplicate checking. Initialize all fields of dot_entry from entry
- with the exception of pattern and next.
-
-2003-10-21 Nick Clifton <nickc@redhat.com>
-
- * ldlang.c (lang_memory_region_lookup): Add second parameter -
- create - which is true if the region is being created. Issue
- appropriate warning messages for finding and not finding
- already created regions.
- (lang_memory_default): Use DEFAULT_MEMORY_REGION.
- (lang_leave_overlay_section): Likewise.
- (lang_size_sections_1): Likewise.
- Pass second parameter to lang_memory_region_lookup.
- (lang_get_regions): Likewise.
- * ldlang.h (DEFAULT_MEMORY_REGION): Define.
- Update prototype for lang_memory_region_lookup.
- * ldgram.y: Pass second parameter to lang_memory_region_lookup.
- Use DEFAULT_MEMORY_REGION instead of "*default".
-
-2003-10-20 Andrew Cagney <cagney@redhat.com>
-
- * pe-dll.c: Replace "struct sec" with "struct bfd_section".
-
-2003-10-19 Marek Michalkiewicz <marekm@amelek.gda.pl>
-
- * Makefile.am: Remove old (before GCC 3.3) emulations for AVR
- target: avr1200, avr23xx, avr4433, avr44x4, avr85xx, avrmega103,
- avrmega161, avrmega603. Default to avr2.
- * Makefile.in: Regenerate.
- * configure.tgt: Likewise.
- * emulparams/avr1200.sh: Remove.
- * emulparams/avr23xx.sh: Remove.
- * emulparams/avr4433.sh: Remove.
- * emulparams/avr44x4.sh: Remove.
- * emulparams/avr85xx.sh: Remove.
- * emulparams/avrmega103.sh: Remove.
- * emulparams/avrmega161.sh: Remove.
- * emulparams/avrmega603.sh: Remove.
- * scripttempl/elf32avr.sc: Remove.
-
-2003-10-19 Andreas Schwab <schwab@suse.de>
-
- * emultempl/ticoff.em (gld_${EMULATION_NAME}_list_options): Add
- newline to message.
-
- * deffilep.y: Remove commas from %token lines.
-
-2003-10-18 Hans-Peter Nilsson <hp@bitrange.com>
-
- * emultempl/mmix-elfnmmo.em (mmix_before_allocation): Force linker
- relaxation always; don't exclude relocatable linking. Adjust for
- _bfd_mmix_prepare_linker_allocated_gregs renamed to
- _bfd_mmix_before_linker_allocation.
- (mmix_after_allocation): Adjust for
- _bfd_mmix_finalize_linker_allocated_gregs renamed to
- _bfd_mmix_after_linker_allocation.
- * scripttempl/mmo.sc: Use ADDR (.text), not . - SIZEOF (.text).
-
- * ldlang.c (lang_size_sections): Last, set _cooked_size for output
- sections.
-
-2003-10-16 Alan Modra <amodra@bigpond.net.au>
-
- * Makefile.am (GENSCRIPTS_EXTRA, GEN_EXTRA_DEPENDS): Remove. Use
- GENSCRIPTS and GEN_DEPENDS in place of these.
- * Makefile.in: Regenerate.
- * genscripts_extra.sh: Delete. Merge extra functionality to..
- * genscripts.sh: ..here.
-
- * emulparams/gld960.sh (TEXT_START_ADDR, TARGET_PAGE_SIZE): Define.
- * emulparams/gld960coff.sh (TEXT_START_ADDR, TARGET_PAGE_SIZE): Ditto.
- * emulparams/lnk960.sh (TEXT_START_ADDR, TARGET_PAGE_SIZE): Ditto.
- * emulparams/m88kbcs.sh (TEXT_START_ADDR, TARGET_PAGE_SIZE): Ditto.
- * emulparams/vanilla.sh (TEXT_START_ADDR, TARGET_PAGE_SIZE): Ditto.
-
-2003-10-16 Alan Modra <amodra@bigpond.net.au>
-
- * emultempl/ia64elf.em (gld${EMULATION_NAME}_after_parse): Don't
- use $EMULATION_NAME to call bfd function.
-
-2003-10-14 Danny Smith <dannysmith@users.sourceforge.net>
-
- * pe-dll.c (pe_implied_import_dll): Also scan .rdata sections
- to identify data symbols.
-
-2003-10-13 Richard Sandiford <rsandifo@redhat.com>
-
- * emulparams/elf32bmipn32-defs.sh (INITIAL_READONLY_SECTIONS): Move
- definition from elf64btsmip.sh.
- (TEXT_DYNAMIC): Likewise elf32btsmipn32.sh.
- * emulparams/elf32btsmipn32.sh (TEXT_DYNAMIC): Remove.
- * emulparams/elf64btsmip.sh (INITIAL_READONLY_SECTIONS): Remove.
- * emulparams/elf64bmip.sh (SHLIB_TEXT_START_ADDR): Define.
- (EXECUTABLE_SYMBOLS): Set __elf_header correctly for shared objects.
- Define __program_header_table in terms of __elf_header.
-
-2003-10-10 H.J. Lu <hongjiu.lu@intel.com>
-
- * Makefile.am (eelf64_ia64.c): Also depend on
- $(srcdir)/emultempl/ia64elf.em.
- * Makefile.in: Regenerated.
-
- * emulparams/elf64_ia64.sh (EXTRA_EM_FILE): Set to ia64elf.
-
- * emultempl/ia64elf.em: New.
-
-2003-10-12 Kaz Kojima <kkojima@rr.iij4u.or.jp>
-
- * emulparams/shelf32_nbsd.sh (OTHER_SECTIONS): Redefine.
-
-2003-10-11 Hans-Peter Nilsson <hp@bitrange.com>
-
- * ld.texinfo (Builtin Functions) <DEFINED>: Say that only symbols
- defined before the statement using DEFINED yield 1.
- * ldexp.c (fold_name) <case DEFINED>: In lang_first_phase_enum,
- call lang_track_definedness on symbol. In subsequent phases, use
- lang_symbol_definition_iteration and lang_statement_iteration to
- check whether the symbol was defined before the current statement.
- (exp_fold_tree) <case etree_assign et al>: Call
- lang_update_definedness before updating symbol type when setting
- symbol.
- * ldlang.c (lang_definedness_table): New variable.
- (lang_definedness_newfunc, lang_track_definedness)
- (lang_symbol_definition_iteration, lang_update_definedness): New
- functions.
- (lang_init): Initialize lang_definedness_table and
- lang_statement_iteration.
- (lang_finish): Destroy bfd_hash_table_free.
- (lang_size_sections): Increment lang_statement_iteration.
- (lang_do_assignments_1): New function with former
- lang_do_assignments contents. Change recursive calls to call this
- function.
- (lang_do_assignments): Evacuate contents. Increment
- lang_statement_iteration, then just call lang_do_assignments_1.
- * ldlang.h (struct lang_definedness_hash_entry)
- (lang_statement_iteration, lang_track_definedness)
- (lang_symbol_definition_iteration, lang_update_definedness):
- Declare.
-
-2003-10-09 H.J. Lu <hongjiu.lu@intel.com>
-
- * scripttempl/elf.sc (__executable_start): Provide.
-
-2003-10-09 Daniel Jacobowitz <drow@mvista.com>
-
- * emulparams/armelf.sh: Define NO_SMALL_DATA.
- * emulparams/armelf_linux.sh, emulparams/armelf_oabi.sh,
- emulparams/armnto.sh: Likewise.
-
-2003-10-08 Alexandre Oliva <aoliva@redhat.com>
-
- * ldlang.c (lang_size_sections_1): Use IGNORE_SECTION to tell
- whether to skip test for no memory region.
-
-2003-10-08 Nick Clifton <nickc@redhat.com>
-
- * lexsup.c (parse_args: OPTION_CALL_SHARED): Revise comment
- describing defaults. Change default to report unresolved symbols
- in object files as well.
-
-2003-10-08 Hans-Peter Nilsson <hp@bitrange.com>
-
- * ldexp.c (fold_name) <case DEFINED>: Set section of result to
- abs_output_section.
-
-2003-10-07 Bob Wilson <bob.wilson@acm.org>
-
- * emulparams/elf32xtensa.sh (OTHER_READONLY_SECTIONS,
- OTHER_READWRITE_SECTIONS, OTHER_SECTIONS): Set section addresses to
- zero for relocatable links.
-
-2003-10-07 John David Anglin <dave.anglin@nrc-cnrc.gc.ca>
-
- * configure.host (HOSTING_LIBS): Define for hppa*-*-linux*.
-
-2003-10-07 Nathan Sidwell <nathan@codesourcery.com>
-
- * ldwrite.c (unsplittable_name): New.
- (clone_section): Strip existing numeric suffix. Only truncate names
- for coff targets.
- (split_sections): Use unsplittable_name.
-
-2003-10-06 Nick Clifton <nickc@redhat.com>
-
- * lexsup.c (parse_args): Report unresolved symbols in shared
- libraries when creating a dynamic executable. This is a
- restoration of the default behaviour for previous versions of
- the linker.
-
-2003-10-06 Matt Thomas <matt@3am-software.com>
-
- * emulparams/hppanbsd.sh: Remove OUTPUT_FORMAT.
- * emulparams/hppaobsd.sh: Add OUTPUT_FORMAT="elf32-hppa".
-
-2003-10-06 Robert Millan <robertmh@gnu.org>
-
- * configure.tgt: Match GNU/KNetBSD with new knetbsd*-gnu triplet.
-
-2003-10-02 Ivan Warren <ivan@vmfacility.fr>
-
- * pe-dll.c (make_one): Correct sym def order & pick right sym for
- .idata$7 reloc.
-
-2003-09-30 Chris Demetriou <cgd@broadcom.com>
-
- * NEWS: Add an indication of the cutoff for 2.14.
-
-2003-09-30 Chris Demetriou <cgd@broadcom.com>
-
- * ldmain.c (get_emulation): Ignore "-mips64r2".
-
-2003-09-03 Robert Millan <robertmh@gnu.org>
-
- * configure.host: Match GNU/KFreeBSD with new kfreebsd*-gnu
- triplet.
- * configure.tgt: Likewise.
-
-2003-08-29 Jafa <jafa@silicondust.com>
-
- * emulparams/elf32ip2k.sh (TEMPLATE_NAME): Define.
-
-2003-08-21 Nick Clifton <nickc@redhat.com>
-
- * po/tr.po: Updated Turkish translation.
-
-2003-08-20 Nick Clifton <nickc@redhat.com>
-
- * ldmain.c: Initialise the new fields in bfd_link_info to
- NOT_YET_SET.
- * lexsup.c (enum option_values): New enum. Use this to
- replace the hand coded values for the long switch options.
- (ld_options): Add 'unresolved-symbols',
- 'warn-unresolved-symbols' and 'error-unresolved-symbols'.
- (parse_args): Handle the new switches. Set the values of
- unresolved_symbols_in_objects and
- unresolved_symbols_in_shared_libs appropriately. If they were
- not initialised by the command line, install default values.
- * emultempl/elf32.em (handle_option): Update OPTION_GROUP and
- -z defs to use the new fields in bfd_link_info.
- * ld.texinfo: Document the new switches.
- * NEWS: Mention this feature.
-
-2003-08-15 Dmitry Diky <diwil@mail.ru>
-
- * Makefile.am (GENSCRIPTS_EXTRA): New script definition which
- calls genscripts_extra.sh.
- Rearrange all msp430 depends using this script.
- * Makefile.in: Regenerate.
- * genscripts_extra.sh: New file: Similar to genscripts.sh, except
- that the script to be run to generate the emulations can be passed
- as an optional parameter instead of being computed from the
- emulation name.
- * emulparams/msp430all.sh: New file: Combine all msp430 subdevice
- definitions into one file.
- * emulparams/msp430x*.sh: Removed.
-
-2003-08-15 Nick Clifton <nickc@redhat.com>
-
- * ld.texinfo (Options): Put keywords for the -z option into a
- table. Add more text describing what the -z now option does.
-
-2003-08-14 Alan Modra <amodra@bigpond.net.au>
-
- * dep-in.sed: Remove libintl.h.
- * Makefile.am (POTFILES.in): Unset LC_COLLATE.
- * Makefile.in: Regenerate.
-
-2003-08-13 Alan Modra <amodra@bigpond.net.au>
-
- * genscripts.sh (libpath.exp): Only generate for first emulation.
- (LIB_PATH): Correct order of paths. Don't add $tool_lib when
- already present or when LIB_PATH is set to ":".
-
-2003-08-12 Ian Lance Taylor <ian@airs.com>
-
- * ldmain.c (undefined_symbol): Change parameter name from `fatal'
- to `error'. If only a warning, put warning in the reported
- string. Consistently set failure flag when not a warning.
-
-2003-08-08 Dmitry Diky <diwil@mail.ru>
-
- * Makefile.am: Add xW42 and xE42 parts. Sort MPU list according to
- gcc order.
- * Makefile.in: Regenerate.
- * configure.tgt: Add extra emulations.
- * emulparams/msp430xE423.sh: New file.
- * emulparams/msp430xE427.sh: New file.
- * emulparams/msp430xW425.sh: New file.
- * emulparams/msp430xE425.sh: New file.
- * emulparams/msp430xW423.sh: New file.
- * emulparams/msp430xW427.sh: New file.
-
-2003-08-07 Danny Smith <dannysmith@users.sourceforge.net>
-
- * emultempl/pe.em (gld_${EMULATION_NAME}_before_parse):
- Change second (cmdline) arg to lang_add_entry to FALSE.
- (set_pe_subsystem): Change second arg to lang_add_entry to TRUE.
-
-2003-08-05 Christian Groessler <chris@groessler.org>
- Jason Eckhardt <jle@rice.edu>
-
- * configure.tgt: Recognize new target i860-*-coff.
- * Makefile.am (ALL_EMULATIONS): Add ecoff_i860.o.
- (ecoff_i860.c): New rule.
- * emulparams/coff_i860.sh: New file.
- * scripttempl/i860coff.sc: New file.
- * Makefile.in: Regenerate.
-
-2003-08-04 Nick Clifton <nickc@redhat.com>
-
- * emultempl/elf32.em (before_allocation): Prepend "warning: "
- to messages produced for .gnu.warning.SYMBOL sections.
-
-2003-08-04 Alan Modra <amodra@bigpond.net.au>
-
- * emultempl/elf32.em (output_rel_find): Add "isdyn" param. Put
- .rel.dyn before other reloc sections. Don't stop looking for reloc
- sections on finding one that isn't allocated. Match .rel even when
- placing .rela and vice versa, when setting last_rel and
- last_rel_alloc for the first time. If no reloc sections in script,
- prefer allocated section over non-alloc.
- (gld${EMULATION_NAME}_place_orphan): Handle orphan .rel.dyn.
-
-2003-07-29 Kaz Kojima <kkojima@rr.iij4u.or.jp>
-
- * emulparams/shelf.sh (OTHER_SECTIONS): Don't include .stack
- section for shared library.
- * emulparams/shelf32.sh (OTHER_SECTIONS): Likewise.
- * emulparams/shelf64.sh (OTHER_SECTIONS): Likewise.
-
-2003-07-29 Stephane Carrez <stcarrez@nerim.fr>
-
- * scripttempl/elfm68hc12.sc: Add gcc_except_table.
- * scripttempl/elfm68hc11.sc: Likewise.
-
-2003-07-28 Alan Modra <amodra@bigpond.net.au>
-
- * emulparams/elf64ppc.sh (GOT): Fix for shell brace matching.
-
- * emulparams/elf64ppc.sh (GOT): Don't merge .toc into .got for ld -r.
-
-2003-07-27 Alan Modra <amodra@bigpond.net.au>
-
- * ld.texinfo: Typo fixes. Document SUBALIGN.
- * ldgram.y (opt_subalign): Add.
- * ldlex.l (SUBALIGN): Recognize.
- * ldlang.c (overlay_subalign): New var.
- (lang_enter_overlay): Add subalign param.
- (lang_enter_overlay_section): Pass overlay_subalign to
- lang_enter_output_section_statement.
- * ldlang.h (lang_enter_overlay): Update.
-
-2003-07-24 Nick Clifton <nickc@redhat.com>
-
- * po/fr.po: Updated French translation.
-
-2003-07-23 Stephane Carrez <stcarrez@nerim.fr>
-
- * scripttempl/elfm68hc11.sc: Keep ctor/dtor sections; Take into
- account .tramp sections;
- * scripttempl/elfm68hc12.sc: Likewise.
-
-2003-07-17 Charles Wilson <cwilson@ece.gatech.edu>
-
- * ld/pe-dll.c: Add libcygwin to autofilter_liblist[]
-
-2003-07-17 Nick Clifton <nickc@redhat.com>
-
- * po/es.po: New Spanish translation.
-
-2003-07-11 Alan Modra <amodra@bigpond.net.au>
-
- * po/ld.pot: Regenerate.
-
-2003-07-10 Bob Wilson <bob.wilson@acm.org>
-
- * emulparams/elf32xtensa.sh (OTHER_READONLY_SECTIONS): Replace .xt.lit
- with new .got.loc section.
- (OTHER_READWRITE_SECTIONS): Do not combine linkonce sections for
- non-relocating links.
- (OTHER_SECTIONS): Add .xt.lit here. Change it to keep linkonce
- sections separate for non-relocating links; likewise for .xt.insn.
-
-2003-07-10 Alexandre Oliva <aoliva@redhat.com>
-
- 2001-08-22 Alexandre Oliva <aoliva@redhat.com>
- * emulparams/elf32am33lin.sh: Adjust to match kernel parameters.
- 2001-05-09 Alexandre Oliva <aoliva@redhat.com>
- * configure.host (am33_2.0-*-linux*): Added.
- * configure.tgt (am33_2.0-*-linux*): Likewise.
- * emulparams/elf32am33lin.sh: New.
- * Makefile.am (eelf32am33lin.c): New rule.
- * Makefile.in: Rebuilt.
-
-2003-07-09 Alexandre Oliva <aoliva@redhat.com>
-
- 2001-04-17 Alexandre Oliva <aoliva@redhat.com>
- * emulparams/mn10300.sh (TEMPLATE_NAME): Define.
- (GENERATE_SHLIB_SCRIPT): Likewise.
-
-2003-07-10 Alan Modra <amodra@bigpond.net.au>
-
- * emulparams/elf64ppc.sh (OTHER_GOT_SECTIONS): Don't define.
- (GOT): Define.
- * emultempl/ppc64elf.em (stub_added): New static var.
- (ppc_create_output_section_statements): Call ppc64_elf_init_stub_bfd.
- (ppc_add_stub_section): Set stub_added.
- (gld${EMULATION_NAME}_finish): Look for .got rather than .toc. Adjust
- ppc64_elf_size_stubs call and test for stubs.
- * scripttempl/elf.sc (GOT): Define and use.
-
-2003-07-08 J"orn Rennecke <joern.rennecke@superh.com>
-
- * emultempl/sh64elf.em (sh64_elf_${EMULATION_NAME}_after_allocation):
- Allow second call from ldemul_finish.
-
-2003-07-04 J"orn Rennecke <joern.rennecke@superh.com>
-
- * emulparams/shelf32.sh (STACK_ADDR): Don't define.
- (OTHER_SECTIONS): Include .stack.
- * emulparams/shelf64.sh (OTHER_SECTIONS): Likewise.
-
-2003-07-02 Jakub Jelinek <jakub@redhat.com>
-
- * emulparams/elf64_ia64.sh (OTHER_READONLY_SECTIONS): Don't include
- .opd if -pie.
- (OTHER_READWRITE_SECTIONS): Include .opd if -pie.
- * scripttempl/elf.sc: Use SHLIB_DATA_ADDR instead of DATA_ADDR
- if -pie.
-
-2003-06-28 Alan Modra <amodra@bigpond.net.au>
-
- * ld.h: Convert to C90, remove unnecessary prototypes and casts.
- Replace PTR with void *. Formatting.
- * ldcref.c: Likewise.
- * ldctor.c: Likewise.
- * ldctor.h: Likewise.
- * ldemul.h: Likewise.
- * ldexp.c: Likewise.
- * ldexp.h: Likewise.
- * ldfile.c: Likewise.
- * ldfile.h: Likewise.
- * ldlang.c: Likewise.
- * ldlang.h: Likewise.
- * ldlex.h: Likewise.
- * ldlex.l: Likewise.
- * ldmain.c: Likewise.
- * ldmain.h: Likewise.
- * ldmisc.c: Likewise.
- * ldmisc.h: Likewise.
- * ldver.h: Likewise.
- * ldwrite.c: Likewise.
- * ldwrite.h: Likewise.
- * lexsup.c: Likewise.
- * mri.c: Likewise.
- * mri.h: Likewise.
- * pe-dll.c: Likewise.
- * pe-dll.h: Likewise.
- * deffilep.y: Likewise.
- * deffile.h: Likewise. Don't include ansidecl.h.
- * emulparams/elf32mcore.sh: Remove unnecessary cast.
- * emultempl/m68kcoff.em: Likewise.
- * emultempl/m68kelf.em: Likewise.
- * emultempl/ticoff.em: Remove lang_add_output_format declaration.
- * sysdep.h: Don't include ansidecl.h.
- * Makefile.am: Run "make dep-am".
- * Makefile.in: Regenerate.
-
-2003-06-27 Nick Clifton <nickc@redhat.com>
-
- * deffilep.y (def_file_add_directive): Cope with NUL seperated
- directives. Fix reporting of unparseable directives.
- (def_error): Check for a NULL def_filename.
-
-2003-06-27 Alan Modra <amodra@bigpond.net.au>
-
- * emultempl/aix.em: Convert to C90, remove unnecessary prototypes
- and casts. Replace PTR with void *. Formatting.
- * emultempl/alphaelf.em: Likewise.
- * emultempl/armcoff.em: Likewise.
- * emultempl/armelf.em: Likewise.
- * emultempl/armelf_oabi.em: Likewise.
- * emultempl/beos.em: Likewise.
- * emultempl/elf32.em: Likewise.
- * emultempl/generic.em: Likewise.
- * emultempl/gld960.em: Likewise.
- * emultempl/gld960c.em: Likewise.
- * emultempl/hppaelf.em: Likewise.
- * emultempl/linux.em: Likewise.
- * emultempl/lnk960.em: Likewise.
- * emultempl/m68hc1xelf.em: Likewise.
- * emultempl/m68kcoff.em: Likewise.
- * emultempl/m68kelf.em: Likewise.
- * emultempl/mipsecoff.em: Likewise.
- * emultempl/mipself.em: Likewise.
- * emultempl/mmix-elfnmmo.em: Likewise.
- * emultempl/mmixelf.em: Likewise.
- * emultempl/mmo.em: Likewise.
- * emultempl/needrelax.em: Likewise.
- * emultempl/netbsd.em: Likewise.
- * emultempl/pe.em: Likewise.
- * emultempl/sh64elf.em: Likewise.
- * emultempl/sunos.em: Likewise.
- * emultempl/ticoff.em: Likewise.
- * emultempl/vanilla.em: Likewise.
- * emultempl/xtensaelf.em: Likewise.
- * Makefile.am: Correct dependencies.
- * Makefile.in: Regenerate.
-
-2003-06-25 Alan Modra <amodra@bigpond.net.au>
-
- * ld.texinfo: Correct spelling of "relocatable".
- * ldctor.c: Likewise.
- * ldexp.c: Likewise.
- * ldfile.c: Likewise.
- * ldint.texinfo: Likewise.
- * ldlang.c: Likewise.
- * ldmain.c: Likewise.
- * ldwrite.c: Likewise.
- * lexsup.c: Likewise.
- * emultempl/aix.em: Likewise.
- * emultempl/alphaelf.em: Likewise.
- * emultempl/armcoff.em: Likewise.
- * emultempl/armelf_oabi.em: Likewise.
- * emultempl/beos.em: Likewise.
- * emultempl/elf32.em: Likewise.
- * emultempl/generic.em: Likewise.
- * emultempl/gld960.em: Likewise.
- * emultempl/gld960c.em: Likewise.
- * emultempl/hppaelf.em: Likewise.
- * emultempl/linux.em: Likewise.
- * emultempl/lnk960.em: Likewise.
- * emultempl/m68hc1xelf.em: Likewise.
- * emultempl/m68kcoff.em: Likewise.
- * emultempl/m68kelf.em: Likewise.
- * emultempl/mipsecoff.em: Likewise.
- * emultempl/mipself.em: Likewise.
- * emultempl/mmix-elfnmmo.em: Likewise.
- * emultempl/mmo.em: Likewise.
- * emultempl/needrelax.em: Likewise.
- * emultempl/pe.em: Likewise.
- * emultempl/ppc64elf.em: Likewise.
- * emultempl/sh64elf.em: Likewise.
- * emultempl/sunos.em: Likewise.
- * emultempl/ticoff.em: Likewise.
- * emultempl/xtensaelf.em: Likewise.
-
-2003-06-24 Alan Modra <amodra@bigpond.net.au>
-
- * emultempl/ppc32elf.em: Convert to C90.
-
-2003-06-20 Alan Modra <amodra@bigpond.net.au>
-
- * emultempl/ppc64elf.em: Convert to C90 function definitions, remove
- unnecessary prototypes and casts.
-
-2003-06-19 Alan Modra <amodra@bigpond.net.au>
-
- * emultempl/ppc64elf.em (gld${EMULATION_NAME}_finish): Dump out
- statistics from ppc64_elf_build_stubs.
-
-2003-06-19 Alan Modra <amodra@bigpond.net.au>
-
- * emultempl/ppc64elf.em (build_section_lists): Check return status
- from ppc64_elf_next_input_section.
-
-2003-06-17 H.J. Lu <hongjiu.lu@intel.com>
-
- * ldlang.c (section_already_linked): Put back assignment of
- kept_section.
-
-2003-06-17 Rainer Keuchel <rkeuchel@allgeier.com>
-
- * pe-dll.c (generate_reloc): Catch and ignore an ARM_26D
- reloc.
-
-2003-06-17 Loren James Rittle <rittle@latour.rsch.comm.mot.com>
-
- * configure.host (*-*-freebsd*): Add known path for ld-elf.so.1
- if not produced by gcc.
-
-2003-06-16 Hans-Peter Nilsson <hp@axis.com>
-
- * configure.tgt: Add specific case for cris-*-linux-gnu*
- with crislinux emulation only.
-
-2003-06-13 Robert Millan <zeratul2@wanadoo.es>
-
- * configure.tgt: Add i386-netbsd-gnu target.
-
-2003-06-12 Richard Sandiford <rsandifo@redhat.com>
-
- * configure.tgt (mips*-sgi-irix6*): Add the o32 and n64 emulations
- to $targ_extra_libpath.
-
-2003-06-11 H.J. Lu <hongjiu.lu@intel.com>
-
- * po/Make-in (DESTDIR): New.
- (install-data-yes): Support $(DESTDIR).
- (uninstall): Likewise.
-
-2003-06-10 Doug Evans <dje@sebabeach.org>
-
- * Makefile.am (ALL_EMULATIONS): Add em32relf.o.
- * Makefile.in: Regenerate.
-
-2003-06-10 Richard Sandiford <rsandifo@redhat.com>
-
- * configure.tgt (h8300*): Add h8300sxn emulations.
- * Makefile.am (ALL_EMULATIONS): Add eh8300sxn.o and eh8300sxnelf.o.
- (eh8300sxn.c, eh8300sxnelf.c): New rules.
- * Makefile.in: Regenerate.
- * emulparams/h8300sxnelf.sh, emulparams/h8300sxn.sh: New files.
- * scripttempl/h8300sxn.sc: New file.
-
-2003-06-10 Alan Modra <amodra@bigpond.net.au>
-
- * emulparams/elf64ppc.sh (EXECUTABLE_SYMBOLS, OTHER_BSS_END_SYMBOLS,
- CTOR_START, CTOR_END, DTOR_START, DTOR_END): Don't define.
-
-2003-06-08 Alan Modra <amodra@bigpond.net.au>
-
- * emultempl/ppc64elf.em (emit_stub_syms, toc_section): New vars.
- (build_toc_list): New function.
- (gld${EMULATION_NAME}_finish): Call build_toc_list and
- ppc64_elf_reinit_toc. Adjust ppc64_elf_build_stubs call.
- (OPTION_STUBSYMS): Define.
- (PARSE_AND_LIST_LONGOPTS): Add emit-stub-syms.
- (PARSE_AND_LIST_OPTIONS): Document.
- (PARSE_AND_LIST_ARGS_CASES): Handle.
-
-2003-06-05 Roland McGrath <roland@redhat.com>
-
- * emultempl/elf32.em (gld${EMULATION_NAME}_list_options): Remove
- extra \t in -z noexecstack line.
-
-2003-05-23 Jakub Jelinek <jakub@redhat.com>
-
- * ldgram.y (phdr_type): Grok PT_GNU_STACK.
- * emultempl/elf32.em (gld${EMULATION_NAME}_handle_option): Add
- -z execstack and -z noexecstack.
- (gld${EMULATION_NAME}_list_options): Likewise.
- * scripttempl/elf.sc: If not -r, discard .note.GNU-stack section.
-
-2003-06-03 Michael Snyder <msnyder@redhat.com>
- and Bernd Schmidt <bernds@redhat.com>
- and Alexandre Oliva <aoliva@redhat.com>
-
- * Makefile.am: Add new emulations for h8300sx.
- * Makefile.in: Regenerate.
- * configure.tgt: Add new emulations.
- * emulparams/h8300sx.sh: New emulation.
- * emulparams/h8300sxelf.sh: Ditto.
- * scripttempl/h8300sx.sc: Ditto.
-
-2003-06-03 H.J. Lu <hongjiu.lu@intel.com>
-
- * ldmisc.c: Include "bfdlink.h".
- (error_handler): Handle LD_DEFINITION_IN_DISCARDED_SECTION
- and -LD_DEFINITION_IN_DISCARDED_SECTION.
-
- * Makefile.am: Rebuild dependency.
- * Makefile.in: Regenerated.
-
-2003-06-03 Kaz Kojima <kkojima@rr.iij4u.or.jp>
-
- * emulparams/shlelf_linux.sh (GENERATE_PIE_SCRIPT): Set to yes.
- * emulparams/shlelf32_linux.sh (GENERATE_PIE_SCRIPT): Likewize.
-
-2003-06-02 Fabrizio Gennari <fabrizio.ge@tiscalinet.it>
-
- * pe-dll.c (fill_edata): Scan table pe_dll->exports, which is
- sorted alphabetically, instead of exported_symbols, which is
- sorted by ordinal.
-
-2003-05-30 Ulrich Drepper <drepper@redhat.com>
- Jakub Jelinek <jakub@redhat.com>
-
- * lexsup.c (OPTION_PIE): Define.
- (ld_options): Add -pie and --pic-executable options.
- (parse_args): Handle OPTION_PIE.
- * ldmain.c (main): Initialize link_info.pie and
- link_info.executable.
- * genscripts.sh: Generate PIE scripts.
- * ld.texinfo: Document -pie and --pic-executable options.
- * emultempl/elf32.em (gld${EMULATION_NAME}_after_open):
- (gld${EMULATION_NAME}_place_orphan): Likewise.
- (gld${EMULATION_NAME}_get_script): Include PIE scripts.
- * scripttempl/elf.sc: In PIE scripts set . the same way as in
- shared scripts.
- * emulparams/elf_i386.sh (GENERATE_PIE_SCRIPT): Set to yes.
- * emulparams/elf64_ia64.sh (GENERATE_PIE_SCRIPT): Likewise.
- * emulparams/elf32ppc.sh (GENERATE_PIE_SCRIPT): Likewise.
- * emulparams/elf64ppc.sh (GENERATE_PIE_SCRIPT): Likewise.
- * emulparams/elf_x86_64.sh (GENERATE_PIE_SCRIPT): Likewise.
- * emulparams/elf_s390.sh (GENERATE_PIE_SCRIPT): Likewise.
- * emulparams/elf32_sparc.sh (GENERATE_PIE_SCRIPT): Likewise.
- * emulparams/elf64_sparc.sh (GENERATE_PIE_SCRIPT): Likewise.
- * emulparams/elf64alpha.sh (GENERATE_PIE_SCRIPT): Likewise.
- * emulparams/elf64_s390.sh (GENERATE_PIE_SCRIPT): Likewise.
- * emulparams/elf_i386.sh (GENERATE_PIE_SCRIPT): Likewise.
-
-2003-05-30 H.J. Lu <hongjiu.lu@intel.com>
-
- * genscripts.sh: Create tmpdir/libpath.exp.
-
-2003-05-30 Nick Clifton <nickc@redhat.com>
-
- * emultempl/armelf.em (arm_elf_before_allocation): Replace ASSERT
- with a test for a NULL bfd_for_interworking.
-
-2003-05-29 Jason Thorpe <thorpej@wasabisystems.com>
-
- * configure.host (*-*-netbsd*): Set HOSTING_CRT0 and HOSTING_LIBS
- correctly for more recent versions of NetBSD.
- (alpha*-*-netbsd*): Remove.
- (i[3-7]86-*-netbsd*): Remove.
-
-2003-05-29 Nick Clifton <nickc@redhat.com>
-
- * emultempl/pe.em: Include "safe-ctype.h" instead of <ctype.h>.
-
-2003-05-26 Maciej W. Rozycki <macro@ds2.pg.gda.pl>
-
- * emulparams/elf64btsmip.sh: Set TEXT_START_ADDR to 0x120000000 to
- trap on pointer crops.
-
-2003-05-21 Marcus Comstedt <marcus@mc.pp.se>
-
- * configure.tgt: Check for a target triplet of shl-...-netbsdelf
- as well as shle-...-netbsdelf.
-
-2003-05-16 Kelley Cook <kelleycook@wideopenwest.com>
-
- * configure.host: Accept i[3-7]86 variants.
- * configure.tgt: Likewise.
-
-2003-05-15 H.J. Lu <hongjiu.lu@intel.com>
-
- * emulparams/elf64_ia64.sh: Don't set COMMONPAGESIZE for now.
-
-2003-05-09 Daniel Jacobowitz <drow@mvista.com>
-
- * Makefile.am (ALL_EMULATIONS): Add earmelfb.o and earmelfb_linux.o.
- (earmelfb.c, earmelfb_linux.c): New rules.
- * Makefile.in: Regenerated.
- * emulparams/armelfb.sh, emulparams/armelfb_linux.sh: New files.
- * configure.tgt: Add armeb-elf and arm*b-*-linux-gnu.
-
-2003-05-09 Nick Clifton <nickc@redhat.com>
-
- * ldlang.c (lang_size_sections_1): Default to generating a
- fatal error message if a loadable section is not allocated
- to a memory region when regions are defined.
-
-2003-05-09 Alan Modra <amodra@bigpond.net.au>
-
- * Makefile.am (em68hc11elf.c): Correct dependencies.
- (em68hc11elfb.c, em68hc12elf.c, em68hc12elfb.c): Likewise.
- * Makefile.in: Regenerate.
- * emultempl/elf32.em (find_exp_assignment): Adjust for changed
- bfd_elf_record_link_assignment name.
-
-2003-05-07 Alexandre Oliva <aoliva@redhat.com>
-
- * ldmain.h (overflow_cutoff_limit): Declare.
- * ldmain.c (overflow_cutoff_limit): Define, initialized to 10.
- (reloc_overflow): Limit error messages based on it.
- * lexsup.c (parse_args) <OPTION_VERBOSE>: Set cutoff to
- unlimited.
-
-2003-05-05 Alan Modra <amodra@bigpond.net.au>
-
- * ldlex.l: Accept C style comments in version scripts.
-
-2003-04-28 H.J. Lu <hjl@gnu.org>
-
- * ldlang.c (lang_process): Add the relax finalize pass.
-
- * ldmain.c (main): Initialize link_info.relax_finalizing to
- FALSE.
-
-2003-04-24 Roland McGrath <roland@redhat.com>
-
- * ldgram.y (phdr_type): Grok PT_TLS and PT_GNU_EH_FRAME names.
- If a name string is unknown, give an error rather than crashing later.
-
-2003-04-23 Dhananjay Deshpande <dhananjayd@kpitcummins.com>
-
- * Makefile.am (ALL_EMULATIONS): Add eh8300hn.o, eh8300sn.o,
- eh8300hnelf.o, eh8300snelf.o and respective rules.
- * Makefile.in: Regenerate.
- * configure.tgt: Add h8300hn, h8300sn, h8300hnelf, h8300snelf
- * emulparams/h8300hn.sh: New
- * emulparams/h8300sn.sh: New
- * emulparams/h8300hnelf.sh: New
- * emulparams/h8300snelf.sh: New
- * scripttempl/h8300hn.sc: new
- * scripttempl/h8300sn.sc: new
-
-2003-04-23 H.J. Lu <hjl@gnu.org>
-
- * ldmain.c (link_callbacks): Initialize error_handler.
-
- * ldmisc.c (error_handler): New function.
-
- * ldmisc.h (error_handler): New prototype.
-
-2003-04-21 Stephane Carrez <stcarrez@nerim.fr>
-
- * emulparams/m68hc11elf.sh: Use m68hc1xelf.em extra.
- * emulparams/m68hc11elfb.sh: Likewise.
- * emulparams/m68hc12elf.sh: Likewise.
- * emulparams/m68hc12elfb.sh: Likewise.
-
-2003-04-19 Stephane Carrez <stcarrez@nerim.fr>
-
- * emultempl/m68hc1xelf.em: New file to generate far trampolines on
- 68HC11 and 68HC12.
- (LDEMUL_BEFORE_ALLOCATION): Override to gather the trampolines to
- generate.
- (LDEMUL_FINISH): Override to generate the trampolines after gc and
- linker relaxation.
- (LDEMUL_CREATE_OUTPUT_SECTION_STATEMENTS): Override to create the
- stub file for trampolines.
- (PARSE_AND_LIST_OPTIONS, PARSE_AND_LIST_LONGOPTS): New options
- --no-trampoline and --bank-window to control the memory bank window.
-
-2003-04-18 H.J. Lu <hjl@gnu.org>
-
- * ldfile.c (ldfile_add_library_path): Remove the unused
- variable.
-
-2003-04-18 Andrew Haley <aph@cambridge.redhat.com>
-
- * scripttempl/xstormy16.sc (__data, __rdata): New.
-
-2003-04-16 Nick Clifton <nickc@redhat.com>
-
- * scripttempl/xstormy16.sc: Add .jcr section mapping.
-
-2003-04-15 H.J. Lu <hjl@gnu.org>
-
- From Debian by Jack Howarth <howarth@nitro.med.uc.edu>:
-
- * ldlex.l: Use YY_CURRENT_BUFFER instead of yy_current_buffer.
-
-2003-04-15 Rohit Kumar Srivastava <rohits@kpitcummins.com>
-
- * h8-doc.texi: Replace occurrances of 'Hitachi' with 'Renesas'.
- * ld.texinfo: Likewise.
-
-2003-04-14 Alan Modra <amodra@bigpond.net.au>
-
- From Prashanth Tamraparni <prashanth_t@in.ibm.com>
- * scripttempl/elf.sc (CTOR): Handle crtbeginS.o, crtendS.o and
- other variants of crtbegin.o, crtend.o.
- (DTOR): Likewise.
- * scripttempl/crisaout.sc (ctors, dtors): Likewise.
- * scripttempl/elf_chaos.sc (CTOR, DTOR): Likewise.
- * scripttempl/elfd10v.sc (CTOR, DTOR): Likewise.
- * scripttempl/elfd30v.sc (CTOR, DTOR): Likewise.
- * scripttempl/elfxtensa.sc (CTOR, DTOR): Likewise.
- * scripttempl/iq2000.sc (CTOR, DTOR): Likewise.
- * scripttempl/mmo.sc (ctors, dtors): Likewise.
- * scripttempl/xstormy16.sc (CTOR, DTOR): Likewise.
-
-2003-04-09 Dmitry Diky <diwil@mail.ru>
-
- * scripttempl/elf32msp430.sc: Add initX, finiX, ctors, dtors
- sections to respect C++ constructor/destructor. Add ctors/dtors
- start/stop definitions.
- * scripttempl/elf32msp430_3.sc: Likewise.
-
-2003-04-06 Nick Clifton <nickc@redhat.com>
-
- * ld.texinfo (Options): Add a reminder of the target specific
- nature to the description of the i386 PE specific options, for
- readers who have not read all the way through the manual.
-
-2003-04-04 Svein E. Seldal <Svein.Seldal@solidas.com>
-
- * configure.tgt: Fixed bug in list of targ_extra_emuls.
- * emulparams/tic3xcoff.sh (SCRIPT_NAME): Namespace
- cleanup. Replace s/c4x/tic4x and s/c3x/tic3x/
- * emulparams/tic3xcoff_onchip.sh: Ditto
- * emulparams/tic4xcoff.sh: Ditto
- * scripttempl/tic4xcoff.sc: Ditto
-
-2003-04-03 Nick Clifton <nickc@redhat.com>
-
- * NEWS: Mention support for Xtensa architecture.
-
-2003-04-02 Nick Clifton <nickc@redhat.com>
-
- * pe-dll.c (pe_detail_list): arm-pe targets use underscores.
-
-2003-04-01 Danny Smith <dannysmith@users.sourceforge.net>
-
- * emultempl/pe.em (gld_${EMULATION_NAME}_after_open):
- Don't call pe_dll_build_section() if link_info.relocateable.
- (gld_${EMULATION_NAME}_finish): Don't call pe_dll_fill_sections()
- if link_info.relocateable.
-
-2003-04-01 Fabrizio Gennari <fabrizio.ge@tiscalinet.it>
-
- * pe-dll.c (process_def_file): Don't create an export
- section if there are no exports and we're building an exe
- (pe_dll_build_sections): Ditto
- (pe_dll_fill_sections): Conditionalize setting
- abfd->dll true on info->shared
- * emultempl/pe.em (gld_${EMULATION_NAME}_after_open):
- If i386pe or armpe, call pe_dll_build_section()
- for both exe's and dll's, not just dll's.
- (gld_${EMULATION_NAME}_finish): For all targets except
- shpe and mipspe, call pe_dll_fill_sections() for both
- exe's and dll's, not just dll's.
-
-2003-04-02 Bob Wilson <bob.wilson@acm.org>
-
- * emulparams/xtensa-config.sh: Remove comment indicating that this is
- a generated file.
-
-2003-04-01 Bob Wilson <bob.wilson@acm.org>
-
- * Makefile.am (ALL_EMULATIONS): Add eelf32xtensa.o.
- (eelf32xtensa.c): New target.
- * Makefile.in: Regenerate.
- * configure.tgt: Handle xtensa-*-*.
- * gen-doc.texi: Set XTENSA variable.
- * ld.texinfo: Set XTENSA variable. Add new Xtensa node.
- * emulparams/elf32xtensa.sh: New file.
- * emulparams/xtensa-config.sh: Likewise.
- * emultempl/xtensaelf.em: Likewise.
- * scripttempl/elfxtensa.sc: Likewise.
-
-2003-04-01 Jakub Jelinek <jakub@redhat.com>
-
- * configure.tgt (powerpc*-*-linux*): Add elf32ppc to ppc64
- targ_extra_libpath. Add elf64ppc to ppc targ_extra_libpath
- if --enable-64-bit-bfd.
-
-2003-04-01 Nick Clifton <nickc@redhat.com>
-
- * emulparams/armelf.sh (OTHER_READONLY_SECTIONS): Change name of
- note section.
- * emulparams/armelf_linux.sh (OTHER_READONLY_SECTIONS): Change
- name of note section.
-
-2003-03-31 Alexandre Oliva <aoliva@redhat.com>
-
- * ld.texinfo (-Tbss, -Tdata, -Ttext): Document in terms of
- --section-start.
-
-2003-03-31 David Heine <dlheine@suif.stanford.edu>
-
- * ldfile.c (ldfile_add_library_path): Always allocate space for
- the filename.
- * ldlang.c (lang_register_vers_node): Free the node if it cannot
- be used.
- * ldmain.c (set_scripts_dir): Always free the constructed
- directory name.
- (add_keepsyms_file): Fix memory leak.
- * ldmisc.c (vfinfo): Likewise.
- * lexsup.c (parse_args): Likewise.
-
-2003-03-25 Stan Cox <scox@redhat.com>
- Nick Clifton <nickc@redhat.com>
-
- Contribute support for Intel's iWMMXt chip - an ARM variant:
-
- * emulparams/armelf.sh (OTHER_READONLY_SECTIONS): Define.
- * emulparams/armelf_linux.sh (OTHER_READONLY_SECTIONS): Define.
- * scripttempl/armcoff.sc (.data): Ensure 8 byte alignment.
- (.bss): Likewise.
-
-2003-03-25 Alexandre Oliva <aoliva@redhat.com>
-
- * ldmain.h (ld_canon_sysroot, ld_canon_sysroot_len): Declare.
- * ldmain.c (ld_canon_sysroot, ld_canon_sysroot_len): Define.
- (main): Initialize them.
- * ldfile.c: Include pathnames.h.
- (is_sysrooted_pathname): New.
- (ldfile_add_library_path): Use it.
- (ldfile_open_file_search): Likewise. Use IS_ABSOLUTE_PATH. Don't
- search_dirs if given an absolute pathname.
- (ldfile_open_file): Issue error message for sysrooted
- absolute pathnames.
- * Makefile.am: Updated dependencies.
- * Makefile.in: Rebuild.
-
-2003-03-24 Daniel Néri <dne@mayonnaise.net>
-
- * ld.texinfo: Rename all occurances of C54X to TIC54X.
-
-2003-03-19 Andreas Schwab <schwab@suse.de>
-
- * ldfile.c (ldfile_try_open_bfd): Pop lexer start condition after
- eof.
-
-2003-03-18 Danny Smith <dannysmith@users.sourceforge.net>
-
- * deffilep.y (opt_base): If no number given, set to default
- (-1), not 0.
-
-2003-03-13 Danny Smith <dannysmith@users.sourceforge.net>
-
- * deffilep.y (def_import): Use default extension of "dll"
- if no extension provided in parsed IMPORT definition.
-
- * deffilep.y (def_lex): Revert 2003-03-12 change.
- (dot_name): New id type and rule.
- (expline): Use instead of ID.
- (opt_equal_name): Likewise.
-
-2003-03-12 Danny Smith <dannysmith@users.sourceforge.net>
-
- * deffilep.y (def_lex): Accept '.' as valid non-lead char.
-
-2003-03-07 Christopher Faylor <cgf@redhat.com>
-
- * configure.tgt: Add NATIVE_LIB_DIRS for cygwin target back after
- apparent accidental removal on 2003-01-06.
-
-2003-03-04 Dmitry Diky <diwil@mail.ru>
-
- * Makefile.am: Add new devices x1122 x1132 emulation
- * configure.tgt: Likewise.
- * Makefile.in: Regenerate.
- * emulparams/msp430x1122.sh: New file.
- * emulparams/msp430x1132.sh: New file.
-
-2003-03-03 Alexandre Oliva <aoliva@redhat.com>
-
- * ldmain.c (set_scripts_dir): Look for relative to TOOLBINDIR as
- well.
-
- * ldfile.h (struct search_dirs): Added sysrooted field.
- * ldlang.h (struct lang_input_statement_struct): Likewise.
- * ldfile.c (ldfile_add_library_path): Mark sysrooted paths.
- (ldfile_open_file_search): Look for sysrooted filename starting
- with / in ld_sysroot instead of in the current directory. Clear
- sysrooted flag if it's found in the current directory. Set it
- from the search directory's sysrooted flag where it is found
- otherwise.
- * ldlang.c (ldlang_sysrooted_script): New static variable.
- (new_afile): Mark search_file_enums as sysrooted if
- ldlang_sysrooted_script.
- (load_symbols): Set ldlang_sysrooted_script according to the
- script's sysrooted field while processing it.
- * ld.texinfo: Document INPUT behavior in sysroot.
-
-2003-03-02 Danny Smith <dannysmith@users.sourceforge.net>
-
- * scripttempl/pe.sc: Use PROVIDE with etext, end, _end,
-
-2003-03-03 Alan Modra <amodra@bigpond.net.au>
-
- * emulparams/elf64alpha.sh (EXTRA_EM_FILE): Define.
- (PARSE_AND_LIST_PROLOGUE, PARSE_AND_LIST_LONGOPTS,
- PARSE_AND_LIST_OPTIONS, PARSE_AND_LIST_ARGS_CASES,
- PARSE_AND_LIST_EPILOGUE): Don't define.
- * emultempl/alphaelf.em: New file.
-
-2003-03-01 Alan Modra <amodra@bigpond.net.au>
-
- * ldemul.c: Include getopt.h.
- * emultempl/elf32.em: Include getopt.h earlier.
- * emultempl/ticoff.em: Likewise.
-
-2003-02-28 Alan Modra <amodra@bigpond.net.au>
-
- * emultempl/elf32.em (gld${EMULATION_NAME}_get_script): Add combreloc
- support when scripts read from files.
-
-2003-02-28 Alan Modra <amodra@bigpond.net.au>
-
- * ldemul.c (ldemul_parse_args): Return FALSE by default.
- * ldemul.h (struct ld_emulation_xfer_struct): Update parse_args
- comment.
-
- * ldemul.c (ldemul_add_options, ldemul_handle_option): New functions.
- (ldemul_parse_args): Return bfd_boolean. Formatting.
- * ldemul.h (ldemul_add_options, ldemul_handle_option): Declare.
- (ldemul_parse_args): Adjust.
- (struct ld_emulation_xfer_struct): Add add_options and handle_option.
- Return bfd_boolean from parse_args.
- * lexsup.c (parse_args): Malloc shortopts, longopts and
- really_longopts. Call ldemul_add_options and ldemul_handle_option.
- * emultempl/aix.em (gld${EMULATION_NAME}_add_options): Split out from
- gld${EMULATION_NAME}_parse_args.
- (gld${EMULATION_NAME}_handle_option): Likewise.
- (ld_${EMULATION_NAME}_emulation): Adjust initializer.
- * emultempl/armcoff.em: As for aix.em, but remove parse_args.
- * emultempl/beos.em: Likewise.
- * emultempl/pe.em: Likewise.
- * emultempl/ticoff.em: Likewise.
- * emultempl/elf32.em: Likewise. Don't duplicate long options either.
- (gld${EMULATION_NAME}_add_sysroot): Prototype.
- * emultempl/armelf.em (PARSE_AND_LIST_LONGOPTS): Don't duplicate
- options.
- * emultempl/hppaelf.em (PARSE_AND_LIST_LONGOPTS): Likewise.
- * emultempl/ppc32elf.em (PARSE_AND_LIST_LONGOPTS): Likewise.
- * emultempl/ppc64elf.em (PARSE_AND_LIST_LONGOPTS): Likewise.
- * emultempl/armelf_oabi.em (ld_${EMULATION_NAME}_emulation): Adjust
- initializer.
- * emultempl/generic.em: Likewise.
- * emultempl/gld960.em: Likewise.
- * emultempl/gld960c.em: Likewise.
- * emultempl/linux.em: Likewise.
- * emultempl/lnk960.em: Likewise.
- * emultempl/m68kcoff.em: Likewise.
- * emultempl/mipsecoff.em: Likewise.
- * emultempl/sunos.em: Likewise.
- * emultempl/vanilla.em: Likewise.
- * emultempl/netbsd.em (gldnetbsd_before_parse): Prototype.
-
-2003-02-25 Alexandre Oliva <aoliva@redhat.com>
-
- * emultempl/elf32.em (gld${EMULATION_NAME}_add_sysroot): Fix
- memory allocation error.
-
- * Makefile.am (ldmain.o): Define TOOLBINDIR.
- * Makefile.in: Rebuilt.
- * ldmain.c (ld_sysroot): Try to set from TOOLBINDIR too.
-
-2003-02-21 Bob Wilson <bob.wilson@acm.org>
-
- * ldlang.c (lang_size_sections_1): Add CHECK_REGIONS argument and only
- call os_region_check when it is set.
- (lang_size_sections): Add CHECK_REGIONS argument and pass it through to
- lang_size_sections_1.
- (lang_process): Change lang_size_sections calls to set CHECK_REGIONS
- only for the last call, not on every relaxation iteration.
- * ldlang.h (lang_size_sections): Update prototype.
- * pe-dll.c (pe_dll_fill_sections): Set CHECK_REGIONS argument in calls
- to lang_size_sections.
- (pe_exe_fill_sections): Likewise.
- * emultempl/elf32.em (gld${EMULATION_NAME}_finish): Likewise.
- * emultempl/hppaelf.em (hppaelf_layout_sections_again): Likewise.
- * emultempl/ppc64elf.em (ppc_before_allocation): Likewise.
- (ppc_layout_sections_again): Likewise.
-
-2003-02-21 Bob Wilson <bob.wilson@acm.org>
-
- * gen-doc.texi: Set ARM and HPPA variables.
- * ld.texinfo: Fix typos and obvious texinfo mistakes. Make section
- title capitalization more consistent. Add missing menu entries for
- machine-specific sections and conditionalize them consistently.
- Conditionalize text that is irrelevant when SingleFormat is set.
- Add @group divisions to improve page breaks in long examples.
- Use @iftex/@ifnottex instead of @iftex/@ifinfo so that HTML output
- is correct. Remove "FIXME" comment about not using
- @raisesections/@lowersections. Use @raisesections/@lowersections
- consistently for machine-specific sections. Change to be more polite
- about poor bug reports. Replace FDL appendix with include of fdl.texi.
- Move WIN32 node to match its order in the menus.
- * fdl.texi: New file.
-
-2003-02-20 Alexandre Oliva <aoliva@redhat.com>
-
- * configure.in (TARGET_SYSTEM_ROOT): Set default to
- ${exec_prefix}/${target_alias}/sys-root. Match explicit
- '${exec_prefix}' (in addition to the expansion thereof) as
- relocatable.
- * configure: Rebuilt.
-
-2003-02-20 Phil Edwards <pme@gcc.gnu.org>
-
- * ldgram.y (vers_defns): Also recurse with 'EXTERN NAME' patterns.
-
-2003-02-20 Harri Porten <porten@kde.org>
-
- * ldgram.y (vers_defns): Allow optional trailing semicolon in
- EXTERN NAME block;
-
-2003-02-18 Alan Modra <amodra@bigpond.net.au>
-
- * emultempl/ppc32elf.em: New file.
- * emulparams/elf32ppc.sh (EXTRA_EM_FILE): Define.
- * Makefile.am (eelf32lppc.c): Depend on emultempl/ppc32elf.em.
- (eelf32lppcnto.c): Likewise.
- (eelf32lppcsim.c): Likewise.
- (eelf32ppcnto.c): Likewise.
- (eelf32ppc.c): Likewise.
- (eelf32ppc_fbsd.c): Likewise.
- (eelf32ppcsim.c): Likewise.
- (eelf32ppclinux.c): Likewise.
- * Makefile.in: Regenerate.
-
-2003-02-18 Alan Modra <amodra@bigpond.net.au>
-
- * ld.texinfo: Remove spaces between @samp and opening brace.
-
-2003-02-18 Alan Modra <amodra@bigpond.net.au>
-
- * emultempl/ppc64elf.em (ppc_create_output_section_statements): Check
- hash creator.
- (ppc_before_allocation): Don't do optimizations if wrong hash table.
- (gld${EMULATION_NAME}_finish): Ditto.
-
-2003-02-17 Nick Clifton <nickc@redhat.com>
-
- * ldmain.c (main) Default allow_shlib_undefined to true.
- * lexsup.c (ld_options): Add --no-allow-shlib-undefined.
- (parse_args): Parse the new switch.
- * ld.texinfo: Document new switch and default behaviour of
- allowing undefined symbols in shared libraries.
-
-2003-02-11 Dmitry Diky <diwil@mail.ru>
-
- * scripttempl/elf32msp430.sc: Add new data anchors definitions.
- * scripttempl/elf32msp430_3.sc: Likewise.
-
-2003-02-11 Uwe Stieber <uwe@wwws.de>
-
- * configure.tgt: Add support for kaOS as cross build target
- system.
-
-2003-02-10 John Daivid Anglin <dave.anglin@nrc-cnrc.gc.ca>
-
- * hppaelf.em (group_size): Change default back to 1.
-
-2003-02-09 Alan Modra <amodra@bigpond.net.au>
-
- * emultempl/ppc64elf.em: Add "no-tls-optimize" option and support code.
-
-2003-02-07 John David Anglin <dave.anglin@nrc-cnrc.gc.ca>
-
- * hppaelf.em (group_size): Change default to -1.
-
-2003-02-07 Nick Clifton <nickc@redhat.com>
-
- * emultempl/armelf.em (PARSE_AND_LIST_SHORTOPTS): Remove 'n' short
- opt.
- (PARSE_AND_LIST_LONGOPTS): Add duplicate entry for
- no-pipeline-knowledge. This will prevent the getopt package from
- thinking that there are any shorter abbreviations for
- --no-pipeline-knowledge.
-
-2003-02-07 Jakub Jelinek <jakub@redhat.com>
-
- * genscripts.sh (LIB_PATH): Don't append LIBPATH_SUFFIX to paths
- which already have it. Avoid duplicates.
-
-2003-02-06 Jakub Jelinek <jakub@redhat.com>
-
- * emulparams/elf64_s390.sh (LIBPATH_SUFFIX): Set to 64.
- * emulparams/elf_x86_64.sh (LIBPATH_SUFFIX): Likewise.
- * emulparams/elf64_sparc.sh (LIBPATH_SUFFIX): Set instead of suffix.
-
-2003-02-05 Alan Modra <amodra@bigpond.net.au>
-
- * emultempl/ppc64elf.em (ppc_before_allocation): Size sections then
- call ppc64_elf_tls_optimize.
-
-2003-02-03 Daniel Jacobowitz <drow@mvista.com>
-
- * emultempl/elf32.em: Move gld${EMULATION_NAME}_add_sysroot
- outside of GNU/Linux conditional.
-
-2003-01-28 Ralf Habacker <ralf.habacker@freenet.de>
-
- * deffilep.y (def_get_module): New function: locate an already
- added module.
- * deffile.h (def_get_module): New prototype.
- * pe-dll.c (pe_implied_import_dll): Add code to prevent importing
- a dll multiple times.
-
-2003-01-23 Alan Modra <amodra@bigpond.net.au>
-
- * emultempl/sh64elf.em: Include elf32-sh64.h.
- (sh64_elf_${EMULATION_NAME}_before_allocation): Adjust for changed
- sh64_elf_section_data.
- (sh64_elf_${EMULATION_NAME}_after_allocation): Likewise.
-
-2003-01-23 Wu Yongwei <adah@netstd.com>
-
- * ld.texinfo: Remove an extra "i" in --dll-search-prefix.
- * emultempl/pe.em (gld_${EMULATION_NAME}_list_options): Move a
- cross-80th-column-margin "an" to the next line.
-
-2003-01-21 Nick Clifton <nickc@redhat.com>
-
- * emulparams/tic3xcoff-onchip.sh: Rename to ...z
- * emulparams/tic3xcoff_onchip.sh: ...this.
- * Makefile.am (etic3xcoff_onchip.c): Fix name of generated C file.
- * Makefile.in: Regenerate.
-
-2003-01-21 Fabio Alemagna <falemagn@aros.org>
-
- * configure.tgt: Handle i[3456]86-*-aros*
-
-2003-01-19 Svein E. Seldal <Svein.Seldal@solidas.com>
-
- * Makefile.am: Added etic3xcoff.o and etic4xcoff_onchip.o
- * Makefile.in: Regenerate
- * configure.tgt: Added extra target emulations
- * emulparams/tic3xcoff.sh: Remove old settings
- * emulparams/tic4xcoff.sh: Ditto
- * emulparams/tic3xcoff-onchip.sh: Added new
- * scripttempl/tic4xcoff.sc: Revise and combine both c3x and c4x
- * scripttempl/tic3xcoff.sc: Remove
-
-2003-01-17 Andreas Jaeger <aj@suse.de>
-
- * emultempl/elf32.em (gld${EMULATION_NAME}_add_sysroot): Do not
- skip ':'.
-
-2003-01-16 Alan Modra <amodra@bigpond.net.au>
-
- * Makefile.in: Regenerate.
-
-2003-01-14 Charles Wilson <cwilson@ece.gatech.edu>
-
- * ld.texinfo (node WIN32): Some clarifications
- and formatting fixups.
-
-2003-01-09 Chris Demetriou <cgd@broadcom.com>
-
- * ldmain.c (get_emulation): Sort -mipsNN checks in the usual
- order, and handle (ignore) -mips32r2.
-
-2003-01-09 Daniel Jacobowitz <drow@mvista.com>
-
- * ldmain.c (main): Make sure ld_sysroot is initialized.
-
-2003-01-06 Daniel Jacobowitz <drow@mvista.com>
-
- * Makefile.am (eelf32iq10.c): Fix tab/whitespace mixup.
-
- * Makefile.am (ldmain.o): Add @TARGET_SYSTEM_ROOT_DEFINE@.
- (GENSCRIPTS): Add @use_sysroot@.
- * Makefile.in: Regenerated.
- * configure.host: Move setting of NATIVE_LIB_DIRS to...
- * configure.tgt: ... here. Use ${target} instead of ${host}
- for NATIVE_LIB_DIRS.
- * configure.in: Add --with-sysroot.
- * configure: Regenerated.
- * genscripts.sh: Accept use_sysroot option. Set new variables
- NATIVE and USE_LIBPATH. Prepend "=" to directory names if
- $use_sysroot. Don't search $tool_lib if $use_sysroot.
- * ldfile.c (ldfile_add_library_path): Handle leading '='.
- * ldmain.c (TARGET_SYSTEM_ROOT): Define if not defined.
- (ld_sysroot): New variable.
- (main): Initialize ld_sysroot.
- * ldmain.h (ld_sysroot): New extern.
- * emultempl/elf32.em: Use NATIVE and USE_LIBPATH instead of
- searching $EMULATION_LIBPATH.
- (gld${EMULATION_NAME}_add_sysroot): New function.
- (gld${EMULATION_NAME}_check_ld_so_conf): Use it. Honor ld_sysroot.
- (gld${EMULATION_NAME}_after_open): Likewise. Only search
- environment variables if $NATIVE.
- * ld.texinfo (Options): Mention "=" prefix in the description of -L.
- * NEWS: Mention --with-sysroot.
-
- * emulparams/elf32bmipn32-defs.sh: Set NATIVE and LIBPATH_SUFFIX
- instead of setting LIB_PATH.
- * emulparams/elf32ppc.sh: Likewise.
- * emulparams/elf64_s390.sh: Likewise.
- * emulparams/elf64_sparc.sh: Likewise.
- * emulparams/elf64ppc.sh: Likewise.
- * emulparams/elf_x86_64.sh: Likewise.
-
- * emulparams/elf64_aix.sh: Add "=" prefixes to LIB_PATH.
- * emulparams/elf64hppa.sh: Add "=" prefixes to LIB_PATH.
-
-2003-01-03 Charles Wilson <cwilson@ece.gatech.edu>
-
- * pe-dll.c (autofilter_symbollist): Add cygwin_crt0.
-
-2003-01-04 Daniel Jacobowitz <drow@mvista.com>
-
- * Makefile.am (ldmain.o): Pass BINDIR.
- * Makefile.in: Regenerated.
- * ldmain.c (set_scripts_dir): Use make_relative_prefix for the first
- search path.
-
-2003-01-02 Ben Elliston <bje@redhat.com>
-
- * Makefile.am (ALL_EMULATIONS): Add eelf32iq2000.o.
- (eelf32iq2000.c): New target.
- * Makefile.in: Regenerate.
- * configure.tgt: Handle iq2000-*-elf.
- * emulparams/elf32iq10.sh: New file.
- * emulparams/elf32iq2000.sh: New file.
- * scripttempl/iq2000.sc: New file.
-
-2003-01-02 Charles Wilson <cwilson@ece.gatech.edu>
-
- * pe-dll.c (autofilter_symbollist): Add do_pseudo_reloc
- and _pei386_runtime_relocator to the exclude list.
-
-2003-01-01 Kazu Hirata <kazu@cs.umass.edu>
-
- * ldfile.c: Fix comment typos.
- * ldlang.c: Likewise.
- * mri.c: Likewise.
- * pe-dll.c: Likewise.
-
-2003-01-01 Daniel Jacobowitz <drow@mvista.com>
-
- Suggested by Manfred Hollstein <manfred.h@gmx.net>:
- * Makefile.am (ld.1): Depend on configdoc.texi
- and ldver.texi.
- * Makefile.in: Regenerated.
-
-2002-12-24 Dmitry Diky <diwil@mail.ru>
-
- * Makefile.am: Add msp430 target.
- * configure.tgt: Likewise.
- * Makefile.in: Regenerate.
- * emulparams/msp430x???.sh: New files. Linker script parameters
- for various msp430 configurations.
- * gen-doc.texi: Enable msp430 documenation.
- * ld.texinfo: Document msp430 sections.
- * scripttempl/elf32msp430.sc: New file. Linker script for msp430.
- * scripttempl/elf32msp430_3.sc: New file. Linker script for msp430.
-
-2002-12-30 Ralf Habacker <Ralf.Habacker@freenet.de>
- Charles Wilson <cwilson@ece.gatech.edu>
-
- * config.in (HAVE_REALPATH): New entry.
- (HAVE_SYS_STAT_H, HAVE_SYS_TYPES_H): Removed: obsolete.
-
-2002-12-30 Ralf Habacker <ralf.habacker@freenet.de>
-
- * ld.texinfo: New win32 topics: 'symbol aliasing' and 'export dll
- symbols'.
-
-2002-12-23 Alan Modra <amodra@bigpond.net.au>
-
- * ldmain.c (main): Init "strip_discarded".
- * lexsup.c (OPTION_STRIP_DISCARDED): Define.
- (OPTION_NO_STRIP_DISCARDED): Define.
- (ld_options): Add "strip-discarded" and "no-strip-discarded".
- (parse_args): Handle them.
-
-2002-12-23 Nick Clifton <nickc@redhat.com>
-
- * ld.h (struct args_type): Add new field
- 'accept_unknown_input_architecture'.
- * ldmain.c (main): Initialise 'accept_unknown_input_architecture'
- to false.
- * ldlang.c (lang_check): Pass accept_unknown_input_architecture to
- bfd_arch_get_compatible.
- * ldfile.c (ldfile_try_open_bfd): Likewise.
- * lexsup.c (ld_options): Add new command line switch
- --accept-unknown-input-architecture and its inverse.
- (parse_args): Handle --accept-unknown-input-architecture.
- * ld.texinfo: Document new linker option.
- * NEWS: Mention new linker option.
-
-2002-12-20 Alan Modra <amodra@bigpond.net.au>
-
- * ldmain.c (main): Re-order link_info initialization. Init all
- fields.
-
-2002-12-19 Charles Wilson <cwilson@ece.gatech.edu>
-
- * ld.texinfo: Clarify and extend the documentation
- in the Machine Dependent, WIN32 section.
-
-2002-12-18 Ralf Habacker <ralf.habacker@freenet.de>
-
- * ld.texinfo: Add win32 machine depending section.
- * gen-doc.texi: Enable win32 machine depending section.
-
- * configure.host: Add win32 library search path.
-
-2002-12-17 Ralf Habacker <ralf.habacker@freenet.de>
-
- * emultempl/pe.em (pe_find_data_imports): Don't search for data
- import when auto-import is disabled.
-
-2002-12-17 Danny Smith <dannysmith@users.sourceforge.net>
-
- * emultempl/pe.em (..._recognized_file): Use LD_PATHMAX+1 to
- account for trailing '\0'.
-
-2002-12-17 Nick Clifton <nickc@redhat.com>
-
- * emultempl/pe.em (longopts): Duplicate entry for --compact-implib
- so that it is not confused with -c.
-
-2002-12-13 Ralf Habacker <Ralf.Habacker@freenet.de>
- Charles Wilson <cwilson@ece.gatech.edu>
-
- * configure.in: Add check for realpath function.
- * configure: Regenerate.
- * config.in: Regenerate.
- * aclocal.m4: Regenerate.
- * deffile.h: Add .data field to def_file_import
- structure.
- * pe-dll.c (pe_proces_import_defs): Use .data field of
- def_file_import structure to initialize flag_data field of
- def_file_export structure.
- (pe_implied_import_dll): New variables exp_funcbase and
- [data|bss]_[start|end]. Use DLL's internal name to set dll_name,
- not filename (which may be a symlink). Scan the sections and
- initialize [data|bss]_[start|end]. When scanning the export
- table, skip _nm_ symbols, and mark any symbols whose rva indicates
- that it is in the .bss or .data sections as data.
- * sysdep.h: Include limits.h and sys/param.h, and define
- LD_PATHMAX as appropriate. Also define REALPATH as realpath if it
- exists, NULL otherwise.
- * emultempl/pe.em (gld_${EMULATION_NAME}_after_open): Call
- pe_process_import_defs before pe_find_data_imports, so that
- auto-import will check the virtual implib as well as "real"
- implibs.
- (gld_${EMULATION_NAME}_recognized_file): Use REALPATH to follow
- symlinks to their target; check that the target's extension is
- .dll before calling pe_implied_import_dll(), not the filename
- itself (which may be a symlink).
-
-2002-12-10 Alan Modra <amodra@bigpond.net.au>
-
- * emultempl/elf32.em (struct orphan_save): Add os_tail field.
- (gld${EMULATION_NAME}_place_orphan): Re-order output_section_statement
- list too.
-
-2002-12-08 Alan Modra <amodra@bigpond.net.au>
-
- * ldlang.h: Formatting.
-
-2002-12-07 Alan Modra <amodra@bigpond.net.au>
-
- * ldlang.c (init_os): Ensure sections mentioned in load_base
- are initialized.
-
-2002-12-05 Alan Modra <amodra@bigpond.net.au>
-
- * emultempl/elf32.em (gld${EMULATION_NAME}_place_orphan): Set
- load_base for orphans that follow a section with load_base set.
-
-2002-12-01 H.J. Lu <hjl@gnu.org>
-
- * ld.texinfo: Remove the extra `;' in sample version script.
-
-2002-11-30 Alan Modra <amodra@bigpond.net.au>
-
- * configure.host: Correct dynamic-linker for powerpc64 hosts.
-
- * Makefile.am (eelf32ppcwindiss.c): Correct dependencies.
- * Makefile.in: Regenerate.
-
- * ld.h, ldcref.c, ldctor.c, ldctor.h, ldemul.c, ldemul.h, ldexp.c,
- ldexp.h, ldfile.c, ldfile.h, ldgram.y, ldlang.c, ldlang.h, ldmain.c,
- ldmain.h, ldmisc.c, ldwrite.c, lexsup.c, mri.c, pe-dll.c, pe-dll.h,
- emulparams/elf32b4300.sh, emultempl/aix.em, emultempl/armcoff.em,
- emultempl/armelf.em, emultempl/armelf_oabi.em, emultempl/beos.em,
- emultempl/elf32.em, emultempl/generic.em, emultempl/gld960.em,
- emultempl/gld960c.em, emultempl/hppaelf.em, emultempl/linux.em,
- emultempl/lnk960.em, emultempl/m68kcoff.em, emultempl/mipsecoff.em,
- emultempl/mmix-elfnmmo.em, emultempl/mmixelf.em, emultempl/mmo.em,
- emultempl/needrelax.em, emultempl/pe.em, emultempl/ppc64elf.em,
- emultempl/sh64elf.em, emultempl/sunos.em, emultempl/ticoff.em: Replace
- boolean with bfd_boolean, true with TRUE, false with FALSE. Simplify
- comparisons of bfd_boolean vars with TRUE/FALSE. Formatting.
-
-2002-11-27 David O'Brien <obrien@FreeBSD.org>
-
- * configure.host: Fix generic FreeBSD configuration entry.
-
-2002-11-27 H.J. Lu <hjl@gnu.org>
-
- * ld.texinfo: Add the missing `;' to sample version scripts.
-
-2002-11-20 Alan Modra <amodra@bigpond.net.au>
-
- * emulparams/elf64ppc.sh (SEGMENT_SIZE): Don't define.
-
-2002-11-14 Egor Duda <deo@logos-m.ru>
-
- * ldmain.c (main): Make runtime relocs disabled by default. Remove
- assignment which has no effect.
- * pe-dll.h (pe_create_import_fixup): Change prototype.
- * pe-dll.c (make_runtime_pseudo_reloc): New function.
- (pe_create_runtime_relocator_reference): Ditto.
- (pe_create_import_fixup): Handle relocations with non-zero addends.
- * emultempl/pe.em: Add options --enable-runtime-pseudo-reloc and
- --disable-runtime-pseudo-reloc.
- (make_import_fixup): Handle relocations with non-zero addends. Create
- an external reference to _pei386_runtime_relocator symbol if at least
- one pseudo reloc was created.
- * ld.texinfo: Document --enable-runtime-pseudo-reloc and
- --disable-runtime-pseudo-reloc options.
-
-2002-11-12 Earl Chew <earl_chew@agilent.com>
-
- * ldlang.c (lang_add_section): Discard debugging sections that have
- been marked SEC_EXCLUDE.
-
-2002-11-12 Nick Clifton <nickc@redhat.com>
-
- * configure.in (ALL_LINGUAS): Add da.
- * configure: Regenerate.
- * po/da.po: New Danish translation.
-
-2002-11-12 Alan Modra <amodra@bigpond.net.au>
-
- * emultempl/ppc64elf.em (ppc_before_allocation): New function.
- (LDEMUL_BEFORE_ALLOCATION): Define.
- (gld${EMULATION_NAME}_finish): Run discard_info for relocatable
- linking.
- * emultemp/hppaelf.em ((gld${EMULATION_NAME}_finish): Likewise.
-
-2002-11-11 Christopher Faylor <cgf@redhat.com>
-
- * configure.tgt (LIB_PATH): Default to searching w32api directory under
- cygwin.
-
-2002-11-11 Charles Wilson <cwilson@ece.gatech.edu>
-
- * pe-dll.c (autofilter_liblist): add libmingwex and libgcj to the list
- of restricted auto-export libs.
-
-2002-11-11 Charles Wilson <cwilson@ece.gatech.edu>
-
- * pe-dll.c (autofilter_liblist): Generalize library names to catch more
- creative library naming instances like, e.g., libstdc++-2.a.
-
-2002-11-06 Alexandre Oliva <aoliva@redhat.com>
-
- * emulparams/elf32btsmipn32.sh (TEXT_DYNAMIC): Define.
- * emulparams/elf64btsmip.sh (TEXT_DYNAMIC): Likewise.
-
-2002-11-07 Danny Smith <dannysmith@users.sourceforge.net>
-
- * deffilep.y (def_lex): Handle '@' as first character of an ID.
- * pe-dll.c (auto-export): Filter on "_imp_" prefix, not "_imp__".
- (make_one): Don't prefix decorated fastcall symbols with '_'.
- (pe_process_import_defs): Likewise.
- * emultempl/pe.em (pe_fixup_stdcalls): Don't fixup fastcall
- symbols to cdecl names or vise-versa.
-
-2002-10-13 Eric Kohl <ekohl@rz-online.de>
-
- * pe-dll.c (process_def_file): Handle fastcall symbols when
- generating undecorated aliases. Don't prefix decorated fastcall
- symbols with '_'.
- (fill_exported_offsets): Don't prefix decorated fastcall symbols
- with '_'.
-
-2002-10-29 Daniel Jacobowitz <drow@mvista.com>
-
- * emultempl/aix.em: Use include <> for generated headers.
- * emultempl/beos.em: Likewise.
- * emultempl/elf32.em: Likewise.
- * emultempl/pe.em: Likewise.
- * ldctor.c: Likewise.
- * ldexp.c: Likewise.
- * ldfile.c: Likewise.
- * ldlang.c: Likewise.
- * ldlex.c: Likewise.
- * ldlex.l: Likewise.
- * ldmain.c: Likewise.
- * ldmisc.c: Likewise.
- * ldwrite.c: Likewise.
- * lexsup.c: Likewise.
- * mri.c: Likewise.
- * pe-dll.c: Likewise.
-
-2002-10-23 Jakub Jelinek <jakub@redhat.com>
-
- * emultempl/elf32.em (place_orphan): Don't put non-allocated .rel*
- sections into .rel{,a}.dyn.
-
-2002-10-23 Nick Clifton <nickc@redhat.com>
-
- * lexsup.c (OPTION_NO_OMAGIC): Define.
- (ld_options): Add "no-omagic" option.
- (parse_args): Parse --no-omagic.
- * ld.texinfo: Document --no-omagic.
- * NEWS: Mention new option.
-
-2002-10-21 Danny Smith <dannysmith@users.sourceforeg.net>
-
- * scripttempl/pe.sc (__RUNTIME_PSEUDO_RELOC_LIST__,
- __RUNTIME_PSEUDO_RELOC_LIST_END__): Add only when relocating.
-
-2002-10-22 Alexandre Oliva <aoliva@redhat.com>
-
- * emulparams/elf32bmipn32-defs.sh: Set ELFSIZE according to
- emulation name. Set LIB_PATH only for native tools, and
- search the ABI-specific versions of NATIVE_LIB_DIRS before the
- .../lib variants, not instead of them. Mostly copied from...
- * emulparams/elf32ppc.sh: ... here. Fixed typo.
- * emulparams/elf64bmip-defs.sh: Backed out.
- * emulparams/elf64bmip.sh: Import elf32bmipn32-defs.sh again.
- * emulparams/elf64btsmip.sh: Likewise.
- (DATA_ADDR, NONPAGED_TEXT_START_ADDR, SHLIB_TEXT_START_ADDR,
- TEXT_DYNAMIC): Removed.
-
-2002-10-17 Alexandre Oliva <aoliva@redhat.com>
-
- * emulparams/elf32bmipn32-defs.sh (LIB_PATH): Set to /usr/lib32.
- (GENERATE_SHLIB_SCRIPT): Set to yes.
- (EXECUTABLE_SYMBOLS, WRITABLE_RODATA): Moved to...
- * emulparams/elf32bmipn32.sh: here.
- (GENERATE_SHLIB_SCRIPT): Deleted as redundant.
- * emulparams/elf32btsmipn32.sh: Delete redundant unsets.
- * emulparams/elf64bmip-defs.sh: New file. Extend
- elf32bmipn32-defs.sh by overiding ELFSIZE and LIB_PATH.
- * emulparams/elf64bmip.sh: Bring in definitions from
- elf64bmip-defs.sh.
- (ELFSIZE, GENERATE_SHLIB_SCRIPT, LIB_PATH): Delete redundant
- settings.
- (WRITABLE_RODATA): Moved from elf32bmipn32-defs.sh.
- * emulparams/elf64btsmip.sh: Bring in definitions from
- elf64bmip-defs.sh.
- (ELFSIZE, GENERATE_SHLIB_SCRIPT): Delete, redundant.
- (EXECUTABLE_SYMBOLS, WRITABLE_RODATA): Delete redundant unsets.
-
-2002-10-16 Jakub Jelinek <jakub@redhat.com>
-
- * configure.tgt (s390x-*-linux*): Add elf_s390 emulation.
- (s390-*-linux*): Add elf64_s390 emulation if want64.
- * emulparams/elf64_sparc.sh (LIB_PATH): Update to match 2002-05-22
- genscript.sh changes.
- * emulparams/elf_x86_64.sh (LIB_PATH): Likewise.
- * emulparams/elf64_s390.sh (LIB_PATH): Set up native 64 bit dirs.
-
-2002-10-15 Alan Modra <amodra@bigpond.net.au>
-
- * ldlang.c (load_symbols): Revert last change.
-
-2002-10-14 Alan Modra <amodra@bigpond.net.au>
-
- * ldlang.c (load_symbols): Don't call bfd_link_add_symbols when
- just_syms_flag.
- (lang_reasonable_defaults): Don't compare against false.
- (size_input_section): Likewise.
- (lang_size_sections_1): Likewise.
- (lang_do_assignments): Likewise.
- (lang_add_output): Likewise.
-
- * Makefile.am: Run "make dep-am".
- * Makefile.in: Regenerate.
- * ldver.c: #include "bfdver.h".
-
-2002-10-13 Stephane Carrez <stcarrez@nerim.fr>
-
- * scripttempl/elfm68hc11.sc: Use KEEP for .vectors, .installN,
- .finiN section.
- * scripttempl/elfm68hc12.sc: Likewise.
-
-2002-10-11 Alan Modra <amodra@bigpond.net.au>
-
- * pe-dll.c (make_import_fixup_mark): Avoid type-punned pointer.
-
- * ldgram.y (memory_spec): Provide empty action.
- (section <NAME>): Likewise.
-
-2002-10-10 Jakub Jelinek <jakub@redhat.com>
-
- * ldfile.c (ldfile_try_open_bfd): When searching skip linker scripts if
- they have OUTPUT_FORMAT not matching actual output format.
- * ldlang.c (lang_get_output_target): New function.
- (open_output): Use it.
- * ldlang.h (lang_get_output_target): New prototype.
-
-2002-10-10 Alan Modra <amodra@bigpond.net.au>
-
- * emultempl/elf32.em (output_rel_find): Prefer .rel script sections
- when orphan is .rel, .rela when orphan is .rela.
- (gld${EMULATION_NAME}_place_orphan): Handle combreloc .rel* case
- first. Remove outsecname var.
-
-2002-10-09 Richard Shann <richard.shann@superh.com>
- Stephen Clarke <stephen.clarke@superh.com>
-
- * Makefile.am: Add eshelf32_linux.o and
- eshlelf32_linux.o, new emulations for sh64 Linux.
- * Makefile.in: Regenerate.
- * configure.tgt: Add sh64eb-*-linux* and sh64-*-linux* emulations.
- * emulparams/shelf32_linux.sh: New file.
- * emulparams/shlelf32_linux.sh: New file.
-
-2002-10-08 H.J. Lu <hjl@gnu.org>
-
- * ldlang.c (lang_file_exist): Removed.
- (new_afile): Revert the last change.
- * ldlang.h (lang_file_exist): Removed.
- * lexsup.c (parse_args): Revert the last change.
-
-2002-10-07 Ralf Habacker <Ralf.Habacker@freenet.de>
-
- * pe-dll.cc (autofilter_symbolprefixlist): Don't re-export
- auto-import symbols.
- (make_one): Create _nm_<symbol> for data only.
-
-2002-10-05 Elias Athanasopoulos <eathan@otenet.gr>
-
- * ldlang.c (lang_file_exist): New function.
- (new_afile): Abort if the filename to be added matches the linker
- output filename.
- * ldlang.h: Add prototype for lang_file_exist.
- * lexsup.c (parse_args): Abort if the output filename matches
- one of the input filenames.
-
-2002-10-02 Alan Modra <amodra@bigpond.net.au>
-
- * emulparams/elf64ppc.sh (MAXPAGESIZE): Set to 0x10000.
-
-2002-09-30 Alan Modra <amodra@bigpond.net.au>
-
- * scripttempl/elfd30v.sc: Order reloc sections placing .plt last.
- * scripttempl/elfm68hc11.sc: Likewise.
- * scripttempl/elfm68hc12.sc: Likewise.
-
- * emultempl/elf32.em (output_rel_find): Always place orphan loadable
- reloc sections just before .rel.plt/.rela.plt.
- (gld${EMULATION_NAME}_place_orphan <.rel>): Remove combreloc code.
- Only put loadable reloc sections in hold_rel.
-
-2002-09-29 H.J. Lu <hjl@gnu.org>
-
- * emulparams/elf32ppc.sh (OTHER_GOT_RELOC_SECTIONS): New.
-
-2002-09-25 Daniel Jacobowitz <drow@mvista.com>
-
- From "Anita Kulkarni" <AnitaK@kpit.com>
- * scripttempl/sh.sc: Handle .eh_frame* and .gcc_exc*
- sections.
-
-2002-09-25 Alan Modra <amodra@bigpond.net.au>
-
- * genscripts.sh (SEGMENT_SIZE): Use MAXPAGESIZE before
- TARGET_PAGE_SIZE.
- * scripttempl/elf.sc (DATA_SEGMENT_ALIGN): Incorporate
- SEGMENT_SIZE alignment.
- * emulparams/elf64ppc.sh (DATA_ADDR): Delete.
- (SEGMENT_SIZE): Define.
-
- * ldexp.c (fold_unary): New. Split out from exp_fold_tree.
- (fold_binary): Correct abs - non-abs case.
- (fold_trinary): New. Split out from exp_fold_tree.
-
-2002-09-24 Alan Modra <amodra@bigpond.net.au>
-
- * emulparams/elf64ppc.sh (DATA_ADDR): Define.
- * emulparams/elf64_aix.sh (DATA_ADDR): Don't use a fixed address
- for start of .data, instead align up to 256M boundary.
- * scripttempl/aix.sc: Likewise.
-
-2002-09-22 Mark Elbrecht <snowball3@softhome.net>
-
- * scripttempl/i386go32.sc: Handle bss unique sections.
-
-2002-09-21 Alan Modra <amodra@bigpond.net.au>
-
- * ldmisc.c (vfinfo <%C,%D,%G>): Always output bfd, section and offset.
-
-2002-09-17 Stan Cox <scox@redhat.com>
-
- * emulparams/elf32bmipn32-defs.sh: New file.
- * emulparams/elf32bmipn32.sh: Use elf32bmipn32-defs.sh.
- * emulparams/elf32btsmipn32.sh: Likewise.
- * emulparams/elf64bmip.sh: Likewise.
- * emulparams/elf64btsmip.sh: Likewise.
-
-2002-09-16 Bruno Haible <bruno@clisp.org>
-
- * emulparams/elf_i386_fbsd.sh: Set OUTPUT_FORMAT to
- elf32-i386-freebsd.
- * emulparams/elf64alpha_fbsd.sh: Set OUTPUT_FORMAT to
- elf64-alpha-freebsd.
-
-2002-09-11 Nick Clifton <nickc@redhat.com>
-
- * NEWS: New TI port supports both C4x and C3x series of DSPs.
-
- * po/tr.po: Updated Turkish translation.
-
-2002-09-06 Jeffrey A Law (law@redhat.com)
-
- * configure.tgt (h8300-*-hms*, h8500-*-hms*): Restore.
-
-2002-09-02 Nick Clifton <nickc@redhat.com>
-
- * scripttempl/v850.sc: Add EXTERN references to __ctbpm __gp and
- __ep.
- * emulparams/v850.sh (TEMPLATE_NAME): Define.
-
-2002-08-30 Nick Clifton <nickc@redhat.com>
-
- * scripttempl/elfd10v.sc (MEMORY): Remove UNIFIED, it is not
- used. Change INSN to start at 0x01000000 and extend for
- 256K (ignoring holes). Start the STACK on a word aligned
- boundary.
- (.rodata): Start it at the READONLY_START_ADDR.
-
-2002-08-30 Alan Modra <amodra@bigpond.net.au>
-
- * emulparams/elf32ppc.sh (ARCH): Set to "powerpc:common".
-
-2002-08-28 Svein E. Seldal <Svein.Seldal@solidas.com>
-
- * Makefile.am: Add etic4xcoff.o in ALL_EMULATIONS list and
- added makefile targets for this file.
- * Makefile.in: Regenerate.
- * configure.tgt: Added tic4x-coff and c4x-coff emulations.
- * NEWS: Mention new port.
-
-2002-08-28 Michael Hayes <m.hayes@elec.canterbury.ac.nz>
-
- * emulparams/tic3xcoff.sh: New file.
- * emulparams/tic4xcoff.sh: New file.
- * scripttempl/tic3xcoff.sc: New file.
- * scripttempl/tic4xcoff.sc: New file.
-
-2002-08-28 Alan Modra <amodra@bigpond.net.au>
-
- * emultempl/aix.em (gld${EMULATION_NAME}_parse_args): Replace strtoll,
- strtoul and strtoull with bfd_scan_vma.
- (gld${EMULATION_NAME}_read_file): Likewise.
-
-2002-08-28 Alan Modra <amodra@bigpond.net.au>
-
- * configure.tgt: Remove h8[35]00-*-hms*. Add h8500-*-rtems*.
-
-2002-08-27 Egor Duda <deo@logos-m.ru>
-
- * scripttempl/pe.sc: Handle .rdata_runtime_pseudo_reloc sections.
- Add symbols for application to access them.
-
-2002-08-27 Nick Clifton <nickc@redhat.com>
-
- * emultempl/armelf.em: Revert this patch, it is not needed.
-
- 2002-08-22 Adam Nemet <anemet@lnxw.com>
-
-2002-08-20 Dan Kegel <dank@kegel.com>
-
- * configure.in: added --with-lib-path argument to ld's configure
- to set LIB_PATH.
- * NEWS: Document new switch.
- * README: Mention new switch.
- * configure: Regenerate.
- * Makefile.in: Regenerate.
-
- Based on this patch:
- 2001-04-25 Christopher Faylor <cgf@cygnus.com>
-
- * Makefile.in (LIB_PATH): Make configurable.
- (GENSCRIPTS): Set LIB_PATH in environment.
- * configure.in: Substitute LIB_PATH.
-
-2002-08-22 Adam Nemet <anemet@lnxw.com>
-
- * emultempl/armelf.em: Include elf-bfd.h and elf/arm.h.
- (arm_elf_finish): Set the last bit of DT_INIT and DT_FINI
- depending on the type of the function.
- (arm_elf_convert_thumb_symbol_to_address): New function.
-
-2002-08-22 Graeme Peterson <gp@qnx.com>
-
- * Makefile.am: Add esh{l}elf_nto.o files.
- * Makefile.in: Regenerate.
- * configure.tgt: Add support for sh-**-nto* targets.
- * emulparams/shelf_nto.sh: New file.
- * emulparams/shlelf_nto.sh: New file.
-
-2002-08-21 John David Anglin <dave@hiauly1.hia.nrc.ca>
-
- * ldlang.c (offsetof): Define if not defined.
-
-2002-08-14 H.J. Lu <hjl@gnu.org>
-
- * configure.tgt: Always enable 64bit emulations for 32bit
- Linux/mips.
-
-2002-08-13 Alan Modra <amodra@bigpond.net.au>
-
- * emulparams/elf32_dlx.sh (TARGET_PAGE_SIZE): Set to 1.
- (MAXPAGESIZE): Set to 1.
-
- * ld.h (ALIGN_N): Delete.
- * ldexp.h (align_n): Declare.
- * ldexp.c (align_n): New function.
- (fold_binary): Use align_n instead of ALIGN_N.
- (exp_fold_tree): Likewise.
- * ldlang.c (lang_size_sections_1): Likewise.
- (lang_one_common): Likewise.
- * ld.texinfo (ALIGN): Remove power of 2 restriction.
-
-2002-07-31 Graeme Peterson <gp@qnx.com>
-
- * configure.tgt: Add support for powerpc{le}-*-nto* targets.
- * Makefile.am: Add eelf32{l}ppcnto.o files.
- * Makefile.in: Regenerate.
- * emulparams/elf32lppcnto.sh: New file.
- * emulparams/elf32ppcnto.sh: New file.
-
-2002-08-07 H.J. Lu <hjl@gnu.org>
-
- * ld.texinfo: Document --no-undefined-version.
-
- * ldlang.c (lang_new_vers_pattern): Set the `symver' and
- `script.' fields to 0.
-
- * ldmain.c (main): Initialize the allow_undefined_version to
- true.
-
- * lexsup.c (OPTION_NO_UNDEFINED_VERSION): New.
- (ld_options): Add --no-undefined-version.
- (parse_args): Support OPTION_NO_UNDEFINED_VERSION.
-
-2002-08-07 Nick Clifton <nickc@redhat.com>
-
- * emultempl/armelf.em (arm_elf_before_allocation): Only search for
- an interworking bfd if there are input bfds. (107501)
-
-2002-08-06 Alan Modra <amodra@bigpond.net.au>
-
- * emultempl/aix.em (gld*_before_parse): Set default arch. Reverts
- 2002-05-10 change.
-
-2002-08-01 Nick Clifton <nickc@redhat.com>
-
- * emulparams/armelf.sh: Revert previous delta.
- * scripttempl/elf.sc: Revert previous delta.
-
-2002-07-31 H.J. Lu <hjl@gnu.org>
-
- * configure.tgt (powerpc*-*-linux*): Enable elf64ppc for
- --enable-64-bit-bfd.
-
-2002-07-31 H.J. Lu <hjl@gnu.org>
-
- * configure.tgt: Enable x86-64 emulation for Linux/i386 if
- 64bit BFD is selected.
-
-2002-07-31 H.J. Lu <hjl@gnu.org>
-
- * configure.tgt: Enable 64bit emulations for 32bit Linux/mips
- if 64bit BFD is selected.
-
-2002-07-31 Ian Dall <ian@sibyl.beware.dropbear.id.au>
-
- * emultempl/netbsd.em (LDEMUL_BEFORE_PARSE): New file to custom set
- link_info.common_skip_ar_aymbols.
- * emulparams/ns32knbsd.sh (EXTRA_EM_FILE): Refer to extra file.
-
- * ldmain.c (main): Initialize new field
- link_info.common_skip_ar_aymbols.
-
-2002-07-31 Adam Nemet <anemet@lnxw.com>
-
- * emulparams/armelf.sh (OTHER_PLT_SECTIONS): New variable. Set it
- to .plt.thumb.
- * scripttempl/elf.sc: Comment it. Use the same way as ${PLT} is
- used.
-
-2002-07-31 Nick Clifton <nickc@redhat.com>
-
- * NEWS: Retroactively add entry for Lars Brinkhoff's contribution
- of the PDP-11 and 2.11BSD a.out support.
-
-2002-07-31 Thiemo Seufer <seufer@csv.ica.uni-stuttgart.de>
-
- * Makefile.am (eelf32btsmipn32.o, eelf32ltsmipn32.o): New emulations
- for n32 ABI support.
- * Makefile.in: Regenerate.
- * configure.tgt (mips64*el-*-linux-gnu*,mips64*-*-linux-gnu*): Add
- n32 ABI emulations for these 64 bit targets.
- * emulparams/elf32bmipn32.sh: Expand comment.
- * emulparams/elf32btsmipn32.sh: New file, for traditional big endian
- n32 ABI.
- * emulparams/elf32ltsmipn32.sh: Likewise for little endian.
-
-2002-07-30 Graeme Peterson <gp@qnx.com>
-
- * configure.tgt: Add support for arm-*-nto target.
- * Makefile.am: Add earmnto.o file.
- * Makefile.in: Regenerate.
- * NEWS: Mention port of ARM support to QNX.
- * emulparams/armnto.sh: New file.
-
-2002-07-30 Jakub Jelinek <jakub@redhat.com>
-
- * ldlang.c (lang_add_section): Don't turn .tbss into normal sections
- for relocatable link.
- (lang_size_sections_1): Don't make .tbss zero size for relocatable
- link.
-
-2002-07-26 Bernd Schmidt <bernds@redhat.com>
-
- * emulparams/elf32frv.sh (OTHER_RELOCATING_SECTIONS): Delete.
- (STACK_ADDR): New.
-
-2002-07-25 Nick Clifton <nickc@redhat.com>
-
- * po/sv.po: Updated Swedish translation.
- * po/es.po: Updated Spanish translation.
- * po/fr.po: Updated French translation.
-
-2002-07-24 Nick Clifton <nickc@redhat.com>
-
- * po/sv.po: Updated Swedish translation.
- * po/es.po: Updated Spanish translation.
-
-2002-07-23 Nick Clifton <nickc@redhat.com>
-
- * po/fr.po: Updated French translation.
-
-2002-07-20 Alan Modra <amodra@bigpond.net.au>
-
- * emultempl/elf32.em (gld${EMULATION_NAME}_place_orphan): Don't
- bomb on /DISCARD/ input section.
- * emultempl/pe.em (gld_${EMULATION_NAME}_place_orphan): Likewise.
- * emultempl/mmo.em (mmo_place_orphan): Likewise.
-
-2002-07-19 Hans-Peter Nilsson <hp@bitrange.com>
-
- * emultempl/mmo.em (mmo_place_orphan): Handle case of no .text
- output section.
-
-2002-07-16 Denis Chertykov <denisc@overta.ru>
- Nick Clifton <nickc@redhat.com>
- Frank Ch. Eigler <fche@redhat.com>
- John Healy <jhealy@redhat.com>
-
- * configure.tgt: Add support for ip2k-elf.
- * Makefile.am: Add support for ip2k-elf.
- * Makefile.in: Regenerate.
- * emulparams/elf32ip2k.sh: New file.
- * scripttempl/ip2k.sc: New file
- * NEWS: Mention support for new port.
-
-2002-07-16 Nick Clifton <nickc@cambridge.redhat.com>
-
- * NEWS: Add 'Changes in 2.13'.
-
-2002-07-14 H.J. Lu <hjl@gnu.org>
-
- * ld.texinfo: Document a .symver takes precedence over a
- version script.
-
-2002-07-12 Alan Modra <amodra@bigpond.net.au>
-
- * emulparams/elf64ppc.sh (ARCH): Set to powerpc:common64.
- (COMMONPAGESIZE): Define.
-
-2002-07-09 Alan Modra <amodra@bigpond.net.au>
-
- * emulparams/hppanbsd.sh: Remark that hppaobsd.sh references this file.
-
-2002-07-09 Federico G. Schwindt <fgsch@olimpo.com.br>
-
- * configure.tgt: Add support for alpha-*-openbsd*, hppa-*-openbsd*,
- powerpc-*-openbsd* and sparc64-*-openbsd*.
- * Makefile.am (ALL_EMULATIONS): Add ehppaobsd.o.
- * Makefile.in: Regenerate.
- * emulparams/hppaobsd.sh: New file.
-
-2002-07-05 Alan Modra <amodra@bigpond.net.au>
-
- * ldlang.c (print_wild_statement): Fix output formatting.
-
-2002-07-04 Alan Modra <amodra@bigpond.net.au>
-
- * ldlang.c: (strip_excluded_output_sections): New function.
- (lang_process): Call it.
- (lang_size_sections_1): Revert 2002-06-10 change.
-
-2002-07-03 Alan Modra <amodra@bigpond.net.au>
-
- * Makefile.am (check-DEJAGNU): Revert 2002-06-25 change.
- Run "make dep-am".
- * Makefile.in: Regenerate.
-
-2002-07-02 Alan Modra <amodra@bigpond.net.au>
-
- * ldfile.c (ldfile_try_open_bfd): Formatting.
-
- * ldmisc.c (demangle): Move so that it doesn't intrude between
- vfinfo comment and body. Add comment.
-
-2002-07-01 John David Anglin <dave@hiauly1.hia.nrc.ca>
-
- * emulparams/vax.sh (OUTPUT_FORMAT): Use a.out-vax-bsd format.
-
-2002-07-01 Alan Modra <amodra@bigpond.net.au>
-
- * ldlang.h (entry_sym): Make it a struct bfd_sym_chain.
- * ldlang.c (entry_sym): Likewise.
- (ldlang_undef_chain_list_type): Likewise.
- (lang_finish): Adjust references to entry_symbol.
- (lang_add_entry): Likewise.
- (lang_gc_sections): Use link_info.gc_sym_list.
- (lang_process): Set link_info.gc_sym_list.
- * ldlex.l: Include bfdlink.h.
- * ldmain.c (main): Init link_info.gc_sym_list.
- * emultempl/aix.em: Adjust references to entry_symbol.
- * emultempl/armcoff.em: Likewise.
- * emultempl/armelf.em: Likewise.
- * emultempl/pe.em: Likewise.
- * emultempl/ppc64elf.em (ppc_after_open): New function.
- (LDEMUL_AFTER_OPEN): Define.
- * emulparams/elf64ppc.sh: KEEP .opd sections.
-
-2002-06-29 Stephane Carrez <stcarrez@nerim.fr>
-
- * emulparams/m68hc12elfb.sh (EEPROM_MEMORY): Define.
- * emulparams/m68hc11elfb.sh (EEPROM_MEMORY): Define.
- * emulparams/m68hc11elf.sh (EEPROM_SIZE): Define.
- (EEPROM_START_ADDR): Define.
- (EEPROM_MEMORY): Define.
- * emulparams/m68hc12elf.sh: Likewise.
- * scripttempl/elfm68hc11.sc: Handle .eeprom section; handle .softregs
- section to put soft registers in .page0.
- * scripttempl/elfm68hc12.sc: Likewise but put soft registers in bss.
-
-2002-06-26 John David Anglin <dave@hiauly1.hia.nrc.ca>
-
- * emulparams/hppa64linux.sh (OTHER_GOT_RELOC_SECTIONS): Add rela.opd
- section. Add ${RELOCATING-0}.
-
-2002-06-26 J"orn Rennecke <joern.rennecke@superh.com>
-
- * emulparams/shelf.sh (STACK_ADDR): Don't define.
- (OTHER_SECTIONS): Define.
- * emulparams/shelf_nbsd.sh ((STACK_ADDR): Don't undef.
- (OTHER_SECTIONS): Undef.
-
-2002-06-26 Alan Modra <amodra@bigpond.net.au>
-
- * ldmisc.c (demangle): Restore dots stripped from sym name.
-
-2002-06-25 H.J. Lu <hjl@gnu.org>
-
- * Makefile.am (check-DEJAGNU): Set LC_ALL=C and export it.
- * Makefile.in: Regenerated.
-
-2002-06-20 Nick Clifton <nickc@cambridge.redhat.com>
-
- * ld.texinfo (Bug Reporting): Update text to suggest a limit on
- the size of attached object files, to allow make the object files
- available via FTP or HTTP and to mention that the mail will be
- sent to a mailing list.
-
-2002-06-20 Nathanael Nerode <neroden@twcny.rr.com>
-
- * configure.host (romp): Drop support.
-
-2002-06-18 Chris Demetriou <cgd@broadcom.com>
-
- * emultempl/mipself.em (mips_elf${ELFSIZE}_check_sections): Check
- section flags for SEC_DATA, rather than for SEC_CODE being unset.
-
-2002-06-18 Chris Demetriou <cgd@broadcom.com>
-
- * emultempl/mipself.em (mips_elf${ELFSIZE}_check_sections): Fix
- format specifier used to print BFD name.
-
-2002-06-18 Dave Brolley <brolley@redhat.com>
-
- From Catherine Moore, Michael Meissner, Jim Blandy:
- * emulparams/elf32frv.sh: New file.
- * configure.tgt: Support frv-*-*.
- * Makefile.am (ALL_EMULATIONS): Add eelf32frv.o.
- (eelf32frv.c): New target.
-
-2002-06-17 Tom Rix <trix@redhat.com>
-
- * emultempl/elf32.em: gld*_get_script: Check for
- GENERATE_COMBRELOC_SCRIPT.
- * scripttempl/elfd10v.sc : Fix STACK and INSN.
- * emulparams/d10velf.sh : Fix TEXT_START_ADDR.
-
-2002-06-13 J"orn Rennecke <joern.rennecke@superh.com>
-
- * configure.tgt: Add support for sh[1234]*le*-*-elf, sh[1234]*-*-elf.
-
-2002-06-12 H.J. Lu <hjl@gnu.org>
-
- * emultempl/elf32.em (gld${EMULATION_NAME}_try_needed): Return
- false if xvec doesn't match.
-
-2002-06-10 Richard Sandiford <rsandifo@redhat.com>
-
- * ldlang.c (lang_size_sections_1): Skip removed output sections.
-
-2002-06-08 Alan Modra <amodra@bigpond.net.au>
-
- * ldexp.c: Replace CONST with const.
- * ldfile.c: Likewise.
- * ldfile.h: Likewise.
- * ldlex.l: Likewise.
- * mri.c: Likewise.
- * pe-dll.h: Likewise.
-
-2002-06-07 Alan Modra <amodra@bigpond.net.au>
-
- * emultempl/ppc64elf.em (new_vers_pattern): Warning fix.
-
-2002-06-07 Charles Wilson <cwilson@ece.gatech.edu>
-
- * ldmain.c (main): initialize link_info.pei386_auto_import
- to -1 == implicit enable.
- * emultempl/pe.em (gld_${EMULATION_NAME}_before_parse):
- initialize link_info.pei386_auto_import to -1 == implicit
- enable.
- (gld_${EMULATION_NAME}_parse_args): When processing
- --enable-auto-import and --disable-auto-import options, use
- '1' and '0' instead of 'true' and 'false'.
- (pe_find_data_imports): Only issue message about auto-import
- when the feature is implicitly enabled. Downgrade message to
- informational instead of warning.
-
-2002-06-07 Alan Modra <amodra@bigpond.net.au>
-
- * scripttempl/elf.sc (.tbss): Fix mismatched parentheses/braces.
-
-2002-06-06 John David Anglin <dave@hiauly1.hia.nrc.ca>
-
- * configure.host (hppa*64*-*-hpux11*): Define NATIVE_LIB_DIRS,
- HOSTING_CRT0 and HOSTING_LIBS.
-
-2002-06-05 J"orn Rennecke <joern.rennecke@superh.com>
-
- * configure.tgt (shle*-*-elf*, sh64le-*-elf*): New configurations.
-
-2002-06-05 Jason Thorpe <thorpej@wasabisystems.com>
-
- * emulparams/ns32knbsd.sh (EXECUTABLE_SYMBOLS): Set _DYNAMIC to 0.
- (NONPAGED_TEXT_START_ADDR): Set to 0x1000.
-
-2002-06-05 Alan Modra <amodra@bigpond.net.au>
-
- * emultempl/elf32.em (gld${EMULATION_NAME}_place_orphan): Place
- SEC_EXCLUDE sections when doing a relocatable link.
-
-2002-06-04 Jason Thorpe <thorpej@wasabisystems.com>
-
- * Makefile.am (ALL_EMULATIONS): Add eshelf32_nbsd.o,
- eshlelf32_nbsd.o, eshelf64_nbsd.o, and eshlelf64_nbsd.o.
- (eshelf32_nbsd.c, eshelf64_nbsd.c, eshlelf32_nbsd.c)
- (eshlelf64_nbsd.c): New rules.
- * Makefile.in: Regenerate.
- * configure.tgt (sh5le-*-netbsd*, sh5-*-netbsd*, sh64le-*-netbsd*)
- (sh64-*-netbsd*): New targets.
- * emulparams/shelf32_nbsd.sh: New file.
- * emulparams/shelf64_nbsd.sh: New file.
- * emulparams/shlelf32_nbsd.sh: New file.
- * emulparams/shlelf64_nbsd.sh: New file.
-
-2002-06-04 Alan Modra <amodra@bigpond.net.au>
-
- * ldlang.c (section_already_linked): Call bfd_discard_group. Typo fix.
-
-2002-06-02 Marek Michalkiewicz <marekm@amelek.gda.pl>
-
- * scripttempl/avr.sc: Changes to support current GCC and avr-libc,
- C++ constructors/destructors, loosely based on the m68hc11 port.
-
-2002-05-31 Alan Modra <amodra@bigpond.net.au>
-
- * Makefile.in: Regenerate.
- * aclocal.m4: Regenerate.
- * config.in: Regenerate.
- * configure: Regenerate.
-
-2002-05-31 Graeme Peterson <gp@qnx.com>
-
- * Makefile.am (ALL_EMULATIONS): Add ei386nto.o.
- (ei386nto.c): Add rule.
- * Makefile.in: Regenerate.
- * configure.tgt: Add i[3456]86-*-nto-qnx*.
- * emulparams/i386nto.sh: New file.
-
-2002-05-29 Jason Thorpe <thorpej@wasabisystems.com>
-
- * NEWS: Add entry for VAX ELF support.
-
-2002-05-29 Matt Thomas <matt@3am-software.com>
- Jason Thorpe <thorpej@wasabisystems.com>
-
- * Makefile.am (ALL_EMULATIONS): Add eelf32vax.o and evaxnbsd.o.
- (eelf32vax.c)
- (evaxnbsd.c): New rules.
- * Makefile.in: Regenerate.
- * configure.tgt (vax-*-netbsdelf*)
- (vax-*-netbsdaout*)
- (vax-*-netbsd*): New targets.
- * emulparams/elf32vax.sh: New file.
- * emulparams/vaxnbsd.sh: New file.
-
-2002-05-29 Adam Nemet <anemet@lnxw.com>
-
- * emultempl/armelf.em (arm_elf_after_open): Don't determine
- bfd_for_interwork, instead add glue sections to each input bfd.
- (bfd_for_interwork): New global.
- (arm_elf_set_bfd_for_interworking): New function.
- (arm_elf_before_allocation): Use it.
-
-2002-05-28 Kuang Hwa Lin <kuang@sbcglobal.net>
-
- * Makefile.am: Add DLX make target.
- * configure.tgt: Add DLX configuration.
- * Makefile.in: Regenerate.
- * emulparams/elf32_dlx.sh: New file
- * scripttempl/dlx.sc: New file
-
-2002-05-27 Per Lundberg <per@caleb.dnsalias.org>
-
- * Makefile.am (eelf_i386_chaos): Use elf_chaos.sc script.
- * Makefile.in: Regenerate.
- * emulparams/elf_chaos.sh: Use elf_chaos script.
- * scripttempl/elf_chaos.sc: New file.
-
-2002-05-27 Richard Sandiford <rsandifo@redhat.com>
-
- * ldlang.c (lang_size_sections_1): Move check for conflicting load
- addresses and regions from here...
- (lang_get_regions): ...to this new function.
- (lang_leave_output_section_statement): Use lang_get_regions.
- (lang_leave_overlay): Likewise.
- * mri.c (mri_draw_tree): Pass null as last argument to
- lang_leave_output_section_statement.
- * emultempl/elf32.em (gld*_place_orphan): Likewise.
- * emultempl/mmo.em (mmo_place_orphan): Likewise.
- * emultempl/pe.em (gld*_place_orphan): Likewise.
-
-2002-05-26 Jason Thorpe <thorpej@wasabisystems.com>
-
- * configure.tgt: Use ns32k-*-netbsd* instead of ns32k-pc532-netbsd*.
-
-2002-05-25 Kazu Hirata <kazu@cs.umass.edu>
-
- * ldemul.c: Fix formatting.
- * ldfile.c: Likewise.
- * pe-dll.c: Likewise.
- * pe-dll.h: Likewise.
-
-2002-05-25 Alan Modra <amodra@bigpond.net.au>
-
- * ldlang.c (lang_process): Formatting, grammar.
-
- * ldlex.l: Use #include "" instead of <> for local header files.
-
-2002-05-24 TAMURA Kent <kent@netbsd.org>
-
- * configure.tgt: Add a target for i386-netbsdpe.
-
-2002-05-23 Jakub Jelinek <jakub@redhat.com>
-
- * scripttempl/elf.sc: Add .rel{,a}.t{bss,data}, .tdata and .tbss.
- * ldlang.c (lang_add_section): Set SEC_THREAD_LOCAL for
- output section if necessary. Handle .tbss.
- (lang_size_sections): Clear _raw_size for .tbss section
- (it allocates space in PT_TLS segment only).
- * ldwrite.c (build_link_order): Build link order for .tbss too.
-
-2002-05-23 Alan Modra <amodra@bigpond.net.au>
-
- * configure.in: Correct spelling of AC_PREREQ.
-
-2002-05-21 Danny Smith <dannysmith@users.sourceforge.net>
-
- * pe-dll.c (autofilter_liblist): Add more system libs excluded by
- default.
- (autofilter_objlist): Add crtbegin.o, crtend.o.
-
-2002-05-21 Danny Smith <dannysmith@users.sourceforge.net>
-
- * emultempl/pe.em (OPTION_EXCLUDE_LIBS): Add new define.
- (longopts): Add new option --exclude-libs.
- (gld_${EMULATION_NAME}_list_options): Give quick help about it.
- (gld_${EMULATION_NAME}_parse_args): Use it.
- * pe-dll.h (pe_dll_add_excludes): Add second param to prototype.
- * pe-dll.c (exclude_list_struct): Add field type to distinguish symbols
- from whole archives.
- (pe_dll_add_excludes): Set excludes->type.
- (auto_export): Add new variable libname and set to archive basename if
- abfd. Use it when filtering default and user-specified libarary
- excludes. Let string "ALL" mean all libs when filtering user-specified
- libs.
- * ld.texinfo: Document --exclude-libs.
-
-2002-05-22 Alan Modra <amodra@bigpond.net.au>
-
- * ldemul.c (ldemul_new_vers_pattern): New function.
- * ldemul.h (ldemul_new_vers_pattern): Declare.
- (struct ld_emulation_xfer_struct): Add new_vers_pattern.
- * ldlang.c (lang_new_vers_pattern): Call ldemul_new_vers_pattern.
- * emultempl/ppc64elf.em (dotsyms): New static var.
- (gld${EMULATION_NAME}_new_vers_pattern): New function.
- (LDEMUL_NEW_VERS_PATTERN): Define.
- (PARSE_AND_LIST_PROLOGUE): Add OPTION_DOTSYMS, OPTION_NO_DOTSYMS.
- (PARSE_AND_LIST_LONGOPTS): Likewise.
- (PARSE_AND_LIST_ARGS_CASES): Handle them.
- * emultempl/aix.em (ld_${EMULATION_NAME}_emulation): Update
- initialiser.
- * emultempl/armcoff.em: Likewise.
- * emultempl/armelf_oabi.em: Likewise.
- * emultempl/beos.em: Likewise.
- * emultempl/elf32.em: Likewise.
- * emultempl/generic.em: Likewise.
- * emultempl/gld960.em: Likewise.
- * emultempl/gld960c.em: Likewise.
- * emultempl/linux.em: Likewise.
- * emultempl/lnk960.em: Likewise.
- * emultempl/m68kcoff.em: Likewise.
- * emultempl/mipsecoff.em: Likewise.
- * emultempl/pe.em: Likewise.
- * emultempl/sunos.em: Likewise.
- * emultempl/ticoff.em: Likewise.
- * emultempl/vanilla.em: Likewise.
-
-2002-05-22 Alan Modra <amodra@bigpond.net.au>
-
- * genscripts.sh (LIB_PATH): For native targets, concatenate $libdir
- and $NATIVE_LIB_DIRS. Add $tool_lib before other libs.
- (LIB_SEARCH_DIRS): No need to use "tr".
- (COMPILE_IN): Only set for native targets.
- * configure.host (NATIVE_LIB_DIRS): Specify all native search dirs
- here, rather than adding lib:/usr/lib:/usr/local/lib in genscripts.sh.
- * configure.tgt (powerpc*): Set tdir_*.
- (powerpcle*): Correct targ_extra_emuls.
- * emulparams/elf32ppc.sh (LIB_PATH): Set up native 64 bit dirs.
- * emulparams/elf64ppc.sh (LIB_PATH): Likewise.
-
-2002-05-22 Alan Modra <amodra@bigpond.net.au>
-
- * emultempl/pe.em (set_pe_subsystem): Don't set "cmdline" when
- calling lang_add_entry.
-
-2002-05-21 H.J. Lu (hjl@gnu.org)
-
- * emultempl/elf32.em (gld${EMULATION_NAME}_parse_args): Handle
- "-z muldefs".
- (gld${EMULATION_NAME}_list_options): Add "-z muldefs".
-
- * ld.texinfo: Updated for --allow-multiple-definition and
- "-z muldefs".
-
- * ldmain.c (main): Initialize the allow_multiple_definition
- field to false.
-
- * lexsup.c (OPTION_ALLOW_MULTIPLE_DEFINITION): New.
- (ld_options): Add --allow-multiple-definition.
- (parse_args): Support OPTION_ALLOW_MULTIPLE_DEFINITION.
-
-2002-05-21 Jason Thorpe <thorpej@wasabisystems.com>
-
- * Makefile.am (ALL_EMULATIONS): Add earmelfb_nbsd.o.
- (earmelfb_nbsd.c): New rule.
- * Makefile.in: Regenerate.
- * configure.tgt (armeb-*-netbsdelf*): New target.
- (arm-*-netbsdelf*): Add armelfb_nbsd to targ_extra_emuls.
- (arm-*-netbsd*): Likewise.
- * emulparams/armelfb_nbsd.sh: New file.
-
-2002-05-18 Tom Rix <trix@redhat.com>
-
- * emultempl/aix.em (gld*_parse_args): Add -bnortl and -bnortllib
- support.
-
-2002-05-17 Marek Michalkiewicz <marekm@amelek.gda.pl>
-
- * Makefile.am: Add new emulations avr1, avr2, avr3, avr4, avr5.
- * Makefile.in: Regenerate.
- * configure.tgt (avr-*-*): Add avr[1-5] to targ_extra_emuls.
-
-2002-05-16 Marek Michalkiewicz <marekm@amelek.gda.pl>
-
- * emulparams/avr1.sh: New file.
- * emulparams/avr2.sh: New file.
- * emulparams/avr3.sh: New file.
- * emulparams/avr4.sh: New file.
- * emulparams/avr5.sh: New file.
- * scripttempl/avr.sc: New file.
-
-2002-05-15 Alan Modra <amodra@bigpond.net.au>
-
- * ldlang.c (section_already_linked): Call bfd_link_just_syms.
- (lang_place_orphans): Abort if just_syms_flag.
-
-2002-05-10 Tom Rix <trix@redhat.com>
-
- * emultempl/aix.em: (gld*_set_output_arch): New function. Use
- architecture and machine information in the output bfd.
- (gld*_before_parse): Remove old arch and machine code.
- (choose_target): Rename to gld*_choose_target.
- (rtld): Change type to int.
- * ldfile.c (ldfile_try_open_bfd): Disable compatiblity check for
- objects in XCOFF archives.
- * ldfile.h: Update copyright date.
-
-2002-05-10 Jakub Jelinek <jakub@redhat.com>
-
- * ldmain.c (main): Enable -z combreloc by default.
-
-2002-05-07 Federico G. Schwindt <fgsch@olimpo.com.br>
-
- * Makefile.am: Honour DESTDIR.
- * Makefile.in: Regenerate.
-
-2002-05-07 Richard Sandiford <rsandifo@redhat.com>
-
- * ldlang.h (lang_output_section_statement_type): Add update_dot_tree.
- (lang_enter_overlay): Remove the last two parameters.
- (lang_leave_overlay): Take them here instead.
- * ldgram.y (memspec_at_opt): Set $$ to null if no region is given.
- (section): Pass LMA and crossref flag to lang_leave_overlay rather
- than lang_enter_overlay.
- * ldlang.c (lang_memory_region_lookup): Return null for null names.
- (lang_output_section_statement_lookup): Initialize update_dot_tree.
- (lang_size_sections_1): Evaluate it.
- (lang_leave_output_section_statement): Rework LMA lookup.
- (overlay_lma, overlay_nocrossrefs): Remove.
- (lang_enter_overlay): Remove LMA and crossref arguments.
- (lang_enter_overlay_section): Don't set the LMA here.
- (lang_leave_overlay): Take LMA and crossref arguments. Move the '.'
- assignment to the last section's update_dot_tree. Unconditionally
- use the load and run-time regions specified in the OVERLAY statement.
- Likewise the first section's LMA. Only set the other sections' LMAs
- when no load region is given.
-
-2002-05-06 Nick Clifton <nickc@redhat.com>
-
- * po/sv.po: New translation.
-
-2002-05-04 Alan Modra <amodra@bigpond.net.au>
-
- * emultempl/hppaelf.em (build_section_lists): New function.
- (gld${EMULATION_NAME}_finish): Call elf32_hppa_setup_section_lists
- and build_section_lists.
-
-2002-05-03 Kazu Hirata <kazu@cs.umass.edu>
-
- * ld.h: Fix formatting.
- * ldexp.c: Likewise.
- * ldfile.c: Likewise.
- * ldlang.c: Likewise.
- * ldmain.c: Likewise.
- * lexsup.c: Likewise.
- * pe-dll.c: Likewise.
-
-2002-05-02 Alan Modra <amodra@bigpond.net.au>
-
- * emultempl/ppc64elf.em (gld${EMULATION_NAME}_after_allocation):
- Adjust for ppc64_elf_set_toc change. #include libbfd.h.
- (build_section_lists): Do output_section tests here.
-
-2002-04-30 Tom Rix <trix@redhat.com>
-
- * emultempl/aix.em : (gld*_parse_arge): Formatting changes.
-
-2002-05-01 Alan Modra <amodra@bigpond.net.au>
-
- Long branch stubs, multiple stub sections.
- * emultempl/ppc64elf.em: Include ldctor.h.
- (stub_file): New var.
- (group_size): New var.
- (ppc_create_output_section_statements): New function.
- (struct hook_stub_info): New.
- (hook_in_stub): New function.
- (ppc_add_stub_section): New function.
- (ppc_layout_sections_again): New function.
- (build_section_lists): New function.
- (gld${EMULATION_NAME}_finish): Rewrite.
- (real_func): New var.
- (ppc_for_each_input_file_wrapper): New function.
- (ppc_lang_for_each_input_file): New function.
- (lang_for_each_input_file): Define.
- (PARSE_AND_LIST_PROLOGUE): Define.
- (PARSE_AND_LIST_LONGOPTS): Define.
- (PARSE_AND_LIST_OPTIONS): Define.
- (PARSE_AND_LIST_ARGS_CASES): Define.
- (LDEMUL_CREATE_OUTPUT_SECTION_STATEMENTS): Define.
-
-2002-04-30 Tom Rix <trix@redhat.com>
-
- * emultempl/aix.em (gld*_parse_arge, gld*_before_allocation): Add
- -blibpath, -bnolibpath support.
-
-2002-04-30 Mark Mitchell <mark@codesourcery.com>
-
- * Makefile.am (ALL_EMULATIONS): Add elf32ppcwindiss.o.
- (eelf32ppcwindiss.c): New target.
- * Makefile.in: Regenerated.
- * configure.tgt: Add support for powerpc-*-windiss.
- * emulparams/elf32ppcwindiss.sh: New file.
-
-2002-04-30 Richard Sandiford <rsandifo@redhat.com>
-
- * ldlang.c (print_assignment): Update print_dot for assignments to ".".
- * ldexp.c (exp_print_token): Add "infix_p" argument.
- (exp_print_tree): Update accordingly.
-
-2002-04-28 Alan Modra <amodra@bigpond.net.au>
-
- * Makefile.am (mpw): New maintainer mode rule to make mpw-*.c files.
- * Makefile.in: Regenerate.
- * mpw-elfmips.c: Delete.
- * mpw-eppcmac.c: Delete.
- * mpw-esh.c: Delete.
- * mpw-idtmips.c: Delete.
-
-2002-04-17 J"orn Rennecke <joern.rennecke@superh.com>
-
- * emulparams/shelf32.sh (MACHINE): Now sh5.
-
-2002-04-17 Thiemo Seufer <seufer@csv.ica.uni-stuttgart.de>
-
- * ldgram.y: Fix syntax warning.
-
-2002-04-11 Nick Clifton <nickc@cambridge.redhat.com>
-
- * emultempl/armelf.em (PARSE_AND_LIST_SHORTOPTS): Add 'n' in order
- to prevent "-n" from being taken as an abbreviation for
- "--no-pipeline-knowledge".
-
-2002-04-08 Alan Modra <amodra@bigpond.net.au>
-
- * ldlang.c (lang_size_sections_1): Don't complain about
- SEC_NEVER_LOAD sections having no memory region specified.
-
- * ld.texinfo (Format Commands <OUTPUT_FORMAT>): Typo fix.
-
-2002-04-07 matthew green <mrg@redhat.com>
-
- * configure.host (*-*-netbsd*): Add support for NetBSD/ELF.
-
-2002-04-04 Alan Modra <amodra@bigpond.net.au>
-
- * dep-in.sed: Cope with absolute paths.
- * Makefile.am (dep.sed): Subst TOPDIR and BFDDIR.
- Run "make dep-am".
- * Makefile.in: Regenerate.
-
-2002-04-04 Thiemo Seufer <seufer@csv.ica.uni-stuttgart.de>
-
- * emulparams/elf64btsmip.sh: n64 replaces .reginfo with .MIPS.options.
-
-2002-04-03 Jakub Jelinek <jakub@redhat.com>
-
- * ldexp.c (fold_binary) [DATA_SEGMENT_ALIGN]: If common page size
- is smaller than maximum, round dot up to common page boundary.
-
-2002-03-28 Alan Modra <amodra@bigpond.net.au>
-
- * configure.host: Set up for generic hosts first, then tweak as
- necessary in more specific targets.
- (HOSTING_LIBS): Include libgcc_eh.a if found.
-
-2002-03-23 Andreas Jaeger <aj@suse.de>
-
- * emulparams/elf_x86_64.sh (COMMONPAGESIZE): Set it.
-
-2002-03-21 Alan Modra <amodra@bigpond.net.au>
-
- * Makefile.am: Run "make dep-am".
- * Makefile.in: Regenerate.
-
-2002-03-21 Albert Chin-A-Young <china@thewrittenword.com>
-
- * genscripts.sh (LIB_SEARCH_DIRS): Quote path.
-
-2002-03-20 Alan Modra <amodra@bigpond.net.au>
-
- * ldlang.c (ldlang_add_undef): If the output bfd has been opened,
- add the symbol to the linker hash table immediately.
- (lang_place_undefineds): Split symbol creation out..
- (insert_undefined): ..to here.
-
-2002-03-18 David O'Brien <obrien@FreeBSD.org>
-
- * emultempl/elf32.em: Use lbasename vs. basename to fix problem where
- the contents of the buffer returned from basename function will are
- getting overwritten while still being used.
-
-2002-03-18 Jan Hubicka <jh@suse.cz>
- Andreas Jaeger <aj@suse.de>
- Andreas Schwab <schwab@suse.de>
-
- * configure.tgt (x86_64-*-linux-gnu*): Configure i386 as native.
- * elf_x86_64.sh (ARCH): Set to i386:x86-64
- set libraries to default to lib64 paths.
-
-2002-03-18 Tom Rix <trix@redhat.com>
-
- * Makefile.am : Add eaix5ppc and eaix5rs6, AIX 5 support.
- * configure.tgt : Same.
- * emulparms/aix5ppc.sh : New file. For eaix5ppc.
- * emulparms/aix5rs6.sh : New file. For eaix5rs6.
- * emulparms/aixppc.sh : OUPUT_FORMAT_32BIT and OUTPUT_FORMAT_64BIT
- emulation parameters for better -b32, -b64 support.
- * emulparms/aixrs6.sh : Same.
- * emulparms/ppcmacos.sh : Same.
- * emultempl/aix.em (choose_target) : Use new emulation parameters
- OUTPUT_FORMAT_32BIT and OUTPUT_FORMAT_64BIT.
- * Makefile.in : Regenerate.
-
-2002-03-18 Nick Clifton <nickc@cambridge.redhat.com>
-
- * po/fr.po: Updated version.
-
-2002-03-18 Alan Modra <amodra@bigpond.net.au>
-
- * ldmain.c (main): Move .text readonly flag fudges from here..
- * ldlang.c (lang_process): ..to here.
-
-2002-03-14 Alan Modra <amodra@bigpond.net.au>
-
- * ldlang.c (lang_check): Remove the word size check added in last
- change. Treat emitrelocations case as for relocatable links.
-
-2002-03-13 Nick Clifton <nickc@cambridge.redhat.com>
-
- * po/fr.po: Updated version.
-
-2002-03-13 Alan Modra <amodra@bigpond.net.au>
-
- * ldlang.c (lang_check): Do relocatable link checks first, so that
- warn_mismatch can't override. Check compatible and word size too.
-
-2002-03-07 Daniel Jacobowitz <drow@mvista.com>
-
- * ld.texinfo: Wrap @menu in @ifnottex, not @ifinfo.
-
-2002-03-05 Jakub Jelinek <jakub@redhat.com>
-
- * scripttempl/elf.sc: Only use DATA_SEGMENT_END() together with
- DATA_SEGMENT_ALIGN.
-
-2002-03-04 H.J. Lu <hjl@gnu.org>
-
- * scripttempl/elf.sc: Put .preinit_array, .init_array and
- .fini_array in the data segment.
-
-2002-03-04 Alan Modra <amodra@bigpond.net.au>
-
- * scripttempl/elf.sc: Correct syntax errors in 2002-03-01 commit.
-
-2002-03-01 David Mosberger <davidm@hpl.hp.com>
-
- * scripttempl/elf.sc (SECTIONS): Add entries for .preinit_array,
- .init_array, and .fini_array.
-
-2002-02-20 Andreas Schwab <schwab@suse.de>
-
- * emulparams/elf64_ia64.sh (OTHER_READONLY_SECTIONS): Don't fold
- .IA64_unwind* in a relocatable link.
-
-2002-02-20 Nick Clifton <nickc@cambridge.redhat.com>
-
- * NEWS: Mark 2.12 branch.
-
-2002-02-19 Martin Schwidefsky <schwidefsky@de.ibm.com>
-
- * emulparams/elf64_s390.sh (ARCH): Change to "s390:64-bit".
- * emulparams/elf_s390.sh (ARCH): Change to "s390:31-bit".
-
-2002-02-18 Tom Rix <trix@redhat.com>
-
- * emultempl/aix.em (gld*_parse_args): Add -brtl support.
- (gld*_before_allocation): Same.
- (gld*_create_output_section_statements): Generate
- __rtinit if run time linking. Add librtl.a to the link.
- (gld*_read_file): Clean.
-
-2002-02-18 Alan Modra <amodra@bigpond.net.au>
-
- * emulparams/elf64ppc.sh (OTHER_TEXT_SECTIONS): Define.
-
-2002-02-18 David O'Brien <obrien@FreeBSD.org>
-
- * Makefile.am: Add new files earmelf_fbsd, eelf32ppc_fbsd,
- eelf_i386_fbsd, eelf64_ia64_fbsd, eelf_x86_64_fbsd, eelf64_sparc_fbsd,
- and eelf64alpha_fbsd.
- * Makefile.in: Regenerate.
- * configure.tgt(sparc64-*-freebsd, ia64-*-freebsd, i[3456]86-*-freebsd,
- x86_64-*-freebsd, arm-*-freebsd, alpha*-*-freebsd, powerpc-*-freebsd):
- use a FreeBSD-specific emulation rather than the psABI one.
- * emulparams/elf_fbsd.sh (ELF_INTERPRETER_NAME): Set appropriate value
- for all FreeBSD ELF systems.
- * emulparams/armelf_fbsd.sh: Bridge elf_fbsd.sh and the "native" psABI
- emulation.
- * emulparams/elf32ppc_fbsd.sh: Likewise.
- * emulparams/elf64_ia64_fbsd.sh: Likewise.
- * emulparams/elf64_sparc_fbsd.sh: Likewise.
- * emulparams/elf64alpha_fbsd.sh: Likewise.
- * emulparams/elf_i386_fbsd.sh: Likewise.
- * emulparams/elf_x86_64_fbsd.sh: Likewise.
-
-2002-02-18 Nick Clifton <nickc@cambridge.redhat.com>
-
- * po/tr.po: Updated version.
-
-2002-02-18 Alan Modra <amodra@bigpond.net.au>
-
- * ld.texinfo (Output Section Fill): Fix amateur texinfo.
- (FILL): Likewise.
-
-2002-02-17 Hans-Peter Nilsson <hp@bitrange.com>
-
- * emultempl/mmo.em (mmo_after_open): Don't call
- _bfd_mmix_check_all_relocs when producing ELF output.
-
-2002-02-15 Richard Henderson <rth@redhat.com>
-
- * emulparams/elf64alpha.sh (NOP): Adjust for big-endian
- definition. Emit a unop+nop pair.
-
-2002-02-15 Hans-Peter Nilsson <hp@bitrange.com>
-
- * emultempl/mmix-elfnmmo.em (mmix_after_allocation): Also check
- for presence of .MMIX.reg_contents.linker_allocated before early
- exit.
-
- * NEWS: Mention support for MMIX.
-
-2002-02-15 Alan Modra <amodra@bigpond.net.au>
-
- Support arbitrary length fill patterns.
- * ld.texinfo (Output Section Fill): Describe fill expressions.
- (FILL): Refer to the above.
- * ldexp.h (etree_value_type): Add "str" field.
- (union etree_union): Add "str" to "value" struct.
- (exp_bigintop): Declare.
- (exp_get_fill): Declare.
- * ldexp.c: Include "safe-ctype.h".
- (exp_intop): Set value.str to NULL.
- (exp_bigintop): New function.
- (new_rel): Pass in "str", and set new.str from it.
- (new_rel_from_section): Set new.str to NULL.
- (fold_name): Adjust calls to new_rel.
- (exp_fold_tree): Likewise.
- (exp_get_fill): New function.
- * ldgram.y (struct big_int bigint, fill_type *fill): New.
- (INT): Returns a "bigint". Adjust all code handling INTs.
- (fill_opt): Returns a "fill".
- (fill_exp): Split out of fill_opt, use for FILL.
- * ldlang.h (struct _fill_type): New.
- (fill_type): Move typedef to ldexp.h.
- (lang_output_section_statement_type): "fill" is now a pointer.
- (lang_fill_statement_type): Likewise.
- (lang_padding_statement_type): Likewise.
- (lang_add_fill): Now takes a "fill_type *" param.
- (lang_leave_output_section_statement): Likewise.
- (lang_do_assignments): Likewise.
- (lang_size_sections): Likewise.
- (lang_leave_overlay_section): Likewise.
- (lang_leave_overlay): Likewise.
- * ldlang.c: Include ldgram.h after ldexp.h.
- (lang_output_section_statement_lookup): Adjust for fill_type change.
- (print_fill_statement): Likewise.
- (print_padding_statement): Likewise.
- (insert_pad): Now takes a "fill_type *" arg.
- (size_input_section): Likewise.
- (lang_size_sections_1): Likewise.
- (lang_size_sections): Likewise.
- (lang_do_assignments): Likewise.
- (lang_add_fill): Likewise.
- (lang_leave_output_section_statement): Likewise.
- (lang_leave_overlay_section): Likewise.
- (lang_leave_overlay): Likewise.
- Adjust all callers of the above function.
- * ldlex.l: Include ldgram.h after ldexp.h. Allow hex numbers
- starting with "0X" as well as "0x". Return bigint.str for hex
- numbers starting with "0x" or "0X", zero bigint.str otherwise.
- Always use base 16 for numbers starting with "$".
- * ldmain.c: Include ldgram.h after ldexp.h.
- * ldwrite.c (build_link_order): Use bfd_data_link_order in place
- of bfd_fill_link_order.
- * pe-dll.c: Adjust lang_do_assignments calls.
- * emultempl/elf32.em: Likewise.
- * emultempl/hppaelf.em: Likewise.
- * emultempl/ppc64elf.em: Likewise.
- * emultempl/beos.em: Include ldgram.h after ldexp.h, adjust
- lang_add_assignment call.
- * emultempl/pe.em: Likewise.
-
-2002-02-14 Phil Edwards <pme@gcc.gnu.org>
-
- * ld.texinfo (VERSION scripts): Symbol names are globbing patterns.
- * ldgram.y (lang_new_vers_regex): Rename to lang_new_vers_pattern;
- the pattern in question is not a regexp.
- * ldlang.c: Likewise.
- * ldlang.h: Likewise.
- * ldlex.l (V_IDENTIFIER): Allow '[', ']', '-', '!', and '^' also.
-
-2002-02-12 Jakub Jelinek <jakub@redhat.com>
-
- * ldlex.l (DATA_SEGMENT_ALIGN, DATA_SEGMENT_END): New tokens.
- * ldgram.y (DATA_SEGMENT_ALIGN, DATA_SEGMENT_END): New tokens.
- (exp): Add DATA_SEGMENT_ALIGN (exp, exp) and DATA_SEGMENT_END (exp).
- * ldexp.c (exp_data_seg): New variable.
- (exp_print_token): Handle DATA_SEGMENT_ALIGN and DATA_SEGMENT_END.
- (fold_binary): Handle DATA_SEGMENT_ALIGN.
- (exp_fold_tree): Handle DATA_SEGMENT_END.
- Pass allocation_done when recursing instead of hardcoding
- lang_allocating_phase_enum.
- * ldexp.h (exp_data_seg): New.
- * ldlang.c (lang_size_sections_1): Renamed from lang_size_sections.
- (lang_size_sections): New.
- * ld.texinfo (DATA_SEGMENT_ALIGN, DATA_SEGMENT_END): Document.
- * scripttempl/elf.sc: Use DATA_SEGMENT_ALIGN and DATA_SEGMENT_END
- if COMMONPAGESIZE is defined.
- * emulparams/elf_i386.sh (COMMONPAGESIZE): Set to 4K.
- * emulparams/elf32_sparc.sh (COMMONPAGESIZE): Set to 8K.
- * emulparams/elf64_sparc.sh (COMMONPAGESIZE): Set to 8K.
- * emulparams/elf64alpha.sh (COMMONPAGESIZE): Set to 8K.
- * emulparams/elf64_ia64.sh (COMMONPAGESIZE): Set to 16K for shared
- libraries only.
-
-2002-02-11 Alan Modra <amodra@bigpond.net.au>
-
- * Makefile.in: Regenerate.
-
-2002-02-10 Daniel Jacobowitz <drow@mvista.com>
-
- * lexsup.c: Remove strtoul declaration.
-
-2002-02-10 Daniel Jacobowitz <drow@mvista.com>
-
- * ldmain.c: Add prototype for main ().
- * lexsup.c: Guard declaration of strtoul with HAVE_STDLIB_H.
- * emultempl/lnk960.em (lnk960_choose_target): Function should
- take two arguments.
-
-2002-02-10 Alan Modra <amodra@bigpond.net.au>
-
- * ldlang.c (entry_section): New initialised variable.
- (lang_finish): Use it.
- * ldlang.h (entry_section): Declare.
- * emultempl/ppc64elf.em (gld${EMULATION_NAME}_finish): Set
- entry_section to ".opd".
-
-2002-02-09 Chris Demetriou <cgd@broadcom.com>
-
- * ld.texinfo (Options): Add back in -nostdlib documentation,
- which had been inadvertently removed.
-
-2002-02-09 Hans-Peter Nilsson <hp@bitrange.com>
-
- * emultempl/mmix-elfnmmo.em (mmix_after_allocation): Adjust
- register section vma to a sane value after emitting error. Make
- fatal conditions cause program exit when emitting message.
-
-2002-02-08 Ivan Guzvinec <ivang@opencores.org>
-
- * configure.tgt: Add or32-*-rtems target.
-
-2002-02-08 Alexandre Oliva <aoliva@redhat.com>
-
- Contribute sh64-elf.
- 2002-01-24 Alexandre Oliva <aoliva@redhat.com>
- * emulparams/shelf32.sh (STACK_ADDR): Define as formerly defined
- in OTHER_RELOCATABLE_SECTIONS.
- 2002-01-18 Alexandre Oliva <aoliva@redhat.com>
- * emulparams/shelf32.sh (STACK_ADDR): Define.
- (OTHER_RELOCATABLE_SECTIONS): Renamed to...
- (OTHER_SECTIONS): this. Removed stack settings.
- * emulparams/shelf64.sh (OTHER_RELOCATABLE_SECTIONS): Do not set.
- (OTHER_SECTIONS): Reset after sourcing shelf32.sh.
- 2001-03-12 DJ Delorie <dj@redhat.com>
- * emultempl/sh64elf.em (sh64_elf_$_before_allocation): Disable
- relaxing if any shmedia or mixed sections are found.
- 2001-03-07 DJ Delorie <dj@redhat.com>
- * emultempl/sh64elf.em (sh64_elf_before_allocation): Pass f to
- einfo. Gracefully decline to output to non-elf formats.
- 2001-03-06 Hans-Peter Nilsson <hpn@redhat.com>
- * emulparams/shelf64.sh (OTHER_RELOCATING_SECTIONS) <.stack>:
- Default to _end aligned to next multiple of 0x40000, plus 0x40000.
- * emulparams/shelf32.sh: Ditto.
- 2001-01-14 Hans-Peter Nilsson <hpn@cygnus.com>
- * emulparams/shelf32.sh (OTHER_RELOCATING_SECTIONS): Tweak
- comment.
- 2001-01-10 Ben Elliston <bje@redhat.com>
- * emulparams/shelf32.sh (OTHER_RELOCATING_SECTIONS): Avoid
- non-portable shell constructs. From Hans-Peter Nilsson.
- 2001-01-09 Hans-Peter Nilsson <hpn@cygnus.com>
- * emulparams/shelf64.sh (EXTRA_EM_FILE): Define empty.
- * Makefile.am (eshelf64.c, eshlelf64.c, eshlelf32.c): Adjust
- dependencies to the shell script include chain.
- * Makefile.in: Regenerate.
- 2001-01-06 Hans-Peter Nilsson <hpn@cygnus.com>
- * emultempl/sh64elf.em: Update and tweak comments.
- (sh64_elf_${EMULATION_NAME}_after_allocation): Always allocate and
- make a .cranges section SEC_IN_MEMORY.
- 2000-12-30 Hans-Peter Nilsson <hpn@cygnus.com>
- * emultempl/sh64elf.em
- (sh64_elf_${EMULATION_NAME}_before_allocation): Don't stop when
- .cranges section found to be necessary; continue and set stored
- section contents flags for sections with non-mixed contents.
- Use a struct sh64_section_data container and sh64_elf_section_data
- to store contents-type flags.
- Remove unused update of "isec".
- (sh64_elf_${EMULATION_NAME}_after_allocation): Only process
- sections marked SHF_SH5_ISA32_MIXED. Use sh64_elf_section_data to
- access contents-type flags. Assert that the associated container
- is initialized. Use that container, not elf_gp_size, to hold size
- of linker-generated cranges contents.
- 2000-12-18 Hans-Peter Nilsson <hpn@cygnus.com>
- * emultempl/sh64elf.em
- (sh64_elf_${EMULATION_NAME}_before_allocation): Exit early if
- there's already a .cranges section. When section flag difference
- is found, don't NULL-check cranges a second time. Tweak comments.
- (sh64_elf_${EMULATION_NAME}_after_allocation): Use size after
- merging, not max size, as size of ld-generated .cranges contents.
- Don't set ELF section flags in output section. When checking for
- needed .cranges descriptors, don't use a variable; compare
- incoming ELF section flags directly to SHF_SH5_ISA32_MIXED. Tweak
- comments.
- 2000-12-18 Hans-Peter Nilsson <hpn@cygnus.com>
- * emultempl/sh64elf.em: New file.
- * Makefile.am (eshelf32.c, eshlelf32.c): Adjust dependencies.
- * Makefile.in: Regenerate.
- * emulparams/shelf32.sh (OUTPUT_FORMAT): Only set if not set.
- (OTHER_RELOCATING_SECTIONS): Ditto.
- (EXTRA_EM_FILE): New, set to sh64elf if not set.
- * emulparams/shlelf32.sh: Stub out all settings except
- OUTPUT_FORMAT. Source shelf32.sh.
- * emulparams/shelf64.sh: Similar, but also keep ELF_SIZE and
- OTHER_RELOCATING_SECTIONS.
- (OTHER_RELOCATING_SECTIONS): Remove .cranges.
- * emulparams/shlelf64.sh: Stub out all settings except
- OUTPUT_FORMAT. Source shelf64.sh.
- 2000-12-15 Hans-Peter Nilsson <hpn@cygnus.com>
- * emulparams/shelf64.sh (OTHER_RELOCATING_SECTIONS): Include
- .cranges section.
- (DATA_START_SYMBOLS): Define, provide ___data.
- (OTHER_READONLY_SYMBOLS): Define, provide ___rodata and align to 8
- for consecutive .data section.
- (OTHER_GOT_SECTIONS): Define, align to 8 for consecutive .bss
- section after .data section.
- * emulparams/shlelf64.sh: Ditto.
- * emulparams/shelf32.sh: Ditto.
- (ALIGNMENT): Define to 8.
- * emulparams/shelf32.sh: Ditto.
- 2000-12-12 Hans-Peter Nilsson <hpn@cygnus.com>
- * configure.tgt (sh64-*-elf*): Assign targ_extra_libpath to get
- built-in linker scripts.
- 2000-11-30 Hans-Peter Nilsson <hpn@cygnus.com>
- * emulparams/shlelf64.sh: New.
- * emulparams/shelf64.sh: New.
- * configure.tgt (sh64-*-elf*): Add shelf64 and shlelf64 to
- targ_extra_emuls.
- * Makefile.am: Add support for shlelf64 and shelf64.
- * Makefile.in: Regenerate.
- 2000-11-29 Hans-Peter Nilsson <hpn@cygnus.com>
- * configure.tgt (sh64-*-elf*): Add shelf as default.
- Add shlelf to targ_extra_emuls.
- 2000-11-24 Hans-Peter Nilsson <hpn@cygnus.com>
- * emulparams/shelf32.sh: New file.
- * emulparams/shlelf32.sh: New file.
- * Makefile.am: Add support for shlelf32 and shelf32.
- * configure.tgt: Map sh64-*-elf* to shlelf32 and shelf32.
- * Makefile.in: Regenerate.
-
-2002-02-05 Hans-Peter Nilsson <hp@axis.com>
-
- * ldlang.c (lang_reset_memory_regions): Rename from
- reset_memory_regions. Change all callers. Make public.
- * ldlang.h (lang_reset_memory_regions): Prototype.
- * emultempl/elf32.em (gld${EMULATION_NAME}_finish): Call
- lang_reset_memory_regions before lang_size_sections.
- * emultempl/hppaelf.em (hppaelf_layout_sections_again): Likewise.
- * emultempl/ppc64elf.em (gld${EMULATION_NAME}_finish): Likewise.
-
-2002-02-04 Hans-Peter Nilsson <hp@bitrange.com>
-
- * emultempl/mmix-elfnmmo.em (mmix_after_allocation): Use signed
- arithmetic when checking for too many global registers.
-
-2002-02-02 Jason Thorpe <thorpej@wasabisystems.com>
-
- * Makefile.am (ALL_EMULATIONS): Add ehppanbsd.o.
- (ehppanbsd.c): New rule.
- * Makefile.in: Regenerate.
- * configure.tgt (hppa*-*-netbsd*): New target.
- * emulparams/hppalinux.sh: Add comment to check other files
- that source this file it is modified, and list which
- files that do.
- * emulparams/hppanbsd.sh: New file.
-
-2002-02-01 Geoffrey Keating <geoffk@redhat.com>
-
- * scripttempl/xstormy16.sc: Don't allocate extra space for the
- stack.
-
-2002-02-01 Hans-Peter Nilsson <hp@bitrange.com>
-
- Support on-demand global register allocation from
- R_MMIX_BASE_PLUS_OFFSET relocs.
- * emultempl/mmix-elfnmmo.em (mmix_after_allocation): Rename from
- mmix_set_reg_section_vma. Call
- _bfd_mmix_finalize_linker_allocated_gregs.
- (mmix_before_allocation): New function.
- (LDEMUL_AFTER_ALLOCATION): Set to mmix_after_allocation.
- (LDEMUL_BEFORE_ALLOCATION): Define to mmix_before_allocation.
- * scripttempl/mmo.sc (.text): Mark .init, .fini as KEEP.
- (.MMIX.reg_contents): Add .MMIX.reg_contents.linker_allocated
- before .MMIX.reg_contents.
- * emultempl/mmo.em (gldmmo_before_allocation): Define to default.
- (mmo_after_open): New function.
- (LDEMUL_AFTER_OPEN): Define to mmo_after_open.
- * emulparams/elf64mmix.sh (OTHER_SECTIONS): Tweak formatting. Add
- .MMIX.reg_contents.linker_allocated before .MMIX.reg_contents.
-
-2002-01-31 Ivan Guzvinec <ivang@opencores.org>
-
- * emulparams/or32.sh: New file.
- * emulparams/or32elf.sh: New file.
- * scripttempl/or32.sc: New file.
- * configure.tgt : Add support for or32.
- * configure: Regenerate
- * Makefile.am: Add support for or32.
- * Makefile.in: Regenerate.
- * NEWS: Mention support for or32.
- * po/ld.pot: Regenerate.
-
-2002-01-29 Chris Demetriou <cgd@broadcom.com>
- Mitch Lichtenberg <mpl@broadcom.com>
-
- * emulparams/elf32bmip.sh (EXTRA_EM_FILE): Define to be mipself.
- * emultempl/mipself.em: New file to handle MIPS ELF embedded
- reloc creation (ld --embedded-relocs).
-
-2002-01-27 Daniel Jacobowitz <drow@mvista.com>
-
- * configure: Regenerated.
-
-2002-01-26 Hans-Peter Nilsson <hp@bitrange.com>
-
- * Makefile.am (install): Depend on install-info.
- * Makefile.in: Regenerate.
-
-2002-01-26 Christian Rose <menthos@menthos.com>
-
- * ldmain.c (main): Use full sentences to ease translation.
-
-2002-01-26 Nick Clifton <nickc@cambridge.redhat.com>
-
- * po/fr.po: Updated version.
-
-2002-01-25 Nick Clifton <nickc@cambridge.redhat.com>
-
- * po/es.po: Updated version.
-
-2002-01-25 Andreas Jaeger <aj@suse.de>
-
- * ldlex.l (yy_input): Correct error check.
-
-2002-01-25 Alan Modra <amodra@bigpond.net.au>
-
- * ldmisc.c (demangle): Put back dots when string not demangled.
-
-2002-01-22 Richard Henderson <rth@redhat.com>
-
- * emulparams/elf64alpha.sh (NOP): Use unop.
-
-2002-01-21 Andreas Jaeger <aj@suse.de>
-
- * ldlex.l: Use fread instead of read.
-
-2002-01-21 Jason Thorpe <thorpej@wasabisystems.com>
-
- * configure.tgt (ia64-*-netbsd*): New target.
-
-2002-01-21 H.J. Lu <hjl@gnu.org>
-
- * emulparams/elf32btsmip.sh (SHLIB_TEXT_START_ADDR): Change to
- 0.
- * emulparams/elf64btsmip.sh (SHLIB_TEXT_START_ADDR): Likewise.
-
-2002-01-18 Andreas Jaeger <aj@suse.de>
-
- * ldver.c (ldversion): Update year.
-
-2002-01-17 Nick Clifton <nickc@cambridge.redhat.com>
-
- * po/ld.pot: Regenerate.
-
-2002-01-16 Alan Modra <amodra@bigpond.net.au>
-
- * Makefile.am (eelf64ppc.c, eelf64lppc.c): Depend on ppc64elf.em.
- * Makefile.in: Regenerate.
- * emulparams/elf64ppc.sh (EXTRA_EM_FILE): Define.
- * emultempl/ppc64elf.em: New file.
-
-2002-01-15 DJ Delorie <dj@redhat.com>
-
- * scripttempl/pe.sc: Add support for constructor priorities.
-
-2002-01-07 Marek Michalkiewicz <marekm@amelek.gda.pl>
-
- * emulparams/avr1200.sh (DATA_START): Define as 0x60.
- * emulparams/avr23xx.sh: Likewise.
- * emulparams/avr4433.sh: Likewise.
- * emulparams/avr44x4.sh: Likewise.
- * emulparams/avr85xx.sh: Likewise.
- * emulparams/avrmega103.sh: Likewise.
- * emulparams/avrmega161.sh: Likewise.
- * emulparams/avrmega603.sh: Likewise.
- * scripttempl/elf32avr.sc: Use DATA_START instead of 0x60.
-
-2002-01-08 Alexandre Oliva <aoliva@redhat.com>
-
- * ldlang.c (walk_wild_section): Exclude object file if enclosing
- archive is excluded.
-
-2002-01-07 Jason Thorpe <thorpej@wasabisystems.com>
-
- * Makefile.am (ALL_EMULATIONS): Add eshelf_nbsd.o and eshlelf_nbsd.o.
- (eshelf_nbsd.c): New rule.
- (eshlelf_nbsd.c): New rule.
- * Makefile.in: Regenerate.
- * configure.tgt (sh*le-*-netbsdelf*): New target.
- (sh*-*-netbsdelf*): New target.
- * emulparams/shelf.sh: Document that shelf_nbsd.sh sources this file.
- * emulparams/shelf_nbsd.sh: New emulation.
- * emulparams/shlelf_nbsd.sh: New emulation.
-
-2002-01-07 Nick Clifton <nickc@cambridge.redhat.com>
-
- * po/es.po: New file: Spanish translation.
- * configure.in (ALL_LINGUAS): Add es.
- * configure: Regenerate.
-
-2002-01-06 John Marshall <jmarshall@acm.org>
-
- * ld.texinfo: Note that --emit-relocs is currently only
- implemented for ELF.
-
-2002-01-05 Alan Modra <amodra@bigpond.net.au>
-
- * emultempl/elf32.em (gld${EMULATION_NAME}_place_orphan): Make use
- of bfd_section_list_remove and bfd_section_list_insert macros.
- * emultempl/pe.em (gld_${EMULATION_NAME}_place_orphan): Likewise.
- * emultempl/mmo.em (mmo_place_orphan): Likewise.
-
-2002-01-04 Jason Thorpe <thorpej@wasabisystems.com>
-
- * configure.tgt (x86_64-*-netbsd*): New target.
-
-For older changes see ChangeLog-0001
-
-Local Variables:
-mode: change-log
-left-margin: 8
-fill-column: 74
-version-control: never
-End:
diff --git a/contrib/binutils/ld/ChangeLog-9197 b/contrib/binutils/ld/ChangeLog-9197
deleted file mode 100644
index 9307f33..0000000
--- a/contrib/binutils/ld/ChangeLog-9197
+++ /dev/null
@@ -1,7601 +0,0 @@
-Sun Dec 21 12:51:49 1997 Ian Lance Taylor <ian@cygnus.com>
-
- * ldexp.c (fold_name): Don't crash if the symbol is defined in a
- section with no output section, such as a shared library section.
-
-Wed Dec 17 12:14:11 1997 Ian Lance Taylor <ian@cygnus.com>
-
- * lexsup.c (parse_args): Keep track of where we are in the option
- parsing before calling ldemul_parse_args, so that we don't call it
- multiple times on the same argument and confuse the getopt
- internals.
-
-Thu Dec 11 09:00:15 1997 Michael Meissner <meissner@cygnus.com>
-
- * configure.tgt (d30v-elf-*): Rename d30velf_e to d30v_e and
- d30velf_o to d30v_o to work in DOS environments.
- * Makefile.{am,in}: Ditto.
-
- * emulparams/d30v_{o,e}.sh: Rename from d30velf_{o,e}.
- * emulparams/d30velf_{o,e}.sh: Deleted.
-
-Wed Dec 10 17:40:08 1997 Nick Clifton <nickc@cygnus.com>
-
- * scripttempl/armcoff.sc: Add glue sections (code taken from Arm
- branch).
-
- * emulparams/armcoff.sh (TEMPLATE_NAME): Set to armcoff.
-
- * emultempl/armcoff.em: New file, imported from Arm branch.
-
-Wed Dec 10 14:10:44 1997 Michael Meissner <meissner@cygnus.com>
-
- * scripttempl/elfd30v.sc: Add .rel and .rela sections for all
- defined sections. Set up __{D,C}TOR_{LIST,END}__. Add onchip and
- external memory sections for rodata. Delete .string, .rodata1,
- and .data1 sections.
-
-Tue Dec 9 15:28:17 1997 Michael Meissner <meissner@cygnus.com>
-
- * Makefile.am: Add Oct 23 changes to Makefile.in here.
-
- * Makefile.{am,in}: (ALL_EMULATIONS): Add ed10velf.o.
-
- * Makefile.{am,in}: (ALL_EMULATIONS): Add etic80coff.o.
-
- * Makefile.{am,in}: (ALL_EMULATIONS): Add ed30velf{,_e,_o}.o.
- (ed30velf_e.c): Like d30velf, except .text/.data/etc always go in
- external memory.
- (ed30velf_o.c): Like d30velf, except .text/.data/etc always go in
- onchip memory.
-
- * emulparams/d30velf.sh (STACK_START_ADDR): Top of default
- stack.
- ({TEXT,DATA,EMEM}_SIZE): Sizes of the 3 memory areas.
- ({TEXT,DATA,BSS}_MEMORY): Which memory region .text, .data, and
- .bss should go in.
-
- * emulparams/d30velf_{e,o}.sh: New files to be explicit whether
- .text, .data, etc go in external memory or onchip memory.
-
- * configure.tgt (d30v-*-*ext*): New configuration to default
- .text, .data, etc. in external memory.
- (d30v-*-*onchip*): New configuration to default .text, .data,
- etc. in onchip memory.
- (d30v-*-*): Add d30velf_{e,o} emulations.
-
- * scripttempl/elfd30v.sc: Allow .text, .data, .bss to be put in
- either the onchip text/data areas or the external memory area.
- (MEMORY): Get sizes from d30velf.sh.
- (.e{data,text,bss}): Put sections in the external memory region.
- (.stext): Put section in the onchip text region.
- (.s{data,bss}): Put sections in the onchip data region.
- (__stack): Assign from ${STACK_START_ADDR}.
- (.text): Put in ${TEXT_MEMORY} memory region.
- (.data{,1}/.strings/.rodata{,1}): Put in ${DATA_MEMORY} memory
- region.
- (.bss): Put in ${BSS_MEMORY} memory region.
-
-Tue Dec 2 10:14:47 1997 Nick Clifton <nickc@cygnus.com>
-
- * configure.tgt (targ_extra_emuls): Add support for Thumb target.
-
-Sat Nov 22 15:23:19 1997 Ian Lance Taylor <ian@cygnus.com>
-
- * ldlex.l: Don't define hex_mode. Correct number regexp to not
- accept hex digits without a leading $ or 0x. Handle leading $
- correctly. Pass 0 rather than hex_mode to bfd_scan_vma.
- * ldlex.h (hex_mode): Don't declare.
-
-Sun Nov 16 20:16:45 1997 Michael Meissner <meissner@cygnus.com>
-
- * emulparams/d30velf.sh ({DATA,EMEM}_START_ADDR): Define as start
- of internal data area and external memory on chip.
-
- * scripttempl/elfd30v.sc: Define a MEMORY region that describes
- the 3 regions of memory on the chip. Put .text/.init/.fini into
- the text memory region, put other segments into the data memory
- region. Add more of the standard elf sections. Default __stack
- to be 0x20008000, which is 1 byte beyond end of the internal data
- region.
-
-Thu Nov 13 13:45:00 1997 Andrew Cagney <cagney@b1.cygnus.com>
-
- * configure.tgt (targ_extra_emuls): Make FreeBSD a i386bsd
- variant.
-
-Sun Nov 2 14:51:36 1997 H.J. Lu <hjl@gnu.ai.mit.edu>
-
- * configure.host (alpha*-*-linux*): Correct HOSTING_CRT0. Set
- HOSTING_LIBS.
-
-Thu Oct 30 12:25:55 1997 Ian Lance Taylor <ian@cygnus.com>
-
- * ld.h (args_type): Add warn_mismatch field.
- * ldmain.c (main): Initialize warn_mismatch field.
- * lexsup.c (parse_args): Handle --no-warn-mismatch option.
- * ldlang.c (ignore_bfd_error): New static function.
- (lang_check): If warn_mismatch is false, don't warn about
- mismatched input files.
- * ld.texinfo, ld.1: Document new option.
-
-Thu Oct 23 14:38:18 1997 Nick Clifton <nickc@cygnus.com>
-
- * scripttempl/v850.sc: Rename linker symbol '_stack' to '__stack'
- to avoid conflicts with C code which is defining a variable called
- 'stack'.
-
-Thu Oct 23 00:57:45 1997 Richard Henderson <rth@dot.cygnus.com>
-
- * Makefile.in (ALL_EMULATIONS): Move eelf64_sparc.o ...
- (ALL_64_EMULATIONS): ... here.
- (eelf64_sparc.c): Template should be elf32 not generic.
- * emulparams/elf64_sparc.sh (TEMPLATE_NAME): New definition.
-
-Thu Oct 23 00:44:20 1997 Richard Henderson <rth@dot.cygnus.com>
-
- * configure.tgt: Add sparc64-*-linux*.
- * emulparams/elf64_sparc.sh (GENERATE_SHLIB_SCRIPT, NOP): New.
-
-Wed Oct 22 11:29:25 1997 Ian Lance Taylor <ian@cygnus.com>
-
- * scripttempl/pe.sc: Put .eh_frame in .rdata.
-
-Fri Oct 17 00:00:13 1997 Richard Henderson <rth@cygnus.com>
-
- * ldlang.c (lang_register_vers_node): Only check globals<=>locals,
- since we need to be able to export different versions of the same
- symbol.
-
-Wed Oct 15 14:52:36 1997 Ian Lance Taylor <ian@cygnus.com>
-
- * scripttempl/pe.sc: Put .stab and .stabstr sections at end.
-
-Wed Oct 8 12:37:05 1997 Richard Henderson <rth@cygnus.com>
-
- * configure.tgt, configure.host: Change alpha-*-* to alpha*-*-*;
- config.guess now recognizes alphaev5 etc.
-
-Fri Oct 3 14:23:02 1997 Ian Lance Taylor <ian@cygnus.com>
-
- * emultempl/aix.em (gld${EMULATION_NAME}_parse_args): Don't treat
- -s and -u as -static and -unix.
-
-Thu Oct 2 18:40:28 1997 Ian Lance Taylor <ian@cygnus.com>
-
- * ldlang.c (wild_doit): Rewrite flag handling for clarity. If we
- are not adding the first input section, and SEC_READONLY is clear
- on the output section, then don't copy it from the input section.
- If SEC_READONLY is not set on the input section, then clear it on
- the output section.
-
- * configure.tgt (mips*-sgi-irix[56]*): Use elf32bsmip rather than
- elf32bmip.
- (mips*el-*-linux*): Change elf32lmip to elf32lsmip and elf32bmip
- to elf32bsmip.
- (mips*-*-linux*): Likewise.
- * emulparams/elf32bsmip.sh: New file; just like elf32bmip.sh, but
- setting ENTRY to __start.
- * emulparams/elf32lsmip.sh: New file; just like elf32lmip.sh, but
- setting ENTRY to __start.
- * scripttempl/elf.sc: Always set ENTRY to _start if it was not
- already set.
-
-Wed Oct 1 16:41:00 1997 Nick Clifton <nickc@cygnus.com>
-
- * emulparams/v850.sh (ROZDATA_START_ADDR, ROSDATA_START_ADDR): New
- Variables.
-
- * scripttempl/v850.sc: Move read only areas out of zero and small
- data sections and into their own sections.
-
-Wed Sep 24 16:59:15 1997 Joel Sherrill <joel@oarcorp.com>
-
- * configure.tgt (sh*-*-rtems*): New target, like sh-*-elf*.
-
-Wed Sep 24 11:33:14 1997 Ian Lance Taylor <ian@cygnus.com>
-
- * ld.texinfo (Section Options): Improve documentation of NOLOAD
- directive.
-
- * aclocal.m4: Rebuild with new libtool.
- * configure: Rebuild.
-
-Mon Sep 22 17:24:06 1997 Ian Lance Taylor <ian@cygnus.com>
-
- * ldlang.c (wild_doit): Revert patch of September 3.
-
-Wed Sep 17 16:45:34 1997 Nick Clifton <nickc@cygnus.com>
-
- * Makefile.am, Makefile.in: Add rule for ev850.c
- * configure.tgt (targ_extra_emuls): Add v850 target.
-
-Wed Sep 17 16:43:39 1997 Nick Clifton <nickc@cygnus.com>
-
- * emulparams/v850.sh (CALL_TABLE_START_ADDR): New entry.
- * scripttempl/v850.sc: Add call table data area
-
-Mon Sep 15 11:29:13 1997 Ken Raeburn <raeburn@cygnus.com>
-
- Merge change from Martin Hunt:
-
- * scripttempl/elfd30v.sc: Put .rodata in the .text section.
-
-Tue Sep 9 07:49:56 1997 Fred Fish <fnf@ninemoons.com>
-
- * ldlang.c (lang_memory_region_lookup): Remove extraneous
- initialization of p.
-
-Thu Sep 4 09:03:33 1997 Ian Lance Taylor <ian@cygnus.com>
-
- * emultempl/aix.em (gld${EMULATION_NAME}_parse_args): In
- expression produced for -bpT and -bpD options, align to a 32 byte
- boundary rather than an 8 byte boundary.
- * scripttempl/aix.sc: Put .tocbss at start of .bss section.
-
- * ldmisc.h, ldmisc.c, ldcref.c: Rename finfo to lfinfo, to avoid
- function name conflict with AIX 4.2 unistd.h header file.
-
-Wed Sep 3 15:12:32 1997 Ian Lance Taylor <ian@cygnus.com>
-
- * ldlang.c (wild_doit): Clear SEC_HAS_CONTENTS from a
- noload_section.
-
-Fri Aug 29 00:32:31 1997 Ian Lance Taylor <ian@cygnus.com>
-
- * Makefile.am (ld_new_DEPENDENCIES): Remove @LEXLIB@.
- * Makefile.in: Rebuild.
-
-Thu Aug 28 10:12:10 1997 Doug Evans <dje@canuck.cygnus.com>
-
- * configure.tgt (arc-*-elf*): Recognize.
- * Makefile.am (ALL_EMULATIONS): Add earcelf.o.
- * Makefile.in: Regenerate.
- * emulparams/arcelf.sh: New file.
-
-Wed Aug 20 11:14:13 1997 Ian Lance Taylor <ian@cygnus.com>
-
- * ldlang.c (wildcardp): Don't let a backslash by itself cause a
- pattern to be treated as a wildcard pattern.
-
- * ldgram.y (atype): Accept parentheses with no type.
-
- * ld.texinfo (Section Definition): Clarify use of whitespace.
- (Section Placement): Likewise.
-
-Mon Aug 18 11:12:03 1997 Nick Clifton <nickc@cygnus.com>
-
- * configure.tgt (targ_extra_emuls): Add support for v850e target.
-
-Mon Aug 18 11:12:03 1997 Nick Clifton <nickc@cygnus.com>
-
- * configure.tgt (targ_extra_emuls): Add support for v850e target.
-
-Sat Aug 9 00:42:27 1997 Ian Lance Taylor <ian@cygnus.com>
-
- * Makefile.am (ld.info): Change dependency from
- $(BFDDIR)/doc/bfdsumm.texi to bfdsumm.texi.
- (ld.dvi): Likewise.
- (bfdsumm.texi): New target.
- (CLEANFILES): Add bfdsumm.texi.
- * Makefile.in: Rebuild.
-
- * Makefile.am: New file, based on old Makefile.in.
- * acinclude.m4: New file, from old aclocal.m4.
- * configure.in: Call AM_INIT_AUTOMAKE and AM_PROG_LIBTOOL. Remove
- shared library handling; now handled by libtool. Replace
- AC_CONFIG_HEADER with AM_CONFIG_HEADER. Call AC_PROG_YACC,
- AC_PROG_LEX, and AC_DECL_YYTEXT. Call AM_MAINTAINER_MODE,
- AM_CYGWIN32, and AM_EXEEXT. Don't call CY_CYGWIN32 or CY_EXEEXT.
- * configure.host: Don't set HLDFLAGS, HLDENV, or RPATH_ENVVAR.
- * acconfig.h: Mention PACKAGE and VERSION.
- * stamp-h.in: New file.
- * ldver.c (ld_program_version): Set ld_program_version from
- VERSION.
- * ldgram.y, ldlex.l: Replace VERSION with VERSIONK.
- * Makefile.in: Now built with automake.
- * aclocal.m4: Now built with aclocal.
- * configure, config.in: Rebuild.
-
-Mon Jul 28 19:04:50 1997 Rob Savoye <rob@chinadoll.cygnus.com>
-
- * configure.in: Use CYGWIN and EXEEXT autoconf macro to look for
- win32 dependencies.
- * configure: Regenerated with autoconf 2.12.
- * Makefile.in: Add $(EXEEXT) to executable.
-
-Tue Jul 22 18:50:38 1997 Robert Hoehne <robert.hoehne@Mathematik.TU-Chemnitz.DE>
-
- * emulparams/i386go32.sh (OUTPUT_FORMAT): Set to "coff-go32".
- (SEGMENT_SIZE): Set to 0x200.
- * scripttempl/i386go32.sc: Rewrite.
- * configure.tgt (i[3456]86-*-msdosdjgpp*): New target.
-
-Mon Jul 7 12:39:42 1997 Ian Lance Taylor <ian@cygnus.com>
-
- From Manfred Hollstein <manfred@s-direktnet.de>:
- * configure.host (i[3456]86-*-linux*libc1*): Renamed from
- i[3456]86-*-linux*.
- (i[3456]86-*-linux*): New host.
-
-Thu Jun 26 13:54:03 1997 Ian Lance Taylor <ian@cygnus.com>
-
- * scripttempl/pe.sc: Put .rsrc after .reloc. Put input .rsrc
- sections in the output .rsrc section.
-
-Wed Jun 25 12:48:41 1997 Andreas Schwab <schwab@issan.informatik.uni-dortmund.de>
-
- * configure.host (m68*-*-linux*libc1*): Renamed from
- `m68*-*-linux*'.
- (m68*-*-linux*): New configuration for use with GNU libc 2.
-
-Mon Jun 16 19:18:21 1997 Geoff Keating <geoffk@ozemail.com.au>
-
- * scripttempl/elfppc.sc: Correct .rela.sdata entries.
-
- * scripttempl/elfppc.sc: Put the PLT between the small and large
- BSS segments.
- * emulparams/elf32ppc.sh (TEXT_START_ADDR): The ABI says `A
- program base of 0x02000000 is recommended...' because otherwise
- shared libraries are less efficient. We use 0x01800000 because
- otherwise it's impossible to branch to location 0, for instance if
- you have an undefined weak symbol.
-
-Mon Jun 16 12:49:36 1997 H.J. Lu <hjl@gnu.ai.mit.edu>
-
- * ldlang.c (lang_place_undefineds): Add \n in einfo call.
- (lang_size_sections): Likewise.
- * ldlex.l: Likewise.
- * emultempl/aix.em (gld${EMULATION_NAME}_read_file): Likewise.
- * emultempl/mipsecoff.em (gld${EMULATION_NAME}_after_open):
- Likewise.
- (check_sections): Likewise.
- (gld${EMULATION_NAME}_after_allocation): Likewise.
- * emultempl/pe.em (gld_$${EMULATION_NAME}_before_allocation):
- Likewise.
- * mpw-eppcmac.c (gldppcmacos_read_file): Likewise.
- * mpw-idtmips.c (gldmipsidt_after_open): Likewise.
- (check_sections): Likewise.
- (gldmipsidt_after_allocation): Likewise.
-
- * ldemul.c (ldemul_choose_mode): Remove unused einfo argument.
-
-Fri Jun 6 23:47:42 1997 Ian Lance Taylor <ian@cygnus.com>
-
- * scripttempl/pe.sc: Add zeroes after .idata$3 to mark the end of
- the import list.
-
-Thu May 29 13:13:22 1997 Ian Lance Taylor <ian@cygnus.com>
-
- * emultempl/elf32.em (gld${EMULATION_NAME}_place_section): Don't
- crash if an output section has no BFD section.
-
-Fri May 23 15:23:25 1997 Fred Fish <fnf@cygnus.com>
-
- * lexsup.c (ld_options): Add entry for the new "task-link" option.
- (parse_args): Handle the "task-link" option.
- (OPTION_TASK_LINK): Add define.
-
-Wed May 21 17:44:15 1997 Ian Lance Taylor <ian@cygnus.com>
-
- * ldmain.c (main): Correct check of fclose return value when
- handling --force-exe-suffix.
-
-Thu May 15 11:35:29 1997 Nick Clifton <nickc@cygnus.com>
-
- * ldlang.c (lang_check): Add test of the return value from the
- call to bfd_merge_private_bfd_data().
-
-Mon May 12 23:22:58 1997 Ian Lance Taylor <ian@cygnus.com>
-
- * scripttempl/elfmips.sc: Remove.
- * scripttempl/elf.sc: Set ENTRY based on target. Permit
- TEXT_DYNAMIC to control .dynamic segment. Permit
- SHLIB_TEXT_START_ADDR to set start of shared object. Support
- INITIAL_READONLY_SECTIONS. Put .stub in .text. Only put
- .gnu.linkonce.t* in .text when relocating. Support
- OTHER_TEXT_SECTIONS. Support SHLIB_DATA_ADDR as well as
- DATA_ADDR. Support OTHER_GOT_SYMBOLS and OTHER_GOT_SECTIONS.
- * emulparams/elf32b4300.sh (SCRIPT_NAME): Set to elf.
- (DATA_ADDR): Don't set.
- (INITIAL_READONLY_SECTIONS): Rename from OTHER_READONLY_SECTIONS.
- (OTHER_TEXT_SECTIONS): Set.
- (OTHER_GOT_SECTIONS): Rename from OTHER_READWRITE_SECTIONS.
- (MACHINE): Set to empty string.
- * emulparams/elf32l4300.sh: Likewise.
- * emulparams/elf32ebmip.sh: Likewise.
- * emulparams/elf32elmip.sh: Likewise.
- * emulparams/elf32bmip.sh: Likewise. Also:
- (TEXT_DYNAMIC): Set.
- * emulparams/elf32lmips.sh: Likewise.
- * Makefile.in (eelf32bmips.c): Depend upon elf.sc rather than
- elfmips.sc.
- (eelf32ebmips.c, eelf32elmips.c, eelf32lmip.c): Likewise.
-
-Mon May 12 11:11:06 1997 Andreas Schwab <schwab@issan.informatik.uni-dortmund.de>
-
- * scripttempl/elf.sc: Don't align the data segment on the next 8
- byte boundary, instead let the linker use whatever the individual
- sections require.
-
-Fri May 9 17:45:46 1997 Ian Lance Taylor <ian@cygnus.com>
-
- * configure.tgt (i[3456]86-*-gnu*): Don't include Mach support.
-
-Tue May 6 13:21:19 1997 Ian Lance Taylor <ian@cygnus.com>
-
- From Sean McNeil <sean@mcneil.com>:
- * emultempl/pe.em (sort_by_file_name): Sort by archive name
- first.
- (sort_sections): Sort all sections, not just sections in the same
- archive.
-
-Mon May 5 18:19:55 1997 Philip Blundell <pjb27@cam.ac.uk>
-
- * configure.tgt, configure.host: cope with '*-*-linux-gnuaout'
- targets.
-
-Fri May 2 15:54:28 1997 Mike Meissner <meissner@cygnus.com>
-
- * scripttempl/tic80coff.sc (.text): Add a leading underscore to
- __{D,C}TOR_{LIST,END}__ definations. Rearrange the order of items
- in the .text section. Move .const, .ctors, .dtors into separate
- sections.
-
-Wed Apr 30 12:23:21 1997 Manfred Hollstein <manfred@s-direktnet.de>
-
- * scripttempl/m88kbcs.sc (__.initp.end, _etext): Added whitespace
- around assignment of current location pointer.
-
-Thu Apr 17 13:07:18 1997 Ian Lance Taylor <ian@cygnus.com>
-
- * ldctor.c (ldctor_build_sets): Make sure the set is aligned
- appropriately.
-
-Tue Apr 15 13:19:26 1997 Ian Lance Taylor <ian@cygnus.com>
-
- * Makefile.in (INSTALL): Set to @INSTALL@.
- (INSTALL_XFORM, INSTALL_XFORM1): Remove.
- (install): Depend upon ld.new and installdirs. Use
- $(program_transform_name) directly, rather than using
- $(INSTALL_XFORM) and $(INSTALL_XFORM1).
- (installdirs): New target.
- (install-info): Run mkinstalldirs.
-
-Mon Apr 14 12:06:15 1997 Ian Lance Taylor <ian@cygnus.com>
-
- * Makefile.in (INSTALL): Change install.sh to install-sh.
-
- From Thomas Graichen <graichen@rzpd.de>:
- * configure.in: Use ${CONFIG_SHELL} when running $ac_config_sub.
- * configure: Rebuild.
-
-Fri Apr 4 11:42:41 1997 Ian Lance Taylor <ian@cygnus.com>
-
- * emultempl/pe.em: Include "libiberty.h".
- (sort_sections_1): Use xmalloc rather than alloca.
-
- * ldlex.l: Recognize SQUAD.
- * ldgram.y (length): Add SQUAD.
- * ldctor.c (ldctor_build_sets): Use SQUAD for a signed 8 byte
- reloc.
- * ldlang.c (print_data_statement): Handle SQUAD.
- (lang_size_sections, lang_do_assignments): Likewise.
- * ldexp.c (exp_print_token): Add SQUAD to table.
- * ldwrite.c (build_link_order): Handle SQUAD.
- * ld.texinfo (Section Data Expressions): Document SQUAD.
-
-Thu Apr 3 13:19:40 1997 Ian Lance Taylor <ian@cygnus.com>
-
- * ldver.c (ld_program_version): Set to 2.8.1.
-
- * Branched binutils 2.8.
-
-Wed Apr 2 11:55:27 1997 Ian Lance Taylor <ian@cygnus.com>
-
- * mpw-idtmips.c: Rename from mpw-emipsidt.c.
- * mpw-elfmips.c: Rename from mpw-emipself.c.
- * mpw-config.in: Update accordingly.
-
- * ldlang.c (lang_process): Call lang_check immediately after
- opening the input files, rather than at the end of the link.
-
-Mon Mar 31 23:44:00 1997 Ian Lance Taylor <ian@cygnus.com>
-
- * emultempl/pe.em (init): Fully bracket initializer.
- (set_pe_stack_heap): Remove locals begin_commit and end.
- (gld_${EMULATION_NAME}_after_open): Remove unused local i.
- (gld${EMULATION_NAME}_place_orphan): Remove unused local ptr.
-
-Mon Mar 31 16:35:51 1997 Joel Sherrill <joel@oarcorp.com>
-
- * configure.tgt (hppa*-*-rtems*): New target, like hppa-*-*elf*.
-
-Fri Mar 28 15:29:23 1997 H.J. Lu <hjl@gnu.ai.mit.edu>
-
- Contributed by David S. Miller <davem@caip.rutgers.edu>:
- * configure.tgt (sparc*-*-linuxaout*): New target.
- (sparc*-*-linux*): New target.
- * emulparams/sparclinux.sh: New file.
- * Makefile.in (ALL_EMULATIONS): Add esparclinux.o.
- (esparclinux.c): New target.
-
-Fri Mar 28 14:30:12 1997 Ian Lance Taylor <ian@cygnus.com>
-
- From Ralf Baechle <ralf@gnu.ai.mit.edu>:
- * configure.tgt: Set targ_extra_emuls for mips*el-*-linux* and
- mips*-*-linux*. Use elf32bmip and elf32lmip, not elf32ebmip and
- elf32elmip.
-
-Thu Mar 27 17:14:32 1997 Ian Lance Taylor <ian@cygnus.com>
-
- * lexsup.c (parse_args): Update copyright date in version
- message.
-
-Fri Mar 21 12:28:41 1997 Philippe De Muyter <phdm@info.ucl.ac.be>
-
- * emulparams/delta68.sh (OUTPUT_FORMAT): Set to "coff-m68k-sysv".
-
-Tue Mar 18 11:16:23 1997 Ian Lance Taylor <ian@cygnus.com>
-
- * Makefile.in: Rebuild dependencies.
-
- * emultempl/aix.em: Include "obstack.h".
-
-Mon Mar 17 19:26:06 1997 Ian Lance Taylor <ian@cygnus.com>
-
- * ldlang.c: Include "obstack.h".
-
-Sat Mar 15 23:23:46 1997 Fred Fish <fnf@cygnus.com>
-
- * configure.tgt (powerpc-*-beos*): Use aixppc for targ_emul.
-
-Sat Mar 15 18:10:38 1997 H.J. Lu <hjl@lucon.org>
-
- * ldemul.h (ldemul_list_emulations): Use full prototype.
- * ldlang.c (print_one_symbol): Add declaration.
- * ldlang.h (dprint_statements): Declare.
- * ldmain.c (remove_output): Declare.
- * ldmisc.c (vfinfo): Declare.
- * ldwrite.c (clone_section): Declare.
- (split_sections): Make static. Declare.
- * mri.c: Include libiberty.h.
- (strdup): Don't declare.
- (mri_alias): Use xstrdup rather than strdup.
-
-Fri Mar 14 21:30:06 1997 Ian Lance Taylor <ian@cygnus.com>
-
- * scripttempl/elfmips.sc: Change handling of data area when
- generating a shared library to not skip a large block of memory.
- From Per Fogelstrom <pefo@cvs.openbsd.org>.
-
-Wed Mar 12 21:33:09 1997 Ian Lance Taylor <ian@cygnus.com>
-
- * ldmain.c (multiple_definition): Only skip the warning if the
- output section is absolute when the input section is not
- absolute.
-
- * ldlex.l: Accept whitespace in VERS_START state. Warn about
- invalid characters in VERS_* states.
-
-Tue Mar 11 13:51:31 1997 Ian Lance Taylor <ian@cygnus.com>
-
- * emultempl/aix.em (gld${EMULATION_NAME}_read_file): Don't let a
- trailing space lead us to think that there is a zero address.
-
-Sun Mar 9 23:06:35 1997 Eric Youngdale <eric@andante.jic.com>
-
- * ldgram.y (vers_node): Correct typo of '(' for '{'.
-
-Fri Mar 7 18:40:12 1997 Fred Fish <fnf@cygnus.com>
-
- * scripttempl/tic80coff.sc (ENTRY): Entry symbol is __start
- rather than _start.
- (__edata): Define this rather than "edata".
- (__end): Define this rather than "end".
-
-Tue Mar 4 17:18:35 1997 Michael Meissner <meissner@cygnus.com>
-
- * configure.tgt (tic80-*-*): Allow dropping of -coff.
-
-Sun Mar 2 22:59:49 1997 Fred Fish <fnf@cygnus.com>
-
- * Makefile.in (ld.dvi): Set MAKEINFO environment variable as well
- as TEXINPUTS. Needed for building in separate build dir.
- * ldint.texinfo (SCRIPT_NAME): Fix typo.
- * emulparams/tic80coff.sh: Rewrite to include internal documentation
- about each shell variable that is set (or not set).
- * scripttempl/tic80coff.sc: Complete rewrite.
-
-Fri Feb 28 17:42:27 1997 Ian Lance Taylor <ian@cygnus.com>
-
- * ldmain.c (main): Call bfd_set_default_target.
- * Makefile.in (ldmain.o): Define TARGET when compiling.
-
-Thu Feb 27 11:41:03 1997 Ian Lance Taylor <ian@cygnus.com>
-
- * ldmain.c (main): Don't initialize link_info.lprefix or
- link_info.lprefix_len.
- * emultempl/hppaelf.em (hppaelf_before_parse): Likewise.
-
- * emultempl/m88kbcs.em: Remove.
- * emulparams/m88kbcs.sh (TEMPLATE_NAME): Don't set.
- * Makefile.in (em88kbcs.c): Depend upon generic.em rather than
- m88kbcs.em.
-
- * mri.c (mri_draw_tree): Pass noload_section, not SEC_NEVER_LOAD,
- to lang_enter_output_section_statement. From Mark Rasin
- <mark.rasin@telrad.co.il>.
-
-Wed Feb 26 11:51:44 1997 Ian Lance Taylor <ian@cygnus.com>
-
- * ldlang.c (lang_one_common): Clear SEC_IS_COMMON from common
- section.
-
-Tue Feb 25 20:38:11 1997 Stan Shebs <shebs@andros.cygnus.com>
-
- * configure.tgt (mips*-*-lnews*): New target.
- * Makefile.in (emipslnews.c): New target.
- * emulparams/mipslnews.sh: New file.
-
-Tue Feb 25 16:04:09 1997 Ian Lance Taylor <ian@cygnus.com>
-
- * emultempl/elf32.em (hold_interp): New static variable.
- (gld${EMULATION_NAME}_place_orphan): Put loadable .note sections
- after hold_interp. Choose a unique output section name.
- (gld${EMULATION_NAME}_place_section): Don't set hold_use if the
- SEC_LOAD or SEC_ALLOC flags differ. Set hold_interp.
-
-Mon Feb 24 18:16:09 1997 Ian Lance Taylor <ian@cygnus.com>
-
- From Eric Youngdale <eric@andante.jic.com>:
- * ldlex.l (V_TAG, V_IDENTIFIER): New macros.
- (VERS_START, VERS_SCRIPT, VERS_NODE): New states to parse version
- information.
- (ldlex_version_script, ldlex_version_file): New functions.
- * ldlex.h (enum input_enum): Add input_version_script.
- (ldlex_version_script): Declare.
- (ldlex_version_file): Declare.
- * ldgram.y (%union): Add deflist, versyms, and versnode.
- (VERS_TAG, VERS_IDENTIFIER): New terminals.
- (GLOBAL, LOCAL, VERSION, INPUT_VERSION_SCRIPT): New terminals.
- (file): Accept INPUT_VERSION_SCRIPT.
- (ifile_p1): Accept version.
- (version_script_file): New nonterminal.
- (version, vers_nodes, vers_node): Likewise.
- (verdep, vers_tag, ver_defns): Likewise.
- * ldlang.c (lang_elf_version_info): New global variable.
- (lang_new_vers_regex): New function.
- (lang_new_vers_node): New function.
- (version_index): New static variable.
- (lang_register_vers_node): New function.
- (lang_add_vers_depend): New function.
- * ldlang.h (lang_elf_version_info): Declare.
- (lang_new_vers_regex, lang_new_vers_node): Declare.
- (lang_add_vers_depend, lang_register_vers_node): Declare.
- * lexsup.c (OPTION_VERSION_SCRIPT): Define.
- (ld_options): Add "version-script".
- (parse_args): Handle OPTION_VERSION_SCRIPT.
- * emultempl/elf32.em (gld${EMULATION_NAME}_before_allocation):
- Pass lang_elf_version_info to size_dynamic_sections.
- * scripttempl/elf.sc: Add .gnu.version sections.
- * ld.texinfo: Document symbol versioning.
-
-Fri Feb 21 17:37:51 1997 Martin M. Hunt <hunt@pizza.cygnus.com>
-
- * Makefile.in (ed30velf.c): New target.
- * configure.tgt (d30v-*-*): New target.
- * emulparams/d30velf.sh: New file.
- * scripttempl/elfd30v.sc: New file.
-
-Fri Feb 14 18:28:31 1997 Ian Lance Taylor <ian@cygnus.com>
-
- * ld.texinfo (Option Commands): Document the INCLUDE command.
-
-Thu Feb 13 20:31:37 1997 Philippe De Muyter <phdm@info.ucl.ac.be>
-
- * configure.in: Call BFD_NEED_DECLARATION on getenv.
- * acconfig.h (NEED_DECLARATION_GETENV): New macro.
- * sysdep.h (getenv): Declare if NEED_DECLARATION_GETENV.
- * ldemul.c (ld_emul_default_target): Do not cast getenv return
- value.
- * ldmain.c (get_emulation): Likewise.
- * configure, config.in: Rebuild.
-
-Tue Feb 11 15:34:26 1997 Ian Lance Taylor <ian@cygnus.com>
-
- * scripttempl/elfmips.sc: When relocating, put .mips16.fn.* and
- .mips16.call.* in .text.
-
-Sun Feb 9 18:09:13 1997 Fred Fish <fnf@cygnus.com>
-
- * emulparams/tic80coff.sh: New (dummy) file for TIc80.
- * scripttempl/tic80coff.sc: New (dummy) file for TIc80.
- * Makefile.in (etic80coff.c): Add target and rule to build it.
- * configure.tgt (tic80-*-coff): Set targ_emul to tic80coff.
-
-Fri Jan 31 13:16:53 1997 Ian Lance Taylor <ian@cygnus.com>
-
- * emultempl/sunos.em (gld${EMULATION_NAME}_find_so): Search for
- ".so" in the name, not ".so.".
- (gld${EMULATION_NAME}_search_dir): Accept a plain .so file.
-
- * Makefile.in (ld.info): Add -I$(srcdir). From Alan Modra
- <alan@spri.levels.unisa.edu.au>.
-
-Thu Jan 30 11:31:52 1997 Ian Lance Taylor <ian@cygnus.com>
-
- * emultempl/sunos.em: Include <ctype.h>.
- (gld${EMULATION_NAME}_find_so): Skip the directory name when
- searching for ".so.".
- (gld${EMULATION_NAME}_search_dir): Make sure that the library name
- has a version number, and that only version numbers follow .so.
-
-Wed Jan 29 18:15:00 1997 Geoffrey Noer <noer@cygnus.com>
-
- * scripttempl/pe.sc:
- * scripttempl/ppcpe.sc: add *(.gcc_except_table) to the text
- section so Win32 executables are valid.
-
-Mon Jan 27 12:28:43 1997 Ian Lance Taylor <ian@cygnus.com>
-
- * scripttempl/elf.sc: Put linkonce reloc section in other
- appropriate reloc sections.
- * scripttempl/elfmips.sc: Add linkonce support.
- * scripttempl/elfppc.sc: Likewise.
-
-Fri Jan 24 10:44:09 1997 Jeffrey A Law (law@cygnus.com)
-
- * emulparms/mn10200.sh (OTHER_RELOCATING_SECTIONS): Move the
- stack up to 0x80000.
- * emulparms/mn10300.sh (OTHER_RELOCATING_SECTIONS): Likewise.
-
-Tue Jan 21 12:11:10 1997 Doug Evans <dje@seba.cygnus.com>
-
- * emulparams/m32relf.sh (OTHER_RELOCATING_SECTIONS): Use PROVIDE
- to define `_stack'.
-
-Thu Jan 16 17:07:52 1997 Ian Lance Taylor <ian@cygnus.com>
-
- * ld.h (args_type): Rename auxiliary_filter_shlib to
- auxiliary_filters, and make it char **.
- * lexsup.c (parse_args): Handle -f by setting up an array.
- * emultempl/elf32.em (gld${EMULATION_NAME}_before_allocation): Use
- new name of auxiliary_filters.
-
- * ld.texinfo (Options): Improve documentation of --filter and
- --auxiliary.
-
-Tue Jan 14 15:44:28 1997 Ian Lance Taylor <ian@cygnus.com>
-
- * ld.texinfo (Options): Clarify that the normal usage is -T.
- (Commands): Likewise.
-
-Thu Jan 9 11:26:27 1997 Ian Lance Taylor <ian@cygnus.com>
-
- * scripttempl/armcoff.sc: Correct mask used for .data address.
-
-Wed Jan 8 15:14:59 1997 Geoffrey Noer <noer@cygnus.com>
-
- * emultempl/pe.em: make default executable a.exe instead of
- a.out
-
-Fri Jan 3 17:33:34 1997 Richard Henderson <rth@tamu.edu>
-
- * scripttempl/elf.sc: Move .got closer to .sdata and .sbss by
- shifting .plt back. Rumour has it that the NetBSD ld.so depends
- on .dynamic being after .got, so we leave that.
-
-Fri Jan 3 14:04:40 1997 Ian Lance Taylor <ian@cygnus.com>
-
- * Makefile.in (clean): Don't remove configdoc.texi.
- (maintainer-clean): Do remove configdoc.texi.
-
- * ld.texinfo (Operators): Remove '@' from @smallexmple in comment
- to avoid confusing texi2roff.
-
-Fri Jan 3 11:27:02 1997 Michael Meissner <meissner@tiktok.cygnus.com>
-
- * scripttempl/v850.sc (.zdata): Add .zcommon section.
- (.tdata): Add .tcommon and .tcommon_byte sections.
-
-Thu Jan 2 18:14:32 1997 Ian Lance Taylor <ian@cygnus.com>
-
- * configure.tgt (mips*el-*-linux*, mips*-*-linux*): New targets.
- * scripttempl/elfmips.sc: Use __start as the entry address for
- mips*-*-linux*.
-
-Tue Dec 31 14:48:30 1996 Ian Lance Taylor <ian@cygnus.com>
-
- * Makefile.in (ALL_CFLAGS): Add -D_GNU_SOURCE.
-
- * ld.h (args_type): Add filter_shlib and auxiliary_filter_shlib
- fields.
- * lexsup.c (parse_args): Recognize --auxiliary/-f and
- --filter/-F.
- * emultempl/elf32.em (gld${EMULATION_NAME}_before_allocation):
- Pass filter_shlib and auxiliary_filter_shlib to
- size_dynamic_sections.
- * ld.texinfo, ld.1: Document --filter/-F and --auxiliary/-f.
-
-Mon Dec 30 13:55:57 1996 Michael Meissner <meissner@tiktok.cygnus.com>
-
- * scripttempl/v850.sc (.tdata) Add .tbss and .tbyte sections.
-
-Wed Dec 18 22:57:35 1996 Stan Shebs <shebs@andros.cygnus.com>
-
- * mpw-make.sed: Use NewFolderRecursive for installation.
-
-Fri Dec 13 14:08:50 1996 Michael Meissner <meissner@tiktok.cygnus.com>
-
- * scripttempl/v850.sc: Make sure __{e,g}p start relative to the
- {s,t}data sections. Do not emit any linker generated symbols if
- -r. Use {TEXT,{Z,S,T}DATA}_START_ADDR variables to initialize
- where the different sections go. Change some whitespace.
-
- * emulparams/v850.sh ({TEXT,{Z,S,T}DATA}_START_ADDR): Define
- appropriately. Remove crud not used anymore.
-
-Fri Dec 13 10:19:57 1996 Jeffrey A Law (law@cygnus.com)
-
- * Makefile.in (emn10200.c): Add dependencies.
- * configure.tgt: Handle mn10200.
- * emulparms/mn10200.sh: New file.
-
-Thu Dec 12 17:04:55 1996 Ian Lance Taylor <ian@cygnus.com>
-
- * emultempl/gld960c.em: Include <ctype.h>.
- (gld960_set_output_arch): Get the machine type from the -A option
- if there is one, rather than always using core.
-
-Sat Dec 7 10:07:51 1996 Jeffrey A Law (law@cygnus.com)
-
- * emulparms/mn10300.sh: Handle leading underscores.
-
-Thu Dec 5 13:45:58 1996 Ian Lance Taylor <ian@cygnus.com>
-
- * emultempl/elf32.em (gld${EMULATION_NAME}_place_section): Only
- set hold_rel if SEC_ALLOC is set.
-
-Tue Dec 3 11:29:20 1996 Ian Lance Taylor <ian@cygnus.com>
-
- * ldlang.c (section_already_linked): Set the output_offset as well
- as the output_section when only reading symbols from a file.
-
-Mon Dec 2 11:43:50 1996 Ian Lance Taylor <ian@cygnus.com>
-
- * emulparams/*.sh: Make sure that each set of parameters which
- uses the elf.sc script sets MACHINE.
-
-Wed Nov 27 03:22:05 1996 Jason Merrill <jason@yorick.cygnus.com>
-
- * scripttempl/elf{,mips,ppc}.sc: Add the remaining DWARF sections.
- * scripttempl/elfd10v.sc: Likewise.
- * scripttempl/v850.sc: Likewise.
-
-Tue Nov 26 16:58:33 1996 Ian Lance Taylor <ian@cygnus.com>
-
- * configure: Rebuild with autoconf 2.12.
-
-Mon Nov 25 12:17:55 1996 Jim Wilson <wilson@cygnus.com>
-
- * emultempl/pe.em (gld_${EMULATION_NAME}_set_symbols): Add case
- for bfd_vma to init loop.
-
-Mon Nov 25 09:55:07 1996 Jeffrey A Law (law@cygnus.com)
-
- * emulparms/mn10300.sh: Remove bogus '_' prefix for
- entry symbol and ctor/dtor stuff.
-
-Fri Nov 15 13:00:18 1996 Jeffrey A Law (law@cygnus.com)
-
- * Makefile.in (emn10300.c): Add dependencies.
- * configure.tgt: Handle mn10300.
- * emulparms/mn10300.sh: New file.
-
-Tue Nov 5 10:57:50 1996 Martin M. Hunt <hunt@pizza.cygnus.com>
-
- * emulparams/d10velf.sh (READONLY_START_ADDR): Changed to 0x2000004.
- (EMBEDDED): Define.
-
-Fri Nov 1 10:01:27 1996 Ian Lance Taylor <ian@cygnus.com>
-
- * ld.texinfo: Add section on reporting bugs.
-
- * scripttempl/m68kcoff.sc: Make sure the etext and __CTOR_LIST__
- symbols are correctly aligned.
-
-Thu Oct 31 09:28:59 1996 Jeffrey A Law (law@cygnus.com)
-
- * scripttempl/v850.sc (zdata): Handle reszdata, romzdata and
- romzbss too.
-
-Tue Oct 29 12:33:05 1996 Martin M. Hunt <hunt@pizza.cygnus.com>
-
- * emulparams/d10velf.sh: Changes needed for D10V-EVA board.
- Set TEXT_START_ADDR to 0x1000000. Set READONLY_START_ADDR to
- 0x2000000.
-
- * scripttempl/elfd10v.sc: Fix calculation of .text. Change
- .stack to start at 0x2007ffe.
-
-Mon Oct 28 15:37:00 1996 Doug Evans <dje@canuck.cygnus.com>
-
- * configure.tgt (sparclet*-*-aout*): Delete, use sparc*-*-aout*.
-
-Wed Oct 23 16:17:22 1996 Jeffrey A Law (law@cygnus.com)
-
- * scripttempl/v850.sc (zdata): Fix typo "zrodata" -> "rozdata".
-
- * scripttempl/v850.sc (zdata): Make sure this stays
- in lo-memory.
-
-Tue Oct 22 11:36:47 1996 Jeffrey A Law (law@cygnus.com)
-
- * scripttempl/v850.sc (__ep): Put it at the start
- of the tda section.
-
- * scripttempl/v850.sc: Move all "normal" sections into
- the external memory region (0x100000 - 0x200000).
-
-Mon Oct 21 17:16:59 1996 Michael Meissner <meissner@wogglebug.tiac.net>
-
- * scripttempl/elfd10v.sc: Clone from elf.sc, move .text to
- 0x10000, so that is more room for data.
-
- * emulparams/d10velf.sh (TEXT_START_ADDR): Now 0x100000.
- (READONLY_START_ADDR): Now 0x0.
- (SCRIPT_NAME): Now elfd10v.
-
- * Makefile.in (ed10velf.c): Depend on elfd10v.sc, not elf.sc.
-
-Fri Oct 18 22:12:49 1996 Doug Evans <dje@canuck.cygnus.com>
-
- * emulparams/m32relf.sh (TEXT_START_ADDR): Change from 0 to 0x100.
-
-Fri Oct 18 15:43:38 1996 Ian Lance Taylor <ian@cygnus.com>
-
- * Makefile.in (ALL_EMULATIONS): Remove eelf64alpha.o.
- (ALL_64_EMULATIONS): New variable.
- * configure.in: Accept --enable-64-bit-bfd option. If it is set
- with --enable-targets=all, include ALL_64_EMULATIONS in
- EMULATION_OFILES.
- * configure: Rebuild.
-
-Fri Oct 18 12:58:35 1996 Jeffrey A Law (law@cygnus.com)
-
- * scripttempl/v850.sc (__gp, __ep): Define.
-
-Thu Oct 17 18:14:07 1996 Ian Lance Taylor <ian@cygnus.com>
-
- * ld.texinfo: Try to consistently use a single or a double dash
- for each option.
-
-Thu Oct 17 10:17:20 1996 Doug Evans <dje@canuck.cygnus.com>
-
- * emulparams/m32relf.sh (EMBEDDED): Define.
-
-Thu Oct 17 10:56:49 1996 Jeffrey A Law (law@cygnus.com)
-
- * scripttempl/v850.sc (.zdata): Add this before .text.
- (.sdata): Also include .rosdata as part of the .sdata.
- (.tdata): Include this just before .sdata.
-
- * emulparms/v850.sh (SCRIPT_NAME): Use "v850" not "elf".
- * scripttempl/v850.sc: Wrap script with a "cat << EOF".
-
-Wed Oct 16 23:10:01 1996 Jeffrey A Law (law@cygnus.com)
-
- * scripttempl/v850.sc: New linker script for the V850.
- * Makefile.in: Use it.
-
-Thu Oct 10 17:57:00 1996 Ian Lance Taylor <ian@cygnus.com>
-
- * emulparams/elf32b4300.sh: Define _gp in OTHER_GOT_SYMBOLS, not
- OTHER_READWRITE_SECTIONS.
- * emulparams/elf32l4300.sh: Likewise.
-
-Wed Oct 9 14:36:18 1996 Ian Lance Taylor <ian@cygnus.com>
-
- * ld.h (ld_config_type): Add warn_section_align field.
- * lexsup.c (OPTION_WARN_SECTION_ALIGN): Define.
- (ld_options): Add --warn-section-align.
- (parse_args): Handle --warn-section-align.
- * ldlang.c (lang_size_sections): If warn_section_align, warn if
- the start of a section changes due to alignment.
- * ld.texinfo, ld.1: Document --warn-section-align.
- * ld.texinfo: Change some single dashes to double dashes.
-
- * emultempl/pe.em (set_pe_subsystem): Record entry symbol for each
- subsystem type. Ifdef out os2 type. Recognize a version number.
-
-Tue Oct 8 12:07:13 1996 Ian Lance Taylor <ian@cygnus.com>
-
- * emultempl/pe.em (set_pe_subsystem): When setting the subsystem
- to windows, set the entry point.
-
- * Makefile.in (ldlex.c): Don't pass any options to $(LEX).
-
-Mon Oct 7 17:29:05 1996 Ian Lance Taylor <ian@cygnus.com>
-
- * ld.texinfo (Options): Mention .so extensions for shared
- libraries.
-
-Sun Oct 6 22:35:36 1996 Jason Merrill <jason@yorick.cygnus.com>
-
- * scripttempl/elf{,mips,ppc}.sc: Add DWARF 2 sections.
-
-Fri Oct 4 18:49:31 1996 Ian Lance Taylor <ian@cygnus.com>
-
- * scripttempl/m68kcoff.sc: Only set the address of .text if
- RELOCATING.
-
-Fri Oct 4 10:59:52 1996 Doug Evans <dje@canuck.cygnus.com>
-
- * emulparams/sparcaout.sh ({BIG,LITTLE}_OUTPUT_FORMAT): Define.
- * scripttempl/aout.sc ({BIG,LITTLE}_OUTPUT_FORMAT): Provide default.
- (OUTPUT_FORMAT): Support bi-endian targets.
-
-Thu Oct 3 13:52:03 1996 Ian Lance Taylor <ian@cygnus.com>
-
- * fnmatch.h, fnmatch.c: Remove (now in libiberty).
- * Makefile.in: Rebuild dependencies.
- (CFILES): Remove fnmatch.c.
- (HFILES): Remove fnmatch.h.
- (OFILES): Remove fnmatch.o.
-
-Thu Oct 3 15:41:24 1996 Jason Molenda (crash@godzilla.cygnus.co.jp)
-
- * Makefile.in (mostlyclean): Move config.log to distclean.
-
-Wed Oct 2 23:45:25 1996 Geoffrey Noer <noer@cygnus.com>
-
- * emultempl/pe.em: increase size of stack reserve to 0x2000000
- (necessary in order to compile parse.c in gcc sources under NT)
-
-Wed Oct 2 14:49:10 1996 Ian Lance Taylor <ian@cygnus.com>
-
- * lexsup.c (ld_options): Fix typo in --rpath-link description.
- * emultempl/elf32.em (gld${EMULATION_NAME}_after_open): Suggest
- --rpath if a needed library is not found.
-
-Tue Oct 1 16:17:33 1996 Joel Sherrill <joel@oarcorp.com>
-
- * configure.tgt (mips*-*-rtems*): New target, like mips*-*-elf*.
-
-Tue Oct 1 15:50:34 1996 Ian Lance Taylor <ian@cygnus.com>
-
- * ld.texinfo (Options): Give more detail on -l option.
-
- * scripttempl/elfmips.sc: Handle CREATE_SHLIB the same way that
- elf.sc does, so that glibc works better.
-
- * ldver.c (ld_program_version): New variable.
- (ldversion): Use it.
- * ldver.h (ld_program_version): Declare.
- * lexsup.c (ld_options): Handle --dll-verbose like --verbose, not
- --version. Change --version handling to match current GNU
- standards.
- (help): Print bug report address.
-
-Mon Sep 30 12:14:43 1996 Doug Evans <dje@canuck.cygnus.com>
-
- * Makefile.in (em32relf.c): Add rule for.
- * configure.tgt (m32r-*-*): Recognize.
- * emulparams/m32relf.sh: New file.
-
-Thu Sep 26 13:58:47 1996 Stan Shebs <shebs@andros.cygnus.com>
-
- * mpw-make.sed: Add symbolic doublequoting to ldmain compile edit.
- * mpw-config.in: Add mips-*-* case as mips-elf, and use more
- wildcards in matching.
- * mpw-emipself.c: New file, pregenerated mips elf emulation.
-
-Tue Sep 17 12:18:21 1996 Ian Lance Taylor <ian@cygnus.com>
-
- * ldint.texinfo: Rewrote.
-
- * configure.tgt: Add cases for MIPS 5000 like MIPS 4300.
-
-Mon Sep 16 17:55:21 1996 Ian Lance Taylor <ian@cygnus.com>
-
- * scripttempl/armcoff.sc: Only define symbols if RELOCATING. Fix
- syntax error on __end__ line.
-
- * scripttempl/armcoff.sc: For -N or -n, don't align .data. From
- Chris Hadley <Christopher.Hadley@cl.cam.ac.uk>
-
-Sun Sep 15 22:09:56 1996 Jeffrey A Law (law@cygnus.com)
-
- * emulparms/v850.sh: Fix OTHER_RELOCATING_SECTIONS.
-
-Sun Sep 15 10:38:16 1996 Mark Alexander <marka@cygnus.com>
-
- * emulparms/d10v.sh: Set OTHER_RELOCATING_SECTIONS to put
- stack at top of simulator memory.
-
-Fri Sep 13 15:49:45 1996 Ian Lance Taylor <ian@cygnus.com>
-
- * ldlex.l (SYMBOLCHARN): Add $, _, and ~.
-
-Wed Sep 11 23:30:42 1996 Ian Lance Taylor <ian@cygnus.com>
-
- * ldmain.c (get_emulation): Check for -mips4 like -mips1, et. al.
-
-Thu Sep 5 15:24:12 1996 Ian Lance Taylor <ian@cygnus.com>
-
- * ldlang.c (section_already_linked): Accept a lang_input_statement
- as the PTR argument. If the file is symbols only, discard all
- input sections.
- (ldlang_add_file): Pass entry to bfd_map_over_sections.
-
-Wed Sep 4 15:53:43 1996 Ian Lance Taylor <ian@cygnus.com>
-
- * configure.tgt (alpha-*-gnu*): New target. From Fila Kolodny
- <fila@ibi.com>.
-
-Tue Sep 3 00:52:54 1996 Jeffrey A Law (law@cygnus.com)
-
- * emulparms/v850.sh: Set OTHER_RELOCATING_SECTIONS
-
-Sun Sep 1 21:48:58 1996 Jeffrey A Law (law@cygnus.com)
-
- * emulparms/v850.sh: Set EMBEDDED.
-
-Fri Aug 30 22:30:30 1996 Jeffrey A Law (law@cygnus.com)
-
- * emulparms/v850.sh: Entry symbol is "_start", tweak
- ctor/dtor support.
-
-Fri Aug 30 18:32:31 1996 Ian Lance Taylor <ian@cygnus.com>
-
- * configure.tgt (sh-*-elf*): New target.
- * emulparams/shelf.sh: New file.
- * emulparams/shlelf.sh: New file.
- * Makefile.in (ALL_EMULATIONS): Add eshelf.o and eshlelf.o.
- (eshelf.c, eshlelf.c): New targets.
- * scripttempl/elf.sc: If EMBEDDED is defined, then don't add
- SIZEOF_HEADERS to TEXT_START_ADDR. Expand CTOR_START and CTOR_END
- around .ctors, and DTOR_START and DTOR_END around .dtors. Expand
- OTHER_RELOCATING_SECTIONS if RELOCATING.
-
-Thu Aug 29 16:57:46 1996 Michael Meissner <meissner@tiktok.cygnus.com>
-
- * configure.{host,tgt} (i[345]86-*-*): Recognize i686 for pentium
- pro.
-
-Mon Aug 26 12:58:11 1996 Ian Lance Taylor <ian@cygnus.com>
-
- * ldgram.y (section): Add opt_nocrossrefs; pass value to
- lang_enter_overlay.
- (opt_nocrossrefs): New nonterminal.
- * ldlex.l: Recognize NOCROSSREFS keyword in EXPRESSION mode.
- * ldlang.c (overlay_nocrossrefs): New static variable.
- (lang_enter_overlay): Add nocrossrefs parameter.
- (lang_leave_overlay): Only add nocrossrefs if overlay_nocrossrefs
- is set. Initialize overlay_nocrossrefs.
- * ldlang.h (lang_enter_overlay): Update declaration.
- * ld.texinfo (Overlays): Update documentation.
-
- * ldver.c (ldversion): Print GNU ld in the version message.
-
-Thu Aug 22 17:10:40 1996 Ian Lance Taylor <ian@cygnus.com>
-
- * configure.host: Set HLDENV.
- * configure.in: Substitute HLDENV.
- * configure: Rebuild.
- * Makefile.in (HLDENV): New variable.
- ($(LD_PROG)): Use $(HLDENV).
-
-Thu Aug 22 16:29:28 1996 Jeffrey A Law (law@cygnus.com)
-
- * Makefile.in (ev850.c): New target.
- * configure.tgt (v850-*-*): New target.
- * emulparams/v850.sh: New file.
-
-Thu Aug 22 11:16:02 1996 Stan Shebs <shebs@andros.cygnus.com>
-
- * mpw-make.sed: Add @DASH_C_FLAG@ to compiler edit.
-
-Wed Aug 21 11:26:37 1996 Ian Lance Taylor <ian@cygnus.com>
-
- * scripttempl/elf.sc: Put .gnu.linkonce* sections in appropriate
- containing sections.
-
-Mon Aug 19 13:01:42 1996 Ian Lance Taylor <ian@cygnus.com>
-
- * fnmatch.c: Include sysdep.h.
-
-Mon Aug 19 11:28:29 1996 Michael Meissner <meissner@tiktok.cygnus.com>
-
- * genscripts.sh: Undo 8/16 change.
-
- * emulparams/d10velf.sh (MACHINE): Explicitly set to nothing.
-
-Fri Aug 16 19:18:08 1996 Michael Meissner <meissner@tiktok.cygnus.com>
-
- * genscripts.sh: Explicitly reset any shell variables set or used
- by the various .sc scripts to allow inadvertant use of these
- names as normal environment variables by the person running
- configure.
-
- * Makefile.in (ed10velf.c): Use tdir_d10v, not tdir_arcelf.
-
-Fri Aug 16 14:15:41 1996 James G. Smith <jsmith@cygnus.co.uk>
-
- * scripttempl/armcoff.sc (__bss_start__, __bss_end__,
- __data_start__, __data_end__): Added to keep in sync. with the
- default ARM crt0.s. Added __CTOR_LIST__ and __DTOR_LIST__ support.
-
-Thu Aug 8 14:24:56 1996 Ian Lance Taylor <ian@cygnus.com>
-
- * ldcref.c (check_reloc_refs): If info->same, look for any symbol
- defined in info->defsec, not just the section symbol.
-
-Wed Aug 7 14:40:48 1996 Philippe De Muyter <phdm@info.ucl.ac.be>
-
- * configure.in: Call BFD_NEED_DECLARATION on strstr and sbrk.
- * acconfig.h (NEED_DECLARATION_STRSTR): New macro.
- (NEED_DECLARATION_SBRK): New macro.
- * configure, config.in: Rebuild.
- * sysdep.h (strstr): Declare if NEED_DECLARATION_STRSTR.
- * ldmain.c (sbrk): Declare if HAVE_SBRK and
- NEED_DECLARATION_SBRK.
-
- * ldlang.c (lang_record_phdrs): Cast xmalloc and xrealloc return.
-
-Mon Aug 5 16:26:14 1996 Ian Lance Taylor <ian@cygnus.com>
-
- * ldlex.l: Recognize OVERLAY.
- * ldgram.y: Add section_phdr field to %union.
- (section): Handle phdr_opt result. Add OVERLAY case.
- (opt_exp_without_type): New nonterminal.
- (phdr_opt): Return list of phdrs.
- (overlay_section): New nonterminal.
- * ldlang.c: Include <ctype.h>.
- (lang_leave_output_section_statement): Add phdrs parameter.
- Change all callers.
- (lang_section_in_phdr): Remove.
- (overlay_vma, overlay_lmn, overlay_max): New static variables.
- (struct overlay_list): Define.
- (overlay_list): New static variable.
- (lang_enter_overlay, lang_enter_overlay_section): New functions.
- (lang_leave_overlay_section, lang_leave_overlay): New functions.
- * ldlang.h (lang_leave_output_section_statement): Update
- declaration for new parameter.
- (lang_section_in_phdr): Don't declare.
- (lang_enter_overlay, lang_enter_overlay_section): Declare.
- (lang_leave_overlay_section, lang_leave_overlay): Declare.
- * ld.texinfo (Overlays): New node under SECTIONS, documenting
- overlays.
-
- * ldlex.l: Recognize MAX and MIN.
- * ldgram.y (MAX, MIN): New terminals.
- (exp): Recognize MAX and MIN.
- * ldexp.c (fold_binary): Handle MAX and MIN.
- * ld.texinfo (Arithmetic Functions): Document MAX and MIN.
-
- * ld.texinfo (PHDRS): Use @cindex, not @kindex, for program header
- index entries.
-
- * ldgram.y (SIZEOF, ADDR): Do not specify type.
-
- * ldcref.c (check_nocrossref): Skip symbols with no output
- sections.
-
-Fri Aug 2 14:57:49 1996 Ian Lance Taylor <ian@cygnus.com>
-
- * ldgram.y (LOADADDR): New terminal.
- (exp): Handle LOADADDR.
- * ldlex.l: Recognize LOADADDR.
- * ldexp.c (exp_print_token): Add LOADADDR.
- (fold_name): Implement LOADADDR.
- * ldlang.c (exp_init_os): Treat LOADADDR like ADDR.
- * ld.texinfo (Arithmetic Functions): Document LOADADDR.
-
-Thu Aug 1 12:52:19 1996 Ian Lance Taylor <ian@cygnus.com>
-
- * ld.h (check_nocrossrefs): Declare.
- * ldlang.h (struct lang_nocrossref): Define.
- (struct lang_nocrossrefs): Define.
- (nocrossref_list): Declare.
- (lang_add_nocrossref): Declare.
- * ldlex.l: Recognize NOCROSSREFS keyword.
- * ldgram.y (%union): Add nocrossref field.
- (NOCROSSREFS): New terminal.
- (ifile_p1): Recognize NOCROSSREFS.
- (nocrossref_list): New nonterminal.
- * ldlang.c (nocrossref_list): Define.
- (lang_add_nocrossref): New function.
- * ldmain.c (main): If nocrossref_list is not NULL, call
- check_nocrossrefs.
- (warning_callback): Free symbols if there is no place to store
- them.
- (notice): Call add_cref if nocrossref_list is not NULL.
- * ldcref.c: Include "ldexp.h" and "ldlang.h".
- (check_nocrossrefs): New function.
- (check_nocrossref): New static function.
- (struct check_refs_info): Define.
- (check_refs, check_reloc_refs): New static functions.
- * Makefile.in: Rebuild dependencies.
- * ld.texinfo (Option Commands): Document NOCROSSREFS.
-
- * ld.texinfo (Section Placement): Improve the wording of the
- wildcard documentation. Mention that wildcards are only searched
- for on the command line, not in the file system.
-
- * emultempl/sunos.em (gld${EMULATION_NAME}_after_open): Move
- definition of lib_path inside condition where it is used.
-
-Wed Jul 31 13:17:10 1996 Martin M. Hunt <hunt@pizza.cygnus.com>
-
- * emulparams/d10velf.sh: Now works with elf.sc.
-
-Wed Jul 31 11:52:03 1996 Martin M. Hunt <hunt@pizza.cygnus.com>
-
- * emulparams/d10velf.sh (SCRIPT_NAME): Change to vanilla.
-
-Tue Jul 30 14:46:42 1996 Ian Lance Taylor <ian@cygnus.com>
-
- * ldlang.c (lang_size_sections): Add the section VMA to the result
- value when computing the address of a section.
-
- * ld.h (args_type): Add cref field.
- * lexsup.c (parse_args): Set command_line.cref.
- * ldmain.c (main): Check command_line.cref rather than
- link_info.notice_all.
- (notice): Likewise.
-
- * ldcref.c (output_one_cref): Don't crash if a symbol is defined
- in a section without an owner.
-
-Mon Jul 29 17:23:33 1996 Ian Lance Taylor <ian@cygnus.com>
-
- * fnmatch.h, fnmatch.c: New files.
- * ldlex.l: Remove unused definition of FILENAME. Add definition
- of WILDCHAR. In SCRIPT mode, accept any sequence of WILDCHAR as a
- NAME.
- * ldgram.y (file_NAME_list): Accept '*' and '?' specially.
- (input_section_spec): Accept '?' specially.
- (statement): Change exp to mustbe_exp in length and FILL cases.
- (section): Call ldlex_script before section statements, and call
- ldlex_popstate after them.
- * ldlang.c: Include "fnmatch.h".
- (wildcardp): New static function.
- (wild_section): Permit the section name to be a wildcard.
- (wild_file): New static function, broken out of wild.
- (wild): Call wild_file. Permit the file name to be a wildcard.
- (open_input_bfds): Don't call lookup_name for a wildcard pattern.
- * Makefile.in: Rebuild dependencies.
- (CFILES): Add fnmatch.c.
- (HFILES): Add fnmatch.h.
- (OFILES): Add fnmatch.o.
- * ld.texinfo: Document that file and section names can now be
- wildcard patterns.
-
- * ldlang.c (lang_place_orphans): Correct condition: place a common
- section if not relocateable or if common definitions are forced.
-
-Wed Jul 24 12:16:38 1996 Martin M. Hunt <hunt@pizza.cygnus.com>
-
- * emulparams/d10velf.sh (SCRIPT_NAME): Change to elf.
-
-Wed Jul 24 13:38:22 1996 Michael Meissner <meissner@wogglebug.tiac.net>
-
- * configure.tgt (d10v-*-*): Don't require the -elf, allow plain d10v.
-
-Tue Jul 23 10:36:19 1996 Martin M. Hunt <hunt@pizza.cygnus.com>
-
- * Makefile.in (ed10velf.c): New target.
- * configure.tgt (d10v-*-elf*): New target.
- * emulparams/d10velf.sh: New file.
-
-Thu Jul 18 16:25:39 1996 Ian Lance Taylor <ian@cygnus.com>
-
- * configure.tgt (sparc*-*-sysv4*): New target. From Andrew Gierth
- <ANDREWG@microlise.co.uk>.
-
- * configure.host: Change irix5 to irix[56]*.
- * configure.tgt: Likewise.
-
-Wed Jul 17 10:52:46 1996 Kim Knuttila <krk@cygnus.com>
-
- * emultempl/pe.em (sort_sections): Pay attention to return code.
-
- * ldmisc.c (demangle): Remove all prefix '.'s from a name.
-
-Mon Jul 15 11:49:49 1996 Andreas Schwab <schwab@issan.informatik.uni-dortmund.de>
-
- * emultempl/elf32.em (gld${EMULATION_NAME}_place_orphan): Round
- the value of __start_SECNAME to the alignment required by the
- section to be placed.
-
-Tue Jul 9 12:09:02 1996 Ian Lance Taylor <ian@cygnus.com>
-
- * configure.tgt (mips*el-*-elf*): Use elf32elmip.
- (mips*-*-elf*): Use elf32ebmip.
- * emulparams/elf32bmip.sh (EMBEDDED): Don't define.
- * emulparams/elf32lmip.sh (EMBEDDED): Don't define.
- * emulparams/elf32elmip.sh: New file; copy of elf32lmip.sh with
- EMBEDDED defined.
- * emulparams/elf32ebmip.sh: New file; copy of elf32bmip.sh with
- EMBEDDED defined.
- * emulparams/elf32b4300.sh (EMBEDDED): Define.
- * emulparams/elf32l4300.sh (EMBEDDED): Define.
- * Makefile.in (ALL_EMULATIONS): Add eelf32ebmip.o eelf32elmip.o.
- (eelf32ebmip.c, eelf32elmip.c): New targets.
-
-Thu Jul 4 12:01:03 1996 Ian Lance Taylor <ian@cygnus.com>
-
- * ldver.c (ldversion): Set version to cygnus-2.7.1.
-
- * Released binutils 2.7.
-
- * emulparams/pc532macha.sh: Rename from pc532machaout.sh to avoid
- System V file name limitations.
- * configure.tgt (nc32k-pc532-mach*, ns32k-pc532-ux*): Use
- pc532macha rather than pc532machaout.
- * Makefile.in (ALL_EMULATIONS): Change epc532machaout.o to
- epc532macha.o.
- (epc532macha.c): Rename target from epc532machaout.c.
-
-Wed Jul 3 11:40:10 1996 Ian Lance Taylor <ian@cygnus.com>
-
- * ldlang.c (print_padding_statement): Use %u, not %x, to print
- fill value.
-
-Sun Jun 30 11:16:43 1996 Stan Shebs <shebs@andros.cygnus.com>
-
- * mpw-eppcmac.c: Update to reflect May 23 change to aix.em.
-
-Thu Jun 27 14:03:42 1996 Ian Lance Taylor <ian@cygnus.com>
-
- * emultempl/sunos.em (gld${EMULATION_NAME}_find_so): Put the .sa
- file just before the .so file, rather than just after.
-
- * configure.host: Use -print-file-name=FILE rather than piping
- -print-libgcc-file-name through sed.
- (i[345]86*-*-sco*, i[345]86-*-isc*): Create crtbegin.o and
- crtend.o files, in case gcc doesn't use them.
- * Makefile.in (mostlyclean): Remove crtbegin.o and crtend.o.
-
-Wed Jun 26 15:57:21 1996 Ian Lance Taylor <ian@cygnus.com>
-
- * configure.tgt (mips*-dec-osf*): New target.
-
-Tue Jun 25 22:15:29 1996 Jason Molenda (crash@godzilla.cygnus.co.jp)
-
- * Makefile.in (bindir, libdir, datadir, mandir, infodir, includedir,
- INSTALL_PROGRAM, INSTALL_DATA): Use autoconf-set values.
- (docdir): Removed.
- * configure.in (AC_PREREQ): autoconf 2.5 or higher.
- (AC_PROG_INSTALL): Added.
- * configure: Rebuilt.
-
-Mon Jun 24 18:48:16 1996 Michael Meissner <meissner@tiktok.cygnus.com>
-
- * scripttempl/elfppc.sc (_GLOBAL_OFFSET_TABLE_): Don't do a
- PROVIDE of _GLOBAL_OFFSET_TABLE_, since it needs to be at a
- non-fixed location.
-
-Mon Jun 24 17:55:31 1996 Jouke Numan <jnuman@bazis.nl>
-
- * ldlang.h (enum section_type): Define.
- (lang_output_section_statement_type): Remove loadable field. Add
- sectype field.
- (lang_enter_output_section_statement): Change flags parameter in
- prototype to sectype.
- * ldgram.y (typebits): Remove.
- (sectype): New static variable.
- (opt_at): Use sectype rather than typebits.
- (type): Set sectype rather than typebits.
- (atype): Likewise.
- * ldlex.l: Recognize DSECT, COPY, INFO, and OVERLAY in
- EXPRESSION mode.
- * ldlang.c (lang_output_section_statement_lookup): Set sectype
- field rather than loadable field.
- (wild_doit): Check sectype rather than loadable.
- (lang_record_phdrs): Likewise.
- (lang_enter_output_section_statement): Rename flags parameter to
- sectype. Set sectype field rather than loadable field. Set flags
- field based on sectype.
-
-Mon Jun 24 12:00:32 1996 Ian Lance Taylor <ian@cygnus.com>
-
- * scripttempl/elf.sc: Force .stab* and .comment sections to start
- at 0.
-
- * configure.in: On alpha*-*-osf*, link against libbfd.a if not
- using shared libraries.
- * configure: Rebuild with autoconf 2.10.
-
-Fri Jun 21 17:40:56 1996 Joel Sherrill <joel@merlin.gcs.redstone.army.mil>
-
- * configure.tgt: Add support for *-*-rtems* configurations.
-
-Fri Jun 21 13:05:51 1996 Richard Henderson <rth@tamu.edu>
-
- * configure.tgt (alpha-*-linuxecoff*): New target.
- (alpha-*-linux*): Use elf64alpha.
- * emulparams/elf64alpha.sh: New file.
- * emultempl/elf32.em: If ELFSIZE is not set, set it to 32. Use
- ${ELFSIZE} rather than 32 when calling BFD routines.
- (hold_rodata): New static variable.
- (gld${EMULATION_NAME}_place_orphan): Use hold_rodata for a
- readonly section that is not code.
- (gld${EMULATION_NAME}_place_section): Set hold_rodata. Don't use
- a .rel section unless its bfd_section field is not NULL.
- * Makefile.in (ALL_EMULATIONS): Add eelf64alpha.o.
- (eelf64alpha.c): New target.
-
-Fri Jun 21 12:45:46 1996 Ian Lance Taylor <ian@cygnus.com>
-
- * ldmisc.c (vfinfo): Correct handling of 0 in %W case.
-
-Thu Jun 20 13:55:28 1996 Ian Lance Taylor <ian@cygnus.com>
-
- Add enough support to understand the gcc svr3.ifile script:
- * ldlex.l: Recognize BLOCK and GROUP in EXPRESSION context. Add
- BIND keyword.
- * ldgram.y: Add BIND token.
- (section): Recognize GROUP.
- (opt_ext_with_type): Recognize a couple of cases of BIND.
- * ldlang.c (init_os): Don't do anything if section is already
- initialized. Call exp_init_os on addr_tree field.
- (exp_init_os): New static function.
- (map_input_to_output_sections): Call exp_init_os on assignment
- expression.
- (lang_place_orphans): Check for common sections by name COMMON
- rather than by common_section field. Don't warn about absence of
- [COMMON] command.
-
- * ldlang.h (lang_input_statement_type): Remove useless fields
- common_section, common_output_section, and complained, as well as
- all references to them.
-
- * ldexp.c: Reindent a lot of code.
- (exp_fold_tree): Call FAIL rather than einfo in default case.
-
-Wed Jun 19 11:40:14 1996 Ian Lance Taylor <ian@cygnus.com>
-
- * configure.host (m88*-*-dgux*): Quote HOSTING_CRT0. From
- <randall.hron@medaphis.com>.
-
-Tue Jun 18 15:53:09 1996 Jeffrey A. Law <law@rtl.cygnus.com>
-
- * scripttempl/h8300s.sc: New file for H8/S.
- * emulpararms/h8300s.sh: New file for H8/S.
- * Makefile.in (ALL_EMULATIONS): Add H8/S.
- (e_h8300s.c): Add dependencies.
- * configure.tgt: Add H8/S to targ_extra_emuls.
-
-Tue Jun 18 17:55:39 1996 Ian Lance Taylor <ian@cygnus.com>
-
- * configure.tgt (i[345]86*-*-isc*): New target. From
- <uddeborg@carmen.se>.
-
-Wed Jun 12 12:46:21 1996 Ian Lance Taylor <ian@cygnus.com>
-
- * lexsup.c: Include "libiberty.h".
- (parse_args): Copy the -Y argument into memory.
- (set_default_dirlist): Don't put the ':' back into the directory
- list.
-
-Fri Jun 7 11:27:42 1996 Ian Lance Taylor <ian@cygnus.com>
-
- * emultempl/sunos.em: Include libiberty.h.
- (gld${EMULATION_NAME}_set_symbols): New static function to add
- LD_LIBRARY_PATH to the list of search directories.
- (ld_${EMULATION_NAME}_emulation): Add new set_symbols routine.
-
-Thu Jun 6 11:50:31 1996 Ian Lance Taylor <ian@cygnus.com>
-
- * emulparams/elf32bmip.sh (OTHER_GOT_SYMBOLS): Use ALIGN(16)
- rather than . when computing _gp value. From Per Fogelstrom.
- * emulparams/elf32lmip.sh (OTHER_GOT_SYMBOLS): Likewise.
-
- * ldmain.c (main): Don't close and unlink the file on error, since
- remove_output will do it anyhow.
- * ldlang.c (open_output): Set boolean variable to true, not 1.
-
-Wed Jun 5 18:34:14 1996 James G. Smith <jsmith@cygnus.co.uk>
-
- * emulparams/{elf32b4300.sh,elf32l4300.sh} (SCRIPT_NAME): Use
- elfmips instead of elf.
-
-Tue Jun 4 18:43:07 1996 Ian Lance Taylor <ian@cygnus.com>
-
- * ldcref.c: New file.
- * ld.h (add_cref, output_cref): Declare.
- * ldmain.c (main): Initialize notice_all field. If it is set at
- end of link, call output_cref.
- (notice): Rename from notice_ysym. Check notice_all.
- * ldmisc.c (finfo): Make globally visible.
- * ldmisc.h (finfo): Declare.
- * lexsup.c (OPTION_CREF): Define.
- (ld_options): Add "cref".
- (parse_args): Handle OPTION_CREF.
- * Makefile.in: Rebuild dependencies.
- (CFILES): Add ldcref.c.
- (OFILES): Add ldcref.o.
- * ld.texinfo, ld.1: Document --cref.
-
-Tue Jun 4 12:12:25 1996 Tom Tromey <tromey@csk3.cygnus.com>
-
- * Makefile.in (install): Make $(tooldir) and $(tooldir)/bin.
-
-Fri May 31 12:40:55 1996 Ian Lance Taylor <ian@cygnus.com>
-
- * emultempl/pe.em (sort_sections): Don't assume that a
- wild_statement has a section name.
-
-Wed May 29 13:13:35 1996 Ian Lance Taylor <ian@cygnus.com>
-
- * scripttempl/elfmips.sc: Quote test -z argument.
-
- * ld.texinfo: Clarify the CONSTRUCTORS command.
-
-Thu May 23 16:07:44 1996 Ian Lance Taylor <ian@cygnus.com>
-
- * emultempl/aix.em (gld${EMULATION_NAME}_read_file): Initialize
- file, not impfile.
-
-Wed May 22 11:31:30 1996 Doug Evans <dje@seba.cygnus.com>
-
- * ldlang.c (wild_doit): Don't copy over SEC_LINK_{ONCE,DUPLICATES}
- if final link.
- * emultempl/pe.em (sfunc): Renamed to sort_by_file_name.
- (sort_by_section_name, sort_sections_1): New functions.
- (sort_sections): Only sort by file name sections in .idata.
- Add "Grouped Sections" support.
- (gld${EMULATION_NAME}_place_orphan): Rewrite to support Grouped
- Sections.
- (gld${EMULATION_NAME}_place_section): Delete.
- * scripttempl/pe.sc (.text,.data,.rdata): Add *(.foo\$).
- (.CRT,.rsrc): Rewrite to use Grouped Section support.
-
-Tue May 21 14:31:48 1996 Stan Shebs <shebs@andros.cygnus.com>
-
- * mpw-eppcmac.c: Update to reflect changes to aix.em.
-
-Sun May 19 16:59:44 1996 Doug Evans <dje@seba.cygnus.com>
-
- * ldlang.c (dprint_statement): Stop printing at end of list.
-
-Sat May 18 13:12:05 1996 Steve Chamberlain <sac@slash.cygnus.com>
-
- Support for --force-exe-suffix
- * ld.h (args_type): Add force_exe_suffix.
- * ld.texinfo: Add documentation.
- * ldmain.c (main): Add support for option.
- * lexsup.c (OPTION_FORCE_EXE_SUFFIX): New.
- (ld_options, parse_args): Add support for option.
-
-Wed May 15 12:50:25 1996 Jim Wilson <wilson@chestnut.cygnus.com>
-
- * emultempl/pe.em (set_pe_value): Pass 0 not 16 to strtoul call.
-
-Fri May 10 16:28:44 1996 Michael Meissner <meissner@tiktok.cygnus.com>
-
- * scripttempl/elfppc.sc (__stack): Make __stack 0 if it was
- referenced but not defined.
-
-Thu May 9 08:52:23 1996 Rob Savoye <rob@chinadoll.cygnus.com>
-
- * emulparams/{elf32bmip.sh,elf32lmip.sh,mipsidt.sh,mipsidtl.sh}:
- Set a new variable to signify if the final target is an embedded
- system.
- * scripttempl/{mips.sc,elfmips.sc}: Don't add SIZEOF_HEADERS to
- .text for an embedded system.
-
-Tue May 7 10:56:11 1996 Doug Evans <dje@canuck.cygnus.com>
-
- * emultempl/pe.em (gld${EMULATION_NAME}_place_orphan): New function.
- (gld${EMULATION_NAME}_place_section): New function.
- (hold_{section,use,text,rdata,data}): New static locals.
- (ld_${EMULATION_NAME}_emulation): Update orphan field.
- * scripttempl/pe.sc: Whitespace cleanup. Semicolon usage cleanup.
- (INIT,FINI): Delete, unused.
- (.text): Document orphan .text.foo sections.
- (.rdata): Document orphan .rdata.foo sections.
- (.data): Document orphan .data.foo sections.
-
-Tue May 7 11:35:46 1996 Jeffrey A Law (law@cygnus.com)
-
- * scripttempl/h8300.sc: Place ".tiny" sections right
- after ".data" sections.
- * scripttempl/h8300h.sc: Place ".tiny" sections into
- the "tiny" memory region, 0xff8000 through 0xffff00.
-
- * scripttempl/h8300.sc: Set the entry point to the value of
- "_start" rather than the start of the text segment.
- * scripttempl/h8300h.sc: Likewise.
-
- * scripttempl/h8300.sc: Place .rodata sections before .text
- sections in main ram.
- * scripttempl/h8300h.sc: Likewise.
-
-Mon May 6 23:32:30 1996 Jeffrey A Law (law@cygnus.com)
-
- * scripttempl/h8300h.sc: Use "eight", not "eightbit" for the
- 8-bit region and 8-bit sections.
-
-Wed May 1 17:50:06 1996 Doug Evans <dje@canuck.cygnus.com>
-
- * ldlang.c (section_already_linked): Fix typos.
-
-Mon Apr 29 20:31:06 1996 Doug Evans <dje@canuck.cygnus.com>
-
- * scripttempl/pe.sc (.endjunk): Define __end__.
-
-Mon Apr 29 17:05:13 1996 Ian Lance Taylor <ian@cygnus.com>
-
- * ldlang.c (longest_section_name): Remove.
- (SECTION_NAME_MAP_LENGTH): Define.
- (print_size, print_alignment, print_fill, print_section): Remove.
- (print_flags): Remove.
- (lang_map): Rewrite.
- (print_output_section_statement): Rewrite.
- (print_assignment): Rewrite.
- (print_one_symbol): Rewrite.
- (print_input_section): Rewrite.
- (print_fill_statement): Rewrite.
- (print_data_statement): Rewrite.
- (print_address_statement): New static function.
- (print_reloc_statement): Rewrite.
- (print_padding_statement): Rewrite.
- (print_wild_statement): Rewrite.
- (print_statement_list): Clean up.
- (print_statement): Clean up. Some minor output changes.
- (print_statements): Clean up.
- (load_symbols): Put another - before -whole-archive.
- * ldexp.c (exp_print_tree): Change etree_value and etree_rel to
- print 0x and to omit leading zeroes. For etree_rel, use %B to
- print the BFD. For etree_assign, remove the space after the
- destination name.
- * ldwrite.c: Include "libiberty.h".
- (clone_section): Call xstrdup, not strdup.
- (ldwrite): Don't print any map information.
- (print_symbol_table, print_file_stuff, print_symbol): Remove.
- * ldmain.c (main): Call lang_map when appropriate.
- * ldmisc.c (vfinfo): Add support for %W.
- (print_address): Remove.
- * ldmisc.h (print_address): Don't declare.
- * Makefile.in: Rebuild dependencies.
-
-Mon Apr 29 10:29:07 1996 Andreas Schwab <schwab@issan.informatik.uni-dortmund.de>
-
- * configure.host (m68*-*-linux*): Add -dynamic-linker to
- HOSTING_CRT0. Search -lgcc both before and after -lc in
- HOSTING_LIBS. Look for crt{begin,end}.o in the compiler directory
- at first.
- (i[345]86-*-linux*): Look for crt{begin,end}.o in the compiler
- directory at first.
-
-Fri Apr 26 14:42:27 1996 Ian Lance Taylor <ian@cygnus.com>
-
- * ldmisc.h (demangle): Declare.
- * ldmisc.c: Include "libiberty.h". Include demangle.h with "",
- not <>.
- (demangle): Make non-static. Remove remove_underscore paramter.
- Always return an allocated string.
- (vfinfo): Free result of demangle. Add case 'G'. Use %T to print
- functionname, rather than calling demangle. Print a colon between
- the BFD(section+offset) and the line number.
- * ldmain.c (add_archive_element): Improve format of archive
- information in map file.
- (constructor_callback): Don't print anything to the map file.
- * ldlang.c (lang_one_common): Improve format of common symbol
- information in map file.
- * ldctor.c (ldctor_build_sets): If producing a map file, print set
- information.
- * ldwrite.c (print_symbol_table): Print a newline before the
- header in the map file.
- * Makefile.in: Rebuild dependencies.
-
- * ldmisc.c (vfinfo): Reindent.
-
-Mon Apr 22 12:07:32 1996 Ian Lance Taylor <ian@cygnus.com>
-
- * ldlang.c (lang_size_sections): If _cooked_size is not 0, then
- don't clobber it when not relaxing.
-
- * ld.h (ld_config_type): Remove traditional_format field.
- * ldmain.c (main): Use link_info.traditional_format rather than
- config.traditional_format.
- * ldlang.c (ldlang_open_output): Likewise.
- * lexsup.c (parse_args): Likewise.
- * emultempl/aix.em (gld${EMULATION_NAME}_parse_args): Likewise.
- * mpw-eppcmac.c (gldppcmacos_parse_args): Likewise.
-
- * ldlang.c (wild_doit): Discard debugging sections if we are
- stripping debugging information.
-
- * emulparams/z8002.sh (ARCH): Set to z8002, not z8k.
-
-Tue Apr 16 16:38:32 1996 Ian Lance Taylor <ian@cygnus.com>
-
- * ldexp.c (fold_binary): Correct handling of subtraction with
- absolute values.
- (fold_name): Permit symbols in lang_allocating_phase_enum.
-
- * scripttempl/aout.sc: Only PROVIDE __stack when RELOCATING. Undo
- accidental changes in last patch.
-
-Tue Apr 16 10:25:42 1996 Michael Meissner <meissner@tiktok.cygnus.com>
-
- * configure.tgt (powerpc*-*-{sysv,linux}): Add aliases.
- (powerpcle*-*-{sysv,solaris}): Ditto.
-
-Mon Apr 15 14:50:56 1996 Rob Savoye <rob@chinadoll.cygnus.com>
-
- * scripttempl/aout.sc: Add PROVIDE (__stack = 0) so I can use it
- in m68k/crt0.S without things blowing up.
-
-Fri Apr 12 16:40:56 1996 Rob Savoye <rob@chinadoll.cygnus.com>
-
- * scripttempl/m68kcoff.sc: Remove default address for .data so
- .text, .data, and .bss are all sequential.
-
-Thu Apr 11 12:05:35 1996 Ian Lance Taylor <ian@cygnus.com>
-
- * scripttempl/m68kcoff.sc: Remove regions and simplify.
-
-Wed Apr 10 14:41:53 1996 Jeffrey A Law (law@cygnus.com)
-
- * scripttempl/h8300.sc: Add the "8-bit area" in the upper 256
- bytes of the address space. Put data from the ".eight" sections
- into the 8-bit area.
- * scripttempl/h8300h.sc: Likewise.
-
-Tue Apr 9 14:10:42 1996 Doug Evans <dje@canuck.cygnus.com>
-
- * emultempl/generic.em (gld${EMULATION_NAME}_before_parse):
- Pass $ARCH to ldfile_set_output_arch instead of setting
- ldfile_output_architecture directly.
-
-Tue Apr 9 14:22:15 1996 Michael Meissner <meissner@tiktok.cygnus.com>
-
- * scripttempl/elfppc.sc (.init,.fini): Put .init, .fini section
- next to .text. Put _etext after .text, .init, .fini, and
- .rodata{,2} sections.
-
-Tue Apr 9 12:18:57 1996 Ian Lance Taylor <ian@cygnus.com>
-
- * ld.texinfo: Rearrange option documentation.
-
- * lexsup.c (ld_options): New static array.
- (parse_args): Build shortopts and longopts from ld_options array.
- (help): New static function.
- * ldver.h (help): Don't declare.
- * ldver.c (ldversion): Reindent.
- (help): Remove.
-
- * ld.texinfo, ld.1: Mention -E as a synonym for -export-dynamic.
-
-Mon Apr 8 11:56:23 1996 Ian Lance Taylor <ian@cygnus.com>
-
- * emultempl/elf32.em: When checking for a native emulation, check
- that the current emulation is the default emulation.
- * emultempl/sunos.em: Likewise.
-
- * configure.in: Permit --enable-shared to specify a list of
- directories.
- * configure: Rebuild.
-
- * lexsup.c (parse_args): Add -E as a synonym for -export-dynamic,
- for HP/UX compatibility.
-
-Fri Apr 5 14:30:14 1996 Ian Lance Taylor <ian@cygnus.com>
-
- * emultempl/elf32.em (gld${EMULATION_NAME}_check_ld_so_conf): New
- static function, if ${host} = ${target}.
- (gld${EMULATION_NAME}_after_open): Call check_ld_so_conf to find a
- needed shared library if ${host} = $[target}.
-
- * configure.host (i[345]86-*-linux*): Add -dynamic-linker to
- HOSTING_CRT0. Search -lgcc both before and after -lc in
- HOSTING_LIBS.
-
- * configure.tgt: Add i[345]86-*-freebsdelf* target; from John
- Polstra <jdp@polstra.com>.
-
-Fri Apr 5 18:11:25 1996 James G. Smith <jsmith@cygnus.co.uk>
-
- * emulparams/elf32{b,l}4300.sh (MACHINE): Add explicit
- architecture number.
- * scripttempl/elf.sc: Use $MACHINE definition if present.
- * configure.tgt (targ_extra_emuls): Force 4100 build to use same
- template as 4300.
-
-Mon Apr 1 17:35:40 1996 Ian Lance Taylor <ian@cygnus.com>
-
- * ldlang.c (lang_size_sections): Change region check to handle
- regions which end at the highest possible address correctly.
- From Roland Weber <roweber@ira.uka.de>.
-
- * ldlang.c (section_already_linked): New static function.
- (wild_doit): Discard sections with SEC_EXCLUDE set if not doing a
- relocateable link. Don't worry about section being NULL, since it
- never should be. Don't call init_os unless the section is going
- to be added.
- (ldlang_add_file): Call section_already_linked for each section.
- * ldmain.c (multiple_definition): Don't warn about multiple
- definitions in sections which are being discarded.
-
-Sun Mar 31 00:30:47 1996 steve chamberlain <sac@slash.cygnus.com>
-
- * scripttempl/{ppcpe.sc, pe.sc} (.junk): Remove and use /DISCARD/.
- * emultempl/pe.em (init): Remove special case PPC code.
-
-Fri Mar 29 00:01:29 1996 Jeffrey A Law (law@cygnus.com)
-
- * scripttempl/h8300.sc: Make vectors section 0xc4 bytes long
- so as not to overwrite the magic syscall entry at 0xc4.
- * scripttempl/h8300h.sc: Likewise.
-
-Thu Mar 28 11:05:47 1996 Doug Evans <dje@canuck.cygnus.com>
-
- * configure.tgt (sparc64-*-solaris2*): Delete.
- Stick with sparc-*-solaris2*.
-
-Wed Mar 27 12:33:24 1996 Ian Lance Taylor <ian@cygnus.com>
-
- * ld.h (DISCARD_SECTION_NAME): Define to "/DISCARD/".
- * ldlang.c (init_os): Fail on an attempt to initialize any section
- named DISCARD_SECTION_NAME.
- (wild_doit): Discard input sections assigned to an output section
- named DISCARD_SECTION_NAME.
- * ld.texinfo: Document use of /DISCARD/.
-
- * ldlang.c: Fix some indentation and comments.
-
-Tue Mar 26 18:14:49 1996 Ian Lance Taylor <ian@cygnus.com>
-
- * ldmain.c (main): Call bfd_set_error_program_name.
-
-Thu Mar 21 13:17:34 1996 Ian Lance Taylor <ian@cygnus.com>
-
- * ld.texinfo: Fix a couple of indexing entries. Mention that
- --verbose displays builtin linker scripts.
-
- * ldmisc.c (vfinfo): case 'I': If the file is not in an archive,
- and the local symbol name does not match the filename, print the
- filename as well.
-
- Patches from John Polstra <jdp@polstra.com> for FreeBSD ELF:
- * lexsup.c (parse_args): -Bshareable is a synonym for -shared.
- * emulparams/elf_i386.sh (NONPAGED_TEXT_START_ADDR): Make the same
- as TEXT_START_ADDR.
-
-Wed Mar 20 18:18:25 1996 Andreas Schwab <schwab@issan.informatik.uni-dortmund.de>
-
- * ld.texinfo: Fix typos. Use @pxref only inside parentheses.
-
-Wed Mar 20 16:56:15 1996 Ian Lance Taylor <ian@cygnus.com>
-
- * ldmain.c (add_wrap): New function.
- * ldmain.h (add_wrap): Declare.
- * lexsup.c (parse_args): Call add_wrap.
-
-Tue Mar 19 16:44:20 1996 Doug Evans <dje@canuck.cygnus.com>
-
- * configure.host (sparc*-*-solaris2* host): Accept any sparc variant.
-
-Wed Mar 13 17:47:31 1996 Jeffrey A Law (law@cygnus.com)
-
- * scripttempl/h8300.sc: Change name of page zero memory
- from "null" to "vectors". Create an output section for
- vectors. Add comments on how to explicitly place items
- in the vector table.
- * scripttempl/h8300h.sc: Likewise.
-
-Wed Mar 13 12:40:18 1996 Ian Lance Taylor <ian@cygnus.com>
-
- * emultempl/lnk960.em (machine_table): Add jx and hx.
-
- * genscripts.sh: Don't use ${9:-xx}, since Ultrix /bin/sh doesn't
- support it.
-
-Tue Mar 12 12:43:59 1996 David Mosberger-Tang <davidm@koala.azstarnet.com>
-
- * ld.h (ld_config_type): Add warn_multiple_gp field.
- * lexsup.c (parse_args): Handle --warn-multiple-gp.
- * ldmain.c (warning_callback): Suppress multiple gp values warning
- if --warn_multiple_gp was not used.
- * ld.texinfo, ld.1: Document --warn-multiple-gp.
-
-Tue Mar 12 12:02:21 1996 Ian Lance Taylor <ian@cygnus.com>
-
- * lexsup.c (parse_args): Handle --wrap.
- * ldmain.c (main): Initialize link_info.wrap_hash.
- * ldexp.c (fold_name): Use bfd_wrapped_link_hash_lookup in DEFINED
- and NAME cases.
- * ld.texinfo, ld.1: Document --wrap.
-
- * configure: Rebuild with autoconf 2.8.
-
- Don't do SunOS style dynamic linking for sparc-aout:
- * configure.tgt (sparc64-*-aout*): Use sparcaout, not sun4.
- (sparclite*-fujitsu-*, sparc*-*-aout): Likewise.
- (sparc*-wrs-vxworks*): Likewise.
- * emulparams/sparcaout.sh: New file.
- * Makefile.in (ALL_EMULATIONS): Add esparcaout.o.
- (esparcaout.c): New target.
-
-Wed Mar 6 16:06:52 1996 J.T. Conklin <jtc@rtl.cygnus.com>
-
- * scripttempl/elfppc.sc (.sdata2, .sbss2): Implement Feb 2 change
- in a different manner to work around differences in shell variable
- expansion.
-
-Wed Mar 6 18:08:18 1996 Ian Lance Taylor <ian@cygnus.com>
-
- * ldemul.h (ldemul_unrecognized_file): Declare.
- (ldemulation_xfer_type): Add unrecognized_file field.
- * ldemul.c (ldemul_unrecognized_file): New function.
- * ldlang.c (load_symbols): If a file can not be recognized, call
- ldemul_unrecognized_file before trying it as a linker script.
- * emultempl/aix.em (gld${EMULATION_NAME}_unrecognized_file): New
- static function.
- (gld${EMULATION_NAME}_read_file): Use FOPEN_RT, not "r".
- (ld_${EMULATION_NAME}_emulation): Initialize unrecognized_file.
-
-Mon Mar 4 14:11:17 1996 Ian Lance Taylor <ian@cygnus.com>
-
- * ldlang.c (wild): Handle foo.a(.text) by mapping each included
- member of foo.a separately. From Jouke Numan <jnuman@bazis.nl>.
-
-Fri Mar 1 10:24:59 1996 Andreas Schwab <schwab@issan.informatik.uni-dortmund.de>
-
- * emultempl/elf32.em (gld${EMULATION_NAME}_find_exp_assignment):
- Search trinary.cond rather than searching trinary.lhs twice.
-
-Tue Feb 27 15:08:43 1996 Stan Shebs <shebs@andros.cygnus.com>
-
- * mpw-make.sed: Edit out shared library support.
- (@TDIRS@): Edit out, can't use genscripts.
-
-Tue Feb 27 15:09:21 1996 Andreas Schwab <schwab@issan.informatik.uni-dortmund.de>
-
- * configure.tgt (m68k-*-linuxaout*, m68k-*-linux*): New targets.
- * emulparams/m68klinux.sh: New file.
- * emultempl/linux.em (gld${EMULATION_NAME}_before_allocation):
- Call bfd_${EMULATION_NAME}_size_dynamic_sections instead of
- bfd_linux_size_dynamic_sections.
- * Makefile.in (ALL_EMULATIONS): Add em68klinux.o.
- (em68klinux.c): New target.
- * configure.host (m68*-*-linuxaout*, m68*-*-linux*): New hosts.
-
-Tue Feb 27 12:55:46 1996 Ian Lance Taylor <ian@cygnus.com>
-
- * Makefile.in (ALL_EMULATIONS): Sort into alphabetical order.
- Fill in missing entries.
-
- * lexsup.c (parse_args): Recognize --no-whole-archive.
- * ldlang.h (lang_input_statement_type): Add whole_archive field.
- * ldlang.c (new_afile): Set whole_archive field.
- (load_symbols): Check input file specific whole_archive field
- rather than global variable.
- * ld.texinfo, ld.1: Document --no-whole-archive.
-
-Tue Feb 20 16:07:00 1996 Ian Lance Taylor <ian@cygnus.com>
-
- * configure.tgt: Correct gldi960 to gld960.
-
-Mon Feb 19 11:16:44 1996 Ian Lance Taylor <ian@cygnus.com>
-
- * emultempl/elf32.em (gld${EMULATION_NAME}_check_needed): Check
- the SONAME if it is available.
- (gld${EMULATION_NAME}_stat_needed): Use the SONAME, not the
- filename, when checking for conflicting library versions. Don't
- assume that the suffix is only numbers and dots.
-
- * ld.texinfo: Mention that -R can be used for -rpath.
-
-Sun Feb 18 15:05:17 1996 Ian Lance Taylor <ian@cygnus.com>
-
- * configure.host: Check for 'do not mix' from native linker before
- trying to use -rpath.
-
-Thu Feb 15 13:58:06 1996 Ian Lance Taylor <ian@cygnus.com>
-
- * configure.in: Remove explicit substitution of CFLAGS; autoconf
- does it anyhow.
- * configure: Rebuild.
- * Makefile.in (LDFLAGS): Set to @LDFLAGS@.
-
- * configure.in: Call AC_PROG_CC before configure.host.
- * configure: Rebuild.
- * configure.host: Remove go32 host, since it should no longer be
- necessary. Don't set CC for romp host.
-
- * scripttempl/elf.sc: Don't skip a page in virtual memory space if
- the text segment ends exactly on a page boundary.
-
- * configure.in: Substitute RPATH_ENVVAR.
- * configure: Rebuild.
- * configure.host: Set RPATH_ENVVAR.
- * Makefile.in (RPATH_ENVVAR): New variable.
- (check): Use $(RPATH_ENVVAR) rather than LD_LIBRARY_PATH.
-
-Wed Feb 14 18:49:01 1996 Alan Modra <alan@spri.levels.unisa.edu.au>
-
- * configure.in: Redo emulation handling so that each emulation
- searches the correct tool directory, based on the target alias.
- For example, "configure --enable-targets=m68k-coff i386-linux"
- will search /usr/local/i386-linux/lib for linux and
- /usr/local/m68k-coff/lib for m68k-coff.
- * configure: Rebuild.
- * configure.tgt: Add special tdir settings for Linux.
- * Makefile.in: Add @TDIRS@. Pass "$(tdir_EMUL)" to ${GENSCRIPTS}
- for each eEMUL.c target.
- * genscripts.sh: Accept specific alias as 9th argument, and use it
- in LIB_PATH.
-
-Wed Feb 14 16:38:36 1996 Martin Anantharaman <martin@mail.imech.uni-duisburg.de>
-
- * ldlang.c (lang_set_startof): Don't do anything for a
- relocateable link.
-
- * ldgram.y (mri_script_file): Call mri_draw_tree.
- * mri.c (mri_draw_tree): Make globally visible. Don't bother to
- create memory regions.
- (mri_load): Don't call mri_draw_tree.
- * mri.h (mri_draw_tree): Declare.
-
- * configure.tgt (m68*-*-psos): New target.
- * emulparams/m68kpsos.sh: New file.
- * scripttempl/psos.sc: New file.
- * Makefile.in (ALL_EMULATIONS): Add em68kpsos.o.
- (em68kpsos.c): New target.
-
-Wed Feb 14 11:09:25 1996 Ian Lance Taylor <ian@cygnus.com>
-
- * configure.tgt (*-*-ieee*): New target; use vanilla.
-
- * emultempl/elf32.em (gld${EMULATION_NAME}_before_parse): Strip
- `:foo' from ${ARCH}.
-
-Tue Feb 13 15:58:58 1996 Bryan Ford <baford@snake.cs.utah.edu>
-
- * scripttempl/i386msdos.sc: Don't pad the .text section. Put
- .rodata in .data.
-
-Tue Feb 13 14:04:19 1996 Ian Lance Taylor <ian@cygnus.com>
-
- * configure.host: Set HDLFLAGS for *-*-hpux with --enable-shared.
-
- * emultempl/elf32.em (gld${EMULATION_NAME}_stat_needed): Warn if
- it looks like we might be linking in two different versions of the
- same shared library. Based on a patch from H J Lu <hjl@zoom.com>.
-
-Thu Feb 8 19:25:54 1996 Ian Lance Taylor <ian@cygnus.com>
-
- * ldlang.c (lang_size_sections): Increment the section size when a
- padding statement is encountered.
-
-Wed Feb 7 14:01:33 1996 Ian Lance Taylor <ian@cygnus.com>
-
- * configure.in: Look for --enable-shared. Change the value of
- BFDLIB when linking against a shared library on SunOS.
- * configure: Rebuild.
- * configure.host: If using a shared BFD library, try to pass a
- reasonable -rpath option when linking.
- * Makefile.in (BFDLIB): Set to @BFDLIB@.
-
-Tue Feb 6 12:29:14 1996 Doug Evans <dje@charmed.cygnus.com>
-
- * emulparams/elf64_sparc.sh (ARCH): Change to `sparc:v9'.
- * emultempl/generic.em: Strip `:foo' from ${ARCH}.
-
-Mon Feb 5 16:25:30 1996 Ian Lance Taylor <ian@cygnus.com>
-
- Support for building bfd and opcodes as shared libraries, based on
- patches from Alan Modra <alan@spri.levels.unisa.edu.au>:
- * configure.in (HLDFLAGS): New substitution.
- * configure: Rebuild.
- * configure.host: Set HLDFLAGS on SunOS.
- * Makefile.in (HLDFLAGS): New variable.
- (BFDDEP): New variable.
- (BFDLIB): Change to -L../bfd -lbfd.
- ($(LD_PROG)): Depend upon $(BFDDEP) rathern than $(BFDLIB). Use
- $(HLDFLAGS) in link.
- (check): Set LD_LIBRARY_PATH in the environment.
-
-Fri Feb 2 19:26:25 1996 Michael Meissner <meissner@wogglebug.tiac.net>
-
- * scripttempl/elfppc.sc (.sdata2, .sbss2): Put .sdata2 and .sbss
- in the read-only section, not read/write unless we are making a
- shared library.
- (.debug*): Add dwarf debug sections.
- (.rela.{sdata*,sbss*}): Add sections.
-
-Fri Feb 2 16:50:21 1996 Ian Lance Taylor <ian@cygnus.com>
-
- * configure: Regenerate.
-
-Thu Feb 1 10:50:46 1996 Ian Lance Taylor <ian@cygnus.com>
-
- * emulparams/elf_i386.sh (TEXT_START_ADDR): Change to 0x8048000,
- for SVR4 compatibility.
-
- * ldexp.c (exp_fold_tree): Correct handling of ABSOLUTE.
-
-Wed Jan 31 17:30:19 1996 Steve Chamberlain <sac@slash.cygnus.com>
-
- * configure.tgt (i[345]86-*-cygwin32, powerpcle-*-cygwin32): New.
- * emultempl/pe.em (definfo init): Make the default stack reserve
- of a PPC larger.
-
-Wed Jan 31 14:34:23 1996 Richard Henderson <rth@tamu.edu>
-
- * configure.tgt (m68*-apple-aux*): New target.
- * emulparams/m68kaux.sh: New file.
- * scripttempl/m68kaux.sc: New file.
- * Makefile.in (ALL_EMULATIONS): Add em68kaux.o.
- (em68kaux.c): New target.
-
-Tue Jan 30 13:18:56 1996 Ian Lance Taylor <ian@cygnus.com>
-
- * emultempl/aix.em (gld${EMULATION_NAME}_parse_args): Ignore
- -bnoentry, since the right thing tends to happen anyhow.
-
-Mon Jan 29 12:29:26 1996 Ian Lance Taylor <ian@cygnus.com>
-
- * ld.texinfo, ld.1: Document -export-dynamic.
-
-Fri Jan 26 11:11:55 1996 Andreas Schwab <schwab@issan.informatik.uni-dortmund.de>
-
- * emultempl/sunos.em: Check for native compile by comparing
- ${target} and ${host}.
-
-Thu Jan 25 16:46:58 1996 James G. Smith <jsmith@cygnus.co.uk>
-
- * emulparams/{elf32b4300.sh, elf32l4300.sh}: Changed
- TEXT_START_ADDR to allow use on IDT and PMON systems.
-
-Wed Jan 24 20:59:40 1996 Steve Chamberlain <sac@slash.cygnus.com>
-
- * emultempl/pe.em (gld_${EMULATION_NAME}_parse_args):
- correct spelling.
-
-Wed Jan 24 16:59:19 1996 Doug Evans <dje@charmed.cygnus.com>
-
- * configure.tgt (sparc64-*-solaris2*): New configuration.
- (sparc64-*-aout*): Renamed from sparc64*.
-
-Mon Jan 22 13:01:35 1996 Andreas Schwab <schwab@issan.informatik.uni-dortmund.de>
-
- * Makefile.in (GENSCRIPTS): Pass @host@ @target@ @target_alias@.
- * genscripts.sh: Set host, target and target_alias variables.
- Check for native compile by comparing ${target} and ${host}.
- * emultempl/elf32.em: Likewise.
- * scripttempl/elfmips.sc: Test ${target}, not ${target_alias}.
-
-Mon Jan 22 11:03:23 1996 Michael Meissner <meissner@tiktok.cygnus.com>
-
- * scripttempl/elfppc.sc: Refine eabi support to better support
- .sdata, .sdata2, .sbss, etc. sections.
-
-Tue Jan 16 15:16:58 1996 Ian Lance Taylor <ian@cygnus.com>
-
- * ldgram.y (%union): Add phdr field.
- (phdr): Use phdr_qualifiers rather than opt_hdrs and opt_at.
- (phdr_qualifiers): New nonterminal. Add support for FLAGS.
- (opt_hdrs, hdr): Remove.
- (phdr_val): New nonterminal.
- * ldlang.c (lang_new_phdr): Replace hdrs parameter with filehdr
- and phdrs parameters. Add flags parameter.
- (lang_record_phdrs): Update for changes to lang_phdr. Pass flags
- to bfd_record_phdr.
- * ldlang.h (struct lang_phdr): Replace hdrs field with filehdr and
- phdrs fields. Add flags field.
- (LANG_PHDR_FILEHDR, LANG_PHDR_PHDRS): Remove.
- (lang_new_phdr): Update declaration.
- * ld.texinfo: Document FLAGS.
-
-Mon Jan 15 15:07:19 1996 Ian Lance Taylor <ian@cygnus.com>
-
- * emultempl/sunos.em (gld${EMULATION_NAME}_before_allocation):
- Don't make a shared library because of an undefined reference to
- __GLOBAL_OFFSET_TABLE_.
-
- Add some Irix 5 support, mostly from Kazumoto Kojima
- <kkojima@info.kanagawa-u.ac.jp>:
- * emulparams/elf32bmip.sh (SCRIPT_NAME): Change to elfmips.
- (SHLIB_TEXT_START_ADDR): Define.
- (OTHER_GOT_SYMBOLS): Define.
- (OTHER_READWRITE_SECTIONS): Remove initialization of _gp.
- (EXECUTABLE_SYMBOLS): Don't define.
- (DYNAMIC_LINK): Don't define.
- * emulparams/elf32lmip.sh: Same changes as elf32bmip.sh.
- * scripttempl/elfmips.sc: New file.
- * configure.host (mips*-dec-bsd*): Change mips to mips*.
- (mips*-sgi-irix4*): Likewise.
- (mips*-sgi-irix5*): New entry.
- * Makefile.in (eelf32bmip.c): Depend upon elfmips.sc rather than
- elf.sc.
- (eelf32lmip.c): Likewise.
-
-Sat Jan 13 09:41:43 1996 Michael Meissner <meissner@tiktok.cygnus.com>
-
- * scripttempl/elfppc.sc: Remove support for .rel.* sections. Add
- .rela.got.neg section.
-
-Fri Jan 12 14:56:19 1996 Ian Lance Taylor <ian@cygnus.com>
-
- * scripttempl/sh.sc: Only build constructors when CONSTRUCTING.
-
- * ldmisc.c: Include <stdarg.h> rather than <varargs.h> if
- ANSI_PROTOTYPES is defined. Remove special handling of
- WINDOWS_NT. Various indendation fixes.
- (vfinfo): Change fmt parameter to const char *.
- (info_msg): Write <stdarg.h> version.
- (einfo, minfo, finfo): Likewise.
- (info_assert): Change file parameter to const char *.
- * ldmisc.h (einfo, minfo, info_msg): If ANSI_PROTOTYPES is
- defined, use a real prototype.
- (info_assert): Change first parameter to be const char *.
-
-Fri Jan 12 13:29:55 1996 Michael Meissner <meissner@tiktok.cygnus.com>
-
- * scripttempl/elfppc.sc: Add support for .sdata2/.sbss2, etc. Add
- in old support that 2.7.2 needs, but the current compiler does
- not.
-
- * Makefile.in (eelf32{,l}ppc.c): Fix up dependencies to use the
- correct Linker script template.
-
- * emulparams/elf32{,l}ppc.sh (TEXT_START_ADDR): Set to 0x40000,
- not 0x400000.
- (DATA_ADDR,NONPAGED_TEXT_START_ADDR): Delete.
-
-Tue Jan 9 15:53:02 1996 Ian Lance Taylor <ian@cygnus.com>
-
- * scripttempl/alpha.sc: Put .rconst right after .rdata.
-
-Fri Jan 5 14:07:45 1996 Steve Chamberlain <sac@slash.cygnus.com>
-
- * emultempl/pe.em (gld_${EMULATION_NAME}_before_allocation):
- sort using right pointer.
-
-Fri Jan 5 12:25:47 1996 Michael Meissner <meissner@tiktok.cygnus.com>
-
- * scripttempl/elfppc.sc: Remove support for creating special
- labels for eabi section begin/end here. The compiler now uses
- crt{i,n}.o to create these symbols.
-
-Thu Jan 4 17:08:58 1996 Ian Lance Taylor <ian@cygnus.com>
-
- * configure.host: Change existing Linux HOSTING_CRT0 to be used
- for a.out only, and put in appropriate HOSTING_CRT0 and
- HOSTING_LIBS values for Linux ELF.
-
-Thu Jan 4 12:02:05 1996 Doug Evans <dje@canuck.cygnus.com>
-
- * scripttempl/h8300.sc: Use all 64K for ram.
- * scripttempl/h8300h.sc: Define 256K ram size.
-
-Thu Dec 21 15:57:18 1995 Ian Lance Taylor <ian@cygnus.com>
-
- * emultempl/aix.em (gld${EMULATION_NAME}_before_allocation): Pass
- export_defines as true to bfd_xcoff_size_dynamic_sections if -unix
- was used, regardless of whether -bE was used.
-
-Tue Dec 19 17:35:38 1995 Ian Lance Taylor <ian@cygnus.com>
-
- * emultempl/aix.em (gld${EMULATION_NAME}_after_open): Only set
- relocateable before calling ldctor_build_sets if the output file
- is in an XCOFF format.
-
-Fri Dec 15 16:34:36 1995 Ian Lance Taylor <ian@cygnus.com>
-
- * ldwrite.c (build_link_order): When handling a data statement, if
- the endianness of the output file is unknown, use the endianness
- of the input file.
-
-Tue Dec 12 13:55:41 1995 Stan Shebs <shebs@andros.cygnus.com>
-
- * mpw-config.in: Recognize mips-*-* as equivalent to
- mips-idt-ecoff.
- * mpw-eppcmacos.c: Rename to shorter mpw-eppcmac.c.
- * mpw-ld.r: Add version resources.
- (cfrg): Use symbolic instead of literal name for executable.
-
-Mon Dec 11 15:13:41 1995 Kim Knuttila <krk@cygnus.com>
-
- * scripttempl/ppcpe.sc (FINI): Moved the .reloc section.
-
-Wed Dec 6 14:33:50 1995 Doug Evans <dje@canuck.cygnus.com>
-
- * ldlang.c (print_statement{,s}): Delete duplicate prototype.
- (print_statement_list): Renamed from print_statement. All callers
- updated.
- (print_statement): New function to print just one statement.
- (print_{data,reloc,padding}_statement): Don't crash if
- output_section == NULL.
- (dprint_statement): New function.
-
- * emultempl/pe.em (gld_${EMULATION_NAME}_before_allocation): Fix
- call to sort_sections.
-
-Wed Dec 6 14:59:06 1995 Ian Lance Taylor <ian@cygnus.com>
-
- * emultempl/aix.em (unix_ld): New static variable.
- (gld${EMULATION_NAME}_parse_args): Handle -unix.
- (gld${EMULATION_NAME}_before_allocation): If unix_ld, pass
- gc as false and export_defineds as true to size_dynamic_sections.
-
- * ldexp.c (exp_fold_tree): Permit assignments to dot in the final
- phase if the current section is abs_output_section.
-
-
-Tue Dec 5 09:49:39 1995 Doug Evans <dje@canuck.cygnus.com>
-
- * emultempl/pe.em (gld_${EMULATION_NAME}_before_allocation): Fix call
- to sort_sections.
-
-Fri Dec 1 16:48:36 1995 Ian Lance Taylor <ian@cygnus.com>
-
- * ldgram.y (PHDRS): New token.
- (ifile_p1): Accept phdrs.
- (section): Accept phdr_opt at the end of the section definition.
- (phdr_op): New nonterminal.
- (phdrs, phdr_list, phdr, phdr_type, opt_hdrs, hdr): Likewise.
- * ldlex.l: Accept PHDRS.
- * ldlang.h (struct lang_output_section_phdr_list): Define.
- (lang_output_section_statement_type): Add phdrs field.
- (struct lang_phdr): Define.
- (LANG_PHDR_FILEHDR, LANG_PHDR_PHDRS): Define.
- (lang_new_phdr): Declare.
- * ldlang.c (lang_phdr_list): New static variable.
- (lang_output_section_statement_lookup): Initialize phdrs field.
- (lang_process): Call lang_record_phdrs.
- (lang_new_phdr): New function.
- (lang_section_in_phdr): New function.
- (lang_record_phdrs): New static function.
- * ld.texinfo: Document PHDRS.
-
-Thu Nov 30 13:14:30 1995 Kim Knuttila <krk@cygnus.com>
-
- * scripttempl/ppcpe.sc: Moved .edata into its own section to
- expose it.
-
-Thu Nov 30 11:32:34 1995 Manfred Hollstein KS/EF4A 60/1F/110 #40283 <manfred@lts.sel.alcatel.de>
-
- * configure.host (m68*-motorola-sysv): Define HOSTING_CRT0 and
- HOSTING_LIBS for testing.
- (m88*-motorola-sysv3): Define HOSTING_CRT0 and HOSTING_LIBS for
- testing.
-
-Tue Nov 28 12:14:53 1995 Ian Lance Taylor <ian@cygnus.com>
-
- * lexsup.c (parse_args): Set config.dynamic_link to false for -N
- and -n.
-
-Mon Nov 27 13:12:09 1995 Ian Lance Taylor <ian@cygnus.com>
-
- * configure: Rebuild with autoconf 2.7.
-
-Fri Nov 24 18:35:35 1995 Doug Evans <dje@canuck.cygnus.com>
-
- * scripttempl/pe.sc: Two .junk's is too much junk.
-
-Tue Nov 21 16:14:32 1995 Ian Lance Taylor <ian@cygnus.com>
-
- * configure.in: Use BFD_NEED_DECLARATION.
- * acconfig.h: Put NEED_DECLARATION_FREE in @TOP@ section.
- * configure, config.in: Rebuild with autoconf 2.6.
-
- * ldmain.c (constructor_callback): Don't warn about BFD_RELOC_CTOR
- being unsupported if this is not a relocateable link and the input
- BFD supports it, since ldctor_build_sets can cope with that case.
-
-Fri Nov 17 16:23:15 1995 Stan Shebs <shebs@andros.cygnus.com>
-
- * configure.tgt (powerpc-*-macos*): New target.
- * emulparams/ppcmacos.sh: New file, PowerMac emulation.
- * Makefile.in (ALL_EMULATIONS): Add eppcmacos.o.
- (eppcmacos.c): New target.
- * mpw-eppcmacos.c: Update.
- * mpw-make.sed: Edit out attempts to use {GENSCRIPTS}.
-
-Fri Nov 17 10:37:27 1995 Ian Lance Taylor <ian@cygnus.com>
-
- * Makefile.in (CC_FOR_TARGET): Use @host@ and @target@, not
- $(host_canonical) and $(target_canonical).
- (CXX_FOR_TARGET): Likewise.
-
-Thu Nov 16 11:23:42 1995 Doug Evans <dje@canuck.cygnus.com>
-
- * scripttempl/pe.sc (.endjunk): Move definition of `end' to here
- so the malloc heap begins at a sane place.
-
-Thu Nov 16 03:09:32 1995 Ken Raeburn <raeburn@cygnus.com>
-
- Version 2.6 released.
- * ldver.c (ldversion): Update to 2.6.
-
- * Makefile.in (mostlyclean): Delete ldemul-list.h here, but not
- $(GENERATED_*FILES), since they need to be retained by distclean.
- (maintainer-clean, realclean): Delete them here.
-
-Tue Nov 14 17:08:06 1995 Ian Lance Taylor <ian@cygnus.com>
-
- * emultempl/pe.em (gld_${EMULATION_NAME}_parse_args): Open the
- base file with FOPEN_WB, not "w".
-
- * emultempl/elf32.em (gld${EMULATION_NAME}_after_open): Use the
- environment variable LD_RUN_PATH if neither -rpath nor -rpath-link
- were used.
- (gld${EMULATION_NAME}_before_allocation): Use the environment
- variable LD_RUN_PATH if -rpath was not used.
- * ld.texinfo, ld.1: Document LD_RUN_PATH.
-
-Thu Nov 9 13:09:29 1995 Ian Lance Taylor <ian@cygnus.com>
-
- * emultempl/aix.em (gld${EMULATION_NAME}_parse_args): Recognize
- -bl and -bloadmap options.
-
- * ldfile.c (ldfile_try_open_bfd): If bfd_error_invalid_target,
- report a better error.
-
- * emultempl/aix.em (gld${EMULATION_NAME}_before_allocation): Add
- new local variable special_sections, and pass it to
- size_dynamic_sections. Look through the results, and move the
- sections around in the mapping so that they are defined correctly.
-
-Wed Nov 8 11:40:59 1995 Ian Lance Taylor <ian@cygnus.com>
-
- * ldemul.c (ldemul_default_target): Cast getenv return value.
-
-Tue Nov 7 11:15:36 1995 Kim Knuttila <krk@cygnus.com>
-
- * emulparams/ppcpe.sh (ARCH): New file for PowerPC Portable
- Executable support.
- * scripttempl/ppcpe.sc: New file for PowerPC Portable Executable
- support.
-
- * configure.tgt (targ_extra_emuls): Added powerpcle-pe target.
- * Makefile.in (ALL_EMULATIONS): Added eppcpe.o target.
-
- * emultempl/pe.em (TARGET_IS_ppcpe): file tailoring macro
- (gld_$_before_allocation): added hooks for toc construction based
- on the above macro.
-
-Tue Nov 7 11:47:23 1995 Ian Lance Taylor <ian@cygnus.com>
-
- * ld.texinfo: The linker does not use _main as an entry point.
-
-Tue Nov 7 11:46:11 1995 Manfred Hollstein KS/EF4A 60/1F/110 #40283 <manfred@lts.sel.alcatel.de>
-
- * scripttempl/m88kbcs.sc (.data): Calculate next boundary modulo
- 0x2000 not 0x200.
-
-Mon Nov 6 10:59:21 1995 Ian Lance Taylor <ian@cygnus.com>
-
- * configure.in: Add test for whether free must be declared.
- * sysdep.h: Declare free if necessary. Include "ansidecl.h".
- * acconfig.h: Explain NEED_DECLARATION_FREE.
- * configure, config.in: Rebuild.
-
- * lexsup.c (parse_args): Take B:: out of shortopts.
-
-Sun Nov 5 03:08:28 1995 Ken Raeburn <raeburn@cygnus.com>
-
- * emulparams/i386nbsd.sh (EXECUTABLE_SYMBOLS): Set __DYNAMIC to 0
- for now, as with m68k4kbsd, until shared library support gets
- done.
-
- * configure.host: For i386 BSD variants, crt0.o lives in
- /usr/lib. (True for NetBSD at least, unconfirmed for others.)
-
-Wed Nov 1 15:42:45 1995 Manfred Hollstein KS/EF4A 60/1F/110 #40283 <manfred@lts.sel.alcatel.de>
-
- * Makefile.in (ALL_EMULATIONS): Add edelta68.o.
- (edelta68.c): New target.
- * configure.tgt (m68*-motorola-sysv*): New target.
- * emulparams/delta68.sh: New file.
- * scripttempl/delta68.sc: New file.
-
- * scripttempl/m88kbcs.sc: Handle .init and .fini. Change section
- addresses.
-
-Wed Nov 1 11:41:56 1995 Ian Lance Taylor <ian@cygnus.com>
-
- * ldgram.y (mri_script_command): Accept ',' as well as '=' in
- ALIGN and ALIGNMOD statements.
-
- * emultempl/aix.em: Include ldgram.h.
- (gld${EMULATION_NAME}_parse_args): Handle -pD and -pT, as used on
- AIX 4.1.
- * Makefile.in ($(EMULATION_OFILES)): Depend upon ldgram.h.
-
-Tue Oct 31 18:22:24 1995 David Mosberger-Tang <davidm@azstarnet.com>
-
- * configure.host (alpha-*-linux*): New host.
- * configure.tgt (alpha-*-linux*): New target.
-
-Tue Oct 31 12:36:52 1995 Ian Lance Taylor <ian@cygnus.com>
-
- * emultempl/aix.em (export_files): Remove.
- (import_files): Make static.
- (struct export_symbol_list): Define.
- (export_symbols): New static variable.
- (gld${EMULATION_NAME}_parse_args): Handle an initial -b option
- correctly. Call read_file for an export file.
- (gld${EMULATION_NAME}_before_allocation): Call
- bfd_xcoff_export_symbol for each export symbol, rather than
- calling read_file for each export file.
- (gld${EMULATION_NAME}_read_file): For an export file, make the
- exported symbols undefined, and store them on the export_symbols
- list.
-
-Sat Oct 28 00:10:03 1995 steve chamberlain <sac@slash.cygnus.com>
-
- * emultempl/pe.em (gld_${EMULATION_NAME}_parse_args):
- Don't hang if last option is unrecognised.
- (gld_${EMULATION_NAME}_set_symbols): Insert created
- symbols into ABS output section.
-
-Fri Oct 27 18:03:17 1995 Niklas Hallqvist <niklas@appli.se>
-
- * Makefile.in (ALL_EMULATIONS): Added support for the NetBSD
- m68k4k arch.
- (em68k4knbsd.c): New rule.
-
- * configure.tgt: Added support for the NetBSD m68k4k arch.
-
- * genscripts.sh, ldint.texinfo,
- emulparams/{a29k,armaoutb,armaoutl,coff_sparc,ebmon29k,gld960,
- gld960coff,go32,h8300,h8300h,h8500,h8500b,h8500c,h8500m,h8500s,
- hp300bsd,hp3hpux,hppaelf.sh,i386aout,i386bsd,i386coff,i386go32,
- i386linux,i386lynx,i386nbsd,lnk960,m68kaout,m68kcoff,m68klynx,
- m88kbcs,mipsbig,mipsbsd,mipsidt,mipsidtl,mipslit,news,ns32knbsd,
- pc532machaout,riscix,sa29200,sh,shl,sparclynx,sparcnbsd,
- st2000,sun3,sun4,vanilla,vax,vsta,w65,z8001,z8002}.sh: Changed
- PAGE_SIZE to TARGET_PAGE_SIZE.
-
- * emulparams/m68knbsd.h: Ditto.
- (TEXT_START_ADDR, NONPAGED_TEXT_START_ADDR): We have 8K pagesize.
- (EXECUTABLE_SYMBOLS): Hardcode __DYNAMIC to zero for the time
- being.
-
- * emulparams/m68k4knbsd.sh: New file.
-
- * scripttempl/aout.sc: Expand EXECUTABLE_SYMBOLS if relocating.
-
-Fri Oct 27 17:59:09 1995 Ian Lance Taylor <ian@cygnus.com>
-
- * emultempl/aix.em: Include ldctor.h.
- (gld${EMULATION_NAME}_after_open): New static function.
- (gld${EMULATION_NAME}_before_allocation): Call find_relocs.
- (gld${EMULATION_NAME}_find_relocs): New static function.
- (gld${EMULATION_NAME}_find_exp_assignment): New static function.
- (ld_${EMULATION_NAME}_emulation): Use new after_open function.
- * scripttempl/aix.sc: Use CONSTRUCTORS in .data.
- * ldctor.c (struct set_info): Move definition into ldctor.h.
- (struct set_element): Likewise.
- (sets): Make non-static.
- (ldctor_add_set_entry): Add name parameter. Save it in the new
- set element.
- (ldctor_build_sets): Avoid being called twice. Pass set element
- name to lang_add_reloc.
- * ldctor.h (struct set_info): Move definition here from ldctor.c.
- (struct set_element): Likewise. Add new field name.
- (sets): Declare.
- (ldctor_add_set_entry): Declare new name parameter.
- * ldwrite.c (build_link_order): Don't insist that either name or
- section be NULL in a lang_reloc_statement.
- * ldmain.c (add_to_set): Pass NULL to ldctor_add_new_set_entry for
- new name parameter.
- (constructor_callback): Pass name to ldctor_add_new_set_entry for
- new name parameter.
-
- * ldmisc.c (demangle): Fix indentation. Remove a leading period.
-
-Thu Oct 26 22:22:49 1995 Stan Shebs <shebs@andros.cygnus.com>
-
- * mpw-config.in: Add PowerMac target support, generate config.h.
- * mac-ld.r: New file, Mac resources.
- * mpw-make.sed: New file, edits Makefile.in into MPW syntax.
- * mpw-make.in: Remove.
- * mpw-eppcmacos.c: Prebuilt version of PowerMac linking script.
-
-Thu Oct 26 14:11:26 1995 Ian Lance Taylor <ian@cygnus.com>
-
- * emultempl/aix.em (gld${EMULATION_NAME}_parse_args): Treat
- -static as a synonym for -bnso.
-
- * scripttempl/aix.sc: Move special symbols inside sections.
- Always start .data at 0.
-
-Wed Oct 25 11:52:12 1995 Per Bothner <bothner@kalessin.cygnus.com>
-
- * Makefile.in (diststuff): Also make info.
- (maintainer-clean realclean): Also delete *.info*.
-
-Wed Oct 25 11:27:25 1995 Ian Lance Taylor <ian@cygnus.com>
-
- * emultempl/aix.em: Add support for various AIX linker options,
- for AIX import and export files, and for AIX shared objects.
- * scripttempl/aix.sc: Add .pad. Put .ds just before the TOC.
-
- * ldmain.c (main): Initialize new field link_info.static_link.
-
- * ldmain.c (add_keepsyms_file): Add \n at end of einfo calls.
- (constructor_callback): Likewise.
- * ldmisc.c (vfinfo): Likewise.
- * ldwrite.c (build_link_order): Likewise.
-
- * ld.texinfo: The MRI ALIGN directive is supported.
-
-Mon Oct 23 11:46:43 1995 James G. Smith <jsmith@pasanda.cygnus.co.uk>
-
- * emulparams/elf32vr4300.sh: Deleted.
- * emulparams/elf32vr4300el.sh: Deleted.
- * emulparams/elf32b4300.sh: Added.
- * emulparams/elf32l4300.sh: Added.
- * configure.tgt, Makefile.in: Updated the build to use the
- new 8.3 unique names.
-
-Thu Oct 19 17:41:46 1995 Ian Lance Taylor <ian@cygnus.com>
-
- * ldlang.c (entry_symbol): Make non-static.
- * ldlang.h (entry_symbol): Declare.
-
- * ldlex.l: Treat PROVIDE as a keyword in expression state.
-
-Wed Oct 18 17:34:06 1995 steve chamberlain <sac@slash.cygnus.com>
-
- * scripttempl/pe.sc (.bss): Move to be after .text
-
-Tue Oct 17 12:22:05 1995 Ian Lance Taylor <ian@cygnus.com>
-
- * emultempl/sunos.em (gld${EMULATION_NAME}_find_exp_assignment):
- Search trinary.cond rather than searching trinary.lhs twice. From
- linli@ihp.PHys.ethz.CH.
-
- * emultempl/sunos.em (gld${EMULATION_NAME}_find_so): Move
- directory searching code into gld${EMULATION_NAME}_search_dir.
- (gld${EMULATION_NAME}_search_dir): New static function, extracted
- from gld${EMULATION_NAME}_find_so.
- (global_needed, global_found): New static variables.
- (gld${EMULATION_NAME}_after_open): New static function.
- (gld${EMULATION_NAME}_search_needed): New static function.
- (gld${EMULATION_NAME}_try_needed): New static function.
- (gld${EMULATION_NAME}_check_needed): New static function.
- (ld_${EMULATION_NAME}_emulation): Use new after_open function.
- * ld.texinfo, ld.1: Mention -rpath-link on SunOS.
-
- * Makefile.in (eelf32ppc.c): Depend upon elf32.em, not generic.em.
- (eelf32lppc.c): Likewise.
- * emulparams/elf32lppc.sh (TEMPLATE_NAME): Define as elf32.
- (GENERATE_SHLIB_SCRIPT): Define as yes.
-
-Mon Oct 16 19:11:13 1995 Ian Lance Taylor <ian@cygnus.com>
-
- * emultempl/elf32.em: Struct bfd_elf_link_needed_list is now named
- bfd_link_needed-list; make appropriate changes.
-
- * configure.tgt (powerpc-*-aix*): New target; use aixppc.
- (rs6000-*-aix*): New target; use aixrs6.
- * emulparams/aixppc.sh, emulparams/aixrs6.sh: New files.
- * emultempl/aix.em: New file.
- * scripttempl/aix.sc: New file.
- * Makefile.in (ALL_EMULATIONS): Add eaixppc.o and eaixrs6.o.
- (eaixppc.c, eaixrs6.c): New targets.
-
-Fri Oct 13 14:00:37 1995 Steve Chamberlain <sac@slash.cygnus.com>
-
- * scripttempl/pe.sc (.reloc): Move to the end.
-
-Tue Oct 10 17:53:22 1995 Ian Lance Taylor <ian@cygnus.com>
-
- * ldlang.c (lang_finish): Don't try to use an entry_symbol from a
- section which was not linked into the final output.
-
-Tue Oct 10 10:17:22 1995 steve chamberlain <sac@slash.cygnus.com>
-
- * emultempl/pe.em (gld_${EMULATION_NAME}_parse_args): Fix
- fatal typos.
-
-Tue Oct 10 01:01:51 1995 Ian Lance Taylor <ian@cygnus.com>
-
- * ld.h (args_type): Add rpath_link field.
- * emultempl/elf32.em (gld${EMULATION_NAME}_after_open): Search for
- required dependencies in rpath_link path. Only search
- LD_LIBRARY_PATH when configured native.
- * lexsup.c (parse_args): Recognize -rpath-link.
- * ld.1, ld.texinfo: Document -rpath-link.
-
-Sat Oct 7 17:07:17 1995 Ian Lance Taylor <ian@cygnus.com>
-
- * emultempl/elf32.em (gld${EMULATION_NAME}_after_open): Don't
- bother searching for needed libraries unless doing a final link.
-
-Fri Oct 6 16:26:16 1995 Ken Raeburn <raeburn@cygnus.com>
-
- Mon Sep 25 22:49:32 1995 Andreas Schwab <schwab@issan.informatik.uni-dortmund.de>
-
- * ld.1: Fix formatting bugs.
-
-Wed Oct 4 17:37:46 1995 Ian Lance Taylor <ian@cygnus.com>
-
- * ldexp.c (exp_get_abs_int): Return bfd_vma, not int.
- * ldexp.h (exp_get_abs_int): Update declaration.
- * ldlang.c (print_output_section_statement): Use fprintf_vma to
- print return value of exp_get_abs_int.
-
-Mon Oct 2 13:56:09 1995 Ian Lance Taylor <ian@cygnus.com>
-
- * emultempl/elf32.em (global_stat): New file static variable.
- (gld${EMULATION_NAME}_try_needed): Call stat_needed to make sure
- that the file has not already been included under another name.
- (gld${EMULATION_NAME}_stat_needed): New static function.
-
-Fri Sep 29 12:00:18 1995 Doug Evans <dje@deneb.cygnus.com>
-
- * scripttempl/armcoff.sc: Start .text at 0x8000.
- Start .data at 0x40000.
-
-Fri Sep 29 11:09:46 1995 Ian Lance Taylor <ian@cygnus.com>
-
- * emultempl/sunos.em (gld${EMULATION_NAME}_before_allocation): If
- command_line.rpath is set, use it, rather than the -L options, to
- build the rules section.
- * ld.texinfo: Document this use of -rpath.
-
- * lexsup.c (parse_args): Don't set link_info.shared for -assert
- pure-text. Pass true, not 1, to lang_add_entry.
- * emultempl/sunos.em (find_assign): New static variable.
- (found_assign): New static variable.
- (gld${EMULATION_NAME}_before_allocation): Rename local h to hdyn.
- If not a relocateable link, and no start symbol was specified on
- the command line, and there are any undefined symbols, set
- link_info.shared. If link_info.shared is set, set the address of
- the .text section to 0x20.
- (gld${EMULATION_NAME}_find_assignment): Rename from
- gld${EMULATION_NAME}_find_statement_assignment. If find_assign is
- set, then just set found_assign based on whether an assignment is
- found to find_assign.
- (gld${EMULATION_NAME}_get_script): Don't use a special script when
- producing a shared library.
- * emulparams/sun4.sh (GENERATE_SHLIB_SCRIPT): Remove.
- * scripttempl/aout.sc: Remove CREATE_SHLIB tests.
- * ldlang.c (entry_from_cmdline): New global variable.
- (lang_add_entry): Change cmdline parameter from int to boolean.
- Use global entry_from_cmdline rather than function static
- from_cmdline.
- * ldlang.h (entry_from_cmdline): Declare.
- (lang_add_entry): Change declaration of second parameter from int
- to boolean.
- * ldgram.y: Pass false, not 0, to lang_add_entry.
-
-Thu Sep 28 12:34:13 1995 Ian Lance Taylor <ian@cygnus.com>
-
- * ld.h (parsing_defsym): Declare.
- * ldlex.h (lex_string): Declare.
- * ldlex.l (lex_string): Define.
- * lexsup.c (parsing_defsym): Define.
- (parse_args): In OPTION_DEFSYM case, set lex_string before calling
- lex_redirect, and clear it after calling yyparse. Set
- parsing_defsym around call to yyparse.
- * ldmain.c (main): Set lex_string before calling lex_redirect, and
- clear it after calling yyparse.
- * ldmisc.c (vfinfo): For %S, handle --defsym arguments and built
- in linker scripts correctly.
-
- * scripttempl/sparccoff.sc: Add .ctors/.dtors handling like other
- COFF targets, allowing for the leading underscore used on SPARC
- COFF.
-
- * lexsup.c (parse_args): Handle -assert.
- * emulparams/sun4.sh (GENERATE_SHLIB_SCRIPT): Define.
- * emultempl/sunos.em (gld${EMULATION_NAME}_get_script): Use the
- shared library script when appropriate.
- * scripttempl/aout.sc: If CREATE_SHLIB is set, start the .text
- section at SIZEOF_HEADERS.
-
-Thu Sep 28 01:40:37 1995 Doug Evans <dje@deneb.cygnus.com>
-
- * Makefile.in (earmcoff.c): Build.
- * configure.tgt (arm-*-coff): New target
- * emulparms/armcoff.sh: New file.
- * scripttempl/armcoff.sc: New file.
-
-Tue Sep 26 10:59:32 1995 Ian Lance Taylor <ian@cygnus.com>
-
- * scripttempl/i386coff.sc: Remove .data2; no longer needed.
-
-Fri Sep 22 18:09:02 1995 Ian Lance Taylor <ian@cygnus.com>
-
- * ldfile.c (ldfile_set_output_arch): Make arch const.
-
-Thu Sep 21 17:55:24 1995 Michael Meissner <meissner@tiktok.cygnus.com>
-
- * scripttempl/elfppc.sc: Correctly locate __bss_start at the
- beginning of the .bss area, not at the end of data. Add
- __sbss_{start,end} symbols.
-
-Wed Sep 20 12:29:36 1995 Ian Lance Taylor <ian@cygnus.com>
-
- * Makefile.in (CC_FOR_TARGET): Quote $(program_transform_name).
- (CXX_FOR_TARGET, install): Likewise.
-
-Mon Sep 18 14:53:22 1995 Ian Lance Taylor <ian@cygnus.com>
-
- Based on patches by Alan Modra <alan@spri.levels.unisa.edu.au>:
- * Makefile.in (CC_FOR_TARGET): Remove brokensed stuff.
- (CXX_FOR_TARGET): Likewise.
- (install): Likewise.
- (GENERATED_HFILES): Remove config.h.
- (.dep): Depend upon config.h.
-
-Mon Sep 18 14:39:38 1995 Arne H. Juul <arnej@pvv.unit.no>
-
- * configure.tgt (mips*-dec-netbsd*): New target.
-
-Fri Sep 15 20:01:52 1995 Ken Raeburn <raeburn@cygnus.com>
-
- * configure.host (m88*-*-dgux*): Fix another shell syntax error.
-
-Fri Sep 15 23:28:05 1995 Andrew Cagney <cagney@highland.com.au>
-
- * configure.host (i[345]86-*-bsd*): Fix shell syntax error.
-
-Thu Sep 12 12:50:49 1995 steve chamberlain <sac@slash.cygnus.com>
-
- * scripttempl/pe.sc: Allow both spellings of .ctors/.dtors.
- Start .text section on the right boundary. Always align
- stabs.
-
-Tue Sep 12 12:24:17 1995 Ian Lance Taylor <ian@cygnus.com>
-
- * Makefile.in (maintainer-clean): New target.
-
- * ldmain.c (struct warning_callback_info): Define.
- (warning_callback): Add new parameter symbol. Call
- warning_find_reloc to try to find the section and VMA.
- (warning_find_reloc): New static function.
- * emultempl/elf32.em (gld${EMULATION_NAME}_before_allocation):
- Pass NULL as symbol parameter to warning callback.
-
- * ld.texinfo: Clarify -L option.
-
- * ldlang.c (lang_one_common): Add cast to avoid warning.
- (topower): Likewise. Also, reindent.
- * ldwrite.c (clone_section): Change i to unsigned int.
- * emultempl/sunos.em (gld${EMULATION_NAME}_before_allocation): Add
- cast to avoid warning.
-
-Fri Sep 8 16:32:43 1995 Ian Lance Taylor <ian@cygnus.com>
-
- * Makefile.in (config.status): Depend upon configure.tgt.
-
- * ldemul.h (ldemul_set_symbols): Declare.
- (ldemul_parse_args): Declare.
- * ldemul.c (ldemul_parse_args): Fix indentation.
-
- * configure.in: Call AC_HEADER_DIRENT.
- * configure, config.in: Rebuild.
- * emultempl/sunos.em: Use autoconf recommend mechanism to define
- DIR and struct dirent.
-
- * configure.tgt (mips*-*-bsd*): New case.
-
- * configure.host (i[345]86-sequent-ptx* | i[345]86-sequent-sysv*)
- New case.
- * configure.tgt (i[345]86-*-ptx*): New case.
-
-Thu Sep 7 10:48:26 1995 Ian Lance Taylor <ian@cygnus.com>
-
- * config.in: Rename from config.h.in.
- * configure.in: Call AC_CONFIG_HEADER with config.h:config.in.
- Check for config.h:config.in when creating stamp-h.
- * configure: Rebuild.
- * Makefile.in (stamp-h): Depend upon config.in rather than
- config.h.in. Set CONFIG_HEADERS to config.h:config.in when
- calling config.status.
-
- * Makefile.in (distclean): Remove config.h and stamp-h.
-
- * configure.host (sparc-*-sunos64*): Remove.
- * ldlang.c (lang_map): Check BFD64, not HOST_64_BIT.
-
- * ldexp.c (exp_fold_tree): Don't warn about moving the location
- counter backward in the absolute section.
-
-Wed Sep 6 14:42:11 1995 Ian Lance Taylor <ian@cygnus.com>
-
- * configure.in: Rewrite to use autoconf.
- * configure.host: New file.
- * configure.tgt: New file.
- * aclocal.m4: New file.
- * configure: New file, built by autoconf.
- * acconfig.h: New file.
- * config.h.in: New file, built by autoheader.
- * sysdep.h: New file.
- * ld.h: Incorporate old contents of config.h.
- * config.h: Remove.
- * Makefile.in: Various changes for new configure script. Also:
- (CC_FOR_BUILD): Remove.
- (ldmain.o): Don't bother to ensure that EMUL is non-empty.
- (dep.sed): Use @SRCDIR@, not @srcdir@.
- * dep-in.sed: Use @SRCDIR@, not @srcdir@.
- * genscripts.sh: Create ldscripts if it does not exist.
- * ldemul.c, lexsup.c, mpw-emipsidt.c: Don't include "config.h".
- * mpw-esh.c, emultempl/*.em: Likewise.
- * ldmain.c: Likewise. Include <ctype.h>. Don't try to set
- HAVE_SBRK here.
- * config/*.mt, config/*.mh: Remove.
-
-Tue Sep 5 14:55:24 1995 Ken Raeburn <raeburn@cygnus.com>
-
- * configure.in: Treat ns32k-pc532-ux* like ns32k-pc532-mach*, and
- ns32k-pc532-lites* like ns32k-pc532-netbsd*. From Ian Dall.
-
-Fri Sep 1 22:29:52 1995 Doug Evans <dje@canuck.cygnus.com>
-
- * scripttempl/pe.sc: Fix typo in spelling of .ctors/.dtors.
-
-Fri Sep 1 13:13:29 1995 Ian Lance Taylor <ian@cygnus.com>
-
- * ldmain.c (warning_callback): Add abfd, section, and address
- parameters.
- * emultempl/elf32.em (gld${EMULATION_NAME}_before_allocation):
- Change call to warning accordingly.
-
- * emultempl/elf32.em (gld${EMULATION_NAME}_place_orphan): If not
- relocateable and not shared, put .gnu.warning.SYMBOL sections into
- the .text section.
-
-Fri Sep 1 08:35:16 1995 James G. Smith <jsmith@beauty.cygnus.com>
-
- * configure.in: Added mips*vr4300-idt-elf* and
- mips*vr4300el-idt-elf* targets.
- * Makefile.in: Added eelf32vr4300* targets.
- * emulparams/{elf32vr4300.sh, elf32vr4300el.sh}: Added.
- * config/{mips-vr4300.mt, mips-vr4300el.mt}: Added.
-
-Fri Sep 1 10:51:45 1995 Ian Lance Taylor <ian@cygnus.com>
-
- * scripttempl/a29k.sc: Fix to be reasonable. From Brendan Kehoe
- <brendan@cygnus.com>.
-
-Thu Aug 31 16:37:07 1995 steve chamberlain <sac@slash.cygnus.com>
-
- * ldemul.c (ldemul_parse_args): New.
- * ldemul.h (ld_emulation_xfer_struct): Add parse_args.
- * lexsup.c (all pe stuff): Moved into pe.em
- (parse_args): Call emulation arg parser.
- * emultempl/pe.em (parse_args): handle PE specfic args.
-
-Thu Aug 31 17:01:37 1995 Ian Lance Taylor <ian@cygnus.com>
-
- * ldlang.c (lang_memory_region_lookup): Don't use the first region
- as the default region. Create a new region instead.
-
-Tue Aug 29 14:21:41 1995 steve chamberlain <sac@slash.cygnus.com>
-
- * ldemul.c (ldemul_set_symbols): New function.
- * ldemul.h (ld_emulation_xfer_struct): Add set_symbols.
- * ldmain.c (main): Add call to ldemul_set_symbols.
- * lexsup.c (set_pe_value): New args.
- (set_pe_name): New.
- (parse_args): Cope with new set_pe_value args.
- * emultempl/pe.em (set_symbols): New function.
- (ld_emulation_xfer_struct): Add set_symbols.
- * scripttempl/pe.sc: Use new symbols.
-
-Thu Aug 24 18:12:18 1995 Ian Lance Taylor (ian@cygnus.com)
-
- * lexsup.c (parse_args): Don't call set_default_dirlist for -O.
- For -Y, ignore a leading `P,', and only call set_default_dirlist
- after processing all the other arguments.
-
-Tue Aug 22 07:36:58 1995 steve chamberlain <sac@slash.cygnus.com>
-
- * scripttempl/pe.sc: Keep .edata, don't base stabs at 0.
- * emulparams/armpe.sh: Run PE script.
-
-Mon Aug 21 18:30:42 1995 steve chamberlain <sac@slash.cygnus.com>
-
- * ldmain.c (main): Remove PE stuff.
- * lexsup.c (options): Load more PE options.
- (set_pe_value): New function.
-
-Thu Aug 17 13:35:49 1995 steve chamberlain <sac@slash.cygnus.com>
-
-
- * emultempl/{armpe.sc, i386pe.sc}: Deleted.
- * emultempl/pe.sc: New file performs generic PE support and sorts
- archive members.
- * emulparams/{armpe.sh,i386pe.sh}: Use new file.
- * scripttempl/{armpe.sc, i386pe.sc}: Deleted
- * scripttempl/pe.sc: New.
- * Makefile.in: Use new files.
-
-Thu Aug 17 14:46:34 1995 Doug Evans <dje@canuck.cygnus.com>
-
- * scripttempl/h8500s.sc (.rdata): All data must go in data segment.
- (.strings,.ctors,.dtors): Likewise.
-
-Wed Aug 16 11:38:59 1995 steve chamberlain <sac@slash.cygnus.com>
-
- * scripttempl/armpe.sc: Always start code at 0x401000, even
- if -r.
- * ldwrite.c (strdup): New extern declaration.
- * ldgram.y (atype): New rule to clarify type parsing.
- * ldlang.c (init_os): Remove commented out code.
- (lang_size_sections): Set SEC_ALLOC and SEC_LOAD bits
- unless told not to by the link script.
-
-Wed Aug 16 11:45:11 1995 Ian Lance Taylor <ian@cygnus.com>
-
- * ldlang.c (lang_set_startof): New static function.
- (lang_process): Call it.
-
- * ldgram.y: Tweak casesymlist to avoid bison errors.
-
- * lexsup.c (parse_args): Accept -h as a synonym for --soname, for
- Solaris compatibility.
-
-Tue Aug 15 17:31:16 1995 Ian Lance Taylor <ian@cygnus.com>
-
- * ldgram.y (YYDEBUG): If not defined, define as 1.
- (CASE, EXTERN, START): New tokens.
- (mri_script_command): Handle CASE, EXTERN, INCLUDE, START.
- (casesymlist): New nonterminal.
- (extern_name_list): New nonterminal.
- * ldlex.l: Accept lower case trailing base specifiers. Don't
- ignore the first digit when the base is a suffix. Accept many
- EXPRESSION state tokens in MRI state. Support MRI continuation
- lines and MRI semicolon comments. Accept all MRI keywords in
- lower case. Add CASE, EXTERN, and START MRI keywords.
-
-Tue Aug 8 19:14:58 1995 Ken Raeburn <raeburn@kr-laptop.cygnus.com>
-
- * emultempl/sunos.em (gld${EMULATION_NAME}_find_so): Use xmalloc
- instead of alloca.
-
-Tue Aug 8 15:24:05 1995 J.T. Conklin <jtc@rtl.cygnus.com>
-
- * Makefile.in (CC_FOR_TARGET, CXX_FOR_TARGET): Don't use
- $r/../gcc/xgcc unless it is present.
-
-Thu Aug 3 11:56:22 1995 Ian Lance Taylor <ian@cygnus.com>
-
- * scripttempl/m68kcoff.sc: Only put .ctors and .dtors in .text
- when CONSTRUCTING.
- * scripttempl/m68klynx.sc: Likewise.
- * scripttempl/nw.sc: Likewise.
- * scripttempl/sa29200.sc: Likewise.
- * scripttempl/sparclynx.sc: Likewise.
-
-Fri Jul 28 12:02:23 1995 steve chamberlain <sac@slash.cygnus.com>
-
- * emulparams/{z8001.sh, z8002.sh}: Fix typo.
-
-Thu Jul 27 21:06:21 1995 Ken Raeburn <raeburn@cygnus.com>
-
- * configure.in (i[345]86-*-linuxoldld): Treat like linuxaout*.
-
-Thu Jul 27 15:26:28 1995 steve chamberlain <sac@slash.cygnus.com>
-
- * scripttempl/i386pe.sc: Cope with constructors.
- * scripttempl/z8ksim.sc: Deleted.
- * scripttempl/z8000.sc: Resurrected as this, but
- can handle z8001 and z8002 formats.
- * emulparams/z8ksim.sh: Deleted.
- * emulparams/{z8001.sh, z8002.sh}: New files.
- * config/z8ksim.mt: Deleted
- * config/z8k-coff.mt: New, generates both emulations.
-
-Tue Jul 25 14:53:02 1995 Ian Lance Taylor <ian@cygnus.com>
-
- * ldmisc.c (vfinfo): In %C and %D case, always print the BFD using
- %B, in case it is in an archive.
-
-Mon Jul 24 15:23:39 1995 Ian Lance Taylor <ian@cygnus.com>
-
- * ldlang.c (lang_process): Call reset_memory_regions for each
- relaxation pass.
-
-Fri Jul 21 22:49:44 1995 Michael Meissner <meissner@cygnus.com>
-
- * scripttempl/elfppc.sc: Add support for .sdata, .sbss, and
- _SDA_BASE.
-
-Thu Jul 20 16:26:55 1995 Ken Raeburn <raeburn@cygnus.com>
-
- * ldmain.c (constructor_callback): Allocate set_name in stack
- frame, rather than always calling alloca with a fixed size.
-
-Wed Jul 19 16:21:43 1995 Doug Evans <dje@canuck.cygnus.com>
-
- * emulparams/armpe.sh (OUTPUT_FORMAT): Change to pei-arm-little.
- (LITTLE_OUTPUT_FORMAT, BIG_OUTPUT_FORMAT): Define.
-
-Mon Jul 17 13:57:00 1995 Ian Lance Taylor <ian@cygnus.com>
-
- * ldwrite.c (clone_section): Set the alignment of the clone
- section to that of the section being cloned.
-
- * ldwrite.c (split_sections): Don't split the first input section
- into a new output section.
-
-Sat Jul 15 00:26:35 1995 Michael Meissner <meissner@cygnus.com>
-
- * emulparams/elf32ppc.sh (TEMPLATE_NAME): Define as elf32.
- (GENERATE_SHLIB_SCRIPT): Define as yes.
-
-Fri Jul 14 12:11:46 1995 Ian Lance Taylor <ian@cygnus.com>
-
- * emultempl/mipsecoff.em (check_sections): Use %P, not %F.
-
- * ldver.c (help): Update list of options to match currently
- supported list.
-
-Thu Jul 13 13:52:10 1995 Ian Lance Taylor <ian@cygnus.com>
-
- * emultempl/lnk960.em (ld_lnk960_emulation): Initialize
- after_open field.
-
- * ldexp.c (exp_intop): Don't cast stat_alloc arg to bfd_size_type;
- it takes a size_t anyhow.
- (exp_binop): Likewise.
- (exp_trinop): Likewise.
- (exp_unop): Likewise.
- (exp_nameop): Likewise.
- (exp_assop): Likewise.
- * ldlang.c (lang_memory_region_lookup): Likewise.
- (init_os): Likewise.
- (ldlang_add_undef): Likewise.
- (insert_pad): Likewise.
- * ldfile.c (ldfile_add_arch): Don't cast xmalloc arg to
- bfd_size_type.
-
- * Makefile.in (ALL_EMULATIONS): It's earmaoutb.o, not earmoutb.o.
-
-Wed Jul 12 11:32:22 1995 Ian Lance Taylor <ian@cygnus.com>
-
- * ldemul.h (ldemul_open_dynamic_archive): Add search parameter to
- declaration.
- (ld_emulation_xfer_type): Add search parameter to
- open_dynamic_archive entry point.
- * ldemul.c (ldemul_open_dynamic_archive): Add search parameter.
- * ldfile.c (ldfile_try_open_bfd): Rename from try_open_bfd, and
- make non-static. Change all callers to use new name.
- (ldfile_open_file_search): Make static. If entry is dynamic, call
- ldemul_open_dynamic_archive.
- (ldfile_open_file): Don't call ldemul_open_dynamic_archive.
- * ldfile.h (ldfile_open_file_search): Don't declare.
- (ldfile_try_open_bfd): Declare.
- * emultempl/elf32.em (gld${EMULATION_NAME}_open_dynamic_archive):
- Accept search parameter. Don't search for a library, just look in
- a single place.
- * emultempl/linux.em (gld${EMULATION_NAME}_open_dynamic_archive):
- Likewise.
-
-Tue Jul 11 16:44:21 1995 Ian Lance Taylor <ian@cygnus.com>
-
- * ldmain.c (set_scripts_dir): Don't base script directory on
- current directory.
-
-Tue Jul 11 12:29:02 1995 Rick Sladkey <jrs@world.std.com>
-
- * ldmisc.c (vfinfo): Don't print the line number if it isn't
- meaningful.
-
-Mon Jul 10 13:38:28 1995 Ian Lance Taylor <ian@cygnus.com>
-
- * ld.h (ld_config_type): Add field warn_constructors.
- * ldmain.c (add_to_set): Warn if config.warn_constructors.
- (constructor_callback): Likewise.
- * lexsup.c (parse_args): Handle -warn-constructors.
- * ld.texinfo, ld.1: Document -warn-constructors.
-
- * emultempl/elf32.em (gld${EMULATION_NAME}_check_needed): Don't
- get confused by directory names if we searched for the file.
-
- Based on patches from H.J. Lu <hjl@nynexst.com>:
- * ldlang.h (lang_input_statement_type): Add new field dynamic.
- * ldlang.c (new_afile): Set dynamic from config.dynamic_link.
- * ldfile.c: Include bfdlink.h.
- (ldfile_open_file): Check dynamic field of entry, not global
- dynamic_link field. Don't do a dynamic search when doing a
- relocateable link.
- * ldmain.c (main): Don't warn about dynamic_link for a
- relocateable link.
- * emultempl/sunos.em (gld${EMULATION_NAME}_find_so): Skip file if
- dynamic is false.
- (gld${EMULATION_NAME}_create_output_section_statements): Always
- loop over input files.
- * Makefile.in: Rebuild dependencies.
-
- * ld.texinfo, ld.1: Document -Bstatic, -Bdynamic, -Bshared, and
- -shared.
-
-Mon Jul 10 13:29:43 1995 Eric Youngdale <eric@aib.com>
-
- * ldmain.c (main): Set link_info.symbolic to false.
- * lexsup.c (parse_args): Handle -Bsymbolic.
-
-Wed Jul 5 00:12:11 1995 Fred Fish (fnf@cygnus.com)
-
- * ldmain.c (HAVE_SBRK): Define for everything except
- specific systems that are known to not support sbrk.
- (main): Use HAVE_SBRK to decide whether or not to use sbrk.
-
-Tue Jul 4 12:55:48 1995 Ian Lance Taylor <ian@cygnus.com>
-
- * emultempl/elf32.em (gld${EMULATION_NAME}_find_exp_assignment):
- Handle etree_provide.
-
- * emultempl/elf32.em (global_needed): New static variable.
- (global_found): Likewise.
- (gld${EMULATION_NAME}_after_open): New static function.
- (gld${EMULATION_NAME}_search_needed): Likewise.
- (gld${EMULATION_NAME}_try_needed): Likewise.
- (gld${EMULATION_NAME}_check_needed): Likewise.
- (ld_${EMULATION_NAME}_emulation): Replace after_open_default with
- gld${EMULATION_NAME}_after_open.
-
-Mon Jul 3 14:26:37 1995 Steve Chamberlain <sac@slash.cygnus.com>
-
- * configure.in (i386-*-win32): New target.
-
-Mon Jul 3 14:39:22 1995 Ian Lance Taylor <ian@cygnus.com>
-
- * lexsup.c (parse_args): Let -G either set the small data size or
- be equivalent to --shared, depending on the next argument. Accept
- and ignore -z for Solaris compatibility.
-
-Sun Jul 2 17:52:34 1995 Ian Lance Taylor <ian@cygnus.com>
-
- * lexsup.c (parse_args): Cast fopen result to PTR before storing
- it in link_info.base_file. Fix indentation.
-
-Wed Jun 28 17:11:25 1995 Steve Chamberlain <sac@slash.cygnus.com>
-
- * ldmain.c (main): Always initialize PE info in link_info.
- * lexsup.c (OPTION_BASE_FILE): New option.
- (parse_args): Handle new option.
- * emulparams/armpe.sh: Output pei.
- * emultempl/i386pe.em: Add newline to end.
- * scripttempl/armpe.sc: Change output and quote the $s.
- * scripttempl/i386pe.sc: Change output and quote the $s.
-
-Thu Jun 22 19:55:41 1995 Ken Raeburn <raeburn@cujo.cygnus.com>
-
- Sun May 7 11:53:41 MDT 1995 Bryan Ford <baford@cs.utah.edu>
-
- * configure.in (i386-*-msdos*, i386-*-moss*): New targets.
- * Makefile.in (ALL_EMULATIONS): Added i386msdos.o.
- (i386msdos.o): New target.
- * config/i386-msdos.mt: Created.
- * emulparams/i386msdos.sh: Created.
- * scripttempl/i386msdos.sc: Created.
-
-Thu Jun 22 15:06:35 1995 Michael Meissner <meissner@tiktok.cygnus.com>
-
- * scripttempl/elfppc.sc (.fixup): Add support for a .fixup section
- that contains pointers to be relocated.
-
-Tue Jun 20 17:47:20 1995 Stan Shebs <shebs@andros.cygnus.com>
-
- * mpw-esh.c: New file, modified for MPW from esh.c.
- * scripttempl/sh.sc: Reformatted to simplify MPWification,
- use *() to concat stab sections instead of [].
-
-Thu Jun 15 08:48:16 1995 Steve Chamberlain <sac@slash.cygnus.com>
-
- * scripttempl/armpe.sc: Add constructor support.
-
-Tue Jun 13 09:11:20 1995 Steve Chamberlain <sac@slash.cygnus.com>
-
- * ldlang.c (lang_size_sections): Any section with a DATA
- statement has contents.
-
-Sun Jun 11 15:20:46 1995 Ken Raeburn <raeburn@cujo.cygnus.com>
-
- * emulparams/m68kelf.sh (NOP): Define.
- (DYNAMIC_LINK): Don't define.
- (TEXT_START_ADDR): Set to 0x80000000; the extra 0x100 for headers
- will come from the linker script.
-
-Thu Jun 8 14:17:33 1995 Steve Chamberlain <sac@slash.cygnus.com>
-
- * emulparams/armpe.sh, scripttempl/armpe.sc: Add end and stack.
-
-Mon Jun 5 02:16:24 1995 Ken Raeburn <raeburn@kr-laptop.cygnus.com>
-
- * configure.in (i[345]86-*-gnu*): Use GNU elf config.
-
-Thu May 25 11:49:28 1995 Michael Meissner <meissner@tiktok.cygnus.com>
-
- From Andrew Cagney <cagney@highland.com.au>
- * Makefile.in: Fixup more gotchas from renaming elf32ppcle to
- elf32lppc.
-
-Wed May 24 11:23:21 1995 Steve Chamberlain <sac@slash.cygnus.com>
-
- Add support for ARM-PE.
- * Makefile.in (ALL_EMULATIONS): Add armpe.o
- * configure.in: Recognize armpe.
- * config/arm-pe.mt: New file.
- * emulparams/armpe.sh: New file.
- * scripttempl/armpe.sc: New file.
-
-
-Mon May 22 15:19:26 1995 Doug Evans <dje@chestnut.cygnus.com>
-
- * configure.in (h8300h-*-hms): Deleted
- * config/cf-h8300h.mt: Deleted.
-
-Thu May 18 04:26:10 1995 Ken Raeburn <raeburn@kr-laptop.cygnus.com>
-
- Wed May 10 14:28:16 1995 Richard Earnshaw (rearnsha@armltd.co.uk)
-
- From David Taylor (dtaylor@armltd.co.uk)
- * Makefile.in (ALL_EMULATIONS): Add earmout[lb].o
- * configure.in: Recognize arm{,e[lb]-*-aout.
- * config/arm[lb]-aout.mt: New files.
- * emulparams/armaout[lb].sh: New files.
- * scripttempl/armaout.sc: New file.
-
-Tue May 16 18:27:11 1995 Michael Meissner <meissner@tiktok.cygnus.com>
-
- * config/ppcle-elf32.mt (EMUL): Use elf32lppc, not elf32ppcle, to
- be unique in 8 characters for DOS.
-
- * emulparams/elf32lppc.sh: New file, renamed from elf32ppcle.sh.
- * emulparams/elf32ppcle.sh: Deleted.
-
-Fri May 12 11:03:55 1995 Steve Chamberlain <sac@slash.cygnus.com>
- Tom Griest <griest@cs.yale.edu>
-
- Initial support for PE executables (eg NT, win32)
-
- * Makefile.in (configure.in, ei386pe): Add support.
- * ldmain.c (main): Initialize PE argument info.
- * ldwrite.c (print_file_stuff): Don't print out .drectve
- and .debug section info.
- * lexsup.c (set_subsystem, set_stack_heap, OPTION_HEAP,
- OPTION_SUBSYSTEM, parse_argsm set_subsystem, set_stack_heap):
- Handle new arguments.
- * config/i386-pe.mt, emultempl/i386pe.em, scripttempl/i386pe.sc:
- New files
-
-Wed May 10 18:37:59 1995 Stu Grossman (grossman@andros.cygnus.com)
-
- * scripttempl/hppaelf.sc: Remove .PARISC.unwind section from text
- segment. This allows ld -r to preserve unwind sections.
-
-Tue May 9 17:19:57 1995 Michael Meissner <meissner@tiktok.cygnus.com>
-
- * configure.in: Add little endian PowerPC support.
-
- * Makefile.in (ALL_EMULATIONS): Add eelf32ppcle.o.
- (eelf32ppcle.c): Support for little endian PowerPC.
-
- * config/ppcle-elf32.mt: New file for little endian PowerPC.
- * emulparams/elf32ppcle.sh: Ditto.
-
-Wed May 3 12:56:32 1995 Ken Raeburn <raeburn@cujo.cygnus.com>
-
- * ldlang.c (print_output_section_statement): Check
- subsection_alignment, instead of checking section_alignment twice.
- Noticed by Alan Modra <alan@spri.levels.unisa.edu.au>.
-
-Tue May 2 16:36:07 1995 Jeff Law (law@snake.cs.utah.edu)
-
- * configure.in (hppa*-*-lites*): Handle like hppa*-*-*elf*.
-
-Mon Apr 24 19:21:02 1995 Michael Meissner <meissner@cygnus.com>
-
- * ldwrite.c (ldwrite): Before doing anything, reset the error
- code. If bfd_final_link returns an error, but the error code is
- unset, don't issue an extra message. Assume a correct error
- message was already set.
-
-Fri Apr 14 16:31:24 1995 Ken Raeburn <raeburn@cujo.cygnus.com>
-
- * Makefile.in (ALL_EMULATIONS): Added em68kelf.o.
- (em68kelf.o): New target.
- * config/m68k-elf.mt, emulparams/m68kelf.sh: New files.
- * configure.in: Use them for m68*-*-elf.
-
-Tue Apr 11 12:02:03 1995 Stan Shebs <shebs@andros.cygnus.com>
-
- Merge in support for Mac MPW as a host.
- (Old change descriptions retained for informational value.)
-
- * mpw-config.in (i386-unknown-aout): Change to i386-unknown-go32.
- (i386-unknown-coff): Remove.
- (sh-hitachi-hms): New target.
- (emulation_ofiles): Set correctly for each target.
- (version, TDEFINES): Add to makefile fragment.
- * mpw-make.in (BISON): Use byacc instead of bison.
- (em_*.c): Replace with e*.c everywhere.
- (ldgram.h): Separate action from ldgram.c generation.
- (LD_PROG): Depend on Version.r.
- (Version.r): generate from version info.
- * mpw-emipsidt.c: New file, modified for MPW from emipsidt.c.
-
- * mpw-config.in (m68k-apple-macos, ppc-apple-macos,
- i386-unknown-aout, i386-unknown-coff): New targets.
- (m68k-aout, m68k-coff): Remove targets.
- (mk.tmp): Add definition of EMUL.
-
- * mpw-config.in (emulname): Set based on target.
- (ldemul-list.h): Construct.
- * mpw-make.in (install-only): New target.
- (install): Depend on install-only.
-
- * mpw-make.in (bindir): Fix pathname.
- (install): Move here from mpw-build.in.
-
- * mpw-config.in: New file, MPW configuration fragment.
- * mpw-make.in: New file, MPW makefile fragment.
- (This file is semi-automatically generated from Makefile.in.)
- * ldfile.c (slash): If MPW, set to `:'.
- * ldlex.l (TRUE_FALSE_ALREADY_DEFINED): If MPW, set this to
- prevent redefinition errors.
-
-Tue Apr 4 17:55:18 1995 Steve Chamberlain <sac@bang.hack.com>
-
- * ldwrite.c (clone_section): Align clone sections on even
- boundaries.
-
-Thu Mar 30 14:32:26 1995 H.J. Lu (hjl@nynexst.com)
-
- * configure.in: Change linux to default to elf. Using
- i[345]86-*-linuxaout will build a linker which defaults to a.out.
- * config/i386-laout.mt: Rename from old config/i386-linux.mt.
- * config/i386-linux.mt: Rename from old config/i386-lelf.mt.
- * config/i386-lelf.mt: Remove.
-
-Thu Mar 30 13:09:46 1995 Ian Lance Taylor <ian@cygnus.com>
-
- * ldmain.c (main): If opening the map file fails, call
- bfd_set_error before calling einfo.
-
- * ld.texinfo, ld.1: Document the -no-keep-memory option.
-
-Mon Mar 27 11:10:08 1995 Ian Lance Taylor <ian@cygnus.com>
-
- * ldmain.c (main): Revert patch of March 10, since the SVR4 linker
- does mark shared libraries as executable.
-
-Tue Mar 21 15:15:38 1995 Ian Lance Taylor <ian@cygnus.com>
-
- * ldlang.c (lang_common): Change power to int. Pass larger values
- before smaller values.
- (lang_one_common): Treat info as int *. Don't bother to check for
- last value, since it is now zero.
-
-Sat Mar 18 01:49:14 1995 Ian Lance Taylor <ian@cygnus.com>
-
- * ldlang.c (load_symbols): An empty archive is OK.
-
-Fri Mar 17 16:15:31 1995 Stan Shebs <shebs@andros.cygnus.com>
-
- * ldmain.c (progress.h): Include.
- (main): Call START_PROGRESS and END_PROGRESS.
-
-Thu Mar 16 17:17:33 1995 Michael Meissner <meissner@cygnus.com>
-
- * scripttempl/elfppc.sc: Move _GOT2_END_ after the .ctors and
- .dtors sections, so that these pointers get relocated also.
- Define the symbols __{C,D}TOR_{LIST,END}__ to mark the beginning
- and end of the constructors/destructors.
-
-Thu Mar 16 13:59:14 1995 Roland McGrath <roland@churchy.gnu.ai.mit.edu>
-
- * ldlang.c (load_symbols): If whole_archive is true and ENTRY
- describes an archive, call bfd_link_add_symbols on each member.
- * ldmain.c (whole_archive): New variable.
- (main): Initialize it to false.
- * ldmain.h: Declare whole_archive.
- * lexsup.c (parse_args): Grok --whole-archive switch.
- * ld.texinfo, ld.1: Document --whole-archive.
-
-Thu Mar 16 11:38:48 1995 Ian Lance Taylor <ian@cygnus.com>
-
- * genscripts.sh (EMULATION_NAME): Set LIB_PATH to empty when not
- using the default emulation.
-
- * config/dgux.mh (HOSTING_EMU): Use -m rather than trying to set
- LDEMULATION.
- * config/hppaelf.mh (HOSTING_EMU): Likewise.
-
-Tue Mar 14 12:28:03 1995 Ian Lance Taylor <ian@cygnus.com>
-
- * emultempl/sunos.em (gld${EMULATION_NAME}_find_so): Set force_maj
- for -lc.N. From H.J. Lu <hjl@nynexst.com>.
-
-Fri Mar 10 14:43:48 1995 Ian Lance Taylor <ian@cygnus.com>
-
- * ldmain.c (main): Don't set EXEC_P if link_info.shared is set.
-
- * ldlex.l: Return -lFILENAME as the token LNAME.
- * ldgram.y: Add token LNAME.
- (input_list): Treat LNAME like NAME, but pass it to
- lang_add_input_file as lang_input_file_is_l_enum.
- * ld.texinfo: Document using -lFILENAME in INPUT.
-
-Thu Mar 9 12:21:51 1995 Michael Meissner <meissner@tiktok.cygnus.com>
-
- * ldlang.c (lang_check): If the architectures are compatible call
- bfd_merge_private_bfd_data to let the backend do additional
- checks.
-
-Tue Mar 7 00:53:08 1995 Ian Lance Taylor <ian@cygnus.com>
-
- * ldemul.c (ldemul_choose_mode): If emulation not recognized, list
- all supported emulations.
-
-Mon Mar 6 14:03:50 1995 Ian Lance Taylor <ian@cygnus.com>
-
- * ldemul.c (ldemul_list_emulations): New function.
- * ldemul.h (ldemul_list_emulations): Declare.
- * ldver.c (help): List supported targets and emulations.
-
-Fri Mar 3 15:40:36 1995 Doug Evans <dje@canuck.cygnus.com>
-
- * scripttempl/elf.sc (.debug): Relocate to address 0.
- (.debug_srcinfo, .debug_aranges, .debug_pubnames,
- .debug_sfnames, .line): Likewise.
-
-Fri Mar 3 17:07:14 1995 Ian Lance Taylor <ian@cygnus.com>
-
- * emultempl/elf32.em (hold_rel): New static variable.
- (gld${EMULATION_NAME}_place_orphan): Place readonly sections with
- contents whose names begin with ".rel" after hold_rel. Remove the
- assertion which checked for unplaced .rel sections. Don't try to
- sort the section into place if place->bfd_section is NULL.
- (gld${EMULATION_NAME}_place_section): Set hold_rel to the first
- section beginning with ".rel".
-
-Thu Mar 2 14:34:43 1995 Ian Lance Taylor <ian@cygnus.com>
-
- Doc note from pierre@phi.la.tce.com (Pierre Willard):
- * ld.texinfo: -X and -x work even if -s or -S are not specified.
- * ld.1: Similar change.
-
-Wed Mar 1 13:51:16 1995 Ian Lance Taylor <ian@cygnus.com>
-
- * emulparams/gld960coff.sh (COFF_CTORS): Define.
- * scripttempl/i960.sc: Use COFF_CTORS if CONSTRUCTING.
-
-Tue Feb 28 12:42:56 1995 Ian Lance Taylor <ian@cygnus.com>
-
- * configure.in (i[345]86-*-linuxelf*): New target. Use i386-lelf.
- (i[345]86-*-gnuelf*): New target. Use i386-gelf.
- * config/i386-lelf.mt: New file.
- * config/i386-gelf.mt: New file.
-
-Tue Feb 28 10:27:54 1995 Rob Savoye <rob@darkstar.cygnus.com>
-
- * configure.in: Match on mips-ecoff, and default to the IDT
- configuration.
-
-Fri Feb 17 13:06:47 1995 Michael Meissner <meissner@cygnus.com>
-
- * scripttempl/elfppc.sc: Add support for .got1 and .got2 sections.
- Offset _GLOBAL_OFFSET_TABLE_ 32768 from the start of the GOT area
- to double the size of the table.
-
-Thu Feb 9 18:29:43 1995 Ken Raeburn <raeburn@cujo.cygnus.com>
-
- * Makefile.in (distclean): Do recursive deletion, since ldscripts
- is a directory.
-
-Thu Feb 9 11:38:22 1995 Ian Lance Taylor <ian@cygnus.com>
-
- * ldmain.c (main): If trace_file_tries is true, and we are using
- an internal linker script, print out the script.
- * ldfile.c (try_open): Reindent function. Make the messages about
- opening script files more informative.
-
- * lexsup.c (parse_args): For -V, call ldversion with 1, not 0.
- * ld.texinfo, ld.1: Update accordingly.
-
-Wed Feb 8 17:34:45 1995 Ian Lance Taylor <ian@cygnus.com>
-
- * ldlang.c (lang_one_common): Adjust references to common symbol
- information for new structure.
-
-Mon Feb 6 12:17:24 1995 Ian Lance Taylor <ian@cygnus.com>
-
- * ldmain.c (undefined_symbol): Handle section being NULL.
-
- * ldctor.c (ldctor_build_sets): Handle bfd_link_hash_defweak.
- * ldexp.c (fold_name): Likewise.
- * ldlang.c (print_one_symbol): Likewise.
- (lang_finish): Likewise.
- * ldmain.c (multiple_common): Likewise.
- * ldwrite.c (print_symbol): Likewise. Also, bfd_link_hash_weak
- renamed to bfd_link_hash_undefweak.
-
- * scripttempl/alpha.sc: Set address of .data section correctly
- when -n or -N is used. Patch from Chris G Demetriou
- <Chris_G_Demetriou@LAGAVULIN.PDL.CS.CMU.EDU>.
- * scripttempl/mips.sc: Similar change.
-
-Tue Jan 31 16:20:52 1995 Doug Evans <dje@canuck.cygnus.com>
-
- * ldlang.c (lang_size_sections): Clarify error message when user
- specified start addr conflicts with region. Fix resetting of
- region pointer.
-
-Tue Jan 31 12:37:09 1995 Ian Lance Taylor <ian@cygnus.com>
-
- * ldexp.c (fold_name): In case NAME, permit an absolute symbol
- in lang_allocating_phase_enum.
-
-Mon Jan 30 11:33:25 1995 Ian Lance Taylor <ian@cygnus.com>
-
- * Makefile.in (distclean): Depend upon clean. Don't bother to
- remove files which will be removed by clean. From patch by
- alan@SPRI.Levels.UniSA.Edu.Au (Alan Modra).
-
-Fri Jan 27 16:27:34 1995 Ian Lance Taylor <ian@cygnus.com>
-
- * emultempl/elf32.em (gld${EMULATION_NAME}_before_allocation): For
- a MIPS target, clobber the size of all but the first input
- .reginfo section to be 0, so that lang_size_sections sets the
- correct size for the output .reginfo section.
-
-Thu Jan 26 19:53:37 1995 Ian Lance Taylor <ian@cygnus.com>
-
- * emultempl/elf32.em (gld${EMULATION_NAME}_before_allocation):
- Remove unused variable is.
-
-Thu Jan 26 12:33:05 1995 Michael Meissner <meissner@tiktok.cygnus.com>
-
- * configure.in: Add support for powerpc-*-eabi.
-
- * scripttempl/elfppc.sc: New file for PowerPC embedded ABI
- support.
-
- * emulparams/elf32ppc.sh (SCRIPT_NAME): Use elfppc.sc instead of
- elf.sc, which defines some new symbols PowerPC elf needs.
-
-Tue Jan 24 10:32:15 1995 Ian Lance Taylor <ian@sanguine.cygnus.com>
-
- * ldctor.c (ldctor_add_set_entry): Don't dump core if a
- constructor entry is in the absolute section.
-
-Mon Jan 23 13:58:13 1995 Ian Lance Taylor <ian@sanguine.cygnus.com>
-
- * configure.in (i[345]86-*-gnu*): Set ld_target to i386-gnu.
- * config/i386-gnu.mt: New file. Include ELF support.
-
-Thu Jan 19 16:22:11 1995 Ian Lance Taylor <ian@sanguine.cygnus.com>
-
- * emultempl/elf32.em (gld${EMULATION_NAME}_before_allocation): If
- there are any input sections named .gnu.warning, treat them as
- containing a warning message to be printed by the linker, and
- clobber the size so that the message is not copied into the output
- file.
- * scripttempl/elf.sc: Put .gnu.warning sections into the .text
- section.
-
-Sun Jan 15 16:45:00 1995 Steve Chamberlain <sac@splat>
-
- * configure.in (w65-*-*): New target.
- * Makefile.in: Update.
- * scripttempl/w65.sc: New.
- * config/coff-w65.mt: New.
-
-Thu Jan 12 01:32:25 1995 Ian Lance Taylor <ian@tweedledumb.cygnus.com>
-
- * ldlang.c (lang_place_orphans): Don't ignore files with
- just_syms_flag set. Instead, put all their sections in
- bfd_abs_section_ptr, using the section VMA as the output_offset.
-
-Wed Jan 11 22:59:09 1995 Ken Raeburn <raeburn@cujo.cygnus.com>
-
- * ldctor.c (ldctor_build_sets): Don't use `const' with typedef
- name `reloc_howto_type', since it's now defined to be const.
- * ldlang.c (lang_add_reloc): Ditto.
- * ldlang.h (lang_reloc_statement_type, lang_add_reloc): Ditto.
-
-Wed Jan 11 11:24:45 1995 Ian Lance Taylor <ian@sanguine.cygnus.com>
-
- * ldexp.c (fold_binary): Adding or subtracting an absolute value
- to a relative value does not require forcing the relative value to
- be absolute. Also, reindent function.
-
-Wed Dec 28 22:05:52 1994 Steve Chamberlain (sac@jonny.cygnus.com)
-
- * ldwrite.c (clone_section): Create a symbol with the
- same name as the section.
-
-Mon Dec 19 14:02:13 1994 Steve Chamberlain (sac@jonny.cygnus.com)
-
- * ld.h (split_by_reloc, split_by_file): New flags.
- * ldwrite.c (clone_section, split_sections): New functions.
- * lexsup.c (parse_args): Understand new split options.
-
-Fri Dec 9 17:22:55 1994 Ian Lance Taylor <ian@sanguine.cygnus.com>
-
- * scripttempl/elf.sc: Move .ctors and .dtors from .text segment to
- .data segment. They must be writable when creating a shared
- library. From H.J. Lu <hjl@nynexst.com>.
-
-Fri Dec 2 14:09:00 1994 Ian Lance Taylor <ian@rtl.cygnus.com>
-
- * emultempl/miposecoff.em: New file.
- * emulparams/mipsidt.sh (TEMPLATE_NAME): Set to mipsecoff.
- * emulparams/mipsidtl.sh (TEMPLATE_NAME): Likewise.
- * scripttempl/mips.sc: Put .rel.sdata sections in .text, and
- provide __runtime_reloc_start and __runtime_reloc_stop if they are
- used. Align _fdata to a 16 byte boundary.
- * Makefile.in (emipsidt.c): Depend upon mipsecoff.em rather than
- generic.em.
- (emipsidtl.c): Likewise.
- (check): Pass CC_FOR_HOST and CFLAGS_FOR_HOST to runtest.
-
- * ld.h (args_type): Add new field embedded_relocs.
- * ldemul.h (ldemul_after_open, after_open_default): Declare.
- (ld_emulation_xfer_struct): Add new field after_open.
- * ldemul.c (ldemul_after_open): New function.
- (after_open_default): New function.
- * ldlang.c (lang_process): Call ldemul_after_open.
- * lexsup.c (parse_args): Handle --embedded-relocs.
- * emultempl/elf32.em (ld_${EMULATION_NAME}_emulation): Initialize
- new after_open field to after_open_default.
- * emultempl/generic.em, emultempl/gld960.em: Likewise.
- * emultempl/gld960c.em, emultempl/hppaelf.em: Likewise.
- * emultempl/linux.em, emultempl/m88kbcs.em: Likewise.
- * emultempl/sunos.em, emultempl/vanilla.em: Likewise.
- * ld.texinfo, ld.1: Mention -embedded-relocs.
-
-Wed Nov 23 22:04:47 1994 Steve Chamberlain (sac@jonny.cygnus.com)
-
- * Makefile.in: Add eshl.o.
- * config/coff-sh.mt: Add shl emulation.
-
-Tue Nov 22 11:55:37 1994 Ian Lance Taylor <ian@sanguine.cygnus.com>
-
- * scripttempl/elf.sc: Fill .text section with NOPS. From Eric
- Youngdale <eric@aib.com>.
-
-Thu Nov 17 14:39:48 1994 Ian Lance Taylor <ian@sanguine.cygnus.com>
-
- Patches from pirker@eiunix.tuwien.ac.at (Martin Pirker).
- * config/i386linux.mh: New file; set HOSTING_CRT0.
- * genscripts.sh: Don't put ${libdir} in LIB_PATH if it is
- /usr/lib, since that is already in LIB_PATH.
-
-Wed Nov 16 10:03:03 1994 Jeff Law (law@snake.cs.utah.edu)
-
- * scripttempl/hppaelf.sc (.text): Handle a use rdefined text start
- address.
- (.data, .bss): If "-N", then place the data/bss just after the end
- of the .text section rather than at the default 0x40000000.
-
- * scripttempl/hppaelf.sc (.text): Place unwind descriptors in the
- text segment.
-
-Sat Nov 12 15:55:56 1994 Ian Lance Taylor (ian@tweedledumb.cygnus.com)
-
- Patches from Eric Youngdale <eric@aib.com>:
- * ldlang.c (lang_finish): Don't warn if entry symbol not found
- when generating a shared library.
- * emultempl/elf32.em (gld${EMULATION_NAME}_place_orphan): Warn if
- attempting to place an orphaned relocation section when generating
- a dynamically linked object.
-
- * scripttempl/elf.sc: Add ENTRY(${ENTRY}), and default ${ENTRY} to
- _start.
-
-Fri Nov 11 14:27:23 1994 Ian Lance Taylor <ian@sanguine.cygnus.com>
-
- * ld.h (args_type): Add field export_dynamic.
- * lexsup.c (parse_args): Recognize --export-dynamic.
- * emultempl/elf32.em (gld${EMULATION_NAME}_before_allocation):
- Pass export_dynamic argument to bfd_elf32_size_dynamic_sections.
-
-Wed Nov 9 12:47:11 1994 Ian Lance Taylor <ian@sanguine.cygnus.com>
-
- * ldlang.c (lang_one_common): Set SEC_ALLOC in any section where
- we allocate common symbols.
-
-Tue Nov 8 17:50:43 1994 Eric Youngdale (eric@aib.com)
-
- * scripttempl/elf.sc: Add .rel.init, .rela.init, .rel.fini, and
- .rela.fini to the list of .rel* sections.
-
-Tue Nov 8 17:47:45 1994 Ian Lance Taylor <ian@sanguine.cygnus.com>
-
- * ldlang.c (load_symbols): Add new argument place. Only accept
- linker scripts if place is not NULL. Put commands found in an
- assumed linker script into place.
- (lookup_name): Pass NULL as place argument to load_symbols.
- (open_input_bfds): In lang_input_statement_enum case, pass a place
- argument to load_symbols, and store any new statements after the
- current one.
-
-Mon Nov 7 15:53:02 1994 Ken Raeburn <raeburn@cujo.cygnus.com>
-
- * ldver.c (ldversion): Bump to 2.5.3.
-
-Fri Nov 4 15:11:26 1994 Ken Raeburn <raeburn@cujo.cygnus.com>
-
- * Makefile.in (e*nbsd.c): Fix typo in dependencies.
-
-Thu Nov 3 19:35:44 1994 Ken Raeburn <raeburn@cujo.cygnus.com>
-
- * Makefile.in (check): Add missing "else true" clause.
-
- * emulparams/vax.sh (OUTPUT_FORMAT): Use "a.out".
-
- * scripttempl/go32coff.sc: Changes from DJ Delorie: Change default
- entry point to "start". Align at end of each section to 0x200.
- Start .text section 0x1000 later. Add _etext, _edata, _end
- symbols.
-
-Wed Nov 2 12:17:49 1994 Ian Lance Taylor <ian@sanguine.cygnus.com>
-
- * ldctor.c (ldctor_add_set_entry): Don't permit a set to be
- composed of different object file formats.
- (ldctor_build_sets): If the output format does not support the
- reloc, and we are not generating a relocateable link, try getting
- the reloc from the input format.
-
-Tue Nov 1 10:30:19 1994 J.T. Conklin (jtc@rtl.cygnus.com)
-
- * Makefile.in (ALL_EMULATIONS): Added em68knbsd.o.
- (em68knbsd.c): New target.
-
- * config/m68k-nbsd.mt: New file.
- * emulparams/m68knbsd.sh: New file.
- * configure.in (m68*-*-netbsd*): Use above configs.
-
-Mon Oct 31 19:35:17 1994 Ian Lance Taylor <ian@sanguine.cygnus.com>
-
- * emultempl/sunos.em (gld${EMULATION_NAME}_find_so): If we find an
- appropriately named static library, stop the search at that
- directory.
-
-Wed Oct 26 13:59:12 1994 J.T. Conklin (jtc@phishhead.cygnus.com)
-
- * Makefile.in (ALL_EMULATIONS): Added ei386nbsd.o, ens32knbsd.o
- and esparcnbsd.o; sorted entries.
- (ei386nbsd.c,ens32knbsd.c,esparcnbsd.c): New targets.
-
- * config/netbsd532.mt: Removed.
- * emulparams/netbsd532.sh: Removed.
-
- * config/{i386-nbsd.mt,ns32k-nbsd.mt,sparc-nbsd.mt}: New files.
- * emulparams/{i386nbsd.sh,ns32knbsd.sh,sparcnbsd.sh}: New files.
- * configure.in (i[345]86-*-netbsd*, ns32k-pc532-netbsd*,
- sparc*-*-netbsd*): Use above configs.
-
-Tue Oct 25 11:47:10 1994 Ian Lance Taylor <ian@sanguine.cygnus.com>
-
- * ldmain.c (multiple_common): One of the types may now be
- bfd_link_hash_indirect. The old BFD argument may be NULL.
-
-Thu Oct 20 22:01:39 1994 Ian Lance Taylor (ian@tweedledumb.cygnus.com)
-
- * configure.in: Add * at the end of m68k-hp-hpux.
-
-Tue Oct 18 15:58:39 1994 Ian Lance Taylor <ian@sanguine.cygnus.com>
-
- * ldlex.l: Cast assignment to yy_ch_buf field to char *, not to
- YY_CHAR *.
-
-Mon Oct 17 14:53:16 1994 J.T. Conklin (jtc@phishhead.cygnus.com)
-
- * scripttempl/nw.sc: Gather constructors and destructors and
- define __CTOR__LIST__ and __DTOR_LIST__ appropriately.
-
-Fri Oct 14 14:35:38 1994 J.T. Conklin (jtc@rtl.cygnus.com)
-
- * Makefile.in (ALL_EMULATIONS): Add ei386nw.o and eppcnw.o.
- (ei386nw.c, eppcnw.c): New targets.
-
- * config/{i386,ppc}-nw.mt, emulparams/{i386,ppc}nw.sh,
- scripttempl/nw.sc: New files, for i386 and powerpc netware.
-
- * configure.in: Changed netware ld_target name to be {i386,ppc}-nw
- instead of {i386,ppc}-elf.
-
- * configure.in (sparc*-*-netware): Removed. There is no such
- thing anymore.
-
- * ldint.texinfo: Move misplaced `@end iftex'.
-
-Fri Oct 14 12:02:18 1994 Eric Youngdale (eric@aib.com)
-
- * scripttempl/elf.sc: Add .rel.ctors, .rela.ctors, .rel.dtors, and
- .rela.dtors to the list of .rel* sections.
-
-Thu Oct 13 14:16:27 1994 Ken Raeburn <raeburn@cujo.cygnus.com>
-
- * ldver.c (ldversion): Update to version 2.5.
- * Version 2.5 released.
-
- * configure.in (all_targets): Handle i386-linux*.
-
-Thu Oct 13 11:24:33 1994 Ian Lance Taylor <ian@sanguine.cygnus.com>
-
- * scripttempl/aout.sc: Set _etext and __etext to ., not
- ${DATA_ALIGNMENT}. This is compatible with SunOS, and, with luck,
- will not break any other system. From Eric Valette
- <ev@chorus.fr>.
-
-Wed Oct 12 16:22:58 1994 Ian Lance Taylor <ian@sanguine.cygnus.com>
-
- * lexsup.c (parse_args): Change -V to be a synonym for -v. Add
- --verbose to get the old -V behaviour.
- * ld.1, ld.texinfo: Document this change.
-
-Tue Sep 27 14:56:20 1994 Ian Lance Taylor (ian@sanguine.cygnus.com)
-
- * emultempl/elf32.em (gld${EMULATION_NAME}_place_orphan): Remove
- assertion, since it could fail with a user defined linker script.
-
- * ldexp.c (fold_name): For DEFINED case, don't try to look up the
- name in the hash table during the first phase--the hash table does
- not even exist at that point, much less have the right value.
-
- * Makefile.in (CC): Define.
- (CXX): Move definition, change from g++ to gcc.
- (EXPECT, RUNTEST): Copy definitions from top level Makefile.in.
- (RUNTEST_CC, RUNTEST_CFLAGS): Remove.
- (RUNTEST_CXX, RUNTEST_CXXFLAGS): Remove.
- (CC_FOR_TARGET, CXX_FOR_TARGET): Copy from top level Makefile.in.
- (.cc.o): Comment out.
- (testdir): Remove.
- (site.exp): Don't create testdir or set tmpdir.
- (check): Run checks even if not running native. Use CC_FOR_TARGET
- instead of RUNTEST_CC, and likewise for CXX.
- (cdtest targets): Comment out.
- * config/solaris2.mh (HOSTING_LIBS): Only mention crtend.o once.
- * testsuite/ld-cdtest/cdtest-bar.cc,
- testsuite/ld-cdtest/cdtest-foo.cc,
- testsuite/ld-cdtest/cdtest-foo.h,
- testsuite/ld-cdtest/cdtest-main.cc,
- testsuite/ld-cdtest/cdtest.exp: Remove.
-
-Mon Sep 26 11:40:30 1994 Ian Lance Taylor (ian@sanguine.cygnus.com)
-
- * emulparams/elf32bmip.sh: Rename from elf32mipb.sh to avoid DOS
- file naming problems.
- * emulparams/elf32lmip.sh: Rename from elf32mipl.sh.
- * Makefile.in (ALL_EMULATIONS): Rename eelf32mipb.o to
- eelf32bmip.o and eelf32mipl.o to eelf32lmip.o.
- (eelf32bmip.c): Rename from eelf32mipb.c. Use elf32bmip.sh.
- (eelf32lmip.c): Rename from eelf32mipl.c. Use elf32lmip.sh.
- * config/mipsb-elf32.mt (EMUL): Use elf32bmip, not elf32mipb.
- * config/mipsl-elf32.mt (EMUL): Use elf32lmip, not elf32mipl.
-
- * genscripts.sh: Always search /usr/local/TARGET/lib.
-
- * scripttempl/elf.sc: If -N is set, force DATA_ADDR to be ".".
-
-Fri Sep 23 15:05:49 1994 Ken Raeburn <raeburn@cujo.cygnus.com>
-
- * configure.in: Handle i386-bsdi* targets like i386-bsd.
-
-Fri Sep 23 00:06:59 1994 Ian Lance Taylor (ian@tweedledumb.cygnus.com)
-
- * lexsup.c (parse_args): Add support for -a for HP/UX
- compatibility.
-
- * lexsup.c (parse_args): -c takes an argument.
-
-Tue Sep 20 14:35:27 1994 Ian Lance Taylor (ian@sanguine.cygnus.com)
-
- * ld.h (args_type): Add new field endian.
- * lexsup.c (parse_args): Handle -EB and -EL by setting
- command_line.endian.
- * ldgram.y (ifile_p1): Accept OUTPUT_FORMAT with three arguments.
- * ldlang.c (lang_add_output_format): Add arguments big and little.
- If command_line.endian is set, use it to select big or little
- rather than the default. Changed all callers.
- * ldlang.h (lang_add_output_format): Update declaration.
- * emulparams/elf32mipb.sh: Define BIG_OUTPUT_FORMAT and
- LITTLE_OUTPUT_FORMAT.
- * emulparams/elf32mipl.sh: Likewise.
- * emulparams/mipsbig.sh: Likewise.
- * emulparams/mipsbsd.sh: Likewise.
- * emulparams/mipsidt.sh: Likewise.
- * emulparams/mipsidtl.sh: Likewise.
- * emulparams/mipslit.sh: Likewise.
- * scripttempl/elf.sc: Define BIG_OUTPUT_FORMAT and
- LITTLE_OUTPUT_FORMAT if not already defined. Pass them to
- OUTPUT_FORMAT.
- * scripttempl/mips.sc: Pass BIG_OUTPUT_FORMAT and
- LITTLE_OUTPUT_FORMAT to OUTPUT_FORMAT.
- * scripttempl/mipsbsd.sc: Likewise.
-
- * Makefile.in (ldgram.h): Make separate target from ldgram.c,
- depending upon ldgram.c, so that a parallel make does not try to
- build both at once.
-
- * configure.in (mips*el-elf*): New target.
- * Makefile.in (ALL_EMULATIONS): Add eelf32mipb.o and eelf32mipl.o.
- (eelf32mipl.c): New target.
-
- * config/mipsl-elf32.mt: New file.
- * emulparams/elf32mipl.sh: New file.
-
-Fri Sep 16 12:16:20 1994 Ian Lance Taylor (ian@sanguine.cygnus.com)
-
- * ldmain.c (main): Rather than prohibiting ld -r -s, treat it as
- ld -r -S -x.
-
-Thu Sep 15 13:05:44 1994 Ian Lance Taylor (ian@sanguine.cygnus.com)
-
- * ldmisc.c (vfinfo): Print BFD file name as well as file name
- returned by find_nearest_line, in case the file name is something
- unhelpful such as a .h file. Handle %u.
-
-Wed Sep 14 12:49:12 1994 Steve Chamberlain (sac@jonny.cygnus.com)
-
- * ldlang.c (lang_do_assignments): Make sure output statement
- has an attached bfd_section before trying to dereference it.
-
-Wed Sep 14 12:48:09 1994 Ian Lance Taylor (ian@sanguine.cygnus.com)
-
- * ld.h (ld_config_type): Add new field warn_once.
- * ldmain.c (undefined_symbol): Handle -warn-once.
- * lexsup.c (parse_args): Recognize -warn-once.
- * ld.texinfo (Options): Document -warn-once.
- * ld.1: Likewise.
-
- * ldmisc.c (vfinfo): Handle %D as %C, but never print the function
- name. For %C, print the function name on a separate line, to keep
- the length of error messages under control.
- * ldmain.c (multiple_definition): Use %D for ``first defined
- here.''
- (undefined_symbol): Use %D for ``more undefined references
- follow''.
-
- * ldmisc.c (multiple_warn): Remove; no longer used.
- * ldmisc.h (multiple_warn): Don't declare.
-
-Tue Sep 13 20:47:58 1994 Steve Chamberlain (sac@jonny.cygnus.com)
-
- * ldlang.c (print_output_section_statement): Print all lines
- to the map file.
-
-Tue Sep 13 16:30:11 1994 Ian Lance Taylor (ian@sanguine.cygnus.com)
-
- * ldlang.c (load_symbols): Check for archive before object. Use
- bfd_check_format_matches, and, if ambiguous, print a list of
- matching formats. If file format is not recognized, treat file as
- a linker script.
- * ldgram.y (yyerror): If assuming an object file is a script,
- mention that. Tweak the format of the error messages.
- * ldlex.l (lex_warn_invalid): If assuming an object is a script,
- guess that this is not actually a script, and just report that the
- file format was not recognized.
- * ld.texinfo (Options): Admit that -( may be used more than once.
- Add note that unrecognized object files are now treated as linker
- scripts.
-
- * ldfile.c (ldfile_input_filename): Make const.
- (ldfile_assumed_script): New variable.
- (try_open): Change arguments types to const.
- (ldfile_find_command_file): Likewise.
- (ldfile_open_command_file): Likewise. Also, set lineno to 1.
- * ldfile.h: Update declarations for ldfile.c changes.
- * ldlex.l: Include <ctype.h>.
- (file_name_stack): Change to be const char *.
- (lineno_stack): New static variable.
- (<<EOF>>): Set lineno as well as ldfile_input_filename.
- (lex_push_file): Make name argument const. Initialize
- lineno_stack entry.
- (lex_redirect): Initialize lineno_stack entry.
- (lex_warn_invalid): Handle non printable characters nicely.
- * ldlex.h (lex_push_file): Declare second argument as const.
-
- * ldgram.y (ifile_p1): Recognize GROUP.
- * ldlex.l: Recognize GROUP.
- * ld.texinfo (Option Commands): Document GROUP.
-
-Mon Sep 12 17:04:27 1994 Ian Lance Taylor (ian@sanguine.cygnus.com)
-
- * config/m68klynx.mh: New file.
-
-Mon Sep 12 01:50:03 1994 Jeff Law (law@snake.cs.utah.edu)
-
- * emultempl/hppaelf.em: Add newlines to the error messages.
-
-Sat Sep 10 16:05:38 1994 Ian Lance Taylor (ian@tweedledumb.cygnus.com)
-
- * config/i386lynx.mh: New file.
- * scripttempl/i386lynx.sc: Don't put .ctors and .dtors in .text
- unless CONSTRUCTING.
-
-Thu Sep 8 13:25:24 1994 Ian Lance Taylor (ian@sanguine.cygnus.com)
-
- * emulparams/elf32mipb.sh (TEMPLATE_NAME): Define as elf32.
- (GENERATE_SHLIB_SCRIPT): Define as yes.
- (DYNAMIC_LINK): Define as false.
- * emultempl/elf32.em (gld${EMULATION_NAME}_before_parse):
- Initialize config.dynamic_link to DYNAMIC_LINK if it is defined.
- (gld${EMULATION_NAME}_place_orphan): Reset stat_ptr at end.
- * Makefile.in (eelf32mipb.c): Depend upon elf32.em rather than
- generic.em.
-
-Thu Sep 8 16:30:37 1994 Steve Chamberlain (sac@jonny.cygnus.com)
-
- * scripttempl/h8500b.sc: Put rdata stuff into own segment.
-
-Thu Sep 8 13:25:24 1994 Ian Lance Taylor (ian@sanguine.cygnus.com)
-
- * emulparams/elf32ppc.sh (OTHER_READWRITE_SECTIONS): Don't define;
- .got section is now explicitly handled in elf.sc.
-
-Wed Sep 7 13:08:34 1994 Ian Lance Taylor (ian@sanguine.cygnus.com)
-
- * scripttempl/alpha.sc: Redo script to set . outside of sections
- and not bother to explicitly specify section addresses.
- Explicitly place .sdata section.
-
-Tue Sep 6 23:51:45 1994 Ian Lance Taylor (ian@tweedledumb.cygnus.com)
-
- * scripttempl/m68kcoff.sc: Put .bss in data segment.
-
- * scripttempl/h8300.sc: Change .stab and .stabstr to use a VMA of
- 0, and to only be marked as NOLOAD if relocating.
- * scripttempl/h8500.sc, scripttempl/h8500b.sc: Likewise.
- * scripttempl/h8500c.sc, scripttempl/h8500m.sc: Likewise.
- * scripttempl/h8500s.sc, scripttempl/i386coff.sc: Likewise.
- * scripttempl/i386go32.sc, scripttempl/i386lynx.sc: Likewise.
- * scripttempl/m68kcoff.sc, scripttempl/m68klynx.sc: Likewise.
- * scripttempl/sh.sc, scripttempl/sparccoff.sc: Likewise.
- * scripttempl/sparclynx.sc: Likewise.
-
-Sun Sep 04 17:58:10 1994 Richard Earnshaw (rwe@pegasus.esprit.ec.org)
-
- * Makefile.in, configure.in: Add support (disabled) the ARM/RISCiX.
- * config/riscix.mt, emulparams/riscix.sh, scripttempl/riscix.sc:
- New files.
-
-Tue Aug 30 11:48:08 1994 Eric Youngdale (ericy@cais.cais.com)
-
- * ld.h (args_type): Add field soname.
- * lexsup.c (parse_args): Handle -soname argument.
- * emultempl/elf32.em: In call to bfd_elf32_size_dynamic_sections,
- pass soname.
- * ld.texinfo: Document -soname.
-
-Mon Aug 29 15:21:50 1994 Ian Lance Taylor (ian@sanguine.cygnus.com)
-
- * ldlang.c (lang_check): Don't try to set the architecture if the
- input and output files are incompatible. Just warn.
-
-Wed Aug 24 12:52:30 1994 Ian Lance Taylor (ian@sanguine.cygnus.com)
-
- * configure.in: Change i[34]86 to i[345]86.
-
-Sun Aug 21 16:17:19 1994 Ian Lance Taylor (ian@tweedledumb.cygnus.com)
-
- * emulparams/hp3hpux.sh: Define __DYNAMIC to be 0.
-
-Thu Aug 18 15:37:45 1994 Ian Lance Taylor (ian@sanguine.cygnus.com)
-
- Make the ELF linker handle orphaned sections reasonably. Also,
- define __start_SECNAME and __stop_SECNAME around sections whose
- names can be represented in C, for the benefit of symbol sets in
- glibc.
- * ldemul.h (ldemul_place_orphan): Declare.
- (ld_emulation_xfer_type): Add place_orphan field.
- * ldemul.c (ldemul_place_orphan): New function.
- * ldlang.h (wild_doit): Declare.
- * ldlang.c (wild_doit): Make nonstatic.
- (lang_place_orphans): Call ldemul_place_orphan.
- * emultempl/elf32.em: Include <ctype.h> and "ldgram.h".
- (hold_section, hold_use, hold_text, hold_data, hold_bss): New
- static variables.
- (gld${EMULATION_NAME}_place_orphan): New static function.
- (gld${EMULATION_NAME}_place_section): New static function.
- (ld_${EMULATION_NAME}_emulation): Initialize place_orphan field.
-
-Tue Aug 16 00:17:20 1994 Eric Youngdale (ericy@cais.cais.com)
-
- * scripttempl/aout.sc: Add .linux-dynamic after .data.
-
-Tue Aug 16 00:08:22 1994 Ian Lance Taylor (ian@tweedledumb.cygnus.com)
-
- * lexsup.c (parse_args) Treat --dll-verbose as --version, for
- Linux compatibility. From hjl@nynexst.com (H.J. Lu).
-
-Mon Aug 15 17:17:33 1994 Ian Lance Taylor (ian@sanguine.cygnus.com)
-
- * ldexp.h (exp_get_abs_int): Declare.
-
-Sat Aug 6 01:45:39 1994 Steve Chamberlain (sac@jonny.cygnus.com)
-
- * ldlang.c (lang_do_assignments): Handle complex AT's better.
- * ldexp.c (exp_get_abs_int): New function.
-
-Fri Aug 5 20:55:55 1994 Jason Molenda (crash@phydeaux.cygnus.com)
-
- * configure.in: add i960-nindy-coff support.
-
-Thu Aug 4 14:45:50 1994 Ian Lance Taylor (ian@sanguine.cygnus.com)
-
- * ldlex.l (yy_create_string_buffer): Handle change to internal
- interface in flex 2.4.7.
-
-Tue Aug 2 11:52:06 1994 Eric Youngdale (ericy@cais.cais.com)
-
- * emultempl/linux.em (gld${EMULATION_NAME}_find_address_statement):
- New function; add 0x20 to any use of -Ttext.
- (gld${EMULATION_NAME}_create_output_section_statements): New
- function.
- (ld_${EMULATION_NAME}_emulation): Use the new function
- gld${EMULATION_NAME}_create_output_section_statements.
-
-Mon Aug 1 15:50:44 1994 Ian Lance Taylor (ian@sanguine.cygnus.com)
-
- * scripttempl/mips.sc: Redo script to set . outside of sections
- and not bother to explicitly specify section addresses.
-
-Tue Jul 26 11:02:35 1994 Ian Lance Taylor (ian@sanguine.cygnus.com)
-
- * scripttempl/elf.sc: Copy several more relocation sections into
- the output. Put .got.plt sections into .got.
-
-Fri Jul 22 12:15:36 1994 Ian Lance Taylor (ian@sanguine.cygnus.com)
-
- * scripttempl/elf.sc: Use PROVIDE to define etext, edata, and end.
-
- Add a new script operator, PROVIDE, to define a symbol only if it
- is needed.
- * ldgram.y (PROVIDE): New token.
- (assignment): Accept PROVIDE.
- * ldlex.l (PROVIDE): New token.
- * ldexp.h (node_type): Add etree_provide to node_class enum.
- (exp_provide): Declare.
- * ldexp.c (exp_fold_tree): Handle etree_provide.
- (exp_provide): New function.
- (exp_print_tree): Handle etree_provide.
- * ld.texinfo: Document PROVIDE.
-
- * ldlang.c (lang_common): Pass desired alignment to
- lang_one_common as power of two.
- (lang_one_common): Get common symbol alignment from linker hash
- table entry. Treat desired alignment as a power of two.
-
- * ldlang.c (wild_section): Attach all section with the given name,
- not just the first one. If there is no name, attach all sections
- even if the SEC_IS_COMMON flag is set.
-
-Wed Jul 20 15:49:27 1994 Ian Lance Taylor (ian@sanguine.cygnus.com)
-
- * ld.h (args_type): Add field rpath.
- * lexsup.c (S_ISDIR): Define if not already defined.
- (parse_args): Add support for -rpath. If -R is used to name a
- directory, treat it as -rpath for Solaris compatibility.
- * emultempl/elf32.em (gld${EMULATION_NAME}_before_allocation):
- Pass command_line.rpath to bfd_elf32_size_dynamic_sections.
- * ldmain.c (main): Initialize command_line.rpath to NULL.
- * ld.texinfo: Document -rpath option.
-
-Sun Jul 10 00:33:24 1994 Ian Dall (dall@hfrd.dsto.gov.au)
-
- * emulparams/pc532machaout.sh: New file. Pc532 mach script
- parameters.
-
- * emulparams/netbsd532.sh: New file. Netbsd 532 script parameters.
-
- * config/pc532mach.mt: New file. Pc532 mach target support.
-
- * config/pc532mach.mh: New file. Pc532 mach host support.
-
- * config/netbsd532.mt: New file. Netbsd 532 target support.
-
- * configure.in: Add ns32k-pc532-mach and ns32k-pc532-netbsd support.
-
- * Makefile.in: Add epcmachaout.c dependency and enetbsd532.c
- dependency.
-
-Fri Jul 8 10:57:02 1994 Ian Lance Taylor (ian@sanguine.cygnus.com)
-
- * emultempl/sunos.em (gld${EMULATION_NAME}_before_allocation): Use
- bfd_abs_section_ptr, not &bfd_abs_section.
-
- * lexsup.c (parse_args): Changed "retain-symbols-file" from
- no_argument to required_argument. From djm.
-
-Thu Jul 7 12:29:53 1994 Ian Lance Taylor (ian@sanguine.cygnus.com)
-
- * scripttempl/elf.sc: Explicitly mention .stab and .stabstr
- sections to force a VMA of 0; needed for ELF backends which have
- not been converted to the new linker style.
-
-Mon Jul 4 19:35:45 1994 Jeff Law (law@snake.cs.utah.edu)
-
- * scripttempl/hppaelf.sc (__stack_zero): Don't define this name,
- it was for the HPUX dynamic loader's use and it creates problems
- with ELF GDB.
-
-Fri Jul 1 12:53:47 1994 Jeff Law (law@snake.cs.utah.edu)
-
- * ldlang.c (lang_do_assignments): No longer static. Delete decl.
- * ldlang.h (lang_do_assignments): Put external decl here.
- * emultempl/hppaelf.em: Minor cleanups throughout file.
- (hppa_elf_create_output_section_statements): Rewrite.
- (hppaelf_finish): Rewrite.
-
-Wed Jun 29 16:50:00 1994 Ian Lance Taylor (ian@sanguine.cygnus.com)
-
- * config/solaris2.mh (NATIVE_LIB_DIRS): Define as /usr/ccs/lib.
-
- * lexsup.c (parse_args): Accept -Bstatic and -Bdynamic. Do not
- accept plain -B.
- * ld.texinfo: -Bstatic is not ignored.
-
-Tue Jun 28 12:13:34 1994 Stan Shebs (shebs@andros.cygnus.com)
-
- * ldlex.l: Recognize \r the same as \n.
-
-Thu Jun 23 17:53:04 1994 Ian Lance Taylor (ian@sanguine.cygnus.com)
-
- Preliminary support for generating shared libraries, from Eric
- Youngdale <ericy@cais.cais.com>.
- * genscripts.sh: If the emulation parameter file sets
- GENERATE_SHLIB_SCRIPT, generate a .xs script file with
- CREATE_SHLIB defined.
- * emultempl/elf32.em (gld${EMULATION_NAME}_get_script): If
- link_info.shared is set, use the .xs script file.
- * scripttempl/elf.sc: If CREATE_SHLIB is set, don't create a
- .interp section, and don't include TEXT_START_ADDR in the starting
- address of the first section.
- * emulparams/elf_i386.sh (GENERATE_SHLIB_SCRIPT): Likewise.
- * emulparams/elf32_sparc.sh (GENERATE_SHLIB_SCRIPT): Define.
-
-Thu Jun 23 12:52:22 1994 David J. Mackenzie (djm@rtl.cygnus.com)
-
- * configure.in: Change --with-targets to --enable-targets.
-
-Wed Jun 22 13:42:14 1994 Ian Lance Taylor (ian@sanguine.cygnus.com)
-
- * lexsup.c (parse_args): Add support for new options -( -) with
- synonyms --start-group --end-group.
- * ldlang.h (enum statement_enum): Add lang_group_statement_enum.
- (lang_group_statement_type): Define new struct.
- (lang_statement_union_type): Add group_statement field.
- (lang_enter_group, lang_leave_group): Declare.
- * ldlang.c (lang_for_each_statement_worker): Handle
- lang_group_statement_enum.
- (map_input_to_output_sections, print_statement): Likewise.
- (lang_size_sections, lang_do_assignments): Likewise.
- (open_input_bfds): Completely rewrite. Now does its own looping,
- rather than using lang_for_each_statement. Handle groups.
- (lang_process): Update call to open_input_bfds.
- (print_group): New static function.
- (lang_enter_group, lang_leave_group): New static functions.
- * ldfile.c (ldfile_open_file): If the file has already been
- opened, just return rather than taking an assertion failure.
- * ldver.c (help): Mention new options.
- * ld.texinfo: Document new options.
-
- * ldlang.c (end_of_data_section_statement_list): Don't define.
- (lang_leave_output_section_statement): Don't set obsolete variable
- end_of_data_section_statement_list.
-
- * scripttempl/go32coff.sc: Don't put ${DATA_ALIGNMENT} inside an
- ALIGN.
-
- * ldlang.c (lang_size_sections): Adjust current region address
- even for sections with an explicit address. From
- ralphc@pyramid.com (Ralph Campbell).
-
- * emulparams/i386linux.sh (NONPAGED_TEXT_START_ADDR): Set to 0.
- From jrs@world.std.com (Rick Sladkey).
-
- * scripttempl/mipsbsd.sc: Let sections align to their natural
- boundaries.
-
-Tue Jun 21 11:27:04 1994 Ian Lance Taylor (ian@sanguine.cygnus.com)
-
- * ldlang.c (lang_init): Use new bfd_abs_section_ptr, not
- &bfd_abs_section.
- (lang_abs_symbol_at_beginning_of): Likewise.
- (lang_abs_symbol_at_end_of): Likewise.
- (lang_size_sections): Use bfd_is_abs_section to check for the
- absolute section. Don't try to set the VMA or output_offset or
- size of the absolute section.
- * ldmain.c (notice_ysym): Use bfd_is_und_section to check for the
- undefined section.
-
-Thu Jun 16 22:48:41 1994 Jeff Law (law@snake.cs.utah.edu)
-
- * scripttempl/hppaelf.sc: Place .data and .bss at 0x40000000
- when generating relocatable objects.
-
-Thu Jun 16 14:25:22 1994 Eric Youngdale (ericy@cais.cais.com)
-
- * emultempl/linux.em: New file providing support for linking
- against Linux shared libraries.
- * config/i386-linux.mt (ei386linux.c): Depend upon linux.em.
- * emulparams/i386linux.sh (TEMPLATE_NAME): Define as linux.
-
-Thu Jun 16 12:22:01 1994 Ian Lance Taylor (ian@tweedledumb.cygnus.com)
-
- * lexsup.c (parse_args): Add -shared to longopts, and handle it.
- * ldmain.c (main): Initialize link_info.shared to false. Give
- error if link_info.relocateable and link_info.shared are both set.
-
- * configure.in: If EMUL_EXTRA* is defined in a config file, treat
- it as naming an emulation to be added to EMULATION_OFILES.
- * config/i386-linux.mt (EMUL_EXTRA1): Define as elf_i386.
-
- * Makefile.in: Rebuilt dependencies.
- (ALL_EMULATIONS): Add ei386linux.o, eelf32_sparc.o,
- eelf64_sparc.o. Remove $(OTHER_EMULATIONS).
- (ei386linux.c, eelf32_sparc.c, eelf64_sparc.c): New targets.
- * config/i386-linux.mt (OTHER_EMULATIONS): Don't define.
- (ei386linux.c): Remove; now in Makefile.in.
- * config/i386-lynx.mt (OTHER_EMULATIONS): Don't define.
- * config/m68k-lynx.mt (OTHER_EMULATIONS): Don't define.
- * config/sparc-lynx.mt (OTHER_EMULATIONS): Don't define.
- * config/sparc64-elf.mt (OTHER_EMULATIONS): Don't define.
- (eelf64_sparc.c): Remove; now in Makefile.in.
- * config/sun4sol2.mt (OTHER_EMULATIONS): Don't define.
- (eelf32_sparc.c): Remove; now in Makefile.in.
-
- * ldexp.c (exp_print_tree): Don't crash if etree_rel section has
- no owner--it might be bfd_abs_section. From Eric Youngdale
- <ericy@cais.cais.com>.
-
- * scripttempl/aout.sc: Let sections align to their natural
- boundaries.
-
-Wed Jun 15 01:54:54 1994 Ian Lance Taylor (ian@tweedledumb.cygnus.com)
-
- * ldemul.h (ldemul_open_dynamic_archive): Declare.
- (ld_emulation_xfer_type): Add new field open_dynamic_archive.
- * ldemul.c: Include ldexp.h and ldlang.h.
- (ldemul_open_dynamic_archive): New function.
- * ldfile.h (ldfile_open_file_search): Declare.
- * ldfile.c: Include ldemul.h.
- (try_open_bfd): Rename from cache_bfd_openr. Return boolean
- argument, not bfd *. Change all callers.
- (ldfile_open_file_search): Rename from open_a. Return boolean
- argument, not bfd *. Clean up. Change all callers.
- (ldfile_open_file): If doing a dynamic link, call
- ldemul_open_dynamic_archive rather than assuming the extension of
- a dynamic object is ".so".
- * emultempl/elf32.em (gld${EMULATION_NAME}_open_dynamic_archive):
- New function.
- (ld_${EMULATION_NAME}_emulation): Initialize open_dynamic_archive
- field.
- * emultempl/sunos.em (ld_${EMULATION_NAME}_emulation): Likewise.
-
- * ldmain.c (get_emulation): Ignore -m486 for Linux compatibility.
- * lexsup.c (parse_args): Ignore -qmagic for Linux compatibility.
- Accept -static as a synonym for -non_shared.
-
- Let the user change the dynamic linker used by ELF code.
- * ld.h (args_type): Add new field interpreter.
- * lexsup.c (parse_args): Add dynamic-linker to longopts, and
- handle it.
- * ldmain.c (main): Initialize command_line.interpreter to NULL.
- * emultempl/elf32.em (gld${EMULATION_NAME}_before_allocation): Get
- the ELF backend to return the .interp section. If
- command_line.interpreter is not NULL, set the contents of .interp
- to it.
- * ld.texinfo: Mention -dynamic-linker.
-
- * config/sun4sol2.mt (eelf32_sparc.c): Depend upon elf32.em, not
- generic.em.
-
- * lexsup.c (parse_args): Sort out the option macros and change the
- definitions to make it easier to add a new option.
-
- * scripttempl/aout.sc: Define __etext and __edata to go along with
- _etext and _edata.
-
- * ld.h (ld_config_type): Add new field traditional_format.
- * lexsup.c (parse_args): Add traditional-format to longopts, and
- handle it.
- * ldmain.c (main): Initialize config.traditional_format to false.
- * ldlang.c (ldlang_open_output): Set BFD_TRADITIONAL_FORMAT in BFD
- flags of output_bfd according to config.traditional_format.
- * ldver.c (help): Mention -traditional-format.
- * ld.texinfo: Document -traditional-format.
-
-Tue Jun 14 23:10:07 1994 Ian Lance Taylor (ian@tweedledumb.cygnus.com)
-
- * ldctor.c (ldctor_add_entry): Add entries to a set in the order
- they are encountered.
-
-Tue Jun 14 18:05:09 1994 Eric Youngdale (ericy@cais.cais.com)
-
- * emulparams/i386linux.sh (TEXT_START_ADDR): Define as 0x1000.
- (NONPAGED_TEXT_START_ADDR): Define as 0x20.
-
-Mon Jun 13 15:46:09 1994 Ian Lance Taylor (ian@tweedledumb.cygnus.com)
-
- * scripttempl/alpha.sc: Define _ftext, _etext and _fdata insted of
- _FTEXT, _ETEXT and _FDATA. Dont define _END.
-
- * ldfile.c (open_a): If this is not an archive, try to open it in
- the current directory before searching for it.
-
- * lexsup.c (parse_args): Treat -i as a synonym for -r.
-
- * ldgram.y (exp): Treat BLOCK as a synonym for ALIGN, so that
- BLOCK works in a section address as documented.
-
- * ldgram.y (YYDEBUG): Don't define.
-
-Fri Jun 10 16:45:39 1994 Ian Lance Taylor (ian@tweedledumb.cygnus.com)
-
- * emultempl/gld960.em: Pass false for new argument to
- ldfile_add_library_path.
- * emultempl/gld960c.em, emultempl/lnk960.em: Likewise.
-
- * emultempl/sunos.em: Only look for .so files if doing a dynamic
- link.
-
-Thu Jun 9 08:35:17 1994 Ian Lance Taylor (ian@cygnus.com)
-
- * scripttempl/i960.sc: Add CONSTRUCTORS to .data.
-
-Thu Jun 9 06:52:29 1994 Bill Cox (bill@rtl.cygnus.com)
-
- * Makefile.in (check): Delete ld.new dependency so that a regression
- test doesn't trigger a rebuild of the linker.
-
-Thu Jun 9 00:17:20 1994 Ian Lance Taylor (ian@tweedledumb.cygnus.com)
-
- * ldlang.c (map_input_to_output_sections): For lang_address, call
- init_os if it hasn't already been called.
-
-Thu Jun 2 17:24:08 1994 Ian Lance Taylor (ian@tweedledumb.cygnus.com)
-
- Add support for SunOS shared libraries.
- * scripttempl/aout.sc: Don't define __DYNAMIC here. Add new
- sections used by shared library support code.
- * emultempl/sunos.em: New file.
- * emulparams/sun4.sh (TEMPLATE_NAME): Define as sunos.
- * emulparams/sun3.sh (TEMPLATE_NAME): Likewise.
- * Makefile.in (esun4.c): Depend upon sunos.em, not generic.em.
- (esun3.c): Likewise.
-
- * ldlang.c: Minor formatting cleanups.
- (lang_for_each_input_file): New function.
- * ldlang.h (lang_for_each_input_file): Declare.
-
- * ldfile.h (search_dirs_type): Move from ldfile.c, and add cmdline
- field.
- (search_head): Declare.
- (ldfile_add_library_path): Add new cmdline argument in prototype.
- * ldfile.c (search_head): Make non-static.
- (search_dirs_type): Move to ldfile.h.
- (ldfile_add_library_path): Accept cmdline argument, and save it.
- * lexsup.c (parse_args): Pass true for new cmdline argument of
- ldfile_add_library_path.
- (set_default_dirlist): Likewise.
- * ldmain.c (check_for_scripts_dir): Pass false for new cmdline
- argument of ldfile_add_library_path.
- * ldgram.y (ifile_p1): Likewise.
-
-Wed Jun 1 14:24:08 1994 Ian Lance Taylor (ian@tweedledumb.cygnus.com)
-
- * ldlang.h (lang_input_statement_type): Remove fields subfiles,
- total_size, superfile and chain.
- * ldfile.c (open_a): Don't clear search_dirs_flag.
- (ldfile_open_file): Don't try to open superfile. Assert that file
- has not already been opened.
- * ldlang.c (new_afile): Don't initialize superfile.
- * ldmain.c (add_archive_element): Don't initialize subfiles or
- chain or superfile. Initialize search_dirs_flag to false.
-
-Fri May 27 12:25:33 1994 Ken Raeburn (raeburn@cujo.cygnus.com)
-
- * ldver.c (ldversion): Changed version to "cygnus-2.4.1".
-
- Changes from binutils-2.4 release:
-
- * genscripts.sh (RELOCATING, CONSTRUCTING): When setting
- variables, use whitespace, so scripts don't break.
-
- * config/alphaosf.mh (HDEFINES, CFLAGS): Deleted.
-
- * emultempl/generic.em: Find emultempl/stringify.sed in ${srcdir}.
-
- * testsuite/ld-cdtest/cdtest-bar.cc: Renamed from cdtest-func.cc.
- * Makefile.in: Noted change.
-
- * scripttempl/a29k.sc: Don't include /lab3/u3/..../segments.o; I
- don't know where that's supposed to come from, or why it's
- necessary.
-
- Wed May 11 22:32:00 1994 DJ Delorie (dj@ctron.com)
-
- * configure.bat: update to latest Makefile.in
- * emulparams/go32.sh: set to coff-go32 not aout
- * emultempl/generic.em: strength-reduce the structure of
- this shell script, since the only available shell for
- DOS can't handle complex syntax.
- * emultempl/stringify.sed: for "sed -f" instead of inline.
- * Makefile.in: depend on stringify.sed as well as genscripts.sh
- * scripttempl/go32coff.sc: correct for djgpp 1.11's COFF format
- * genscripts.sh: empty variables aren't always considered "set",
- so set them to "y" instead.
-
-Fri May 27 01:08:14 1994 Ian Lance Taylor (ian@tweedledumb.cygnus.com)
-
- * ldlang.c (entry_symbol): Make static.
- (lang_add_entry): Add cmdline argument.
- * ldlang.h (lang_add_entry): Change prototype.
- * ldgram.y (statement_anywhere): Change lang_add_entry call.
- * lexsup.c (parse_args): Likewise.
-
-Tue May 24 16:13:43 1994 Ian Lance Taylor (ian@tweedledumb.cygnus.com)
-
- * emulparams/elf32mipb.sh (OTHER_READONLY_SECTIONS): Don't give
- .reginfo an address.
- (OTHER_READWRITE_SECTIONS): Don't give .lit4 or .lit8 an address.
- (OTHER_SECTIONS): Define for .gptab.sdata and .gptab.sbss.
- * scripttempl/elf.sc: Use OTHER_SECTIONS at end of script.
-
-Thu May 19 13:31:33 1994 Ian Lance Taylor (ian@tweedledumb.cygnus.com)
-
- Add support for ELF shared libraries.
- * ld.h (ld_config_type): Add field dynamic_link.
- * ldmain.c (main): Initialize config.dynamic_link to false. Warn
- on attempts to use -r with -relax, -call_shared or -s.
- * lexsup.c (longopts): Separate OPTION_CALL_SHARED from
- OPTION_NON_SHARED. Add OPTION_IGNORE. Adjust macro values
- accordingly. Add "dy" and "non_shared" options. Change "Qy" to
- OPTION_IGNORE for now. Handle OPTION_CALL_SHARED and
- OPTION_NON_SHARED by setting dynamic_link field accordingly.
- Handle OPTION_IGNORE by ignoring it. Clear dynamic_link field for
- -r and -Ur.
- * ldfile.c (ldfile_open_file): If config.dynamic_link is true, try
- opening a file with a .so extension first.
- * emultempl/elf32.em: New file.
- * emulparams/elf32_sparc.sh (TEXT_START_ADDR): Change to 0x10000.
- (NONPAGED_TEXT_START_ADDR): Likewise.
- (TEMPLATE_NAME): Define as elf32.
- (DATA_PLT): Define.
- * emulparams/elf_i386.sh (TEMPLATE_NAME): Define as elf32.
- * scripttempl/elf.sc: Add placement for new dynamic sections.
- Don't use CREATE_OBJECT_SYMBOLS. Define _etext, _edata and _end
- outside of any section. Don't use ALIGN(8); just let one section
- VMA follow another. Put .dynbss in .bss. Don't mention debugging
- sections; they'll be handled correctly anyhow.
- * Makefile.in (eelf_i386.c): Depend upon elf32.em, not generic.em.
-
-Wed May 18 10:15:39 1994 Ian Lance Taylor (ian@cygnus.com)
-
- * Makefile.in (install): Redirect output of ln to /dev/null.
-
-Mon May 16 13:35:08 1994 Jeff Law (law@snake.cs.utah.edu)
-
- * emultempl/hppaelf.em: Change all references of
- .hppa_linker_stubs to .PARISC.stubs.
- * scripttempl/hppaelf.sc: Likewise.
-
-Fri May 13 13:00:38 1994 Ian Lance Taylor (ian@tweedledumb.cygnus.com)
-
- * ldlang.c (print_output_section_statement): Change ``no attached
- output section'' message slightly.
- (lang_do_assignments): Don't recurse down if there is no real
- section.
-
- * config/i386-linux.mt (OTHER_EMULATIONS): Change em_ to e to
- match corresponding change in emulation templates.
- * config/i386-lynx.mt, config/m68k-lynx.mt: Likewise.
- * config/sparc-lynx.mt, config/sun4sol2.mt: Likewise.
-
-Wed May 11 18:16:46 1994 Ken Raeburn (raeburn@cujo.cygnus.com)
-
- * ldver.c (ldversion): Updated version number.
-
- * testsuite/ld-cdtest/cdtest-foo.cc: Use explicit "#pragma
- implementation".
- * testsuite/ld-cdtest/cdtest-bar.cc: Renamed from cdtest-func.cc.
- * Makefile.in: References to cdtest-func.o changed to
- cdtest-bar.o.
-
-Wed May 11 16:24:19 1994 Ian Lance Taylor (ian@tweedledumb.cygnus.com)
-
- Don't create unnecessary output sections.
- * ldlang.c (out_bfd_get_section_by_name): Remove.
- (wild_section): Call bfd_get_section_by_name rather than
- our_bfd_get_section_by_name. Don't call wild_doit if there is no
- section.
- (lang_create_output_section_statements): Remove.
- (map_input_to_output_sections): For several cases, call init_os if
- it has not already been called.
- (lang_size_sections): If output section was not created, skip it.
- (lang_process): Don't call lan_create_output_section_statements.
- (lang_place_orphans): Skip files with just_syms_flags set to true.
- * ld.texinfo: Document change.
-
-Tue May 10 14:31:16 1994 Ian Lance Taylor (ian@tweedledumb.cygnus.com)
-
- * ldlang.c (wild_doit): Don't bother initializing the vma and
- section size. Don't special case SEC_SHARED_LIBRARY.
- (lang_size_sections): Handle SEC_COFF_SHARED_LIBRARY sections
- specially.
-
-Fri May 6 12:24:27 1994 Steve Chamberlain (sac@cygnus.com)
-
- * config/go32.mh : New file for Xgo32X.
-
-Fri May 6 15:15:35 1994 Ian Lance Taylor (ian@tweedledumb.cygnus.com)
-
- * ldfile.c (ldfile_open_command_file): Set bfd_error_system_call
- before calling einfo, since we are reporting an fopen failure.
- From jrs@world.std.com (Rick Sladkey).
-
- * configure.in: Use "e" rather than "em_" as prefix for
- emulations.
-
-Fri May 6 01:08:14 1994 Ken Raeburn (raeburn@kr-pc.cygnus.com)
-
- * emultempl/generic.em: Use "e" rather than "em_" as prefix for
- filename.
- * emultempl/gld960.em, emultempl/gld960c.em, emultempl/lnk960.em,
- emultempl/hppaelf.em, emultempl/m88kbcs.em, emultempl/vanilla.em:
- Ditto.
- * Makefile.in: Changed all generated file names.
- (ldemul-list.h): Depend on Makefile, not config.status. Changed
- sed patterns to handle new filenames.
-
- * config/mipsl-idt.mt: Renamed from mips-idtl.mt.
- * configure.in: Adjusted.
-
-Thu May 5 15:07:32 1994 Ken Raeburn (raeburn@cujo.cygnus.com)
-
- * Makefile.in (install-info): Don't use "$<*", it doesn't always
- work. Instead, check build dir and $srcdir explicitly, and use
- `echo' to get all the filenames.
-
- * configure.in (h8300h-*-hms): Changed ld_target name to
- cf-h8300h.
- * config/cf-h8300h.mt: Renamed from coff-h8300h.mt, to make it
- unique in 8.3.
-
- * config/i960coff.mt: New file.
- * emulparams/gld960coff.sh: New file.
- * emultempl/gld960c.em: New file.
- * configure.in (i960-*-vxworks5* except -vxworks5.0*): Use
- i960coff configuration.
- * Makefile.in (em_gld960coff.c): Added dependencies, build rule.
-
- * Makefile.in (ALL_EMULATIONS): Remove em_delta68.o, since the
- code isn't included in FSF releases, and it can still be
- explicitly selected.
- (distclean): Remove site.bak and tmpdir.
- (STAGESTUFF): Removed $(GENERATED_CFILES) $(GENERATED_HFILES).
- (mostlyclean): Delete them explicitly here. Also remove tmpdir.
-
- Patches from Ralph Campbell:
- * config/mipsbsd.mh: New file.
- * Makefile.in (em_mipsbsd.c): Use mipsbsd.sc, not aout.sc.
- * scripttempl/mipsbsd.sc: Don't define __DYNAMIC.
- * emulparams/mipsbsd.sh (OUTPUT_FORMAT): Fix name to have `a.out'
- instead of `aout'.
-
- * configure.in (i386-*-gnu*): Treat like i386-*-mach*.
-
-Wed May 4 11:59:40 1994 Ian Lance Taylor (ian@tweedledumb.cygnus.com)
-
- * config/m68k.mt (EMUL): Set to m68kaout.
- * emulparams/m68kaout.sh: New file.
- * Makefile.in (ALL_EMULATIONS): Add em_m68kaout.o.
- (em_m68kaout.c): New target.
-
- * ldlang.c (lang_size_sections): If dot moves because of an
- assignment, don't try to insert a pad into the absolute output
- section, just change the address of the default memory region
- instead.
-
- * Makefile.in (mostlyclean): Remove cdtest.tmp, cdtest-ur,
- cdtest-ur.out, and cdtest-ur.tmp.
-
-Wed Apr 27 16:03:37 1994 Ian Lance Taylor (ian@tweedledumb.cygnus.com)
-
- * scripttempl/sa29200.sc: Align all sections to four byte
- boundaries.
-
-Wed Apr 27 10:48:03 1994 Steve Chamberlain (sac@cygnus.com)
-
- * Makefile.in, configure.in: Support for go32 coff.
- * config/i386-go32.mt: New file
- * emulparams/i386go32.sh: New file
- * scripttempl/i386go32.sc: New file
-
-Tue Apr 26 17:20:03 1994 Stan Shebs (shebs@andros.cygnus.com)
-
- * Makefile.in (em_m68klynx.c, em_i386lynx.c, em_sparclynx.c): Use
- Lynx-specific script templates.
- * configure.in (sparclite*-*-coff): Use coff-sparc.
- * emulparams/i386lynx.sh (SCRIPT_NAME): Set to i386lynx.
- * emulparams/sparclynx.sh (SCRIPT_NAME): Set to sparclynx.
- (ENTRY): Set to __main.
- * scripttempl/i386lynx.sc: New file, script for I386 Lynx.
- * scripttempl/m68klynx.sc: Add insertion of ctor/dtor sections.
- * scripttempl/sparclynx.sc: New file, script for uSparc Lynx.
-
-Tue Apr 26 12:41:03 1994 Ian Lance Taylor (ian@tweedledumb.cygnus.com)
-
- * scripttempl/mips.sc: Force _gp and .lit8 to be aligned to a 16
- byte boundary, in case the global constructors do not take up an
- even 16 bytes.
-
- * config/i386v4.mh (HOSTING_CRT0): If ../gcc/crtbegin.o does not
- exist, get crtbegin based on gcc -print-libgcc-file-name.
- (HOSTING_LIBS): Similar change for ../gcc/crtend.o.
-
-Mon Apr 25 15:27:52 1994 Ian Lance Taylor (ian@tweedledumb.cygnus.com)
-
- * ldlang.c (lang_size_sections): When no address is given for a
- section, align it according to its requirements.
-
-Thu Apr 21 17:24:24 1994 Ian Lance Taylor (ian@tweedledumb.cygnus.com)
-
- * Makefile.in (clean, distclean): Remove configdoc.texi.
-
-Tue Apr 19 12:12:15 1994 Bill Cox (bill@rtl.cygnus.com)
-
- * configure.in: Add i[34]86-*-bsd386 to the patterns recognized.
-
-Fri Apr 15 14:35:42 1994 Ian Lance Taylor (ian@tweedledumb.cygnus.com)
-
- * ldlang.c (lang_size_sections): When relaxing, adjust the
- position of a padding statement, and adjust dot accordingly.
-
-Mon Apr 11 17:37:09 1994 Bill Cox (bill@rtl.cygnus.com)
-
- * Makefile.in (EXPECT, RUNTEST): Set these for the check goal.
-
-Mon Apr 11 12:32:57 1994 Ian Lance Taylor (ian@tweedledumb.cygnus.com)
-
- * scripttempl/i386coff.sc: If relocating, don't put .init and
- .fini sections into .text; keep them separate.
- * config/i386sco.mh (HOSTING_CRT0): If ../gcc/crtbegin.o does not
- exist, get crtbegin based on gcc -print-libgcc-file-name.
- (HOSTING_LIBS): Similar change for ../gcc/crtend.o.
-
-Mon Apr 11 10:31:00 1994 Bill Cox (bill@rtl.cygnus.com)
-
- * Makefile.in (check): Set TCL_LIBRARY for runtest.
-
-Wed Apr 6 00:09:37 1994 Jeffrey A. Law (law@snake.cs.utah.edu)
-
- * configure.in (hppa*-*-*elf*): Don't require "-hp-" for the
- manufacturer.
-
- * emultempl/hppaelf.em (hppaelf_finish): Only resize sections
- if building a final executable.
-
-Tue Apr 5 12:17:30 1994 Ian Lance Taylor (ian@tweedledumb.cygnus.com)
-
- * ldmain.c (main): Check the return value of bfd_close.
-
-Thu Mar 31 18:07:06 1994 Ian Lance Taylor (ian@tweedledumb.cygnus.com)
-
- * scripttempl/alpha.sc: Clean up section alignment to ensure that
- sections never overlap when using -r.
-
-Wed Mar 30 15:51:15 1994 Ian Lance Taylor (ian@tweedledumb.cygnus.com)
-
- * ldmisc.c (vfinfo): Change symbol reading slightly for recent BFD
- changes: get_symtab_upper_bound renamed and returns long,
- bfd_canonicalize_symtab returns long, check for error indications.
-
-Fri Mar 25 17:20:01 1994 Ian Lance Taylor (ian@tweedledumb.cygnus.com)
-
- * ldlang.c (print_input_section): For section size, use
- _cooked_size if it is non-zero, size otherwise.
- (size_input_section): Likewise.
- (lang_do_assignments): Likewise (case lang_input_section_enum).
-
-Thu Mar 24 15:20:47 1994 Ian Lance Taylor (ian@tweedledumb.cygnus.com)
-
- * ldlang.c (new_afile): Add new argument add_to_list. Don't set
- real to true for lang_input_file_is_marker_enum. Clear the_bfd.
- (lang_add_input_file): Pass true to new_afile for add_to_list.
- (lookup_name): Remove force_load argument. Changed all callers.
- Pass false to new_afile for add_to_list. Split loading of symbols
- out into separate function.
- (load_symbols): New function split out of lookup_name. Don't load
- the symbols if they are already loaded.
- (open_input_bfds): For lang_input_statement_enum call load_symbols
- rather than lookup_name.
- (lang_process): Pass abs_output_section rather than NULL to
- lang_size_sections.
- (lang_startup): Set real field of first_file to true.
-
-Wed Mar 23 14:15:44 1994 Ian Lance Taylor (ian@tweedledumb.cygnus.com)
-
- * ldlang.c (had_relax): Removed.
- (relax_again): New static variable.
- (lang_size_sections): Change call to bfd_relax_section to
- correspond to BFD changes. Set relax_again appropriately.
- (lang_process): Remove #if 0 code. When relaxing, keep calling
- lang_do_assignments and lang_size_sections until relax_again
- becomes false.
-
- * emultempl/gld960.em: Include libiberty.h
- (gld960_before_parse): Pass NULL as final argument to concat.
-
-Tue Mar 22 13:08:28 1994 Ian Lance Taylor (ian@tweedledumb.cygnus.com)
-
- * scripttempl/aout.sc: Force _end and __end to be aligned to a
- four byte boundary.
-
- * ldwrite.c (build_link_order): Handle lang_data_statement_enum by
- building a bfd_data_link_order, rather than by setting the section
- contents immediately.
-
-Mon Mar 21 18:28:37 1994 Ian Lance Taylor (ian@tweedledumb.cygnus.com)
-
- Changes to make -Ur work again.
- * ldmain.c (add_to_set): Now takes reloc argument rather than
- bitsize. Check config.build_constructors here. If an new hash
- table entry is created, mark it as undefined.
- (constructor_callback): No longer takes bitsize argument. Pass
- BFD_RELOC_CTOR to ldctor_add_set_entry, but first make sure the
- BFD backend supports it.
- (reloc_overflow): Handle a NULL abfd argument.
- (reloc_dangerous, unattached_reloc): Likewise.
- * ldctor.c: Include ldmain.h.
- (struct set_info): Change bitsize field to reloc.
- (ldctor_add_set_entry): Now takes reloc argument rather than
- bitsize. Don't bother to check config.build_constructors here.
- (ldctor_build_sets): Get the size from the reloc howto. If
- generating relocateable output, call lang_add_reloc rather than
- lang_add_data.
- * ldctor.h (ldctor_add_set_entry): Change declaration to use reloc
- instead of bitsize.
- * ldlang.h (statement_enum): Add lang_reloc_statement_enum.
- (lang_reloc_statement_type): New structure.
- (lang_statement_union_type): Add reloc_statement field.
- (lang_add_reloc): Declare new function.
- * ldlang.c (lang_for_each_statement_worker): Handle
- lang_reloc_statement_enum.
- (map_input_to_output_sections, print_statement): Likewise.
- (lang_size_sections, lang_do_assignments): Likewise.
- (print_reloc_statement): New function.
- (lang_add_reloc): New function.
- * ldwrite.c (build_link_order): Handle lang_reloc_statement_enum.
-
- * Makefile.in (cdtest.out, cdtest-ur.o): New targets.
- (cdtest-ur, cdtest-ur.out): New targets.
- (check-cdtest): Now also check that -Ur works correctly.
-
- * scripttempl/alpha.sc: Align all sections to 16 byte boundaries.
-
-Thu Mar 17 12:45:41 1994 Ian Lance Taylor (ian@tweedledumb.cygnus.com)
-
- * ldlang.c (lang_process): Move lang_common call before
- map_input_to_output_sections, to ensure that any alignment
- constraints set by common symbols are copied over to the output
- sections.
-
-Fri Mar 11 22:17:34 1994 Ian Lance Taylor (ian@tweedledumb.cygnus.com)
-
- * emulparams/elf32ppc.sh (TEMPLATE_NAME): Don't define.
- (OTHER_READWRITE_SECTIONS): Rename .toc to .got.
- * Makefile.in (em_elf32ppc.c): Depend upon generic.em, not ppc.em.
- * emultempl/ppc.em: Remove ugly stub code; turns out not to be
- needed for ELF.
-
-Tue Mar 8 04:22:27 1994 David J. Mackenzie (djm@rtl.cygnus.com)
-
- * config/i386bsd.mh: New file.
-
-Mon Mar 7 15:23:24 1994 Ian Lance Taylor (ian@tweedledumb.cygnus.com)
-
- * scripttempl/elf.sc: Permit TEXT_START_SYMBOLS and
- DATA_START_SYMBOLS to be defined.
- * emulparams/elf32mipb.s (TEXT_START_SYMBOLS): Define _ftext.
- (DATA_START_SYMBOLS): Define _fdata.
-
-Mon Feb 28 10:59:14 1994 Stan Shebs (shebs@andros.cygnus.com)
-
- * ldlang.c (cat): Define using ANSI style if ALMOST_STDC defined.
-
-Sun Feb 27 16:29:38 1994 Jeffrey A. Law (law@snake.cs.utah.edu)
-
- * emultempl/hppaelf.em (hppaelf_finish): Update comments. This
- works again. Attach some output symbols to the stub file bfd.
-
- * emultempl/hppaelf.em: Include elf32-hppa.h.
- (file_chain): Add decl.
- (hppa_look_for_stubs_in_section): Delete decl.
- (hppaelf_finish): Reenable code. Do not pass symbols
- down to hppa_look_for_stubs_in_section.
-
-Sat Feb 26 10:58:25 1994 Ian Lance Taylor (ian@cygnus.com)
-
- * ldmain.c (write_map): Don't define. Removed all references.
- Just use map_file or map_filename instead.
- (add_archive_element): Use minfo to write map information, not
- info_msg.
- (constructor_callback): Use fprintf to write map information, not
- info_msg.
- * ldmain.h (write_map): Don't declare.
- * ldgram.y (mri_script_command): Removed reference to write_map.
- * ldlang.c (lang_one_common): Likewise.
- * lexsup.c (parse_args): Likewise.
-
-Fri Feb 25 19:12:03 1994 Ian Lance Taylor (ian@cygnus.com)
-
- * scripttempl/elf.sc: Force all sections to be aligned.
-
- * ldgram.y (section): Reverse the order of memspec_opt and
- fill_opt to avoid an ambiguity when both are used.
- * ld.texinfo: Changed accordingly.
-
- * ldgram.y: Move include of ldlex.h back with other includes.
- * ldlex.h (input_type): Don't initialize enum constants to
- particular values.
- * ldlex.l: Use a switch to return the right token based on
- input_type, rather than knowing that input_type has a value based
- on a token type.
-
- * ldgram.y (dirlist_ptr): Removed; not used.
- * lexsup.c: Include ldver.h.
- * Makefile.in: Rebuilt dependencies.
-
-Fri Feb 25 18:55:54 1994 Ted Lemon (mellon@pepper.ncd.com)
-
- * ldlang.c (lookup_name): don't call bfd_set_gp_size.
- (ldlang_add_file): call it here instead.
-
-Fri Feb 25 18:13:46 1994 David J. Mackenzie (djm@rtl.cygnus.com)
-
- * ldgram.y: Include ldlex.h after %token decls, for byacc.
-
-Fri Feb 25 10:47:25 1994 Jeffrey A. Law (law@snake.cs.utah.edu)
-
- * emultempl/hppaelf.em: First attempt to clean this file up.
- Add comments in several functions as to their purpose and
- how they function (or my current best guess). Clean up horrible
- spacing and indention that never should have been accepted in the
- first place. Add FIXMEs for issues which need to be resolved.
- Disable linker-stub generation until it gets fixed. This allows
- the linker to at least work on simple code for testing purposes.
-
- * ldlang.c (lang_size_sections): No longer static (PA ELF calls
- it via hppaelf_finish). Prototype moved into ldlang.h.
- (lang_process): Move problematic extra call to lang_size_sections
- into the PA ELF specific code.
- * emultempl/hppaelf.em (hppaelf_finish): Extra call to
- lang_size_sections moved here.
-
-Thu Feb 24 16:47:33 1994 Ian Lance Taylor (ian@cygnus.com)
-
- * configure.in (powerpc-*-elf*): New target; use ppc-elf32.
- * config/ppc-elf32.mt: New file.
- * emulparams/elf32ppc.sh: New file.
- * emultempl/ppc.em: New file.
- * Makefile.in (ALL_EMULATIONS): Added em_elf32ppc.o.
- (em_elf32ppc.c): New target; uses elf32ppc.sh, ppc.em and elf.sc.
- (EMULATION_OFILES): Added dependencies on ldexp.h and ldlang.h.
-
-Thu Feb 24 12:27:07 1994 David J. Mackenzie (djm@rtl.cygnus.com)
-
- * lexsup.c (parse_args): Use symbolic numbers for long options.
- Fix misunderstanding in -Y and -call_shared et al.
-
- Use getopt instead of lex and yacc to parse the command line.
-
- * ld.texinfo (Options): Document changes to option syntax.
- * Makefile.in: Update dependencies.
- * ldver.c (help): Tweak dashes in usage message.
- * ldgram.y (%union): Remove unused members.
- Remove %tokens for command line options; add ones for input types.
- (command_line): Rules removed.
- (file): Instead of command line, recognize an
- input type indicator, then use the nonterminal for that type.
- (defsym_expr): New nonterminal from code formerly in command_line.
- * ldlex.h: Declare parser input type enum and variable.
- Don't declare parse_line.
- * ldlex.l: Remove unused variables. Make some used ones static
- and comment them.
- (COMMAND): Start state and its rules removed.
- At start of yylex, return input state token if at start of input.
- (lex_redirect): Don't need to set yyout.
- (ldlex_command): Function removed.
- * ldmain.c (main): Instead of calling parse_line, set up the
- redirections and call yyparse directly.
- * ldmisc.c (vfinfo): If there's no input filename, print nothing, not
- "command line".
- * lexsup.c: Remove #if 0'd code.
- (parse_line): Function removed.
- (parse_args): Rewrite to use getopt_long_only.
- (set_default_dirlist): New function from code formerly in
- ldgram.y:command_line.
- (set_section_start): New function.
- * emultempl/generic.em, emultempl/gld960.em, emultempl/hppaelf.em,
- emultempl/lnk960.em, emultempl/m88kbcs.em: Don't enclose
- compiled-in link scripts in "{" and "}", as the grammar no longer
- wants them to be.
-
-Thu Feb 24 08:43:26 1994 Ken Raeburn (raeburn@rtl.cygnus.com)
-
- * Makefile.in (ld.dvi): Depend on configdoc.texi, but don't
- require that it be in $(srcdir).
-
-Tue Feb 22 09:21:18 1994 Ian Lance Taylor (ian@cygnus.com)
-
- * ldlang.c (lang_size_sections): Only align section to alignment
- required by linker script, not to maximum alignment of input
- sections.
-
- * ldlang.h (largest_section): Don't declare.
- * ldlang.c (largest_section): Don't define.
- (size_input_section): Don't set largest_section; not used.
-
-Mon Feb 21 15:15:29 1994 Ian Lance Taylor (ian@cygnus.com)
-
- * ldlang.c (new_afile): Pass NULL as last argument to concat.
-
-Thu Feb 17 15:51:23 1994 Ian Lance Taylor (ian@tweedledumb.cygnus.com)
-
- * ldlang.c, ldmain.c: Include libiberty.h.
-
- * ldmisc.h (concat): Don't declare.
- * ldmisc.c (concat): Don't define; just use the one in libiberty.
-
- * ld.h (as_output_section_statement): Removed; not used.
-
-Thu Feb 17 09:32:14 1994 David J. Mackenzie (djm@thepub.cygnus.com)
-
- * ldlang.c, ldmain.c, ldmisc.c: Use bfd_get_error and
- bfd_set_error and new error names.
-
-Tue Feb 15 20:14:53 1994 Ken Raeburn (raeburn@cujo.cygnus.com)
-
- * ldwrite.c (build_link_order): If the cooked size of the section
- has been set, use it, for determining link_order size.
- (ldwrite): In the error message displayed if bfd_final_link fails,
- indicate that it was in fact the final link step that failed.
-
- * ldlang.c (lang_size_sections): Clear bfd_error before calling
- bfd_relax_section, in case it returns false but doesn't flag an
- error. If an error is returned, indicate which one it is in the
- error message.
-
- * Makefile.in (install-info): Depend on ld.info, and use "$<*" so
- it'll get picked up from $(srcdir) if appropriate.
-
-Tue Feb 15 16:32:04 1994 David J. Mackenzie (djm@rtl.cygnus.com)
-
- * scripttempl/aout.sc: Only pad .text if PAD_TEXT is set.
- * emulparams/i386mach.sh (PAD_TEXT): Set PAD_TEXT.
-
-Fri Feb 11 17:02:49 1994 David J. Mackenzie (djm@thepub.cygnus.com)
-
- * ldlex.l (comment): Increment line number when newline is read.
-
-Fri Feb 11 17:36:20 1994 Ian Lance Taylor (ian@tweedledumb.cygnus.com)
-
- * ldlang.c (lookup_name): Take new argument, force_load. If true,
- reload the file even if it is already loaded.
- (wild): Call lookup_name with force_load argument of 0.
- (open_input_bfds): Call lookup_name with force_load argument of 1.
- (print_symbol): Remove declaration of non-existent function.
- (print_one_symbol): Return true rather than falling off end.
-
-Thu Feb 10 11:52:38 1994 Ian Lance Taylor (ian@tweedledumb.cygnus.com)
-
- * ldmain.c (main): Use %ld when printing long values.
-
- * scripttempl/elf.sc: Move _edata after the .sdata section.
- Permit OTHER_BSS_SYMBOLS to be defined.
- * emulparams/elf32mipb.s (OTHER_BSS_SYMBOLS): Define _fbss.
-
-Mon Feb 7 16:31:15 1994 Jeffrey A. Law (law@snake.cs.utah.edu)
-
- * Rename all "hppaosf" files to "hppaelf".
- * Change all "osf" references to "elf" in hppaelf files.
- * Makefile.in: Likewise.
- * configure.in: Likewise.
-
-Sun Feb 6 20:31:56 1994 David J. Mackenzie (djm@thepub.cygnus.com)
-
- * ldmain.c (main): Call xatexit, not atexit.
- Call xmalloc_set_program_name.
-
- * ldlang.c (lang_size_sections): Check if bfd_relax_section set
- bfd_errno.
-
-Sat Feb 5 03:54:34 1994 David J. Mackenzie (djm@thepub.cygnus.com)
-
- * emultempl/lnk960.em (append), emultempl/hppaosf.em
- (hppaosf_finish): Call xmalloc, not ldmalloc.
- * ldmain.c (preserve_output): Function removed.
- (main): Do it here instead.
-
-Fri Feb 4 23:02:19 1994 Jeffrey A. Law (law@snake.cs.utah.edu)
-
- * ldlang.h (LANG_FOR_EACH_{INPUT,OUTPUT}_SECTION): Delete (unused)
- GNU C specific macros.
-
- * emultempl/hppaosf.em (hppaosf_finish): Expand the only remaining
- call to LANG_FOR_EACH_INPUT_SECTION.
-
-Fri Feb 4 16:26:08 1994 David J. Mackenzie (djm@thepub.cygnus.com)
-
- * ldmisc.c (ldmalloc, xmalloc, ldrealloc, xrealloc): Functions
- deleted; will use libiberty versions instead.
- * ldctor.c ldfile.c ldlang.c ldmain.c ldmisc.c ldmisc.h lexsup.c
- mri.c Makefile.in: Change callers.
-
- * ldmisc.c (vfinfo): Remove cleanup code.
- * ldmain.c (remove_output): Put it here (new function).
- (preserve_output): New function.
- (main): Register remove_output and preserve_output with atexit.
- * ldmain.c ldgram.y: Call xexit instead of exit.
- * ldmisc.h: Declare xexit.
-
-Fri Feb 4 15:19:01 1994 Steve Chamberlain (sac@cygnus.com)
-
- * Makefile.in: Lots of new H8/500 memory models.
-
-Sun Jan 30 14:33:40 1994 Ken Raeburn (raeburn@cujo.cygnus.com)
-
- * ldlex.l: Removed duplicate rules.
- (yywrap): Provide default definition, needed with some versions of
- flex.
-
-Fri Jan 28 09:12:56 1994 David J. Mackenzie (djm@thepub.cygnus.com)
-
- * ldmisc.c (vfinfo): For `%I', if the file is in an archive, print
- the archive filename too.
-
- * ldlex.l: Add rule to catch invalid input characters instead of
- printing them. Include "ldmain.h" for program_name decl.
- (lex_warn_invalid): New function.
- * Makefile.in: Add dependency.
-
-Fri Jan 28 12:58:45 1994 Ken Raeburn (raeburn@cujo.cygnus.com)
-
- * Makefile.in (check): Don't bother running any tests of
- cross-linker until the test suite no longer assumes native mode.
-
-Thu Jan 27 17:19:54 1994 Steve Chamberlain (sac@jonny.cygnus.com)
-
- * ldlang.c (print_one_symbol, print_input_section): Print
- global symbols in symbol table again.
-
-Thu Jan 27 12:35:01 1994 David J. Mackenzie (djm@thepub.cygnus.com)
-
- * ldmain.c ldmain.h ldgram.y: If -v -V or --version was given,
- exit successfully instead of complaining if no input files are
- given.
-
-Tue Jan 25 13:19:41 1994 Stan Shebs (shebs@andros.cygnus.com)
-
- * Makefile.in: Format variable definitions consistently.
- (LD_PROG): Remove unnecessary variables from link command,
- change variable LOADLIBES to EXTRALIBS.
-
- * ldmain.c (main): Compute and display total execution time.
- * ld.texinfo (-stats): Document the option.
-
-Mon Jan 24 12:56:37 1994 Ian Lance Taylor (ian@tweedledumb.cygnus.com)
-
- * ldmain.c (reloc_overflow): Added name, reloc_name and addend
- arguments.
-
- * ldlang.c (lookup_name): Set BFD GP size to -G argument value
- after opening BFD.
-
- * ldlang.c (relaxing): Removed global variable.
- (lang_size_sections): If the canonical symbols have not already
- been read in, read them in before relaxing.
- * ldlang.h (relaxing): Removed declaration.
-
-Fri Jan 21 00:44:44 1994 Ian Lance Taylor (ian@tweedledumb.cygnus.com)
-
- * ldlang.c (new_afile): Initialize loaded field to false.
- (lookup_name): If file was already loaded, don't call the
- add_symbols entry point again.
-
-Wed Jan 19 13:57:00 1994 David J. Mackenzie (djm@thepub.cygnus.com)
-
- * ld.texinfo: Clarify what -T option does.
-
-Tue Jan 18 16:18:15 1994 Steve Chamberlain (sac@jonny.cygnus.com)
-
- * scripttempl/m88kbcs.sc: Don't use CREATE_OBJECT_SYMBOLS, that's
- for a.out.
-
-Tue Jan 11 13:22:04 1994 Ian Lance Taylor (ian@tweedledumb.cygnus.com)
-
- * ldmain.c (add_archive_element): If trace_files or
- trace_file_tries, print file name.
- * ldlang.c (lookup_name): Likewise.
- (ldlang_add_file): Don't put files on input_bfds list in reverse
- order.
-
- * scripttempl/elf.sc: Correct typo.
-
-Mon Jan 10 19:49:05 1994 David J. Mackenzie (djm@thepub.cygnus.com)
-
- * ldgram.y, ldlex.l: Make the space between -e, -u, and -y and
- their arguments optional, for compatibility with the old GNU ld.
-
-Fri Jan 7 20:00:24 1994 Ian Lance Taylor (ian@tweedledumb.cygnus.com)
-
- * scripttempl/elf.sc: Define __bss_start before the .sbss section.
-
-Thu Jan 6 00:13:10 1994 Ian Lance Taylor (ian@tweedledumb.cygnus.com)
-
- * ldmain.c (add_to_set): Add bitsize argument.
- (constructor_callback): New function.
- (link_callbacks): Add constructor_callback.
- * ldctor.c (struct set_info): Add bitsize field.
- (ldctor_add_set_entry): Add bitsize argument.
- (ldctor_build_sets): Base the size of the elements of the set on
- the bitsize, rather than always using LONG.
- * ldctor.h (ldctor_add_set_entry): Add bitsize to declaration.
-
- * ld.h (QUAD_SIZE): Define.
- * ldgram.y (QUAD): New token.
- (length): Handle it.
- * ldlex.l: Return QUAD.
- * lexsup.c (keywords): Add QUAD.
- * ldwrite.c (build_link_order): Handle QUAD.
- * ldlang.c (print_data_statement): Handle QUAD.
- (lang_size_sections): Likewise.
- (lang_do_assignments): Likewise.
- * ldexp.c (exp_print_token): Add QUAD to table.
- * ld.texinfo: Describe QUAD.
-
- * scripttempl/alpha.sc: Don't create .lit4 or .sdata sections,
- since the Alpha doesn't use them.
-
-Wed Jan 5 17:42:16 1994 David J. Mackenzie (djm@thepub.cygnus.com)
-
- * ldemul.h (ld_emulation_xfer_struct): Comment the members.
-
-Sat Jan 1 13:39:31 1994 Rob Savoye (rob@darkstar.cygnus.com)
-
- * Makefile.in, configure.in: Add support for VSTa micro-kernel.
- * config/vsta.mt, emulparams/vsta.sh: New files for VSTa.
-
-Sat Jan 1 10:53:35 1994 David J. Mackenzie (djm@thepub.cygnus.com)
-
- * scripttempl/aout.sc: Pad .text to DATA_ALIGNMENT if relocating;
- needed for i386mach. (Should be a no-op on other systems.)
-
- * emulparams/i386mach.sh (SEGMENT_SIZE): Fix again.
- (PAGE_SIZE): Don't define; not used.
-
-Fri Dec 31 16:12:06 1993 Ian Lance Taylor (ian@tweedledumb.cygnus.com)
-
- * ldgram.y (yyerror): Make argument const char *, and actually
- print it out rather than assuming it is a syntax error.
- * ldmisc.h: Change declaration of yyerror.
- * ldemul.c, ldwrite.c: Add /*ARGSUSED*/ as appropriate.
-
-Fri Dec 31 11:37:28 1993 David J. Mackenzie (djm@thepub.cygnus.com)
-
- * emulparams/i386mach.sh (NONPAGED_TEXT_START_ADDR): Don't include
- exec header offset, since the exec header isn't loaded.
- (PAGE_SIZE, SEGMENT_SIZE): Agree with bfd/i386mach3.c.
-
-Thu Dec 30 13:01:43 1993 Ian Lance Taylor (ian@tweedledumb.cygnus.com)
-
- A major rewrite to move the bulk of the linker into BFD so that
- more efficient backend code can be written for specific object
- files.
- * lderror.c, lderror.h, ldindr.c, ldindr.h, ldsym.c, ldsym.h,
- ldwarn.c, ldwarn.h, relax.c, relax.h: Removed.
- * ldctor.c, ldctor.h: Complete rewrite.
- * ldwrite.c, ldwrite.h: Complete rewrite.
- * ld.h (strip_symbols_type, strip_symbols): Removed. Use
- link_info.strip instead. Changed all uses.
- (discard_locals_type, discard_locals): Removed. Use
- link_info.discard instead. Changed all uses.
- (ld_config_type): Removed relocateable_output field; use
- link_info.relocateable instead; changed all uses. Added stats
- field.
- (set_asymbol_chain, get_asymbol_chain, get_loader_symbol,
- set_loader_symbol): Removed.
- * ldexp.h (node_class): Added etree_rel.
- (etree_type): Added rel field.
- * ldexp.c (exp_print_token): Bracketed table initialization.
- (exp_relop): New function.
- (fold_name): Use linker hash table rather than ldsym functions.
- (exp_fold_tree): Likewise. Also, handle etree_rel case.
- (exp_print_tree): Handle etree_rel.
- * ldgram.y (strip_symbols, discard_locals): Removed.
- (OPTION_stats, OPTION_no_keep_memory): New tokens. Handle them.
- (REL): New token. Does not appear in grammar, but needed for
- expression code.
- (file): Don't call lang_final; it's called by main anyhow.
- * ldlex.l: Accept -stats and -no-keep-memory options.
- * ldlang.h (fill_type): Make unsigned int, not unsigned short.
- * ldlang.c: Consistently use fill_type for fill argument.
- (lang_init_script_file, script_file): Removed.
- (create_object_symbols): Removed. Use
- link_info.create_object_symbols_section instead. Changed all
- uses.
- (lang_add_keepsyms_file): Removed.
- (lookup_name): Call bfd_link_add_symbols instead of
- ldmain_open_file_read_symbol.
- (wild): Don't iterate over script_file.
- (open_output): Create link hash table.
- (lang_place_undefineds): Rewrote.
- (lang_size_sections): Handle relaxing (doesn't work yet).
- (lang_relocate_globals): Removed.
- (lang_finish): Use link hash table rather than ldsym functions.
- (lang_common): Rewrote.
- (lang_one_common): New function.
- (ldlang_add_file): Add file to link_info.input_bfds list. Set
- usrdata.
- (create_symbol): Removed.
- (lang_process): Don't call lang_init_script_file. Call
- ldctor_build_sets rather than find_constructors. Don't call
- lang_relocate_globals.
- (lang_abs_symbol_at_beginning_of): Rewrote.
- (lang_abs_symbol_at_end_of): Rewrote.
- * ldmain.c (had_y): Removed.
- (lprefix, lprefix_len): Removed; use link_info fields instead.
- Changed all uses.
- (multiple_def_count, commons_pending, undefined_global_sym_count,
- total_symbols_seen, total_files_seen): Removed.
- (link_callbacks, link_info): New variables.
- (main): Initialize link_info. Don't call init_bfd_error_vector or
- ldsym_init. Don't set now unused variables. Handle -stats.
- (get_emulation): Removed obsolete and nonfunctional GNU960 code.
- (add_ysym): Rewrote.
- (read_entry_symbols, refize, enter_global_ref, enter_file_symbols,
- search_library, gnu960_check_format, decode_library_subfile,
- linear_library, symdef_library, clear_syms, subfile_wanted_p):
- Removed.
- (add_keepsyms_file, add_archive_element, multiple_definition,
- multiple_common, add_to_set, warning_callback, undefined_symbol,
- reloc_overflow, reloc_dangerous, unattached_reloc, notice_ysym):
- New functions.
- * ldmisc.c (vfinfo): Accept a string for %T, not a symbol. Don't
- require symbols for %C; look them up instead.
- * emultempl/hppaosf.em: Pass link_info to
- hppa_look_for_stubs_in_section.
- * Makefile.in: Rebuilt dependencies.
- (CFILES): Removed lderror.c, ldindr.c, ldsym.c, ldwarn.c, and
- relax.c.
- (HFILES): Removed lderror.h, ldindr.h, ldsym.h, ldwarn.h, and
- relax.h.
- (EMULATION_OFILES): Depend on bfdlink.h, ldmain.h, ldexp.h,
- ldlang.h and ldctor.h.
-
- * Makefile.in (ldlex.c): Don't depend on ldgram.h. Remove
- declarations of free and malloc from flex output. Change malloc
- to ldmalloc in flex output.
-
-Thu Dec 16 21:19:57 1993 Jeffrey A. Law (law@snake.cs.utah.edu)
-
- * ldmain.c (lprefix): Change default from a char to a string
- with only one character.
- (lprefix_len): Set default to one.
-
- * ldmain.h (lprefix_len): Declare.
-
- * ldsym.c (write_file_locals): Use strncmp rather than a character
- comparison for lprefix.
-
- * emultempl/m88kbcs.em (before_parse): Set lprefix and lprefix_len
- correctly.
-
- * emultempl/hppaosf.em: Include ldexp.h.
- (before_parse): Set lprefix and lprefix_len correctly.
-
-Tue Dec 14 17:19:03 1993 Ian Lance Taylor (ian@tweedledumb.cygnus.com)
-
- * ldlex.h: Don't declare yywrap if it is a macro.
- * ldlex.l: Include sysdep.h.
- * ldlang.c (lang_for_each_statement_worker,
- lang_for_each_statement): Forgot to use PARAMS.
-
-Mon Dec 13 14:30:03 1993 Ian Lance Taylor (ian@tweedledumb.cygnus.com)
-
- * Makefile.in: Added .PHONY targets where appropriate. Added some
- comments. Also:
- (gcclibdir, version): Removed unused variables.
- (DEP): New variable, set to mkdep.
- (ALL_CFLAGS): New variable. Used in .c.o target.
- (CFILES, HFILES, GENERATED_CFILES, GENERATED_HFILES): New
- variables.
- (HEADERS, MANSOURCES, LDCSOURCES, GENERATED_SOURCES,
- GENERATED_HEADERS, LDSOURCES, BFD_SOURCES, SOURCES): Removed
- mostly obsolete variables. Adjusted remaining uses.
- (DEF_EMUL): Removed variable.
- (ldmain.o): Handle undefined EMUL error correctly.
- (ldemul-list.h): Depend on config.status rather than Makefile.
- Create via temporary file.
- (ver960.c, roll, make): Removed obsolete targets.
- (.dep, .dep1, dep.sed, dep, dep-in): New targets. Used to rebuild
- dependencies.
- * dep-in.sed: New file, used when rebuilding dependencies.
-
-Sat Dec 11 14:43:44 1993 Ian Lance Taylor (ian@deneb.cygnus.com)
-
- Made many changes to eliminate gcc warnings. Made various
- cosmetic changes, declared various things in header files, removed
- various extern declarations from .c files. No substantive
- changes.
-
- * ldlang.c (lang_process): Ifdef out final call to
- lang_size_sections again (reverting change of Nove 2), since it
- breaks the Sun4 linker.
-
-Thu Dec 2 16:31:47 1993 Ian Lance Taylor (ian@tweedledumb.cygnus.com)
-
- * configure.in (alpha-*-netware*): New target; use alpha.
-
-Wed Dec 1 14:04:20 1993 Ken Raeburn (raeburn@cygnus.com)
-
- * configure.in: Group targets by CPU. Merge some m68k target
- entries with different CPU specs that use the same ld_target
- values.
-
- * configure.in: Add sparc*-*-coff.
- * config/coff-sparc.mt, emulparams/coff_sparc.sh: New files.
- * Makefile.in (ALL_EMULATIONS): Add em_coff_sparc.o.
- (em_coff_sparc.c): Add dependencies and build rules.
-
- * ldmisc.c (errno, sys_nerr, sys_errlist): Don't declare.
-
-Wed Dec 1 12:19:55 1993 Ian Lance Taylor (ian@tweedledumb.cygnus.com)
-
- * ldgram.y (OPTION_call_shared, OPTION_non_shared, OPTION_Oval):
- New tokens.
- (command_line_option): Accept and ignore them (for now).
- * ldlex.l (<COMMAND>): Handle -non_shared, -call_shared, and -On
- where n is a number.
-
-Mon Nov 22 14:14:29 1993 Ian Lance Taylor (ian@tweedledumb.cygnus.com)
-
- * ldmain.c (subfile_wanted_p): If merging a common symbol which is
- not in bfd_com_section, create the section in the BFD so that it
- can be placed in the right output section.
-
-Fri Nov 19 14:12:39 1993 Ian Lance Taylor (ian@tweedledumb.cygnus.com)
-
- * configure.in (mips*-sgi-irix5*): New target. Use mipsb-elf32.
- * emulparams/elf32mipsb.sh (DATA_ADDR): Define.
- (OTHER_READONLY_SECTIONS): Define for .reginfo.
- (EXECUTABLE_SYMBOLS): Define for _DYNAMIC_LINK.
- * scripttempl/elf.sc: Use EXECUTABLE_SYMBOLS when not relocating.
- Move OTHER_READONLY_SECTIONS after all the other readonly
- sections. Don't use DATA_ADDR twice.
-
- * ldmain.c (enter_file_symbols): Removed duplicate tests of p. If
- p is in a common section, make sure the BFD has a section of that
- name.
-
- * ldlang.c (lang_common): Add newline to error message.
-
-Thu Nov 11 15:54:41 1993 Stan Shebs (shebs@rtl.cygnus.com)
-
- * emulparams/m68klynx.sh (SCRIPT_NAME): Define to use a
- Lynx-specific script instead of m68kcoff.
- (OUTPUT_FORMAT): Define as "coff-m68k-lynx".
- (ENTRY): Define as __main.
- (TEXT_START_ADDR): Define as 0.
- (PAGE_SIZE): Define as 0x1000.
- * emulparams/i386lynx.sh, emulparams/sparclynx.sh: Fix comment.
- * scripttempl/m68klynx.sc: New file.
-
-Mon Nov 8 12:00:16 1993 Ian Lance Taylor (ian@tweedledumb.cygnus.com)
-
- * ldmain.c (get_emulation): Ignore -mips1, -mips2 and -mips3
- arguments rather than treating them as emulation names.
-
-Fri Nov 5 09:02:52 1993 D. V. Henkel-Wallace (gumby@blues.cygnus.com)
-
- * configure.in: Support x86 unixware and netware plus generic netware.
-
-Fri Nov 5 21:47:55 1993 David J. Mackenzie (djm@thepub.cygnus.com)
-
- * emulparams/i386mach.sh (TEXT_START_ADDR, NONPAGED_TEXT_START_ADDR):
- Correct values (?).
-
-Wed Nov 3 15:10:15 1993 Ken Raeburn (raeburn@rover.cygnus.com)
-
- * Makefile.in (distclean): Don't delete dvi or info files.
- (ld.info): Update dependency list.
- (ld.dvi): Ditto. Extend TEXINPUTS to get bfdsumm.texi.
-
-Wed Nov 3 12:07:39 1993 David J. Mackenzie (djm@thepub.cygnus.com)
-
- * ldlang.c (lang_add_output): Take new arg, FROM_SCRIPT.
- Set output_filename instead of creating a new node.
- (open_output): Don't set output_filename.
- (lang_final): Create the new node here.
- * ldlang.c, ldlang.h, ldgram.y, mri.c: pass FROM_SCRIPT.
-
-Tue Nov 2 15:45:51 1993 Jeffrey A. Law (law@snake.cs.utah.edu)
-
- From Pete Hoogenboom (hoogen@cs.utah.edu):
-
- * scripttempl/hppaosf.sc: (___stack_zero, etext, _etext,
- edata, _edata, end): Add definitions of these symbols.
- (__end): Remove definition of this symbol.
- (__data_start): Move definition of this symbol.
-
- * emultempl/hppaosf.em: Various fixes and support for linker stub
- generation.
- (hppaosf_finish, hppaosf_search_for_padding_statements,
- hppaosf_create_output_section_statements): New functions in
- support of linker stub generation.
- (ld_hppaosf_emulation): Redefine to include new
- emulation-specific routines.
-
- * ldlang.c (lang_process): Re-enable last call lang_size_sections.
- Pass abs_output_section rather than NULL to avoid invalidating
- absolute symbols.
-
-Thu Oct 28 21:16:42 1993 David J. Mackenzie (djm@thepub.cygnus.com)
-
- * Makefile.in (ALL_EMULATIONS): Add em_i386mach.o.
- (em_i386mach.c): New rule.
- * configure.in (i[34]86-*-mach*): New case.
- * config/i386-mach.mt: New file.
- * emulparams/i386mach.sh: New file.
-
-Fri Oct 29 14:55:05 1993 Ian Lance Taylor (ian@tweedledumb.cygnus.com)
-
- * ld.h (flag_is_*): Removed macros.
- * ldmain.c (enter_global_ref), ldsym.c (write_file_locals):
- Consistently check the BFD symbol flags directly, rather than
- using file_is_* macros.
-
-Thu Oct 28 19:08:42 1993 Stan Shebs (shebs@rtl.cygnus.com)
-
- * configure.in (sparc*-*-lynxos*): New target.
- * Makefile.in: Add rule for em_sparclynx.c.
- (ALL_EMULATIONS): Add Lynx emulations.
- * config/sparc-lynx.mt: New file.
- * emulparams/sparclynx.sh: New file.
- * scripttempl/sparccoff.sc: New file.
-
-Thu Oct 28 13:50:25 1993 Ian Lance Taylor (ian@tweedledumb.cygnus.com)
-
- * Makefile.in: Add dependency for $(EMULATION_OFILES).
-
-Mon Oct 25 16:09:24 1993 Ian Lance Taylor (ian@tweedledumb.cygnus.com)
-
- * relax.c (write_relax): Check return value of bfd_seclet_link.
-
-Mon Oct 25 09:31:21 1993 Ken Raeburn (raeburn@cygnus.com)
-
- * ldlang.c (delete_output_file_on_failure): New variable.
- (open_output): Set it after bfd open succeeds.
- * ldmisc.c (vfinfo): Test it.
-
- Changes from Peter Hoogenboom, hoogen@cs.utah.edu:
-
- * ldsym.c (write_file_locals): Set the BSF_FILE flag for object
- symbols.
-
- * ldemul.c: Support was added to allow emulation-specific
- processing to occur. This support was added primarily for linker
- stub generation in the elf32-hppa gld.
- (ldemul_finish, ldemul_create_output_section_statements): New
- functions.
- * ldemul.h: Support was added to allow emulation-specific
- processing to occur. (As described above.) Added finish and
- create_output_section_statements fields to
- ld_emulation_xfer_struct structure.
- * ldlang.c: Add calls to emulation-specific routines.
- (lang_process): Add call to
- ldemul_create_output_section_statements function.
- (lang_process): Add call to a emulation-specific routine (and
- some processing after the call).
-
-Fri Oct 22 20:54:13 1993 david d `zoo' zuhn (zoo@rtl.cygnus.com)
-
- * configure.in: mips*- instead of mips-, mips*el changes
-
-Tue Oct 19 15:46:28 1993 Ian Lance Taylor (ian@tweedledumb.cygnus.com)
-
- * configure.in (alpha-*-osf*): New target; use alpha.mt.
- * Makefile.in (ALL_EMULATIONS): Added em_alpha.o.
- (em_alpha.c): New target; use alpha.sh and alpha.sc.
- * config/alphaosf.mh (NATIVE_LIB_DIRS, HOSTING_CRT0): Define.
- * config/alpha.mt: New file.
- * emulparams/alpha.sh: New file.
- * scripttempl/alpha.sc: New file.
-
-Fri Oct 15 02:20:04 1993 Doug Evans (dje@canuck.cygnus.com)
-
- * ldlang.c (lang_size_sections, lang_common): ALIGN_N can't handle
- types of different sizes (eg: 64 and 32 bits), so coerce.
- * ld.h (ALIGN_N): Add warning about usage.
-
-Wed Oct 13 16:02:39 1993 Ian Lance Taylor (ian@tweedledumb.cygnus.com)
-
- * ldmain.c (enter_global_ref): Just ignore any weak symbol for
- which we already have a definition, rather than checking in
- several different places whether the symbol is weak.
-
-Tue Oct 12 17:30:51 1993 Ian Lance Taylor (ian@tweedledumb.cygnus.com)
-
- * configure.in (mips-*-elf*): New target; use mipsb-elf32.
- * scripttempl/elf.sc: Only use OTHER_READONLY_SECTIONS and
- OTHER_READWRITE_SECTIONS if relocating. Shell variables are not
- expanded within them.
- * config/mipsb-elf32.mt: New file.
- * emulparams/elf32mipb.sh: New file.
- * Makefile.in (em_elf32mipb.c): New target.
-
-Thu Sep 30 17:00:36 1993 Rob Savoye (rob@darkstar.cygnus.com)
-
- * ldgram.y: In input_list, change lang_input_file_is_file_enum to
- lang_input_file_is_search_file_enum so objects brought in using
- INPUT() do a path lookup.
-
-Tue Sep 28 13:31:23 1993 Stan Shebs (shebs@rtl.cygnus.com)
-
- * configure.in: Change Lynx ld_target to be {i386,m68k}-lynx
- instead of {i386,m68k}-coff.
- * Makefile.in (em_i386lynx.c, em_m68klynx.c): New targets.
- * config/i386-lynx.mt: New file.
- * config/m68k-lynx.mt: New file.
- * emulparams/i386lynx.sh: New file.
- * emulparams/m68klynx.sh: New file.
-
- * scripttempl/i386coff.sc: Make ENTRY get its value from ${ENTRY},
- but defaulting to _start.
-
- * ldemul.c, ldfile.c, ldlang.c, ldmain.c, ldmisc.c, ldmisc.h,
- ldsym.c, ldwarn.c: Rename info to info_msg, to avoid conflict with
- LynxOS libc.
-
-Thu Sep 23 14:51:03 1993 Ian Lance Taylor (ian@cygnus.com)
-
- * config/solaris2.mh: New file. Define HOSTING_CRT0 and
- HOSTING_LIBS for testing.
-
-Fri Sep 17 17:52:24 1993 Ian Lance Taylor (ian@tweedledumb.cygnus.com)
-
- Finish up support for i386-sysv4 (without shared libraries):
- * ld.h (flag_is_weak): Define.
- * ldlang.c (print_symbol): Mention whether symbol is weak.
- (print_input_section): Print weak symbols as globals.
- * ldmain.c (refize): Do not zero out BSF_WEAK flag.
- (enter_global_ref): Do not warn if a weak symbol redefines a
- global symbol. Do not let a weak symbol redefine a common symbol.
- (enter_file_symbols): Treat weak symbols as global symbols.
- (subfile_wanted_p): Do not pull in an object file from a archive
- just to resolve an undefined weak symbol.
- * ldmisc.c (vfinfo): Don't needlessly malloc space after a fatal
- error; the error might be that malloc has run out of space.
- * ldsym.c (write_file_locals): Treat weak symbols as global.
- * configure.in (i[34]86-*-sysv4*, i[34]86-*-elf*): New targets;
- use i386-elf.
- * config/i386v4.mh: New file; set NATIVE_LIB_DIRS to /usr/ccs/lib.
- * config/i386-elf.mt: New file; set EMUL to elf_i386.
- * emulparams/elf_i386.sh: New file.
- * scripttempl/elf.sc: Use ${NOP} as filler (defaults to 0).
- * Makefile.in (NATIVE_LIB_DIRS): Define to be empty.
- (ALL_EMULATIONS): Add em_elf_i386.o.
- (GENSCRIPTS): Pass NATIVE_LIB_DIRS as sixth argument.
- (em_elf_i386.c): New target, like other em_*.c targets.
- ($(LD_PROG)): Pass $(CFLAGS) to $(CC).
- * genscripts.sh: Accept NATIVE_LIB_DIRS as sixth argument. If
- nonempty, and configured for native, add it to LIB_PATH.
-
-Fri Sep 17 13:07:39 1993 Stan Shebs (shebs@rtl.cygnus.com)
-
- * scripttempl/{h8300.sc,h8500.sc,i386coff.sc,m68kcoff.sc,sh.sc}:
- Added statements to pass stab and stabstr sections through and
- mark them as NOLOAD, which makes GDB happier.
-
-Wed Sep 15 16:02:29 1993 Stan Shebs (shebs@rtl.cygnus.com)
-
- * configure.in: Accept m68k-lynx-lynxos config.
-
- * Makefile.in: Use $(SHELL) to run genscripts.sh.
-
-Sun Sep 12 16:04:40 1993 Doug Evans (dje@cygnus.com)
-
- * config/coff-h8300.mt: Add EMUL=h8300h.
-
- * ldmain.c (main): Call set_scripts_dir after argv has been processed.
-
-Fri Sep 10 09:36:29 1993 Jeffrey Wheat (cassidy@cygnus.com)
-
- * Makefile.in: Changed CXX back to g++.
-
-Fri Sep 10 09:34:29 1993 Jeffrey Wheat (cassidy@cygnus.com)
-
- * Makefile.in: Fixed RUNTEST* CXX CXXFLAGS macros and check rule.
-
-Fri Sep 10 07:26:57 1993 David J. Mackenzie (djm@thepub.cygnus.com)
-
- * Makefile.in (TAGS): Use shell wildcards.
-
-Tue Sep 7 18:04:54 1993 Jeffrey Osier (jeffrey@cygnus.com)
-
- * Makefile.in: add TEXINPUTS variable and use it in ld.dvi target
-
-Fri Sep 3 16:46:41 1993 Roland H. Pesch (pesch@fowanton.cygnus.com)
-
- * ld.texinfo: re-enable included config file; conditionalize doc
- for -oformat to interact properly with SingleFormat doc config
- var; rename @up/@down to @raisesections/@lowersections.
-
-Wed Aug 25 16:29:56 1993 K. Richard Pixley (rich@sendai.cygnus.com)
-
- * configure.in: recognize m88110.
-
-Tue Aug 24 18:49:40 1993 Ken Raeburn (raeburn@cambridge.cygnus.com)
-
- From Peter Hoogenboom <hoogen@shafer.cs.utah.edu>:
- * emultempl/hppaosf.em (ld_hppaosf_emulation): Correct name for PA
- ELF emulation is "elf32-hppa" not "elf-big".
- (hppaosf_before_parse): Remove unneeded processing of environment
- variables.
- * scripttempl/hppaosf.sc: Include .hppa_linker_stubs sections in
- .text segment of output file.
- * emulparams/hppaosf.sh (OUTPUT_FORMAT): Use elf32-hppa.
-
-Tue Aug 24 16:17:00 1993 K. Richard Pixley (rich@sendai.cygnus.com)
-
- * ld.h: define BYTE_SIZE, SHORT_SIZE, and LONG_SIZE which are no
- longer in bfd.h.
-
- * ldlang.c, ld.h: updated copyright.
-
-Tue Aug 17 15:22:03 1993 Ian Lance Taylor (ian@tweedledumb.cygnus.com)
-
- * ldlang.c (open_output, lang_check): Check return value of
- bfd_set_arch_mach.
-
-Tue Aug 17 07:02:19 1993 Steve Chamberlain (sac@phydeaux.cygnus.com)
-
- * scripttempl/h8500.sc: Start all sections in a different segment.
- * scripttempl/z8ksim.sc: Handle constructors
-
-Thu Aug 12 16:05:37 1993 Jeffrey Wheat (cassidy@cygnus.com)
-
- * Makefile.in: revert earlier changes back to execute runtest
- with make check. cdtest and bootstrap now function as they
- did within the Makefile.
-
-Thu Aug 12 10:20:05 1993 David J. Mackenzie (djm@thepub.cygnus.com)
-
- * Makefile.in: Update dependencies.
-
- * configure.in: Set EMULATION_OFILES in Makefile based on
- --with-targets option.
-
-Thu Aug 12 08:52:29 1993 Jeffrey Wheat (cassidy@cygnus.com)
-
- * Makefile.in: check targets reimplemented to old way.
-
-Wed Aug 11 08:26:11 1993 Ian Lance Taylor (ian@cygnus.com)
-
- * config/i386v.mh, config/irix4.mh: Use gcc
- -print-libgcc-file-name rather than $(libdir)/libgcc.a.
- * config/i386sco.mh: New file; copy of i386v.mh to correspond to
- bfd/configure.host change.
-
-Mon Aug 9 14:25:35 1993 Ken Raeburn (raeburn@cambridge.cygnus.com)
-
- * scripttempl/elf.sc: Handle .line and .debug* sections.
-
- * ldlex.l: Use bfd_scan_vma, not strtoul.
-
-Fri Aug 6 08:57:39 1993 David J. Mackenzie (djm@thepub.cygnus.com)
-
- * ldexp.c, ldfile.c, ldlang.c, lexsup.c, ldmain.c, ldemul.c:
- Remove inital caps in some error messages, change "can't" to
- "cannot", add missing colons.
- * ldmisc.c (vfinfo): Print "%%" as a single %.
- For '%' followed by unrecognized character, print them both
- verbatim instead of expecting a char * arg.
- For '%C', don't put the function name in parens.
-
- * ldexp.c (invalid): Pass "%%", not "% ".
-
-Fri Aug 6 14:31:22 1993 Ian Lance Taylor (ian@tweedledumb.cygnus.com)
-
- * scripttempl/mips.sc: Always define _ftext, _fdata, _fbss.
- (BSS_VAR): Removed; now always define _fbss.
- * emulparams/mipsidt.sh, emulparams/mipsidtl.sh (BSS_VAR):
- Removed.
-
-Thu Aug 5 15:55:19 1993 david d `zoo' zuhn (zoo@rtl.cygnus.com)
-
- * configure.in: z8k-coff is the same as z8k-sim
-
-Wed Aug 4 21:00:18 1993 Jeffrey Wheat (cassidy@cygnus.com)
-
- * testsuite/lib/ld.exp: new file
- * testsuite/config/unix-ld.exp: new file
- * testsuite/ld.bootstrap/bootstrap.exp: new file
- * Makefile.in: add dejagnu support for make check
-
-Wed Aug 4 17:52:32 1993 David J. Mackenzie (djm@thepub.cygnus.com)
-
- * ldlex.l (comment): Add missing newline in message.
- * ldindr.c (add_indirect): Ditto.
- * ldexp.c (exp_fold_tree): Ditto.
-
-Tue Aug 3 10:57:41 1993 David J. Mackenzie (djm@thepub.cygnus.com)
-
- * ldgram.y, ldlex.l, mri.c, ldwrite.c: Change multiple commons
- into externs.
-
- * ldmisc.c (multiple_warn): New function.
- * ldmisc.h: Declare it.
- * ldmain.c (enter_global_ref): Call it.
- * ld.h (ld_config_type): Add warn_common.
- * ldlex.l, ldgram.y: Set it with -warn-common option.
- * ldver.c (help): Document it.
-
-Mon Aug 2 12:04:36 1993 Ken Raeburn (raeburn@cambridge.cygnus.com)
-
- * scripttempl/elf.sc: Add hooks for .sdata, .sbss, and
- target-specific sections, and for changing data section vma.
-
-Mon Jul 26 14:00:02 1993 Ken Raeburn (raeburn@deneb.cygnus.com)
-
- * ldgram.y (OPTION_Qy, OPTION_Y, OPTION_dn, OPTION_YP): New
- terminals, for Solaris.
- (dirlist_ptr): New static variable.
- (command_line_option): Accept new options.
-
- * ldlex.l: Accept command-line options "-Qy", "-dn", "-Y", and
- "-YP,...".
-
- * config/sun4sol2.mt: Pass emulation name without ".sh".
-
- * emulparams/elf32_sparc.c: Renamed from elf32-sparc.c.
- * config/sun4sol2.mt (em_elf32_sparc.c): Adjusted accordingly.
-
-Fri Jul 23 13:51:09 1993 Ken Raeburn (raeburn@cambridge.cygnus.com)
-
- * scripttempl/elf.sc: Add support for .init, .fini, .ctors,
- .dtors, .data1, .rodata1 sections, instead of combining them into
- other sections. For `-r', set all section start addresses to
- zero.
-
- * emulparams/elf32-sparc.sh (TEXT_START_ADDR,
- NONPAGED_TEXT_START_ADDR): Value should be 0x10100.
- (MAXPAGESIZE): Renamed from PAGE_SIZE.
-
-Wed Jul 21 14:28:42 1993 David J. Mackenzie (djm@thepub.cygnus.com)
-
- * genscripts.sh: If this is the default emulation, set
- COMPILE_IN.
- * emultempl/*.em: Use it to determine whether to compile in the
- scripts.
-
- * Makefile.in (GENSCRIPTS): Pass the default emulation name to
- genscripts.sh. Pass the current emulation name without ".sh" on
- the end.
- * genscripts.sh: Take an default emulation arg.
- Use the current emulation name as EMULATION_NAME.
- Make default lib path for cross-compiling ':', not null.
- * emulparams/*.sh: Don't set EMULATION_NAME.
- * ldemul.c (ldemul_get_script): Take isfile arg.
- Pass it to emulation's get_script function.
- * ldemul.h: Adjust get_script prototypes.
- * ldfile.c (ldfile_find_command_file): Renamed from find_a_name.
- No longer static.
- * ldfile.h: Declare it.
- * ldgram.y: Accept a script on the command line again,
- for parsing compiled-in scripts.
- * ldmain.c (main): If ld script is a file, parse it as a -T
- option, otherwise parse it directly.
- * emultempl/*.em (*get_script): Return the scripts themselves if
- this is the default emulation; otherwise return their file names.
- * emultempl/m88kbcs.em: New file, to take m88kbcs #ifdef out of
- generic.em.
- * emulparams/m88kbcs.sh: Use it.
-
- * ld.h (ld_config_type::unix_relocate): Remove unused element.
-
-Tue Jul 20 12:01:49 1993 Ken Raeburn (raeburn@cambridge.cygnus.com)
-
- * Makefile.in (ALL_EMULATIONS): Delete em_i386linux.o (for which
- there's no change log entry yet, tsk tsk) from the list of
- emulations compiled in until Mark gets around to checking in
- emulparams/i386linux.sh.
- (ldemul-list.h): Depend on Makefile, so if EMULATION_OFILES is
- changed, this file gets updated.
-
-Fri Jul 16 14:14:32 1993 Ian Lance Taylor (ian@cygnus.com)
-
- * ldgram.y (OPTION_Lfile): New token.
- (command_line_option): Accept OPTION_L NAME (whitespace after -L).
- * ldlex.l (<COMMAND>): Accept -L without FILENAME.
-
-Fri Jul 16 13:44:26 1993 Doug Evans (dje@canuck.cygnus.com)
-
- * configure.in: h8/300h support needs own .mt file.
- config/coff-h8300h.mt: New file.
-
-Thu Jul 15 12:44:35 1993 David J. Mackenzie (djm@thepub.cygnus.com)
-
- * ldmain.c: Don't include sys/stat.h; it already got included
- somewhere along the way.
-
-Thu Jul 15 14:43:34 1993 Doug Evans (dje@canuck.cygnus.com)
-
- * Makefile.in: Add h8300h support.
- emulparams/h8300h.sh: New file.
- scripttempl/h8300h.sc: New file.
-
-Thu Jul 15 12:44:35 1993 David J. Mackenzie (djm@thepub.cygnus.com)
-
- * ldfile.c (ldfile_open_file): In error message, use the name the
- user gave (e.g., "-lc"), rather than the base file name.
-
- * ldexp.c (exp_fold_tree): Don't assign an int to an enum.
-
- * ldmain.[ch]: Remove initial Q_ from function names.
- * ldexp.c, ldindr.c, ldlang.c: Change callers.
-
- * ldfile.c, ldmain.c, ldgram.y: Rename option_v to trace_file_tries.
-
- * ldlang.c (lang_process): Move loading of default script from
- here to main. Add a "/" to start of script name to prevent
- finding it in "." first.
-
- * ldmain.c (set_scripts_dir): Don't look in "." first.
-
- * ldgram.y, ldlang.c, ldsym.c: Remove traces of unused var
- option_longmap.
-
-Thu Jul 15 10:55:59 1993 Ian Lance Taylor (ian@cygnus.com)
-
- * Makefile.in (em_m88kbcs.c): Correct dependency.
- * scripttempl/m88kbcs.sc: It's ARCH, not arch. Removed TARGET
- statement. Changed OUTPUT_FORMAT to use ${OUTPUT_FORMAT}.
- * emulparams/m88kbcs.sh: It's coff-m88kbcs, not m88kbcs.
-
-Wed Jul 14 21:42:53 1993 David J. Mackenzie (djm@thepub.cygnus.com)
-
- * ldfile.c (ldlang_open_file, ldfile_open_command_file),
- main.c (main): Print the errno string in the error message.
-
-Tue Jul 13 20:00:30 1993 Doug Evans (dje@canuck.cygnus.com)
-
- * configure.in: Accept h8300h for target cpu.
-
- * ldmisc.c (vfinfo): Have demangle remove leading underscore if
- present (demangle is smart enough to know whether to do it or not).
-
-Mon Jul 12 11:45:48 1993 David J. Mackenzie (djm@thepub.cygnus.com)
-
- * ldmain.c (set_scripts_dir): Check . and <ld bin dir>/../lib for
- ldscripts, as well as <ld bin dir> and SCRIPTDIR.
-
- * ldlang.c (lang_process): Use sizeof instead of magic constant.
-
- * ldmain.c (get_emulation, check_for_scripts_dir,
- set_scripts_dir): New functions.
- (main): Call them.
-
-Mon Jul 12 10:57:03 1993 Ken Raeburn (raeburn@deneb.cygnus.com)
-
- * scripttempl/elf.sc: Include .init, .fini, .rodata sections.
- Create symbol "end" instead of "__end". Comment out some parts
- that may not be needed (yet) for elf.
-
- * configure.in: Accept sparc-elf and sparc-solaris2 configs.
-
-Thu Jul 8 15:33:32 1993 Ken Raeburn (raeburn@cambridge.cygnus.com)
-
- * Makefile.in (ALL_EMULATIONS): Include $(OTHER_EMULATIONS).
-
- * ldmisc.h (einfo, minfo, info): Don't bother with PARAMS macro
- when no prototype is being supplied.
- (ldmalloc, ldrealloc): Size argument is now size_t.
-
- * ldmisc.c (finfo): New function, accepts FILE* argument.
- (vfinfo, case 'v'): New format character; displays bfd_vma in hex
- without leading zeros.
- (vfinfo, cases 'R' and 'C'): Use finfo(%v) when displaying a
- bfd_vma value, instead of fprintf(%x) which won't hold a long long
- value.
- (concat, buystring): String lengths are size_t.
- (ldmalloc, ldrealloc, xrealloc): Size argument is now size_t.
-
- * ldlang.c (new_statement): Size argument is now size_t. Added
- forward declaration with prototype.
-
-Thu Jul 8 10:53:47 1993 David J. Mackenzie (djm@thepub.cygnus.com)
-
- * ldgram.y (OPTION_v): Don't turn on verbose output.
-
-Wed Jul 7 17:10:45 1993 Ken Raeburn (raeburn@cambridge.cygnus.com)
-
- * ldlex.l: Get rid of local typedef for bfd_vma! Get it from
- bfd.h instead.
-
-Wed Jul 7 11:33:12 1993 Ian Lance Taylor (ian@cygnus.com)
-
- * Makefile.in (install): Don't install as $(tooldir)/bin/gld;
- collect2 doesn't look for gld any more anyhow.
-
-Mon Jul 5 14:29:48 1993 Ian Lance Taylor (ian@cygnus.com)
-
- * ldlang.c (lang_relocate_globals): Skip indirect symbols, which
- now have a non NULL srefs_chain.
-
- * config/hp300hpux.mt: Use emulation hp3hpux rather than
- hp300hpux, since the latter does not exist.
-
-Fri Jul 2 18:06:05 1993 David J. Mackenzie (djm@thepub.cygnus.com)
-
- * genscripts.sh: Put the scripts in the ldscripts directory, not
- emulations.
- * configure.in (ldscripts): Make, instead of emulations.
- * Makefile.in (scriptdir): Take off the "ld" part.
- (install, clean, distclean): Use ldscripts, not emulations.
- In tests, don't pass -Lemulations.
- Don't pass tooldir/lib to genscripts.sh.
- * genscripts.sh: Don't take tooldir/lib arg.
- * ldlang.c (lang_process): Add "ldscripts/" to the name of the
- default script file.
-
-Fri Jul 2 17:13:35 1993 Doug Evans (dje@canuck.cygnus.com)
-
- * scripttempl/h8300.sc: Add .tors section for constructor/destructors.
-
-Thu Jul 1 16:38:45 1993 Doug Evans (dje@canuck.cygnus.com)
-
- * config/coff-h8300.mt: EMUL=h8300hms -> h8300.
-
-Wed Jun 30 15:45:55 1993 K. Richard Pixley (rich@sendai.cygnus.com)
-
- * Makefile.in (.y.c): skip default .y.c rules. gnu make can now
- run in parallel without colliding on yacc's static file names.
- Without the stub rule, make will try to start two yacc's
- concurrently which fails because of yacc's static file names.
-
-Tue Jun 29 12:20:36 1993 Ian Lance Taylor (ian@cygnus.com)
-
- * ldmain.c (subfile_wanted_p): Don't dump core if there are no
- symbols.
-
-Mon Jun 28 12:22:11 1993 David J. Mackenzie (djm@thepub.cygnus.com)
-
- * genscripts.sh (LIB_PATH): Only add /usr/local/lib if it's
- different from libdir.
-
- * Makefile.in (scriptdir): Base on tooldir, not datadir.
-
-Sat Jun 26 12:03:57 1993 David J. Mackenzie (djm@thepub.cygnus.com)
-
- * ldver.c (help): New function.
- * ldver.h: Declare it.
- * ldlex.l, ldgram.y: Recognize new options --help and --version.
-
-Mon Jun 21 20:39:48 1993 Ken Raeburn (raeburn@poseidon.cygnus.com)
-
- * Makefile.in (INCLUDES): Don't need ../include any more.
-
-Mon Jun 21 16:38:35 1993 David J. Mackenzie (djm@thepub.cygnus.com)
-
- * ldlex.l, ldgram.y: Support new -oformat option.
- Remove attempt at supporting script fragments on the command line.
- * ldlang.c (lang_add_output_format): Take new arg, FROM_SCRIPT.
- * mri.c (mri_format), ldgram.y: Change callers.
- * ldlang.h: Change prototype.
-
-Thu Jun 17 16:53:56 1993 david d `zoo' zuhn (zoo@cygnus.com)
-
- * Makefile.in: canonicalize install.sh; for use within
- this directory (and subdirs)
-
-Thu Jun 17 14:33:09 1993 David J. Mackenzie (djm@thepub.cygnus.com)
-
- * ldgram.y: Tweak grammar to make reporting of invalid options work.
-
- * Makefile.in (.cc.o): Restore .SUFFIXES entry for .cc
- and .cc.o rule.
-
-Wed Jun 16 11:45:32 1993 David J. Mackenzie (djm@thepub.cygnus.com)
-
- * ldfile.c (ldfile_open_command): Don't try .ld extension.
- It wasn't documented (or likely used) and wastes time.
- (try_open): If EXTEN is empty, don't try it.
-
- * ldctor.c, lderror.c, ldexp.c, ldfile.c, ldindr.c, ldlang.c,
- ldlex.l, ldmain.c, ldmisc.c, ldsym.c, ldver.c, ldwarn.c,
- ldwrite.c, lexsup.c, mri.c, relax.c: Replace DEFUN macro calls
- with normal function declarations.
-
- * Move *.em to emultempl/*.em. Move *.sh to emulparams/*.sh.
- Move *.sc-sh to scripttempl/*.sc.
- * {emultempl,emulparams,scripttempl}/README: New files.
- * emultempl/sh.em, emultempl/st2000.em, emultempl/z8ksim.em,
- emultempl/h8300hms.em, emultempl/h8500hms.em: Files removed,
- replaced with generic.em.
- * emulparams/h8300.sh, emulparams/h8500.sh, scripttempl/h8300.sc,
- scripttempl/h8500.sc: Renamed from h8[35]00hms.s[ch]. Change
- their contents to omit the "hms".
-
- * *.em (*_get_script): Return script name instead of script contents.
- * ldlang.c (lang_process): Change caller.
-
- * ldlex.l, ldgram.y: Recognize -m option.
- Check for input files after *all* options in grammar.
- * ldmain.c (main): Check for -m options. Add default directory
- for -m.
-
- * mkscript.c: File removed.
- * genscripts.sh: Take two more parameters, tooldirlib and libdir,
- to add to the default LIB_PATH.
- Look for input files in the new subdirectories.
- Create the scripts in emulations subdirectory and don't filter
- them through mkscript.
- * configure.in: Make the emulations subdirectory.
-
- * Makefile.in: Account for all of the above changes.
- Remove unused .SUFFIXES. Get libgcc.a path with gcc
- -print-libgcc-file-name instead of $(libdir)/libgcc.a.
- Put CFLAGS last in the compilation rules.
- Add -I../bfd to INCLUDES so sysdep.h is found.
-
-Tue Jun 15 23:04:46 1993 Ken Raeburn (raeburn@cambridge.cygnus.com)
-
- * Makefile.in (INCLUDES): Look in ../include, not ../bfd.
-
- * scripttempl/aout.sc, emulparams/aout.sh: Add SHLIB_PATH like
- STACKZERO. Make STACKZERO dependent on RELOCATING, not
- RELOCATION.
- * emulparams/hp3hpux.sh (SHLIB_PATH): Define it.
-
-Mon Jun 14 19:06:15 1993 David J. Mackenzie (djm@thepub.cygnus.com)
-
- * ldfile.c (try_open): If opening without the extension fails,
- try with the extension even if -v or -V was given.
- had_script is imported (from ldgram.y), not exported.
-
-Mon Jun 14 16:26:10 1993 david d `zoo' zuhn (zoo at rtl.cygnus.com)
-
- * Makefile.in: remove parentdir support, use INSTALL_XFORM
-
-Thu Jun 10 14:00:06 1993 Ian Lance Taylor (ian@cygnus.com)
-
- * ldexp.c (exp_fold_tree): Don't lose the old flag bits.
- * ldgram.y (statement_list_opt): New nonterminal, either empty or
- statement_list.
- (section): Use statement_list_opt, not statement_list.
- * scripttempl/m68kcoff.sc, emulparams/m68kcoff.sh: Gather
- constructors and destructors and define __CTOR_LIST__ and
- __DTOR_LIST__ appropriately.
- * scripttempl/sa29200.sc, emulparams/sa29200.sh: Gather
- constructors and destructors and define ___CTOR_LIST__ and
- ___DTOR_LIST__ appropriately.
-
-Mon Jun 7 12:53:28 1993 Per Bothner (bothner@rtl.cygnus.com)
-
- * Makefile.in (INCLUDES): Add -I../bfd for sysdep.h and bfd.h.
- * configure.in: No longer need to configure to get sysdep.h.
-
-Fri Jun 4 16:18:24 1993 david d `zoo' zuhn (zoo at cirdan.cygnus.com)
-
- * Makefile.in: remove install:all and install-info:info
- dependencies (these cause some spurious rebuilds at 'make install'
- time)
-
-Fri Jun 4 08:50:14 1993 Ian Lance Taylor (ian@cygnus.com)
-
- * configure.in (mips-idt-ecoffl*): New target; use mips-idtl.
- (mips-idt-ecoff*): Added trailing '*'.
- * config/mips-idtl.mt: New file; use EMUL of mipsidtl.
- * emulparams/mipsidtl.sh: New file; like mipsidt.sh, but little
- endian.
- * Makefile.in (ALL_EMULATIONS): Added em_mipsidtl.o.
-
- * config/sun3.mh (HOSTING_LIBS, HOSTING_EMU): Removed obsolete and
- incorrect definitions.
-
-Tue Jun 1 14:56:10 1993 Per Bothner (bothner@rtl.cygnus.com)
-
- * ldsym.c (write_file_locals): Write BSF_CONSTRUCTOR
- symbols, unless stripping.
-
-Tue May 25 15:34:25 1993 Ian Lance Taylor (ian@cygnus.com)
-
- * Makefile.in: configure looks for ####, so remove lines with many
- '#' characters.
- * config/irix4.mh, config/i386v.mh: New files; set HOSTING_CRT0
- and HOSTING_LIBS correctly so that ``make check'' will work.
-
-Thu May 20 13:56:16 1993 Per Bothner (bothner@deneb.cygnus.com)
-
- * scripttempl/mips.sc, emulparams/mips.sh: Define _etext, _edata,
- and _end, in addition to etext, edata, and end. Needed for IRIX
- 4.0.5F. Patch from mwp@iconix.oz.au (Michael Paddon).
-
- * Version 2.2.1 released.
-
-Thu May 20 11:42:06 1993 Ken Raeburn (raeburn@cambridge.cygnus.com)
-
- * scripttempl/mipsbsd.sc, emulparams/mipsbsd.sh: Renamed from
- aout-mipsbsd.sc-sh.
- * emulparams/mipsbsd.sh (EMULATION_NAME): Use new file name.
-
-Tue May 18 17:10:24 1993 Ken Raeburn (raeburn@cambridge.cygnus.com)
-
- * Makefile.in (LDDISTSTUFF): Remove ld.mm since we can't build it
- properly right now.
-
- * Version 2.2 released.
-
-Mon May 17 15:37:28 1993 Ken Raeburn (raeburn@deneb.cygnus.com)
-
- * ldver.c (ldversion): Bump version number to 2.2.
-
-Mon May 17 12:44:31 1993 Per Bothner (bothner@cygnus.com)
-
- * NEWS: New file.
-
-Fri May 14 11:26:24 1993 Ian Lance Taylor (ian@cygnus.com)
-
- * scripttempl/mips.sc, emulparams/mips.sh: Don't define BSS_VAR
- unless relocating.
-
-Wed May 12 13:33:29 1993 Ian Lance Taylor (ian@cygnus.com)
-
- * Makefile.in (mkscript.o, mkscript): Build mkscript via
- mkscript.o, rather than directly from mkscript.c.
-
-Tue May 4 21:58:56 1993 Ken Raeburn (raeburn@cambridge.cygnus.com)
-
- * configure.in: Look for ${target_makefile_frag} relative to
- ${srcdir}, not relative to build directory.
-
- * emultempl/hppaosf.em, scripttempl/hppaosf.sc,
- emulparams/hppaosf.sh: New files.
- * configure.in: Recognize hppa*-hp-osf.
- * Makefile.in (ALL_EMULATIONS): Include hppaosf emulation.
- (em_hppaosf.c): Build it.
- * config/hppaosf.mh, config/hppaosf.mt: New files.
-
- * ld.h (ALIGN_N): Renamed from ALIGN, because that conflicted with
- some system header files. All uses changed.
-
- * configure.in: Recognize i386-aix configurations as i386-coff
- targets.
-
- * configure.in: Recognize m68*-*-hpux.
- * scripttempl/aout.sc: If STACKZERO and RELOCATING are both defined, output
- the value of STACKZERO.
- * Makefile.in (ALL_EMULATIONS): Include hp300-hpux emulation.
- (em_hp3hpux.c): Build it.
- * emulparams/hp3hpux.sh, config/hp300hpux.mt: New files.
-
-Tue May 4 12:37:35 1993 Ian Lance Taylor (ian@cygnus.com)
-
- * scripttempl/mips.sc: Put constructors in the .data section.
- * Makefile.in (cdtest): Added dependency on ld.new.
-
-Mon May 3 19:43:39 1993 Per Bothner (bothner@cygnus.com)
-
- * Makefile.in: Change definition of $(tooldir) to match FSF.
- * emulparams/vax.sh, config/vax.mt, configure.in, Makefile.in:
- Support VAX Ultrix and BSD.
-
-Mon Apr 26 18:35:47 1993 Steve Chamberlain (sac@thepub.cygnus.com)
-
- * emultempl/sh.em, emulparams/sh.sh, scripttempl/sh.sc: New
- files supporting Hitachi SH.
-
-Wed Apr 14 21:01:51 1993 John Gilmore (gnu@cygnus.com)
-
- * ldlang.h (struct memory_region): Change `length' and
- `old_length' fields to bfd_size_type. Eliminate use of bfd_offset.
- * ldlang.c, mri.c: Corresponding changes, plus lint.
-
-Thu Apr 8 22:08:18 1993 Ian Lance Taylor (ian@cygnus.com)
-
- * configure.in: For all i386 targets, accept i486 as well.
-
-Mon Apr 5 17:33:39 1993 Ian Lance Taylor (ian@cygnus.com)
-
- * ldlang.c (wild_doit): Preserve all flags for a
- SEC_SHARED_LIBRARY section.
- (size_input_section): Consider any SEC_HAS_CONTENTS section when
- computing largest_section.
-
-Fri Apr 2 14:33:52 1993 Ian Lance Taylor (ian@cygnus.com)
-
- * ldlang.c (lang_output_section_statement_lookup): Initialize all
- fields of newly created structure.
-
-Wed Mar 31 18:19:15 1993 Ian Lance Taylor (ian@cygnus.com)
-
- * ldmain.c (g_switch_value): New variable.
- * ldgram.y (OPTION_G, OPTION_Gval): New tokens.
- (command_line_option): Accept -G and set g_switch_value.
- * ldlex.l (COMMAND): Accept -G.
- * ldlang.c (open_output): Call bfd_set_gp_size on new BFD.
-
-Tue Mar 30 09:40:25 1993 Steve Chamberlain (sac@thepub.cygnus.com)
-
- Support for linking and loading at different places:
-
- * ldlex.l: Add "AT" keyword.
- * ldgram.y: Cleanup, and parse AT.
- * ldlang.c (print_output_section_statement): Print output address
- of section in map. (lang_size_sections): Fill sections' lma with
- load address.
- * ldlang.h (lang_output_section_statement_type): Add load_base
- information.
-
- * ldindr.c (add_indirect): Keep more information in the alias
- symbol chain.
- * ldlang.c (wild_doit): Don't inherit NEVER_LOAD section
- attribute from an input section.
- * ldmain.c (Q_enter_file_symbols): Common section is NEVER_LOAD by
- default. (Q_enter_file_symbos): Indirect symbols now are known by
- their section, not a special symbol flag.
- * ldsym.c (write_file_locals): Indirect symbols aren't local.
- (write_file_globals): Write the mapping for an indirect symbol.
- * relax.c (build_it): When forced to write a NEVER_LOAD section,
- fill it with zeros.
-
-Tue Mar 23 13:24:10 1993 Jeffrey Osier (jeffrey@fowanton.cygnus.com)
-
- * ld.texinfo: changes for q1
-
-Tue Mar 23 00:13:29 1993 david d `zoo' zuhn (zoo at cirdan.cygnus.com)
-
- * Makefile.in: add dvi target, define & use TEXI2DVI, add installcheck
-
-Mon Mar 8 20:30:35 1993 david d `zoo' zuhn (zoo at cirdan.cygnus.com)
-
- * Makefile.in: rename HOST_CC to CC_FOR_BUILD
-
-Thu Mar 4 12:44:33 1993 Ian Lance Taylor (ian@cygnus.com)
-
- * mips.sc-sh: Added variables which may be overridden by a
- specific emulation.
- * emulparams/mipsidt.sh: New file; emulation for IDT MIPS board.
- * Makefile.in (ALL_EMULATIONS): Added em_mipsidt.o.
- (em_mipsidt.c): New target. Uses mipsidt.sh and mips.sc-sh.
- * config/mips-idt.mt: New file; sets EMUL to mipsidt.
- * configure.in (mips-idt-ecoff): New target; uses mips-idt.
-
-Sat Feb 27 00:00:14 1993 Ken Raeburn (raeburn@cambridge.cygnus.com)
-
- * aout-mipsbsd.sc-sh, emulparams/mipsbsd.sh: New files from Ralph
- Campbell, ralphc@pyramid.com.
- * emulparams/i386bsd.sh, config/i386bsd.mt: New files.
- * configure.in, Makefile.in: Added support for mipsbsd and 386bsd.
-
-Thu Feb 25 15:33:10 1993 Per Bothner (bothner@rtl.cygnus.com)
-
- * mri.c: Add extern declaration of strdup.
- * ldsym.c (KEEP macro): Add spaces around '=' for the
- sake of old (e.g. PCC) compilers.
-
-Wed Feb 24 19:49:31 1993 Per Bothner (bothner@rtl.cygnus.com)
-
- * ldver.c: Bump to version 2.1.
-
-Fri Feb 12 08:09:11 1993 Steve Chamberlain (sac@thepub.cygnus.com)
-
- * ldgram.y: allow section types without address expressions.
- * ldlang.c (lang_relocate_globals): avoid possible hang with
- undefined but unreferenced symbols.
- * relax.c (relax_section): don't complain if the script file isn't
- relaxable but -relax is set
-
-Thu Feb 18 17:58:45 1993 david d `zoo' zuhn (zoo at cirdan.cygnus.com)
-
- * configure.in: go32 is the 3rd part of the triple, not the 2nd
-
-Wed Feb 3 09:05:56 1993 Ian Lance Taylor (ian@cygnus.com)
-
- * emulparams/mipsbig.sh: New file. Big endian MIPS emulation.
- * config/mips-big.mt: New file. Use mipsbig emulation.
- * configure.in (mips-sgi-irix*): Use target mips-big.
- * Makefile.in (ALL_EMULATIONS): Added em_mipsbig.o.
- (em_mipsbig.c): New target. Uses mipsbig.sh.
-
-Tue Feb 2 11:32:27 1993 Ian Lance Taylor (ian@cygnus.com)
-
- * mips.sc-sh: Put .scommon sections into .sbss section.
-
- * ldmain.c (subfile_wanted_p): Preserve section of common symbols,
- rather than always putting them in bfd_com_section.
- * ldlang.c (lang_common): If a common symbol is not in
- bfd_com_section, put in a section of the same name, rather than
- always putting it in section COMMON.
-
-Fri Jan 29 09:57:58 1993 Ian Lance Taylor (ian@cygnus.com)
-
- * ldmain.c (subfile_wanted_p): If we already have a common
- definition of a symbol, don't necessarily pull in an object file
- that provides a non-common definition.
-
- * ldlex.l (COMMAND): Accept -EB and -EL command line arguments,
- returning OPTION_EB and OPTION_EL. gcc passes these to a MIPS
- linker.
- * ldgram.y (OPTION_EB, OPTION_EL): New tokens.
- (command_line_option): Accept and ignore OPTION_EB and OPTION_EL.
-
-Thu Jan 28 15:12:04 1993 Ian Lance Taylor (ian@cygnus.com)
-
- * Makefile.in (install): Remove $(tooldir)/bin/gld before creating
- the link to it.
-
-Tue Jan 26 11:49:50 1993 Ian Lance Taylor (ian@cygnus.com)
-
- * ldmain.c, ldsym.c: Use new bfd_is_com_section macro rather than
- checking for equality to bfd_com_section.
-
-Fri Jan 22 14:22:44 1993 Ian Lance Taylor (ian@cygnus.com)
-
- * mips.sc-sh: New file. Ultrix, and hopefully other MIPS ECOFF
- targets, linker script.
- * emulparams/mipslit.sh: New file. Little endian MIPS emulation.
- * config/mips-lit.mt: New file. Use mipslit emulation.
- * configure.in (mips-dec-ultrix*): Use target mips-lit.
- * Makefile.in (ALL_EMULATIONS): Added em_mipslit.o.
- (em_mipslit.c): New target. Uses mipslit.sh.
-
-Thu Jan 14 15:30:27 1993 Ian Lance Taylor (ian@cygnus.com)
-
- * Makefile.in (install): Install ld as both $(tooldir)/bin/ld and
- $(tooldir)/bin/gld, so that gcc can find it with or without
- collect2.
-
-Mon Jan 11 18:50:07 1993 Ian Lance Taylor (ian@tweedledumb.cygnus.com)
-
- * ldwrite.c: Removed perform_relocation, copy_and_relocate, and
- write_norel. All linking is now done via write_relax. Call
- ldsym_write before calling write_relax.
- * relax.c: Added copyright.
- (write_relax): Renamed from write_relaxnorel. Added relocateable
- argument. seclet_dump renamed to bfd_seclet_link.
- * relax.h: Added copyright.
-
-Mon Jan 11 15:41:56 1993 Steve Chamberlain (sac@thepub.cygnus.com)
-
- * ldmain.c (decode_library_subfile): Patch from
- hoogen@shafer.cs.utah.edu, don't reread library symbol tables.
-
-Fri Jan 8 18:04:33 1993 david d `zoo' zuhn (zoo at cirdan.cygnus.com)
-
- * config/vxworks960.mt renamed to config/i960.mt
-
- * configure.in: sparc-aout emulates a sun4, as does
- sparc*-vxworks, i960-nindy uses gld960 emulation
-
-Fri Jan 8 14:39:07 1993 Steve Chamberlain (sac@thepub.cygnus.com)
-
- Fix support for NOLOAD, add INCLUDE
- * ldfile.c (ldfile_open_command_file): pass file name to
- lex_push_file.
- * ldlex.l, ldgram.y: tidy up, parse INCLUDE and NOLOAD
- * ldlang.c (wild_doit): make output sections inherit NEVER_LOAD
- attribute.
-
-Thu Jan 7 10:22:19 1993 david d `zoo' zuhn (zoo at cirdan.cygnus.com)
-
- * Makefile.in, config.h: no more default emulation. Make the lack
- of emulation a compile time error
-
-Wed Jan 6 01:08:37 1993 david d `zoo' zuhn (zoo at cirdan.cygnus.com)
-
- * configure.in: recognise all sparclite variants, not just 'sparclite'
-
-Mon Dec 28 11:15:35 1992 Ian Lance Taylor (ian@cygnus.com)
-
- * scripttempl/m68kcoff.sc, emulparams/m68kcoff.sh: define _end as
- well as end, for consistency with aout.sc-sh.
-
- * configure.in: accept *-ericsson-ose for any m68k CPU.
-
- * ldwrite.c (write_rel): don't always set SEC_HAS_CONTENTS flag
- for each output section.
-
-Mon Dec 21 16:06:59 1992 Per Bothner (bothner@rtl.cygnus.com)
-
- * ldexp.c, ldlang.c, ldmain.c, ldsym.c, ldwarn.c: Use new
- macro bfd_asymbol_bfd as appropriate.
- * Makefile.in: Un-duplicate ldlex.c dependency.
- * configure.in: Replace my_host case table by sourcing
- ../bfd/configure.host. Allow std-host as the default.
- * ldmisc.c: Change logic for C++ name demangling: There is
- no initial '_' to remove from stab-derived function names.
-
-Sun Dec 13 16:31:26 1992 Steve Chamberlain (sac@thepub.cygnus.com)
-
- * ldlang.c (lang_init_script_file): don't attach the output file
- sections to the script file.
-
-Wed Dec 9 08:38:05 1992 Steve Chamberlain (sac@thepub.cygnus.com)
- * ldlang.c (wild): run expansion loop over command line bfd too.
- (lang_ini_script_file): initialize more parts of the command line
- bfd.
- * ldlex.l: fix DEFINED start states.
-
-Mon Dec 7 08:43:41 1992 Steve Chamberlain (sac@thepub.cygnus.com)
- -y support
- * ld.texinfo: new doc.
- * ldgram.y, ldlex.l: understand -y<symbol>
- * ldmain.c (Q_enter_file_symbols): if had -y, lookup symbol and
- print info. (add_ysym): new function.
- * ldsym.h: (ldsym_type): new define SYM_Y.
-
-Sat Nov 21 03:15:27 1992 John Gilmore (gnu@cygnus.com)
-
- * ldctor.h, lderror.h, ldexp.h, ldfile.h, ldindr.h, ldlang.c,
- ldlang.h, ldlex.h, ldmain.h, ldmisc.h, ldsym.h, ldver.h, ldwarn.h,
- ldwrite.h, relax.h: Replace all uses of EXFUN and PROTO ansi-glue
- macros with PARAMS. Recreational cleanup. Update copyrights.
-
-Tue Nov 10 00:23:37 1992 david d `zoo' zuhn (zoo at cirdan.cygnus.com)
-
- * Makefile.in: pass down the bfd source directory for includes
-
-Thu Nov 5 15:41:55 1992 Ian Lance Taylor (ian@cygnus.com)
-
- * ldlang.c (lang_size_sections): don't change size and address for
- SEC_SHARED_LIBRARY sections rather than for SEC_NEVER_LOAD
- sections.
-
-Thu Nov 5 11:33:57 1992 Steve Chamberlain (sac@thepub.cygnus.com)
-
- * relax.c (build_it): re-enable the processing of data_statements
- in scripts, makes counted contructor lists work again.
-
-Thu Nov 5 05:43:01 1992 John Gilmore (gnu@cygnus.com)
-
- * ldemul.h: Remove uses of SDEF and PROTO macros (use PARAMS).
-
-Tue Oct 20 10:56:06 1992 Ian Lance Taylor (ian@cygnus.com)
-
- * scripttempl/m68kcoff.sc, emulparams/m68kcoff.sh: don't use
- initial underscores for etext, edata and end.
-
-Mon Oct 19 09:45:38 1992 Ian Lance Taylor (ian@cygnus.com)
-
- * Support for i386-sysv.
- configure.in: check for i386-*-sysv* and i386-*-sco*.
- i386coff.sc-sh: rewrote to support SVR3 by default.
- ldctor.c (find_constructors): preserve stat_ptr.
- ldlang.c (wild_doit): initialize vma and size of new output
- section to corresponding input section. This is required for
- shared library support.
- (lang_size_sections): don't modify vma and size of sections which
- are never loaded (for shared libraries).
- ldwrite.c (copy_and_relocate): copy the contents of any section
- which has contents, not just sections which are loaded (for shared
- libraries).
-
-Thu Oct 15 15:20:26 1992 Steve Chamberlain (sac@thepub.cygnus.com)
-
- * ldlang.c (size_input_section): count the sizes of all sections
- we allocate.
-
-Thu Oct 8 09:05:25 1992 Steve Chamberlain (sac@thepub.cygnus.com)
-
- * ldmisc.c (demangle,vfinfo): use the new underscore in bfd to
- to demangle symbols better
-
-Tue Oct 6 13:08:54 1992 Ian Lance Taylor (ian@cygnus.com)
-
- * ldlang.c (lang_finish): don't warn if -e start symbol does not
- exist when linking with -r.
-
-Mon Oct 5 14:07:37 1992 Ian Lance Taylor (ian@cygnus.com)
-
- * scripttempl/aout.sc, emulparams/aout.sh,
- scripttempl/m68kcoff.sc, emulparams/m68kcoff.sh: set __bss_start
- to the start of the .bss segment.
-
-Mon Oct 5 08:55:14 1992 Steve Chamberlain (sac@thepub.cygnus.com)
-
- * ldmain.c (linear_library): don't even think about processing
- an object file if it's already been done
-
-Thu Oct 1 23:14:59 1992 david d `zoo' zuhn (zoo at cirdan.cygnus.com)
-
- * configure.in: the hp9000/300 config file is now hp300
-
-Wed Sep 30 07:34:09 1992 Steve Chamberlain (sac@thepub.cygnus.com)
-
- * config/z8ksim.mt: new file
-
-Fri Sep 25 13:49:52 1992 Ken Raeburn (raeburn@kyriath.cygnus.com)
-
- * Makefile.in (ldexp.o, ldctor.o, ldlang.o, ldmain.o, ldwrite.o,
- lexsup.o, mri.o, relax.o): Indicate dependence on ldgram.h.
-
- * ld.h (strip_symbols_type): Add value STRIP_SOME.
- * ldgram.y (OPTION_RETAIN_SYMBOLS_FILE): New terminal token.
- * ldlang.c (lang_add_keepsyms_file): New function.
- * ldlex.l: Handle "-retain-symbols-file".
- * ldsym.c (keepsyms_file, kept_syms): New vars.
- (process_keepsyms): New functihon; reads file, marks symbols for
- saving.
- (write_file_locals): File symbols should always be kept.
- (ldsym_write): Warn about "-retain-symbols-file" overriding "-S"
- and "-s". Process retain-symbols file before setting symtab.
- * ldsym.h (SYM_KEEP): New flag for ldsym_type flags.
- (keepsyms_file, kept_syms): Declare them.
-
- * ldmain.c (main): Non-fatal errors should still cause non-zero
- exit status even with -r.
-
-Fri Sep 25 11:08:01 1992 Steve Chamberlain (sac@thepub.cygnus.com)
-
- Added initial support for the z8k
- * emultempl/z8ksim.em, z8ksim.sc-sh, emulparams/z8ksim.sh: new
- files.
- * configure.in, Makefile.in: modified to reflect above
-
- * ldlang.c (lang_check): when linking conflicting architectures,
- make the output file reflect at least one of the bad inputs.
-
-Tue Sep 15 15:35:38 1992 Ian Lance Taylor (ian@cygnus.com)
-
- * Makefile.in (install): if $(tooldir) exists, install ld in
- $(tooldir)/bin.
-
-Fri Sep 11 10:24:22 1992 Steve Chamberlain (sac@thepub.cygnus.com)
-
- * Makefile.in, configure.in: modified to support i386-coff
- * i386coff.sh: new file
-
-Wed Sep 9 11:52:58 1992 Ian Lance Taylor (ian@cygnus.com)
-
- * Makefile.in, emulparams/m68kcoff.sh, scripttempl/m68kcoff.sc,
- emulparmas/m68kcoff.sh, config/m68k-coff.mt: added m68k-coff
- emulation mode, stolen from a29k emulation. Almost certainly
- wrong, but perhaps better than sun3.
-
-Thu Sep 3 14:19:30 1992 Per Bothner (bothner@rtl.cygnus.com)
-
- * Makefile.in, Makefile.dos, emultempl/generic.em, genscripts.sh,
- emultempl/gld960.em, emultempl/h8300hms.em,
- emultempl/h8300xray.em, emultempl/lnk960.em, emultempl/st2000.em,
- emultempl/vanilla.em: Rename all (generated) ld__*.c files to
- em_.c. This is one character shorter, and lets people build on
- SVR3 system. (ld__h8300xray.[co] was the killer there;
- h8300xray.sc-sh is also overlong, but seems harmless.)
- Based on a patch from Jonathan Ryshpan <hitachi!amito!jon>.
- * Makefile.in (clean): Fix typo mostclean -> mostlyclean.
- * configure.in: Add host isc.
-
- * ldver.c: Call it version 2.0.
-
-Wed Sep 2 00:21:33 1992 Per Bothner (bothner@rtl.cygnus.com)
-
- * ldver.c: Bump to version 0.98.
- * TODO: New file.
-
- * Makefile.in: Added mostlyclean, distclean, realclean rules.
-
-Tue Sep 1 23:42:16 1992 Per Bothner (bothner@rtl.cygnus.com)
-
- * ldmisc.c (xrealloc): New (needed by ../libiberty/cplus.dem.c).
- * ldlex.l: Moved comment() to end, since some compilers
- otherwise have problems with input() used before it is defined.
-
-Tue Sep 1 17:45:51 1992 david d `zoo' zuhn (zoo at cirdan.cygnus.com)
-
- * configure.in: added Solaris 2 and Irix 4 host support.
-
-Mon Aug 31 19:27:11 1992 david d `zoo' zuhn (zoo at cirdan.cygnus.com)
-
- * Makefile.in: remove -S flag from the FLEX definition
-
- * configure.in: rewrote, using new style case statement. use
- m68k.mt for m68k-aout systems
-
-Sun Aug 30 21:38:53 1992 Ian Lance Taylor (ian@cygnus.com)
-
- * Makefile.in: map "ld" through program_transform_name when
- installing.
-
-Sun Aug 30 18:12:13 1992 Per Bothner (bothner@rtl.cygnus.com)
-
- * cplus-dem.c: Removed. Use the version in libiberty now.
- * ldmisc.c: Use new libiberty version of cplus_demangle().
-
-Thu Aug 27 16:38:42 1992 Ian Lance Taylor (ian@cygnus.com)
-
- * emultempl/gld960.em (gld960_choose_target): default to little
- endian, not big endian.
-
-Wed Aug 26 17:28:51 1992 Steve Chamberlain (sac@thepub.cygnus.com)
-
- * ldlang.c (lang_process): don't pass null pointers when
- abs_output_section is what is required.
- * ldwrite.c (ldwrite): use malloc to allocate the largest space
- used, and pass that down.
- * relax.c, relax.h (write_relaxnorel): use the passed malloc area rather
- than alloca.
-
-Mon Aug 24 14:42:06 1992 Ian Lance Taylor (ian@cygnus.com)
-
- * configure.in, config/ose68.mt: renamed OSE to ose.
-
-Thu Aug 20 19:55:22 1992 Ken Raeburn (raeburn@cygnus.com)
-
- * ldsym.c (write_file_locals): Reorder check for common or
- undefined symbols so that it works.
-
-Tue Aug 18 13:41:36 1992 Ian Lance Taylor (ian@cygnus.com)
-
- * configure.in: accept all m68K family members.
-
- * Makefile.in: always create installation directories.
-
-Thu Aug 13 11:49:34 1992 Steve Chamberlain (sac@thepub.cygnus.com)
-
- * ldlex.l: now parses comment correctly, added ~ to acceptable
- chars in filenames
-
- * ldexp.c (exp_unop): pass down abs_output_section - now can have
- unary -ve constants.
-
- * ldlang.c (lang_finish): warn when an entry symbol supplied on
- the command line can't be found.
-
-Fri Aug 7 12:31:10 1992 Steve Chamberlain (sac@thepub.cygnus.com)
-
- * ldlang.h: add new field "loadable" to output_section_statement.
- * ldlang.c (lang_output_section_statement_lookup): initilize new
- field. (wild_doit): if new field is not set, then stop output
- section from being loadable.
- (lang_enter_output_section_statement): set the field from the
- NOLOAD keyword
- * ldgram.y: new synax for NOLOAD. Removes a shift/reduce too.
- * scripttempl/h8300hms.sc, emulparams/h8300.sh,
- emultempl/h8300hms.em: get -r right.
-
-Thu Aug 6 18:35:21 1992 Per Bothner (bothner@rtl.cygnus.com)
-
- * ldint.texinfo: New internals manual (beginnings thereof).
- * PORTING: Removed, merged into ldint.texinfo.
-
-Tue Aug 4 21:12:29 1992 Per Bothner (bothner@rtl.cygnus.com)
-
- * testsuite/ld-cdtest/cdtest-main.cc,
- testsuite/ld-cdtest/cdtest-func.cc,
- testsuite/ld-cdtest/cdtest-foo.h,
- testsuite/ld-cdtest/cdtest-foo.cc,
- testsuite/ld-cdtest/cdtest.exp: A test program (copied from
- libg++/test-install) that tests that constructor and destructors
- are handled corrrectly.
-
-Mon Aug 3 14:58:19 1992 david d `zoo' zuhn (zoo at cirdan.cygnus.com)
-
- * Makefile.in (install): install from ld.new, renaming during the
- copy, or else the next 'make install' needs to re-link ld.
-
-Mon Jul 20 03:37:06 1992 D. V. Henkel-Wallace (gumby@cygnus.com)
-
- * configure.in: generalise hp recognition (from sef).
-
-Sat Jul 18 14:46:04 1992 david d `zoo' zuhn (zoo at cirdan.cygnus.com)
-
- * configure.in: recognize bsd and hpux hppa configurations.
- error messages echo to stderr, not stdout
-
-Fri Jul 17 22:06:11 1992 K. Richard Pixley (rich@rtl.cygnus.com)
-
- * Makefile.dos, gld.1, ld.texinfo, ldemul.c, ldfile.c, ldlang.c,
- ldmisc.c: removed rcsid's.
-
-Tue Jul 14 08:34:34 1992 Steve Chamberlain (sac@thepub.cygnus.com)
-
- * ldlang.c (lang_map): print changes in sizes due to relaxing
- (size_input_section): maintain the delta information.
- * ldlang.h: add new field to struct to contain delta info.
- * relax.c (relax_section): complain if input not relaxable.
- * ldlex.l : add '_', ',' and '$' to chars which can appear at the
- start of a filename
-
-Mon Jul 13 17:33:00 1992 Steve Chamberlain (sac@thepub.cygnus.com)
-
- * ldmain.c(main): prevent -r and -relax from being on at the same
- time.
-
-Wed Jul 1 17:51:19 1992 Steve Chamberlain (sac@thepub.cygnus.com)
-
- * ldmain.c (Q_enter_global_ref), ldindr.c (add_indirect): fix for
- aliasing problems
-
-
-Thu Jun 18 09:38:56 1992 Steve Chamberlain (sac@thepub.cygnus.com)
-
- * emultempl/h8300hms.em, scripttempl/h8300hms.sc,
- emulparams/h83000.sh: do the right thing for -r
- * ldexp.c: lint
- * ldlang.c(open_output): set the target arch and machine as soon
- as we can. (lang_size_sections): use new macros for setting vma
- * ldwrite.c: lint
-
-Mon Jun 15 08:47:43 1992 Michael Tiemann (tiemann@rtl.cygnus.com)
-
- * configure.in (my_target): Accept m680?0 for wrs as vxworks68.
- Also deleted an unreachable path to wrs.
-
-Wed May 27 23:24:19 1992 Michael Tiemann (tiemann@rtl.cygnus.com)
-
- * Makefile.in (install): use -d test for $tooldir before
- installing ld there so that $tooldir can be inherited from
- top-level Makefile.
-
-Wed May 27 16:56:48 1992 Per Bothner (bothner@rtl.cygnus.com)
-
- * ldlang.c: Two non-substantial changes for the sake of
- the old Portable C Compiler.
-
-Wed May 27 15:15:58 1992 Steve Chamberlain (sac@thepub.cygnus.com)
-
- * ldgram.y, ldlex.l: parse ABSOLUTE
- * ldexp.c: add support for ABSOLUTE
-
-Wed May 27 13:07:20 1992 Per Bothner (bothner@rtl.cygnus.com)
-
- * Makefile.in: Added default definitions for HOSTING_CRT0,
- HOSTING_LIBS, and HOSTING_EMU, based on those in config/*.mh.
- * config/*.mh: Miscellaneous clean-up: Removed definitions
- of YACC (since it is not longer used in the Makefile).
- Remove HOSTING_* definitions that are subsumed by the
- ones added to Makefile.in. Removed most definitions of CC.
- * config/{sparc,news,hp300bsd,decstation}.mh: Removed;
- These are no longer needed.
-
-Fri May 22 13:47:19 1992 Per Bothner (bothner@cygnus.com)
-
- * Makefile.in: Use srcdir instead of VPATH in ldgram/ldlex
- rules, since these are used when building a distribution.
- * Makefile.in (ldlex.c): Don't re-direct output, since that
- leaves a bogus output files if it fails.
-
- * config/sparc.mh: Fix HOSTING_LIBS so it has a chance of working.
- * ldlex.c: Fix some unnecessary flex-specific-isms.
-
-Fri May 8 11:49:43 1992 Steve Chamberlain (sac@thepub.cygnus.com)
-
- * ldgram.y: move spurious semicolon
- * ldexp.h: fix prototype
-
-Thu May 7 17:01:12 1992 Roland H. Pesch (pesch@fowanton.cygnus.com)
-
- * ld.texinfo: references to linker now say "ld" not "gld".
-
-Wed May 6 13:26:19 1992 Steve Chamberlain (sac@thepub.cygnus.com)
-
- changed calling convention for Q_enter_global_ref
- * ldexp.c, ldlang.c, ldmain.c: reflect this
- * ldver.c: bump version to 1.97.1
- * ldindr.c (add_indirect): when an edict declaring an indirect
- symbol is found, make sure that any ideas about the symbol being
- common are changed if it now known to be defined.
- * ldmain.c (linear_library): complain once if archive isn't
- ranlibbed.
- * ldlang.h, ldlang.c: make room for and initialize the complain
- once field.
-
-Wed May 6 11:07:35 1992 K. Richard Pixley (rich@rtl.cygnus.com)
-
- * Makefile.in: use flex & bison from ../ if they exist.
-
-Tue May 5 17:47:33 1992 Steve Chamberlain (sac@thepub.cygnus.com)
-
- * relax.c (build_it): don't allocate space in the output file for
- stuff if -R flag applys to it.
- * ldfile.c: merge in VMS filename support
- * ldmain.c (main): take out ./ from library path, and close file
- before unlinking. Make multiple defs of a symbol create an
- unexecable file.
- * ldmisc.c: fatal errosrs delete output file
-
-Tue May 5 14:05:05 1992 Per Bothner (bothner@rtl.cygnus.com)
-
- * ldver.c: Increase version number to 1.97, for consistency
- with ../binutils.
-
-Tue May 5 12:12:24 1992 K. Richard Pixley (rich@cygnus.com)
-
- * Makefile.in: FLEX -> LEX.
-
- * ld.texinfo: {} -> @{@}.
-
-Mon May 4 17:52:41 1992 Roland H. Pesch (pesch@fowanton.cygnus.com)
-
- * ld.texinfo: describe alternate, MRI-compatible linker scripts
- (and associated change in -c option, now used for these scripts)
-
-Mon May 4 16:10:10 1992 Steve Chamberlain (sac@thepub.cygnus.com)
-
- * ldver.c: Bumped version to 1.96 - new release, resync with the
- bfd too #.
- * ldexp.c, ldlang.c: now build memory shape tree in obstacks
- rather than with raw malloc, makes it easier to track where memory
- is going.
- * ldsym.h, ldsym.c: create obstack for all global symbols too.
- * ldwrite.c (ldwrite): moved malloc so only used when needed.
- * sa29200-sc.sh: added support for .lit, data1 and data2 sections.
-
-
-Fri May 1 18:17:52 1992 K. Richard Pixley (rich@cygnus.com)
-
- * config/sparc.mh: use ../gcc/libgcc.a on check if it exists.
-
- * Makefile.in: use bootstrap for check.
-
-Fri May 1 13:03:41 1992 Steve Chamberlain (sac@thepub.cygnus.com)
-
- * ldgram.y, ldlex.c, mri.c: added more compatible words; BASE, ALIAS and
- PUBLIC.
- * Makefile.in: now use flex, not lex
- * ldlex.l, ldlang.c, ldctor.c: lint
-
-Wed Apr 22 12:48:42 1992 Steve Chamberlain (sac@thepub.cygnus.com)
-
- * ldlex.l: added CMDFILENAMECHAR state so that you can lex
- different sorts of filenames on the command line than in a script.
-
-Mon Apr 20 22:37:04 1992 K. Richard Pixley (rich@rtl.cygnus.com)
-
- * Makefile.in: rework CFLAGS so that they can be passed on the
- make command line. Remove MINUS_G. Default CFLAGS to -g.
-
-Fri Apr 17 08:57:17 1992 Steve Chamberlain (sac@thepub.cygnus.com)
-
- * relax.c: added handling for new "padding" seclet type, used to
- fill out gaps between section.
- * ldgram.y, ldlex.l: now -defsym on the command line is done
- properly.
-
-Wed Apr 15 21:20:07 1992 K. Richard Pixley (rich@rtl.cygnus.com)
-
- * Makefile.in: the tooldir copy of ld goes directly in tooldir.
-
-Wed Apr 15 16:09:33 1992 Steve Chamberlain (sac@thepub.cygnus.com)
-
- * mri.c, ldgram.y, ldlex.l: added support for minimal strange link
- scripts.
-
-Thu Apr 9 05:52:02 1992 Ken Raeburn (Raeburn@Cygnus.COM)
-
- * Makefile.in (install): Install second copy in $(tooldir)/bin
- without $(program_prefix), since that's what gcc expects.
-
-Sat Apr 4 17:44:06 1992 Steve Chamberlain (sac@thepub.cygnus.com)
-
- * ldlex.l, ldgram.y, ldlex.h: Rewrote lexer. Now it's much nicer.
- * h8300*: fix bit rot and add support for h8300xray target
- * emulparams/go32.sh: target emulation for go32.
-
-Mon Mar 16 14:53:29 1992 Steve Chamberlain (sac@rtl.cygnus.com)
-
- * emultempl/gld960.em, scripttempl/i960.sc,
- emulparamns/i960.sh. Fix i960 bit rot
-
-Fri Mar 13 19:47:22 1992 K. Richard Pixley (rich@cygnus.com)
-
- * Makefile.in: install man page.
-
-Fri Mar 13 08:23:59 1992 Steve Chamberlain (sac@thepub.cygnus.com)
-
- * config/mt-<foo> renamed to <foo>.mt
- * config/mh-<foo> renamed to <foo>.mt
- * configure.in changed to reflect this
- * genscripts.sh now make .xbn files rather than .xN files
-
-Sat Mar 7 03:40:40 1992 K. Richard Pixley (rich@cygnus.com)
-
- * ldver.h: fix decl of ldversion.
-
-Fri Mar 6 22:00:35 1992 K. Richard Pixley (rich@cygnus.com)
-
- * Makefile.in: added check target.
-
-Fri Mar 6 06:59:04 1992 Steve Chamberlain (sac@thepub.cygnus.com)
-
- * ldmain.c (Q_enter_file_symbols): now aliases work again
-
-Thu Mar 5 21:39:29 1992 K. Richard Pixley (rich@cygnus.com)
-
- * Makefile.in: added clean-info target.
-
-Thu Mar 5 16:55:56 1992 Steve Chamberlain (sac@thepub.cygnus.com)
-
- * ldexp.c (exp_print_tree): don't try and follow null pointers
- around.
- * ldgram.y: remove 11 shift reduce errors
-
-Tue Mar 3 15:46:39 1992 K. Richard Pixley (rich@rtl.cygnus.com)
-
- * Makefile.in: added tooldir and program_prefix.
-
-Fri Feb 28 08:17:45 1992 Steve Chamberlain (sac at thepub.cygnus.com)
-
- * ldlang.c (size_input_section): don't move absolute sections
- around!
-
-
-Thu Feb 27 09:20:41 1992 Steve Chamberlain (sac at thepub.cygnus.com)
-
- * cplus-dem.c: yet another copy of this - maybe it should go into
- libiberty ?
- * ldgram.y: now -V and -v have different actions
- * ldver.c: if -V, prints list of emulations compiled in
- * ldmisc.c: support for cplus demangling
-
-
-Wed Feb 26 18:04:40 1992 K. Richard Pixley (rich@cygnus.com)
-
- * Makefile.in, configure.in: removed traces of namesubdir,
- -subdirs, $(subdir), $(unsubdir), some rcs triggers. Forced
- copyrights to '92, changed some from Cygnus to FSF.
-
-Thu Feb 20 17:43:46 1992 Per Bothner (bothner at cygnus.com)
-
- * Makefile.in: Change mkscript rule into one for ./mkscript
- (for the sake of makes that don't realize they're the same).
- * PORTING: Add more details.
- * genscripts.sh: Add more tailorability of DATA_ALIGNMENT.
-
-Mon Feb 17 12:04:36 1992 Per Bothner (bothner at cygnus.com)
-
- * Makefile.in, and new files hp300bsd.sh, config/mh-hp300bsd,
- config/mt-hp300bsd: New port to hp300 running BSD.
-
-Sat Feb 15 13:59:54 1992 Per Bothner (bothner at cygnus.com)
-
- Major rewrite of how ld is configured. The major idea
- is to use shell scripts to generate everything.
- * generic.em replaces ldtemplate.
- * Other *.em files replace various *.c files.
- A *.em file is a shell script that generates the corresponding
- ld__*.c file that implements an emulation. This is usually
- a straight 'cat' of a here-document, possibly with substitutions.
- * Script files (*.sc) are places by *.sc-sh scripts.
- Again, these are simple shell scripts that 'cat'
- here-documents, usually with some substitutions.
- The output a *.sc-sh is a script file.
- * Each emulation is defined by a short shell script with
- extension *.sh that specifies the emulation-specific
- parameters (such as the name of the *.sh-sc and *.em
- files to use).
- * genscript.sh is the master shell script used to generate
- an emulation. It is passed various argument, including
- the name a the emulation-speciic *.sh file that it
- "sources" to set variables to emulation-specifc parameters.
- * config/mt-foo: Changed EMUL=GLDFOO_EMULATION_NAME
- to EMUL=foo. (The GLDFOO_EMULATION_NAMEs have bee removed.)
- * config/mh-foo: Rename LDEMULATION names as appropriate
- (usually 'gldfoo' -> plain 'foo').
- * ldwrite.c: Fixed a typo in a comment.
- * Makefile.in: Major changes. Removed some the sed
- magic to converts scripts, since that is now handled
- by genscripts.sh and the *.sc-sh scipt generators.
- * config.h: Remove a bunch of macros defining emulations
- and targets. This becomes one less file to edit when
- adding emulations or targets.
- * ldemul.h (struct ld_emulation_xfer_struct): Add
- emulation_name and target_name fields.
- * ldemul.c, ldemul.h: Define some default functions used
- by most emulations (and remove from the *.em scripts).
- * ldemul.c (ldemul_choose_target): Search the new
- ld_emulations array using a loop (instead of a hardwired
- nested if statement).
- Define the ld_emulation from the automatically-geenrated
- ldemul-list.h. This means you no longer have to edit ldemul.c
- to add a new emulation.
- * ldmain.c: Replace {GLD,LNK}960_EMULATION_NAME by
- their expansions, since the former no longer exist.
- * PORTING: A very rough first draft of a porting guide.
-
- * ldgram.y, ldlex.l, lexsup.c: Changes to allow an assignment
- to be terminated by a new-line (instead of requiring a semicolon).
-
-Mon Feb 10 16:21:02 1992 Steve Chamberlain (sac at rtl.cygnus.com)
-
- * ldexp.c, ldlang.c: added new idea "abs_output_section", removes
- tests for NULL pointers all over the place.
- * ldlang.c (lang_process): remember to relocate global symbols
- *after* relaxing has done it stuff.
-
-Thu Feb 6 11:40:15 1992 Steve Chamberlain (sac at rtl.cygnus.com)
-
- * config/mt-coff-h8300: use EMUL like everything else
- * ldlang.c: (print_padding_statement): print the right address.
- * Makefile.in, config.h, ldemul.c: renamed h8300hds to h8300hms
-
-
-Tue Feb 4 15:28:01 1992 Steve Chamberlain (sac at rtl.cygnus.com)
-
- * ldlex.l: Put pack -noinhibit-exec and -sort-common
- * ldlang.c (print_data_statement): print the right address.
-
-Thu Jan 30 17:51:53 1992 Per Bothner (bothner at cygnus.com)
-
- * Makefile.in: The rule for testing ld by re-linking itself
- via an intermediate -r link was moved to the ld1 rule
- instead of the ld2 rule. This allows ld2 and ld3 to be identical,
- which allows the bootstrap rule to work.
- * ldctor.c (find_constructors): Don't create a constructor
- list if it is already defined (as would happen if ld is
- invoked by collect).
-
-Wed Jan 29 08:35:39 1992 Steve Chamberlain (sac at rtl.cygnus.com)
-
- * config/mh-sparc.h: now uses libgcc.a
- * ldmain.c: quit using exit
- * *sc: use *(COMMON) rather than [COMMON]
- * ldlex.l, lexsup.c: much thinking moved from .l and put into .c,
- to allow preprocessing of .l file.
- * Makefile.in: New ldlex.l mangling
- * ldexp.c (fold_binary): perform expressions with % and / in
- integer.
- * ldfile.c (open_a): open archives on VMS in a special way
-
-
-Tue Jan 28 10:18:16 1992 Steve Chamberlain (sac at rtl.cygnus.com)
-
- * ldgram.y: map -M behave in the same way as -Map (sets file name
- to be "-".
- * ldsym.c, ldlang.c: remember that size of a section is dependent on
- whether or not relaxing has been done.
- * ldmain.c: don't open a map file if it doesn't have a name
- * relax.c: all the brains have moved into bfd.
- * ldwrite.c: ammend comment
-
-Fri Jan 24 14:23:46 1992 Steve Chamberlain (sac at rtl.cygnus.com)
-
- * Makefile.in: added relax, also made three stage go through a
- partial link stage.
- * relax.c : added
- * config.h: if GNU960 defined, then default emulation mode is
- GLD960
- * ldexp.h, ldexp.c: map to file hooks
- * ldlang.c: map to file hooks
- * ldgram.y: added -Map -relax
- * ldlex.l: added -relax, -Map
- * ldmain.c: open map file
- * ldmisc.c: support for map file
- * ldwrite.c: new relax magic
-
-Thu Dec 19 18:49:51 1991 John Gilmore (gnu at cygnus.com)
-
- * Makefile.in, config/tm-*.h: Clean up make output, only
- pass DEFAULT_EMULATION to ldmain.c.
-
-Wed Dec 18 15:02:47 1991 Per Bothner (bothner at cygnus.com)
-
- * ldver.c: Bump to version 1.94.
-
-Tue Dec 10 04:07:23 1991 K. Richard Pixley (rich at rtl.cygnus.com)
-
- * Makefile.in: infodir belongs in datadir.
-
-Mon Dec 9 16:26:43 1991 Per Bothner (bothner at cygnus.com)
-
- * Makefile.in: Pass -y to bison. (Again;
- accidentally deleted by Rich.)
- * scripttempl/news.sc, scripttempl/ldgld68k.sc: Define __end as
- well as _end.
-
-Sat Dec 7 17:19:26 1991 Steve Chamberlain (sac at rtl.cygnus.com)
-
- * ldindr.h: added to contain prototypes of ldindr.c
- * ldfile.c: include ctype.h
- * ldmain.c: include the requried prototype headers
- * ldwrite.c: get_reloc_upper_bound has been renamed
- bfd_get_reloc_upper_bound
-
-Fri Dec 6 23:29:26 1991 K. Richard Pixley (rich at rtl.cygnus.com)
-
- * Makefile.in: punt "fundamental" mode because it breaks my emacs
- macros. install using INSTALL_PROGRAM and INSTALL_DATA. remove
- spaces following hyphens, bsd make can't cope. added
- standards.text support and made it look like all the other
- makefiles.
-
- * configure.in: configure now runs entirely in objdir so make file
- existence checks against ${srcdir}. Mark this directory as
- target dependent.
-
-Thu Dec 5 22:46:16 1991 K. Richard Pixley (rich at rtl.cygnus.com)
-
- * Makefile.in: idestdir and ddestdir go away. Added copyrights
- and shift gpl to v2. Added ChangeLog if it didn't exist. docdir
- and mandir now keyed off datadir by default.
-
-Wed Dec 4 23:36:55 1991 Per Bothner (bothner at cygnus.com)
-
- * ldver.c: Bumped version to 1.93.
- * Makefile.in: Pass -y to bison.
-
-Mon Nov 25 18:28:40 1991 Steve Chamberlain (sac at cygnus.com)
-
- * config.h: h8 is now coff, not ieee
- * h8300hds.sc: reflect the same
-
-Thu Nov 14 19:55:09 1991 Per Bothner (bothner at cygnus.com)
-
- * ldver.c (ldversion()): Update to 1.92.
- * ldctor.c: There are two places constructor sets
- can be defined. One of them checked for an existing
- duplicate, the other didn't. Unfortunately, the latter
- was called after the former ...
- So, factor out code for inserting a new element into
- constructor_name_list (after checking for a duplicate)
- into a new function add_constructor_name, and call
- it from both aforementioned places (ldlang_add_constructor
- and ldlang_check_for_constructors).
-
-Wed Nov 13 15:17:43 1991 Per Bothner (bothner at cygnus.com)
-
- * Makefile.in: Rename .c files generated from ldtemplate
- to have names starting with ld__. This helps 'make clean'.
-
-Tue Nov 12 18:36:50 1991 Steve Chamberlain (sac at cygnus.com)
-
- * Makefile.in: Take out the version number for install
- * scripttempl/m88kbcs.sc: put in contructor blocks.
-
-Mon Nov 11 18:47:33 1991 Per Bothner (bothner at cygnus.com)
-
- * ldmisc.c, ldmisc.h: Re-write info() to take a filename
- parameter, a format, and an arg pointer, and rename it to
- vfinfo(). Write info() in terms of new vfinfo().
- New einfo() is the same as info(), except it writes to stderr.
- * ldemul.c, ldexp.c, ldlang.c, ldlnk960.c, ldmain.c, ldwrite.c,
- ldmisc.c: Replace "error" calls to info() by new einfo().
-
-Mon Nov 11 09:57:32 1991 Steve Chamberlain (steve at cygnus.com)
-
- * ldlex.l ldgram.y: made -V option do same as -v
- * Makefile.in: Added $(MINUS_G) flag so debugging can be
- turned off
-
-Sun Nov 3 16:37:37 1991 Steve Chamberlain (steve at cygnus.com)
- i386 aout changes from Bob Kukura
- * Makefile.in, config.h: added i386aout support
- * configure.in: fixed /h-{myhost} typo
- * ldgram.y: -MM now gives more boring map.
- * ldlang.c: now does D_PAGED flag the right way.
- * ldsym.c: -MM flags does the right thing.
-
-Sun Nov 3 15:00:03 1991 Per Bothner (bothner at cygnus.com)
-
- * configure.in: Fixed typo. Also, a fix for hp300bsd.
- * ldlang.c (init_os): Compensate for BFD change,
- where bfd_make_section now returns NULL for a duplicate
- section request, instead of the old section.
-
-Thu Oct 17 15:27:13 1991 Per Bothner (bothner at cygnus.com)
-
- * ldver.c: Bump to version 1.91 (consistent with binutils).
-
-Wed Oct 16 12:27:08 1991 Per Bothner (bothner at cygnus.com)
-
- * Makefile.in, config.h, ld.h, ldemul.c, ldexp.c, ldexp.h,
- ldgram.y, ldlex.l, ldlnk960.c, ldmain.c, ldmisc.c, ldmisc.h,
- ldsym.c, ldsym.h, ldtemplate, ldvanilla.c, ldver.c, ldver.h,
- ldwarn.c, ldwarn.h, ldwrite.c, ldwrite.h, mkscript.c:
- Add or update copyright notices.
-
-Mon Oct 14 23:55:27 1991 Per Bothner (bothner at cygnus.com)
-
- * README: New file.
- * Makefile.in: Changed installation directory name scheme
- to be consistent with gcc. Also changed 'install'.
-
-Mon Oct 14 17:30:02 1991 Roland H. Pesch (pesch at cygnus.com)
-
- * Makefile.in: new targets ld.mm, ld.me
-
-Mon Oct 14 17:27:24 1991 Per Bothner (bothner at cygnus.com)
-
- * Makefile.in, ldtemplate: Need to use separate scripts
- for -n and -N options. Yet more complication.
-
-Fri Oct 11 22:40:46 1991 John Gilmore (gnu at cygnus.com)
-
- * Makefile.in: Avoid using $< in explicit Make rules (it doesn't
- work). Add some lines to avoid Sun Make VPATH bugs.
-
-Fri Oct 11 16:42:22 1991 Per Bothner (bothner at cygnus.com)
-
- * scripttempl/news.sc: Add alignment for data segment.
- * ldtemplate: Add (yet another) script to get for -n or -N
- options. (These need different alignment than ZMAGIC files.)
- * Makefile.in: Add stuff for new foo.xn scripts.
- These are generated by replacing "ALIGN(0x...00)" by ".".
-
-Fri Oct 11 15:43:04 1991 Roland H. Pesch (pesch at cygnus.com)
-
- * Makefile.in: new targets ld.ms, ld-index.ms
- ld.texinfo: remove tabs, other cleanups for texi2roff
-
-Fri Oct 11 13:51:54 1991 Per Bothner (bothner at cygnus.com)
-
- * ldmain.c (main): Make config.magic_demand_paged be true
- by default. Don't set the WP_TEXT and D_PAGED flags of
- output_bfd here; it's too late, so set it when output_bfd
- is created (in ldlang.c). Also fix setting of EXEC_P flag
- * ldlang.c (ldlang_open_output): Set output_bfd->flags here.
- * ldlang.c: Remove some duplicate extern declarations.
- * ldgram.y: Fixes to -N and -n options.
- * Makefile.in: Recognize upper case letters in sed script
- to remove assignments from script files.
- * ldtemplate: Don't assukme that -N or -n options
- imply use of -r script.
- * mkscript.c: Tweaking to correctly handle \n and \\ in input.
-
-Fri Oct 11 10:29:27 1991 Steve Chamberlain (steve at cygnus.com)
-
- * ldtemplate: include bfd.h before sysdep.h.
-
-Fri Oct 11 04:24:45 1991 John Gilmore (gnu at cygnus.com)
-
- Restructure configuration scheme for bfd, binutils, ld.
-
- * configure.in: Revise to symlink sysdep.h to ../bfd/hosts/h-xxx.h.
- Change some config names to match other dirs.
- * *.c: Include bfd.h before sysdep.h, so ansidecl and PROTO()
- get defined first.
- * config/: Rename some config files to match up h-*.h names.
- Remove all the HOST_SYS definitions from the config files.
-
-Tue Oct 8 16:00:57 1991 Per Bothner (bothner at cygnus.com)
-
- * ldexp.h, ldlang.h: Change enum boolean -> enum bfd_boolean.
- * ldtemplate: Remove ldfile_add_library_path calls;
- just use the SEARCH_DIR commands in the script files.
- * Makefile.in: Add LIB_PATH macro, which if set is used to replace
- the SEARCH_DIR commands in the scripts (using ugly sed magic).
- This is primarily intended for cross-linking, where you would
- place libraries in a different place than native libraries.
- Also, emulations made from ldtemplate now use $(srcdir).
- * scripttempl/ldglda29k.sc: Change SEARCH_DIR commands to a
- conventional form; people can use the Makefile's LIB_PATH to
- override.
-
-Tue Oct 8 14:51:21 1991 Roland H. Pesch (pesch at cygnus.com)
-
- * Makefile.in: fix target ld.dvi, add target ld.info
- ld.texinfo: make info filename ld.info
-
-Fri Oct 4 21:51:58 1991 John Gilmore (gnu at cygnus.com)
-
- * Makefile.in: Avoid using $< in non-suffix rules (breaks on Sun
- Make).
- * ldfile.c, ldlang.c, ldmain.c, ldwrite.c: Cope with renames of a
- few BFD types & enums.
-
-
-Local Variables:
-mode: change-log
-left-margin: 8
-fill-column: 74
-version-control: never
-End:
diff --git a/contrib/binutils/ld/ChangeLog-9899 b/contrib/binutils/ld/ChangeLog-9899
deleted file mode 100644
index 866e4a0..0000000
--- a/contrib/binutils/ld/ChangeLog-9899
+++ /dev/null
@@ -1,2108 +0,0 @@
-1999-12-02 Nick Clifton <nickc@cygnus.com>
-
- * Makefile.am: Fix arm-epoc-pe dependencies.
- * Makefile.in: Regenerate.
-
- * emulparams/arm_epoc_pe.sh (SCRIPT_NAME): Set to epocpe.
-
- * scripttempl/epocpe.sc: New file: copy of pe.sc, customised for
- EPOC by placing .rdata into .text.
-
-1999-11-26 Andreas Schwab <schwab@suse.de>
-
- * configure.in: Put AC_MSG_CHECKING/AC_MSG_RESULT around check for
- STRINGIFY. Use yes/no instead of true/false as value for cache
- variable.
- * configure: Regenerate.
-
-1999-11-24 Nick Clifton <nickc@cygnus.com>
-
- * ldlang.c (IGNORE_SECTION): Section must have both ALLOC and LOAD
- attributes in order to be checked.
-
-1999-11-22 Nick Clifton <nickc@cygnus.com>
-
- * ldlang.c (lang_check_section_addresses): Fix test to determine
- if a section should be tested.
- (IGNORE_SECTION): New macro.
-
-Wed Nov 3 23:31:19 1999 Jeffrey A Law (law@cygnus.com)
-
- * emultempl/elf32.em (gld${EMULATION_NAME}_open_dynamic_archive):
- Clean up code to use EXTRA_SHLIB_EXTENSION.
-
-1999-11-03 Nick Clifton <nickc@cygnus.com>
-
- * emulparams/elf32mcore.sh (OUTPUT_FORMAT): Change to little endian.
- * emulparams/mcorepe.sh (OUTPUT_FORMAT): Change to little endian.
-
-1999-11-01 Steve Chamberlain <sac@pobox.com>
-
- * ldlang.c (section_already_linked): Rework to use hash table.
- (already_linked_newfunc): New function.
- (already_linked_table_init): New function.
- (already_linked_table_free): New function.
- (lang_process): Initialize and free the already_linked hash table.
-
-1999-10-27 Andreas Jaeger <aj@suse.de>
-
- * configure.host: Added HOSTING_CRT0, HOSTING_LIBS for
- target "mips*-*-linux-gnu*".
-
-1999-10-27 Scott Bambrough <scottb@netwinder.org>
-
- * emultempl/armelf.em: Include ctype.h to prevent compile time
- warnings.
-
-1999-10-26 Nick Clifton <nickc@cygnus.com>
-
- * emultempl/armcoff.em (gld{}_finish): Remove extraneous
- underscore from prototype.
- * emultempl/armelf.em (gld{}_finish): Remove extraneous
- underscore from prototype.
-
-1999-10-07 Geoffrey Keating <geoffk@cygnus.com>
-
- * scripttempl/elf.sc (.rel.sdata): Combine all the sdata relocs
- being .rel.sdata, .rel.sdata.*, .rel.gnu.linkonce.s*.
- (.rela.sdata): Likewise for .rela.sdata.* and .rela.gnu.linkonce.s*.
- (.rel.sbss): Make like .rel.bss.
- (.rela.sbss): Make like .rel.bss.
- (.sdata): Don't include .gnu.linkonce.s.* or .sdata.* when
- ld -r.
- (.sbss): Do the same things as for .bss: include SDATA_START_SYMBOLS,
- .dynsbss.
-
-1999-09-29 Andrew Haley <aph@cygnus.com>
-
- * emultempl/pe.em (gld_${EMULATION_NAME}_place_orphan): Defer
- merging sections when not relocating.
-
-1999-09-28 Mumit Khan <khan@xraylith.wisc.edu>
-
- * pe-dll.c (process_def_file): Move the offset lookup from here to
- (fill_exported_offsets): here. New static function.
- (fill_edata): Use.
-
-1999-09-28 Mumit Khan <khan@xraylith.wisc.edu>
-
- * deffilep.y (tokens): Add upper and lower case versions of DATA,
- CONSTANT, NONAME and PRIVATE tokens.
- (command): Use DATAU.
- (expline): Allow for drectve syntax as well.
- (exp_opt_list): Likewise.
- (exp_opt): Likewise.
- * pe-dll.c (make_one): Only generate the idata entries for data
- symbols.
-
-1999-09-28 Geoffrey Keating <geoffk@cygnus.com>
-
- * scripttempl/elf.sc (.sdata): Include .gnu.linkonce.s.* sections
- in .sdata too.
-
-1999-09-26 Nick Clifton <nickc@cygnus.com>
-
- * scripttempl/elf.sc (.bss): Accept sections named .bss.*
- (.sbss): Accept sections names .sbss.*
-
-1999-09-22 Nick Clifton <nickc@cygnus.com>
-
- * Makefile.am: Add earm_epoc_pe.c build target.
-
-Sat Sep 18 07:57:10 1999 Jeffrey A Law (law@cygnus.com)
-
- * emulparms/elf64hppa.sh (OTHER_READONLY_SYMBOLS): Remove ".stubs",
- they've been renamed to ".stub", which is handled automatically
- by elf.sc.
-
-Fri Sep 17 11:00:33 1999 Jeffrey A Law (law@cygnus.com)
-
- * emulparms/elf64hppa.sh (TEXT_START_SYMBOLS): Kill completely.
- (DATA_START_SYMBOLS): Kill __hp_load_map definition
-
-Thu Sep 16 10:59:56 1999 Jeffrey A Law (law@cygnus.com)
-
- * emultempl/elf32.em (gld${EMULATION_NAME}_open_dynamic_archive):
- Use the same filename extension for the bfd_elf_dt_needed_name call
- as we did for finding the library.
-
- * emulparms/elf64hppa.sh (DATA_START_SYMBOLS): Define.
- (OTHER_READWRITE_SECTIONS): No longer define __hp_load_map.
-
- * emulparms/elf64hppa.sh (TEXT_START_SYMBOLS): Define.
-
-Wed Sep 15 02:47:43 1999 Jeffrey A Law (law@cygnus.com)
-
- * emulparms/elf64hppa.sh (SHLIB_TEXT_START_ADDR): Define.
- (SHLIB_DATA_ADDR): Likewise.
-
- * emulparms/elf64hppa.sh (TEXT_DYNAMIC): Define.
-
- * emulparms/elf64hppa.sh (OTHER_READWRITE_SECTIONS): No longer combine
- the .plt, .dlt, .opd into a single output section. Provide values
- for __gp and __hp_load_map.
-
-1999-09-14 Michael Meissner <meissner@cygnus.com>
-
- * configure.in (Canonicalization of target names): Remove adding
- ${CONFIG_SHELL} in front of $ac_config_sub, since autoconfig 2.14
- generates $ac_config_sub with a ${CONFIG_SHELL} already.
- * configure: Regenerate.
-
-1999-09-14 Donn Terry <donn@interix.com>
-
- * emultempl/pe.em (gld_${EMULATION_NAME}_after_open): allow for
- terminating null.
-
-1999-09-14 Ulrich Drepper <drepper@cygnus.com>
-
- * configure.in: Define EXTRA_SHLIB_EXTENSION to ".sl" for HP target.
- * config.in: Add EXTRA_SHLIB_EXTENSION.
-
- * emultempl/elf32.em (gld${EMULATION_NAME}_open_dynamic_archive):
- Search for second shared lib extension only if EXTRA_SHLIB_EXTENSION
- is defined.
-
-1999-09-14 Nick Clifton <nickc@cygnus.com>
-
- * Makefile.in: Add earm_epoc_pe.c build target.
-
-Tue Sep 14 05:26:34 1999 Jeffrey A Law (law@cygnus.com)
-
- * emulparms/elf64hppa.sh (OTHER_GOT_RELOC_SECTIONS): Add .rela.dlt.
-
-1999-09-13 Donn Terry <donn@interix.com>
-
- * emultempl/pe.em: Remove the output file at the start, in case it
- is not writable.
-
-Mon Sep 13 00:17:18 1999 Jeffrey A Law (law@cygnus.com)
-
- * emultempl/elf32.em (gld${EMULATION_NAME}_open_dynamic_archive):
- Search for file with .sl extension if no file with a .so extension
- is found.
-
- * emulparms/elf64hppa.sh (OTHER_READWRITE_SECTIONS): Put .plt
- at the start of the .dlt output section.
-
-1999-09-12 Ian Lance Taylor <ian@zembu.com>
-
- * emultempl/pe.em: Don't include "../bfd/libbfd.h".
- (gld_${EMULATION_NAME}_after_open): Use xmalloc rather than
- bfd_alloc.
-
- * pe-dll.h: New file.
- * pe-dll.c: Include "pe-dll.h". Mark unused arguments as needed
- to avoid warnings.
- (edata_sz, reloc_sz): Change from int to size_t.
- (pe_details_type): Change type of imagebase_reloc from int to
- unsigned int.
- (pe_detail_list): Fully initialize last entry.
- (pe_dll_id_target): Change parameter to const.
- (pe_dll_generate_def_file): Likewise.
- (pe_dll_generate_implib): Likewise.
- (pe_implied_import_dll): Likewise. Change dll_name to const.
- * emultempl/pe.em: Include "pe-dll.h". Remove declarations now in
- pe-dll.h.
- (init): Fully initialize __dll__ entry.
- (gld_${EMULATION_NAME}_after_open): Remove unused variables
- sequence, elt, and i.
- * deffile.h: Add preprocessor guard.
- * deffilep.y (def_debug): Remove.
- * Makefile.am: Rebuild dependencies.
- (HFILES): Add pe-dll.h.
-
-1999-09-12 Donn Terry <donn@interix.com>
-
- * ld.h (ld_abort): Declare.
- (abort): Define.
- * ldmisc.c (ld_abort): Define.
-
- * scripttempl/pe.sc: Use ${ENTRY} rather than _mainCRTStartup.
- Move .bss section after .rdata. Move .reloc section after .rsrc.
-
- * lexsup.c (parse_args): Use strtoul for --split-by-reloc
- argument.
-
- * lexsup.c (parse_args): If we get an unrecognized argument,
- mention --help.
-
- * ldlang.c (section_already_linked): Use comdat information if it
- is available.
-
- * emultempl/pe.em (PE_DEF_SECTION_ALIGNMENT): If
- OVERRIDE_SECTION_ALIGNMENT is defined, change to that.
- (gld_${EMULATION_NAME}_before_parse): Use EXECUTABLE_NAME if it is
- defined, rather than a.exe.
- (init): Define __subsystem__ as ${SUBSYSTEM}.
- (set_pe_subsystem): Add ${INITIAL_SYMBOL_CHAR} before entry symbol
- name.
-
-1999-09-12 Ian Lance Taylor <ian@zembu.com>
-
- * ldlang.c (open_output): Change local variable desired_endian
- from int to enum bfd_endian.
-
- * emulparams/arm_epoc_pe.sh: Define ENTRY, SUBSYSTEM and
- INITIAL_SYMBOL_CHAR.
- * emulparams/armpe.sh: Likewise.
- * emulparams/morepe.sh: Likewise.
- * emulparams/ppcpe.sh: Likewise.
- * emulparams/i386pe.sh (ENTRY): Define as _mainCRTStartup.
- (SUBSYSTEM): Define as PE_DEF_SUBSYSTEM.
-
-Fri Sep 10 00:22:50 1999 Jeffrey A Law (law@cygnus.com)
-
- * emulparms/elf64hppa.sh (LIB_PATH): Define.
-
- * emulparms/elf64hppa.sh (OTHER_READONLY_SECTIONS): Put stubs before
- unwinders so that they are closer to the text section.
- (OTHER_BSS_SECTIONS): Define.
- (EXECUTABLE_SYMBOLS): Provide __SYSTEM_ID and _FPU_STATUS.
- (INIT_START, INIT_END): Define.
- (FINI_START, FINI_END): Define.
- * scripttempl/elf.sc: Add support for INIT_START, INIT_END,
- FINI_START, FINI_END and OTHER_BSS_SECTIONS.
-
-Thu Sep 9 21:43:58 1999 Jeffrey A Law (law@cygnus.com)
-
- * emulparms/elf64hppa.sh (TEXT_START_ADDR): Move up one page.
- (DATA_ADDR): Define.
-
-1999-09-09 Stan Shebs <shebs@andros.cygnus.com>
-
- * emulparams/d10velf.sh (READONLY_START_ADDR): Set to 0x2000004.
-
-1999-09-09 Andreas Schwab <schwab@suse.de>
-
- * ld.texinfo: Fix arguments of @var to not contain punctuation.
-
-Thu Sep 9 05:52:34 1999 Jeffrey A Law (law@cygnus.com)
-
- * emulparms/elf64hppa.sh (OTHER_READWRITE_SECTIONS): Define.
-
-1999-09-08 Ulrich Drepper <drepper@cygnus.com>
-
- * emulparams/elf64hppa.sh (ELFSIZE): New. Set to 64.
-
-Wed Sep 8 00:07:39 1999 Jeffrey A Law (law@cygnus.com)
-
- * emulparms/elf64hppa.sh (ENTRY): Define to main.
-
-1999-09-03 Scott Bambrough <scottb@netwinder.org>
-
- * configure.host: Added HOSTING_CRT0, HOSTING_LIBS for
- target "arm*-*-linux-gnu*"
-
-1999-09-04 Steve Chamberlain <sac@pobox.com>
-
- * configure.tgt (pjl-*-*, pj-*-*): New targets.
- * emulparams/pjelf.sh: New file.
- * emulparams/pjlelf.sh: New file.
- * scripttempl/pj.sc: New file.
- * Makefile.am (ALL_EMULATIONS): Add epjelf.o and epjlelf.o.
- (epjelf.o, epjlelf.o): New targets.
- * Makefile.in: Rebuild.
-
-Fri Sep 3 20:17:08 1999 Jeffrey A Law (law@cygnus.com)
-
- * emulparams/elf64hppa.sh (MAXPAGESIZE): Define.
- (OTHER_READONLY_SECTIONS, DATA_PLT): Likewise.
-
-Thu Sep 2 14:32:03 1999 Jeffrey A Law (law@cygnus.com)
-
- * emulparams/elf64hppa.sh: New file.
- * configure.tgt (hppa*w-*-*): Use elf64hppa emulation.
- * Makefile.am (ALL_64_EMULATIONS): Add eelf64hppa.o
- (eelf64hppa.c): Add dependencies.
- * Makefile.in: Rebuilt.
-
-1999-08-25 Philip Blundell <pb@nexus.co.uk>
-
- * emulparams/armelf.sh (OTHER_BSS_SYMBOLS): Add __end__.
- * emulparams/armelf_linux.sh: Likewise.
- * emulparams/armelf_linux26.sh: Likewise.
-
-1999-08-24 Nick Clifton <nickc@cygnus.com>
-
- From a patch submitted by Roland McGrath <roland@baalperazim.frob.com>
-
- * configure.tgt (arm-*-netbsd*): New target.
- * Makefile.am (ALL_EMULATIONS): Add earmnbsd.o.
- (earmnbsd.c): New rule with deps.
- * Makefile.in: Regenerate.
- * emulparams/armnbsd.sh: New file.
-
-1999-08-23 Nick Clifton <nickc@cygnus.com>
-
- * emulparams/elf32mcore.sh (PARSE_AND_LIST_ARGS): Define.
- Implement --base-file command line switch.
-
- * emultempl/elf32.em: Add ability for individual targets to have
- their own command line switches by defining PARSE_AND_LIST_ARGS.
-
-1999-08-19 Andreas Schwab <schwab@suse.de>
-
- * configure.host: Use ${CC} instead of gcc for finding compiler
- related files.
-
-1999-08-11 Nick Clifton <nickc@cygnus.com>
-
- * scripttempl/mcorepe.sc (OUTPUT_FORMAT): Fix typo.
-
-1999-08-09 Mark Elbrecht <snowball3@bigfoot.com>
-
- * scripttempl/i386go32.sc: Handle g++ exception sections.
-
-1999-08-09 Ian Lance Taylor <ian@zembu.com>
-
- From Wally Iimura <iimura@microunity.com>:
- * ldlang.c (lang_size_sections): When checking whether an address
- is within a region, don't get confused by wrapping around at the
- end of the address space.
-
-1999-08-08 Ian Lance Taylor <ian@zembu.com>
-
- * ldlang.c (wild_doit): Update for renaming of SEC_SHORT to
- SEC_SMALL_DATA.
-
- * Makefile.am: Rename .dep* files to DEP*. Change DEP variable to
- MKDEP. Rebuild dependencies.
- * Makefile.in: Rebuild.
-
-1999-08-08 Jakub Jelinek <jj@ultra.linux.cz>
-
- * configure.host (sparc-*-linux-gnu*): New host.
- (sparc64-*-linux-gnu*): New host.
-
-1999-08-06 Ian Lance Taylor <ian@zembu.com>
-
- * lexsup.c (is_num): Reindent.
- (parse_args): Mention program name in error message.
-
- * emultempl/ostring.sed: Rename from stringify.sed.
- * emultempl/astring.sed: New file.
- * Makefile.am (stringify.sed): New target.
- (GEN_DEPENDS): Change $(srcdir)/emultempl/stringify.sed to
- stringify.sed.
- * configure.in: Define and substitute STRINGIFY.
- * emultempl/*.em: Use stringify.sed from build directory rather
- than source directory.
- * emultempl/elf32.em: Use stringify.sed rather than inline sed
- script.
- * emultempl/gld960.em, emultempl/gld960c.em: Likewise.
- * emultempl/hppaelf.em, emultempl/linux.em: Likewise.
- * emultempl/lnk960.em, emultempl/sunos.em: Likewise.
- * configure, Makefile.in: Rebuild.
-
-1999-08-05 Donn Terry <donn@interix.com>
-
- * emulparams/i386pe.sh: Define ENTRY, SUBSYSTEM, and
- INITIAL_SYMBOL_CHAR.
- * emulparams/i386pe_posix.sh: New file.
- * Makefile.am (YACC): If bison is not in the source tree, use
- @YACC@ rather than bison -y.
- (LEX): If flex is not in the source tree, use @LEX@ rather than
- flex.
- (ALL_EMULATIONS): Add ei386pe_posix.o.
- (ei386pe_posix.c): New target.
- * configure.tgt (i[3456]86-*-interix*): New target.
- * configure.host (i[3456]86-pc-interix*): New host.
- * Makefile.in: Rebuild.
-
-1999-08-03 Ian Lance Taylor <ian@zembu.com>
-
- * emulparams/elf32ppc.sh (MAXPAGESIZE): Change to 0x10000.
- * emulparams/elf32ppclinux.sh (MAXPAGESIZE): Likewise.
-
-1999-08-03 H.J. Lu <hjl@gnu.org>
-
- * Makefile.am (ALL_EMULATIONS): Remove ego32.o.
- (ego32.c): Remove.
- * Makefile.in: Rebuild.
-
-1999-07-22 Philip Blundell <pb@nexus.co.uk>
-
- * emulparams/armelf_linux26.sh (DATA_START_SYMBOLS): Define.
- (OTHER_BSS_SYMBOLS, OTHER_BSS_END_SYMBOLS): Likewise.
- * emulparams/armelf_linux.sh (DATA_START_SYMBOLS): Define.
-
- * configure.tgt (arm*-*-uclinux*, thumb-*-uclinux*,
- thumb-*-linux-gnu*): New targets.
-
-1999-07-21 Mark Elbrecht <snowball3@bigfoot.com>
-
- * scripttempl/i386go32.sc: Add handling of linkonce sections.
-
- * configure.bat: Remove; obsolete.
- * emulparams/go32.sh: Remove; obsolete.
- * scripttempl/go32coff.sc: Remove; obsolete.
-
-1999-07-21 H.J. Lu <hjl@gnu.org>
-
- * configure.tgt (mips*el-*-vxworks*): New target.
-
-1999-07-21 Brad M. Garcia <bgarcia@fore.com>
-
- * configure.tgt (i[3456]86-*-vxworks*): New target.
-
-Tue Jul 20 15:18:46 1999 Bob Manson <manson@charmed.cygnus.com>
-
- * ldlang.c (lang_gc_sections): Only handle the start symbol
- specially if there is one.
-
-Mon Jul 19 14:19:14 1999 Mark P. Mitchell <mark@codesourcery.com>
-
- * emulparams/elf32bmipn32.sh (OTHER_RELOCATING_SECTIONS): Add
- .MIPS.events and .MIPS.content handling.
- * emulparams/elf64bmip.sh (OTHER_RELOCATING_SECTIONS): Likewise.
-
-1999-07-17 Nick Clifton <nickc@cygnus.com>
-
- * ldlang.c (get_target): New function: Return true iff the
- given target is the target being sought.
- (stricpy): New function: Like strcpy but convert to lower
- case as well.
- (strcut): New function: Like strstr but remove the located
- substring as well.
- (name_compare): New function: Compute a compatability rating
- for two target names.
- (winner): New variable: Best target found by
- closest_target_match() so far.
- (closest_target_match): New function: Find the target which is
- the closest match to the original target.
- (get_first_input_target): New function: Find the target format
- of the first of the linker's input file.
- (open_output): Be more clever about deciding the output target
- format.
-
-1999-07-16 Jakub Jelinek <jj@ultra.linux.cz>
-
- * emulparams/elf64_sparc.sh: Add 64-bit directories to native LIB_PATH.
-
-Thu Jul 15 15:55:15 1999 Mark P. Mitchell <mark@codesourcery.com>
-
- * configure.host: Set up HOSTING_CRT0 and HOSTING_LIBS for IRIX6.
-
-1999-07-15 Ian Lance Taylor <ian@zembu.com>
-
- * configure.in: Bump version number to 2.9.5.
- * configure: Rebuild.
-
-1999-07-14 Richard Henderson <rth@cygnus.com>
-
- * ldlang.c (wild_doit): Copy SEC_SHORT to output section.
-
- * scripttempl/elf.sc: Re-order .rel[a].foo outputs to the
- same order seen for the main sections. Add
- OTHER_READONLY_RELOC_SECTIONS and OTHER_GOT_RELOC_SECTIONS.
-
-1999-07-12 Andreas Schwab <schwab@suse.de>
-
- * emultempl/linux.em (ld_${EMULATION_NAME}_emulation): Fill in
- structure initializations.
-
- * emultempl/elf32.em (ld_${EMULATION_NAME}_emulation): Add missing
- comma in initializer.
-
-1999-07-11 Ian Lance Taylor <ian@zembu.com>
-
- * Many files: Changes to avoid gcc warnings: Add ATTRIBUTE_UNUSED
- as appropriate. Fill in structure initializations.
-
-1999-07-10 Ian Lance Taylor <ian@zembu.com>
-
- * ldfile.c: Revert patch of 1999-07-08.
- (ldfile_try_open_bfd): If we are searching for the file, skip
- files with an incompatible architecture.
-
-1999-07-09 Nick Clifton <nickc@cygnus.com>
-
- * scripttempl/armcoff.sc (OUTPUT_FORMAT): Include big endian and
- little endian formats.
-
-1999-07-08 Felix Lee <flee@cygnus.com>
-
- * scripttempl/mcorepe.sc: fix quoting problem, for bash 2.x
-
-1999-07-08 Jakub Jelinek <jj@ultra.linux.cz>
-
- * ldfile.c (ldfile_open_file_search): Skip libraries made for
- incompatible architectures in the search path. Let the user know
- about any such skips.
-
-Thu Jul 8 12:32:23 1999 John David Anglin <dave@hiauly1.hia.nrc.ca>
-
- * configure.tgt (hppa*-linux-gnu*): New target.
-
-1999-07-07 Mark Mitchell <mark@codesourcery.com>
-
- * Makefile.am (ALL_64_EMULATIONS): Add eelf64bmip.
- (eelf64bmip): New target.
- * Makefile.in: Regenerated.
- * configure.tgt (mips-sgi-irix6*): Add 64-bit emulation.
- * emulparams/elf64bmip.sh: New file.
-
-1999-07-05 Nick Clifton <nickc@cygnus.com>
-
- * emultempl/pe.em (after_open): Abort if input format is ARM and
- output format is not.
- * emultempl/armcoff.em (after_open): Abort if input format is ARM
- and output format is not.
- * emultempl/armelf.em (after_open): Abort if input format is ARM
- and output format is not.
-
-1999-07-02 Ian Lance Taylor <ian@zembu.com>
-
- * ldlang.c: Revert change of 1999-06-23.
-
-1999-06-30 Mark Mitchell <mark@codesourcery.com>
-
- * Makefile.am (ALL_EMULATIONS): Add eelf32bmipn32.o.
- (eelf32bmipn32.c): New target.
- * Makefile.in: Regenerated.
- * configure.tgt (mips-sgi-irix6*): Make n32 the default
- emulation.
- * emulparams/elf32bmipn32.sh: New file.
-
-1999-06-28 Jim Pick <jim@jimpick.com>
-
- * emultempl/armelf.em: Added code so that .xs linker scripts are
- called so that ARM shared libraries are built correctly.
-
-1999-06-22 Mark Mitchell <mark@codesourcery.com>
-
- * ldmain.c (main): Initialize link_info.init_function and
- link_info.fini_function.
- * lexsup.c (OPTION_INIT): New macro.
- (OPTION_FINI): Likewise.
- (ld_options): Add descriptions for them.
- (parse_args): Handle them.
-
-1999-06-23 Ian Lance Taylor <ian@zembu.com>
-
- * ldlang.c (section_already_linked): Only discard link once
- sections if we are building constructors.
-
-1999-06-22 Nick Clifton <nickc@cygnus.com>
-
- * ld.texinfo (Location Counter): Describe behaviour of
- location counter inside section statements.
-
-1999-06-20 Mark Mitchell <mark@codesourcery.com>
-
- * scripttempl/elf.sc (WRITABLE_RODATA): New variable for
- controlling whether or not .rodata is in the data segment or the
- text segment.
-
-1999-06-18 Nick Clifton <nickc@cygnus.com>
-
- * emultempl/pe.em: Add new command line switch --thumb-entry.
- * emultempl/armelf.em: Add new command line switch --thumb-entry.
- * emultempl/armcoff.em: Add new command line switch --thumb-entry.
- * ld.texinfo: Document new ARM command line switch: --thumb-entry.
-
-1999-06-20 H.J. Lu <hjl@gnu.org>
-
- * configure.in (all_libpath): Accumulate across all enabled targets.
-
-Sun Jun 20 14:10:33 1999 Richard Henderson <rth@cygnus.com>
-
- * emultempl/armelf.em: Watch EMULATION_LIBPATH instead of
- DEFAULT_EMULATION.
- * emultempl/elf32.em: Likewise.
- * emultempl/sunos.em: Likewise.
-
-Fri Jun 18 15:24:48 1999 Richard Henderson <rth@cygnus.com>
-
- * Makefile.am (GENSCRIPTS): Pass EMULATION_LIBPATH, not EMUL.
- * configure.in (all_emuls): Add targ_extra_libpath.
- (all_libpath, EMULATION_LIBPATH): Define.
- * configure.tgt (powerpc-*-linux-gnu*): Define targ_extra_libpath.
- * genscripts.sh (LIB_PATH): Define if emulation in EMULATION_LIBPATH.
-
-Mon Jun 14 10:38:36 1999 Andreas Schwab <schwab@issan.cs.uni-dortmund.de>
-
- * ld.texinfo: Fix use of @item vs. @itemx.
-
-1999-06-13 Ian Lance Taylor <ian@zembu.com>
-
- From Thomas Zenker <thz@lennartz-electronic.de>:
- * ldgram.y (attributes_opt): Use attributes_list instead of NAME.
- (attributes_list, attributes_string): New nonterminals.
- * ldlang.c (lang_set_flags): Add invert parameter. Don't handle
- '!'.
- * ldlang.c (lang_set_flags): Update declaration.
-
-1999-06-12 Ian Lance Taylor <ian@zembu.com>
-
- * emultempl/pe.em (gld_${EMULATION_NAME}_after_parse): Don't add
- entry_symbol as an undefined symbol when doing a relocateable
- link. From <jeffdb@goodnet.com>.
-
-1999-06-12 David O'Brien <obrien@freebsd.org>
-
- * configure.tgt: (i[3456]86-*-freebsd*): Now defaults to ELF.
-
-1999-06-09 Nick Clifton <nickc@cygnus.com>
-
- * lexsup.c (help): Restore previous format of output.
-
-1999-06-04 Nick Clifton <nickc@cygnus.com>
-
- * emultempl/pe.em: If compiling for arm_epoc_pe rename
- interworking functions to avoid a name space clash.
-
-1999-06-02 Jason Merrill <jason@yorick.cygnus.com>
-
- * scripttempl/v850.sc: Add initp support.
-
-1999-06-02 Nick Clifton <nickc@cygnus.com>
-
- * emultempl/pe.em: Rename global arm interworking functions to
- avoid name collision when all targets BFD is built.
-
-1999-05-30 Cort Dougan <cort@attis.cs.nmt.edu>
-
- * Makefile.am (ALL_EMULATIONS): Add eelf32ppclinux.o.
- * configure.tgt (powerpc-*-linux-gnu): Use it.
- * emulparams/elf32ppclinux.sh: New file.
-
-1999-05-29 Ian Lance Taylor <ian@zembu.com>
-
- * ld.texinfo (Options): Clarify that options which refer to files
- must be properly ordered.
-
-1999-05-29 Nick Clifton <nickc@cygnus.com>
-
- * emultempl/armelf.em (..._parse_args): New function: Parse
- command line option. Accept arm-elf specific command line option
- '-p' or '--no-pipeline-knowledge'.
- (..._list_options): New function: Describe the new command line
- option.
- (..._before_allocation): Pass the value of the new variable
- no_pipeline_knowledge to bfd_elf32_arm_process_before_allocation.
-
- * emultempl/armelf_oabi.em (..._before_allocation): Pass zero as
- the third parameter to bfd_elf32_arm_process_before_allocation.
-
-1999-05-28 Nick Clifton <nickc@cygnus.com>
-
- * lexsup.c (help): Minor formatting changes.
-
-1999-05-28 Martin Dorey <mdorey@madge.com>
-
- * configure.tgt (i960-*-elf*): New target.
- * emulparams/elf32_i960.sh: New file.
- * Makefile.am (ALL_EMULATIONS): Add eelf32_i960.o.
- (eelf32_i960.c): New target.
- * Makefile.in: Rebuild.
-
-1999-05-26 Nick Clifton <nickc@cygnus.com>
-
- * emulparams/armelf_oabi.sh (TEMPLATE_NAME): Set to armelf_oabi.
-
-1999-05-24 Philip Blundell <philb@gnu.org>
-
- * emultempl/armelf.em (before_parse): Set config.dynamic_link and
- config.has_shared.
- * emulparams/armelf.sh (GENERATE_SHLIB_SCRIPT): Define.
- * emulparams/armelf_linux.sh (GENERATE_SHLIB_SCRIPT): Likewise.
-
-1999-04-13 Philip Blundell <philb@gnu.org>
-
- * emultempl/armelf.em: Add definitions related to shared objects
- (copied from elf32.em).
-
-Wed May 19 12:44:26 1999 Andreas Schwab <schwab@issan.cs.uni-dortmund.de>
-
- * Makefile.am (ALL_EMULATIONS): Remove earmlinux.o and
- earm26linux.o, add earmelf_linux.o and earmelf_linux26.o.
- * Makefile.in: Regenerated.
-
-1999-05-16 Nick Clifton <nickc@cygnus.com>
-
- * emulparams/elf32mcore.sh (GENERATE_SHLIB_SCRIPT): Define.
- (TEMPLATE_NAME): Define.
-
-Thu May 13 09:48:09 1999 Joel Sherrill (joel@OARcorp.com)
-
- * configure.tgt (i386-*-rtemself*, sh-*-rtemself*): New targets.
- (mips*el-*-rtems*, powerpcle-*-rtems*): New targets.
-
-1999-05-10 DJ Delorie <dj@cygnus.com>
-
- * scripttempl/pe.sc: Specify the output arch, which Ian says is
- the Right Thing to do.
-
- * emultempl/pe.em: various changes to parameterize the
- target-specific information.
- (gld_i386pe_after_open): Detect and fix MS import libraries
- by renaming the member objects (which are all named the same).
-
- * pe-dll.c: various changes to parameterize the target-specific
- information.
- (generate_reloc): support relocs more generically to allow for
- expansion.
- (pe_exe_build_sections): new; used to add .relocs to .exes
- (pe_exe_fill_sections): ditto
-
-1999-05-10 Catherine Moore <clm@cygnus.com>
-
- * emultempl/pe.em (gld_${EMULATION_NAME}_after_open):
- Check for TARGET_IS_arm_epoc_pe.
- (gld_${EMULATION_NAME}_before_allocation): Likewise.
-
-1999-05-12 Anthony Green <green@cygnus.com>
-
- * ldlang.c (walk_wild, walk_wild_file, walk_wild_section,
- output_section_callback, gc_section_callback): New functions for
- generic section walks.
- (wild, lang_gc_wild): Use walk_wild.
- (wild_file, lang_gc_wild_file): Deleted. Common logic moved to
- walk_wild_file.
- (wild_section, lang_gc_wild_section): Deleted. Common logic moved
- to walk_fild_section. Unique logic moved into callbacks
- output_section_callback and gc_section_callback.
-
-1999-04-26 Tom Tromey <tromey@cygnus.com>
-
- * aclocal.m4, configure: Updated for new version of libtool.
-
-1999-04-12 Philip Blundell <pb@nexus.co.uk>
-
- * emulparams/armelf_linux.sh: New file. Support for ARM
- GNU/Linux ELF ABI.
- * emulparams/armelf_linux26.sh: New file. APCS-26 version of above.
- * configure.tgt: For arm*-*-linux-gnu*, set default emulation to
- `armelf_linux', and also include `armelf_linux26' and `armelf'.
- * Makefile.am: Add rules to make earmlinux.c and earmlinux26.c.
- (ALL_EMULATIONS): Add earmlinux.o and earmlinux26.o.
- * Makefile.in: Regenerate.
-
-1999-04-11 Richard Henderson <rth@cygnus.com>
-
- * Makefile.am (ALL_EMULATIONS): Add elf_i386_be.o.
- * configure.tgt (i[3456]86-*-beos*): Use it.
- * emulparams/elf_i386_be.sh: New file.
- * Makefile.in: Rebuild.
-
- * configure.in (environ): Detect declaration.
- * ldmain.c (main): Don't declare environ.
- * sysdep.h (environ): Declare if needed.
- * configure, config.in: Rebuild.
-
-1999-04-11 Richard Henderson <rth@cygnus.com>
-
- * ldgram.y (ldgram_vers_current_lang): New.
- (vers_defns): Accept `extern "lang" { }' syntax.
- * ldlex.l (vers_node_nesting): New.
- (V_IDENTIFIER): Accept . and $ in symbols.
- (VERS_NODE): Accept `extern "lang" { }' tokens. Nest VERS_NODE states.
- * ldlang.c (lang_new_vers_regex): New `lang' argument. Update callers.
- (lang_vers_match_lang_c): New function.
- (lang_vers_match_lang_cplusplus): New function.
- (lang_vers_match_lang_java): New function.
- (lang_do_version_exports_section): Fix iteration. Don't free
- section contents, as it is still in use by the patterns.
-
-1999-04-10 Richard Henderson <rth@cygnus.com>
-
- * ldmain.c (main): Init link_info.no_undefined.
- * lexsup.c: Add command-line option --no-undefined.
-
-1999-04-06 Ian Lance Taylor <ian@zembu.com>
-
- * ld.h (LC_MESSAGES): Never define.
- * ldmain.c (main): Don't pass LC_MESSAGES to setlocale if the
- system does not define it.
-
-1999-04-06 H.J. Lu <hjl@gnu.org>
-
- * ldmain.h (demangling): Declare.
- * ldmain.c (demangling): New global variable.
- (main): Initialize demangling.
- * ldmisc.c (vfinfo): Don't demangle symbol if ! demangling.
- * lexsup.c (ld_options, parse_args): Handle --demangle and
- --no-demangle.
- * ld.texinfo, ld.1: Document --demangle/--no-demangle.
-
- * ldlex.l (V_IDENTIFIER): Allow '.' in symbol.
-
-1999-04-05 Chris Torek <torek@BSDI.COM>
-
- * emultempl/sunos.em (gld${EMULATION_NAME}_search_dir): Check that
- a shared library really exists, avoiding broken symlinks.
-
- * ldfile.c (ldfile_open_file): Generate a better error message if
- we can't find a -l file.
-
-1999-04-05 DJ Delorie <dj@cygnus.com>
-
- * configure.tgt (i386-*-pe): add targ_extra_ofiles for other PE
- targets (i386-pe and i386-winnt)
-
-1999-04-04 Ian Lance Taylor <ian@zembu.com>
-
- * deffilep.y: Include "sysdep.h" and "ldmisc.h".
- (def_file_add_directive): Change return type to void. Remove
- unused locals sh_reserve, sh_commit, and j.
- (def_ungetc): Always return a value.
- (def_lex): Correct parenthesization of || within &&.
- * deffile.h (def_file_add_directive): Update declaration.
- * pe-dll.c: Include <time.h>, <ctype.h>, and "ldemul.h".
- (generate_edata): Remove unused local i.
- (quoteput): Add cast to avoid warning.
- (pe_dll_generate_def_file): Fix type in format string.
- (quick_symbol): Remove unused local blhe.
- (pe_dll_generate_implib): Add cast to avoid warning.
- (pe_process_import_defs): Remove unused locals ar_head, ar_tail,
- and n.
- (pe_as16): Comment out.
-
-1999-04-04 Don Bowman <don@pixsci.com>
-
- * configure.tgt: Add mips*-*-vxworks* target.
-
-1999-03-31 Nick Clifton <nickc@cygnus.com>
-
- * Makefile.in (ALL_EMULATIONS): Add earm_epoc_pe.o
- Add build rule and dependencies for earm_epoc_pe.c.
-
- * emulparams/arm_epoc_pe.sh: New file.
-
- * configure.tgt: Add 'targ_extra_ofiles' for ARM based PE
- targets.
-
-1999-03-31 Philip Blundell <pb@nexus.co.uk>
-
- * configure.tgt: Match `arm*-*-linux-gnu*' not
- `armv*-*-linux-gnu'.
-
-1999-03-26 Andreas Schwab <schwab@issan.cs.uni-dortmund.de>
-
- * scripttempl/elf.sc: Put the .eh_frame and .gcc_except_table
- sections in the data segment.
-
-Fri Mar 26 12:05:51 1999 Catherine Moore <clm@cygnus.com>
-
- * ld.h (wildcard_spec): Add exclude_name.
- * ldgram.y (EXCLUDE_FILE): New token.
- (wildcard_spec): Set exclude_name.
- (file_NAME_list): Recognize EXCLUDE_FILE.
- * ldlang.c (wild_section): Check for excluded files.
- (print_wild_statement): Print excluded files.
- (lang_add_wild): New argument exclude_filename.
- Set exclude_filename.
- * ldlang.h (lang_wild_statement_type): Add exclude_filename.
- * ldlex.l: New token EXCLUDE_FILE.
- * mri.c (mri_draw_tree): Add argument to lang_add_wild.
- * scripttempl/elf.sc (CTOR, DTOR): Exclude crtend.o from ctor wildcard.
- Reorder sorted and unsorted ctors.
- * scripttempl/elfd10v.sc (CTOR, DTOR): Likewise.
- * scripttempl/elfd30v.sc (CTOR, DTOR): Likewise.
- * scripttempl/elfppc.sc (CTOR, DTOR): Likewise.
-
-1999-03-26 Nick Clifton <nickc@cygnus.com>
-
- * ldlang.c (lang_gc_sections): If entry_symbol is not defined,
- default to "start".
-
-1999-03-03 Nick Clifton <nickc@cygnus.com>
-
- * scripttempl/elf.sc: Add explicit placements for the .eh_frame
- and .gcc_except_table sections.
-
-Wed Mar 3 09:13:34 1999 Catherine Moore <clm@cygnus.clm>
-
- * scripttempl/elf.sc: Remove .end.ctors and .end.dtors
- sections. Reorder .ctors section entries.
- * scripttempl/elfd10v.sc: Likewise.
- * scripttempl/elfd30v.sc: Likewise.
- * scripttempl/elfppc.sc: Likewise.
-
-1999-02-26 Jim Lemke <jlemke@cygnus.com>
-
- * ldmain.c (main): Wrong error msg for -r and --mpc860c0.
-
-1999-02-25 Nick Clifton <nickc@cygnus.com>
-
- * ldlang.c (lang_check_section_addresses): Remove extraneous
- backslash.
-
-Thu Feb 25 15:07:24 1999 Catherine Moore <clm@cygnus.com>
-
- * scripttempl/elf.sc: Don't gather .ctor and .dtor sections
- for relocateable links.
- * scripttempl/elfd10v.sc: Likewise.
- * scripttempl/elfd30v.sc: Likewise.
- * scripttempl/elfppc.sc: Likewise.
-
-1999-02-22 Jim Lemke <jlemke@cygnus.com>
-
- * ldint.texinfo: remove extraneous right brace.
- * ldmain.c (main): initialize and check option "mpc860c0".
- * lexsup.c (ld_options, parse_args): add option "mpc860c0".
-
-Wed Feb 17 12:10:06 1999 Stan Cox <scox@cygnus.com>
-
- * mpw-elfmips.c (gldelf32ebmip_before_allocation): Remove special
- .reginfo section handling.
- * emultempl/elf32.em (gld${EMULATION_NAME}_before_allocation): Likewise.
- * emulparams/elf32elmip.sh (INITIAL_READONLY_SECTIONS): Removed
- * emulparams/elf32ebmip.sh (INITIAL_READONLY_SECTIONS): Removed
-
-1999-02-17 Nick Clifton <nickc@cygnus.com>
-
- Patch from: Scott Bambrough <scottb@corelcomputer.com>
-
- * configure.tgt: Added armv*-*-linux-gnu to $targ_emul
- recognition.
-
-Wed Feb 17 Andreas Schwab <schwab@issan.cs.uni-dortmund.de>
-
- * emultempl/armelf_oabi.em
- (bfd_elf32_arm_allocate_interworking_sections,
- bfd_elf32_arm_get_bfd_for_interworking,
- bfd_elf32_arm_process_before_allocation): Define them to use the
- old ABI versions of the functions.
-
-Tue Feb 16 16:48:19 1999 Ian Lance Taylor <ian@cygnus.com>
-
- * configure.in: Change AC_PREREQ to 2.13. Change AM_PROG_INSTALL
- to AC_PROG_INSTALL. Change AM_EXEEXT to AC_EXEEXT.
- * Makefile.am (earmelf_oabi.c): Changes spaces to tab.
- * acconfig.h: Remove.
- * aclocal.m4: Rebuild.
- * configure: Rebuild.
- * Makefile.in: Rebuild.
-
-Mon Feb 15 18:21:48 1999 Vladimir N. Makarov <vmakarov@cygnus.com>
-
- * ldexp.h (struct etree_value_type): Change valid onto valid_p.
-
- * ldexp.c (new_abs): Ditto.
- (new_rel, new_rel_from_section, fold_binary, invalid, fold_name,
- exp_fold_tree, exp_binop, exp_trinop, stat_alloc,
- exp_get_abs_int): Ditto
-
- * ldlang.c (print_assignment, lang_size_sections,
- lang_do_assignments): Ditto.
-
-1999-02-11 Nick Clifton <nickc@cygnus.com>
-
- * ldlang.c (lang_check_section_addresses): New function: Check
- addresses assigned to section for overlaps.
- (lang_process): Call lang_check_section_addresses if suitable.
-
- * ld.h: Add new boolean field to args_type structure:
- 'check_section_addresses'.
-
- * ldmain.c: Initialise check_section_addresses field to true.
-
- * lexsup.c: Add new command line options '--no-check-sections' and
- '--check-sections'.
-
- * ld.texinfo: Document new command line options '--check-sections'
- and '--no-check-sections'.
-
-1999-02-08 Nick Clifton <nickc@cygnus.com>
-
- * configure.tgt: Add support for StrongARM target.
-
-Wed Feb 3 19:41:01 1999 Ian Lance Taylor <ian@cygnus.com>
-
- * ldctor.c (ldctor_build_sets): Just set SEC_KEEP once. Check for
- an owner of a section before using it to look up a reloc type.
- Don't set SEC_KEEP for the absolute section.
-
-Mon Feb 1 11:39:46 1999 Catherine Moore <clm@cygnus.com>
-
- * Makefile.am (earmelf_oabi.o): New.
- * Makefile.in: Regenerate.
- * configure.tgt (arm-*-oabi): New.
- (thumb-*-oabi): New.
- * emulparams/armelf_oabi.sh: New.
- * emultempl/armelf_oabi.em: New.
-
-1999-01-31 17:57:31 1998 Michael Meissner <meissner@cygnus.com>
-
- * scripttempl/elfppc.sc: Add support for -fleading-underscores
- switch in all linker generated symbols.
-
- * configure.tgt (powerpc{,le}*-*-vxworks): Add as aliases for
- powerpc{,le}-*-eabi.
-
-Wed Jan 20 17:01:48 1999 Ian Lance Taylor <ian@cygnus.com>
-
- * configure.tgt (i[3456]86-*-solaris2*): New target. From Pavel
- Roskin <pavel_roskin@geocities.com>.
-
-1999-01-19 Nick Clifton <nickc@cygnus.com>
-
- * ldlang.c (lang_size_sections): Count loadable sections as
- contributing to the size of the current segment.
-
-1999-01-15 Nick Clifton <nickc@cygnus.com>
-
- * ldlang.c (lang_size_sections): Only update the current
- address of a region if the section just placed into it is an
- allocated section.
-
-1999-01-12 Nick Clifton <nickc@cygnus.com>
-
- * Makefile.am: Replace efr30.o with eelf32fr30.o.
- * Makefile.in: Regenerate.
-
- * configure.tgt: Replace fr30 with elf32fr30.
-
- * emulparams/elf32fr30.sh: New file: Replaces fr30.sh, and uses
- generic elf.sc script. Also replaces the .stack section with a
- user definable symbol __stack.
-
-1999-01-11 Nick Clifton <nickc@cygnus.com>
-
- * scripttempl/fr30.sc: Fill .init and .fini sections with NOP
- pattern.
-
-1999-01-03 Ken Raeburn <raeburn@cygnus.com>
-
- * Makefile.am (check-DEJAGNU): No longer provide HOSTING_EMU,
- HOSTING_CRT0, HOSTING_LIBS; the test suite can extract them from
- configure.host and configure.tgt now.
- * Makefile.in: Rebuild.
-
-1998-12-27 Ulrich Drepper <drepper@cygnus.com>
-
- * lexsup.c (parse_args, case OPTION_RPATH): Avoid adding duplicate
- elements to rpath.
-
-Thu Dec 10 11:12:28 1998 Andreas Schwab <schwab@issan.cs.uni-dortmund.de>
-
- * Makefile.am (ALL_EMULATIONS): Remove pe-dll.o and deffilep.o.
- (ALL_EMUL_EXTRA_OFILES): New variable. Put them here instead.
- * configure.in: Set EMUL_EXTRA_OFILES to $(ALL_EMUL_EXTRA_OFILES)
- if configuring with all targets.
- * configure, Makefile.in, aclocal.m4: Rebuild.
-
- * emultempl/pe.em (pe_enable_stdcall_fixup): Make static.
- (pe_dll_do_default_excludes): Removed, unused.
- (pe_def_file, pe_dll_export_everything, pe_dll_kill_ats,
- pe_dll_stdcall_aliases): Don't initialize them, this file may be
- compiled more than once.
- * pe-dll.c (pe_def_file, pe_dll_export_everything,
- pe_dll_do_default_excludes, pe_dll_kill_ats,
- pe_dll_stdcall_aliases): Define and initialize them here instead.
- (generate_reloc): Fix allocation of reloc_addresses array to use
- bfd_vma instead of unsigned long. Fix element size in qsort call.
- (reloc_sort): Compare pointers to bfd_vma instead of unsigned
- long.
-
-Mon Dec 7 21:10:09 1998 J.J. van der Heijden <j.j.vanderheijden@student.utwente.nl>
-
- * configure.tgt (i[3456]86-*-mingw32*): Add cygwin target specific
- files.
-
-Sun Dec 6 16:33:33 1998 Ian Lance Taylor <ian@cygnus.com>
-
- * configure.tgt (m68*-*-gnu*): New target. From Aymeric Vincent
- <aymeric.vincent@emi.u-bordeaux.fr>.
-
-1998-12-04 Nick Clifton <nickc@cygnus.com>
-
- * emulparams/fr30.sh (TEXT_START_ADDR): Change TEXT_START_ADDR
- from 0x100000 to 0x10000 so that it fits in 20 bits.
-
-Sat Nov 28 22:32:20 1998 Ian Lance Taylor <ian@cygnus.com>
-
- * ldemul.h (ldemul_recognized_file): Declare.
-
-Sat Nov 28 22:30:55 1998 Andreas Schwab <schwab@issan.cs.uni-dortmund.de>
-
- * ldlang.c (lang_add_wild): Don't pretend that there is an input
- file if the filename is a wildcard pattern.
-
-1998-11-25 DJ Delorie <dj@cygnus.com>
-
- * ldemul.h (ld_emulation_xfer_struct): new hook "recognized_file"
- * ldemul.c (ldemul_recognized_file): new function, new hook
- * ldint.texinfo: document new hook.
- * ldlang.c (load_symbols): call recognized_hook for all objects we
- do recognize, in case the emulation needs to handle them
- specially. PE DLLs use this.
- * pe-dll.c (pe_dll_generate_def_file): take out hack and debug
- printfs
- * emultempl/pe.em (gld_i386_recognized_file): new function
- (gld_i486_unrecognized_file): take out hack
-
-1998-11-23 DJ Delorie <dj@cygnus.com>
-
- * pe-dll.c (fill_edata): fill in timestamp
- (make_head): name object files sequentially to ensure
- they link in the right order.
- (make_tail): same here
- (pe_process_import_defs): use sequential names for bfds to ensure
- proper link order.
- (pe_implied_import_dll): new function; handles linking directly
- against DLLs by simulating IMPORTS directives. * emultempl/pe.em
- (gld_i386pe_before_parse): hack bfd to not recognize .dll files
- via bfd_pe_dll_not_recognized_hack
-
-1998-11-23 DJ Delorie <dj@cygnus.com>
-
- * emultempl/pe.em (gld_i386pe_parse_args): Conditionalize call to
- pe_dll_add_excludes
-
-Mon Nov 23 14:36:18 1998 Nick Clifton <nickc@cygnus.com>
-
- * emultempl/pe.em (after_parse): Only create an undefined entry
- symbol if one has been specified.
-
-1998-11-23 DJ Delorie <dj@cygnus.com>
-
- * emultempl/pe.em (gld_i386pe_after_open): call
- pe_process_import_defs
- * pe-dll.c (pe_dll_generate_def_file): calculate BASE from
- pe_data, only print if actually set. Print version only if
- set.
- (save_relocs): save relocs for both input and output.
- (make_one): support internal/external different names.
- (pe_dll_generate_implib): support new make_one
- (pe_process_import_defs): new function; handles IMPORT
- directives in .def files.
-
-Fri Nov 20 13:06:49 1998 Nick Clifton <nickc@cygnus.com>
-
- * ldmisc.c (vfinfo): Cope with empty symbol names.
-
-Thu Nov 19 13:31:15 1998 Nick Clifton <nickc@cygnus.com>
-
- * scripttempl/pe.sc: Add provision of '_end' symbol.
-
-Wed Nov 18 18:18:43 1998 Geoffrey Noer <noer@cygnus.com>
-
- * configure.tgt: change refs from cygwin32* to cygwin*.
- * aclocal.m4: regenerate
- * configure.in: don't need to call AM_CYGWIN32.
- * configure: regenerate
-
-Mon Nov 16 22:14:07 1998 DJ Delorie <dj@cygnus.com>
-
- * emultempl/pe.em (gld_i386_finish): generate import library
- * deffile.h: add hint member.
- * pe-dll.c (pe_dll_generate_implib): New function with helpers;
- generates the import library directly from the export table.
- (fill_edata): remember the actual hint for the import library.
-
-Sat Nov 14 14:36:24 1998 Ian Lance Taylor <ian@cygnus.com>
-
- * ld.1: Some cleanups from NOKUBI Hirotaka <hnokubi@yyy.or.jp>.
-
-Thu Nov 12 19:21:57 1998 Dave Brolley <brolley@cygnus.com>
-
- * po/ld.pot: Regenerated.
- * po/POTFILES.in: Regenerated.
- * configure: Regenerated.
- * aclocal.m4: Regenerated.
- * Makefile.in: Regenerated.
-
-Wed Nov 11 18:10:15 1998 DJ Delorie <dj@cygnus.com>
-
- * pe-dll.c (generate_reloc): don't output PE relocs for sections
- that won't be loaded.
-
-Wed Nov 11 13:44:54 1998 DJ Delorie <dj@cygnus.com>
-
- * pe-dll.c (fill_edata): don't strip underscores
-
-Tue Nov 10 21:28:19 1998 DJ Delorie <dj@cygnus.com>
-
- * ld.texinfo: added i386pe option summary
-
-Tue Nov 10 17:53:17 1998 DJ Delorie <dj@cygnus.com>
-
- * pe-dll.c (process_def_file): properly note undefined exported
- symbols, clean up old code.
- (pe_dll_generate_def_file): don't crash if pe_def_file is NULL
- * emultempl/pe.em (gld_i386_parse_args): add
- (en/dis)able-stdcall-fixups
- (pe_fixup_stdcalls): warn about stdcall fixups
- (gld_i386_unrecognized_file): make exported symbols undefs so that
- archive members get pulled in
-
-Tue Nov 10 14:50:51 1998 Catherine Moore <clm@cygnus.com>
-
- * scripttempl/elfd10v.sc: Add KEEP attribute to .init,
- .fini, .dtors and .ctors. Add .data and .text
- wildcards to support section garbage collection.
-
-Mon Nov 9 22:52:50 1998 DJ Delorie <dj@indy.delorie.com>
-
- * deffilep.y: properly handle relocs with multiple def_files,
- cache import module names
-
-Mon Nov 9 22:44:58 1998 DJ Delorie <dj@cygnus.com>
-
- * pe-dll.c (process_def_file): don't assume exports won't move
- during a realloc
-
-Mon Nov 9 16:41:30 1998 DJ Delorie <dj@cygnus.com>
-
- * pe-dll.c: New file; direct support for PE DLLs
- * deffile.h: New file; direct support for PE DLLs
- * deffilep.y: New file; direct support for PE DLLs
- * emultempl/pe.em: add direct support for PE DLLs
- * configure.tgt: allow target-specific extra files
- * configure.in: allow target-specific extra files
- * ldlang.c (lang_add_assignment): return the assignment so that
- one can change the value later based on the object files (pe-dll
- DEF files do this)
- * ldint.texinfo: add section for emulation walkthrough
- * Makefile.am: add new files and target-specific extra files
- * emultempl/pe.em (gld_i386_list_options): list dll-specific
- options.
- * pe-dll.c (process_def_file): auto-export everything if
- nothing is otherwise exported.
-
-Wed Nov 4 16:39:18 1998 Nick Clifton <nickc@cygnus.com>
-
- * Makefile.am: Add support for FR30 target.
- * configure.tgt: Add support for FR30 target.
- * Makefile.in: Regenerate.
- * emulparams/fr30.sh: New file.
- * scripttempl/fr30.sc: New file.
-
-Mon Nov 2 14:47:15 1998 Catherine Moore <clm@cygnus.com>
-
- * ldmain.c (main): Don't report error for dynamic links and
- --gc-sections.
-
-1998-10-26 16:05 Ulrich Drepper <drepper@cygnus.com>
-
- * lexsup.c (ld_options): Change text of -O to Optimize output file".
- (parse_args): Set link_info.optimize based on -O argument.
- * ldmain.c (main): Initialize link_info.optimze to false.
- * ld.texinfo: Describe -O option.
- * ld.1: Likewise.
-
-Mon Oct 12 14:29:56 1998 Nick Clifton <nickc@cygnus.com>
-
- * scripttempl/v850.sc: Move .sbss and .scommon sections into their
- own segment, so that they can be next to the .bss section and so
- initialised by the same piece of code.
-
-Fri Oct 9 15:59:52 1998 Catherine Moore <clm@cygnus.com>
-
- * scripttempl/elf.sc: Merge .sdata.* etc sections.
- * ldctor.c (ldctor_build_sets): Set SEC_KEEP for
- ctor sections.
-
-Mon Oct 5 09:40:43 1998 Catherine Moore <clm@cygnus.com>
-
- * ldmain.c (main): Error if --gc-sections and
- dyanmic linking.
- * scripttempl/v850.sc: Add KEEP attribute to .init,
- .fini, .dtors and .ctors. Add .data and .text
- wildcards to support section garbage collection.
-
-Wed Sep 30 11:19:15 1998 Nick Clifton <nickc@cygnus.com>
-
- * scripttempl/v850.sc: Rename .call_table section to
- .call_table_data and create a new section called
- .call_table_text.
-
-Sun Sep 20 00:43:26 1998 Ian Lance Taylor <ian@cygnus.com>
-
- * scripttempl/elf.sc: Add alignment at the end of the .bss
- section, so that it is included in the memsize of the segment.
-
-Fri Sep 18 13:42:42 1998 Catherine Moore <clm@cygnus.com>
-
- * emultempl/elf32.em (gld_place_orphan): Don't process for
- sections with SEC_EXCLUDE flag.
-
-Fri Sep 4 09:24:02 1998 Nick Clifton <nickc@cygnus.com>
-
- * emulparams/d30velf.sh (TEXT_SIZE): Increased to 2000K.
- (DATA_SIZE): Increased to 2000K.
-
-Thu Sep 3 17:30:58 1998 Richard Henderson <rth@cygnus.com>
-
- * emulparams/d10velf.sh (TEMPLATE_NAME): Use elf32.
-
-Mon Aug 31 01:06:00 1998 Catherine Moore <clm@cygnus.com>
-
- * Makefile.am: Change armelf.sc to elf.sc
- * Makefile.in: Regenerate.
-
-Mon Aug 31 11:12:04 1998 Catherine Moore <clm@cygnus.com>
-
- * emulparams/armelf.sh: Change SCRIPT_NAME to
- elf. Change TEXT_START_ADDR to 0x8000. Define
- OTHER_TEXT_SECTIONS, OTHER_BSS_SYMBOLS and
- OTHER_BSS_END_SYMBOLS.
- * scripttempl/elf.sc: Modify to use
- OTHER_BSS_END_SYMBOLS.
- * scripttempl/elfarm.sc: Remove file.
-
-Tue Aug 18 12:05:34 1998 Catherine Moore <clm@cygnus.com>
-
- * emultempl/armelf.em (gld_armelf_before_allocation):
- Add bfd_ prefix to elf32_arm_process_before_allocation
- and elf32_arm_allocate_interworking_sections.
- (gld_armelf_after_open): Add bfd_ prefix to
- elf32_arm_get_bfd_for_interworking.
-
-Fri Aug 14 15:34:29 1998 Ian Lance Taylor <ian@cygnus.com>
-
- * Makefile.am: Rebuild dependencies.
- * Makefile.in: Rebuild.
-
- * ldgram.y: Include "ldctor.h".
- (statement): Accept SORT around CONSTRUCTORS.
- * ldctor.c: Include <ctype.h>.
- (constructors_sorted): New global variable.
- (ctor_prio, ctor_cmp): New static functions.
- (ldctor_build_sets): Sort constructors if requested.
- * ldctor.h (constructors_sorted): Declare.
- * ldlang.c (print_statement): Print sorted CONSTRUCTORS
- correctly.
- * scripttempl/elf.sc: Add sort around CONSTRUCTORS.
- * ld.texinfo (Output Section Keywords): Document SORT
- (CONSTRUCTORS).
-
-Thu Aug 13 12:20:39 1998 Catherine Moore <clm@cygnus.com>
-
- * emulparams/armelf.sh: Define TEMPLATE_NAME to armelf.
- * scripttempl/elfarm.sc: Include .glue_7t and .glue7
- sections.
- * emultempl/armelf.em: New file.
-
-Thu Aug 13 12:52:45 1998 H.J. Lu <hjl@gnu.org>
-
- * Makefile.am (ld.dvi): Use " instead of ' for MAKEINFO.
- * Makefile.in: Rebuild.
-
-Tue Aug 11 16:17:01 1998 Catherine Moore <clm@cygnus.com>
-
- * scripttempl/elfarm.sc: Change text start address
- back to zero.
-
-Tue Aug 11 10:01:12 1998 Jeffrey A Law (law@cygnus.com)
-
- * emulparms/mn10200.sh (MAX_PAGESIZE): Define to 1.
- * emulparms/mn10300.sh (MAX_PAGESIZE): Define to 1.
-
-Sun Aug 9 20:31:27 1998 Catherine Moore <clm@cygnus.com>
-
- * scripttempl/elfarm.sc: Set text start address to
- 0x8000. Add __bss_end definition.
-
-Sat Aug 1 11:47:37 1998 Catherine Moore <clm@cygnus.com>
-
- * scripttempl/elfarm.sc: New file.
- * emulparams/armelf.sh: Set SCRIPT_NAME to elfarm.
-
-Fri Jul 31 15:56:16 1998 Catherine Moore <clm@cygnus.com>
-
- * emulparams/armelf.sh: New file.
- * configure.tgt: Recognize thumb-elf and arm-elf.
- * Makefile.am (earmelf.o): New.
- * Makefile.in: Rebuild.
-
-Fri Jul 24 12:00:57 1998 Ian Lance Taylor <ian@cygnus.com>
-
- * Makefile.am (install-exec-local): Don't remove the file before
- checking whether $(bindir) == $(tooldir)/bin. From Maciej
- W. Rozycki <macro@ds2.pg.gda.pl>.
- * Makefile.in: Rebuild.
-
- * configure.tgt: Recognize h8[35]00*-coff* as well as -hms*.
-
-Thu Jul 23 11:15:12 1998 Ian Lance Taylor <ian@cygnus.com>
-
- * scripttempl/aout.sc: If ALIGNMENT is defined, use it to set
- alignment of end symbol.
- * scripttempl/elf.sc: Likewise.
- * emulparams/sun4.sh (ALIGNMENT): Define.
- * emulparams/elf32_sparc.sh (ALIGNMENT): Define.
- * ldint.texinfo (emulation parameters): Document ALIGNMENT.
-
- * lexsup.c (parse_args): Add missing break statement.
-
- * ldlang.c (lang_gc_sections_1): Add default case to switch to
- avoid warnings.
-
-Tue Jul 14 15:42:17 1998 Richard Henderson <rth@cygnus.com>
-
- * configure.tgt (i?86-*-beos{pe,elf,}*): Recognize.
- * Makefile.am (ei386beos.o): New.
- * emulparams/i386beos.sh: New file.
- * emultempl/beos.em, scripttempl/i386beos.sc: New file.
-
-Tue Jul 14 15:35:42 1998 Richard Henderson <rth@cygnus.com>
-
- * lexsup.c: New option --version-exports-section.
- * ld.h (struct args_type): Add version_exports_section.
- * ldlang.c (lang_do_version_exports_section): New function.
- (lang_process): Call it.
-
-Mon Jul 13 13:20:23 1998 Steve Chamberlain <sac@transmeta.com>
-
- * ldlex.l: Accept ASSERT.
- * ldgram.y (exp): Add ASSERT_K case.
- * ldexp.h (node_type): Add etree_assert to node_class enum.
- (etree_type): Add assert_s field.
- (exp_assert): Declare.
- * ldexp.c (exp_fold_tree): Handle etree_assert.
- (exp_assert): New function.
- (exp_print_tree): Handle etree_assert.
- * ld.texinfo (Miscellaneous Commands): Document ASSERT.
-
-Wed Jul 8 14:03:12 1998 Ian Lance Taylor <ian@cygnus.com>
-
- * ldgram.y: Change MAX to MAX_K and MIN to MIN_K, to avoid
- conflicts with system header files. Change all uses.
-
- * Makefile.am (MAINTAINERCLEANFILES): Define.
- * Makefile.in: Rebuild.
-
-Tue Jul 7 18:03:22 1998 Ian Lance Taylor <ian@cygnus.com>
-
- * Makefile.am (ldver.texi): New target.
- (ld.info, ld.dvi): Depend upon ldver.texi.
- * ld.texinfo: Include ldver.texi. Mention version number on title
- page and in top node.
- * Makefile.in: Rebuild.
-
-Mon Jul 6 14:55:13 1998 Ian Lance Taylor <ian@cygnus.com>
-
- * configure.tgt (i[3456]86-*-solaris*): New target.
-
-Fri Jul 3 14:19:06 1998 Ian Lance Taylor <ian@cygnus.com>
-
- * ldlang.c (wild_section): Don't get an assertion failure if the
- section is discarded.
-
- * scripttempl/pe.sc: Use SORT to sort sections appropriately.
- * emultempl/pe.em (sort_by_file_name): Remove.
- (sort_by_section_name): Remove.
- (sort_sections_1, sort_sections): Remove.
- (gld_${EMULATION_NAME}_before_allocation): Don't call
- sort_sections.
- (hold_section, hold_section_name): New static variables.
- (hold_use, hold_text, hold_rdata, hold_data, hold_bss): Likewise.
- (gld_${EMULATION_NAME}_place_orphan): Rewrite. Look for a good
- place to put the section. Align the section. Sort the input
- sections by name.
- (gld_${EMULATION_NAME}_place_section): New static function.
-
- * ldlang.c (wild_sort): When sorting by file name, sort by archive
- name first.
-
- * emultempl/pe.em (set_pe_subsystem): Don't call
- ldlang_add_undef.
- (gld_${EMULATION_NAME}_after_parse): New static function.
- (ld_${EMULATION_NAME}_emulation): Use new after_parse function
- rather than after_parse_default.
-
- * ldgram.y (extern_name_list): Do not require symbols to be
- separated by commas.
- (ifile_p1): Add EXTERN.
- * ldlex.l: Accept EXTERN in BOTH and SCRIPT mode as well as MRI
- mode.
- * ld.texinfo (Options): Mention that EXTERN is equivalent to -u.
- (Miscellaneous Commands): Document EXTERN.
-
-Wed Jul 1 19:40:34 1998 Richard Henderson <rth@cygnus.com>
-
- * ld.h (args_type): Add gc_sections.
- * ldgram.y (ldgram_had_keep, KEEP): New.
- (input_section_spec_no_keep): Rename from old input_section_spec.
- (input_section_spec): New. Recognize KEEP.
- * ldlang.c (wild_section): Handle keep sections.
- (lang_gc_wild_section, lang_gc_wild_file, lang_gc_wild): New.
- (lang_gc_sections_1, lang_gc_sections): New.
- (lang_process): Invoke lang_gc_sections.
- (lang_add_wild): Add keep argument. Update all callers.
- * ldlang.h (lang_wild_statement_struct): Add keep_sections.
- * ldlex.l (KEEP): Match it.
- * ldmain.c (main): Error on -r and --gc-sections.
- * lexsup.c: Add --gc-sections.
-
- * scripttempl/elf.sc: Merge .text.* etc sections appropriately.
- Mark startup sections with KEEP.
- * scripttempl/elfppc.sc: Likewise.
-
- * ld.texinfo: Update for --gc-sections and KEEP.
-
-Wed Jul 1 15:21:20 1998 Ian Lance Taylor <ian@cygnus.com>
-
- From Peter Jordan <pjordan@chla.usc.edu>:
- * scripttempl/i386go32.sc: Correct constructor handling for -u.
-
-Tue Jun 23 15:17:27 1998 Ian Lance Taylor <ian@cygnus.com>
-
- * Makefile.am (install-data-local): Make ldscripts subdirectory.
- * Makefile.in: Rebuild.
-
-Tue Jun 23 15:17:04 1998 Mike Stump <mrs@wrs.com>
-
- * Makefile.am (install-exec-local): Don't let EXEEXT interfere
- with the program transform name.
- * Makefile.in: Rebuild.
-
-Sun Jun 21 23:55:16 1998 Jeffrey A Law (law@cygnus.com)
-
- * ld.texinfo: Note that -relax may make symbolic debugging
- impossible on some platforms.
-
-Tue Jun 16 12:51:13 1998 Geoff Keating <geoffk@ozemail.com.au>
-
- * Makefile.am (Makefile): Remove target.
- (config.status): New target.
- * Makefile.in: Rebuild.
-
- * configure.host (powerpc*-*-linux-gnu*): New host.
-
-Fri Jun 12 17:38:07 1998 Doug Evans <devans@seba.cygnus.com>
-
- * scripttempl/elf.sc (INPUT_FILES): Optional INPUT spec.
-
- * emulparams/m32relf.sh (OTHER_RELOCATING_SECTIONS): Change top of
- stack to 8MB.
-
-Fri Jun 12 19:33:17 1998 Ian Lance Taylor <ian@cygnus.com>
-
- * Makefile.am (HFILES): Remove config.h.
- (EMULATION_OFILES, POTFILES): Move patch of May 14 from
- Makefile.in to Makefile.am.
- (earmcoff.c): Depend upon armcoff.em, not generic.em.
- * po/Make-in (all-yes): Correct misspelling in $(PACKAGE).
- ($(srcdir)/$(PACKAGE).pot): Pass -C to $(XGETTEXT).
- * Makefile.in, po/POTFILES.in, po/ld.pot: Rebuild.
-
-Fri Jun 12 13:43:17 1998 Tom Tromey <tromey@cygnus.com>
-
- * po/Make-in (all-yes): If maintainer mode, depend on .pot file.
- ($(PACKAGE).pot): Unconditionally depend on POTFILES.
-
-Tue Jun 9 09:36:48 1998 Nick Clifton <nickc@cygnus.com>
-
- * ldlang.c (lang_finish): Add CONST type modifier to declaration
- of 'send'.
-
-Fri Jun 5 18:19:59 1998 Ian Lance Taylor <ian@cygnus.com>
-
- * emultempl/aix.em (gld${EMULATION_NAME}_before_parse): Set
- config.has_shared to true.
- * emultempl/linux.em (gld${EMULATION_NAME}_before_parse):
- Likewise.
- * emultempl/sunos.em (gld${EMULATION_NAME}_before_parse):
- Likewise.
-
-Tue Jun 2 12:55:03 1998 Ian Lance Taylor <ian@cygnus.com>
-
- * ldlang.c (lang_finish): If the entry symbol is not found, try
- parsing it as a number.
- * ld.texinfo (Options): Document this.
-
-Mon Jun 1 14:01:20 1998 Ian Lance Taylor <ian@cygnus.com>
-
- * ld.texinfo (Input Section Wildcards): Document SORT keyword.
-
-Mon May 18 12:42:53 1998 Doug Evans <devans@canuck.cygnus.com>
-
- * ld.h (ld_config_type): New member has_shared.
- * ldmain.c (main): Initialize it.
- * emultempl/elf32.em (gld${EMULATION_NAME}_before_parse): Set it.
- * lexsup.c (parse_args): Treat -shared as error if not supported.
-
-Mon May 18 13:14:43 1998 Ian Lance Taylor <ian@cygnus.com>
-
- From Jason Merrill <jason@cygnus.com>:
- * ldlang.c (wild_sort): Correct order of sort.
- * scripttempl/elf.sc: Put *crtbegin.o before other .ctors and
- .dtors.
- * scripttempl/elfd10v.sc: Likewise.
- * scripttempl/elfd30v.sc: Likewise.
- * scripttempl/elfppc.sc: Likewise.
-
-Fri May 15 00:22:35 1998 Ian Lance Taylor <ian@cygnus.com>
-
- * ldlex.l: Recognize keyword SORT.
- * ldgram.y (current_file): Change to struct wildcard_spec.
- (%union): Add new fields cname and wildcard.
- (wildcard_name, wildcard_spec): New nonterminals.
- (file_NAME_list): Use wildcard_spec.
- (input_section_spec): Change current_file usage.
- * ld.h (struct wildcard_spec): Define.
- * ldlang.h (lang_wild_statement_struct): Add new fields
- sections_sorted and filenames_sorted.
- (lang_add_wild): Update declaration.
- * ldlang.c (wild_sort): New static function.
- (wild_section): Use wild_sort.
- (print_wild_statement): Print sorting information.
- (lang_add_wild): Add new parameters sections_sorted and
- filenames_sorted. Change all callers.
- * mri.c (mri_draw_tree): Update calls to lang_add_wild.
- * scripttempl/elf.sc: Sort .ctors.* and .dtors.* by section name.
- * scripttempl/elfd10v.sc: Likewise.
- * scripttempl/elfd30v.sc: Likewise.
- * scripttempl/elfppc.sc: Likewise.
-
-Thu May 14 18:39:16 1998 Richard Henderson <rth@cygnus.com>
-
- * emulparams/m32relf.sh (TEMPLATE_NAME): Define.
-
-Thu May 14 14:51:24 1998 Nick Clifton <nickc@cygnus.com>
-
- * ldemul.h: Add new prototype: ldemul_list_emulation_options.
- (ld_emulation_xfer_struct): Add new field: list_options.
- * ldemul.c (ldemul_list_options): New function. Call the
- list_options field of the ld_emulation_xfer_struct for each
- supported emulation, if such a function is present.
- * lexsup.c (help): Call ldemul_list_emulation_options.
- * emultempl/pe.em (gld_<>_list_options): New function. Describe
- the pe emulation specific command line options.
- * emultempl/armcoff.em (gld<>_list_options): New function.
- Describe the armcoff emulation specific command line options.
-
- * emultempl/pe.em: Add a new command line option:
- --support-old-code.
- * emultempl/armcoff.em: Ditto.
- * ld.texinfo: Document the --support-old-code option.
-
- * Makefile.in: Add emulation files for POTFILES.in target.
- * emultempl/pe.em: Internationalise suitable strings.
- * emultempl/armcoff.em: Internationalise suitable strings.
- * po/POTFILES.in: Rebuilt.
-
-Sun May 10 22:36:30 1998 Jeffrey A Law (law@cygnus.com)
-
- * po/Make-in (install-info): New target.
-
-Tue Apr 28 19:18:30 1998 Tom Tromey <tromey@cygnus.com>
-
- * ldmain.c (main): Conditionally call setlocale.
- * ld.h: Include <locale.h> if HAVE_LOCALE_H.
- (LC_MESSAGES): Now can be defined even when ENABLE_NLS.
-
-Mon Apr 27 11:56:21 1998 Ian Lance Taylor <ian@cygnus.com>
-
- * configure.in: Change version number to 2.9.4
- * configure: Rebuild.
-
- * ld.texinfo (Options) [-rpath-link]: Mention ld.so.conf.
-
- Based on patch from H.J. Lu <hjl@gnu.org>:
- * emultempl/elf32.em (global_vercheck_needed): New file static
- variable.
- (global_vercheck_failed): New file static variable.
- (gld${EMULATION_NAME}_after_open): Check for shared libraries
- twice, once with force set to 0 and once with it set to 1.
- (gld${EMULATION_NAME}_check_ld_so_conf): Add force parameter.
- Change all callers.
- (gld${EMULATION_NAME}_search_needed): Likewise.
- (gld${EMULATION_NAME}_try_needed): Likewise. If not force, check
- whether the libraries needs any incompatible versions.
- (gld${EMULATION_NAME}_vercheck): New static function.
-
-Wed Apr 22 16:01:35 1998 Tom Tromey <tromey@cygnus.com>
-
- * po/Make-in (MKINSTALLDIRS): Don't look in $(top_srcdir).
-
-Wed Apr 22 12:40:56 1998 Ian Lance Taylor <ian@cygnus.com>
-
- * Makefile.am (check-DEJAGNU): Add $(INTLLIBS) to LIBIBERTY when
- invoking runtest.
- * Makefile.in: Rebuild.
-
- * lexsup.c (parse_args): Change -l options into --library options
- to avoid confusion between -li and -library.
-
- * ld.texinfo (MEMORY): Clarify use of >REGION.
-
-Tue Apr 21 23:12:40 1998 Tom Tromey <tromey@scribbles.cygnus.com>
-
- * Many files: Added gettext invocations around user-visible
- strings.
- * ld.h: Added gettext-related includes and defines.
- * ldmain.c: Call setlocale, bindtextdomain, textdomain.
- * acconfig.h (ENABLE_NLS, HAVE_CATGETS, HAVE_GETTEXT, HAVE_STPCPY,
- HAVE_LC_MESSAGES): Define.
- * configure.in: Call CY_GNU_GETTEXT. Create po/Makefile.in and
- po/Makefile. Use AM_PROG_LEX.
- (TDIRS): AC_SUBST early on, to avoid having value split when it
- happens to cross line 90 of the generated sed script.
- * Makefile.am (SUBDIRS): New macro.
- (POTFILES): Likewise.
- (po/POTFILES.in): New target.
- (ld_new_LDADD): Added INTLLIBS.
- (ld_new_DEPENDENCIES): Added INTLDEPS.
- * po/Make-in, po/POTFILES.in, po/ld.pot: New files.
-
-Tue Apr 21 23:07:07 1998 Ian Lance Taylor <ian@cygnus.com>
-
- * ld.texinfo (Simple Example): Rewrite a few things as suggested
- by Nick Clifton <nickc@cygnus.com>.
- (PROVIDE): Likewise.
-
-Tue Apr 21 09:55:06 1998 Nick Clifton <nickc@cygnus.com>
-
- * emultempl/pe.em: Rename external arm interworking functions
- to conform to BFD naming conventions. Add code to _after_open()
- function to obtain a bfd for use by the interworking code.
-
- * emultempl/armcoff.em: Rename external arm interworking functions
- to conform to BFD naming conventions. Add new _after_open()
- function to obtain a bfd for use by the interworking code.
-
-Sun Apr 19 19:23:09 1998 Richard Henderson <rth@cygnus.com>
-
- * ldlang.c (lang_size_sections) [case lang_assignment_statement_enum]:
- Update dot and the default memory section even when relaxing.
-
-Sat Apr 18 18:41:12 1998 Richard Henderson <rth@cygnus.com>
-
- * ldlang.c (lang_one_common): Manipulate the section's cooked size
- rather than its raw size.
-
-Tue Apr 7 13:35:29 1998 H.J. Lu <hjl@gnu.org>
-
- * configure.in (TESTBFDLIB): New. Defined and substituted.
- * Makefile.am (TESTBFDLIB): Changed to @TESTBFDLIB@.
- * configure, Makefile.in: Rebuild.
-
-Mon Apr 6 15:33:39 1998 Ian Lance Taylor <ian@cygnus.com>
-
- * Makefile.am (ld.info): Invoke makeinfo with -I options directly
- rather than relying on default rule. Don't depend upon
- bfdsumm.texi.
- (ld.dvi): Likewise.
- (bfdsumm.texi): Remove target.
- (CLEANFILES): Take bfdsumm.texi out of value.
- * Makefile.in: Rebuild.
-
-Sun Apr 5 13:07:57 1998 Ian Lance Taylor <ian@cygnus.com>
-
- * scripttempl/pe.sc: Use shell variables to avoid depending upon
- how $ is handled when expanding a shell substitution.
-
-Fri Apr 3 00:56:50 1998 Ian Lance Taylor <ian@cygnus.com>
-
- * Makefile.am (MOSTLYCLEANFILES): Add ld.log and ld.sum.
- (DISTCLEANFILES): Add site.exp and site.bak.
- * Makefile.in: Rebuild.
-
- * configure.in: Put the tdirs in a file and use AC_SUBST_FILE,
- rather than in a shell variable and using AC_SUBST.
- * Makefile.am (DISTCLEANFILES): Remove ldscripts. Add tdirs.
- (distclean-local): New target.
- * configure, Makefile.in: Rebuild.
-
- * ld.texinfo: Completely rewrite linker script documentation.
-
-Mon Mar 30 12:47:33 1998 Ian Lance Taylor <ian@cygnus.com>
-
- * configure.in: Set version to 2.9.1.
- * configure: Rebuild.
-
- * Branched binutils 2.9.
-
-Sat Mar 28 16:48:19 1998 Ian Lance Taylor <ian@cygnus.com>
-
- * Makefile.am (MOSTLYCLEANFILES): Remove tmpdir.
- (mostlyclean-local): New target to remove tmpdir.
- * Makefile.in: Rebuild.
-
- Fix some gcc -Wall warnings:
- * ldcref.c (output_cref): Add casts to avoid warnings.
- * ldfile.c (ldfile_add_arch): Likewise.
- * ldlang.c (lang_leave_overlay_section): Likewise.
- * lexsup.c (OPTION_COUNT): Likewise.
- (parse_args): Likewise.
- * emultempl/elf32.em (gld${EMULATION_NAME}_place_orphan):
- Likewise.
- * emultempl/sunos.em (gld${EMULATION_NAME}_search_dir): Likewise.
- * ldlang.c (lang_check): Initialize variables to avoid warnings.
- * ldwrite.c (build_link_order): Likewise.
- * emultempl/sunos.em (gld${EMULATION_NAME}_find_so): Likewise.
- * emultempl/armcoff.em (gld${EMULATION_NAME}_before_allocation):
- Remove unused variables.
-
- * Makefile.am (MOSTLYCLEANFILES): Correct name (was
- MOSTCLEANFILES).
- * Makefile.in: Rebuild.
-
-Fri Mar 27 16:39:25 1998 Ian Lance Taylor <ian@cygnus.com>
-
- * emultempl/pe.em (gld_${EMULATION_NAME}_before_allocation): Put
- ARM code inside ifdef TARGET_IS_armpe.
-
-Wed Mar 25 11:34:13 1998 Ian Lance Taylor <ian@cygnus.com>
-
- Based on patch from H.J. Lu <hjl@gnu.org>:
- * Makefile.am (LDDISTSTUFF): New variable.
- (diststuff): New target.
- * Makefile.in: Rebuild.
-
- * scripttempl/pe.sc: Only include .idata\$[0-7] in .idata when
- relocating.
-
-Tue Mar 24 15:59:29 1998 Nick Clifton <nickc@cygnus.com>
-
- * scripttempl/pe.sc (.text): Add .glue_7 and .glue_7t sections to
- hold Arm/Thumb stubs.
-
- * emultempl/pe.em (gld_pe_before_allocation): Call
- arm_process_before_allocation (for ARM/Thumb targets) in order to
- gather interworking stb information.
-
-Mon Mar 23 18:54:15 1998 Joel Sherrill <joel@OARcorp.com>
-
- * configure.tgt: (sh*-*-rtems*): Switched from ELF to COFF.
-
-Fri Mar 20 19:17:13 1998 Ian Lance Taylor <ian@cygnus.com>
-
- * aclocal.m4, configure: Rebuild with libtool 1.2.
-
-Thu Mar 19 14:54:45 1998 Geoffrey Noer <noer@cygnus.com>
-
- * scripttempl/pe.sc: The Cygwin32 library uses a .data$nocopy
- section to avoid copying certain data on fork. The linker used to
- include this between __data_start__ and __data_end__, but that
- breaks building the cygwin32 dll. The fix is to rename the
- section ".data_cygwin_nocopy" and explictly include it after
- __data_end__.
-
-Wed Mar 18 09:42:24 1998 Nick Clifton <nickc@cygnus.com>
-
- * configure.tgt (targ_extra_emuls): Add thumb-pe target.
-
-Sun Mar 8 23:34:14 1998 Stan Cox <scox@equinox.cygnus.com>
-
- * configure.tgt (sparclite*-*-elf): Added.
-
-Mon Mar 2 19:24:08 1998 Michael Meissner <meissner@cygnus.com>
-
- * ldlang.c (lang_size_sections): If the default memory region is
- *default*, see if there is a memory region that could be used.
-
-Thu Feb 26 17:09:53 1998 Michael Meissner <meissner@cygnus.com>
-
- * scripttempl/elfd30v.sc: Add support for .eit_v section and put
- it at 0xfffff020.
- * emulparams/d30v{elf,_o,_e}.sh: Ditto.
-
-Mon Feb 23 17:46:51 1998 Ian Lance Taylor <ian@cygnus.com>
-
- * emultempl/pe.em (sort_sections): Permit the wildcard to include
- a trailing '*' when sorting grouped sections.
- * scripttempl/pe.sc: Include grouped sections using NAME\$*. Only
- include them when relocating.
-
-Wed Feb 18 23:39:46 1998 Richard Henderson <rth@cygnus.com>
-
- * Makefile.am (install-exec-local): Install properly when ln
- fails or tooldir == prefix.
-
-Fri Feb 13 15:24:06 1998 Ian Lance Taylor <ian@cygnus.com>
-
- * Makefile.am (AUTOMAKE_OPTIONS): Define.
- * configure, Makefile.in, aclocal.m4: Rebuild with automake 1.2e.
-
-Thu Feb 12 14:10:44 1998 Ian Lance Taylor <ian@cygnus.com>
-
- * scripttempl/elf.sc: Align the _end symbol according to the ELF
- format size. From Gordon W. Ross <gwr@mc.com>.
-
- NetBSD patches from Gordon W. Ross <gwr@mc.com>:
- * configure.host (alpha*-*-netbsd*): New host.
- * configure.tgt (alpha*-*-netbsd*, powerpc-*-netbsd*): New
- targets.
-
- * lexsup.c (help): Update bug-gnu-utils address.
- * ld.texinfo (Bug Reporting): Likewise.
-
-Tue Feb 10 18:05:56 1998 Ian Lance Taylor <ian@cygnus.com>
-
- * ldlang.c (lang_size_sections): Warn if some memory regions were
- defined, but a loadable section is going into the default memory
- region.
-
-Tue Feb 10 16:17:20 1998 H.J. Lu <hjl@gnu.org>
-
- * ldlex.l (V_IDENTIFIER): Allow '.' as symbol prefix.
-
-Tue Feb 10 15:09:45 1998 Ian Lance Taylor <ian@cygnus.com>
-
- * Makefile.am (Makefile): Add target, for dependencies on
- configure.host and configure.tgt.
- * configure.host, configure.tgt: Change -linux* to -linux-gnu*.
- * Makefile.in: Rebuild.
-
-Mon Feb 9 13:44:40 1998 Andrew Cagney <cagney@b1.cygnus.com>
-
- * scripttempl/elfd10v.sc (.stack): Move stack to 0x00..7FFE.
-
- * emulparams/d10velf.sh (READONLY_START_ADDR): Read only section
- moved to 0x00.....4.
-
-Sat Feb 7 15:41:26 1998 Ian Lance Taylor <ian@cygnus.com>
-
- * configure, aclocal.m4: Rebuild with new libtool.
-
-Thu Feb 5 12:16:11 1998 Ian Lance Taylor <ian@cygnus.com>
-
- * scripttempl/pe.sc: Remove ${RELOCATING-0} from all sections.
- From Thomas de Lellis <tdel@wrs.com>.
-
- * configure, Makefile.in, aclocal.m4: Rebuild with new libtool.
-
-Wed Feb 4 13:02:32 1998 Ian Lance Taylor <ian@cygnus.com>
-
- * Makefile.am (ld_new_LDADD): Remove @LEXLIB@.
- * Makefile.in: Rebuild.
-
-Mon Feb 2 19:34:54 1998 Steve Haworth <steve@pm.cse.rmit.EDU.AU>
-
- Add tms320c30 support:
- * configure.tgt (tic30-*-*aout*, tic30-*-*coff*): New targets.
- * emulparams/tic30aout.sh: New file.
- * emulparams/tic30coff.sh: New file.
- * scripttempl/tic30aout.sc: New file.
- * scripttempl/tic30coff.sc: New file.
- * Makefile.am (ALL_EMULATIONS): Add etic30aout.o and
- etic30coff.o.
- (etic30aout.c, etic30coff.c): New targets.
- * Makefile.in: Rebuild.
-
-Mon Feb 2 14:10:59 1998 Ian Lance Taylor <ian@cygnus.com>
-
- * configure.host: Correct HOSTING_CRT0 in alpha*-*-linux* case to
- accept either ld.so or ld-linux.so.
-
-Fri Jan 30 19:16:28 1998 Doug Evans <devans@canuck.cygnus.com>
-
- * Makefile.am ({CC,CXX}_FOR_TARGET): Change program_transform_name
- to transform.
- * Makefile.in: Regenerate.
-
-Fri Jan 30 19:15:17 1998 Geoff Keating <geoffk@ozemail.com.au>
-
- * scripttempl/elfppc.sc: Put .dynsbss in .sbss.
-
-Fri Jan 30 11:43:49 1998 H.J. Lu <hjl@gnu.ai.mit.edu>
-
- * Makefile.am (eelf32bsmip.c, eelf32lsmip.c): New targets.
- * Makefile.in: Rebuild.
-
-Thu Jan 29 16:04:21 1998 Mumit Khan <khan@xraylith.wisc.edu>
-
- * ldfile.c (slash): Set to backslash if _WIN32 but not
- __CYGWIN32__.
- (ldfile_open_file_search): If __MSDOS__ or _WIN32, accept a
- leading backslash or a leading x: as an absolute path.
- (ldfile_find_command_file): Use slash rather than / when
- generating name to try.
- * lexsup.c (PATH_SEPARATOR): Define.
- (set_default_dirlist): Use PATH_SEPARATOR rather than ':'.
-
-Wed Jan 28 14:06:30 1998 Richard Henderson <rth@cygnus.com>
-
- * emulparams/elf64_sparc.sh (ELFSIZE): 64
- (TEXT_START_ADDR): Round off, since SIZEOF_HEADERS is added later.
- (DATA_PLT): Needed by v9 abi.
-
-Wed Jan 28 16:37:27 1998 J.J. van der Heijden <J.J.vanderHeijden@student.utwente.nl>
-
- * configure.tgt (i[3456]86-*-mingw32*): New entry.
-
-Wed Jan 28 15:51:58 1998 Ian Lance Taylor <ian@cygnus.com>
-
- * scripttempl/elf.sc: Only include linkonce sections in final
- sections when relocating.
-
-Wed Jan 28 14:10:01 1998 Ian Lance Taylor <ian@cygnus.com>
-
- * ld.texinfo (Options): Add a brief description of the types of
- information included in a link map.
-
- * ld.texinfo (Options): Mention LDEMULATION in description of -m.
- (Environment): Mention LDEMULATION.
-
- * ld.texinfo (Options): Clarify --export-dynamic a bit.
-
-Thu Jan 22 16:07:23 1998 Richard Henderson <rth@cygnus.com>
-
- * ldlex.l (<SCRIPT>{WILDCHAR}*): Take care for the comments this
- pattern could match.
-
-Wed Jan 21 22:26:46 1998 Ian Lance Taylor <ian@cygnus.com>
-
- * emultempl/pe.em (gld_${EMULATION_NAME}_set_symbols): When doing
- a relocateable link, set the image base to 0, and don't define the
- various symbols.
- * emulparams/i386pe.sh (RELOCATEABLE_OUTPUT_FORMAT): Define.
- * scripttempl/pe.sc: Swap the .data and .bss sections so that
- .data comes first. If doing a relocateable link, use
- RELOCATEABLE_OUTPUT_FORMAT if it is defined, and start the
- sections at 0, and don't define any symbols.
-
- * ldlang.c (lang_memory_default): Correct parenthisization of
- expression.
-
-Wed Jan 21 21:20:32 1998 Manfred Hollstein <manfred@s-direktnet.de>
-
- * emultempl/sunos.em: Don't include sys/types.h and sys/stat.h
- here; they are included already via sysdep.h.
-
-Tue Jan 6 13:40:02 1998 Richard Henderson <rth@cygnus.com>
-
- * scripttempl/i960.sc: Don't explicitly set .data and .bss start.
-
-Fri Jan 2 20:15:37 1998 Michael Meissner <meissner@cygnus.com>
-
- * ldgram.y (attributes_opt): Pass region pointer to
- lang_set_flags, not &region->flags.
-
- * ldlang.c (lang_memory_default): New function to figure out a
- default memory region for a section if it was not specified.
- (lang_memory_region_lookup): Zero flags, not_flags field.
- (lang_map{,_flags}): Print attribute flags in memory map.
- (lang_size_sections): Call lang_memory_default to get default
- memory region.
- (lang_set_flags): Implement attribute flags for real. Take new
- argument to give the flags we are to skip for this region.
-
- * ldlang.h (memory_region_struct): Add not_flags field, make both
- flags fields flagword type.
- (lang_output_section_state): Make flags field flagword type.
- (lang_set_flags): Update prototype to match new calling sequence.
- (lang_memory_region_default): Add prototype.
-
- * emulparams/d30v{_e,_o,elf}.sh ({TEXT,DATA,EMEM}_DEF_SECTION):
- Define whether or not the region gets default sections, and if so,
- what sections.
-
- * scripttempl/elfd30v.sc (MEMORY): Set up which of the regions get
- default sections.
-
-Thu Jan 1 22:58:04 1998 Michael Meissner <meissner@cygnus.com>
-
- * scripttempl/elfd30v.sc (.eh_frame): Link into the data section.
-
-Thu Jan 1 18:04:51 1998 Jeffrey A Law (law@cygnus.com)
-
- * scripttempl/h8300h.sc: Fix typo.
- * scripttempl/h8300s.sc: Likewise.
-
-For older changes see ChangeLog-9197
-
-Local Variables:
-mode: change-log
-left-margin: 8
-fill-column: 74
-version-control: never
-End:
diff --git a/contrib/binutils/ld/MAINTAINERS b/contrib/binutils/ld/MAINTAINERS
deleted file mode 100644
index d59a3bd..0000000
--- a/contrib/binutils/ld/MAINTAINERS
+++ /dev/null
@@ -1 +0,0 @@
-See ../binutils/MAINTAINERS
diff --git a/contrib/binutils/ld/Makefile.am b/contrib/binutils/ld/Makefile.am
deleted file mode 100644
index a2f1ac1..0000000
--- a/contrib/binutils/ld/Makefile.am
+++ /dev/null
@@ -1,1765 +0,0 @@
-## Process this file with automake to generate Makefile.in
-
-## FIXME: work around apparent automake bug.
-INTLLIBS = @INTLLIBS@
-
-AUTOMAKE_OPTIONS = cygnus dejagnu
-
-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
-MKDEP = gcc -MM
-
-# What version of the manual to build
-DOCVER = gen
-
-# Options to extract the man page from ld.texinfo
-MANCONF = -Dman
-
-TEXI2POD = perl $(BASEDIR)/etc/texi2pod.pl
-
-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`
-
-RUNTESTFLAGS =
-
-CC_FOR_TARGET = ` \
- if [ -f $$r/../gcc/xgcc ] ; then \
- if [ -f $$r/../newlib/Makefile ] ; then \
- echo $$r/../gcc/xgcc -B$$r/../gcc/ -idirafter $$r/../newlib/targ-include -idirafter $${srcroot}/../newlib/libc/include -nostdinc; \
- else \
- echo $$r/../gcc/xgcc -B$$r/../gcc/; \
- fi; \
- else \
- if [ "@host@" = "@target@" ] ; then \
- echo $(CC); \
- else \
- echo gcc | sed '$(transform)'; \
- fi; \
- fi`
-
-CXX = gcc
-CXX_FOR_TARGET = ` \
- if [ -f $$r/../gcc/xgcc ] ; then \
- if [ -f $$r/../newlib/Makefile ] ; then \
- echo $$r/../gcc/xgcc -B$$r/../gcc/ -idirafter $$r/../newlib/targ-include -idirafter $${srcroot}/../newlib/libc/include -nostdinc; \
- else \
- echo $$r/../gcc/xgcc -B$$r/../gcc/; \
- fi; \
- else \
- if [ "@host@" = "@target@" ] ; then \
- echo $(CXX); \
- else \
- echo gcc | sed '$(transform)'; \
- fi; \
- fi`
-
-noinst_PROGRAMS = ld-new
-info_TEXINFOS = ld.texinfo
-noinst_TEXINFOS = ldint.texinfo
-man_MANS = ld.1
-
-INCLUDES = -D_GNU_SOURCE -I. -I$(srcdir) -I../bfd -I$(BFDDIR) -I$(INCDIR) -I$(top_srcdir)/../intl -I../intl $(HDEFINES) $(CFLAGS) -DLOCALEDIR="\"$(prefix)/share/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 \
- earmaoutb.o \
- earmaoutl.o \
- earmcoff.o \
- earmelf.o \
- earmelfb.o \
- earmelf_fbsd.o \
- earmelf_linux.o \
- earmelfb_linux.o \
- earmelf_nbsd.o \
- earmelfb_nbsd.o \
- earmelf_oabi.o \
- earmnto.o \
- earmnbsd.o \
- earmpe.o \
- eavr2.o \
- eavr1.o \
- eavr3.o \
- eavr4.o \
- eavr5.o \
- ecoff_i860.o \
- ecoff_sparc.o \
- ecrisaout.o \
- ecriself.o \
- ecrislinux.o \
- ed10velf.o \
- ed30v_e.o \
- ed30v_o.o \
- ed30velf.o \
- edelta68.o \
- eelf32_dlx.o \
- eebmon29k.o \
- eelf32_i960.o \
- eelf32_i860.o \
- eelf32_sparc.o \
- eelf32b4300.o \
- eelf32bmip.o \
- eelf32bmipn32.o \
- eelf32btsmip.o \
- eelf32btsmipn32.o \
- eelf32ltsmip.o \
- eelf32ltsmipn32.o \
- eelf32ebmip.o \
- eelf32elmip.o \
- eelf32fr30.o \
- eelf32frv.o \
- eelf32i370.o \
- eelf32ip2k.o \
- eelf32iq2000.o \
- eelf32iq10.o \
- eelf32l4300.o \
- eelf32lmip.o \
- eelf32lppc.o \
- eelf32lppcnto.o \
- eelf32lppcsim.o \
- eelf32mcore.o \
- eelf32mipswindiss.o \
- eelf32openrisc.o \
- eelf32ppc.o \
- eelf32ppc_fbsd.o \
- eelf32ppclinux.o \
- eelf32ppcnto.o \
- eelf32ppcsim.o \
- eelf32ppcwindiss.o \
- eelf32vax.o \
- eelf32xstormy16.o \
- eelf32xtensa.o \
- eelf_i386.o \
- eelf_i386_be.o \
- eelf_i386_chaos.o \
- eelf_i386_fbsd.o \
- eelf_i386_ldso.o \
- eelf_s390.o \
- egld960.o \
- egld960coff.o \
- eh8300.o \
- eh8300h.o \
- eh8300s.o \
- eh8300elf.o \
- eh8300hn.o \
- eh8300sn.o \
- eh8300sx.o \
- eh8300helf.o \
- eh8300self.o \
- eh8300hnelf.o \
- eh8300snelf.o \
- eh8300sxelf.o \
- eh8300sxn.o \
- eh8300sxnelf.o \
- eh8500.o \
- eh8500b.o \
- eh8500c.o \
- eh8500m.o \
- eh8500s.o \
- ehp300bsd.o \
- ehp3hpux.o \
- ehppaelf.o \
- ehppalinux.o \
- ehppanbsd.o \
- ehppaobsd.o \
- ei386aout.o \
- ei386beos.o \
- ei386bsd.o \
- ei386coff.o \
- ei386go32.o \
- ei386linux.o \
- ei386lynx.o \
- ei386mach.o \
- ei386moss.o \
- ei386msdos.o \
- ei386nbsd.o \
- ei386nto.o \
- ei386nw.o \
- ei386pe.o \
- ei386pe_posix.o \
- elnk960.o \
- em32relf.o \
- em32rlelf.o \
- em32relf_linux.o \
- em32rlelf_linux.o \
- em68hc11elf.o \
- em68hc11elfb.o \
- em68hc12elf.o \
- em68hc12elfb.o \
- em68k4knbsd.o \
- em68kaout.o \
- em68kaux.o \
- em68kcoff.o \
- em68kelf.o \
- em68kelfnbsd.o \
- em68klinux.o \
- em68klynx.o \
- em68knbsd.o \
- em68kpsos.o \
- em88kbcs.o \
- emcorepe.o \
- emipsbig.o \
- emipsbsd.o \
- emipsidt.o \
- emipsidtl.o \
- emipslit.o \
- emipslnews.o \
- emipspe.o \
- emsp430x110.o \
- emsp430x112.o \
- emsp430x1101.o \
- emsp430x1111.o \
- emsp430x1121.o \
- emsp430x1122.o \
- emsp430x1132.o \
- emsp430x122.o \
- emsp430x123.o \
- emsp430x1222.o \
- emsp430x1232.o \
- emsp430x133.o \
- emsp430x135.o \
- emsp430x1331.o \
- emsp430x1351.o \
- emsp430x147.o \
- emsp430x148.o \
- emsp430x149.o \
- emsp430x155.o \
- emsp430x156.o \
- emsp430x157.o \
- emsp430x167.o \
- emsp430x168.o \
- emsp430x169.o \
- emsp430x311.o \
- emsp430x312.o \
- emsp430x313.o \
- emsp430x314.o \
- emsp430x315.o \
- emsp430x323.o \
- emsp430x325.o \
- emsp430x336.o \
- emsp430x337.o \
- emsp430x412.o \
- emsp430x413.o \
- emsp430xE423.o \
- emsp430xE425.o \
- emsp430xE427.o \
- emsp430xW423.o \
- emsp430xW425.o \
- emsp430xW427.o \
- emsp430x435.o \
- emsp430x436.o \
- emsp430x437.o \
- emsp430x447.o \
- emsp430x448.o \
- emsp430x449.o \
- enews.o \
- ens32knbsd.o \
- eor32.o \
- eor32elf.o \
- epc532macha.o \
- epdp11.o \
- epjelf.o \
- epjlelf.o \
- eppcmacos.o \
- eppcnw.o \
- eppcpe.o \
- eriscix.o \
- esa29200.o \
- esh.o \
- eshelf32.o \
- eshlelf32.o \
- eshelf32_linux.o \
- eshlelf32_linux.o \
- eshelf32_nbsd.o \
- eshlelf32_nbsd.o \
- eshelf.o \
- eshelf_linux.o \
- eshlelf_linux.o \
- eshelf_nbsd.o \
- eshlelf_nbsd.o \
- eshelf_nto.o \
- eshlelf_nto.o \
- eshl.o \
- eshlelf.o \
- eshpe.o \
- esparcaout.o \
- esparclinux.o \
- esparclynx.o \
- esparcnbsd.o \
- est2000.o \
- esun3.o \
- esun4.o \
- etic30aout.o \
- etic30coff.o \
- etic3xcoff.o \
- etic3xcoff_onchip.o \
- etic4xcoff.o \
- etic54xcoff.o \
- etic80coff.o \
- evanilla.o \
- evax.o \
- evaxnbsd.o \
- evsta.o \
- ew65.o \
- ez8001.o \
- eelf32frvfd.o \
- ez8002.o
-
-ALL_64_EMULATIONS = \
- eelf64_aix.o \
- eelf64_ia64.o \
- eelf64_ia64_fbsd.o \
- eshelf64.o \
- eshlelf64.o \
- eshelf64_nbsd.o \
- eshlelf64_nbsd.o \
- eelf_x86_64.o \
- eelf_x86_64_fbsd.o \
- eelf64_s390.o \
- eelf64_sparc.o \
- eelf64_sparc_fbsd.o \
- eelf64alpha.o \
- eelf64alpha_fbsd.o \
- eelf64alpha_nbsd.o \
- eelf64bmip.o \
- eelf64btsmip.o \
- eelf64ltsmip.o \
- eelf64hppa.o \
- eelf64mmix.o \
- emmo.o \
- eelf64ppc.o \
- eelf64lppc.o \
- ehppa64linux.o
-
-ALL_EMUL_EXTRA_OFILES = \
- deffilep.o \
- pe-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
-
-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
-
-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)
-
-po/POTFILES.in: @MAINT@ Makefile
- for f in $(POTFILES); do echo $$f; done | LC_COLLATE= sort > tmp \
- && mv tmp $(srcdir)/po/POTFILES.in
-
-ldmain.o: ldmain.c config.status
- $(COMPILE) -c -DDEFAULT_EMULATION='"$(EMUL)"' \
- -DSCRIPTDIR='"$(scriptdir)"' -DBINDIR='"$(bindir)"' \
- -DTOOLBINDIR='"$(tooldir)/bin"' \
- -DTARGET='"@target@"' @TARGET_SYSTEM_ROOT_DEFINE@ \
- $(srcdir)/ldmain.c
-
-ldemul-list.h: Makefile
- (echo "/* This file is automatically generated. DO NOT EDIT! */";\
- for f in `echo " " ${EMULATION_OFILES} "" \
- | sed -e 's/ e/ ld/g' -e 's/ ld/ /g' -e 's/[.]o//g'`; do \
- echo "extern ld_emulation_xfer_type ld_$${f}_emulation;"; \
- done;\
- echo "";\
- echo "#define EMULATION_LIST \\";\
- for f in `echo " " ${EMULATION_OFILES} "" \
- | sed -e 's/ e/ ld/g' -e 's/ ld/ /g' -e 's/[.]o//g'`; do \
- echo " &ld_$${f}_emulation, \\"; \
- done;\
- echo " 0") >ldemul-tmp.h
- mv ldemul-tmp.h ldemul-list.h
-
-stringify.sed: ${srcdir}/emultempl/$(STRINGIFY)
- cp ${srcdir}/emultempl/$(STRINGIFY) stringify.sed
-
-# 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@
-GEN_DEPENDS = $(srcdir)/genscripts.sh stringify.sed
-
-@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)"
-eaix5rs6.c: $(srcdir)/emulparams/aix5rs6.sh \
- $(srcdir)/emultempl/aix.em $(srcdir)/scripttempl/aix.sc ${GEN_DEPENDS}
- ${GENSCRIPTS} aix5rs6 "$(tdir_aixrs6)"
-eaixppc.c: $(srcdir)/emulparams/aixppc.sh \
- $(srcdir)/emultempl/aix.em $(srcdir)/scripttempl/aix.sc ${GEN_DEPENDS}
- ${GENSCRIPTS} aixppc "$(tdir_aixppc)"
-eaixrs6.c: $(srcdir)/emulparams/aixrs6.sh \
- $(srcdir)/emultempl/aix.em $(srcdir)/scripttempl/aix.sc ${GEN_DEPENDS}
- ${GENSCRIPTS} aixrs6 "$(tdir_aixrs6)"
-ealpha.c: $(srcdir)/emulparams/alpha.sh \
- $(srcdir)/emultempl/generic.em $(srcdir)/scripttempl/alpha.sc ${GEN_DEPENDS}
- ${GENSCRIPTS} alpha "$(tdir_alpha)"
-earcelf.c: $(srcdir)/emulparams/arcelf.sh \
- $(srcdir)/emultempl/generic.em $(srcdir)/scripttempl/elf.sc ${GEN_DEPENDS}
- ${GENSCRIPTS} arcelf "$(tdir_arcelf)"
-earmelf.c: $(srcdir)/emulparams/armelf.sh \
- $(srcdir)/emultempl/elf32.em $(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 \
- $(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 \
- $(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 \
- $(srcdir)/scripttempl/elf.sc ${GEN_DEPENDS}
- ${GENSCRIPTS} armelf_linux "$(tdir_armelf_linux)"
-earmelfb_linux.c: $(srcdir)/emulparams/armelfb_linux.sh \
- $(srcdir)/emulparams/armelf_linux.sh \
- $(srcdir)/emultempl/elf32.em $(srcdir)/emultempl/armelf.em \
- $(srcdir)/scripttempl/elf.sc ${GEN_DEPENDS}
- ${GENSCRIPTS} armelfb_linux "$(tdir_armelfb_linux)"
-earmelf_nbsd.c: $(srcdir)/emulparams/armelf_nbsd.sh \
- $(srcdir)/emulparams/armelf.sh \
- $(srcdir)/emultempl/elf32.em $(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 \
- $(srcdir)/scripttempl/elf.sc ${GEN_DEPENDS}
- ${GENSCRIPTS} armelfb_nbsd "$(tdir_armelfb_nbsd)"
-earmaoutb.c: $(srcdir)/emulparams/armaoutb.sh \
- $(srcdir)/emultempl/generic.em $(srcdir)/scripttempl/armaout.sc ${GEN_DEPENDS}
- ${GENSCRIPTS} armaoutb "$(tdir_armaoutb)"
-earmaoutl.c: $(srcdir)/emulparams/armaoutl.sh \
- $(srcdir)/emultempl/generic.em $(srcdir)/scripttempl/armaout.sc ${GEN_DEPENDS}
- ${GENSCRIPTS} armaoutl "$(tdir_armaoutl)"
-earmcoff.c: $(srcdir)/emulparams/armcoff.sh \
- $(srcdir)/emultempl/armcoff.em $(srcdir)/scripttempl/armcoff.sc ${GEN_DEPENDS}
- ${GENSCRIPTS} armcoff "$(tdir_armcoff)"
-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 \
- $(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)"
-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 \
- ${GEN_DEPENDS}
- ${GENSCRIPTS} avr2 "$(tdir_avr2)"
-eavr1.c: $(srcdir)/emulparams/avr1.sh \
- $(srcdir)/emultempl/generic.em $(srcdir)/scripttempl/avr.sc \
- ${GEN_DEPENDS}
- ${GENSCRIPTS} avr1 "$(tdir_avr2)"
-eavr3.c: $(srcdir)/emulparams/avr3.sh \
- $(srcdir)/emultempl/generic.em $(srcdir)/scripttempl/avr.sc \
- ${GEN_DEPENDS}
- ${GENSCRIPTS} avr3 "$(tdir_avr2)"
-eavr4.c: $(srcdir)/emulparams/avr4.sh \
- $(srcdir)/emultempl/generic.em $(srcdir)/scripttempl/avr.sc \
- ${GEN_DEPENDS}
- ${GENSCRIPTS} avr4 "$(tdir_avr2)"
-eavr5.c: $(srcdir)/emulparams/avr5.sh \
- $(srcdir)/emultempl/generic.em $(srcdir)/scripttempl/avr.sc \
- ${GEN_DEPENDS}
- ${GENSCRIPTS} avr5 "$(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)"
-ecoff_sparc.c: $(srcdir)/emulparams/coff_sparc.sh \
- $(srcdir)/emultempl/generic.em $(srcdir)/scripttempl/sparccoff.sc ${GEN_DEPENDS}
- ${GENSCRIPTS} coff_sparc "$(tdir_coff_sparc)"
-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}
- ${GENSCRIPTS} criself "$(tdir_cris)"
-ecrislinux.c: $(srcdir)/emulparams/crislinux.sh \
- $(srcdir)/emultempl/elf32.em $(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}
- ${GENSCRIPTS} d10velf "$(tdir_d10v)"
-ed30velf.c: $(srcdir)/emulparams/d30velf.sh \
- $(srcdir)/emultempl/generic.em $(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}
- ${GENSCRIPTS} d30v_o "$(tdir_d30v)"
-ed30v_e.c: $(srcdir)/emulparams/d30v_e.sh \
- $(srcdir)/emultempl/generic.em $(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)"
-eelf32_dlx.c: $(srcdir)/emulparams/elf32_dlx.sh \
- $(srcdir)/emultempl/elf32.em $(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 \
- $(srcdir)/scripttempl/elf.sc ${GEN_DEPENDS}
- ${GENSCRIPTS} elf32xstormy16 "$(tdir_xstormy16)"
-eelf32am33lin.c: $(srcdir)/emulparams/elf32am33lin.sh \
- $(srcdir)/emultempl/elf32.em $(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}
- ${GENSCRIPTS} elf32vax "$(tdir_elf32vax)"
-eelf32xtensa.c: $(srcdir)/emulparams/elf32xtensa.sh \
- $(srcdir)/emulparams/xtensa-config.sh \
- $(srcdir)/emultempl/elf32.em $(srcdir)/emultempl/xtensaelf.em \
- $(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}
- ${GENSCRIPTS} elf32fr30 "$(tdir_fr30)"
-eelf32frv.c: $(srcdir)/emulparams/elf32frv.sh \
- $(srcdir)/emultempl/elf32.em $(srcdir)/scripttempl/elf.sc ${GEN_DEPENDS}
- ${GENSCRIPTS} elf32frv "$(tdir_frv)"
-eelf32mcore.c: $(srcdir)/emulparams/elf32mcore.sh \
- $(srcdir)/emultempl/elf32.em $(srcdir)/scripttempl/elf.sc ${GEN_DEPENDS}
- ${GENSCRIPTS} elf32mcore "$(tdir_mcore)"
-em32relf.c: $(srcdir)/emulparams/m32relf.sh \
- $(srcdir)/emultempl/elf32.em $(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}
- ${GENSCRIPTS} m32rlelf "$(tdir_m32rlelf)"
-em32relf_linux.c: $(srcdir)/emulparams/m32relf_linux.sh \
- $(srcdir)/emultempl/elf32.em $(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}
- ${GENSCRIPTS} m32rlelf_linux "$(tdir_m32rlelf_linux)"
-eelf32_sparc.c: $(srcdir)/emulparams/elf32_sparc.sh \
- $(srcdir)/emultempl/elf32.em $(srcdir)/scripttempl/elf.sc ${GEN_DEPENDS}
- ${GENSCRIPTS} elf32_sparc "$(tdir_elf32_sparc)"
-eelf32_i860.c: $(srcdir)/emulparams/elf32_i860.sh \
- $(srcdir)/emultempl/elf32.em $(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}
- ${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}
- ${GENSCRIPTS} elf32b4300 "$(tdir_elf32b4300)"
-eelf32bmip.c: $(srcdir)/emulparams/elf32bmip.sh \
- $(srcdir)/emultempl/mipself.em \
- $(srcdir)/emultempl/elf32.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}
- ${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}
- ${GENSCRIPTS} elf32btsmip "$(tdir_elf32btsmip)"
-eelf32btsmipn32.c: $(srcdir)/emulparams/elf32btsmipn32.sh \
- $(srcdir)/emulparams/elf32bmip.sh $(srcdir)/emultempl/mipself.em \
- $(srcdir)/emultempl/elf32.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}
- ${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}
- ${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}
- ${GENSCRIPTS} elf32ebmip "$(tdir_elf32ebmip)"
-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}
- ${GENSCRIPTS} elf32elmip "$(tdir_elf32elmip)"
-eelf32bmipn32.c: $(srcdir)/emulparams/elf32bmipn32.sh \
- $(srcdir)/emultempl/irix.em \
- $(srcdir)/emultempl/elf32.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}
- ${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}
- ${GENSCRIPTS} elf32lmip "$(tdir_elf32lmip)"
-eelf32mipswindiss.c: $(srcdir)/emulparams/elf32mipswindiss.sh \
- $(srcdir)/emultempl/elf32.em $(srcdir)/scripttempl/elf.sc ${GEN_DEPENDS}
- ${GENSCRIPTS} elf32mipswindiss "$(tdir_elf32mipswindiss)"
-eelf32lppc.c: $(srcdir)/emulparams/elf32lppc.sh \
- $(srcdir)/emulparams/elf32ppc.sh $(srcdir)/emultempl/ppc32elf.em \
- $(srcdir)/emultempl/elf32.em $(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}
- ${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}
- ${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}
- ${GENSCRIPTS} elf32ppcnto "$(tdir_elf32ppcnto)"
-eelf32ppcwindiss.c: $(srcdir)/emulparams/elf32ppcwindiss.sh \
- $(srcdir)/emultempl/elf32.em $(srcdir)/scripttempl/elf.sc ${GEN_DEPENDS}
- ${GENSCRIPTS} elf32ppcwindiss "$(tdir_elf32ppcwindiss)"
-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}
- ${GENSCRIPTS} elf32lsmip "$(tdir_elf32lsmip)"
-eelf32openrisc.c: $(srcdir)/emulparams/elf32openrisc.sh \
- $(srcdir)/emultempl/elf32.em $(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}
- ${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}
- ${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}
- ${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}
- ${GENSCRIPTS} elf32ppclinux "$(tdir_elf32ppclinux)"
-eelf64ppc.c: $(srcdir)/emulparams/elf64ppc.sh $(srcdir)/emultempl/ppc64elf.em \
- $(srcdir)/emultempl/elf32.em $(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}
- ${GENSCRIPTS} elf64lppc "$(tdir_elf64lppc)"
-eelf32i370.c: $(srcdir)/emulparams/elf32i370.sh \
- $(srcdir)/emultempl/elf32.em $(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}
- ${GENSCRIPTS} elf32ip2k "$(tdir_ip2k)"
-eelf32iq2000.c: $(srcdir)/emulparams/elf32iq2000.sh \
- $(srcdir)/emultempl/elf32.em $(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}
- ${GENSCRIPTS} elf32iq10 "$(tdir_iq10)"
-eelf64alpha.c: $(srcdir)/emulparams/elf64alpha.sh \
- $(srcdir)/emultempl/elf32.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}
- ${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}
- ${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}
- ${GENSCRIPTS} elf64hppa "$(tdir_elf64hppa)"
-eelf64_aix.c: $(srcdir)/emulparams/elf64_aix.sh \
- $(srcdir)/emultempl/elf32.em $(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 \
- $(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 \
- $(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}
- ${GENSCRIPTS} elf64_s390 "$(tdir_elf64_s390)"
-eelf64_sparc.c: $(srcdir)/emulparams/elf64_sparc.sh \
- $(srcdir)/emultempl/elf32.em $(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}
- ${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}
- ${GENSCRIPTS} elf64bmip "$(tdir_elf64bmip)"
-eelf64mmix.c: $(srcdir)/emulparams/elf64mmix.sh \
- $(srcdir)/emultempl/elf32.em $(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)/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}
- ${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}
- ${GENSCRIPTS} elf64ltsmip "$(tdir_elf64ltsmip)"
-eelf_i386.c: $(srcdir)/emulparams/elf_i386.sh \
- $(srcdir)/emultempl/elf32.em $(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}
- ${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}
- ${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}
- ${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}
- ${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}
- ${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}
- ${GENSCRIPTS} elf_i386_ldso "$(tdir_elf_i386_ldso)"
-eelf_s390.c: $(srcdir)/emulparams/elf_s390.sh \
- $(srcdir)/emultempl/elf32.em $(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}
- ${GENSCRIPTS} gld960 "$(tdir_gld960)"
-egld960coff.c: $(srcdir)/emulparams/gld960coff.sh \
- $(srcdir)/emultempl/gld960c.em $(srcdir)/scripttempl/i960.sc ${GEN_DEPENDS}
- ${GENSCRIPTS} gld960coff "$(tdir_gld960coff)"
-eh8300.c: $(srcdir)/emulparams/h8300.sh \
- $(srcdir)/emultempl/generic.em $(srcdir)/scripttempl/h8300.sc ${GEN_DEPENDS}
- ${GENSCRIPTS} h8300 "$(tdir_h8300)"
-eh8300h.c: $(srcdir)/emulparams/h8300h.sh \
- $(srcdir)/emultempl/generic.em $(srcdir)/scripttempl/h8300h.sc ${GEN_DEPENDS}
- ${GENSCRIPTS} h8300h "$(tdir_h8300h)"
-eh8300s.c: $(srcdir)/emulparams/h8300s.sh \
- $(srcdir)/emultempl/generic.em $(srcdir)/scripttempl/h8300s.sc ${GEN_DEPENDS}
- ${GENSCRIPTS} h8300s "$(tdir_h8300s)"
-eh8300hn.c: $(srcdir)/emulparams/h8300hn.sh \
- $(srcdir)/emultempl/generic.em $(srcdir)/scripttempl/h8300hn.sc ${GEN_DEPENDS}
- ${GENSCRIPTS} h8300hn "$(tdir_h8300hn)"
-eh8300sn.c: $(srcdir)/emulparams/h8300sn.sh \
- $(srcdir)/emultempl/generic.em $(srcdir)/scripttempl/h8300sn.sc ${GEN_DEPENDS}
- ${GENSCRIPTS} h8300sn "$(tdir_h8300sn)"
-eh8300sx.c: $(srcdir)/emulparams/h8300sx.sh \
- $(srcdir)/emultempl/generic.em $(srcdir)/scripttempl/h8300sx.sc ${GEN_DEPENDS}
- ${GENSCRIPTS} h8300sx "$(tdir_h8300sx)"
-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}
- ${GENSCRIPTS} h8300elf "$(tdir_h8300elf)"
-eh8300helf.c: $(srcdir)/emulparams/h8300helf.sh \
- $(srcdir)/emulparams/h8300elf.sh \
- $(srcdir)/emultempl/elf32.em $(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}
- ${GENSCRIPTS} h8300self "$(tdir_h8300self)"
-eh8300hnelf.c: $(srcdir)/emulparams/h8300hnelf.sh \
- $(srcdir)/emulparams/h8300elf.sh \
- $(srcdir)/emultempl/elf32.em $(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}
- ${GENSCRIPTS} h8300snelf "$(tdir_h8300snelf)"
-eh8300sxelf.c: $(srcdir)/emulparams/h8300sxelf.sh \
- $(srcdir)/emulparams/h8300elf.sh \
- $(srcdir)/emultempl/elf32.em $(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}
- ${GENSCRIPTS} h8300sxnelf "$(tdir_h8300sxnelf)"
-eh8500.c: $(srcdir)/emulparams/h8500.sh \
- $(srcdir)/emultempl/generic.em $(srcdir)/scripttempl/h8500.sc ${GEN_DEPENDS}
- ${GENSCRIPTS} h8500 "$(tdir_h8500)"
-eh8500b.c: $(srcdir)/emulparams/h8500b.sh \
- $(srcdir)/emultempl/generic.em $(srcdir)/scripttempl/h8500b.sc ${GEN_DEPENDS}
- ${GENSCRIPTS} h8500b "$(tdir_h8500b)"
-eh8500c.c: $(srcdir)/emulparams/h8500c.sh \
- $(srcdir)/emultempl/generic.em $(srcdir)/scripttempl/h8500c.sc ${GEN_DEPENDS}
- ${GENSCRIPTS} h8500c "$(tdir_h8500c)"
-eh8500m.c: $(srcdir)/emulparams/h8500m.sh \
- $(srcdir)/emultempl/generic.em $(srcdir)/scripttempl/h8500m.sc ${GEN_DEPENDS}
- ${GENSCRIPTS} h8500m "$(tdir_h8500m)"
-eh8500s.c: $(srcdir)/emulparams/h8500s.sh \
- $(srcdir)/emultempl/generic.em $(srcdir)/scripttempl/h8500s.sc ${GEN_DEPENDS}
- ${GENSCRIPTS} h8500s "$(tdir_h8500s)"
-ehp300bsd.c: $(srcdir)/emulparams/hp300bsd.sh \
- $(srcdir)/emultempl/generic.em $(srcdir)/scripttempl/aout.sc ${GEN_DEPENDS}
- ${GENSCRIPTS} hp300bsd "$(tdir_hp300bsd)"
-ehp3hpux.c: $(srcdir)/emulparams/hp3hpux.sh \
- $(srcdir)/emultempl/generic.em $(srcdir)/scripttempl/aout.sc ${GEN_DEPENDS}
- ${GENSCRIPTS} hp3hpux "$(tdir_hp3hpux)"
-ehppaelf.c: $(srcdir)/emulparams/hppaelf.sh \
- $(srcdir)/emultempl/elf32.em $(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 \
- $(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 \
- $(srcdir)/scripttempl/elf.sc ${GEN_DEPENDS}
- ${GENSCRIPTS} hppanbsd "$(tdir_hppanbsd)"
-ehppaobsd.c: $(srcdir)/emulparams/hppaobsd.sh \
- $(srcdir)/emultempl/elf32.em $(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}
- ${GENSCRIPTS} hppa64linux "$(tdir_hppa64linux)"
-ei386aout.c: $(srcdir)/emulparams/i386aout.sh \
- $(srcdir)/emultempl/generic.em $(srcdir)/scripttempl/aout.sc ${GEN_DEPENDS}
- ${GENSCRIPTS} i386aout "$(tdir_i386aout)"
-ei386beos.c: $(srcdir)/emulparams/i386beos.sh \
- $(srcdir)/emultempl/beos.em $(srcdir)/scripttempl/i386beos.sc ${GEN_DEPENDS}
- ${GENSCRIPTS} i386beos "$(tdir_i386beos)"
-ei386bsd.c: $(srcdir)/emulparams/i386bsd.sh \
- $(srcdir)/emultempl/generic.em $(srcdir)/scripttempl/aout.sc ${GEN_DEPENDS}
- ${GENSCRIPTS} i386bsd "$(tdir_i386bsd)"
-ei386coff.c: $(srcdir)/emulparams/i386coff.sh \
- $(srcdir)/emultempl/generic.em $(srcdir)/scripttempl/i386coff.sc ${GEN_DEPENDS}
- ${GENSCRIPTS} i386coff "$(tdir_i386coff)"
-ei386go32.c: $(srcdir)/emulparams/i386go32.sh \
- $(srcdir)/emultempl/generic.em $(srcdir)/scripttempl/i386go32.sc ${GEN_DEPENDS}
- ${GENSCRIPTS} i386go32 "$(tdir_i386go32)"
-ei386linux.c: $(srcdir)/emulparams/i386linux.sh \
- $(srcdir)/emultempl/linux.em $(srcdir)/scripttempl/aout.sc ${GEN_DEPENDS}
- ${GENSCRIPTS} i386linux "$(tdir_i386linux)"
-ei386lynx.c: $(srcdir)/emulparams/i386lynx.sh \
- $(srcdir)/emultempl/generic.em $(srcdir)/scripttempl/i386lynx.sc ${GEN_DEPENDS}
- ${GENSCRIPTS} i386lynx "$(tdir_i386lynx)"
-ei386mach.c: $(srcdir)/emulparams/i386mach.sh \
- $(srcdir)/emultempl/generic.em $(srcdir)/scripttempl/aout.sc ${GEN_DEPENDS}
- ${GENSCRIPTS} i386mach "$(tdir_i386mach)"
-ei386moss.c: $(srcdir)/emulparams/i386moss.sh \
- $(srcdir)/emultempl/elf32.em $(srcdir)/scripttempl/elf.sc ${GEN_DEPENDS}
- ${GENSCRIPTS} i386moss "$(tdir_i386moss)"
-ei386msdos.c: $(srcdir)/emulparams/i386msdos.sh \
- $(srcdir)/emultempl/generic.em $(srcdir)/scripttempl/i386msdos.sc ${GEN_DEPENDS}
- ${GENSCRIPTS} i386msdos "$(tdir_i386msdos)"
-ei386nbsd.c: $(srcdir)/emulparams/i386nbsd.sh \
- $(srcdir)/emultempl/generic.em $(srcdir)/scripttempl/aout.sc ${GEN_DEPENDS}
- ${GENSCRIPTS} i386nbsd "$(tdir_i386nbsd)"
-ei386nto.c: $(srcdir)/emulparams/i386nto.sh \
- $(srcdir)/emultempl/elf32.em $(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}
- ${GENSCRIPTS} i386nw "$(tdir_i386nw)"
-ei386pe.c: $(srcdir)/emulparams/i386pe.sh \
- $(srcdir)/emultempl/pe.em $(srcdir)/scripttempl/pe.sc ${GEN_DEPENDS}
- ${GENSCRIPTS} i386pe "$(tdir_i386pe)"
-ei386pe_posix.c: $(srcdir)/emulparams/i386pe_posix.sh \
- $(srcdir)/emultempl/pe.em $(srcdir)/scripttempl/pe.sc ${GEN_DEPENDS}
- ${GENSCRIPTS} i386pe_posix "$(tdir_i386pe_posix)"
-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)/scripttempl/elfm68hc11.sc ${GEN_DEPENDS}
- ${GENSCRIPTS} m68hc11elf "$(tdir_m68hc11)"
-em68hc11elfb.c: $(srcdir)/emulparams/m68hc11elfb.sh \
- $(srcdir)/emultempl/m68hc1xelf.em $(srcdir)/emultempl/elf32.em \
- $(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)/scripttempl/elfm68hc12.sc ${GEN_DEPENDS}
- ${GENSCRIPTS} m68hc12elf "$(tdir_m68hc12)"
-em68hc12elfb.c: $(srcdir)/emulparams/m68hc12elfb.sh \
- $(srcdir)/emultempl/m68hc1xelf.em $(srcdir)/emultempl/elf32.em \
- $(srcdir)/scripttempl/elfm68hc12.sc ${GEN_DEPENDS}
- ${GENSCRIPTS} m68hc12elfb "$(tdir_m68hc12b)"
-em68k4knbsd.c: $(srcdir)/emulparams/m68k4knbsd.sh \
- $(srcdir)/emultempl/generic.em $(srcdir)/scripttempl/aout.sc ${GEN_DEPENDS}
- ${GENSCRIPTS} m68k4knbsd "$(tdir_m68k4knbsd)"
-em68kaout.c: $(srcdir)/emulparams/m68kaout.sh \
- $(srcdir)/emultempl/generic.em $(srcdir)/scripttempl/aout.sc ${GEN_DEPENDS}
- ${GENSCRIPTS} m68kaout "$(tdir_m68kaout)"
-em68kaux.c: $(srcdir)/emulparams/m68kaux.sh \
- $(srcdir)/emultempl/generic.em $(srcdir)/scripttempl/m68kaux.sc ${GEN_DEPENDS}
- ${GENSCRIPTS} m68kaux "$(tdir_m68kaux)"
-em68kcoff.c: $(srcdir)/emulparams/m68kcoff.sh \
- $(srcdir)/emultempl/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 \
- $(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 \
- $(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}
- ${GENSCRIPTS} m68kpsos "$(tdir_m68kpsos)"
-em88kbcs.c: $(srcdir)/emulparams/m88kbcs.sh \
- $(srcdir)/emultempl/generic.em $(srcdir)/scripttempl/m88kbcs.sc ${GEN_DEPENDS}
- ${GENSCRIPTS} m88kbcs "$(tdir_m88kbcs)"
-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}
- ${GENSCRIPTS} mipsidt "$(tdir_mipsidt)"
-emipsidtl.c: $(srcdir)/emulparams/mipsidtl.sh \
- $(srcdir)/emultempl/mipsecoff.em $(srcdir)/scripttempl/mips.sc ${GEN_DEPENDS}
- ${GENSCRIPTS} mipsidtl "$(tdir_mipsidtl)"
-emipslit.c: $(srcdir)/emulparams/mipslit.sh \
- $(srcdir)/emultempl/generic.em $(srcdir)/scripttempl/mips.sc ${GEN_DEPENDS}
- ${GENSCRIPTS} mipslit "$(tdir_mipslit)"
-emipslnews.c: $(srcdir)/emulparams/mipslnews.sh \
- $(srcdir)/emultempl/generic.em $(srcdir)/scripttempl/mips.sc ${GEN_DEPENDS}
- ${GENSCRIPTS} mipslnews
-emipspe.c: $(srcdir)/emulparams/mipspe.sh \
- $(srcdir)/emultempl/pe.em $(srcdir)/scripttempl/pe.sc ${GEN_DEPENDS}
- ${GENSCRIPTS} mipspe "$(tdir_mips)"
-emn10300.c: $(srcdir)/emulparams/mn10300.sh \
- $(srcdir)/emulparams/mn10200.sh \
- $(srcdir)/emultempl/elf32.em $(srcdir)/scripttempl/elf.sc ${GEN_DEPENDS}
- ${GENSCRIPTS} mn10300 "$(tdir_mn10300)"
-emn10200.c: $(srcdir)/emulparams/mn10200.sh \
- $(srcdir)/emultempl/elf32.em $(srcdir)/scripttempl/elf.sc ${GEN_DEPENDS}
- ${GENSCRIPTS} mn10200 "$(tdir_mn10200)"
-emsp430x110.c: $(srcdir)/emulparams/msp430all.sh \
- $(srcdir)/emultempl/generic.em $(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 \
- ${GEN_DEPENDS}
- ${GENSCRIPTS} msp430x112 "$(tdir_msp430x112)" msp430all
-emsp430x1101.c: $(srcdir)/emulparams/msp430all.sh \
- $(srcdir)/emultempl/generic.em $(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 \
- ${GEN_DEPENDS}
- ${GENSCRIPTS} msp430x1111 "$(tdir_msp430x1111)" msp430all
-emsp430x1121.c: $(srcdir)/emulparams/msp430all.sh \
- $(srcdir)/emultempl/generic.em $(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 \
- ${GEN_DEPENDS}
- ${GENSCRIPTS} msp430x1122 "$(tdir_msp430x1122)" msp430all
-emsp430x1132.c: $(srcdir)/emulparams/msp430all.sh \
- $(srcdir)/emultempl/generic.em $(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 \
- ${GEN_DEPENDS}
- ${GENSCRIPTS} msp430x122 "$(tdir_msp430x122)" msp430all
-emsp430x123.c: $(srcdir)/emulparams/msp430all.sh \
- $(srcdir)/emultempl/generic.em $(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 \
- ${GEN_DEPENDS}
- ${GENSCRIPTS} msp430x1222 "$(tdir_msp430x1222)" msp430all
-emsp430x1232.c: $(srcdir)/emulparams/msp430all.sh \
- $(srcdir)/emultempl/generic.em $(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 \
- ${GEN_DEPENDS}
- ${GENSCRIPTS} msp430x133 "$(tdir_msp430x133)" msp430all
-emsp430x135.c: $(srcdir)/emulparams/msp430all.sh \
- $(srcdir)/emultempl/generic.em $(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 \
- ${GEN_DEPENDS}
- ${GENSCRIPTS} msp430x1331 "$(tdir_msp430x1331)" msp430all
-emsp430x1351.c: $(srcdir)/emulparams/msp430all.sh \
- $(srcdir)/emultempl/generic.em $(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 \
- ${GEN_DEPENDS}
- ${GENSCRIPTS} msp430x147 "$(tdir_msp430x147)" msp430all
-emsp430x148.c: $(srcdir)/emulparams/msp430all.sh \
- $(srcdir)/emultempl/generic.em $(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 \
- ${GEN_DEPENDS}
- ${GENSCRIPTS} msp430x149 "$(tdir_msp430x149)" msp430all
-emsp430x155.c: $(srcdir)/emulparams/msp430all.sh \
- $(srcdir)/emultempl/generic.em $(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 \
- ${GEN_DEPENDS}
- ${GENSCRIPTS} msp430x156 "$(tdir_msp430x156)" msp430all
-emsp430x157.c: $(srcdir)/emulparams/msp430all.sh \
- $(srcdir)/emultempl/generic.em $(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 \
- ${GEN_DEPENDS}
- ${GENSCRIPTS} msp430x167 "$(tdir_msp430x167)" msp430all
-emsp430x168.c: $(srcdir)/emulparams/msp430all.sh \
- $(srcdir)/emultempl/generic.em $(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 \
- ${GEN_DEPENDS}
- ${GENSCRIPTS} msp430x169 "$(tdir_msp430x169)" msp430all
-emsp430x311.c: $(srcdir)/emulparams/msp430all.sh \
- $(srcdir)/emultempl/generic.em $(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 \
- ${GEN_DEPENDS}
- ${GENSCRIPTS} msp430x312 "$(tdir_msp430x312)" msp430all
-emsp430x313.c: $(srcdir)/emulparams/msp430all.sh \
- $(srcdir)/emultempl/generic.em $(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 \
- ${GEN_DEPENDS}
- ${GENSCRIPTS} msp430x314 "$(tdir_msp430x314)" msp430all
-emsp430x315.c: $(srcdir)/emulparams/msp430all.sh \
- $(srcdir)/emultempl/generic.em $(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 \
- ${GEN_DEPENDS}
- ${GENSCRIPTS} msp430x323 "$(tdir_msp430x323)" msp430all
-emsp430x325.c: $(srcdir)/emulparams/msp430all.sh \
- $(srcdir)/emultempl/generic.em $(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 \
- ${GEN_DEPENDS}
- ${GENSCRIPTS} msp430x336 "$(tdir_msp430x336)" msp430all
-emsp430x337.c: $(srcdir)/emulparams/msp430all.sh \
- $(srcdir)/emultempl/generic.em $(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 \
- ${GEN_DEPENDS}
- ${GENSCRIPTS} msp430x412 "$(tdir_msp430x412)" msp430all
-emsp430x413.c: $(srcdir)/emulparams/msp430all.sh \
- $(srcdir)/emultempl/generic.em $(srcdir)/scripttempl/elf32msp430.sc \
- ${GEN_DEPENDS}
- ${GENSCRIPTS} msp430x413 "$(tdir_msp430x413)" msp430all
-emsp430xE423.c: $(srcdir)/emulparams/msp430all.sh \
- $(srcdir)/emultempl/generic.em $(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 \
- ${GEN_DEPENDS}
- ${GENSCRIPTS} msp430xE425 "$(tdir_msp430xE425)" msp430all
-emsp430xE427.c: $(srcdir)/emulparams/msp430all.sh \
- $(srcdir)/emultempl/generic.em $(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 \
- ${GEN_DEPENDS}
- ${GENSCRIPTS} msp430xW423 "$(tdir_msp430xW423)" msp430all
-emsp430xW425.c: $(srcdir)/emulparams/msp430all.sh \
- $(srcdir)/emultempl/generic.em $(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 \
- ${GEN_DEPENDS}
- ${GENSCRIPTS} msp430xW427 "$(tdir_msp430xW427)" msp430all
-emsp430x435.c: $(srcdir)/emulparams/msp430all.sh \
- $(srcdir)/emultempl/generic.em $(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 \
- ${GEN_DEPENDS}
- ${GENSCRIPTS} msp430x436 "$(tdir_msp430x436)" msp430all
-emsp430x437.c: $(srcdir)/emulparams/msp430all.sh \
- $(srcdir)/emultempl/generic.em $(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 \
- ${GEN_DEPENDS}
- ${GENSCRIPTS} msp430x447 "$(tdir_msp430x447)" msp430all
-emsp430x448.c: $(srcdir)/emulparams/msp430all.sh \
- $(srcdir)/emultempl/generic.em $(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 \
- ${GEN_DEPENDS}
- ${GENSCRIPTS} msp430x449 "$(tdir_msp430x449)" msp430all
-enews.c: $(srcdir)/emulparams/news.sh \
- $(srcdir)/emultempl/generic.em $(srcdir)/scripttempl/aout.sc ${GEN_DEPENDS}
- ${GENSCRIPTS} news "$(tdir_news)"
-ens32knbsd.c: $(srcdir)/emulparams/ns32knbsd.sh \
- $(srcdir)/emultempl/generic.em $(srcdir)/emultempl/netbsd.em \
- $(srcdir)/scripttempl/aout.sc ${GEN_DEPENDS}
- ${GENSCRIPTS} ns32knbsd "$(tdir_ns32knbsd)"
-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}
- ${GENSCRIPTS} or32elf "$(tdir_or32elf)"
-epc532macha.c: $(srcdir)/emulparams/pc532macha.sh \
- $(srcdir)/emultempl/generic.em $(srcdir)/scripttempl/aout.sc ${GEN_DEPENDS}
- ${GENSCRIPTS} pc532macha "$(tdir_pc532macha)"
-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}
- ${GENSCRIPTS} pjelf "$(tdir_pjelf)"
-epjlelf.c: $(srcdir)/emulparams/pjlelf.sh \
- $(srcdir)/emultempl/elf32.em $(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}
- ${GENSCRIPTS} ppcnw "$(tdir_ppcnw)"
-eppcpe.c: $(srcdir)/emulparams/ppcpe.sh \
- $(srcdir)/emultempl/pe.em $(srcdir)/scripttempl/ppcpe.sc ${GEN_DEPENDS}
- ${GENSCRIPTS} ppcpe "$(tdir_ppcpe)"
-eriscix.c: $(srcdir)/emulparams/riscix.sh \
- $(srcdir)/emultempl/generic.em $(srcdir)/scripttempl/aout.sc ${GEN_DEPENDS}
- ${GENSCRIPTS} riscix "$(tdir_riscix)"
-esa29200.c: $(srcdir)/emulparams/sa29200.sh \
- $(srcdir)/emultempl/generic.em $(srcdir)/scripttempl/sa29200.sc ${GEN_DEPENDS}
- ${GENSCRIPTS} sa29200 "$(tdir_sa29200)"
-esh.c: $(srcdir)/emulparams/sh.sh \
- $(srcdir)/emultempl/generic.em $(srcdir)/scripttempl/sh.sc ${GEN_DEPENDS}
- ${GENSCRIPTS} sh "$(tdir_sh)"
-eshelf.c: $(srcdir)/emulparams/shelf.sh \
- $(srcdir)/emultempl/elf32.em $(srcdir)/scripttempl/elf.sc ${GEN_DEPENDS}
- ${GENSCRIPTS} shelf "$(tdir_shelf)"
-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}
- ${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}
- ${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}
- ${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}
- ${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}
- ${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}
- ${GENSCRIPTS} shelf_linux "$(tdir_shelf_linux)"
-eshlelf_linux.c: $(srcdir)/emulparams/shlelf_linux.sh \
- $(srcdir)/emultempl/elf32.em $(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}
- ${GENSCRIPTS} shelf_nbsd "$(tdir_shelf_nbsd)"
-eshelf_nto.c: $(srcdir)/emulparams/shelf_nto.sh \
- $(srcdir)/emultempl/elf32.em $(srcdir)/scripttempl/elf.sc ${GEN_DEPENDS}
- ${GENSCRIPTS} shelf_nto "$(tdir_shelf_nto)"
-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}
- ${GENSCRIPTS} shlelf_nbsd "$(tdir_shlelf_nbsd)"
-eshlelf_nto.c: $(srcdir)/emulparams/shlelf_nto.sh \
- $(srcdir)/emultempl/elf32.em $(srcdir)/scripttempl/elf.sc ${GEN_DEPENDS}
- ${GENSCRIPTS} shlelf_nto "$(tdir_shlelf_nto)"
-eshlelf.c: $(srcdir)/emulparams/shlelf.sh \
- $(srcdir)/emulparams/shelf.sh \
- $(srcdir)/emultempl/elf32.em $(srcdir)/scripttempl/elf.sc ${GEN_DEPENDS}
- ${GENSCRIPTS} shlelf "$(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}
- ${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}
- ${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}
- ${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}
- ${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}
- ${GENSCRIPTS} shlelf64_nbsd "$(tdir_shlelf64_nbsd)"
-eshl.c: $(srcdir)/emulparams/shl.sh \
- $(srcdir)/emulparams/sh.sh \
- $(srcdir)/emultempl/generic.em $(srcdir)/scripttempl/sh.sc ${GEN_DEPENDS}
- ${GENSCRIPTS} shl "$(tdir_shl)"
-eshpe.c: $(srcdir)/emulparams/shpe.sh \
- $(srcdir)/emultempl/pe.em $(srcdir)/scripttempl/pe.sc ${GEN_DEPENDS}
- ${GENSCRIPTS} shpe "$(tdir_shl)"
-esparcaout.c: $(srcdir)/emulparams/sparcaout.sh \
- $(srcdir)/emultempl/generic.em $(srcdir)/scripttempl/aout.sc ${GEN_DEPENDS}
- ${GENSCRIPTS} sparcaout "$(tdir_sparcaout)"
-esparclinux.c: $(srcdir)/emulparams/sparclinux.sh \
- $(srcdir)/emultempl/linux.em $(srcdir)/scripttempl/aout.sc ${GEN_DEPENDS}
- ${GENSCRIPTS} sparclinux "$(tdir_sparclinux)"
-esparclynx.c: $(srcdir)/emulparams/sparclynx.sh \
- $(srcdir)/emultempl/generic.em $(srcdir)/scripttempl/sparclynx.sc ${GEN_DEPENDS}
- ${GENSCRIPTS} sparclynx "$(tdir_sparclynx)"
-esparcnbsd.c: $(srcdir)/emulparams/sparcnbsd.sh \
- $(srcdir)/emultempl/generic.em $(srcdir)/scripttempl/aout.sc ${GEN_DEPENDS}
- ${GENSCRIPTS} sparcnbsd "$(tdir_sparcnbsd)"
-est2000.c: $(srcdir)/emulparams/st2000.sh \
- $(srcdir)/emultempl/generic.em $(srcdir)/scripttempl/st2000.sc ${GEN_DEPENDS}
- ${GENSCRIPTS} st2000 "$(tdir_st2000)"
-esun3.c: $(srcdir)/emulparams/sun3.sh \
- $(srcdir)/emultempl/sunos.em $(srcdir)/scripttempl/aout.sc ${GEN_DEPENDS}
- ${GENSCRIPTS} sun3 "$(tdir_sun3)"
-esun4.c: $(srcdir)/emulparams/sun4.sh \
- $(srcdir)/emultempl/sunos.em $(srcdir)/scripttempl/aout.sc ${GEN_DEPENDS}
- ${GENSCRIPTS} sun4 "$(tdir_sun4)"
-etic30aout.c: $(srcdir)/emulparams/tic30aout.sh \
- $(srcdir)/emultempl/generic.em $(srcdir)/scripttempl/tic30aout.sc ${GEN_DEPENDS}
- ${GENSCRIPTS} tic30aout "$(tdir_tic30aout)"
-etic30coff.c: $(srcdir)/emulparams/tic30coff.sh \
- $(srcdir)/emultempl/generic.em $(srcdir)/scripttempl/tic30coff.sc ${GEN_DEPENDS}
- ${GENSCRIPTS} tic30coff "$(tdir_tic30coff)"
-etic3xcoff.c: $(srcdir)/emulparams/tic3xcoff.sh \
- $(srcdir)/emultempl/ticoff.em $(srcdir)/scripttempl/tic4xcoff.sc ${GEN_DEPENDS}
- ${GENSCRIPTS} tic3xcoff "$(tdir_tic4xcoff)"
-etic3xcoff_onchip.c: $(srcdir)/emulparams/tic3xcoff_onchip.sh \
- $(srcdir)/emultempl/ticoff.em $(srcdir)/scripttempl/tic4xcoff.sc ${GEN_DEPENDS}
- ${GENSCRIPTS} tic3xcoff_onchip "$(tdir_tic4xcoff)"
-etic4xcoff.c: $(srcdir)/emulparams/tic4xcoff.sh \
- $(srcdir)/emultempl/ticoff.em $(srcdir)/scripttempl/tic4xcoff.sc ${GEN_DEPENDS}
- ${GENSCRIPTS} tic4xcoff "$(tdir_tic4xcoff)"
-etic54xcoff.c: $(srcdir)/emulparams/tic54xcoff.sh \
- $(srcdir)/emultempl/ticoff.em $(srcdir)/scripttempl/tic54xcoff.sc ${GEN_DEPENDS}
- ${GENSCRIPTS} tic54xcoff "$(tdir_tic54xcoff)"
-etic80coff.c: $(srcdir)/emulparams/tic80coff.sh \
- $(srcdir)/emultempl/generic.em $(srcdir)/scripttempl/tic80coff.sc ${GEN_DEPENDS}
- ${GENSCRIPTS} tic80coff "$(tdir_tic80coff)"
-evanilla.c: $(srcdir)/emulparams/vanilla.sh \
- $(srcdir)/emultempl/vanilla.em $(srcdir)/scripttempl/vanilla.sc ${GEN_DEPENDS}
- ${GENSCRIPTS} vanilla "$(tdir_vanilla)"
-evax.c: $(srcdir)/emulparams/vax.sh \
- $(srcdir)/emultempl/generic.em $(srcdir)/scripttempl/aout.sc ${GEN_DEPENDS}
- ${GENSCRIPTS} vax "$(tdir_vax)"
-evaxnbsd.c: $(srcdir)/emulparams/vaxnbsd.sh \
- $(srcdir)/emultempl/generic.em $(srcdir)/scripttempl/aout.sc ${GEN_DEPENDS}
- ${GENSCRIPTS} vaxnbsd "$(tdir_vaxnbsd)"
-evsta.c: $(srcdir)/emulparams/vsta.sh \
- $(srcdir)/emultempl/generic.em $(srcdir)/scripttempl/aout.sc ${GEN_DEPENDS}
- ${GENSCRIPTS} vsta "$(tdir_vsta)"
-ev850.c: $(srcdir)/emulparams/v850.sh \
- $(srcdir)/emultempl/elf32.em $(srcdir)/scripttempl/v850.sc ${GEN_DEPENDS}
- ${GENSCRIPTS} v850 "$(tdir_v850)"
-ew65.c: $(srcdir)/emulparams/w65.sh \
- $(srcdir)/emultempl/generic.em $(srcdir)/scripttempl/w65.sc ${GEN_DEPENDS}
- ${GENSCRIPTS} w65 "$(tdir_w65)"
-ez8001.c: $(srcdir)/emulparams/z8001.sh \
- $(srcdir)/emultempl/generic.em $(srcdir)/scripttempl/z8000.sc ${GEN_DEPENDS}
- ${GENSCRIPTS} z8001 "$(tdir_z8001)"
-ez8002.c: $(srcdir)/emulparams/z8002.sh \
- $(srcdir)/emultempl/generic.em $(srcdir)/scripttempl/z8000.sc ${GEN_DEPENDS}
- ${GENSCRIPTS} z8002 "$(tdir_z8002)"
-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)
-
-# The generated emulation files mostly have the same dependencies.
-$(EMULATION_OFILES): ../bfd/bfd.h sysdep.h config.h $(INCDIR)/bfdlink.h \
- ld.h ldmain.h ldemul.h ldfile.h ldmisc.h ldexp.h ldlang.h \
- ldctor.h ldexp.h ldlang.h ldgram.h
-
-# This is the real libbfd.a created by libtool.
-TESTBFDLIB = @TESTBFDLIB@
-
-check-DEJAGNU: site.exp
- srcroot=`cd $(srcdir) && pwd`; export srcroot; \
- r=`pwd`; export r; \
- 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 \
- CC="$(CC_FOR_TARGET)" CFLAGS="$(CFLAGS)" \
- CXX="$(CXX_FOR_TARGET)" CXXFLAGS="$(CXXFLAGS)" \
- CC_FOR_HOST="$(CC)" CFLAGS_FOR_HOST="$(CFLAGS)" \
- OFILES="$(OFILES)" BFDLIB="$(TESTBFDLIB)" \
- LIBIBERTY="$(LIBIBERTY) $(INTLLIBS)" LIBS="$(LIBS)" \
- $(RUNTESTFLAGS); \
- else echo "WARNING: could not find \`runtest'" 1>&2; :;\
- fi
-
-# Rules for testing by relinking ld itself.
-# A similar test is in the testsuite. This target is for ease of use
-# when porting ld.
-
-ld-partial.o: ld-new$(EXEEXT)
- ./ld-new$(EXEEXT) $(HOSTING_EMU) -o ld-partial.o -r $(OFILES)
-ld1$(EXEEXT): ld-partial.o
- ./ld-new$(EXEEXT) $(HOSTING_EMU) -o ld1$(EXEEXT) $(HOSTING_CRT0) ld-partial.o $(TESTBFDLIB) $(LIBIBERTY) $(HOSTING_LIBS) $(LIBS)
-
-ld1-full$(EXEEXT): ld-new
- ./ld-new$(EXEEXT) $(HOSTING_EMU) -o ld1-full$(EXEEXT) $(HOSTING_CRT0) $(OFILES) $(TESTBFDLIB) $(LIBIBERTY) $(HOSTING_LIBS) $(LIBS)
-
-ld2$(EXEEXT): ld1$(EXEEXT)
- ./ld1$(EXEEXT) $(HOSTING_EMU) -o ld2$(EXEEXT) $(HOSTING_CRT0) $(OFILES) $(TESTBFDLIB) $(LIBIBERTY) $(HOSTING_LIBS) $(LIBS)
-
-ld3$(EXEEXT): ld2$(EXEEXT)
- ./ld2$(EXEEXT) $(HOSTING_EMU) -o ld3$(EXEEXT) $(HOSTING_CRT0) $(OFILES) $(TESTBFDLIB) $(LIBIBERTY) $(HOSTING_LIBS) $(LIBS)
-
-bootstrap: ld3$(EXEEXT)
- cmp ld2$(EXEEXT) ld3$(EXEEXT)
-
-.PHONY: bootstrap
-
-# A test program for C++ constructors and destructors.
-# This test is now in the testsuite.
-#
-#cdtest: cdtest-main.o cdtest-bar.o cdtest-foo.o ld.new
-# ./ld.new $(HOSTING_EMU) -o cdtest $(HOSTING_CRT0) \
-# cdtest-main.o cdtest-bar.o cdtest-foo.o $(HOSTING_LIBS)
-#
-#cdtest.out: cdtest
-# ./cdtest > cdtest.tmp
-# mv cdtest.tmp cdtest.out
-#
-#cdtest-ur.o: cdtest-main.o cdtest-bar.o cdtest-foo.o ld.new
-# ./ld.new $(HOSTING_EMU) -o cdtest-ur.o -Ur cdtest-main.o \
-# cdtest-bar.o cdtest-foo.o
-#
-#cdtest-ur: cdtest-ur.o
-# ./ld.new $(HOSTING_EMU) -o cdtest-ur $(HOSTING_CRT0) cdtest-ur.o \
-# $(HOSTING_LIBS)
-#
-#cdtest-ur.out: cdtest-ur
-# ./cdtest-ur > cdtest-ur.tmp
-# mv cdtest-ur.tmp cdtest-ur.out
-#
-#check-cdtest: cdtest.out cdtest-ur.out $(srcdir)/cdtest.exp
-# diff $(srcdir)/cdtest.exp cdtest.out
-# diff $(srcdir)/cdtest.exp cdtest-ur.out
-#
-#.PHONY: check-cdtest
-
-# END OF CHECK TARGETS
-
-# DOCUMENTATION TARGETS
-# Manual configuration file; not usually attached to normal configuration,
-# because almost all configs use "gen" version of manual.
-# Set DOCVER above to change.
-configdoc.texi: ${DOCVER}-doc.texi
- ln -s ${srcdir}/${DOCVER}-doc.texi ./configdoc.texi >/dev/null 2>&1 \
- || ln ${srcdir}/${DOCVER}-doc.texi ./configdoc.texi >/dev/null 2>&1 \
- || cp ${srcdir}/${DOCVER}-doc.texi ./configdoc.texi
-
-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
-
-# 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
- touch $@
- -$(TEXI2POD) $(MANCONF) < $(srcdir)/ld.texinfo > ld.pod
- -($(POD2MAN) ld.pod | \
- sed -e '/^.if n .na/d' > $@.T$$$$ && \
- mv -f $@.T$$$$ $@) || \
- (rm -f $@.T$$$$ && exit 1)
- rm -f ld.pod
-
-MAINTAINERCLEANFILES = ldver.texi
-
-# We want to reconfigure if configure.host or configure.tgt changes.
-CONFIG_STATUS_DEPENDENCIES = $(srcdir)/configure.host $(srcdir)/configure.tgt
-
-MOSTLYCLEANFILES = $(STAGESTUFF) ld1$(EXEEXT) ld2$(EXEEXT) ld3$(EXEEXT) \
- ldemul-list.h crtbegin.o crtend.o ld.log ld.sum
-mostlyclean-local:
- -rm -rf tmpdir
-CLEANFILES = dep.sed DEP DEPA DEP1 DEP2
-
-.PHONY: install-exec-local install-data-local
-
-install-exec-local: ld-new$(EXEEXT)
- $(mkinstalldirs) $(DESTDIR)$(bindir) $(DESTDIR)$(tooldir)/bin
- @list='$(noinst_PROGRAMS)'; for p in $$list; do \
- if test -f $$p; then \
- echo " $(LIBTOOL) --mode=install $(INSTALL_PROGRAM) $$p $(bindir)/`echo $$p|sed -e 's/$(EXEEXT)$$//' -e 's/-new//'|sed '$(transform)'|sed 's/$$/$(EXEEXT)/'`"; \
- $(LIBTOOL) --mode=install $(INSTALL_PROGRAM) $$p $(DESTDIR)$(bindir)/`echo $$p|sed -e 's/$(EXEEXT)$$//' -e 's/-new//'|sed '$(transform)'|sed 's/$$/$(EXEEXT)/'`; \
- else :; fi; \
- done
- n=`echo ld | sed '$(transform)'`; \
- if [ "$(bindir)/$$n$(EXEEXT)" != "$(tooldir)/bin/ld$(EXEEXT)" ]; then \
- rm -f $(DESTDIR)$(tooldir)/bin/ld$(EXEEXT); \
- ln $(DESTDIR)$(bindir)/$$n$(EXEEXT) $(DESTDIR)$(tooldir)/bin/ld$(EXEEXT) >/dev/null 2>/dev/null \
- || $(LIBTOOL) --mode=install $(INSTALL_PROGRAM) ld-new$(EXEEXT) $(DESTDIR)$(tooldir)/bin/ld$(EXEEXT); \
- fi
-
-install-data-local:
- $(mkinstalldirs) $(DESTDIR)$(scriptdir)/ldscripts
- for f in ldscripts/*; do \
- $(INSTALL_DATA) $$f $(DESTDIR)$(scriptdir)/$$f ; \
- done
-
-# We want install to imply install-info as per GNU standards, despite the
-# cygnus option.
-install: 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)
-diststuff: info $(EXTRA_DIST)
-
-DISTCLEANFILES = tdirs site.exp site.bak stringify.sed
-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
- rm -f DEP1
- $(MAKE) MKDEP="$(MKDEP)" DEP1
- sed -f dep.sed < DEP1 > DEPA
- echo '# IF YOU PUT ANYTHING HERE IT WILL GO AWAY' >> DEPA
- if grep ' /' DEPA > /dev/null 2> /dev/null; then \
- echo 'make DEP failed!'; exit 1; \
- else \
- mv -f DEPA $@; \
- fi
-
-DEP1: $(CFILES) $(GENERATED_CFILES)
- echo '# DO NOT DELETE THIS LINE -- mkdep uses it.' > DEP2
- echo '# DO NOT PUT ANYTHING AFTER THIS LINE, IT WILL GO AWAY.' >> DEP2
- $(MKDEP) $(INCLUDES) $(CFLAGS) $? >> DEP2
- mv -f DEP2 $@
-
-dep.sed: dep-in.sed config.status
- sed <$(srcdir)/dep-in.sed >dep.sed \
- -e 's!@INCDIR@!$(INCDIR)!' \
- -e 's!@BFDDIR@!$(BFDDIR)!' \
- -e 's!@SRCDIR@!$(srcdir)!' \
- -e 's!@TOPDIR@!'`echo $(srcdir) | sed -e s,/ld$$,,`'!'
-
-dep: DEP
- sed -e '/^..DO NOT DELETE THIS LINE/,$$d' < Makefile > tmp-Makefile
- cat DEP >> tmp-Makefile
- $(srcdir)/../move-if-change tmp-Makefile Makefile
-
-dep-in: DEP
- sed -e '/^..DO NOT DELETE THIS LINE/,$$d' < $(srcdir)/Makefile.in > tmp-Makefile.in
- cat DEP >> tmp-Makefile.in
- $(srcdir)/../move-if-change tmp-Makefile.in $(srcdir)/Makefile.in
-
-dep-am: DEP
- sed -e '/^..DO NOT DELETE THIS LINE/,$$d' < $(srcdir)/Makefile.am > tmp-Makefile.am
- cat DEP >> tmp-Makefile.am
- $(srcdir)/../move-if-change tmp-Makefile.am $(srcdir)/Makefile.am
-
-.PHONY: dep dep-in dep-am
-
-@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 \
- 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 \
- $(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 \
- 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 \
- 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.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 \
- 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
-# IF YOU PUT ANYTHING HERE IT WILL GO AWAY
diff --git a/contrib/binutils/ld/Makefile.in b/contrib/binutils/ld/Makefile.in
deleted file mode 100644
index 976d5db..0000000
--- a/contrib/binutils/ld/Makefile.in
+++ /dev/null
@@ -1,2469 +0,0 @@
-# Makefile.in generated automatically by automake 1.4-p5 from Makefile.am
-
-# Copyright (C) 1994, 1995-8, 1999, 2001 Free Software Foundation, Inc.
-# This Makefile.in is free software; the Free Software Foundation
-# gives unlimited permission to copy and/or distribute it,
-# with or without modifications, as long as this notice is preserved.
-
-# This program is 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.
-
-
-SHELL = @SHELL@
-
-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@
-
-INSTALL = @INSTALL@
-INSTALL_PROGRAM = @INSTALL_PROGRAM@ $(AM_INSTALL_PROGRAM_FLAGS)
-INSTALL_DATA = @INSTALL_DATA@
-INSTALL_SCRIPT = @INSTALL_SCRIPT@
-transform = @program_transform_name@
-
-NORMAL_INSTALL = :
-PRE_INSTALL = :
-POST_INSTALL = :
-NORMAL_UNINSTALL = :
-PRE_UNINSTALL = :
-POST_UNINSTALL = :
-build_alias = @build_alias@
-build_triplet = @build@
-host_alias = @host_alias@
-host_triplet = @host@
-target_alias = @target_alias@
-target_triplet = @target@
-AS = @AS@
-CATALOGS = @CATALOGS@
-CATOBJEXT = @CATOBJEXT@
-CC = @CC@
-CC_FOR_BUILD = @CC_FOR_BUILD@
-CXXCPP = @CXXCPP@
-DATADIRNAME = @DATADIRNAME@
-DLLTOOL = @DLLTOOL@
-EMULATION_LIBPATH = @EMULATION_LIBPATH@
-EXEEXT = @EXEEXT@
-EXEEXT_FOR_BUILD = @EXEEXT_FOR_BUILD@
-GCJ = @GCJ@
-GCJFLAGS = @GCJFLAGS@
-GMOFILES = @GMOFILES@
-GMSGFMT = @GMSGFMT@
-GT_NO = @GT_NO@
-GT_YES = @GT_YES@
-HDEFINES = @HDEFINES@
-INCLUDE_LOCALE_H = @INCLUDE_LOCALE_H@
-INSTOBJEXT = @INSTOBJEXT@
-INTLDEPS = @INTLDEPS@
-INTLOBJS = @INTLOBJS@
-LIBTOOL = @LIBTOOL@
-LN_S = @LN_S@
-MAINT = @MAINT@
-MAKEINFO = @MAKEINFO@
-MKINSTALLDIRS = @MKINSTALLDIRS@
-MSGFMT = @MSGFMT@
-NATIVE_LIB_DIRS = @NATIVE_LIB_DIRS@
-OBJDUMP = @OBJDUMP@
-OBJEXT = @OBJEXT@
-PACKAGE = @PACKAGE@
-POFILES = @POFILES@
-POSUB = @POSUB@
-RANLIB = @RANLIB@
-STRINGIFY = @STRINGIFY@
-STRIP = @STRIP@
-TARGET_SYSTEM_ROOT = @TARGET_SYSTEM_ROOT@
-TARGET_SYSTEM_ROOT_DEFINE = @TARGET_SYSTEM_ROOT_DEFINE@
-USE_INCLUDED_LIBINTL = @USE_INCLUDED_LIBINTL@
-USE_NLS = @USE_NLS@
-VERSION = @VERSION@
-bfdincludedir = @bfdincludedir@
-bfdlibdir = @bfdlibdir@
-l = @l@
-use_sysroot = @use_sysroot@
-
-INTLLIBS = @INTLLIBS@
-
-AUTOMAKE_OPTIONS = cygnus dejagnu
-
-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
-MKDEP = gcc -MM
-
-# What version of the manual to build
-DOCVER = gen
-
-# Options to extract the man page from ld.texinfo
-MANCONF = -Dman
-
-TEXI2POD = perl $(BASEDIR)/etc/texi2pod.pl
-
-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`
-
-
-RUNTESTFLAGS =
-
-CC_FOR_TARGET = ` \
- if [ -f $$r/../gcc/xgcc ] ; then \
- if [ -f $$r/../newlib/Makefile ] ; then \
- echo $$r/../gcc/xgcc -B$$r/../gcc/ -idirafter $$r/../newlib/targ-include -idirafter $${srcroot}/../newlib/libc/include -nostdinc; \
- else \
- echo $$r/../gcc/xgcc -B$$r/../gcc/; \
- fi; \
- else \
- if [ "@host@" = "@target@" ] ; then \
- echo $(CC); \
- else \
- echo gcc | sed '$(transform)'; \
- fi; \
- fi`
-
-
-CXX = gcc
-CXX_FOR_TARGET = ` \
- if [ -f $$r/../gcc/xgcc ] ; then \
- if [ -f $$r/../newlib/Makefile ] ; then \
- echo $$r/../gcc/xgcc -B$$r/../gcc/ -idirafter $$r/../newlib/targ-include -idirafter $${srcroot}/../newlib/libc/include -nostdinc; \
- else \
- echo $$r/../gcc/xgcc -B$$r/../gcc/; \
- fi; \
- else \
- if [ "@host@" = "@target@" ] ; then \
- echo $(CXX); \
- else \
- echo gcc | sed '$(transform)'; \
- fi; \
- fi`
-
-
-noinst_PROGRAMS = ld-new
-info_TEXINFOS = ld.texinfo
-noinst_TEXINFOS = ldint.texinfo
-man_MANS = ld.1
-
-INCLUDES = -D_GNU_SOURCE -I. -I$(srcdir) -I../bfd -I$(BFDDIR) -I$(INCDIR) -I$(top_srcdir)/../intl -I../intl $(HDEFINES) $(CFLAGS) -DLOCALEDIR="\"$(prefix)/share/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 \
- earmaoutb.o \
- earmaoutl.o \
- earmcoff.o \
- earmelf.o \
- earmelfb.o \
- earmelf_fbsd.o \
- earmelf_linux.o \
- earmelfb_linux.o \
- earmelf_nbsd.o \
- earmelfb_nbsd.o \
- earmelf_oabi.o \
- earmnto.o \
- earmnbsd.o \
- earmpe.o \
- eavr2.o \
- eavr1.o \
- eavr3.o \
- eavr4.o \
- eavr5.o \
- ecoff_i860.o \
- ecoff_sparc.o \
- ecrisaout.o \
- ecriself.o \
- ecrislinux.o \
- ed10velf.o \
- ed30v_e.o \
- ed30v_o.o \
- ed30velf.o \
- edelta68.o \
- eelf32_dlx.o \
- eebmon29k.o \
- eelf32_i960.o \
- eelf32_i860.o \
- eelf32_sparc.o \
- eelf32b4300.o \
- eelf32bmip.o \
- eelf32bmipn32.o \
- eelf32btsmip.o \
- eelf32btsmipn32.o \
- eelf32ltsmip.o \
- eelf32ltsmipn32.o \
- eelf32ebmip.o \
- eelf32elmip.o \
- eelf32fr30.o \
- eelf32frv.o \
- eelf32i370.o \
- eelf32ip2k.o \
- eelf32iq2000.o \
- eelf32iq10.o \
- eelf32l4300.o \
- eelf32lmip.o \
- eelf32lppc.o \
- eelf32lppcnto.o \
- eelf32lppcsim.o \
- eelf32mcore.o \
- eelf32mipswindiss.o \
- eelf32openrisc.o \
- eelf32ppc.o \
- eelf32ppc_fbsd.o \
- eelf32ppclinux.o \
- eelf32ppcnto.o \
- eelf32ppcsim.o \
- eelf32ppcwindiss.o \
- eelf32vax.o \
- eelf32xstormy16.o \
- eelf32xtensa.o \
- eelf_i386.o \
- eelf_i386_be.o \
- eelf_i386_chaos.o \
- eelf_i386_fbsd.o \
- eelf_i386_ldso.o \
- eelf_s390.o \
- egld960.o \
- egld960coff.o \
- eh8300.o \
- eh8300h.o \
- eh8300s.o \
- eh8300elf.o \
- eh8300hn.o \
- eh8300sn.o \
- eh8300sx.o \
- eh8300helf.o \
- eh8300self.o \
- eh8300hnelf.o \
- eh8300snelf.o \
- eh8300sxelf.o \
- eh8300sxn.o \
- eh8300sxnelf.o \
- eh8500.o \
- eh8500b.o \
- eh8500c.o \
- eh8500m.o \
- eh8500s.o \
- ehp300bsd.o \
- ehp3hpux.o \
- ehppaelf.o \
- ehppalinux.o \
- ehppanbsd.o \
- ehppaobsd.o \
- ei386aout.o \
- ei386beos.o \
- ei386bsd.o \
- ei386coff.o \
- ei386go32.o \
- ei386linux.o \
- ei386lynx.o \
- ei386mach.o \
- ei386moss.o \
- ei386msdos.o \
- ei386nbsd.o \
- ei386nto.o \
- ei386nw.o \
- ei386pe.o \
- ei386pe_posix.o \
- elnk960.o \
- em32relf.o \
- em32rlelf.o \
- em32relf_linux.o \
- em32rlelf_linux.o \
- em68hc11elf.o \
- em68hc11elfb.o \
- em68hc12elf.o \
- em68hc12elfb.o \
- em68k4knbsd.o \
- em68kaout.o \
- em68kaux.o \
- em68kcoff.o \
- em68kelf.o \
- em68kelfnbsd.o \
- em68klinux.o \
- em68klynx.o \
- em68knbsd.o \
- em68kpsos.o \
- em88kbcs.o \
- emcorepe.o \
- emipsbig.o \
- emipsbsd.o \
- emipsidt.o \
- emipsidtl.o \
- emipslit.o \
- emipslnews.o \
- emipspe.o \
- emsp430x110.o \
- emsp430x112.o \
- emsp430x1101.o \
- emsp430x1111.o \
- emsp430x1121.o \
- emsp430x1122.o \
- emsp430x1132.o \
- emsp430x122.o \
- emsp430x123.o \
- emsp430x1222.o \
- emsp430x1232.o \
- emsp430x133.o \
- emsp430x135.o \
- emsp430x1331.o \
- emsp430x1351.o \
- emsp430x147.o \
- emsp430x148.o \
- emsp430x149.o \
- emsp430x155.o \
- emsp430x156.o \
- emsp430x157.o \
- emsp430x167.o \
- emsp430x168.o \
- emsp430x169.o \
- emsp430x311.o \
- emsp430x312.o \
- emsp430x313.o \
- emsp430x314.o \
- emsp430x315.o \
- emsp430x323.o \
- emsp430x325.o \
- emsp430x336.o \
- emsp430x337.o \
- emsp430x412.o \
- emsp430x413.o \
- emsp430xE423.o \
- emsp430xE425.o \
- emsp430xE427.o \
- emsp430xW423.o \
- emsp430xW425.o \
- emsp430xW427.o \
- emsp430x435.o \
- emsp430x436.o \
- emsp430x437.o \
- emsp430x447.o \
- emsp430x448.o \
- emsp430x449.o \
- enews.o \
- ens32knbsd.o \
- eor32.o \
- eor32elf.o \
- epc532macha.o \
- epdp11.o \
- epjelf.o \
- epjlelf.o \
- eppcmacos.o \
- eppcnw.o \
- eppcpe.o \
- eriscix.o \
- esa29200.o \
- esh.o \
- eshelf32.o \
- eshlelf32.o \
- eshelf32_linux.o \
- eshlelf32_linux.o \
- eshelf32_nbsd.o \
- eshlelf32_nbsd.o \
- eshelf.o \
- eshelf_linux.o \
- eshlelf_linux.o \
- eshelf_nbsd.o \
- eshlelf_nbsd.o \
- eshelf_nto.o \
- eshlelf_nto.o \
- eshl.o \
- eshlelf.o \
- eshpe.o \
- esparcaout.o \
- esparclinux.o \
- esparclynx.o \
- esparcnbsd.o \
- est2000.o \
- esun3.o \
- esun4.o \
- etic30aout.o \
- etic30coff.o \
- etic3xcoff.o \
- etic3xcoff_onchip.o \
- etic4xcoff.o \
- etic54xcoff.o \
- etic80coff.o \
- evanilla.o \
- evax.o \
- evaxnbsd.o \
- evsta.o \
- ew65.o \
- ez8001.o \
- eelf32frvfd.o \
- ez8002.o
-
-
-ALL_64_EMULATIONS = \
- eelf64_aix.o \
- eelf64_ia64.o \
- eelf64_ia64_fbsd.o \
- eshelf64.o \
- eshlelf64.o \
- eshelf64_nbsd.o \
- eshlelf64_nbsd.o \
- eelf_x86_64.o \
- eelf_x86_64_fbsd.o \
- eelf64_s390.o \
- eelf64_sparc.o \
- eelf64_sparc_fbsd.o \
- eelf64alpha.o \
- eelf64alpha_fbsd.o \
- eelf64alpha_nbsd.o \
- eelf64bmip.o \
- eelf64btsmip.o \
- eelf64ltsmip.o \
- eelf64hppa.o \
- eelf64mmix.o \
- emmo.o \
- eelf64ppc.o \
- eelf64lppc.o \
- ehppa64linux.o
-
-
-ALL_EMUL_EXTRA_OFILES = \
- deffilep.o \
- pe-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
-
-
-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
-
-
-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@
-GEN_DEPENDS = $(srcdir)/genscripts.sh stringify.sed
-
-# 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
-
-# We want to reconfigure if configure.host or configure.tgt changes.
-CONFIG_STATUS_DEPENDENCIES = $(srcdir)/configure.host $(srcdir)/configure.tgt
-
-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
-
-# 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)
-
-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)
- $(SHELL) ./config.status --recheck
-$(srcdir)/configure: @MAINTAINER_MODE_TRUE@$(srcdir)/configure.in $(ACLOCAL_M4) $(CONFIGURE_DEPENDENCIES)
- cd $(srcdir) && $(AUTOCONF)
-
-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
- @if test ! -f $@; then \
- rm -f $(srcdir)/stamp-h.in; \
- $(MAKE) $(srcdir)/stamp-h.in; \
- 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:
-
-distclean-hdr:
- -rm -f config.h
-
-maintainer-clean-hdr:
-
-mostlyclean-noinstPROGRAMS:
-
-clean-noinstPROGRAMS:
- -test -z "$(noinst_PROGRAMS)" || rm -f $(noinst_PROGRAMS)
-
-distclean-noinstPROGRAMS:
-
-maintainer-clean-noinstPROGRAMS:
-
-.c.o:
- $(COMPILE) -c $<
-
-# 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 $<
-
-mostlyclean-compile:
- -rm -f *.o core *.core
- -rm -f *.$(OBJEXT)
-
-clean-compile:
-
-distclean-compile:
- -rm -f *.tab.c
-
-maintainer-clean-compile:
-
-.c.lo:
- $(LIBTOOL) --mode=compile $(COMPILE) -c $<
-
-.s.lo:
- $(LIBTOOL) --mode=compile $(COMPILE) -c $<
-
-.S.lo:
- $(LIBTOOL) --mode=compile $(COMPILE) -c $<
-
-mostlyclean-libtool:
- -rm -f *.lo
-
-clean-libtool:
- -rm -rf .libs _libs
-
-distclean-libtool:
-
-maintainer-clean-libtool:
-
-ld-new$(EXEEXT): $(ld_new_OBJECTS) $(ld_new_DEPENDENCIES)
- @rm -f ld-new$(EXEEXT)
- $(LINK) $(ld_new_LDFLAGS) $(ld_new_OBJECTS) $(ld_new_LDADD) $(LIBS)
-.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) $<
-.dvi.ps:
- $(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 \
- 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 || :;\
- 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
- @$(NORMAL_UNINSTALL)
- list='$(INFO_DEPS)'; \
- for file in $$list; do \
- (cd $(DESTDIR)$(infodir) && rm -f $$file $$file-[0-9] $$file-[0-9][0-9]); \
- done
-
-dist-info: $(INFO_DEPS)
- list='$(INFO_DEPS)'; \
- for base in $$list; do \
- if test -f $$base; then d=.; else d=$(srcdir); fi; \
- for file in `cd $$d && eval echo $$base*`; do \
- test -f $(distdir)/$$file \
- || ln $$d/$$file $(distdir)/$$file 2> /dev/null \
- || cp -p $$d/$$file $(distdir)/$$file; \
- done; \
- done
-
-mostlyclean-aminfo:
- -rm -f ld.aux ld.cp ld.cps ld.dvi ld.fn ld.fns ld.ky ld.kys ld.ps \
- ld.log ld.pg ld.toc ld.tp ld.tps ld.vr ld.vrs ld.op ld.tr \
- ld.cv ld.cn
-
-clean-aminfo:
-
-distclean-aminfo:
-
-maintainer-clean-aminfo:
- for i in $(INFO_DEPS); do \
- rm -f $$i; \
- if test "`echo $$i-[0-9]*`" != "$$i-[0-9]*"; then \
- rm -f $$i-[0-9]*; \
- fi; \
- done
-clean-info: mostlyclean-aminfo
-
-install-man1:
- $(mkinstalldirs) $(DESTDIR)$(man1dir)
- @list='$(man1_MANS)'; \
- l2='$(man_MANS)'; for i in $$l2; do \
- case "$$i" in \
- *.1*) list="$$list $$i" ;; \
- esac; \
- done; \
- for i in $$list; do \
- if test -f $(srcdir)/$$i; then file=$(srcdir)/$$i; \
- else file=$$i; fi; \
- ext=`echo $$i | sed -e 's/^.*\\.//'`; \
- inst=`echo $$i | sed -e 's/\\.[0-9a-z]*$$//'`; \
- inst=`echo $$inst | sed '$(transform)'`.$$ext; \
- 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 \
- case "$$i" in \
- *.1*) list="$$list $$i" ;; \
- esac; \
- done; \
- for i in $$list; do \
- ext=`echo $$i | sed -e 's/^.*\\.//'`; \
- inst=`echo $$i | sed -e 's/\\.[0-9a-z]*$$//'`; \
- inst=`echo $$inst | sed '$(transform)'`.$$ext; \
- 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.
-# To change the values of `make' variables: instead of editing Makefiles,
-# (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; \
- 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) \
- || case "$$amf" in *=*) exit 1;; *k*) fail=yes;; *) exit 1;; esac; \
- done; \
- if test "$$dot_seen" = "no"; then \
- $(MAKE) $(AM_MAKEFLAGS) "$$target-am" || exit 1; \
- fi; test -z "$$fail"
-
-mostlyclean-recursive clean-recursive distclean-recursive \
-maintainer-clean-recursive:
- @set fnord $(MAKEFLAGS); amf=$$2; \
- dot_seen=no; \
- rev=''; list='$(SUBDIRS)'; for subdir in $$list; do \
- rev="$$subdir $$rev"; \
- test "$$subdir" != "." || dot_seen=yes; \
- done; \
- test "$$dot_seen" = "no" && rev=". $$rev"; \
- target=`echo $@ | sed s/-recursive//`; \
- for subdir in $$rev; do \
- echo "Making $$target in $$subdir"; \
- if test "$$subdir" = "."; then \
- local_target="$$target-am"; \
- else \
- local_target="$$target"; \
- fi; \
- (cd $$subdir && $(MAKE) $(AM_MAKEFLAGS) $$local_target) \
- || case "$$amf" in *=*) exit 1;; *k*) fail=yes;; *) exit 1;; esac; \
- done && test -z "$$fail"
-tags-recursive:
- list='$(SUBDIRS)'; for subdir in $$list; do \
- test "$$subdir" = . || (cd $$subdir && $(MAKE) $(AM_MAKEFLAGS) tags); \
- done
-
-tags: TAGS
-
-ID: $(HEADERS) $(SOURCES) $(LISP)
- list='$(SOURCES) $(HEADERS)'; \
- unique=`for i in $$list; do echo $$i; done | \
- awk ' { files[$$0] = 1; } \
- END { for (i in files) print i; }'`; \
- here=`pwd` && cd $(srcdir) \
- && mkid -f$$here/ID $$unique $(LISP)
-
-TAGS: tags-recursive $(HEADERS) $(SOURCES) config.in $(TAGS_DEPENDENCIES) $(LISP)
- tags=; \
- here=`pwd`; \
- list='$(SUBDIRS)'; for subdir in $$list; do \
- if test "$$subdir" = .; then :; else \
- test -f $$subdir/TAGS && tags="$$tags -i $$here/$$subdir/TAGS"; \
- fi; \
- done; \
- list='$(SOURCES) $(HEADERS)'; \
- unique=`for i in $$list; do echo $$i; done | \
- awk ' { files[$$0] = 1; } \
- END { for (i in files) print i; }'`; \
- test -z "$(ETAGS_ARGS)config.in$$unique$(LISP)$$tags" \
- || (cd $(srcdir) && etags $(ETAGS_ARGS) $$tags config.in $$unique $(LISP) -o $$here/TAGS)
-
-mostlyclean-tags:
-
-clean-tags:
-
-distclean-tags:
- -rm -f TAGS ID
-
-maintainer-clean-tags:
-
-distdir = $(PACKAGE)-$(VERSION)
-top_distdir = $(distdir)
-
-# This target untars the dist file and tries a VPATH configuration. Then
-# it guarantees that the distribution is self-contained by making another
-# tarfile.
-distcheck: dist
- -rm -rf $(distdir)
- GZIP=$(GZIP_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
-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
- @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
-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
-install-exec: install-exec-recursive
-
-install-data-am: install-man install-data-local
-install-data: install-data-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
-
-
-mostlyclean-generic:
- -test -z "$(MOSTLYCLEANFILES)" || rm -f $(MOSTLYCLEANFILES)
-
-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 "$(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
-
-mostlyclean: mostlyclean-recursive
-
-clean-am: clean-hdr clean-noinstPROGRAMS clean-compile clean-libtool \
- clean-aminfo clean-tags clean-generic mostlyclean-am
-
-clean: clean-recursive
-
-distclean-am: distclean-hdr distclean-noinstPROGRAMS distclean-compile \
- distclean-libtool distclean-aminfo distclean-tags \
- distclean-generic clean-am distclean-local
- -rm -f libtool
-
-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."
-
-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
-
-
-po/POTFILES.in: @MAINT@ Makefile
- for f in $(POTFILES); do echo $$f; done | LC_COLLATE= sort > tmp \
- && mv tmp $(srcdir)/po/POTFILES.in
-
-ldmain.o: ldmain.c config.status
- $(COMPILE) -c -DDEFAULT_EMULATION='"$(EMUL)"' \
- -DSCRIPTDIR='"$(scriptdir)"' -DBINDIR='"$(bindir)"' \
- -DTOOLBINDIR='"$(tooldir)/bin"' \
- -DTARGET='"@target@"' @TARGET_SYSTEM_ROOT_DEFINE@ \
- $(srcdir)/ldmain.c
-
-ldemul-list.h: Makefile
- (echo "/* This file is automatically generated. DO NOT EDIT! */";\
- for f in `echo " " ${EMULATION_OFILES} "" \
- | sed -e 's/ e/ ld/g' -e 's/ ld/ /g' -e 's/[.]o//g'`; do \
- echo "extern ld_emulation_xfer_type ld_$${f}_emulation;"; \
- done;\
- echo "";\
- echo "#define EMULATION_LIST \\";\
- for f in `echo " " ${EMULATION_OFILES} "" \
- | sed -e 's/ e/ ld/g' -e 's/ ld/ /g' -e 's/[.]o//g'`; do \
- echo " &ld_$${f}_emulation, \\"; \
- done;\
- echo " 0") >ldemul-tmp.h
- mv ldemul-tmp.h ldemul-list.h
-
-stringify.sed: ${srcdir}/emultempl/$(STRINGIFY)
- cp ${srcdir}/emultempl/$(STRINGIFY) stringify.sed
-
-@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)"
-eaix5rs6.c: $(srcdir)/emulparams/aix5rs6.sh \
- $(srcdir)/emultempl/aix.em $(srcdir)/scripttempl/aix.sc ${GEN_DEPENDS}
- ${GENSCRIPTS} aix5rs6 "$(tdir_aixrs6)"
-eaixppc.c: $(srcdir)/emulparams/aixppc.sh \
- $(srcdir)/emultempl/aix.em $(srcdir)/scripttempl/aix.sc ${GEN_DEPENDS}
- ${GENSCRIPTS} aixppc "$(tdir_aixppc)"
-eaixrs6.c: $(srcdir)/emulparams/aixrs6.sh \
- $(srcdir)/emultempl/aix.em $(srcdir)/scripttempl/aix.sc ${GEN_DEPENDS}
- ${GENSCRIPTS} aixrs6 "$(tdir_aixrs6)"
-ealpha.c: $(srcdir)/emulparams/alpha.sh \
- $(srcdir)/emultempl/generic.em $(srcdir)/scripttempl/alpha.sc ${GEN_DEPENDS}
- ${GENSCRIPTS} alpha "$(tdir_alpha)"
-earcelf.c: $(srcdir)/emulparams/arcelf.sh \
- $(srcdir)/emultempl/generic.em $(srcdir)/scripttempl/elf.sc ${GEN_DEPENDS}
- ${GENSCRIPTS} arcelf "$(tdir_arcelf)"
-earmelf.c: $(srcdir)/emulparams/armelf.sh \
- $(srcdir)/emultempl/elf32.em $(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 \
- $(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 \
- $(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 \
- $(srcdir)/scripttempl/elf.sc ${GEN_DEPENDS}
- ${GENSCRIPTS} armelf_linux "$(tdir_armelf_linux)"
-earmelfb_linux.c: $(srcdir)/emulparams/armelfb_linux.sh \
- $(srcdir)/emulparams/armelf_linux.sh \
- $(srcdir)/emultempl/elf32.em $(srcdir)/emultempl/armelf.em \
- $(srcdir)/scripttempl/elf.sc ${GEN_DEPENDS}
- ${GENSCRIPTS} armelfb_linux "$(tdir_armelfb_linux)"
-earmelf_nbsd.c: $(srcdir)/emulparams/armelf_nbsd.sh \
- $(srcdir)/emulparams/armelf.sh \
- $(srcdir)/emultempl/elf32.em $(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 \
- $(srcdir)/scripttempl/elf.sc ${GEN_DEPENDS}
- ${GENSCRIPTS} armelfb_nbsd "$(tdir_armelfb_nbsd)"
-earmaoutb.c: $(srcdir)/emulparams/armaoutb.sh \
- $(srcdir)/emultempl/generic.em $(srcdir)/scripttempl/armaout.sc ${GEN_DEPENDS}
- ${GENSCRIPTS} armaoutb "$(tdir_armaoutb)"
-earmaoutl.c: $(srcdir)/emulparams/armaoutl.sh \
- $(srcdir)/emultempl/generic.em $(srcdir)/scripttempl/armaout.sc ${GEN_DEPENDS}
- ${GENSCRIPTS} armaoutl "$(tdir_armaoutl)"
-earmcoff.c: $(srcdir)/emulparams/armcoff.sh \
- $(srcdir)/emultempl/armcoff.em $(srcdir)/scripttempl/armcoff.sc ${GEN_DEPENDS}
- ${GENSCRIPTS} armcoff "$(tdir_armcoff)"
-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 \
- $(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)"
-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 \
- ${GEN_DEPENDS}
- ${GENSCRIPTS} avr2 "$(tdir_avr2)"
-eavr1.c: $(srcdir)/emulparams/avr1.sh \
- $(srcdir)/emultempl/generic.em $(srcdir)/scripttempl/avr.sc \
- ${GEN_DEPENDS}
- ${GENSCRIPTS} avr1 "$(tdir_avr2)"
-eavr3.c: $(srcdir)/emulparams/avr3.sh \
- $(srcdir)/emultempl/generic.em $(srcdir)/scripttempl/avr.sc \
- ${GEN_DEPENDS}
- ${GENSCRIPTS} avr3 "$(tdir_avr2)"
-eavr4.c: $(srcdir)/emulparams/avr4.sh \
- $(srcdir)/emultempl/generic.em $(srcdir)/scripttempl/avr.sc \
- ${GEN_DEPENDS}
- ${GENSCRIPTS} avr4 "$(tdir_avr2)"
-eavr5.c: $(srcdir)/emulparams/avr5.sh \
- $(srcdir)/emultempl/generic.em $(srcdir)/scripttempl/avr.sc \
- ${GEN_DEPENDS}
- ${GENSCRIPTS} avr5 "$(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)"
-ecoff_sparc.c: $(srcdir)/emulparams/coff_sparc.sh \
- $(srcdir)/emultempl/generic.em $(srcdir)/scripttempl/sparccoff.sc ${GEN_DEPENDS}
- ${GENSCRIPTS} coff_sparc "$(tdir_coff_sparc)"
-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}
- ${GENSCRIPTS} criself "$(tdir_cris)"
-ecrislinux.c: $(srcdir)/emulparams/crislinux.sh \
- $(srcdir)/emultempl/elf32.em $(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}
- ${GENSCRIPTS} d10velf "$(tdir_d10v)"
-ed30velf.c: $(srcdir)/emulparams/d30velf.sh \
- $(srcdir)/emultempl/generic.em $(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}
- ${GENSCRIPTS} d30v_o "$(tdir_d30v)"
-ed30v_e.c: $(srcdir)/emulparams/d30v_e.sh \
- $(srcdir)/emultempl/generic.em $(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)"
-eelf32_dlx.c: $(srcdir)/emulparams/elf32_dlx.sh \
- $(srcdir)/emultempl/elf32.em $(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 \
- $(srcdir)/scripttempl/elf.sc ${GEN_DEPENDS}
- ${GENSCRIPTS} elf32xstormy16 "$(tdir_xstormy16)"
-eelf32am33lin.c: $(srcdir)/emulparams/elf32am33lin.sh \
- $(srcdir)/emultempl/elf32.em $(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}
- ${GENSCRIPTS} elf32vax "$(tdir_elf32vax)"
-eelf32xtensa.c: $(srcdir)/emulparams/elf32xtensa.sh \
- $(srcdir)/emulparams/xtensa-config.sh \
- $(srcdir)/emultempl/elf32.em $(srcdir)/emultempl/xtensaelf.em \
- $(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}
- ${GENSCRIPTS} elf32fr30 "$(tdir_fr30)"
-eelf32frv.c: $(srcdir)/emulparams/elf32frv.sh \
- $(srcdir)/emultempl/elf32.em $(srcdir)/scripttempl/elf.sc ${GEN_DEPENDS}
- ${GENSCRIPTS} elf32frv "$(tdir_frv)"
-eelf32mcore.c: $(srcdir)/emulparams/elf32mcore.sh \
- $(srcdir)/emultempl/elf32.em $(srcdir)/scripttempl/elf.sc ${GEN_DEPENDS}
- ${GENSCRIPTS} elf32mcore "$(tdir_mcore)"
-em32relf.c: $(srcdir)/emulparams/m32relf.sh \
- $(srcdir)/emultempl/elf32.em $(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}
- ${GENSCRIPTS} m32rlelf "$(tdir_m32rlelf)"
-em32relf_linux.c: $(srcdir)/emulparams/m32relf_linux.sh \
- $(srcdir)/emultempl/elf32.em $(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}
- ${GENSCRIPTS} m32rlelf_linux "$(tdir_m32rlelf_linux)"
-eelf32_sparc.c: $(srcdir)/emulparams/elf32_sparc.sh \
- $(srcdir)/emultempl/elf32.em $(srcdir)/scripttempl/elf.sc ${GEN_DEPENDS}
- ${GENSCRIPTS} elf32_sparc "$(tdir_elf32_sparc)"
-eelf32_i860.c: $(srcdir)/emulparams/elf32_i860.sh \
- $(srcdir)/emultempl/elf32.em $(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}
- ${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}
- ${GENSCRIPTS} elf32b4300 "$(tdir_elf32b4300)"
-eelf32bmip.c: $(srcdir)/emulparams/elf32bmip.sh \
- $(srcdir)/emultempl/mipself.em \
- $(srcdir)/emultempl/elf32.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}
- ${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}
- ${GENSCRIPTS} elf32btsmip "$(tdir_elf32btsmip)"
-eelf32btsmipn32.c: $(srcdir)/emulparams/elf32btsmipn32.sh \
- $(srcdir)/emulparams/elf32bmip.sh $(srcdir)/emultempl/mipself.em \
- $(srcdir)/emultempl/elf32.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}
- ${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}
- ${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}
- ${GENSCRIPTS} elf32ebmip "$(tdir_elf32ebmip)"
-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}
- ${GENSCRIPTS} elf32elmip "$(tdir_elf32elmip)"
-eelf32bmipn32.c: $(srcdir)/emulparams/elf32bmipn32.sh \
- $(srcdir)/emultempl/irix.em \
- $(srcdir)/emultempl/elf32.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}
- ${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}
- ${GENSCRIPTS} elf32lmip "$(tdir_elf32lmip)"
-eelf32mipswindiss.c: $(srcdir)/emulparams/elf32mipswindiss.sh \
- $(srcdir)/emultempl/elf32.em $(srcdir)/scripttempl/elf.sc ${GEN_DEPENDS}
- ${GENSCRIPTS} elf32mipswindiss "$(tdir_elf32mipswindiss)"
-eelf32lppc.c: $(srcdir)/emulparams/elf32lppc.sh \
- $(srcdir)/emulparams/elf32ppc.sh $(srcdir)/emultempl/ppc32elf.em \
- $(srcdir)/emultempl/elf32.em $(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}
- ${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}
- ${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}
- ${GENSCRIPTS} elf32ppcnto "$(tdir_elf32ppcnto)"
-eelf32ppcwindiss.c: $(srcdir)/emulparams/elf32ppcwindiss.sh \
- $(srcdir)/emultempl/elf32.em $(srcdir)/scripttempl/elf.sc ${GEN_DEPENDS}
- ${GENSCRIPTS} elf32ppcwindiss "$(tdir_elf32ppcwindiss)"
-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}
- ${GENSCRIPTS} elf32lsmip "$(tdir_elf32lsmip)"
-eelf32openrisc.c: $(srcdir)/emulparams/elf32openrisc.sh \
- $(srcdir)/emultempl/elf32.em $(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}
- ${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}
- ${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}
- ${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}
- ${GENSCRIPTS} elf32ppclinux "$(tdir_elf32ppclinux)"
-eelf64ppc.c: $(srcdir)/emulparams/elf64ppc.sh $(srcdir)/emultempl/ppc64elf.em \
- $(srcdir)/emultempl/elf32.em $(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}
- ${GENSCRIPTS} elf64lppc "$(tdir_elf64lppc)"
-eelf32i370.c: $(srcdir)/emulparams/elf32i370.sh \
- $(srcdir)/emultempl/elf32.em $(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}
- ${GENSCRIPTS} elf32ip2k "$(tdir_ip2k)"
-eelf32iq2000.c: $(srcdir)/emulparams/elf32iq2000.sh \
- $(srcdir)/emultempl/elf32.em $(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}
- ${GENSCRIPTS} elf32iq10 "$(tdir_iq10)"
-eelf64alpha.c: $(srcdir)/emulparams/elf64alpha.sh \
- $(srcdir)/emultempl/elf32.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}
- ${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}
- ${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}
- ${GENSCRIPTS} elf64hppa "$(tdir_elf64hppa)"
-eelf64_aix.c: $(srcdir)/emulparams/elf64_aix.sh \
- $(srcdir)/emultempl/elf32.em $(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 \
- $(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 \
- $(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}
- ${GENSCRIPTS} elf64_s390 "$(tdir_elf64_s390)"
-eelf64_sparc.c: $(srcdir)/emulparams/elf64_sparc.sh \
- $(srcdir)/emultempl/elf32.em $(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}
- ${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}
- ${GENSCRIPTS} elf64bmip "$(tdir_elf64bmip)"
-eelf64mmix.c: $(srcdir)/emulparams/elf64mmix.sh \
- $(srcdir)/emultempl/elf32.em $(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)/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}
- ${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}
- ${GENSCRIPTS} elf64ltsmip "$(tdir_elf64ltsmip)"
-eelf_i386.c: $(srcdir)/emulparams/elf_i386.sh \
- $(srcdir)/emultempl/elf32.em $(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}
- ${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}
- ${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}
- ${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}
- ${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}
- ${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}
- ${GENSCRIPTS} elf_i386_ldso "$(tdir_elf_i386_ldso)"
-eelf_s390.c: $(srcdir)/emulparams/elf_s390.sh \
- $(srcdir)/emultempl/elf32.em $(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}
- ${GENSCRIPTS} gld960 "$(tdir_gld960)"
-egld960coff.c: $(srcdir)/emulparams/gld960coff.sh \
- $(srcdir)/emultempl/gld960c.em $(srcdir)/scripttempl/i960.sc ${GEN_DEPENDS}
- ${GENSCRIPTS} gld960coff "$(tdir_gld960coff)"
-eh8300.c: $(srcdir)/emulparams/h8300.sh \
- $(srcdir)/emultempl/generic.em $(srcdir)/scripttempl/h8300.sc ${GEN_DEPENDS}
- ${GENSCRIPTS} h8300 "$(tdir_h8300)"
-eh8300h.c: $(srcdir)/emulparams/h8300h.sh \
- $(srcdir)/emultempl/generic.em $(srcdir)/scripttempl/h8300h.sc ${GEN_DEPENDS}
- ${GENSCRIPTS} h8300h "$(tdir_h8300h)"
-eh8300s.c: $(srcdir)/emulparams/h8300s.sh \
- $(srcdir)/emultempl/generic.em $(srcdir)/scripttempl/h8300s.sc ${GEN_DEPENDS}
- ${GENSCRIPTS} h8300s "$(tdir_h8300s)"
-eh8300hn.c: $(srcdir)/emulparams/h8300hn.sh \
- $(srcdir)/emultempl/generic.em $(srcdir)/scripttempl/h8300hn.sc ${GEN_DEPENDS}
- ${GENSCRIPTS} h8300hn "$(tdir_h8300hn)"
-eh8300sn.c: $(srcdir)/emulparams/h8300sn.sh \
- $(srcdir)/emultempl/generic.em $(srcdir)/scripttempl/h8300sn.sc ${GEN_DEPENDS}
- ${GENSCRIPTS} h8300sn "$(tdir_h8300sn)"
-eh8300sx.c: $(srcdir)/emulparams/h8300sx.sh \
- $(srcdir)/emultempl/generic.em $(srcdir)/scripttempl/h8300sx.sc ${GEN_DEPENDS}
- ${GENSCRIPTS} h8300sx "$(tdir_h8300sx)"
-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}
- ${GENSCRIPTS} h8300elf "$(tdir_h8300elf)"
-eh8300helf.c: $(srcdir)/emulparams/h8300helf.sh \
- $(srcdir)/emulparams/h8300elf.sh \
- $(srcdir)/emultempl/elf32.em $(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}
- ${GENSCRIPTS} h8300self "$(tdir_h8300self)"
-eh8300hnelf.c: $(srcdir)/emulparams/h8300hnelf.sh \
- $(srcdir)/emulparams/h8300elf.sh \
- $(srcdir)/emultempl/elf32.em $(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}
- ${GENSCRIPTS} h8300snelf "$(tdir_h8300snelf)"
-eh8300sxelf.c: $(srcdir)/emulparams/h8300sxelf.sh \
- $(srcdir)/emulparams/h8300elf.sh \
- $(srcdir)/emultempl/elf32.em $(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}
- ${GENSCRIPTS} h8300sxnelf "$(tdir_h8300sxnelf)"
-eh8500.c: $(srcdir)/emulparams/h8500.sh \
- $(srcdir)/emultempl/generic.em $(srcdir)/scripttempl/h8500.sc ${GEN_DEPENDS}
- ${GENSCRIPTS} h8500 "$(tdir_h8500)"
-eh8500b.c: $(srcdir)/emulparams/h8500b.sh \
- $(srcdir)/emultempl/generic.em $(srcdir)/scripttempl/h8500b.sc ${GEN_DEPENDS}
- ${GENSCRIPTS} h8500b "$(tdir_h8500b)"
-eh8500c.c: $(srcdir)/emulparams/h8500c.sh \
- $(srcdir)/emultempl/generic.em $(srcdir)/scripttempl/h8500c.sc ${GEN_DEPENDS}
- ${GENSCRIPTS} h8500c "$(tdir_h8500c)"
-eh8500m.c: $(srcdir)/emulparams/h8500m.sh \
- $(srcdir)/emultempl/generic.em $(srcdir)/scripttempl/h8500m.sc ${GEN_DEPENDS}
- ${GENSCRIPTS} h8500m "$(tdir_h8500m)"
-eh8500s.c: $(srcdir)/emulparams/h8500s.sh \
- $(srcdir)/emultempl/generic.em $(srcdir)/scripttempl/h8500s.sc ${GEN_DEPENDS}
- ${GENSCRIPTS} h8500s "$(tdir_h8500s)"
-ehp300bsd.c: $(srcdir)/emulparams/hp300bsd.sh \
- $(srcdir)/emultempl/generic.em $(srcdir)/scripttempl/aout.sc ${GEN_DEPENDS}
- ${GENSCRIPTS} hp300bsd "$(tdir_hp300bsd)"
-ehp3hpux.c: $(srcdir)/emulparams/hp3hpux.sh \
- $(srcdir)/emultempl/generic.em $(srcdir)/scripttempl/aout.sc ${GEN_DEPENDS}
- ${GENSCRIPTS} hp3hpux "$(tdir_hp3hpux)"
-ehppaelf.c: $(srcdir)/emulparams/hppaelf.sh \
- $(srcdir)/emultempl/elf32.em $(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 \
- $(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 \
- $(srcdir)/scripttempl/elf.sc ${GEN_DEPENDS}
- ${GENSCRIPTS} hppanbsd "$(tdir_hppanbsd)"
-ehppaobsd.c: $(srcdir)/emulparams/hppaobsd.sh \
- $(srcdir)/emultempl/elf32.em $(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}
- ${GENSCRIPTS} hppa64linux "$(tdir_hppa64linux)"
-ei386aout.c: $(srcdir)/emulparams/i386aout.sh \
- $(srcdir)/emultempl/generic.em $(srcdir)/scripttempl/aout.sc ${GEN_DEPENDS}
- ${GENSCRIPTS} i386aout "$(tdir_i386aout)"
-ei386beos.c: $(srcdir)/emulparams/i386beos.sh \
- $(srcdir)/emultempl/beos.em $(srcdir)/scripttempl/i386beos.sc ${GEN_DEPENDS}
- ${GENSCRIPTS} i386beos "$(tdir_i386beos)"
-ei386bsd.c: $(srcdir)/emulparams/i386bsd.sh \
- $(srcdir)/emultempl/generic.em $(srcdir)/scripttempl/aout.sc ${GEN_DEPENDS}
- ${GENSCRIPTS} i386bsd "$(tdir_i386bsd)"
-ei386coff.c: $(srcdir)/emulparams/i386coff.sh \
- $(srcdir)/emultempl/generic.em $(srcdir)/scripttempl/i386coff.sc ${GEN_DEPENDS}
- ${GENSCRIPTS} i386coff "$(tdir_i386coff)"
-ei386go32.c: $(srcdir)/emulparams/i386go32.sh \
- $(srcdir)/emultempl/generic.em $(srcdir)/scripttempl/i386go32.sc ${GEN_DEPENDS}
- ${GENSCRIPTS} i386go32 "$(tdir_i386go32)"
-ei386linux.c: $(srcdir)/emulparams/i386linux.sh \
- $(srcdir)/emultempl/linux.em $(srcdir)/scripttempl/aout.sc ${GEN_DEPENDS}
- ${GENSCRIPTS} i386linux "$(tdir_i386linux)"
-ei386lynx.c: $(srcdir)/emulparams/i386lynx.sh \
- $(srcdir)/emultempl/generic.em $(srcdir)/scripttempl/i386lynx.sc ${GEN_DEPENDS}
- ${GENSCRIPTS} i386lynx "$(tdir_i386lynx)"
-ei386mach.c: $(srcdir)/emulparams/i386mach.sh \
- $(srcdir)/emultempl/generic.em $(srcdir)/scripttempl/aout.sc ${GEN_DEPENDS}
- ${GENSCRIPTS} i386mach "$(tdir_i386mach)"
-ei386moss.c: $(srcdir)/emulparams/i386moss.sh \
- $(srcdir)/emultempl/elf32.em $(srcdir)/scripttempl/elf.sc ${GEN_DEPENDS}
- ${GENSCRIPTS} i386moss "$(tdir_i386moss)"
-ei386msdos.c: $(srcdir)/emulparams/i386msdos.sh \
- $(srcdir)/emultempl/generic.em $(srcdir)/scripttempl/i386msdos.sc ${GEN_DEPENDS}
- ${GENSCRIPTS} i386msdos "$(tdir_i386msdos)"
-ei386nbsd.c: $(srcdir)/emulparams/i386nbsd.sh \
- $(srcdir)/emultempl/generic.em $(srcdir)/scripttempl/aout.sc ${GEN_DEPENDS}
- ${GENSCRIPTS} i386nbsd "$(tdir_i386nbsd)"
-ei386nto.c: $(srcdir)/emulparams/i386nto.sh \
- $(srcdir)/emultempl/elf32.em $(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}
- ${GENSCRIPTS} i386nw "$(tdir_i386nw)"
-ei386pe.c: $(srcdir)/emulparams/i386pe.sh \
- $(srcdir)/emultempl/pe.em $(srcdir)/scripttempl/pe.sc ${GEN_DEPENDS}
- ${GENSCRIPTS} i386pe "$(tdir_i386pe)"
-ei386pe_posix.c: $(srcdir)/emulparams/i386pe_posix.sh \
- $(srcdir)/emultempl/pe.em $(srcdir)/scripttempl/pe.sc ${GEN_DEPENDS}
- ${GENSCRIPTS} i386pe_posix "$(tdir_i386pe_posix)"
-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)/scripttempl/elfm68hc11.sc ${GEN_DEPENDS}
- ${GENSCRIPTS} m68hc11elf "$(tdir_m68hc11)"
-em68hc11elfb.c: $(srcdir)/emulparams/m68hc11elfb.sh \
- $(srcdir)/emultempl/m68hc1xelf.em $(srcdir)/emultempl/elf32.em \
- $(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)/scripttempl/elfm68hc12.sc ${GEN_DEPENDS}
- ${GENSCRIPTS} m68hc12elf "$(tdir_m68hc12)"
-em68hc12elfb.c: $(srcdir)/emulparams/m68hc12elfb.sh \
- $(srcdir)/emultempl/m68hc1xelf.em $(srcdir)/emultempl/elf32.em \
- $(srcdir)/scripttempl/elfm68hc12.sc ${GEN_DEPENDS}
- ${GENSCRIPTS} m68hc12elfb "$(tdir_m68hc12b)"
-em68k4knbsd.c: $(srcdir)/emulparams/m68k4knbsd.sh \
- $(srcdir)/emultempl/generic.em $(srcdir)/scripttempl/aout.sc ${GEN_DEPENDS}
- ${GENSCRIPTS} m68k4knbsd "$(tdir_m68k4knbsd)"
-em68kaout.c: $(srcdir)/emulparams/m68kaout.sh \
- $(srcdir)/emultempl/generic.em $(srcdir)/scripttempl/aout.sc ${GEN_DEPENDS}
- ${GENSCRIPTS} m68kaout "$(tdir_m68kaout)"
-em68kaux.c: $(srcdir)/emulparams/m68kaux.sh \
- $(srcdir)/emultempl/generic.em $(srcdir)/scripttempl/m68kaux.sc ${GEN_DEPENDS}
- ${GENSCRIPTS} m68kaux "$(tdir_m68kaux)"
-em68kcoff.c: $(srcdir)/emulparams/m68kcoff.sh \
- $(srcdir)/emultempl/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 \
- $(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 \
- $(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}
- ${GENSCRIPTS} m68kpsos "$(tdir_m68kpsos)"
-em88kbcs.c: $(srcdir)/emulparams/m88kbcs.sh \
- $(srcdir)/emultempl/generic.em $(srcdir)/scripttempl/m88kbcs.sc ${GEN_DEPENDS}
- ${GENSCRIPTS} m88kbcs "$(tdir_m88kbcs)"
-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}
- ${GENSCRIPTS} mipsidt "$(tdir_mipsidt)"
-emipsidtl.c: $(srcdir)/emulparams/mipsidtl.sh \
- $(srcdir)/emultempl/mipsecoff.em $(srcdir)/scripttempl/mips.sc ${GEN_DEPENDS}
- ${GENSCRIPTS} mipsidtl "$(tdir_mipsidtl)"
-emipslit.c: $(srcdir)/emulparams/mipslit.sh \
- $(srcdir)/emultempl/generic.em $(srcdir)/scripttempl/mips.sc ${GEN_DEPENDS}
- ${GENSCRIPTS} mipslit "$(tdir_mipslit)"
-emipslnews.c: $(srcdir)/emulparams/mipslnews.sh \
- $(srcdir)/emultempl/generic.em $(srcdir)/scripttempl/mips.sc ${GEN_DEPENDS}
- ${GENSCRIPTS} mipslnews
-emipspe.c: $(srcdir)/emulparams/mipspe.sh \
- $(srcdir)/emultempl/pe.em $(srcdir)/scripttempl/pe.sc ${GEN_DEPENDS}
- ${GENSCRIPTS} mipspe "$(tdir_mips)"
-emn10300.c: $(srcdir)/emulparams/mn10300.sh \
- $(srcdir)/emulparams/mn10200.sh \
- $(srcdir)/emultempl/elf32.em $(srcdir)/scripttempl/elf.sc ${GEN_DEPENDS}
- ${GENSCRIPTS} mn10300 "$(tdir_mn10300)"
-emn10200.c: $(srcdir)/emulparams/mn10200.sh \
- $(srcdir)/emultempl/elf32.em $(srcdir)/scripttempl/elf.sc ${GEN_DEPENDS}
- ${GENSCRIPTS} mn10200 "$(tdir_mn10200)"
-emsp430x110.c: $(srcdir)/emulparams/msp430all.sh \
- $(srcdir)/emultempl/generic.em $(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 \
- ${GEN_DEPENDS}
- ${GENSCRIPTS} msp430x112 "$(tdir_msp430x112)" msp430all
-emsp430x1101.c: $(srcdir)/emulparams/msp430all.sh \
- $(srcdir)/emultempl/generic.em $(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 \
- ${GEN_DEPENDS}
- ${GENSCRIPTS} msp430x1111 "$(tdir_msp430x1111)" msp430all
-emsp430x1121.c: $(srcdir)/emulparams/msp430all.sh \
- $(srcdir)/emultempl/generic.em $(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 \
- ${GEN_DEPENDS}
- ${GENSCRIPTS} msp430x1122 "$(tdir_msp430x1122)" msp430all
-emsp430x1132.c: $(srcdir)/emulparams/msp430all.sh \
- $(srcdir)/emultempl/generic.em $(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 \
- ${GEN_DEPENDS}
- ${GENSCRIPTS} msp430x122 "$(tdir_msp430x122)" msp430all
-emsp430x123.c: $(srcdir)/emulparams/msp430all.sh \
- $(srcdir)/emultempl/generic.em $(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 \
- ${GEN_DEPENDS}
- ${GENSCRIPTS} msp430x1222 "$(tdir_msp430x1222)" msp430all
-emsp430x1232.c: $(srcdir)/emulparams/msp430all.sh \
- $(srcdir)/emultempl/generic.em $(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 \
- ${GEN_DEPENDS}
- ${GENSCRIPTS} msp430x133 "$(tdir_msp430x133)" msp430all
-emsp430x135.c: $(srcdir)/emulparams/msp430all.sh \
- $(srcdir)/emultempl/generic.em $(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 \
- ${GEN_DEPENDS}
- ${GENSCRIPTS} msp430x1331 "$(tdir_msp430x1331)" msp430all
-emsp430x1351.c: $(srcdir)/emulparams/msp430all.sh \
- $(srcdir)/emultempl/generic.em $(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 \
- ${GEN_DEPENDS}
- ${GENSCRIPTS} msp430x147 "$(tdir_msp430x147)" msp430all
-emsp430x148.c: $(srcdir)/emulparams/msp430all.sh \
- $(srcdir)/emultempl/generic.em $(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 \
- ${GEN_DEPENDS}
- ${GENSCRIPTS} msp430x149 "$(tdir_msp430x149)" msp430all
-emsp430x155.c: $(srcdir)/emulparams/msp430all.sh \
- $(srcdir)/emultempl/generic.em $(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 \
- ${GEN_DEPENDS}
- ${GENSCRIPTS} msp430x156 "$(tdir_msp430x156)" msp430all
-emsp430x157.c: $(srcdir)/emulparams/msp430all.sh \
- $(srcdir)/emultempl/generic.em $(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 \
- ${GEN_DEPENDS}
- ${GENSCRIPTS} msp430x167 "$(tdir_msp430x167)" msp430all
-emsp430x168.c: $(srcdir)/emulparams/msp430all.sh \
- $(srcdir)/emultempl/generic.em $(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 \
- ${GEN_DEPENDS}
- ${GENSCRIPTS} msp430x169 "$(tdir_msp430x169)" msp430all
-emsp430x311.c: $(srcdir)/emulparams/msp430all.sh \
- $(srcdir)/emultempl/generic.em $(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 \
- ${GEN_DEPENDS}
- ${GENSCRIPTS} msp430x312 "$(tdir_msp430x312)" msp430all
-emsp430x313.c: $(srcdir)/emulparams/msp430all.sh \
- $(srcdir)/emultempl/generic.em $(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 \
- ${GEN_DEPENDS}
- ${GENSCRIPTS} msp430x314 "$(tdir_msp430x314)" msp430all
-emsp430x315.c: $(srcdir)/emulparams/msp430all.sh \
- $(srcdir)/emultempl/generic.em $(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 \
- ${GEN_DEPENDS}
- ${GENSCRIPTS} msp430x323 "$(tdir_msp430x323)" msp430all
-emsp430x325.c: $(srcdir)/emulparams/msp430all.sh \
- $(srcdir)/emultempl/generic.em $(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 \
- ${GEN_DEPENDS}
- ${GENSCRIPTS} msp430x336 "$(tdir_msp430x336)" msp430all
-emsp430x337.c: $(srcdir)/emulparams/msp430all.sh \
- $(srcdir)/emultempl/generic.em $(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 \
- ${GEN_DEPENDS}
- ${GENSCRIPTS} msp430x412 "$(tdir_msp430x412)" msp430all
-emsp430x413.c: $(srcdir)/emulparams/msp430all.sh \
- $(srcdir)/emultempl/generic.em $(srcdir)/scripttempl/elf32msp430.sc \
- ${GEN_DEPENDS}
- ${GENSCRIPTS} msp430x413 "$(tdir_msp430x413)" msp430all
-emsp430xE423.c: $(srcdir)/emulparams/msp430all.sh \
- $(srcdir)/emultempl/generic.em $(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 \
- ${GEN_DEPENDS}
- ${GENSCRIPTS} msp430xE425 "$(tdir_msp430xE425)" msp430all
-emsp430xE427.c: $(srcdir)/emulparams/msp430all.sh \
- $(srcdir)/emultempl/generic.em $(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 \
- ${GEN_DEPENDS}
- ${GENSCRIPTS} msp430xW423 "$(tdir_msp430xW423)" msp430all
-emsp430xW425.c: $(srcdir)/emulparams/msp430all.sh \
- $(srcdir)/emultempl/generic.em $(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 \
- ${GEN_DEPENDS}
- ${GENSCRIPTS} msp430xW427 "$(tdir_msp430xW427)" msp430all
-emsp430x435.c: $(srcdir)/emulparams/msp430all.sh \
- $(srcdir)/emultempl/generic.em $(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 \
- ${GEN_DEPENDS}
- ${GENSCRIPTS} msp430x436 "$(tdir_msp430x436)" msp430all
-emsp430x437.c: $(srcdir)/emulparams/msp430all.sh \
- $(srcdir)/emultempl/generic.em $(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 \
- ${GEN_DEPENDS}
- ${GENSCRIPTS} msp430x447 "$(tdir_msp430x447)" msp430all
-emsp430x448.c: $(srcdir)/emulparams/msp430all.sh \
- $(srcdir)/emultempl/generic.em $(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 \
- ${GEN_DEPENDS}
- ${GENSCRIPTS} msp430x449 "$(tdir_msp430x449)" msp430all
-enews.c: $(srcdir)/emulparams/news.sh \
- $(srcdir)/emultempl/generic.em $(srcdir)/scripttempl/aout.sc ${GEN_DEPENDS}
- ${GENSCRIPTS} news "$(tdir_news)"
-ens32knbsd.c: $(srcdir)/emulparams/ns32knbsd.sh \
- $(srcdir)/emultempl/generic.em $(srcdir)/emultempl/netbsd.em \
- $(srcdir)/scripttempl/aout.sc ${GEN_DEPENDS}
- ${GENSCRIPTS} ns32knbsd "$(tdir_ns32knbsd)"
-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}
- ${GENSCRIPTS} or32elf "$(tdir_or32elf)"
-epc532macha.c: $(srcdir)/emulparams/pc532macha.sh \
- $(srcdir)/emultempl/generic.em $(srcdir)/scripttempl/aout.sc ${GEN_DEPENDS}
- ${GENSCRIPTS} pc532macha "$(tdir_pc532macha)"
-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}
- ${GENSCRIPTS} pjelf "$(tdir_pjelf)"
-epjlelf.c: $(srcdir)/emulparams/pjlelf.sh \
- $(srcdir)/emultempl/elf32.em $(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}
- ${GENSCRIPTS} ppcnw "$(tdir_ppcnw)"
-eppcpe.c: $(srcdir)/emulparams/ppcpe.sh \
- $(srcdir)/emultempl/pe.em $(srcdir)/scripttempl/ppcpe.sc ${GEN_DEPENDS}
- ${GENSCRIPTS} ppcpe "$(tdir_ppcpe)"
-eriscix.c: $(srcdir)/emulparams/riscix.sh \
- $(srcdir)/emultempl/generic.em $(srcdir)/scripttempl/aout.sc ${GEN_DEPENDS}
- ${GENSCRIPTS} riscix "$(tdir_riscix)"
-esa29200.c: $(srcdir)/emulparams/sa29200.sh \
- $(srcdir)/emultempl/generic.em $(srcdir)/scripttempl/sa29200.sc ${GEN_DEPENDS}
- ${GENSCRIPTS} sa29200 "$(tdir_sa29200)"
-esh.c: $(srcdir)/emulparams/sh.sh \
- $(srcdir)/emultempl/generic.em $(srcdir)/scripttempl/sh.sc ${GEN_DEPENDS}
- ${GENSCRIPTS} sh "$(tdir_sh)"
-eshelf.c: $(srcdir)/emulparams/shelf.sh \
- $(srcdir)/emultempl/elf32.em $(srcdir)/scripttempl/elf.sc ${GEN_DEPENDS}
- ${GENSCRIPTS} shelf "$(tdir_shelf)"
-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}
- ${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}
- ${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}
- ${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}
- ${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}
- ${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}
- ${GENSCRIPTS} shelf_linux "$(tdir_shelf_linux)"
-eshlelf_linux.c: $(srcdir)/emulparams/shlelf_linux.sh \
- $(srcdir)/emultempl/elf32.em $(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}
- ${GENSCRIPTS} shelf_nbsd "$(tdir_shelf_nbsd)"
-eshelf_nto.c: $(srcdir)/emulparams/shelf_nto.sh \
- $(srcdir)/emultempl/elf32.em $(srcdir)/scripttempl/elf.sc ${GEN_DEPENDS}
- ${GENSCRIPTS} shelf_nto "$(tdir_shelf_nto)"
-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}
- ${GENSCRIPTS} shlelf_nbsd "$(tdir_shlelf_nbsd)"
-eshlelf_nto.c: $(srcdir)/emulparams/shlelf_nto.sh \
- $(srcdir)/emultempl/elf32.em $(srcdir)/scripttempl/elf.sc ${GEN_DEPENDS}
- ${GENSCRIPTS} shlelf_nto "$(tdir_shlelf_nto)"
-eshlelf.c: $(srcdir)/emulparams/shlelf.sh \
- $(srcdir)/emulparams/shelf.sh \
- $(srcdir)/emultempl/elf32.em $(srcdir)/scripttempl/elf.sc ${GEN_DEPENDS}
- ${GENSCRIPTS} shlelf "$(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}
- ${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}
- ${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}
- ${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}
- ${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}
- ${GENSCRIPTS} shlelf64_nbsd "$(tdir_shlelf64_nbsd)"
-eshl.c: $(srcdir)/emulparams/shl.sh \
- $(srcdir)/emulparams/sh.sh \
- $(srcdir)/emultempl/generic.em $(srcdir)/scripttempl/sh.sc ${GEN_DEPENDS}
- ${GENSCRIPTS} shl "$(tdir_shl)"
-eshpe.c: $(srcdir)/emulparams/shpe.sh \
- $(srcdir)/emultempl/pe.em $(srcdir)/scripttempl/pe.sc ${GEN_DEPENDS}
- ${GENSCRIPTS} shpe "$(tdir_shl)"
-esparcaout.c: $(srcdir)/emulparams/sparcaout.sh \
- $(srcdir)/emultempl/generic.em $(srcdir)/scripttempl/aout.sc ${GEN_DEPENDS}
- ${GENSCRIPTS} sparcaout "$(tdir_sparcaout)"
-esparclinux.c: $(srcdir)/emulparams/sparclinux.sh \
- $(srcdir)/emultempl/linux.em $(srcdir)/scripttempl/aout.sc ${GEN_DEPENDS}
- ${GENSCRIPTS} sparclinux "$(tdir_sparclinux)"
-esparclynx.c: $(srcdir)/emulparams/sparclynx.sh \
- $(srcdir)/emultempl/generic.em $(srcdir)/scripttempl/sparclynx.sc ${GEN_DEPENDS}
- ${GENSCRIPTS} sparclynx "$(tdir_sparclynx)"
-esparcnbsd.c: $(srcdir)/emulparams/sparcnbsd.sh \
- $(srcdir)/emultempl/generic.em $(srcdir)/scripttempl/aout.sc ${GEN_DEPENDS}
- ${GENSCRIPTS} sparcnbsd "$(tdir_sparcnbsd)"
-est2000.c: $(srcdir)/emulparams/st2000.sh \
- $(srcdir)/emultempl/generic.em $(srcdir)/scripttempl/st2000.sc ${GEN_DEPENDS}
- ${GENSCRIPTS} st2000 "$(tdir_st2000)"
-esun3.c: $(srcdir)/emulparams/sun3.sh \
- $(srcdir)/emultempl/sunos.em $(srcdir)/scripttempl/aout.sc ${GEN_DEPENDS}
- ${GENSCRIPTS} sun3 "$(tdir_sun3)"
-esun4.c: $(srcdir)/emulparams/sun4.sh \
- $(srcdir)/emultempl/sunos.em $(srcdir)/scripttempl/aout.sc ${GEN_DEPENDS}
- ${GENSCRIPTS} sun4 "$(tdir_sun4)"
-etic30aout.c: $(srcdir)/emulparams/tic30aout.sh \
- $(srcdir)/emultempl/generic.em $(srcdir)/scripttempl/tic30aout.sc ${GEN_DEPENDS}
- ${GENSCRIPTS} tic30aout "$(tdir_tic30aout)"
-etic30coff.c: $(srcdir)/emulparams/tic30coff.sh \
- $(srcdir)/emultempl/generic.em $(srcdir)/scripttempl/tic30coff.sc ${GEN_DEPENDS}
- ${GENSCRIPTS} tic30coff "$(tdir_tic30coff)"
-etic3xcoff.c: $(srcdir)/emulparams/tic3xcoff.sh \
- $(srcdir)/emultempl/ticoff.em $(srcdir)/scripttempl/tic4xcoff.sc ${GEN_DEPENDS}
- ${GENSCRIPTS} tic3xcoff "$(tdir_tic4xcoff)"
-etic3xcoff_onchip.c: $(srcdir)/emulparams/tic3xcoff_onchip.sh \
- $(srcdir)/emultempl/ticoff.em $(srcdir)/scripttempl/tic4xcoff.sc ${GEN_DEPENDS}
- ${GENSCRIPTS} tic3xcoff_onchip "$(tdir_tic4xcoff)"
-etic4xcoff.c: $(srcdir)/emulparams/tic4xcoff.sh \
- $(srcdir)/emultempl/ticoff.em $(srcdir)/scripttempl/tic4xcoff.sc ${GEN_DEPENDS}
- ${GENSCRIPTS} tic4xcoff "$(tdir_tic4xcoff)"
-etic54xcoff.c: $(srcdir)/emulparams/tic54xcoff.sh \
- $(srcdir)/emultempl/ticoff.em $(srcdir)/scripttempl/tic54xcoff.sc ${GEN_DEPENDS}
- ${GENSCRIPTS} tic54xcoff "$(tdir_tic54xcoff)"
-etic80coff.c: $(srcdir)/emulparams/tic80coff.sh \
- $(srcdir)/emultempl/generic.em $(srcdir)/scripttempl/tic80coff.sc ${GEN_DEPENDS}
- ${GENSCRIPTS} tic80coff "$(tdir_tic80coff)"
-evanilla.c: $(srcdir)/emulparams/vanilla.sh \
- $(srcdir)/emultempl/vanilla.em $(srcdir)/scripttempl/vanilla.sc ${GEN_DEPENDS}
- ${GENSCRIPTS} vanilla "$(tdir_vanilla)"
-evax.c: $(srcdir)/emulparams/vax.sh \
- $(srcdir)/emultempl/generic.em $(srcdir)/scripttempl/aout.sc ${GEN_DEPENDS}
- ${GENSCRIPTS} vax "$(tdir_vax)"
-evaxnbsd.c: $(srcdir)/emulparams/vaxnbsd.sh \
- $(srcdir)/emultempl/generic.em $(srcdir)/scripttempl/aout.sc ${GEN_DEPENDS}
- ${GENSCRIPTS} vaxnbsd "$(tdir_vaxnbsd)"
-evsta.c: $(srcdir)/emulparams/vsta.sh \
- $(srcdir)/emultempl/generic.em $(srcdir)/scripttempl/aout.sc ${GEN_DEPENDS}
- ${GENSCRIPTS} vsta "$(tdir_vsta)"
-ev850.c: $(srcdir)/emulparams/v850.sh \
- $(srcdir)/emultempl/elf32.em $(srcdir)/scripttempl/v850.sc ${GEN_DEPENDS}
- ${GENSCRIPTS} v850 "$(tdir_v850)"
-ew65.c: $(srcdir)/emulparams/w65.sh \
- $(srcdir)/emultempl/generic.em $(srcdir)/scripttempl/w65.sc ${GEN_DEPENDS}
- ${GENSCRIPTS} w65 "$(tdir_w65)"
-ez8001.c: $(srcdir)/emulparams/z8001.sh \
- $(srcdir)/emultempl/generic.em $(srcdir)/scripttempl/z8000.sc ${GEN_DEPENDS}
- ${GENSCRIPTS} z8001 "$(tdir_z8001)"
-ez8002.c: $(srcdir)/emulparams/z8002.sh \
- $(srcdir)/emultempl/generic.em $(srcdir)/scripttempl/z8000.sc ${GEN_DEPENDS}
- ${GENSCRIPTS} z8002 "$(tdir_z8002)"
-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 \
- ld.h ldmain.h ldemul.h ldfile.h ldmisc.h ldexp.h ldlang.h \
- ldctor.h ldexp.h ldlang.h ldgram.h
-
-check-DEJAGNU: site.exp
- srcroot=`cd $(srcdir) && pwd`; export srcroot; \
- 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 \
- CC="$(CC_FOR_TARGET)" CFLAGS="$(CFLAGS)" \
- CXX="$(CXX_FOR_TARGET)" CXXFLAGS="$(CXXFLAGS)" \
- CC_FOR_HOST="$(CC)" CFLAGS_FOR_HOST="$(CFLAGS)" \
- OFILES="$(OFILES)" BFDLIB="$(TESTBFDLIB)" \
- LIBIBERTY="$(LIBIBERTY) $(INTLLIBS)" LIBS="$(LIBS)" \
- $(RUNTESTFLAGS); \
- else echo "WARNING: could not find \`runtest'" 1>&2; :;\
- fi
-
-# Rules for testing by relinking ld itself.
-# A similar test is in the testsuite. This target is for ease of use
-# when porting ld.
-
-ld-partial.o: ld-new$(EXEEXT)
- ./ld-new$(EXEEXT) $(HOSTING_EMU) -o ld-partial.o -r $(OFILES)
-ld1$(EXEEXT): ld-partial.o
- ./ld-new$(EXEEXT) $(HOSTING_EMU) -o ld1$(EXEEXT) $(HOSTING_CRT0) ld-partial.o $(TESTBFDLIB) $(LIBIBERTY) $(HOSTING_LIBS) $(LIBS)
-
-ld1-full$(EXEEXT): ld-new
- ./ld-new$(EXEEXT) $(HOSTING_EMU) -o ld1-full$(EXEEXT) $(HOSTING_CRT0) $(OFILES) $(TESTBFDLIB) $(LIBIBERTY) $(HOSTING_LIBS) $(LIBS)
-
-ld2$(EXEEXT): ld1$(EXEEXT)
- ./ld1$(EXEEXT) $(HOSTING_EMU) -o ld2$(EXEEXT) $(HOSTING_CRT0) $(OFILES) $(TESTBFDLIB) $(LIBIBERTY) $(HOSTING_LIBS) $(LIBS)
-
-ld3$(EXEEXT): ld2$(EXEEXT)
- ./ld2$(EXEEXT) $(HOSTING_EMU) -o ld3$(EXEEXT) $(HOSTING_CRT0) $(OFILES) $(TESTBFDLIB) $(LIBIBERTY) $(HOSTING_LIBS) $(LIBS)
-
-bootstrap: ld3$(EXEEXT)
- cmp ld2$(EXEEXT) ld3$(EXEEXT)
-
-.PHONY: bootstrap
-
-# A test program for C++ constructors and destructors.
-# This test is now in the testsuite.
-#
-#cdtest: cdtest-main.o cdtest-bar.o cdtest-foo.o ld.new
-# ./ld.new $(HOSTING_EMU) -o cdtest $(HOSTING_CRT0) \
-# cdtest-main.o cdtest-bar.o cdtest-foo.o $(HOSTING_LIBS)
-#
-#cdtest.out: cdtest
-# ./cdtest > cdtest.tmp
-# mv cdtest.tmp cdtest.out
-#
-#cdtest-ur.o: cdtest-main.o cdtest-bar.o cdtest-foo.o ld.new
-# ./ld.new $(HOSTING_EMU) -o cdtest-ur.o -Ur cdtest-main.o \
-# cdtest-bar.o cdtest-foo.o
-#
-#cdtest-ur: cdtest-ur.o
-# ./ld.new $(HOSTING_EMU) -o cdtest-ur $(HOSTING_CRT0) cdtest-ur.o \
-# $(HOSTING_LIBS)
-#
-#cdtest-ur.out: cdtest-ur
-# ./cdtest-ur > cdtest-ur.tmp
-# mv cdtest-ur.tmp cdtest-ur.out
-#
-#check-cdtest: cdtest.out cdtest-ur.out $(srcdir)/cdtest.exp
-# diff $(srcdir)/cdtest.exp cdtest.out
-# diff $(srcdir)/cdtest.exp cdtest-ur.out
-#
-#.PHONY: check-cdtest
-
-# END OF CHECK TARGETS
-
-# DOCUMENTATION TARGETS
-# Manual configuration file; not usually attached to normal configuration,
-# because almost all configs use "gen" version of manual.
-# Set DOCVER above to change.
-configdoc.texi: ${DOCVER}-doc.texi
- ln -s ${srcdir}/${DOCVER}-doc.texi ./configdoc.texi >/dev/null 2>&1 \
- || ln ${srcdir}/${DOCVER}-doc.texi ./configdoc.texi >/dev/null 2>&1 \
- || cp ${srcdir}/${DOCVER}-doc.texi ./configdoc.texi
-
-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
-
-# 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
- touch $@
- -$(TEXI2POD) $(MANCONF) < $(srcdir)/ld.texinfo > ld.pod
- -($(POD2MAN) ld.pod | \
- sed -e '/^.if n .na/d' > $@.T$$$$ && \
- mv -f $@.T$$$$ $@) || \
- (rm -f $@.T$$$$ && exit 1)
- rm -f ld.pod
-mostlyclean-local:
- -rm -rf tmpdir
-
-.PHONY: install-exec-local install-data-local
-
-install-exec-local: ld-new$(EXEEXT)
- $(mkinstalldirs) $(DESTDIR)$(bindir) $(DESTDIR)$(tooldir)/bin
- @list='$(noinst_PROGRAMS)'; for p in $$list; do \
- if test -f $$p; then \
- echo " $(LIBTOOL) --mode=install $(INSTALL_PROGRAM) $$p $(bindir)/`echo $$p|sed -e 's/$(EXEEXT)$$//' -e 's/-new//'|sed '$(transform)'|sed 's/$$/$(EXEEXT)/'`"; \
- $(LIBTOOL) --mode=install $(INSTALL_PROGRAM) $$p $(DESTDIR)$(bindir)/`echo $$p|sed -e 's/$(EXEEXT)$$//' -e 's/-new//'|sed '$(transform)'|sed 's/$$/$(EXEEXT)/'`; \
- else :; fi; \
- done
- n=`echo ld | sed '$(transform)'`; \
- if [ "$(bindir)/$$n$(EXEEXT)" != "$(tooldir)/bin/ld$(EXEEXT)" ]; then \
- rm -f $(DESTDIR)$(tooldir)/bin/ld$(EXEEXT); \
- ln $(DESTDIR)$(bindir)/$$n$(EXEEXT) $(DESTDIR)$(tooldir)/bin/ld$(EXEEXT) >/dev/null 2>/dev/null \
- || $(LIBTOOL) --mode=install $(INSTALL_PROGRAM) ld-new$(EXEEXT) $(DESTDIR)$(tooldir)/bin/ld$(EXEEXT); \
- fi
-
-install-data-local:
- $(mkinstalldirs) $(DESTDIR)$(scriptdir)/ldscripts
- for f in ldscripts/*; do \
- $(INSTALL_DATA) $$f $(DESTDIR)$(scriptdir)/$$f ; \
- done
-
-# We want install to imply install-info as per GNU standards, despite the
-# cygnus option.
-install: install-info
-diststuff: info $(EXTRA_DIST)
-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
- rm -f DEP1
- $(MAKE) MKDEP="$(MKDEP)" DEP1
- sed -f dep.sed < DEP1 > DEPA
- echo '# IF YOU PUT ANYTHING HERE IT WILL GO AWAY' >> DEPA
- if grep ' /' DEPA > /dev/null 2> /dev/null; then \
- echo 'make DEP failed!'; exit 1; \
- else \
- mv -f DEPA $@; \
- fi
-
-DEP1: $(CFILES) $(GENERATED_CFILES)
- echo '# DO NOT DELETE THIS LINE -- mkdep uses it.' > DEP2
- echo '# DO NOT PUT ANYTHING AFTER THIS LINE, IT WILL GO AWAY.' >> DEP2
- $(MKDEP) $(INCLUDES) $(CFLAGS) $? >> DEP2
- mv -f DEP2 $@
-
-dep.sed: dep-in.sed config.status
- sed <$(srcdir)/dep-in.sed >dep.sed \
- -e 's!@INCDIR@!$(INCDIR)!' \
- -e 's!@BFDDIR@!$(BFDDIR)!' \
- -e 's!@SRCDIR@!$(srcdir)!' \
- -e 's!@TOPDIR@!'`echo $(srcdir) | sed -e s,/ld$$,,`'!'
-
-dep: DEP
- sed -e '/^..DO NOT DELETE THIS LINE/,$$d' < Makefile > tmp-Makefile
- cat DEP >> tmp-Makefile
- $(srcdir)/../move-if-change tmp-Makefile Makefile
-
-dep-in: DEP
- sed -e '/^..DO NOT DELETE THIS LINE/,$$d' < $(srcdir)/Makefile.in > tmp-Makefile.in
- cat DEP >> tmp-Makefile.in
- $(srcdir)/../move-if-change tmp-Makefile.in $(srcdir)/Makefile.in
-
-dep-am: DEP
- sed -e '/^..DO NOT DELETE THIS LINE/,$$d' < $(srcdir)/Makefile.am > tmp-Makefile.am
- cat DEP >> tmp-Makefile.am
- $(srcdir)/../move-if-change tmp-Makefile.am $(srcdir)/Makefile.am
-
-.PHONY: dep dep-in dep-am
-
-@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 \
- 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 \
- $(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 \
- 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 \
- 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.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 \
- 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
-# 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
deleted file mode 100644
index 81512c4..0000000
--- a/contrib/binutils/ld/NEWS
+++ /dev/null
@@ -1,296 +0,0 @@
--*- text -*-
-
-* The linker script operator DEFINED() will now yield 1 only for a symbol that
- is defined before the statement where DEFINED is used.
-
-* The MIPS --embedded-relocs (used to embed relocations into binaries for
- Embedded-PIC code) is deprecated and will be removed in a future release.
-
-* m32r Linux (ELF) support added by Renesas.
-
-* Improved linker's handling of unresolved symbols. The switch
- --unresolved-symbols=<method> has been added to tell the linker when it
- should report them and the switch --warn-unresolved-symbols has been added to
- make reports be issued as warning messages rather than errors.
-
-Changes in 2.14:
-
-* Added support for Xtensa architecture.
-
-* Added --with-sysroot configure switch to specify a target system root, for
- linking against a target filesystem image.
-
-* Added --accept-unknown-linker-format to restore old linker behaviour (pre
- 2.14) of silently accepting and linking in any files in an unknown binary
- file format.
-
-* Added --no-omagic to undo the effects of the -N option.
-
-* Support for Texas Instruments TMS320C4x and TMS320C3x series of
- DSP's contributed by Michael Hayes and Svein E. Seldal.
-
-* Added --with-lib-path configure switch to specify default value for
- LIB_PATH.
-
-* ARM port to QNX operating system added by Graeme Peterson.
-
-* IP2K support added by Denis Chertykov.
-
-Changes in 2.13:
-
-* Support for the Fujitsu FRV architecture added by Red Hat. Models for FR400
- and FR500 included.
-
-Changes in version 2.13:
-
-* DEC VAX ELF support, by Matt Thomas.
-
-Changes in version 2.12:
-
-* Support for Don Knuth's MMIX, by Hans-Peter Nilsson.
-
-* Support for the OpenRISC 32-bit embedded processor by OpenCores.
-
-* Support for -z nocopyreloc in the x86 ELF linker, which disables
- production of copy relocs. Warning: using this option may result in
- non-sharable applications.
-
-* Support for -z combreloc in the ELF linker, which puts dynamic
- relocations against the same symbol together, so that dynamic linker
- can use an one-entry symbol lookup cache.
-
-* Support for ELF SHF_MERGE section merging, by Jakub Jelinek.
-
-Changes in version 2.11:
-
-* Support for AMD x86-64 architecture, by Jan Hubicka, SuSE Labs.
-
-* Support added for eliminating duplicate DWARF2 debug information by
- having the compiler generate the information in sections called
- .gnu.linkonce.wi.XXXX where XXXX is a checksum for the contents. The
- linker then merges these sections together into the normal .debug_info
- section.
-
-* The native ELF linker now searches the directories in DT_RUNPATH or
- DT_RPATH of a shared library for shared libraries needed by it.
-
-* TI C54x support, by Timothy Wall.
-
-* Added command line switch --section-start to set the start address of any
- specified section.
-
-* Added ability to emit full relocation information in linked executables,
- enabled by --emit-relocs. Some post-linkage optimization tools need
- this information in order to be able to correctly identify and perform
- symbol relative addressing in the event of changes in section contents
- (instructions being added or deleted, extending data sections, etc.)
-
-* Support for i860, by Jason Eckhardt (preliminary, alpha quality).
-
-* Support for CRIS (Axis Communications ETRAX series).
-
-* Support for PDP-11 and 2.11BSD a.out format, by Lars Brinkhoff.
-
-Changes in version 2.10:
-
-* Added AT> to the linker script language to allow load-time allocation of
- sections into regions.
-
-* Added garbage collection of unused sections, enabled by --gc-sections.
- It does require a bit of backend support; currently implemented are
- arm-elf, avr-elf, d10v-elf, fr30-elf, i386-elf, m32r-elf, m68k-elf,
- mcore-elf, mips-elf, mn10300-elf, ppc-elf, sh-elf, sparc-elf, and v850-elf.
- Others will ignore the option.
-
-* Added SORT to the linker script language to permit sorting sections by file
- name or section name.
-
-* Added EXTERN to the linker script language as an equivalent to the -u
- command-line option.
-
-* Added ASSERT to the linker script language.
-
-* Added EXCLUDE_FILE to the linker script language for further control over
- wildcard file names.
-
-* Added -O option to optimize linker output (as of this writing, this only
- affects ELF shared library generation).
-
-* The -e option now accepts a number as well as a symbol name.
-
-* Added --no-undefined option to disallow undefined symbols when creating a
- shared library.
-
-* The linker now issues a warning, not an error, for an undefined symbol when
- using -Bsymbolic; use the new --no-undefined option to get the old
- behaviour.
-
-* Added --demangle and --no-demangle options.
-
-Changes in version 2.9:
-
-* Added SQUAD to the linker script language.
-
-* New option --no-warn-mismatch.
-
-* The MEMORY command now parses the attributes to determine where sections that
- are not placed in a specific memory region are placed.
-
-Changes in version 2.8:
-
-* Linker scripts may now contain shell wildcard characters for file and section
- names.
-
-* The linker now supports symbol versions in ELF.
-
-* The NOCROSSREFS command was added to the linker script language.
-
-* The LOADADDR expression was added to the linker script language.
-
-* MAX and MIN functions were added to the linker script language.
-
-* The OVERLAY construct was added to the linker script language.
-
-* New option --warn-section-align to warn when the address of an output section
- changes due to alignment of an input section.
-
-* New options --filter/-F and --auxiliary/-f.
-
-Changes in version 2.7:
-
-* New option --cref to print out a cross reference table.
-
-* New option --wrap SYMBOL.
-
-* New option --no-whole-archive, to turn off the effect of --whole-archive.
-
-* Input sections assigned to the output section /DISCARD/ in the linker script
- are not included in the output file.
-
-* The SunOS and ELF linkers now merge stabs debugging information which uses
- the N_BINCL and N_EINCL stab types. This reduces the amount of debugging
- information generated.
-
-Changes in version 2.6:
-
-* When an ELF section name is representable as a C identifier (this is not true
-of most ELF section names), the linker will automatically define symbols
-__start_SECNAME and __stop_SECNAME, where SECNAME is the section name, at the
-beginning and the end of the section. This is used by glibc.
-
-* When an ELF section named .gnu.warning is encountered in an input file, the
-contents of the section are displayed as an error message, and the section is
-not copied into the output file. This is used by glibc.
-
-* When an ELF section named .gnu.warning.SYMBOL is encountered in an input
-file, and the symbol SYMBOL is referenced by some object file, the contents of
-the section are displayed as an error message. The section is not copied into
-the output file, unless doing a relocatable or shared link. This is used by
-glibc.
-
-* New options -split-by-reloc and -split-by-file.
-
-* The linker now supports linking PIC compiled code on SPARC SunOS. It can
-also create SPARC SunOS shared libraries, and, like the native SunOS linker,
-will do so whenever there is an undefined symbol in the link and neither the -e
-nor the -r option was used.
-
-* The -rpath option may be used on SunOS to set the list of directories to be
-searched at run time. This overrides the default of building the list from the
--L options.
-
-* The COFF linker now combines debugging information for structs, unions, and
-enums, so that even if the same type is defined in multiple input files it will
-only be defined once in the output file. The --traditional-format switch will
-prevent this optimization.
-
-Changes in version 2.5:
-
-* The linker now supports linking against SunOS shared libraries. It still can
-not link SunOS PIC (Position Independent Code) files, so it can not be used to
-generate shared libraries.
-
-* The linker now supports linking against ELF shared libraries for the i386
-(UnixWare) and SPARC (Solaris). It can also link ELF PIC files, and can be
-used to generate shared libraries. Shared library generation is not well
-tested; please report any problems encountered. The linker is now enabled for
-Solaris again.
-
-* Eric Youngdale has contributed Linux support code, including linking against
-Linux a.out shared libraries. The linker produces Linux QMAGIC binaries.
-
-* The ELF backend has been converted to the new linker code. To use the new
-ELF linker, each particular target requires a relocation function. So far,
-this function has been written for i386 (UnixWare), SPARC (Solaris) MIPS (Irix
-5), and HPPA ELF targets.
-
-* The -( (--start-group) and -) (--end-group) options have been added to
-support searching a group of archives as though they were a single archive.
-This can also be used in a linker script, as GROUP ( files ).
-
-* When a file is named on the command line, and the linker does not recognize
-it as an object file, the linker will now treat the file as a linker script
-file. A linker script named in this way augments, but does not replace, the
-default linker script.
-
-* The -warn-once option was added. It causes the linker to only warn once per
-undefined symbol, rather than once per reference.
-
-* The COFF backend has been converted to the new linker code. As with ELF, to
-use the new linker, each particular target requires a relocation function. So
-far, this function has been written for the i386, m68k, a29k and SH targets.
-
-* The -V flag was made a synonym for -v, for SVR4 compatibility. The old -V
-behaviour is available via --verbose.
-
-Changes in version 2.4:
-
-* New linker code, by Steve Chamberlain and Ian Taylor. For a.out and ecoff
- formats (so far), this should result in considerable savings in time
- and memory used while linking; slightly poorer performance than
- before for formats not converted yet.
-
-* Command-line parsing is no longer done with flex. This means
- oddball characters in filenames won't get treated as argument
- separators.
-
-* HP-PA ELF support, by Jeff Law. (No SOM support yet.)
-
-* Mach i386 support, by David Mackenzie.
-
-* Irix 4 shared libraries are now supported (Irix 5 uses ELF, and ELF shared
- libraries are not yet supported).
-
-* COFF shared libraries (as on SCO) should work as well.
-
-* The linker is disabled for Solaris. (Actually, it was in 2.3 also, I just
- forgot to note it.) Some of their C library routines don't work when
- statically linked, and the GNU linker doesn't support dynamic linking yet.
-
-Changes in version 2.3:
-
-* Weak symbols are now supported.
-
-* ELF support has been added. The linker has been bootstrapped on
- UnixWare and Solaris.
-
-* Alpha OSF/1 support has been added (non dynamic linking only).
-
-Changes in version 2.2:
-
-* The `bfd' library has been updated to reduce a.out-format string
- table size. The effect of this is that files linked from many input
- files with duplicate symbols (`-g' debugging records, or identical
- static symbols) should be much smaller.
-
-Changes in version 2.1:
-
-* The ld -ySYMBOL flag (to trace references to SYMBOL) is now implemented.
-
-* There is now support for writing ECOFF files, so ld and the
- other utilities should work on Risc/Ultrix and Irix.
-
-
-Local variables:
-fill-column: 79
-End:
diff --git a/contrib/binutils/ld/README b/contrib/binutils/ld/README
deleted file mode 100644
index a953e42..0000000
--- a/contrib/binutils/ld/README
+++ /dev/null
@@ -1,67 +0,0 @@
- README for LD
-
-This is the GNU linker. It is distributed with other "binary
-utilities" which should be in ../binutils. See ../binutils/README for
-more general notes, including where to send bug reports.
-
-There are many features of the linker:
-
-* The linker uses a Binary File Descriptor library (../bfd)
- that it uses to read and write object files. This helps
- insulate the linker itself from the format of object files.
-
-* The linker supports a number of different object file
- formats. It can even handle multiple formats at once:
- Read two input formats and write a third.
-
-* The linker can be configured for cross-linking.
-
-* The linker supports a control language.
-
-* There is a user manual (ld.texinfo), as well as the
- beginnings of an internals manual (ldint.texinfo).
-
-Installation
-============
-
-See ../binutils/README.
-
-If you want to make a cross-linker, you may want to specify
-a different search path of -lfoo libraries than the default.
-You can do this by setting the LIB_PATH variable in ./Makefile
-or using the --with-lib-path configure switch.
-
-To build just the linker, make the target all-ld from the top level
-directory (one directory above this one).
-
-Porting to a new target
-=======================
-
-See the ldint.texinfo manual.
-
-Reporting bugs etc
-===========================
-
-See ../binutils/README.
-
-Known problems
-==============
-
-The Solaris linker normally exports all dynamic symbols from an
-executable. The GNU linker does not do this by default. This is
-because the GNU linker tries to present the same interface for all
-similar targets (in this case, all native ELF targets). This does not
-matter for normal programs, but it can make a difference for programs
-which try to dlopen an executable, such as PERL or Tcl. You can make
-the GNU linker export all dynamic symbols with the -E or
---export-dynamic command line option.
-
-HP/UX 9.01 has a shell bug that causes the linker scripts to be
-generated incorrectly. The symptom of this appears to be "fatal error
-- scanner input buffer overflow" error messages. There are various
-workarounds to this:
- * Build and install bash, and build with "make SHELL=bash".
- * Update to a version of HP/UX with a working shell (e.g., 9.05).
- * Replace "(. ${srcdir}/scripttempl/${SCRIPT_NAME}.sc)" in
- genscripts.sh with "sh ${srcdir}..." (no parens) and make sure the
- emulparams script used exports any shell variables it sets.
diff --git a/contrib/binutils/ld/TODO b/contrib/binutils/ld/TODO
deleted file mode 100644
index 31cd98b..0000000
--- a/contrib/binutils/ld/TODO
+++ /dev/null
@@ -1,9 +0,0 @@
-Volunteers to tackle some of the following would be welcome:
-
-Support the "traditional" BSD -A flag (incremental loading).
-(There is a -A flag in ld now, but it is used to specify the
-architecture. That should probably be changed.)
-
-Support for dynamic loading (a la dld, but bfd-based) would be nice.
-
-Avoid re-open (and re-seeking) output bfd and archives.
diff --git a/contrib/binutils/ld/acconfig.h b/contrib/binutils/ld/acconfig.h
deleted file mode 100644
index c627d7f..0000000
--- a/contrib/binutils/ld/acconfig.h
+++ /dev/null
@@ -1,22 +0,0 @@
-
-/* Name of package. */
-#undef PACKAGE
-
-/* Version of package. */
-#undef VERSION
-
-/* Whether strstr must be declared even if <string.h> is included. */
-#undef NEED_DECLARATION_STRSTR
-
-/* Whether free must be declared even if <stdlib.h> is included. */
-#undef NEED_DECLARATION_FREE
-
-/* Whether sbrk must be declared even if <unistd.h> is included. */
-#undef NEED_DECLARATION_SBRK
-
-/* Whether getenv must be declared even if <stdlib.h> is included. */
-#undef NEED_DECLARATION_GETENV
-@TOP@
-
-/* Do we need to use the b modifier when opening binary files? */
-#undef USE_BINARY_FOPEN
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
deleted file mode 100644
index 7b50bb9..0000000
--- a/contrib/binutils/ld/aclocal.m4
+++ /dev/null
@@ -1,204 +0,0 @@
-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)
-])
-
-dnl sinclude(../gettext.m4) already included in bfd/acinclude.m4
-ifelse(yes,no,[
-AC_DEFUN([CY_WITH_NLS],)
-AC_SUBST(INTLLIBS)
-])
-
-#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.
-
-# serial 1
-
-dnl Usage:
-dnl AM_INIT_AUTOMAKE(package,version, [no-define])
-
-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_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])])
-
-#
-# Check to make sure that the build environment is sane.
-#
-
-AC_DEFUN([AM_SANITY_CHECK],
-[AC_MSG_CHECKING([whether build environment is sane])
-# Just in case
-sleep 1
-echo timestamp > conftestfile
-# Do `set' in a subshell so we don't clobber the current shell's
-# arguments. Must try -L first in case configure is actually a
-# symlink; some systems play weird games with the mod time of symlinks
-# (eg FreeBSD returns the mod time of the symlink's containing
-# directory).
-if (
- set X `ls -Lt $srcdir/configure conftestfile 2> /dev/null`
- if test "[$]*" = "X"; then
- # -L didn't work.
- set X `ls -t $srcdir/configure conftestfile`
- fi
- if test "[$]*" != "X $srcdir/configure conftestfile" \
- && test "[$]*" != "X conftestfile $srcdir/configure"; then
-
- # If neither matched, then we have a broken ls. This can happen
- # if, for instance, CONFIG_SHELL is bash and it inherits a
- # broken ls alias from the environment. This has actually
- # happened. Such a system could not be considered "sane".
- AC_MSG_ERROR([ls -t appears to fail. Make sure there is not a broken
-alias in your environment])
- fi
-
- test "[$]2" = conftestfile
- )
-then
- # Ok.
- :
-else
- AC_MSG_ERROR([newly created file is older than distributed files!
-Check your system clock])
-fi
-rm -f conftest*
-AC_MSG_RESULT(yes)])
-
-dnl AM_MISSING_PROG(NAME, PROGRAM, DIRECTORY)
-dnl The program must properly implement --version.
-AC_DEFUN([AM_MISSING_PROG],
-[AC_MSG_CHECKING(for working $2)
-# Run test in a subshell; some versions of sh will print an error if
-# an executable is not found, even if stderr is redirected.
-# Redirect stdin to placate older versions of autoconf. Sigh.
-if ($2 --version) < /dev/null > /dev/null 2>&1; then
- $1=$2
- AC_MSG_RESULT(found)
-else
- $1="$3/missing $2"
- AC_MSG_RESULT(missing)
-fi
-AC_SUBST($1)])
-
-# 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([,]))])
-
-
-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])
-
-# Add --enable-maintainer-mode option to configure.
-# From Jim Meyering
-
-# serial 1
-
-AC_DEFUN([AM_MAINTAINER_MODE],
-[AC_MSG_CHECKING([whether to enable maintainer-specific portions of Makefiles])
- dnl maintainer-mode is disabled by default
- AC_ARG_ENABLE(maintainer-mode,
-[ --enable-maintainer-mode enable make rules and dependencies not useful
- (and sometimes confusing) to the casual installer],
- USE_MAINTAINER_MODE=$enableval,
- USE_MAINTAINER_MODE=no)
- AC_MSG_RESULT($USE_MAINTAINER_MODE)
- AM_CONDITIONAL(MAINTAINER_MODE, test $USE_MAINTAINER_MODE = yes)
- MAINT=$MAINTAINER_MODE_TRUE
- AC_SUBST(MAINT)dnl
-]
-)
-
-# Define a conditional.
-
-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])
-
diff --git a/contrib/binutils/ld/config.in b/contrib/binutils/ld/config.in
deleted file mode 100644
index f76bb42..0000000
--- a/contrib/binutils/ld/config.in
+++ /dev/null
@@ -1,177 +0,0 @@
-/* config.in. Generated automatically 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 if you have <alloca.h> and it should be used (not on Ultrix). */
-#undef HAVE_ALLOCA_H
-
-/* Define if you have a working `mmap' system call. */
-#undef HAVE_MMAP
-
-/* Define as __inline if that's what the C compiler calls it. */
-#undef inline
-
-/* Define to `long' if <sys/types.h> doesn't define. */
-#undef off_t
-
-/* Define if you need to in order for stat and other things to work. */
-#undef _POSIX_SOURCE
-
-/* Define to `unsigned' if <sys/types.h> doesn't define. */
-#undef size_t
-
-/* 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 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 if you have the __argz_count function. */
-#undef HAVE___ARGZ_COUNT
-
-/* Define if you have the __argz_next function. */
-#undef HAVE___ARGZ_NEXT
-
-/* Define if you have the __argz_stringify function. */
-#undef HAVE___ARGZ_STRINGIFY
-
-/* Define if you have the dcgettext function. */
-#undef HAVE_DCGETTEXT
-
-/* Define if you have the getcwd function. */
-#undef HAVE_GETCWD
-
-/* Define if you have the getpagesize function. */
-#undef HAVE_GETPAGESIZE
-
-/* Define if you have the munmap function. */
-#undef HAVE_MUNMAP
-
-/* Define if you have the putenv function. */
-#undef HAVE_PUTENV
-
-/* Define if you have the realpath function. */
-#undef HAVE_REALPATH
-
-/* Define 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 if you have the <nl_types.h> header file. */
-#undef HAVE_NL_TYPES_H
-
-/* Define 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. */
-#undef HAVE_STRINGS_H
-
-/* Define if you have the <sys/dir.h> header file. */
-#undef HAVE_SYS_DIR_H
-
-/* Define if you have the <sys/ndir.h> header file. */
-#undef HAVE_SYS_NDIR_H
-
-/* Define 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 if you have the <values.h> header file. */
-#undef HAVE_VALUES_H
-
-/* Name of package */
-#undef PACKAGE
-
-/* Version number of package */
-#undef VERSION
-
-/* Define if you have the stpcpy function */
-#undef HAVE_STPCPY
-
-/* Define if your locale.h file contains LC_MESSAGES. */
-#undef HAVE_LC_MESSAGES
-
-/* Define to 1 if NLS is requested */
-#undef ENABLE_NLS
-
-/* Define as 1 if you have gettext and don't want to use GNU gettext. */
-#undef HAVE_GETTEXT
-
-/* Use b modifier when opening binary files? */
-#undef USE_BINARY_FOPEN
-
-/* Define if strstr is not declared in system header files. */
-#undef NEED_DECLARATION_STRSTR
-
-/* Define if free is not declared in system header files. */
-#undef NEED_DECLARATION_FREE
-
-/* Define if sbrk is not declared in system header files. */
-#undef NEED_DECLARATION_SBRK
-
-/* Define if getenv is not declared in system header files. */
-#undef NEED_DECLARATION_GETENV
-
-/* Define if environ is not declared in system header files. */
-#undef NEED_DECLARATION_ENVIRON
-
-/* Additional extension a shared object might have. */
-#undef EXTRA_SHLIB_EXTENSION
-
diff --git a/contrib/binutils/ld/configdoc.texi b/contrib/binutils/ld/configdoc.texi
deleted file mode 100644
index 8d1acad..0000000
--- a/contrib/binutils/ld/configdoc.texi
+++ /dev/null
@@ -1,14 +0,0 @@
-@c ------------------------------ CONFIGURATION VARS:
-@c 1. Inclusiveness of this manual
-@set GENERIC
-
-@c 2. Specific target machines
-@set H8300
-@set I960
-@set TICOFF
-
-@c 3. Properties of this configuration
-@clear SingleFormat
-@set UsesEnvVars
-@c ------------------------------ end CONFIGURATION VARS
-
diff --git a/contrib/binutils/ld/configure b/contrib/binutils/ld/configure
deleted file mode 100755
index 410f9c2..0000000
--- a/contrib/binutils/ld/configure
+++ /dev/null
@@ -1,5635 +0,0 @@
-#! /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.
-#
-# This configure script is free software; the Free Software Foundation
-# gives unlimited permission to copy, distribute and modify it.
-
-# Defaults:
-ac_help=
-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"
-
-# Initialize some variables set by options.
-# The variables have the same names as the options, with
-# dashes changed to underlines.
-build=NONE
-cache_file=./config.cache
-exec_prefix=NONE
-host=NONE
-no_create=
-nonopt=NONE
-no_recursion=
-prefix=NONE
-program_prefix=NONE
-program_suffix=NONE
-program_transform_name=s,x,x,
-silent=
-site=
-sitefile=
-srcdir=
-target=NONE
-verbose=
-x_includes=NONE
-x_libraries=NONE
-bindir='${exec_prefix}/bin'
-sbindir='${exec_prefix}/sbin'
-libexecdir='${exec_prefix}/libexec'
-datadir='${prefix}/share'
-sysconfdir='${prefix}/etc'
-sharedstatedir='${prefix}/com'
-localstatedir='${prefix}/var'
-libdir='${exec_prefix}/lib'
-includedir='${prefix}/include'
-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"
- ac_prev=
- continue
- fi
-
- case "$ac_option" in
- -*=*) ac_optarg=`echo "$ac_option" | sed 's/[-_a-zA-Z0-9]*=//'` ;;
- *) ac_optarg= ;;
- esac
-
- # Accept the important Cygnus configure options, so we can diagnose typos.
-
- case "$ac_option" in
-
- -bindir | --bindir | --bindi | --bind | --bin | --bi)
- ac_prev=bindir ;;
- -bindir=* | --bindir=* | --bindi=* | --bind=* | --bin=* | --bi=*)
- bindir="$ac_optarg" ;;
-
- -build | --build | --buil | --bui | --bu)
- ac_prev=build ;;
- -build=* | --build=* | --buil=* | --bui=* | --bu=*)
- build="$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" ;;
-
- -datadir | --datadir | --datadi | --datad | --data | --dat | --da)
- ac_prev=datadir ;;
- -datadir=* | --datadir=* | --datadi=* | --datad=* | --data=* | --dat=* \
- | --da=*)
- datadir="$ac_optarg" ;;
-
- -disable-* | --disable-*)
- ac_feature=`echo $ac_option|sed -e 's/-*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" ;;
-
- -enable-* | --enable-*)
- ac_feature=`echo $ac_option|sed -e 's/-*enable-//' -e 's/=.*//'`
- # 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
- *=*) ;;
- *) ac_optarg=yes ;;
- esac
- eval "enable_${ac_feature}='$ac_optarg'" ;;
-
- -exec-prefix | --exec_prefix | --exec-prefix | --exec-prefi \
- | --exec-pref | --exec-pre | --exec-pr | --exec-p | --exec- \
- | --exec | --exe | --ex)
- ac_prev=exec_prefix ;;
- -exec-prefix=* | --exec_prefix=* | --exec-prefix=* | --exec-prefi=* \
- | --exec-pref=* | --exec-pre=* | --exec-pr=* | --exec-p=* | --exec-=* \
- | --exec=* | --exe=* | --ex=*)
- 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 ;;
-
- -host | --host | --hos | --ho)
- ac_prev=host ;;
- -host=* | --host=* | --hos=* | --ho=*)
- host="$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" ;;
-
- -infodir | --infodir | --infodi | --infod | --info | --inf)
- ac_prev=infodir ;;
- -infodir=* | --infodir=* | --infodi=* | --infod=* | --info=* | --inf=*)
- infodir="$ac_optarg" ;;
-
- -libdir | --libdir | --libdi | --libd)
- ac_prev=libdir ;;
- -libdir=* | --libdir=* | --libdi=* | --libd=*)
- 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" ;;
-
- -localstatedir | --localstatedir | --localstatedi | --localstated \
- | --localstate | --localstat | --localsta | --localst \
- | --locals | --local | --loca | --loc | --lo)
- ac_prev=localstatedir ;;
- -localstatedir=* | --localstatedir=* | --localstatedi=* | --localstated=* \
- | --localstate=* | --localstat=* | --localsta=* | --localst=* \
- | --locals=* | --local=* | --loca=* | --loc=* | --lo=*)
- localstatedir="$ac_optarg" ;;
-
- -mandir | --mandir | --mandi | --mand | --man | --ma | --m)
- ac_prev=mandir ;;
- -mandir=* | --mandir=* | --mandi=* | --mand=* | --man=* | --ma=* | --m=*)
- 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_create=yes ;;
-
- -no-recursion | --no-recursion | --no-recursio | --no-recursi \
- | --no-recurs | --no-recur | --no-recu | --no-rec | --no-re | --no-r)
- no_recursion=yes ;;
-
- -oldincludedir | --oldincludedir | --oldincludedi | --oldincluded \
- | --oldinclude | --oldinclud | --oldinclu | --oldincl | --oldinc \
- | --oldin | --oldi | --old | --ol | --o)
- ac_prev=oldincludedir ;;
- -oldincludedir=* | --oldincludedir=* | --oldincludedi=* | --oldincluded=* \
- | --oldinclude=* | --oldinclud=* | --oldinclu=* | --oldincl=* | --oldinc=* \
- | --oldin=* | --oldi=* | --old=* | --ol=* | --o=*)
- oldincludedir="$ac_optarg" ;;
-
- -prefix | --prefix | --prefi | --pref | --pre | --pr | --p)
- ac_prev=prefix ;;
- -prefix=* | --prefix=* | --prefi=* | --pref=* | --pre=* | --pr=* | --p=*)
- 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-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-transform-name | --program-transform-name \
- | --program-transform-nam | --program-transform-na \
- | --program-transform-n | --program-transform- \
- | --program-transform | --program-transfor \
- | --program-transfo | --program-transf \
- | --program-trans | --program-tran \
- | --progr-tra | --program-tr | --program-t)
- ac_prev=program_transform_name ;;
- -program-transform-name=* | --program-transform-name=* \
- | --program-transform-nam=* | --program-transform-na=* \
- | --program-transform-n=* | --program-transform-=* \
- | --program-transform=* | --program-transfor=* \
- | --program-transfo=* | --program-transf=* \
- | --program-trans=* | --program-tran=* \
- | --progr-tra=* | --program-tr=* | --program-t=*)
- program_transform_name="$ac_optarg" ;;
-
- -q | -quiet | --quiet | --quie | --qui | --qu | --q \
- | -silent | --silent | --silen | --sile | --sil)
- silent=yes ;;
-
- -sbindir | --sbindir | --sbindi | --sbind | --sbin | --sbi | --sb)
- ac_prev=sbindir ;;
- -sbindir=* | --sbindir=* | --sbindi=* | --sbind=* | --sbin=* \
- | --sbi=* | --sb=*)
- sbindir="$ac_optarg" ;;
-
- -sharedstatedir | --sharedstatedir | --sharedstatedi \
- | --sharedstated | --sharedstate | --sharedstat | --sharedsta \
- | --sharedst | --shareds | --shared | --share | --shar \
- | --sha | --sh)
- ac_prev=sharedstatedir ;;
- -sharedstatedir=* | --sharedstatedir=* | --sharedstatedi=* \
- | --sharedstated=* | --sharedstate=* | --sharedstat=* | --sharedsta=* \
- | --sharedst=* | --shareds=* | --shared=* | --share=* | --shar=* \
- | --sha=* | --sh=*)
- 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" ;;
-
- -srcdir | --srcdir | --srcdi | --srcd | --src | --sr)
- ac_prev=srcdir ;;
- -srcdir=* | --srcdir=* | --srcdi=* | --srcd=* | --src=* | --sr=*)
- 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" ;;
-
- -target | --target | --targe | --targ | --tar | --ta | --t)
- ac_prev=target ;;
- -target=* | --target=* | --targe=* | --targ=* | --tar=* | --ta=* | --t=*)
- target="$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 ;;
-
- -with-* | --with-*)
- ac_package=`echo $ac_option|sed -e 's/-*with-//' -e 's/=.*//'`
- # 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'`
- case "$ac_option" in
- *=*) ;;
- *) ac_optarg=yes ;;
- esac
- eval "with_${ac_package}='$ac_optarg'" ;;
-
- -without-* | --without-*)
- ac_package=`echo $ac_option|sed -e 's/-*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" ;;
-
- --x)
- # Obsolete; use --with-x.
- with_x=yes ;;
-
- -x-includes | --x-includes | --x-include | --x-includ | --x-inclu \
- | --x-incl | --x-inc | --x-in | --x-i)
- 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-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" ;;
-
- -*) { echo "configure: error: $ac_option: invalid option; use --help to show usage" 1>&2; exit 1; }
- ;;
-
- *)
- 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"
- ;;
-
- 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
-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
-
-# 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
-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" ;;
- 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
-
-# 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
-
-# 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=.
- srcdir=$ac_confdir
- if test ! -r $srcdir/$ac_unique_file; then
- srcdir=..
- fi
-else
- ac_srcdir_defaulted=no
-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; }
- else
- { echo "configure: error: can not find sources in $srcdir" 1>&2; exit 1; }
- fi
-fi
-srcdir=`echo "${srcdir}" | sed 's%\([^/]\)/*$%\1%'`
-
-# 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"
- else
- CONFIG_SITE="$ac_default_prefix/share/config.site $ac_default_prefix/etc/config.site"
- fi
- 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"
- . "$ac_site_file"
- fi
-done
-
-if test -r "$cache_file"; then
- echo "loading cache $cache_file"
- . $cache_file
-else
- echo "creating cache $cache_file"
- > $cache_file
-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
-
-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=
-for ac_dir in $srcdir $srcdir/.. $srcdir/../..; do
- if test -f $ac_dir/install-sh; then
- ac_aux_dir=$ac_dir
- ac_install_sh="$ac_aux_dir/install-sh -c"
- break
- elif test -f $ac_dir/install.sh; then
- ac_aux_dir=$ac_dir
- ac_install_sh="$ac_aux_dir/install.sh -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; }
-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.
-
-
-# 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
-
-
-# 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
-
-echo $ac_n "checking host system type""... $ac_c" 1>&6
-echo "configure:675: checking host system type" >&5
-
-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
-
-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
-
-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
-
-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
-
-test "$host_alias" != "$target_alias" &&
- test "$program_prefix$program_suffix$program_transform_name" = \
- NONENONEs,x,x, &&
- program_prefix=${target_alias}-
-
-
- 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
-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"
-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 -lcposix"
-else
- echo "$ac_t""no" 1>&6
-fi
-
-
-
-
-BFD_VERSION=`sed -n -e 's/^.._INIT_AUTOMAKE.*,[ ]*\([^ ]*\)[ ]*).*/\1/p' < ${srcdir}/../bfd/configure.in`
-# 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:793: 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
- ;;
- esac
- done
- IFS="$ac_save_IFS"
-
-fi
- if test "${ac_cv_path_install+set}" = set; then
- INSTALL="$ac_cv_path_install"
- else
- # As a last resort, use the slow shell script. We don't cache a
- # path for INSTALL within a source directory, because that will
- # break other packages using the cache if that directory is
- # removed, or if the path is relative.
- INSTALL="$ac_install_sh"
- fi
-fi
-echo "$ac_t""$INSTALL" 1>&6
-
-# Use test -z because SunOS4 sh mishandles braces in ${var-val}.
-# It thinks the first close brace ends the variable substitution.
-test -z "$INSTALL_PROGRAM" && INSTALL_PROGRAM='${INSTALL}'
-
-test -z "$INSTALL_SCRIPT" && INSTALL_SCRIPT='${INSTALL_PROGRAM}'
-
-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
-# Just in case
-sleep 1
-echo timestamp > conftestfile
-# Do `set' in a subshell so we don't clobber the current shell's
-# arguments. Must try -L first in case configure is actually a
-# symlink; some systems play weird games with the mod time of symlinks
-# (eg FreeBSD returns the mod time of the symlink's containing
-# directory).
-if (
- set X `ls -Lt $srcdir/configure conftestfile 2> /dev/null`
- if test "$*" = "X"; then
- # -L didn't work.
- set X `ls -t $srcdir/configure conftestfile`
- fi
- if test "$*" != "X $srcdir/configure conftestfile" \
- && test "$*" != "X conftestfile $srcdir/configure"; then
-
- # If neither matched, then we have a broken ls. This can happen
- # if, for instance, CONFIG_SHELL is bash and it inherits a
- # broken ls alias from the environment. This has actually
- # happened. Such a system could not be considered "sane".
- { echo "configure: error: ls -t appears to fail. Make sure there is not a broken
-alias in your environment" 1>&2; exit 1; }
- fi
-
- test "$2" = conftestfile
- )
-then
- # Ok.
- :
-else
- { echo "configure: error: newly created file is older than distributed files!
-Check your system clock" 1>&2; exit 1; }
-fi
-rm -f conftest*
-echo "$ac_t""yes" 1>&6
-if test "$program_transform_name" = s,x,x,; then
- program_transform_name=
-else
- # 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
-fi
-test "$program_prefix" != NONE &&
- 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"
-
-# sed with no file args requires a program.
-test "$program_transform_name" = "" && program_transform_name="s,x,x,"
-
-echo $ac_n "checking whether ${MAKE-make} sets \${MAKE}""... $ac_c" 1>&6
-echo "configure: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
-else
- cat > conftestmake <<\EOF
-all:
- @echo 'ac_maketemp="${MAKE}"'
-EOF
-# GNU make sometimes prints "make[1]: Entering...", which would confuse us.
-eval `${MAKE-make} -f conftestmake 2>/dev/null | grep temp=`
-if test -n "$ac_maketemp"; then
- eval ac_cv_prog_make_${ac_make}_set=yes
-else
- eval ac_cv_prog_make_${ac_make}_set=no
-fi
-rm -f conftestmake
-fi
-if eval "test \"`echo '$ac_cv_prog_make_'${ac_make}_set`\" = yes"; then
- echo "$ac_t""yes" 1>&6
- SET_MAKE=
-else
- echo "$ac_t""no" 1>&6
- SET_MAKE="MAKE=${MAKE-make}"
-fi
-
-
-PACKAGE=ld
-
-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; }
-fi
-cat >> confdefs.h <<EOF
-#define PACKAGE "$PACKAGE"
-EOF
-
-cat >> confdefs.h <<EOF
-#define VERSION "$VERSION"
-EOF
-
-
-
-missing_dir=`cd $ac_aux_dir && pwd`
-echo $ac_n "checking for working aclocal""... $ac_c" 1>&6
-echo "configure: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
-else
- ACLOCAL="$missing_dir/missing aclocal"
- echo "$ac_t""missing" 1>&6
-fi
-
-echo $ac_n "checking for working autoconf""... $ac_c" 1>&6
-echo "configure: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
-else
- AUTOCONF="$missing_dir/missing autoconf"
- echo "$ac_t""missing" 1>&6
-fi
-
-echo $ac_n "checking for working automake""... $ac_c" 1>&6
-echo "configure: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
-else
- AUTOMAKE="$missing_dir/missing automake"
- echo "$ac_t""missing" 1>&6
-fi
-
-echo $ac_n "checking for working autoheader""... $ac_c" 1>&6
-echo "configure: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
-else
- AUTOHEADER="$missing_dir/missing autoheader"
- echo "$ac_t""missing" 1>&6
-fi
-
-echo $ac_n "checking for working makeinfo""... $ac_c" 1>&6
-echo "configure: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
-else
- MAKEINFO="$missing_dir/missing makeinfo"
- echo "$ac_t""missing" 1>&6
-fi
-
-
-
-# Check whether --enable-shared or --disable-shared was given.
-if test "${enable_shared+set}" = set; then
- enableval="$enable_shared"
- p=${PACKAGE-default}
-case $enableval in
-yes) enable_shared=yes ;;
-no) enable_shared=no ;;
-*)
- enable_shared=no
- # Look at the argument we got. We use all the common list separators.
- IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS="${IFS}:,"
- for pkg in $enableval; do
- if test "X$pkg" = "X$p"; then
- enable_shared=yes
- fi
- done
- IFS="$ac_save_ifs"
- ;;
-esac
-else
- enable_shared=yes
-fi
-
-# Check whether --enable-static or --disable-static was given.
-if test "${enable_static+set}" = set; then
- enableval="$enable_static"
- p=${PACKAGE-default}
-case $enableval in
-yes) enable_static=yes ;;
-no) enable_static=no ;;
-*)
- enable_static=no
- # Look at the argument we got. We use all the common list separators.
- IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS="${IFS}:,"
- for pkg in $enableval; do
- if test "X$pkg" = "X$p"; then
- enable_static=yes
- fi
- done
- IFS="$ac_save_ifs"
- ;;
-esac
-else
- enable_static=yes
-fi
-
-# 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
-else
- enable_fast_install=yes
-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.
-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
- fi
- ac_cv_prog_CC="cc"
- break
- fi
- done
- IFS="$ac_save_ifs"
-if test $ac_prog_rejected = yes; then
- # We found a bogon in the path, so make sure we never use it.
- set dummy $ac_cv_prog_CC
- shift
- if test $# -gt 0; then
- # We chose a different compiler from the bogus one.
- # However, it has the same basename, so the bogon will be chosen
- # first if we set CC to just the basename; use the full file name.
- shift
- set dummy "$ac_dir/$ac_word" "$@"
- shift
- ac_cv_prog_CC="$@"
- fi
-fi
-fi
-fi
-CC="$ac_cv_prog_CC"
-if test -n "$CC"; then
- echo "$ac_t""$CC" 1>&6
-else
- echo "$ac_t""no" 1>&6
-fi
-
- 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
- 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; }
-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
-
-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
-
-cat > conftest.$ac_ext << EOF
-
-#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
-else
- ac_cv_prog_cc_g=no
-fi
-rm -f conftest*
-
-fi
-
-echo "$ac_t""$ac_cv_prog_cc_g" 1>&6
-if test "$ac_test_CFLAGS" = set; then
- CFLAGS="$ac_save_CFLAGS"
-elif test $ac_cv_prog_cc_g = yes; then
- if test "$GCC" = yes; then
- CFLAGS="-g -O2"
- else
- CFLAGS="-g"
- fi
-else
- if test "$GCC" = yes; then
- CFLAGS="-O2"
- else
- CFLAGS=
- fi
-fi
-
-# Check whether --with-gnu-ld or --without-gnu-ld was given.
-if test "${with_gnu_ld+set}" = set; then
- withval="$with_gnu_ld"
- test "$withval" = no || with_gnu_ld=yes
-else
- with_gnu_ld=no
-fi
-
-ac_prog=ld
-if test "$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
- case $host in
- *-*-mingw*)
- # gcc leaves a trailing carriage return which upsets mingw
- ac_prog=`($CC -print-prog-name=ld) 2>&5 | tr -d '\015'` ;;
- *)
- ac_prog=`($CC -print-prog-name=ld) 2>&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%/%"`
- done
- test -z "$LD" && LD="$ac_prog"
- ;;
- "")
- # If it fails, then pretend we aren't using GCC.
- ac_prog=ld
- ;;
- *)
- # If it is relative, then search for the first ld in PATH.
- with_gnu_ld=unknown
- ;;
- esac
-elif test "$with_gnu_ld" = yes; then
- echo $ac_n "checking for GNU ld""... $ac_c" 1>&6
-echo "configure:1348: checking for GNU ld" >&5
-else
- echo $ac_n "checking for non-GNU ld""... $ac_c" 1>&6
-echo "configure:1351: checking for non-GNU ld" >&5
-fi
-if eval "test \"`echo '$''{'lt_cv_path_LD'+set}'`\" = set"; then
- echo $ac_n "(cached) $ac_c" 1>&6
-else
- if test -z "$LD"; then
- IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS="${IFS}${PATH_SEPARATOR-:}"
- for ac_dir in $PATH; do
- 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.
- # 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
- test "$with_gnu_ld" != no && break
- else
- test "$with_gnu_ld" != yes && break
- fi
- fi
- done
- IFS="$ac_save_ifs"
-else
- lt_cv_path_LD="$LD" # Let the user override the test with a path.
-fi
-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
- lt_cv_prog_gnu_ld=yes
-else
- lt_cv_prog_gnu_ld=no
-fi
-fi
-
-echo "$ac_t""$lt_cv_prog_gnu_ld" 1>&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
-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
- fi
- fi
- done
- IFS="$ac_save_ifs"
- test -z "$lt_cv_path_NM" && lt_cv_path_NM=nm
-fi
-fi
-
-NM="$lt_cv_path_NM"
-echo "$ac_t""$NM" 1>&6
-
-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
-else
- rm -f conftestdata
-if ln -s X conftestdata 2>/dev/null
-then
- rm -f conftestdata
- ac_cv_prog_LN_S="ln -s"
-else
- ac_cv_prog_LN_S=ln
-fi
-fi
-LN_S="$ac_cv_prog_LN_S"
-if test "$ac_cv_prog_LN_S" = "ln -s"; then
- echo "$ac_t""yes" 1>&6
-else
- echo "$ac_t""no" 1>&6
-fi
-
-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
-else
- lt_cv_file_magic_cmd='$MAGIC_CMD'
-lt_cv_file_magic_test_file=
-lt_cv_deplibs_check_method='unknown'
-# Need to set the preceding variable on all platforms that support
-# interlibrary dependencies.
-# 'none' -- dependencies not supported.
-# `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.
-# 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*)
- lt_cv_deplibs_check_method=pass_all
- ;;
-
-beos*)
- lt_cv_deplibs_check_method=pass_all
- ;;
-
-bsdi4*)
- 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'
- ;;
-
-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
- ;;
-
-freebsd* )
- 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_file_magic_cmd=/usr/bin/file
- lt_cv_file_magic_test_file=`echo /usr/lib/libc.so.*`
- ;;
- esac
- else
- lt_cv_deplibs_check_method=pass_all
- fi
- ;;
-
-gnu*)
- lt_cv_deplibs_check_method=pass_all
- ;;
-
-hpux10.20*|hpux11*)
- 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"
- ;;
- *)
- 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"
- ;;
- esac
- lt_cv_file_magic_test_file=`echo /lib${libsuff}/libc.so*`
- 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`
- ;;
-
-netbsd*)
- if echo __ELF__ | $CC -E - | grep __ELF__ > /dev/null; then
- lt_cv_deplibs_check_method='match_pattern /lib[^/\.]+\.so\.[0-9]+\.[0-9]+$'
- else
- lt_cv_deplibs_check_method='match_pattern /lib[^/\.]+\.so$'
- fi
- ;;
-
-newsos6)
- 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
- ;;
-
-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*)
- 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*)
- lt_cv_deplibs_check_method=pass_all
- ;;
-
-sysv4 | sysv4.2uw2* | sysv4.3* | sysv5*)
- 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*`
- ;;
- esac
- ;;
-esac
-
-fi
-
-echo "$ac_t""$lt_cv_deplibs_check_method" 1>&6
-file_magic_cmd=$lt_cv_file_magic_cmd
-deplibs_check_method=$lt_cv_deplibs_check_method
-
-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
-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
-else
- { echo "configure: error: installation or configuration problem; compiler does not work" 1>&2; exit 1; }
-fi
-rm -f conftest*
-fi
-
-echo "$ac_t""$ac_cv_objext" 1>&6
-OBJEXT=$ac_cv_objext
-ac_objext=$ac_cv_objext
-
-
-
-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
-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: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//` ;;
- 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
-
-if test $host != $build; then
- ac_tool_prefix=${host_alias}-
-else
- ac_tool_prefix=
-fi
-
-# 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
-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
-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"
- for ac_dir in $ac_dummy; do
- 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 \(.*\)\"`"
- 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
- :
- else
- cat <<EOF 1>&2
-
-*** Warning: the command libtool uses to detect shared libraries,
-*** $file_magic_cmd, produces output that libtool cannot recognize.
-*** The result is that libtool may fail to recognize shared libraries
-*** as such. This will affect the creation of libtool libraries that
-*** depend on shared libraries, but programs linked with such libtool
-*** libraries will work regardless of this problem. Nevertheless, you
-*** may want to report the problem to your system manager and/or to
-*** bug-libtool@gnu.org
-
-EOF
- fi ;;
- esac
- fi
- break
- fi
- done
- IFS="$ac_save_ifs"
- MAGIC_CMD="$ac_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
-else
- echo "$ac_t""no" 1>&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
-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"
- for ac_dir in $ac_dummy; do
- 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 \(.*\)\"`"
- 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
- :
- else
- cat <<EOF 1>&2
-
-*** Warning: the command libtool uses to detect shared libraries,
-*** $file_magic_cmd, produces output that libtool cannot recognize.
-*** The result is that libtool may fail to recognize shared libraries
-*** as such. This will affect the creation of libtool libraries that
-*** depend on shared libraries, but programs linked with such libtool
-*** libraries will work regardless of this problem. Nevertheless, you
-*** may want to report the problem to your system manager and/or to
-*** bug-libtool@gnu.org
-
-EOF
- fi ;;
- esac
- fi
- break
- fi
- done
- IFS="$ac_save_ifs"
- MAGIC_CMD="$ac_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
-else
- echo "$ac_t""no" 1>&6
-fi
-
- else
- MAGIC_CMD=:
- fi
-fi
-
- 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
-
-
-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
-else
- echo "$ac_t""no" 1>&6
-fi
-
-else
- RANLIB=":"
-fi
-fi
-
-# 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.
-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"
-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
-
-
-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
-else
- if test -n "$STRIP"; then
- ac_cv_prog_STRIP="$STRIP" # 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_STRIP="strip"
- break
- 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
-
-else
- STRIP=":"
-fi
-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"
-
-
-# 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 && libtool_flags="$libtool_flags --disable-lock"
-test x"$silent" = xyes && libtool_flags="$libtool_flags --silent"
-
-# 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 x"$pic_mode" = xyes && libtool_flags="$libtool_flags --prefer-pic"
-test x"$pic_mode" = xno && libtool_flags="$libtool_flags --prefer-non-pic"
-
-# 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"
- ;;
- *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*
- ;;
-
-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"
- ;;
- *ELF-64*)
- HPUX_IA64_MODE="64"
- ;;
- 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
-
- cat > conftest.$ac_ext <<EOF
-#line 2080 "configure"
-#include "confdefs.h"
-
-int main() {
-
-; 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
-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
-
-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"
- fi
- ;;
-
-
-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.
-#
-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"
- fi
-fi
-rm -f confcache
-
-
-# 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
- 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: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
- fi
- ac_cv_prog_CC="cc"
- break
- fi
- done
- IFS="$ac_save_ifs"
-if test $ac_prog_rejected = yes; then
- # We found a bogon in the path, so make sure we never use it.
- set dummy $ac_cv_prog_CC
- shift
- if test $# -gt 0; then
- # We chose a different compiler from the bogus one.
- # However, it has the same basename, so the bogon will be chosen
- # first if we set CC to just the basename; use the full file name.
- shift
- set dummy "$ac_dir/$ac_word" "$@"
- shift
- ac_cv_prog_CC="$@"
- fi
-fi
-fi
-fi
-CC="$ac_cv_prog_CC"
-if test -n "$CC"; then
- echo "$ac_t""$CC" 1>&6
-else
- echo "$ac_t""no" 1>&6
-fi
-
- 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
- fi
- test -z "$CC" && { echo "configure: error: no acceptable cc found in \$PATH" 1>&2; exit 1; }
-fi
-
-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
-
-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
-
-cat > conftest.$ac_ext << EOF
-
-#line 2435 "configure"
-#include "confdefs.h"
-
-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
- 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: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
-
-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: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*
-
-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
-else
- if test "$GCC" = yes; then
- CFLAGS="-O2"
- else
- CFLAGS=
- 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
- ;;
- esac
- done
- IFS="$ac_save_IFS"
-
-fi
- if test "${ac_cv_path_install+set}" = set; then
- INSTALL="$ac_cv_path_install"
- else
- # As a last resort, use the slow shell script. We don't cache a
- # path for INSTALL within a source directory, because that will
- # break other packages using the cache if that directory is
- # removed, or if the path is relative.
- INSTALL="$ac_install_sh"
- fi
-fi
-echo "$ac_t""$INSTALL" 1>&6
-
-# Use test -z because SunOS4 sh mishandles braces in ${var-val}.
-# It thinks the first close brace ends the variable substitution.
-test -z "$INSTALL_PROGRAM" && INSTALL_PROGRAM='${INSTALL}'
-
-test -z "$INSTALL_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
-else
- echo "configure: failed program was:" >&5
- cat conftest.$ac_ext >&5
- rm -rf conftest*
- ac_cv_func_alloca_works=no
-fi
-rm -f conftest*
-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
-else
- cat > conftest.$ac_ext <<EOF
-#line 3097 "configure"
-#include "confdefs.h"
-#if defined(CRAY) && ! defined(CRAY2)
-webecray
-#else
-wenotbecray
-#endif
-
-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 "$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();
-
-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: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
-
-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
-
- break
-else
- echo "$ac_t""no" 1>&6
-fi
-
-done
-fi
-
-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 ()
-{
- static char *addr = 0;
- auto char dummy;
- if (addr == 0)
- {
- addr = &dummy;
- return find_stack_direction ();
- }
- else
- return (&dummy > addr) ? 1 : -1;
-}
-main ()
-{
- exit (find_stack_direction() < 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
-else
- echo "configure: failed program was:" >&5
- cat conftest.$ac_ext >&5
- rm -fr conftest*
- ac_cv_c_stack_direction=-1
-fi
-rm -fr conftest*
-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
-else
- cat > conftest.$ac_ext <<EOF
-#line 3273 "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: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*
-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
-fi
-done
-
-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
-else
- if test "$cross_compiling" = yes; then
- ac_cv_func_mmap_fixed_mapped=no
-else
- cat > conftest.$ac_ext <<EOF
-#line 3329 "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>
-
-/* This mess was copied from the GNU getpagesize.h. */
-#ifndef HAVE_GETPAGESIZE
-# ifdef HAVE_UNISTD_H
-# include <unistd.h>
-# endif
-
-/* 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 _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 */
-
-#ifdef __cplusplus
-extern "C" { void *malloc(unsigned); }
-#else
-char *malloc();
-#endif
-
-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);
-}
-
-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
-fi
-rm -fr conftest*
-fi
-
-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
-
-fi
-
-
- 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
-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"
-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
-
-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
-
-
- 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
-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();
-
-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: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"
-fi
-rm -f conftest*
-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
-fi
-done
-
- fi
- if test "${ac_cv_func_stpcpy}" = "yes"; then
- cat >> confdefs.h <<\EOF
-#define HAVE_STPCPY 1
-EOF
-
- 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
-fi
-rm -f conftest*
-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
-
- fi
- 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
-else
- USE_NLS=yes
-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
-
- 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
-else
- nls_cv_force_use_gnu_gettext=no
-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
-
- 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
-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"
-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
- 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
-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
-else
- echo "configure: failed program was:" >&5
- cat conftest.$ac_ext >&5
- rm -rf conftest*
- gt_cv_func_gettext_libc=no
-fi
-rm -f conftest*
-fi
-
-echo "$ac_t""$gt_cv_func_gettext_libc" 1>&6
-
- 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
-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"
-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
- 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
-else
- cat > conftest.$ac_ext <<EOF
-#line 3823 "configure"
-#include "confdefs.h"
-
-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
-else
- echo "configure: failed program was:" >&5
- cat conftest.$ac_ext >&5
- rm -rf conftest*
- gt_cv_func_gettext_libintl=no
-fi
-rm -f conftest*
-fi
-
-echo "$ac_t""$gt_cv_func_gettext_libintl" 1>&6
-else
- echo "$ac_t""no" 1>&6
-fi
-
- fi
-
- 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
-
- # 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
-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
-fi
-MSGFMT="$ac_cv_path_MSGFMT"
-if test -n "$MSGFMT"; then
- echo "$ac_t""$MSGFMT" 1>&6
-else
- echo "$ac_t""no" 1>&6
-fi
- if test "$MSGFMT" != "no"; then
- for ac_func in dcgettext
-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();
-
-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: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"
-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
-
-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
-
- # 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
-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.
- ;;
- *)
- 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"
- ;;
-esac
-fi
-GMSGFMT="$ac_cv_path_GMSGFMT"
-if test -n "$GMSGFMT"; then
- echo "$ac_t""$GMSGFMT" 1>&6
-else
- echo "$ac_t""no" 1>&6
-fi
-
- # 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
-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
- 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
-
- 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*
- 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
-
-else
- echo "$ac_t""no" 1>&6
-fi
-
-
-
- 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.
-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
-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="msgfmt"
- ;;
-esac
-fi
-MSGFMT="$ac_cv_path_MSGFMT"
-if test -n "$MSGFMT"; then
- echo "$ac_t""$MSGFMT" 1>&6
-else
- echo "$ac_t""no" 1>&6
-fi
-
- # 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
-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.
- ;;
- *)
- 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"
- ;;
-esac
-fi
-GMSGFMT="$ac_cv_path_GMSGFMT"
-if test -n "$GMSGFMT"; then
- echo "$ac_t""$GMSGFMT" 1>&6
-else
- echo "$ac_t""no" 1>&6
-fi
-
- # 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
-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
- 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
-
-
- 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
-
- for lang in $ALL_LINGUAS; do
- GMOFILES="$GMOFILES $lang.gmo"
- POFILES="$POFILES $lang.po"
- done
-
-
-
-
-
-
-
-
-
-
-
-
-
-
- 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
-
- 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"
-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
- msgformat=linux
-else
- echo "$ac_t""no" 1>&6
-msgformat=xopen
-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 -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
-
-
-
-
-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.
-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
-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"
-fi
-fi
-YACC="$ac_cv_prog_YACC"
-if test -n "$YACC"; then
- echo "$ac_t""$YACC" 1>&6
-else
- echo "$ac_t""no" 1>&6
-fi
-
-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.
-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
-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
-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"
-if test -n "$LEX"; then
- echo "$ac_t""$LEX" 1>&6
-else
- echo "$ac_t""no" 1>&6
-fi
-
-if test -z "$LEXLIB"
-then
- case "$LEX" in
- flex*) ac_lib=fl ;;
- *) ac_lib=l ;;
- esac
- echo $ac_n "checking for yywrap in -l$ac_lib""... $ac_c" 1>&6
-echo "configure: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"
-/* Override any gcc2 internal prototype to avoid an error. */
-/* We use char because int might match the return type of a gcc2
- builtin and then its argument prototype would still apply. */
-char yywrap();
-
-int main() {
-yywrap()
-; return 0; }
-EOF
-if { (eval echo configure: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
-
-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
-else
- # The minimal lex program is just a single line: %%. But some broken lexes
-# (Solaris, I think it was) want two %% lines, so accommodate them.
-echo '%%
-%%' | $LEX
-if test -f lex.yy.c; then
- ac_cv_prog_lex_root=lex.yy
-elif test -f lexyy.c; then
- ac_cv_prog_lex_root=lexyy
-else
- { echo "configure: error: cannot find output from $LEX; giving up" 1>&2; exit 1; }
-fi
-fi
-
-echo "$ac_t""$ac_cv_prog_lex_root" 1>&6
-LEX_OUTPUT_ROOT=$ac_cv_prog_lex_root
-
-echo $ac_n "checking whether yytext is a pointer""... $ac_c" 1>&6
-echo "configure: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
-else
- # POSIX says lex can declare yytext either as a pointer or an array; the
-# default is implementation-dependent. Figure out which it is, since
-# not all implementations provide the %pointer and %array declarations.
-ac_cv_prog_lex_yytext_pointer=no
-echo 'extern char *yytext;' >>$LEX_OUTPUT_ROOT.c
-ac_save_LIBS="$LIBS"
-LIBS="$LIBS $LEXLIB"
-cat > conftest.$ac_ext <<EOF
-#line 4532 "configure"
-#include "confdefs.h"
-`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*
- ac_cv_prog_lex_yytext_pointer=yes
-else
- echo "configure: failed program was:" >&5
- cat conftest.$ac_ext >&5
-fi
-rm -f conftest*
-LIBS="$ac_save_LIBS"
-rm -f "${LEX_OUTPUT_ROOT}.c"
-
-fi
-
-echo "$ac_t""$ac_cv_prog_lex_yytext_pointer" 1>&6
-if test $ac_cv_prog_lex_yytext_pointer = yes; then
- cat >> confdefs.h <<\EOF
-#define YYTEXT_POINTER 1
-EOF
-
-fi
-
-
-echo $ac_n "checking whether to enable maintainer-specific portions of Makefiles""... $ac_c" 1>&6
-echo "configure:4562: checking whether to enable maintainer-specific portions of Makefiles" >&5
- # Check whether --enable-maintainer-mode or --disable-maintainer-mode was given.
-if test "${enable_maintainer_mode+set}" = set; then
- enableval="$enable_maintainer_mode"
- USE_MAINTAINER_MODE=$enableval
-else
- USE_MAINTAINER_MODE=no
-fi
-
- echo "$ac_t""$USE_MAINTAINER_MODE" 1>&6
-
-
-if test $USE_MAINTAINER_MODE = yes; then
- MAINTAINER_MODE_TRUE=
- MAINTAINER_MODE_FALSE='#'
-else
- MAINTAINER_MODE_TRUE='#'
- MAINTAINER_MODE_FALSE=
-fi
- MAINT=$MAINTAINER_MODE_TRUE
-
-
-
-. ${srcdir}/configure.host
-
-
-
-
-
-
-for ac_hdr in string.h strings.h stdlib.h unistd.h
-do
-ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
-echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
-echo "configure: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"
-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 sbrk realpath
-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"
-/* 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: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
-
-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"
-#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
-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"
-/* 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 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
-
-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. */
-/* 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"
-
-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
-fi
-
-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"
-
-#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 *(*)) 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
-fi
-rm -f conftest*
-fi
-
-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
-
-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
-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*
-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
-
-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"
-
-#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 *(*)) 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
-
-fi
-
-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
-else
- cat > conftest.$ac_ext <<EOF
-#line 4969 "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 *(*)) 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
-fi
-rm -f conftest*
-fi
-
-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
-
-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
-
-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"
-
-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*
- 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
-fi
-rm -f conftest*
-fi
-
-echo "$ac_t""$ld_cv_string_concatenation" 1>&6
-if test "$ld_cv_string_concatenation" = "yes"; then
- STRINGIFY=astring.sed
-else
- STRINGIFY=ostring.sed
-fi
-
-
-# target-specific stuff:
-
-all_targets=
-EMUL=
-all_emuls=
-all_emul_extras=
-all_libpath=
-
-rm -f tdirs
-
-for targ_alias in `echo $target_alias $enable_targets | sed 's/,/ /g'`
-do
- if test "$targ_alias" = "all"; then
- all_targets=true
- else
- # Canonicalize the secondary target names.
- result=`$ac_config_sub $targ_alias 2>/dev/null`
- if test -n "$result"; then
- targ=$result
- else
- targ=$targ_alias
- fi
-
- . ${srcdir}/configure.tgt
-
- if test "$targ" = "$target"; then
- EMUL=$targ_emul
- fi
-
- for i in $targ_emul $targ_extra_emuls $targ_extra_libpath; do
- case " $all_emuls " in
- *" e${i}.o "*) ;;
- *)
- all_emuls="$all_emuls e${i}.o"
- eval result=\$tdir_$i
- test -z "$result" && result=$targ_alias
- echo tdir_$i=$result >> tdirs
- ;;
- esac
- done
-
- for i in $targ_emul $targ_extra_libpath; do
- case " $all_libpath " in
- *" ${i} "*) ;;
- *)
- if test -z "$all_libpath"; then
- all_libpath=${i}
- else
- all_libpath="$all_libpath ${i}"
- fi
- ;;
- esac
- done
-
- for i in $targ_extra_ofiles; do
- case " $all_emul_extras " in
- *" ${i} "*) ;;
- *)
- all_emul_extras="$all_emul_extras ${i}"
- ;;
- esac
- done
- fi
-done
-
-
-
-TDIRS=tdirs
-
-
-if test x${all_targets} = xtrue; then
- if test x${want64} = xtrue; then
- EMULATION_OFILES='$(ALL_EMULATIONS) $(ALL_64_EMULATIONS)'
- else
- EMULATION_OFILES='$(ALL_EMULATIONS)'
- fi
- EMUL_EXTRA_OFILES='$(ALL_EMUL_EXTRA_OFILES)'
-else
- EMULATION_OFILES=$all_emuls
- EMUL_EXTRA_OFILES=$all_emul_extras
-fi
-
-
-
-
-EMULATION_LIBPATH=$all_libpath
-
-
-if test x${enable_static} = xno; then
- TESTBFDLIB="--rpath ../bfd/.libs ../bfd/.libs/libbfd.so"
-else
- TESTBFDLIB="../bfd/.libs/libbfd.a"
-fi
-
-
-target_vendor=${target_vendor=$host_vendor}
-case "$target_vendor" in
- hp) EXTRA_SHLIB_EXTENSION=".sl" ;;
- *) EXTRA_SHLIB_EXTENSION= ;;
-esac
-if test x${EXTRA_SHLIB_EXTENSION} != x ; then
- cat >> confdefs.h <<EOF
-#define EXTRA_SHLIB_EXTENSION "$EXTRA_SHLIB_EXTENSION"
-EOF
-
-fi
-
-trap '' 1 2 15
-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.
-#
-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"
- 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.
-if test "x$srcdir" = x.; then
- ac_vpsub='/^[ ]*VPATH[ ]*=[^:]*$/d'
-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}
-
-echo creating $CONFIG_STATUS
-rm -f $CONFIG_STATUS
-cat > $CONFIG_STATUS <<EOF
-#! /bin/sh
-# Generated automatically by configure.
-# 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.
-
-ac_cs_usage="Usage: $CONFIG_STATUS [--recheck] [--version] [--help]"
-for ac_option
-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
-done
-
-ac_given_srcdir=$srcdir
-ac_given_INSTALL="$INSTALL"
-
-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
-
-# 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
- else
- sed "${ac_end}q" conftest.subs > conftest.s$ac_file
- fi
- if test ! -s conftest.s$ac_file; then
- ac_more_lines=false
- rm -f conftest.s$ac_file
- 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`
- fi
-done
-if test -z "$ac_sed_cmds"; then
- ac_sed_cmds=cat
-fi
-EOF
-
-cat >> $CONFIG_STATUS <<EOF
-
-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" ;;
- esac
-
- # Adjust a relative srcdir, top_srcdir, and INSTALL for subdirectories.
-
- # 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=
- fi
-
- 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" ;;
- esac
-
- case "$ac_given_INSTALL" in
- [/$]*) INSTALL="$ac_given_INSTALL" ;;
- *) INSTALL="$ac_dots$ac_given_INSTALL" ;;
- esac
-
- 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= ;;
- 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*
-
-# 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_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
- # 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" ;;
- 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
-
-# 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.
-
-rm -f conftest.tail
-while :
-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
- 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
-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
- 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"
- fi
- rm -f $ac_file
- mv conftest.h $ac_file
- fi
-fi; done
-
-EOF
-cat >> $CONFIG_STATUS <<EOF
-
-
-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
-chmod +x $CONFIG_STATUS
-rm -fr confdefs* $ac_clean_files
-test "$no_create" = yes || ${CONFIG_SHELL-/bin/sh} $CONFIG_STATUS || exit 1
-
diff --git a/contrib/binutils/ld/configure.host b/contrib/binutils/ld/configure.host
deleted file mode 100644
index f2e1eb4..0000000
--- a/contrib/binutils/ld/configure.host
+++ /dev/null
@@ -1,247 +0,0 @@
-# This is the linker host specific file. This is invoked by the
-# autoconf generated configure script. Putting it in a separate shell
-# file lets us skip running autoconf when modifying host specific
-# information.
-
-# This file sets the following shell variables:
-# HDEFINES host specific compiler flags
-# HOSTING_CRT0 crt0.o file used for bootstrapping
-# HOSTING_LIBS libraries used for bootstrapping
-
-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`'
-
-#
-# Generic configurations:
-#
-
-case "${host}" in
-
-*-*-freebsd* | *-*-kfreebsd*-gnu)
- HOSTING_CRT0='-dynamic-linker `[ -f \`${CC} --print-prog-name=ld-elf.so.1\` ] || echo /usr/libexec/``${CC} --print-prog-name=ld-elf.so.1` `${CC} --print-file-name=crt1.o` `${CC} --print-file-name=crti.o` `${CC} --print-file-name=crtbegin.o`'
- 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`'
- ;;
-
-*-*-linux*aout* | *-*-linux*oldld)
- HOSTING_CRT0=/usr/lib/crt0.o
- ;;
-
-*-*-linux*libc1*)
- HOSTING_CRT0='-dynamic-linker /lib/ld-linux.so.1 /usr/lib/crt1.o /usr/lib/crti.o `if [ -f ../gcc/crtbegin.o ]; then echo ../gcc/crtbegin.o; elif [ -f /usr/lib/crtbegin.o ]; then echo /usr/lib/crtbegin.o; else ${CC} --print-file-name=crtbegin.o; fi`'
- HOSTING_LIBS="$HOSTING_LIBS"' `if [ -f ../gcc/crtend.o ]; then echo ../gcc/crtend.o; elif [ -f /usr/lib/crtend.o ]; then echo /usr/lib/crtend.o; else ${CC} --print-file-name=crtend.o; fi` /usr/lib/crtn.o'
- ;;
-
-*-*-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_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`'
- ;;
-
-*-*-netbsd*)
- # Different versions of NetBSD with the ELF object format use different
- # sets of start/end files.
- HOSTING_CRT0='-dynamic-linker /usr/libexec/ld.elf_so /usr/lib/crt0.o'
- if [ -f `${CC} --print-file-name=crti.o` ]; then
- # Support for GCC's crtstuff present.
- HOSTING_CRT0="$HOSTING_CRT0 `${CC} --print-file-name=crti.o`"
- if [ -f ../gcc/crtbegin.o ]; then
- HOSTING_CRT0="$HOSTING_CRT0 ../gcc/crtbegin.o"
- else
- HOSTING_CRT0="$HOSTING_CRT0 `${CC} --print-file-name=crtbegin.o`"
- fi
- else
- # Support for GCC's crtstuff not present.
- HOSTING_CRT0="$HOSTING_CRT0 `${CC} --print-file-name=crtbegin.o`"
- fi
- if [ -f `${CC} --print-file-name=crtn.o` ]; then
- # Support for GCC's crtstuff present.
- if [ -f ../gcc/crtbegin.o ]; then
- HOSTING_LIBS="$HOSTING_LIBS ../gcc/crtend.o"
- else
- HOSTING_LIBS="$HOSTING_LIBS `${CC} --print-file-name=crtend.o`"
- fi
- HOSTING_LIBS="$HOSTING_LIBS `${CC} --print-file-name=crtn.o`"
- else
- # Support for GCC's crtstuff not present.
- HOSTING_LIBS="$HOSTING_LIBS `${CC} --print-file-name=crtend.o`"
- fi
- ;;
-
-esac
-
-#
-# Now more specific configurations
-#
-
-case "${host}" in
-
-*-*-linux*aout* | *-*-linux*oldld | *-*-linux*libc1*)
- # No further tweaking needed
- ;;
-
-am33_2.0-*-linux*)
- HOSTING_CRT0=`echo "$HOSTING_CRT0" | sed -e "s,ld\[^ \]\*,ld-linux,g"`
- ;;
-
-arm*-*-linux-gnu*)
- HOSTING_CRT0='-p '`echo "$HOSTING_CRT0" | sed -e "s,ld\[^ \]\*,ld-linux,g"`
- ;;
-
-hppa*64*-*-hpux11*)
- HOSTING_CRT0=/usr/ccs/lib/pa20_64/crt0.o
- # Even if CC is not gcc, the tests use gcc.
- HOSTING_LIBS='--start-group `if [ -f ../gcc/libgcc.a ]; then echo ../gcc/libgcc.a; else if test "$GCC" = yes; then ${CC} --print-libgcc-file-name; else gcc --print-libgcc-file-name; fi fi` -lc --end-group /usr/lib/pa20_64/milli.a'
- ;;
-
-i[3-7]86-*-bsd* | i[3-7]86-*-freebsd[12] | i[3-7]86-*-freebsd[12]\.* | i[3-7]86-*-freebsd*aout*)
- HOSTING_CRT0=/usr/lib/crt0.o
- ;;
-
-i[3-7]86-*-sysv4*)
- HOSTING_CRT0='/usr/ccs/lib/crt1.o /usr/ccs/lib/crti.o /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` /usr/ccs/lib/crtn.o'
- ;;
-
-i[3-7]86-sequent-ptx* | i[3-7]86-sequent-sysv*)
- HOSTING_CRT0='/lib/crt0.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`'
- ;;
-
-i[3-7]86-*-sysv*)
- HOSTING_CRT0='/lib/crt1.o `if [ -f ../gcc/crtbegin.o ]; then echo ../gcc/crtbegin.o; fi`'
- HOSTING_LIBS="$HOSTING_LIBS"' `if [ -f ../gcc/crtend.o ]; then echo ../gcc/crtend.o; fi` /lib/crtn.o'
- ;;
-
-i[3-7]86-*-solaris*)
- 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`'
- ;;
-
-i[3-7]86-*-sco* | i[3-7]86-*-isc*)
- # In some configurations gcc does not use crtbegin.o and crtend.o.
- # In that case gcc -print-file-name=crtbegin.o will simply print
- # crtbegin.o. We create dummy crtbegin.o and crtend.o files to
- # handle this.
- echo "int dummy_crtbegin () { return 0; }" > crtbegin.c
- ${CC} -c crtbegin.c -o crtbegin.o
- rm -f crtbegin.c
- echo "int dummy_crteng () { return 0; }" > crtend.c
- ${CC} -c crtend.c -o crtend.o
- rm -f crtend.c
- HOSTING_CRT0='/lib/crt1.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` /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'
- ;;
-
-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"`
- ;;
-
-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`'
- ;;
-
-mips*-sgi-irix4* | mips*-sgi-irix5*)
- HOSTING_CRT0=/usr/lib/crt1.o
- HOSTING_LIBS="$HOSTING_LIBS"' /usr/lib/crtn.o'
- ;;
-
-mips*-sgi-irix6*)
- HOSTING_CRT0='/usr/lib32/crt1.o `if [ -f ../gcc/crtbegin.o ]; then echo ../gcc/crtbegin.o ; else ${CC} -print-file-name=crtbegin.o; fi`'
- 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,"`
- ;;
-
-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*-motorola-sysv)
- HOSTING_CRT0='`if [ -f ../gcc/crt0.o ]; then echo ../gcc/crt0.o; elif [ -f \`${CC} -print-file-name=\`crt0.o ]; then echo \`${CC} -print-file-name=\`crt0.o; else echo /lib/crt0.o; fi`'
- HOSTING_LIBS=`echo "$HOSTING_LIBS" | sed -e "s,-lc,-lc881,"`
- ;;
-
-m68*-sun-*)
- HOSTING_CRT0='/usr/lib/crt0.o /usr/lib/Fcrt1.o -L/usr/lib/fsoft.o'
- ;;
-
-m88*-*-dgux*)
- HDEFINES=-D__using_DGUX
- HOSTING_CRT0='/lib/crt0.o -X'
- HOSTING_LIBS=/usr/sde/m88kbcs/lib/libc.a
- ;;
-
-m88*-motorola-sysv3)
- HOSTING_CRT0='/lib/crt0.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`'
- ;;
-
-powerpc64*-*-linux-gnu*)
- HOSTING_CRT0=`echo "$HOSTING_CRT0" | sed -e "s,\\\`egrep.*\"\\\`,/lib64/ld64.so.1,"`
- ;;
-
-powerpc*-*-linux-gnu*)
- HOSTING_CRT0=`echo "$HOSTING_CRT0" | sed -e "s,\\\`egrep.*\"\\\`,/lib/ld.so.1,"`
- ;;
-
-s390x-*-linux-gnu*)
- HOSTING_CRT0=`echo "$HOSTING_CRT0" | sed -e "s,\\\`egrep.*\"\\\`,/lib/ld64.so.1,"`
- ;;
-
-s390-*-linux-gnu*)
- HOSTING_CRT0=`echo "$HOSTING_CRT0" | sed -e "s,\\\`egrep.*\"\\\`,/lib/ld.so.1,"`
- ;;
-
-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-*-linux-gnu*)
- HOSTING_CRT0=`echo "$HOSTING_CRT0" | sed -e "s,\\\`egrep.*\"\\\`,/lib64/ld-linux.so.2,"`
- ;;
-
-x86_64-*-linux-gnu*)
- HOSTING_CRT0=`echo "$HOSTING_CRT0" | sed -e "s,\\\`egrep.*\"\\\`,/lib64/ld-linux-x86-64.so.2,"`
- ;;
-
-*-*-freebsd* | *-*-kfreebsd*-gnu)
- ;;
-
-*-*-linux*)
- ;;
-
-*-*-netbsd*)
- ;;
-
-alpha*-*-*)
- HOSTING_CRT0=/usr/ccs/lib/crt0.o
- ;;
-
-esac
diff --git a/contrib/binutils/ld/configure.in b/contrib/binutils/ld/configure.in
deleted file mode 100644
index 4358cbe..0000000
--- a/contrib/binutils/ld/configure.in
+++ /dev/null
@@ -1,265 +0,0 @@
-dnl Process this file with autoconf to produce a configure script
-dnl
-AC_PREREQ(2.13)
-AC_INIT(ldmain.c)
-
-AC_CANONICAL_SYSTEM
-AC_ISC_POSIX
-
-changequote(,)dnl
-BFD_VERSION=`sed -n -e 's/^.._INIT_AUTOMAKE.*,[ ]*\([^ ]*\)[ ]*).*/\1/p' < ${srcdir}/../bfd/configure.in`
-changequote([,])dnl
-AM_INIT_AUTOMAKE(ld, ${BFD_VERSION})
-
-AM_PROG_LIBTOOL
-
-AC_ARG_WITH(lib-path, [ --with-lib-path=dir1:dir2... set default LIB_PATH],LIB_PATH=$withval)
-AC_ARG_ENABLE(targets,
-[ --enable-targets alternative target configurations],
-[case "${enableval}" in
- yes | "") AC_ERROR(enable-targets option must specify target names or 'all')
- ;;
- no) enable_targets= ;;
- *) enable_targets=$enableval ;;
-esac])dnl
-AC_ARG_ENABLE(64-bit-bfd,
-[ --enable-64-bit-bfd 64-bit support (on hosts with narrower word sizes)],
-[case "${enableval}" in
- yes) want64=true ;;
- no) want64=false ;;
- *) AC_MSG_ERROR(bad value ${enableval} for 64-bit-bfd option) ;;
-esac],[want64=false])dnl
-
-AC_ARG_WITH(sysroot,
-[ --with-sysroot[=DIR] Search for usr/lib et al within DIR.],
-[
- 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
-], [
- use_sysroot=no
- TARGET_SYSTEM_ROOT=
- TARGET_SYSTEM_ROOT_DEFINE='-DTARGET_SYSTEM_ROOT=\"\"'
-])
-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_CONFIG_HEADER(config.h:config.in)
-
-if test -z "$target" ; then
- AC_MSG_ERROR(Unrecognized target system type; please check config.sub.)
-fi
-if test -z "$host" ; then
- AC_MSG_ERROR(Unrecognized host system type; please check config.sub.)
-fi
-
-# host-specific stuff:
-
-AC_PROG_CC
-AC_PROG_INSTALL
-
-ALL_LINGUAS="fr sv tr es da"
-CY_GNU_GETTEXT
-
-AC_EXEEXT
-
-AC_PROG_YACC
-AM_PROG_LEX
-
-AM_MAINTAINER_MODE
-
-. ${srcdir}/configure.host
-
-AC_SUBST(HDEFINES)
-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_HEADER_DIRENT
-
-BFD_BINARY_FOPEN
-
-BFD_NEED_DECLARATION(strstr)
-BFD_NEED_DECLARATION(free)
-BFD_NEED_DECLARATION(sbrk)
-BFD_NEED_DECLARATION(getenv)
-BFD_NEED_DECLARATION(environ)
-
-# 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.
-AC_MSG_CHECKING([whether ANSI C string concatenation works])
-AC_CACHE_VAL(ld_cv_string_concatenation,
-[AC_TRY_COMPILE(,[char *a = "a" "a";],
- [ld_cv_string_concatenation=yes],
- [ld_cv_string_concatenation=no])])
-AC_MSG_RESULT($ld_cv_string_concatenation)
-if test "$ld_cv_string_concatenation" = "yes"; then
- STRINGIFY=astring.sed
-else
- STRINGIFY=ostring.sed
-fi
-AC_SUBST(STRINGIFY)
-
-# target-specific stuff:
-
-all_targets=
-EMUL=
-all_emuls=
-all_emul_extras=
-all_libpath=
-
-dnl We need to get an arbitrary number of tdir definitions into
-dnl Makefile. We can't do it using AC_SUBST, because autoconf does
-dnl not permit literal newlines in an AC_SUBST variables. So we use a
-dnl file.
-rm -f tdirs
-
-for targ_alias in `echo $target_alias $enable_targets | sed 's/,/ /g'`
-do
- if test "$targ_alias" = "all"; then
- all_targets=true
- else
- # Canonicalize the secondary target names.
- result=`$ac_config_sub $targ_alias 2>/dev/null`
- if test -n "$result"; then
- targ=$result
- else
- targ=$targ_alias
- fi
-
- . ${srcdir}/configure.tgt
-
- if test "$targ" = "$target"; then
- EMUL=$targ_emul
- fi
-
- for i in $targ_emul $targ_extra_emuls $targ_extra_libpath; do
- case " $all_emuls " in
- *" e${i}.o "*) ;;
- *)
- all_emuls="$all_emuls e${i}.o"
- eval result=\$tdir_$i
- test -z "$result" && result=$targ_alias
- echo tdir_$i=$result >> tdirs
- ;;
- esac
- done
-
- for i in $targ_emul $targ_extra_libpath; do
- case " $all_libpath " in
- *" ${i} "*) ;;
- *)
- if test -z "$all_libpath"; then
- all_libpath=${i}
- else
- all_libpath="$all_libpath ${i}"
- fi
- ;;
- esac
- done
-
- for i in $targ_extra_ofiles; do
- case " $all_emul_extras " in
- *" ${i} "*) ;;
- *)
- all_emul_extras="$all_emul_extras ${i}"
- ;;
- esac
- done
- fi
-done
-
-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} = xtrue; then
- EMULATION_OFILES='$(ALL_EMULATIONS) $(ALL_64_EMULATIONS)'
- else
- EMULATION_OFILES='$(ALL_EMULATIONS)'
- fi
- EMUL_EXTRA_OFILES='$(ALL_EMUL_EXTRA_OFILES)'
-else
- EMULATION_OFILES=$all_emuls
- EMUL_EXTRA_OFILES=$all_emul_extras
-fi
-AC_SUBST(EMULATION_OFILES)
-AC_SUBST(EMUL_EXTRA_OFILES)
-AC_SUBST(LIB_PATH)
-
-EMULATION_LIBPATH=$all_libpath
-AC_SUBST(EMULATION_LIBPATH)
-
-if test x${enable_static} = xno; then
- TESTBFDLIB="--rpath ../bfd/.libs ../bfd/.libs/libbfd.so"
-else
- TESTBFDLIB="../bfd/.libs/libbfd.a"
-fi
-AC_SUBST(TESTBFDLIB)
-
-target_vendor=${target_vendor=$host_vendor}
-case "$target_vendor" in
- hp) EXTRA_SHLIB_EXTENSION=".sl" ;;
- *) EXTRA_SHLIB_EXTENSION= ;;
-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])
diff --git a/contrib/binutils/ld/configure.tgt b/contrib/binutils/ld/configure.tgt
deleted file mode 100644
index 9b29291..0000000
--- a/contrib/binutils/ld/configure.tgt
+++ /dev/null
@@ -1,624 +0,0 @@
-# This is the linker target specific file. This is invoked by the
-# autoconf generated configure script. Putting it in a separate shell
-# file lets us skip running autoconf when modifying target specific
-# information.
-
-# This file switches on the shell variable ${targ}, and sets the
-# following shell variables:
-# targ_emul name of linker emulation to use
-# 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
-# NATIVE_LIB_DIRS library directories to search on this host
-# (if we are a native or sysrooted linker)
-
-targ_extra_emuls=
-targ_extra_ofiles=
-
-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 ;
- targ_extra_ofiles="deffilep.o pe-dll.o" ;;
-arm-*-pe) targ_emul=armpe ;
- targ_extra_ofiles="deffilep.o pe-dll.o" ;;
-arc-*-elf*) targ_emul=arcelf ;;
-avr-*-*) targ_emul=avr2
- targ_extra_emuls="avr1 avr3 avr4 avr5" ;;
-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
- targ_extra_emuls="crisaout crislinux"
- targ_extra_libpath=$targ_extra_emuls ;;
-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//'`
- ;;
-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-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
- ;;
-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
- ;;
-sparc*-*-lynxos*) targ_emul=sparclynx ;;
-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*-*-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 ;;
-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-*-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//'`
- ;;
-i[3-7]86-*-linux*oldld) targ_emul=i386linux; targ_extra_emuls=elf_i386 ;;
-i[3-7]86-*-linux-gnu*) 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
- 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/'`
- ;;
-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"
- ;;
-i[3-7]86-*-unixware) targ_emul=elf_i386 ;;
-i[3-7]86-*-solaris*) targ_emul=elf_i386_ldso
- targ_extra_emuls="elf_i386"
- ;;
-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
- ;;
-i[3-7]86-*-netbsdpe*) targ_emul=i386pe
- targ_extra_ofiles="deffilep.o pe-dll.o"
- ;;
-i[3-7]86-*-netbsd*) targ_emul=i386nbsd
- 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
- ;;
-i[3-7]86-*-netware) targ_emul=i386nw ;;
-i[3-7]86-*-elf*) targ_emul=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 ;;
-i[3-7]86-*-freebsd* | i[3-7]86-*-kfreebsd*-gnu)
- targ_emul=elf_i386_fbsd
- targ_extra_emuls="elf_i386 i386bsd" ;;
-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} \
- | 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 ;;
-i[3-7]86-*-gnu*) targ_emul=elf_i386 ;;
-i[3-7]86-*-msdos*) targ_emul=i386msdos; targ_extra_emuls=i386aout ;;
-i[3-7]86-*-moss*) targ_emul=i386moss; targ_extra_emuls=i386msdos ;;
-i[3-7]86-*-winnt*) targ_emul=i386pe ;
- targ_extra_ofiles="deffilep.o pe-dll.o" ;;
-i[3-7]86-*-pe) targ_emul=i386pe ;
- targ_extra_ofiles="deffilep.o pe-dll.o" ;;
-i[3-7]86-*-cygwin*) targ_emul=i386pe ;
- targ_extra_ofiles="deffilep.o pe-dll.o"
- test "$targ" != "$host" && LIB_PATH='${tooldir}/lib/w32api' ;;
-i[3-7]86-*-mingw32*) targ_emul=i386pe ;
- targ_extra_ofiles="deffilep.o pe-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"
- ;;
-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
- ;;
-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* | sh-*-vxworks)
- targ_emul=shelf
- targ_extra_emuls="shlelf sh shl"
- ;;
-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
- ;;
-m68k-sony-*) targ_emul=news ;;
-m68k-hp-bsd*) targ_emul=hp300bsd ;;
-m68*-motorola-sysv*) targ_emul=delta68 ;;
-m68*-*-aout) targ_emul=m68kaout ;;
-m68*-*-coff) targ_emul=m68kcoff ;;
-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
- targ_extra_emuls=m68klinux
- 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
- targ_extra_emuls="m68knbsd m68k4knbsd" ;;
-m68*-*-netbsdaout* | m68*-*-netbsd*)
- targ_emul=m68knbsd
- 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 ;;
-mips*-*-pe) targ_emul=mipspe ;
- targ_extra_ofiles="deffilep.o pe-dll.o" ;;
-mips*-dec-ultrix*) targ_emul=mipslit ;;
-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
- ;;
-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*-*-bsd*) targ_emul=mipsbig ;;
-mips*vr4300el-*-elf*) targ_emul=elf32l4300 ;;
-mips*vr4300-*-elf*) targ_emul=elf32b4300 ;;
-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-*-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*-*-windiss) targ_emul=elf32mipswindiss ;;
-mips64*el-*-linux-gnu*) targ_emul=elf32ltsmipn32
- targ_extra_emuls="elf32btsmipn32 elf32ltsmip elf32btsmip elf64ltsmip elf64btsmip"
- ;;
-mips64*-*-linux-gnu*) targ_emul=elf32btsmipn32
- targ_extra_emuls="elf32ltsmipn32 elf32btsmip elf32ltsmip elf64btsmip elf64ltsmip"
- ;;
-mips*el-*-linux-gnu*) targ_emul=elf32ltsmip
- targ_extra_emuls="elf32btsmip elf32ltsmipn32 elf64ltsmip elf32btsmipn32 elf64btsmip"
- ;;
-mips*-*-linux-gnu*) targ_emul=elf32btsmip
- targ_extra_emuls="elf32ltsmip elf32btsmipn32 elf64btsmip elf32ltsmipn32 elf64ltsmip"
- ;;
-mips*-*-lnews*) targ_emul=mipslnews ;;
-mips*-*-sysv4*) targ_emul=elf32btsmip ;;
-mmix-*-*) targ_emul=mmo
- targ_extra_emuls=elf64mmix
- ;;
-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/'`
- ;;
-alpha*-*-linuxecoff*) targ_emul=alpha targ_extra_emuls=elf64alpha
- tdir_elf64alpha=`echo ${targ_alias} | sed -e 's/ecoff//'`
- ;;
-alpha*-*-linux-gnu*) targ_emul=elf64alpha targ_extra_emuls=alpha
- tdir_alpha=`echo ${targ_alias} | sed -e 's/linux/linuxecoff/'`
- ;;
-alpha*-*-osf*) targ_emul=alpha ;;
-alpha*-*-gnu*) targ_emul=elf64alpha ;;
-alpha*-*-netware*) targ_emul=alpha ;;
-alpha*-*-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 ;;
-pjl*-*-*) targ_emul=pjlelf ; targ_extra_emuls="elf_i386" ;;
-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 ;;
-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 ;;
-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-*-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 ;;
-powerpcle-*-pe) targ_emul=ppcpe ;;
-powerpcle-*-winnt*) targ_emul=ppcpe ;;
-powerpcle-*-cygwin*) targ_emul=ppcpe ;;
-powerpc-*-aix5*) targ_emul=aix5ppc ;;
-powerpc-*-aix*) targ_emul=aixppc ;;
-powerpc-*-beos*) targ_emul=aixppc ;;
-powerpc-*-windiss*) targ_emul=elf32ppcwindiss ;;
-rs6000-*-aix5*) targ_emul=aix5rs6 ;;
-rs6000-*-aix*) targ_emul=aixrs6 ;;
-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 ;;
-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 ;;
-
-*)
- echo 2>&1 "*** ld does not support target ${targ}"
- echo 2>&1 "*** see ld/configure.tgt for supported targets"
- exit 1
-
-esac
-
-NATIVE_LIB_DIRS='/usr/local/lib /lib /usr/lib'
-case "${target}" in
-
-*-*-freebsd*)
- NATIVE_LIB_DIRS='/lib /usr/lib /usr/local/lib'
- ;;
-
-hppa*64*-*-hpux11*)
- NATIVE_LIB_DIRS=/usr/lib/pa20_64
- ;;
-
-i[3-7]86-*-sysv4*)
- NATIVE_LIB_DIRS='/usr/local/lib /usr/ccs/lib /lib /usr/lib'
- ;;
-
-i[3-7]86-*-solaris*)
- NATIVE_LIB_DIRS='/usr/local/lib /usr/ccs/lib /lib /usr/lib'
- ;;
-
-i[3-7]86-pc-interix*)
- NATIVE_LIB_DIRS='/usr/local/lib $$INTERIX_ROOT/usr/lib /lib /usr/lib'
- ;;
-
-ia64-*-aix*)
- NATIVE_LIB_DIRS='/usr/local/lib /usr/lib/ia64l64 /lib /usr/lib'
- ;;
-
-sparc*-*-solaris2*)
- NATIVE_LIB_DIRS='/usr/local/lib /usr/ccs/lib /lib /usr/lib'
- ;;
-
-i[03-9x]86-*-cygwin*)
- NATIVE_LIB_DIRS='/usr/lib /usr/lib/w32api'
- ;;
-
-*-*-linux*)
- ;;
-
-*-*-freebsd*)
- ;;
-
-*-*-netbsd*)
- ;;
-
-alpha*-*-*)
- NATIVE_LIB_DIRS='/usr/local/lib /usr/ccs/lib /lib /usr/lib'
- ;;
-
-esac
diff --git a/contrib/binutils/ld/deffile.h b/contrib/binutils/ld/deffile.h
deleted file mode 100644
index f1e3301..0000000
--- a/contrib/binutils/ld/deffile.h
+++ /dev/null
@@ -1,103 +0,0 @@
-/* deffile.h - header for .DEF file parser
- Copyright 1998, 1999, 2000, 2002, 2003 Free Software Foundation, Inc.
- Written by DJ Delorie dj@cygnus.com
-
- 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, 59 Temple Place - Suite 330, Boston, MA
- 02111-1307, USA. */
-
-#ifndef DEFFILE_H
-#define DEFFILE_H
-
-/* DEF storage definitions. Note that any ordinal may be zero, and
- any pointer may be NULL, if not defined by the DEF file. */
-
-typedef struct def_file_section {
- char *name; /* always set */
- char *class; /* may be NULL */
- char flag_read, flag_write, flag_execute, flag_shared;
-} def_file_section;
-
-typedef struct def_file_export {
- char *name; /* always set */
- char *internal_name; /* always set, may == name */
- int ordinal; /* -1 if not specified */
- int hint;
- char flag_private, flag_constant, flag_noname, flag_data;
-} def_file_export;
-
-typedef struct def_file_module {
- struct def_file_module *next;
- void *user_data;
- char name[1]; /* extended via malloc */
-} def_file_module;
-
-typedef struct def_file_import {
- char *internal_name; /* always set */
- def_file_module *module; /* always set */
- char *name; /* may be NULL; either this or ordinal will be set */
- int ordinal; /* may be -1 */
- int data; /* = 1 if data */
-} def_file_import;
-
-typedef struct def_file {
- /* From the NAME or LIBRARY command. */
- char *name;
- int is_dll; /* -1 if NAME/LIBRARY not given */
- bfd_vma base_address; /* (bfd_vma)(-1) if unspecified */
-
- /* From the DESCRIPTION command. */
- char *description;
-
- /* From the STACK/HEAP command, -1 if unspecified. */
- int stack_reserve, stack_commit;
- int heap_reserve, heap_commit;
-
- /* From the SECTION/SEGMENT commands. */
- int num_section_defs;
- def_file_section *section_defs;
-
- /* From the EXPORTS commands. */
- int num_exports;
- def_file_export *exports;
-
- /* Used by imports for module names. */
- def_file_module *modules;
-
- /* From the IMPORTS commands. */
- int num_imports;
- def_file_import *imports;
-
- /* From the VERSION command, -1 if not specified. */
- int version_major, version_minor;
-} def_file;
-
-extern def_file *def_file_empty (void);
-
-/* The second arg may be NULL. If not, this .def is appended to it. */
-extern def_file *def_file_parse (const char *, def_file *);
-extern void def_file_free (def_file *);
-extern def_file_export *def_file_add_export (def_file *, const char *,
- const char *, int);
-extern def_file_import *def_file_add_import (def_file *, const char *,
- const char *, int, const char *);
-extern void def_file_add_directive (def_file *, const char *, int);
-extern def_file_module *def_get_module (def_file *, const char *);
-#ifdef DEF_FILE_PRINT
-extern void def_file_print (FILE *, def_file *);
-#endif
-
-#endif /* DEFFILE_H */
diff --git a/contrib/binutils/ld/deffilep.y b/contrib/binutils/ld/deffilep.y
deleted file mode 100644
index 80cf548..0000000
--- a/contrib/binutils/ld/deffilep.y
+++ /dev/null
@@ -1,1067 +0,0 @@
-%{ /* deffilep.y - parser for .def files */
-
-/* Copyright 1995, 1997, 1998, 1999, 2000, 2001, 2002, 2003
- Free Software Foundation, Inc.
-
- This file is part of GNU Binutils.
-
- 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. */
-
-#include <stdio.h>
-#include "libiberty.h"
-#include "safe-ctype.h"
-#include "bfd.h"
-#include "sysdep.h"
-#include "ld.h"
-#include "ldmisc.h"
-#include "deffile.h"
-
-#define TRACE 0
-
-#define ROUND_UP(a, b) (((a)+((b)-1))&~((b)-1))
-
-/* Remap normal yacc parser interface names (yyparse, yylex, yyerror, etc),
- as well as gratuitiously global symbol names, so we can have multiple
- yacc generated parsers in ld. Note that these are only the variables
- produced by yacc. If other parser generators (bison, byacc, etc) produce
- additional global names that conflict at link time, then those parser
- generators need to be fixed instead of adding those names to this list. */
-
-#define yymaxdepth def_maxdepth
-#define yyparse def_parse
-#define yylex def_lex
-#define yyerror def_error
-#define yylval def_lval
-#define yychar def_char
-#define yydebug def_debug
-#define yypact def_pact
-#define yyr1 def_r1
-#define yyr2 def_r2
-#define yydef def_def
-#define yychk def_chk
-#define yypgo def_pgo
-#define yyact def_act
-#define yyexca def_exca
-#define yyerrflag def_errflag
-#define yynerrs def_nerrs
-#define yyps def_ps
-#define yypv def_pv
-#define yys def_s
-#define yy_yys def_yys
-#define yystate def_state
-#define yytmp def_tmp
-#define yyv def_v
-#define yy_yyv def_yyv
-#define yyval def_val
-#define yylloc def_lloc
-#define yyreds def_reds /* With YYDEBUG defined. */
-#define yytoks def_toks /* With YYDEBUG defined. */
-#define yylhs def_yylhs
-#define yylen def_yylen
-#define yydefred def_yydefred
-#define yydgoto def_yydgoto
-#define yysindex def_yysindex
-#define yyrindex def_yyrindex
-#define yygindex def_yygindex
-#define yytable def_yytable
-#define yycheck def_yycheck
-
-static void def_description (const char *);
-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_section (const char *, int);
-static void def_section_alt (const char *, const char *);
-static void def_stacksize (int, int);
-static void def_version (int, int);
-static void def_directive (char *);
-static int def_parse (void);
-static int def_error (const char *);
-static int def_lex (void);
-
-static int lex_forced_token = 0;
-static const char *lex_parse_string = 0;
-static const char *lex_parse_string_end = 0;
-
-%}
-
-%union {
- char *id;
- int number;
-};
-
-%token NAME LIBRARY DESCRIPTION STACKSIZE HEAPSIZE CODE DATAU DATAL
-%token SECTIONS EXPORTS IMPORTS VERSIONK BASE CONSTANTU CONSTANTL
-%token PRIVATEU PRIVATEL
-%token READ WRITE EXECUTE SHARED NONAMEU NONAMEL DIRECTIVE
-%token <id> ID
-%token <number> NUMBER
-%type <number> opt_base opt_ordinal
-%type <number> attr attr_list opt_number exp_opt_list exp_opt
-%type <id> opt_name opt_equal_name dot_name
-
-%%
-
-start: start command
- | command
- ;
-
-command:
- NAME opt_name opt_base { def_name ($2, $3); }
- | LIBRARY opt_name opt_base { def_library ($2, $3); }
- | DESCRIPTION ID { def_description ($2);}
- | STACKSIZE NUMBER opt_number { def_stacksize ($2, $3);}
- | HEAPSIZE NUMBER opt_number { def_heapsize ($2, $3);}
- | CODE attr_list { def_section ("CODE", $2);}
- | DATAU attr_list { def_section ("DATA", $2);}
- | SECTIONS seclist
- | EXPORTS explist
- | IMPORTS implist
- | VERSIONK NUMBER { def_version ($2, 0);}
- | VERSIONK NUMBER '.' NUMBER { def_version ($2, $4);}
- | DIRECTIVE ID { def_directive ($2);}
- ;
-
-
-explist:
- /* EMPTY */
- | expline
- | explist expline
- ;
-
-expline:
- /* The opt_comma is necessary to support both the usual
- DEF file syntax as well as .drectve syntax which
- mandates <expsym>,<expoptlist>. */
- dot_name opt_equal_name opt_ordinal opt_comma exp_opt_list
- { def_exports ($1, $2, $3, $5); }
- ;
-exp_opt_list:
- /* The opt_comma is necessary to support both the usual
- DEF file syntax as well as .drectve syntax which
- allows for comma separated opt list. */
- exp_opt opt_comma exp_opt_list { $$ = $1 | $3; }
- | { $$ = 0; }
- ;
-exp_opt:
- NONAMEU { $$ = 1; }
- | NONAMEL { $$ = 1; }
- | CONSTANTU { $$ = 2; }
- | CONSTANTL { $$ = 2; }
- | DATAU { $$ = 4; }
- | DATAL { $$ = 4; }
- | PRIVATEU { $$ = 8; }
- | PRIVATEL { $$ = 8; }
- ;
-implist:
- implist impline
- | impline
- ;
-
-impline:
- ID '=' ID '.' ID '.' ID { def_import ($1, $3, $5, $7, -1); }
- | ID '=' ID '.' ID '.' NUMBER { def_import ($1, $3, $5, 0, $7); }
- | ID '=' ID '.' ID { def_import ($1, $3, 0, $5, -1); }
- | ID '=' ID '.' NUMBER { def_import ($1, $3, 0, 0, $5); }
- | ID '.' ID '.' ID { def_import ( 0, $1, $3, $5, -1); }
- | ID '.' ID { def_import ( 0, $1, 0, $3, -1); }
-;
-
-seclist:
- seclist secline
- | secline
- ;
-
-secline:
- ID attr_list { def_section ($1, $2);}
- | ID ID { def_section_alt ($1, $2);}
- ;
-
-attr_list:
- attr_list opt_comma attr { $$ = $1 | $3; }
- | attr { $$ = $1; }
- ;
-
-opt_comma:
- ','
- |
- ;
-opt_number: ',' NUMBER { $$=$2;}
- | { $$=-1;}
- ;
-
-attr:
- READ { $$ = 1;}
- | WRITE { $$ = 2;}
- | EXECUTE { $$=4;}
- | SHARED { $$=8;}
- ;
-
-opt_name: ID { $$ = $1; }
- | ID '.' ID
- {
- char *name = xmalloc (strlen ($1) + 1 + strlen ($3) + 1);
- sprintf (name, "%s.%s", $1, $3);
- $$ = name;
- }
- | { $$ = ""; }
- ;
-
-opt_ordinal:
- '@' NUMBER { $$ = $2;}
- | { $$ = -1;}
- ;
-
-opt_equal_name:
- '=' dot_name { $$ = $2; }
- | { $$ = 0; }
- ;
-
-opt_base: BASE '=' NUMBER { $$ = $3;}
- | { $$ = -1;}
- ;
-
-dot_name: ID { $$ = $1; }
- | dot_name '.' ID
- {
- char *name = xmalloc (strlen ($1) + 1 + strlen ($3) + 1);
- sprintf (name, "%s.%s", $1, $3);
- $$ = name;
- }
- ;
-
-
-%%
-
-/*****************************************************************************
- API
- *****************************************************************************/
-
-static FILE *the_file;
-static const char *def_filename;
-static int linenumber;
-static def_file *def;
-static int saw_newline;
-
-struct directive
- {
- struct directive *next;
- char *name;
- int len;
- };
-
-static struct directive *directives = 0;
-
-def_file *
-def_file_empty (void)
-{
- def_file *rv = xmalloc (sizeof (def_file));
- memset (rv, 0, sizeof (def_file));
- rv->is_dll = -1;
- rv->base_address = (bfd_vma) -1;
- rv->stack_reserve = rv->stack_commit = -1;
- rv->heap_reserve = rv->heap_commit = -1;
- rv->version_major = rv->version_minor = -1;
- return rv;
-}
-
-def_file *
-def_file_parse (const char *filename, def_file *add_to)
-{
- struct directive *d;
-
- the_file = fopen (filename, "r");
- def_filename = filename;
- linenumber = 1;
- if (!the_file)
- {
- perror (filename);
- return 0;
- }
- if (add_to)
- {
- def = add_to;
- }
- else
- {
- def = def_file_empty ();
- }
-
- saw_newline = 1;
- if (def_parse ())
- {
- def_file_free (def);
- fclose (the_file);
- return 0;
- }
-
- fclose (the_file);
-
- for (d = directives; d; d = d->next)
- {
-#if TRACE
- printf ("Adding directive %08x `%s'\n", d->name, d->name);
-#endif
- def_file_add_directive (def, d->name, d->len);
- }
-
- return def;
-}
-
-void
-def_file_free (def_file *def)
-{
- int i;
-
- if (!def)
- return;
- if (def->name)
- free (def->name);
- if (def->description)
- free (def->description);
-
- if (def->section_defs)
- {
- for (i = 0; i < def->num_section_defs; i++)
- {
- if (def->section_defs[i].name)
- free (def->section_defs[i].name);
- if (def->section_defs[i].class)
- free (def->section_defs[i].class);
- }
- free (def->section_defs);
- }
-
- if (def->exports)
- {
- for (i = 0; i < def->num_exports; i++)
- {
- if (def->exports[i].internal_name
- && def->exports[i].internal_name != def->exports[i].name)
- free (def->exports[i].internal_name);
- if (def->exports[i].name)
- free (def->exports[i].name);
- }
- free (def->exports);
- }
-
- if (def->imports)
- {
- for (i = 0; i < def->num_imports; i++)
- {
- if (def->imports[i].internal_name
- && def->imports[i].internal_name != def->imports[i].name)
- free (def->imports[i].internal_name);
- if (def->imports[i].name)
- free (def->imports[i].name);
- }
- free (def->imports);
- }
-
- while (def->modules)
- {
- def_file_module *m = def->modules;
- def->modules = def->modules->next;
- free (m);
- }
-
- free (def);
-}
-
-#ifdef DEF_FILE_PRINT
-void
-def_file_print (FILE *file, def_file *def)
-{
- int i;
-
- fprintf (file, ">>>> def_file at 0x%08x\n", def);
- if (def->name)
- fprintf (file, " name: %s\n", def->name ? def->name : "(unspecified)");
- if (def->is_dll != -1)
- fprintf (file, " is dll: %s\n", def->is_dll ? "yes" : "no");
- if (def->base_address != (bfd_vma) -1)
- fprintf (file, " base address: 0x%08x\n", def->base_address);
- if (def->description)
- fprintf (file, " description: `%s'\n", def->description);
- if (def->stack_reserve != -1)
- fprintf (file, " stack reserve: 0x%08x\n", def->stack_reserve);
- if (def->stack_commit != -1)
- fprintf (file, " stack commit: 0x%08x\n", def->stack_commit);
- if (def->heap_reserve != -1)
- fprintf (file, " heap reserve: 0x%08x\n", def->heap_reserve);
- if (def->heap_commit != -1)
- fprintf (file, " heap commit: 0x%08x\n", def->heap_commit);
-
- if (def->num_section_defs > 0)
- {
- fprintf (file, " section defs:\n");
-
- for (i = 0; i < def->num_section_defs; i++)
- {
- fprintf (file, " name: `%s', class: `%s', flags:",
- def->section_defs[i].name, def->section_defs[i].class);
- if (def->section_defs[i].flag_read)
- fprintf (file, " R");
- if (def->section_defs[i].flag_write)
- fprintf (file, " W");
- if (def->section_defs[i].flag_execute)
- fprintf (file, " X");
- if (def->section_defs[i].flag_shared)
- fprintf (file, " S");
- fprintf (file, "\n");
- }
- }
-
- if (def->num_exports > 0)
- {
- fprintf (file, " exports:\n");
-
- for (i = 0; i < def->num_exports; i++)
- {
- fprintf (file, " name: `%s', int: `%s', ordinal: %d, flags:",
- def->exports[i].name, def->exports[i].internal_name,
- def->exports[i].ordinal);
- if (def->exports[i].flag_private)
- fprintf (file, " P");
- if (def->exports[i].flag_constant)
- fprintf (file, " C");
- if (def->exports[i].flag_noname)
- fprintf (file, " N");
- if (def->exports[i].flag_data)
- fprintf (file, " D");
- fprintf (file, "\n");
- }
- }
-
- if (def->num_imports > 0)
- {
- fprintf (file, " imports:\n");
-
- for (i = 0; i < def->num_imports; i++)
- {
- fprintf (file, " int: %s, from: `%s', name: `%s', ordinal: %d\n",
- def->imports[i].internal_name,
- def->imports[i].module,
- def->imports[i].name,
- def->imports[i].ordinal);
- }
- }
-
- if (def->version_major != -1)
- fprintf (file, " version: %d.%d\n", def->version_major, def->version_minor);
-
- fprintf (file, "<<<< def_file at 0x%08x\n", def);
-}
-#endif
-
-def_file_export *
-def_file_add_export (def_file *def,
- const char *external_name,
- const char *internal_name,
- int ordinal)
-{
- def_file_export *e;
- int max_exports = ROUND_UP(def->num_exports, 32);
-
- if (def->num_exports >= max_exports)
- {
- max_exports = ROUND_UP(def->num_exports + 1, 32);
- if (def->exports)
- def->exports = xrealloc (def->exports,
- max_exports * sizeof (def_file_export));
- else
- def->exports = xmalloc (max_exports * sizeof (def_file_export));
- }
- e = def->exports + def->num_exports;
- memset (e, 0, sizeof (def_file_export));
- if (internal_name && !external_name)
- external_name = internal_name;
- if (external_name && !internal_name)
- internal_name = external_name;
- e->name = xstrdup (external_name);
- e->internal_name = xstrdup (internal_name);
- e->ordinal = ordinal;
- def->num_exports++;
- return e;
-}
-
-def_file_module *
-def_get_module (def_file *def, const char *name)
-{
- def_file_module *s;
-
- for (s = def->modules; s; s = s->next)
- if (strcmp (s->name, name) == 0)
- return s;
-
- return NULL;
-}
-
-static def_file_module *
-def_stash_module (def_file *def, const char *name)
-{
- def_file_module *s;
-
- if ((s = def_get_module (def, name)) != NULL)
- return s;
- s = xmalloc (sizeof (def_file_module) + strlen (name));
- s->next = def->modules;
- def->modules = s;
- s->user_data = 0;
- strcpy (s->name, name);
- return s;
-}
-
-def_file_import *
-def_file_add_import (def_file *def,
- const char *name,
- const char *module,
- int ordinal,
- const char *internal_name)
-{
- def_file_import *i;
- int max_imports = ROUND_UP (def->num_imports, 16);
-
- if (def->num_imports >= max_imports)
- {
- max_imports = ROUND_UP (def->num_imports+1, 16);
-
- if (def->imports)
- def->imports = xrealloc (def->imports,
- max_imports * sizeof (def_file_import));
- else
- def->imports = xmalloc (max_imports * sizeof (def_file_import));
- }
- i = def->imports + def->num_imports;
- memset (i, 0, sizeof (def_file_import));
- if (name)
- i->name = xstrdup (name);
- if (module)
- i->module = def_stash_module (def, module);
- i->ordinal = ordinal;
- if (internal_name)
- i->internal_name = xstrdup (internal_name);
- else
- i->internal_name = i->name;
- def->num_imports++;
-
- return i;
-}
-
-struct
-{
- char *param;
- int token;
-}
-diropts[] =
-{
- { "-heap", HEAPSIZE },
- { "-stack", STACKSIZE },
- { "-attr", SECTIONS },
- { "-export", EXPORTS },
- { 0, 0 }
-};
-
-void
-def_file_add_directive (def_file *my_def, const char *param, int len)
-{
- def_file *save_def = def;
- const char *pend = param + len;
- char * tend = (char *) param;
- int i;
-
- def = my_def;
-
- while (param < pend)
- {
- while (param < pend
- && (ISSPACE (*param) || *param == '\n' || *param == 0))
- param++;
-
- if (param == pend)
- break;
-
- /* Scan forward until we encounter any of:
- - the end of the buffer
- - the start of a new option
- - a newline seperating options
- - a NUL seperating options. */
- for (tend = (char *) (param + 1);
- (tend < pend
- && !(ISSPACE (tend[-1]) && *tend == '-')
- && *tend != '\n' && *tend != 0);
- tend++)
- ;
-
- for (i = 0; diropts[i].param; i++)
- {
- int len = strlen (diropts[i].param);
-
- if (tend - param >= len
- && strncmp (param, diropts[i].param, len) == 0
- && (param[len] == ':' || param[len] == ' '))
- {
- lex_parse_string_end = tend;
- lex_parse_string = param + len + 1;
- lex_forced_token = diropts[i].token;
- saw_newline = 0;
- if (def_parse ())
- continue;
- break;
- }
- }
-
- if (!diropts[i].param)
- {
- char saved;
-
- saved = * tend;
- * tend = 0;
- /* xgettext:c-format */
- einfo (_("Warning: .drectve `%s' unrecognized\n"), param);
- * tend = saved;
- }
-
- lex_parse_string = 0;
- param = tend;
- }
-
- def = save_def;
-}
-
-/* Parser Callbacks. */
-
-static void
-def_name (const char *name, int base)
-{
- if (def->name)
- free (def->name);
- def->name = xstrdup (name);
- def->base_address = base;
- def->is_dll = 0;
-}
-
-static void
-def_library (const char *name, int base)
-{
- if (def->name)
- free (def->name);
- def->name = xstrdup (name);
- def->base_address = base;
- def->is_dll = 1;
-}
-
-static void
-def_description (const char *text)
-{
- int len = def->description ? strlen (def->description) : 0;
-
- len += strlen (text) + 1;
- if (def->description)
- {
- def->description = xrealloc (def->description, len);
- strcat (def->description, text);
- }
- else
- {
- def->description = xmalloc (len);
- strcpy (def->description, text);
- }
-}
-
-static void
-def_stacksize (int reserve, int commit)
-{
- def->stack_reserve = reserve;
- def->stack_commit = commit;
-}
-
-static void
-def_heapsize (int reserve, int commit)
-{
- def->heap_reserve = reserve;
- def->heap_commit = commit;
-}
-
-static void
-def_section (const char *name, int attr)
-{
- def_file_section *s;
- int max_sections = ROUND_UP (def->num_section_defs, 4);
-
- if (def->num_section_defs >= max_sections)
- {
- max_sections = ROUND_UP (def->num_section_defs+1, 4);
-
- if (def->section_defs)
- def->section_defs = xrealloc (def->section_defs,
- max_sections * sizeof (def_file_import));
- else
- def->section_defs = xmalloc (max_sections * sizeof (def_file_import));
- }
- s = def->section_defs + def->num_section_defs;
- memset (s, 0, sizeof (def_file_section));
- s->name = xstrdup (name);
- if (attr & 1)
- s->flag_read = 1;
- if (attr & 2)
- s->flag_write = 1;
- if (attr & 4)
- s->flag_execute = 1;
- if (attr & 8)
- s->flag_shared = 1;
-
- def->num_section_defs++;
-}
-
-static void
-def_section_alt (const char *name, const char *attr)
-{
- int aval = 0;
-
- for (; *attr; attr++)
- {
- switch (*attr)
- {
- case 'R':
- case 'r':
- aval |= 1;
- break;
- case 'W':
- case 'w':
- aval |= 2;
- break;
- case 'X':
- case 'x':
- aval |= 4;
- break;
- case 'S':
- case 's':
- aval |= 8;
- break;
- }
- }
- def_section (name, aval);
-}
-
-static void
-def_exports (const char *external_name,
- const char *internal_name,
- int ordinal,
- int flags)
-{
- def_file_export *dfe;
-
- if (!internal_name && external_name)
- internal_name = external_name;
-#if TRACE
- printf ("def_exports, ext=%s int=%s\n", external_name, internal_name);
-#endif
-
- dfe = def_file_add_export (def, external_name, internal_name, ordinal);
- if (flags & 1)
- dfe->flag_noname = 1;
- if (flags & 2)
- dfe->flag_constant = 1;
- if (flags & 4)
- dfe->flag_data = 1;
- if (flags & 8)
- dfe->flag_private = 1;
-}
-
-static void
-def_import (const char *internal_name,
- const char *module,
- const char *dllext,
- const char *name,
- int ordinal)
-{
- char *buf = 0;
- const char *ext = dllext ? dllext : "dll";
-
- buf = xmalloc (strlen (module) + strlen (ext) + 2);
- sprintf (buf, "%s.%s", module, ext);
- module = buf;
-
- def_file_add_import (def, name, module, ordinal, internal_name);
- if (buf)
- free (buf);
-}
-
-static void
-def_version (int major, int minor)
-{
- def->version_major = major;
- def->version_minor = minor;
-}
-
-static void
-def_directive (char *str)
-{
- struct directive *d = xmalloc (sizeof (struct directive));
-
- d->next = directives;
- directives = d;
- d->name = xstrdup (str);
- d->len = strlen (str);
-}
-
-static int
-def_error (const char *err)
-{
- einfo ("%P: %s:%d: %s\n",
- def_filename ? def_filename : "<unknown-file>", linenumber, err);
- return 0;
-}
-
-
-/* Lexical Scanner. */
-
-#undef TRACE
-#define TRACE 0
-
-/* Never freed, but always reused as needed, so no real leak. */
-static char *buffer = 0;
-static int buflen = 0;
-static int bufptr = 0;
-
-static void
-put_buf (char c)
-{
- if (bufptr == buflen)
- {
- buflen += 50; /* overly reasonable, eh? */
- if (buffer)
- buffer = xrealloc (buffer, buflen + 1);
- else
- buffer = xmalloc (buflen + 1);
- }
- buffer[bufptr++] = c;
- buffer[bufptr] = 0; /* not optimal, but very convenient. */
-}
-
-static struct
-{
- char *name;
- int token;
-}
-tokens[] =
-{
- { "BASE", BASE },
- { "CODE", CODE },
- { "CONSTANT", CONSTANTU },
- { "constant", CONSTANTL },
- { "DATA", DATAU },
- { "data", DATAL },
- { "DESCRIPTION", DESCRIPTION },
- { "DIRECTIVE", DIRECTIVE },
- { "EXECUTE", EXECUTE },
- { "EXPORTS", EXPORTS },
- { "HEAPSIZE", HEAPSIZE },
- { "IMPORTS", IMPORTS },
- { "LIBRARY", LIBRARY },
- { "NAME", NAME },
- { "NONAME", NONAMEU },
- { "noname", NONAMEL },
- { "PRIVATE", PRIVATEU },
- { "private", PRIVATEL },
- { "READ", READ },
- { "SECTIONS", SECTIONS },
- { "SEGMENTS", SECTIONS },
- { "SHARED", SHARED },
- { "STACKSIZE", STACKSIZE },
- { "VERSION", VERSIONK },
- { "WRITE", WRITE },
- { 0, 0 }
-};
-
-static int
-def_getc (void)
-{
- int rv;
-
- if (lex_parse_string)
- {
- if (lex_parse_string >= lex_parse_string_end)
- rv = EOF;
- else
- rv = *lex_parse_string++;
- }
- else
- {
- rv = fgetc (the_file);
- }
- if (rv == '\n')
- saw_newline = 1;
- return rv;
-}
-
-static int
-def_ungetc (int c)
-{
- if (lex_parse_string)
- {
- lex_parse_string--;
- return c;
- }
- else
- return ungetc (c, the_file);
-}
-
-static int
-def_lex (void)
-{
- int c, i, q;
-
- if (lex_forced_token)
- {
- i = lex_forced_token;
- lex_forced_token = 0;
-#if TRACE
- printf ("lex: forcing token %d\n", i);
-#endif
- return i;
- }
-
- c = def_getc ();
-
- /* Trim leading whitespace. */
- while (c != EOF && (c == ' ' || c == '\t') && saw_newline)
- c = def_getc ();
-
- if (c == EOF)
- {
-#if TRACE
- printf ("lex: EOF\n");
-#endif
- return 0;
- }
-
- if (saw_newline && c == ';')
- {
- do
- {
- c = def_getc ();
- }
- while (c != EOF && c != '\n');
- if (c == '\n')
- return def_lex ();
- return 0;
- }
-
- /* Must be something else. */
- saw_newline = 0;
-
- if (ISDIGIT (c))
- {
- bufptr = 0;
- while (c != EOF && (ISXDIGIT (c) || (c == 'x')))
- {
- put_buf (c);
- c = def_getc ();
- }
- if (c != EOF)
- def_ungetc (c);
- yylval.number = strtoul (buffer, 0, 0);
-#if TRACE
- printf ("lex: `%s' returns NUMBER %d\n", buffer, yylval.number);
-#endif
- return NUMBER;
- }
-
- if (ISALPHA (c) || strchr ("$:-_?@", c))
- {
- bufptr = 0;
- q = c;
- put_buf (c);
- c = def_getc ();
-
- if (q == '@')
- {
- if (ISBLANK (c) ) /* '@' followed by whitespace. */
- return (q);
- else if (ISDIGIT (c)) /* '@' followed by digit. */
- {
- def_ungetc (c);
- return (q);
- }
-#if TRACE
- printf ("lex: @ returns itself\n");
-#endif
- }
-
- while (c != EOF && (ISALNUM (c) || strchr ("$:-_?/@", c)))
- {
- put_buf (c);
- c = def_getc ();
- }
- if (c != EOF)
- def_ungetc (c);
- if (ISALPHA (q)) /* Check for tokens. */
- {
- for (i = 0; tokens[i].name; i++)
- if (strcmp (tokens[i].name, buffer) == 0)
- {
-#if TRACE
- printf ("lex: `%s' is a string token\n", buffer);
-#endif
- return tokens[i].token;
- }
- }
-#if TRACE
- printf ("lex: `%s' returns ID\n", buffer);
-#endif
- yylval.id = xstrdup (buffer);
- return ID;
- }
-
- if (c == '\'' || c == '"')
- {
- q = c;
- c = def_getc ();
- bufptr = 0;
-
- while (c != EOF && c != q)
- {
- put_buf (c);
- c = def_getc ();
- }
- yylval.id = xstrdup (buffer);
-#if TRACE
- printf ("lex: `%s' returns ID\n", buffer);
-#endif
- return ID;
- }
-
- if (c == '=' || c == '.' || c == ',')
- {
-#if TRACE
- printf ("lex: `%c' returns itself\n", c);
-#endif
- return c;
- }
-
- if (c == '\n')
- {
- linenumber++;
- saw_newline = 1;
- }
-
- /*printf ("lex: 0x%02x ignored\n", c); */
- return def_lex ();
-}
diff --git a/contrib/binutils/ld/dep-in.sed b/contrib/binutils/ld/dep-in.sed
deleted file mode 100644
index 83418e2..0000000
--- a/contrib/binutils/ld/dep-in.sed
+++ /dev/null
@@ -1,20 +0,0 @@
-:loop
-/\\$/N
-/\\$/b loop
-
-s!@INCDIR@!$(INCDIR)!g
-s!@TOPDIR@/include!$(INCDIR)!g
-s!@BFDDIR@!$(BFDDIR)!g
-s!@TOPDIR@/bfd!$(BFDDIR)!g
-s!@SRCDIR@/!!g
-s! \.\./bfd/hosts/[^ ]*\.h! !g
-s! \.\./intl/libintl\.h!!g
-
-s/\\\n */ /g
-
-s/ *$//
-s/ */ /g
-/:$/d
-
-s/\(.\{50\}[^ ]*\) /\1 \\\
- /g
diff --git a/contrib/binutils/ld/emulparams/README b/contrib/binutils/ld/emulparams/README
deleted file mode 100644
index b3d6d26..0000000
--- a/contrib/binutils/ld/emulparams/README
+++ /dev/null
@@ -1,2 +0,0 @@
-The files in this directory are read by genscripts.sh as shell commands.
-They set parameters for the emulations.
diff --git a/contrib/binutils/ld/emulparams/alpha.sh b/contrib/binutils/ld/emulparams/alpha.sh
deleted file mode 100644
index 141923f..0000000
--- a/contrib/binutils/ld/emulparams/alpha.sh
+++ /dev/null
@@ -1,3 +0,0 @@
-SCRIPT_NAME=alpha
-OUTPUT_FORMAT="ecoff-littlealpha"
-ARCH=alpha
diff --git a/contrib/binutils/ld/emulparams/arcelf.sh b/contrib/binutils/ld/emulparams/arcelf.sh
deleted file mode 100644
index b1c9c17..0000000
--- a/contrib/binutils/ld/emulparams/arcelf.sh
+++ /dev/null
@@ -1,11 +0,0 @@
-SCRIPT_NAME=elf
-OUTPUT_FORMAT="elf32-littlearc"
-LITTLE_OUTPUT_FORMAT="elf32-littlearc"
-BIG_OUTPUT_FORMAT="elf32-bigarc"
-TEXT_START_ADDR=0x0
-MAXPAGESIZE=0x1000
-NONPAGED_TEXT_START_ADDR=0x0
-ARCH=arc
-MACHINE=
-ENTRY=start
-#TEMPLATE_NAME=elf32
diff --git a/contrib/binutils/ld/emulparams/armaoutb.sh b/contrib/binutils/ld/emulparams/armaoutb.sh
deleted file mode 100644
index 59ab6f1..0000000
--- a/contrib/binutils/ld/emulparams/armaoutb.sh
+++ /dev/null
@@ -1,7 +0,0 @@
-SCRIPT_NAME=armaout
-OUTPUT_FORMAT="a.out-arm-big"
-HEADER_START_ADDR=0x8000
-TEXT_START_ADDR=0x8000
-NONPAGED_TEXT_START_ADDRESS=0x8000
-TARGET_PAGE_SIZE=32768
-ARCH=arm
diff --git a/contrib/binutils/ld/emulparams/armaoutl.sh b/contrib/binutils/ld/emulparams/armaoutl.sh
deleted file mode 100644
index 9501f33..0000000
--- a/contrib/binutils/ld/emulparams/armaoutl.sh
+++ /dev/null
@@ -1,7 +0,0 @@
-SCRIPT_NAME=armaout
-OUTPUT_FORMAT="a.out-arm-little"
-HEADER_START_ADDR=0x8000
-TEXT_START_ADDR=0x8000
-NONPAGED_TEXT_START_ADDRESS=0x8000
-TARGET_PAGE_SIZE=32768
-ARCH=arm
diff --git a/contrib/binutils/ld/emulparams/armcoff.sh b/contrib/binutils/ld/emulparams/armcoff.sh
deleted file mode 100644
index 91df7d3..0000000
--- a/contrib/binutils/ld/emulparams/armcoff.sh
+++ /dev/null
@@ -1,6 +0,0 @@
-ARCH=arm
-SCRIPT_NAME=armcoff
-OUTPUT_FORMAT="coff-arm-little"
-LITTLE_OUTPUT_FORMAT="coff-arm-little"
-BIG_OUTPUT_FORMAT="coff-arm-big"
-TEMPLATE_NAME=armcoff
diff --git a/contrib/binutils/ld/emulparams/armelf.sh b/contrib/binutils/ld/emulparams/armelf.sh
deleted file mode 100644
index 35a6d23..0000000
--- a/contrib/binutils/ld/emulparams/armelf.sh
+++ /dev/null
@@ -1,28 +0,0 @@
-MACHINE=
-SCRIPT_NAME=elf
-OUTPUT_FORMAT="elf32-littlearm"
-BIG_OUTPUT_FORMAT="elf32-bigarm"
-LITTLE_OUTPUT_FORMAT="elf32-littlearm"
-TEXT_START_ADDR=0x8000
-TEMPLATE_NAME=elf32
-EXTRA_EM_FILE=armelf
-OTHER_TEXT_SECTIONS='*(.glue_7t) *(.glue_7)'
-OTHER_BSS_SYMBOLS='__bss_start__ = .;'
-OTHER_BSS_END_SYMBOLS='_bss_end__ = . ; __bss_end__ = . ; __end__ = . ;'
-OTHER_SECTIONS='.note.gnu.arm.ident 0 : { KEEP (*(.note.gnu.arm.ident)) }'
-
-DATA_START_SYMBOLS='__data_start = . ;';
-
-GENERATE_SHLIB_SCRIPT=yes
-
-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/armelf_fbsd.sh b/contrib/binutils/ld/emulparams/armelf_fbsd.sh
deleted file mode 100644
index 52da345..0000000
--- a/contrib/binutils/ld/emulparams/armelf_fbsd.sh
+++ /dev/null
@@ -1,2 +0,0 @@
-. ${srcdir}/emulparams/armelf.sh
-. ${srcdir}/emulparams/elf_fbsd.sh
diff --git a/contrib/binutils/ld/emulparams/armelf_linux.sh b/contrib/binutils/ld/emulparams/armelf_linux.sh
deleted file mode 100644
index 88a2d19..0000000
--- a/contrib/binutils/ld/emulparams/armelf_linux.sh
+++ /dev/null
@@ -1,21 +0,0 @@
-ARCH=arm
-SCRIPT_NAME=elf
-OUTPUT_FORMAT="elf32-littlearm"
-BIG_OUTPUT_FORMAT="elf32-bigarm"
-LITTLE_OUTPUT_FORMAT="elf32-littlearm"
-MAXPAGESIZE=0x8000
-COMMONPAGESIZE=0x1000
-TEMPLATE_NAME=elf32
-EXTRA_EM_FILE=armelf
-GENERATE_SHLIB_SCRIPT=yes
-
-DATA_START_SYMBOLS='__data_start = . ;';
-OTHER_TEXT_SECTIONS='*(.glue_7t) *(.glue_7)'
-OTHER_BSS_SYMBOLS='__bss_start__ = .;'
-OTHER_BSS_END_SYMBOLS='_bss_end__ = . ; __bss_end__ = . ; __end__ = . ;'
-OTHER_SECTIONS='.note.gnu.arm.ident 0 : { KEEP (*(.note.gnu.arm.ident)) }'
-
-TEXT_START_ADDR=0x00008000
-
-# ARM does not support .s* sections.
-NO_SMALL_DATA=yes
diff --git a/contrib/binutils/ld/emulparams/armelf_linux26.sh b/contrib/binutils/ld/emulparams/armelf_linux26.sh
deleted file mode 100644
index 36d1b0e..0000000
--- a/contrib/binutils/ld/emulparams/armelf_linux26.sh
+++ /dev/null
@@ -1,20 +0,0 @@
-ARCH=arm
-SCRIPT_NAME=elf
-OUTPUT_FORMAT="elf32-littlearm"
-BIG_OUTPUT_FORMAT="elf32-bigarm"
-LITTLE_OUTPUT_FORMAT="elf32-littlearm"
-MAXPAGESIZE=0x8000
-TEMPLATE_NAME=armelf
-GENERATE_SHLIB_SCRIPT=yes
-
-DATA_START_SYMBOLS='__data_start = . ;';
-OTHER_BSS_SYMBOLS='__bss_start__ = .;'
-OTHER_BSS_END_SYMBOLS='_bss_end__ = . ; __bss_end__ = . ; __end__ = . ;'
-
-# This needs to be high enough so that we can load ld.so below it,
-# yet low enough to stay away from the mmap area at 0x01100000.
-# Also, it is small enough so that relocs which are pointing
-# at absolute 0 will still be fixed up.
-# These values give us about 0.5MB for ld.so, 16.5MB for user
-# programs, and 15MB for mmap which seems a reasonable compromise.
-TEXT_START_ADDR=0x00080000
diff --git a/contrib/binutils/ld/emulparams/armelf_nbsd.sh b/contrib/binutils/ld/emulparams/armelf_nbsd.sh
deleted file mode 100644
index 571483c..0000000
--- a/contrib/binutils/ld/emulparams/armelf_nbsd.sh
+++ /dev/null
@@ -1,6 +0,0 @@
-. ${srcdir}/emulparams/armelf.sh
-MAXPAGESIZE=0x8000
-TEXT_START_ADDR=0x00008000
-
-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/armelfb_nbsd.sh b/contrib/binutils/ld/emulparams/armelfb_nbsd.sh
deleted file mode 100644
index 7ab6ce0..0000000
--- a/contrib/binutils/ld/emulparams/armelfb_nbsd.sh
+++ /dev/null
@@ -1,2 +0,0 @@
-. ${srcdir}/emulparams/armelf_nbsd.sh
-OUTPUT_FORMAT="elf32-bigarm"
diff --git a/contrib/binutils/ld/emulparams/armnbsd.sh b/contrib/binutils/ld/emulparams/armnbsd.sh
deleted file mode 100644
index fc27791..0000000
--- a/contrib/binutils/ld/emulparams/armnbsd.sh
+++ /dev/null
@@ -1,7 +0,0 @@
-SCRIPT_NAME=aout
-TEXT_START_ADDR=0x1020
-OUTPUT_FORMAT="a.out-arm-netbsd"
-TARGET_PAGE_SIZE=0x1000
-ARCH=arm
-EXECUTABLE_SYMBOLS='__DYNAMIC = 0;'
-NONPAGED_TEXT_START_ADDR=0x1000
diff --git a/contrib/binutils/ld/emulparams/armpe.sh b/contrib/binutils/ld/emulparams/armpe.sh
deleted file mode 100644
index aa60536..0000000
--- a/contrib/binutils/ld/emulparams/armpe.sh
+++ /dev/null
@@ -1,13 +0,0 @@
-ARCH=arm
-SCRIPT_NAME=pe
-
-OUTPUT_FORMAT="pei-arm-little"
-LITTLE_OUTPUT_FORMAT="pei-arm-little"
-BIG_OUTPUT_FORMAT="pei-arm-big"
-
-RELOCATEABLE_OUTPUT_FORMAT="pe-arm-little"
-
-TEMPLATE_NAME=pe
-ENTRY="_mainCRTStartup"
-SUBSYSTEM=PE_DEF_SUBSYSTEM
-INITIAL_SYMBOL_CHAR=\"_\"
diff --git a/contrib/binutils/ld/emulparams/coff_sparc.sh b/contrib/binutils/ld/emulparams/coff_sparc.sh
deleted file mode 100644
index 0cf852a..0000000
--- a/contrib/binutils/ld/emulparams/coff_sparc.sh
+++ /dev/null
@@ -1,7 +0,0 @@
-SCRIPT_NAME=sparccoff
-OUTPUT_FORMAT="coff-sparc"
-# following are dubious (borrowed from sparc lynx)
-TARGET_PAGE_SIZE=0x1000
-TEXT_START_ADDR=0
-NONPAGED_TEXT_START_ADDR=0x1000
-ARCH=sparc
diff --git a/contrib/binutils/ld/emulparams/elf32_sparc.sh b/contrib/binutils/ld/emulparams/elf32_sparc.sh
deleted file mode 100644
index af23252..0000000
--- a/contrib/binutils/ld/emulparams/elf32_sparc.sh
+++ /dev/null
@@ -1,14 +0,0 @@
-SCRIPT_NAME=elf
-OUTPUT_FORMAT="elf32-sparc"
-TEXT_START_ADDR=0x10000
-MAXPAGESIZE=0x10000
-COMMONPAGESIZE=0x2000
-NONPAGED_TEXT_START_ADDR=0x10000
-ALIGNMENT=8
-ARCH=sparc
-MACHINE=
-TEMPLATE_NAME=elf32
-DATA_PLT=
-GENERATE_SHLIB_SCRIPT=yes
-GENERATE_PIE_SCRIPT=yes
-NO_SMALL_DATA=yes
diff --git a/contrib/binutils/ld/emulparams/elf32b4300.sh b/contrib/binutils/ld/emulparams/elf32b4300.sh
deleted file mode 100644
index d3e4354..0000000
--- a/contrib/binutils/ld/emulparams/elf32b4300.sh
+++ /dev/null
@@ -1,10 +0,0 @@
-# If you change this file, please also look at files which source this one:
-# elf32l4300.sh
-
-EMBEDDED=yes
-. ${srcdir}/emulparams/elf32bmip.sh
-TEXT_START_ADDR=0xa0020000
-unset NONPAGED_TEXT_START_ADDR
-unset SHLIB_TEXT_START_ADDR
-EXECUTABLE_SYMBOLS='_DYNAMIC_LINK = 0;'
-DYNAMIC_LINK=FALSE
diff --git a/contrib/binutils/ld/emulparams/elf32bmip.sh b/contrib/binutils/ld/emulparams/elf32bmip.sh
deleted file mode 100644
index 94e1c9c..0000000
--- a/contrib/binutils/ld/emulparams/elf32bmip.sh
+++ /dev/null
@@ -1,37 +0,0 @@
-# If you change this file, please also look at files which source this one:
-# elf32b4300.sh elf32bsmip.sh elf32btsmip.sh elf32ebmip.sh elf32lmip.sh
-
-SCRIPT_NAME=elf
-OUTPUT_FORMAT="elf32-bigmips"
-BIG_OUTPUT_FORMAT="elf32-bigmips"
-LITTLE_OUTPUT_FORMAT="elf32-littlemips"
-TEXT_START_ADDR=0x0400000
-test -n "${EMBEDDED}" || DATA_ADDR=0x10000000
-MAXPAGESIZE=0x40000
-COMMONPAGESIZE=0x1000
-NONPAGED_TEXT_START_ADDR=0x0400000
-SHLIB_TEXT_START_ADDR=0x5ffe0000
-test -n "${EMBEDDED}" || TEXT_DYNAMIC=
-INITIAL_READONLY_SECTIONS="
- .reginfo ${RELOCATING-0} : { *(.reginfo) }
-"
-OTHER_TEXT_SECTIONS='*(.mips16.fn.*) *(.mips16.call.*)'
-OTHER_GOT_SYMBOLS='
- _gp = ALIGN(16) + 0x7ff0;
-'
-OTHER_SDATA_SECTIONS="
- .lit8 ${RELOCATING-0} : { *(.lit8) }
- .lit4 ${RELOCATING-0} : { *(.lit4) }
-"
-TEXT_START_SYMBOLS='_ftext = . ;'
-DATA_START_SYMBOLS='_fdata = . ;'
-OTHER_BSS_SYMBOLS='_fbss = .;'
-OTHER_SECTIONS='
- .gptab.sdata : { *(.gptab.data) *(.gptab.sdata) }
- .gptab.sbss : { *(.gptab.bss) *(.gptab.sbss) }
-'
-ARCH=mips
-MACHINE=
-TEMPLATE_NAME=elf32
-EXTRA_EM_FILE=mipself
-GENERATE_SHLIB_SCRIPT=yes
diff --git a/contrib/binutils/ld/emulparams/elf32bmipn32-defs.sh b/contrib/binutils/ld/emulparams/elf32bmipn32-defs.sh
deleted file mode 100644
index f7b0d08..0000000
--- a/contrib/binutils/ld/emulparams/elf32bmipn32-defs.sh
+++ /dev/null
@@ -1,58 +0,0 @@
-# If you change this file, please also look at files which source this one:
-# elf64bmip.sh elf64btsmip.sh elf32btsmipn32.sh elf32bmipn32.sh
-
-# This is an ELF platform.
-SCRIPT_NAME=elf
-
-# Handle both big- and little-ended 32-bit MIPS objects.
-ARCH=mips
-OUTPUT_FORMAT="elf32-bigmips"
-BIG_OUTPUT_FORMAT="elf32-bigmips"
-LITTLE_OUTPUT_FORMAT="elf32-littlemips"
-
-TEMPLATE_NAME=elf32
-
-case "$EMULATION_NAME" in
-elf32*n32*) ELFSIZE=32 ;;
-elf64*) ELFSIZE=64 ;;
-*) echo $0: unhandled emulation $EMULATION_NAME >&2; exit 1 ;;
-esac
-
-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.
-LIBPATH_SUFFIX=$ELFSIZE
-
-GENERATE_SHLIB_SCRIPT=yes
-
-TEXT_START_ADDR=0x10000000
-MAXPAGESIZE=0x100000
-ENTRY=__start
-
-# GOT-related settings.
-OTHER_GOT_SYMBOLS='
- _gp = ALIGN(16) + 0x7ff0;
-'
-OTHER_SDATA_SECTIONS="
- .lit8 ${RELOCATING-0} : { *(.lit8) }
- .lit4 ${RELOCATING-0} : { *(.lit4) }
- .srdata ${RELOCATING-0} : { *(.srdata) }
-"
-
-# Magic symbols.
-TEXT_START_SYMBOLS='_ftext = . ;'
-DATA_START_SYMBOLS='_fdata = . ;'
-OTHER_BSS_SYMBOLS='_fbss = .;'
-
-INITIAL_READONLY_SECTIONS=".MIPS.options : { *(.MIPS.options) }"
-# Discard any .MIPS.content* or .MIPS.events* sections. The linker
-# doesn't know how to adjust them.
-OTHER_SECTIONS="/DISCARD/ : { *(.MIPS.content*) *(.MIPS.events*) }"
-
-TEXT_DYNAMIC=
diff --git a/contrib/binutils/ld/emulparams/elf32bmipn32.sh b/contrib/binutils/ld/emulparams/elf32bmipn32.sh
deleted file mode 100755
index a320eb2..0000000
--- a/contrib/binutils/ld/emulparams/elf32bmipn32.sh
+++ /dev/null
@@ -1,22 +0,0 @@
-. ${srcdir}/emulparams/elf32bmipn32-defs.sh
-OUTPUT_FORMAT="elf32-nbigmips"
-BIG_OUTPUT_FORMAT="elf32-nbigmips"
-LITTLE_OUTPUT_FORMAT="elf32-nlittlemips"
-SHLIB_TEXT_START_ADDR=0x5ffe0000
-COMMONPAGESIZE=0x1000
-
-# IRIX6 defines these symbols. 0x34 is the size of the ELF header.
-EXECUTABLE_SYMBOLS="
- __dso_displacement = 0;
- __elf_header = ${TEXT_START_ADDR};
- __program_header_table = ${TEXT_START_ADDR} + 0x34;
-"
-
-# There are often dynamic relocations against the .rodata section.
-# Setting DT_TEXTREL in the .dynamic section does not convince the
-# IRIX6 linker to permit relocations against the text segment.
-# Following the IRIX linker, we simply put .rodata in the data
-# segment.
-WRITABLE_RODATA=
-
-EXTRA_EM_FILE=irix
diff --git a/contrib/binutils/ld/emulparams/elf32bsmip.sh b/contrib/binutils/ld/emulparams/elf32bsmip.sh
deleted file mode 100755
index dfe0fe0..0000000
--- a/contrib/binutils/ld/emulparams/elf32bsmip.sh
+++ /dev/null
@@ -1,3 +0,0 @@
-. ${srcdir}/emulparams/elf32bmip.sh
-ENTRY=__start
-EXTRA_EM_FILE=irix
diff --git a/contrib/binutils/ld/emulparams/elf32btsmip.sh b/contrib/binutils/ld/emulparams/elf32btsmip.sh
deleted file mode 100644
index 4c5a9ab..0000000
--- a/contrib/binutils/ld/emulparams/elf32btsmip.sh
+++ /dev/null
@@ -1,9 +0,0 @@
-# If you change this file, please also look at files which source this one:
-# elf32ltsmip.sh
-
-. ${srcdir}/emulparams/elf32bmip.sh
-OUTPUT_FORMAT="elf32-tradbigmips"
-BIG_OUTPUT_FORMAT="elf32-tradbigmips"
-LITTLE_OUTPUT_FORMAT="elf32-tradlittlemips"
-SHLIB_TEXT_START_ADDR=0
-ENTRY=__start
diff --git a/contrib/binutils/ld/emulparams/elf32btsmipn32.sh b/contrib/binutils/ld/emulparams/elf32btsmipn32.sh
deleted file mode 100644
index 5ca6797..0000000
--- a/contrib/binutils/ld/emulparams/elf32btsmipn32.sh
+++ /dev/null
@@ -1,15 +0,0 @@
-# If you change this file, please also look at files which source this one:
-# elf32ltsmipn32.sh
-
-. ${srcdir}/emulparams/elf32bmipn32-defs.sh
-OUTPUT_FORMAT="elf32-ntradbigmips"
-BIG_OUTPUT_FORMAT="elf32-ntradbigmips"
-LITTLE_OUTPUT_FORMAT="elf32-ntradlittlemips"
-COMMONPAGESIZE=0x1000
-
-# Magic sections.
-OTHER_TEXT_SECTIONS='*(.mips16.fn.*) *(.mips16.call.*)'
-OTHER_SECTIONS='
- .gptab.sdata : { *(.gptab.data) *(.gptab.sdata) }
- .gptab.sbss : { *(.gptab.bss) *(.gptab.sbss) }
-'
diff --git a/contrib/binutils/ld/emulparams/elf32ebmip.sh b/contrib/binutils/ld/emulparams/elf32ebmip.sh
deleted file mode 100644
index 704b43e..0000000
--- a/contrib/binutils/ld/emulparams/elf32ebmip.sh
+++ /dev/null
@@ -1,2 +0,0 @@
-EMBEDDED=yes
-. ${srcdir}/emulparams/elf32bmip.sh
diff --git a/contrib/binutils/ld/emulparams/elf32elmip.sh b/contrib/binutils/ld/emulparams/elf32elmip.sh
deleted file mode 100644
index c94e503..0000000
--- a/contrib/binutils/ld/emulparams/elf32elmip.sh
+++ /dev/null
@@ -1,2 +0,0 @@
-EMBEDDED=yes
-. ${srcdir}/emulparams/elf32lmip.sh
diff --git a/contrib/binutils/ld/emulparams/elf32l4300.sh b/contrib/binutils/ld/emulparams/elf32l4300.sh
deleted file mode 100644
index 865792a..0000000
--- a/contrib/binutils/ld/emulparams/elf32l4300.sh
+++ /dev/null
@@ -1,4 +0,0 @@
-. ${srcdir}/emulparams/elf32b4300.sh
-OUTPUT_FORMAT="elf32-littlemips"
-BIG_OUTPUT_FORMAT="elf32-bigmips"
-LITTLE_OUTPUT_FORMAT="elf32-littlemips"
diff --git a/contrib/binutils/ld/emulparams/elf32lmip.sh b/contrib/binutils/ld/emulparams/elf32lmip.sh
deleted file mode 100644
index 14d4ded..0000000
--- a/contrib/binutils/ld/emulparams/elf32lmip.sh
+++ /dev/null
@@ -1,7 +0,0 @@
-# If you change this file, please also look at files which source this one:
-# elf32elmip.sh elf32lsmip.sh
-
-. ${srcdir}/emulparams/elf32bmip.sh
-OUTPUT_FORMAT="elf32-littlemips"
-BIG_OUTPUT_FORMAT="elf32-bigmips"
-LITTLE_OUTPUT_FORMAT="elf32-littlemips"
diff --git a/contrib/binutils/ld/emulparams/elf32lppc.sh b/contrib/binutils/ld/emulparams/elf32lppc.sh
deleted file mode 100644
index 18cce48..0000000
--- a/contrib/binutils/ld/emulparams/elf32lppc.sh
+++ /dev/null
@@ -1,5 +0,0 @@
-# If you change this file, please also look at files which source this one:
-# elf32lppcsim.sh
-
-. ${srcdir}/emulparams/elf32ppc.sh
-OUTPUT_FORMAT="elf32-powerpcle"
diff --git a/contrib/binutils/ld/emulparams/elf32lppcsim.sh b/contrib/binutils/ld/emulparams/elf32lppcsim.sh
deleted file mode 100644
index e743852..0000000
--- a/contrib/binutils/ld/emulparams/elf32lppcsim.sh
+++ /dev/null
@@ -1,2 +0,0 @@
-. ${srcdir}/emulparams/elf32lppc.sh
-TEXT_START_ADDR=0x10000000
diff --git a/contrib/binutils/ld/emulparams/elf32lsmip.sh b/contrib/binutils/ld/emulparams/elf32lsmip.sh
deleted file mode 100755
index 62e4f98..0000000
--- a/contrib/binutils/ld/emulparams/elf32lsmip.sh
+++ /dev/null
@@ -1,2 +0,0 @@
-. ${srcdir}/emulparams/elf32lmip.sh
-ENTRY=__start
diff --git a/contrib/binutils/ld/emulparams/elf32ltsmip.sh b/contrib/binutils/ld/emulparams/elf32ltsmip.sh
deleted file mode 100644
index 4a660f0..0000000
--- a/contrib/binutils/ld/emulparams/elf32ltsmip.sh
+++ /dev/null
@@ -1,2 +0,0 @@
-. ${srcdir}/emulparams/elf32btsmip.sh
-OUTPUT_FORMAT="elf32-tradlittlemips"
diff --git a/contrib/binutils/ld/emulparams/elf32ltsmipn32.sh b/contrib/binutils/ld/emulparams/elf32ltsmipn32.sh
deleted file mode 100644
index 276477d..0000000
--- a/contrib/binutils/ld/emulparams/elf32ltsmipn32.sh
+++ /dev/null
@@ -1,4 +0,0 @@
-. ${srcdir}/emulparams/elf32btsmipn32.sh
-OUTPUT_FORMAT="elf32-ntradlittlemips"
-BIG_OUTPUT_FORMAT="elf32-ntradbigmips"
-LITTLE_OUTPUT_FORMAT="elf32-ntradlittlemips"
diff --git a/contrib/binutils/ld/emulparams/elf32mipswindiss.sh b/contrib/binutils/ld/emulparams/elf32mipswindiss.sh
deleted file mode 100644
index 4f1148b..0000000
--- a/contrib/binutils/ld/emulparams/elf32mipswindiss.sh
+++ /dev/null
@@ -1,27 +0,0 @@
-TEMPLATE_NAME=elf32
-SCRIPT_NAME=elf
-OUTPUT_FORMAT="elf32-bigmips"
-BIG_OUTPUT_FORMAT="elf32-bigmips"
-LITTLE_OUTPUT_FORMAT="elf32-littlemips"
-ARCH=mips
-MACHINE=
-EMBEDDED=yes
-MAXPAGESIZE=0x40000
-
-# The data below is taken from the windiss.dld linker script that comes with
-# the Diab linker.
-TEXT_START_ADDR=0x100000
-DATA_START_SYMBOLS='__DATA_ROM = .; __DATA_RAM = .;'
-SDATA_START_SYMBOLS='_SDA_BASE_ = .; _gp = . + 0x7ff0;'
-SDATA2_START_SYMBOLS='_SDA2_BASE_ = .;'
-EXECUTABLE_SYMBOLS='__HEAP_START = .; __SP_INIT = 0x800000; __SP_END = __SP_INIT - 0x20000; __HEAP_END = __SP_END; __DATA_END = _edata; __BSS_START = __bss_start; __BSS_END = _end; __HEAP_START = _end;'
-
-# The Diab tools use a different init/fini convention. Initialization code
-# is place in sections named ".init$NN". These sections are then concatenated
-# into the .init section. It is important that .init$00 be first and .init$99
-# be last. The other sections should be sorted, but the current linker script
-# parse does not seem to allow that with the SORT keyword in this context.
-INIT_START='*(.init$00); *(.init$0[1-9]); *(.init$[1-8][0-9]); *(.init$9[0-8])'
-INIT_END='*(.init$99)'
-FINI_START='*(.fini$00); *(.fini$0[1-9]); *(.fini$[1-8][0-9]); *(.fini$9[0-8])'
-FINI_END='*(.fini$99)'
diff --git a/contrib/binutils/ld/emulparams/elf32ppc.sh b/contrib/binutils/ld/emulparams/elf32ppc.sh
deleted file mode 100644
index d95cb786..0000000
--- a/contrib/binutils/ld/emulparams/elf32ppc.sh
+++ /dev/null
@@ -1,41 +0,0 @@
-# If you change this file, please also look at files which source this one:
-# elf32lppc.sh elf32ppclinux.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=
-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
diff --git a/contrib/binutils/ld/emulparams/elf32ppc_fbsd.sh b/contrib/binutils/ld/emulparams/elf32ppc_fbsd.sh
deleted file mode 100644
index 2bac85c..0000000
--- a/contrib/binutils/ld/emulparams/elf32ppc_fbsd.sh
+++ /dev/null
@@ -1,2 +0,0 @@
-. ${srcdir}/emulparams/elf32ppc.sh
-. ${srcdir}/emulparams/elf_fbsd.sh
diff --git a/contrib/binutils/ld/emulparams/elf32ppclinux.sh b/contrib/binutils/ld/emulparams/elf32ppclinux.sh
deleted file mode 100644
index 5ced00d..0000000
--- a/contrib/binutils/ld/emulparams/elf32ppclinux.sh
+++ /dev/null
@@ -1,8 +0,0 @@
-. ${srcdir}/emulparams/elf32ppc.sh
-TEXT_START_ADDR=0x10000000
-unset EXECUTABLE_SYMBOLS
-unset OTHER_BSS_END_SYMBOLS
-test -z "${RELOCATING}" || OTHER_SECTIONS="/DISCARD/ : { *(.fixup) }"
-OTHER_READWRITE_SECTIONS="
- .got1 ${RELOCATING-0} : { *(.got1) }
- .got2 ${RELOCATING-0} : { *(.got2) }"
diff --git a/contrib/binutils/ld/emulparams/elf32ppcsim.sh b/contrib/binutils/ld/emulparams/elf32ppcsim.sh
deleted file mode 100644
index c3466cf..0000000
--- a/contrib/binutils/ld/emulparams/elf32ppcsim.sh
+++ /dev/null
@@ -1,2 +0,0 @@
-. ${srcdir}/emulparams/elf32ppc.sh
-TEXT_START_ADDR=0x10000000
diff --git a/contrib/binutils/ld/emulparams/elf64_ia64.sh b/contrib/binutils/ld/emulparams/elf64_ia64.sh
deleted file mode 100644
index 60c8c4c..0000000
--- a/contrib/binutils/ld/emulparams/elf64_ia64.sh
+++ /dev/null
@@ -1,35 +0,0 @@
-# See genscripts.sh and ../scripttempl/elf.sc for the meaning of these.
-SCRIPT_NAME=elf
-ELFSIZE=64
-TEMPLATE_NAME=elf32
-EXTRA_EM_FILE=ia64elf
-OUTPUT_FORMAT="elf64-ia64-little"
-ARCH=ia64
-MACHINE=
-MAXPAGESIZE=0x10000
-# 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
-fi
-TEXT_START_ADDR="0x4000000000000000"
-DATA_ADDR="0x6000000000000000 + (. & (${MAXPAGESIZE} - 1))"
-GENERATE_SHLIB_SCRIPT=yes
-GENERATE_PIE_SCRIPT=yes
-NOP=0x00300000010070000002000001000400 # a bundle full of nops
-OTHER_GOT_SECTIONS="
- .IA_64.pltoff ${RELOCATING-0} : { *(.IA_64.pltoff) }"
-OTHER_PLT_RELOC_SECTIONS="
- .rela.IA_64.pltoff ${RELOCATING-0} : { *(.rela.IA_64.pltoff) }"
-OTHER_READONLY_SECTIONS=
-OTHER_READWRITE_SECTIONS=
-test -z "$CREATE_PIE" && OTHER_READONLY_SECTIONS="
- .opd ${RELOCATING-0} : { *(.opd) }"
-test -n "$CREATE_PIE" && OTHER_READWRITE_SECTIONS="
- .opd ${RELOCATING-0} : { *(.opd) }"
-test -n "$CREATE_PIE" && OTHER_GOT_RELOC_SECTIONS="
- .rela.opd ${RELOCATING-0} : { *(.rela.opd) }"
-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.*}) }"
diff --git a/contrib/binutils/ld/emulparams/elf64_ia64_fbsd.sh b/contrib/binutils/ld/emulparams/elf64_ia64_fbsd.sh
deleted file mode 100644
index 47cde5c..0000000
--- a/contrib/binutils/ld/emulparams/elf64_ia64_fbsd.sh
+++ /dev/null
@@ -1,4 +0,0 @@
-. ${srcdir}/emulparams/elf64_ia64.sh
-TEXT_START_ADDR="0x2000000000000000"
-unset DATA_ADDR
-. ${srcdir}/emulparams/elf_fbsd.sh
diff --git a/contrib/binutils/ld/emulparams/elf64_s390.sh b/contrib/binutils/ld/emulparams/elf64_s390.sh
deleted file mode 100644
index 0c689a9..0000000
--- a/contrib/binutils/ld/emulparams/elf64_s390.sh
+++ /dev/null
@@ -1,34 +0,0 @@
-SCRIPT_NAME=elf
-ELFSIZE=64
-OUTPUT_FORMAT="elf64-s390"
-TEXT_START_ADDR=0x80000000
-MAXPAGESIZE=0x1000
-NONPAGED_TEXT_START_ADDR=0x80000000
-ARCH="s390:64-bit"
-MACHINE=
-NOP=0x07070707
-TEMPLATE_NAME=elf32
-GENERATE_SHLIB_SCRIPT=yes
-GENERATE_PIE_SCRIPT=yes
-NO_SMALL_DATA=yes
-
-# Treat a host that matches the target with the possible exception of "x"
-# in the name as if it were native.
-if test `echo "$host" | sed -e s/390x/390/` \
- = `echo "$target" | sed -e s/390x/390/`; then
- case " $EMULATION_LIBPATH " in
- *" ${EMULATION_NAME} "*)
- NATIVE=yes
- esac
-fi
-
-# Look for 64 bit target libraries in /lib64, /usr/lib64 etc., first
-# on Linux.
-case "$target" in
- s390*-linux*)
- case "$EMULATION_NAME" in
- *64*)
- LIBPATH_SUFFIX=64 ;;
- esac
- ;;
-esac
diff --git a/contrib/binutils/ld/emulparams/elf64_sparc.sh b/contrib/binutils/ld/emulparams/elf64_sparc.sh
deleted file mode 100644
index 0c0f5d8..0000000
--- a/contrib/binutils/ld/emulparams/elf64_sparc.sh
+++ /dev/null
@@ -1,51 +0,0 @@
-SCRIPT_NAME=elf
-ELFSIZE=64
-TEMPLATE_NAME=elf32
-OUTPUT_FORMAT="elf64-sparc"
-MAXPAGESIZE=0x100000
-COMMONPAGESIZE=0x2000
-ARCH="sparc:v9"
-MACHINE=
-DATA_PLT=
-GENERATE_SHLIB_SCRIPT=yes
-GENERATE_PIE_SCRIPT=yes
-NOP=0x01000000
-NO_SMALL_DATA=yes
-
-case "$target" in
- sparc*-solaris*)
- TEXT_START_ADDR=0x100000000
- NONPAGED_TEXT_START_ADDR=0x100000000
- ;;
- *)
- TEXT_START_ADDR=0x100000
- NONPAGED_TEXT_START_ADDR=0x100000
- ;;
-esac
-
-# Treat a host that matches the target with the possible exception of "64"
-# and "v7", "v8", "v9" in the name as if it were native.
-if test `echo "$host" | sed -e 's/64//;s/v[789]//'` \
- = `echo "$target" | sed -e 's/64//;s/v[789]//'`; then
- case " $EMULATION_LIBPATH " in
- *" ${EMULATION_NAME} "*)
- NATIVE=yes
- ;;
- esac
-fi
-
-# Linux and Solaris modify the default library search path
-# to first include a 64-bit specific directory. It's put
-# in slightly different places on the two systems.
-# Look for 64 bit target libraries in /lib64, /usr/lib64 etc., first
-# on Linux and /lib/sparcv9, /usr/lib/sparcv9 etc. on Solaris.
-case "$EMULATION_NAME" in
- *64*)
- case "$target" in
- sparc*-linux*)
- LIBPATH_SUFFIX=64 ;;
- sparc*-solaris*)
- LIBPATH_SUFFIX=/sparcv9 ;;
- esac
- ;;
-esac
diff --git a/contrib/binutils/ld/emulparams/elf64_sparc_fbsd.sh b/contrib/binutils/ld/emulparams/elf64_sparc_fbsd.sh
deleted file mode 100644
index 232a321..0000000
--- a/contrib/binutils/ld/emulparams/elf64_sparc_fbsd.sh
+++ /dev/null
@@ -1,2 +0,0 @@
-. ${srcdir}/emulparams/elf64_sparc.sh
-. ${srcdir}/emulparams/elf_fbsd.sh
diff --git a/contrib/binutils/ld/emulparams/elf64alpha.sh b/contrib/binutils/ld/emulparams/elf64alpha.sh
deleted file mode 100644
index 093c8df..0000000
--- a/contrib/binutils/ld/emulparams/elf64alpha.sh
+++ /dev/null
@@ -1,21 +0,0 @@
-ENTRY=_start
-SCRIPT_NAME=elf
-ELFSIZE=64
-TEMPLATE_NAME=elf32
-EXTRA_EM_FILE=alphaelf
-OUTPUT_FORMAT="elf64-alpha"
-TEXT_START_ADDR="0x120000000"
-MAXPAGESIZE=0x10000
-COMMONPAGESIZE=0x2000
-NONPAGED_TEXT_START_ADDR="0x120000000"
-ARCH=alpha
-MACHINE=
-GENERATE_SHLIB_SCRIPT=yes
-GENERATE_PIE_SCRIPT=yes
-DATA_PLT=
-# Note that the number is always big-endian, thus we have to
-# reverse the digit string.
-NOP=0x0000fe2f1f04ff47 # unop; nop
-
-OTHER_READONLY_SECTIONS="
- .reginfo ${RELOCATING-0} : { *(.reginfo) }"
diff --git a/contrib/binutils/ld/emulparams/elf64alpha_fbsd.sh b/contrib/binutils/ld/emulparams/elf64alpha_fbsd.sh
deleted file mode 100644
index fd4a0a4..0000000
--- a/contrib/binutils/ld/emulparams/elf64alpha_fbsd.sh
+++ /dev/null
@@ -1,3 +0,0 @@
-. ${srcdir}/emulparams/elf64alpha.sh
-. ${srcdir}/emulparams/elf_fbsd.sh
-OUTPUT_FORMAT="elf64-alpha-freebsd"
diff --git a/contrib/binutils/ld/emulparams/elf64alpha_nbsd.sh b/contrib/binutils/ld/emulparams/elf64alpha_nbsd.sh
deleted file mode 100644
index 8116f48..0000000
--- a/contrib/binutils/ld/emulparams/elf64alpha_nbsd.sh
+++ /dev/null
@@ -1,2 +0,0 @@
-. ${srcdir}/emulparams/elf64alpha.sh
-ENTRY=__start
diff --git a/contrib/binutils/ld/emulparams/elf64bmip.sh b/contrib/binutils/ld/emulparams/elf64bmip.sh
deleted file mode 100755
index a4ce6d4..0000000
--- a/contrib/binutils/ld/emulparams/elf64bmip.sh
+++ /dev/null
@@ -1,23 +0,0 @@
-. ${srcdir}/emulparams/elf32bmipn32-defs.sh
-OUTPUT_FORMAT="elf64-bigmips"
-BIG_OUTPUT_FORMAT="elf64-bigmips"
-LITTLE_OUTPUT_FORMAT="elf64-littlemips"
-SHLIB_TEXT_START_ADDR=0x3ffffe0000
-
-# IRIX6 defines these symbols. 0x40 is the size of the ELF header.
-EXECUTABLE_SYMBOLS="
- __dso_displacement = 0;
- ${CREATE_SHLIB-${CREATE_PIE-__elf_header = ${TEXT_START_ADDR};}}
- ${CREATE_SHLIB+__elf_header = ${SHLIB_TEXT_START_ADDR};}
- ${CREATE_PIE+__elf_header = ${SHLIB_TEXT_START_ADDR};}
- __program_header_table = __elf_header + 0x40;
-"
-
-# There are often dynamic relocations against the .rodata section.
-# Setting DT_TEXTREL in the .dynamic section does not convince the
-# IRIX6 linker to permit relocations against the text segment.
-# Following the IRIX linker, we simply put .rodata in the data
-# segment.
-WRITABLE_RODATA=
-
-EXTRA_EM_FILE=irix
diff --git a/contrib/binutils/ld/emulparams/elf64btsmip.sh b/contrib/binutils/ld/emulparams/elf64btsmip.sh
deleted file mode 100644
index 23a20c7..0000000
--- a/contrib/binutils/ld/emulparams/elf64btsmip.sh
+++ /dev/null
@@ -1,16 +0,0 @@
-# If you change this file, please also look at files which source this one:
-# elf64ltsmip.sh
-
-. ${srcdir}/emulparams/elf32bmipn32-defs.sh
-OUTPUT_FORMAT="elf64-tradbigmips"
-BIG_OUTPUT_FORMAT="elf64-tradbigmips"
-LITTLE_OUTPUT_FORMAT="elf64-tradlittlemips"
-
-# Magic sections.
-OTHER_TEXT_SECTIONS='*(.mips16.fn.*) *(.mips16.call.*)'
-OTHER_SECTIONS='
- .gptab.sdata : { *(.gptab.data) *(.gptab.sdata) }
- .gptab.sbss : { *(.gptab.bss) *(.gptab.sbss) }
-'
-
-TEXT_START_ADDR="0x120000000"
diff --git a/contrib/binutils/ld/emulparams/elf64lppc.sh b/contrib/binutils/ld/emulparams/elf64lppc.sh
deleted file mode 100644
index 1c47493..0000000
--- a/contrib/binutils/ld/emulparams/elf64lppc.sh
+++ /dev/null
@@ -1,3 +0,0 @@
-. ${srcdir}/emulparams/elf64ppc.sh
-OUTPUT_FORMAT="elf64-powerpcle"
-NOP=0x00000060
diff --git a/contrib/binutils/ld/emulparams/elf64ltsmip.sh b/contrib/binutils/ld/emulparams/elf64ltsmip.sh
deleted file mode 100644
index efd6b7d..0000000
--- a/contrib/binutils/ld/emulparams/elf64ltsmip.sh
+++ /dev/null
@@ -1,4 +0,0 @@
-. ${srcdir}/emulparams/elf64btsmip.sh
-OUTPUT_FORMAT="elf64-tradlittlemips"
-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
deleted file mode 100644
index c190b18..0000000
--- a/contrib/binutils/ld/emulparams/elf64ppc.sh
+++ /dev/null
@@ -1,49 +0,0 @@
-TEMPLATE_NAME=elf32
-EXTRA_EM_FILE=ppc64elf
-ELFSIZE=64
-GENERATE_SHLIB_SCRIPT=yes
-GENERATE_PIE_SCRIPT=yes
-SCRIPT_NAME=elf
-OUTPUT_FORMAT="elf64-powerpc"
-TEXT_START_ADDR=0x10000000
-#SEGMENT_SIZE=0x10000000
-MAXPAGESIZE=0x10000
-COMMONPAGESIZE=0x1000
-ARCH=powerpc:common64
-MACHINE=
-NOP=0x60000000
-OTHER_TEXT_SECTIONS="*(.sfpr .glink)"
-BSS_PLT=
-OTHER_BSS_SYMBOLS="
- .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) }"
-else
- GOT="
- .got 0 : { *(.got) }
- .toc 0 : { *(.toc) }"
-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)) }"
-
-# 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/elf_fbsd.sh b/contrib/binutils/ld/emulparams/elf_fbsd.sh
deleted file mode 100644
index 2ea646e..0000000
--- a/contrib/binutils/ld/emulparams/elf_fbsd.sh
+++ /dev/null
@@ -1 +0,0 @@
-ELF_INTERPRETER_NAME=\"/usr/libexec/ld-elf.so.1\"
diff --git a/contrib/binutils/ld/emulparams/elf_i386.sh b/contrib/binutils/ld/emulparams/elf_i386.sh
deleted file mode 100644
index 2382286..0000000
--- a/contrib/binutils/ld/emulparams/elf_i386.sh
+++ /dev/null
@@ -1,13 +0,0 @@
-SCRIPT_NAME=elf
-OUTPUT_FORMAT="elf32-i386"
-TEXT_START_ADDR=0x08048000
-MAXPAGESIZE=0x1000
-COMMONPAGESIZE=0x1000
-NONPAGED_TEXT_START_ADDR=0x08048000
-ARCH=i386
-MACHINE=
-NOP=0x90909090
-TEMPLATE_NAME=elf32
-GENERATE_SHLIB_SCRIPT=yes
-GENERATE_PIE_SCRIPT=yes
-NO_SMALL_DATA=yes
diff --git a/contrib/binutils/ld/emulparams/elf_i386_chaos.sh b/contrib/binutils/ld/emulparams/elf_i386_chaos.sh
deleted file mode 100644
index e018231..0000000
--- a/contrib/binutils/ld/emulparams/elf_i386_chaos.sh
+++ /dev/null
@@ -1,11 +0,0 @@
-SCRIPT_NAME=elf_chaos
-OUTPUT_FORMAT="elf32-i386"
-TEXT_START_ADDR=0x40000000
-MAXPAGESIZE=0x1000
-NONPAGED_TEXT_START_ADDR=0x40000000
-ARCH=i386
-MACHINE=
-NOP=0x90909090
-TEMPLATE_NAME=elf32
-GENERATE_SHLIB_SCRIPT=yes
-NO_SMALL_DATA=yes
diff --git a/contrib/binutils/ld/emulparams/elf_i386_fbsd.sh b/contrib/binutils/ld/emulparams/elf_i386_fbsd.sh
deleted file mode 100644
index 2378598..0000000
--- a/contrib/binutils/ld/emulparams/elf_i386_fbsd.sh
+++ /dev/null
@@ -1,3 +0,0 @@
-. ${srcdir}/emulparams/elf_i386.sh
-. ${srcdir}/emulparams/elf_fbsd.sh
-OUTPUT_FORMAT="elf32-i386-freebsd"
diff --git a/contrib/binutils/ld/emulparams/elf_i386_ldso.sh b/contrib/binutils/ld/emulparams/elf_i386_ldso.sh
deleted file mode 100644
index a477a69..0000000
--- a/contrib/binutils/ld/emulparams/elf_i386_ldso.sh
+++ /dev/null
@@ -1,12 +0,0 @@
-SCRIPT_NAME=elf
-OUTPUT_FORMAT="elf32-i386"
-TEXT_START_ADDR=0x08048000
-MAXPAGESIZE=0x1000
-NONPAGED_TEXT_START_ADDR=0x08048000
-ARCH=i386
-MACHINE=
-NOP=0x90909090
-TEMPLATE_NAME=elf32
-GENERATE_SHLIB_SCRIPT=yes
-ELF_INTERPRETER_NAME=\"/usr/lib/ld.so.1\"
-NO_SMALL_DATA=yes
diff --git a/contrib/binutils/ld/emulparams/elf_s390.sh b/contrib/binutils/ld/emulparams/elf_s390.sh
deleted file mode 100644
index e710673..0000000
--- a/contrib/binutils/ld/emulparams/elf_s390.sh
+++ /dev/null
@@ -1,12 +0,0 @@
-SCRIPT_NAME=elf
-OUTPUT_FORMAT="elf32-s390"
-TEXT_START_ADDR=0x00400000
-MAXPAGESIZE=0x1000
-NONPAGED_TEXT_START_ADDR=0x00400000
-ARCH="s390:31-bit"
-MACHINE=
-NOP=0x07070707
-TEMPLATE_NAME=elf32
-GENERATE_SHLIB_SCRIPT=yes
-GENERATE_PIE_SCRIPT=yes
-NO_SMALL_DATA=yes
diff --git a/contrib/binutils/ld/emulparams/elf_x86_64.sh b/contrib/binutils/ld/emulparams/elf_x86_64.sh
deleted file mode 100644
index 6d37058..0000000
--- a/contrib/binutils/ld/emulparams/elf_x86_64.sh
+++ /dev/null
@@ -1,31 +0,0 @@
-SCRIPT_NAME=elf
-ELFSIZE=64
-OUTPUT_FORMAT="elf64-x86-64"
-TEXT_START_ADDR=0x400000
-MAXPAGESIZE=0x100000
-COMMONPAGESIZE=0x1000
-NONPAGED_TEXT_START_ADDR=0x400000
-ARCH="i386:x86-64"
-MACHINE=
-NOP=0x90909090
-TEMPLATE_NAME=elf32
-GENERATE_SHLIB_SCRIPT=yes
-GENERATE_PIE_SCRIPT=yes
-NO_SMALL_DATA=yes
-
-if [ "x${host}" = "x${target}" ]; then
- case " $EMULATION_LIBPATH " in
- *" ${EMULATION_NAME} "*)
- NATIVE=yes
- esac
-fi
-
-# Linux modify the default library search path to first include
-# a 64-bit specific directory.
-case "$target" in
- x86_64*-linux*)
- case "$EMULATION_NAME" in
- *64*) LIBPATH_SUFFIX=64 ;;
- esac
- ;;
-esac
diff --git a/contrib/binutils/ld/emulparams/elf_x86_64_fbsd.sh b/contrib/binutils/ld/emulparams/elf_x86_64_fbsd.sh
deleted file mode 100644
index 34258cb..0000000
--- a/contrib/binutils/ld/emulparams/elf_x86_64_fbsd.sh
+++ /dev/null
@@ -1,2 +0,0 @@
-. ${srcdir}/emulparams/elf_x86_64.sh
-. ${srcdir}/emulparams/elf_fbsd.sh
diff --git a/contrib/binutils/ld/emulparams/i386aout.sh b/contrib/binutils/ld/emulparams/i386aout.sh
deleted file mode 100644
index dc9e554..0000000
--- a/contrib/binutils/ld/emulparams/i386aout.sh
+++ /dev/null
@@ -1,6 +0,0 @@
-SCRIPT_NAME=aout
-OUTPUT_FORMAT="a.out-i386"
-TARGET_PAGE_SIZE=0x1000
-TEXT_START_ADDR=0
-NONPAGED_TEXT_START_ADDR=0x1000
-ARCH=i386
diff --git a/contrib/binutils/ld/emulparams/i386bsd.sh b/contrib/binutils/ld/emulparams/i386bsd.sh
deleted file mode 100644
index e0c0e2f..0000000
--- a/contrib/binutils/ld/emulparams/i386bsd.sh
+++ /dev/null
@@ -1,6 +0,0 @@
-SCRIPT_NAME=aout
-OUTPUT_FORMAT="a.out-i386-bsd"
-TARGET_PAGE_SIZE=0x1000
-TEXT_START_ADDR=0
-NONPAGED_TEXT_START_ADDR=0x1000
-ARCH=i386
diff --git a/contrib/binutils/ld/emulparams/i386coff.sh b/contrib/binutils/ld/emulparams/i386coff.sh
deleted file mode 100644
index 3417b7d..0000000
--- a/contrib/binutils/ld/emulparams/i386coff.sh
+++ /dev/null
@@ -1,5 +0,0 @@
-SCRIPT_NAME=i386coff
-OUTPUT_FORMAT="coff-i386"
-TEXT_START_ADDR=0x1000000
-TARGET_PAGE_SIZE=0x1000000
-ARCH=i386
diff --git a/contrib/binutils/ld/emulparams/i386linux.sh b/contrib/binutils/ld/emulparams/i386linux.sh
deleted file mode 100644
index a416422..0000000
--- a/contrib/binutils/ld/emulparams/i386linux.sh
+++ /dev/null
@@ -1,7 +0,0 @@
-SCRIPT_NAME=aout
-OUTPUT_FORMAT="a.out-i386-linux"
-TARGET_PAGE_SIZE=0x1000
-TEXT_START_ADDR=0x1020
-NONPAGED_TEXT_START_ADDR=0
-ARCH=i386
-TEMPLATE_NAME=linux
diff --git a/contrib/binutils/ld/emulparams/i386moss.sh b/contrib/binutils/ld/emulparams/i386moss.sh
deleted file mode 100644
index eece447..0000000
--- a/contrib/binutils/ld/emulparams/i386moss.sh
+++ /dev/null
@@ -1,10 +0,0 @@
-SCRIPT_NAME=elf
-OUTPUT_FORMAT="elf32-i386"
-TEXT_START_ADDR=0x00002000
-MAXPAGESIZE=0x1000
-NONPAGED_TEXT_START_ADDR=0x00002000
-ARCH=i386
-MACHINE=
-NOP=0x90909090
-TEMPLATE_NAME=elf32
-GENERATE_SHLIB_SCRIPT=yes
diff --git a/contrib/binutils/ld/emulparams/i386nbsd.sh b/contrib/binutils/ld/emulparams/i386nbsd.sh
deleted file mode 100644
index a9e6a38..0000000
--- a/contrib/binutils/ld/emulparams/i386nbsd.sh
+++ /dev/null
@@ -1,6 +0,0 @@
-SCRIPT_NAME=aout
-TEXT_START_ADDR=0x1020
-OUTPUT_FORMAT="a.out-i386-netbsd"
-TARGET_PAGE_SIZE=0x1000
-ARCH=i386
-EXECUTABLE_SYMBOLS='__DYNAMIC = 0;'
diff --git a/contrib/binutils/ld/emulparams/i386nto.sh b/contrib/binutils/ld/emulparams/i386nto.sh
deleted file mode 100644
index e4872ed..0000000
--- a/contrib/binutils/ld/emulparams/i386nto.sh
+++ /dev/null
@@ -1,12 +0,0 @@
-SCRIPT_NAME=elf
-OUTPUT_FORMAT="elf32-i386"
-TEXT_START_ADDR=0x08048000
-TEXT_START_SYMBOLS='_btext = .;'
-MAXPAGESIZE=0x1000
-NONPAGED_TEXT_START_ADDR=0x08048000
-#SHLIB_TEXT_START_ADDR=0xb0300000
-ARCH=i386
-MACHINE=
-NOP=0x9090
-TEMPLATE_NAME=elf32
-GENERATE_SHLIB_SCRIPT=yes
diff --git a/contrib/binutils/ld/emulparams/i386nw.sh b/contrib/binutils/ld/emulparams/i386nw.sh
deleted file mode 100644
index 621b475..0000000
--- a/contrib/binutils/ld/emulparams/i386nw.sh
+++ /dev/null
@@ -1,9 +0,0 @@
-SCRIPT_NAME=nw
-OUTPUT_FORMAT="elf32-i386"
-TEXT_START_ADDR=0x08000000
-MAXPAGESIZE=0x1000
-NONPAGED_TEXT_START_ADDR=0x08000000
-ARCH=i386
-NOP=0x90909090
-TEMPLATE_NAME=elf32
-GENERATE_SHLIB_SCRIPT=yes
diff --git a/contrib/binutils/ld/emulparams/i386pe.sh b/contrib/binutils/ld/emulparams/i386pe.sh
deleted file mode 100644
index a8add23..0000000
--- a/contrib/binutils/ld/emulparams/i386pe.sh
+++ /dev/null
@@ -1,8 +0,0 @@
-ARCH=i386
-SCRIPT_NAME=pe
-OUTPUT_FORMAT="pei-i386"
-RELOCATEABLE_OUTPUT_FORMAT="pe-i386"
-TEMPLATE_NAME=pe
-ENTRY="_mainCRTStartup"
-SUBSYSTEM=PE_DEF_SUBSYSTEM
-INITIAL_SYMBOL_CHAR=\"_\"
diff --git a/contrib/binutils/ld/emulparams/i386pe_posix.sh b/contrib/binutils/ld/emulparams/i386pe_posix.sh
deleted file mode 100644
index 37f51b5..0000000
--- a/contrib/binutils/ld/emulparams/i386pe_posix.sh
+++ /dev/null
@@ -1,9 +0,0 @@
-ARCH=i386
-SCRIPT_NAME=pe
-OUTPUT_FORMAT="pei-i386"
-RELOCATEABLE_OUTPUT_FORMAT="pe-i386"
-TEMPLATE_NAME=pe
-ENTRY="___PosixProcessStartup"
-SUBSYSTEM=7
-EXECUTABLE_NAME=a.out
-INITIAL_SYMBOL_CHAR=\"_\"
diff --git a/contrib/binutils/ld/emulparams/mipsbig.sh b/contrib/binutils/ld/emulparams/mipsbig.sh
deleted file mode 100644
index 9fe2953..0000000
--- a/contrib/binutils/ld/emulparams/mipsbig.sh
+++ /dev/null
@@ -1,6 +0,0 @@
-SCRIPT_NAME=mips
-OUTPUT_FORMAT="ecoff-bigmips"
-BIG_OUTPUT_FORMAT="ecoff-bigmips"
-LITTLE_OUTPUT_FORMAT="ecoff-littlemips"
-TARGET_PAGE_SIZE=0x1000000
-ARCH=mips
diff --git a/contrib/binutils/ld/emulparams/mipsbsd.sh b/contrib/binutils/ld/emulparams/mipsbsd.sh
deleted file mode 100644
index e8fb35b..0000000
--- a/contrib/binutils/ld/emulparams/mipsbsd.sh
+++ /dev/null
@@ -1,7 +0,0 @@
-SCRIPT_NAME=mipsbsd
-OUTPUT_FORMAT="a.out-mips-little"
-BIG_OUTPUT_FORMAT="a.out-mips-big"
-LITTLE_OUTPUT_FORMAT="a.out-mips-little"
-TEXT_START_ADDR=0x1020
-TARGET_PAGE_SIZE=4096
-ARCH=mips
diff --git a/contrib/binutils/ld/emulparams/mipsidt.sh b/contrib/binutils/ld/emulparams/mipsidt.sh
deleted file mode 100644
index 63176f5..0000000
--- a/contrib/binutils/ld/emulparams/mipsidt.sh
+++ /dev/null
@@ -1,11 +0,0 @@
-SCRIPT_NAME=mips
-OUTPUT_FORMAT="ecoff-bigmips"
-BIG_OUTPUT_FORMAT="ecoff-bigmips"
-LITTLE_OUTPUT_FORMAT="ecoff-littlemips"
-TARGET_PAGE_SIZE=0x1000000
-ARCH=mips
-ENTRY=start
-TEXT_START_ADDR=0xa0012000
-DATA_ADDR=.
-TEMPLATE_NAME=mipsecoff
-EMBEDDED=yes
diff --git a/contrib/binutils/ld/emulparams/mipsidtl.sh b/contrib/binutils/ld/emulparams/mipsidtl.sh
deleted file mode 100644
index 02279de..0000000
--- a/contrib/binutils/ld/emulparams/mipsidtl.sh
+++ /dev/null
@@ -1,11 +0,0 @@
-SCRIPT_NAME=mips
-OUTPUT_FORMAT="ecoff-littlemips"
-BIG_OUTPUT_FORMAT="ecoff-bigmips"
-LITTLE_OUTPUT_FORMAT="ecoff-littlemips"
-TARGET_PAGE_SIZE=0x1000000
-ARCH=mips
-ENTRY=start
-TEXT_START_ADDR=0xa0012000
-DATA_ADDR=.
-TEMPLATE_NAME=mipsecoff
-EMBEDDED=yes
diff --git a/contrib/binutils/ld/emulparams/mipslit.sh b/contrib/binutils/ld/emulparams/mipslit.sh
deleted file mode 100644
index acb2344..0000000
--- a/contrib/binutils/ld/emulparams/mipslit.sh
+++ /dev/null
@@ -1,6 +0,0 @@
-SCRIPT_NAME=mips
-OUTPUT_FORMAT="ecoff-littlemips"
-BIG_OUTPUT_FORMAT="ecoff-bigmips"
-LITTLE_OUTPUT_FORMAT="ecoff-littlemips"
-TARGET_PAGE_SIZE=0x1000000
-ARCH=mips
diff --git a/contrib/binutils/ld/emulparams/mipslnews.sh b/contrib/binutils/ld/emulparams/mipslnews.sh
deleted file mode 100644
index d0bb91c..0000000
--- a/contrib/binutils/ld/emulparams/mipslnews.sh
+++ /dev/null
@@ -1,9 +0,0 @@
-SCRIPT_NAME=mips
-OUTPUT_FORMAT="ecoff-littlemips"
-BIG_OUTPUT_FORMAT="ecoff-bigmips"
-LITTLE_OUTPUT_FORMAT="ecoff-littlemips"
-TARGET_PAGE_SIZE=0x1000000
-ARCH=mips
-TEXT_START_ADDR=0x80080000
-DATA_ADDR=.
-EMBEDDED=yes
diff --git a/contrib/binutils/ld/emulparams/mipspe.sh b/contrib/binutils/ld/emulparams/mipspe.sh
deleted file mode 100644
index 9dd9ce7..0000000
--- a/contrib/binutils/ld/emulparams/mipspe.sh
+++ /dev/null
@@ -1,9 +0,0 @@
-ARCH=mips
-SCRIPT_NAME=pe
-OUTPUT_FORMAT="pei-mips"
-OUTPUT_ARCH="mips"
-RELOCATEABLE_OUTPUT_FORMAT="ecoff-littlemips"
-TEMPLATE_NAME=pe
-SUBSYSTEM=PE_DEF_SUBSYSTEM
-INITIAL_SYMBOL_CHAR=\"_\"
-ENTRY="_mainCRTStartup"
diff --git a/contrib/binutils/ld/emulparams/ppcmacos.sh b/contrib/binutils/ld/emulparams/ppcmacos.sh
deleted file mode 100644
index 9f02af4..0000000
--- a/contrib/binutils/ld/emulparams/ppcmacos.sh
+++ /dev/null
@@ -1,6 +0,0 @@
-TEMPLATE_NAME=aix
-SCRIPT_NAME=aix
-OUTPUT_FORMAT="xcoff-powermac"
-OUTPUT_FORMAT_32BIT="xcoff-powermac"
-OUTPUT_FORMAT_64BIT="xcoff-powermac"
-ARCH=powerpc
diff --git a/contrib/binutils/ld/emulparams/ppcnw.sh b/contrib/binutils/ld/emulparams/ppcnw.sh
deleted file mode 100644
index c3ead43..0000000
--- a/contrib/binutils/ld/emulparams/ppcnw.sh
+++ /dev/null
@@ -1,7 +0,0 @@
-SCRIPT_NAME=nw
-OUTPUT_FORMAT="elf32-powerpc"
-TEXT_START_ADDR=0x0400000
-DATA_ADDR=0x10000000
-MAXPAGESIZE=0x40000
-NONPAGED_TEXT_START_ADDR=0x0400000
-ARCH=powerpc
diff --git a/contrib/binutils/ld/emulparams/ppcpe.sh b/contrib/binutils/ld/emulparams/ppcpe.sh
deleted file mode 100644
index a2d09ef..0000000
--- a/contrib/binutils/ld/emulparams/ppcpe.sh
+++ /dev/null
@@ -1,7 +0,0 @@
-ARCH=powerpc
-SCRIPT_NAME=ppcpe
-OUTPUT_FORMAT="pei-powerpcle"
-TEMPLATE_NAME=pe
-ENTRY="_mainCRTStartup"
-SUBSYSTEM=PE_DEF_SUBSYSTEM
-INITIAL_SYMBOL_CHAR=\"_\"
diff --git a/contrib/binutils/ld/emulparams/sh.sh b/contrib/binutils/ld/emulparams/sh.sh
deleted file mode 100644
index 52d1443..0000000
--- a/contrib/binutils/ld/emulparams/sh.sh
+++ /dev/null
@@ -1,8 +0,0 @@
-# If you change this file, please also look at files which source this one:
-# shl.sh
-
-SCRIPT_NAME=sh
-OUTPUT_FORMAT="coff-sh"
-TEXT_START_ADDR=0x8000
-TARGET_PAGE_SIZE=128
-ARCH=sh
diff --git a/contrib/binutils/ld/emulparams/shl.sh b/contrib/binutils/ld/emulparams/shl.sh
deleted file mode 100644
index 5fbb165..0000000
--- a/contrib/binutils/ld/emulparams/shl.sh
+++ /dev/null
@@ -1,2 +0,0 @@
-. ${srcdir}/emulparams/sh.sh
-OUTPUT_FORMAT="coff-shl"
diff --git a/contrib/binutils/ld/emulparams/shlelf.sh b/contrib/binutils/ld/emulparams/shlelf.sh
deleted file mode 100755
index e19678b..0000000
--- a/contrib/binutils/ld/emulparams/shlelf.sh
+++ /dev/null
@@ -1,2 +0,0 @@
-. ${srcdir}/emulparams/shelf.sh
-OUTPUT_FORMAT="elf32-shl"
diff --git a/contrib/binutils/ld/emulparams/sparcaout.sh b/contrib/binutils/ld/emulparams/sparcaout.sh
deleted file mode 100644
index 429b925..0000000
--- a/contrib/binutils/ld/emulparams/sparcaout.sh
+++ /dev/null
@@ -1,8 +0,0 @@
-SCRIPT_NAME=aout
-OUTPUT_FORMAT="a.out-sunos-big"
-BIG_OUTPUT_FORMAT="a.out-sunos-big"
-LITTLE_OUTPUT_FORMAT="a.out-sparc-little"
-TEXT_START_ADDR=0x2020
-TARGET_PAGE_SIZE=0x2000
-NONPAGED_TEXT_START_ADDR=0x2000
-ARCH=sparc
diff --git a/contrib/binutils/ld/emulparams/sparclinux.sh b/contrib/binutils/ld/emulparams/sparclinux.sh
deleted file mode 100644
index 7ccb0be..0000000
--- a/contrib/binutils/ld/emulparams/sparclinux.sh
+++ /dev/null
@@ -1,7 +0,0 @@
-SCRIPT_NAME=aout
-OUTPUT_FORMAT="a.out-sparc-linux"
-TARGET_PAGE_SIZE=0x1000
-TEXT_START_ADDR=0x1020
-NONPAGED_TEXT_START_ADDR=0
-ARCH=sparc
-TEMPLATE_NAME=linux
diff --git a/contrib/binutils/ld/emulparams/sparcnbsd.sh b/contrib/binutils/ld/emulparams/sparcnbsd.sh
deleted file mode 100644
index f27daf3..0000000
--- a/contrib/binutils/ld/emulparams/sparcnbsd.sh
+++ /dev/null
@@ -1,5 +0,0 @@
-SCRIPT_NAME=aout
-TEXT_START_ADDR=0x1020
-OUTPUT_FORMAT="a.out-sparc-netbsd"
-TARGET_PAGE_SIZE=0x1000
-ARCH=sparc
diff --git a/contrib/binutils/ld/emulparams/sun4.sh b/contrib/binutils/ld/emulparams/sun4.sh
deleted file mode 100644
index bd42775..0000000
--- a/contrib/binutils/ld/emulparams/sun4.sh
+++ /dev/null
@@ -1,8 +0,0 @@
-SCRIPT_NAME=aout
-OUTPUT_FORMAT="a.out-sunos-big"
-TEXT_START_ADDR=0x2020
-TARGET_PAGE_SIZE=0x2000
-NONPAGED_TEXT_START_ADDR=0x2000
-ALIGNMENT=8
-ARCH=sparc
-TEMPLATE_NAME=sunos
diff --git a/contrib/binutils/ld/emulparams/vanilla.sh b/contrib/binutils/ld/emulparams/vanilla.sh
deleted file mode 100644
index eabb7cd..0000000
--- a/contrib/binutils/ld/emulparams/vanilla.sh
+++ /dev/null
@@ -1,5 +0,0 @@
-SCRIPT_NAME=vanilla
-TEXT_START_ADDR=0
-TARGET_PAGE_SIZE=128
-ARCH=unknown
-TEMPLATE_NAME=vanilla
diff --git a/contrib/binutils/ld/emulparams/vsta.sh b/contrib/binutils/ld/emulparams/vsta.sh
deleted file mode 100644
index cc6249b..0000000
--- a/contrib/binutils/ld/emulparams/vsta.sh
+++ /dev/null
@@ -1,8 +0,0 @@
-SCRIPT_NAME=aout
-OUTPUT_FORMAT="a.out-i386"
-TEXT_START_ADDR=0x1020
-TARGET_PAGE_SIZE=0x1000
-SEGMENT_SIZE=0x400000
-NONPAGED_TEXT_START_ADDR=0x0
-ARCH=i386
-
diff --git a/contrib/binutils/ld/emultempl/README b/contrib/binutils/ld/emultempl/README
deleted file mode 100644
index 30ec0ab..0000000
--- a/contrib/binutils/ld/emultempl/README
+++ /dev/null
@@ -1,3 +0,0 @@
-The files in this directory are sourced by genscripts.sh, after
-setting some variables to substitute in, to produce
-C source files that contain jump tables for each emulation.
diff --git a/contrib/binutils/ld/emultempl/alphaelf.em b/contrib/binutils/ld/emultempl/alphaelf.em
deleted file mode 100644
index 7e64323..0000000
--- a/contrib/binutils/ld/emultempl/alphaelf.em
+++ /dev/null
@@ -1,80 +0,0 @@
-# This shell script emits a C file. -*- C -*-
-# Copyright 2003 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., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
-#
-
-# This file is sourced from elf32.em, and defines extra alpha
-# specific routines.
-#
-cat >>e${EMULATION_NAME}.c <<EOF
-
-#include "elf/internal.h"
-#include "elf/alpha.h"
-#include "elf-bfd.h"
-
-static int elf64alpha_32bit = 0;
-
-/* Set the start address as in the Tru64 ld. */
-#define ALPHA_TEXT_START_32BIT 0x12000000
-
-static void
-alpha_after_parse (void)
-{
- if (elf64alpha_32bit && !link_info.shared && !link_info.relocatable)
- lang_section_start (".interp",
- exp_binop ('+',
- exp_intop (ALPHA_TEXT_START_32BIT),
- exp_nameop (SIZEOF_HEADERS, NULL)));
-}
-
-static void
-alpha_finish (void)
-{
- if (elf64alpha_32bit)
- elf_elfheader (output_bfd)->e_flags |= EF_ALPHA_32BIT;
-
- gld${EMULATION_NAME}_finish ();
-}
-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_TASO 300
-'
-
-PARSE_AND_LIST_LONGOPTS='
- {"taso", no_argument, NULL, OPTION_TASO},
-'
-
-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"));
-'
-
-PARSE_AND_LIST_ARGS_CASES='
- case OPTION_TASO:
- elf64alpha_32bit = 1;
- break;
-'
-
-# Put these extra alpha routines in ld_${EMULATION_NAME}_emulation
-#
-LDEMUL_AFTER_PARSE=alpha_after_parse
-LDEMUL_FINISH=alpha_finish
diff --git a/contrib/binutils/ld/emultempl/armcoff.em b/contrib/binutils/ld/emultempl/armcoff.em
deleted file mode 100644
index 468c3b0..0000000
--- a/contrib/binutils/ld/emultempl/armcoff.em
+++ /dev/null
@@ -1,277 +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}
-
-#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"
-
-/* If TRUE, then interworking stubs which support calls to old,
- non-interworking aware ARM code should be generated. */
-
-static int support_old_code = 0;
-static char * thumb_entry_symbol = NULL;
-
-#define OPTION_SUPPORT_OLD_CODE 300
-#define OPTION_THUMB_ENTRY 301
-
-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[] = {
- {"support-old-code", no_argument, NULL, OPTION_SUPPORT_OLD_CODE},
- {"thumb-entry", required_argument, NULL, OPTION_THUMB_ENTRY},
- {NULL, no_argument, NULL, 0}
- };
-
- *longopts = xrealloc (*longopts,
- nl * sizeof (struct option) + sizeof (xtra_long));
- memcpy (*longopts + nl, &xtra_long, sizeof (xtra_long));
-}
-
-static void
-gld${EMULATION_NAME}_list_options (FILE *file)
-{
- fprintf (file, _(" --support-old-code Support interworking with old code\n"));
- fprintf (file, _(" --thumb-entry=<sym> Set the entry point to be Thumb symbol <sym>\n"));
-}
-
-static bfd_boolean
-gld${EMULATION_NAME}_handle_option (int optc)
-{
- switch (optc)
- {
- default:
- return FALSE;
-
- case OPTION_SUPPORT_OLD_CODE:
- support_old_code = 1;
- break;
-
- case OPTION_THUMB_ENTRY:
- thumb_entry_symbol = optarg;
- break;
- }
-
- return TRUE;
-}
-
-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_arm_process_before_allocation
- (is->the_bfd, & link_info, support_old_code))
- {
- /* xgettext:c-format */
- einfo (_("Errors encountered processing file %s"), is->filename);
- }
- }
- }
-
- /* We have seen it all. Allocate it, and carry on */
- bfd_arm_allocate_interworking_sections (& link_info);
-}
-
-static void
-gld${EMULATION_NAME}_after_open (void)
-{
- if (strstr (bfd_get_target (output_bfd), "arm") == NULL)
- {
- /* The arm backend needs special fields in the output hash structure.
- These will only be created if the output format is an arm 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 ARM binaries\n");
- return;
- }
-
- {
- LANG_FOR_EACH_INPUT_STATEMENT (is)
- {
- if (bfd_arm_get_bfd_for_interworking (is->the_bfd, & link_info))
- break;
- }
- }
-}
-
-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)
- {
- 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);
-}
-
-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}",
- gld${EMULATION_NAME}_finish,
- NULL, /* create output section statements */
- NULL, /* open dynamic archive */
- NULL, /* place orphan */
- NULL, /* set symbols */
- NULL, /* parse_args */
- gld${EMULATION_NAME}_add_options,
- gld${EMULATION_NAME}_handle_option,
- NULL, /* unrecognised file */
- gld${EMULATION_NAME}_list_options,
- NULL, /* recognized file */
- NULL, /* find_potential_libraries */
- NULL /* new_vers_pattern */
-};
-EOF
diff --git a/contrib/binutils/ld/emultempl/armelf.em b/contrib/binutils/ld/emultempl/armelf.em
deleted file mode 100644
index 0c051ad..0000000
--- a/contrib/binutils/ld/emultempl/armelf.em
+++ /dev/null
@@ -1,220 +0,0 @@
-# This shell script emits a C file. -*- C -*-
-# Copyright 1991, 1993, 1996, 1997, 1998, 1999, 2000, 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., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
-#
-
-# This file is sourced from elf32.em, and defines extra arm-elf
-# specific routines.
-#
-cat >>e${EMULATION_NAME}.c <<EOF
-
-static int no_pipeline_knowledge = 0;
-static char *thumb_entry_symbol = NULL;
-static bfd *bfd_for_interwork;
-
-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_ */
- config.dynamic_link = ${DYNAMIC_LINK-TRUE};
- config.has_shared = `if test -n "$GENERATE_SHLIB_SCRIPT" ; then echo TRUE ; else echo FALSE ; fi`;
-}
-
-static void
-arm_elf_after_open (void)
-{
- if (strstr (bfd_get_target (output_bfd), "arm") == NULL)
- {
- /* The arm backend needs special fields in the output hash structure.
- These will only be created if the output format is an arm 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 ARM binaries\n");
- return;
- }
-
- {
- LANG_FOR_EACH_INPUT_STATEMENT (is)
- {
- bfd_elf32_arm_add_glue_sections_to_bfd (is->the_bfd, & link_info);
- }
- }
-
- /* Call the standard elf routine. */
- gld${EMULATION_NAME}_after_open ();
-}
-
-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)
- {
- 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)
- {
- bfd_for_interwork = i->owner;
- bfd_for_interwork->output_has_begun = TRUE;
- }
- }
-}
-
-static void
-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. */
- bfd_for_interwork = NULL;
- for (tem = link_info.input_bfds; tem != NULL; tem = tem->link_next)
- tem->output_has_begun = FALSE;
-
- lang_for_each_statement (arm_elf_set_bfd_for_interworking);
- for (tem = link_info.input_bfds; tem != NULL; tem = tem->link_next)
- tem->output_has_begun = FALSE;
-
- /* If bfd_for_interwork is NULL, then there are no loadable sections
- with real contents to be linked, so we are not going to have to
- create any interworking stubs, so it is OK not to call
- bfd_elf32_arm_get_bfd_for_interworking. */
- 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))
- {
- /* 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
-arm_elf_finish (void)
-{
- struct bfd_link_hash_entry * h;
-
- /* Call the elf32.em routine. */
- gld${EMULATION_NAME}_finish ();
-
- 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)
- {
- 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);
-}
-
-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_THUMB_ENTRY 301
-'
-
-PARSE_AND_LIST_SHORTOPTS=p
-
-PARSE_AND_LIST_LONGOPTS='
- { "no-pipeline-knowledge", no_argument, NULL, '\'p\''},
- { "thumb-entry", required_argument, NULL, OPTION_THUMB_ENTRY},
-'
-
-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"));
-'
-
-PARSE_AND_LIST_ARGS_CASES='
- case '\'p\'':
- no_pipeline_knowledge = 1;
- break;
-
- case OPTION_THUMB_ENTRY:
- thumb_entry_symbol = optarg;
- 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
-
-# Replace the elf before_parse function with our own.
-LDEMUL_BEFORE_PARSE=gld"${EMULATION_NAME}"_before_parse
-
-# Call the extra arm-elf function
-LDEMUL_FINISH=arm_elf_finish
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/astring.sed b/contrib/binutils/ld/emultempl/astring.sed
deleted file mode 100644
index 08bd8a6..0000000
--- a/contrib/binutils/ld/emultempl/astring.sed
+++ /dev/null
@@ -1,13 +0,0 @@
-s/["\\]/\\&/g
-s/$/\\n\\/
-1 s/^/"/
-25s/\\$/"/
-26s/^/"/
-50s/\\$/"/
-51s/^/"/
-75s/\\$/"/
-76s/^/"/
-100s/\\$/"/
-101s/^/"/
-$ s/$/n"/
-$ s/\\n"n"$/\\n"/
diff --git a/contrib/binutils/ld/emultempl/elf32.em b/contrib/binutils/ld/emultempl/elf32.em
deleted file mode 100644
index 92f502d..0000000
--- a/contrib/binutils/ld/emultempl/elf32.em
+++ /dev/null
@@ -1,1780 +0,0 @@
-# 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
-# ELF emulations.
-test -z "${ELFSIZE}" && ELFSIZE=32
-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! */
-
-/* ${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.
- Written by Steve Chamberlain <sac@cygnus.com>
- ELF support by Ian Lance Taylor <ian@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}
-
-#include "bfd.h"
-#include "sysdep.h"
-#include "libiberty.h"
-#include "safe-ctype.h"
-#include "getopt.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"
-#include <ldgram.h>
-#include "elf/common.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 void gld${EMULATION_NAME}_finish (void);
-
-EOF
-
-# Import any needed special functions and/or overrides.
-#
-if test -n "$EXTRA_EM_FILE" ; then
-. ${srcdir}/emultempl/${EXTRA_EM_FILE}.em
-fi
-
-# Functions in this file can be overridden by setting the LDEMUL_* shell
-# variables. If the name of the overriding function is the same as is
-# defined in this file, then don't output this file's version.
-# If a different overriding name is given then output the standard function
-# as presumably it is called from the overriding function.
-#
-if test x"$LDEMUL_BEFORE_PARSE" != xgld"$EMULATION_NAME"_before_parse; then
-cat >>e${EMULATION_NAME}.c <<EOF
-
-static void
-gld${EMULATION_NAME}_before_parse (void)
-{
- ldfile_set_output_arch ("${OUTPUT_ARCH}", bfd_arch_`echo ${ARCH} | sed -e 's/:.*//'`);
- config.dynamic_link = ${DYNAMIC_LINK-TRUE};
- config.has_shared = `if test -n "$GENERATE_SHLIB_SCRIPT" ; then echo TRUE ; else echo FALSE ; fi`;
-}
-
-EOF
-fi
-
-if test x"$LDEMUL_RECOGNIZED_FILE" != xgld"${EMULATION_NAME}"_load_symbols; then
-cat >>e${EMULATION_NAME}.c <<EOF
-/* Handle as_needed DT_NEEDED. */
-
-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;
-
- /* 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);
-
- /* Continue on with normal load_symbols processing. */
- return FALSE;
-}
-EOF
-fi
-
-cat >>e${EMULATION_NAME}.c <<EOF
-
-/* These variables are required to pass information back and forth
- between after_open and check_needed and stat_needed and vercheck. */
-
-static struct bfd_link_needed_list *global_needed;
-static struct stat global_stat;
-static bfd_boolean global_found;
-static struct bfd_link_needed_list *global_vercheck_needed;
-static bfd_boolean global_vercheck_failed;
-
-
-/* On Linux, it's possible to have different versions of the same
- shared library linked against different versions of libc. The
- dynamic linker somehow tags which libc version to use in
- /etc/ld.so.cache, and, based on the libc that it sees in the
- executable, chooses which version of the shared library to use.
-
- We try to do a similar check here by checking whether this shared
- library needs any other shared libraries which may conflict with
- libraries we have already included in the link. If it does, we
- skip it, and try to find another shared library farther on down the
- link path.
-
- This is called via lang_for_each_input_file.
- GLOBAL_VERCHECK_NEEDED is the list of objects needed by the object
- which we are checking. This sets GLOBAL_VERCHECK_FAILED if we find
- a conflicting version. */
-
-static void
-gld${EMULATION_NAME}_vercheck (lang_input_statement_type *s)
-{
- const char *soname;
- struct bfd_link_needed_list *l;
-
- if (global_vercheck_failed)
- return;
- if (s->the_bfd == NULL
- || (bfd_get_file_flags (s->the_bfd) & DYNAMIC) == 0)
- return;
-
- soname = bfd_elf_get_dt_soname (s->the_bfd);
- if (soname == NULL)
- soname = lbasename (bfd_get_filename (s->the_bfd));
-
- for (l = global_vercheck_needed; l != NULL; l = l->next)
- {
- const char *suffix;
-
- if (strcmp (soname, l->name) == 0)
- {
- /* Probably can't happen, but it's an easy check. */
- continue;
- }
-
- if (strchr (l->name, '/') != NULL)
- continue;
-
- suffix = strstr (l->name, ".so.");
- if (suffix == NULL)
- continue;
-
- suffix += sizeof ".so." - 1;
-
- if (strncmp (soname, l->name, suffix - l->name) == 0)
- {
- /* Here we know that S is a dynamic object FOO.SO.VER1, and
- the object we are considering needs a dynamic object
- FOO.SO.VER2, and VER1 and VER2 are different. This
- appears to be a version mismatch, so we tell the caller
- to try a different version of this library. */
- global_vercheck_failed = TRUE;
- return;
- }
- }
-}
-
-
-/* See if an input file matches a DT_NEEDED entry by running stat on
- the file. */
-
-static void
-gld${EMULATION_NAME}_stat_needed (lang_input_statement_type *s)
-{
- struct stat st;
- const char *suffix;
- const char *soname;
-
- if (global_found)
- return;
- if (s->the_bfd == NULL)
- return;
-
- if (bfd_stat (s->the_bfd, &st) != 0)
- {
- einfo ("%P:%B: bfd_stat failed: %E\n", s->the_bfd);
- return;
- }
-
- if (st.st_dev == global_stat.st_dev
- && st.st_ino == global_stat.st_ino)
- {
- global_found = TRUE;
- return;
- }
-
- /* We issue a warning if it looks like we are including two
- different versions of the same shared library. For example,
- there may be a problem if -lc picks up libc.so.6 but some other
- shared library has a DT_NEEDED entry of libc.so.5. This is a
- heuristic test, and it will only work if the name looks like
- NAME.so.VERSION. FIXME: Depending on file names is error-prone.
- If we really want to issue warnings about mixing version numbers
- of shared libraries, we need to find a better way. */
-
- if (strchr (global_needed->name, '/') != NULL)
- return;
- suffix = strstr (global_needed->name, ".so.");
- if (suffix == NULL)
- return;
- suffix += sizeof ".so." - 1;
-
- soname = bfd_elf_get_dt_soname (s->the_bfd);
- if (soname == NULL)
- soname = lbasename (s->filename);
-
- if (strncmp (soname, global_needed->name, suffix - global_needed->name) == 0)
- einfo ("%P: warning: %s, needed by %B, may conflict with %s\n",
- global_needed->name, global_needed->by, soname);
-}
-
-
-/* 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)
-{
- bfd *abfd;
- const char *soname;
-
- abfd = bfd_openr (name, bfd_get_target (output_bfd));
- if (abfd == NULL)
- return FALSE;
- if (! bfd_check_format (abfd, bfd_object))
- {
- bfd_close (abfd);
- return FALSE;
- }
- if ((bfd_get_file_flags (abfd) & DYNAMIC) == 0)
- {
- bfd_close (abfd);
- return FALSE;
- }
-
- /* For DT_NEEDED, they have to match. */
- if (abfd->xvec != output_bfd->xvec)
- {
- bfd_close (abfd);
- return FALSE;
- }
-
- /* Check whether this object would include any conflicting library
- versions. If FORCE is set, then we skip this check; we use this
- the second time around, if we couldn't find any compatible
- instance of the shared library. */
-
- if (! force)
- {
- struct bfd_link_needed_list *needed;
-
- if (! bfd_elf_get_bfd_needed_list (abfd, &needed))
- einfo ("%F%P:%B: bfd_elf_get_bfd_needed_list failed: %E\n", abfd);
-
- if (needed != NULL)
- {
- global_vercheck_needed = needed;
- global_vercheck_failed = FALSE;
- lang_for_each_input_file (gld${EMULATION_NAME}_vercheck);
- if (global_vercheck_failed)
- {
- bfd_close (abfd);
- /* Return FALSE to force the caller to move on to try
- another file on the search path. */
- return FALSE;
- }
-
- /* But wait! It gets much worse. On Linux, if a shared
- library does not use libc at all, we are supposed to skip
- it the first time around in case we encounter a shared
- library later on with the same name which does use the
- version of libc that we want. This is much too horrible
- to use on any system other than Linux. */
-
-EOF
-case ${target} in
- *-*-linux-gnu*)
- cat >>e${EMULATION_NAME}.c <<EOF
- {
- struct bfd_link_needed_list *l;
-
- for (l = needed; l != NULL; l = l->next)
- if (strncmp (l->name, "libc.so", 7) == 0)
- break;
- if (l == NULL)
- {
- bfd_close (abfd);
- return FALSE;
- }
- }
-
-EOF
- ;;
-esac
-cat >>e${EMULATION_NAME}.c <<EOF
- }
- }
-
- /* We've found a dynamic object matching the DT_NEEDED entry. */
-
- /* We have already checked that there is no other input file of the
- same name. We must now check again that we are not including the
- same file twice. We need to do this because on many systems
- libc.so is a symlink to, e.g., libc.so.1. The SONAME entry will
- reference libc.so.1. If we have already included libc.so, we
- don't want to include libc.so.1 if they are the same file, and we
- can only check that using stat. */
-
- if (bfd_stat (abfd, &global_stat) != 0)
- einfo ("%F%P:%B: bfd_stat failed: %E\n", abfd);
-
- /* First strip off everything before the last '/'. */
- soname = lbasename (abfd->filename);
-
- if (trace_file_tries)
- info_msg (_("found %s at %s\n"), soname, name);
-
- global_found = FALSE;
- lang_for_each_input_file (gld${EMULATION_NAME}_stat_needed);
- if (global_found)
- {
- /* Return TRUE to indicate that we found the file, even though
- we aren't going to do anything with it. */
- return TRUE;
- }
-
- /* Specify the soname to use. */
- bfd_elf_set_dt_needed_name (abfd, soname);
-
- /* 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);
-
- /* Add this file into the symbol table. */
- if (! bfd_link_add_symbols (abfd, &link_info))
- einfo ("%F%B: could not read symbols: %E\n", abfd);
-
- return TRUE;
-}
-
-
-/* Search for a needed file in a path. */
-
-static bfd_boolean
-gld${EMULATION_NAME}_search_needed (const char *path, const char *name, int force)
-{
- const char *s;
- size_t len;
-
- if (name[0] == '/')
- return gld${EMULATION_NAME}_try_needed (name, force);
-
- if (path == NULL || *path == '\0')
- return FALSE;
- len = strlen (name);
- while (1)
- {
- char *filename, *sset;
-
- s = strchr (path, ':');
- if (s == NULL)
- s = path + strlen (path);
-
- filename = (char *) xmalloc (s - path + len + 2);
- if (s == path)
- sset = filename;
- else
- {
- memcpy (filename, path, s - path);
- filename[s - path] = '/';
- sset = filename + (s - path) + 1;
- }
- strcpy (sset, name);
-
- if (gld${EMULATION_NAME}_try_needed (filename, force))
- return TRUE;
-
- free (filename);
-
- if (*s == '\0')
- break;
- path = s + 1;
- }
-
- return FALSE;
-}
-
-EOF
-if [ "x${USE_LIBPATH}" = xyes ] ; then
- cat >>e${EMULATION_NAME}.c <<EOF
-
-/* Add the sysroot to every entry in a colon-separated path. */
-
-static char *
-gld${EMULATION_NAME}_add_sysroot (const char *path)
-{
- int len, colons, i;
- char *ret, *p;
-
- len = strlen (path);
- colons = 0;
- i = 0;
- while (path[i])
- if (path[i++] == ':')
- colons++;
-
- if (path[i])
- colons++;
-
- len = len + (colons + 1) * strlen (ld_sysroot);
- ret = xmalloc (len + 1);
- strcpy (ret, ld_sysroot);
- p = ret + strlen (ret);
- i = 0;
- while (path[i])
- if (path[i] == ':')
- {
- *p++ = path[i++];
- strcpy (p, ld_sysroot);
- p = p + strlen (p);
- }
- else
- *p++ = path[i++];
-
- *p = 0;
- return ret;
-}
-
-EOF
- case ${target} in
- *-*-linux-gnu*)
- 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. */
-
-static bfd_boolean
-gld${EMULATION_NAME}_check_ld_so_conf (const char *name, int force)
-{
- static bfd_boolean initialized;
- static char *ld_so_conf;
-
- if (! initialized)
- {
- FILE *f;
- char *tmppath;
-
- tmppath = concat (ld_sysroot, "/etc/ld.so.conf", NULL);
- f = fopen (tmppath, FOPEN_RT);
- free (tmppath);
- if (f != NULL)
- {
- char *b;
- size_t len, alloc;
- int c;
-
- len = 0;
- alloc = 100;
- b = (char *) xmalloc (alloc);
-
- while ((c = getc (f)) != EOF)
- {
- 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;
- }
- }
- }
-
- if (len > 0 && b[len - 1] == ':')
- --len;
-
- if (len > 0)
- b[len] = '\0';
- else
- {
- free (b);
- b = NULL;
- }
-
- fclose (f);
-
- if (b)
- {
- char *d = gld${EMULATION_NAME}_add_sysroot (b);
- free (b);
- b = d;
- }
-
- ld_so_conf = b;
- }
-
- initialized = TRUE;
- }
-
- if (ld_so_conf == NULL)
- return FALSE;
-
- return gld${EMULATION_NAME}_search_needed (ld_so_conf, name, force);
-}
-
-EOF
- # Linux
- ;;
- esac
-fi
-cat >>e${EMULATION_NAME}.c <<EOF
-
-/* See if an input file matches a DT_NEEDED entry by name. */
-
-static void
-gld${EMULATION_NAME}_check_needed (lang_input_statement_type *s)
-{
- if (global_found)
- return;
-
- if (s->filename != NULL)
- {
- const char *f;
-
- if (strcmp (s->filename, global_needed->name) == 0)
- {
- global_found = TRUE;
- 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 (s->the_bfd != NULL)
- {
- const char *soname;
-
- soname = bfd_elf_get_dt_soname (s->the_bfd);
- if (soname != NULL
- && strcmp (soname, global_needed->name) == 0)
- {
- global_found = TRUE;
- return;
- }
- }
-}
-
-EOF
-
-if test x"$LDEMUL_AFTER_OPEN" != xgld"$EMULATION_NAME"_after_open; then
-cat >>e${EMULATION_NAME}.c <<EOF
-
-/* This is called after all the input files have been opened. */
-
-static void
-gld${EMULATION_NAME}_after_open (void)
-{
- struct bfd_link_needed_list *needed, *l;
-
- /* We only need to worry about this when doing a final link. */
- if (link_info.relocatable || !link_info.executable)
- return;
-
- /* Get the list of files which appear in DT_NEEDED entries in
- dynamic objects included in the link (often there will be none).
- For each such file, we want to track down the corresponding
- library, and include the symbol table in the link. This is what
- the runtime dynamic linker will do. Tracking the files down here
- permits one dynamic object to include another without requiring
- special action by the person doing the link. Note that the
- needed list can actually grow while we are stepping through this
- loop. */
- needed = bfd_elf_get_needed_list (output_bfd, &link_info);
- for (l = needed; l != NULL; l = l->next)
- {
- struct bfd_link_needed_list *ll;
- int force;
-
- /* If we've already seen this file, skip it. */
- for (ll = needed; ll != l; ll = ll->next)
- if (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;
- lang_for_each_input_file (gld${EMULATION_NAME}_check_needed);
- if (global_found)
- continue;
-
- if (trace_file_tries)
- info_msg (_("%s needed by %B\n"), l->name, l->by);
-
- /* 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
- rpath_link, rpath, then the environment variable
- LD_LIBRARY_PATH (native only), then the DT_RPATH/DT_RUNPATH
- entries (native only), then the linker script LIB_SEARCH_DIRS.
- We do not search using the -L arguments.
-
- We search twice. The first time, we skip objects which may
- introduce version mismatches. The second time, we force
- their use. See gld${EMULATION_NAME}_vercheck comment. */
- for (force = 0; force < 2; force++)
- {
- size_t len;
- search_dirs_type *search;
-EOF
-if [ "x${USE_LIBPATH}" = xyes ] ; then
-cat >>e${EMULATION_NAME}.c <<EOF
- const char *lib_path;
- struct bfd_link_needed_list *rp;
- int found;
-EOF
-fi
-cat >>e${EMULATION_NAME}.c <<EOF
-
- if (gld${EMULATION_NAME}_search_needed (command_line.rpath_link,
- l->name, 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))
- break;
-EOF
-fi
-if [ "x${NATIVE}" = xyes ] ; then
-cat >>e${EMULATION_NAME}.c <<EOF
- if (command_line.rpath_link == NULL
- && command_line.rpath == NULL)
- {
- lib_path = (const char *) getenv ("LD_RUN_PATH");
- if (gld${EMULATION_NAME}_search_needed (lib_path, l->name,
- force))
- break;
- }
- lib_path = (const char *) getenv ("LD_LIBRARY_PATH");
- if (gld${EMULATION_NAME}_search_needed (lib_path, l->name, force))
- break;
-EOF
-fi
-if [ "x${USE_LIBPATH}" = xyes ] ; then
-cat >>e${EMULATION_NAME}.c <<EOF
- found = 0;
- rp = bfd_elf_get_runpath_list (output_bfd, &link_info);
- for (; !found && rp != NULL; rp = rp->next)
- {
- char *tmpname = gld${EMULATION_NAME}_add_sysroot (rp->name);
- found = (rp->by == l->by
- && gld${EMULATION_NAME}_search_needed (tmpname,
- l->name,
- force));
- free (tmpname);
- }
- if (found)
- break;
-
-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
- *-*-linux-gnu*)
- 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
- }
-
- if (force < 2)
- continue;
-
- einfo ("%P: warning: %s, needed by %B, not found (try using -rpath or -rpath-link)\n",
- l->name, l->by);
- }
-}
-
-EOF
-fi
-
-cat >>e${EMULATION_NAME}.c <<EOF
-
-/* Look through an expression for an assignment statement. */
-
-static void
-gld${EMULATION_NAME}_find_exp_assignment (etree_type *exp)
-{
- struct bfd_link_hash_entry *h;
-
- 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;
-
- /* 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,
- not the value from the dynamic object (because we are setting
- 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)))
- einfo ("%P%F: failed to record assignment to %s: %E\n",
- exp->assign.dst);
- }
- gld${EMULATION_NAME}_find_exp_assignment (exp->assign.src);
- break;
-
- case etree_binary:
- gld${EMULATION_NAME}_find_exp_assignment (exp->binary.lhs);
- gld${EMULATION_NAME}_find_exp_assignment (exp->binary.rhs);
- break;
-
- case etree_trinary:
- gld${EMULATION_NAME}_find_exp_assignment (exp->trinary.cond);
- gld${EMULATION_NAME}_find_exp_assignment (exp->trinary.lhs);
- gld${EMULATION_NAME}_find_exp_assignment (exp->trinary.rhs);
- break;
-
- case etree_unary:
- gld${EMULATION_NAME}_find_exp_assignment (exp->unary.child);
- break;
-
- default:
- break;
- }
-}
-
-
-/* This is called by the before_allocation routine via
- lang_for_each_statement. It locates any assignment statements, and
- tells the ELF backend about them, in case they are assignments to
- symbols which are referred to by dynamic objects. */
-
-static void
-gld${EMULATION_NAME}_find_statement_assignment (lang_statement_union_type *s)
-{
- if (s->header.type == lang_assignment_statement_enum)
- gld${EMULATION_NAME}_find_exp_assignment (s->assignment_statement.exp);
-}
-
-EOF
-
-if test x"$LDEMUL_BEFORE_ALLOCATION" != xgld"$EMULATION_NAME"_before_allocation; then
- if test x"${ELF_INTERPRETER_NAME+set}" = xset; then
- ELF_INTERPRETER_SET_DEFAULT="
- if (sinterp != NULL)
- {
- sinterp->contents = ${ELF_INTERPRETER_NAME};
- sinterp->_raw_size = strlen (sinterp->contents) + 1;
- }
-
-"
- else
- ELF_INTERPRETER_SET_DEFAULT=
- fi
-cat >>e${EMULATION_NAME}.c <<EOF
-
-/* 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)
-{
- const char *rpath;
- asection *sinterp;
-
- if (link_info.hash->type == bfd_link_elf_hash_table)
- _bfd_elf_tls_setup (output_bfd, &link_info);
-
- /* If we are going to make any variable assignments, we need to let
- the ELF backend know about them in case the variables are
- referred to by dynamic objects. */
- lang_for_each_statement (gld${EMULATION_NAME}_find_statement_assignment);
-
- /* Let the ELF backend work out the sizes of any sections required
- by dynamic linking. */
- rpath = command_line.rpath;
- if (rpath == NULL)
- rpath = (const char *) getenv ("LD_RUN_PATH");
- if (! (bfd_elf_size_dynamic_sections
- (output_bfd, command_line.soname, rpath,
- command_line.filter_shlib,
- (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;
- }
-
- /* Look for any sections named .gnu.warning. As a GNU extensions,
- we treat such sections as containing warning messages. We print
- out the warning message, and then zero out the section size so
- that it does not get copied into the output file. */
-
- {
- LANG_FOR_EACH_INPUT_STATEMENT (is)
- {
- 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;
-
- s = bfd_get_section_by_name (is->the_bfd, ".gnu.warning");
- 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,
- (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';
- ret = link_info.callbacks->warning (&link_info, msg,
- (const char *) NULL,
- is->the_bfd, (asection *) NULL,
- (bfd_vma) 0);
- 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;
- }
- }
-}
-
-EOF
-fi
-
-if test x"$LDEMUL_OPEN_DYNAMIC_ARCHIVE" != xgld"$EMULATION_NAME"_open_dynamic_archive; then
-cat >>e${EMULATION_NAME}.c <<EOF
-
-/* Try to open a dynamic archive. This is where we know that ELF
- dynamic libraries have an extension of .so (or .sl on oddball systems
- like hpux). */
-
-static bfd_boolean
-gld${EMULATION_NAME}_open_dynamic_archive
- (const char *arch, search_dirs_type *search, lang_input_statement_type *entry)
-{
- const char *filename;
- char *string;
-
- if (! entry->is_archive)
- return FALSE;
-
- filename = entry->filename;
-
- /* This allocates a few bytes too many when EXTRA_SHLIB_EXTENSION
- is defined, but it does not seem worth the headache to optimize
- away those two bytes of space. */
- string = (char *) xmalloc (strlen (search->name)
- + strlen (filename)
- + strlen (arch)
-#ifdef EXTRA_SHLIB_EXTENSION
- + strlen (EXTRA_SHLIB_EXTENSION)
-#endif
- + sizeof "/lib.so");
-
- sprintf (string, "%s/lib%s%s.so", search->name, filename, arch);
-
-#ifdef EXTRA_SHLIB_EXTENSION
- /* Try the .so extension first. If that fails build a new filename
- using EXTRA_SHLIB_EXTENSION. */
- if (! ldfile_try_open_bfd (string, entry))
- sprintf (string, "%s/lib%s%s%s", search->name,
- filename, arch, EXTRA_SHLIB_EXTENSION);
-#endif
-
- if (! ldfile_try_open_bfd (string, entry))
- {
- free (string);
- return FALSE;
- }
-
- entry->filename = string;
-
- /* We have found a dynamic object to include in the link. The ELF
- backend linker will create a DT_NEEDED entry in the .dynamic
- section naming this file. If this file includes a DT_SONAME
- entry, it will be used. Otherwise, the ELF linker will just use
- the name of the file. For an archive found by searching, like
- this one, the DT_NEEDED entry should consist of just the name of
- the file, without the path information used to find it. Note
- that we only need to do this if we have a dynamic object; an
- archive will never be referenced by a DT_NEEDED entry.
-
- FIXME: This approach--using bfd_elf_set_dt_needed_name--is not
- very pretty. I haven't been able to think of anything that is
- pretty, though. */
- if (bfd_check_format (entry->the_bfd, bfd_object)
- && (entry->the_bfd->flags & DYNAMIC) != 0)
- {
- ASSERT (entry->is_archive && entry->search_dirs_flag);
-
- /* Rather than duplicating the logic above. Just use the
- filename we recorded earlier. */
-
- filename = lbasename (entry->filename);
- bfd_elf_set_dt_needed_name (entry->the_bfd, filename);
- }
-
- return TRUE;
-}
-
-EOF
-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. */
-
-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;
- lang_output_section_statement_type *last_rel = NULL;
- 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)
- {
- lookup = &u->output_section_statement;
- if (strncmp (".rel", lookup->name, 4) == 0)
- {
- int lookrela = lookup->name[4] == 'a';
-
- /* .rel.dyn must come before all other reloc sections, to suit
- GNU ld.so. */
- if (isdyn)
- break;
-
- /* Don't place after .rel.plt as doing so results in wrong
- dynamic tags. */
- if (strcmp (".plt", lookup->name + 4 + lookrela) == 0)
- break;
-
- if (rela == lookrela || last_rel == NULL)
- last_rel = lookup;
- if ((rela == lookrela || last_rel_alloc == NULL)
- && lookup->bfd_section != NULL
- && (lookup->bfd_section->flags & SEC_ALLOC) != 0)
- last_rel_alloc = lookup;
- }
-
- last = lookup;
- if (lookup->bfd_section != NULL
- && (lookup->bfd_section->flags & SEC_ALLOC) != 0)
- last_alloc = lookup;
- }
-
- if (last_rel_alloc)
- return last_rel_alloc;
-
- if (last_rel)
- return last_rel;
-
- if (last_alloc)
- return last_alloc;
-
- 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)
-{
- 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;
- 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 *os;
- lang_statement_union_type **os_tail;
- etree_type *load_base;
- int isdyn = 0;
-
- secname = bfd_get_section_name (s->owner, s);
- if (! link_info.relocatable
- && link_info.combreloc
- && (s->flags & SEC_ALLOC)
- && strncmp (secname, ".rel", 4) == 0)
- {
- if (secname[4] == 'a')
- secname = ".rela.dyn";
- else
- secname = ".rel.dyn";
- isdyn = 1;
- }
-
- if (isdyn || (!config.unique_orphan_sections && !unique_section_p (secname)))
- {
- /* 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))
- {
- /* 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);
- return TRUE;
- }
- }
-
- if (hold_text.os == NULL)
- hold_text.os = lang_output_section_find (".text");
-
- /* 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)
- {
- lang_add_section (&hold_text.os->children, s, hold_text.os, file);
- return TRUE;
- }
-
- /* Decide which segment the section should go in based on the
- section name and section flags. We put loadable .note sections
- 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
-
- /* 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)
- {
- 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);
- }
-
- 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);
- e_align = exp_unop (ALIGN_K,
- exp_intop ((bfd_vma) 1 << s->alignment_power));
- lang_add_assignment (exp_assop ('=', symname, e_align));
- }
- }
-
- 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);
-
- 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;
- }
- }
-
- return TRUE;
-}
-EOF
-fi
-
-if test x"$LDEMUL_FINISH" != xgld"$EMULATION_NAME"_finish; then
-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 ();
-
- /* Do the assignments again. */
- lang_do_assignments (stat_ptr->head, abs_output_section,
- (fill_type *) 0, (bfd_vma) 0);
- }
-}
-EOF
-fi
-
-if test x"$LDEMUL_GET_SCRIPT" != xgld"$EMULATION_NAME"_get_script; then
-cat >>e${EMULATION_NAME}.c <<EOF
-
-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
-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
-fi
-if test -n "$GENERATE_PIE_SCRIPT" ; then
-if test -n "$GENERATE_COMBRELOC_SCRIPT" ; then
-echo ' ; else if (link_info.pie && link_info.combreloc) return' >> 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
-fi
-if test -n "$GENERATE_SHLIB_SCRIPT" ; then
-if test -n "$GENERATE_COMBRELOC_SCRIPT" ; then
-echo ' ; else if (link_info.shared && link_info.combreloc) return' >> 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
-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
-fi
-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";
-EOF
-if cmp -s ldscripts/${EMULATION_NAME}.x ldscripts/${EMULATION_NAME}.xn; then :
-else
-cat >>e${EMULATION_NAME}.c <<EOF
- else if (!config.magic_demand_paged)
- return "ldscripts/${EMULATION_NAME}.xn";
-EOF
-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)
- return "ldscripts/${EMULATION_NAME}.xdc";
-EOF
-fi
-cat >>e${EMULATION_NAME}.c <<EOF
- else if (link_info.pie)
- return "ldscripts/${EMULATION_NAME}.xd";
-EOF
-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)
- return "ldscripts/${EMULATION_NAME}.xsc";
-EOF
-fi
-cat >>e${EMULATION_NAME}.c <<EOF
- else if (link_info.shared)
- return "ldscripts/${EMULATION_NAME}.xs";
-EOF
-fi
-if test -n "$GENERATE_COMBRELOC_SCRIPT" ; then
-cat >>e${EMULATION_NAME}.c <<EOF
- else if (link_info.combreloc)
- return "ldscripts/${EMULATION_NAME}.xc";
-EOF
-fi
-cat >>e${EMULATION_NAME}.c <<EOF
- else
- return "ldscripts/${EMULATION_NAME}.x";
-}
-
-EOF
-fi
-fi
-
-if test -n "$PARSE_AND_LIST_ARGS_CASES" -o x"$GENERATE_SHLIB_SCRIPT" = xyes; then
-
-if test -n "$PARSE_AND_LIST_PROLOGUE" ; then
-cat >>e${EMULATION_NAME}.c <<EOF
- $PARSE_AND_LIST_PROLOGUE
-EOF
-fi
-
-cat >>e${EMULATION_NAME}.c <<EOF
-
-#define OPTION_DISABLE_NEW_DTAGS (400)
-#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)
-
-static void
-gld${EMULATION_NAME}_add_options
- (int ns, char **shortopts, int nl, struct option **longopts,
- int nrl ATTRIBUTE_UNUSED, struct option **really_longopts ATTRIBUTE_UNUSED)
-{
- static const char xtra_short[] = "${PARSE_AND_LIST_SHORTOPTS}z:";
- static const struct option xtra_long[] = {
-EOF
-
-if test x"$GENERATE_SHLIB_SCRIPT" = xyes; then
-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},
- {"Bgroup", no_argument, NULL, OPTION_GROUP},
-EOF
-fi
-
-if test -n "$PARSE_AND_LIST_LONGOPTS" ; then
-cat >>e${EMULATION_NAME}.c <<EOF
- $PARSE_AND_LIST_LONGOPTS
-EOF
-fi
-
-cat >>e${EMULATION_NAME}.c <<EOF
- {NULL, no_argument, NULL, 0}
- };
-
- *shortopts = (char *) xrealloc (*shortopts, ns + sizeof (xtra_short));
- memcpy (*shortopts + ns, &xtra_short, sizeof (xtra_short));
- *longopts = (struct option *)
- xrealloc (*longopts, nl * sizeof (struct option) + sizeof (xtra_long));
- memcpy (*longopts + nl, &xtra_long, sizeof (xtra_long));
-}
-
-static bfd_boolean
-gld${EMULATION_NAME}_handle_option (int optc)
-{
- switch (optc)
- {
- default:
- return FALSE;
-
-EOF
-
-if test x"$GENERATE_SHLIB_SCRIPT" = xyes; then
-cat >>e${EMULATION_NAME}.c <<EOF
- case OPTION_DISABLE_NEW_DTAGS:
- link_info.new_dtags = FALSE;
- break;
-
- case OPTION_ENABLE_NEW_DTAGS:
- link_info.new_dtags = TRUE;
- break;
-
- case OPTION_EH_FRAME_HDR:
- link_info.eh_frame_hdr = TRUE;
- break;
-
- case OPTION_GROUP:
- link_info.flags_1 |= (bfd_vma) DF_1_GROUP;
- /* Groups must be self-contained. */
- link_info.unresolved_syms_in_objects = RM_GENERATE_ERROR;
- link_info.unresolved_syms_in_shared_libs = RM_GENERATE_ERROR;
- break;
-
- case 'z':
- if (strcmp (optarg, "initfirst") == 0)
- link_info.flags_1 |= (bfd_vma) DF_1_INITFIRST;
- else if (strcmp (optarg, "interpose") == 0)
- link_info.flags_1 |= (bfd_vma) DF_1_INTERPOSE;
- else if (strcmp (optarg, "loadfltr") == 0)
- link_info.flags_1 |= (bfd_vma) DF_1_LOADFLTR;
- else if (strcmp (optarg, "nodefaultlib") == 0)
- link_info.flags_1 |= (bfd_vma) DF_1_NODEFLIB;
- else if (strcmp (optarg, "nodelete") == 0)
- link_info.flags_1 |= (bfd_vma) DF_1_NODELETE;
- else if (strcmp (optarg, "nodlopen") == 0)
- link_info.flags_1 |= (bfd_vma) DF_1_NOOPEN;
- else if (strcmp (optarg, "nodump") == 0)
- link_info.flags_1 |= (bfd_vma) DF_1_NODUMP;
- else if (strcmp (optarg, "now") == 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;
- link_info.flags_1 |= (bfd_vma) DF_1_ORIGIN;
- }
- else if (strcmp (optarg, "defs") == 0)
- link_info.unresolved_syms_in_objects = RM_GENERATE_ERROR;
- else if (strcmp (optarg, "muldefs") == 0)
- link_info.allow_multiple_definition = TRUE;
- else if (strcmp (optarg, "combreloc") == 0)
- link_info.combreloc = TRUE;
- else if (strcmp (optarg, "nocombreloc") == 0)
- link_info.combreloc = FALSE;
- else if (strcmp (optarg, "nocopyreloc") == 0)
- link_info.nocopyreloc = TRUE;
- else if (strcmp (optarg, "execstack") == 0)
- {
- link_info.execstack = TRUE;
- link_info.noexecstack = FALSE;
- }
- else if (strcmp (optarg, "noexecstack") == 0)
- {
- link_info.noexecstack = TRUE;
- link_info.execstack = FALSE;
- }
- /* What about the other Solaris -z options? FIXME. */
- break;
-EOF
-fi
-
-if test -n "$PARSE_AND_LIST_ARGS_CASES" ; then
-cat >>e${EMULATION_NAME}.c <<EOF
- $PARSE_AND_LIST_ARGS_CASES
-EOF
-fi
-
-cat >>e${EMULATION_NAME}.c <<EOF
- }
-
- return TRUE;
-}
-
-EOF
-
-if test x"$LDEMUL_LIST_OPTIONS" != xgld"$EMULATION_NAME"_list_options; then
-cat >>e${EMULATION_NAME}.c <<EOF
-
-static void
-gld${EMULATION_NAME}_list_options (FILE * file)
-{
-EOF
-
-if test x"$GENERATE_SHLIB_SCRIPT" = xyes; then
-cat >>e${EMULATION_NAME}.c <<EOF
- fprintf (file, _(" -Bgroup\t\tSelects group name lookup rules for DSO\n"));
- 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, _(" -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 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"));
- fprintf (file, _(" -z nocopyreloc\tDon't create copy relocs\n"));
- fprintf (file, _(" -z nodefaultlib\tMark object not to use default search paths\n"));
- fprintf (file, _(" -z nodelete\t\tMark DSO non-deletable at runtime\n"));
- 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"));
- 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"));
- fprintf (file, _(" -z KEYWORD\t\tIgnored for Solaris compatibility\n"));
-EOF
-fi
-
-if test -n "$PARSE_AND_LIST_OPTIONS" ; then
-cat >>e${EMULATION_NAME}.c <<EOF
- $PARSE_AND_LIST_OPTIONS
-EOF
-fi
-
-cat >>e${EMULATION_NAME}.c <<EOF
-}
-EOF
-
-if test -n "$PARSE_AND_LIST_EPILOGUE" ; then
-cat >>e${EMULATION_NAME}.c <<EOF
- $PARSE_AND_LIST_EPILOGUE
-EOF
-fi
-fi
-else
-cat >>e${EMULATION_NAME}.c <<EOF
-#define gld${EMULATION_NAME}_add_options NULL
-#define gld${EMULATION_NAME}_handle_option NULL
-EOF
-if test x"$LDEMUL_LIST_OPTIONS" != xgld"$EMULATION_NAME"_list_options; then
-cat >>e${EMULATION_NAME}.c <<EOF
-#define gld${EMULATION_NAME}_list_options NULL
-EOF
-fi
-fi
-
-cat >>e${EMULATION_NAME}.c <<EOF
-
-struct ld_emulation_xfer_struct ld_${EMULATION_NAME}_emulation =
-{
- ${LDEMUL_BEFORE_PARSE-gld${EMULATION_NAME}_before_parse},
- ${LDEMUL_SYSLIB-syslib_default},
- ${LDEMUL_HLL-hll_default},
- ${LDEMUL_AFTER_PARSE-after_parse_default},
- ${LDEMUL_AFTER_OPEN-gld${EMULATION_NAME}_after_open},
- ${LDEMUL_AFTER_ALLOCATION-after_allocation_default},
- ${LDEMUL_SET_OUTPUT_ARCH-set_output_arch_default},
- ${LDEMUL_CHOOSE_TARGET-ldemul_default_target},
- ${LDEMUL_BEFORE_ALLOCATION-gld${EMULATION_NAME}_before_allocation},
- ${LDEMUL_GET_SCRIPT-gld${EMULATION_NAME}_get_script},
- "${EMULATION_NAME}",
- "${OUTPUT_FORMAT}",
- ${LDEMUL_FINISH-gld${EMULATION_NAME}_finish},
- ${LDEMUL_CREATE_OUTPUT_SECTION_STATEMENTS-NULL},
- ${LDEMUL_OPEN_DYNAMIC_ARCHIVE-gld${EMULATION_NAME}_open_dynamic_archive},
- ${LDEMUL_PLACE_ORPHAN-gld${EMULATION_NAME}_place_orphan},
- ${LDEMUL_SET_SYMBOLS-NULL},
- ${LDEMUL_PARSE_ARGS-NULL},
- gld${EMULATION_NAME}_add_options,
- gld${EMULATION_NAME}_handle_option,
- ${LDEMUL_UNRECOGNIZED_FILE-NULL},
- ${LDEMUL_LIST_OPTIONS-gld${EMULATION_NAME}_list_options},
- ${LDEMUL_RECOGNIZED_FILE-gld${EMULATION_NAME}_load_symbols},
- ${LDEMUL_FIND_POTENTIAL_LIBRARIES-NULL},
- ${LDEMUL_NEW_VERS_PATTERN-NULL}
-};
-EOF
diff --git a/contrib/binutils/ld/emultempl/generic.em b/contrib/binutils/ld/emultempl/generic.em
deleted file mode 100644
index 4d17ca2..0000000
--- a/contrib/binutils/ld/emultempl/generic.em
+++ /dev/null
@@ -1,148 +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, 1992, 1994, 1996, 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}
-
-#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"
-
-EOF
-
-# Import any needed special functions and/or overrides.
-#
-if test -n "$EXTRA_EM_FILE" ; then
-. ${srcdir}/emultempl/${EXTRA_EM_FILE}.em
-fi
-
-if test x"$LDEMUL_BEFORE_PARSE" != xgld"$EMULATION_NAME"_before_parse; then
-cat >>e${EMULATION_NAME}.c <<EOF
-
-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_ */
-}
-
-EOF
-fi
-
-if test x"$LDEMUL_GET_SCRIPT" != xgld"$EMULATION_NAME"_get_script; then
-cat >>e${EMULATION_NAME}.c <<EOF
-
-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
-fi
-
-cat >>e${EMULATION_NAME}.c <<EOF
-
-struct ld_emulation_xfer_struct ld_${EMULATION_NAME}_emulation =
-{
- ${LDEMUL_BEFORE_PARSE-gld${EMULATION_NAME}_before_parse},
- ${LDEMUL_SYSLIB-syslib_default},
- ${LDEMUL_HLL-hll_default},
- ${LDEMUL_AFTER_PARSE-after_parse_default},
- ${LDEMUL_AFTER_OPEN-after_open_default},
- ${LDEMUL_AFTER_ALLOCATION-after_allocation_default},
- ${LDEMUL_SET_OUTPUT_ARCH-set_output_arch_default},
- ${LDEMUL_CHOOSE_TARGET-ldemul_default_target},
- ${LDEMUL_BEFORE_ALLOCATION-before_allocation_default},
- ${LDEMUL_GET_SCRIPT-gld${EMULATION_NAME}_get_script},
- "${EMULATION_NAME}",
- "${OUTPUT_FORMAT}",
- ${LDEMUL_FINISH-NULL},
- ${LDEMUL_CREATE_OUTPUT_SECTION_STATEMENTS-NULL},
- ${LDEMUL_OPEN_DYNAMIC_ARCHIVE-NULL},
- ${LDEMUL_PLACE_ORPHAN-NULL},
- ${LDEMUL_SET_SYMBOLS-NULL},
- ${LDEMUL_PARSE_ARGS-NULL},
- NULL, /* add_options */
- NULL, /* handle_option */
- ${LDEMUL_UNRECOGNIZED_FILE-NULL},
- ${LDEMUL_LIST_OPTIONS-NULL},
- ${LDEMUL_RECOGNIZED_FILE-NULL},
- ${LDEMUL_FIND_POTENTIAL_LIBRARIES-NULL},
- ${LDEMUL_NEW_VERS_PATTERN-NULL}
-};
-EOF
diff --git a/contrib/binutils/ld/emultempl/ia64elf.em b/contrib/binutils/ld/emultempl/ia64elf.em
deleted file mode 100644
index eee467b..0000000
--- a/contrib/binutils/ld/emultempl/ia64elf.em
+++ /dev/null
@@ -1,62 +0,0 @@
-# This shell script emits a C file. -*- C -*-
-# Copyright 2003 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., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
-#
-
-# This file is sourced from elf32.em, and defines extra ia64-elf
-# specific routines.
-#
-# Define some shell vars to insert bits of code into the standard elf
-# parse_args and list_options functions.
-#
-cat >>e${EMULATION_NAME}.c <<EOF
-
-/* None zero if generating binary for Intel Itanium processor. */
-static int itanium = 0;
-
-static void
-gld${EMULATION_NAME}_after_parse (void)
-{
- link_info.need_relax_finalize = TRUE;
- bfd_elf${ELFSIZE}_ia64_after_parse (itanium);
-}
-
-EOF
-
-PARSE_AND_LIST_PROLOGUE='
-#define OPTION_ITANIUM 300
-'
-
-PARSE_AND_LIST_LONGOPTS='
- { "itanium", no_argument, NULL, OPTION_ITANIUM},
-'
-
-PARSE_AND_LIST_OPTIONS='
- fprintf (file, _("\
- --itanium Generate code for Intel Itanium processor\n"
- ));
-'
-
-PARSE_AND_LIST_ARGS_CASES='
- case OPTION_ITANIUM:
- itanium = 1;
- break;
-'
-
-LDEMUL_AFTER_PARSE=gld${EMULATION_NAME}_after_parse
-. ${srcdir}/emultempl/needrelax.em
diff --git a/contrib/binutils/ld/emultempl/linux.em b/contrib/binutils/ld/emultempl/linux.em
deleted file mode 100644
index d041b68..0000000
--- a/contrib/binutils/ld/emultempl/linux.em
+++ /dev/null
@@ -1,207 +0,0 @@
-# This shell script emits a C file. -*- C -*-
-# It does some substitutions.
-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! */
-
-/* Linux a.out emulation code for ${EMULATION_NAME}
- Copyright 1991, 1993, 1994, 1995, 1996, 1998, 1999, 2000, 2002, 2003, 2004
- Free Software Foundation, Inc.
- Written by Steve Chamberlain <sac@cygnus.com>
- Linux support by Eric Youngdale <ericy@cais.cais.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}
-
-#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
-gld${EMULATION_NAME}_before_parse (void)
-{
- ldfile_set_output_arch ("${OUTPUT_ARCH}", bfd_arch_`echo ${ARCH} | sed -e 's/:.*//'`);
- config.dynamic_link = TRUE;
- config.has_shared = TRUE;
-}
-
-/* Try to open a dynamic archive. This is where we know that Linux
- dynamic libraries have an extension of .sa. */
-
-static bfd_boolean
-gld${EMULATION_NAME}_open_dynamic_archive
- (const char *arch, search_dirs_type *search, lang_input_statement_type *entry)
-{
- char *string;
-
- if (! entry->is_archive)
- return FALSE;
-
- string = (char *) xmalloc (strlen (search->name)
- + strlen (entry->filename)
- + strlen (arch)
- + sizeof "/lib.sa");
-
- sprintf (string, "%s/lib%s%s.sa", search->name, entry->filename, arch);
-
- if (! ldfile_try_open_bfd (string, entry))
- {
- free (string);
- return FALSE;
- }
-
- entry->filename = string;
-
- return TRUE;
-}
-
-/* This is called by the create_output_section_statements routine via
- lang_for_each_statement. It locates any address assignment to
- .text, and modifies it to include the size of the headers. This
- causes -Ttext to mean the starting address of the header, rather
- than the starting address of .text, which is compatible with other
- Linux tools. */
-
-static void
-gld${EMULATION_NAME}_find_address_statement (lang_statement_union_type *s)
-{
- if (s->header.type == lang_address_statement_enum
- && strcmp (s->address_statement.section_name, ".text") == 0)
- {
- ASSERT (s->address_statement.address->type.node_class == etree_value);
- s->address_statement.address->value.value += 0x20;
- }
-}
-
-/* This is called before opening the input BFD's. */
-
-static void
-gld${EMULATION_NAME}_create_output_section_statements (void)
-{
- lang_for_each_statement (gld${EMULATION_NAME}_find_address_statement);
-}
-
-/* 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)
-{
- if (link_info.relocatable)
- return;
-
- /* Let the backend work out the sizes of any sections required by
- dynamic linking. */
- if (! bfd_${EMULATION_NAME}_size_dynamic_sections (output_bfd, &link_info))
- einfo ("%P%F: failed to set dynamic section sizes: %E\n");
-}
-
-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,
- after_open_default,
- 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 */
- gld${EMULATION_NAME}_create_output_section_statements,
- gld${EMULATION_NAME}_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/mipsecoff.em b/contrib/binutils/ld/emultempl/mipsecoff.em
deleted file mode 100644
index dde33c2..0000000
--- a/contrib/binutils/ld/emultempl/mipsecoff.em
+++ /dev/null
@@ -1,248 +0,0 @@
-# This shell script emits a C file. -*- C -*-
-# It does some substitutions.
-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 *);
-
-static void
-gld${EMULATION_NAME}_before_parse (void)
-{
-#ifndef TARGET_ /* I.e., if not generic. */
- 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
diff --git a/contrib/binutils/ld/emultempl/mipself.em b/contrib/binutils/ld/emultempl/mipself.em
deleted file mode 100644
index a950fb1..0000000
--- a/contrib/binutils/ld/emultempl/mipself.em
+++ /dev/null
@@ -1,177 +0,0 @@
-# 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.
-#
-# 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.
-
-
-# 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
-
-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)
-{
- /* 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))
- {
- 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);
- }
- }
- }
-#endif /* SUPPORT_EMBEDDED_RELOCS */
-}
-
-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
diff --git a/contrib/binutils/ld/emultempl/needrelax.em b/contrib/binutils/ld/emultempl/needrelax.em
deleted file mode 100644
index 65e622b..0000000
--- a/contrib/binutils/ld/emultempl/needrelax.em
+++ /dev/null
@@ -1,38 +0,0 @@
-# This shell script emits a C file. -*- C -*-
-# Copyright 2001, 2002, 2003 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., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
-#
-
-# This file is sourced from elf32.em. It is used by targets for
-# which relaxation is not just an optimization, but for correctness.
-
-LDEMUL_BEFORE_ALLOCATION=need_relax_${EMULATION_NAME}_before_allocation
-
-cat >>e${EMULATION_NAME}.c <<EOF
-
-static void
-need_relax_${EMULATION_NAME}_before_allocation (void)
-{
- /* Call main function; we're just extending it. */
- gld${EMULATION_NAME}_before_allocation ();
-
- /* Force -relax on if not doing a relocatable link. */
- if (! link_info.relocatable)
- command_line.relax = TRUE;
-}
-EOF
diff --git a/contrib/binutils/ld/emultempl/netbsd.em b/contrib/binutils/ld/emultempl/netbsd.em
deleted file mode 100644
index 43715e4..0000000
--- a/contrib/binutils/ld/emultempl/netbsd.em
+++ /dev/null
@@ -1,13 +0,0 @@
-LDEMUL_BEFORE_PARSE=gldnetbsd_before_parse
-
-cat >>e${EMULATION_NAME}.c <<EOF
-static void
-gld${EMULATION_NAME}_before_parse (void);
-
-static void
-gldnetbsd_before_parse (void)
-{
- gld${EMULATION_NAME}_before_parse ();
- link_info.common_skip_ar_aymbols = bfd_link_common_skip_text;
-}
-EOF
diff --git a/contrib/binutils/ld/emultempl/ostring.sed b/contrib/binutils/ld/emultempl/ostring.sed
deleted file mode 100644
index a526d3f..0000000
--- a/contrib/binutils/ld/emultempl/ostring.sed
+++ /dev/null
@@ -1,4 +0,0 @@
-s/["\\]/\\&/g
-s/$/\\n\\/
-1 s/^/"/
-$ s/$/n"/
diff --git a/contrib/binutils/ld/emultempl/pe.em b/contrib/binutils/ld/emultempl/pe.em
deleted file mode 100644
index 7d6c2e8..0000000
--- a/contrib/binutils/ld/emultempl/pe.em
+++ /dev/null
@@ -1,1952 +0,0 @@
-# This shell script emits a C file. -*- C -*-
-# It does some substitutions.
-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 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004
- 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., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */
-
-/* For WINDOWS_NT */
-/* The original file generated returned different default scripts depending
- on whether certain switches were set, but these switches pertain to the
- Linux system and that particular version of coff. In the NT case, we
- only determine if the subsystem is console or windows in order to select
- the correct entry point by default. */
-
-#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"
-#include "sysdep.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: This is a BFD internal header file, and we should not be
- using it here. */
-#include "../bfd/libcoff.h"
-
-#include "deffile.h"
-#include "pe-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
-
-#if defined(TARGET_IS_i386pe)
-#define DLL_SUPPORT
-#endif
-#if defined(TARGET_IS_shpe) || defined(TARGET_IS_mipspe) || defined(TARGET_IS_armpe)
-#define DLL_SUPPORT
-#endif
-
-#if defined(TARGET_IS_i386pe) || ! defined(DLL_SUPPORT)
-#define PE_DEF_SUBSYSTEM 3
-#else
-#undef NT_EXE_IMAGE_BASE
-#undef PE_DEF_SECTION_ALIGNMENT
-#undef PE_DEF_FILE_ALIGNMENT
-#define NT_EXE_IMAGE_BASE 0x00010000
-#ifdef TARGET_IS_armpe
-#define PE_DEF_SECTION_ALIGNMENT 0x00001000
-#define PE_DEF_SUBSYSTEM 9
-#else
-#define PE_DEF_SECTION_ALIGNMENT 0x00000400
-#define PE_DEF_SUBSYSTEM 2
-#endif
-#define PE_DEF_FILE_ALIGNMENT 0x00000200
-#endif
-
-
-static struct internal_extra_pe_aouthdr pe;
-static int dll;
-static int support_old_code = 0;
-static char * thumb_entry_symbol = NULL;
-static lang_assignment_statement_type *image_base_statement = 0;
-
-#ifdef DLL_SUPPORT
-static int pe_enable_stdcall_fixup = -1; /* 0=disable 1=enable. */
-static char *pe_out_def_filename = NULL;
-static char *pe_implib_filename = NULL;
-static int pe_enable_auto_image_base = 0;
-static char *pe_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 = FALSE;
-
-#if (PE_DEF_SUBSYSTEM == 9) || (PE_DEF_SUBSYSTEM == 2)
-#if defined TARGET_IS_mipspe || defined TARGET_IS_armpe
- lang_add_entry ("WinMainCRTStartup", FALSE);
-#else
- lang_add_entry ("_WinMainCRTStartup", FALSE);
-#endif
-#endif
-#endif
-}
-
-/* PE format extra command line options. */
-
-/* Used for setting flags in the PE header. */
-#define OPTION_BASE_FILE (300 + 1)
-#define OPTION_DLL (OPTION_BASE_FILE + 1)
-#define OPTION_FILE_ALIGNMENT (OPTION_DLL + 1)
-#define OPTION_IMAGE_BASE (OPTION_FILE_ALIGNMENT + 1)
-#define OPTION_MAJOR_IMAGE_VERSION (OPTION_IMAGE_BASE + 1)
-#define OPTION_MAJOR_OS_VERSION (OPTION_MAJOR_IMAGE_VERSION + 1)
-#define OPTION_MAJOR_SUBSYSTEM_VERSION (OPTION_MAJOR_OS_VERSION + 1)
-#define OPTION_MINOR_IMAGE_VERSION (OPTION_MAJOR_SUBSYSTEM_VERSION + 1)
-#define OPTION_MINOR_OS_VERSION (OPTION_MINOR_IMAGE_VERSION + 1)
-#define OPTION_MINOR_SUBSYSTEM_VERSION (OPTION_MINOR_OS_VERSION + 1)
-#define OPTION_SECTION_ALIGNMENT (OPTION_MINOR_SUBSYSTEM_VERSION + 1)
-#define OPTION_STACK (OPTION_SECTION_ALIGNMENT + 1)
-#define OPTION_SUBSYSTEM (OPTION_STACK + 1)
-#define OPTION_HEAP (OPTION_SUBSYSTEM + 1)
-#define OPTION_SUPPORT_OLD_CODE (OPTION_HEAP + 1)
-#define OPTION_OUT_DEF (OPTION_SUPPORT_OLD_CODE + 1)
-#define OPTION_EXPORT_ALL (OPTION_OUT_DEF + 1)
-#define OPTION_EXCLUDE_SYMBOLS (OPTION_EXPORT_ALL + 1)
-#define OPTION_KILL_ATS (OPTION_EXCLUDE_SYMBOLS + 1)
-#define OPTION_STDCALL_ALIASES (OPTION_KILL_ATS + 1)
-#define OPTION_ENABLE_STDCALL_FIXUP (OPTION_STDCALL_ALIASES + 1)
-#define OPTION_DISABLE_STDCALL_FIXUP (OPTION_ENABLE_STDCALL_FIXUP + 1)
-#define OPTION_IMPLIB_FILENAME (OPTION_DISABLE_STDCALL_FIXUP + 1)
-#define OPTION_THUMB_ENTRY (OPTION_IMPLIB_FILENAME + 1)
-#define OPTION_WARN_DUPLICATE_EXPORTS (OPTION_THUMB_ENTRY + 1)
-#define OPTION_IMP_COMPAT (OPTION_WARN_DUPLICATE_EXPORTS + 1)
-#define OPTION_ENABLE_AUTO_IMAGE_BASE (OPTION_IMP_COMPAT + 1)
-#define OPTION_DISABLE_AUTO_IMAGE_BASE (OPTION_ENABLE_AUTO_IMAGE_BASE + 1)
-#define OPTION_DLL_SEARCH_PREFIX (OPTION_DISABLE_AUTO_IMAGE_BASE + 1)
-#define OPTION_NO_DEFAULT_EXCLUDES (OPTION_DLL_SEARCH_PREFIX + 1)
-#define OPTION_DLL_ENABLE_AUTO_IMPORT (OPTION_NO_DEFAULT_EXCLUDES + 1)
-#define OPTION_DLL_DISABLE_AUTO_IMPORT (OPTION_DLL_ENABLE_AUTO_IMPORT + 1)
-#define OPTION_ENABLE_EXTRA_PE_DEBUG (OPTION_DLL_DISABLE_AUTO_IMPORT + 1)
-#define OPTION_EXCLUDE_LIBS (OPTION_ENABLE_EXTRA_PE_DEBUG + 1)
-#define OPTION_DLL_ENABLE_RUNTIME_PSEUDO_RELOC \
- (OPTION_EXCLUDE_LIBS + 1)
-#define OPTION_DLL_DISABLE_RUNTIME_PSEUDO_RELOC \
- (OPTION_DLL_ENABLE_RUNTIME_PSEUDO_RELOC + 1)
-
-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},
- {"thumb-entry", required_argument, NULL, OPTION_THUMB_ENTRY},
-#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-pe-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 = (struct option *)
- 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) {&pe.field,sizeof(pe.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},
- 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__", 1),
- D(MinorImageVersion,"__minor_image_version__", 0),
-#ifdef TARGET_IS_armpe
- D(MajorSubsystemVersion,"__major_subsystem_version__", 2),
-#else
- D(MajorSubsystemVersion,"__major_subsystem_version__", 4),
-#endif
- D(MinorSubsystemVersion,"__minor_subsystem_version__", 0),
- 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"));
- fprintf (file, _(" --thumb-entry=<symbol> Set the entry point to be Thumb <symbol>\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-pe-debug Enable verbose debug output when building\n\
- or linking to DLLs (esp. auto-import)\n"));
-#endif
-}
-
-
-static void
-set_pe_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;
- return;
- }
- }
- abort ();
-}
-
-
-static void
-set_pe_subsystem (void)
-{
- const char *sver;
- int len;
- int i;
- static const struct
- {
- const char *name;
- const int value;
- const char *entry;
- }
- v[] =
- {
- { "native", 1, "NtProcessStartup" },
-#if defined TARGET_IS_mipspe || defined TARGET_IS_armpe
- { "windows", 2, "WinMainCRTStartup" },
-#else
- { "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 }
- };
-
- 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));
- if (*end == '.')
- set_pe_name ("__minor_subsystem_version__",
- strtoul (end + 1, &end, 0));
- if (*end != '\0')
- einfo (_("%P: warning: bad version number in -subsystem option\n"));
- }
-
- for (i = 0; v[i].name; i++)
- {
- 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);
-
- 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;
- }
-
- lang_add_entry (entry, TRUE);
-
- return;
- }
- }
-
- einfo (_("%P%F: invalid subsystem type %s\n"), optarg);
-}
-
-
-static void
-set_pe_value (char *name)
-{
- char *end;
-
- set_pe_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_pe_stack_heap (char *resname, char *comname)
-{
- set_pe_value (resname);
-
- if (*optarg == ',')
- {
- optarg++;
- set_pe_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_pe_stack_heap ("__size_of_heap_reserve__", "__size_of_heap_commit__");
- break;
- case OPTION_STACK:
- set_pe_stack_heap ("__size_of_stack_reserve__", "__size_of_stack_commit__");
- break;
- case OPTION_SUBSYSTEM:
- set_pe_subsystem ();
- break;
- case OPTION_MAJOR_OS_VERSION:
- set_pe_value ("__major_os_version__");
- break;
- case OPTION_MINOR_OS_VERSION:
- set_pe_value ("__minor_os_version__");
- break;
- case OPTION_MAJOR_SUBSYSTEM_VERSION:
- set_pe_value ("__major_subsystem_version__");
- break;
- case OPTION_MINOR_SUBSYSTEM_VERSION:
- set_pe_value ("__minor_subsystem_version__");
- break;
- case OPTION_MAJOR_IMAGE_VERSION:
- set_pe_value ("__major_image_version__");
- break;
- case OPTION_MINOR_IMAGE_VERSION:
- set_pe_value ("__minor_image_version__");
- break;
- case OPTION_FILE_ALIGNMENT:
- set_pe_value ("__file_alignment__");
- break;
- case OPTION_SECTION_ALIGNMENT:
- set_pe_value ("__section_alignment__");
- break;
- case OPTION_DLL:
- set_pe_name ("__dll__", 1);
- break;
- case OPTION_IMAGE_BASE:
- set_pe_value ("__image_base__");
- break;
- case OPTION_SUPPORT_OLD_CODE:
- support_old_code = 1;
- break;
- case OPTION_THUMB_ENTRY:
- thumb_entry_symbol = optarg;
- break;
-#ifdef DLL_SUPPORT
- case OPTION_OUT_DEF:
- pe_out_def_filename = xstrdup (optarg);
- break;
- case OPTION_EXPORT_ALL:
- pe_dll_export_everything = 1;
- break;
- case OPTION_EXCLUDE_SYMBOLS:
- pe_dll_add_excludes (optarg, 0);
- break;
- case OPTION_EXCLUDE_LIBS:
- pe_dll_add_excludes (optarg, 1);
- break;
- case OPTION_KILL_ATS:
- pe_dll_kill_ats = 1;
- break;
- case OPTION_STDCALL_ALIASES:
- pe_dll_stdcall_aliases = 1;
- break;
- case OPTION_ENABLE_STDCALL_FIXUP:
- pe_enable_stdcall_fixup = 1;
- break;
- case OPTION_DISABLE_STDCALL_FIXUP:
- pe_enable_stdcall_fixup = 0;
- break;
- case OPTION_IMPLIB_FILENAME:
- pe_implib_filename = xstrdup (optarg);
- break;
- case OPTION_WARN_DUPLICATE_EXPORTS:
- pe_dll_warn_dup_exports = 1;
- break;
- case OPTION_IMP_COMPAT:
- pe_dll_compat_implib = 1;
- break;
- case OPTION_ENABLE_AUTO_IMAGE_BASE:
- pe_enable_auto_image_base = 1;
- break;
- case OPTION_DISABLE_AUTO_IMAGE_BASE:
- pe_enable_auto_image_base = 0;
- break;
- case OPTION_DLL_SEARCH_PREFIX:
- pe_dll_search_prefix = xstrdup (optarg);
- break;
- case OPTION_NO_DEFAULT_EXCLUDES:
- pe_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:
- pe_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 0x60000000 | ((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)
-#ifdef DLL_SUPPORT
- init[IMAGEBASEOFF].value = (pe_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;
- }
-
- /* 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 (pe.FileAlignment >
- pe.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);
-}
-
-/* pe-dll.c directly accesses pe_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 * pe_data_import_dll;
-
-#ifdef DLL_SUPPORT
-static struct bfd_link_hash_entry *pe_undef_found_sym;
-
-static bfd_boolean
-pe_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] == '@')
- {
- pe_undef_found_sym = h;
- return FALSE;
- }
- return TRUE;
-}
-
-static void
-pe_fixup_stdcalls (void)
-{
- static int gave_warning_message = 0;
- struct bfd_link_hash_entry *undef, *sym;
-
- if (pe_dll_extra_pe_debug)
- printf ("%s\n", __FUNCTION__);
-
- for (undef = link_info.hash->undefs; undef; undef=undef->und_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 (pe_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. */
- pe_undef_found_sym = 0;
- bfd_link_hash_traverse (link_info.hash, pe_undef_cdecl_match,
- (char *) undef->root.string);
- sym = pe_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 (pe_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;
- int addend = 0;
-
- 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)))
- einfo (_("%C: Cannot get section contents - auto-import exception\n"),
- s->owner, s, rel->address);
-
- pe_create_import_fixup (rel, s, addend);
-
- return 1;
-}
-
-static void
-pe_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->und_next)
- {
- if (undef->type == bfd_link_hash_undefined)
- {
- /* 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);
-
- 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 = (asymbol **) xmalloc (symsize);
- nsyms = bfd_canonicalize_symtab (b, symbols);
-
- for (i = 0; i < nsyms; i++)
- {
- if (memcmp (symbols[i]->name, "__head_",
- sizeof ("__head_") - 1))
- continue;
-
- if (pe_dll_extra_pe_debug)
- printf ("->%s\n", symbols[i]->name);
-
- pe_data_import_dll = (char*) (symbols[i]->name +
- sizeof ("__head_") - 1);
- break;
- }
-
- pe_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 (pe_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 (pe_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->und_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: PE operations on non PE file.\n"));
-
- pe_data (output_bfd)->pe_opthdr = pe;
- pe_data (output_bfd)->dll = init[DLLOFF].value;
-
-#ifdef DLL_SUPPORT
- if (pe_enable_stdcall_fixup) /* -1=warn or 1=disable */
- pe_fixup_stdcalls ();
-
- pe_process_import_defs (output_bfd, & link_info);
-
- pe_find_data_imports ();
-
-#if ! (defined (TARGET_IS_i386pe) || defined (TARGET_IS_armpe))
- if (link_info.shared)
-#else
- 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);
-#endif
-#endif
-#endif
-
-#if defined(TARGET_IS_armpe) || defined(TARGET_IS_arm_epoc_pe)
- if (strstr (bfd_get_target (output_bfd), "arm") == NULL)
- {
- /* The arm backend needs special fields in the output hash structure.
- These will only be created if the output format is an arm 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 ARM binaries\n");
- return;
- }
- {
- /* 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))
- break;
- }
- }
-#endif
-
- {
- /* 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 (strncmp (sec->name, ".idata\$", 7) == 0)
- 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 = (asymbol **) xmalloc (symsize);
- symsize = bfd_canonicalize_symtab (is->the_bfd, symbols);
- if (symsize < 0)
- {
- einfo ("%X%P: unable to process symbols: %E");
- return;
- }
-
- relocs = (arelent **) 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;
- bfd *other_bfd;
- 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 = blhe->u.def.section->owner;
-
- if (strcmp (is->the_bfd->my_archive->filename,
- other_bfd->my_archive->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);
-
- 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)
-{
-#ifdef TARGET_IS_ppcpe
- /* Here we rummage through the found bfds to collect toc information. */
- {
- LANG_FOR_EACH_INPUT_STATEMENT (is)
- {
- if (!ppc_process_before_allocation (is->the_bfd, &link_info))
- {
- /* xgettext:c-format */
- einfo (_("Errors encountered processing file %s\n"), is->filename);
- }
- }
- }
-
- /* We have seen it all. Allocate it, and carry on. */
- ppc_allocate_toc_section (&link_info);
-#endif /* TARGET_IS_ppcpe */
-
-#if defined(TARGET_IS_armpe) || defined(TARGET_IS_arm_epoc_pe)
- /* FIXME: we should be able to set the size of the interworking stub
- section.
-
- Here we rummage through the found bfds to collect glue
- information. FIXME: should this be based on a command line
- option? krk@cygnus.com. */
- {
- LANG_FOR_EACH_INPUT_STATEMENT (is)
- {
- if (! bfd_arm_pe_process_before_allocation
- (is->the_bfd, & link_info, support_old_code))
- {
- /* xgettext:c-format */
- einfo (_("Errors encountered processing file %s for interworking"),
- is->filename);
- }
- }
- }
-
- /* We have seen it all. Allocate it, and carry on. */
- bfd_arm_pe_allocate_interworking_sections (& link_info);
-#endif /* TARGET_IS_armpe */
-}
-
-#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)
- {
- if (pe_def_file == 0)
- pe_def_file = def_file_empty ();
-
- def_file_parse (entry->filename, pe_def_file);
-
- if (pe_def_file)
- {
- int i, buflen=0, len;
- char *buf;
-
- for (i = 0; i < pe_def_file->num_exports; i++)
- {
- len = strlen (pe_def_file->exports[i].internal_name);
- if (buflen < len + 2)
- buflen = len + 2;
- }
-
- buf = (char *) xmalloc (buflen);
-
- for (i = 0; i < pe_def_file->num_exports; i++)
- {
- struct bfd_link_hash_entry *h;
-
- sprintf (buf, "_%s", 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)
- 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, pe_def_file); */
- if (pe_def_file->is_dll == 1)
- link_info.shared = 1;
-
- if (pe_def_file->base_address != (bfd_vma)(-1))
- {
- pe.ImageBase =
- pe_data (output_bfd)->pe_opthdr.ImageBase =
- init[IMAGEBASEOFF].value = pe_def_file->base_address;
- init[IMAGEBASEOFF].inited = 1;
- if (image_base_statement)
- image_base_statement->exp =
- 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__"))
- {
- pe.SizeOfStackReserve = pe_def_file->stack_reserve;
- if (pe_def_file->stack_commit != -1)
- pe.SizeOfStackCommit = pe_def_file->stack_commit;
- }
- if (pe_def_file->heap_reserve != -1
- && ! saw_option ("__size_of_heap_reserve__"))
- {
- pe.SizeOfHeapReserve = pe_def_file->heap_reserve;
- if (pe_def_file->heap_commit != -1)
- pe.SizeOfHeapCommit = pe_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_i386pe
- pe_dll_id_target ("pei-i386");
-#endif
-#ifdef TARGET_IS_shpe
- pe_dll_id_target ("pei-shl");
-#endif
-#ifdef TARGET_IS_mipspe
- pe_dll_id_target ("pei-mips");
-#endif
-#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);
- }
-#endif
- return FALSE;
-}
-
-static void
-gld_${EMULATION_NAME}_finish (void)
-{
-#if defined(TARGET_IS_armpe) || defined(TARGET_IS_arm_epoc_pe)
- struct bfd_link_hash_entry * h;
-
- if (thumb_entry_symbol != NULL)
- {
- 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);
- }
-#endif /* defined(TARGET_IS_armpe) || defined(TARGET_IS_arm_epoc_pe) */
-
-#ifdef DLL_SUPPORT
- if (link_info.shared
-#if !defined(TARGET_IS_shpe) && !defined(TARGET_IS_mipspe)
- || (!link_info.relocatable && pe_def_file->num_exports != 0)
-#endif
- )
- {
- pe_dll_fill_sections (output_bfd, &link_info);
- if (pe_implib_filename)
- pe_dll_generate_implib (pe_def_file, pe_implib_filename);
- }
-#if defined(TARGET_IS_shpe) || defined(TARGET_IS_mipspe)
- /* ARM doesn't need relocs. */
- else
- {
- pe_exe_fill_sections (output_bfd, &link_info);
- }
-#endif
-
- if (pe_out_def_filename)
- pe_dll_generate_def_file (pe_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;
- }
- }
-}
-
-
-/* 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
- 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. */
-
-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)
-{
- const char *secname;
- char *hold_section_name;
- char *dollar = NULL;
- const char *ps = 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. */
- hold_section_name = xstrdup (secname);
- if (!link_info.relocatable)
- {
- dollar = strchr (hold_section_name, '$');
- if (dollar != NULL)
- *dollar = '\0';
- }
-
- os = lang_output_section_find (hold_section_name);
-
- lang_list_init (&add_child);
-
- if (os != NULL
- && (os->bfd_section == NULL
- || ((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);
- }
- else
- {
- 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;
- etree_type *address;
-
- /* 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);
-
- 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 = 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 (link_info.relocatable || (s->flags & (SEC_LOAD | SEC_ALLOC)) == 0)
- address = exp_intop ((bfd_vma) 0);
- else
- {
- /* 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, ".")));
- }
-
- 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;
- }
- }
- }
-
- {
- 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->ifile->the_bfd, ls->section);
- if (strchr (lname, '$') == NULL)
- {
- if (found_dollar)
- break;
- }
- else
- {
- found_dollar = TRUE;
- if (strcmp (secname, lname) < 0)
- break;
- }
- }
- }
-
- if (add_child.head != NULL)
- {
- add_child.head->header.next = *pl;
- *pl = add_child.head;
- }
- }
-
- free (hold_section_name);
-
- 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)
-{
- const char * filename;
- char * string;
-
- if (! entry->is_archive)
- return FALSE;
-
- filename = entry->filename;
-
- string = (char *) xmalloc (strlen (search->name)
- + strlen (filename)
- + sizeof "/lib.a.dll"
-#ifdef DLL_SUPPORT
- + (pe_dll_search_prefix ? strlen (pe_dll_search_prefix) : 0)
-#endif
- + 1);
-
- /* Try "libfoo.dll.a" first (preferred explicit import library for dll's. */
- sprintf (string, "%s/lib%s.dll.a", search->name, filename);
-
- if (! ldfile_try_open_bfd (string, entry))
- {
- /* 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. */
-#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;
- }
- }
- }
- }
- }
- }
-
- entry->filename = 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
deleted file mode 100644
index 4614593..0000000
--- a/contrib/binutils/ld/emultempl/ppc32elf.em
+++ /dev/null
@@ -1,80 +0,0 @@
-# This shell script emits a C file. -*- C -*-
-# Copyright 2003 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., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
-#
-
-# This file is sourced from elf32.em, and defines extra powerpc64-elf
-# specific routines.
-#
-cat >>e${EMULATION_NAME}.c <<EOF
-
-#include "libbfd.h"
-#include "elf32-ppc.h"
-
-/* Whether to run tls optimization. */
-static int notlsopt = 0;
-
-static void
-ppc_before_allocation (void)
-{
- extern const bfd_target bfd_elf32_powerpc_vec;
- extern const bfd_target bfd_elf32_powerpcle_vec;
-
- if (link_info.hash->creator == &bfd_elf32_powerpc_vec
- || link_info.hash->creator == &bfd_elf32_powerpcle_vec)
- {
- if (ppc_elf_tls_setup (output_bfd, &link_info) && !notlsopt)
- {
- if (!ppc_elf_tls_optimize (output_bfd, &link_info))
- {
- einfo ("%X%P: TLS problem %E\n");
- return;
- }
- }
- }
- gld${EMULATION_NAME}_before_allocation ();
-}
-
-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_TLS_OPT 301
-'
-
-PARSE_AND_LIST_LONGOPTS='
- { "no-tls-optimize", no_argument, NULL, OPTION_NO_TLS_OPT },
-'
-
-PARSE_AND_LIST_OPTIONS='
- fprintf (file, _("\
- --no-tls-optimize Don'\''t try to optimize TLS accesses.\n"
- ));
-'
-
-PARSE_AND_LIST_ARGS_CASES='
- case OPTION_NO_TLS_OPT:
- notlsopt = 1;
- break;
-'
-
-# Put these extra ppc64elf routines in ld_${EMULATION_NAME}_emulation
-#
-LDEMUL_BEFORE_ALLOCATION=ppc_before_allocation
diff --git a/contrib/binutils/ld/emultempl/ppc64elf.em b/contrib/binutils/ld/emultempl/ppc64elf.em
deleted file mode 100644
index 4f408a9..0000000
--- a/contrib/binutils/ld/emultempl/ppc64elf.em
+++ /dev/null
@@ -1,529 +0,0 @@
-# This shell script emits a C file. -*- C -*-
-# Copyright 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., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
-#
-
-# This file is sourced from elf32.em, and defines extra powerpc64-elf
-# specific routines.
-#
-cat >>e${EMULATION_NAME}.c <<EOF
-
-#include "ldctor.h"
-#include "libbfd.h"
-#include "elf-bfd.h"
-#include "elf64-ppc.h"
-
-/* Fake input file for stubs. */
-static lang_input_statement_type *stub_file;
-static int stub_added = 0;
-
-/* Whether we need to call ppc_layout_sections_again. */
-static int need_laying_out = 0;
-
-/* Maximum size of a group of input sections that can be handled by
- one stub section. A value of +/-1 indicates the bfd back-end
- should use a suitable default size. */
-static bfd_signed_vma group_size = 1;
-
-/* Whether to add ".foo" entries for each "foo" in a version script. */
-static int dotsyms = 1;
-
-/* Whether to run tls optimization. */
-static int notlsopt = 0;
-
-/* Whether to emit symbols for stubs. */
-static int emit_stub_syms = 0;
-
-static asection *toc_section = 0;
-
-
-/* This is called before the input files are opened. We create a new
- fake input file to hold the stub sections. */
-
-static void
-ppc_create_output_section_statements (void)
-{
- extern const bfd_target bfd_elf64_powerpc_vec;
- extern const bfd_target bfd_elf64_powerpcle_vec;
-
- if (link_info.hash->creator != &bfd_elf64_powerpc_vec
- && link_info.hash->creator != &bfd_elf64_powerpcle_vec)
- return;
-
- link_info.wrap_char = '.';
-
- 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 BFD %E\n");
- return;
- }
-
- 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_tls_setup (output_bfd, &link_info) && !notlsopt)
- {
- /* 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);
-
- if (!ppc64_elf_tls_optimize (output_bfd, &link_info))
- {
- einfo ("%X%P: TLS problem %E\n");
- return;
- }
-
- /* We must not cache anything from the preliminary sizing. */
- elf_tdata (output_bfd)->program_header_size = 0;
- lang_reset_memory_regions ();
- }
- }
-
- gld${EMULATION_NAME}_before_allocation ();
-}
-
-struct hook_stub_info
-{
- lang_statement_list_type add;
- asection *input_section;
-};
-
-/* Traverse the linker tree to find the spot where the stub goes. */
-
-static bfd_boolean
-hook_in_stub (struct hook_stub_info *info, lang_statement_union_type **lp)
-{
- lang_statement_union_type *l;
- bfd_boolean ret;
-
- for (; (l = *lp) != NULL; lp = &l->header.next)
- {
- switch (l->header.type)
- {
- case lang_constructors_statement_enum:
- ret = hook_in_stub (info, &constructor_list.head);
- if (ret)
- return ret;
- break;
-
- case lang_output_section_statement_enum:
- ret = hook_in_stub (info,
- &l->output_section_statement.children.head);
- if (ret)
- return ret;
- break;
-
- case lang_wild_statement_enum:
- ret = hook_in_stub (info, &l->wild_statement.children.head);
- if (ret)
- return ret;
- break;
-
- case lang_group_statement_enum:
- ret = hook_in_stub (info, &l->group_statement.children.head);
- if (ret)
- return ret;
- break;
-
- case lang_input_section_enum:
- if (l->input_section.section == info->input_section)
- {
- /* We've found our section. Insert the stub immediately
- before its associated input section. */
- *lp = info->add.head;
- *(info->add.tail) = l;
- return TRUE;
- }
- break;
-
- case lang_data_statement_enum:
- case lang_reloc_statement_enum:
- case lang_object_symbols_statement_enum:
- case lang_output_statement_enum:
- case lang_target_statement_enum:
- case lang_input_statement_enum:
- case lang_assignment_statement_enum:
- case lang_padding_statement_enum:
- case lang_address_statement_enum:
- case lang_fill_statement_enum:
- break;
-
- default:
- FAIL ();
- break;
- }
- }
- return FALSE;
-}
-
-
-/* Call-back for ppc64_elf_size_stubs. */
-
-/* Create a new stub section, and arrange for it to be linked
- immediately before INPUT_SECTION. */
-
-static asection *
-ppc_add_stub_section (const char *stub_sec_name, asection *input_section)
-{
- asection *stub_sec;
- flagword flags;
- asection *output_section;
- const char *secname;
- lang_output_section_statement_type *os;
- struct hook_stub_info info;
-
- stub_sec = bfd_make_section_anyway (stub_file->the_bfd, stub_sec_name);
- if (stub_sec == 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, stub_sec, flags))
- goto err_ret;
-
- output_section = input_section->output_section;
- secname = bfd_get_section_name (output_section->owner, output_section);
- os = lang_output_section_find (secname);
-
- info.input_section = input_section;
- lang_list_init (&info.add);
- lang_add_section (&info.add, stub_sec, os, stub_file);
-
- if (info.add.head == NULL)
- goto err_ret;
-
- stub_added = 1;
- if (hook_in_stub (&info, &os->children.head))
- return stub_sec;
-
- err_ret:
- einfo ("%X%P: can not make stub section: %E\n");
- return NULL;
-}
-
-
-/* Another call-back for ppc64_elf_size_stubs. */
-
-static void
-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);
-}
-
-
-/* Call the back-end function to set TOC base after we have placed all
- the sections. */
-static void
-gld${EMULATION_NAME}_after_allocation (void)
-{
- if (!link_info.relocatable)
- _bfd_set_gp_value (output_bfd, ppc64_elf_toc (output_bfd));
-}
-
-
-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);
-}
-
-
-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 (!ppc64_elf_next_input_section (&link_info,
- statement->input_section.section))
- einfo ("%X%P: can not size stub section: %E\n");
- }
-}
-
-
-/* Final emulation specific call. */
-
-static void
-gld${EMULATION_NAME}_finish (void)
-{
- /* e_entry on PowerPC64 points to the function descriptor for
- _start. If _start is missing, default to the first function
- descriptor in the .opd section. */
- entry_section = ".opd";
-
- /* bfd_elf_discard_info just plays with debugging sections,
- ie. doesn't affect any code, so we can delay resizing the
- sections. It's likely we'll resize everything in the process of
- adding stubs. */
- if (bfd_elf_discard_info (output_bfd, &link_info))
- need_laying_out = 1;
-
- /* If generating a relocatable output file, then we don't have any
- stubs. */
- if (stub_file != NULL && !link_info.relocatable)
- {
- int ret = ppc64_elf_setup_section_lists (output_bfd, &link_info);
- 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);
-
- ppc64_elf_reinit_toc (output_bfd, &link_info);
-
- lang_for_each_statement (build_section_lists);
-
- /* Call into the BFD backend to do the real work. */
- if (!ppc64_elf_size_stubs (output_bfd,
- &link_info,
- group_size,
- &ppc_add_stub_section,
- &ppc_layout_sections_again))
- {
- einfo ("%X%P: can not size stub section: %E\n");
- return;
- }
- }
- }
-
- if (need_laying_out)
- ppc_layout_sections_again ();
-
- if (stub_added)
- {
- char *msg = NULL;
- char *line, *endline;
-
- if (!ppc64_elf_build_stubs (emit_stub_syms, &link_info,
- config.stats ? &msg : NULL))
- einfo ("%X%P: can not build stubs: %E\n");
-
- for (line = msg; line != NULL; line = endline)
- {
- endline = strchr (line, '\n');
- if (endline != NULL)
- *endline++ = '\0';
- fprintf (stderr, "%s: %s\n", program_name, line);
- }
- if (msg != NULL)
- free (msg);
- }
-}
-
-
-/* Add a pattern matching ".foo" for every "foo" in a version script.
-
- The reason for doing this is that many shared library version
- scripts export a selected set of functions or data symbols, forcing
- others local. eg.
-
- . VERS_1 {
- . global:
- . this; that; some; thing;
- . local:
- . *;
- . };
-
- To make the above work for PowerPC64, we need to export ".this",
- ".that" and so on, otherwise only the function descriptor syms are
- exported. Lack of an exported function code sym may cause a
- definition to be pulled in from a static library. */
-
-static struct bfd_elf_version_expr *
-gld${EMULATION_NAME}_new_vers_pattern (struct bfd_elf_version_expr *entry)
-{
- struct bfd_elf_version_expr *dot_entry;
- unsigned int len;
- char *dot_pat;
-
- if (!dotsyms || 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;
- return dot_entry;
-}
-
-
-/* Avoid processing the fake stub_file in vercheck, stat_needed and
- check_needed routines. */
-
-static void (*real_func) (lang_input_statement_type *);
-
-static void ppc_for_each_input_file_wrapper (lang_input_statement_type *l)
-{
- if (l != stub_file)
- (*real_func) (l);
-}
-
-static void
-ppc_lang_for_each_input_file (void (*func) (lang_input_statement_type *))
-{
- real_func = func;
- lang_for_each_input_file (&ppc_for_each_input_file_wrapper);
-}
-
-#define lang_for_each_input_file ppc_lang_for_each_input_file
-
-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_STUBGROUP_SIZE 301
-#define OPTION_STUBSYMS (OPTION_STUBGROUP_SIZE + 1)
-#define OPTION_DOTSYMS (OPTION_STUBSYMS + 1)
-#define OPTION_NO_DOTSYMS (OPTION_DOTSYMS + 1)
-#define OPTION_NO_TLS_OPT (OPTION_NO_DOTSYMS + 1)
-'
-
-PARSE_AND_LIST_LONGOPTS='
- { "stub-group-size", required_argument, NULL, OPTION_STUBGROUP_SIZE },
- { "emit-stub-syms", no_argument, NULL, OPTION_STUBSYMS },
- { "dotsyms", no_argument, NULL, OPTION_DOTSYMS },
- { "no-dotsyms", no_argument, NULL, OPTION_NO_DOTSYMS },
- { "no-tls-optimize", no_argument, NULL, OPTION_NO_TLS_OPT },
-'
-
-PARSE_AND_LIST_OPTIONS='
- fprintf (file, _("\
- --stub-group-size=N Maximum size of a group of input sections that can be\n\
- handled by one stub section. A negative value\n\
- locates all stubs before their branches (with a\n\
- group size of -N), while a positive value allows\n\
- two groups of input sections, one before, and one\n\
- after each stub section. Values of +/-1 indicate\n\
- the linker should choose suitable defaults.\n"
- ));
- fprintf (file, _("\
- --emit-stub-syms Label linker stubs with a symbol.\n"
- ));
- fprintf (file, _("\
- --dotsyms For every version pattern \"foo\" in a version script,\n\
- add \".foo\" so that function code symbols are\n\
- treated the same as function descriptor symbols.\n\
- Defaults to on.\n"
- ));
- fprintf (file, _("\
- --no-dotsyms Don'\''t do anything special in version scripts.\n"
- ));
- fprintf (file, _("\
- --no-tls-optimize Don'\''t try to optimize TLS accesses.\n"
- ));
-'
-
-PARSE_AND_LIST_ARGS_CASES='
- case OPTION_STUBGROUP_SIZE:
- {
- const char *end;
- group_size = bfd_scan_vma (optarg, &end, 0);
- if (*end)
- einfo (_("%P%F: invalid number `%s'\''\n"), optarg);
- }
- break;
-
- case OPTION_STUBSYMS:
- emit_stub_syms = 1;
- break;
-
- case OPTION_DOTSYMS:
- dotsyms = 1;
- break;
-
- case OPTION_NO_DOTSYMS:
- dotsyms = 0;
- break;
-
- case OPTION_NO_TLS_OPT:
- notlsopt = 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
-LDEMUL_CREATE_OUTPUT_SECTION_STATEMENTS=ppc_create_output_section_statements
-LDEMUL_NEW_VERS_PATTERN=gld${EMULATION_NAME}_new_vers_pattern
diff --git a/contrib/binutils/ld/emultempl/stringify.sed b/contrib/binutils/ld/emultempl/stringify.sed
deleted file mode 100644
index a526d3f..0000000
--- a/contrib/binutils/ld/emultempl/stringify.sed
+++ /dev/null
@@ -1,4 +0,0 @@
-s/["\\]/\\&/g
-s/$/\\n\\/
-1 s/^/"/
-$ s/$/n"/
diff --git a/contrib/binutils/ld/emultempl/sunos.em b/contrib/binutils/ld/emultempl/sunos.em
deleted file mode 100644
index 358bc9a..0000000
--- a/contrib/binutils/ld/emultempl/sunos.em
+++ /dev/null
@@ -1,1031 +0,0 @@
-# This shell script emits a C file. -*- C -*-
-# It does some substitutions.
-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! */
-
-/* SunOS emulation code for ${EMULATION_NAME}
- Copyright 1991, 1993, 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2002,
- 2003, 2004 Free Software Foundation, Inc.
- Written by Steve Chamberlain <sac@cygnus.com>
- SunOS shared library support by Ian Lance Taylor <ian@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}
-
-#include "bfd.h"
-#include "sysdep.h"
-#include "bfdlink.h"
-#include "libiberty.h"
-#include "safe-ctype.h"
-
-#include "ld.h"
-#include "ldmain.h"
-#include "ldmisc.h"
-#include "ldexp.h"
-#include "ldlang.h"
-#include "ldfile.h"
-#include "ldemul.h"
-
-#ifdef HAVE_DIRENT_H
-# include <dirent.h>
-#else
-# define dirent direct
-# ifdef HAVE_SYS_NDIR_H
-# include <sys/ndir.h>
-# endif
-# ifdef HAVE_SYS_DIR_H
-# include <sys/dir.h>
-# endif
-# ifdef HAVE_NDIR_H
-# include <ndir.h>
-# endif
-#endif
-
-static void gld${EMULATION_NAME}_find_so
- (lang_input_statement_type *);
-static char *gld${EMULATION_NAME}_search_dir
- (const char *, const char *, bfd_boolean *);
-static void gld${EMULATION_NAME}_check_needed
- (lang_input_statement_type *);
-static bfd_boolean gld${EMULATION_NAME}_search_needed
- (const char *, const char *);
-static bfd_boolean gld${EMULATION_NAME}_try_needed
- (const char *, const char *);
-static void gld${EMULATION_NAME}_find_assignment
- (lang_statement_union_type *);
-static void gld${EMULATION_NAME}_find_exp_assignment
- (etree_type *);
-static void gld${EMULATION_NAME}_count_need
- (lang_input_statement_type *);
-static void gld${EMULATION_NAME}_set_need
- (lang_input_statement_type *);
-
-static void
-gld${EMULATION_NAME}_before_parse (void)
-{
- ldfile_set_output_arch ("${OUTPUT_ARCH}", bfd_arch_`echo ${ARCH} | sed -e 's/:.*//'`);
- config.dynamic_link = TRUE;
- config.has_shared = TRUE;
-}
-
-/* This is called after the command line arguments have been parsed,
- but before the linker script has been read. If this is a native
- linker, we add the directories in LD_LIBRARY_PATH to the search
- list. */
-
-static void
-gld${EMULATION_NAME}_set_symbols (void)
-{
-EOF
-if [ "x${host}" = "x${target}" ] ; then
- case " ${EMULATION_LIBPATH} " in
- *" ${EMULATION_NAME} "*)
-cat >>e${EMULATION_NAME}.c <<EOF
- const char *env;
-
- env = (const char *) getenv ("LD_LIBRARY_PATH");
- if (env != NULL)
- {
- char *l;
-
- l = xstrdup (env);
- while (1)
- {
- char *c;
-
- c = strchr (l, ':');
- if (c != NULL)
- *c++ = '\0';
- if (*l != '\0')
- ldfile_add_library_path (l, FALSE);
- if (c == NULL)
- break;
- l = c;
- }
- }
-EOF
- ;;
- esac
-fi
-cat >>e${EMULATION_NAME}.c <<EOF
-}
-
-/* Despite the name, we use this routine to search for dynamic
- libraries. On SunOS this requires a directory search. We need to
- find the .so file with the highest version number. The user may
- restrict the major version by saying, e.g., -lc.1. Also, if we
- find a .so file, we need to look for a the same file after
- replacing .so with .sa; if it exists, it will be an archive which
- provide some initializations for data symbols, and we need to
- search it after including the .so file. */
-
-static void
-gld${EMULATION_NAME}_create_output_section_statements (void)
-{
- lang_for_each_input_file (gld${EMULATION_NAME}_find_so);
-}
-
-/* Search the directory for a .so file for each library search. */
-
-static void
-gld${EMULATION_NAME}_find_so (lang_input_statement_type *inp)
-{
- search_dirs_type *search;
- char *found = NULL;
- char *alc;
- struct stat st;
-
- if (! inp->search_dirs_flag
- || ! inp->is_archive
- || ! inp->dynamic)
- return;
-
- ASSERT (strncmp (inp->local_sym_name, "-l", 2) == 0);
-
- for (search = search_head; search != NULL; search = search->next)
- {
- bfd_boolean found_static;
-
- found = gld${EMULATION_NAME}_search_dir (search->name, inp->filename,
- &found_static);
- if (found != NULL || found_static)
- break;
- }
-
- if (found == NULL)
- {
- /* We did not find a matching .so file. This isn't an error,
- since there might still be a matching .a file, which will be
- found by the usual search. */
- return;
- }
-
- /* Replace the filename with the one we have found. */
- alc = (char *) xmalloc (strlen (search->name) + strlen (found) + 2);
- sprintf (alc, "%s/%s", search->name, found);
- inp->filename = alc;
-
- /* Turn off the search_dirs_flag to prevent ldfile_open_file from
- searching for this file again. */
- inp->search_dirs_flag = FALSE;
-
- free (found);
-
- /* Now look for the same file name, but with .sa instead of .so. If
- found, add it to the list of input files. */
- alc = (char *) xmalloc (strlen (inp->filename) + 1);
- strcpy (alc, inp->filename);
- strstr (alc + strlen (search->name), ".so")[2] = 'a';
- if (stat (alc, &st) != 0)
- free (alc);
- else
- {
- lang_input_statement_type *sa;
-
- /* Add the .sa file to the statement list just before the .so
- file. This is really a hack. */
- sa = ((lang_input_statement_type *)
- xmalloc (sizeof (lang_input_statement_type)));
- *sa = *inp;
-
- inp->filename = alc;
- inp->local_sym_name = alc;
-
- inp->header.next = (lang_statement_union_type *) sa;
- inp->next_real_file = (lang_statement_union_type *) sa;
- }
-}
-
-/* Search a directory for a .so file. */
-
-static char *
-gld${EMULATION_NAME}_search_dir
- (const char *dirname, const char *filename, bfd_boolean *found_static)
-{
- int force_maj, force_min;
- const char *dot;
- unsigned int len;
- char *alc;
- char *found;
- int max_maj, max_min;
- DIR *dir;
- struct dirent *entry;
- unsigned int dirnamelen;
- char *full_path;
- int statval;
- struct stat st;
-
- *found_static = FALSE;
-
- force_maj = -1;
- force_min = -1;
- dot = strchr (filename, '.');
- if (dot == NULL)
- {
- len = strlen (filename);
- alc = NULL;
- }
- else
- {
- force_maj = atoi (dot + 1);
-
- len = dot - filename;
- alc = (char *) xmalloc (len + 1);
- strncpy (alc, filename, len);
- alc[len] = '\0';
- filename = alc;
-
- dot = strchr (dot + 1, '.');
- if (dot != NULL)
- force_min = atoi (dot + 1);
- }
-
- found = NULL;
- max_maj = max_min = 0;
-
- dir = opendir (dirname);
- if (dir == NULL)
- return NULL;
- dirnamelen = strlen (dirname);
-
- while ((entry = readdir (dir)) != NULL)
- {
- const char *s;
- int found_maj, found_min;
-
- if (strncmp (entry->d_name, "lib", 3) != 0
- || strncmp (entry->d_name + 3, filename, len) != 0)
- continue;
-
- if (dot == NULL
- && strcmp (entry->d_name + 3 + len, ".a") == 0)
- {
- *found_static = TRUE;
- continue;
- }
-
- /* We accept libfoo.so without a version number, even though the
- 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)
- continue;
- if (entry->d_name[6 + len] == '\0')
- ;
- else if (entry->d_name[6 + len] == '.'
- && ISDIGIT (entry->d_name[7 + len]))
- ;
- else
- continue;
-
- for (s = entry->d_name + 6 + len; *s != '\0'; s++)
- if (*s != '.' && ! ISDIGIT (*s))
- break;
- if (*s != '\0')
- continue;
-
- /* We've found a .so file. Work out the major and minor
- version numbers. */
- found_maj = 0;
- found_min = 0;
- sscanf (entry->d_name + 3 + len, ".so.%d.%d",
- &found_maj, &found_min);
-
- if ((force_maj != -1 && force_maj != found_maj)
- || (force_min != -1 && force_min != found_min))
- continue;
-
- /* Make sure the file really exists (ignore broken symlinks). */
- full_path = xmalloc (dirnamelen + 1 + strlen (entry->d_name) + 1);
- sprintf (full_path, "%s/%s", dirname, entry->d_name);
- statval = stat (full_path, &st);
- free (full_path);
- if (statval != 0)
- continue;
-
- /* We've found a match for the name we are searching for. See
- if this is the version we should use. If the major and minor
- versions match, we use the last entry in alphabetical order;
- I don't know if this is how SunOS distinguishes libc.so.1.8
- from libc.so.1.8.1, but it ought to suffice. */
- if (found == NULL
- || (found_maj > max_maj)
- || (found_maj == max_maj
- && (found_min > max_min
- || (found_min == max_min
- && strcmp (entry->d_name, found) > 0))))
- {
- if (found != NULL)
- free (found);
- found = (char *) xmalloc (strlen (entry->d_name) + 1);
- strcpy (found, entry->d_name);
- max_maj = found_maj;
- max_min = found_min;
- }
- }
-
- closedir (dir);
-
- if (alc != NULL)
- free (alc);
-
- return found;
-}
-
-/* These variables are required to pass information back and forth
- between after_open and check_needed. */
-
-static struct bfd_link_needed_list *global_needed;
-static bfd_boolean global_found;
-
-/* This is called after all the input files have been opened. */
-
-static void
-gld${EMULATION_NAME}_after_open (void)
-{
- struct bfd_link_needed_list *needed, *l;
-
- /* We only need to worry about this when doing a final link. */
- if (link_info.relocatable || link_info.shared)
- return;
-
- /* Get the list of files which appear in ld_need entries in dynamic
- objects included in the link. For each such file, we want to
- track down the corresponding library, and include the symbol
- table in the link. This is what the runtime dynamic linker will
- do. Tracking the files down here permits one dynamic object to
- include another without requiring special action by the person
- doing the link. Note that the needed list can actually grow
- while we are stepping through this loop. */
- needed = bfd_sunos_get_needed_list (output_bfd, &link_info);
- for (l = needed; l != NULL; l = l->next)
- {
- struct bfd_link_needed_list *ll;
- const char *lname;
- search_dirs_type *search;
-
- lname = l->name;
-
- /* If we've already seen this file, skip it. */
- for (ll = needed; ll != l; ll = ll->next)
- if (strcmp (ll->name, lname) == 0)
- break;
- if (ll != l)
- continue;
-
- /* See if this file was included in the link explicitly. */
- global_needed = l;
- global_found = FALSE;
- lang_for_each_input_file (gld${EMULATION_NAME}_check_needed);
- if (global_found)
- continue;
-
- if (strncmp (lname, "-l", 2) != 0)
- {
- bfd *abfd;
-
- abfd = bfd_openr (lname, bfd_get_target (output_bfd));
- if (abfd != NULL)
- {
- if (! bfd_check_format (abfd, bfd_object))
- {
- (void) bfd_close (abfd);
- abfd = NULL;
- }
- }
- if (abfd != NULL)
- {
- if ((bfd_get_file_flags (abfd) & DYNAMIC) == 0)
- {
- (void) bfd_close (abfd);
- abfd = NULL;
- }
- }
- if (abfd != NULL)
- {
- /* We've found the needed dynamic object. */
- if (! bfd_link_add_symbols (abfd, &link_info))
- einfo ("%F%B: could not read symbols: %E\n", abfd);
- }
- else
- {
- einfo ("%P: warning: %s, needed by %B, not found\n",
- lname, l->by);
- }
-
- continue;
- }
-
- lname += 2;
-
- /* We want to search for the file in the same way that the
- dynamic linker will search. That means that we want to use
- rpath_link, rpath or -L, then the environment variable
- LD_LIBRARY_PATH (native only), then (if rpath was used) the
- linker script LIB_SEARCH_DIRS. */
- if (gld${EMULATION_NAME}_search_needed (command_line.rpath_link,
- lname))
- continue;
- if (command_line.rpath != NULL)
- {
- if (gld${EMULATION_NAME}_search_needed (command_line.rpath, lname))
- continue;
- }
- else
- {
- for (search = search_head; search != NULL; search = search->next)
- if (gld${EMULATION_NAME}_try_needed (search->name, lname))
- break;
- if (search != NULL)
- continue;
- }
-EOF
-if [ "x${host}" = "x${target}" ] ; then
- case " ${EMULATION_LIBPATH} " in
- *" ${EMULATION_NAME} "*)
-cat >>e${EMULATION_NAME}.c <<EOF
- {
- const char *lib_path;
-
- lib_path = (const char *) getenv ("LD_LIBRARY_PATH");
- if (gld${EMULATION_NAME}_search_needed (lib_path, lname))
- continue;
- }
-EOF
- ;;
- esac
-fi
-cat >>e${EMULATION_NAME}.c <<EOF
- if (command_line.rpath != NULL)
- {
- for (search = search_head; search != NULL; search = search->next)
- {
- if (search->cmdline)
- continue;
- if (gld${EMULATION_NAME}_try_needed (search->name, lname))
- break;
- }
- if (search != NULL)
- continue;
- }
-
- einfo ("%P: warning: %s, needed by %B, not found\n",
- l->name, l->by);
- }
-}
-
-/* Search for a needed file in a path. */
-
-static bfd_boolean
-gld${EMULATION_NAME}_search_needed (const char *path, const char *name)
-{
- const char *s;
-
- if (path == NULL || *path == '\0')
- return FALSE;
- while (1)
- {
- const char *dir;
- char *dircopy;
-
- s = strchr (path, ':');
- if (s == NULL)
- {
- dircopy = NULL;
- dir = path;
- }
- else
- {
- dircopy = (char *) xmalloc (s - path + 1);
- memcpy (dircopy, path, s - path);
- dircopy[s - path] = '\0';
- dir = dircopy;
- }
-
- if (gld${EMULATION_NAME}_try_needed (dir, name))
- return TRUE;
-
- if (dircopy != NULL)
- free (dircopy);
-
- if (s == NULL)
- break;
- path = s + 1;
- }
-
- return FALSE;
-}
-
-/* This function is called for each possible directory for a needed
- dynamic object. */
-
-static bfd_boolean
-gld${EMULATION_NAME}_try_needed (const char *dir, const char *name)
-{
- char *file;
- char *alc;
- bfd_boolean ignore;
- bfd *abfd;
-
- file = gld${EMULATION_NAME}_search_dir (dir, name, &ignore);
- if (file == NULL)
- return FALSE;
-
- alc = (char *) xmalloc (strlen (dir) + strlen (file) + 2);
- sprintf (alc, "%s/%s", dir, file);
- free (file);
- abfd = bfd_openr (alc, bfd_get_target (output_bfd));
- if (abfd == NULL)
- return FALSE;
- if (! bfd_check_format (abfd, bfd_object))
- {
- (void) bfd_close (abfd);
- return FALSE;
- }
- if ((bfd_get_file_flags (abfd) & DYNAMIC) == 0)
- {
- (void) bfd_close (abfd);
- return FALSE;
- }
-
- /* We've found the needed dynamic object. */
-
- /* Add this file into the symbol table. */
- if (! bfd_link_add_symbols (abfd, &link_info))
- einfo ("%F%B: could not read symbols: %E\n", abfd);
-
- return TRUE;
-}
-
-/* See if we have already included a needed object in the link. This
- does not have to be precise, as it does no harm to include a
- dynamic object more than once. */
-
-static void
-gld${EMULATION_NAME}_check_needed (lang_input_statement_type *s)
-{
- if (s->filename == NULL)
- return;
- if (strncmp (global_needed->name, "-l", 2) != 0)
- {
- if (strcmp (s->filename, global_needed->name) == 0)
- global_found = TRUE;
- }
- else
- {
- const char *sname, *lname;
- const char *sdot, *ldot;
- int lmaj, lmin, smaj, smin;
-
- lname = global_needed->name + 2;
-
- sname = strrchr (s->filename, '/');
- if (sname == NULL)
- sname = s->filename;
- else
- ++sname;
-
- if (strncmp (sname, "lib", 3) != 0)
- return;
- sname += 3;
-
- ldot = strchr (lname, '.');
- if (ldot == NULL)
- ldot = lname + strlen (lname);
-
- sdot = strstr (sname, ".so.");
- if (sdot == NULL)
- return;
-
- if (sdot - sname != ldot - lname
- || strncmp (lname, sname, sdot - sname) != 0)
- return;
-
- lmaj = lmin = -1;
- sscanf (ldot, ".%d.%d", &lmaj, &lmin);
- smaj = smin = -1;
- sscanf (sdot, ".so.%d.%d", &smaj, &smin);
- if ((smaj != lmaj && smaj != -1 && lmaj != -1)
- || (smin != lmin && smin != -1 && lmin != -1))
- return;
-
- global_found = TRUE;
- }
-}
-
-/* We need to use static variables to pass information around the call
- to lang_for_each_statement. Ick. */
-
-static const char *find_assign;
-static bfd_boolean found_assign;
-
-/* We need to use static variables to pass information around the call
- to lang_for_each_input_file. Ick. */
-
-static bfd_size_type need_size;
-static bfd_size_type need_entries;
-static bfd_byte *need_contents;
-static bfd_byte *need_pinfo;
-static bfd_byte *need_pnames;
-
-/* The size of one entry in the .need section, not including the file
- name. */
-
-#define NEED_ENTRY_SIZE (16)
-
-/* 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)
-{
- struct bfd_link_hash_entry *hdyn = NULL;
- asection *sneed;
- asection *srules;
- asection *sdyn;
-
- /* The SunOS native linker creates a shared library whenever there
- are any undefined symbols in a link, unless -e is used. This is
- pretty weird, but we are compatible. */
- if (! link_info.shared && ! link_info.relocatable && ! entry_from_cmdline)
- {
- struct bfd_link_hash_entry *h;
-
- for (h = link_info.hash->undefs; h != NULL; h = h->und_next)
- {
- if (h->type == bfd_link_hash_undefined
- && h->u.undef.abfd != NULL
- && (h->u.undef.abfd->flags & DYNAMIC) == 0
- && strcmp (h->root.string, "__DYNAMIC") != 0
- && strcmp (h->root.string, "__GLOBAL_OFFSET_TABLE_") != 0)
- {
- find_assign = h->root.string;
- found_assign = FALSE;
- lang_for_each_statement (gld${EMULATION_NAME}_find_assignment);
- if (! found_assign)
- {
- link_info.shared = TRUE;
- break;
- }
- }
- }
- }
-
- if (link_info.shared)
- {
- lang_output_section_statement_type *os;
-
- /* Set the .text section to start at 0x20, not 0x2020. FIXME:
- This is too magical. */
- os = lang_output_section_statement_lookup (".text");
- if (os->addr_tree == NULL)
- os->addr_tree = exp_intop (0x20);
- }
-
- /* We need to create a __DYNAMIC symbol. We don't do this in the
- linker script because we want to set the value to the start of
- the dynamic section if there is one, or to zero if there isn't
- one. We need to create the symbol before calling
- size_dynamic_sections, although we can't set the value until
- afterward. */
- if (! link_info.relocatable)
- {
- hdyn = bfd_link_hash_lookup (link_info.hash, "__DYNAMIC", TRUE, FALSE,
- FALSE);
- if (hdyn == NULL)
- einfo ("%P%F: bfd_link_hash_lookup: %E\n");
- if (! bfd_sunos_record_link_assignment (output_bfd, &link_info,
- "__DYNAMIC"))
- einfo ("%P%F: failed to record assignment to __DYNAMIC: %E\n");
- }
-
- /* If we are going to make any variable assignments, we need to let
- the backend linker know about them in case the variables are
- referred to by dynamic objects. */
- lang_for_each_statement (gld${EMULATION_NAME}_find_assignment);
-
- /* Let the backend linker work out the sizes of any sections
- required by dynamic linking. */
- if (! bfd_sunos_size_dynamic_sections (output_bfd, &link_info, &sdyn,
- &sneed, &srules))
- einfo ("%P%F: failed to set dynamic section sizes: %E\n");
-
- if (sneed != NULL)
- {
- /* Set up the .need section. See the description of the ld_need
- field in include/aout/sun4.h. */
-
- need_entries = 0;
- need_size = 0;
-
- lang_for_each_input_file (gld${EMULATION_NAME}_count_need);
-
- /* We should only have a .need section if we have at least one
- dynamic object. */
- ASSERT (need_entries != 0);
-
- sneed->_raw_size = need_size;
- sneed->contents = (bfd_byte *) xmalloc (need_size);
-
- need_contents = sneed->contents;
- need_pinfo = sneed->contents;
- need_pnames = sneed->contents + need_entries * 16;
-
- lang_for_each_input_file (gld${EMULATION_NAME}_set_need);
-
- ASSERT ((bfd_size_type) (need_pnames - sneed->contents) == need_size);
- }
-
- if (srules != NULL)
- {
- /* Set up the .rules section. This is just a PATH like string
- of the -L arguments given on the command line. We permit the
- user to specify the directories using the -rpath command line
- option. */
- if (command_line.rpath)
- {
- srules->_raw_size = strlen (command_line.rpath);
- srules->contents = (bfd_byte *) command_line.rpath;
- }
- else
- {
- unsigned int size;
- search_dirs_type *search;
-
- size = 0;
- for (search = search_head; search != NULL; search = search->next)
- if (search->cmdline)
- size += strlen (search->name) + 1;
- srules->_raw_size = size;
- if (size > 0)
- {
- char *p;
-
- srules->contents = (bfd_byte *) xmalloc (size);
- p = (char *) srules->contents;
- *p = '\0';
- for (search = search_head; search != NULL; search = search->next)
- {
- if (search->cmdline)
- {
- if (p != (char *) srules->contents)
- *p++ = ':';
- strcpy (p, search->name);
- p += strlen (p);
- }
- }
- }
- }
- }
-
- /* We must assign a value to __DYNAMIC. It should be zero if we are
- not doing a dynamic link, or the start of the .dynamic section if
- we are doing one. */
- if (! link_info.relocatable)
- {
- hdyn->type = bfd_link_hash_defined;
- hdyn->u.def.value = 0;
- if (sdyn != NULL)
- hdyn->u.def.section = sdyn;
- else
- hdyn->u.def.section = bfd_abs_section_ptr;
- }
-}
-
-/* This is called by the before_allocation routine via
- lang_for_each_statement. It does one of two things: if the
- variable find_assign is set, it sets found_assign if it finds an
- assignment to that variable; otherwise it tells the backend linker
- about all assignment statements, in case they are assignments to
- symbols which are referred to by dynamic objects. */
-
-static void
-gld${EMULATION_NAME}_find_assignment (lang_statement_union_type *s)
-{
- if (s->header.type == lang_assignment_statement_enum
- && (find_assign == NULL || ! found_assign))
- gld${EMULATION_NAME}_find_exp_assignment (s->assignment_statement.exp);
-}
-
-/* Look through an expression for an assignment statement. */
-
-static void
-gld${EMULATION_NAME}_find_exp_assignment (etree_type *exp)
-{
- switch (exp->type.node_class)
- {
- case etree_assign:
- if (find_assign != NULL)
- {
- if (strcmp (find_assign, exp->assign.dst) == 0)
- found_assign = TRUE;
- return;
- }
-
- if (strcmp (exp->assign.dst, ".") != 0)
- {
- if (! bfd_sunos_record_link_assignment (output_bfd, &link_info,
- exp->assign.dst))
- einfo ("%P%F: failed to record assignment to %s: %E\n",
- exp->assign.dst);
- }
- gld${EMULATION_NAME}_find_exp_assignment (exp->assign.src);
- break;
-
- case etree_binary:
- gld${EMULATION_NAME}_find_exp_assignment (exp->binary.lhs);
- gld${EMULATION_NAME}_find_exp_assignment (exp->binary.rhs);
- break;
-
- case etree_trinary:
- gld${EMULATION_NAME}_find_exp_assignment (exp->trinary.cond);
- gld${EMULATION_NAME}_find_exp_assignment (exp->trinary.lhs);
- gld${EMULATION_NAME}_find_exp_assignment (exp->trinary.rhs);
- break;
-
- case etree_unary:
- gld${EMULATION_NAME}_find_exp_assignment (exp->unary.child);
- break;
-
- default:
- break;
- }
-}
-
-/* Work out the size of the .need section, and the number of entries.
- The backend will set the ld_need field of the dynamic linking
- information to point to the .need section. See include/aout/sun4.h
- for more information. */
-
-static void
-gld${EMULATION_NAME}_count_need (lang_input_statement_type *inp)
-{
- if (inp->the_bfd != NULL
- && (inp->the_bfd->flags & DYNAMIC) != 0)
- {
- ++need_entries;
- need_size += NEED_ENTRY_SIZE;
- if (! inp->is_archive)
- need_size += strlen (inp->filename) + 1;
- else
- {
- ASSERT (inp->local_sym_name[0] == '-'
- && inp->local_sym_name[1] == 'l');
- need_size += strlen (inp->local_sym_name + 2) + 1;
- }
- }
-}
-
-/* Fill in the contents of the .need section. */
-
-static void
-gld${EMULATION_NAME}_set_need (lang_input_statement_type *inp)
-{
- if (inp->the_bfd != NULL
- && (inp->the_bfd->flags & DYNAMIC) != 0)
- {
- bfd_size_type c;
-
- /* To really fill in the .need section contents, we need to know
- the final file position of the section, but we don't.
- Instead, we use offsets, and rely on the BFD backend to
- finish the section up correctly. FIXME: Talk about lack of
- referential locality. */
- bfd_put_32 (output_bfd, need_pnames - need_contents, need_pinfo);
- if (! inp->is_archive)
- {
- 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);
- }
- else
- {
- char *verstr;
- int maj, min;
-
- bfd_put_32 (output_bfd, (bfd_vma) 0x80000000, need_pinfo + 4);
- maj = 0;
- min = 0;
- verstr = strstr (inp->filename, ".so.");
- if (verstr != NULL)
- 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);
- }
-
- c = (need_pinfo - need_contents) / NEED_ENTRY_SIZE;
- if (c + 1 >= need_entries)
- bfd_put_32 (output_bfd, (bfd_vma) 0, need_pinfo + 12);
- else
- bfd_put_32 (output_bfd, (bfd_vma) (c + 1) * NEED_ENTRY_SIZE,
- need_pinfo + 12);
-
- need_pinfo += NEED_ENTRY_SIZE;
- need_pnames += strlen (need_pnames) + 1;
- }
-}
-
-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 */
- gld${EMULATION_NAME}_create_output_section_statements,
- NULL, /* open dynamic archive */
- NULL, /* place orphan */
- gld${EMULATION_NAME}_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/ticoff.em b/contrib/binutils/ld/emultempl/ticoff.em
deleted file mode 100644
index 8f86b04..0000000
--- a/contrib/binutils/ld/emultempl/ticoff.em
+++ /dev/null
@@ -1,182 +0,0 @@
-# This shell script emits a C file. -*- C -*-
-# It does some substitutions.
-(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.
-
-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. */
-
-/* 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 "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 int coff_version;
-
-/* TI COFF extra command line options */
-#define OPTION_COFF_FORMAT (300 + 1)
-
-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[] = {
- /* TI COFF options */
- {"format", required_argument, NULL, OPTION_COFF_FORMAT },
- {NULL, no_argument, NULL, 0}
- };
-
- *longopts = (struct option *)
- xrealloc (*longopts, nl * sizeof (struct option) + sizeof (xtra_long));
- memcpy (*longopts + nl, &xtra_long, sizeof (xtra_long));
-}
-
-static void
-gld_${EMULATION_NAME}_list_options (FILE * file)
-{
- fprintf (file, _(" --format 0|1|2 Specify which COFF version to use\n"));
-}
-
-static bfd_boolean
-gld${EMULATION_NAME}_handle_option (int optc)
-{
- switch (optc)
- {
- default:
- return FALSE;
-
- case OPTION_COFF_FORMAT:
- if ((*optarg == '0' || *optarg == '1' || *optarg == '2')
- && optarg[1] == '\0')
- {
- static char buf[] = "coffX-${OUTPUT_FORMAT_TEMPLATE}";
- coff_version = *optarg - '0';
- buf[4] = *optarg;
- lang_add_output_format (buf, NULL, NULL, 0);
- }
- else
- {
- einfo (_("%P%F: invalid COFF format version %s\n"), optarg);
- }
- break;
- }
- return FALSE;
-}
-
-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_ */
-}
-
-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='s/["\\]/\\&/g
-s/$/\\n\\/
-1s/^/"/
-$s/$/n"/
-'
-cat >>e${EMULATION_NAME}.c <<EOF
-{
- *isfile = 0;
- if (link_info.relocatable && config.build_constructors)
- return `sed "$sc" ldscripts/${EMULATION_NAME}.xu`;
- else if (link_info.relocatable)
- return `sed "$sc" ldscripts/${EMULATION_NAME}.xr`;
- else if (!config.text_read_only)
- return `sed "$sc" ldscripts/${EMULATION_NAME}.xbn`;
- else if (!config.magic_demand_paged)
- return `sed "$sc" ldscripts/${EMULATION_NAME}.xn`;
- else
- return `sed "$sc" ldscripts/${EMULATION_NAME}.x`;
-}
-EOF
-
-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,
- after_open_default,
- after_allocation_default,
- 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 */
- gld${EMULATION_NAME}_add_options,
- gld${EMULATION_NAME}_handle_option,
- NULL, /* unrecognized_file */
- gld_${EMULATION_NAME}_list_options,
- NULL, /* recognized file */
- NULL, /* find_potential_libraries */
- NULL /* new_vers_pattern */
-};
-EOF
diff --git a/contrib/binutils/ld/emultempl/vanilla.em b/contrib/binutils/ld/emultempl/vanilla.em
deleted file mode 100644
index 2141083..0000000
--- a/contrib/binutils/ld/emultempl/vanilla.em
+++ /dev/null
@@ -1,85 +0,0 @@
-# This shell script emits a C file. -*- C -*-
-# It does some substitutions.
-cat >e${EMULATION_NAME}.c <<EOF
-/* A vanilla emulation with no defaults
- Copyright 1991, 1992, 1994, 2000, 2001, 2002, 2003
- 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. */
-
-#include "bfd.h"
-#include "sysdep.h"
-
-
-#include "ld.h"
-#include "ldmisc.h"
-#include "ldmain.h"
-
-#include "ldexp.h"
-#include "ldlang.h"
-#include "ldfile.h"
-#include "ldemul.h"
-
-static void vanilla_before_parse (void)
-{
-}
-
-static void
-vanilla_set_output_arch (void)
-{
- /* Set the output architecture and machine if possible */
- unsigned long machine = 0;
- bfd_set_arch_mach(output_bfd, ldfile_output_architecture, machine);
-}
-
-static char *
-vanilla_get_script (int *isfile)
-{
- *isfile = 0;
- return "";
-}
-
-struct ld_emulation_xfer_struct ld_vanilla_emulation =
-{
- vanilla_before_parse,
- syslib_default,
- hll_default,
- after_parse_default,
- after_open_default,
- after_allocation_default,
- vanilla_set_output_arch,
- ldemul_default_target,
- before_allocation_default,
- vanilla_get_script,
- "vanilla",
- "a.out-sunos-big",
- 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/fdl.texi b/contrib/binutils/ld/fdl.texi
deleted file mode 100644
index c6409a3..0000000
--- a/contrib/binutils/ld/fdl.texi
+++ /dev/null
@@ -1,367 +0,0 @@
-@c -*-texinfo-*-
-@node GNU Free Documentation License
-@appendix GNU Free Documentation License
-@center Version 1.1, March 2000
-
-@display
-Copyright (C) 2000, Free Software Foundation, Inc.
-59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
-
-Everyone is permitted to copy and distribute verbatim copies
-of this license document, but changing it is not allowed.
-@end display
-@sp 1
-@enumerate 0
-@item
-PREAMBLE
-
-The purpose of this License is to make a manual, textbook, or other
-written document ``free'' in the sense of freedom: to assure everyone
-the effective freedom to copy and redistribute it, with or without
-modifying it, either commercially or noncommercially. Secondarily,
-this License preserves for the author and publisher a way to get
-credit for their work, while not being considered responsible for
-modifications made by others.
-
-This License is a kind of ``copyleft'', which means that derivative
-works of the document must themselves be free in the same sense. It
-complements the GNU General Public License, which is a copyleft
-license designed for free software.
-
-We have designed this License in order to use it for manuals for free
-software, because free software needs free documentation: a free
-program should come with manuals providing the same freedoms that the
-software does. But this License is not limited to software manuals;
-it can be used for any textual work, regardless of subject matter or
-whether it is published as a printed book. We recommend this License
-principally for works whose purpose is instruction or reference.
-
-@sp 1
-@item
-APPLICABILITY AND DEFINITIONS
-
-This License applies to any manual or other work that contains a
-notice placed by the copyright holder saying it can be distributed
-under the terms of this License. The ``Document'', below, refers to any
-such manual or work. Any member of the public is a licensee, and is
-addressed as ``you.''
-
-A ``Modified Version'' of the Document means any work containing the
-Document or a portion of it, either copied verbatim, or with
-modifications and/or translated into another language.
-
-A ``Secondary Section'' is a named appendix or a front-matter section of
-the Document that deals exclusively with the relationship of the
-publishers or authors of the Document to the Document's overall subject
-(or to related matters) and contains nothing that could fall directly
-within that overall subject. (For example, if the Document is in part a
-textbook of mathematics, a Secondary Section may not explain any
-mathematics.) The relationship could be a matter of historical
-connection with the subject or with related matters, or of legal,
-commercial, philosophical, ethical or political position regarding
-them.
-
-The ``Invariant Sections'' are certain Secondary Sections whose titles
-are designated, as being those of Invariant Sections, in the notice
-that says that the Document is released under this License.
-
-The ``Cover Texts'' are certain short passages of text that are listed,
-as Front-Cover Texts or Back-Cover Texts, in the notice that says that
-the Document is released under this License.
-
-A ``Transparent'' copy of the Document means a machine-readable copy,
-represented in a format whose specification is available to the
-general public, whose contents can be viewed and edited directly and
-straightforwardly with generic text editors or (for images composed of
-pixels) generic paint programs or (for drawings) some widely available
-drawing editor, and that is suitable for input to text formatters or
-for automatic translation to a variety of formats suitable for input
-to text formatters. A copy made in an otherwise Transparent file
-format whose markup has been designed to thwart or discourage
-subsequent modification by readers is not Transparent. A copy that is
-not ``Transparent'' is called ``Opaque.''
-
-Examples of suitable formats for Transparent copies include plain
-ASCII without markup, Texinfo input format, LaTeX input format, SGML
-or XML using a publicly available DTD, and standard-conforming simple
-HTML designed for human modification. Opaque formats include
-PostScript, PDF, proprietary formats that can be read and edited only
-by proprietary word processors, SGML or XML for which the DTD and/or
-processing tools are not generally available, and the
-machine-generated HTML produced by some word processors for output
-purposes only.
-
-The ``Title Page'' means, for a printed book, the title page itself,
-plus such following pages as are needed to hold, legibly, the material
-this License requires to appear in the title page. For works in
-formats which do not have any title page as such, ``Title Page'' means
-the text near the most prominent appearance of the work's title,
-preceding the beginning of the body of the text.
-@sp 1
-@item
-VERBATIM COPYING
-
-You may copy and distribute the Document in any medium, either
-commercially or noncommercially, provided that this License, the
-copyright notices, and the license notice saying this License applies
-to the Document are reproduced in all copies, and that you add no other
-conditions whatsoever to those of this License. You may not use
-technical measures to obstruct or control the reading or further
-copying of the copies you make or distribute. However, you may accept
-compensation in exchange for copies. If you distribute a large enough
-number of copies you must also follow the conditions in section 3.
-
-You may also lend copies, under the same conditions stated above, and
-you may publicly display copies.
-@sp 1
-@item
-COPYING IN QUANTITY
-
-If you publish printed copies of the Document numbering more than 100,
-and the Document's license notice requires Cover Texts, you must enclose
-the copies in covers that carry, clearly and legibly, all these Cover
-Texts: Front-Cover Texts on the front cover, and Back-Cover Texts on
-the back cover. Both covers must also clearly and legibly identify
-you as the publisher of these copies. The front cover must present
-the full title with all words of the title equally prominent and
-visible. You may add other material on the covers in addition.
-Copying with changes limited to the covers, as long as they preserve
-the title of the Document and satisfy these conditions, can be treated
-as verbatim copying in other respects.
-
-If the required texts for either cover are too voluminous to fit
-legibly, you should put the first ones listed (as many as fit
-reasonably) on the actual cover, and continue the rest onto adjacent
-pages.
-
-If you publish or distribute Opaque copies of the Document numbering
-more than 100, you must either include a machine-readable Transparent
-copy along with each Opaque copy, or state in or with each Opaque copy
-a publicly-accessible computer-network location containing a complete
-Transparent copy of the Document, free of added material, which the
-general network-using public has access to download anonymously at no
-charge using public-standard network protocols. If you use the latter
-option, you must take reasonably prudent steps, when you begin
-distribution of Opaque copies in quantity, to ensure that this
-Transparent copy will remain thus accessible at the stated location
-until at least one year after the last time you distribute an Opaque
-copy (directly or through your agents or retailers) of that edition to
-the public.
-
-It is requested, but not required, that you contact the authors of the
-Document well before redistributing any large number of copies, to give
-them a chance to provide you with an updated version of the Document.
-@sp 1
-@item
-MODIFICATIONS
-
-You may copy and distribute a Modified Version of the Document under
-the conditions of sections 2 and 3 above, provided that you release
-the Modified Version under precisely this License, with the Modified
-Version filling the role of the Document, thus licensing distribution
-and modification of the Modified Version to whoever possesses a copy
-of it. In addition, you must do these things in the Modified Version:
-
-A. Use in the Title Page (and on the covers, if any) a title distinct
- from that of the Document, and from those of previous versions
- (which should, if there were any, be listed in the History section
- of the Document). You may use the same title as a previous version
- if the original publisher of that version gives permission.@*
-B. List on the Title Page, as authors, one or more persons or entities
- responsible for authorship of the modifications in the Modified
- Version, together with at least five of the principal authors of the
- Document (all of its principal authors, if it has less than five).@*
-C. State on the Title page the name of the publisher of the
- Modified Version, as the publisher.@*
-D. Preserve all the copyright notices of the Document.@*
-E. Add an appropriate copyright notice for your modifications
- adjacent to the other copyright notices.@*
-F. Include, immediately after the copyright notices, a license notice
- giving the public permission to use the Modified Version under the
- terms of this License, in the form shown in the Addendum below.@*
-G. Preserve in that license notice the full lists of Invariant Sections
- and required Cover Texts given in the Document's license notice.@*
-H. Include an unaltered copy of this License.@*
-I. Preserve the section entitled ``History'', and its title, and add to
- it an item stating at least the title, year, new authors, and
- publisher of the Modified Version as given on the Title Page. If
- there is no section entitled ``History'' in the Document, create one
- stating the title, year, authors, and publisher of the Document as
- given on its Title Page, then add an item describing the Modified
- Version as stated in the previous sentence.@*
-J. Preserve the network location, if any, given in the Document for
- public access to a Transparent copy of the Document, and likewise
- the network locations given in the Document for previous versions
- it was based on. These may be placed in the ``History'' section.
- You may omit a network location for a work that was published at
- least four years before the Document itself, or if the original
- publisher of the version it refers to gives permission.@*
-K. In any section entitled ``Acknowledgements'' or ``Dedications'',
- preserve the section's title, and preserve in the section all the
- substance and tone of each of the contributor acknowledgements
- and/or dedications given therein.@*
-L. Preserve all the Invariant Sections of the Document,
- unaltered in their text and in their titles. Section numbers
- or the equivalent are not considered part of the section titles.@*
-M. Delete any section entitled ``Endorsements.'' Such a section
- may not be included in the Modified Version.@*
-N. Do not retitle any existing section as ``Endorsements''
- or to conflict in title with any Invariant Section.@*
-@sp 1
-If the Modified Version includes new front-matter sections or
-appendices that qualify as Secondary Sections and contain no material
-copied from the Document, you may at your option designate some or all
-of these sections as invariant. To do this, add their titles to the
-list of Invariant Sections in the Modified Version's license notice.
-These titles must be distinct from any other section titles.
-
-You may add a section entitled ``Endorsements'', provided it contains
-nothing but endorsements of your Modified Version by various
-parties--for example, statements of peer review or that the text has
-been approved by an organization as the authoritative definition of a
-standard.
-
-You may add a passage of up to five words as a Front-Cover Text, and a
-passage of up to 25 words as a Back-Cover Text, to the end of the list
-of Cover Texts in the Modified Version. Only one passage of
-Front-Cover Text and one of Back-Cover Text may be added by (or
-through arrangements made by) any one entity. If the Document already
-includes a cover text for the same cover, previously added by you or
-by arrangement made by the same entity you are acting on behalf of,
-you may not add another; but you may replace the old one, on explicit
-permission from the previous publisher that added the old one.
-
-The author(s) and publisher(s) of the Document do not by this License
-give permission to use their names for publicity for or to assert or
-imply endorsement of any Modified Version.
-@sp 1
-@item
-COMBINING DOCUMENTS
-
-You may combine the Document with other documents released under this
-License, under the terms defined in section 4 above for modified
-versions, provided that you include in the combination all of the
-Invariant Sections of all of the original documents, unmodified, and
-list them all as Invariant Sections of your combined work in its
-license notice.
-
-The combined work need only contain one copy of this License, and
-multiple identical Invariant Sections may be replaced with a single
-copy. If there are multiple Invariant Sections with the same name but
-different contents, make the title of each such section unique by
-adding at the end of it, in parentheses, the name of the original
-author or publisher of that section if known, or else a unique number.
-Make the same adjustment to the section titles in the list of
-Invariant Sections in the license notice of the combined work.
-
-In the combination, you must combine any sections entitled ``History''
-in the various original documents, forming one section entitled
-``History''; likewise combine any sections entitled ``Acknowledgements'',
-and any sections entitled ``Dedications.'' You must delete all sections
-entitled ``Endorsements.''
-@sp 1
-@item
-COLLECTIONS OF DOCUMENTS
-
-You may make a collection consisting of the Document and other documents
-released under this License, and replace the individual copies of this
-License in the various documents with a single copy that is included in
-the collection, provided that you follow the rules of this License for
-verbatim copying of each of the documents in all other respects.
-
-You may extract a single document from such a collection, and distribute
-it individually under this License, provided you insert a copy of this
-License into the extracted document, and follow this License in all
-other respects regarding verbatim copying of that document.
-@sp 1
-@item
-AGGREGATION WITH INDEPENDENT WORKS
-
-A compilation of the Document or its derivatives with other separate
-and independent documents or works, in or on a volume of a storage or
-distribution medium, does not as a whole count as a Modified Version
-of the Document, provided no compilation copyright is claimed for the
-compilation. Such a compilation is called an ``aggregate'', and this
-License does not apply to the other self-contained works thus compiled
-with the Document, on account of their being thus compiled, if they
-are not themselves derivative works of the Document.
-
-If the Cover Text requirement of section 3 is applicable to these
-copies of the Document, then if the Document is less than one quarter
-of the entire aggregate, the Document's Cover Texts may be placed on
-covers that surround only the Document within the aggregate.
-Otherwise they must appear on covers around the whole aggregate.
-@sp 1
-@item
-TRANSLATION
-
-Translation is considered a kind of modification, so you may
-distribute translations of the Document under the terms of section 4.
-Replacing Invariant Sections with translations requires special
-permission from their copyright holders, but you may include
-translations of some or all Invariant Sections in addition to the
-original versions of these Invariant Sections. You may include a
-translation of this License provided that you also include the
-original English version of this License. In case of a disagreement
-between the translation and the original English version of this
-License, the original English version will prevail.
-@sp 1
-@item
-TERMINATION
-
-You may not copy, modify, sublicense, or distribute the Document except
-as expressly provided for under this License. Any other attempt to
-copy, modify, sublicense or distribute the Document is void, and will
-automatically terminate your rights under this License. However,
-parties who have received copies, or rights, from you under this
-License will not have their licenses terminated so long as such
-parties remain in full compliance.
-@sp 1
-@item
-FUTURE REVISIONS OF THIS LICENSE
-
-The Free Software Foundation may publish new, revised versions
-of the GNU Free Documentation License from time to time. Such new
-versions will be similar in spirit to the present version, but may
-differ in detail to address new problems or concerns. See
-http://www.gnu.org/copyleft/.
-
-Each version of the License is given a distinguishing version number.
-If the Document specifies that a particular numbered version of this
-License ``or any later version'' applies to it, you have the option of
-following the terms and conditions either of that specified version or
-of any later version that has been published (not as a draft) by the
-Free Software Foundation. If the Document does not specify a version
-number of this License, you may choose any version ever published (not
-as a draft) by the Free Software Foundation.
-
-@end enumerate
-
-@unnumberedsec ADDENDUM: How to use this License for your documents
-
-To use this License in a document you have written, include a copy of
-the License in the document and put the following copyright and
-license notices just after the title page:
-
-@smallexample
-@group
-Copyright (C) @var{year} @var{your name}.
-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 @var{list their titles}, with the
-Front-Cover Texts being @var{list}, and with the Back-Cover Texts being @var{list}.
-A copy of the license is included in the section entitled "GNU
-Free Documentation License."
-@end group
-@end smallexample
-
-If you have no Invariant Sections, write ``with no Invariant Sections''
-instead of saying which ones are invariant. If you have no
-Front-Cover Texts, write ``no Front-Cover Texts'' instead of
-``Front-Cover Texts being @var{list}''; likewise for Back-Cover Texts.
-
-If your document contains nontrivial examples of program code, we
-recommend releasing these examples in parallel under your choice of
-free software license, such as the GNU General Public License,
-to permit their use in free software.
diff --git a/contrib/binutils/ld/gen-doc.texi b/contrib/binutils/ld/gen-doc.texi
deleted file mode 100644
index 5add195..0000000
--- a/contrib/binutils/ld/gen-doc.texi
+++ /dev/null
@@ -1,20 +0,0 @@
-@c ------------------------------ CONFIGURATION VARS:
-@c 1. Inclusiveness of this manual
-@set GENERIC
-
-@c 2. Specific target machines
-@set H8300
-@set I960
-@set ARM
-@set HPPA
-@set MMIX
-@set MSP430
-@set TICOFF
-@set WIN32
-@set XTENSA
-
-@c 3. Properties of this configuration
-@clear SingleFormat
-@set UsesEnvVars
-@c ------------------------------ end CONFIGURATION VARS
-
diff --git a/contrib/binutils/ld/genscripts.sh b/contrib/binutils/ld/genscripts.sh
deleted file mode 100755
index 0168203..0000000
--- a/contrib/binutils/ld/genscripts.sh
+++ /dev/null
@@ -1,342 +0,0 @@
-#!/bin/sh
-# genscripts.sh - generate the ld-emulation-target specific files
-#
-# Usage: genscripts_extra.sh \
-# srcdir \
-# libdir \
-# exec_prefix \
-# host \
-# target \
-# target_alias \
-# default_emulation \
-# native_lib_dirs \
-# use_sysroot \
-# this_emulation \
-# optional:
-# tool_dir \
-# customizer_script
-#
-# Sample usage:
-#
-# genscripts_extra.sh \
-# /sources/ld \
-# /usr/local/lib \
-# /usr/local \
-# sparc-sun-sunos4.1.3 \
-# sparc-sun-sunos4.1.3 \
-# sparc-sun-sunos4.1.3 \
-# sun4 \
-# "" \
-# no \
-# sun3 \
-# sparc-sun-sunos4.1.3 \
-# sparc.sh
-#
-# produces the linker scripts:
-#
-# sun3.x [default linker script]
-# sun3.xbn [used when the linker is invoked with "-N"]
-# sun3.xn [used when the linker is invoked with "-n"]
-# sun3.xr [used when the linker is invoked with "-r"]
-# sun3.xu [used when the linker is invoked with "-Ur"]
-# and maybe:
-# sun3.xc [used when the linker is invoked with "-z combreloc"]
-# sun3.xsc [used when the linker is invoked with "--shared"]
-# sun3.xdc [used when the linker is invoked with "-pie"]
-#
-# It also produced the C source file:
-#
-# em_sun3.c
-#
-# which is then compiled into the linker.
-#
-# The linker scripts are created by running the shell script
-# /sources/ld/emulparams/sparc.sh to set the value of ${SCRIPT_NAME}
-# (and any other variables it wants to). ${SCRIPT_NAME} is then
-# invoked with a variable called ${LD_FLAG} to tell it which version
-# of the linker script to create.
-
-
-srcdir=$1
-libdir=$2
-exec_prefix=$3
-host=$4
-target=$5
-target_alias=$6
-EMULATION_LIBPATH=$7
-NATIVE_LIB_DIRS=$8
-use_sysroot=$9
-shift 9
-EMULATION_NAME=$1
-TOOL_LIB=$2
-CUSTOMIZER_SCRIPT=$3
-
-# Can't use ${TOOL_LIB:-$target_alias} here due to an Ultrix shell bug.
-if [ "x${TOOL_LIB}" = "x" ] ; then
- tool_lib=${exec_prefix}/${target_alias}/lib
-else
- tool_lib=${exec_prefix}/${TOOL_LIB}/lib
-fi
-
-if [ "x${CUSTOMIZER_SCRIPT}" = "x" ] ; then
- CUSTOMIZER_SCRIPT=${EMULATION_NAME}
-fi
-CUSTOMIZER_SCRIPT="${srcdir}/emulparams/${CUSTOMIZER_SCRIPT}.sh"
-
-# Include the emulation-specific parameters:
-. ${CUSTOMIZER_SCRIPT} ${EMULATION_NAME}
-
-if test -d ldscripts; then
- true
-else
- mkdir ldscripts
-fi
-
-# Set some flags for the emultempl scripts. USE_LIBPATH will
-# be set for any libpath-using emulation; NATIVE will be set for a
-# libpath-using emulation where ${host} = ${target}. NATIVE
-# may already have been set by the emulparams file, but that's OK
-# (it'll just get set to "yes" twice).
-
-case " $EMULATION_LIBPATH " in
- *" ${EMULATION_NAME} "*)
- if [ "x${host}" = "x${target}" ] ; then
- NATIVE=yes
- USE_LIBPATH=yes
- elif [ "x${use_sysroot}" = "xyes" ] ; then
- USE_LIBPATH=yes
- fi
- ;;
-esac
-
-# If the emulparams file sets NATIVE, make sure USE_LIBPATH is set also.
-if test "x$NATIVE" = "xyes" ; then
- USE_LIBPATH=yes
-fi
-
-# Set the library search path, for libraries named by -lfoo.
-# If LIB_PATH is defined (e.g., by Makefile) and non-empty, it is used.
-# Otherwise, the default is set here.
-#
-# The format is the usual list of colon-separated directories.
-# To force a logically empty LIB_PATH, do LIBPATH=":".
-#
-# If we are using a sysroot, prefix library paths with "=" to indicate this.
-#
-# If the emulparams file set LIBPATH_SUFFIX, prepend an extra copy of
-# the library path with the suffix applied.
-
-if [ "x${LIB_PATH}" = "x" ] && [ "x${USE_LIBPATH}" = xyes ] ; then
- LIB_PATH2=
-
- libs=${NATIVE_LIB_DIRS}
- if [ "x${use_sysroot}" != "xyes" ] ; then
- case " ${libs} " in
- *" ${libdir} "*) ;;
- *) libs="${libdir} ${libs}" ;;
- esac
- case " ${libs} " in
- *" ${tool_lib} "*) ;;
- *) libs="${tool_lib} ${libs}" ;;
- esac
- fi
-
- for lib in ${libs}; do
- # The "=" is harmless if we aren't using a sysroot, but also needless.
- if [ "x${use_sysroot}" = "xyes" ] ; then
- lib="=${lib}"
- fi
- addsuffix=
- case "${LIBPATH_SUFFIX}:${lib}" in
- :*) ;;
- *:*${LIBPATH_SUFFIX}) ;;
- *) addsuffix=yes ;;
- esac
- if test -n "$addsuffix"; then
- case :${LIB_PATH}: in
- *:${lib}${LIBPATH_SUFFIX}:*) ;;
- ::) LIB_PATH=${lib}${LIBPATH_SUFFIX} ;;
- *) LIB_PATH=${LIB_PATH}:${lib}${LIBPATH_SUFFIX} ;;
- esac
- case :${LIB_PATH}:${LIB_PATH2}: in
- *:${lib}:*) ;;
- *::) LIB_PATH2=${lib} ;;
- *) LIB_PATH2=${LIB_PATH2}:${lib} ;;
- esac
- else
- case :${LIB_PATH2}: in
- *:${lib}:*) ;;
- ::) LIB_PATH2=${lib} ;;
- *) LIB_PATH2=${LIB_PATH2}:${lib} ;;
- esac
- fi
- done
-
- case :${LIB_PATH}:${LIB_PATH2}: in
- *:: | ::*) LIB_PATH=${LIB_PATH}${LIB_PATH2} ;;
- *) LIB_PATH=${LIB_PATH}:${LIB_PATH2} ;;
- esac
-fi
-
-# Always search $(tooldir)/lib, aka /usr/local/TARGET/lib, except for
-# sysrooted configurations and when LIBPATH=":".
-if [ "x${use_sysroot}" != "xyes" ] ; then
- case :${LIB_PATH}: in
- ::: | *:${tool_lib}:*) ;;
- ::) LIB_PATH=${tool_lib} ;;
- *) LIB_PATH=${tool_lib}:${LIB_PATH} ;;
- esac
-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} "*)
- test -d tmpdir || mkdir tmpdir
- test -f tmpdir/libpath.exp || \
- echo "set libpath \"${LIB_PATH}\"" | sed -e 's/:/ /g' > tmpdir/libpath.exp
- ;;
-esac
-
-# Generate 5 or 6 script files from a master script template in
-# ${srcdir}/scripttempl/${SCRIPT_NAME}.sh. Which one of the 5 or 6
-# script files is actually used depends on command line options given
-# to ld. (SCRIPT_NAME was set in the emulparams_file.)
-#
-# A .x script file is the default script.
-# A .xr script is for linking without relocation (-r flag).
-# A .xu script is like .xr, but *do* create constructors (-Ur flag).
-# A .xn script is for linking with -n flag (mix text and data on same page).
-# A .xbn script is for linking with -N flag (mix text and data on same page).
-# A .xs script is for generating a shared library with the --shared
-# flag; it is only generated if $GENERATE_SHLIB_SCRIPT is set by the
-# emulation parameters.
-# A .xc script is for linking with -z combreloc; it is only generated if
-# $GENERATE_COMBRELOC_SCRIPT is set by the emulation parameters or
-# $SCRIPT_NAME is "elf".
-# A .xsc script is for linking with --shared -z combreloc; it is generated
-# if $GENERATE_COMBRELOC_SCRIPT is set by the emulation parameters or
-# $SCRIPT_NAME is "elf" and $GENERATE_SHLIB_SCRIPT is set by the emulation
-# parameters too.
-
-if [ "x$SCRIPT_NAME" = "xelf" ]; then
- GENERATE_COMBRELOC_SCRIPT=yes
-fi
-
-SEGMENT_SIZE=${SEGMENT_SIZE-${MAXPAGESIZE-${TARGET_PAGE_SIZE}}}
-
-# Determine DATA_ALIGNMENT for the 5 variants, using
-# values specified in the emulparams/<script_to_run>.sh file or default.
-
-DATA_ALIGNMENT_="${DATA_ALIGNMENT_-${DATA_ALIGNMENT-ALIGN(${SEGMENT_SIZE})}}"
-DATA_ALIGNMENT_n="${DATA_ALIGNMENT_n-${DATA_ALIGNMENT_}}"
-DATA_ALIGNMENT_N="${DATA_ALIGNMENT_N-${DATA_ALIGNMENT-.}}"
-DATA_ALIGNMENT_r="${DATA_ALIGNMENT_r-${DATA_ALIGNMENT-}}"
-DATA_ALIGNMENT_u="${DATA_ALIGNMENT_u-${DATA_ALIGNMENT_r}}"
-
-LD_FLAG=r
-DATA_ALIGNMENT=${DATA_ALIGNMENT_r}
-DEFAULT_DATA_ALIGNMENT="ALIGN(${SEGMENT_SIZE})"
-( echo "/* Script for ld -r: link without relocation */"
- . ${CUSTOMIZER_SCRIPT} ${EMULATION_NAME}
- . ${srcdir}/scripttempl/${SCRIPT_NAME}.sc
-) | sed -e '/^ *$/d;s/[ ]*$//' > ldscripts/${EMULATION_NAME}.xr
-
-LD_FLAG=u
-DATA_ALIGNMENT=${DATA_ALIGNMENT_u}
-CONSTRUCTING=" "
-( echo "/* Script for ld -Ur: link w/out relocation, do create constructors */"
- . ${CUSTOMIZER_SCRIPT} ${EMULATION_NAME}
- . ${srcdir}/scripttempl/${SCRIPT_NAME}.sc
-) | sed -e '/^ *$/d;s/[ ]*$//' > ldscripts/${EMULATION_NAME}.xu
-
-LD_FLAG=
-DATA_ALIGNMENT=${DATA_ALIGNMENT_}
-RELOCATING=" "
-( echo "/* Default linker script, for normal executables */"
- . ${CUSTOMIZER_SCRIPT} ${EMULATION_NAME}
- . ${srcdir}/scripttempl/${SCRIPT_NAME}.sc
-) | sed -e '/^ *$/d;s/[ ]*$//' > ldscripts/${EMULATION_NAME}.x
-
-LD_FLAG=n
-DATA_ALIGNMENT=${DATA_ALIGNMENT_n}
-TEXT_START_ADDR=${NONPAGED_TEXT_START_ADDR-${TEXT_START_ADDR}}
-( echo "/* Script for -n: mix text and data on same page */"
- . ${CUSTOMIZER_SCRIPT} ${EMULATION_NAME}
- . ${srcdir}/scripttempl/${SCRIPT_NAME}.sc
-) | sed -e '/^ *$/d;s/[ ]*$//' > ldscripts/${EMULATION_NAME}.xn
-
-LD_FLAG=N
-DATA_ALIGNMENT=${DATA_ALIGNMENT_N}
-( echo "/* Script for -N: mix text and data on same page; don't align data */"
- . ${CUSTOMIZER_SCRIPT} ${EMULATION_NAME}
- . ${srcdir}/scripttempl/${SCRIPT_NAME}.sc
-) | sed -e '/^ *$/d;s/[ ]*$//' > ldscripts/${EMULATION_NAME}.xbn
-
-if test -n "$GENERATE_COMBRELOC_SCRIPT"; then
- DATA_ALIGNMENT=${DATA_ALIGNMENT_c-${DATA_ALIGNMENT_}}
- LD_FLAG=c
- COMBRELOC=ldscripts/${EMULATION_NAME}.xc.tmp
- ( echo "/* Script for -z combreloc: combine and sort reloc sections */"
- . ${CUSTOMIZER_SCRIPT} ${EMULATION_NAME}
- . ${srcdir}/scripttempl/${SCRIPT_NAME}.sc
- ) | sed -e '/^ *$/d;s/[ ]*$//' > ldscripts/${EMULATION_NAME}.xc
- rm -f ${COMBRELOC}
- COMBRELOC=
-fi
-
-if test -n "$GENERATE_SHLIB_SCRIPT"; then
- LD_FLAG=shared
- DATA_ALIGNMENT=${DATA_ALIGNMENT_s-${DATA_ALIGNMENT_}}
- CREATE_SHLIB=" "
- # Note that TEXT_START_ADDR is set to NONPAGED_TEXT_START_ADDR.
- (
- echo "/* Script for ld --shared: link shared library */"
- . ${CUSTOMIZER_SCRIPT} ${EMULATION_NAME}
- . ${srcdir}/scripttempl/${SCRIPT_NAME}.sc
- ) | sed -e '/^ *$/d;s/[ ]*$//' > ldscripts/${EMULATION_NAME}.xs
- if test -n "$GENERATE_COMBRELOC_SCRIPT"; then
- LD_FLAG=cshared
- DATA_ALIGNMENT=${DATA_ALIGNMENT_sc-${DATA_ALIGNMENT}}
- COMBRELOC=ldscripts/${EMULATION_NAME}.xc.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}
- COMBRELOC=
- fi
- unset CREATE_SHLIB
-fi
-
-if test -n "$GENERATE_PIE_SCRIPT"; then
- LD_FLAG=pie
- DATA_ALIGNMENT=${DATA_ALIGNMENT_s-${DATA_ALIGNMENT_}}
- CREATE_PIE=" "
- # Note that TEXT_START_ADDR is set to NONPAGED_TEXT_START_ADDR.
- (
- echo "/* Script for ld -pie: link position independent executable */"
- . ${CUSTOMIZER_SCRIPT} ${EMULATION_NAME}
- . ${srcdir}/scripttempl/${SCRIPT_NAME}.sc
- ) | sed -e '/^ *$/d;s/[ ]*$//' > ldscripts/${EMULATION_NAME}.xd
- if test -n "$GENERATE_COMBRELOC_SCRIPT"; then
- LD_FLAG=cpie
- DATA_ALIGNMENT=${DATA_ALIGNMENT_sc-${DATA_ALIGNMENT}}
- COMBRELOC=ldscripts/${EMULATION_NAME}.xc.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}
- COMBRELOC=
- fi
- unset CREATE_PIE
-fi
-
-case " $EMULATION_LIBPATH " in
- *" ${EMULATION_NAME} "*) COMPILE_IN=true;;
-esac
-
-# Generate e${EMULATION_NAME}.c.
-. ${srcdir}/emultempl/${TEMPLATE_NAME-generic}.em
diff --git a/contrib/binutils/ld/h8-doc.texi b/contrib/binutils/ld/h8-doc.texi
deleted file mode 100644
index bbb1fd9..0000000
--- a/contrib/binutils/ld/h8-doc.texi
+++ /dev/null
@@ -1,14 +0,0 @@
-@c ------------------------------ CONFIGURATION VARS:
-@c 1. Inclusiveness of this manual
-@clear GENERIC
-
-@c 2. Specific target machines
-@set H8300
-@set Renesas
-@clear I960
-
-@c 3. Properties of this configuration
-@set SingleFormat
-@clear UsesEnvVars
-@c ------------------------------ end CONFIGURATION VARS
-
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
deleted file mode 100644
index dde4cfe..0000000
--- a/contrib/binutils/ld/ld.h
+++ /dev/null
@@ -1,249 +0,0 @@
-/* ld.h -- general linker header file
- Copyright 1991, 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2002
- 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, 59 Temple Place - Suite 330, Boston, MA
- 02111-1307, USA. */
-
-#ifndef LD_H
-#define LD_H
-
-#ifdef HAVE_LOCALE_H
-# include <locale.h>
-#endif
-
-#ifdef ENABLE_NLS
-# include <libintl.h>
-# define _(String) gettext (String)
-# ifdef gettext_noop
-# define N_(String) gettext_noop (String)
-# else
-# define N_(String) (String)
-# endif
-#else
-# define gettext(Msgid) (Msgid)
-# define dgettext(Domainname, Msgid) (Msgid)
-# define dcgettext(Domainname, Msgid, Category) (Msgid)
-# define textdomain(Domainname) while (0) /* nothing */
-# define bindtextdomain(Domainname, Dirname) while (0) /* nothing */
-# define _(String) (String)
-# 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: */
-
-/* Look in this variable for a target format */
-#define TARGET_ENVIRON "GNUTARGET"
-
-/* Input sections which are put in a section of this name are actually
- discarded. */
-#define DISCARD_SECTION_NAME "/DISCARD/"
-
-/* A file name list */
-typedef struct name_list {
- const char *name;
- struct name_list *next;
-}
-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. */
-
-struct wildcard_spec {
- const char *name;
- struct name_list *exclude_name_list;
- bfd_boolean sorted;
-};
-
-struct wildcard_list {
- struct wildcard_list *next;
- 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;
-
-#define get_userdata(x) ((x)->userdata)
-
-#define BYTE_SIZE (1)
-#define SHORT_SIZE (2)
-#define LONG_SIZE (4)
-#define QUAD_SIZE (8)
-
-typedef struct {
- /* 1 => assign space to common symbols even if `relocatable_output'. */
- bfd_boolean force_common_definition;
-
- /* 1 => do not assign addresses to common symbols. */
- 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;
-
- /* If TRUE, force generation of a file with a .exe file. */
- bfd_boolean force_exe_suffix;
-
- /* If TRUE, generate a cross reference report. */
- bfd_boolean cref;
-
- /* If TRUE (which is the default), warn about mismatched input
- files. */
- bfd_boolean warn_mismatch;
-
- /* Remove unreferenced sections? */
- bfd_boolean gc_sections;
-
- /* Name of shared object whose symbol table should be filtered with
- this shared object. From the --filter option. */
- char *filter_shlib;
-
- /* Name of shared object for whose symbol table this shared object
- is an auxiliary filter. From the --auxiliary option. */
- char **auxiliary_filters;
-
- /* A version symbol to be applied to the symbol names found in the
- .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;
-
-} args_type;
-
-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;
-
- /* If TRUE, doing a dynamic link. */
- bfd_boolean dynamic_link;
-
- /* If TRUE, -shared is supported. */
- /* ??? A better way to do this is perhaps to define this in the
- ld_emulation_xfer_struct since this is really a target dependent
- parameter. */
- bfd_boolean has_shared;
-
- /* If TRUE, build constructors. */
- bfd_boolean build_constructors;
-
- /* If TRUE, warn about any constructors. */
- bfd_boolean warn_constructors;
-
- /* If TRUE, warn about merging common symbols with others. */
- bfd_boolean warn_common;
-
- /* If TRUE, only warn once about a particular undefined symbol. */
- bfd_boolean warn_once;
-
- /* If TRUE, warn if multiple global-pointers are needed (Alpha
- only). */
- bfd_boolean warn_multiple_gp;
-
- /* If TRUE, warn if the starting address of an output section
- changes due to the alignment of an input section. */
- bfd_boolean warn_section_align;
-
- /* If TRUE, warning messages are fatal */
- bfd_boolean fatal_warnings;
-
- bfd_boolean sort_common;
-
- 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;
-} 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;
-
-/* Non-zero if we are processing a --defsym from the command line. */
-extern int parsing_defsym;
-
-extern int yyparse (void);
-extern void add_cref (const char *, bfd *, asection *, bfd_vma);
-extern void output_cref (FILE *);
-extern void check_nocrossrefs (void);
-extern void ld_abort (const char *, int, const char *) ATTRIBUTE_NORETURN;
-
-/* If gcc >= 2.6, we can give a function name, too. */
-#if __GNUC__ < 2 || (__GNUC__ == 2 && __GNUC_MINOR__ < 6)
-#define __PRETTY_FUNCTION__ NULL
-#endif
-
-#undef abort
-#define abort() ld_abort (__FILE__, __LINE__, __PRETTY_FUNCTION__)
-
-#endif
diff --git a/contrib/binutils/ld/ld.texinfo b/contrib/binutils/ld/ld.texinfo
deleted file mode 100644
index 4310c12..0000000
--- a/contrib/binutils/ld/ld.texinfo
+++ /dev/null
@@ -1,5737 +0,0 @@
-\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.
-@syncodeindex ky cp
-@include configdoc.texi
-@c (configdoc.texi is generated by the Makefile)
-@include ldver.texi
-
-@c @smallbook
-
-@macro gcctabopt{body}
-@code{\body\}
-@end macro
-
-@c man begin NAME
-@ifset man
-@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 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 WIN32
-@set XTENSA
-@end ifset
-@c man end
-
-@ifinfo
-@format
-START-INFO-DIR-ENTRY
-* Ld: (ld). The GNU linker.
-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.
-
-@ignore
-
-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 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
-@iftex
-@finalout
-@setchapternewpage odd
-@settitle Using LD, the GNU linker
-@titlepage
-@title Using ld
-@subtitle The GNU linker
-@sp 1
-@subtitle @code{ld} version 2
-@subtitle Version @value{VERSION}
-@author Steve Chamberlain
-@author Ian Lance Taylor
-@page
-
-@tex
-{\parskip=0pt
-\hfill Red Hat Inc\par
-\hfill nickc\@credhat.com, doc\@redhat.com\par
-\hfill {\it Using LD, the GNU linker}\par
-\hfill Edited by Jeffrey Osier (jeffrey\@cygnus.com)\par
-}
-\global\parindent=0pt % Steve likes it this way.
-@end tex
-
-@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.
-
-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''.
-@c man end
-
-@end titlepage
-@end iftex
-@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}.
-
-This document is distributed under the terms of the GNU Free
-Documentation License. A copy of the license is included in the
-section entitled ``GNU Free Documentation License''.
-
-@menu
-* Overview:: Overview
-* Invocation:: Invocation
-* Scripts:: Linker Scripts
-@ifset GENERIC
-* Machine Dependent:: Machine Dependent Features
-@end ifset
-@ifclear GENERIC
-@ifset H8300
-* H8/300:: ld and the H8/300
-@end ifset
-@ifset Renesas
-* Renesas:: ld and other Renesas micros
-@end ifset
-@ifset I960
-* i960:: ld and the Intel 960 family
-@end ifset
-@ifset ARM
-* ARM:: ld and the ARM family
-@end ifset
-@ifset HPPA
-* HPPA ELF32:: ld and HPPA 32-bit ELF
-@end ifset
-@ifset TICOFF
-* TI COFF:: ld and the TI COFF
-@end ifset
-@ifset WIN32
-* Win32:: ld and WIN32 (cygwin/mingw)
-@end ifset
-@ifset XTENSA
-* Xtensa:: ld and Xtensa Processors
-@end ifset
-@end ifclear
-@ifclear SingleFormat
-* BFD:: BFD
-@end ifclear
-@c Following blank line required for remaining bug in makeinfo conds/menus
-
-* Reporting Bugs:: Reporting Bugs
-* MRI:: MRI Compatible Script Files
-* GNU Free Documentation License:: GNU Free Documentation License
-* Index:: Index
-@end menu
-@end ifnottex
-
-@node Overview
-@chapter Overview
-
-@cindex @sc{gnu} linker
-@cindex what is this?
-
-@ifset man
-@c man begin SYNOPSIS
-ld [@b{options}] @var{objfile} @dots{}
-@c man end
-
-@c man begin SEEALSO
-ar(1), nm(1), objcopy(1), objdump(1), readelf(1) and
-the Info entries for @file{binutils} and
-@file{ld}.
-@c man end
-@end ifset
-
-@c man begin DESCRIPTION
-
-@command{ld} 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 @command{ld}.
-
-@command{ld} accepts Linker Command Language files written in
-a superset of AT&T's Link Editor Command Language syntax,
-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.
-@end ifset
-
-@ifclear SingleFormat
-This version of @command{ld} uses the general purpose BFD libraries
-to operate on object files. This allows @command{ld} to read, combine, and
-write object files in many different formats---for example, COFF or
-@code{a.out}. Different formats may be linked together to produce any
-available kind of object file. @xref{BFD}, for more information.
-@end ifclear
-
-Aside from its flexibility, the @sc{gnu} linker is more helpful than other
-linkers in providing diagnostic information. Many linkers abandon
-execution immediately upon encountering an error; whenever possible,
-@command{ld} continues executing, allowing you to identify other errors
-(or, in some cases, to get an output file in spite of the error).
-
-@c man end
-
-@node Invocation
-@chapter Invocation
-
-@c man begin DESCRIPTION
-
-The @sc{gnu} linker @command{ld} 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.
-
-@c man end
-
-@ifset UsesEnvVars
-@menu
-* Options:: Command Line Options
-* Environment:: Environment Variables
-@end menu
-
-@node Options
-@section Command Line Options
-@end ifset
-
-@cindex command line
-@cindex options
-
-@c man begin OPTIONS
-
-The linker supports a plethora of command-line options, but in actual
-practice few of them are used in any particular context.
-@cindex standard Unix system
-For instance, a frequent use of @command{ld} is to link standard Unix
-object files on a standard, supported Unix system. On such a system, to
-link a file @code{hello.o}:
-
-@smallexample
-ld -o @var{output} /lib/crt0.o hello.o -lc
-@end smallexample
-
-This tells @command{ld} to produce a file called @var{output} as the
-result of linking the file @code{/lib/crt0.o} with @code{hello.o} and
-the library @code{libc.a}, which will come from the standard search
-directories. (See the discussion of the @samp{-l} option below.)
-
-Some of the command-line options to @command{ld} may be specified at any
-point in the command line. However, options which refer to files, such
-as @samp{-l} or @samp{-T}, 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.
-
-@cindex object files
-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.
-
-Usually the linker is invoked with at least one object file, but you can
-specify other forms of binary input files using @samp{-l}, @samp{-R},
-and the script command language. If @emph{no} binary input files at all
-are specified, the linker does not produce any output, and issues the
-message @samp{No input files}.
-
-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 @samp{-T}). 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
-@code{INPUT} or @code{GROUP} to load other objects. Note that
-specifying a script in this way merely augments the main linker script;
-use the @samp{-T} option to replace the default linker script entirely.
-@xref{Scripts}.
-
-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.
-
-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
-@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.
-
-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,
-@samp{--trace-symbol foo} and @samp{--trace-symbol=foo} are equivalent.
-Unique abbreviations of the names of multiple-letter options are
-accepted.
-
-Note---if the linker is being invoked indirectly, via a compiler driver
-(e.g. @samp{gcc}) then all the linker command line options should be
-prefixed by @samp{-Wl,} (or whatever is appropriate for the particular
-compiler driver) like this:
-
-@smallexample
- gcc -Wl,--startgroup foo.o bar.o -Wl,--endgroup
-@end smallexample
-
-This is important, because otherwise the compiler driver program may
-silently drop the linker options, resulting in a bad link.
-
-Here is a table of the generic command line switches accepted by the GNU
-linker:
-
-@table @gcctabopt
-@kindex -a@var{keyword}
-@item -a@var{keyword}
-This option is supported for HP/UX compatibility. The @var{keyword}
-argument must be one of the strings @samp{archive}, @samp{shared}, or
-@samp{default}. @samp{-aarchive} is functionally equivalent to
-@samp{-Bstatic}, and the other two keywords are functionally equivalent
-to @samp{-Bdynamic}. This option may be used any number of times.
-
-@ifset I960
-@cindex architectures
-@kindex -A@var{arch}
-@item -A@var{architecture}
-@kindex --architecture=@var{arch}
-@itemx --architecture=@var{architecture}
-In the current release of @command{ld}, this option is useful only for the
-Intel 960 family of architectures. In that @command{ld} configuration, the
-@var{architecture} argument identifies the particular architecture in
-the 960 family, enabling some safeguards and modifying the
-archive-library search path. @xref{i960,,@command{ld} and the Intel 960
-family}, for details.
-
-Future releases of @command{ld} may support similar functionality for
-other architecture families.
-@end ifset
-
-@ifclear SingleFormat
-@cindex binary input format
-@kindex -b @var{format}
-@kindex --format=@var{format}
-@cindex input format
-@cindex input format
-@item -b @var{input-format}
-@itemx --format=@var{input-format}
-@command{ld} may be configured to support more than one kind of object
-file. If your @command{ld} is configured this way, you can use the
-@samp{-b} option to specify the binary format for input object files
-that follow this option on the command line. Even when @command{ld} is
-configured to support alternative object formats, you don't usually need
-to specify this, as @command{ld} should be configured to expect as a
-default input format the most usual format on each machine.
-@var{input-format} is a text string, the name of a particular format
-supported by the BFD libraries. (You can list the available binary
-formats with @samp{objdump -i}.)
-@xref{BFD}.
-
-You may want to use this option if you are linking files with an unusual
-binary format. You can also use @samp{-b} to switch formats explicitly (when
-linking object files of different formats), by including
-@samp{-b @var{input-format}} before each group of object files in a
-particular format.
-
-The default format is taken from the environment variable
-@code{GNUTARGET}.
-@ifset UsesEnvVars
-@xref{Environment}.
-@end ifset
-You can also define the input format from a script, using the command
-@code{TARGET};
-@ifclear man
-see @ref{Format Commands}.
-@end ifclear
-@end ifclear
-
-@kindex -c @var{MRI-cmdfile}
-@kindex --mri-script=@var{MRI-cmdfile}
-@cindex compatibility, MRI
-@item -c @var{MRI-commandfile}
-@itemx --mri-script=@var{MRI-commandfile}
-For compatibility with linkers produced by MRI, @command{ld} accepts script
-files written in an alternate, restricted command language, described in
-@ifclear man
-@ref{MRI,,MRI Compatible Script Files}.
-@end ifclear
-@ifset man
-the MRI Compatible Script Files section of GNU ld documentation.
-@end ifset
-Introduce MRI script files with
-the option @samp{-c}; use the @samp{-T} option to run linker
-scripts written in the general-purpose @command{ld} scripting language.
-If @var{MRI-cmdfile} does not exist, @command{ld} looks for it in the directories
-specified by any @samp{-L} options.
-
-@cindex common allocation
-@kindex -d
-@kindex -dc
-@kindex -dp
-@item -d
-@itemx -dc
-@itemx -dp
-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 @samp{-r}). The
-script command @code{FORCE_COMMON_ALLOCATION} has the same effect.
-@xref{Miscellaneous Commands}.
-
-@cindex entry point, from command line
-@kindex -e @var{entry}
-@kindex --entry=@var{entry}
-@item -e @var{entry}
-@itemx --entry=@var{entry}
-Use @var{entry} as the explicit symbol for beginning execution of your
-program, rather than the default entry point. If there is no symbol
-named @var{entry}, the linker will try to parse @var{entry} as a number,
-and use that as the entry address (the number will be interpreted in
-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.
-
-@cindex dynamic symbol table
-@kindex -E
-@kindex --export-dynamic
-@item -E
-@itemx --export-dynamic
-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.
-
-If you do not use this option, the dynamic symbol table will normally
-contain only those symbols which are referenced by some dynamic object
-mentioned in the link.
-
-If you use @code{dlopen} to load a dynamic object which needs to refer
-back to the symbols defined by the program, rather than some other
-dynamic object, then you will probably need to use this option when
-linking the program itself.
-
-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 @samp{--version-script} in @ref{VERSION}.
-
-@ifclear SingleFormat
-@cindex big-endian objects
-@cindex endianness
-@kindex -EB
-@item -EB
-Link big-endian objects. This affects the default output format.
-
-@cindex little-endian objects
-@kindex -EL
-@item -EL
-Link little-endian objects. This affects the default output format.
-@end ifclear
-
-@kindex -f
-@kindex --auxiliary
-@item -f
-@itemx --auxiliary @var{name}
-When creating an ELF shared object, set the internal DT_AUXILIARY 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 @var{name}.
-
-If you later link a program against this filter object, then, when you
-run the program, the dynamic linker will see the DT_AUXILIARY 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
-@var{name}. If there is one, it will be used instead of the definition
-in the filter object. The shared object @var{name} need not exist.
-Thus the shared object @var{name} may be used to provide an alternative
-implementation of certain functions, perhaps for debugging or for
-machine specific performance.
-
-This option may be specified more than once. The DT_AUXILIARY entries
-will be created in the order in which they appear on the command line.
-
-@kindex -F
-@kindex --filter
-@item -F @var{name}
-@itemx --filter @var{name}
-When creating an ELF shared object, set the internal DT_FILTER 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 @var{name}.
-
-If you later link a program against this filter object, then, when you
-run the program, the dynamic linker will see the DT_FILTER 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 @var{name}. Thus the filter object can be
-used to select a subset of the symbols provided by the object
-@var{name}.
-
-Some older linkers used the @option{-F} option throughout a compilation
-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
-@code{TARGET} command in linker scripts, and the @code{GNUTARGET}
-environment variable.
-@end ifclear
-The @sc{gnu} linker will ignore the @option{-F} option when not
-creating an ELF shared object.
-
-@cindex finalization function
-@kindex -fini
-@item -fini @var{name}
-When creating an ELF executable or shared object, call NAME when the
-executable or shared object is unloaded, by setting DT_FINI to the
-address of the function. By default, the linker uses @code{_fini} as
-the function to call.
-
-@kindex -g
-@item -g
-Ignored. Provided for compatibility with other tools.
-
-@kindex -G
-@kindex --gpsize
-@cindex object size
-@item -G@var{value}
-@itemx --gpsize=@var{value}
-Set the maximum size of objects to be optimized using the GP register to
-@var{size}. This is only meaningful for object file formats such as
-MIPS ECOFF which supports putting large and small objects into different
-sections. This is ignored for other object file formats.
-
-@cindex runtime library name
-@kindex -h@var{name}
-@kindex -soname=@var{name}
-@item -h@var{name}
-@itemx -soname=@var{name}
-When creating an ELF shared object, set the internal DT_SONAME field to
-the specified name. When an executable is linked with a shared object
-which has a DT_SONAME field, then when the executable is run the dynamic
-linker will attempt to load the shared object specified by the DT_SONAME
-field rather than the using the file name given to the linker.
-
-@kindex -i
-@cindex incremental link
-@item -i
-Perform an incremental link (same as option @samp{-r}).
-
-@cindex initialization function
-@kindex -init
-@item -init @var{name}
-When creating an ELF executable or shared object, call NAME when the
-executable or shared object is loaded, by setting DT_INIT to the address
-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.
-
-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.
-
-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.
-
-See the @option{-(} option for a way to force the linker to search
-archives multiple times.
-
-You may list the same archive multiple times on the command line.
-
-@ifset GENERIC
-This type of archive searching is standard for Unix linkers. However,
-if you are using @command{ld} on AIX, note that it is different from the
-behaviour of the AIX linker.
-@end ifset
-
-@cindex search directory, from cmd line
-@kindex -L@var{dir}
-@kindex --library-path=@var{dir}
-@item -L@var{searchdir}
-@itemx --library-path=@var{searchdir}
-Add path @var{searchdir} to the list of paths that @command{ld} will search
-for archive libraries and @command{ld} 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
-@option{-L} options apply to all @option{-l} options, regardless of the
-order in which the options appear.
-
-If @var{searchdir} begins with @code{=}, then the @code{=} will be replaced
-by the @dfn{sysroot prefix}, a path specified when the linker is configured.
-
-@ifset UsesEnvVars
-The default set of paths searched (without being specified with
-@samp{-L}) depends on which emulation mode @command{ld} is using, and in
-some cases also on how it was configured. @xref{Environment}.
-@end ifset
-
-The paths can also be specified in a link script with the
-@code{SEARCH_DIR} command. Directories specified this way are searched
-at the point in which the linker script appears in the command line.
-
-@cindex emulation
-@kindex -m @var{emulation}
-@item -m@var{emulation}
-Emulate the @var{emulation} linker. You can list the available
-emulations with the @samp{--verbose} or @samp{-V} options.
-
-If the @samp{-m} option is not used, the emulation is taken from the
-@code{LDEMULATION} environment variable, if that is defined.
-
-Otherwise, the default emulation depends upon how the linker was
-configured.
-
-@cindex link map
-@kindex -M
-@kindex --print-map
-@item -M
-@itemx --print-map
-Print a link map to the standard output. A link map provides
-information about the link, including the following:
-
-@itemize @bullet
-@item
-Where object files and symbols are mapped into memory.
-@item
-How common symbols are allocated.
-@item
-All archive members included in the link, with a mention of the symbol
-which caused the archive member to be brought in.
-@end itemize
-
-@kindex -n
-@cindex read-only text
-@cindex NMAGIC
-@kindex --nmagic
-@item -n
-@itemx --nmagic
-Turn off page alignment of sections, and mark the output as
-@code{NMAGIC} if possible.
-
-@kindex -N
-@kindex --omagic
-@cindex read/write from cmd line
-@cindex OMAGIC
-@item -N
-@itemx --omagic
-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 @code{OMAGIC}. Note: Although a writable text section
-is allowed for PE-COFF targets, it does not conform to the format
-specification published by Microsoft.
-
-@kindex --no-omagic
-@cindex OMAGIC
-@item --no-omagic
-This option negates most of the effects of the @option{-N} 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 @option{-Bdynamic} for this.
-
-@kindex -o @var{output}
-@kindex --output=@var{output}
-@cindex naming the output file
-@item -o @var{output}
-@itemx --output=@var{output}
-Use @var{output} as the name for the program produced by @command{ld}; if this
-option is not specified, the name @file{a.out} is used by default. The
-script command @code{OUTPUT} can also specify the output file name.
-
-@kindex -O @var{level}
-@cindex generating optimized output
-@item -O @var{level}
-If @var{level} is a numeric values greater than zero @command{ld} optimizes
-the output. This might take significantly longer and therefore probably
-should only be enabled for the final binary.
-
-@kindex -q
-@kindex --emit-relocs
-@cindex retain relocations in final executable
-@item -q
-@itemx --emit-relocs
-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.
-
-This option is currently only supported on ELF platforms.
-
-@cindex partial link
-@cindex relocatable output
-@kindex -r
-@kindex --relocatable
-@item -r
-@itemx --relocatable
-Generate relocatable output---i.e., generate an output file that can in
-turn serve as input to @command{ld}. This is often called @dfn{partial
-linking}. As a side effect, in environments that support standard Unix
-magic numbers, this option also sets the output file's magic number to
-@code{OMAGIC}.
-@c ; see @option{-N}.
-If this option is not specified, an absolute file is produced. When
-linking C++ programs, this option @emph{will not} resolve references to
-constructors; to do that, use @samp{-Ur}.
-
-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 @code{a.out}-based formats do not support partial linking
-with input files in other formats at all.
-
-This option does the same thing as @samp{-i}.
-
-@kindex -R @var{file}
-@kindex --just-symbols=@var{file}
-@cindex symbol-only input
-@item -R @var{filename}
-@itemx --just-symbols=@var{filename}
-Read symbol names and their addresses from @var{filename}, 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.
-
-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
-the @option{-rpath} option.
-
-@kindex -s
-@kindex --strip-all
-@cindex strip all symbols
-@item -s
-@itemx --strip-all
-Omit all symbol information from the output file.
-
-@kindex -S
-@kindex --strip-debug
-@cindex strip debugger symbols
-@item -S
-@itemx --strip-debug
-Omit debugger symbol information (but not all symbols) from the output file.
-
-@kindex -t
-@kindex --trace
-@cindex input files, displaying
-@item -t
-@itemx --trace
-Print the names of the input files as @command{ld} processes them.
-
-@kindex -T @var{script}
-@kindex --script=@var{script}
-@cindex script files
-@item -T @var{scriptfile}
-@itemx --script=@var{scriptfile}
-Use @var{scriptfile} as the linker script. This script replaces
-@command{ld}'s default linker script (rather than adding to it), so
-@var{commandfile} must specify everything necessary to describe the
-output file. @xref{Scripts}. If @var{scriptfile} does not exist in
-the current directory, @code{ld} looks for it in the directories
-specified by any preceding @samp{-L} options. Multiple @samp{-T}
-options accumulate.
-
-@kindex -u @var{symbol}
-@kindex --undefined=@var{symbol}
-@cindex undefined symbol
-@item -u @var{symbol}
-@itemx --undefined=@var{symbol}
-Force @var{symbol} to be entered in the output file as an undefined
-symbol. Doing this may, for example, trigger linking of additional
-modules from standard libraries. @samp{-u} may be repeated with
-different option arguments to enter additional undefined symbols. This
-option is equivalent to the @code{EXTERN} linker script command.
-
-@kindex -Ur
-@cindex constructors
-@item -Ur
-For anything other than C++ programs, this option is equivalent to
-@samp{-r}: it generates relocatable output---i.e., an output file that can in
-turn serve as input to @command{ld}. When linking C++ programs, @samp{-Ur}
-@emph{does} resolve references to constructors, unlike @samp{-r}.
-It does not work to use @samp{-Ur} on files that were themselves linked
-with @samp{-Ur}; once the constructor table has been built, it cannot
-be added to. Use @samp{-Ur} only for the last partial link, and
-@samp{-r} for the others.
-
-@kindex --unique[=@var{SECTION}]
-@item --unique[=@var{SECTION}]
-Creates a separate output section for every input section matching
-@var{SECTION}, or if the optional wildcard @var{SECTION} 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.
-
-@kindex -v
-@kindex -V
-@kindex --version
-@cindex version
-@item -v
-@itemx --version
-@itemx -V
-Display the version number for @command{ld}. The @option{-V} option also
-lists the supported emulations.
-
-@kindex -x
-@kindex --discard-all
-@cindex deleting local symbols
-@item -x
-@itemx --discard-all
-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}.
-
-@kindex -y @var{symbol}
-@kindex --trace-symbol=@var{symbol}
-@cindex symbol tracing
-@item -y @var{symbol}
-@itemx --trace-symbol=@var{symbol}
-Print the name of each linked file in which @var{symbol} appears. This
-option may be given any number of times. On many systems it is necessary
-to prepend an underscore.
-
-This option is useful when you have an undefined symbol in your link but
-don't know where the reference is coming from.
-
-@kindex -Y @var{path}
-@item -Y @var{path}
-Add @var{path} to the default library search path. This option exists
-for Solaris compatibility.
-
-@kindex -z @var{keyword}
-@item -z @var{keyword}
-The recognized keywords are:
-@table @samp
-
-@item combreloc
-Combines multiple reloc sections and sorts them to make dynamic symbol
-lookup caching possible.
-
-@item defs
-Disallows undefined symbols in object files. Undefined symbols in
-shared libraries are still allowed.
-
-@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.
-
-@item interpose
-Marks the object that its symbol table interposes before all symbols
-but the primary executable.
-
-@item loadfltr
-Marks the object that its filters be processed immediately at
-runtime.
-
-@item muldefs
-Allows multiple definitions.
-
-@item nocombreloc
-Disables multiple reloc sections combining.
-
-@item nocopyreloc
-Disables production of copy relocs.
-
-@item nodefaultlib
-Marks the object that the search for dependencies of this object will
-ignore any default library search paths.
-
-@item nodelete
-Marks the object shouldn't be unloaded at runtime.
-
-@item nodlopen
-Marks the object not available to @code{dlopen}.
-
-@item nodump
-Marks the object can not be dumped by @code{dldump}.
-
-@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.
-
-@item origin
-Marks the object may contain $ORIGIN.
-
-@end table
-
-Other keywords are ignored for Solaris compatibility.
-
-@kindex -(
-@cindex groups of archives
-@item -( @var{archives} -)
-@itemx --start-group @var{archives} --end-group
-The @var{archives} should be a list of archive files. They may be
-either explicit file names, or @samp{-l} options.
-
-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.
-
-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.
-
-@kindex --accept-unknown-input-arch
-@kindex --no-accept-unknown-input-arch
-@item --accept-unknown-input-arch
-@itemx --no-accept-unknown-input-arch
-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 @samp{--accept-unknown-input-arch} option has been added to
-restore the old behaviour.
-
-@kindex --as-needed
-@kindex --no-as-needed
-@item --as-needed
-@itemx --no-as-needed
-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.
-@option{--no-as-needed} restores the default behaviour.
-
-@kindex -assert @var{keyword}
-@item -assert @var{keyword}
-This option is ignored for SunOS compatibility.
-
-@kindex -Bdynamic
-@kindex -dy
-@kindex -call_shared
-@item -Bdynamic
-@itemx -dy
-@itemx -call_shared
-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
-@option{-l} options which follow it.
-
-@kindex -Bgroup
-@item -Bgroup
-Set the @code{DF_1_GROUP} flag in the @code{DT_FLAGS_1} 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.
-@option{--unresolved-symbols=report-all} is implied. This option is
-only meaningful on ELF platforms which support shared libraries.
-
-@kindex -Bstatic
-@kindex -dn
-@kindex -non_shared
-@kindex -static
-@item -Bstatic
-@itemx -dn
-@itemx -non_shared
-@itemx -static
-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 @option{-l} options which follow it. This
-option also implies @option{--unresolved-symbols=report-all}.
-
-@kindex -Bsymbolic
-@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 ELF
-platforms which support shared libraries.
-
-@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
-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 @option{--check-sections}.
-
-@cindex cross reference table
-@kindex --cref
-@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.
-
-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.
-
-@cindex common allocation
-@kindex --no-define-common
-@item --no-define-common
-This option inhibits the assignment of addresses to common symbols.
-The script command @code{INHIBIT_COMMON_ALLOCATION} has the same effect.
-@xref{Miscellaneous Commands}.
-
-The @samp{--no-define-common} 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 @samp{--no-define-common} 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.
-
-@cindex symbols, from command line
-@kindex --defsym @var{symbol}=@var{exp}
-@item --defsym @var{symbol}=@var{expression}
-Create a global symbol in the output file, containing the absolute
-address given by @var{expression}. 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 @var{expression} in this
-context: you may give a hexadecimal constant or the name of an existing
-symbol, or use @code{+} and @code{-} to add or subtract hexadecimal
-constants or symbols. If you need more elaborate expressions, consider
-using the linker command language from a script (@pxref{Assignments,,
-Assignment: Symbol Definitions}). @emph{Note:} there should be no white
-space between @var{symbol}, the equals sign (``@key{=}''), and
-@var{expression}.
-
-@cindex demangling, from command line
-@kindex --demangle[=@var{style}]
-@kindex --no-demangle
-@item --demangle[=@var{style}]
-@itemx --no-demangle
-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 @samp{COLLECT_NO_DEMANGLE}
-is set. These options may be used to override the default.
-
-@cindex dynamic linker, from command line
-@kindex -I@var{file}
-@kindex --dynamic-linker @var{file}
-@item --dynamic-linker @var{file}
-Set the name of the dynamic linker. This is only meaningful when
-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
-Treat all warnings as errors.
-
-@kindex --force-exe-suffix
-@item --force-exe-suffix
-Make sure that an output file has a .exe suffix.
-
-If a successfully built fully linked output file does not have a
-@code{.exe} or @code{.dll} suffix, this option forces the linker to copy
-the output file to one of the same name with a @code{.exe} 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 @code{.exe} suffix.
-
-@kindex --gc-sections
-@kindex --no-gc-sections
-@cindex garbage collection
-@item --no-gc-sections
-@itemx --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.
-
-@cindex help
-@cindex usage
-@kindex --help
-@item --help
-Print a summary of the command-line options on the standard output and exit.
-
-@kindex --target-help
-@item --target-help
-Print a summary of all target specific options on the standard output and exit.
-
-@kindex -Map
-@item -Map @var{mapfile}
-Print a link map to the file @var{mapfile}. See the description of the
-@option{-M} option, above.
-
-@cindex memory usage
-@kindex --no-keep-memory
-@item --no-keep-memory
-@command{ld} normally optimizes for speed over memory usage by caching the
-symbol tables of input files in memory. This option tells @command{ld} to
-instead optimize for memory usage, by rereading the symbol tables as
-necessary. This may be required if @command{ld} runs out of memory space
-while linking a large executable.
-
-@kindex --no-undefined
-@kindex -z defs
-@item --no-undefined
-@itemx -z defs
-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.
-
-@kindex --allow-multiple-definition
-@kindex -z muldefs
-@item --allow-multiple-definition
-@itemx -z muldefs
-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.
-
-@kindex --allow-shlib-undefined
-@kindex --no-allow-shlib-undefined
-@item --allow-shlib-undefined
-@itemx --no-allow-shlib-undefined
-Allows (the default) or disallows undefined symbols in shared libraries.
-This switch is similar to @option{--no-undefined} 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.
-
-The reason that @option{--allow-shlib-undefined} 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 HPPA shared libraries to have undefined symbols.
-
-@kindex --no-undefined-version
-@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.
-
-@kindex --no-warn-mismatch
-@item --no-warn-mismatch
-Normally @command{ld} will give an error if you try to link together input
-files that are mismatched for some reason, perhaps because they have
-been compiled for different processors or for different endiannesses.
-This option tells @command{ld} that it should silently permit such possible
-errors. This option should only be used with care, in cases when you
-have taken some special action that ensures that the linker errors are
-inappropriate.
-
-@kindex --no-whole-archive
-@item --no-whole-archive
-Turn off the effect of the @option{--whole-archive} option for subsequent
-archive files.
-
-@cindex output file after errors
-@kindex --noinhibit-exec
-@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.
-
-@kindex -nostdlib
-@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.
-
-@ifclear SingleFormat
-@kindex --oformat
-@item --oformat @var{output-format}
-@command{ld} may be configured to support more than one kind of object
-file. If your @command{ld} is configured this way, you can use the
-@samp{--oformat} option to specify the binary format for the output
-object file. Even when @command{ld} is configured to support alternative
-object formats, you don't usually need to specify this, as @command{ld}
-should be configured to produce as a default output format the most
-usual format on each machine. @var{output-format} is a text string, the
-name of a particular format supported by the BFD libraries. (You can
-list the available binary formats with @samp{objdump -i}.) The script
-command @code{OUTPUT_FORMAT} can also specify the output format, but
-this option overrides it. @xref{BFD}.
-@end ifclear
-
-@kindex -pie
-@kindex --pic-executable
-@item -pie
-@itemx --pic-executable
-@cindex position independent executables
-Create a position independent executable. This is currently only supported on
-ELF platforms. Position independent executables are similar to shared
-libraries in that they are relocated by the dynamic linker to the virtual
-address the OS 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.
-
-@kindex -qmagic
-@item -qmagic
-This option is ignored for Linux compatibility.
-
-@kindex -Qy
-@item -Qy
-This option is ignored for SVR4 compatibility.
-
-@kindex --relax
-@cindex synthesizing linker
-@cindex relaxing addressing modes
-@item --relax
-An option with machine dependent effects.
-@ifset GENERIC
-This option is only supported on a few targets.
-@end ifset
-@ifset H8300
-@xref{H8/300,,@command{ld} and the H8/300}.
-@end ifset
-@ifset I960
-@xref{i960,, @command{ld} and the Intel 960 family}.
-@end ifset
-@ifset XTENSA
-@xref{Xtensa,, @command{ld} and Xtensa Processors}.
-@end ifset
-
-On some platforms, the @samp{--relax} 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.
-
-On some platforms these link time global optimizations may make symbolic
-debugging of the resulting executable impossible.
-@ifset GENERIC
-This is known to be
-the case for the Matsushita MN10200 and MN10300 family of processors.
-@end ifset
-
-@ifset GENERIC
-On platforms where this is not supported, @samp{--relax} is accepted,
-but ignored.
-@end ifset
-
-@cindex retaining specified symbols
-@cindex stripping all but some symbols
-@cindex symbols, retaining selectively
-@item --retain-symbols-file @var{filename}
-Retain @emph{only} the symbols listed in the file @var{filename},
-discarding all others. @var{filename} is simply a flat file, with one
-symbol name per line. This option is especially useful in environments
-@ifset GENERIC
-(such as VxWorks)
-@end ifset
-where a large global symbol table is accumulated gradually, to conserve
-run-time memory.
-
-@samp{--retain-symbols-file} does @emph{not} discard undefined symbols,
-or symbols needed for relocations.
-
-You may only specify @samp{--retain-symbols-file} once in the command
-line. It overrides @samp{-s} and @samp{-S}.
-
-@ifset GENERIC
-@item -rpath @var{dir}
-@cindex runtime library search path
-@kindex -rpath
-Add a directory to the runtime library search path. This is used when
-linking an ELF executable with shared objects. All @option{-rpath}
-arguments are concatenated and passed to the runtime linker, which uses
-them to locate shared objects at runtime. The @option{-rpath} option is
-also used when locating shared objects which are needed by shared
-objects explicitly included in the link; see the description of the
-@option{-rpath-link} option. If @option{-rpath} is not used when linking an
-ELF executable, the contents of the environment variable
-@code{LD_RUN_PATH} will be used if it is defined.
-
-The @option{-rpath} option may also be used on SunOS. By default, on
-SunOS, the linker will form a runtime search patch out of all the
-@option{-L} options it is given. If a @option{-rpath} option is used, 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.
-
-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
-the @option{-rpath} option.
-@end ifset
-
-@ifset GENERIC
-@cindex link-time runtime library search path
-@kindex -rpath-link
-@item -rpath-link @var{DIR}
-When using ELF or SunOS, one shared library may require another. This
-happens when an @code{ld -shared} link includes a shared library as one
-of the input files.
-
-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 @option{-rpath-link} option
-specifies the first set of directories to search. The
-@option{-rpath-link} option may specify a sequence of directory names
-either by specifying a list of names separated by colons, or by
-appearing multiple times.
-
-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.
-
-The linker uses the following search paths to locate required shared
-libraries.
-@enumerate
-@item
-Any directories specified by @option{-rpath-link} options.
-@item
-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.
-@item
-On an ELF system, if the @option{-rpath} and @code{rpath-link} options
-were not used, search the contents of the environment variable
-@code{LD_RUN_PATH}. It is for the native linker only.
-@item
-On SunOS, if the @option{-rpath} option was not used, search any
-directories specified using @option{-L} options.
-@item
-For a native linker, the contents of the environment variable
-@code{LD_LIBRARY_PATH}.
-@item
-For a native ELF linker, the directories in @code{DT_RUNPATH} or
-@code{DT_RPATH} of a shared library are searched for shared
-libraries needed by it. The @code{DT_RPATH} entries are ignored if
-@code{DT_RUNPATH} entries exist.
-@item
-The default directories, normally @file{/lib} and @file{/usr/lib}.
-@item
-For a native linker on an ELF system, if the file @file{/etc/ld.so.conf}
-exists, the list of directories found in that file.
-@end enumerate
-
-If the required shared library is not found, the linker will issue a
-warning and continue with the link.
-@end ifset
-
-@kindex -shared
-@kindex -Bshareable
-@item -shared
-@itemx -Bshareable
-@cindex shared libraries
-Create a shared library. This is currently only supported on ELF, XCOFF
-and SunOS platforms. On SunOS, the linker will automatically create a
-shared library if the @option{-e} option is not used and there are
-undefined symbols in the link.
-
-@item --sort-common
-@kindex --sort-common
-This option tells @command{ld} 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.
-
-@kindex --split-by-file
-@item --split-by-file [@var{size}]
-Similar to @option{--split-by-reloc} but creates a new output section for
-each input file when @var{size} is reached. @var{size} defaults to a
-size of 1 if not given.
-
-@kindex --split-by-reloc
-@item --split-by-reloc [@var{count}]
-Tries to creates extra sections in the output file so that no single
-output section in the file contains more than @var{count} relocations.
-This is useful when generating huge relocatable files for downloading into
-certain real time kernels with the COFF object file format; since COFF
-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 @var{count} relocations one output section will contain that
-many relocations. @var{count} defaults to a value of 32768.
-
-@kindex --stats
-@item --stats
-Compute and display statistics about the operation of the linker, such
-as execution time and memory usage.
-
-@kindex --traditional-format
-@cindex traditional format
-@item --traditional-format
-For some targets, the output of @command{ld} is different in some ways from
-the output of some existing linker. This switch requests @command{ld} to
-use the traditional format instead.
-
-@cindex dbx
-For example, on SunOS, @command{ld} 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
-@code{dbx} program can not read the resulting program (@code{gdb} has no
-trouble). The @samp{--traditional-format} switch tells @command{ld} to not
-combine duplicate entries.
-
-@kindex --section-start @var{sectionname}=@var{org}
-@item --section-start @var{sectionname}=@var{org}
-Locate a section in the output file at the absolute
-address given by @var{org}. You may use this option as many
-times as necessary to locate multiple sections in the command
-line.
-@var{org} must be a single hexadecimal integer;
-for compatibility with other linkers, you may omit the leading
-@samp{0x} usually associated with hexadecimal values. @emph{Note:} there
-should be no white space between @var{sectionname}, the equals
-sign (``@key{=}''), and @var{org}.
-
-@kindex -Tbss @var{org}
-@kindex -Tdata @var{org}
-@kindex -Ttext @var{org}
-@cindex segment origins, cmd line
-@item -Tbss @var{org}
-@itemx -Tdata @var{org}
-@itemx -Ttext @var{org}
-Same as --section-start, with @code{.bss}, @code{.data} or
-@code{.text} as the @var{sectionname}.
-
-@kindex --unresolved-symbols
-@item --unresolved-symbols=@var{method}
-Determine how to handle unresolved symbols. There are four possible
-values for @samp{method}:
-
-@table @samp
-@item ignore-all
-Do not report any unresolved symbols.
-
-@item report-all
-Report all unresolved symbols. This is the default.
-
-@item ignore-in-object-files
-Report unresolved symbols that are contained in shared libraries, but
-ignore them if they come from regular object files.
-
-@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.
-@end table
-
-The behaviour for shared libraries on their own can also be controlled
-by the @option{--[no-]allow-shlib-undefined} option.
-
-Normally the linker will generate an error message for each reported
-unresolved symbol but the option @option{--warn-unresolved-symbols}
-can change this to a warning.
-
-@kindex --verbose
-@cindex verbose
-@item --dll-verbose
-@itemx --verbose
-Display the version number for @command{ld} and list the linker emulations
-supported. Display which input files can and cannot be opened. Display
-the linker script being used by the linker.
-
-@kindex --version-script=@var{version-scriptfile}
-@cindex version script, symbol versions
-@itemx --version-script=@var{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 ELF platforms which support shared libraries.
-@xref{VERSION}.
-
-@kindex --warn-common
-@cindex warnings, on combining symbols
-@cindex combining symbols, warnings on
-@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.
-
-There are three kinds of global symbols, illustrated here by C examples:
-
-@table @samp
-@item int i = 1;
-A definition, which goes in the initialized data section of the output
-file.
-
-@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.
-
-@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.
-@end table
-
-The @samp{--warn-common} 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.
-
-@enumerate
-@item
-Turning a common symbol into a reference, because there is already a
-definition for the symbol.
-@smallexample
-@var{file}(@var{section}): warning: common of `@var{symbol}'
- overridden by definition
-@var{file}(@var{section}): warning: defined here
-@end smallexample
-
-@item
-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.
-@smallexample
-@var{file}(@var{section}): warning: definition of `@var{symbol}'
- overriding common
-@var{file}(@var{section}): warning: common is here
-@end smallexample
-
-@item
-Merging a common symbol with a previous same-sized common symbol.
-@smallexample
-@var{file}(@var{section}): warning: multiple common
- of `@var{symbol}'
-@var{file}(@var{section}): warning: previous common is here
-@end smallexample
-
-@item
-Merging a common symbol with a previous larger common symbol.
-@smallexample
-@var{file}(@var{section}): warning: common of `@var{symbol}'
- overridden by larger common
-@var{file}(@var{section}): warning: larger common is here
-@end smallexample
-
-@item
-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.
-@smallexample
-@var{file}(@var{section}): warning: common of `@var{symbol}'
- overriding smaller common
-@var{file}(@var{section}): warning: smaller common is here
-@end smallexample
-@end enumerate
-
-@kindex --warn-constructors
-@item --warn-constructors
-Warn if any global constructors are used. This is only useful for a few
-object file formats. For formats like COFF or ELF, the linker can not
-detect the use of global constructors.
-
-@kindex --warn-multiple-gp
-@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.
-
-@kindex --warn-once
-@cindex warnings, on undefined symbols
-@cindex undefined symbols, warnings on
-@item --warn-once
-Only warn once for each undefined symbol, rather than once per module
-which refers to it.
-
-@kindex --warn-section-align
-@cindex warnings, on section alignment
-@cindex section alignment, warnings on
-@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 @code{SECTIONS} command does not specify a start address for
-the section (@pxref{SECTIONS}).
-
-@kindex --warn-unresolved-symbols
-@item --warn-unresolved-symbols
-If the linker is going to report an unresolved symbol (see the option
-@option{--unresolved-symbols}) it will normally generate an error.
-This option makes it generate a warning instead.
-
-@kindex --error-unresolved-symbols
-@item --error-unresolved-symbols
-This restores the linker's default behaviour of generating errors when
-it is reporting unresolved symbols.
-
-@kindex --whole-archive
-@cindex including an entire archive
-@item --whole-archive
-For each archive mentioned on the command line after the
-@option{--whole-archive} 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.
-
-Two notes when using this option from gcc: First, gcc doesn't know
-about this option, so you have to use @option{-Wl,-whole-archive}.
-Second, don't forget to use @option{-Wl,-no-whole-archive} 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.
-
-@kindex --wrap
-@item --wrap @var{symbol}
-Use a wrapper function for @var{symbol}. Any undefined reference to
-@var{symbol} will be resolved to @code{__wrap_@var{symbol}}. Any
-undefined reference to @code{__real_@var{symbol}} will be resolved to
-@var{symbol}.
-
-This can be used to provide a wrapper for a system function. The
-wrapper function should be called @code{__wrap_@var{symbol}}. If it
-wishes to call the system function, it should call
-@code{__real_@var{symbol}}.
-
-Here is a trivial example:
-
-@smallexample
-void *
-__wrap_malloc (size_t c)
-@{
- printf ("malloc called with %zu\n", c);
- return __real_malloc (c);
-@}
-@end smallexample
-
-If you link other code with this file using @option{--wrap malloc}, then
-all calls to @code{malloc} will call the function @code{__wrap_malloc}
-instead. The call to @code{__real_malloc} in @code{__wrap_malloc} will
-call the real @code{malloc} function.
-
-You may wish to provide a @code{__real_malloc} function as well, so that
-links without the @option{--wrap} option will succeed. If you do this,
-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 --enable-new-dtags
-@kindex --disable-new-dtags
-@item --enable-new-dtags
-@itemx --disable-new-dtags
-This linker can create the new dynamic tags in ELF. But the older ELF
-systems may not understand them. If you specify
-@option{--enable-new-dtags}, the dynamic tags will be created as needed.
-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.
-
-@end table
-
-@c man end
-
-@subsection Options Specific to i386 PE Targets
-
-@c man begin OPTIONS
-
-The i386 PE linker supports the @option{-shared} option, which causes
-the output to be a dynamically linked library (DLL) instead of a
-normal executable. You should name the output @code{*.dll} when you
-use this option. In addition, the linker fully supports the standard
-@code{*.def} 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).
-
-In addition to the options common to all targets, the i386 PE linker
-support additional command line options that are specific to the i386
-PE target. Options that take values may be separated from their
-values by either a space or an equals sign.
-
-@table @gcctabopt
-
-@kindex --add-stdcall-alias
-@item --add-stdcall-alias
-If given, symbols with a stdcall suffix (@@@var{nn}) will be exported
-as-is and also with the suffix stripped.
-[This option is specific to the i386 PE targeted port of the linker]
-
-@kindex --base-file
-@item --base-file @var{file}
-Use @var{file} as the name of a file in which to save the base
-addresses of all the relocations needed for generating DLLs with
-@file{dlltool}.
-[This is an i386 PE specific option]
-
-@kindex --dll
-@item --dll
-Create a DLL instead of a regular executable. You may also use
-@option{-shared} or specify a @code{LIBRARY} in a given @code{.def}
-file.
-[This option is specific to the i386 PE targeted port of the linker]
-
-@kindex --enable-stdcall-fixup
-@kindex --disable-stdcall-fixup
-@item --enable-stdcall-fixup
-@itemx --disable-stdcall-fixup
-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 @code{_foo} might be linked to the function
-@code{_foo@@12}, or the undefined symbol @code{_bar@@16} might be linked
-to the function @code{_bar}. 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 @option{--enable-stdcall-fixup}, this
-feature is fully enabled and warnings are not printed. If you specify
-@option{--disable-stdcall-fixup}, this feature is disabled and such
-mismatches are considered to be errors.
-[This option is specific to the i386 PE targeted port of the linker]
-
-@cindex DLLs, creating
-@kindex --export-all-symbols
-@item --export-all-symbols
-If given, all global symbols in the objects used to build a DLL will
-be exported by the DLL. Note that this is the default if there
-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{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},
-@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
-(obviously, this applies on when building DLLs for cygwin targets).
-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{cygwin_premain0}, @code{cygwin_premain1}, @code{cygwin_premain2},
-@code{cygwin_premain3}, and @code{environ}.
-[This option is specific to the i386 PE targeted port of the linker]
-
-@kindex --exclude-symbols
-@item --exclude-symbols @var{symbol},@var{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 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
-file offsets which are multiples of this number. This defaults to
-512.
-[This option is specific to the i386 PE targeted port of the linker]
-
-@cindex heap size
-@kindex --heap
-@item --heap @var{reserve}
-@itemx --heap @var{reserve},@var{commit}
-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 PE targeted port of the linker]
-
-@cindex image base
-@kindex --image-base
-@item --image-base @var{value}
-Use @var{value} 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 PE targeted port of the linker]
-
-@kindex --kill-at
-@item --kill-at
-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 --major-image-version
-@item --major-image-version @var{value}
-Sets the major number of the ``image version''. Defaults to 1.
-[This option is specific to the i386 PE targeted port of the linker]
-
-@kindex --major-os-version
-@item --major-os-version @var{value}
-Sets the major number of the ``os version''. Defaults to 4.
-[This option is specific to the i386 PE targeted port of the linker]
-
-@kindex --major-subsystem-version
-@item --major-subsystem-version @var{value}
-Sets the major number of the ``subsystem version''. Defaults to 4.
-[This option is specific to the i386 PE targeted port of the linker]
-
-@kindex --minor-image-version
-@item --minor-image-version @var{value}
-Sets the minor number of the ``image version''. Defaults to 0.
-[This option is specific to the i386 PE targeted port of the linker]
-
-@kindex --minor-os-version
-@item --minor-os-version @var{value}
-Sets the minor number of the ``os version''. Defaults to 0.
-[This option is specific to the i386 PE targeted port of the linker]
-
-@kindex --minor-subsystem-version
-@item --minor-subsystem-version @var{value}
-Sets the minor number of the ``subsystem version''. Defaults to 0.
-[This option is specific to the i386 PE targeted port of the linker]
-
-@cindex DEF files, creating
-@cindex DLLs, creating
-@kindex --output-def
-@item --output-def @var{file}
-The linker will create the file @var{file} which will contain a DEF
-file corresponding to the DLL the linker is generating. This DEF file
-(which should be called @code{*.def}) may be used to create an import
-library with @code{dlltool} or may be used as a reference to
-automatically or implicitly exported symbols.
-[This option is specific to the i386 PE targeted port of the linker]
-
-@cindex DLLs, creating
-@kindex --out-implib
-@item --out-implib @var{file}
-The linker will create the file @var{file} which will contain an
-import lib corresponding to the DLL the linker is generating. This
-import lib (which should be called @code{*.dll.a} or @code{*.a}
-may be used to link clients against the generated DLL; this behaviour
-makes it possible to skip a separate @code{dlltool} import library
-creation step.
-[This option is specific to the i386 PE targeted port of the linker]
-
-@kindex --enable-auto-image-base
-@item --enable-auto-image-base
-Automatically choose the image base for DLLs, unless one is specified
-using the @code{--image-base} argument. By using a hash generated
-from the dllname to create unique image bases for each DLL, in-memory
-collisions and relocations which can delay program execution are
-avoided.
-[This option is specific to the i386 PE targeted port of the linker]
-
-@kindex --disable-auto-image-base
-@item --disable-auto-image-base
-Do not automatically generate a unique image base. If there is no
-user-specified image base (@code{--image-base}) then use the platform
-default.
-[This option is specific to the i386 PE targeted port of the linker]
-
-@cindex DLLs, linking to
-@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
-@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}.
-[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
-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
-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
-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
-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
-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.
-
-There are several ways to address this difficulty, regardless of the
-data type of the exported variable:
-
-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.
-
-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:
-
-@example
-extern type extern_array[];
-extern_array[1] -->
- @{ volatile type *t=extern_array; t[1] @}
-@end example
-
-or
-
-@example
-extern type extern_array[];
-extern_array[1] -->
- @{ volatile int t=1; extern_array[t] @}
-@end example
-
-For structs (and most other multiword data types) the only option
-is to make the struct itself (or the long long, or the ...) variable:
-
-@example
-extern struct s extern_struct;
-extern_struct.field -->
- @{ volatile struct s *t=&extern_struct; t->field @}
-@end example
-
-or
-
-@example
-extern long long extern_ll;
-extern_ll -->
- @{ volatile long long * local_ll=&extern_ll; *local_ll @}
-@end example
-
-A third method of dealing with this difficulty is to abandon
-'auto-import' for the offending symbol and mark it with
-@code{__declspec(dllimport)}. However, in practise that
-requires using compile-time #defines to indicate whether you are
-building a DLL, building client code that will link to the DLL, 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:
-
-Original:
-@example
---foo.h
-extern int arr[];
---foo.c
-#include "foo.h"
-void main(int argc, char **argv)@{
- printf("%d\n",arr[1]);
-@}
-@end example
-
-Solution 1:
-@example
---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\n",parr[1]);
-@}
-@end example
-
-Solution 2:
-@example
---foo.h
-/* Note: auto-export is assumed (no __declspec(dllexport)) */
-#if (defined(_WIN32) || defined(__CYGWIN__)) && \
- !(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\n",arr[1]);
-@}
-@end example
-
-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. set_foo() and get_foo() accessor
-functions).
-[This option is specific to the i386 PE targeted port of the linker]
-
-@kindex --disable-auto-import
-@item --disable-auto-import
-Do not attempt to do sophisticated linking of @code{_symbol} to
-@code{__imp__symbol} for DATA imports from DLLs.
-[This option is specific to the i386 PE targeted port of the linker]
-
-@kindex --enable-runtime-pseudo-reloc
-@item --enable-runtime-pseudo-reloc
-If your code contains expressions described in --enable-auto-import section,
-that is, DATA imports from DLL 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 PE targeted port of the linker]
-
-@kindex --disable-runtime-pseudo-reloc
-@item --disable-runtime-pseudo-reloc
-Do not create pseudo relocations for non-zero offset DATA imports from
-DLLs. This is the default.
-[This option is specific to the i386 PE targeted port of the linker]
-
-@kindex --enable-extra-pe-debug
-@item --enable-extra-pe-debug
-Show additional debug info related to auto-import symbol thunking.
-[This option is specific to the i386 PE targeted port of the linker]
-
-@kindex --section-alignment
-@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 PE targeted port of the linker]
-
-@cindex stack size
-@kindex --stack
-@item --stack @var{reserve}
-@itemx --stack @var{reserve},@var{commit}
-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 PE targeted port of the linker]
-
-@kindex --subsystem
-@item --subsystem @var{which}
-@itemx --subsystem @var{which}:@var{major}
-@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.
-[This option is specific to the i386 PE targeted port of the linker]
-
-@end table
-
-@c man end
-
-@ifset UsesEnvVars
-@node Environment
-@section Environment Variables
-
-@c man begin ENVIRONMENT
-
-You can change the behaviour of @command{ld} with the environment variables
-@ifclear SingleFormat
-@code{GNUTARGET},
-@end ifclear
-@code{LDEMULATION} and @code{COLLECT_NO_DEMANGLE}.
-
-@ifclear SingleFormat
-@kindex GNUTARGET
-@cindex default input format
-@code{GNUTARGET} determines the input-file object format if you don't
-use @samp{-b} (or its synonym @samp{--format}). Its value should be one
-of the BFD names for an input format (@pxref{BFD}). If there is no
-@code{GNUTARGET} in the environment, @command{ld} uses the natural format
-of the target. If @code{GNUTARGET} is set to @code{default} then BFD
-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
-BFD on each system places the conventional format for that system first
-in the search-list, so ambiguities are resolved in favor of convention.
-@end ifclear
-
-@kindex LDEMULATION
-@cindex default emulation
-@cindex emulation, default
-@code{LDEMULATION} determines the default emulation if you don't use the
-@samp{-m} option. The emulation can affect various aspects of linker
-behaviour, particularly the default linker script. You can list the
-available emulations with the @samp{--verbose} or @samp{-V} options. If
-the @samp{-m} option is not used, and the @code{LDEMULATION} environment
-variable is not defined, the default emulation depends upon how the
-linker was configured.
-
-@kindex COLLECT_NO_DEMANGLE
-@cindex demangling, default
-Normally, the linker will default to demangling symbols. However, if
-@code{COLLECT_NO_DEMANGLE} is set in the environment, then it will
-default to not demangling symbols. This environment variable is used in
-a similar fashion by the @code{gcc} linker wrapper program. The default
-may be overridden by the @samp{--demangle} and @samp{--no-demangle}
-options.
-
-@c man end
-@end ifset
-
-@node Scripts
-@chapter Linker Scripts
-
-@cindex scripts
-@cindex linker scripts
-@cindex command files
-Every link is controlled by a @dfn{linker script}. This script is
-written in the linker command language.
-
-The main purpose of the linker script is to describe how the sections in
-the input files should be mapped into the output file, and to control
-the memory layout of the output file. Most linker scripts do nothing
-more than this. However, when necessary, the linker script can also
-direct the linker to perform many other operations, using the commands
-described below.
-
-The linker always uses a linker script. If you do not supply one
-yourself, the linker will use a default script that is compiled into the
-linker executable. You can use the @samp{--verbose} command line option
-to display the default linker script. Certain command line options,
-such as @samp{-r} or @samp{-N}, will affect the default linker script.
-
-You may supply your own linker script by using the @samp{-T} command
-line option. When you do this, your linker script will replace the
-default linker script.
-
-You may also use linker scripts implicitly by naming them as input files
-to the linker, as though they were files to be linked. @xref{Implicit
-Linker Scripts}.
-
-@menu
-* Basic Script Concepts:: Basic Linker Script Concepts
-* Script Format:: Linker Script Format
-* Simple Example:: Simple Linker Script Example
-* Simple Commands:: Simple Linker Script Commands
-* Assignments:: Assigning Values to Symbols
-* SECTIONS:: SECTIONS Command
-* MEMORY:: MEMORY Command
-* PHDRS:: PHDRS Command
-* VERSION:: VERSION Command
-* Expressions:: Expressions in Linker Scripts
-* Implicit Linker Scripts:: Implicit Linker Scripts
-@end menu
-
-@node Basic Script Concepts
-@section Basic Linker Script Concepts
-@cindex linker script concepts
-We need to define some basic concepts and vocabulary in order to
-describe the linker script language.
-
-The linker combines input files into a single output file. The output
-file and each input file are in a special data format known as an
-@dfn{object file format}. Each file is called an @dfn{object file}.
-The output file is often called an @dfn{executable}, but for our
-purposes we will also call it an object file. Each object file has,
-among other things, a list of @dfn{sections}. We sometimes refer to a
-section in an input file as an @dfn{input section}; similarly, a section
-in the output file is an @dfn{output section}.
-
-Each section in an object file has a name and a size. Most sections
-also have an associated block of data, known as the @dfn{section
-contents}. A section may be marked as @dfn{loadable}, which mean that
-the contents should be loaded into memory when the output file is run.
-A section with no contents may be @dfn{allocatable}, which means that an
-area in memory should be set aside, but nothing in particular should be
-loaded there (in some cases this memory must be zeroed out). A section
-which is neither loadable nor allocatable typically contains some sort
-of debugging information.
-
-Every loadable or allocatable output section has two addresses. The
-first is the @dfn{VMA}, or virtual memory address. This is the address
-the section will have when the output file is run. The second is the
-@dfn{LMA}, or load memory address. This is the address at which the
-section will be loaded. In most cases the two addresses will be the
-same. An example of when they might be different is when a data section
-is loaded into ROM, and then copied into RAM when the program starts up
-(this technique is often used to initialize global variables in a ROM
-based system). In this case the ROM address would be the LMA, and the
-RAM address would be the VMA.
-
-You can see the sections in an object file by using the @code{objdump}
-program with the @samp{-h} option.
-
-Every object file also has a list of @dfn{symbols}, known as the
-@dfn{symbol table}. A symbol may be defined or undefined. Each symbol
-has a name, and each defined symbol has an address, among other
-information. If you compile a C or C++ program into an object file, you
-will get a defined symbol for every defined function and global or
-static variable. Every undefined function or global variable which is
-referenced in the input file will become an undefined symbol.
-
-You can see the symbols in an object file by using the @code{nm}
-program, or by using the @code{objdump} program with the @samp{-t}
-option.
-
-@node Script Format
-@section Linker Script Format
-@cindex linker script format
-Linker scripts are text files.
-
-You write a linker script as a series of commands. Each command is
-either a keyword, possibly followed by arguments, or an assignment to a
-symbol. You may separate commands using semicolons. Whitespace is
-generally ignored.
-
-Strings such as file or format names can normally be entered directly.
-If the file name contains a character such as a comma which would
-otherwise serve to separate file names, you may put the file name in
-double quotes. There is no way to use a double quote character in a
-file name.
-
-You may include comments in linker scripts just as in C, delimited by
-@samp{/*} and @samp{*/}. As in C, comments are syntactically equivalent
-to whitespace.
-
-@node Simple Example
-@section Simple Linker Script Example
-@cindex linker script example
-@cindex example of linker script
-Many linker scripts are fairly simple.
-
-The simplest possible linker script has just one command:
-@samp{SECTIONS}. You use the @samp{SECTIONS} command to describe the
-memory layout of the output file.
-
-The @samp{SECTIONS} command is a powerful command. Here we will
-describe a simple use of it. Let's assume your program consists only of
-code, initialized data, and uninitialized data. These will be in the
-@samp{.text}, @samp{.data}, and @samp{.bss} sections, respectively.
-Let's assume further that these are the only sections which appear in
-your input files.
-
-For this example, let's say that the code should be loaded at address
-0x10000, and that the data should start at address 0x8000000. Here is a
-linker script which will do that:
-@smallexample
-SECTIONS
-@{
- . = 0x10000;
- .text : @{ *(.text) @}
- . = 0x8000000;
- .data : @{ *(.data) @}
- .bss : @{ *(.bss) @}
-@}
-@end smallexample
-
-You write the @samp{SECTIONS} command as the keyword @samp{SECTIONS},
-followed by a series of symbol assignments and output section
-descriptions enclosed in curly braces.
-
-The first line inside the @samp{SECTIONS} command of the above example
-sets the value of the special symbol @samp{.}, which is the location
-counter. If you do not specify the address of an output section in some
-other way (other ways are described later), the address is set from the
-current value of the location counter. The location counter is then
-incremented by the size of the output section. At the start of the
-@samp{SECTIONS} command, the location counter has the value @samp{0}.
-
-The second line defines an output section, @samp{.text}. The colon is
-required syntax which may be ignored for now. Within the curly braces
-after the output section name, you list the names of the input sections
-which should be placed into this output section. The @samp{*} is a
-wildcard which matches any file name. The expression @samp{*(.text)}
-means all @samp{.text} input sections in all input files.
-
-Since the location counter is @samp{0x10000} when the output section
-@samp{.text} is defined, the linker will set the address of the
-@samp{.text} section in the output file to be @samp{0x10000}.
-
-The remaining lines define the @samp{.data} and @samp{.bss} sections in
-the output file. The linker will place the @samp{.data} output section
-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
-
-The linker will ensure that each output section has the required
-alignment, by increasing the location counter if necessary. In this
-example, the specified addresses for the @samp{.text} and @samp{.data}
-sections will probably satisfy any alignment constraints, but the linker
-may have to create a small gap between the @samp{.data} and @samp{.bss}
-sections.
-
-That's it! That's a simple and complete linker script.
-
-@node Simple Commands
-@section Simple Linker Script Commands
-@cindex linker script simple commands
-In this section we describe the simple linker script commands.
-
-@menu
-* Entry Point:: Setting the entry point
-* File Commands:: Commands dealing with files
-@ifclear SingleFormat
-* Format Commands:: Commands dealing with object file formats
-@end ifclear
-
-* Miscellaneous Commands:: Other linker script commands
-@end menu
-
-@node Entry Point
-@subsection Setting the Entry Point
-@kindex ENTRY(@var{symbol})
-@cindex start of execution
-@cindex first instruction
-@cindex entry point
-The first instruction to execute in a program is called the @dfn{entry
-point}. You can use the @code{ENTRY} linker script command to set the
-entry point. The argument is a symbol name:
-@smallexample
-ENTRY(@var{symbol})
-@end smallexample
-
-There are several ways to set the entry point. The linker will set the
-entry point by trying each of the following methods in order, and
-stopping when one of them succeeds:
-@itemize @bullet
-@item
-the @samp{-e} @var{entry} command-line option;
-@item
-the @code{ENTRY(@var{symbol})} command in a linker script;
-@item
-the value of the symbol @code{start}, if defined;
-@item
-the address of the first byte of the @samp{.text} section, if present;
-@item
-The address @code{0}.
-@end itemize
-
-@node File Commands
-@subsection Commands Dealing with Files
-@cindex linker script file commands
-Several linker script commands deal with files.
-
-@table @code
-@item INCLUDE @var{filename}
-@kindex INCLUDE @var{filename}
-@cindex including a linker script
-Include the linker script @var{filename} at this point. The file will
-be searched for in the current directory, and in any directory specified
-with the @option{-L} option. You can nest calls to @code{INCLUDE} up to
-10 levels deep.
-
-@item INPUT(@var{file}, @var{file}, @dots{})
-@itemx INPUT(@var{file} @var{file} @dots{})
-@kindex INPUT(@var{files})
-@cindex input files in linker scripts
-@cindex input object files in linker scripts
-@cindex linker script input object files
-The @code{INPUT} command directs the linker to include the named files
-in the link, as though they were named on the command line.
-
-For example, if you always want to include @file{subr.o} any time you do
-a link, but you can't be bothered to put it on every link command line,
-then you can put @samp{INPUT (subr.o)} in your linker script.
-
-In fact, if you like, you can list all of your input files in the linker
-script, and then invoke the linker with nothing but a @samp{-T} option.
-
-In case a @dfn{sysroot prefix} is configured, and the filename starts
-with the @samp{/} character, and the script being processed was
-located inside the @dfn{sysroot prefix}, the filename will be looked
-for in the @dfn{sysroot prefix}. Otherwise, the linker will try to
-open the file in the current directory. If it is not found, the
-linker will search through the archive library search path. See the
-description of @samp{-L} in @ref{Options,,Command Line Options}.
-
-If you use @samp{INPUT (-l@var{file})}, @command{ld} will transform the
-name to @code{lib@var{file}.a}, as with the command line argument
-@samp{-l}.
-
-When you use the @code{INPUT} command in an implicit linker script, the
-files will be included in the link at the point at which the linker
-script file is included. This can affect archive searching.
-
-@item GROUP(@var{file}, @var{file}, @dots{})
-@itemx GROUP(@var{file} @var{file} @dots{})
-@kindex GROUP(@var{files})
-@cindex grouping input files
-The @code{GROUP} command is like @code{INPUT}, except that the named
-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 OUTPUT(@var{filename})
-@kindex OUTPUT(@var{filename})
-@cindex output file name in linker scripot
-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
-Line Options}). If both are used, the command line option takes
-precedence.
-
-You can use the @code{OUTPUT} command to define a default name for the
-output file other than the usual default of @file{a.out}.
-
-@item SEARCH_DIR(@var{path})
-@kindex SEARCH_DIR(@var{path})
-@cindex library search path in linker script
-@cindex archive search path in linker script
-@cindex search path in linker script
-The @code{SEARCH_DIR} command adds @var{path} to the list of paths where
-@command{ld} looks for archive libraries. Using
-@code{SEARCH_DIR(@var{path})} is exactly like using @samp{-L @var{path}}
-on the command line (@pxref{Options,,Command Line Options}). If both
-are used, then the linker will search both paths. Paths specified using
-the command line option are searched first.
-
-@item STARTUP(@var{filename})
-@kindex STARTUP(@var{filename})
-@cindex first input file
-The @code{STARTUP} command is just like the @code{INPUT} command, except
-that @var{filename} will become the first input file to be linked, as
-though it were specified first on the command line. This may be useful
-when using a system in which the entry point is always the start of the
-first file.
-@end table
-
-@ifclear SingleFormat
-@node Format Commands
-@subsection Commands Dealing with Object File Formats
-A couple of linker script commands deal with object file formats.
-
-@table @code
-@item OUTPUT_FORMAT(@var{bfdname})
-@itemx OUTPUT_FORMAT(@var{default}, @var{big}, @var{little})
-@kindex OUTPUT_FORMAT(@var{bfdname})
-@cindex output file format in linker script
-The @code{OUTPUT_FORMAT} command names the BFD format to use for the
-output file (@pxref{BFD}). Using @code{OUTPUT_FORMAT(@var{bfdname})} is
-exactly like using @samp{--oformat @var{bfdname}} on the command line
-(@pxref{Options,,Command Line Options}). If both are used, the command
-line option takes precedence.
-
-You can use @code{OUTPUT_FORMAT} with three arguments to use different
-formats based on the @samp{-EB} and @samp{-EL} command line options.
-This permits the linker script to set the output format based on the
-desired endianness.
-
-If neither @samp{-EB} nor @samp{-EL} are used, then the output format
-will be the first argument, @var{default}. If @samp{-EB} is used, the
-output format will be the second argument, @var{big}. If @samp{-EL} is
-used, the output format will be the third argument, @var{little}.
-
-For example, the default linker script for the MIPS ELF target uses this
-command:
-@smallexample
-OUTPUT_FORMAT(elf32-bigmips, elf32-bigmips, elf32-littlemips)
-@end smallexample
-This says that the default format for the output file is
-@samp{elf32-bigmips}, but if the user uses the @samp{-EL} command line
-option, the output file will be created in the @samp{elf32-littlemips}
-format.
-
-@item TARGET(@var{bfdname})
-@kindex TARGET(@var{bfdname})
-@cindex input file format in linker script
-The @code{TARGET} command names the BFD format to use when reading input
-files. It affects subsequent @code{INPUT} and @code{GROUP} commands.
-This command is like using @samp{-b @var{bfdname}} on the command line
-(@pxref{Options,,Command Line Options}). If the @code{TARGET} command
-is used but @code{OUTPUT_FORMAT} is not, then the last @code{TARGET}
-command is also used to set the format for the output file. @xref{BFD}.
-@end table
-@end ifclear
-
-@node Miscellaneous Commands
-@subsection Other Linker Script Commands
-There are a few other linker scripts commands.
-
-@table @code
-@item ASSERT(@var{exp}, @var{message})
-@kindex ASSERT
-@cindex assertion in linker script
-Ensure that @var{exp} is non-zero. If it is zero, then exit the linker
-with an error code, and print @var{message}.
-
-@item EXTERN(@var{symbol} @var{symbol} @dots{})
-@kindex EXTERN
-@cindex undefined symbol in linker script
-Force @var{symbol} to be entered in the output file as an undefined
-symbol. Doing this may, for example, trigger linking of additional
-modules from standard libraries. You may list several @var{symbol}s for
-each @code{EXTERN}, and you may use @code{EXTERN} multiple times. This
-command has the same effect as the @samp{-u} command-line option.
-
-@item FORCE_COMMON_ALLOCATION
-@kindex FORCE_COMMON_ALLOCATION
-@cindex common allocation in linker script
-This command has the same effect as the @samp{-d} command-line option:
-to make @command{ld} assign space to common symbols even if a relocatable
-output file is specified (@samp{-r}).
-
-@item INHIBIT_COMMON_ALLOCATION
-@kindex INHIBIT_COMMON_ALLOCATION
-@cindex common allocation in linker script
-This command has the same effect as the @samp{--no-define-common}
-command-line option: to make @code{ld} omit the assignment of addresses
-to common symbols even for a non-relocatable output file.
-
-@item NOCROSSREFS(@var{section} @var{section} @dots{})
-@kindex NOCROSSREFS(@var{sections})
-@cindex cross references
-This command may be used to tell @command{ld} to issue an error about any
-references among certain output sections.
-
-In certain types of programs, particularly on embedded systems when
-using overlays, when one section is loaded into memory, another section
-will not be. Any direct references between the two sections would be
-errors. For example, it would be an error if code in one section called
-a function defined in the other section.
-
-The @code{NOCROSSREFS} command takes a list of output section names. If
-@command{ld} detects any cross references between the sections, it reports
-an error and returns a non-zero exit status. Note that the
-@code{NOCROSSREFS} command uses output section names, not input section
-names.
-
-@ifclear SingleFormat
-@item OUTPUT_ARCH(@var{bfdarch})
-@kindex OUTPUT_ARCH(@var{bfdarch})
-@cindex machine architecture
-@cindex architecture
-Specify a particular output machine architecture. The argument is one
-of the names used by the BFD library (@pxref{BFD}). You can see the
-architecture of an object file by using the @code{objdump} program with
-the @samp{-f} option.
-@end ifclear
-@end table
-
-@node Assignments
-@section Assigning Values to Symbols
-@cindex assignment in scripts
-@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.
-
-@menu
-* Simple Assignments:: Simple Assignments
-* PROVIDE:: PROVIDE
-@end menu
-
-@node Simple Assignments
-@subsection Simple Assignments
-
-You may assign to a symbol using any of the C assignment operators:
-
-@table @code
-@item @var{symbol} = @var{expression} ;
-@itemx @var{symbol} += @var{expression} ;
-@itemx @var{symbol} -= @var{expression} ;
-@itemx @var{symbol} *= @var{expression} ;
-@itemx @var{symbol} /= @var{expression} ;
-@itemx @var{symbol} <<= @var{expression} ;
-@itemx @var{symbol} >>= @var{expression} ;
-@itemx @var{symbol} &= @var{expression} ;
-@itemx @var{symbol} |= @var{expression} ;
-@end table
-
-The first case will define @var{symbol} to the value of
-@var{expression}. In the other cases, @var{symbol} must already be
-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.
-
-The semicolon after @var{expression} is required.
-
-Expressions are defined below; see @ref{Expressions}.
-
-You may write symbol assignments as commands in their own right, or as
-statements within a @code{SECTIONS} command, or as part of an output
-section description in a @code{SECTIONS} command.
-
-The section of the symbol will be set from the section of the
-expression; for more information, see @ref{Expression Section}.
-
-Here is an example showing the three different places that symbol
-assignments may be used:
-
-@smallexample
-floating_point = 0;
-SECTIONS
-@{
- .text :
- @{
- *(.text)
- _etext = .;
- @}
- _bdata = (. + 3) & ~ 3;
- .data : @{ *(.data) @}
-@}
-@end smallexample
-@noindent
-In this example, the symbol @samp{floating_point} will be defined as
-zero. The symbol @samp{_etext} will be defined as the address following
-the last @samp{.text} input section. The symbol @samp{_bdata} will be
-defined as the address following the @samp{.text} output section aligned
-upward to a 4 byte boundary.
-
-@node PROVIDE
-@subsection PROVIDE
-@cindex PROVIDE
-In some cases, it is desirable for a linker script to define a symbol
-only if it is referenced and is not defined by any object included in
-the link. For example, traditional linkers defined the symbol
-@samp{etext}. However, ANSI C requires that the user be able to use
-@samp{etext} as a function name without encountering an error. The
-@code{PROVIDE} keyword may be used to define a symbol, such as
-@samp{etext}, only if it is referenced but not defined. The syntax is
-@code{PROVIDE(@var{symbol} = @var{expression})}.
-
-Here is an example of using @code{PROVIDE} to define @samp{etext}:
-@smallexample
-SECTIONS
-@{
- .text :
- @{
- *(.text)
- _etext = .;
- PROVIDE(etext = .);
- @}
-@}
-@end smallexample
-
-In this example, if the program defines @samp{_etext} (with a leading
-underscore), the linker will give a multiple definition error. If, on
-the other hand, the program defines @samp{etext} (with no leading
-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 SECTIONS
-@section SECTIONS Command
-@kindex SECTIONS
-The @code{SECTIONS} command tells the linker how to map input sections
-into output sections, and how to place the output sections in memory.
-
-The format of the @code{SECTIONS} command is:
-@smallexample
-SECTIONS
-@{
- @var{sections-command}
- @var{sections-command}
- @dots{}
-@}
-@end smallexample
-
-Each @var{sections-command} may of be one of the following:
-
-@itemize @bullet
-@item
-an @code{ENTRY} command (@pxref{Entry Point,,Entry command})
-@item
-a symbol assignment (@pxref{Assignments})
-@item
-an output section description
-@item
-an overlay description
-@end itemize
-
-The @code{ENTRY} command and symbol assignments are permitted inside the
-@code{SECTIONS} command for convenience in using the location counter in
-those commands. This can also make the linker script easier to
-understand because you can use those commands at meaningful points in
-the layout of the output file.
-
-Output section descriptions and overlay descriptions are described
-below.
-
-If you do not use a @code{SECTIONS} command in your linker script, the
-linker will place each input section into an identically named output
-section in the order that the sections are first encountered in the
-input files. If all input sections are present in the first file, for
-example, the order of sections in the output file will match the order
-in the first input file. The first section will be at address zero.
-
-@menu
-* Output Section Description:: Output section description
-* Output Section Name:: Output section name
-* Output Section Address:: Output section address
-* Input Section:: Input section description
-* Output Section Data:: Output section data
-* Output Section Keywords:: Output section keywords
-* Output Section Discarding:: Output section discarding
-* Output Section Attributes:: Output section attributes
-* Overlay Description:: Overlay description
-@end menu
-
-@node Output Section Description
-@subsection Output Section Description
-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})]
- @{
- @var{output-section-command}
- @var{output-section-command}
- @dots{}
- @} [>@var{region}] [AT>@var{lma_region}] [:@var{phdr} :@var{phdr} @dots{}] [=@var{fillexp}]
-@end group
-@end smallexample
-
-Most output sections do not use most of the optional section attributes.
-
-The whitespace around @var{section} is required, so that the section
-name is unambiguous. The colon and the curly braces are also required.
-The line breaks and other white space are optional.
-
-Each @var{output-section-command} may be one of the following:
-
-@itemize @bullet
-@item
-a symbol assignment (@pxref{Assignments})
-@item
-an input section description (@pxref{Input Section})
-@item
-data values to include directly (@pxref{Output Section Data})
-@item
-a special output section keyword (@pxref{Output Section Keywords})
-@end itemize
-
-@node Output Section Name
-@subsection Output Section Name
-@cindex name, section
-@cindex section name
-The name of the output section is @var{section}. @var{section} must
-meet the constraints of your output format. In formats which only
-support a limited number of sections, such as @code{a.out}, the name
-must be one of the names supported by the format (@code{a.out}, for
-example, allows only @samp{.text}, @samp{.data} or @samp{.bss}). If the
-output format supports any number of sections, but with numbers and not
-names (as is the case for Oasys), the name should be supplied as a
-quoted numeric string. A section name may consist of any sequence of
-characters, but a name which contains any unusual characters such as
-commas must be quoted.
-
-The output section name @samp{/DISCARD/} is special; @ref{Output Section
-Discarding}.
-
-@node Output Section Address
-@subsection Output Section Description
-@cindex address, section
-@cindex section address
-The @var{address} is an expression for the VMA (the virtual memory
-address) of the output section. If you do not provide @var{address},
-the linker will set it based on @var{region} if present, or otherwise
-based on the current value of the location counter.
-
-If you provide @var{address}, the address of the output section will be
-set to precisely that. If you provide neither @var{address} nor
-@var{region}, then the address of the output section will be set to the
-current value of the location counter aligned to the alignment
-requirements of the output section. The alignment requirement of the
-output section is the strictest alignment of any input section contained
-within the output section.
-
-For example,
-@smallexample
-.text . : @{ *(.text) @}
-@end smallexample
-@noindent
-and
-@smallexample
-.text : @{ *(.text) @}
-@end smallexample
-@noindent
-are subtly different. The first will set the address of the
-@samp{.text} output section to the current value of the location
-counter. The second will set it to the current value of the location
-counter aligned to the strictest alignment of a @samp{.text} input
-section.
-
-The @var{address} may be an arbitrary expression; @ref{Expressions}.
-For example, if you want to align the section on a 0x10 byte boundary,
-so that the lowest four bits of the section address are zero, you could
-do something like this:
-@smallexample
-.text ALIGN(0x10) : @{ *(.text) @}
-@end smallexample
-@noindent
-This works because @code{ALIGN} returns the current location counter
-aligned upward to the specified value.
-
-Specifying @var{address} for a section will change the value of the
-location counter.
-
-@node Input Section
-@subsection Input Section Description
-@cindex input sections
-@cindex mapping input sections to output sections
-The most common output section command is an input section description.
-
-The input section description is the most basic linker script operation.
-You use output sections to tell the linker how to lay out your program
-in memory. You use input section descriptions to tell the linker how to
-map the input files into your memory layout.
-
-@menu
-* Input Section Basics:: Input section basics
-* Input Section Wildcards:: Input section wildcard patterns
-* Input Section Common:: Input section for common symbols
-* Input Section Keep:: Input section and garbage collection
-* Input Section Example:: Input section example
-@end menu
-
-@node Input Section Basics
-@subsubsection Input Section Basics
-@cindex input section basics
-An input section description consists of a file name optionally followed
-by a list of section names in parentheses.
-
-The file name and the section name may be wildcard patterns, which we
-describe further below (@pxref{Input Section Wildcards}).
-
-The most common input section description is to include all input
-sections with a particular name in the output section. For example, to
-include all input @samp{.text} sections, you would write:
-@smallexample
-*(.text)
-@end smallexample
-@noindent
-Here the @samp{*} is a wildcard which matches any file name. To exclude a list
-of files from matching the file name wildcard, EXCLUDE_FILE may be used to
-match all files except the ones specified in the EXCLUDE_FILE list. For
-example:
-@smallexample
-(*(EXCLUDE_FILE (*crtend.o *otherfile.o) .ctors))
-@end smallexample
-will cause all .ctors sections from all files except @file{crtend.o} and
-@file{otherfile.o} to be included.
-
-There are two ways to include more than one section:
-@smallexample
-*(.text .rdata)
-*(.text) *(.rdata)
-@end smallexample
-@noindent
-The difference between these is the order in which the @samp{.text} and
-@samp{.rdata} input sections will appear in the output section. In the
-first example, they will be intermingled, appearing in the same order as
-they are found in the linker input. In the second example, all
-@samp{.text} input sections will appear first, followed by all
-@samp{.rdata} input sections.
-
-You can specify a file name to include sections from a particular file.
-You would do this if one or more of your files contain special data that
-needs to be at a particular location in memory. For example:
-@smallexample
-data.o(.data)
-@end smallexample
-
-If you use a file name without a list of sections, then all sections in
-the input file will be included in the output section. This is not
-commonly done, but it may by useful on occasion. For example:
-@smallexample
-data.o
-@end smallexample
-
-When you use a file name which does not contain any wild card
-characters, the linker will first see if you also specified the file
-name on the linker command line or in an @code{INPUT} command. If you
-did not, the linker will attempt to open the file as an input file, as
-though it appeared on the command line. Note that this differs from an
-@code{INPUT} command, because the linker will not search for the file in
-the archive search path.
-
-@node Input Section Wildcards
-@subsubsection Input Section Wildcard Patterns
-@cindex input section wildcards
-@cindex wildcard file name patterns
-@cindex file name wildcard patterns
-@cindex section name wildcard patterns
-In an input section description, either the file name or the section
-name or both may be wildcard patterns.
-
-The file name of @samp{*} seen in many examples is a simple wildcard
-pattern for the file name.
-
-The wildcard patterns are like those used by the Unix shell.
-
-@table @samp
-@item *
-matches any number of characters
-@item ?
-matches any single character
-@item [@var{chars}]
-matches a single instance of any of the @var{chars}; the @samp{-}
-character may be used to specify a range of characters, as in
-@samp{[a-z]} to match any lower case letter
-@item \
-quotes the following character
-@end table
-
-When a file name is matched with a wildcard, the wildcard characters
-will not match a @samp{/} character (used to separate directory names on
-Unix). A pattern consisting of a single @samp{*} character is an
-exception; it will always match any file name, whether it contains a
-@samp{/} or not. In a section name, the wildcard characters will match
-a @samp{/} character.
-
-File name wildcard patterns only match files which are explicitly
-specified on the command line or in an @code{INPUT} command. The linker
-does not search directories to expand wildcards.
-
-If a file name matches more than one wildcard pattern, or if a file name
-appears explicitly and is also matched by a wildcard pattern, the linker
-will use the first match in the linker script. For example, this
-sequence of input section descriptions is probably in error, because the
-@file{data.o} rule will not be used:
-@smallexample
-.data : @{ *(.data) @}
-.data1 : @{ data.o(.data) @}
-@end smallexample
-
-@cindex SORT
-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
-into ascending order by name before placing them in the output file.
-
-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.
-
-This example shows how wildcard patterns might be used to partition
-files. This linker script directs the linker to place all @samp{.text}
-sections in @samp{.text} and all @samp{.bss} sections in @samp{.bss}.
-The linker will place the @samp{.data} section from all files beginning
-with an upper case character in @samp{.DATA}; for all other files, the
-linker will place the @samp{.data} section in @samp{.data}.
-@smallexample
-@group
-SECTIONS @{
- .text : @{ *(.text) @}
- .DATA : @{ [A-Z]*(.data) @}
- .data : @{ *(.data) @}
- .bss : @{ *(.bss) @}
-@}
-@end group
-@end smallexample
-
-@node Input Section Common
-@subsubsection Input Section for Common Symbols
-@cindex common symbol placement
-@cindex uninitialized data placement
-A special notation is needed for common symbols, because in many object
-file formats common symbols do not have a particular input section. The
-linker treats common symbols as though they are in an input section
-named @samp{COMMON}.
-
-You may use file names with the @samp{COMMON} section just as with any
-other input sections. You can use this to place common symbols from a
-particular input file in one section while common symbols from other
-input files are placed in another section.
-
-In most cases, common symbols in input files will be placed in the
-@samp{.bss} section in the output file. For example:
-@smallexample
-.bss @{ *(.bss) *(COMMON) @}
-@end smallexample
-
-@cindex scommon section
-@cindex small common symbols
-Some object file formats have more than one type of common symbol. For
-example, the MIPS ELF object file format distinguishes standard common
-symbols and small common symbols. In this case, the linker will use a
-different special section name for other types of common symbols. In
-the case of MIPS ELF, the linker uses @samp{COMMON} for standard common
-symbols and @samp{.scommon} for small common symbols. This permits you
-to map the different types of common symbols into memory at different
-locations.
-
-@cindex [COMMON]
-You will sometimes see @samp{[COMMON]} in old linker scripts. This
-notation is now considered obsolete. It is equivalent to
-@samp{*(COMMON)}.
-
-@node Input Section Keep
-@subsubsection Input Section and Garbage Collection
-@cindex KEEP
-@cindex garbage collection
-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))}.
-
-@node Input Section Example
-@subsubsection Input Section Example
-The following example is a complete linker script. It tells the linker
-to read all of the sections from file @file{all.o} and place them at the
-start of output section @samp{outputa} which starts at location
-@samp{0x10000}. All of section @samp{.input1} from file @file{foo.o}
-follows immediately, in the same output section. All of section
-@samp{.input2} from @file{foo.o} goes into output section
-@samp{outputb}, followed by section @samp{.input1} from @file{foo1.o}.
-All of the remaining @samp{.input1} and @samp{.input2} sections from any
-files are written to output section @samp{outputc}.
-
-@smallexample
-@group
-SECTIONS @{
- outputa 0x10000 :
- @{
- all.o
- foo.o (.input1)
- @}
-@end group
-@group
- outputb :
- @{
- foo.o (.input2)
- foo1.o (.input1)
- @}
-@end group
-@group
- outputc :
- @{
- *(.input1)
- *(.input2)
- @}
-@}
-@end group
-@end smallexample
-
-@node Output Section Data
-@subsection Output Section Data
-@cindex data
-@cindex section data
-@cindex output section data
-@kindex BYTE(@var{expression})
-@kindex SHORT(@var{expression})
-@kindex LONG(@var{expression})
-@kindex QUAD(@var{expression})
-@kindex SQUAD(@var{expression})
-You can include explicit bytes of data in an output section by using
-@code{BYTE}, @code{SHORT}, @code{LONG}, @code{QUAD}, or @code{SQUAD} as
-an output section command. Each keyword is followed by an expression in
-parentheses providing the value to store (@pxref{Expressions}). The
-value of the expression is stored at the current value of the location
-counter.
-
-The @code{BYTE}, @code{SHORT}, @code{LONG}, and @code{QUAD} commands
-store one, two, four, and eight bytes (respectively). After storing the
-bytes, the location counter is incremented by the number of bytes
-stored.
-
-For example, this will store the byte 1 followed by the four byte value
-of the symbol @samp{addr}:
-@smallexample
-BYTE(1)
-LONG(addr)
-@end smallexample
-
-When using a 64 bit host or target, @code{QUAD} and @code{SQUAD} are the
-same; they both store an 8 byte, or 64 bit, value. When both host and
-target are 32 bits, an expression is computed as 32 bits. In this case
-@code{QUAD} stores a 32 bit value zero extended to 64 bits, and
-@code{SQUAD} stores a 32 bit value sign extended to 64 bits.
-
-If the object file format of the output file has an explicit endianness,
-which is the normal case, the value will be stored in that endianness.
-When the object file format does not have an explicit endianness, as is
-true of, for example, S-records, the value will be stored in the
-endianness of the first input object file.
-
-Note---these commands only work inside a section description and not
-between them, so the following will produce an error from the linker:
-@smallexample
-SECTIONS @{@ .text : @{@ *(.text) @}@ LONG(1) .data : @{@ *(.data) @}@ @}@
-@end smallexample
-whereas this will work:
-@smallexample
-SECTIONS @{@ .text : @{@ *(.text) ; LONG(1) @}@ .data : @{@ *(.data) @}@ @}@
-@end smallexample
-
-@kindex FILL(@var{expression})
-@cindex holes, filling
-@cindex unspecified memory
-You may use the @code{FILL} command to set the fill pattern for the
-current section. It is followed by an expression in parentheses. Any
-otherwise unspecified regions of memory within the section (for example,
-gaps left due to the required alignment of input sections) are filled
-with the value of the expression, repeated as
-necessary. A @code{FILL} statement covers memory locations after the
-point at which it occurs in the section definition; by including more
-than one @code{FILL} statement, you can have different fill patterns in
-different parts of an output section.
-
-This example shows how to fill unspecified regions of memory with the
-value @samp{0x90}:
-@smallexample
-FILL(0x90909090)
-@end smallexample
-
-The @code{FILL} command is similar to the @samp{=@var{fillexp}} output
-section attribute, but it only affects the
-part of the section following the @code{FILL} command, rather than the
-entire section. If both are used, the @code{FILL} command takes
-precedence. @xref{Output Section Fill}, for details on the fill
-expression.
-
-@node Output Section Keywords
-@subsection Output Section Keywords
-There are a couple of keywords which can appear as output section
-commands.
-
-@table @code
-@kindex CREATE_OBJECT_SYMBOLS
-@cindex input filename symbols
-@cindex filename symbols
-@item CREATE_OBJECT_SYMBOLS
-The command tells the linker to create a symbol for each input file.
-The name of each symbol will be the name of the corresponding input
-file. The section of each symbol will be the output section in which
-the @code{CREATE_OBJECT_SYMBOLS} command appears.
-
-This is conventional for the a.out object file format. It is not
-normally used for any other object file format.
-
-@kindex CONSTRUCTORS
-@cindex C++ constructors, arranging in link
-@cindex constructors, arranging in link
-@item CONSTRUCTORS
-When linking using the a.out object file format, the linker uses an
-unusual set construct to support C++ global constructors and
-destructors. When linking object file formats which do not support
-arbitrary sections, such as ECOFF and XCOFF, the linker will
-automatically recognize C++ global constructors and destructors by name.
-For these object file formats, the @code{CONSTRUCTORS} command tells the
-linker to place constructor information in the output section where the
-@code{CONSTRUCTORS} command appears. The @code{CONSTRUCTORS} command is
-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
-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
-formats @sc{gnu} C++ normally calls constructors from a subroutine
-@code{__main}; a call to @code{__main} is automatically inserted into
-the startup code for @code{main}. @sc{gnu} C++ normally runs
-destructors either by using @code{atexit}, or directly from the function
-@code{exit}.
-
-For object file formats such as @code{COFF} or @code{ELF} which support
-arbitrary section names, @sc{gnu} C++ will normally arrange to put the
-addresses of global constructors and destructors into the @code{.ctors}
-and @code{.dtors} sections. Placing the following sequence into your
-linker script will build the sort of table which the @sc{gnu} C++
-runtime code expects to see.
-
-@smallexample
- __CTOR_LIST__ = .;
- LONG((__CTOR_END__ - __CTOR_LIST__) / 4 - 2)
- *(.ctors)
- LONG(0)
- __CTOR_END__ = .;
- __DTOR_LIST__ = .;
- LONG((__DTOR_END__ - __DTOR_LIST__) / 4 - 2)
- *(.dtors)
- LONG(0)
- __DTOR_END__ = .;
-@end smallexample
-
-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
-@samp{*(.dtors)}.
-
-Normally the compiler and linker will handle these issues automatically,
-and you will not need to concern yourself with them. However, you may
-need to consider this if you are using C++ and writing your own linker
-scripts.
-
-@end table
-
-@node Output Section Discarding
-@subsection Output Section Discarding
-@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:
-@smallexample
-.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.
-
-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.
-
-@cindex /DISCARD/
-The special output section name @samp{/DISCARD/} may be used to discard
-input sections. Any input sections which are assigned to an output
-section named @samp{/DISCARD/} are not included in the output file.
-
-@node Output Section Attributes
-@subsection Output Section Attributes
-@cindex output section attributes
-We showed above that the full description of an output section looked
-like this:
-@smallexample
-@group
-@var{section} [@var{address}] [(@var{type})] :
- [AT(@var{lma})] [SUBALIGN(@var{subsection_align})]
- @{
- @var{output-section-command}
- @var{output-section-command}
- @dots{}
- @} [>@var{region}] [AT>@var{lma_region}] [:@var{phdr} :@var{phdr} @dots{}] [=@var{fillexp}]
-@end group
-@end smallexample
-We've already described @var{section}, @var{address}, and
-@var{output-section-command}. In this section we will describe the
-remaining section attributes.
-
-@menu
-* Output Section Type:: Output section type
-* Output Section LMA:: Output section LMA
-* Forced Input Alignment:: Forced Input Alignment
-* Output Section Region:: Output section region
-* Output Section Phdr:: Output section phdr
-* Output Section Fill:: Output section fill
-@end menu
-
-@node Output Section Type
-@subsubsection Output Section Type
-Each output section may have a type. The type is a keyword in
-parentheses. The following types are defined:
-
-@table @code
-@item NOLOAD
-The section should be marked as not loadable, so that it will not be
-loaded into memory when the program is run.
-@item DSECT
-@itemx COPY
-@itemx INFO
-@itemx OVERLAY
-These type names are supported for backward compatibility, and are
-rarely used. They all have the same effect: the section should be
-marked as not allocatable, so that no memory is allocated for the
-section when the program is run.
-@end table
-
-@kindex NOLOAD
-@cindex prevent unnecessary loading
-@cindex loading, preventing
-The linker normally sets the attributes of an output section based on
-the input sections which map into it. You can override this by using
-the section type. For example, in the script sample below, the
-@samp{ROM} section is addressed at memory location @samp{0} and does not
-need to be loaded when the program is run. The contents of the
-@samp{ROM} section will appear in the linker output file as usual.
-@smallexample
-@group
-SECTIONS @{
- ROM 0 (NOLOAD) : @{ @dots{} @}
- @dots{}
-@}
-@end group
-@end smallexample
-
-@node Output Section LMA
-@subsubsection Output Section LMA
-@kindex AT>@var{lma_region}
-@kindex AT(@var{lma})
-@cindex load address
-@cindex section load address
-Every section has a virtual address (VMA) and a load address (LMA); see
-@ref{Basic Script Concepts}. The address expression which may appear in
-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.
-
-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.
-@xref{Output Section Region}.
-
-@cindex ROM initialized data
-@cindex initialized data in ROM
-This feature is designed to make it easy to build a ROM image. For
-example, the following linker script creates three output sections: one
-called @samp{.text}, which starts at @code{0x1000}, one called
-@samp{.mdata}, which is loaded at the end of the @samp{.text} section
-even though its VMA is @code{0x2000}, and one called @samp{.bss} to hold
-uninitialized data at address @code{0x3000}. The symbol @code{_data} is
-defined with the value @code{0x2000}, which shows that the location
-counter holds the VMA value, not the LMA value.
-
-@smallexample
-@group
-SECTIONS
- @{
- .text 0x1000 : @{ *(.text) _etext = . ; @}
- .mdata 0x2000 :
- AT ( ADDR (.text) + SIZEOF (.text) )
- @{ _data = . ; *(.data); _edata = . ; @}
- .bss 0x3000 :
- @{ _bstart = . ; *(.bss) *(COMMON) ; _bend = . ;@}
-@}
-@end group
-@end smallexample
-
-The run-time initialization code for use with a program generated with
-this linker script would include something like the following, to copy
-the initialized data from the ROM image to its runtime address. Notice
-how this code takes advantage of the symbols defined by the linker
-script.
-
-@smallexample
-@group
-extern char _etext, _data, _edata, _bstart, _bend;
-char *src = &_etext;
-char *dst = &_data;
-
-/* ROM has data at end of text; copy it. */
-while (dst < &_edata) @{
- *dst++ = *src++;
-@}
-
-/* Zero bss */
-for (dst = &_bstart; dst< &_bend; dst++)
- *dst = 0;
-@end group
-@end smallexample
-
-@node Forced Input Alignment
-@subsubsection Forced Input Alignment
-@kindex SUBALIGN(@var{subsection_align})
-@cindex forcing input section alignment
-@cindex input section alignment
-You can force input section alignment within an output section by using
-SUBALIGN. The value specified overrides any alignment given by input
-sections, whether larger or smaller.
-
-@node Output Section Region
-@subsubsection Output Section Region
-@kindex >@var{region}
-@cindex section, assigning to memory region
-@cindex memory regions and sections
-You can assign a section to a previously defined region of memory by
-using @samp{>@var{region}}. @xref{MEMORY}.
-
-Here is a simple example:
-@smallexample
-@group
-MEMORY @{ rom : ORIGIN = 0x1000, LENGTH = 0x1000 @}
-SECTIONS @{ ROM : @{ *(.text) @} >rom @}
-@end group
-@end smallexample
-
-@node Output Section Phdr
-@subsubsection Output Section Phdr
-@kindex :@var{phdr}
-@cindex section, assigning to program header
-@cindex program headers and sections
-You can assign a section to a previously defined program segment by
-using @samp{:@var{phdr}}. @xref{PHDRS}. If a section is assigned to
-one or more segments, then all subsequent allocated sections will be
-assigned to those segments as well, unless they use an explicitly
-@code{:@var{phdr}} modifier. You can use @code{:NONE} to tell the
-linker to not put the section in any segment at all.
-
-Here is a simple example:
-@smallexample
-@group
-PHDRS @{ text PT_LOAD ; @}
-SECTIONS @{ .text : @{ *(.text) @} :text @}
-@end group
-@end smallexample
-
-@node Output Section Fill
-@subsubsection Output Section Fill
-@kindex =@var{fillexp}
-@cindex section fill pattern
-@cindex fill pattern, entire section
-You can set the fill pattern for an entire section by using
-@samp{=@var{fillexp}}. @var{fillexp} is an expression
-(@pxref{Expressions}). Any otherwise unspecified regions of memory
-within the output section (for example, gaps left due to the required
-alignment of input sections) will be filled with the value, repeated as
-necessary. If the fill expression is a simple hex number, ie. a string
-of hex digit starting with @samp{0x} and without a trailing @samp{k} or @samp{M}, then
-an arbitrarily long sequence of hex digits can be used to specify the
-fill pattern; Leading zeros become part of the pattern too. For all
-other cases, including extra parentheses or a unary @code{+}, the fill
-pattern is the four least significant bytes of the value of the
-expression. In all cases, the number is big-endian.
-
-You can also change the fill value with a @code{FILL} command in the
-output section commands; (@pxref{Output Section Data}).
-
-Here is a simple example:
-@smallexample
-@group
-SECTIONS @{ .text : @{ *(.text) @} =0x90909090 @}
-@end group
-@end smallexample
-
-@node Overlay Description
-@subsection Overlay Description
-@kindex OVERLAY
-@cindex overlays
-An overlay description provides an easy way to describe sections which
-are to be loaded as part of a single memory image but are to be run at
-the same memory address. At run time, some sort of overlay manager will
-copy the overlaid sections in and out of the runtime memory address as
-required, perhaps by simply manipulating addressing bits. This approach
-can be useful, for example, when a certain region of memory is faster
-than another.
-
-Overlays are described using the @code{OVERLAY} command. The
-@code{OVERLAY} command is used within a @code{SECTIONS} command, like an
-output section description. The full syntax of the @code{OVERLAY}
-command is as follows:
-@smallexample
-@group
-OVERLAY [@var{start}] : [NOCROSSREFS] [AT ( @var{ldaddr} )]
- @{
- @var{secname1}
- @{
- @var{output-section-command}
- @var{output-section-command}
- @dots{}
- @} [:@var{phdr}@dots{}] [=@var{fill}]
- @var{secname2}
- @{
- @var{output-section-command}
- @var{output-section-command}
- @dots{}
- @} [:@var{phdr}@dots{}] [=@var{fill}]
- @dots{}
- @} [>@var{region}] [:@var{phdr}@dots{}] [=@var{fill}]
-@end group
-@end smallexample
-
-Everything is optional except @code{OVERLAY} (a keyword), and each
-section must have a name (@var{secname1} and @var{secname2} above). The
-section definitions within the @code{OVERLAY} construct are identical to
-those within the general @code{SECTIONS} contruct (@pxref{SECTIONS}),
-except that no addresses and no memory regions may be defined for
-sections within an @code{OVERLAY}.
-
-The sections are all defined with the same starting address. The load
-addresses of the sections are arranged such that they are consecutive in
-memory starting at the load address used for the @code{OVERLAY} as a
-whole (as with normal section definitions, the load address is optional,
-and defaults to the start address; the start address is also optional,
-and defaults to the current value of the location counter).
-
-If the @code{NOCROSSREFS} keyword is used, and there any references
-among the sections, the linker will report an error. Since the sections
-all run at the same address, it normally does not make sense for one
-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
-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
-within C identifiers are removed. C (or assembler) code may use these
-symbols to move the overlaid sections around as necessary.
-
-At the end of the overlay, the value of the location counter is set to
-the start address of the overlay plus the size of the largest section.
-
-Here is an example. Remember that this would appear inside a
-@code{SECTIONS} construct.
-@smallexample
-@group
- OVERLAY 0x1000 : AT (0x4000)
- @{
- .text0 @{ o1/*.o(.text) @}
- .text1 @{ o2/*.o(.text) @}
- @}
-@end group
-@end smallexample
-@noindent
-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},
-@code{__load_stop_text0}, @code{__load_start_text1},
-@code{__load_stop_text1}.
-
-C code to copy overlay @code{.text1} into the overlay area might look
-like the following.
-
-@smallexample
-@group
- extern char __load_start_text1, __load_stop_text1;
- memcpy ((char *) 0x1000, &__load_start_text1,
- &__load_stop_text1 - &__load_start_text1);
-@end group
-@end smallexample
-
-Note that the @code{OVERLAY} command is just syntactic sugar, since
-everything it does can be done using the more basic commands. The above
-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);
- .text1 0x1000 : AT (0x4000 + SIZEOF (.text0)) @{ o2/*.o(.text) @}
- __load_start_text1 = LOADADDR (.text1);
- __load_stop_text1 = LOADADDR (.text1) + SIZEOF (.text1);
- . = 0x1000 + MAX (SIZEOF (.text0), SIZEOF (.text1));
-@end group
-@end smallexample
-
-@node MEMORY
-@section MEMORY Command
-@kindex MEMORY
-@cindex memory regions
-@cindex regions of memory
-@cindex allocating memory
-@cindex discontinuous memory
-The linker's default configuration permits allocation of all available
-memory. You can override this by using the @code{MEMORY} command.
-
-The @code{MEMORY} command describes the location and size of blocks of
-memory in the target. You can use it to describe which memory regions
-may be used by the linker, and which memory regions it must avoid. You
-can then assign sections to particular memory regions. The linker will
-set section addresses based on the memory regions, and will warn about
-regions that become too full. The linker will not shuffle sections
-around to fit into the available regions.
-
-A linker script may contain at most one use of the @code{MEMORY}
-command. However, you can define as many blocks of memory within it as
-you wish. The syntax is:
-@smallexample
-@group
-MEMORY
- @{
- @var{name} [(@var{attr})] : ORIGIN = @var{origin}, LENGTH = @var{len}
- @dots{}
- @}
-@end group
-@end smallexample
-
-The @var{name} is a name used in the linker script to refer to the
-region. The region name has no meaning outside of the linker script.
-Region names are stored in a separate name space, and will not conflict
-with symbol names, file names, or section names. Each memory region
-must have a distinct name.
-
-@cindex memory region attributes
-The @var{attr} string is an optional list of attributes that specify
-whether to use a particular memory region for an input section which is
-not explicitly mapped in the linker script. As described in
-@ref{SECTIONS}, if you do not specify an output section for some input
-section, the linker will create an output section with the same name as
-the input section. If you define region attributes, the linker will use
-them to select the memory region for the output section that it creates.
-
-The @var{attr} string must consist only of the following characters:
-@table @samp
-@item R
-Read-only section
-@item W
-Read/write section
-@item X
-Executable section
-@item A
-Allocatable section
-@item I
-Initialized section
-@item L
-Same as @samp{I}
-@item !
-Invert the sense of any of the preceding attributes
-@end table
-
-If a unmapped section matches any of the listed attributes other than
-@samp{!}, it will be placed in the memory region. The @samp{!}
-attribute reverses this test, so that an unmapped section will be placed
-in the memory region only if it does not match any of the listed
-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}).
-
-@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}.
-
-In the following example, we specify that there are two memory regions
-available for allocation: one starting at @samp{0} for 256 kilobytes,
-and the other starting at @samp{0x40000000} for four megabytes. The
-linker will place into the @samp{rom} memory region every section which
-is not explicitly mapped into a memory region, and is either read-only
-or executable. The linker will place other sections which are not
-explicitly mapped into a memory region into the @samp{ram} memory
-region.
-
-@smallexample
-@group
-MEMORY
- @{
- rom (rx) : ORIGIN = 0, LENGTH = 256K
- ram (!rx) : org = 0x40000000, l = 4M
- @}
-@end group
-@end smallexample
-
-Once you define a memory region, you can direct the linker to place
-specific output sections into that memory region by using the
-@samp{>@var{region}} output section attribute. For example, if you have
-a memory region named @samp{mem}, you would use @samp{>mem} in the
-output section definition. @xref{Output Section Region}. If no address
-was specified for the output section, the linker will set the address to
-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.
-
-@node PHDRS
-@section PHDRS Command
-@kindex PHDRS
-@cindex program headers
-@cindex ELF program headers
-@cindex program segments
-@cindex segments, ELF
-The ELF object file format uses @dfn{program headers}, also knows as
-@dfn{segments}. The program headers describe how the program should be
-loaded into memory. You can print them out by using the @code{objdump}
-program with the @samp{-p} option.
-
-When you run an ELF program on a native ELF system, the system loader
-reads the program headers in order to figure out how to load the
-program. This will only work if the program headers are set correctly.
-This manual does not describe the details of how the system loader
-interprets program headers; for more information, see the ELF ABI.
-
-The linker will create reasonable program headers by default. However,
-in some cases, you may need to specify the program headers more
-precisely. You may use the @code{PHDRS} command for this purpose. When
-the linker sees the @code{PHDRS} command in the linker script, it will
-not create any program headers other than the ones specified.
-
-The linker only pays attention to the @code{PHDRS} command when
-generating an ELF output file. In other cases, the linker will simply
-ignore @code{PHDRS}.
-
-This is the syntax of the @code{PHDRS} command. The words @code{PHDRS},
-@code{FILEHDR}, @code{AT}, and @code{FLAGS} are keywords.
-
-@smallexample
-@group
-PHDRS
-@{
- @var{name} @var{type} [ FILEHDR ] [ PHDRS ] [ AT ( @var{address} ) ]
- [ FLAGS ( @var{flags} ) ] ;
-@}
-@end group
-@end smallexample
-
-The @var{name} is used only for reference in the @code{SECTIONS} command
-of the linker script. It is not put into the output file. Program
-header names are stored in a separate name space, and will not conflict
-with symbol names, file names, or section names. Each program header
-must have a distinct name.
-
-Certain program header types describe segments of memory which the
-system loader will load from the file. In the linker script, you
-specify the contents of these segments by placing allocatable output
-sections in the segments. You use the @samp{:@var{phdr}} output section
-attribute to place a section in a particular segment. @xref{Output
-Section Phdr}.
-
-It is normal to put certain sections in more than one segment. This
-merely implies that one segment of memory contains another. You may
-repeat @samp{:@var{phdr}}, using it once for each segment which should
-contain the section.
-
-If you place a section in one or more segments using @samp{:@var{phdr}},
-then the linker will place all subsequent allocatable sections which do
-not specify @samp{:@var{phdr}} in the same segments. This is for
-convenience, since generally a whole set of contiguous sections will be
-placed in a single segment. You can use @code{:NONE} to override the
-default segment and tell the linker to not put the section in any
-segment at all.
-
-@kindex FILEHDR
-@kindex PHDRS
-You may use the @code{FILEHDR} and @code{PHDRS} keywords appear after
-the program header type to further describe the contents of the segment.
-The @code{FILEHDR} keyword means that the segment should include the ELF
-file header. The @code{PHDRS} keyword means that the segment should
-include the ELF program headers themselves.
-
-The @var{type} may be one of the following. The numbers indicate the
-value of the keyword.
-
-@table @asis
-@item @code{PT_NULL} (0)
-Indicates an unused program header.
-
-@item @code{PT_LOAD} (1)
-Indicates that this program header describes a segment to be loaded from
-the file.
-
-@item @code{PT_DYNAMIC} (2)
-Indicates a segment where dynamic linking information can be found.
-
-@item @code{PT_INTERP} (3)
-Indicates a segment where the name of the program interpreter may be
-found.
-
-@item @code{PT_NOTE} (4)
-Indicates a segment holding note information.
-
-@item @code{PT_SHLIB} (5)
-A reserved program header type, defined but not specified by the ELF
-ABI.
-
-@item @code{PT_PHDR} (6)
-Indicates a segment where the program headers may be found.
-
-@item @var{expression}
-An expression giving the numeric type of the program header. This may
-be used for types not defined above.
-@end table
-
-You can specify that a segment should be loaded at a particular address
-in memory by using an @code{AT} expression. This is identical to the
-@code{AT} command used as an output section attribute (@pxref{Output
-Section LMA}). The @code{AT} command for a program header overrides the
-output section attribute.
-
-The linker will normally set the segment flags based on the sections
-which comprise the segment. You may use the @code{FLAGS} keyword to
-explicitly specify the segment flags. The value of @var{flags} must be
-an integer. It is used to set the @code{p_flags} field of the program
-header.
-
-Here is an example of @code{PHDRS}. This shows a typical set of program
-headers used on a native ELF system.
-
-@example
-@group
-PHDRS
-@{
- headers PT_PHDR PHDRS ;
- interp PT_INTERP ;
- text PT_LOAD FILEHDR PHDRS ;
- data PT_LOAD ;
- dynamic PT_DYNAMIC ;
-@}
-
-SECTIONS
-@{
- . = SIZEOF_HEADERS;
- .interp : @{ *(.interp) @} :text :interp
- .text : @{ *(.text) @} :text
- .rodata : @{ *(.rodata) @} /* defaults to :text */
- @dots{}
- . = . + 0x1000; /* move to a new page in memory */
- .data : @{ *(.data) @} :data
- .dynamic : @{ *(.dynamic) @} :data :dynamic
- @dots{}
-@}
-@end group
-@end example
-
-@node VERSION
-@section VERSION Command
-@kindex VERSION @{script text@}
-@cindex symbol versions
-@cindex version script
-@cindex versions of symbols
-The linker supports symbol versions when using ELF. Symbol versions are
-only useful when using shared libraries. The dynamic linker can use
-symbol versions to select a specific version of a function when it runs
-a program that may have been linked against an earlier version of the
-shared library.
-
-You can include a version script directly in the main linker script, or
-you can supply the version script as an implicit linker script. You can
-also use the @samp{--version-script} linker option.
-
-The syntax of the @code{VERSION} command is simply
-@smallexample
-VERSION @{ version-script-commands @}
-@end smallexample
-
-The format of the version script commands is identical to that used by
-Sun's linker in Solaris 2.5. The version script defines a tree of
-version nodes. You specify the node names and interdependencies in the
-version script. You can specify which symbols are bound to which
-version nodes, and you can reduce a specified set of symbols to local
-scope so that they are not globally visible outside of the shared
-library.
-
-The easiest way to demonstrate the version script language is with a few
-examples.
-
-@smallexample
-VERS_1.1 @{
- global:
- foo1;
- local:
- old*;
- original*;
- new*;
-@};
-
-VERS_1.2 @{
- foo2;
-@} VERS_1.1;
-
-VERS_2.0 @{
- bar1; bar2;
-@} VERS_1.2;
-@end smallexample
-
-This example version script defines three version nodes. The first
-version node defined is @samp{VERS_1.1}; it has no other dependencies.
-The script binds the symbol @samp{foo1} to @samp{VERS_1.1}. It reduces
-a number of symbols to local scope so that they are not visible outside
-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'').
-
-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}
-to the version node @samp{VERS_1.2}.
-
-Finally, the version script defines node @samp{VERS_2.0}. This node
-depends upon @samp{VERS_1.2}. The scripts binds the symbols @samp{bar1}
-and @samp{bar2} are bound to the version node @samp{VERS_2.0}.
-
-When the linker finds a symbol defined in a library which is not
-specifically bound to a version node, it will effectively bind it to an
-unspecified base version of the library. You can bind all otherwise
-unspecified symbols to a given version node by using @samp{global: *;}
-somewhere in the version script.
-
-The names of the version nodes have no specific meaning other than what
-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
-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.
-
-@smallexample
-@{ global: foo; bar; local: *; @};
-@end smallexample
-
-When you link an application against a shared library that has versioned
-symbols, the application itself knows which version of each symbol it
-requires, and it also knows which version nodes it needs from each
-shared library it is linked against. Thus at runtime, the dynamic
-loader can make a quick check to make sure that the libraries you have
-linked against do in fact supply all of the version nodes that the
-application will need to resolve all of the dynamic symbols. In this
-way it is possible for the dynamic linker to know with certainty that
-all external symbols that it needs will be resolvable without having to
-search for each symbol reference.
-
-The symbol versioning is in effect a much more sophisticated way of
-doing minor version checking that SunOS does. The fundamental problem
-that is being addressed here is that typically references to external
-functions are bound on an as-needed basis, and are not all bound when
-the application starts up. If a shared library is out of date, a
-required interface may be missing; when the application tries to use
-that interface, it may suddenly and unexpectedly fail. With symbol
-versioning, the user will get a warning when they start their program if
-the libraries being used with the application are too old.
-
-There are several GNU extensions to Sun's versioning approach. The
-first of these is the ability to bind a symbol to a version node in the
-source file where the symbol is defined instead of in the versioning
-script. This was done mainly to reduce the burden on the library
-maintainer. You can do this by putting something like:
-@smallexample
-__asm__(".symver original_foo,foo@@VERS_1.1");
-@end smallexample
-@noindent
-in the C source file. This renames the function @samp{original_foo} to
-be an alias for @samp{foo} bound to the version node @samp{VERS_1.1}.
-The @samp{local:} directive can be used to prevent the symbol
-@samp{original_foo} from being exported. A @samp{.symver} directive
-takes precedence over a version script.
-
-The second GNU extension is to allow multiple versions of the same
-function to appear in a given shared library. In this way you can make
-an incompatible change to an interface without increasing the major
-version number of the shared library, while still allowing applications
-linked against the old interface to continue to function.
-
-To do this, you must use multiple @samp{.symver} directives in the
-source file. Here is an example:
-
-@smallexample
-__asm__(".symver original_foo,foo@@");
-__asm__(".symver old_foo,foo@@VERS_1.1");
-__asm__(".symver old_foo1,foo@@VERS_1.2");
-__asm__(".symver new_foo,foo@@@@VERS_2.0");
-@end smallexample
-
-In this example, @samp{foo@@} represents the symbol @samp{foo} bound to the
-unspecified base version of the symbol. The source file that contains this
-example would define 4 C functions: @samp{original_foo}, @samp{old_foo},
-@samp{old_foo1}, and @samp{new_foo}.
-
-When you have multiple definitions of a given symbol, there needs to be
-some way to specify a default version to which external references to
-this symbol will be bound. You can do this with the
-@samp{foo@@@@VERS_2.0} type of @samp{.symver} directive. You can only
-declare one version of a symbol as the default in this manner; otherwise
-you would effectively have multiple definitions of the same symbol.
-
-If you wish to bind a reference to a specific version of the symbol
-within the shared library, you can use the aliases of convenience
-(i.e., @samp{old_foo}), or you can use the @samp{.symver} directive to
-specifically bind to an external version of the function in question.
-
-You can also specify the language in the version script:
-
-@smallexample
-VERSION extern "lang" @{ version-script-commands @}
-@end smallexample
-
-The supported @samp{lang}s are @samp{C}, @samp{C++}, and @samp{Java}.
-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}.
-
-@node Expressions
-@section Expressions in Linker Scripts
-@cindex expressions
-@cindex arithmetic
-The syntax for expressions in the linker script language is identical to
-that of C expressions. All expressions are evaluated as integers. All
-expressions are evaluated in the same size, which is 32 bits if both the
-host and target are 32 bits, and is otherwise 64 bits.
-
-You can use and set symbol values in expressions.
-
-The linker defines several special purpose builtin functions for use in
-expressions.
-
-@menu
-* Constants:: Constants
-* Symbols:: Symbol Names
-* Location Counter:: The Location Counter
-* Operators:: Operators
-* Evaluation:: Evaluation
-* Expression Section:: The Section of an Expression
-* Builtin Functions:: Builtin Functions
-@end menu
-
-@node Constants
-@subsection Constants
-@cindex integer notation
-@cindex constants in linker scripts
-All constants are integers.
-
-As in C, the linker considers an integer beginning with @samp{0} to be
-octal, and an integer beginning with @samp{0x} or @samp{0X} to be
-hexadecimal. The linker considers other integers to be decimal.
-
-@cindex scaled integers
-@cindex K and M integer suffixes
-@cindex M and K integer suffixes
-@cindex suffixes for integers
-@cindex integer suffixes
-In addition, you can use the suffixes @code{K} and @code{M} to scale a
-constant by
-@c TEXI2ROFF-KILL
-@ifnottex
-@c END TEXI2ROFF-KILL
-@code{1024} or @code{1024*1024}
-@c TEXI2ROFF-KILL
-@end ifnottex
-@tex
-${\rm 1024}$ or ${\rm 1024}^2$
-@end tex
-@c END TEXI2ROFF-KILL
-respectively. For example, the following all refer to the same quantity:
-@smallexample
-_fourk_1 = 4K;
-_fourk_2 = 4096;
-_fourk_3 = 0x1000;
-@end smallexample
-
-@node Symbols
-@subsection Symbol Names
-@cindex symbol names
-@cindex names
-@cindex quoted symbol names
-@kindex "
-Unless quoted, symbol names start with a letter, underscore, or period
-and may include letters, digits, underscores, periods, and hyphens.
-Unquoted symbol names must not conflict with any keywords. You can
-specify a symbol which contains odd characters or has the same name as a
-keyword by surrounding the symbol name in double quotes:
-@smallexample
-"SECTION" = 9;
-"with a space" = "also with a space" + 10;
-@end smallexample
-
-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 Location Counter
-@subsection The Location Counter
-@kindex .
-@cindex dot
-@cindex location counter
-@cindex current output location
-The special linker variable @dfn{dot} @samp{.} always contains the
-current output location counter. Since the @code{.} always refers to a
-location in an output section, it may only appear in an expression
-within a @code{SECTIONS} command. The @code{.} symbol may appear
-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.
-
-@smallexample
-SECTIONS
-@{
- output :
- @{
- file1(.text)
- . = . + 1000;
- file2(.text)
- . += 1000;
- file3(.text)
- @} = 0x12345678;
-@}
-@end smallexample
-@noindent
-In the previous example, the @samp{.text} section from @file{file1} is
-located at the beginning of the output section @samp{output}. It is
-followed by a 1000 byte gap. Then the @samp{.text} section from
-@file{file2} appears, also with a 1000 byte gap following before the
-@samp{.text} section from @file{file3}. The notation @samp{= 0x12345678}
-specifies what data to write in the gaps (@pxref{Output Section Fill}).
-
-@cindex dot inside sections
-Note: @code{.} actually refers to the byte offset from the start of the
-current containing object. Normally this is the @code{SECTIONS}
-statement, whose start address is 0, hence @code{.} can be used as an
-absolute address. If @code{.} is used inside a section description
-however, it refers to the byte offset from the start of that section,
-not an absolute address. Thus in a script like this:
-
-@smallexample
-SECTIONS
-@{
- . = 0x100
- .text: @{
- *(.text)
- . = 0x200
- @}
- . = 0x500
- .data: @{
- *(.data)
- . += 0x600
- @}
-@}
-@end smallexample
-
-The @samp{.text} section will be assigned a starting address of 0x100
-and a size of exactly 0x200 bytes, even if there is not enough data in
-the @samp{.text} input sections to fill this area. (If there is too
-much data, an error will be produced because this would be an attempt to
-move @code{.} backwards). The @samp{.data} section will start at 0x500
-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.
-
-@need 2000
-@node Operators
-@subsection Operators
-@cindex operators for arithmetic
-@cindex arithmetic operators
-@cindex precedence in expressions
-The linker recognizes the standard C set of arithmetic operators, with
-the standard bindings and precedence levels:
-@c TEXI2ROFF-KILL
-@ifnottex
-@c END TEXI2ROFF-KILL
-@smallexample
-precedence associativity Operators Notes
-(highest)
-1 left ! - ~ (1)
-2 left * / %
-3 left + -
-4 left >> <<
-5 left == != > < <= >=
-6 left &
-7 left |
-8 left &&
-9 left ||
-10 right ? :
-11 right &= += -= *= /= (2)
-(lowest)
-@end smallexample
-Notes:
-(1) Prefix operators
-(2) @xref{Assignments}.
-@c TEXI2ROFF-KILL
-@end ifnottex
-@tex
-\vskip \baselineskip
-%"lispnarrowing" is the extra indent used generally for smallexample
-\hskip\lispnarrowing\vbox{\offinterlineskip
-\hrule
-\halign
-{\vrule#&\strut\hfil\ #\ \hfil&\vrule#&\strut\hfil\ #\ \hfil&\vrule#&\strut\hfil\ {\tt #}\ \hfil&\vrule#\cr
-height2pt&\omit&&\omit&&\omit&\cr
-&Precedence&& Associativity &&{\rm Operators}&\cr
-height2pt&\omit&&\omit&&\omit&\cr
-\noalign{\hrule}
-height2pt&\omit&&\omit&&\omit&\cr
-&highest&&&&&\cr
-% '176 is tilde, '~' in tt font
-&1&&left&&\qquad- \char'176\ !\qquad\dag&\cr
-&2&&left&&* / \%&\cr
-&3&&left&&+ -&\cr
-&4&&left&&>> <<&\cr
-&5&&left&&== != > < <= >=&\cr
-&6&&left&&\&&\cr
-&7&&left&&|&\cr
-&8&&left&&{\&\&}&\cr
-&9&&left&&||&\cr
-&10&&right&&? :&\cr
-&11&&right&&\qquad\&= += -= *= /=\qquad\ddag&\cr
-&lowest&&&&&\cr
-height2pt&\omit&&\omit&&\omit&\cr}
-\hrule}
-@end tex
-@iftex
-{
-@obeylines@parskip=0pt@parindent=0pt
-@dag@quad Prefix operators.
-@ddag@quad @xref{Assignments}.
-}
-@end iftex
-@c END TEXI2ROFF-KILL
-
-@node Evaluation
-@subsection Evaluation
-@cindex lazy evaluation
-@cindex expression evaluation order
-The linker evaluates expressions lazily. It only computes the value of
-an expression when absolutely necessary.
-
-The linker needs some information, such as the value of the start
-address of the first section, and the origins and lengths of memory
-regions, in order to do any linking at all. These values are computed
-as soon as possible when the linker reads in the linker script.
-
-However, other values (such as symbol values) are not known or needed
-until after storage allocation. Such values are evaluated later, when
-other information (such as the sizes of output sections) is available
-for use in the symbol assignment expression.
-
-The sizes of sections cannot be known until after allocation, so
-assignments dependent upon these are not performed until after
-allocation.
-
-Some expressions, such as those depending upon the location counter
-@samp{.}, must be evaluated during section allocation.
-
-If the result of an expression is required, but the value is not
-available, then an error results. For example, a script like the
-following
-@smallexample
-@group
-SECTIONS
- @{
- .text 9+this_isnt_constant :
- @{ *(.text) @}
- @}
-@end group
-@end smallexample
-@noindent
-will cause the error message @samp{non constant expression for initial
-address}.
-
-@node Expression Section
-@subsection The Section of an Expression
-@cindex expression sections
-@cindex absolute expressions
-@cindex relative expressions
-@cindex absolute and relocatable symbols
-@cindex relocatable and absolute symbols
-@cindex symbols, relocatable and absolute
-When the linker evaluates an expression, the result is either absolute
-or relative to some section. A relative expression is expressed as a
-fixed offset from the base of a section.
-
-The position of the expression within the linker script determines
-whether it is absolute or relative. An expression which appears within
-an output section definition is relative to the base of the output
-section. An expression which appears elsewhere will be absolute.
-
-A symbol set to a relative expression will be relocatable if you request
-relocatable output using the @samp{-r} option. That means that a
-further link operation may change the value of the symbol. The symbol's
-section will be the section of the relative expression.
-
-A symbol set to an absolute expression will retain the same value
-through any further link operation. The symbol will be absolute, and
-will not have any particular associated section.
-
-You can use the builtin function @code{ABSOLUTE} to force an expression
-to be absolute when it would otherwise be relative. For example, to
-create an absolute symbol set to the address of the end of the output
-section @samp{.data}:
-@smallexample
-SECTIONS
- @{
- .data : @{ *(.data) _edata = ABSOLUTE(.); @}
- @}
-@end smallexample
-@noindent
-If @samp{ABSOLUTE} were not used, @samp{_edata} would be relative to the
-@samp{.data} section.
-
-@node Builtin Functions
-@subsection Builtin Functions
-@cindex functions in expressions
-The linker script language includes a number of builtin functions for
-use in linker script expressions.
-
-@table @code
-@item ABSOLUTE(@var{exp})
-@kindex ABSOLUTE(@var{exp})
-@cindex expression, absolute
-Return the absolute (non-relocatable, as opposed to non-negative) value
-of the expression @var{exp}. Primarily useful to assign an absolute
-value to a symbol within a section definition, where symbol values are
-normally section relative. @xref{Expression Section}.
-
-@item ADDR(@var{section})
-@kindex ADDR(@var{section})
-@cindex section address in expression
-Return the absolute address (the VMA) of the named @var{section}. Your
-script must previously have defined the location of that section. In
-the following example, @code{symbol_1} and @code{symbol_2} are assigned
-identical values:
-@smallexample
-@group
-SECTIONS @{ @dots{}
- .output1 :
- @{
- start_of_output_1 = ABSOLUTE(.);
- @dots{}
- @}
- .output :
- @{
- symbol_1 = ADDR(.output1);
- symbol_2 = start_of_output_1;
- @}
-@dots{} @}
-@end group
-@end smallexample
-
-@item ALIGN(@var{align})
-@itemx ALIGN(@var{exp},@var{align})
-@kindex ALIGN(@var{align})
-@kindex ALIGN(@var{exp},@var{align})
-@cindex round up location counter
-@cindex align location counter
-@cindex round up expression
-@cindex align expression
-Return the location counter (@code{.}) or arbitrary expression aligned
-to the next @var{align} boundary. The single operand @code{ALIGN}
-doesn't change the value of the location counter---it just does
-arithmetic on it. The two operand @code{ALIGN} allows an arbitrary
-expression to be aligned upwards (@code{ALIGN(@var{align})} is
-equivalent to @code{ALIGN(., @var{align})}).
-
-Here is an example which aligns the output @code{.data} section to the
-next @code{0x2000} byte boundary after the preceding section and sets a
-variable within the section to the next @code{0x8000} boundary after the
-input sections:
-@smallexample
-@group
-SECTIONS @{ @dots{}
- .data ALIGN(0x2000): @{
- *(.data)
- variable = ALIGN(0x8000);
- @}
-@dots{} @}
-@end group
-@end smallexample
-@noindent
-The first use of @code{ALIGN} in this example specifies the location of
-a section because it is used as the optional @var{address} attribute of
-a section definition (@pxref{Output Section Address}). The second use
-of @code{ALIGN} is used to defines the value of a symbol.
-
-The builtin function @code{NEXT} is closely related to @code{ALIGN}.
-
-@item BLOCK(@var{exp})
-@kindex BLOCK(@var{exp})
-This is a synonym for @code{ALIGN}, for compatibility with older linker
-scripts. It is most often seen when setting the address of an output
-section.
-
-@item DATA_SEGMENT_ALIGN(@var{maxpagesize}, @var{commonpagesize})
-@kindex DATA_SEGMENT_ALIGN(@var{maxpagesize}, @var{commonpagesize})
-This is equivalent to either
-@smallexample
-(ALIGN(@var{maxpagesize}) + (. & (@var{maxpagesize} - 1)))
-@end smallexample
-or
-@smallexample
-(ALIGN(@var{maxpagesize}) + (. & (@var{maxpagesize} - @var{commonpagesize})))
-@end smallexample
-@noindent
-depending on whether the latter uses fewer @var{commonpagesize} sized pages
-for the data segment (area between the result of this expression and
-@code{DATA_SEGMENT_END}) than the former or not.
-If the latter form is used, it means @var{commonpagesize} bytes of runtime
-memory will be saved at the expense of up to @var{commonpagesize} wasted
-bytes in the on-disk file.
-
-This expression can only be used directly in @code{SECTIONS} commands, not in
-any output section descriptions and only once in the linker script.
-@var{commonpagesize} should be less or equal to @var{maxpagesize} and should
-be the system page size the object wants to be optimized for (while still
-working on system page sizes up to @var{maxpagesize}).
-
-@noindent
-Example:
-@smallexample
- . = DATA_SEGMENT_ALIGN(0x10000, 0x2000);
-@end smallexample
-
-@item DATA_SEGMENT_END(@var{exp})
-@kindex DATA_SEGMENT_END(@var{exp})
-This defines the end of data segment for @code{DATA_SEGMENT_ALIGN}
-evaluation purposes.
-
-@smallexample
- . = DATA_SEGMENT_END(.);
-@end smallexample
-
-@item DEFINED(@var{symbol})
-@kindex DEFINED(@var{symbol})
-@cindex symbol defaults
-Return 1 if @var{symbol} is in the linker global symbol table and is
-defined before the statement using DEFINED in the script, otherwise
-return 0. You can use this function to provide
-default values for symbols. For example, the following script fragment
-shows how to set a global symbol @samp{begin} to the first location in
-the @samp{.text} section---but if a symbol called @samp{begin} already
-existed, its value is preserved:
-
-@smallexample
-@group
-SECTIONS @{ @dots{}
- .text : @{
- begin = DEFINED(begin) ? begin : . ;
- @dots{}
- @}
- @dots{}
-@}
-@end group
-@end smallexample
-
-@item LOADADDR(@var{section})
-@kindex LOADADDR(@var{section})
-@cindex section load address in expression
-Return the absolute LMA of the named @var{section}. This is normally
-the same as @code{ADDR}, but it may be different if the @code{AT}
-attribute is used in the output section definition (@pxref{Output
-Section LMA}).
-
-@kindex MAX
-@item MAX(@var{exp1}, @var{exp2})
-Returns the maximum of @var{exp1} and @var{exp2}.
-
-@kindex MIN
-@item MIN(@var{exp1}, @var{exp2})
-Returns the minimum of @var{exp1} and @var{exp2}.
-
-@item NEXT(@var{exp})
-@kindex NEXT(@var{exp})
-@cindex unallocated address, next
-Return the next unallocated address that is a multiple of @var{exp}.
-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 SIZEOF(@var{section})
-@kindex SIZEOF(@var{section})
-@cindex section size
-Return the size 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,
-@code{symbol_1} and @code{symbol_2} are assigned identical values:
-@smallexample
-@group
-SECTIONS@{ @dots{}
- .output @{
- .start = . ;
- @dots{}
- .end = . ;
- @}
- symbol_1 = .end - .start ;
- symbol_2 = SIZEOF(.output);
-@dots{} @}
-@end group
-@end smallexample
-
-@item SIZEOF_HEADERS
-@itemx sizeof_headers
-@kindex SIZEOF_HEADERS
-@cindex header size
-Return the size in bytes of the output file's headers. This is
-information which appears at the start of the output file. You can use
-this number when setting the start address of the first section, if you
-choose, to facilitate paging.
-
-@cindex not enough room for program headers
-@cindex program headers, not enough room
-When producing an ELF output file, if the linker script uses the
-@code{SIZEOF_HEADERS} builtin function, the linker must compute the
-number of program headers before it has determined all the section
-addresses and sizes. If the linker later discovers that it needs
-additional program headers, it will report an error @samp{not enough
-room for program headers}. To avoid this error, you must avoid using
-the @code{SIZEOF_HEADERS} function, or you must rework your linker
-script to avoid forcing the linker to use additional program headers, or
-you must define the program headers yourself using the @code{PHDRS}
-command (@pxref{PHDRS}).
-@end table
-
-@node Implicit Linker Scripts
-@section Implicit Linker Scripts
-@cindex implicit linker scripts
-If you specify a linker input file which the linker can not recognize as
-an object file or an archive file, it will try to read the file as a
-linker script. If the file can not be parsed as a linker script, the
-linker will report an error.
-
-An implicit linker script will not replace the default linker script.
-
-Typically an implicit linker script would contain only symbol
-assignments, or the @code{INPUT}, @code{GROUP}, or @code{VERSION}
-commands.
-
-Any input files read because of an implicit linker script will be read
-at the position in the command line where the implicit linker script was
-read. This can affect archive searching.
-
-@ifset GENERIC
-@node Machine Dependent
-@chapter Machine Dependent Features
-
-@cindex machine dependencies
-@command{ld} has additional features on some platforms; the following
-sections describe them. Machines where @command{ld} has no additional
-functionality are not listed.
-
-@menu
-@ifset H8300
-* H8/300:: @command{ld} and the H8/300
-@end ifset
-@ifset I960
-* i960:: @command{ld} and the Intel 960 family
-@end ifset
-@ifset ARM
-* ARM:: @command{ld} and the ARM family
-@end ifset
-@ifset HPPA
-* HPPA ELF32:: @command{ld} and HPPA 32-bit ELF
-@end ifset
-@ifset MMIX
-* MMIX:: @command{ld} and MMIX
-@end ifset
-@ifset MSP430
-* MSP430:: @command{ld} and MSP430
-@end ifset
-@ifset TICOFF
-* TI COFF:: @command{ld} and TI COFF
-@end ifset
-@ifset WIN32
-* WIN32:: @command{ld} and WIN32 (cygwin/mingw)
-@end ifset
-@ifset XTENSA
-* Xtensa:: @command{ld} and Xtensa Processors
-@end ifset
-@end menu
-@end ifset
-
-@ifset H8300
-@ifclear GENERIC
-@raisesections
-@end ifclear
-
-@node H8/300
-@section @command{ld} and the H8/300
-
-@cindex H8/300 support
-For the H8/300, @command{ld} can perform these global optimizations when
-you specify the @samp{--relax} command-line option.
-
-@table @emph
-@cindex relaxing on H8/300
-@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.
-
-@cindex synthesizing on H8/300
-@item synthesizing instructions
-@c FIXME: specifically mov.b, or any mov instructions really?
-@command{ld} finds all @code{mov.b} instructions which use the
-sixteen-bit absolute address form, but refer to the top
-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).
-@end table
-
-@ifclear GENERIC
-@lowersections
-@end ifclear
-@end ifset
-
-@ifclear GENERIC
-@ifset Renesas
-@c This stuff is pointless to say unless you're especially concerned
-@c with Renesas chips; don't enable it for generic case, please.
-@node Renesas
-@chapter @command{ld} and Other Renesas Chips
-
-@command{ld} also supports the Renesas (formerly Hitachi) H8/300H,
-H8/500, and SH chips. No special features, commands, or command-line
-options are required for these chips.
-@end ifset
-@end ifclear
-
-@ifset I960
-@ifclear GENERIC
-@raisesections
-@end ifclear
-
-@node i960
-@section @command{ld} and the Intel 960 Family
-
-@cindex i960 support
-
-You can use the @samp{-A@var{architecture}} command line option to
-specify one of the two-letter names identifying members of the 960
-family; the option specifies the desired output target, and warns of any
-incompatible instructions in the input files. It also modifies the
-linker's search strategy for archive libraries, to support the use of
-libraries specific to each particular architecture, by including in the
-search loop names suffixed with the string identifying the architecture.
-
-For example, if your @command{ld} command line included @w{@samp{-ACA}} as
-well as @w{@samp{-ltry}}, the linker would look (in its built-in search
-paths, and in any paths you specify with @samp{-L}) for a library with
-the names
-
-@smallexample
-@group
-try
-libtry.a
-tryca
-libtryca.a
-@end group
-@end smallexample
-
-@noindent
-The first two possibilities would be considered in any event; the last
-two are due to the use of @w{@samp{-ACA}}.
-
-You can meaningfully use @samp{-A} more than once on a command line, since
-the 960 architecture family allows combination of target architectures; each
-use will add another pair of name variants to search for when @w{@samp{-l}}
-specifies a library.
-
-@cindex @option{--relax} on i960
-@cindex relaxing on i960
-@command{ld} supports the @samp{--relax} option for the i960 family. If
-you specify @samp{--relax}, @command{ld} finds all @code{balx} and
-@code{calx} instructions whose targets are within 24 bits, and turns
-them into 24-bit program-counter relative @code{bal} and @code{cal}
-instructions, respectively. @command{ld} also turns @code{cal}
-instructions into @code{bal} instructions when it determines that the
-target subroutine is a leaf routine (that is, the target subroutine does
-not itself call any subroutines).
-
-@ifclear GENERIC
-@lowersections
-@end ifclear
-@end ifset
-
-@ifset ARM
-@ifclear GENERIC
-@raisesections
-@end ifclear
-
-@node ARM
-@section @command{ld}'s Support for Interworking Between ARM and Thumb Code
-
-@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
-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
-option then the @samp{--support-old-code} command line switch should be
-given to the linker. This will make it generate larger stub functions
-which will work with non-interworking aware ARM code. Note, however,
-the linker does not support generating stubs for function calls to
-non-interworking aware Thumb code.
-
-@cindex thumb entry point
-@cindex entry point, thumb
-@kindex --thumb-entry=@var{entry}
-The @samp{--thumb-entry} switch is a duplicate of the generic
-@samp{--entry} switch, in that it sets the program's starting address.
-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.
-
-@ifclear GENERIC
-@lowersections
-@end ifclear
-@end ifset
-
-@ifset HPPA
-@ifclear GENERIC
-@raisesections
-@end ifclear
-
-@node HPPA ELF32
-@section @command{ld} and HPPA 32-bit ELF Support
-@cindex HPPA multiple sub-space stubs
-@kindex --multi-subspace
-When generating a shared library, @command{ld} will by default generate
-import stubs suitable for use with a single sub-space application.
-The @samp{--multi-subspace} switch causes @command{ld} to generate export
-stubs, and different (larger) import stubs suitable for use with
-multiple sub-spaces.
-
-@cindex HPPA stub grouping
-@kindex --stub-group-size=@var{N}
-Long branch stubs and import/export 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.
-
-@ifclear GENERIC
-@lowersections
-@end ifclear
-@end ifset
-
-@ifset MMIX
-@ifclear GENERIC
-@raisesections
-@end ifclear
-
-@node MMIX
-@section @code{ld} and MMIX
-For MMIX, there is a choice of generating @code{ELF} object files or
-@code{mmo} object files when linking. The simulator @code{mmix}
-understands the @code{mmo} format. The binutils @code{objcopy} utility
-can translate between the two formats.
-
-There is one special section, the @samp{.MMIX.reg_contents} section.
-Contents in this section is assumed to correspond to that of global
-registers, and symbols referring to it are translated to special symbols,
-equal to registers. In a final link, the start address of the
-@samp{.MMIX.reg_contents} section corresponds to the first allocated
-global register multiplied by 8. Register @code{$255} is not included in
-this section; it is always set to the program entry, which is at the
-symbol @code{Main} for @code{mmo} files.
-
-Symbols with the prefix @code{__.MMIX.start.}, for example
-@code{__.MMIX.start..text} and @code{__.MMIX.start..data} are special;
-there must be only one each, even if they are local. The default linker
-script uses these to set the default start address of a section.
-
-Initial and trailing multiples of zero-valued 32-bit words in a section,
-are left out from an mmo file.
-
-@ifclear GENERIC
-@lowersections
-@end ifclear
-@end ifset
-
-@ifset MSP430
-@ifclear GENERIC
-@raisesections
-@end ifclear
-
-@node MSP430
-@section @code{ld} and MSP430
-For the MSP430 it is possible to select the MPU architecture. The flag @samp{-m [mpu type]}
-will select an appropriate linker script for selected MPU type. (To get a list of known MPUs
-just pass @samp{-m help} option to the linker).
-
-@cindex MSP430 extra sections
-The linker will recognize some extra sections which are MSP430 specific:
-
-@table @code
-@item @samp{.vectors}
-Defines a portion of ROM where interrupt vectors located.
-
-@item @samp{.bootloader}
-Defines the bootloader portion of the ROM (if applicable). Any code
-in this section will be uploaded to the MPU.
-
-@item @samp{.infomem}
-Defines an information memory section (if applicable). Any code in
-this section will be uploaded to the MPU.
-
-@item @samp{.infomemnobits}
-This is the same as the @samp{.infomem} section except that any code
-in this section will not be uploaded to the MPU.
-
-@item @samp{.noinit}
-Denotes a portion of RAM located above @samp{.bss} section.
-
-The last two sections are used by gcc.
-@end table
-
-@ifclear GENERIC
-@lowersections
-@end ifclear
-@end ifset
-
-@ifset TICOFF
-@ifclear GENERIC
-@raisesections
-@end ifclear
-
-@node TI COFF
-@section @command{ld}'s Support for Various TI COFF Versions
-@cindex TI COFF versions
-@kindex --format=@var{version}
-The @samp{--format} switch allows selection of one of the various
-TI COFF versions. The latest of this writing is 2; versions 0 and 1 are
-also supported. The TI COFF versions also vary in header byte-order
-format; @command{ld} will read any version or byte order, but the output
-header format depends on the default specified by the specific target.
-
-@ifclear GENERIC
-@lowersections
-@end ifclear
-@end ifset
-
-@ifset WIN32
-@ifclear GENERIC
-@raisesections
-@end ifclear
-
-@node WIN32
-@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
-command line options mentioned here.
-
-@table @emph
-@cindex import libraries
-@item import libraries
-The standard Windows linker creates and uses so-called import
-libraries, which contains information for linking to dll's. They are
-regular static archives and are handled as any other static
-archive. The cygwin and mingw ports of @command{ld} have specific
-support for creating such libraries provided with the
-@samp{--out-implib} command line option.
-
-@item exporting DLL symbols
-@cindex exporting DLL symbols
-The cygwin/mingw @command{ld} has several ways to export symbols for dll's.
-
-@table @emph
-@item using auto-export functionality
-@cindex using auto-export functionality
-By default @command{ld} exports symbols with the auto-export functionality,
-which is controlled by the following command line options:
-
-@itemize
-@item --export-all-symbols [This is the default]
-@item --exclude-symbols
-@item --exclude-libs
-@end itemize
-
-If, however, @samp{--export-all-symbols} is not given explicitly on the
-command line, then the default auto-export behavior will be @emph{disabled}
-if either of the following are true:
-
-@itemize
-@item A DEF file is used.
-@item Any symbol in any object file was marked with the __declspec(dllexport) attribute.
-@end itemize
-
-@item using a DEF file
-@cindex using a DEF file
-Another way of exporting symbols is using a DEF file. A DEF file is
-an ASCII file containing definitions of symbols which should be
-exported when a dll is created. Usually it is named @samp{<dll
-name>.def} and is added as any other object file to the linker's
-command line. The file's name must end in @samp{.def} or @samp{.DEF}.
-
-@example
-gcc -o <output> <objectfiles> <dll name>.def
-@end example
-
-Using a DEF file turns off the normal auto-export behavior, unless the
-@samp{--export-all-symbols} option is also used.
-
-Here is an example of a DEF file for a shared library called @samp{xyz.dll}:
-
-@example
-LIBRARY "xyz.dll" BASE=0x10000000
-
-EXPORTS
-foo
-bar
-_bar = bar
-@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.
-
-@cindex creating a DEF file
-While linking a shared dll, @command{ld} is able to create a DEF file
-with the @samp{--output-def <file>} command line option.
-
-@item Using decorations
-@cindex Using decorations
-Another way of marking symbols for export is to modify the source code
-itself, so that when building the DLL each symbol to be exported is
-declared as:
-
-@example
-__declspec(dllexport) int a_variable
-__declspec(dllexport) void a_function(int with_args)
-@end example
-
-All such symbols will be exported from the DLL. If, however,
-any of the object files in the DLL contain symbols decorated in
-this way, then the normal auto-export behavior is disabled, unless
-the @samp{--export-all-symbols} option is also used.
-
-Note that object files that wish to access these symbols must @emph{not}
-decorate them with dllexport. Instead, they should use dllimport,
-instead:
-
-@example
-__declspec(dllimport) int a_variable
-__declspec(dllimport) void a_function(int with_args)
-@end example
-
-This complicates the structure of library header files, because
-when included by the library itself the header must declare the
-variables and functions as dllexport, but when included by client
-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.
-@end table
-
-@cindex automatic data imports
-@item automatic data imports
-The standard Windows dll format supports data imports from dlls only
-by adding special decorations (dllimport/dllexport), which let the
-compiler produce specific assembler instructions to deal with this
-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
-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
-suppress any warnings that are ordinarily emitted when linked objects
-trigger the feature's use.
-
-auto-import of variables does not always work flawlessly without
-additional assistance. Sometimes, you will see this message
-
-"variable '<var>' can't be auto-imported. Please read the
-documentation for ld's @code{--enable-auto-import} for details."
-
-The @samp{--enable-auto-import} documentation explains why this error
-occurs, and several methods that can be used to overcome this difficulty.
-One of these methods is the @emph{runtime pseudo-relocs} feature, described
-below.
-
-@cindex runtime pseudo-relocation
-For complex variables imported from DLLs (such as structs or classes),
-object files typically contain a base address for the variable and an
-offset (@emph{addend}) within the variable--to specify a particular
-field or public member, for instance. Unfortunately, the runtime loader used
-in win32 environments is incapable of fixing these references at runtime
-without the additional information supplied by dllimport/dllexport decorations.
-The standard auto-import feature described above is unable to resolve these
-references.
-
-The @samp{--enable-runtime-pseudo-relocs} switch allows these references to
-be resolved without error, while leaving the task of adjusting the references
-themselves (with their non-zero addends) to specialized code provided by the
-runtime environment. Recent versions of the cygwin and mingw environments and
-compilers provide this runtime support; older versions do not. However, the
-support is only necessary on the developer's platform; the compiled result will
-run without error on an older system.
-
-@samp{--enable-runtime-pseudo-relocs} is not the default; it must be explicitly
-enabled as needed.
-
-@cindex direct linking to a dll
-@item direct linking to a dll
-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
-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
-storing, loading, and processing so many bfd's is quite large, and explains the
-tremendous time, memory, and storage needed to link against particularly
-large or complex libraries when using import libs.
-
-Linking directly to a dll uses no extra command-line switches other than
-@samp{-L} and @samp{-l}, because @command{ld} already searches for a number
-of names to match each library. All that is needed from the developer's
-perspective is an understanding of this search, in order to force ld to
-select the dll instead of an import library.
-
-
-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
-cygxxx.dll (*)
-libxxx.dll
-xxx.dll
-@end example
-
-before moving on to the next directory in the search path.
-
-(*) Actually, this is not @samp{cygxxx.dll} but in fact is @samp{<prefix>xxx.dll},
-where @samp{<prefix>} is set by the @command{ld} option
-@samp{--dll-search-prefix=<prefix>}. In the case of cygwin, the standard gcc spec
-file includes @samp{--dll-search-prefix=cyg}, so in effect we actually search for
-@samp{cygxxx.dll}.
-
-Other win32-based unix environments, such as mingw or pw32, may use other
-@samp{<prefix>}es, although at present only cygwin makes use of this feature. It
-was originally intended to help avoid name conflicts among dll's built for the
-various win32/un*x environments, so that (for example) two versions of a zlib dll
-could coexist on the same machine.
-
-The generic cygwin/mingw path layout uses a @samp{bin} directory for
-applications and dll's and a @samp{lib} directory for the import
-libraries (using cygwin nomenclature):
-
-@example
-bin/
- cygxxx.dll
-lib/
- libxxx.dll.a (in case of dll's)
- libxxx.a (in case of static archive)
-@end example
-
-Linking directly to a dll without using the import library can be
-done two ways:
-
-1. Use the dll directly by adding the @samp{bin} path to the link line
-@example
-gcc -Wl,-verbose -o a.exe -L../bin/ -lxxx
-@end example
-
-However, as the dll's often have version numbers appended to their names
-(@samp{cygncurses-5.dll}) this will often fail, unless one specifies
-@samp{-L../bin -lncurses-5} to include the version. Import libs are generally
-not versioned, and do not have this difficulty.
-
-2. Create a symbolic link from the dll to a file in the @samp{lib}
-directory according to the above mentioned search pattern. This
-should be used to avoid unwanted changes in the tools needed for
-making the app/dll.
-
-@example
-ln -s bin/cygxxx.dll lib/[cyg|lib|]xxx.dll[.a]
-@end example
-
-Then you can link without any make environment changes.
-
-@example
-gcc -Wl,-verbose -o a.exe -L../lib/ -lxxx
-@end example
-
-This technique also avoids the version number problems, because the following is
-perfectly legal
-
-@example
-bin/
- cygxxx-5.dll
-lib/
- libxxx.dll.a -> ../bin/cygxxx-5.dll
-@end example
-
-Linking directly to a dll without using an import lib will work
-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:
-
-1. Until recently, the link-directly-to-dll functionality did @emph{not}
-work with auto-imported data.
-
-2. Sometimes it is necessary to include pure static objects within the
-import library (which otherwise contains only bfd's for indirection
-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.
-
-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
-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
-will soon begin to use this feature whenever possible.
-
-@item symbol aliasing
-@table @emph
-@item adding additional names
-Sometimes, it is useful to export symbols with additional names.
-A symbol @samp{foo} will be exported as @samp{foo}, but it can also be
-exported as @samp{_foo} by using special directives in the DEF file
-when creating the dll. This will affect also the optional created
-import library. Consider the following DEF file:
-
-@example
-LIBRARY "xyz.dll" BASE=0x61000000
-
-EXPORTS
-foo
-_foo = foo
-@end example
-
-The line @samp{_foo = foo} maps the symbol @samp{foo} to @samp{_foo}.
-
-Another method for creating a symbol alias is to create it in the
-source code using the "weak" attribute:
-
-@example
-void foo () @{ /* Do something. */; @}
-void _foo () __attribute__ ((weak, alias ("foo")));
-@end example
-
-See the gcc manual for more information about attributes and weak
-symbols.
-
-@item renaming symbols
-Sometimes it is useful to rename exports. For instance, the cygwin
-kernel does this regularly. A symbol @samp{_foo} can be exported as
-@samp{foo} but not as @samp{_foo} by using special directives in the
-DEF file. (This will also affect the import library, if it is
-created). In the following example:
-
-@example
-LIBRARY "xyz.dll" BASE=0x61000000
-
-EXPORTS
-_foo = foo
-@end example
-
-The line @samp{_foo = foo} maps the exported symbol @samp{foo} to
-@samp{_foo}.
-@end table
-
-Note: using a DEF file disables the default auto-export behavior,
-unless the @samp{--export-all-symbols} command line option is used.
-If, however, you are trying to rename symbols, then you should list
-@emph{all} desired exports in the DEF file, including the symbols
-that are not being renamed, and do @emph{not} use the
-@samp{--export-all-symbols} option. If you list only the
-renamed symbols in the DEF file, and use @samp{--export-all-symbols}
-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.
-@end table
-
-@ifclear GENERIC
-@lowersections
-@end ifclear
-@end ifset
-
-@ifset XTENSA
-@ifclear GENERIC
-@raisesections
-@end ifclear
-
-@node Xtensa
-@section @code{ld} and Xtensa Processors
-
-@cindex Xtensa processors
-The default @command{ld} behavior for Xtensa processors is to interpret
-@code{SECTIONS} commands so that lists of explicitly named sections in a
-specification with a wildcard file will be interleaved when necessary to
-keep literal pools within the range of PC-relative load offsets. For
-example, with the command:
-
-@smallexample
-SECTIONS
-@{
- .text : @{
- *(.literal .text)
- @}
-@}
-@end smallexample
-
-@noindent
-@command{ld} may interleave some of the @code{.literal}
-and @code{.text} sections from different object files to ensure that the
-literal pools are within the range of PC-relative load offsets. A valid
-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 relaxing on Xtensa
-@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.
-
-@ifclear GENERIC
-@lowersections
-@end ifclear
-@end ifset
-
-@ifclear SingleFormat
-@node BFD
-@chapter BFD
-
-@cindex back end
-@cindex object file management
-@cindex object formats available
-@kindex objdump -i
-The linker accesses object and archive files using the BFD libraries.
-These libraries allow the linker to use the same routines to operate on
-object files whatever the object file format. A different object file
-format can be supported simply by creating a new BFD back end and adding
-it to the library. To conserve runtime memory, however, the linker and
-associated tools are usually configured to support only a subset of the
-object file formats available. You can use @code{objdump -i}
-(@pxref{objdump,,objdump,binutils.info,The GNU Binary Utilities}) to
-list all the formats available for your configuration.
-
-@cindex BFD requirements
-@cindex requirements for BFD
-As with most implementations, BFD is a compromise between
-several conflicting requirements. The major factor influencing
-BFD design was efficiency: any time used converting between
-formats is time which would not have been spent had BFD not
-been involved. This is partly offset by abstraction payback; since
-BFD simplifies applications and back ends, more time and care
-may be spent optimizing algorithms for a greater speed.
-
-One minor artifact of the BFD solution which you should bear in
-mind is the potential for information loss. There are two places where
-useful information can be lost using the BFD mechanism: during
-conversion and during output. @xref{BFD information loss}.
-
-@menu
-* BFD outline:: How it works: an outline of BFD
-@end menu
-
-@node BFD outline
-@section How It Works: An Outline of BFD
-@cindex opening object files
-@include bfdsumm.texi
-@end ifclear
-
-@node Reporting Bugs
-@chapter Reporting Bugs
-@cindex bugs in @command{ld}
-@cindex reporting bugs in @command{ld}
-
-Your bug reports play an essential role in making @command{ld} reliable.
-
-Reporting a bug may help you by bringing a solution to your problem, or
-it may not. But in any case the principal function of a bug report is
-to help the entire community by making the next version of @command{ld}
-work better. Bug reports are your contribution to the maintenance of
-@command{ld}.
-
-In order for a bug report to serve its purpose, you must include the
-information that enables us to fix the bug.
-
-@menu
-* Bug Criteria:: Have you found a bug?
-* Bug Reporting:: How to report bugs
-@end menu
-
-@node Bug Criteria
-@section Have You Found a Bug?
-@cindex bug criteria
-
-If you are not sure whether you have found a bug, here are some guidelines:
-
-@itemize @bullet
-@cindex fatal signal
-@cindex linker crash
-@cindex crash of linker
-@item
-If the linker gets a fatal signal, for any input whatever, that is a
-@command{ld} bug. Reliable linkers never crash.
-
-@cindex error on valid input
-@item
-If @command{ld} produces an error message for valid input, that is a bug.
-
-@cindex invalid input
-@item
-If @command{ld} does not produce an error message for invalid input, that
-may be a bug. In the general case, the linker can not verify that
-object files are correct.
-
-@item
-If you are an experienced user of linkers, your suggestions for
-improvement of @command{ld} are welcome in any case.
-@end itemize
-
-@node Bug Reporting
-@section How to Report Bugs
-@cindex bug reports
-@cindex @command{ld} bugs, reporting
-
-A number of companies and individuals offer support for @sc{gnu}
-products. If you obtained @command{ld} from a support organization, we
-recommend you contact that organization first.
-
-You can find contact information for many support companies and
-individuals in the file @file{etc/SERVICE} in the @sc{gnu} Emacs
-distribution.
-
-Otherwise, send bug reports for @command{ld} to
-@samp{bug-binutils@@gnu.org}.
-
-The fundamental principle of reporting bugs usefully is this:
-@strong{report all the facts}. If you are not sure whether to state a
-fact or leave it out, state it!
-
-Often people omit facts because they think they know what causes the
-problem and assume that some details do not matter. Thus, you might
-assume that the name of a symbol you use in an example does not
-matter. Well, probably it does not, but one cannot be sure. Perhaps
-the bug is a stray memory reference which happens to fetch from the
-location where that name is stored in memory; perhaps, if the name
-were different, the contents of that location would fool the linker
-into doing the right thing despite the bug. Play it safe and give a
-specific, complete example. That is the easiest thing for you to do,
-and the most helpful.
-
-Keep in mind that the purpose of a bug report is to enable us to fix
-the bug if it is new to us. Therefore, always write your bug reports
-on the assumption that the bug has not been reported previously.
-
-Sometimes people give a few sketchy facts and ask, ``Does this ring a
-bell?'' This cannot help us fix a bug, so it is basically useless. We
-respond by asking for enough details to enable us to investigate.
-You might as well expedite matters by sending them to begin with.
-
-To enable us to fix the bug, you should include all these things:
-
-@itemize @bullet
-@item
-The version of @command{ld}. @command{ld} announces it if you start it with
-the @samp{--version} argument.
-
-Without this, we will not know whether there is any point in looking for
-the bug in the current version of @command{ld}.
-
-@item
-Any patches you may have applied to the @command{ld} source, including any
-patches made to the @code{BFD} library.
-
-@item
-The type of machine you are using, and the operating system name and
-version number.
-
-@item
-What compiler (and its version) was used to compile @command{ld}---e.g.
-``@code{gcc-2.7}''.
-
-@item
-The command arguments you gave the linker to link your example and
-observe the bug. To guarantee you will not omit something important,
-list them all. A copy of the Makefile (or the output from make) is
-sufficient.
-
-If we were to try to guess the arguments, we would probably guess wrong
-and then we might not encounter the bug.
-
-@item
-A complete input file, or set of input files, that will reproduce the
-bug. It is generally most helpful to send the actual object files
-provided that they are reasonably small. Say no more than 10K. For
-bigger files you can either make them available by FTP or HTTP or else
-state that you are willing to send the object file(s) to whomever
-requests them. (Note - your email will be going to a mailing list, so
-we do not want to clog it up with large attachments). But small
-attachments are best.
-
-If the source files were assembled using @code{gas} or compiled using
-@code{gcc}, then it may be OK to send the source files rather than the
-object files. In this case, be sure to say exactly what version of
-@code{gas} or @code{gcc} was used to produce the object files. Also say
-how @code{gas} or @code{gcc} were configured.
-
-@item
-A description of what behavior you observe that you believe is
-incorrect. For example, ``It gets a fatal signal.''
-
-Of course, if the bug is that @command{ld} gets a fatal signal, then we
-will certainly notice it. But if the bug is incorrect output, we might
-not notice unless it is glaringly wrong. You might as well not give us
-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
-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
-you had not told us to expect a crash, then we would not be able to draw
-any conclusion from our observations.
-
-@item
-If you wish to suggest changes to the @command{ld} source, send us context
-diffs, as generated by @code{diff} with the @samp{-u}, @samp{-c}, or
-@samp{-p} option. Always send diffs from the old file to the new file.
-If you even discuss something in the @command{ld} source, refer to it by
-context, not by line number.
-
-The line numbers in our development sources will not match those in your
-sources. Your line numbers would convey no useful information to us.
-@end itemize
-
-Here are some things that are not necessary:
-
-@itemize @bullet
-@item
-A description of the envelope of the bug.
-
-Often people who encounter a bug spend a lot of time investigating
-which changes to the input file will make the bug go away and which
-changes will not affect it.
-
-This is often time consuming and not very useful, because the way we
-will find the bug is by running a single example under the debugger
-with breakpoints, not by pure deduction from a series of examples.
-We recommend that you save your time for something else.
-
-Of course, if you can find a simpler example to report @emph{instead}
-of the original one, that is a convenience for us. Errors in the
-output will be easier to spot, running under the debugger will take
-less time, and so on.
-
-However, simplification is not vital; if you do not want to do this,
-report the bug anyway and send us the entire test case you used.
-
-@item
-A patch for the bug.
-
-A patch for the bug does help us if it is a good one. But do not omit
-the necessary information, such as the test case, on the assumption that
-a patch is all we need. We might see problems with your patch and decide
-to fix the problem another way, or we might not understand it at all.
-
-Sometimes with a program as complicated as @command{ld} it is very hard to
-construct an example that will make the program follow a certain path
-through the code. If you do not send us the example, we will not be
-able to construct one, so we will not be able to verify that the bug is
-fixed.
-
-And if we cannot understand what bug you are trying to fix, or why your
-patch should be an improvement, we will not install it. A test case will
-help us to understand.
-
-@item
-A guess about what the bug is or what it depends on.
-
-Such guesses are usually wrong. Even we cannot guess right about such
-things without first using the debugger to find the facts.
-@end itemize
-
-@node MRI
-@appendix MRI Compatible Script Files
-@cindex MRI compatibility
-To aid users making the transition to @sc{gnu} @command{ld} from the MRI
-linker, @command{ld} can use MRI compatible linker scripts as an
-alternative to the more general-purpose linker scripting language
-described in @ref{Scripts}. MRI compatible linker scripts have a much
-simpler command set than the scripting language otherwise used with
-@command{ld}. @sc{gnu} @command{ld} supports the most commonly used MRI
-linker commands; these commands are described here.
-
-In general, MRI scripts aren't of much use with the @code{a.out} object
-file format, since it only has three sections and MRI scripts lack some
-features to make use of them.
-
-You can specify a file containing an MRI-compatible script using the
-@samp{-c} command-line option.
-
-Each command in an MRI-compatible script occupies its own line; each
-command line starts with the keyword that identifies the command (though
-blank lines are also allowed for punctuation). If a line of an
-MRI-compatible script begins with an unrecognized keyword, @command{ld}
-issues a warning message, but continues processing the script.
-
-Lines beginning with @samp{*} are comments.
-
-You can write these commands using all upper-case letters, or all
-lower case; for example, @samp{chip} is the same as @samp{CHIP}.
-The following list shows only the upper-case form of each command.
-
-@table @code
-@cindex @code{ABSOLUTE} (MRI)
-@item ABSOLUTE @var{secname}
-@itemx ABSOLUTE @var{secname}, @var{secname}, @dots{} @var{secname}
-Normally, @command{ld} includes in the output file all sections from all
-the input files. However, in an MRI-compatible script, you can use the
-@code{ABSOLUTE} command to restrict the sections that will be present in
-your output program. If the @code{ABSOLUTE} command is used at all in a
-script, then only the sections named explicitly in @code{ABSOLUTE}
-commands will appear in the linker output. You can still use other
-input sections (whatever you select on the command line, or using
-@code{LOAD}) to resolve addresses in the output file.
-
-@cindex @code{ALIAS} (MRI)
-@item ALIAS @var{out-secname}, @var{in-secname}
-Use this command to place the data from input section @var{in-secname}
-in a section called @var{out-secname} in the linker output file.
-
-@var{in-secname} may be an integer.
-
-@cindex @code{ALIGN} (MRI)
-@item ALIGN @var{secname} = @var{expression}
-Align the section called @var{secname} to @var{expression}. The
-@var{expression} should be a power of two.
-
-@cindex @code{BASE} (MRI)
-@item BASE @var{expression}
-Use the value of @var{expression} as the lowest address (other than
-absolute addresses) in the output file.
-
-@cindex @code{CHIP} (MRI)
-@item CHIP @var{expression}
-@itemx CHIP @var{expression}, @var{expression}
-This command does nothing; it is accepted only for compatibility.
-
-@cindex @code{END} (MRI)
-@item END
-This command does nothing whatever; it's only accepted for compatibility.
-
-@cindex @code{FORMAT} (MRI)
-@item FORMAT @var{output-format}
-Similar to the @code{OUTPUT_FORMAT} command in the more general linker
-language, but restricted to one of these output formats:
-
-@enumerate
-@item
-S-records, if @var{output-format} is @samp{S}
-
-@item
-IEEE, if @var{output-format} is @samp{IEEE}
-
-@item
-COFF (the @samp{coff-m68k} variant in BFD), if @var{output-format} is
-@samp{COFF}
-@end enumerate
-
-@cindex @code{LIST} (MRI)
-@item LIST @var{anything}@dots{}
-Print (to the standard output file) a link map, as produced by the
-@command{ld} command-line option @samp{-M}.
-
-The keyword @code{LIST} may be followed by anything on the
-same line, with no change in its effect.
-
-@cindex @code{LOAD} (MRI)
-@item LOAD @var{filename}
-@itemx LOAD @var{filename}, @var{filename}, @dots{} @var{filename}
-Include one or more object file @var{filename} in the link; this has the
-same effect as specifying @var{filename} directly on the @command{ld}
-command line.
-
-@cindex @code{NAME} (MRI)
-@item NAME @var{output-name}
-@var{output-name} is the name for the program produced by @command{ld}; the
-MRI-compatible command @code{NAME} is equivalent to the command-line
-option @samp{-o} or the general script language command @code{OUTPUT}.
-
-@cindex @code{ORDER} (MRI)
-@item ORDER @var{secname}, @var{secname}, @dots{} @var{secname}
-@itemx ORDER @var{secname} @var{secname} @var{secname}
-Normally, @command{ld} orders the sections in its output file in the
-order in which they first appear in the input files. In an MRI-compatible
-script, you can override this ordering with the @code{ORDER} command. The
-sections you list with @code{ORDER} will appear first in your output
-file, in the order specified.
-
-@cindex @code{PUBLIC} (MRI)
-@item PUBLIC @var{name}=@var{expression}
-@itemx PUBLIC @var{name},@var{expression}
-@itemx PUBLIC @var{name} @var{expression}
-Supply a value (@var{expression}) for external symbol
-@var{name} used in the linker input files.
-
-@cindex @code{SECT} (MRI)
-@item SECT @var{secname}, @var{expression}
-@itemx SECT @var{secname}=@var{expression}
-@itemx SECT @var{secname} @var{expression}
-You can use any of these three forms of the @code{SECT} command to
-specify the start address (@var{expression}) for section @var{secname}.
-If you have more than one @code{SECT} statement for the same
-@var{secname}, only the @emph{first} sets the start address.
-@end table
-
-@include fdl.texi
-
-@node Index
-@unnumbered Index
-
-@printindex cp
-
-@tex
-% I think something like @colophon should be in texinfo. In the
-% meantime:
-\long\def\colophon{\hbox to0pt{}\vfill
-\centerline{The body of this manual is set in}
-\centerline{\fontname\tenrm,}
-\centerline{with headings in {\bf\fontname\tenbf}}
-\centerline{and examples in {\tt\fontname\tentt}.}
-\centerline{{\it\fontname\tenit\/} and}
-\centerline{{\sl\fontname\tensl\/}}
-\centerline{are used for emphasis.}\vfill}
-\page\colophon
-% Blame: doc@cygnus.com, 28mar91.
-@end tex
-
-
-@contents
-@bye
diff --git a/contrib/binutils/ld/ldcref.c b/contrib/binutils/ld/ldcref.c
deleted file mode 100644
index 3094735..0000000
--- a/contrib/binutils/ld/ldcref.c
+++ /dev/null
@@ -1,550 +0,0 @@
-/* ldcref.c -- output a cross reference table
- Copyright 1996, 1997, 1998, 2000, 2002, 2003
- Free Software Foundation, Inc.
- Written by Ian Lance Taylor <ian@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. */
-
-/* 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 "bfdlink.h"
-#include "libiberty.h"
-
-#include "ld.h"
-#include "ldmain.h"
-#include "ldmisc.h"
-#include "ldexp.h"
-#include "ldlang.h"
-
-/* We keep an instance of this structure for each reference to a
- symbol from a given object. */
-
-struct cref_ref {
- /* The next reference. */
- struct cref_ref *next;
- /* The object. */
- bfd *abfd;
- /* True if the symbol is defined. */
- unsigned int def : 1;
- /* True if the symbol is common. */
- unsigned int common : 1;
- /* True if the symbol is undefined. */
- unsigned int undef : 1;
-};
-
-/* We keep a hash table of symbols. Each entry looks like this. */
-
-struct cref_hash_entry {
- struct bfd_hash_entry root;
- /* The demangled name. */
- char *demangled;
- /* References to and definitions of this symbol. */
- struct cref_ref *refs;
-};
-
-/* This is what the hash table looks like. */
-
-struct cref_hash_table {
- struct bfd_hash_table root;
-};
-
-/* Forward declarations. */
-
-static void output_one_cref (FILE *, struct cref_hash_entry *);
-static void check_section_sym_xref (lang_input_statement_type *);
-static bfd_boolean check_nocrossref (struct cref_hash_entry *, void *);
-static void check_refs (const char *, asection *, bfd *,
- struct lang_nocrossrefs *);
-static void check_reloc_refs (bfd *, asection *, void *);
-
-/* Look up an entry in the cref hash table. */
-
-#define cref_hash_lookup(table, string, create, copy) \
- ((struct cref_hash_entry *) \
- bfd_hash_lookup (&(table)->root, (string), (create), (copy)))
-
-/* Traverse the cref hash table. */
-
-#define cref_hash_traverse(table, func, info) \
- (bfd_hash_traverse \
- (&(table)->root, \
- (bfd_boolean (*) (struct bfd_hash_entry *, void *)) (func), \
- (info)))
-
-/* The cref hash table. */
-
-static struct cref_hash_table cref_table;
-
-/* Whether the cref hash table has been initialized. */
-
-static bfd_boolean cref_initialized;
-
-/* The number of symbols seen so far. */
-
-static size_t cref_symcount;
-
-/* Create an entry in a cref hash table. */
-
-static struct bfd_hash_entry *
-cref_hash_newfunc (struct bfd_hash_entry *entry,
- struct bfd_hash_table *table,
- const char *string)
-{
- struct cref_hash_entry *ret = (struct cref_hash_entry *) entry;
-
- /* Allocate the structure if it has not already been allocated by a
- subclass. */
- if (ret == NULL)
- ret = ((struct cref_hash_entry *)
- bfd_hash_allocate (table, sizeof (struct cref_hash_entry)));
- if (ret == NULL)
- return NULL;
-
- /* Call the allocation method of the superclass. */
- ret = ((struct cref_hash_entry *)
- bfd_hash_newfunc ((struct bfd_hash_entry *) ret, table, string));
- if (ret != NULL)
- {
- /* Set local fields. */
- ret->demangled = NULL;
- ret->refs = NULL;
-
- /* Keep a count of the number of entries created in the hash
- table. */
- ++cref_symcount;
- }
-
- return &ret->root;
-}
-
-/* Add a symbol to the cref hash table. This is called for every
- symbol that is seen during the link. */
-
-void
-add_cref (const char *name,
- bfd *abfd,
- asection *section,
- bfd_vma value ATTRIBUTE_UNUSED)
-{
- struct cref_hash_entry *h;
- struct cref_ref *r;
-
- if (! cref_initialized)
- {
- if (! bfd_hash_table_init (&cref_table.root, cref_hash_newfunc))
- einfo (_("%X%P: bfd_hash_table_init of cref table failed: %E\n"));
- cref_initialized = TRUE;
- }
-
- h = cref_hash_lookup (&cref_table, name, TRUE, FALSE);
- if (h == NULL)
- einfo (_("%X%P: cref_hash_lookup failed: %E\n"));
-
- for (r = h->refs; r != NULL; r = r->next)
- if (r->abfd == abfd)
- break;
-
- if (r == NULL)
- {
- r = xmalloc (sizeof *r);
- r->next = h->refs;
- h->refs = r;
- r->abfd = abfd;
- r->def = FALSE;
- r->common = FALSE;
- r->undef = FALSE;
- }
-
- if (bfd_is_und_section (section))
- r->undef = TRUE;
- else if (bfd_is_com_section (section))
- r->common = TRUE;
- else
- r->def = 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. */
-
-static bfd_boolean
-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);
-
- **pph = h;
-
- ++*pph;
-
- return TRUE;
-}
-
-/* Sort an array of cref hash table entries by name. */
-
-static int
-cref_sort_array (const void *a1, const void *a2)
-{
- const struct cref_hash_entry * const *p1 = a1;
- const struct cref_hash_entry * const *p2 = a2;
-
- return strcmp ((*p1)->demangled, (*p2)->demangled);
-}
-
-/* Write out the cref table. */
-
-#define FILECOL (50)
-
-void
-output_cref (FILE *fp)
-{
- int len;
- struct cref_hash_entry **csyms, **csym_fill, **csym, **csym_end;
- const char *msg;
-
- fprintf (fp, _("\nCross Reference Table\n\n"));
- msg = _("Symbol");
- fprintf (fp, "%s", msg);
- len = strlen (msg);
- while (len < FILECOL)
- {
- putc (' ', fp);
- ++len;
- }
- fprintf (fp, _("File\n"));
-
- if (! cref_initialized)
- {
- fprintf (fp, _("No symbols\n"));
- return;
- }
-
- csyms = xmalloc (cref_symcount * sizeof (*csyms));
-
- csym_fill = csyms;
- cref_hash_traverse (&cref_table, cref_fill_array, &csym_fill);
- ASSERT ((size_t) (csym_fill - csyms) == cref_symcount);
-
- qsort (csyms, cref_symcount, sizeof (*csyms), cref_sort_array);
-
- csym_end = csyms + cref_symcount;
- for (csym = csyms; csym < csym_end; csym++)
- output_one_cref (fp, *csym);
-}
-
-/* Output one entry in the cross reference table. */
-
-static void
-output_one_cref (FILE *fp, struct cref_hash_entry *h)
-{
- int len;
- struct bfd_link_hash_entry *hl;
- struct cref_ref *r;
-
- hl = bfd_link_hash_lookup (link_info.hash, h->root.string, FALSE,
- FALSE, TRUE);
- if (hl == NULL)
- einfo ("%P: symbol `%T' missing from main hash table\n",
- h->root.string);
- else
- {
- /* If this symbol is defined in a dynamic object but never
- referenced by a normal object, then don't print it. */
- if (hl->type == bfd_link_hash_defined)
- {
- if (hl->u.def.section->output_section == NULL)
- return;
- if (hl->u.def.section->owner != NULL
- && (hl->u.def.section->owner->flags & DYNAMIC) != 0)
- {
- for (r = h->refs; r != NULL; r = r->next)
- if ((r->abfd->flags & DYNAMIC) == 0)
- break;
- if (r == NULL)
- return;
- }
- }
- }
-
- fprintf (fp, "%s ", h->demangled);
- len = strlen (h->demangled) + 1;
-
- for (r = h->refs; r != NULL; r = r->next)
- {
- if (r->def)
- {
- while (len < FILECOL)
- {
- putc (' ', fp);
- ++len;
- }
- lfinfo (fp, "%B\n", r->abfd);
- len = 0;
- }
- }
-
- for (r = h->refs; r != NULL; r = r->next)
- {
- if (! r->def)
- {
- while (len < FILECOL)
- {
- putc (' ', fp);
- ++len;
- }
- lfinfo (fp, "%B\n", r->abfd);
- len = 0;
- }
- }
-
- ASSERT (len == 0);
-}
-
-/* Check for prohibited cross references. */
-
-void
-check_nocrossrefs (void)
-{
- if (! cref_initialized)
- return;
-
- cref_hash_traverse (&cref_table, check_nocrossref, NULL);
-
- lang_for_each_file (check_section_sym_xref);
-}
-
-/* Checks for prohibited cross references to section symbols. */
-
-static void
-check_section_sym_xref (lang_input_statement_type *statement)
-{
- bfd *abfd;
- asection *sec;
-
- abfd = statement->the_bfd;
- if (abfd == NULL)
- return;
-
- for (sec = abfd->sections; sec != NULL; sec = sec->next)
- {
- asection *outsec;
-
- outsec = sec->output_section;
- if (outsec != NULL)
- {
- const char *outsecname;
- struct lang_nocrossrefs *ncrs;
- struct lang_nocrossref *ncr;
-
- outsecname = outsec->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 one symbol to see if it is a prohibited cross reference. */
-
-static bfd_boolean
-check_nocrossref (struct cref_hash_entry *h, void *ignore ATTRIBUTE_UNUSED)
-{
- struct bfd_link_hash_entry *hl;
- asection *defsec;
- const char *defsecname;
- struct lang_nocrossrefs *ncrs;
- struct lang_nocrossref *ncr;
- struct cref_ref *ref;
-
- hl = bfd_link_hash_lookup (link_info.hash, h->root.string, FALSE,
- FALSE, TRUE);
- if (hl == NULL)
- {
- einfo (_("%P: symbol `%T' missing from main hash table\n"),
- h->root.string);
- return TRUE;
- }
-
- if (hl->type != bfd_link_hash_defined
- && hl->type != bfd_link_hash_defweak)
- return TRUE;
-
- defsec = hl->u.def.section->output_section;
- if (defsec == NULL)
- return TRUE;
- defsecname = bfd_get_section_name (defsec->owner, defsec);
-
- for (ncrs = nocrossref_list; ncrs != NULL; ncrs = ncrs->next)
- 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);
-
- return TRUE;
-}
-
-/* The struct is used to pass information from check_refs to
- check_reloc_refs through bfd_map_over_sections. */
-
-struct check_refs_info {
- const char *sym_name;
- asection *defsec;
- struct lang_nocrossrefs *ncrs;
- asymbol **asymbols;
-};
-
-/* This function is called for each symbol defined in a section which
- prohibits cross references. We need to look through all references
- to this symbol, and ensure that the references are not from
- prohibited sections. */
-
-static void
-check_refs (const char *name,
- asection *sec,
- bfd *abfd,
- struct lang_nocrossrefs *ncrs)
-{
- lang_input_statement_type *li;
- asymbol **asymbols;
- struct check_refs_info info;
-
- /* We need to look through the relocations for this BFD, to see
- if any of the relocations which refer to this symbol are from
- a prohibited section. Note that we need to do this even for
- the BFD in which the symbol is defined, since even a single
- BFD might contain a prohibited cross reference. */
-
- li = abfd->usrdata;
- if (li != NULL && li->asymbols != NULL)
- asymbols = li->asymbols;
- else
- {
- 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;
- }
- }
-
- info.sym_name = name;
- info.defsec = sec;
- info.ncrs = ncrs;
- info.asymbols = asymbols;
- bfd_map_over_sections (abfd, check_reloc_refs, &info);
-
- if (li == NULL)
- free (asymbols);
-}
-
-/* This is called via bfd_map_over_sections. INFO->SYM_NAME is a symbol
- defined in INFO->DEFSECNAME. If this section maps into any of the
- sections listed in INFO->NCRS, other than INFO->DEFSECNAME, then we
- look through the relocations. If any of the relocations are to
- INFO->SYM_NAME, then we report a prohibited cross reference error. */
-
-static void
-check_reloc_refs (bfd *abfd, asection *sec, void *iarg)
-{
- struct check_refs_info *info = iarg;
- asection *outsec;
- const char *outsecname;
- asection *outdefsec;
- const char *outdefsecname;
- struct lang_nocrossref *ncr;
- const char *symname;
- long relsize;
- arelent **relpp;
- long relcount;
- arelent **p, **pend;
-
- outsec = sec->output_section;
- outsecname = bfd_get_section_name (outsec->owner, outsec);
-
- outdefsec = info->defsec->output_section;
- outdefsecname = bfd_get_section_name (outdefsec->owner, outdefsec);
-
- /* The section where the symbol is defined is permitted. */
- if (strcmp (outsecname, outdefsecname) == 0)
- return;
-
- for (ncr = info->ncrs->list; ncr != NULL; ncr = ncr->next)
- if (strcmp (outsecname, ncr->name) == 0)
- break;
-
- if (ncr == NULL)
- return;
-
- /* 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. */
-
- symname = info->sym_name;
-
- relsize = bfd_get_reloc_upper_bound (abfd, sec);
- if (relsize < 0)
- einfo (_("%B%F: could not read relocs: %E\n"), abfd);
- if (relsize == 0)
- return;
-
- relpp = xmalloc (relsize);
- relcount = bfd_canonicalize_reloc (abfd, sec, relpp, info->asymbols);
- if (relcount < 0)
- einfo (_("%B%F: could not read relocs: %E\n"), abfd);
-
- p = relpp;
- pend = p + relcount;
- for (; p < pend && *p != NULL; p++)
- {
- arelent *q = *p;
-
- if (q->sym_ptr_ptr != NULL
- && *q->sym_ptr_ptr != NULL
- && (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)))
- {
- /* We found a reloc for the symbol. The symbol is defined
- 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. */
- einfo (_("%X%C: prohibited cross reference from %s to `%T' in %s\n"),
- abfd, sec, q->address, outsecname,
- bfd_asymbol_name (*q->sym_ptr_ptr), outdefsecname);
- }
- }
-
- free (relpp);
-}
diff --git a/contrib/binutils/ld/ldctor.c b/contrib/binutils/ld/ldctor.c
deleted file mode 100644
index 34d5e52..0000000
--- a/contrib/binutils/ld/ldctor.c
+++ /dev/null
@@ -1,376 +0,0 @@
-/* ldctor.c -- constructor support routines
- Copyright 1991, 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001,
- 2002, 2003 Free Software Foundation, Inc.
- By Steve Chamberlain <sac@cygnus.com>
-
-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, 59 Temple Place - Suite 330, Boston, MA
-02111-1307, USA. */
-
-#include "bfd.h"
-#include "sysdep.h"
-#include "bfdlink.h"
-#include "safe-ctype.h"
-
-#include "ld.h"
-#include "ldexp.h"
-#include "ldlang.h"
-#include "ldmisc.h"
-#include <ldgram.h>
-#include "ldmain.h"
-#include "ldctor.h"
-
-/* The list of statements needed to handle constructors. These are
- invoked by the command CONSTRUCTORS in the linker script. */
-lang_statement_list_type constructor_list;
-
-/* Whether the constructors should be sorted. Note that this is
- global for the entire link; we assume that there is only a single
- CONSTRUCTORS command in the linker script. */
-bfd_boolean constructors_sorted;
-
-/* The sets we have seen. */
-struct set_info *sets;
-
-/* Add an entry to a set. H is the entry in the linker hash table.
- 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
- function will construct the sets. */
-
-void
-ldctor_add_set_entry (struct bfd_link_hash_entry *h,
- bfd_reloc_code_real_type reloc,
- const char *name,
- asection *section,
- bfd_vma value)
-{
- struct set_info *p;
- struct set_element *e;
- struct set_element **epp;
-
- for (p = sets; p != NULL; p = p->next)
- if (p->h == h)
- break;
-
- if (p == NULL)
- {
- p = xmalloc (sizeof (struct set_info));
- p->next = sets;
- sets = p;
- p->h = h;
- p->reloc = reloc;
- p->count = 0;
- p->elements = NULL;
- }
- else
- {
- if (p->reloc != reloc)
- {
- einfo (_("%P%X: Different relocs used in set %s\n"),
- h->root.string);
- return;
- }
-
- /* Don't permit a set to be constructed from different object
- file formats. The same reloc may have different results. We
- actually could sometimes handle this, but the case is
- unlikely to ever arise. Sometimes constructor symbols are in
- unusual sections, such as the absolute section--this appears
- to be the case in Linux a.out--and in such cases we just
- assume everything is OK. */
- if (p->elements != NULL
- && section->owner != NULL
- && p->elements->section->owner != NULL
- && strcmp (bfd_get_target (section->owner),
- bfd_get_target (p->elements->section->owner)) != 0)
- {
- einfo (_("%P%X: Different object file formats composing set %s\n"),
- h->root.string);
- return;
- }
- }
-
- e = xmalloc (sizeof (struct set_element));
- e->next = NULL;
- e->name = name;
- e->section = section;
- e->value = value;
-
- for (epp = &p->elements; *epp != NULL; epp = &(*epp)->next)
- ;
- *epp = e;
-
- ++p->count;
-}
-
-/* Get the priority of a g++ global constructor or destructor from the
- symbol name. */
-
-static int
-ctor_prio (const char *name)
-{
- /* The name will look something like _GLOBAL_$I$65535$test02__Fv.
- There might be extra leading underscores, and the $ characters
- might be something else. The I might be a D. */
-
- while (*name == '_')
- ++name;
-
- if (strncmp (name, "GLOBAL_", sizeof "GLOBAL_" - 1) != 0)
- return -1;
-
- name += sizeof "GLOBAL_" - 1;
-
- if (name[0] != name[2])
- return -1;
- if (name[1] != 'I' && name[1] != 'D')
- return -1;
- if (! ISDIGIT (name[3]))
- return -1;
-
- return atoi (name + 3);
-}
-
-/* This function is used to sort constructor elements by priority. It
- is called via qsort. */
-
-static int
-ctor_cmp (const void *p1, const void *p2)
-{
- const struct set_element * const *pe1 = p1;
- const struct set_element * const *pe2 = p2;
- const char *n1;
- const char *n2;
- int prio1;
- int prio2;
-
- n1 = (*pe1)->name;
- if (n1 == NULL)
- n1 = "";
- n2 = (*pe2)->name;
- if (n2 == NULL)
- n2 = "";
-
- /* We need to sort in reverse order by priority. When two
- constructors have the same priority, we should maintain their
- current relative position. */
-
- prio1 = ctor_prio (n1);
- prio2 = ctor_prio (n2);
-
- /* We sort in reverse order because that is what g++ expects. */
- if (prio1 < prio2)
- return 1;
- else if (prio1 > prio2)
- return -1;
-
- /* Force a stable sort. */
-
- if (pe1 < pe2)
- return -1;
- else if (pe1 > pe2)
- return 1;
- else
- return 0;
-}
-
-/* This function is called after the first phase of the link and
- before the second phase. At this point all set information has
- been gathered. We now put the statements to build the sets
- themselves into constructor_list. */
-
-void
-ldctor_build_sets (void)
-{
- static bfd_boolean called;
- lang_statement_list_type *old;
- bfd_boolean header_printed;
- struct set_info *p;
-
- /* The emulation code may call us directly, but we only want to do
- this once. */
- if (called)
- return;
- called = TRUE;
-
- if (constructors_sorted)
- {
- for (p = sets; p != NULL; p = p->next)
- {
- int c, i;
- struct set_element *e;
- struct set_element **array;
-
- if (p->elements == NULL)
- continue;
-
- c = 0;
- for (e = p->elements; e != NULL; e = e->next)
- ++c;
-
- array = xmalloc (c * sizeof *array);
-
- i = 0;
- for (e = p->elements; e != NULL; e = e->next)
- {
- array[i] = e;
- ++i;
- }
-
- qsort (array, c, sizeof *array, ctor_cmp);
-
- e = array[0];
- p->elements = e;
- for (i = 0; i < c - 1; i++)
- array[i]->next = array[i + 1];
- array[i]->next = NULL;
-
- free (array);
- }
- }
-
- old = stat_ptr;
- stat_ptr = &constructor_list;
-
- lang_list_init (stat_ptr);
-
- header_printed = FALSE;
- for (p = sets; p != NULL; p = p->next)
- {
- struct set_element *e;
- reloc_howto_type *howto;
- int reloc_size, size;
-
- /* If the symbol is defined, we may have been invoked from
- collect, and the sets may already have been built, so we do
- not do anything. */
- if (p->h->type == bfd_link_hash_defined
- || p->h->type == bfd_link_hash_defweak)
- continue;
-
- /* For each set we build:
- set:
- .long number_of_elements
- .long element0
- ...
- .long elementN
- .long 0
- except that we use the right size instead of .long. When
- generating relocatable output, we generate relocs instead of
- addresses. */
- howto = bfd_reloc_type_lookup (output_bfd, p->reloc);
- if (howto == NULL)
- {
- if (link_info.relocatable)
- {
- einfo (_("%P%X: %s does not support reloc %s for set %s\n"),
- bfd_get_target (output_bfd),
- bfd_get_reloc_code_name (p->reloc),
- p->h->root.string);
- continue;
- }
-
- /* If this is not a relocatable link, all we need is the
- size, which we can get from the input BFD. */
- if (p->elements->section->owner != NULL)
- howto = bfd_reloc_type_lookup (p->elements->section->owner,
- p->reloc);
- if (howto == NULL)
- {
- einfo (_("%P%X: %s does not support reloc %s for set %s\n"),
- bfd_get_target (p->elements->section->owner),
- bfd_get_reloc_code_name (p->reloc),
- p->h->root.string);
- continue;
- }
- }
-
- reloc_size = bfd_get_reloc_size (howto);
- switch (reloc_size)
- {
- case 1: size = BYTE; break;
- case 2: size = SHORT; break;
- case 4: size = LONG; break;
- case 8:
- if (howto->complain_on_overflow == complain_overflow_signed)
- size = SQUAD;
- else
- size = QUAD;
- break;
- default:
- einfo (_("%P%X: Unsupported size %d for set %s\n"),
- bfd_get_reloc_size (howto), p->h->root.string);
- size = LONG;
- break;
- }
-
- lang_add_assignment (exp_assop ('=', ".",
- exp_unop (ALIGN_K,
- exp_intop (reloc_size))));
- lang_add_assignment (exp_assop ('=', p->h->root.string,
- exp_nameop (NAME, ".")));
- lang_add_data (size, exp_intop (p->count));
-
- for (e = p->elements; e != NULL; e = e->next)
- {
- if (config.map_file != NULL)
- {
- int len;
-
- if (! header_printed)
- {
- minfo (_("\nSet Symbol\n\n"));
- header_printed = TRUE;
- }
-
- minfo ("%s", p->h->root.string);
- len = strlen (p->h->root.string);
-
- if (len >= 19)
- {
- print_nl ();
- len = 0;
- }
- while (len < 20)
- {
- print_space ();
- ++len;
- }
-
- if (e->name != NULL)
- minfo ("%T\n", e->name);
- else
- minfo ("%G\n", e->section->owner, e->section, e->value);
- }
-
- /* Need SEC_KEEP for --gc-sections. */
- if (! bfd_is_abs_section (e->section))
- e->section->flags |= SEC_KEEP;
-
- if (link_info.relocatable)
- lang_add_reloc (p->reloc, howto, e->section, e->name,
- exp_intop (e->value));
- else
- lang_add_data (size, exp_relop (e->section, e->value));
- }
-
- lang_add_data (size, exp_intop (0));
- }
-
- stat_ptr = old;
-}
diff --git a/contrib/binutils/ld/ldctor.h b/contrib/binutils/ld/ldctor.h
deleted file mode 100644
index 436df6c0..0000000
--- a/contrib/binutils/ld/ldctor.h
+++ /dev/null
@@ -1,60 +0,0 @@
-/* ldctor.h - linker constructor support
- Copyright 1991, 1992, 1993, 1994, 1995, 1998, 2000, 2002, 2003
- 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, 59 Temple Place - Suite 330, Boston, MA
-02111-1307, USA. */
-
-#ifndef LDCTOR_H
-#define LDCTOR_H
-
-/* List of statements needed to handle constructors */
-extern lang_statement_list_type constructor_list;
-
-/* Whether the constructors should be sorted. Note that this is
- global for the entire link; we assume that there is only a single
- CONSTRUCTORS command in the linker script. */
-extern bfd_boolean constructors_sorted;
-
-/* We keep a list of these structures for each set we build. */
-
-struct set_info {
- struct set_info *next; /* Next set. */
- struct bfd_link_hash_entry *h; /* Hash table entry. */
- bfd_reloc_code_real_type reloc; /* Reloc to use for an entry. */
- size_t count; /* Number of elements. */
- struct set_element *elements; /* Elements in set. */
-};
-
-struct set_element {
- struct set_element *next; /* Next element. */
- const char *name; /* Name in set (may be NULL). */
- asection *section; /* Section of value in set. */
- bfd_vma value; /* Value in set. */
-};
-
-/* The sets we have seen. */
-
-extern struct set_info *sets;
-
-extern void ldctor_add_set_entry
- (struct bfd_link_hash_entry *, bfd_reloc_code_real_type, const char *,
- asection *, bfd_vma);
-extern void ldctor_build_sets
- (void);
-
-#endif
diff --git a/contrib/binutils/ld/ldemul.c b/contrib/binutils/ld/ldemul.c
deleted file mode 100644
index 760c55d..0000000
--- a/contrib/binutils/ld/ldemul.c
+++ /dev/null
@@ -1,313 +0,0 @@
-/* ldemul.c -- clearing house for ld emulation states
- Copyright 1991, 1992, 1993, 1994, 1995, 1996, 1997, 1998, 2000, 2002, 2003
- 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, 59 Temple Place - Suite 330, Boston, MA
-02111-1307, USA. */
-
-#include "bfd.h"
-#include "sysdep.h"
-#include "getopt.h"
-
-#include "ld.h"
-#include "ldmisc.h"
-#include "ldexp.h"
-#include "ldlang.h"
-#include "ldfile.h"
-#include "ldemul.h"
-#include "ldmain.h"
-#include "ldemul-list.h"
-
-ld_emulation_xfer_type *ld_emulation;
-
-void
-ldemul_hll (char *name)
-{
- ld_emulation->hll (name);
-}
-
-void
-ldemul_syslib (char *name)
-{
- ld_emulation->syslib (name);
-}
-
-void
-ldemul_after_parse (void)
-{
- ld_emulation->after_parse ();
-}
-
-void
-ldemul_before_parse (void)
-{
- ld_emulation->before_parse ();
-}
-
-void
-ldemul_after_open (void)
-{
- ld_emulation->after_open ();
-}
-
-void
-ldemul_after_allocation (void)
-{
- ld_emulation->after_allocation ();
-}
-
-void
-ldemul_before_allocation (void)
-{
- if (ld_emulation->before_allocation)
- ld_emulation->before_allocation ();
-}
-
-void
-ldemul_set_output_arch (void)
-{
- ld_emulation->set_output_arch ();
-}
-
-void
-ldemul_finish (void)
-{
- if (ld_emulation->finish)
- ld_emulation->finish ();
-}
-
-void
-ldemul_set_symbols (void)
-{
- if (ld_emulation->set_symbols)
- ld_emulation->set_symbols ();
-}
-
-void
-ldemul_create_output_section_statements (void)
-{
- if (ld_emulation->create_output_section_statements)
- ld_emulation->create_output_section_statements ();
-}
-
-char *
-ldemul_get_script (int *isfile)
-{
- return ld_emulation->get_script (isfile);
-}
-
-bfd_boolean
-ldemul_open_dynamic_archive (const char *arch, search_dirs_type *search,
- lang_input_statement_type *entry)
-{
- if (ld_emulation->open_dynamic_archive)
- return (*ld_emulation->open_dynamic_archive) (arch, search, entry);
- return FALSE;
-}
-
-bfd_boolean
-ldemul_place_orphan (lang_input_statement_type *file, asection *s)
-{
- if (ld_emulation->place_orphan)
- return (*ld_emulation->place_orphan) (file, s);
- return FALSE;
-}
-
-void
-ldemul_add_options (int ns, char **shortopts, int nl,
- struct option **longopts, int nrl,
- struct option **really_longopts)
-{
- if (ld_emulation->add_options)
- (*ld_emulation->add_options) (ns, shortopts, nl, longopts,
- nrl, really_longopts);
-}
-
-bfd_boolean
-ldemul_handle_option (int optc)
-{
- if (ld_emulation->handle_option)
- return (*ld_emulation->handle_option) (optc);
- return FALSE;
-}
-
-bfd_boolean
-ldemul_parse_args (int argc, char **argv)
-{
- /* Try and use the emulation parser if there is one. */
- if (ld_emulation->parse_args)
- return (*ld_emulation->parse_args) (argc, argv);
- return FALSE;
-}
-
-/* Let the emulation code handle an unrecognized file. */
-
-bfd_boolean
-ldemul_unrecognized_file (lang_input_statement_type *entry)
-{
- if (ld_emulation->unrecognized_file)
- return (*ld_emulation->unrecognized_file) (entry);
- return FALSE;
-}
-
-/* Let the emulation code handle a recognized file. */
-
-bfd_boolean
-ldemul_recognized_file (lang_input_statement_type *entry)
-{
- if (ld_emulation->recognized_file)
- return (*ld_emulation->recognized_file) (entry);
- return FALSE;
-}
-
-char *
-ldemul_choose_target (int argc, char **argv)
-{
- return ld_emulation->choose_target (argc, argv);
-}
-
-
-/* The default choose_target function. */
-
-char *
-ldemul_default_target (int argc ATTRIBUTE_UNUSED, char **argv ATTRIBUTE_UNUSED)
-{
- char *from_outside = getenv (TARGET_ENVIRON);
- if (from_outside != (char *) NULL)
- return from_outside;
- return ld_emulation->target_name;
-}
-
-void
-after_parse_default (void)
-{
-}
-
-void
-after_open_default (void)
-{
-}
-
-void
-after_allocation_default (void)
-{
-}
-
-void
-before_allocation_default (void)
-{
-}
-
-void
-set_output_arch_default (void)
-{
- /* Set the output architecture and machine if possible. */
- bfd_set_arch_mach (output_bfd,
- ldfile_output_architecture, ldfile_output_machine);
-}
-
-void
-syslib_default (char *ignore ATTRIBUTE_UNUSED)
-{
- info_msg (_("%S SYSLIB ignored\n"));
-}
-
-void
-hll_default (char *ignore ATTRIBUTE_UNUSED)
-{
- info_msg (_("%S HLL ignored\n"));
-}
-
-ld_emulation_xfer_type *ld_emulations[] = { EMULATION_LIST };
-
-void
-ldemul_choose_mode (char *target)
-{
- ld_emulation_xfer_type **eptr = ld_emulations;
- /* Ignore "gld" prefix. */
- if (target[0] == 'g' && target[1] == 'l' && target[2] == 'd')
- target += 3;
- for (; *eptr; eptr++)
- {
- if (strcmp (target, (*eptr)->emulation_name) == 0)
- {
- ld_emulation = *eptr;
- return;
- }
- }
- einfo (_("%P: unrecognised emulation mode: %s\n"), target);
- einfo (_("Supported emulations: "));
- ldemul_list_emulations (stderr);
- einfo ("%F\n");
-}
-
-void
-ldemul_list_emulations (FILE *f)
-{
- ld_emulation_xfer_type **eptr = ld_emulations;
- bfd_boolean first = TRUE;
-
- for (; *eptr; eptr++)
- {
- if (first)
- first = FALSE;
- else
- fprintf (f, " ");
- fprintf (f, "%s", (*eptr)->emulation_name);
- }
-}
-
-void
-ldemul_list_emulation_options (FILE *f)
-{
- ld_emulation_xfer_type **eptr;
- int options_found = 0;
-
- for (eptr = ld_emulations; *eptr; eptr++)
- {
- ld_emulation_xfer_type *emul = *eptr;
-
- if (emul->list_options)
- {
- fprintf (f, "%s: \n", emul->emulation_name);
-
- emul->list_options (f);
-
- options_found = 1;
- }
- }
-
- if (! options_found)
- fprintf (f, _(" no emulation specific options.\n"));
-}
-
-int
-ldemul_find_potential_libraries (char *name, lang_input_statement_type *entry)
-{
- if (ld_emulation->find_potential_libraries)
- return ld_emulation->find_potential_libraries (name, entry);
-
- return 0;
-}
-
-struct bfd_elf_version_expr *
-ldemul_new_vers_pattern (struct bfd_elf_version_expr *entry)
-{
- if (ld_emulation->new_vers_pattern)
- entry = (*ld_emulation->new_vers_pattern) (entry);
- return entry;
-}
diff --git a/contrib/binutils/ld/ldemul.h b/contrib/binutils/ld/ldemul.h
deleted file mode 100644
index 8feef67..0000000
--- a/contrib/binutils/ld/ldemul.h
+++ /dev/null
@@ -1,196 +0,0 @@
-/* ld-emul.h - Linker emulation header file
- Copyright 1991, 1992, 1993, 1994, 1995, 1996, 1997, 1998, 2000, 2002, 2003
- 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 1, 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. */
-
-#ifndef LDEMUL_H
-#define LDEMUL_H
-
-extern void ldemul_hll
- (char *);
-extern void ldemul_syslib
- (char *);
-extern void ldemul_after_parse
- (void);
-extern void ldemul_before_parse
- (void);
-extern void ldemul_after_open
- (void);
-extern void ldemul_after_allocation
- (void);
-extern void ldemul_before_allocation
- (void);
-extern void ldemul_set_output_arch
- (void);
-extern char *ldemul_choose_target
- (int, char**);
-extern void ldemul_choose_mode
- (char *);
-extern void ldemul_list_emulations
- (FILE *);
-extern void ldemul_list_emulation_options
- (FILE *);
-extern char *ldemul_get_script
- (int *isfile);
-extern void ldemul_finish
- (void);
-extern void ldemul_set_symbols
- (void);
-extern void ldemul_create_output_section_statements
- (void);
-extern bfd_boolean ldemul_place_orphan
- (struct lang_input_statement_struct *, asection *);
-extern bfd_boolean ldemul_parse_args
- (int, char **);
-extern void ldemul_add_options
- (int, char **, int, struct option **, int, struct option **);
-extern bfd_boolean ldemul_handle_option
- (int);
-extern bfd_boolean ldemul_unrecognized_file
- (struct lang_input_statement_struct *);
-extern bfd_boolean ldemul_recognized_file
- (struct lang_input_statement_struct *);
-extern bfd_boolean ldemul_open_dynamic_archive
- (const char *, struct search_dirs *, struct lang_input_statement_struct *);
-extern char *ldemul_default_target
- (int, char**);
-extern void after_parse_default
- (void);
-extern void after_open_default
- (void);
-extern void after_allocation_default
- (void);
-extern void before_allocation_default
- (void);
-extern void set_output_arch_default
- (void);
-extern void syslib_default
- (char*);
-extern void hll_default
- (char*);
-extern int ldemul_find_potential_libraries
- (char *, struct lang_input_statement_struct *);
-extern struct bfd_elf_version_expr *ldemul_new_vers_pattern
- (struct bfd_elf_version_expr *);
-
-typedef struct ld_emulation_xfer_struct {
- /* Run before parsing the command line and script file.
- Set the architecture, maybe other things. */
- void (*before_parse) (void);
-
- /* Handle the SYSLIB (low level library) script command. */
- void (*syslib) (char *);
-
- /* Handle the HLL (high level library) script command. */
- void (*hll) (char *);
-
- /* Run after parsing the command line and script file. */
- void (*after_parse) (void);
-
- /* Run after opening all input files, and loading the symbols. */
- void (*after_open) (void);
-
- /* Run after allocating output sections. */
- void (*after_allocation) (void);
-
- /* Set the output architecture and machine if possible. */
- void (*set_output_arch) (void);
-
- /* Decide which target name to use. */
- char * (*choose_target) (int, char**);
-
- /* Run before allocating output sections. */
- void (*before_allocation) (void);
-
- /* Return the appropriate linker script. */
- char * (*get_script) (int *isfile);
-
- /* The name of this emulation. */
- char *emulation_name;
-
- /* The output format. */
- char *target_name;
-
- /* Run after assigning values from the script. */
- void (*finish) (void);
-
- /* Create any output sections needed by the target. */
- void (*create_output_section_statements) (void);
-
- /* Try to open a dynamic library. ARCH is an architecture name, and
- is normally the empty string. ENTRY is the lang_input_statement
- that should be opened. */
- bfd_boolean (*open_dynamic_archive)
- (const char *arch, struct search_dirs *,
- struct lang_input_statement_struct *entry);
-
- /* Place an orphan section. Return TRUE if it was placed, FALSE if
- 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 *);
-
- /* Run after assigning parsing with the args, but before
- reading the script. Used to initialize symbols used in the script. */
- void (*set_symbols) (void);
-
- /* Parse args which the base linker doesn't understand.
- Return TRUE if the arg needs no further processing. */
- bfd_boolean (*parse_args) (int, char **);
-
- /* Hook to add options to parameters passed by the base linker to
- getopt_long and getopt_long_only calls. */
- void (*add_options)
- (int, char **, int, struct option **, int, struct option **);
-
- /* Companion to the above to handle an option. Returns TRUE if it is
- one of our options. */
- bfd_boolean (*handle_option) (int);
-
- /* Run to handle files which are not recognized as object files or
- archives. Return TRUE if the file was handled. */
- bfd_boolean (*unrecognized_file)
- (struct lang_input_statement_struct *);
-
- /* Run to list the command line options which parse_args handles. */
- void (* list_options) (FILE *);
-
- /* Run to specially handle files which *are* recognized as object
- files or archives. Return TRUE if the file was handled. */
- bfd_boolean (*recognized_file)
- (struct lang_input_statement_struct *);
-
- /* Called when looking for libraries in a directory specified
- via a linker command line option or linker script option.
- Files that match the pattern "lib*.a" have already been scanned.
- (For VMS files matching ":lib*.a" have also been scanned). */
- int (* find_potential_libraries)
- (char *, struct lang_input_statement_struct *);
-
- /* Called when adding a new version pattern. PowerPC64-ELF uses
- this hook to add a pattern matching ".foo" for every "foo". */
- struct bfd_elf_version_expr * (*new_vers_pattern)
- (struct bfd_elf_version_expr *);
-
-} ld_emulation_xfer_type;
-
-typedef enum {
- intel_ic960_ld_mode_enum,
- default_mode_enum,
- intel_gld960_ld_mode_enum
-} lang_emulation_mode_enum_type;
-
-extern ld_emulation_xfer_type *ld_emulations[];
-
-#endif
diff --git a/contrib/binutils/ld/ldexp.c b/contrib/binutils/ld/ldexp.c
deleted file mode 100644
index 4d9a857..0000000
--- a/contrib/binutils/ld/ldexp.c
+++ /dev/null
@@ -1,1091 +0,0 @@
-/* This module handles expression trees.
- Copyright 1991, 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999, 2000,
- 2001, 2002, 2003, 2004
- Free Software Foundation, Inc.
- Written by Steve Chamberlain of Cygnus Support <sac@cygnus.com>.
-
-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, 59 Temple Place - Suite 330, Boston, MA
-02111-1307, USA. */
-
-/* This module is in charge of working out the contents of expressions.
-
- It has to keep track of the relative/absness of a symbol etc. This
- is done by keeping all values in a struct (an etree_value_type)
- which contains a value, a section to which it is relative and a
- valid bit. */
-
-#include "bfd.h"
-#include "sysdep.h"
-#include "bfdlink.h"
-
-#include "ld.h"
-#include "ldmain.h"
-#include "ldmisc.h"
-#include "ldexp.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);
-
-struct exp_data_seg exp_data_seg;
-
-/* Print the string representation of the given token. Surround it
- with spaces if INFIX_P is TRUE. */
-
-static void
-exp_print_token (token_code_type code, int infix_p)
-{
- static const struct
- {
- token_code_type code;
- char * name;
- }
- table[] =
- {
- { INT, "int" },
- { NAME, "NAME" },
- { PLUSEQ, "+=" },
- { MINUSEQ, "-=" },
- { MULTEQ, "*=" },
- { DIVEQ, "/=" },
- { LSHIFTEQ, "<<=" },
- { RSHIFTEQ, ">>=" },
- { ANDEQ, "&=" },
- { OREQ, "|=" },
- { OROR, "||" },
- { ANDAND, "&&" },
- { EQ, "==" },
- { NE, "!=" },
- { LE, "<=" },
- { GE, ">=" },
- { LSHIFT, "<<" },
- { RSHIFT, ">>" },
- { ALIGN_K, "ALIGN" },
- { BLOCK, "BLOCK" },
- { QUAD, "QUAD" },
- { SQUAD, "SQUAD" },
- { LONG, "LONG" },
- { SHORT, "SHORT" },
- { BYTE, "BYTE" },
- { SECTIONS, "SECTIONS" },
- { SIZEOF_HEADERS, "SIZEOF_HEADERS" },
- { MEMORY, "MEMORY" },
- { DEFINED, "DEFINED" },
- { TARGET_K, "TARGET" },
- { SEARCH_DIR, "SEARCH_DIR" },
- { MAP, "MAP" },
- { ENTRY, "ENTRY" },
- { NEXT, "NEXT" },
- { SIZEOF, "SIZEOF" },
- { ADDR, "ADDR" },
- { LOADADDR, "LOADADDR" },
- { MAX_K, "MAX_K" },
- { REL, "relocatable" },
- { DATA_SEGMENT_ALIGN, "DATA_SEGMENT_ALIGN" },
- { DATA_SEGMENT_END, "DATA_SEGMENT_END" }
- };
- unsigned int idx;
-
- for (idx = 0; idx < ARRAY_SIZE (table); idx++)
- if (table[idx].code == code)
- break;
-
- if (infix_p)
- fputc (' ', config.map_file);
-
- if (idx < ARRAY_SIZE (table))
- fputs (table[idx].name, config.map_file);
- else if (code < 127)
- fputc (code, config.map_file);
- else
- fprintf (config.map_file, "<code %d>", code);
-
- if (infix_p)
- fputc (' ', config.map_file);
-}
-
-static void
-make_abs (etree_value_type *ptr)
-{
- asection *s = ptr->section->bfd_section;
- ptr->value += s->vma;
- ptr->section = abs_output_section;
-}
-
-static etree_value_type
-new_abs (bfd_vma value)
-{
- etree_value_type new;
- new.valid_p = TRUE;
- new.section = abs_output_section;
- new.value = value;
- return new;
-}
-
-etree_type *
-exp_intop (bfd_vma value)
-{
- etree_type *new = stat_alloc (sizeof (new->value));
- new->type.node_code = INT;
- new->value.value = value;
- new->value.str = NULL;
- new->type.node_class = etree_value;
- return new;
-}
-
-etree_type *
-exp_bigintop (bfd_vma value, char *str)
-{
- etree_type *new = stat_alloc (sizeof (new->value));
- new->type.node_code = INT;
- new->value.value = value;
- new->value.str = str;
- new->type.node_class = etree_value;
- return new;
-}
-
-/* Build an expression representing an unnamed relocatable value. */
-
-etree_type *
-exp_relop (asection *section, bfd_vma value)
-{
- etree_type *new = stat_alloc (sizeof (new->rel));
- new->type.node_code = REL;
- 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)
-{
- etree_value_type new;
- new.valid_p = TRUE;
- new.value = value;
- new.str = str;
- new.section = section;
- return new;
-}
-
-static etree_value_type
-new_rel_from_section (bfd_vma value,
- lang_output_section_statement_type *section)
-{
- 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;
-}
-
-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)
-{
- etree_value_type result;
-
- result = exp_fold_tree (tree->unary.child,
- current_section,
- allocation_done, dot, dotp);
- if (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);
- else
- 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;
- break;
-
- case '~':
- make_abs (&result);
- result.value = ~result.value;
- break;
-
- case '!':
- make_abs (&result);
- result.value = !result.value;
- break;
-
- case '-':
- make_abs (&result);
- result.value = -result.value;
- break;
-
- case NEXT:
- /* Return next place aligned to value. */
- if (allocation_done == lang_allocating_phase_enum)
- {
- make_abs (&result);
- result.value = align_n (dot, result.value);
- }
- else
- 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 (exp_data_seg.phase == exp_dataseg_align_seen)
- {
- exp_data_seg.phase = exp_dataseg_end_seen;
- exp_data_seg.end = result.value;
- }
- }
- else
- result.valid_p = FALSE;
- break;
-
- default:
- FAIL ();
- 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)
-{
- etree_value_type result;
-
- result = exp_fold_tree (tree->binary.lhs, current_section,
- allocation_done, dot, dotp);
- if (result.valid_p)
- {
- etree_value_type other;
-
- other = exp_fold_tree (tree->binary.rhs,
- current_section,
- allocation_done, dot, dotp);
- if (other.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 == '+'))
- && (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;
- }
- }
- else if (result.section != other.section
- || current_section == abs_output_section)
- {
- make_abs (&result);
- make_abs (&other);
- }
-
- switch (tree->type.node_code)
- {
- case '%':
- if (other.value == 0)
- einfo (_("%F%S %% by zero\n"));
- result.value = ((bfd_signed_vma) result.value
- % (bfd_signed_vma) other.value);
- break;
-
- case '/':
- if (other.value == 0)
- 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;
- BOP ('+', +);
- BOP ('*', *);
- BOP ('-', -);
- BOP (LSHIFT, <<);
- BOP (RSHIFT, >>);
- BOP (EQ, ==);
- BOP (NE, !=);
- BOP ('<', <);
- BOP ('>', >);
- BOP (LE, <=);
- BOP (GE, >=);
- BOP ('&', &);
- BOP ('^', ^);
- BOP ('|', |);
- BOP (ANDAND, &&);
- BOP (OROR, ||);
-
- case MAX_K:
- if (result.value < other.value)
- result = other;
- break;
-
- case MIN_K:
- if (result.value > other.value)
- result = other;
- break;
-
- case ALIGN_K:
- result.value = align_n (result.value, other.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))
- {
- bfd_vma maxpage = result.value;
-
- result.value = align_n (dot, maxpage);
- if (exp_data_seg.phase != exp_dataseg_adjust)
- {
- result.value += dot & (maxpage - 1);
- if (allocation_done == lang_allocating_phase_enum)
- {
- exp_data_seg.phase = exp_dataseg_align_seen;
- exp_data_seg.base = result.value;
- exp_data_seg.pagesize = other.value;
- }
- }
- else if (other.value < maxpage)
- result.value += (dot + other.value - 1)
- & (maxpage - other.value);
- }
- else
- result.valid_p = FALSE;
- break;
-
- default:
- FAIL ();
- }
- }
- else
- {
- 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)
-{
- 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;
-}
-
-static etree_value_type
-fold_name (etree_type *tree,
- lang_output_section_statement_type *current_section,
- lang_phase_type allocation_done,
- bfd_vma dot)
-{
- etree_value_type 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));
- break;
- case DEFINED:
- if (allocation_done == lang_first_phase_enum)
- lang_track_definedness (tree->name.name);
- else
- {
- struct bfd_link_hash_entry *h;
- int def_iteration
- = lang_symbol_definition_iteration (tree->name.name);
-
- 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;
- }
- 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)
- {
- struct bfd_link_hash_entry *h;
-
- h = bfd_wrapped_link_hash_lookup (output_bfd, &link_info,
- tree->name.name,
- TRUE, FALSE, TRUE);
- if (!h)
- einfo (_("%P%F: bfd_link_hash_lookup failed: %E\n"));
- else if (h->type == bfd_link_hash_defined
- || 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)
- {
- 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);
- }
- }
- }
- else if (allocation_done == lang_final_phase_enum)
- 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);
- }
- }
- break;
-
- case ADDR:
- if (allocation_done != 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);
- }
- break;
-
- case LOADADDR:
- if (allocation_done != 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->load_base == NULL)
- result = new_rel (0, NULL, os);
- else
- result = exp_fold_tree_no_dot (os->load_base,
- abs_output_section,
- allocation_done);
- }
- }
- break;
-
- case SIZEOF:
- if (allocation_done != 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);
- }
- 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)
-{
- etree_value_type result;
-
- if (tree == NULL)
- {
- result.valid_p = FALSE;
- return result;
- }
-
- switch (tree->type.node_class)
- {
- case etree_value:
- result = new_rel (tree->value.value, tree->value.str, current_section);
- break;
-
- case etree_rel:
- if (allocation_done != lang_final_phase_enum)
- result.valid_p = FALSE;
- else
- result = new_rel ((tree->rel.value
- + tree->rel.section->output_section->vma
- + tree->rel.section->output_offset),
- NULL,
- current_section);
- 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;
- }
- break;
-
- case etree_unary:
- result = fold_unary (tree, current_section, allocation_done,
- dot, dotp);
- break;
-
- case etree_binary:
- result = fold_binary (tree, current_section, allocation_done,
- dot, dotp);
- break;
-
- case etree_trinary:
- result = fold_trinary (tree, current_section, allocation_done,
- dot, dotp);
- break;
-
- case etree_assign:
- case etree_provide:
- case etree_provided:
- if (tree->assign.dst[0] == '.' && tree->assign.dst[1] == 0)
- {
- /* 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))
- {
- 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"));
- else
- {
- if (current_section == NULL)
- einfo (_("%F%S assignment to location counter invalid outside of SECTION\n"));
- 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;
- }
- }
- }
- }
- 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;
-
- if (tree->type.node_class == etree_assign)
- create = TRUE;
- else
- create = FALSE;
- h = bfd_link_hash_lookup (link_info.hash, tree->assign.dst,
- create, FALSE, TRUE);
- if (h == NULL)
- {
- if (create)
- 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;
- }
- }
- }
- break;
-
- case etree_name:
- result = fold_name (tree, current_section, allocation_done, dot);
- break;
-
- default:
- FAIL ();
- break;
- }
-
- return result;
-}
-
-static etree_value_type
-exp_fold_tree_no_dot (etree_type *tree,
- lang_output_section_statement_type *current_section,
- lang_phase_type allocation_done)
-{
- return exp_fold_tree (tree, current_section, allocation_done, 0, NULL);
-}
-
-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.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);
- }
- new = stat_alloc (sizeof (new->binary));
- memcpy (new, &value, sizeof (new->binary));
- return new;
-}
-
-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.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);
-
- new = stat_alloc (sizeof (new->trinary));
- memcpy (new, &value, sizeof (new->trinary));
- return new;
-}
-
-etree_type *
-exp_unop (int code, etree_type *child)
-{
- etree_type value, *new;
-
- etree_value_type r;
- value.unary.type.node_code = code;
- 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);
-
- new = stat_alloc (sizeof (new->unary));
- memcpy (new, &value, sizeof (new->unary));
- return new;
-}
-
-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.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);
-
- new = stat_alloc (sizeof (new->name));
- memcpy (new, &value, sizeof (new->name));
- return new;
-
-}
-
-etree_type *
-exp_assop (int code, const char *dst, etree_type *src)
-{
- etree_type value, *new;
-
- value.assign.type.node_code = code;
-
- 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));
- return new;
-}
-
-/* Handle PROVIDE. */
-
-etree_type *
-exp_provide (const char *dst, etree_type *src)
-{
- etree_type *n;
-
- n = stat_alloc (sizeof (n->assign));
- n->assign.type.node_code = '=';
- n->assign.type.node_class = etree_provide;
- n->assign.src = src;
- n->assign.dst = dst;
- return n;
-}
-
-/* Handle ASSERT. */
-
-etree_type *
-exp_assert (etree_type *exp, const char *message)
-{
- etree_type *n;
-
- n = stat_alloc (sizeof (n->assert_s));
- n->assert_s.type.node_code = '!';
- n->assert_s.type.node_class = etree_assert;
- n->assert_s.child = exp;
- n->assert_s.message = message;
- return n;
-}
-
-void
-exp_print_tree (etree_type *tree)
-{
- if (config.map_file == NULL)
- config.map_file = stderr;
-
- if (tree == NULL)
- {
- minfo ("NULL TREE\n");
- return;
- }
-
- switch (tree->type.node_class)
- {
- case etree_value:
- minfo ("0x%v", tree->value.value);
- return;
- case etree_rel:
- if (tree->rel.section->owner != NULL)
- minfo ("%B:", tree->rel.section->owner);
- 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);
- break;
- case etree_provide:
- case etree_provided:
- fprintf (config.map_file, "PROVIDE (%s, ", tree->assign.dst);
- exp_print_tree (tree->assign.src);
- fprintf (config.map_file, ")");
- break;
- case etree_binary:
- fprintf (config.map_file, "(");
- exp_print_tree (tree->binary.lhs);
- exp_print_token (tree->type.node_code, TRUE);
- exp_print_tree (tree->binary.rhs);
- fprintf (config.map_file, ")");
- break;
- case etree_trinary:
- exp_print_tree (tree->trinary.cond);
- fprintf (config.map_file, "?");
- exp_print_tree (tree->trinary.lhs);
- fprintf (config.map_file, ":");
- exp_print_tree (tree->trinary.rhs);
- break;
- case etree_unary:
- exp_print_token (tree->unary.type.node_code, FALSE);
- if (tree->unary.child)
- {
- fprintf (config.map_file, " (");
- exp_print_tree (tree->unary.child);
- fprintf (config.map_file, ")");
- }
- break;
-
- case etree_assert:
- fprintf (config.map_file, "ASSERT (");
- exp_print_tree (tree->assert_s.child);
- 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)
- {
- fprintf (config.map_file, "%s", tree->name.name);
- }
- else
- {
- exp_print_token (tree->type.node_code, FALSE);
- if (tree->name.name)
- fprintf (config.map_file, " (%s)", tree->name.name);
- }
- break;
- default:
- FAIL ();
- break;
- }
-}
-
-bfd_vma
-exp_get_vma (etree_type *tree,
- bfd_vma def,
- char *name,
- lang_phase_type allocation_done)
-{
- 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)
- einfo (_("%F%S nonconstant expression for %s\n"), name);
- return r.value;
- }
- else
- return def;
-}
-
-int
-exp_get_value_int (etree_type *tree,
- int def,
- char *name,
- lang_phase_type allocation_done)
-{
- return exp_get_vma (tree, def, name, allocation_done);
-}
-
-fill_type *
-exp_get_fill (etree_type *tree,
- fill_type *def,
- char *name,
- lang_phase_type allocation_done)
-{
- 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);
-
- if (r.str != NULL && (len = strlen (r.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;
- val = 0;
- do
- {
- unsigned int digit;
-
- digit = *s++ - '0';
- if (digit > 9)
- digit = (digit - 'A' + '0' + 10) & 0xf;
- val <<= 4;
- val += digit;
- --len;
- if ((len & 1) == 0)
- {
- *dst++ = val;
- val = 0;
- }
- }
- while (len != 0);
- }
- else
- {
- fill = xmalloc (4 + sizeof (*fill) - 1);
- val = r.value;
- fill->data[0] = (val >> 24) & 0xff;
- fill->data[1] = (val >> 16) & 0xff;
- fill->data[2] = (val >> 8) & 0xff;
- fill->data[3] = (val >> 0) & 0xff;
- fill->size = 4;
- }
- return fill;
-}
-
-bfd_vma
-exp_get_abs_int (etree_type *tree,
- int def ATTRIBUTE_UNUSED,
- char *name,
- lang_phase_type allocation_done)
-{
- 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);
-
- return res.value;
-}
-
-static bfd_vma
-align_n (bfd_vma value, bfd_vma align)
-{
- if (align <= 1)
- return value;
-
- value = (value + align - 1) / align;
- return value * align;
-}
diff --git a/contrib/binutils/ld/ldexp.h b/contrib/binutils/ld/ldexp.h
deleted file mode 100644
index 99e7073..0000000
--- a/contrib/binutils/ld/ldexp.h
+++ /dev/null
@@ -1,142 +0,0 @@
-/* ldexp.h -
- Copyright 1991, 1992, 1993, 1994, 1995, 1998, 1999, 2000, 2001, 2002,
- 2003, 2004 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, 59 Temple Place - Suite 330, Boston, MA
- 02111-1307, USA. */
-
-#ifndef LDEXP_H
-#define LDEXP_H
-
-/* The result of an expression tree */
-typedef struct {
- bfd_vma value;
- char *str;
- struct lang_output_section_statement_struct *section;
- bfd_boolean valid_p;
-} etree_value_type;
-
-typedef struct {
- int node_code;
- enum {
- etree_binary,
- etree_trinary,
- etree_unary,
- etree_name,
- etree_assign,
- etree_provide,
- etree_provided,
- etree_undef,
- etree_unspec,
- etree_value,
- etree_assert,
- etree_rel
- } node_class;
-} node_type;
-
-typedef union etree_union {
- node_type type;
- struct {
- node_type type;
- union etree_union *lhs;
- union etree_union *rhs;
- } binary;
- struct {
- node_type type;
- union etree_union *cond;
- union etree_union *lhs;
- union etree_union *rhs;
- } trinary;
- struct {
- node_type type;
- const char *dst;
- union etree_union *src;
- } assign;
- struct {
- node_type type;
- union etree_union *child;
- } unary;
- struct {
- node_type type;
- const char *name;
- } name;
- struct {
- node_type type;
- bfd_vma value;
- char *str;
- } value;
- struct {
- node_type type;
- asection *section;
- bfd_vma value;
- } rel;
- struct {
- node_type type;
- union etree_union *child;
- const char *message;
- } 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 struct _fill_type fill_type;
-
-etree_type *exp_intop
- (bfd_vma);
-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 *);
-etree_type *exp_binop
- (int, etree_type *, etree_type *);
-etree_type *exp_trinop
- (int,etree_type *, etree_type *, etree_type *);
-etree_type *exp_unop
- (int, etree_type *);
-etree_type *exp_nameop
- (int, const char *);
-etree_type *exp_assop
- (int, const char *, etree_type *);
-etree_type *exp_provide
- (const char *, etree_type *);
-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);
-int exp_get_value_int
- (etree_type *, int, char *, lang_phase_type);
-fill_type *exp_get_fill
- (etree_type *, fill_type *, char *, lang_phase_type);
-bfd_vma exp_get_abs_int
- (etree_type *, int, char *, lang_phase_type);
-
-#endif
diff --git a/contrib/binutils/ld/ldfile.c b/contrib/binutils/ld/ldfile.c
deleted file mode 100644
index a6f0d60..0000000
--- a/contrib/binutils/ld/ldfile.c
+++ /dev/null
@@ -1,596 +0,0 @@
-/* Linker file opening and searching.
- Copyright 1991, 1992, 1993, 1994, 1995, 1998, 1999, 2000, 2001, 2002,
- 2003, 2004 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, 59 Temple Place - Suite 330, Boston, MA
- 02111-1307, USA. */
-
-/* ldfile.c: look after all the file stuff. */
-
-#include "bfd.h"
-#include "sysdep.h"
-#include "bfdlink.h"
-#include "safe-ctype.h"
-#include "ld.h"
-#include "ldmisc.h"
-#include "ldexp.h"
-#include "ldlang.h"
-#include "ldfile.h"
-#include "ldmain.h"
-#include <ldgram.h>
-#include "ldlex.h"
-#include "ldemul.h"
-#include "libiberty.h"
-#include "filenames.h"
-
-const char * ldfile_input_filename;
-bfd_boolean ldfile_assumed_script = FALSE;
-const char * ldfile_output_machine_name = "";
-unsigned long ldfile_output_machine;
-enum bfd_architecture ldfile_output_architecture;
-search_dirs_type * search_head;
-
-#ifndef MPW
-#ifdef VMS
-char * slash = "";
-#else
-#if defined (_WIN32) && ! defined (__CYGWIN32__)
-char * slash = "\\";
-#else
-char * slash = "/";
-#endif
-#endif
-#else /* MPW */
-/* The MPW path char is a colon. */
-char * slash = ":";
-#endif /* MPW */
-
-typedef struct search_arch
-{
- char *name;
- struct search_arch *next;
-} search_arch_type;
-
-static search_dirs_type **search_tail_ptr = &search_head;
-static search_arch_type *search_arch_head;
-static search_arch_type **search_arch_tail_ptr = &search_arch_head;
-
-/* Test whether a pathname, after canonicalization, is the same or a
- sub-directory of the sysroot directory. */
-
-static bfd_boolean
-is_sysrooted_pathname (const char *name, bfd_boolean notsame)
-{
- char * realname = ld_canon_sysroot ? lrealpath (name) : NULL;
- int len;
- bfd_boolean result;
-
- if (! realname)
- return FALSE;
-
- len = strlen (realname);
-
- if (((! notsame && len == ld_canon_sysroot_len)
- || (len >= ld_canon_sysroot_len
- && IS_DIR_SEPARATOR (realname[ld_canon_sysroot_len])
- && (realname[ld_canon_sysroot_len] = '\0') == '\0'))
- && FILENAME_CMP (ld_canon_sysroot, realname) == 0)
- result = TRUE;
- else
- result = FALSE;
-
- if (realname)
- free (realname);
-
- return result;
-}
-
-/* Adds NAME to the library search path.
- Makes a copy of NAME using xmalloc(). */
-
-void
-ldfile_add_library_path (const char *name, bfd_boolean cmdline)
-{
- search_dirs_type *new;
-
- if (!cmdline && config.only_cmd_line_lib_dirs)
- return;
-
- new = xmalloc (sizeof (search_dirs_type));
- new->next = NULL;
- new->cmdline = cmdline;
- *search_tail_ptr = new;
- search_tail_ptr = &new->next;
-
- /* If a directory is marked as honoring sysroot, prepend the sysroot path
- now. */
- if (name[0] == '=')
- {
- new->name = concat (ld_sysroot, name + 1, NULL);
- new->sysrooted = TRUE;
- }
- else
- {
- new->name = xstrdup (name);
- new->sysrooted = is_sysrooted_pathname (name, FALSE);
- }
-}
-
-/* Try to open a BFD for a lang_input_statement. */
-
-bfd_boolean
-ldfile_try_open_bfd (const char *attempt,
- lang_input_statement_type *entry)
-{
- entry->the_bfd = bfd_openr (attempt, entry->target);
-
- if (trace_file_tries)
- {
- if (entry->the_bfd == NULL)
- info_msg (_("attempt to open %s failed\n"), attempt);
- else
- info_msg (_("attempt to open %s succeeded\n"), attempt);
- }
-
- if (entry->the_bfd == NULL)
- {
- if (bfd_get_error () == bfd_error_invalid_target)
- einfo (_("%F%P: invalid BFD target `%s'\n"), entry->target);
- return FALSE;
- }
-
- /* 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. */
-
- if (entry->search_dirs_flag)
- {
- bfd *check;
-
- if (bfd_check_format (entry->the_bfd, bfd_archive))
- check = bfd_openr_next_archived_file (entry->the_bfd, NULL);
- else
- check = entry->the_bfd;
-
- if (check != NULL)
- {
- if (! bfd_check_format (check, bfd_object))
- {
- if (check == entry->the_bfd
- && bfd_get_error () == bfd_error_file_not_recognized
- && ! ldemul_unrecognized_file (entry))
- {
- int token, skip = 0;
- char *arg, *arg1, *arg2, *arg3;
- extern FILE *yyin;
-
- /* Try to interpret the file as a linker script. */
- ldfile_open_command_file (attempt);
-
- ldfile_assumed_script = TRUE;
- parser_input = input_selected;
- ldlex_both ();
- token = INPUT_SCRIPT;
- while (token != 0)
- {
- switch (token)
- {
- case OUTPUT_FORMAT:
- if ((token = yylex ()) != '(')
- continue;
- if ((token = yylex ()) != NAME)
- continue;
- arg1 = yylval.name;
- arg2 = NULL;
- arg3 = NULL;
- token = yylex ();
- if (token == ',')
- {
- if ((token = yylex ()) != NAME)
- {
- free (arg1);
- continue;
- }
- arg2 = yylval.name;
- if ((token = yylex ()) != ','
- || (token = yylex ()) != NAME)
- {
- free (arg1);
- free (arg2);
- continue;
- }
- arg3 = yylval.name;
- token = yylex ();
- }
- if (token == ')')
- {
- switch (command_line.endian)
- {
- default:
- case ENDIAN_UNSET:
- arg = arg1; break;
- case ENDIAN_BIG:
- arg = arg2 ? arg2 : arg1; break;
- case ENDIAN_LITTLE:
- arg = arg3 ? arg3 : arg1; break;
- }
- if (strcmp (arg, lang_get_output_target ()) != 0)
- skip = 1;
- }
- free (arg1);
- if (arg2) free (arg2);
- if (arg3) free (arg3);
- break;
- case NAME:
- case LNAME:
- case VERS_IDENTIFIER:
- case VERS_TAG:
- free (yylval.name);
- break;
- case INT:
- if (yylval.bigint.str)
- free (yylval.bigint.str);
- break;
- }
- token = yylex ();
- }
- ldlex_popstate ();
- ldfile_assumed_script = FALSE;
- fclose (yyin);
- yyin = NULL;
- if (skip)
- {
- 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;
- }
- }
- return TRUE;
- }
-
- if ((bfd_arch_get_compatible (check, output_bfd,
- command_line.accept_unknown_input_arch) == NULL)
- /* 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);
- bfd_close (entry->the_bfd);
- entry->the_bfd = NULL;
- return FALSE;
- }
- }
- }
-
- return TRUE;
-}
-
-/* Search for and open the file specified by ENTRY. If it is an
- archive, use ARCH, LIB and SUFFIX to modify the file name. */
-
-bfd_boolean
-ldfile_open_file_search (const char *arch,
- lang_input_statement_type *entry,
- const char *lib,
- const char *suffix)
-{
- search_dirs_type *search;
-
- /* If this is not an archive, try to open it in the current
- directory first. */
- if (! entry->is_archive)
- {
- if (entry->sysrooted && IS_ABSOLUTE_PATH (entry->filename))
- {
- char *name = concat (ld_sysroot, entry->filename,
- (const char *) NULL);
- if (ldfile_try_open_bfd (name, entry))
- {
- entry->filename = name;
- return TRUE;
- }
- free (name);
- }
- else if (ldfile_try_open_bfd (entry->filename, entry))
- {
- entry->sysrooted = IS_ABSOLUTE_PATH (entry->filename)
- && is_sysrooted_pathname (entry->filename, TRUE);
- return TRUE;
- }
-
- if (IS_ABSOLUTE_PATH (entry->filename))
- return FALSE;
- }
-
- for (search = search_head; search != NULL; search = search->next)
- {
- char *string;
-
- if (entry->dynamic && ! link_info.relocatable)
- {
- if (ldemul_open_dynamic_archive (arch, search, entry))
- {
- entry->sysrooted = search->sysrooted;
- return TRUE;
- }
- }
-
- string = xmalloc (strlen (search->name)
- + strlen (slash)
- + strlen (lib)
- + strlen (entry->filename)
- + strlen (arch)
- + strlen (suffix)
- + 1);
-
- if (entry->is_archive)
- sprintf (string, "%s%s%s%s%s%s", search->name, slash,
- lib, entry->filename, arch, suffix);
- else
- sprintf (string, "%s%s%s", search->name, slash, entry->filename);
-
- if (ldfile_try_open_bfd (string, entry))
- {
- entry->filename = string;
- entry->sysrooted = search->sysrooted;
- return TRUE;
- }
-
- free (string);
- }
-
- return FALSE;
-}
-
-/* Open the input file specified by ENTRY. */
-
-void
-ldfile_open_file (lang_input_statement_type *entry)
-{
- if (entry->the_bfd != NULL)
- return;
-
- if (! entry->search_dirs_flag)
- {
- if (ldfile_try_open_bfd (entry->filename, entry))
- return;
- if (strcmp (entry->filename, entry->local_sym_name) != 0)
- einfo (_("%F%P: %s (%s): No such file: %E\n"),
- entry->filename, entry->local_sym_name);
- else
- einfo (_("%F%P: %s: No such file: %E\n"), entry->local_sym_name);
- }
- else
- {
- search_arch_type *arch;
- bfd_boolean found = FALSE;
-
- /* Try to open <filename><suffix> or lib<filename><suffix>.a */
- for (arch = search_arch_head; arch != NULL; arch = arch->next)
- {
- found = ldfile_open_file_search (arch->name, entry, "lib", ".a");
- if (found)
- break;
-#ifdef VMS
- found = ldfile_open_file_search (arch->name, entry, ":lib", ".a");
- if (found)
- break;
-#endif
- found = ldemul_find_potential_libraries (arch->name, entry);
- if (found)
- break;
- }
-
- /* If we have found the file, we don't need to search directories
- again. */
- if (found)
- entry->search_dirs_flag = FALSE;
- else if (entry->sysrooted
- && ld_sysroot
- && IS_ABSOLUTE_PATH (entry->local_sym_name))
- einfo (_("%F%P: cannot find %s inside %s\n"),
- entry->local_sym_name, ld_sysroot);
- else
- einfo (_("%F%P: cannot find %s\n"), entry->local_sym_name);
- }
-}
-
-/* Try to open NAME; if that fails, try NAME with EXTEN appended to it. */
-
-static FILE *
-try_open (const char *name, const char *exten)
-{
- FILE *result;
- char buff[1000];
-
- result = fopen (name, "r");
-
- if (trace_file_tries)
- {
- if (result == NULL)
- info_msg (_("cannot find script file %s\n"), name);
- else
- info_msg (_("opened script file %s\n"), name);
- }
-
- if (result != NULL)
- return result;
-
- if (*exten)
- {
- sprintf (buff, "%s%s", name, exten);
- result = fopen (buff, "r");
-
- if (trace_file_tries)
- {
- if (result == NULL)
- info_msg (_("cannot find script file %s\n"), buff);
- else
- info_msg (_("opened script file %s\n"), buff);
- }
- }
-
- return result;
-}
-
-/* Try to open NAME; if that fails, look for it in any directories
- specified with -L, without and with EXTEND appended. */
-
-FILE *
-ldfile_find_command_file (const char *name, const char *extend)
-{
- search_dirs_type *search;
- FILE *result;
- char buffer[1000];
-
- /* First try raw name. */
- result = try_open (name, "");
- if (result == NULL)
- {
- /* Try now prefixes. */
- for (search = search_head; search != NULL; search = search->next)
- {
- sprintf (buffer, "%s%s%s", search->name, slash, name);
-
- result = try_open (buffer, extend);
- if (result)
- break;
- }
- }
-
- return result;
-}
-
-void
-ldfile_open_command_file (const char *name)
-{
- FILE *ldlex_input_stack;
- ldlex_input_stack = ldfile_find_command_file (name, "");
-
- if (ldlex_input_stack == NULL)
- {
- bfd_set_error (bfd_error_system_call);
- einfo (_("%P%F: cannot open linker script file %s: %E\n"), name);
- }
-
- lex_push_file (ldlex_input_stack, name);
-
- ldfile_input_filename = name;
- lineno = 1;
-
- 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)
-{
- char *name = xstrdup (in_name);
- search_arch_type *new = xmalloc (sizeof (search_arch_type));
-
- ldfile_output_machine_name = in_name;
-
- new->name = name;
- new->next = NULL;
- while (*name)
- {
- *name = TOLOWER (*name);
- name++;
- }
- *search_arch_tail_ptr = new;
- search_arch_tail_ptr = &new->next;
-
-}
-#endif
-
-/* Set the output architecture. */
-
-void
-ldfile_set_output_arch (const char *string, enum bfd_architecture defarch)
-{
- const bfd_arch_info_type *arch = bfd_scan_arch (string);
-
- if (arch)
- {
- ldfile_output_architecture = arch->arch;
- ldfile_output_machine = arch->mach;
- ldfile_output_machine_name = arch->printable_name;
- }
- else if (defarch != bfd_arch_unknown)
- ldfile_output_architecture = defarch;
- else
- einfo (_("%P%F: cannot represent machine `%s'\n"), string);
-}
diff --git a/contrib/binutils/ld/ldfile.h b/contrib/binutils/ld/ldfile.h
deleted file mode 100644
index 6d5f09d..0000000
--- a/contrib/binutils/ld/ldfile.h
+++ /dev/null
@@ -1,65 +0,0 @@
-/* ldfile.h -
- Copyright 1991, 1992, 1993, 1994, 1995, 2000, 2002, 2003, 2004
- 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, 59 Temple Place - Suite 330,
- Boston, MA 02111-1307, USA. */
-
-#ifndef LDFILE_H
-#define LDFILE_H
-
-extern const char *ldfile_input_filename;
-extern bfd_boolean ldfile_assumed_script;
-extern unsigned long ldfile_output_machine;
-extern enum bfd_architecture ldfile_output_architecture;
-extern const char *ldfile_output_machine_name;
-
-/* Structure used to hold the list of directories to search for
- libraries. */
-
-typedef struct search_dirs {
- /* Next directory on list. */
- struct search_dirs *next;
- /* Name of directory. */
- const char *name;
- /* TRUE if this is from the command line. */
- bfd_boolean cmdline;
- /* true if this is from within the sys-root. */
- bfd_boolean sysrooted;
-} search_dirs_type;
-
-extern search_dirs_type *search_head;
-
-extern void ldfile_add_arch
- (const char *);
-extern void ldfile_add_library_path
- (const char *, bfd_boolean cmdline);
-extern void ldfile_open_command_file
- (const char *name);
-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
- (const char *arch, struct lang_input_statement_struct *,
- const char *lib, const char *suffix);
-
-#endif
diff --git a/contrib/binutils/ld/ldgram.y b/contrib/binutils/ld/ldgram.y
deleted file mode 100644
index 6c46c85..0000000
--- a/contrib/binutils/ld/ldgram.y
+++ /dev/null
@@ -1,1197 +0,0 @@
-/* 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.
- Written by Steve Chamberlain of Cygnus Support (steve@cygnus.com).
-
-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 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 DONTDECLARE_MALLOC
-
-#include "bfd.h"
-#include "sysdep.h"
-#include "bfdlink.h"
-#include "ld.h"
-#include "ldexp.h"
-#include "ldver.h"
-#include "ldlang.h"
-#include "ldfile.h"
-#include "ldemul.h"
-#include "ldmisc.h"
-#include "ldmain.h"
-#include "mri.h"
-#include "ldctor.h"
-#include "ldlex.h"
-
-#ifndef YYDEBUG
-#define YYDEBUG 1
-#endif
-
-static enum section_type sectype;
-
-lang_memory_region_type *region;
-
-bfd_boolean ldgram_want_filename = TRUE;
-FILE *saved_script_handle = NULL;
-bfd_boolean force_make_executable = FALSE;
-
-bfd_boolean ldgram_in_script = FALSE;
-bfd_boolean ldgram_had_equals = FALSE;
-bfd_boolean ldgram_had_keep = FALSE;
-char *ldgram_vers_current_lang = NULL;
-
-#define ERROR_NAME_MAX 20
-static char *error_names[ERROR_NAME_MAX];
-static int error_index;
-#define PUSH_ERROR(x) if (error_index < ERROR_NAME_MAX) error_names[error_index] = x; error_index++;
-#define POP_ERROR() error_index--;
-%}
-%union {
- bfd_vma integer;
- struct big_int
- {
- bfd_vma integer;
- char *str;
- } bigint;
- fill_type *fill;
- char *name;
- const char *cname;
- struct wildcard_spec wildcard;
- struct wildcard_list *wildcard_list;
- struct name_list *name_list;
- int token;
- union etree_union *etree;
- struct phdr_info
- {
- bfd_boolean filehdr;
- bfd_boolean phdrs;
- union etree_union *at;
- union etree_union *flags;
- } phdr;
- struct lang_nocrossref *nocrossref;
- struct lang_output_section_phdr_list *section_phdr;
- struct bfd_elf_version_deps *deflist;
- struct bfd_elf_version_expr *versyms;
- struct bfd_elf_version_tree *versnode;
-}
-
-%type <etree> exp opt_exp_with_type mustbe_exp opt_at phdr_type phdr_val
-%type <etree> opt_exp_without_type opt_subalign
-%type <fill> fill_opt fill_exp
-%type <name_list> exclude_name_list
-%type <wildcard_list> file_NAME_list
-%type <name> memspec_opt casesymlist
-%type <name> memspec_at_opt
-%type <cname> wildcard_name
-%type <wildcard> wildcard_spec
-%token <bigint> INT
-%token <name> NAME LNAME
-%type <integer> length
-%type <phdr> phdr_qualifiers
-%type <nocrossref> nocrossref_list
-%type <section_phdr> phdr_opt
-%type <integer> opt_nocrossrefs
-
-%right <token> PLUSEQ MINUSEQ MULTEQ DIVEQ '=' LSHIFTEQ RSHIFTEQ ANDEQ OREQ
-%right <token> '?' ':'
-%left <token> OROR
-%left <token> ANDAND
-%left <token> '|'
-%left <token> '^'
-%left <token> '&'
-%left <token> EQ NE
-%left <token> '<' '>' LE GE
-%left <token> LSHIFT RSHIFT
-
-%left <token> '+' '-'
-%left <token> '*' '/' '%'
-
-%right UNARY
-%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 '{' '}'
-%token SIZEOF_HEADERS OUTPUT_FORMAT FORCE_COMMON_ALLOCATION OUTPUT_ARCH
-%token INHIBIT_COMMON_ALLOCATION
-%token SIZEOF_HEADERS
-%token INCLUDE
-%token MEMORY DEFSYMEND
-%token NOLOAD DSECT COPY INFO OVERLAY
-%token NAME LNAME DEFINED TARGET_K SEARCH_DIR MAP ENTRY
-%token <integer> NEXT
-%token SIZEOF 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
-%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 EXCLUDE_FILE
-%type <versyms> vers_defns
-%type <versnode> vers_tag
-%type <deflist> verdep
-
-%%
-
-file:
- INPUT_SCRIPT script_file
- | INPUT_MRI_SCRIPT mri_script_file
- | INPUT_VERSION_SCRIPT version_script_file
- | INPUT_DEFSYM defsym_expr
- ;
-
-
-filename: NAME;
-
-
-defsym_expr:
- { ldlex_defsym(); }
- NAME '=' exp
- {
- ldlex_popstate();
- lang_add_assignment(exp_assop($3,$2,$4));
- }
- ;
-
-/* SYNTAX WITHIN AN MRI SCRIPT FILE */
-mri_script_file:
- {
- ldlex_mri_script ();
- PUSH_ERROR (_("MRI style script"));
- }
- mri_script_lines
- {
- ldlex_popstate ();
- mri_draw_tree ();
- POP_ERROR ();
- }
- ;
-
-mri_script_lines:
- mri_script_lines mri_script_command NEWLINE
- |
- ;
-
-mri_script_command:
- CHIP exp
- | CHIP exp ',' exp
- | NAME {
- einfo(_("%P%F: unrecognised keyword in MRI style script '%s'\n"),$1);
- }
- | LIST {
- config.map_filename = "-";
- }
- | ORDER ordernamelist
- | ENDWORD
- | PUBLIC NAME '=' exp
- { mri_public($2, $4); }
- | PUBLIC NAME ',' exp
- { mri_public($2, $4); }
- | PUBLIC NAME exp
- { mri_public($2, $3); }
- | FORMAT NAME
- { mri_format($2); }
- | SECT NAME ',' exp
- { mri_output_section($2, $4);}
- | SECT NAME exp
- { mri_output_section($2, $3);}
- | SECT NAME '=' exp
- { mri_output_section($2, $4);}
- | ALIGN_K NAME '=' exp
- { mri_align($2,$4); }
- | ALIGN_K NAME ',' exp
- { mri_align($2,$4); }
- | ALIGNMOD NAME '=' exp
- { mri_alignmod($2,$4); }
- | ALIGNMOD NAME ',' exp
- { mri_alignmod($2,$4); }
- | ABSOLUTE mri_abs_name_list
- | LOAD mri_load_name_list
- | NAMEWORD NAME
- { mri_name($2); }
- | ALIAS NAME ',' NAME
- { mri_alias($2,$4,0);}
- | ALIAS NAME ',' INT
- { mri_alias ($2, 0, (int) $4.integer); }
- | BASE exp
- { mri_base($2); }
- | TRUNCATE INT
- { mri_truncate ((unsigned int) $2.integer); }
- | CASE casesymlist
- | EXTERN extern_name_list
- | INCLUDE filename
- { ldlex_script (); ldfile_open_command_file($2); }
- mri_script_lines END
- { ldlex_popstate (); }
- | START NAME
- { lang_add_entry ($2, FALSE); }
- |
- ;
-
-ordernamelist:
- ordernamelist ',' NAME { mri_order($3); }
- | ordernamelist NAME { mri_order($2); }
- |
- ;
-
-mri_load_name_list:
- NAME
- { mri_load($1); }
- | mri_load_name_list ',' NAME { mri_load($3); }
- ;
-
-mri_abs_name_list:
- NAME
- { mri_only_load($1); }
- | mri_abs_name_list ',' NAME
- { mri_only_load($3); }
- ;
-
-casesymlist:
- /* empty */ { $$ = NULL; }
- | NAME
- | casesymlist ',' NAME
- ;
-
-extern_name_list:
- NAME
- { ldlang_add_undef ($1); }
- | extern_name_list NAME
- { ldlang_add_undef ($2); }
- | extern_name_list ',' NAME
- { ldlang_add_undef ($3); }
- ;
-
-script_file:
- {
- ldlex_both();
- }
- ifile_list
- {
- ldlex_popstate();
- }
- ;
-
-
-ifile_list:
- ifile_list ifile_p1
- |
- ;
-
-
-
-ifile_p1:
- memory
- | sections
- | phdrs
- | startup
- | high_level_library
- | low_level_library
- | floating_point_support
- | statement_anywhere
- | version
- | ';'
- | TARGET_K '(' NAME ')'
- { lang_add_target($3); }
- | SEARCH_DIR '(' filename ')'
- { ldfile_add_library_path ($3, FALSE); }
- | OUTPUT '(' filename ')'
- { lang_add_output($3, 1); }
- | OUTPUT_FORMAT '(' NAME ')'
- { lang_add_output_format ($3, (char *) NULL,
- (char *) NULL, 1); }
- | OUTPUT_FORMAT '(' NAME ',' NAME ',' NAME ')'
- { lang_add_output_format ($3, $5, $7, 1); }
- | OUTPUT_ARCH '(' NAME ')'
- { ldfile_set_output_arch ($3, bfd_arch_unknown); }
- | FORCE_COMMON_ALLOCATION
- { command_line.force_common_definition = TRUE ; }
- | INHIBIT_COMMON_ALLOCATION
- { command_line.inhibit_common_definition = TRUE ; }
- | INPUT '(' input_list ')'
- | GROUP
- { lang_enter_group (); }
- '(' input_list ')'
- { lang_leave_group (); }
- | MAP '(' filename ')'
- { lang_add_map($3); }
- | INCLUDE filename
- { ldlex_script (); ldfile_open_command_file($2); }
- ifile_list END
- { ldlex_popstate (); }
- | NOCROSSREFS '(' nocrossref_list ')'
- {
- lang_add_nocrossref ($3);
- }
- | EXTERN '(' extern_name_list ')'
- ;
-
-input_list:
- NAME
- { lang_add_input_file($1,lang_input_file_is_search_file_enum,
- (char *)NULL); }
- | input_list ',' NAME
- { lang_add_input_file($3,lang_input_file_is_search_file_enum,
- (char *)NULL); }
- | input_list NAME
- { lang_add_input_file($2,lang_input_file_is_search_file_enum,
- (char *)NULL); }
- | LNAME
- { lang_add_input_file($1,lang_input_file_is_l_enum,
- (char *)NULL); }
- | input_list ',' LNAME
- { lang_add_input_file($3,lang_input_file_is_l_enum,
- (char *)NULL); }
- | input_list LNAME
- { lang_add_input_file($2,lang_input_file_is_l_enum,
- (char *)NULL); }
- ;
-
-sections:
- SECTIONS '{' sec_or_group_p1 '}'
- ;
-
-sec_or_group_p1:
- sec_or_group_p1 section
- | sec_or_group_p1 statement_anywhere
- |
- ;
-
-statement_anywhere:
- ENTRY '(' NAME ')'
- { lang_add_entry ($3, FALSE); }
- | assignment end
- | ASSERT_K {ldlex_expression ();} '(' exp ',' NAME ')'
- { ldlex_popstate ();
- lang_add_assignment (exp_assert ($4, $6)); }
- ;
-
-/* The '*' and '?' cases are there because the lexer returns them as
- separate tokens rather than as NAME. */
-wildcard_name:
- NAME
- {
- $$ = $1;
- }
- | '*'
- {
- $$ = "*";
- }
- | '?'
- {
- $$ = "?";
- }
- ;
-
-wildcard_spec:
- wildcard_name
- {
- $$.name = $1;
- $$.sorted = FALSE;
- $$.exclude_name_list = NULL;
- }
- | EXCLUDE_FILE '(' exclude_name_list ')' wildcard_name
- {
- $$.name = $5;
- $$.sorted = FALSE;
- $$.exclude_name_list = $3;
- }
- | SORT '(' wildcard_name ')'
- {
- $$.name = $3;
- $$.sorted = TRUE;
- $$.exclude_name_list = NULL;
- }
- | SORT '(' EXCLUDE_FILE '(' exclude_name_list ')' wildcard_name ')'
- {
- $$.name = $7;
- $$.sorted = TRUE;
- $$.exclude_name_list = $5;
- }
- ;
-
-exclude_name_list:
- exclude_name_list wildcard_name
- {
- struct name_list *tmp;
- tmp = (struct name_list *) xmalloc (sizeof *tmp);
- tmp->name = $2;
- tmp->next = $1;
- $$ = tmp;
- }
- |
- wildcard_name
- {
- struct name_list *tmp;
- tmp = (struct name_list *) xmalloc (sizeof *tmp);
- tmp->name = $1;
- tmp->next = NULL;
- $$ = tmp;
- }
- ;
-
-file_NAME_list:
- file_NAME_list opt_comma wildcard_spec
- {
- struct wildcard_list *tmp;
- tmp = (struct wildcard_list *) xmalloc (sizeof *tmp);
- tmp->next = $1;
- tmp->spec = $3;
- $$ = tmp;
- }
- |
- wildcard_spec
- {
- struct wildcard_list *tmp;
- tmp = (struct wildcard_list *) xmalloc (sizeof *tmp);
- tmp->next = NULL;
- tmp->spec = $1;
- $$ = tmp;
- }
- ;
-
-input_section_spec_no_keep:
- NAME
- {
- struct wildcard_spec tmp;
- tmp.name = $1;
- tmp.exclude_name_list = NULL;
- tmp.sorted = FALSE;
- lang_add_wild (&tmp, NULL, ldgram_had_keep);
- }
- | '[' file_NAME_list ']'
- {
- lang_add_wild (NULL, $2, ldgram_had_keep);
- }
- | wildcard_spec '(' file_NAME_list ')'
- {
- lang_add_wild (&$1, $3, ldgram_had_keep);
- }
- ;
-
-input_section_spec:
- input_section_spec_no_keep
- | KEEP '('
- { ldgram_had_keep = TRUE; }
- input_section_spec_no_keep ')'
- { ldgram_had_keep = FALSE; }
- ;
-
-statement:
- assignment end
- | CREATE_OBJECT_SYMBOLS
- {
- lang_add_attribute(lang_object_symbols_statement_enum);
- }
- | ';'
- | CONSTRUCTORS
- {
-
- lang_add_attribute(lang_constructors_statement_enum);
- }
- | SORT '(' CONSTRUCTORS ')'
- {
- constructors_sorted = TRUE;
- lang_add_attribute (lang_constructors_statement_enum);
- }
- | input_section_spec
- | length '(' mustbe_exp ')'
- {
- lang_add_data ((int) $1, $3);
- }
-
- | FILL '(' fill_exp ')'
- {
- lang_add_fill ($3);
- }
- ;
-
-statement_list:
- statement_list statement
- | statement
- ;
-
-statement_list_opt:
- /* empty */
- | statement_list
- ;
-
-length:
- QUAD
- { $$ = $1; }
- | SQUAD
- { $$ = $1; }
- | LONG
- { $$ = $1; }
- | SHORT
- { $$ = $1; }
- | BYTE
- { $$ = $1; }
- ;
-
-fill_exp:
- mustbe_exp
- {
- $$ = exp_get_fill ($1,
- 0,
- "fill value",
- lang_first_phase_enum);
- }
- ;
-
-fill_opt:
- '=' fill_exp
- { $$ = $2; }
- | { $$ = (fill_type *) 0; }
- ;
-
-assign_op:
- PLUSEQ
- { $$ = '+'; }
- | MINUSEQ
- { $$ = '-'; }
- | MULTEQ
- { $$ = '*'; }
- | DIVEQ
- { $$ = '/'; }
- | LSHIFTEQ
- { $$ = LSHIFT; }
- | RSHIFTEQ
- { $$ = RSHIFT; }
- | ANDEQ
- { $$ = '&'; }
- | OREQ
- { $$ = '|'; }
-
- ;
-
-end: ';' | ','
- ;
-
-
-assignment:
- NAME '=' mustbe_exp
- {
- lang_add_assignment (exp_assop ($2, $1, $3));
- }
- | NAME assign_op mustbe_exp
- {
- lang_add_assignment (exp_assop ('=', $1,
- exp_binop ($2,
- exp_nameop (NAME,
- $1),
- $3)));
- }
- | PROVIDE '(' NAME '=' mustbe_exp ')'
- {
- lang_add_assignment (exp_provide ($3, $5));
- }
- ;
-
-
-opt_comma:
- ',' | ;
-
-
-memory:
- MEMORY '{' memory_spec memory_spec_list '}'
- ;
-
-memory_spec_list:
- memory_spec_list memory_spec
- | memory_spec_list ',' memory_spec
- |
- ;
-
-
-memory_spec: NAME
- { region = lang_memory_region_lookup ($1, TRUE); }
- attributes_opt ':'
- origin_spec opt_comma length_spec
- {}
- ;
-
-origin_spec:
- ORIGIN '=' mustbe_exp
- { region->current =
- region->origin =
- exp_get_vma($3, 0L,"origin", lang_first_phase_enum);
-}
- ;
-
-length_spec:
- LENGTH '=' mustbe_exp
- { region->length = exp_get_vma($3,
- ~((bfd_vma)0),
- "length",
- lang_first_phase_enum);
- }
- ;
-
-attributes_opt:
- /* empty */
- { /* dummy action to avoid bison 1.25 error message */ }
- | '(' attributes_list ')'
- ;
-
-attributes_list:
- attributes_string
- | attributes_list attributes_string
- ;
-
-attributes_string:
- NAME
- { lang_set_flags (region, $1, 0); }
- | '!' NAME
- { lang_set_flags (region, $2, 1); }
- ;
-
-startup:
- STARTUP '(' filename ')'
- { lang_startup($3); }
- ;
-
-high_level_library:
- HLL '(' high_level_library_NAME_list ')'
- | HLL '(' ')'
- { ldemul_hll((char *)NULL); }
- ;
-
-high_level_library_NAME_list:
- high_level_library_NAME_list opt_comma filename
- { ldemul_hll($3); }
- | filename
- { ldemul_hll($1); }
-
- ;
-
-low_level_library:
- SYSLIB '(' low_level_library_NAME_list ')'
- ; low_level_library_NAME_list:
- low_level_library_NAME_list opt_comma filename
- { ldemul_syslib($3); }
- |
- ;
-
-floating_point_support:
- FLOAT
- { lang_float(TRUE); }
- | NOFLOAT
- { lang_float(FALSE); }
- ;
-
-nocrossref_list:
- /* empty */
- {
- $$ = NULL;
- }
- | NAME nocrossref_list
- {
- struct lang_nocrossref *n;
-
- n = (struct lang_nocrossref *) xmalloc (sizeof *n);
- n->name = $1;
- n->next = $2;
- $$ = n;
- }
- | NAME ',' nocrossref_list
- {
- struct lang_nocrossref *n;
-
- n = (struct lang_nocrossref *) xmalloc (sizeof *n);
- n->name = $1;
- n->next = $3;
- $$ = n;
- }
- ;
-
-mustbe_exp: { ldlex_expression(); }
- exp
- { ldlex_popstate(); $$=$2;}
- ;
-
-exp :
- '-' exp %prec UNARY
- { $$ = exp_unop('-', $2); }
- | '(' exp ')'
- { $$ = $2; }
- | NEXT '(' exp ')' %prec UNARY
- { $$ = exp_unop((int) $1,$3); }
- | '!' exp %prec UNARY
- { $$ = exp_unop('!', $2); }
- | '+' exp %prec UNARY
- { $$ = $2; }
- | '~' exp %prec UNARY
- { $$ = exp_unop('~', $2);}
-
- | exp '*' exp
- { $$ = exp_binop('*', $1, $3); }
- | exp '/' exp
- { $$ = exp_binop('/', $1, $3); }
- | exp '%' exp
- { $$ = exp_binop('%', $1, $3); }
- | exp '+' exp
- { $$ = exp_binop('+', $1, $3); }
- | exp '-' exp
- { $$ = exp_binop('-' , $1, $3); }
- | exp LSHIFT exp
- { $$ = exp_binop(LSHIFT , $1, $3); }
- | exp RSHIFT exp
- { $$ = exp_binop(RSHIFT , $1, $3); }
- | exp EQ exp
- { $$ = exp_binop(EQ , $1, $3); }
- | exp NE exp
- { $$ = exp_binop(NE , $1, $3); }
- | exp LE exp
- { $$ = exp_binop(LE , $1, $3); }
- | exp GE exp
- { $$ = exp_binop(GE , $1, $3); }
- | exp '<' exp
- { $$ = exp_binop('<' , $1, $3); }
- | exp '>' exp
- { $$ = exp_binop('>' , $1, $3); }
- | exp '&' exp
- { $$ = exp_binop('&' , $1, $3); }
- | exp '^' exp
- { $$ = exp_binop('^' , $1, $3); }
- | exp '|' exp
- { $$ = exp_binop('|' , $1, $3); }
- | exp '?' exp ':' exp
- { $$ = exp_trinop('?' , $1, $3, $5); }
- | exp ANDAND exp
- { $$ = exp_binop(ANDAND , $1, $3); }
- | exp OROR exp
- { $$ = exp_binop(OROR , $1, $3); }
- | DEFINED '(' NAME ')'
- { $$ = exp_nameop(DEFINED, $3); }
- | INT
- { $$ = exp_bigintop ($1.integer, $1.str); }
- | SIZEOF_HEADERS
- { $$ = exp_nameop(SIZEOF_HEADERS,0); }
-
- | SIZEOF '(' NAME ')'
- { $$ = exp_nameop(SIZEOF,$3); }
- | ADDR '(' NAME ')'
- { $$ = exp_nameop(ADDR,$3); }
- | LOADADDR '(' NAME ')'
- { $$ = exp_nameop(LOADADDR,$3); }
- | ABSOLUTE '(' exp ')'
- { $$ = exp_unop(ABSOLUTE, $3); }
- | ALIGN_K '(' exp ')'
- { $$ = exp_unop(ALIGN_K,$3); }
- | ALIGN_K '(' exp ',' exp ')'
- { $$ = exp_binop(ALIGN_K,$3,$5); }
- | DATA_SEGMENT_ALIGN '(' exp ',' exp ')'
- { $$ = exp_binop (DATA_SEGMENT_ALIGN, $3, $5); }
- | DATA_SEGMENT_END '(' exp ')'
- { $$ = exp_unop(DATA_SEGMENT_END, $3); }
- | BLOCK '(' exp ')'
- { $$ = exp_unop(ALIGN_K,$3); }
- | NAME
- { $$ = 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); }
- ;
-
-
-memspec_at_opt:
- AT '>' NAME { $$ = $3; }
- | { $$ = 0; }
- ;
-
-opt_at:
- AT '(' exp ')' { $$ = $3; }
- | { $$ = 0; }
- ;
-
-opt_subalign:
- SUBALIGN '(' exp ')' { $$ = $3; }
- | { $$ = 0; }
- ;
-
-section: NAME { ldlex_expression(); }
- opt_exp_with_type
- opt_at
- opt_subalign { ldlex_popstate (); ldlex_script (); }
- '{'
- {
- lang_enter_output_section_statement($1, $3,
- sectype,
- 0, $5, $4);
- }
- 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);
- }
- opt_comma
- {}
- | OVERLAY
- { ldlex_expression (); }
- opt_exp_without_type opt_nocrossrefs opt_at opt_subalign
- { ldlex_popstate (); ldlex_script (); }
- '{'
- {
- lang_enter_overlay ($3, $6);
- }
- overlay_section
- '}'
- { ldlex_popstate (); ldlex_expression (); }
- memspec_opt memspec_at_opt phdr_opt fill_opt
- {
- ldlex_popstate ();
- lang_leave_overlay ($5, (int) $4,
- $16, $13, $15, $14);
- }
- opt_comma
- | /* The GROUP case is just enough to support the gcc
- svr3.ifile script. It is not intended to be full
- support. I'm not even sure what GROUP is supposed
- to mean. */
- GROUP { ldlex_expression (); }
- opt_exp_with_type
- {
- ldlex_popstate ();
- lang_add_assignment (exp_assop ('=', ".", $3));
- }
- '{' sec_or_group_p1 '}'
- ;
-
-type:
- NOLOAD { sectype = noload_section; }
- | DSECT { sectype = dsect_section; }
- | COPY { sectype = copy_section; }
- | INFO { sectype = info_section; }
- | OVERLAY { sectype = overlay_section; }
- ;
-
-atype:
- '(' type ')'
- | /* EMPTY */ { sectype = normal_section; }
- | '(' ')' { sectype = normal_section; }
- ;
-
-opt_exp_with_type:
- exp atype ':' { $$ = $1; }
- | atype ':' { $$ = (etree_type *)NULL; }
- | /* The BIND cases are to support the gcc svr3.ifile
- script. They aren't intended to implement full
- support for the BIND keyword. I'm not even sure
- what BIND is supposed to mean. */
- BIND '(' exp ')' atype ':' { $$ = $3; }
- | BIND '(' exp ')' BLOCK '(' exp ')' atype ':'
- { $$ = $3; }
- ;
-
-opt_exp_without_type:
- exp ':' { $$ = $1; }
- | ':' { $$ = (etree_type *) NULL; }
- ;
-
-opt_nocrossrefs:
- /* empty */
- { $$ = 0; }
- | NOCROSSREFS
- { $$ = 1; }
- ;
-
-memspec_opt:
- '>' NAME
- { $$ = $2; }
- | { $$ = DEFAULT_MEMORY_REGION; }
- ;
-
-phdr_opt:
- /* empty */
- {
- $$ = NULL;
- }
- | phdr_opt ':' NAME
- {
- struct lang_output_section_phdr_list *n;
-
- n = ((struct lang_output_section_phdr_list *)
- xmalloc (sizeof *n));
- n->name = $3;
- n->used = FALSE;
- n->next = $1;
- $$ = n;
- }
- ;
-
-overlay_section:
- /* empty */
- | overlay_section
- NAME
- {
- ldlex_script ();
- lang_enter_overlay_section ($2);
- }
- '{' statement_list_opt '}'
- { ldlex_popstate (); ldlex_expression (); }
- phdr_opt fill_opt
- {
- ldlex_popstate ();
- lang_leave_overlay_section ($9, $8);
- }
- opt_comma
- ;
-
-phdrs:
- PHDRS '{' phdr_list '}'
- ;
-
-phdr_list:
- /* empty */
- | phdr_list phdr
- ;
-
-phdr:
- NAME { ldlex_expression (); }
- phdr_type phdr_qualifiers { ldlex_popstate (); }
- ';'
- {
- lang_new_phdr ($1, $3, $4.filehdr, $4.phdrs, $4.at,
- $4.flags);
- }
- ;
-
-phdr_type:
- exp
- {
- $$ = $1;
-
- if ($1->type.node_class == etree_name
- && $1->type.node_code == NAME)
- {
- const char *s;
- unsigned int i;
- static const char * const phdr_types[] =
- {
- "PT_NULL", "PT_LOAD", "PT_DYNAMIC",
- "PT_INTERP", "PT_NOTE", "PT_SHLIB",
- "PT_PHDR", "PT_TLS"
- };
-
- s = $1->name.name;
- for (i = 0;
- i < sizeof phdr_types / sizeof phdr_types[0];
- i++)
- if (strcmp (s, phdr_types[i]) == 0)
- {
- $$ = exp_intop (i);
- break;
- }
- if (i == sizeof phdr_types / sizeof phdr_types[0])
- {
- if (strcmp (s, "PT_GNU_EH_FRAME") == 0)
- $$ = exp_intop (0x6474e550);
- else if (strcmp (s, "PT_GNU_STACK") == 0)
- $$ = exp_intop (0x6474e551);
- else
- {
- einfo (_("\
-%X%P:%S: unknown phdr type `%s' (try integer literal)\n"),
- s);
- $$ = exp_intop (0);
- }
- }
- }
- }
- ;
-
-phdr_qualifiers:
- /* empty */
- {
- memset (&$$, 0, sizeof (struct phdr_info));
- }
- | NAME phdr_val phdr_qualifiers
- {
- $$ = $3;
- if (strcmp ($1, "FILEHDR") == 0 && $2 == NULL)
- $$.filehdr = TRUE;
- else if (strcmp ($1, "PHDRS") == 0 && $2 == NULL)
- $$.phdrs = TRUE;
- else if (strcmp ($1, "FLAGS") == 0 && $2 != NULL)
- $$.flags = $2;
- else
- einfo (_("%X%P:%S: PHDRS syntax error at `%s'\n"), $1);
- }
- | AT '(' exp ')' phdr_qualifiers
- {
- $$ = $5;
- $$.at = $3;
- }
- ;
-
-phdr_val:
- /* empty */
- {
- $$ = NULL;
- }
- | '(' exp ')'
- {
- $$ = $2;
- }
- ;
-
-/* This syntax is used within an external version script file. */
-
-version_script_file:
- {
- ldlex_version_file ();
- PUSH_ERROR (_("VERSION script"));
- }
- vers_nodes
- {
- ldlex_popstate ();
- POP_ERROR ();
- }
- ;
-
-/* This is used within a normal linker script file. */
-
-version:
- {
- ldlex_version_script ();
- }
- VERSIONK '{' vers_nodes '}'
- {
- ldlex_popstate ();
- }
- ;
-
-vers_nodes:
- vers_node
- | vers_nodes vers_node
- ;
-
-vers_node:
- '{' vers_tag '}' ';'
- {
- lang_register_vers_node (NULL, $2, NULL);
- }
- | VERS_TAG '{' vers_tag '}' ';'
- {
- lang_register_vers_node ($1, $3, NULL);
- }
- | VERS_TAG '{' vers_tag '}' verdep ';'
- {
- lang_register_vers_node ($1, $3, $5);
- }
- ;
-
-verdep:
- VERS_TAG
- {
- $$ = lang_add_vers_depend (NULL, $1);
- }
- | verdep VERS_TAG
- {
- $$ = lang_add_vers_depend ($1, $2);
- }
- ;
-
-vers_tag:
- /* empty */
- {
- $$ = lang_new_vers_node (NULL, NULL);
- }
- | vers_defns ';'
- {
- $$ = lang_new_vers_node ($1, NULL);
- }
- | GLOBAL ':' vers_defns ';'
- {
- $$ = lang_new_vers_node ($3, NULL);
- }
- | LOCAL ':' vers_defns ';'
- {
- $$ = lang_new_vers_node (NULL, $3);
- }
- | GLOBAL ':' vers_defns ';' LOCAL ':' vers_defns ';'
- {
- $$ = lang_new_vers_node ($3, $7);
- }
- ;
-
-vers_defns:
- VERS_IDENTIFIER
- {
- $$ = lang_new_vers_pattern (NULL, $1, ldgram_vers_current_lang);
- }
- | vers_defns ';' VERS_IDENTIFIER
- {
- $$ = lang_new_vers_pattern ($1, $3, ldgram_vers_current_lang);
- }
- | vers_defns ';' EXTERN NAME '{'
- {
- $<name>$ = ldgram_vers_current_lang;
- ldgram_vers_current_lang = $4;
- }
- vers_defns opt_semicolon '}'
- {
- $$ = $7;
- ldgram_vers_current_lang = $<name>6;
- }
- | EXTERN NAME '{'
- {
- $<name>$ = ldgram_vers_current_lang;
- ldgram_vers_current_lang = $2;
- }
- vers_defns opt_semicolon '}'
- {
- $$ = $5;
- ldgram_vers_current_lang = $<name>4;
- }
- ;
-
-opt_semicolon:
- /* empty */
- | ';'
- ;
-
-%%
-void
-yyerror(arg)
- const char *arg;
-{
- if (ldfile_assumed_script)
- einfo (_("%P:%s: file format not recognized; treating as linker script\n"),
- ldfile_input_filename);
- if (error_index > 0 && error_index < ERROR_NAME_MAX)
- einfo ("%P%F:%S: %s in %s\n", arg, error_names[error_index-1]);
- else
- einfo ("%P%F:%S: %s\n", arg);
-}
diff --git a/contrib/binutils/ld/ldint.texinfo b/contrib/binutils/ld/ldint.texinfo
deleted file mode 100644
index 5486764..0000000
--- a/contrib/binutils/ld/ldint.texinfo
+++ /dev/null
@@ -1,1058 +0,0 @@
-\input texinfo
-@setfilename ldint.info
-@c Copyright 1992, 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2003
-@c Free Software Foundation, Inc.
-
-@ifinfo
-@format
-START-INFO-DIR-ENTRY
-* Ld-Internals: (ldint). The GNU linker internals.
-END-INFO-DIR-ENTRY
-@end format
-@end ifinfo
-
-@ifinfo
-This file documents the internals of the GNU linker ld.
-
-Copyright 1992, 1994, 1995, 1996, 1997, 1998, 1999, 2000
-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".
-
-@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).
-
-@end ignore
-@end ifinfo
-
-@iftex
-@finalout
-@setchapternewpage off
-@settitle GNU Linker Internals
-@titlepage
-@title{A guide to the internals of the GNU linker}
-@author Per Bothner, Steve Chamberlain, Ian Lance Taylor, DJ Delorie
-@author Cygnus Support
-@page
-
-@tex
-\def\$#1${{#1}} % Kluge: collect RCS revision info without $...$
-\xdef\manvers{2.10.91} % For use in headers, footers too
-{\parskip=0pt
-\hfill Cygnus Support\par
-\hfill \manvers\par
-\hfill \TeX{}info \texinfoversion\par
-}
-@end tex
-
-@vskip 0pt plus 1filll
-Copyright @copyright{} 1992, 93, 94, 95, 96, 97, 1998, 2000
-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
- 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".
-
-@end titlepage
-@end iftex
-
-@node Top
-@top
-
-This file documents the internals of the GNU linker @code{ld}. It is a
-collection of miscellaneous information with little form at this point.
-Mostly, it is a repository into which you can put information about
-GNU @code{ld} as you discover it (or as you design changes to @code{ld}).
-
-This document is distributed under the terms of the GNU Free
-Documentation License. A copy of the license is included in the
-section entitled "GNU Free Documentation License".
-
-@menu
-* README:: The README File
-* Emulations:: How linker emulations are generated
-* Emulation Walkthrough:: A Walkthrough of a Typical Emulation
-* Architecture Specific:: Some Architecture Specific Notes
-* GNU Free Documentation License:: GNU Free Documentation License
-@end menu
-
-@node README
-@chapter The @file{README} File
-
-Check the @file{README} file; it often has useful information that does not
-appear anywhere else in the directory.
-
-@node Emulations
-@chapter How linker emulations are generated
-
-Each linker target has an @dfn{emulation}. The emulation includes the
-default linker script, and certain emulations also modify certain types
-of linker behaviour.
-
-Emulations are created during the build process by the shell script
-@file{genscripts.sh}.
-
-The @file{genscripts.sh} script starts by reading a file in the
-@file{emulparams} directory. This is a shell script which sets various
-shell variables used by @file{genscripts.sh} and the other shell scripts
-it invokes.
-
-The @file{genscripts.sh} script will invoke a shell script in the
-@file{scripttempl} directory in order to create default linker scripts
-written in the linker command language. The @file{scripttempl} script
-will be invoked 5 (or, in some cases, 6) times, with different
-assignments to shell variables, to create different default scripts.
-The choice of script is made based on the command line options.
-
-After creating the scripts, @file{genscripts.sh} will invoke yet another
-shell script, this time in the @file{emultempl} directory. That shell
-script will create the emulation source file, which contains C code.
-This C code permits the linker emulation to override various linker
-behaviours. Most targets use the generic emulation code, which is in
-@file{emultempl/generic.em}.
-
-To summarize, @file{genscripts.sh} reads three shell scripts: an
-emulation parameters script in the @file{emulparams} directory, a linker
-script generation script in the @file{scripttempl} directory, and an
-emulation source file generation script in the @file{emultempl}
-directory.
-
-For example, the Sun 4 linker sets up variables in
-@file{emulparams/sun4.sh}, creates linker scripts using
-@file{scripttempl/aout.sc}, and creates the emulation code using
-@file{emultempl/sunos.em}.
-
-Note that the linker can support several emulations simultaneously,
-depending upon how it is configured. An emulation can be selected with
-the @code{-m} option. The @code{-V} option will list all supported
-emulations.
-
-@menu
-* emulation parameters:: @file{emulparams} scripts
-* linker scripts:: @file{scripttempl} scripts
-* linker emulations:: @file{emultempl} scripts
-@end menu
-
-@node emulation parameters
-@section @file{emulparams} scripts
-
-Each target selects a particular file in the @file{emulparams} directory
-by setting the shell variable @code{targ_emul} in @file{configure.tgt}.
-This shell variable is used by the @file{configure} script to control
-building an emulation source file.
-
-Certain conventions are enforced. Suppose the @code{targ_emul} variable
-is set to @var{emul} in @file{configure.tgt}. The name of the emulation
-shell script will be @file{emulparams/@var{emul}.sh}. The
-@file{Makefile} must have a target named @file{e@var{emul}.c}; this
-target must depend upon @file{emulparams/@var{emul}.sh}, as well as the
-appropriate scripts in the @file{scripttempl} and @file{emultempl}
-directories. The @file{Makefile} target must invoke @code{GENSCRIPTS}
-with two arguments: @var{emul}, and the value of the make variable
-@code{tdir_@var{emul}}. The value of the latter variable will be set by
-the @file{configure} script, and is used to set the default target
-directory to search.
-
-By convention, the @file{emulparams/@var{emul}.sh} shell script should
-only set shell variables. It may set shell variables which are to be
-interpreted by the @file{scripttempl} and the @file{emultempl} scripts.
-Certain shell variables are interpreted directly by the
-@file{genscripts.sh} script.
-
-Here is a list of shell variables interpreted by @file{genscripts.sh},
-as well as some conventional shell variables interpreted by the
-@file{scripttempl} and @file{emultempl} scripts.
-
-@table @code
-@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}.
-
-@item TEMPLATE_NAME
-This is the name of the @file{emultemlp} 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}.
-
-@item GENERATE_SHLIB_SCRIPT
-If this is set to a nonempty string, @file{genscripts.sh} will invoke
-the @file{scripttempl} script an extra time to create a shared library
-script. @ref{linker scripts}.
-
-@item OUTPUT_FORMAT
-This is normally set to indicate the BFD output format use (e.g.,
-@samp{"a.out-sunos-big"}. The @file{scripttempl} script will normally
-use it in an @code{OUTPUT_FORMAT} expression in the linker script.
-
-@item ARCH
-This is normally set to indicate the architecture to use (e.g.,
-@samp{sparc}). The @file{scripttempl} script will normally use it in an
-@code{OUTPUT_ARCH} expression in the linker script.
-
-@item ENTRY
-Some @file{scripttempl} scripts use this to set the entry address, in an
-@code{ENTRY} expression in the linker script.
-
-@item TEXT_START_ADDR
-Some @file{scripttempl} scripts use this to set the start address of the
-@samp{.text} section.
-
-@item NONPAGED_TEXT_START_ADDR
-If this is defined, the @file{genscripts.sh} script sets
-@code{TEXT_START_ADDR} to its value before running the
-@file{scripttempl} script for the @code{-n} and @code{-N} options
-(@pxref{linker scripts}).
-
-@item SEGMENT_SIZE
-The @file{genscripts.sh} script uses this to set the default value of
-@code{DATA_ALIGNMENT} when running the @file{scripttempl} script.
-
-@item TARGET_PAGE_SIZE
-If @code{SEGMENT_SIZE} is not defined, the @file{genscripts.sh} script
-uses this to define it.
-
-@item ALIGNMENT
-Some @file{scripttempl} scripts set this to a number to pass to
-@code{ALIGN} to set the required alignment for the @code{end} symbol.
-@end table
-
-@node linker scripts
-@section @file{scripttempl} scripts
-
-Each linker target uses a @file{scripttempl} script to generate the
-default linker scripts. The name of the @file{scripttempl} script is
-set by the @code{SCRIPT_NAME} variable in the @file{emulparams} script.
-If @code{SCRIPT_NAME} is set to @var{script}, @code{genscripts.sh} will
-invoke @file{scripttempl/@var{script}.sc}.
-
-The @file{genscripts.sh} script will invoke the @file{scripttempl}
-script 5 to 8 times. Each time it will set the shell variable
-@code{LD_FLAG} to a different value. When the linker is run, the
-options used will direct it to select a particular script. (Script
-selection is controlled by the @code{get_script} emulation entry point;
-this describes the conventional behaviour).
-
-The @file{scripttempl} script should just write a linker script, written
-in the linker command language, to standard output. If the emulation
-name--the name of the @file{emulparams} file without the @file{.sc}
-extension--is @var{emul}, then the output will be directed to
-@file{ldscripts/@var{emul}.@var{extension}} in the build directory,
-where @var{extension} changes each time the @file{scripttempl} script is
-invoked.
-
-Here is the list of values assigned to @code{LD_FLAG}.
-
-@table @code
-@item (empty)
-The script generated is used by default (when none of the following
-cases apply). The output has an extension of @file{.x}.
-@item n
-The script generated is used when the linker is invoked with the
-@code{-n} option. The output has an extension of @file{.xn}.
-@item N
-The script generated is used when the linker is invoked with the
-@code{-N} option. The output has an extension of @file{.xbn}.
-@item r
-The script generated is used when the linker is invoked with the
-@code{-r} option. The output has an extension of @file{.xr}.
-@item u
-The script generated is used when the linker is invoked with the
-@code{-Ur} option. The output has an extension of @file{.xu}.
-@item shared
-The @file{scripttempl} script is only invoked with @code{LD_FLAG} set to
-this value if @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} option. The output has an extension of
-@file{.xs}.
-@item c
-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}. The
-@file{emultempl} script must arrange to use this script at the appropriate
-time, normally when the linker is invoked with the @code{-z combreloc}
-option. The output has an extension of
-@file{.xc}.
-@item cshared
-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.
-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}.
-@end table
-
-Besides the shell variables set by the @file{emulparams} script, and the
-@code{LD_FLAG} variable, the @file{genscripts.sh} script will set
-certain variables for each run of the @file{scripttempl} script.
-
-@table @code
-@item RELOCATING
-This will be set to a non-empty string when the linker is doing a final
-relocation (e.g., all scripts other than @code{-r} and @code{-Ur}).
-
-@item CONSTRUCTING
-This will be set to a non-empty string when the linker is building
-global constructor and destructor tables (e.g., all scripts other than
-@code{-r}).
-
-@item DATA_ALIGNMENT
-This will be set to an @code{ALIGN} expression when the output should be
-page aligned, or to @samp{.} when generating the @code{-N} script.
-
-@item CREATE_SHLIB
-This will be set to a non-empty string when generating a @code{-shared}
-script.
-
-@item COMBRELOC
-This will be set to a non-empty string when generating @code{-z combreloc}
-scripts to a temporary file name which can be used during script generation.
-@end table
-
-The conventional way to write a @file{scripttempl} script is to first
-set a few shell variables, and then write out a linker script using
-@code{cat} with a here document. The linker script will use variable
-substitutions, based on the above variables and those set in the
-@file{emulparams} script, to control its behaviour.
-
-When there are parts of the @file{scripttempl} script which should only
-be run when doing a final relocation, they should be enclosed within a
-variable substitution based on @code{RELOCATING}. For example, on many
-targets special symbols such as @code{_end} should be defined when doing
-a final link. Naturally, those symbols should not be defined when doing
-a relocatable link using @code{-r}. The @file{scripttempl} script
-could use a construct like this to define those symbols:
-@smallexample
- $@{RELOCATING+ _end = .;@}
-@end smallexample
-This will do the symbol assignment only if the @code{RELOCATING}
-variable is defined.
-
-The basic job of the linker script is to put the sections in the correct
-order, and at the correct memory addresses. For some targets, the
-linker script may have to do some other operations.
-
-For example, on most MIPS platforms, the linker is responsible for
-defining the special symbol @code{_gp}, used to initialize the
-@code{$gp} register. It must be set to the start of the small data
-section plus @code{0x8000}. Naturally, it should only be defined when
-doing a final relocation. This will typically be done like this:
-@smallexample
- $@{RELOCATING+ _gp = ALIGN(16) + 0x8000;@}
-@end smallexample
-This line would appear just before the sections which compose the small
-data section (@samp{.sdata}, @samp{.sbss}). All those sections would be
-contiguous in memory.
-
-Many COFF systems build constructor tables in the linker script. The
-compiler will arrange to output the address of each global constructor
-in a @samp{.ctor} section, and the address of each global destructor in
-a @samp{.dtor} section (this is done by defining
-@code{ASM_OUTPUT_CONSTRUCTOR} and @code{ASM_OUTPUT_DESTRUCTOR} in the
-@code{gcc} configuration files). The @code{gcc} runtime support
-routines expect the constructor table to be named @code{__CTOR_LIST__}.
-They expect it to be a list of words, with the first word being the
-count of the number of entries. There should be a trailing zero word.
-(Actually, the count may be -1 if the trailing word is present, and the
-trailing word may be omitted if the count is correct, but, as the
-@code{gcc} behaviour has changed slightly over the years, it is safest
-to provide both). Here is a typical way that might be handled in a
-@file{scripttempl} file.
-@smallexample
- $@{CONSTRUCTING+ __CTOR_LIST__ = .;@}
- $@{CONSTRUCTING+ LONG((__CTOR_END__ - __CTOR_LIST__) / 4 - 2)@}
- $@{CONSTRUCTING+ *(.ctors)@}
- $@{CONSTRUCTING+ LONG(0)@}
- $@{CONSTRUCTING+ __CTOR_END__ = .;@}
- $@{CONSTRUCTING+ __DTOR_LIST__ = .;@}
- $@{CONSTRUCTING+ LONG((__DTOR_END__ - __DTOR_LIST__) / 4 - 2)@}
- $@{CONSTRUCTING+ *(.dtors)@}
- $@{CONSTRUCTING+ LONG(0)@}
- $@{CONSTRUCTING+ __DTOR_END__ = .;@}
-@end smallexample
-The use of @code{CONSTRUCTING} ensures that these linker script commands
-will only appear when the linker is supposed to be building the
-constructor and destructor tables. This example is written for a target
-which uses 4 byte pointers.
-
-Embedded systems often need to set a stack address. This is normally
-best done by using the @code{PROVIDE} construct with a default stack
-address. This permits the user to easily override the stack address
-using the @code{--defsym} option. Here is an example:
-@smallexample
- $@{RELOCATING+ PROVIDE (__stack = 0x80000000);@}
-@end smallexample
-The value of the symbol @code{__stack} would then be used in the startup
-code to initialize the stack pointer.
-
-@node linker emulations
-@section @file{emultempl} scripts
-
-Each linker target uses an @file{emultempl} script to generate the
-emulation code. The name of the @file{emultempl} script is set by the
-@code{TEMPLATE_NAME} variable in the @file{emulparams} script. If the
-@code{TEMPLATE_NAME} variable is not set, the default is
-@samp{generic}. If the value of @code{TEMPLATE_NAME} is @var{template},
-@file{genscripts.sh} will use @file{emultempl/@var{template}.em}.
-
-Most targets use the generic @file{emultempl} script,
-@file{emultempl/generic.em}. A different @file{emultempl} script is
-only needed if the linker must support unusual actions, such as linking
-against shared libraries.
-
-The @file{emultempl} script is normally written as a simple invocation
-of @code{cat} with a here document. The document will use a few
-variable substitutions. Typically each function names uses a
-substitution involving @code{EMULATION_NAME}, for ease of debugging when
-the linker supports multiple emulations.
-
-Every function and variable in the emitted file should be static. The
-only globally visible object must be named
-@code{ld_@var{EMULATION_NAME}_emulation}, where @var{EMULATION_NAME} is
-the name of the emulation set in @file{configure.tgt} (this is also the
-name of the @file{emulparams} file without the @file{.sh} extension).
-The @file{genscripts.sh} script will set the shell variable
-@code{EMULATION_NAME} before invoking the @file{emultempl} script.
-
-The @code{ld_@var{EMULATION_NAME}_emulation} variable must be a
-@code{struct ld_emulation_xfer_struct}, as defined in @file{ldemul.h}.
-It defines a set of function pointers which are invoked by the linker,
-as well as strings for the emulation name (normally set from the shell
-variable @code{EMULATION_NAME} and the default BFD target name (normally
-set from the shell variable @code{OUTPUT_FORMAT} which is normally set
-by the @file{emulparams} file).
-
-The @file{genscripts.sh} script will set the shell variable
-@code{COMPILE_IN} when it invokes the @file{emultempl} script for the
-default emulation. In this case, the @file{emultempl} script should
-include the linker scripts directly, and return them from the
-@code{get_scripts} entry point. When the emulation is not the default,
-the @code{get_scripts} entry point should just return a file name. See
-@file{emultempl/generic.em} for an example of how this is done.
-
-At some point, the linker emulation entry points should be documented.
-
-@node Emulation Walkthrough
-@chapter A Walkthrough of a Typical Emulation
-
-This chapter is to help people who are new to the way emulations
-interact with the linker, or who are suddenly thrust into the position
-of having to work with existing emulations. It will discuss the files
-you need to be aware of. It will tell you when the given "hooks" in
-the emulation will be called. It will, hopefully, give you enough
-information about when and how things happen that you'll be able to
-get by. As always, the source is the definitive reference to this.
-
-The starting point for the linker is in @file{ldmain.c} where
-@code{main} is defined. The bulk of the code that's emulation
-specific will initially be in @code{emultempl/@var{emulation}.em} but
-will end up in @code{e@var{emulation}.c} when the build is done.
-Most of the work to select and interface with emulations is in
-@code{ldemul.h} and @code{ldemul.c}. Specifically, @code{ldemul.h}
-defines the @code{ld_emulation_xfer_struct} structure your emulation
-exports.
-
-Your emulation file exports a symbol
-@code{ld_@var{EMULATION_NAME}_emulation}. If your emulation is
-selected (it usually is, since usually there's only one),
-@code{ldemul.c} sets the variable @var{ld_emulation} to point to it.
-@code{ldemul.c} also defines a number of API functions that interface
-to your emulation, like @code{ldemul_after_parse} which simply calls
-your @code{ld_@var{EMULATION}_emulation.after_parse} function. For
-the rest of this section, the functions will be mentioned, but you
-should assume the indirect reference to your emulation also.
-
-We will also skip or gloss over parts of the link process that don't
-relate to emulations, like setting up internationalization.
-
-After initialization, @code{main} selects an emulation by pre-scanning
-the command line arguments. It calls @code{ldemul_choose_target} to
-choose a target. If you set @code{choose_target} to
-@code{ldemul_default_target}, it picks your @code{target_name} by
-default.
-
-@code{main} calls @code{ldemul_before_parse}, then @code{parse_args}.
-@code{parse_args} calls @code{ldemul_parse_args} for each arg, which
-must update the @code{getopt} globals if it recognizes the argument.
-If the emulation doesn't recognize it, then parse_args checks to see
-if it recognizes it.
-
-Now that the emulation has had access to all its command-line options,
-@code{main} calls @code{ldemul_set_symbols}. This can be used for any
-initialization that may be affected by options. It is also supposed
-to set up any variables needed by the emulation script.
-
-@code{main} now calls @code{ldemul_get_script} to get the emulation
-script to use (based on arguments, no doubt, @pxref{Emulations}) and
-runs it. While parsing, @code{ldgram.y} may call @code{ldemul_hll} or
-@code{ldemul_syslib} to handle the @code{HLL} or @code{SYSLIB}
-commands. It may call @code{ldemul_unrecognized_file} if you asked
-the linker to link a file it doesn't recognize. It will call
-@code{ldemul_recognized_file} for each file it does recognize, in case
-the emulation wants to handle some files specially. All the while,
-it's loading the files (possibly calling
-@code{ldemul_open_dynamic_archive}) and symbols and stuff. After it's
-done reading the script, @code{main} calls @code{ldemul_after_parse}.
-Use the after-parse hook to set up anything that depends on stuff the
-script might have set up, like the entry point.
-
-@code{main} next calls @code{lang_process} in @code{ldlang.c}. This
-appears to be the main core of the linking itself, as far as emulation
-hooks are concerned(*). It first opens the output file's BFD, calling
-@code{ldemul_set_output_arch}, and calls
-@code{ldemul_create_output_section_statements} in case you need to use
-other means to find or create object files (i.e. shared libraries
-found on a path, or fake stub objects). Despite the name, nobody
-creates output sections here.
-
-(*) In most cases, the BFD library does the bulk of the actual
-linking, handling symbol tables, symbol resolution, relocations, and
-building the final output file. See the BFD reference for all the
-details. Your emulation is usually concerned more with managing
-things at the file and section level, like "put this here, add this
-section", etc.
-
-Next, the objects to be linked are opened and BFDs created for them,
-and @code{ldemul_after_open} is called. At this point, you have all
-the objects and symbols loaded, but none of the data has been placed
-yet.
-
-Next comes the Big Linking Thingy (except for the parts BFD does).
-All input sections are mapped to output sections according to the
-script. If a section doesn't get mapped by default,
-@code{ldemul_place_orphan} will get called to figure out where it goes.
-Next it figures out the offsets for each section, calling
-@code{ldemul_before_allocation} before and
-@code{ldemul_after_allocation} after deciding where each input section
-ends up in the output sections.
-
-The last part of @code{lang_process} is to figure out all the symbols'
-values. After assigning final values to the symbols,
-@code{ldemul_finish} is called, and after that, any undefined symbols
-are turned into fatal errors.
-
-OK, back to @code{main}, which calls @code{ldwrite} in
-@file{ldwrite.c}. @code{ldwrite} calls BFD's final_link, which does
-all the relocation fixups and writes the output bfd to disk, and we're
-done.
-
-In summary,
-
-@itemize @bullet
-
-@item @code{main()} in @file{ldmain.c}
-@item @file{emultempl/@var{EMULATION}.em} has your code
-@item @code{ldemul_choose_target} (defaults to your @code{target_name})
-@item @code{ldemul_before_parse}
-@item Parse argv, calls @code{ldemul_parse_args} for each
-@item @code{ldemul_set_symbols}
-@item @code{ldemul_get_script}
-@item parse script
-
-@itemize @bullet
-@item may call @code{ldemul_hll} or @code{ldemul_syslib}
-@item may call @code{ldemul_open_dynamic_archive}
-@end itemize
-
-@item @code{ldemul_after_parse}
-@item @code{lang_process()} in @file{ldlang.c}
-
-@itemize @bullet
-@item create @code{output_bfd}
-@item @code{ldemul_set_output_arch}
-@item @code{ldemul_create_output_section_statements}
-@item read objects, create input bfds - all symbols exist, but have no values
-@item may call @code{ldemul_unrecognized_file}
-@item will call @code{ldemul_recognized_file}
-@item @code{ldemul_after_open}
-@item map input sections to output sections
-@item may call @code{ldemul_place_orphan} for remaining sections
-@item @code{ldemul_before_allocation}
-@item gives input sections offsets into output sections, places output sections
-@item @code{ldemul_after_allocation} - section addresses valid
-@item assigns values to symbols
-@item @code{ldemul_finish} - symbol values valid
-@end itemize
-
-@item output bfd is written to disk
-
-@end itemize
-
-@node Architecture Specific
-@chapter Some Architecture Specific Notes
-
-This is the place for notes on the behavior of @code{ld} on
-specific platforms. Currently, only Intel x86 is documented (and
-of that, only the auto-import behavior for DLLs).
-
-@menu
-* ix86:: Intel x86
-@end menu
-
-@node ix86
-@section Intel x86
-
-@table @emph
-@code{ld} can create DLLs that operate with various runtimes available
-on a common x86 operating system. These runtimes include native (using
-the mingw "platform"), cygwin, and pw.
-
-@item auto-import from DLLs
-@enumerate
-@item
-With this feature on, DLL clients can import variables from DLL
-without any concern from their side (for example, without any source
-code modifications). Auto-import can be enabled using the
-@code{--enable-auto-import} flag, or disabled via the
-@code{--disable-auto-import} flag. Auto-import is disabled by default.
-
-@item
-This is done completely in bounds of the PE specification (to be fair,
-there's a minor violation of the spec at one point, but in practice
-auto-import works on all known variants of that common x86 operating
-system) So, the resulting DLL can be used with any other PE
-compiler/linker.
-
-@item
-Auto-import is fully compatible with standard import method, in which
-variables are decorated using attribute modifiers. Libraries of either
-type may be mixed together.
-
-@item
-Overhead (space): 8 bytes per imported symbol, plus 20 for each
-reference to it; Overhead (load time): negligible; Overhead
-(virtual/physical memory): should be less than effect of DLL
-relocation.
-@end enumerate
-
-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
-
-@code{mov dll_var,%eax,}
-
-address of dll_var in the command should be relocated to point
-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
-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.
-
-Implementation
-
-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 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 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
-this, since FirstThunk points directly into machine code. But in
-practice, OS loader implemented the sane way: it goes thru
-OriginalFirstThunk and puts addresses to FirstThunk, not something
-else. It once again should be noted that dll and symbol name
-structures are reused across fixup entries and should be there
-anyway to support standard import stuff, so sustained overhead is
-20 bytes per reference. Other question is whether having several
-IMAGE_IMPORT_DESCRIPTORS for the same DLL is possible. Answer is yes,
-it is done even by native compiler/linker (libth32's functions are in
-fact resident in windows9x kernel32.dll, so if you use it, you have
-two IMAGE_IMPORT_DESCRIPTORS for kernel32.dll). Yet other question is
-whether referencing the same PE structures several times is valid.
-The answer is why not, prohibiting that (detecting violation) would
-require more work on behalf of loader than not doing it.
-
-@end table
-
-@node GNU Free Documentation License
-@chapter GNU Free Documentation License
-
- GNU Free Documentation License
-
- Version 1.1, March 2000
-
- Copyright (C) 2000 Free Software Foundation, Inc.
- 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
-
- Everyone is permitted to copy and distribute verbatim copies
- of this license document, but changing it is not allowed.
-
-
-0. PREAMBLE
-
-The purpose of this License is to make a manual, textbook, or other
-written document "free" in the sense of freedom: to assure everyone
-the effective freedom to copy and redistribute it, with or without
-modifying it, either commercially or noncommercially. Secondarily,
-this License preserves for the author and publisher a way to get
-credit for their work, while not being considered responsible for
-modifications made by others.
-
-This License is a kind of "copyleft", which means that derivative
-works of the document must themselves be free in the same sense. It
-complements the GNU General Public License, which is a copyleft
-license designed for free software.
-
-We have designed this License in order to use it for manuals for free
-software, because free software needs free documentation: a free
-program should come with manuals providing the same freedoms that the
-software does. But this License is not limited to software manuals;
-it can be used for any textual work, regardless of subject matter or
-whether it is published as a printed book. We recommend this License
-principally for works whose purpose is instruction or reference.
-
-
-1. APPLICABILITY AND DEFINITIONS
-
-This License applies to any manual or other work that contains a
-notice placed by the copyright holder saying it can be distributed
-under the terms of this License. The "Document", below, refers to any
-such manual or work. Any member of the public is a licensee, and is
-addressed as "you".
-
-A "Modified Version" of the Document means any work containing the
-Document or a portion of it, either copied verbatim, or with
-modifications and/or translated into another language.
-
-A "Secondary Section" is a named appendix or a front-matter section of
-the Document that deals exclusively with the relationship of the
-publishers or authors of the Document to the Document's overall subject
-(or to related matters) and contains nothing that could fall directly
-within that overall subject. (For example, if the Document is in part a
-textbook of mathematics, a Secondary Section may not explain any
-mathematics.) The relationship could be a matter of historical
-connection with the subject or with related matters, or of legal,
-commercial, philosophical, ethical or political position regarding
-them.
-
-The "Invariant Sections" are certain Secondary Sections whose titles
-are designated, as being those of Invariant Sections, in the notice
-that says that the Document is released under this License.
-
-The "Cover Texts" are certain short passages of text that are listed,
-as Front-Cover Texts or Back-Cover Texts, in the notice that says that
-the Document is released under this License.
-
-A "Transparent" copy of the Document means a machine-readable copy,
-represented in a format whose specification is available to the
-general public, whose contents can be viewed and edited directly and
-straightforwardly with generic text editors or (for images composed of
-pixels) generic paint programs or (for drawings) some widely available
-drawing editor, and that is suitable for input to text formatters or
-for automatic translation to a variety of formats suitable for input
-to text formatters. A copy made in an otherwise Transparent file
-format whose markup has been designed to thwart or discourage
-subsequent modification by readers is not Transparent. A copy that is
-not "Transparent" is called "Opaque".
-
-Examples of suitable formats for Transparent copies include plain
-ASCII without markup, Texinfo input format, LaTeX input format, SGML
-or XML using a publicly available DTD, and standard-conforming simple
-HTML designed for human modification. Opaque formats include
-PostScript, PDF, proprietary formats that can be read and edited only
-by proprietary word processors, SGML or XML for which the DTD and/or
-processing tools are not generally available, and the
-machine-generated HTML produced by some word processors for output
-purposes only.
-
-The "Title Page" means, for a printed book, the title page itself,
-plus such following pages as are needed to hold, legibly, the material
-this License requires to appear in the title page. For works in
-formats which do not have any title page as such, "Title Page" means
-the text near the most prominent appearance of the work's title,
-preceding the beginning of the body of the text.
-
-
-2. VERBATIM COPYING
-
-You may copy and distribute the Document in any medium, either
-commercially or noncommercially, provided that this License, the
-copyright notices, and the license notice saying this License applies
-to the Document are reproduced in all copies, and that you add no other
-conditions whatsoever to those of this License. You may not use
-technical measures to obstruct or control the reading or further
-copying of the copies you make or distribute. However, you may accept
-compensation in exchange for copies. If you distribute a large enough
-number of copies you must also follow the conditions in section 3.
-
-You may also lend copies, under the same conditions stated above, and
-you may publicly display copies.
-
-
-3. COPYING IN QUANTITY
-
-If you publish printed copies of the Document numbering more than 100,
-and the Document's license notice requires Cover Texts, you must enclose
-the copies in covers that carry, clearly and legibly, all these Cover
-Texts: Front-Cover Texts on the front cover, and Back-Cover Texts on
-the back cover. Both covers must also clearly and legibly identify
-you as the publisher of these copies. The front cover must present
-the full title with all words of the title equally prominent and
-visible. You may add other material on the covers in addition.
-Copying with changes limited to the covers, as long as they preserve
-the title of the Document and satisfy these conditions, can be treated
-as verbatim copying in other respects.
-
-If the required texts for either cover are too voluminous to fit
-legibly, you should put the first ones listed (as many as fit
-reasonably) on the actual cover, and continue the rest onto adjacent
-pages.
-
-If you publish or distribute Opaque copies of the Document numbering
-more than 100, you must either include a machine-readable Transparent
-copy along with each Opaque copy, or state in or with each Opaque copy
-a publicly-accessible computer-network location containing a complete
-Transparent copy of the Document, free of added material, which the
-general network-using public has access to download anonymously at no
-charge using public-standard network protocols. If you use the latter
-option, you must take reasonably prudent steps, when you begin
-distribution of Opaque copies in quantity, to ensure that this
-Transparent copy will remain thus accessible at the stated location
-until at least one year after the last time you distribute an Opaque
-copy (directly or through your agents or retailers) of that edition to
-the public.
-
-It is requested, but not required, that you contact the authors of the
-Document well before redistributing any large number of copies, to give
-them a chance to provide you with an updated version of the Document.
-
-
-4. MODIFICATIONS
-
-You may copy and distribute a Modified Version of the Document under
-the conditions of sections 2 and 3 above, provided that you release
-the Modified Version under precisely this License, with the Modified
-Version filling the role of the Document, thus licensing distribution
-and modification of the Modified Version to whoever possesses a copy
-of it. In addition, you must do these things in the Modified Version:
-
-A. Use in the Title Page (and on the covers, if any) a title distinct
- from that of the Document, and from those of previous versions
- (which should, if there were any, be listed in the History section
- of the Document). You may use the same title as a previous version
- if the original publisher of that version gives permission.
-B. List on the Title Page, as authors, one or more persons or entities
- responsible for authorship of the modifications in the Modified
- Version, together with at least five of the principal authors of the
- Document (all of its principal authors, if it has less than five).
-C. State on the Title page the name of the publisher of the
- Modified Version, as the publisher.
-D. Preserve all the copyright notices of the Document.
-E. Add an appropriate copyright notice for your modifications
- adjacent to the other copyright notices.
-F. Include, immediately after the copyright notices, a license notice
- giving the public permission to use the Modified Version under the
- terms of this License, in the form shown in the Addendum below.
-G. Preserve in that license notice the full lists of Invariant Sections
- and required Cover Texts given in the Document's license notice.
-H. Include an unaltered copy of this License.
-I. Preserve the section entitled "History", and its title, and add to
- it an item stating at least the title, year, new authors, and
- publisher of the Modified Version as given on the Title Page. If
- there is no section entitled "History" in the Document, create one
- stating the title, year, authors, and publisher of the Document as
- given on its Title Page, then add an item describing the Modified
- Version as stated in the previous sentence.
-J. Preserve the network location, if any, given in the Document for
- public access to a Transparent copy of the Document, and likewise
- the network locations given in the Document for previous versions
- it was based on. These may be placed in the "History" section.
- You may omit a network location for a work that was published at
- least four years before the Document itself, or if the original
- publisher of the version it refers to gives permission.
-K. In any section entitled "Acknowledgements" or "Dedications",
- preserve the section's title, and preserve in the section all the
- substance and tone of each of the contributor acknowledgements
- and/or dedications given therein.
-L. Preserve all the Invariant Sections of the Document,
- unaltered in their text and in their titles. Section numbers
- or the equivalent are not considered part of the section titles.
-M. Delete any section entitled "Endorsements". Such a section
- may not be included in the Modified Version.
-N. Do not retitle any existing section as "Endorsements"
- or to conflict in title with any Invariant Section.
-
-If the Modified Version includes new front-matter sections or
-appendices that qualify as Secondary Sections and contain no material
-copied from the Document, you may at your option designate some or all
-of these sections as invariant. To do this, add their titles to the
-list of Invariant Sections in the Modified Version's license notice.
-These titles must be distinct from any other section titles.
-
-You may add a section entitled "Endorsements", provided it contains
-nothing but endorsements of your Modified Version by various
-parties--for example, statements of peer review or that the text has
-been approved by an organization as the authoritative definition of a
-standard.
-
-You may add a passage of up to five words as a Front-Cover Text, and a
-passage of up to 25 words as a Back-Cover Text, to the end of the list
-of Cover Texts in the Modified Version. Only one passage of
-Front-Cover Text and one of Back-Cover Text may be added by (or
-through arrangements made by) any one entity. If the Document already
-includes a cover text for the same cover, previously added by you or
-by arrangement made by the same entity you are acting on behalf of,
-you may not add another; but you may replace the old one, on explicit
-permission from the previous publisher that added the old one.
-
-The author(s) and publisher(s) of the Document do not by this License
-give permission to use their names for publicity for or to assert or
-imply endorsement of any Modified Version.
-
-
-5. COMBINING DOCUMENTS
-
-You may combine the Document with other documents released under this
-License, under the terms defined in section 4 above for modified
-versions, provided that you include in the combination all of the
-Invariant Sections of all of the original documents, unmodified, and
-list them all as Invariant Sections of your combined work in its
-license notice.
-
-The combined work need only contain one copy of this License, and
-multiple identical Invariant Sections may be replaced with a single
-copy. If there are multiple Invariant Sections with the same name but
-different contents, make the title of each such section unique by
-adding at the end of it, in parentheses, the name of the original
-author or publisher of that section if known, or else a unique number.
-Make the same adjustment to the section titles in the list of
-Invariant Sections in the license notice of the combined work.
-
-In the combination, you must combine any sections entitled "History"
-in the various original documents, forming one section entitled
-"History"; likewise combine any sections entitled "Acknowledgements",
-and any sections entitled "Dedications". You must delete all sections
-entitled "Endorsements."
-
-
-6. COLLECTIONS OF DOCUMENTS
-
-You may make a collection consisting of the Document and other documents
-released under this License, and replace the individual copies of this
-License in the various documents with a single copy that is included in
-the collection, provided that you follow the rules of this License for
-verbatim copying of each of the documents in all other respects.
-
-You may extract a single document from such a collection, and distribute
-it individually under this License, provided you insert a copy of this
-License into the extracted document, and follow this License in all
-other respects regarding verbatim copying of that document.
-
-
-7. AGGREGATION WITH INDEPENDENT WORKS
-
-A compilation of the Document or its derivatives with other separate
-and independent documents or works, in or on a volume of a storage or
-distribution medium, does not as a whole count as a Modified Version
-of the Document, provided no compilation copyright is claimed for the
-compilation. Such a compilation is called an "aggregate", and this
-License does not apply to the other self-contained works thus compiled
-with the Document, on account of their being thus compiled, if they
-are not themselves derivative works of the Document.
-
-If the Cover Text requirement of section 3 is applicable to these
-copies of the Document, then if the Document is less than one quarter
-of the entire aggregate, the Document's Cover Texts may be placed on
-covers that surround only the Document within the aggregate.
-Otherwise they must appear on covers around the whole aggregate.
-
-
-8. TRANSLATION
-
-Translation is considered a kind of modification, so you may
-distribute translations of the Document under the terms of section 4.
-Replacing Invariant Sections with translations requires special
-permission from their copyright holders, but you may include
-translations of some or all Invariant Sections in addition to the
-original versions of these Invariant Sections. You may include a
-translation of this License provided that you also include the
-original English version of this License. In case of a disagreement
-between the translation and the original English version of this
-License, the original English version will prevail.
-
-
-9. TERMINATION
-
-You may not copy, modify, sublicense, or distribute the Document except
-as expressly provided for under this License. Any other attempt to
-copy, modify, sublicense or distribute the Document is void, and will
-automatically terminate your rights under this License. However,
-parties who have received copies, or rights, from you under this
-License will not have their licenses terminated so long as such
-parties remain in full compliance.
-
-
-10. FUTURE REVISIONS OF THIS LICENSE
-
-The Free Software Foundation may publish new, revised versions
-of the GNU Free Documentation License from time to time. Such new
-versions will be similar in spirit to the present version, but may
-differ in detail to address new problems or concerns. See
-http://www.gnu.org/copyleft/.
-
-Each version of the License is given a distinguishing version number.
-If the Document specifies that a particular numbered version of this
-License "or any later version" applies to it, you have the option of
-following the terms and conditions either of that specified version or
-of any later version that has been published (not as a draft) by the
-Free Software Foundation. If the Document does not specify a version
-number of this License, you may choose any version ever published (not
-as a draft) by the Free Software Foundation.
-
-
-ADDENDUM: How to use this License for your documents
-
-To use this License in a document you have written, include a copy of
-the License in the document and put the following copyright and
-license notices just after the title page:
-
-@smallexample
- Copyright (c) YEAR YOUR NAME.
- 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 LIST THEIR TITLES, with the
- Front-Cover Texts being LIST, and with the Back-Cover Texts being LIST.
- A copy of the license is included in the section entitled "GNU
- Free Documentation License".
-@end smallexample
-
-If you have no Invariant Sections, write "with no Invariant Sections"
-instead of saying which ones are invariant. If you have no
-Front-Cover Texts, write "no Front-Cover Texts" instead of
-"Front-Cover Texts being LIST"; likewise for Back-Cover Texts.
-
-If your document contains nontrivial examples of program code, we
-recommend releasing these examples in parallel under your choice of
-free software license, such as the GNU General Public License,
-to permit their use in free software.
-
-@contents
-@bye
diff --git a/contrib/binutils/ld/ldlang.c b/contrib/binutils/ld/ldlang.c
deleted file mode 100644
index 0c08601..0000000
--- a/contrib/binutils/ld/ldlang.c
+++ /dev/null
@@ -1,5470 +0,0 @@
-/* Linker command language support.
- Copyright 1991, 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999, 2000,
- 2001, 2002, 2003, 2004
- 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, 59 Temple Place - Suite 330, Boston, MA
- 02111-1307, USA. */
-
-#include "bfd.h"
-#include "sysdep.h"
-#include "libiberty.h"
-#include "safe-ctype.h"
-#include "obstack.h"
-#include "bfdlink.h"
-
-#include "ld.h"
-#include "ldmain.h"
-#include "ldexp.h"
-#include "ldlang.h"
-#include <ldgram.h>
-#include "ldlex.h"
-#include "ldmisc.h"
-#include "ldctor.h"
-#include "ldfile.h"
-#include "ldemul.h"
-#include "fnmatch.h"
-#include "demangle.h"
-#include "hashtab.h"
-
-#ifndef offsetof
-#define offsetof(TYPE, MEMBER) ((size_t) & (((TYPE*) 0)->MEMBER))
-#endif
-
-/* Locals variables. */
-static struct obstack stat_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 lang_output_section_statement_type *default_common_section;
-static bfd_boolean map_option_f;
-static bfd_vma print_dot;
-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 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 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 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 *);
-
-/* 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 };
-struct bfd_sym_chain entry_symbol = { NULL, NULL };
-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_nocrossrefs *nocrossref_list;
-struct unique_sections *unique_section_list;
-static bfd_boolean ldlang_sysrooted_script = FALSE;
-int lang_statement_iteration = 0;
-
-etree_type *base; /* Relocation base - or null */
-
-#define new_stat(x, y) \
- (x##_type *) new_statement (x##_enum, sizeof (x##_type), y)
-
-#define outside_section_address(q) \
- ((q)->output_offset + (q)->output_section->vma)
-
-#define outside_symbol_address(q) \
- ((q)->value + outside_section_address (q->section))
-
-#define SECTION_NAME_MAP_LENGTH (16)
-
-void *
-stat_alloc (size_t size)
-{
- return obstack_alloc (&stat_obstack, size);
-}
-
-bfd_boolean
-unique_section_p (const char *secnam)
-{
- struct unique_sections *unam;
-
- for (unam = unique_section_list; unam; unam = unam->next)
- if (wildcardp (unam->name)
- ? fnmatch (unam->name, secnam, 0) == 0
- : strcmp (unam->name, secnam) == 0)
- {
- return TRUE;
- }
-
- return FALSE;
-}
-
-/* Generic traversal routines for finding matching sections. */
-
-static void
-walk_wild_section (lang_wild_statement_type *ptr,
- lang_input_statement_type *file,
- callback_t callback,
- void *data)
-{
- asection *s;
-
- if (file->just_syms_flag)
- return;
-
- 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);
-
- 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)
- {
- const char *sname = bfd_get_section_name (file->the_bfd, s);
-
- if (wildcardp (sec->spec.name))
- skip = fnmatch (sec->spec.name, sname, 0) != 0;
- else
- skip = strcmp (sec->spec.name, sname) != 0;
- }
-
- if (!skip)
- (*callback) (ptr, sec, s, file, data);
-
- sec = sec->next;
- }
- }
-}
-
-/* Handle a wild statement for a single file F. */
-
-static void
-walk_wild_file (lang_wild_statement_type *s,
- lang_input_statement_type *f,
- callback_t callback,
- void *data)
-{
- if (f->the_bfd == NULL
- || ! bfd_check_format (f->the_bfd, bfd_archive))
- walk_wild_section (s, f, callback, data);
- else
- {
- bfd *member;
-
- /* This is an archive file. We must map each member of the
- archive separately. */
- member = bfd_openr_next_archived_file (f->the_bfd, NULL);
- while (member != NULL)
- {
- /* When lookup_name is called, it will call the add_symbols
- entry point for the archive. For each element of the
- archive which is included, BFD will call ldlang_add_file,
- which will set the usrdata field of the member to the
- lang_input_statement. */
- if (member->usrdata != NULL)
- {
- walk_wild_section (s, member->usrdata, callback, data);
- }
-
- member = bfd_openr_next_archived_file (f->the_bfd, member);
- }
- }
-}
-
-static void
-walk_wild (lang_wild_statement_type *s, callback_t callback, void *data)
-{
- const char *file_spec = s->filename;
-
- if (file_spec == NULL)
- {
- /* Perform the iteration over all files in the list. */
- LANG_FOR_EACH_INPUT_STATEMENT (f)
- {
- walk_wild_file (s, f, callback, data);
- }
- }
- else if (wildcardp (file_spec))
- {
- LANG_FOR_EACH_INPUT_STATEMENT (f)
- {
- if (fnmatch (file_spec, f->filename, FNM_FILE_NAME) == 0)
- walk_wild_file (s, f, callback, data);
- }
- }
- else
- {
- lang_input_statement_type *f;
-
- /* Perform the iteration over a single file. */
- f = lookup_name (file_spec);
- if (f)
- walk_wild_file (s, f, callback, data);
- }
-}
-
-/* lang_for_each_statement walks the parse tree and calls the provided
- function for each node. */
-
-static void
-lang_for_each_statement_worker (void (*func) (lang_statement_union_type *),
- lang_statement_union_type *s)
-{
- for (; s != NULL; s = s->header.next)
- {
- func (s);
-
- switch (s->header.type)
- {
- case lang_constructors_statement_enum:
- lang_for_each_statement_worker (func, constructor_list.head);
- break;
- case lang_output_section_statement_enum:
- lang_for_each_statement_worker
- (func,
- s->output_section_statement.children.head);
- break;
- case lang_wild_statement_enum:
- lang_for_each_statement_worker
- (func,
- s->wild_statement.children.head);
- break;
- case lang_group_statement_enum:
- lang_for_each_statement_worker (func,
- s->group_statement.children.head);
- break;
- case lang_data_statement_enum:
- case lang_reloc_statement_enum:
- case lang_object_symbols_statement_enum:
- case lang_output_statement_enum:
- case lang_target_statement_enum:
- case lang_input_section_enum:
- case lang_input_statement_enum:
- case lang_assignment_statement_enum:
- case lang_padding_statement_enum:
- case lang_address_statement_enum:
- case lang_fill_statement_enum:
- break;
- default:
- FAIL ();
- break;
- }
- }
-}
-
-void
-lang_for_each_statement (void (*func) (lang_statement_union_type *))
-{
- lang_for_each_statement_worker (func, statement_list.head);
-}
-
-/*----------------------------------------------------------------------*/
-
-void
-lang_list_init (lang_statement_list_type *list)
-{
- list->head = NULL;
- list->tail = &list->head;
-}
-
-/* Build a new statement node for the parse tree. */
-
-static lang_statement_union_type *
-new_statement (enum statement_enum type,
- size_t size,
- lang_statement_list_type *list)
-{
- lang_statement_union_type *new;
-
- new = stat_alloc (size);
- new->header.type = type;
- new->header.next = NULL;
- lang_statement_append (list, new, &new->header.next);
- return new;
-}
-
-/* Build a new input file node for the language. There are several
- ways in which we treat an input file, eg, we only look at symbols,
- or prefix it with a -l etc.
-
- We can be supplied with requests for input files more than once;
- they may, for example be split over several lines like foo.o(.text)
- foo.o(.data) etc, so when asked for a file we check that we haven't
- got it already so we don't duplicate the bfd. */
-
-static lang_input_statement_type *
-new_afile (const char *name,
- lang_input_file_enum_type file_type,
- const char *target,
- bfd_boolean add_to_list)
-{
- lang_input_statement_type *p;
-
- if (add_to_list)
- p = new_stat (lang_input_statement, stat_ptr);
- else
- {
- p = stat_alloc (sizeof (lang_input_statement_type));
- p->header.next = NULL;
- }
-
- lang_has_input_file = TRUE;
- p->target = target;
- p->sysrooted = FALSE;
- switch (file_type)
- {
- case lang_input_file_is_symbols_only_enum:
- p->filename = name;
- p->is_archive = FALSE;
- p->real = TRUE;
- p->local_sym_name = name;
- p->just_syms_flag = TRUE;
- p->search_dirs_flag = FALSE;
- break;
- case lang_input_file_is_fake_enum:
- p->filename = name;
- p->is_archive = FALSE;
- p->real = FALSE;
- p->local_sym_name = name;
- p->just_syms_flag = FALSE;
- p->search_dirs_flag = FALSE;
- break;
- case lang_input_file_is_l_enum:
- p->is_archive = TRUE;
- p->filename = name;
- p->real = TRUE;
- p->local_sym_name = concat ("-l", name, NULL);
- p->just_syms_flag = FALSE;
- p->search_dirs_flag = TRUE;
- break;
- case lang_input_file_is_marker_enum:
- p->filename = name;
- p->is_archive = FALSE;
- p->real = FALSE;
- p->local_sym_name = name;
- p->just_syms_flag = FALSE;
- p->search_dirs_flag = TRUE;
- break;
- case lang_input_file_is_search_file_enum:
- p->sysrooted = ldlang_sysrooted_script;
- p->filename = name;
- p->is_archive = FALSE;
- p->real = TRUE;
- p->local_sym_name = name;
- p->just_syms_flag = FALSE;
- p->search_dirs_flag = TRUE;
- break;
- case lang_input_file_is_file_enum:
- p->filename = name;
- p->is_archive = FALSE;
- p->real = TRUE;
- p->local_sym_name = name;
- p->just_syms_flag = FALSE;
- p->search_dirs_flag = FALSE;
- break;
- default:
- FAIL ();
- }
- p->the_bfd = NULL;
- p->asymbols = NULL;
- p->next_real_file = NULL;
- p->next = NULL;
- p->symbol_count = 0;
- p->dynamic = config.dynamic_link;
- p->as_needed = as_needed;
- p->whole_archive = whole_archive;
- p->loaded = FALSE;
- lang_statement_append (&input_file_chain,
- (lang_statement_union_type *) p,
- &p->next_real_file);
- return p;
-}
-
-lang_input_statement_type *
-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);
-}
-
-/* Build enough state so that the parser can build its tree. */
-
-void
-lang_init (void)
-{
- obstack_begin (&stat_obstack, 1000);
-
- stat_ptr = &statement_list;
-
- lang_list_init (stat_ptr);
-
- lang_list_init (&input_file_chain);
- lang_list_init (&lang_output_section_statement);
- lang_list_init (&file_chain);
- first_file = lang_add_input_file (NULL, lang_input_file_is_marker_enum,
- NULL);
- abs_output_section =
- lang_output_section_statement_lookup (BFD_ABS_SECTION_NAME);
-
- abs_output_section->bfd_section = bfd_abs_section_ptr;
-
- /* The value "3" is ad-hoc, somewhat related to the expected number of
- DEFINED expressions in a linker script. For most default linker
- scripts, there are none. Why a hash table then? Well, it's somewhat
- 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"));
-
- /* Callers of exp_fold_tree need to increment this. */
- lang_statement_iteration = 0;
-}
-
-/*----------------------------------------------------------------------
- A region is an area of memory declared with the
- MEMORY { name:org=exp, len=exp ... }
- syntax.
-
- We maintain a list of all the regions here.
-
- If no regions are specified in the script, then the default is used
- which is created when looked up to be the entire data space.
-
- If create is true we are creating a region inside a MEMORY block.
- In this case it is probably an error to create a region that has
- already been created. If we are not inside a MEMORY block it is
- dubious to use an undeclared region name (except DEFAULT_MEMORY_REGION)
- 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;
-
-lang_memory_region_type *
-lang_memory_region_lookup (const char *const name, bfd_boolean create)
-{
- lang_memory_region_type *p;
- lang_memory_region_type *new;
-
- /* NAME is NULL for LMA memspecs if no region was specified. */
- if (name == NULL)
- return NULL;
-
- for (p = lang_memory_region_list; p != NULL; p = p->next)
- if (strcmp (p->name, name) == 0)
- {
- if (create)
- 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);
-
- new = stat_alloc (sizeof (lang_memory_region_type));
-
- 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->had_full_message = FALSE;
-
- return new;
-}
-
-static lang_memory_region_type *
-lang_memory_default (asection *section)
-{
- lang_memory_region_type *p;
-
- flagword sec_flags = section->flags;
-
- /* Override SEC_DATA to mean a writable section. */
- if ((sec_flags & (SEC_ALLOC | SEC_READONLY | SEC_CODE)) == SEC_ALLOC)
- sec_flags |= SEC_DATA;
-
- for (p = lang_memory_region_list; p != NULL; p = p->next)
- {
- if ((p->flags & sec_flags) != 0
- && (p->not_flags & sec_flags) == 0)
- {
- return p;
- }
- }
- return lang_memory_region_lookup (DEFAULT_MEMORY_REGION, FALSE);
-}
-
-lang_output_section_statement_type *
-lang_output_section_find (const char *const name)
-{
- lang_statement_union_type *u;
- lang_output_section_statement_type *lookup;
-
- for (u = lang_output_section_statement.head; u != NULL; u = lookup->next)
- {
- lookup = &u->output_section_statement;
- if (strcmp (name, lookup->name) == 0)
- return lookup;
- }
- return NULL;
-}
-
-lang_output_section_statement_type *
-lang_output_section_statement_lookup (const char *const name)
-{
- lang_output_section_statement_type *lookup;
-
- lookup = lang_output_section_find (name);
- if (lookup == NULL)
- {
- 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;
-
- lookup->next = NULL;
- lookup->bfd_section = NULL;
- lookup->processed = 0;
- lookup->sectype = normal_section;
- lookup->addr_tree = NULL;
- lang_list_init (&lookup->children);
-
- 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_statement_append (&lang_output_section_statement,
- (lang_statement_union_type *) lookup,
- &lookup->next);
- }
- return lookup;
-}
-
-static void
-lang_map_flags (flagword flag)
-{
- if (flag & SEC_ALLOC)
- minfo ("a");
-
- if (flag & SEC_CODE)
- minfo ("x");
-
- if (flag & SEC_READONLY)
- minfo ("r");
-
- if (flag & SEC_DATA)
- minfo ("w");
-
- if (flag & SEC_LOAD)
- minfo ("l");
-}
-
-void
-lang_map (void)
-{
- lang_memory_region_type *m;
-
- minfo (_("\nMemory Configuration\n\n"));
- fprintf (config.map_file, "%-16s %-18s %-18s %s\n",
- _("Name"), _("Origin"), _("Length"), _("Attributes"));
-
- for (m = lang_memory_region_list; m != NULL; m = m->next)
- {
- char buf[100];
- int len;
-
- fprintf (config.map_file, "%-16s ", m->name);
-
- sprintf_vma (buf, m->origin);
- minfo ("0x%s ", buf);
- len = strlen (buf);
- while (len < 16)
- {
- print_space ();
- ++len;
- }
-
- minfo ("0x%V", m->length);
- if (m->flags || m->not_flags)
- {
-#ifndef BFD64
- minfo (" ");
-#endif
- if (m->flags)
- {
- print_space ();
- lang_map_flags (m->flags);
- }
-
- if (m->not_flags)
- {
- minfo (" !");
- lang_map_flags (m->not_flags);
- }
- }
-
- print_nl ();
- }
-
- fprintf (config.map_file, _("\nLinker script and memory map\n\n"));
-
- print_statements ();
-}
-
-/* Initialize an output section. */
-
-static void
-init_os (lang_output_section_statement_type *s)
-{
- 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);
- 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 there is a base address, make sure that any sections it might
- mention are initialized. */
- if (s->addr_tree != NULL)
- exp_init_os (s->addr_tree);
-
- if (s->load_base != NULL)
- exp_init_os (s->load_base);
-}
-
-/* Make sure that all output sections mentioned in an expression are
- initialized. */
-
-static void
-exp_init_os (etree_type *exp)
-{
- switch (exp->type.node_class)
- {
- case etree_assign:
- exp_init_os (exp->assign.src);
- break;
-
- case etree_binary:
- exp_init_os (exp->binary.lhs);
- exp_init_os (exp->binary.rhs);
- break;
-
- case etree_trinary:
- exp_init_os (exp->trinary.cond);
- exp_init_os (exp->trinary.lhs);
- exp_init_os (exp->trinary.rhs);
- break;
-
- case etree_assert:
- exp_init_os (exp->assert_s.child);
- break;
-
- case etree_unary:
- exp_init_os (exp->unary.child);
- break;
-
- case etree_name:
- switch (exp->type.node_code)
- {
- case ADDR:
- case LOADADDR:
- case SIZEOF:
- {
- lang_output_section_statement_type *os;
-
- os = lang_output_section_find (exp->name.name);
- if (os != NULL && os->bfd_section == NULL)
- init_os (os);
- }
- }
- break;
-
- default:
- break;
- }
-}
-
-/* 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);
- 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);
-}
-
-/* The wild routines.
-
- These expand statements like *(.text) and foo.o to a list of
- 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. */
-
-void
-lang_add_section (lang_statement_list_type *ptr,
- asection *section,
- lang_output_section_statement_type *output,
- lang_input_statement_type *file)
-{
- flagword 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 input sections which are assigned to a section named
- DISCARD_SECTION_NAME. */
- if (strcmp (output->name, DISCARD_SECTION_NAME) == 0)
- discard = TRUE;
-
- /* Discard debugging sections if we are stripping debugging
- information. */
- if ((link_info.strip == strip_debugger || link_info.strip == strip_all)
- && (flags & SEC_DEBUGGING) != 0)
- discard = TRUE;
-
- if (discard)
- {
- if (section->output_section == NULL)
- {
- /* This prevents future calls from assigning this section. */
- section->output_section = bfd_abs_section_ptr;
- }
- return;
- }
-
- if (section->output_section == NULL)
- {
- bfd_boolean first;
- 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
- to an output section, because we want to be able to include a
- SEC_NEVER_LOAD section in the middle of an otherwise loaded
- section (I don't know why we want to do this, but we do).
- build_link_order in ldwrite.c handles this case by turning
- the embedded SEC_NEVER_LOAD section into a fill. */
-
- flags &= ~ SEC_NEVER_LOAD;
-
- /* If final link, don't copy the SEC_LINK_ONCE flags, they've
- already been processed. One reason to do this is that on pe
- format targets, .text$foo sections go into .text and it's odd
- to see .text with SEC_LINK_ONCE set. */
-
- if (! link_info.relocatable)
- flags &= ~ (SEC_LINK_ONCE | SEC_LINK_DUPLICATES);
-
- /* If this is not the first input section, and the SEC_READONLY
- flag is not currently set, then don't set it just because the
- input section has it set. */
-
- if (! first && (section->output_section->flags & SEC_READONLY) == 0)
- flags &= ~ SEC_READONLY;
-
- /* Keep SEC_MERGE and SEC_STRINGS only if they are the same. */
- if (! first
- && ((section->output_section->flags & (SEC_MERGE | SEC_STRINGS))
- != (flags & (SEC_MERGE | SEC_STRINGS))
- || ((flags & SEC_MERGE)
- && section->output_section->entsize != section->entsize)))
- {
- section->output_section->flags &= ~ (SEC_MERGE | SEC_STRINGS);
- flags &= ~ (SEC_MERGE | SEC_STRINGS);
- }
-
- section->output_section->flags |= flags;
-
- if (flags & SEC_MERGE)
- section->output_section->entsize = section->entsize;
-
- /* If SEC_READONLY is not set in the input section, then clear
- it from the output section. */
- if ((section->flags & SEC_READONLY) == 0)
- section->output_section->flags &= ~SEC_READONLY;
-
- switch (output->sectype)
- {
- 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;
- }
-
- /* Copy over SEC_SMALL_DATA. */
- if (section->flags & SEC_SMALL_DATA)
- section->output_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)
- {
- section->output_section->flags |= SEC_BLOCK;
- /* FIXME: This value should really be obtained from the bfd... */
- output->block_value = 128;
- }
- }
-}
-
-/* Handle wildcard sorting. This returns the lang_input_section which
- should follow the one we are going to create for SECTION and FILE,
- based on the sorting requirements of WILD. It returns NULL if the
- new section should just go at the end of the current list. */
-
-static lang_statement_union_type *
-wild_sort (lang_wild_statement_type *wild,
- struct wildcard_list *sec,
- lang_input_statement_type *file,
- asection *section)
-{
- const char *section_name;
- lang_statement_union_type *l;
-
- if (!wild->filenames_sorted && (sec == NULL || !sec->spec.sorted))
- return NULL;
-
- section_name = bfd_get_section_name (file->the_bfd, section);
- for (l = wild->children.head; l != NULL; l = l->header.next)
- {
- lang_input_section_type *ls;
-
- if (l->header.type != lang_input_section_enum)
- continue;
- ls = &l->input_section;
-
- /* Sorting by filename takes precedence over sorting by section
- name. */
-
- if (wild->filenames_sorted)
- {
- const char *fn, *ln;
- bfd_boolean fa, la;
- 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. */
-
- if (file->the_bfd != NULL
- && bfd_my_archive (file->the_bfd) != NULL)
- {
- fn = bfd_get_filename (bfd_my_archive (file->the_bfd));
- fa = TRUE;
- }
- else
- {
- fn = file->filename;
- fa = FALSE;
- }
-
- if (ls->ifile->the_bfd != NULL
- && bfd_my_archive (ls->ifile->the_bfd) != NULL)
- {
- ln = bfd_get_filename (bfd_my_archive (ls->ifile->the_bfd));
- la = TRUE;
- }
- else
- {
- ln = ls->ifile->filename;
- la = FALSE;
- }
-
- i = strcmp (fn, ln);
- if (i > 0)
- continue;
- else if (i < 0)
- break;
-
- if (fa || la)
- {
- if (fa)
- fn = file->filename;
- if (la)
- ln = ls->ifile->filename;
-
- i = strcmp (fn, ln);
- if (i > 0)
- continue;
- else if (i < 0)
- break;
- }
- }
-
- /* Here either the files are not sorted by name, or we are
- 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;
- }
- }
-
- return l;
-}
-
-/* Expand a wild statement for a particular FILE. SECTION may be
- NULL, in which case it is a wild card. */
-
-static void
-output_section_callback (lang_wild_statement_type *ptr,
- struct wildcard_list *sec,
- asection *section,
- lang_input_statement_type *file,
- void *output)
-{
- lang_statement_union_type *before;
-
- /* Exclude sections that match UNIQUE_SECTION_LIST. */
- if (unique_section_p (bfd_get_section_name (file->the_bfd, 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
- should follow the one we are about to add. If BEFORE
- is NULL, then the section should just go at the end
- of the current list. */
-
- if (before == NULL)
- lang_add_section (&ptr->children, section,
- (lang_output_section_statement_type *) output,
- file);
- else
- {
- lang_statement_list_type list;
- lang_statement_union_type **pp;
-
- lang_list_init (&list);
- lang_add_section (&list, section,
- (lang_output_section_statement_type *) output,
- file);
-
- /* If we are discarding the section, LIST.HEAD will
- be NULL. */
- if (list.head != NULL)
- {
- ASSERT (list.head->header.next == NULL);
-
- for (pp = &ptr->children.head;
- *pp != before;
- pp = &(*pp)->header.next)
- ASSERT (*pp != NULL);
-
- list.head->header.next = *pp;
- *pp = list.head;
- }
- }
-}
-
-/* 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. */
-
-static lang_input_statement_type *
-lookup_name (const char *name)
-{
- lang_input_statement_type *search;
-
- for (search = (lang_input_statement_type *) input_file_chain.head;
- search != NULL;
- search = (lang_input_statement_type *) search->next_real_file)
- {
- /* 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;
-
- 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);
-
- /* 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)
- return search;
-
- if (! load_symbols (search, NULL))
- return NULL;
-
- return search;
-}
-
-/* Get the symbols for an input file. */
-
-static bfd_boolean
-load_symbols (lang_input_statement_type *entry,
- lang_statement_list_type *place)
-{
- char **matching;
-
- if (entry->loaded)
- return TRUE;
-
- ldfile_open_file (entry);
-
- if (! bfd_check_format (entry->the_bfd, bfd_archive)
- && ! bfd_check_format_matches (entry->the_bfd, bfd_object, &matching))
- {
- bfd_error_type err;
- lang_statement_list_type *hold;
- bfd_boolean bad_load = TRUE;
- bfd_boolean save_ldlang_sysrooted_script;
-
- err = bfd_get_error ();
-
- /* See if the emulation has some special knowledge. */
- if (ldemul_unrecognized_file (entry))
- return TRUE;
-
- if (err == bfd_error_file_ambiguously_recognized)
- {
- char **p;
-
- einfo (_("%B: file not recognized: %E\n"), entry->the_bfd);
- einfo (_("%B: matching formats:"), entry->the_bfd);
- for (p = matching; *p != NULL; p++)
- einfo (" %s", *p);
- einfo ("%F\n");
- }
- else if (err != bfd_error_file_not_recognized
- || place == NULL)
- einfo (_("%F%B: file not recognized: %E\n"), entry->the_bfd);
- else
- bad_load = FALSE;
-
- bfd_close (entry->the_bfd);
- entry->the_bfd = NULL;
-
- /* Try to interpret the file as a linker script. */
- ldfile_open_command_file (entry->filename);
-
- hold = stat_ptr;
- stat_ptr = place;
- save_ldlang_sysrooted_script = ldlang_sysrooted_script;
- ldlang_sysrooted_script = entry->sysrooted;
-
- ldfile_assumed_script = TRUE;
- parser_input = input_script;
- yyparse ();
- ldfile_assumed_script = FALSE;
-
- ldlang_sysrooted_script = save_ldlang_sysrooted_script;
- stat_ptr = hold;
-
- return ! bad_load;
- }
-
- if (ldemul_recognized_file (entry))
- return TRUE;
-
- /* We don't call ldlang_add_file for an archive. Instead, the
- add_symbols entry point will call ldlang_add_file, via the
- add_archive_element callback, for each element of the archive
- which is used. */
- switch (bfd_get_format (entry->the_bfd))
- {
- default:
- break;
-
- case bfd_object:
- ldlang_add_file (entry);
- if (trace_files || trace_file_tries)
- info_msg ("%I\n", entry);
- break;
-
- case bfd_archive:
- if (entry->whole_archive)
- {
- bfd *member = NULL;
- bfd_boolean loaded = TRUE;
-
- for (;;)
- {
- member = bfd_openr_next_archived_file (entry->the_bfd, member);
-
- if (member == NULL)
- break;
-
- if (! bfd_check_format (member, bfd_object))
- {
- einfo (_("%F%B: member %B in archive is not an object\n"),
- entry->the_bfd, member);
- loaded = FALSE;
- }
-
- if (! ((*link_info.callbacks->add_archive_element)
- (&link_info, member, "--whole-archive")))
- abort ();
-
- if (! bfd_link_add_symbols (member, &link_info))
- {
- einfo (_("%F%B: could not read symbols: %E\n"), member);
- loaded = FALSE;
- }
- }
-
- entry->loaded = loaded;
- return loaded;
- }
- break;
- }
-
- if (bfd_link_add_symbols (entry->the_bfd, &link_info))
- entry->loaded = TRUE;
- else
- einfo (_("%F%B: could not read symbols: %E\n"), entry->the_bfd);
-
- return entry->loaded;
-}
-
-/* Handle a wild statement. S->FILENAME or S->SECTION_LIST or both
- may be NULL, indicating that it is a wildcard. Separate
- lang_input_section statements are created for each part of the
- expansion; they are added after the wild statement S. OUTPUT is
- the output section. */
-
-static void
-wild (lang_wild_statement_type *s,
- const char *target ATTRIBUTE_UNUSED,
- lang_output_section_statement_type *output)
-{
- struct wildcard_list *sec;
-
- walk_wild (s, output_section_callback, output);
-
- for (sec = s->section_list; sec != NULL; sec = sec->next)
- {
- if (default_common_section != NULL)
- break;
- 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;
- }
- }
-}
-
-/* Return TRUE iff target is the sought target. */
-
-static int
-get_target (const bfd_target *target, void *data)
-{
- const char *sought = data;
-
- return strcmp (target->name, sought) == 0;
-}
-
-/* Like strcpy() but convert to lower case as well. */
-
-static void
-stricpy (char *dest, char *src)
-{
- char c;
-
- while ((c = *src++) != 0)
- *dest++ = TOLOWER (c);
-
- *dest = 0;
-}
-
-/* Remove the first occurrence of needle (if any) in haystack
- from haystack. */
-
-static void
-strcut (char *haystack, char *needle)
-{
- haystack = strstr (haystack, needle);
-
- if (haystack)
- {
- char *src;
-
- for (src = haystack + strlen (needle); *src;)
- *haystack++ = *src++;
-
- *haystack = 0;
- }
-}
-
-/* Compare two target format name strings.
- Return a value indicating how "similar" they are. */
-
-static int
-name_compare (char *first, char *second)
-{
- char *copy1;
- char *copy2;
- int result;
-
- copy1 = xmalloc (strlen (first) + 1);
- copy2 = xmalloc (strlen (second) + 1);
-
- /* Convert the names to lower case. */
- stricpy (copy1, first);
- stricpy (copy2, second);
-
- /* Remove size and endian strings from the name. */
- strcut (copy1, "big");
- strcut (copy1, "little");
- strcut (copy2, "big");
- strcut (copy2, "little");
-
- /* Return a value based on how many characters match,
- starting from the beginning. If both strings are
- the same then return 10 * their length. */
- for (result = 0; copy1[result] == copy2[result]; result++)
- if (copy1[result] == 0)
- {
- result *= 10;
- break;
- }
-
- free (copy1);
- free (copy2);
-
- return result;
-}
-
-/* Set by closest_target_match() below. */
-static const bfd_target *winner;
-
-/* Scan all the valid bfd targets looking for one that has the endianness
- requirement that was specified on the command line, and is the nearest
- match to the original output target. */
-
-static int
-closest_target_match (const bfd_target *target, void *data)
-{
- const bfd_target *original = data;
-
- if (command_line.endian == ENDIAN_BIG
- && target->byteorder != BFD_ENDIAN_BIG)
- return 0;
-
- if (command_line.endian == ENDIAN_LITTLE
- && target->byteorder != BFD_ENDIAN_LITTLE)
- return 0;
-
- /* Must be the same flavour. */
- if (target->flavour != original->flavour)
- return 0;
-
- /* If we have not found a potential winner yet, then record this one. */
- if (winner == NULL)
- {
- winner = target;
- return 0;
- }
-
- /* Oh dear, we now have two potential candidates for a successful match.
- Compare their names and choose the better one. */
- if (name_compare (target->name, original->name)
- > name_compare (winner->name, original->name))
- winner = target;
-
- /* Keep on searching until wqe have checked them all. */
- return 0;
-}
-
-/* Return the BFD target format of the first input file. */
-
-static char *
-get_first_input_target (void)
-{
- char *target = NULL;
-
- LANG_FOR_EACH_INPUT_STATEMENT (s)
- {
- if (s->header.type == lang_input_statement_enum
- && s->real)
- {
- ldfile_open_file (s);
-
- if (s->the_bfd != NULL
- && bfd_check_format (s->the_bfd, bfd_object))
- {
- target = bfd_get_target (s->the_bfd);
-
- if (target != NULL)
- break;
- }
- }
- }
-
- return target;
-}
-
-const char *
-lang_get_output_target (void)
-{
- const char *target;
-
- /* Has the user told us which output format to use? */
- if (output_target != NULL)
- return output_target;
-
- /* No - has the current target been set to something other than
- the default? */
- if (current_target != default_target)
- return current_target;
-
- /* No - can we determine the format of the first input file? */
- target = get_first_input_target ();
- if (target != NULL)
- return target;
-
- /* Failed - use the default output target. */
- return default_target;
-}
-
-/* Open the output file. */
-
-static bfd *
-open_output (const char *name)
-{
- bfd *output;
-
- output_target = lang_get_output_target ();
-
- /* Has the user requested a particular endianness on the command
- line? */
- if (command_line.endian != ENDIAN_UNSET)
- {
- const bfd_target *target;
- enum bfd_endian desired_endian;
-
- /* Get the chosen target. */
- target = bfd_search_for_target (get_target, (void *) output_target);
-
- /* If the target is not supported, we cannot do anything. */
- if (target != NULL)
- {
- if (command_line.endian == ENDIAN_BIG)
- desired_endian = BFD_ENDIAN_BIG;
- else
- desired_endian = BFD_ENDIAN_LITTLE;
-
- /* See if the target has the wrong endianness. This should
- not happen if the linker script has provided big and
- little endian alternatives, but some scrips don't do
- this. */
- if (target->byteorder != desired_endian)
- {
- /* If it does, then see if the target provides
- an alternative with the correct endianness. */
- if (target->alternative_target != NULL
- && (target->alternative_target->byteorder == desired_endian))
- output_target = target->alternative_target->name;
- else
- {
- /* Try to find a target as similar as possible to
- the default target, but which has the desired
- endian characteristic. */
- bfd_search_for_target (closest_target_match,
- (void *) target);
-
- /* 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"));
- else
- output_target = winner->name;
- }
- }
- }
- }
-
- output = bfd_openw (name, output_target);
-
- if (output == NULL)
- {
- if (bfd_get_error () == bfd_error_invalid_target)
- einfo (_("%P%F: target %s not found\n"), output_target);
-
- einfo (_("%P%F: cannot open output file %s: %E\n"), 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,
- ldfile_output_architecture,
- ldfile_output_machine))
- einfo (_("%P%F:%s: can not set architecture: %E\n"), 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"));
-
- bfd_set_gp_size (output, g_switch_value);
- return output;
-}
-
-static void
-ldlang_open_output (lang_statement_union_type *statement)
-{
- switch (statement->header.type)
- {
- case lang_output_statement_enum:
- ASSERT (output_bfd == NULL);
- output_bfd = open_output (statement->output_statement.name);
- ldemul_set_output_arch ();
- if (config.magic_demand_paged && !link_info.relocatable)
- output_bfd->flags |= D_PAGED;
- else
- output_bfd->flags &= ~D_PAGED;
- if (config.text_read_only)
- output_bfd->flags |= WP_TEXT;
- else
- output_bfd->flags &= ~WP_TEXT;
- if (link_info.traditional_format)
- output_bfd->flags |= BFD_TRADITIONAL_FORMAT;
- else
- output_bfd->flags &= ~BFD_TRADITIONAL_FORMAT;
- break;
-
- case lang_target_statement_enum:
- current_target = statement->target_statement.target;
- break;
- default:
- break;
- }
-}
-
-/* Convert between addresses in bytes and sizes in octets.
- For currently supported targets, octets_per_byte is always a power
- of two, so we can use shifts. */
-#define TO_ADDR(X) ((X) >> opb_shift)
-#define TO_SIZE(X) ((X) << opb_shift)
-
-/* Support the above. */
-static unsigned int opb_shift = 0;
-
-static void
-init_opb (void)
-{
- unsigned x = bfd_arch_mach_octets_per_byte (ldfile_output_architecture,
- ldfile_output_machine);
- opb_shift = 0;
- if (x > 1)
- while ((x & 1) == 0)
- {
- x >>= 1;
- ++opb_shift;
- }
- ASSERT (x == 1);
-}
-
-/* Open all the input files. */
-
-static void
-open_input_bfds (lang_statement_union_type *s, bfd_boolean force)
-{
- for (; s != NULL; s = s->header.next)
- {
- switch (s->header.type)
- {
- case lang_constructors_statement_enum:
- open_input_bfds (constructor_list.head, force);
- break;
- case lang_output_section_statement_enum:
- open_input_bfds (s->output_section_statement.children.head, force);
- break;
- case lang_wild_statement_enum:
- /* Maybe we should load the file's symbols. */
- if (s->wild_statement.filename
- && ! wildcardp (s->wild_statement.filename))
- lookup_name (s->wild_statement.filename);
- open_input_bfds (s->wild_statement.children.head, force);
- break;
- case lang_group_statement_enum:
- {
- struct bfd_link_hash_entry *undefs;
-
- /* We must continually search the entries in the group
- until no new symbols are added to the list of undefined
- symbols. */
-
- do
- {
- undefs = link_info.hash->undefs_tail;
- open_input_bfds (s->group_statement.children.head, TRUE);
- }
- while (undefs != link_info.hash->undefs_tail);
- }
- break;
- case lang_target_statement_enum:
- current_target = s->target_statement.target;
- break;
- case lang_input_statement_enum:
- if (s->input_statement.real)
- {
- lang_statement_list_type add;
-
- 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
- has been loaded already. */
- if (force
- && !s->input_statement.whole_archive
- && s->input_statement.loaded
- && bfd_check_format (s->input_statement.the_bfd,
- bfd_archive))
- s->input_statement.loaded = FALSE;
-
- lang_list_init (&add);
-
- if (! load_symbols (&s->input_statement, &add))
- config.make_executable = FALSE;
-
- if (add.head != NULL)
- {
- *add.tail = s->header.next;
- s->header.next = add.head;
- }
- }
- break;
- default:
- break;
- }
- }
-}
-
-/* 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
-lang_track_definedness (const char *name)
-{
- if (bfd_hash_lookup (&lang_definedness_table, name, TRUE, FALSE) == NULL)
- einfo (_("%P%F: bfd_hash_lookup failed creating symbol %s\n"), name);
-}
-
-/* New-function for the definedness hash table. */
-
-static struct bfd_hash_entry *
-lang_definedness_newfunc (struct bfd_hash_entry *entry,
- struct bfd_hash_table *table ATTRIBUTE_UNUSED,
- const char *name ATTRIBUTE_UNUSED)
-{
- struct lang_definedness_hash_entry *ret
- = (struct lang_definedness_hash_entry *) entry;
-
- if (ret == NULL)
- ret = (struct lang_definedness_hash_entry *)
- bfd_hash_allocate (table, sizeof (struct lang_definedness_hash_entry));
-
- if (ret == NULL)
- einfo (_("%P%F: bfd_hash_allocate failed creating symbol %s\n"), name);
-
- ret->iteration = -1;
- return &ret->root;
-}
-
-/* Return the iteration when the definition of NAME was last updated. A
- value of -1 means that the symbol is not defined in the linker script
- or the command line, but may be defined in the linker symbol table. */
-
-int
-lang_symbol_definition_iteration (const char *name)
-{
- struct lang_definedness_hash_entry *defentry
- = (struct lang_definedness_hash_entry *)
- bfd_hash_lookup (&lang_definedness_table, name, FALSE, FALSE);
-
- /* We've already created this one on the presence of DEFINED in the
- script, so it can't be NULL unless something is borked elsewhere in
- the code. */
- if (defentry == NULL)
- FAIL ();
-
- return defentry->iteration;
-}
-
-/* Update the definedness state of NAME. */
-
-void
-lang_update_definedness (const char *name, struct bfd_link_hash_entry *h)
-{
- struct lang_definedness_hash_entry *defentry
- = (struct lang_definedness_hash_entry *)
- bfd_hash_lookup (&lang_definedness_table, name, FALSE, FALSE);
-
- /* We don't keep track of symbols not tested with DEFINED. */
- if (defentry == NULL)
- return;
-
- /* If the symbol was already defined, and not from an earlier statement
- iteration, don't update the definedness iteration, because that'd
- make the symbol seem defined in the linker script at this point, and
- it wasn't; it was defined in some object. If we do anyway, DEFINED
- would start to yield false before this point and the construct "sym =
- DEFINED (sym) ? sym : X;" would change sym to X despite being defined
- in an object. */
- if (h->type != bfd_link_hash_undefined
- && h->type != bfd_link_hash_common
- && h->type != bfd_link_hash_new
- && defentry->iteration == -1)
- return;
-
- defentry->iteration = lang_statement_iteration;
-}
-
-/* Add the supplied name to the symbol table as an undefined reference.
- This is a two step process as the symbol table doesn't even exist at
- the time the ld command line is processed. First we put the name
- on a list, then, once the output file has been opened, transfer the
- name to the symbol table. */
-
-typedef struct bfd_sym_chain ldlang_undef_chain_list_type;
-
-#define ldlang_undef_chain_list_head entry_symbol.next
-
-void
-ldlang_add_undef (const char *const name)
-{
- ldlang_undef_chain_list_type *new =
- stat_alloc (sizeof (ldlang_undef_chain_list_type));
-
- new->next = ldlang_undef_chain_list_head;
- ldlang_undef_chain_list_head = new;
-
- new->name = xstrdup (name);
-
- if (output_bfd != NULL)
- insert_undefined (new->name);
-}
-
-/* Insert NAME as undefined in the symbol table. */
-
-static void
-insert_undefined (const char *name)
-{
- struct bfd_link_hash_entry *h;
-
- h = bfd_link_hash_lookup (link_info.hash, name, TRUE, FALSE, TRUE);
- if (h == 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);
- }
-}
-
-/* Run through the list of undefineds created above and place them
- into the linker hash table as undefined symbols belonging to the
- script file. */
-
-static void
-lang_place_undefineds (void)
-{
- ldlang_undef_chain_list_type *ptr;
-
- for (ptr = ldlang_undef_chain_list_head; ptr != NULL; ptr = ptr->next)
- insert_undefined (ptr->name);
-}
-
-/* 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)
-{
- for (; s != NULL; s = s->header.next)
- {
- switch (s->header.type)
- {
- case lang_wild_statement_enum:
- wild (&s->wild_statement, target, output_section_statement);
- break;
- case lang_constructors_statement_enum:
- map_input_to_output_sections (constructor_list.head,
- target,
- output_section_statement);
- break;
- case lang_output_section_statement_enum:
- map_input_to_output_sections (s->output_section_statement.children.head,
- target,
- &s->output_section_statement);
- break;
- case lang_output_statement_enum:
- break;
- case lang_target_statement_enum:
- target = s->target_statement.target;
- break;
- case lang_group_statement_enum:
- map_input_to_output_sections (s->group_statement.children.head,
- target,
- output_section_statement);
- 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:
- case lang_input_section_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);
- break;
- case lang_assignment_statement_enum:
- if (output_section_statement != NULL
- && output_section_statement->bfd_section == NULL)
- init_os (output_section_statement);
-
- /* Make sure that any sections mentioned in the assignment
- are initialized. */
- exp_init_os (s->assignment_statement.exp);
- break;
- case lang_afile_asection_pair_statement_enum:
- 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);
-
- if (os->bfd_section == NULL)
- init_os (os);
- os->addr_tree = s->address_statement.address;
- }
- break;
- }
- }
-}
-
-/* An output section might have been removed after its statement was
- added. For example, ldemul_before_allocation can remove dynamic
- sections if they turn out to be not needed. Clean them up here. */
-
-static void
-strip_excluded_output_sections (void)
-{
- lang_statement_union_type *u;
-
- for (u = lang_output_section_statement.head;
- u != NULL;
- u = u->output_section_statement.next)
- {
- lang_output_section_statement_type *os;
- asection *s;
-
- os = &u->output_section_statement;
- s = os->bfd_section;
- if (s != NULL && (s->flags & SEC_EXCLUDE) != 0)
- {
- asection **p;
-
- os->bfd_section = NULL;
-
- for (p = &output_bfd->sections; *p; p = &(*p)->next)
- if (*p == s)
- {
- bfd_section_list_remove (output_bfd, p);
- output_bfd->section_count--;
- break;
- }
- }
- }
-}
-
-static void
-print_output_section_statement
- (lang_output_section_statement_type *output_section_statement)
-{
- asection *section = output_section_statement->bfd_section;
- int len;
-
- if (output_section_statement != abs_output_section)
- {
- minfo ("\n%s", output_section_statement->name);
-
- if (section != NULL)
- {
- print_dot = section->vma;
-
- len = strlen (output_section_statement->name);
- if (len >= SECTION_NAME_MAP_LENGTH - 1)
- {
- print_nl ();
- len = 0;
- }
- while (len < SECTION_NAME_MAP_LENGTH)
- {
- print_space ();
- ++len;
- }
-
- minfo ("0x%V %W", section->vma, section->_raw_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);
- }
- }
-
- print_nl ();
- }
-
- print_statement_list (output_section_statement->children.head,
- output_section_statement);
-}
-
-static void
-print_assignment (lang_assignment_statement_type *assignment,
- lang_output_section_statement_type *output_section)
-{
- int i;
- etree_value_type result;
-
- 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)
- {
- const char *dst;
- bfd_vma value;
-
- value = result.value + result.section->bfd_section->vma;
- dst = assignment->exp->assign.dst;
-
- minfo ("0x%V", value);
- if (dst[0] == '.' && dst[1] == 0)
- print_dot = value;
- }
- else
- {
- minfo ("*undef* ");
-#ifdef BFD64
- minfo (" ");
-#endif
- }
-
- minfo (" ");
-
- exp_print_tree (assignment->exp);
-
- print_nl ();
-}
-
-static void
-print_input_statement (lang_input_statement_type *statm)
-{
- if (statm->filename != NULL)
- {
- fprintf (config.map_file, "LOAD %s\n", statm->filename);
- }
-}
-
-/* Print all symbols defined in a particular section. This is called
- via bfd_link_hash_traverse. */
-
-static bfd_boolean
-print_one_symbol (struct bfd_link_hash_entry *hash_entry, void *ptr)
-{
- asection *sec = ptr;
-
- if ((hash_entry->type == bfd_link_hash_defined
- || hash_entry->type == bfd_link_hash_defweak)
- && sec == hash_entry->u.def.section)
- {
- int i;
-
- for (i = 0; i < SECTION_NAME_MAP_LENGTH; i++)
- print_space ();
- minfo ("0x%V ",
- (hash_entry->u.def.value
- + hash_entry->u.def.section->output_offset
- + hash_entry->u.def.section->output_section->vma));
-
- minfo (" %T\n", hash_entry->root.string);
- }
-
- return TRUE;
-}
-
-/* Print information about an input section to the map file. */
-
-static void
-print_input_section (lang_input_section_type *in)
-{
- asection *i = in->section;
- bfd_size_type size = i->_cooked_size != 0 ? i->_cooked_size : i->_raw_size;
-
- init_opb ();
- if (size != 0)
- {
- 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;
- }
-
- minfo ("0x%V %W %B\n",
- i->output_section->vma + i->output_offset, TO_ADDR (size),
- i->owner);
-
- if (i->_cooked_size != 0 && i->_cooked_size != i->_raw_size)
- {
- len = SECTION_NAME_MAP_LENGTH + 3;
-#ifdef BFD64
- len += 16;
-#else
- len += 8;
-#endif
- while (len > 0)
- {
- print_space ();
- --len;
- }
-
- minfo (_("%W (size before relaxing)\n"), i->_raw_size);
- }
-
- bfd_link_hash_traverse (link_info.hash, print_one_symbol, i);
-
- print_dot = (i->output_section->vma + i->output_offset
- + TO_ADDR (size));
- }
- }
-}
-
-static void
-print_fill_statement (lang_fill_statement_type *fill)
-{
- size_t size;
- unsigned char *p;
- fputs (" FILL mask 0x", config.map_file);
- for (p = fill->fill->data, size = fill->fill->size; size != 0; p++, size--)
- fprintf (config.map_file, "%02x", *p);
- fputs ("\n", config.map_file);
-}
-
-static void
-print_data_statement (lang_data_statement_type *data)
-{
- int i;
- bfd_vma addr;
- bfd_size_type size;
- const char *name;
-
- init_opb ();
- for (i = 0; i < SECTION_NAME_MAP_LENGTH; i++)
- print_space ();
-
- addr = data->output_vma;
- if (data->output_section != NULL)
- addr += data->output_section->vma;
-
- switch (data->type)
- {
- default:
- abort ();
- case BYTE:
- size = BYTE_SIZE;
- name = "BYTE";
- break;
- case SHORT:
- size = SHORT_SIZE;
- name = "SHORT";
- break;
- case LONG:
- size = LONG_SIZE;
- name = "LONG";
- break;
- case QUAD:
- size = QUAD_SIZE;
- name = "QUAD";
- break;
- case SQUAD:
- size = QUAD_SIZE;
- name = "SQUAD";
- break;
- }
-
- minfo ("0x%V %W %s 0x%v", addr, size, name, data->value);
-
- if (data->exp->type.node_class != etree_value)
- {
- print_space ();
- exp_print_tree (data->exp);
- }
-
- print_nl ();
-
- print_dot = addr + TO_ADDR (size);
-}
-
-/* Print an address statement. These are generated by options like
- -Ttext. */
-
-static void
-print_address_statement (lang_address_statement_type *address)
-{
- minfo (_("Address of section %s set to "), address->section_name);
- exp_print_tree (address->address);
- print_nl ();
-}
-
-/* Print a reloc statement. */
-
-static void
-print_reloc_statement (lang_reloc_statement_type *reloc)
-{
- int i;
- bfd_vma addr;
- bfd_size_type size;
-
- init_opb ();
- for (i = 0; i < SECTION_NAME_MAP_LENGTH; i++)
- print_space ();
-
- addr = reloc->output_vma;
- if (reloc->output_section != NULL)
- addr += reloc->output_section->vma;
-
- size = bfd_get_reloc_size (reloc->howto);
-
- minfo ("0x%V %W RELOC %s ", addr, size, reloc->howto->name);
-
- if (reloc->name != NULL)
- minfo ("%s+", reloc->name);
- else
- minfo ("%s+", reloc->section->name);
-
- exp_print_tree (reloc->addend_exp);
-
- print_nl ();
-
- print_dot = addr + TO_ADDR (size);
-}
-
-static void
-print_padding_statement (lang_padding_statement_type *s)
-{
- int len;
- bfd_vma addr;
-
- init_opb ();
- minfo (" *fill*");
-
- len = sizeof " *fill*" - 1;
- while (len < SECTION_NAME_MAP_LENGTH)
- {
- print_space ();
- ++len;
- }
-
- addr = s->output_offset;
- if (s->output_section != NULL)
- addr += s->output_section->vma;
- minfo ("0x%V %W ", addr, s->size);
-
- if (s->fill->size != 0)
- {
- size_t size;
- unsigned char *p;
- for (p = s->fill->data, size = s->fill->size; size != 0; p++, size--)
- fprintf (config.map_file, "%02x", *p);
- }
-
- print_nl ();
-
- print_dot = addr + TO_ADDR (s->size);
-}
-
-static void
-print_wild_statement (lang_wild_statement_type *w,
- lang_output_section_statement_type *os)
-{
- struct wildcard_list *sec;
-
- print_space ();
-
- if (w->filenames_sorted)
- minfo ("SORT(");
- if (w->filename != NULL)
- minfo ("%s", w->filename);
- else
- minfo ("*");
- if (w->filenames_sorted)
- minfo (")");
-
- minfo ("(");
- for (sec = w->section_list; sec; sec = sec->next)
- {
- if (sec->spec.sorted)
- minfo ("SORT(");
- if (sec->spec.exclude_name_list != NULL)
- {
- name_list *tmp;
- minfo ("EXCLUDE_FILE(%s", sec->spec.exclude_name_list->name);
- for (tmp = sec->spec.exclude_name_list->next; tmp; tmp = tmp->next)
- minfo (" %s", tmp->name);
- minfo (") ");
- }
- if (sec->spec.name != NULL)
- minfo ("%s", sec->spec.name);
- else
- minfo ("*");
- if (sec->spec.sorted)
- minfo (")");
- if (sec->next)
- minfo (" ");
- }
- minfo (")");
-
- print_nl ();
-
- print_statement_list (w->children.head, os);
-}
-
-/* Print a group statement. */
-
-static void
-print_group (lang_group_statement_type *s,
- lang_output_section_statement_type *os)
-{
- fprintf (config.map_file, "START GROUP\n");
- print_statement_list (s->children.head, os);
- fprintf (config.map_file, "END GROUP\n");
-}
-
-/* Print the list of statements in S.
- This can be called for any statement type. */
-
-static void
-print_statement_list (lang_statement_union_type *s,
- lang_output_section_statement_type *os)
-{
- while (s != NULL)
- {
- print_statement (s, os);
- s = s->header.next;
- }
-}
-
-/* Print the first statement in statement list S.
- This can be called for any statement type. */
-
-static void
-print_statement (lang_statement_union_type *s,
- lang_output_section_statement_type *os)
-{
- switch (s->header.type)
- {
- default:
- fprintf (config.map_file, _("Fail with %d\n"), s->header.type);
- FAIL ();
- break;
- case lang_constructors_statement_enum:
- if (constructor_list.head != NULL)
- {
- if (constructors_sorted)
- minfo (" SORT (CONSTRUCTORS)\n");
- else
- minfo (" CONSTRUCTORS\n");
- print_statement_list (constructor_list.head, os);
- }
- break;
- case lang_wild_statement_enum:
- print_wild_statement (&s->wild_statement, os);
- break;
- case lang_address_statement_enum:
- print_address_statement (&s->address_statement);
- break;
- case lang_object_symbols_statement_enum:
- minfo (" CREATE_OBJECT_SYMBOLS\n");
- break;
- case lang_fill_statement_enum:
- print_fill_statement (&s->fill_statement);
- break;
- case lang_data_statement_enum:
- print_data_statement (&s->data_statement);
- break;
- case lang_reloc_statement_enum:
- print_reloc_statement (&s->reloc_statement);
- break;
- case lang_input_section_enum:
- print_input_section (&s->input_section);
- break;
- case lang_padding_statement_enum:
- print_padding_statement (&s->padding_statement);
- break;
- case lang_output_section_statement_enum:
- print_output_section_statement (&s->output_section_statement);
- break;
- case lang_assignment_statement_enum:
- print_assignment (&s->assignment_statement, os);
- break;
- case lang_target_statement_enum:
- fprintf (config.map_file, "TARGET(%s)\n", s->target_statement.target);
- break;
- case lang_output_statement_enum:
- minfo ("OUTPUT(%s", s->output_statement.name);
- if (output_target != NULL)
- minfo (" %s", output_target);
- minfo (")\n");
- break;
- case lang_input_statement_enum:
- print_input_statement (&s->input_statement);
- break;
- case lang_group_statement_enum:
- print_group (&s->group_statement, os);
- break;
- case lang_afile_asection_pair_statement_enum:
- FAIL ();
- break;
- }
-}
-
-static void
-print_statements (void)
-{
- print_statement_list (statement_list.head, abs_output_section);
-}
-
-/* Print the first N statements in statement list S to STDERR.
- If N == 0, nothing is printed.
- If N < 0, the entire list is printed.
- Intended to be called from GDB. */
-
-void
-dprint_statement (lang_statement_union_type *s, int n)
-{
- FILE *map_save = config.map_file;
-
- config.map_file = stderr;
-
- if (n < 0)
- print_statement_list (s, abs_output_section);
- else
- {
- while (s && --n >= 0)
- {
- print_statement (s, abs_output_section);
- s = s->header.next;
- }
- }
-
- config.map_file = map_save;
-}
-
-static void
-insert_pad (lang_statement_union_type **ptr,
- fill_type *fill,
- unsigned int alignment_needed,
- asection *output_section,
- bfd_vma dot)
-{
- static fill_type zero_fill = { 1, { 0 } };
- lang_statement_union_type *pad;
-
- pad = ((lang_statement_union_type *)
- ((char *) ptr - offsetof (lang_statement_union_type, header.next)));
- if (ptr != &statement_list.head
- && 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. */
- }
- else
- {
- /* Make a new padding statement, linked into existing chain. */
- pad = stat_alloc (sizeof (lang_padding_statement_type));
- pad->header.next = *ptr;
- *ptr = pad;
- pad->header.type = lang_padding_statement_enum;
- pad->padding_statement.output_section = output_section;
- if (fill == NULL)
- fill = &zero_fill;
- pad->padding_statement.fill = fill;
- }
- pad->padding_statement.output_offset = dot - output_section->vma;
- pad->padding_statement.size = alignment_needed;
- output_section->_raw_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)
-{
- lang_input_section_type *is = &((*this_ptr)->input_section);
- asection *i = is->section;
-
- if (!is->ifile->just_syms_flag)
- {
- unsigned int alignment_needed;
- asection *o;
-
- /* Align this section first to the input sections requirement,
- then to the output section's requirement. If this alignment
- is greater than any seen before, then record it too. Perform
- the alignment by inserting a magic 'padding' statement. */
-
- if (output_section_statement->subsection_alignment != -1)
- i->alignment_power = output_section_statement->subsection_alignment;
-
- o = output_section_statement->bfd_section;
- if (o->alignment_power < i->alignment_power)
- o->alignment_power = i->alignment_power;
-
- alignment_needed = align_power (dot, i->alignment_power) - dot;
-
- if (alignment_needed != 0)
- {
- insert_pad (this_ptr, fill, TO_SIZE (alignment_needed), o, dot);
- dot += alignment_needed;
- }
-
- /* Remember where in the output section this input section goes. */
-
- 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);
- }
- else
- {
- i->output_offset = i->vma - output_section_statement->bfd_section->vma;
- }
-
- 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)
-
-/* 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. */
-
-static void
-lang_check_section_addresses (void)
-{
- asection *s;
-
- /* Scan all sections in the output list. */
- 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))
- 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;
-
- /* Look for an overlap. */
- if ((s_end < os_start) || (s_start > os_end))
- continue;
-
- 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);
-
- /* Once we have found one overlap for this section,
- stop looking for others. */
- break;
- }
- }
-}
-
-/* Make sure the new address is within the region. We explicitly permit the
- current address to be at the exact end of the region when the address is
- non-zero, in case the region is at the end of addressable memory and the
- calculation wraps around. */
-
-static void
-os_region_check (lang_output_section_statement_type *os,
- lang_memory_region_type *region,
- etree_type *tree,
- bfd_vma base)
-{
- if ((region->current < region->origin
- || (region->current - region->origin > region->length))
- && ((region->current != region->origin + region->length)
- || base == 0))
- {
- if (tree != NULL)
- {
- 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,
- region->name);
- }
- else
- {
- einfo (_("%X%P: region %s is full (%B section %s)\n"),
- region->name,
- os->bfd_section->owner,
- os->bfd_section->name);
- }
- /* Reset the region pointer. */
- region->current = region->origin;
- }
-}
-
-/* Set the sizes for all the output sections. */
-
-static bfd_vma
-lang_size_sections_1
- (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)
-{
- /* Size up the sections from their constituent parts. */
- for (; s != NULL; s = s->header.next)
- {
- switch (s->header.type)
- {
- case lang_output_section_statement_enum:
- {
- bfd_vma after;
- lang_output_section_statement_type *os;
-
- os = &s->output_section_statement;
- if (os->bfd_section == NULL)
- /* This section was 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)
- {
- 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);
-
- 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;
- break;
- }
-
- if (bfd_is_abs_section (os->bfd_section))
- {
- /* No matter what happens, an abs section starts at zero. */
- ASSERT (os->bfd_section->vma == 0);
- }
- else
- {
- 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->region->name[0] == '*'
- && strcmp (os->region->name, DEFAULT_MEMORY_REGION) == 0))
- {
- os->region = lang_memory_default (os->bfd_section);
- }
-
- /* If a loadable section is using the default memory
- region, and some non default memory regions were
- defined, issue an error message. */
- if (!IGNORE_SECTION (output_bfd, os->bfd_section)
- && ! link_info.relocatable
- && check_regions
- && 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))
- {
- /* 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
- 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"),
- bfd_get_section_name (output_bfd,
- os->bfd_section));
- else
- 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));
- }
- }
- 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);
-
- dot = r.value + r.section->bfd_section->vma;
- }
-
- /* 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);
-
- os->bfd_section->output_offset = 0;
- }
-
- lang_size_sections_1 (os->children.head, os, &os->children.head,
- os->fill, dot, 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);
-
- if (bfd_is_abs_section (os->bfd_section))
- ASSERT (after == os->bfd_section->vma);
- else
- os->bfd_section->_raw_size
- = TO_SIZE (after - os->bfd_section->vma);
-
- 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;
-
- if (os->update_dot_tree != 0)
- exp_fold_tree (os->update_dot_tree, abs_output_section,
- lang_allocating_phase_enum, dot, &dot);
-
- /* Update dot in the region ?
- We only do this if the section is going to be allocated,
- since unallocated sections do not contribute to the region's
- overall size in memory.
-
- If the SEC_NEVER_LOAD bit is not set, it will affect the
- 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->region->current = dot;
-
- if (check_regions)
- /* Make sure the new address is within the region. */
- 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);
- if (check_regions)
- os_region_check (os, os->lma_region, NULL,
- os->bfd_section->lma);
- }
- }
- }
- break;
-
- case lang_constructors_statement_enum:
- dot = lang_size_sections_1 (constructor_list.head,
- output_section_statement,
- &s->wild_statement.children.head,
- fill, dot, relax, check_regions);
- break;
-
- case lang_data_statement_enum:
- {
- unsigned int size = 0;
-
- s->data_statement.output_vma =
- 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);
-
- switch (s->data_statement.type)
- {
- default:
- abort ();
- case QUAD:
- case SQUAD:
- size = QUAD_SIZE;
- break;
- case LONG:
- size = LONG_SIZE;
- break;
- case SHORT:
- size = SHORT_SIZE;
- break;
- case BYTE:
- size = BYTE_SIZE;
- break;
- }
- 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;
- }
- }
- break;
-
- case lang_reloc_statement_enum:
- {
- int size;
-
- s->reloc_statement.output_vma =
- 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;
- }
- 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
- {
- bfd_boolean again;
-
- if (! bfd_relax_section (i->owner, i, &link_info, &again))
- einfo (_("%P%F: can't relax section: %E\n"));
- if (again)
- *relax = TRUE;
- }
- dot = size_input_section (prev, output_section_statement,
- 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;
-
- exp_fold_tree (s->assignment_statement.exp,
- output_section_statement,
- lang_allocating_phase_enum,
- dot,
- &newdot);
-
- if (newdot != dot)
- {
- 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;
- }
- else
- {
- /* Insert a pad after this statement. We can't
- put the pad before when relaxing, in case the
- assignment references dot. */
- insert_pad (&s->header.next, fill, TO_SIZE (newdot - dot),
- output_section_statement->bfd_section, dot);
-
- /* 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;
-
- dot = newdot;
- }
- }
- break;
-
- case lang_padding_statement_enum:
- /* If this is the first time lang_size_sections is called,
- we won't have any padding statements. If this is the
- second or later passes when relaxing, we should allow
- padding to shrink. If padding is needed on this pass, it
- will be added back in. */
- s->padding_statement.size = 0;
-
- /* Make sure output_offset is valid. If relaxation shrinks
- the section and this pad isn't needed, it's possible to
- have output_offset larger than the final size of the
- section. bfd_set_section_contents will complain even for
- a pad size of zero. */
- s->padding_statement.output_offset
- = dot - output_section_statement->bfd_section->vma;
- break;
-
- case lang_group_statement_enum:
- dot = lang_size_sections_1 (s->group_statement.children.head,
- output_section_statement,
- &s->group_statement.children.head,
- fill, dot, relax, check_regions);
- break;
-
- default:
- FAIL ();
- break;
-
- /* We can only get here when relaxing is turned on. */
- case lang_address_statement_enum:
- break;
- }
- prev = &s->header.next;
- }
- 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;
-
- /* Callers of exp_fold_tree need to increment this. */
- lang_statement_iteration++;
-
- 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)
- {
- /* 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);
- 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)
- {
- 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);
- }
- }
-
- /* 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;
-}
-
-/* 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)
-{
- for (; s != NULL; s = s->header.next)
- {
- switch (s->header.type)
- {
- case lang_constructors_statement_enum:
- dot = lang_do_assignments_1 (constructor_list.head,
- output_section_statement,
- fill,
- dot);
- break;
-
- case lang_output_section_statement_enum:
- {
- lang_output_section_statement_type *os;
-
- os = &(s->output_section_statement);
- if (os->bfd_section != NULL)
- {
- 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);
- }
- }
- }
- break;
- case lang_wild_statement_enum:
-
- dot = lang_do_assignments_1 (s->wild_statement.children.head,
- output_section_statement,
- 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;
- }
- {
- unsigned int size;
- switch (s->data_statement.type)
- {
- default:
- abort ();
- case QUAD:
- case SQUAD:
- size = QUAD_SIZE;
- break;
- case LONG:
- size = LONG_SIZE;
- break;
- case SHORT:
- size = SHORT_SIZE;
- break;
- case BYTE:
- size = BYTE_SIZE;
- break;
- }
- if (size < TO_SIZE ((unsigned) 1))
- size = TO_SIZE ((unsigned) 1);
- dot += TO_ADDR (size);
- }
- 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"));
- }
- dot += TO_ADDR (bfd_get_reloc_size (s->reloc_statement.howto));
- break;
-
- case lang_input_section_enum:
- {
- asection *in = s->input_section.section;
-
- if (in->_cooked_size != 0)
- dot += TO_ADDR (in->_cooked_size);
- else
- dot += TO_ADDR (in->_raw_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);
- }
-
- 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);
-
- 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)
-{
- /* Callers of exp_fold_tree need to increment this. */
- lang_statement_iteration++;
- lang_do_assignments_1 (s, output_section_statement, fill, dot);
-}
-
-/* Fix any .startof. or .sizeof. symbols. When the assemblers see the
- operator .startof. (section_name), it produces an undefined symbol
- .startof.section_name. Similarly, when it sees
- .sizeof. (section_name), it produces an undefined symbol
- .sizeof.section_name. For all the output sections, we look for
- such symbols, and set them to the correct value. */
-
-static void
-lang_set_startof (void)
-{
- asection *s;
-
- if (link_info.relocatable)
- return;
-
- for (s = output_bfd->sections; s != NULL; s = s->next)
- {
- const char *secname;
- char *buf;
- struct bfd_link_hash_entry *h;
-
- secname = bfd_get_section_name (output_bfd, s);
- buf = xmalloc (10 + strlen (secname));
-
- sprintf (buf, ".startof.%s", secname);
- h = bfd_link_hash_lookup (link_info.hash, buf, FALSE, FALSE, TRUE);
- if (h != NULL && h->type == bfd_link_hash_undefined)
- {
- h->type = bfd_link_hash_defined;
- h->u.def.value = bfd_get_section_vma (output_bfd, s);
- h->u.def.section = bfd_abs_section_ptr;
- }
-
- sprintf (buf, ".sizeof.%s", secname);
- h = bfd_link_hash_lookup (link_info.hash, buf, FALSE, FALSE, TRUE);
- 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.section = bfd_abs_section_ptr;
- }
-
- free (buf);
- }
-}
-
-static void
-lang_finish (void)
-{
- struct bfd_link_hash_entry *h;
- bfd_boolean warn;
-
- if (link_info.relocatable || link_info.shared)
- warn = FALSE;
- else
- warn = TRUE;
-
- 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";
- warn = FALSE;
- }
-
- h = bfd_link_hash_lookup (link_info.hash, entry_symbol.name,
- FALSE, FALSE, TRUE);
- if (h != NULL
- && (h->type == bfd_link_hash_defined
- || h->type == bfd_link_hash_defweak)
- && h->u.def.section->output_section != NULL)
- {
- bfd_vma val;
-
- val = (h->u.def.value
- + bfd_get_section_vma (output_bfd,
- h->u.def.section->output_section)
- + h->u.def.section->output_offset);
- if (! bfd_set_start_address (output_bfd, val))
- einfo (_("%P%F:%s: can't set start address\n"), entry_symbol.name);
- }
- else
- {
- bfd_vma val;
- const char *send;
-
- /* We couldn't find the entry symbol. Try parsing it as a
- number. */
- val = bfd_scan_vma (entry_symbol.name, &send, 0);
- if (*send == '\0')
- {
- if (! bfd_set_start_address (output_bfd, val))
- einfo (_("%P%F: can't set start address\n"));
- }
- else
- {
- asection *ts;
-
- /* Can't find the entry symbol, and it's not a number. Use
- the first address in the text section. */
- ts = bfd_get_section_by_name (output_bfd, entry_section);
- if (ts != NULL)
- {
- if (warn)
- 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,
- bfd_get_section_vma (output_bfd,
- ts)))
- einfo (_("%P%F: can't set start address\n"));
- }
- else
- {
- if (warn)
- einfo (_("%P: warning: cannot find entry symbol %s; not setting start address\n"),
- entry_symbol.name);
- }
- }
- }
-
- bfd_hash_table_free (&lang_definedness_table);
-}
-
-/* This is a small function used when we want to ignore errors from
- BFD. */
-
-static void
-ignore_bfd_errors (const char *s ATTRIBUTE_UNUSED, ...)
-{
- /* Don't do anything. */
-}
-
-/* Check that the architecture of all the input files is compatible
- with the output file. Also call the backend to let it do any
- other checking that is needed. */
-
-static void
-lang_check (void)
-{
- lang_statement_union_type *file;
- bfd *input_bfd;
- const bfd_arch_info_type *compatible;
-
- 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);
-
- /* In general it is not possible to perform a relocatable
- link between differing object formats when the input
- file has relocations, because the relocations in the
- input format may not have equivalent representations in
- the output format (and besides BFD does not translate
- relocs for other link purposes than a final link). */
- if ((link_info.relocatable || link_info.emitrelocations)
- && (compatible == NULL
- || 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"),
- bfd_get_target (input_bfd), input_bfd,
- bfd_get_target (output_bfd), output_bfd);
- /* einfo with %F exits. */
- }
-
- if (compatible == NULL)
- {
- if (command_line.warn_mismatch)
- einfo (_("%P: warning: %s architecture of input file `%B' is incompatible with %s output\n"),
- bfd_printable_name (input_bfd), input_bfd,
- bfd_printable_name (output_bfd));
- }
- else if (bfd_count_sections (input_bfd))
- {
- /* If the input bfd has no contents, it shouldn't set the
- private data of the output bfd. */
-
- bfd_error_handler_type pfn = NULL;
-
- /* If we aren't supposed to warn about mismatched input
- files, temporarily set the BFD error handler to a
- function which will do nothing. We still want to call
- bfd_merge_private_bfd_data, since it may set up
- information which is needed in the output file. */
- if (! command_line.warn_mismatch)
- pfn = bfd_set_error_handler (ignore_bfd_errors);
- if (! bfd_merge_private_bfd_data (input_bfd, output_bfd))
- {
- if (command_line.warn_mismatch)
- einfo (_("%P%X: failed to merge target specific data of file %B\n"),
- input_bfd);
- }
- if (! command_line.warn_mismatch)
- bfd_set_error_handler (pfn);
- }
- }
-}
-
-/* Look through all the global common symbols and attach them to the
- correct section. The -sort-common command line switch may be used
- to roughly sort the entries by size. */
-
-static void
-lang_common (void)
-{
- if (command_line.inhibit_common_definition)
- return;
- if (link_info.relocatable
- && ! command_line.force_common_definition)
- return;
-
- if (! config.sort_common)
- bfd_link_hash_traverse (link_info.hash, lang_one_common, NULL);
- else
- {
- int power;
-
- for (power = 4; power >= 0; power--)
- bfd_link_hash_traverse (link_info.hash, lang_one_common, &power);
- }
-}
-
-/* Place one common symbol in the correct section. */
-
-static bfd_boolean
-lang_one_common (struct bfd_link_hash_entry *h, void *info)
-{
- unsigned int power_of_two;
- bfd_vma size;
- asection *section;
-
- if (h->type != bfd_link_hash_common)
- return TRUE;
-
- size = h->u.c.size;
- power_of_two = h->u.c.p->alignment_power;
-
- if (config.sort_common
- && power_of_two < (unsigned int) *(int *) info)
- return TRUE;
-
- 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));
-
- /* Adjust the alignment if necessary. */
- if (power_of_two > section->alignment_power)
- section->alignment_power = power_of_two;
-
- /* 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;
-
- /* Increase the size of the section. */
- section->_cooked_size += size;
-
- /* Make sure the section is allocated in memory, and make sure that
- it is no longer a common section. */
- section->flags |= SEC_ALLOC;
- section->flags &= ~SEC_IS_COMMON;
-
- if (config.map_file != NULL)
- {
- static bfd_boolean header_printed;
- int len;
- char *name;
- char buf[50];
-
- if (! header_printed)
- {
- minfo (_("\nAllocating common symbols\n"));
- minfo (_("Common symbol size file\n\n"));
- header_printed = TRUE;
- }
-
- name = demangle (h->root.string);
- minfo ("%s", name);
- len = strlen (name);
- free (name);
-
- if (len >= 19)
- {
- print_nl ();
- len = 0;
- }
- while (len < 20)
- {
- print_space ();
- ++len;
- }
-
- minfo ("0x");
- if (size <= 0xffffffff)
- sprintf (buf, "%lx", (unsigned long) size);
- else
- sprintf_vma (buf, size);
- minfo ("%s", buf);
- len = strlen (buf);
-
- while (len < 16)
- {
- print_space ();
- ++len;
- }
-
- minfo ("%B\n", section->owner);
- }
-
- return TRUE;
-}
-
-/* Run through the input files and ensure that every input section has
- somewhere to go. If one is found without a destination then create
- an input request and place it into the statement tree. */
-
-static void
-lang_place_orphans (void)
-{
- LANG_FOR_EACH_INPUT_STATEMENT (file)
- {
- asection *s;
-
- for (s = file->the_bfd->sections; s != NULL; s = s->next)
- {
- if (s->output_section == NULL)
- {
- /* This section of the file is not attached, root
- around for a sensible place for it to go. */
-
- if (file->just_syms_flag)
- {
- abort ();
- }
- else if (strcmp (s->name, "COMMON") == 0)
- {
- /* This is a lonely common section which must have
- come from an archive. We attach to the section
- with the wildcard. */
- if (! link_info.relocatable
- || command_line.force_common_definition)
- {
- 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);
- }
- }
- else if (ldemul_place_orphan (file, s))
- ;
- else
- {
- lang_output_section_statement_type *os;
-
- os = lang_output_section_statement_lookup (s->name);
- lang_add_section (&os->children, s, os, file);
- }
- }
- }
- }
-}
-
-void
-lang_set_flags (lang_memory_region_type *ptr, const char *flags, int invert)
-{
- flagword *ptr_flags;
-
- ptr_flags = invert ? &ptr->not_flags : &ptr->flags;
- while (*flags)
- {
- switch (*flags)
- {
- case 'A': case 'a':
- *ptr_flags |= SEC_ALLOC;
- break;
-
- case 'R': case 'r':
- *ptr_flags |= SEC_READONLY;
- break;
-
- case 'W': case 'w':
- *ptr_flags |= SEC_DATA;
- break;
-
- case 'X': case 'x':
- *ptr_flags |= SEC_CODE;
- break;
-
- case 'L': case 'l':
- case 'I': case 'i':
- *ptr_flags |= SEC_LOAD;
- break;
-
- default:
- einfo (_("%P%F: invalid syntax in flags\n"));
- break;
- }
- flags++;
- }
-}
-
-/* Call a function on each input file. This function will be called
- on an archive, but not on the elements. */
-
-void
-lang_for_each_input_file (void (*func) (lang_input_statement_type *))
-{
- lang_input_statement_type *f;
-
- for (f = (lang_input_statement_type *) input_file_chain.head;
- f != NULL;
- f = (lang_input_statement_type *) f->next_real_file)
- func (f);
-}
-
-/* Call a function on each file. The function will be called on all
- the elements of an archive which are included in the link, but will
- not be called on the archive file itself. */
-
-void
-lang_for_each_file (void (*func) (lang_input_statement_type *))
-{
- LANG_FOR_EACH_INPUT_STATEMENT (f)
- {
- func (f);
- }
-}
-
-void
-ldlang_add_file (lang_input_statement_type *entry)
-{
- bfd **pp;
-
- lang_statement_append (&file_chain,
- (lang_statement_union_type *) entry,
- &entry->next);
-
- /* The BFD linker needs to have a list of all input BFDs involved in
- 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;
- entry->the_bfd->usrdata = entry;
- bfd_set_gp_size (entry->the_bfd, g_switch_value);
-
- /* Look through the sections and check for any which should not be
- included in the link. We need to do this now, so that we can
- notice when the backend linker tries to report multiple
- definition errors for symbols which are in sections we aren't
- going to link. FIXME: It might be better to entirely ignore
- symbols which are defined in sections which are going to be
- discarded. This would require modifying the backend linker for
- each backend which might set the SEC_LINK_ONCE flag. If we do
- this, we should probably handle SEC_EXCLUDE in the same way. */
-
- bfd_map_over_sections (entry->the_bfd, section_already_linked, entry);
-}
-
-void
-lang_add_output (const char *name, int from_script)
-{
- /* Make -o on command line override OUTPUT in script. */
- if (!had_output_filename || !from_script)
- {
- output_filename = name;
- had_output_filename = TRUE;
- }
-}
-
-static lang_output_section_statement_type *current_section;
-
-static int
-topower (int x)
-{
- unsigned int i = 1;
- int l;
-
- if (x < 0)
- return -1;
-
- for (l = 0; l < 32; l++)
- {
- if (i >= (unsigned int) x)
- return l;
- i <<= 1;
- }
-
- return 0;
-}
-
-lang_output_section_statement_type *
-lang_enter_output_section_statement (const char *output_section_statement_name,
- etree_type *address_exp,
- enum section_type sectype,
- etree_type *align,
- etree_type *subalign,
- etree_type *ebase)
-{
- lang_output_section_statement_type *os;
-
- current_section =
- os =
- lang_output_section_statement_lookup (output_section_statement_name);
-
- /* 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)
- {
- os->addr_tree = address_exp;
- }
- os->sectype = sectype;
- if (sectype != noload_section)
- os->flags = SEC_NO_FLAGS;
- else
- os->flags = SEC_NEVER_LOAD;
- os->block_value = 1;
- stat_ptr = &os->children;
-
- os->subsection_alignment =
- topower (exp_get_value_int (subalign, -1, "subsection alignment", 0));
- os->section_alignment =
- topower (exp_get_value_int (align, -1, "section alignment", 0));
-
- os->load_base = ebase;
- return os;
-}
-
-void
-lang_final (void)
-{
- lang_output_statement_type *new =
- new_stat (lang_output_statement, stat_ptr);
-
- new->name = output_filename;
-}
-
-/* Reset the current counters in the regions. */
-
-void
-lang_reset_memory_regions (void)
-{
- lang_memory_region_type *p = lang_memory_region_list;
- asection *o;
-
- 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;
- }
-
- for (o = output_bfd->sections; o != NULL; o = o->next)
- o->_raw_size = 0;
-}
-
-/* If the wild pattern was marked KEEP, the member sections
- should be as well. */
-
-static void
-gc_section_callback (lang_wild_statement_type *ptr,
- struct wildcard_list *sec ATTRIBUTE_UNUSED,
- asection *section,
- lang_input_statement_type *file ATTRIBUTE_UNUSED,
- void *data ATTRIBUTE_UNUSED)
-{
- 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
-lang_gc_sections_1 (lang_statement_union_type *s)
-{
- for (; s != NULL; s = s->header.next)
- {
- switch (s->header.type)
- {
- case lang_wild_statement_enum:
- lang_gc_wild (&s->wild_statement);
- break;
- case lang_constructors_statement_enum:
- lang_gc_sections_1 (constructor_list.head);
- break;
- case lang_output_section_statement_enum:
- lang_gc_sections_1 (s->output_section_statement.children.head);
- break;
- case lang_group_statement_enum:
- lang_gc_sections_1 (s->group_statement.children.head);
- break;
- default:
- break;
- }
- }
-}
-
-static void
-lang_gc_sections (void)
-{
- struct bfd_link_hash_entry *h;
- ldlang_undef_chain_list_type *ulist;
-
- /* Keep all sections so marked in the link script. */
-
- lang_gc_sections_1 (statement_list.head);
-
- /* Keep all sections containing symbols undefined on the command-line,
- and the section containing the entry symbol. */
-
- for (ulist = link_info.gc_sym_list; ulist; ulist = ulist->next)
- {
- h = bfd_link_hash_lookup (link_info.hash, ulist->name,
- FALSE, FALSE, FALSE);
-
- if (h != NULL
- && (h->type == bfd_link_hash_defined
- || h->type == bfd_link_hash_defweak)
- && ! bfd_is_abs_section (h->u.def.section))
- {
- h->u.def.section->flags |= SEC_KEEP;
- }
- }
-
- bfd_gc_sections (output_bfd, &link_info);
-}
-
-void
-lang_process (void)
-{
- lang_reasonable_defaults ();
- current_target = default_target;
-
- /* Open the output file. */
- lang_for_each_statement (ldlang_open_output);
- init_opb ();
-
- ldemul_create_output_section_statements ();
-
- /* Add to the hash table all undefineds on the command line. */
- lang_place_undefineds ();
-
- already_linked_table_init ();
-
- /* Create a bfd for each input file. */
- current_target = default_target;
- open_input_bfds (statement_list.head, FALSE);
-
- link_info.gc_sym_list = &entry_symbol;
- if (entry_symbol.name == NULL)
- link_info.gc_sym_list = ldlang_undef_chain_list_head;
-
- ldemul_after_open ();
-
- 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
- other processing, so that any operations merge_private_bfd_data
- does on the output file will be known during the rest of the
- link. */
- lang_check ();
-
- /* Handle .exports instead of a version script if we're told to do so. */
- if (command_line.version_exports_section)
- lang_do_version_exports_section ();
-
- /* Build all sets based on the information gathered from the input
- files. */
- 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);
-
- /* Size up the common data. */
- lang_common ();
-
- /* 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);
-
- /* Find any sections not attached explicitly and handle them. */
- lang_place_orphans ();
-
- if (! link_info.relocatable)
- {
- /* Look for a text section and set the readonly attribute in it. */
- asection *found = bfd_get_section_by_name (output_bfd, ".text");
-
- if (found != NULL)
- {
- if (config.text_read_only)
- found->flags |= SEC_READONLY;
- else
- found->flags &= ~SEC_READONLY;
- }
- }
-
- /* Do anything special before sizing sections. This is where ELF
- 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);
-
- /* 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 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);
-
- /* 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 (relax_again);
-
- /* Final extra sizing to report errors. */
- lang_do_assignments (statement_list.head, abs_output_section, NULL, 0);
- lang_reset_memory_regions ();
- lang_size_sections (statement_list.head, abs_output_section,
- &statement_list.head, 0, 0, NULL, TRUE);
- }
-
- /* See if anything special should be done now we know how big
- everything is. */
- ldemul_after_allocation ();
-
- /* Fix any .startof. or .sizeof. symbols. */
- lang_set_startof ();
-
- /* 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);
-
- /* 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 ();
-}
-
-/* EXPORTED TO YACC */
-
-void
-lang_add_wild (struct wildcard_spec *filespec,
- struct wildcard_list *section_list,
- bfd_boolean keep_sections)
-{
- struct wildcard_list *curr, *next;
- lang_wild_statement_type *new;
-
- /* Reverse the list as the parser puts it back to front. */
- for (curr = section_list, section_list = NULL;
- curr != NULL;
- section_list = curr, curr = next)
- {
- if (curr->spec.name != NULL && strcmp (curr->spec.name, "COMMON") == 0)
- placed_commons = TRUE;
-
- next = curr->next;
- curr->next = section_list;
- }
-
- if (filespec != NULL && filespec->name != NULL)
- {
- if (strcmp (filespec->name, "*") == 0)
- filespec->name = NULL;
- else if (! wildcardp (filespec->name))
- lang_has_input_file = TRUE;
- }
-
- new = new_stat (lang_wild_statement, stat_ptr);
- new->filename = NULL;
- new->filenames_sorted = FALSE;
- if (filespec != NULL)
- {
- new->filename = filespec->name;
- new->filenames_sorted = filespec->sorted;
- }
- new->section_list = section_list;
- new->keep_sections = keep_sections;
- lang_list_init (&new->children);
-}
-
-void
-lang_section_start (const char *name, etree_type *address)
-{
- lang_address_statement_type *ad;
-
- ad = new_stat (lang_address_statement, stat_ptr);
- ad->section_name = name;
- ad->address = address;
-}
-
-/* Set the start symbol to NAME. CMDLINE is nonzero if this is called
- because of a -e argument on the command line, or zero if this is
- called by ENTRY in a linker script. Command line arguments take
- precedence. */
-
-void
-lang_add_entry (const char *name, bfd_boolean cmdline)
-{
- if (entry_symbol.name == NULL
- || cmdline
- || ! entry_from_cmdline)
- {
- entry_symbol.name = name;
- entry_from_cmdline = cmdline;
- }
-}
-
-void
-lang_add_target (const char *name)
-{
- lang_target_statement_type *new = new_stat (lang_target_statement,
- stat_ptr);
-
- new->target = name;
-
-}
-
-void
-lang_add_map (const char *name)
-{
- while (*name)
- {
- switch (*name)
- {
- case 'F':
- map_option_f = TRUE;
- break;
- }
- name++;
- }
-}
-
-void
-lang_add_fill (fill_type *fill)
-{
- lang_fill_statement_type *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 = 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
- generate. HOWTO is the corresponding howto structure (we could
- look this up, but the caller has already done so). SECTION is the
- section to generate a reloc against, or NAME is the name of the
- symbol to generate a reloc against. Exactly one of SECTION and
- NAME must be NULL. ADDEND is an expression for the addend. */
-
-void
-lang_add_reloc (bfd_reloc_code_real_type reloc,
- reloc_howto_type *howto,
- asection *section,
- const char *name,
- union etree_union *addend)
-{
- lang_reloc_statement_type *p = new_stat (lang_reloc_statement, stat_ptr);
-
- p->reloc = reloc;
- p->howto = howto;
- p->section = section;
- p->name = name;
- p->addend_exp = addend;
-
- p->addend_value = 0;
- p->output_section = NULL;
- p->output_vma = 0;
-}
-
-lang_assignment_statement_type *
-lang_add_assignment (etree_type *exp)
-{
- lang_assignment_statement_type *new = new_stat (lang_assignment_statement,
- stat_ptr);
-
- new->exp = exp;
- return new;
-}
-
-void
-lang_add_attribute (enum statement_enum attribute)
-{
- new_statement (attribute, sizeof (lang_statement_union_type), stat_ptr);
-}
-
-void
-lang_startup (const char *name)
-{
- if (startup_file != NULL)
- {
- einfo (_("%P%Fmultiple STARTUP files\n"));
- }
- first_file->filename = name;
- first_file->local_sym_name = name;
- first_file->real = TRUE;
-
- startup_file = name;
-}
-
-void
-lang_float (bfd_boolean maybe)
-{
- lang_float_flag = maybe;
-}
-
-
-/* Work out the load- and run-time regions from a script statement, and
- store them in *LMA_REGION and *REGION respectively.
-
- MEMSPEC is the name of the run-time region, or the value of
- DEFAULT_MEMORY_REGION if the statement didn't specify one.
- LMA_MEMSPEC is the name of the load-time region, or null if the
- statement didn't specify one.HAVE_LMA_P is TRUE if the statement
- had an explicit load address.
-
- It is an error to specify both a load region and a load address. */
-
-static void
-lang_get_regions (lang_memory_region_type **region,
- lang_memory_region_type **lma_region,
- const char *memspec,
- const char *lma_memspec,
- bfd_boolean have_lma,
- bfd_boolean have_vma)
-{
- *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 (lma_memspec != NULL
- && ! have_vma
- && strcmp (memspec, DEFAULT_MEMORY_REGION) == 0)
- *region = *lma_region;
- else
- *region = lang_memory_region_lookup (memspec, FALSE);
-
- if (have_lma && lma_memspec != 0)
- einfo (_("%X%P:%S: section has both a load address and a load region\n"));
-}
-
-void
-lang_leave_output_section_statement (fill_type *fill, const char *memspec,
- lang_output_section_phdr_list *phdrs,
- const char *lma_memspec)
-{
- lang_get_regions (&current_section->region,
- &current_section->lma_region,
- memspec, lma_memspec,
- current_section->load_base != NULL,
- current_section->addr_tree != NULL);
- current_section->fill = fill;
- current_section->phdrs = phdrs;
- stat_ptr = &statement_list;
-}
-
-/* Create an absolute symbol with the given name with the value of the
- address of first byte of the section named.
-
- If the symbol already exists, then do nothing. */
-
-void
-lang_abs_symbol_at_beginning_of (const char *secname, const char *name)
-{
- struct bfd_link_hash_entry *h;
-
- h = bfd_link_hash_lookup (link_info.hash, name, TRUE, TRUE, TRUE);
- if (h == NULL)
- einfo (_("%P%F: bfd_link_hash_lookup failed: %E\n"));
-
- if (h->type == bfd_link_hash_new
- || h->type == bfd_link_hash_undefined)
- {
- asection *sec;
-
- h->type = bfd_link_hash_defined;
-
- sec = bfd_get_section_by_name (output_bfd, secname);
- if (sec == NULL)
- h->u.def.value = 0;
- else
- h->u.def.value = bfd_get_section_vma (output_bfd, sec);
-
- h->u.def.section = bfd_abs_section_ptr;
- }
-}
-
-/* Create an absolute symbol with the given name with the value of the
- address of the first byte after the end of the section named.
-
- If the symbol already exists, then do nothing. */
-
-void
-lang_abs_symbol_at_end_of (const char *secname, const char *name)
-{
- struct bfd_link_hash_entry *h;
-
- h = bfd_link_hash_lookup (link_info.hash, name, TRUE, TRUE, TRUE);
- if (h == NULL)
- einfo (_("%P%F: bfd_link_hash_lookup failed: %E\n"));
-
- if (h->type == bfd_link_hash_new
- || h->type == bfd_link_hash_undefined)
- {
- asection *sec;
-
- h->type = bfd_link_hash_defined;
-
- sec = bfd_get_section_by_name (output_bfd, secname);
- if (sec == NULL)
- 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)));
-
- h->u.def.section = bfd_abs_section_ptr;
- }
-}
-
-void
-lang_statement_append (lang_statement_list_type *list,
- lang_statement_union_type *element,
- lang_statement_union_type **field)
-{
- *(list->tail) = element;
- list->tail = field;
-}
-
-/* Set the output format type. -oformat overrides scripts. */
-
-void
-lang_add_output_format (const char *format,
- const char *big,
- const char *little,
- int from_script)
-{
- if (output_target == NULL || !from_script)
- {
- if (command_line.endian == ENDIAN_BIG
- && big != NULL)
- format = big;
- else if (command_line.endian == ENDIAN_LITTLE
- && little != NULL)
- format = little;
-
- output_target = format;
- }
-}
-
-/* Enter a group. This creates a new lang_group_statement, and sets
- stat_ptr to build new statements within the group. */
-
-void
-lang_enter_group (void)
-{
- lang_group_statement_type *g;
-
- g = new_stat (lang_group_statement, stat_ptr);
- lang_list_init (&g->children);
- stat_ptr = &g->children;
-}
-
-/* Leave a group. This just resets stat_ptr to start writing to the
- regular list of statements again. Note that this will not work if
- groups can occur inside anything else which can adjust stat_ptr,
- but currently they can't. */
-
-void
-lang_leave_group (void)
-{
- stat_ptr = &statement_list;
-}
-
-/* Add a new program header. This is called for each entry in a PHDRS
- command in a linker script. */
-
-void
-lang_new_phdr (const char *name,
- etree_type *type,
- bfd_boolean filehdr,
- bfd_boolean phdrs,
- etree_type *at,
- etree_type *flags)
-{
- struct lang_phdr *n, **pp;
-
- 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->filehdr = filehdr;
- n->phdrs = phdrs;
- n->at = at;
- n->flags = flags;
-
- for (pp = &lang_phdr_list; *pp != NULL; pp = &(*pp)->next)
- ;
- *pp = n;
-}
-
-/* Record the program header information in the output BFD. FIXME: We
- should not be calling an ELF specific function here. */
-
-static void
-lang_record_phdrs (void)
-{
- unsigned int alc;
- asection **secs;
- lang_output_section_phdr_list *last;
- struct lang_phdr *l;
- lang_statement_union_type *u;
-
- alc = 10;
- secs = xmalloc (alc * sizeof (asection *));
- last = NULL;
- for (l = lang_phdr_list; l != NULL; l = l->next)
- {
- unsigned int c;
- flagword flags;
- bfd_vma at;
-
- c = 0;
- for (u = lang_output_section_statement.head;
- u != NULL;
- u = u->output_section_statement.next)
- {
- lang_output_section_statement_type *os;
- lang_output_section_phdr_list *pl;
-
- os = &u->output_section_statement;
-
- pl = os->phdrs;
- if (pl != NULL)
- last = pl;
- else
- {
- if (os->sectype == noload_section
- || os->bfd_section == NULL
- || (os->bfd_section->flags & SEC_ALLOC) == 0)
- continue;
- pl = last;
- }
-
- if (os->bfd_section == NULL)
- continue;
-
- for (; pl != NULL; pl = pl->next)
- {
- if (strcmp (pl->name, l->name) == 0)
- {
- if (c >= alc)
- {
- alc *= 2;
- secs = xrealloc (secs, alc * sizeof (asection *));
- }
- secs[c] = os->bfd_section;
- ++c;
- pl->used = TRUE;
- }
- }
- }
-
- if (l->flags == NULL)
- flags = 0;
- else
- flags = exp_get_vma (l->flags, 0, "phdr flags",
- lang_final_phase_enum);
-
- if (l->at == NULL)
- at = 0;
- else
- at = exp_get_vma (l->at, 0, "phdr load address",
- lang_final_phase_enum);
-
- if (! bfd_record_phdr (output_bfd, l->type,
- l->flags != NULL, flags, l->at != NULL,
- at, l->filehdr, l->phdrs, c, secs))
- einfo (_("%F%P: bfd_record_phdr failed: %E\n"));
- }
-
- free (secs);
-
- /* Make sure all the phdr assignments succeeded. */
- for (u = lang_output_section_statement.head;
- u != NULL;
- u = u->output_section_statement.next)
- {
- lang_output_section_phdr_list *pl;
-
- if (u->output_section_statement.bfd_section == NULL)
- continue;
-
- for (pl = u->output_section_statement.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);
- }
-}
-
-/* Record a list of sections which may not be cross referenced. */
-
-void
-lang_add_nocrossref (lang_nocrossref_type *l)
-{
- struct lang_nocrossrefs *n;
-
- n = xmalloc (sizeof *n);
- n->next = nocrossref_list;
- n->list = l;
- nocrossref_list = n;
-
- /* Set notice_all so that we get informed about all symbols. */
- link_info.notice_all = TRUE;
-}
-
-/* Overlay handling. We handle overlays with some static variables. */
-
-/* The overlay virtual address. */
-static etree_type *overlay_vma;
-/* And subsection alignment. */
-static etree_type *overlay_subalign;
-
-/* An expression for the maximum section size seen so far. */
-static etree_type *overlay_max;
-
-/* A list of all the sections in this overlay. */
-
-struct overlay_list {
- struct overlay_list *next;
- lang_output_section_statement_type *os;
-};
-
-static struct overlay_list *overlay_list;
-
-/* Start handling an overlay. */
-
-void
-lang_enter_overlay (etree_type *vma_expr, etree_type *subalign)
-{
- /* The grammar should prevent nested overlays from occurring. */
- ASSERT (overlay_vma == NULL
- && overlay_subalign == NULL
- && overlay_max == NULL);
-
- overlay_vma = vma_expr;
- overlay_subalign = subalign;
-}
-
-/* Start a section in an overlay. We handle this by calling
- lang_enter_output_section_statement with the correct VMA.
- lang_leave_overlay sets up the LMA and memory regions. */
-
-void
-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);
-
- /* If this is the first section, then base the VMA of future
- sections on this one. This will work correctly even if `.' is
- used in the addresses. */
- if (overlay_list == NULL)
- overlay_vma = exp_nameop (ADDR, name);
-
- /* Remember the section. */
- n = xmalloc (sizeof *n);
- n->os = current_section;
- n->next = overlay_list;
- overlay_list = n;
-
- size = exp_nameop (SIZEOF, name);
-
- /* Arrange to work out the maximum section end address. */
- if (overlay_max == NULL)
- overlay_max = size;
- else
- overlay_max = exp_binop (MAX_K, overlay_max, size);
-}
-
-/* Finish a section in an overlay. There isn't any special to do
- here. */
-
-void
-lang_leave_overlay_section (fill_type *fill,
- lang_output_section_phdr_list *phdrs)
-{
- const char *name;
- char *clean, *s2;
- const char *s1;
- char *buf;
-
- name = current_section->name;
-
- /* For now, assume that DEFAULT_MEMORY_REGION is the run-time memory
- region and that no load-time region has been specified. It doesn't
- really matter what we say here, since lang_leave_overlay will
- override it. */
- lang_leave_output_section_statement (fill, DEFAULT_MEMORY_REGION, phdrs, 0);
-
- /* Define the magic symbols. */
-
- clean = xmalloc (strlen (name) + 1);
- s2 = clean;
- for (s1 = name; *s1 != '\0'; s1++)
- if (ISALNUM (*s1) || *s1 == '_')
- *s2++ = *s1;
- *s2 = '\0';
-
- buf = xmalloc (strlen (clean) + sizeof "__load_start_");
- sprintf (buf, "__load_start_%s", clean);
- lang_add_assignment (exp_assop ('=', buf,
- exp_nameop (LOADADDR, name)));
-
- 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))));
-
- free (clean);
-}
-
-/* Finish an overlay. If there are any overlay wide settings, this
- looks through all the sections in the overlay and sets them. */
-
-void
-lang_leave_overlay (etree_type *lma_expr,
- int nocrossrefs,
- fill_type *fill,
- const char *memspec,
- lang_output_section_phdr_list *phdrs,
- const char *lma_memspec)
-{
- lang_memory_region_type *region;
- lang_memory_region_type *lma_region;
- struct overlay_list *l;
- lang_nocrossref_type *nocrossref;
-
- lang_get_regions (&region, &lma_region,
- memspec, lma_memspec,
- lma_expr != NULL, FALSE);
-
- nocrossref = NULL;
-
- /* After setting the size of the last section, set '.' to end of the
- overlay region. */
- if (overlay_list != NULL)
- overlay_list->os->update_dot_tree
- = exp_assop ('=', ".", exp_binop ('+', overlay_vma, overlay_max));
-
- l = overlay_list;
- while (l != NULL)
- {
- struct overlay_list *next;
-
- if (fill != NULL && l->os->fill == NULL)
- l->os->fill = fill;
-
- l->os->region = region;
- l->os->lma_region = lma_region;
-
- /* The first section has the load address specified in the
- OVERLAY statement. The rest are worked out from that.
- 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));
-
- if (phdrs != NULL && l->os->phdrs == NULL)
- l->os->phdrs = phdrs;
-
- if (nocrossrefs)
- {
- lang_nocrossref_type *nc;
-
- nc = xmalloc (sizeof *nc);
- nc->name = l->os->name;
- nc->next = nocrossref;
- nocrossref = nc;
- }
-
- next = l->next;
- free (l);
- l = next;
- }
-
- if (nocrossref != NULL)
- lang_add_nocrossref (nocrossref);
-
- overlay_vma = NULL;
- overlay_list = NULL;
- overlay_max = NULL;
-}
-
-/* Version handling. This is only useful for ELF. */
-
-/* This global variable holds the version tree that we build. */
-
-struct bfd_elf_version_tree *lang_elf_version_info;
-
-/* If PREV is NULL, return first version pattern matching particular symbol.
- If PREV is non-NULL, return first version pattern matching particular
- symbol after PREV (previously returned by lang_vers_match). */
-
-static struct bfd_elf_version_expr *
-lang_vers_match (struct bfd_elf_version_expr_head *head,
- struct bfd_elf_version_expr *prev,
- const char *sym)
-{
- const char *cxx_sym = sym;
- const char *java_sym = sym;
- struct bfd_elf_version_expr *expr = NULL;
-
- if (head->mask & BFD_ELF_VERSION_CXX_TYPE)
- {
- cxx_sym = cplus_demangle (sym, DMGL_PARAMS | DMGL_ANSI);
- if (!cxx_sym)
- cxx_sym = sym;
- }
- if (head->mask & BFD_ELF_VERSION_JAVA_TYPE)
- {
- java_sym = cplus_demangle (sym, DMGL_JAVA);
- if (!java_sym)
- java_sym = sym;
- }
-
- if (head->htab && (prev == NULL || prev->symbol))
- {
- struct bfd_elf_version_expr e;
-
- switch (prev ? prev->mask : 0)
- {
- case 0:
- if (head->mask & BFD_ELF_VERSION_C_TYPE)
- {
- e.symbol = sym;
- expr = htab_find (head->htab, &e);
- while (expr && strcmp (expr->symbol, sym) == 0)
- if (expr->mask == BFD_ELF_VERSION_C_TYPE)
- goto out_ret;
- else
- expr = expr->next;
- }
- /* Fallthrough */
- case BFD_ELF_VERSION_C_TYPE:
- if (head->mask & BFD_ELF_VERSION_CXX_TYPE)
- {
- e.symbol = cxx_sym;
- expr = htab_find (head->htab, &e);
- while (expr && strcmp (expr->symbol, cxx_sym) == 0)
- if (expr->mask == BFD_ELF_VERSION_CXX_TYPE)
- goto out_ret;
- else
- expr = expr->next;
- }
- /* Fallthrough */
- case BFD_ELF_VERSION_CXX_TYPE:
- if (head->mask & BFD_ELF_VERSION_JAVA_TYPE)
- {
- e.symbol = java_sym;
- expr = htab_find (head->htab, &e);
- while (expr && strcmp (expr->symbol, java_sym) == 0)
- if (expr->mask == BFD_ELF_VERSION_JAVA_TYPE)
- goto out_ret;
- else
- expr = expr->next;
- }
- /* Fallthrough */
- default:
- break;
- }
- }
-
- /* Finally, try the wildcards. */
- if (prev == NULL || prev->symbol)
- expr = head->remaining;
- else
- expr = prev->next;
- while (expr)
- {
- const char *s;
-
- if (expr->pattern[0] == '*' && expr->pattern[1] == '\0')
- break;
-
- if (expr->mask == BFD_ELF_VERSION_JAVA_TYPE)
- s = java_sym;
- else if (expr->mask == BFD_ELF_VERSION_CXX_TYPE)
- s = cxx_sym;
- else
- s = sym;
- if (fnmatch (expr->pattern, s, 0) == 0)
- break;
- expr = expr->next;
- }
-
-out_ret:
- if (cxx_sym != sym)
- free ((char *) cxx_sym);
- if (java_sym != sym)
- free ((char *) java_sym);
- return expr;
-}
-
-/* Return NULL if the PATTERN argument is a glob pattern, otherwise,
- return a string pointing to the symbol name. */
-
-static const char *
-realsymbol (const char *pattern)
-{
- const char *p;
- bfd_boolean changed = FALSE, backslash = FALSE;
- char *s, *symbol = xmalloc (strlen (pattern) + 1);
-
- for (p = pattern, s = symbol; *p != '\0'; ++p)
- {
- /* It is a glob pattern only if there is no preceding
- backslash. */
- if (! backslash && (*p == '?' || *p == '*' || *p == '['))
- {
- free (symbol);
- return NULL;
- }
-
- if (backslash)
- {
- /* Remove the preceding backslash. */
- *(s - 1) = *p;
- changed = TRUE;
- }
- else
- *s++ = *p;
-
- backslash = *p == '\\';
- }
-
- if (changed)
- {
- *s = '\0';
- return symbol;
- }
- else
- {
- free (symbol);
- return pattern;
- }
-}
-
-/* This is called for each variable name or match expression. */
-
-struct bfd_elf_version_expr *
-lang_new_vers_pattern (struct bfd_elf_version_expr *orig,
- const char *new,
- const char *lang)
-{
- struct bfd_elf_version_expr *ret;
-
- ret = xmalloc (sizeof *ret);
- ret->next = orig;
- ret->pattern = new;
- ret->symver = 0;
- ret->script = 0;
- ret->symbol = realsymbol (new);
-
- if (lang == NULL || strcasecmp (lang, "C") == 0)
- ret->mask = BFD_ELF_VERSION_C_TYPE;
- else if (strcasecmp (lang, "C++") == 0)
- ret->mask = BFD_ELF_VERSION_CXX_TYPE;
- else if (strcasecmp (lang, "Java") == 0)
- ret->mask = BFD_ELF_VERSION_JAVA_TYPE;
- else
- {
- einfo (_("%X%P: unknown language `%s' in version information\n"),
- lang);
- ret->mask = BFD_ELF_VERSION_C_TYPE;
- }
-
- return ldemul_new_vers_pattern (ret);
-}
-
-/* This is called for each set of variable names and match
- expressions. */
-
-struct bfd_elf_version_tree *
-lang_new_vers_node (struct bfd_elf_version_expr *globals,
- struct bfd_elf_version_expr *locals)
-{
- struct bfd_elf_version_tree *ret;
-
- ret = xcalloc (1, sizeof *ret);
- ret->globals.list = globals;
- ret->locals.list = locals;
- ret->match = lang_vers_match;
- ret->name_indx = (unsigned int) -1;
- return ret;
-}
-
-/* This static variable keeps track of version indices. */
-
-static int version_index;
-
-static hashval_t
-version_expr_head_hash (const void *p)
-{
- const struct bfd_elf_version_expr *e = p;
-
- return htab_hash_string (e->symbol);
-}
-
-static int
-version_expr_head_eq (const void *p1, const void *p2)
-{
- const struct bfd_elf_version_expr *e1 = p1;
- const struct bfd_elf_version_expr *e2 = p2;
-
- return strcmp (e1->symbol, e2->symbol) == 0;
-}
-
-static void
-lang_finalize_version_expr_head (struct bfd_elf_version_expr_head *head)
-{
- size_t count = 0;
- struct bfd_elf_version_expr *e, *next;
- struct bfd_elf_version_expr **list_loc, **remaining_loc;
-
- for (e = head->list; e; e = e->next)
- {
- if (e->symbol)
- count++;
- head->mask |= e->mask;
- }
-
- if (count)
- {
- head->htab = htab_create (count * 2, version_expr_head_hash,
- version_expr_head_eq, NULL);
- list_loc = &head->list;
- remaining_loc = &head->remaining;
- for (e = head->list; e; e = next)
- {
- next = e->next;
- if (!e->symbol)
- {
- *remaining_loc = e;
- remaining_loc = &e->next;
- }
- else
- {
- void **loc = htab_find_slot (head->htab, e, INSERT);
-
- if (*loc)
- {
- struct bfd_elf_version_expr *e1, *last;
-
- e1 = *loc;
- last = NULL;
- do
- {
- if (e1->mask == e->mask)
- {
- last = NULL;
- break;
- }
- last = e1;
- e1 = e1->next;
- }
- while (e1 && strcmp (e1->symbol, e->symbol) == 0);
-
- if (last == NULL)
- {
- /* This is a duplicate. */
- /* FIXME: Memory leak. Sometimes pattern is not
- xmalloced alone, but in larger chunk of memory. */
- /* free (e->symbol); */
- free (e);
- }
- else
- {
- e->next = last->next;
- last->next = e;
- }
- }
- else
- {
- *loc = e;
- *list_loc = e;
- list_loc = &e->next;
- }
- }
- }
- *remaining_loc = NULL;
- *list_loc = head->remaining;
- }
- else
- head->remaining = head->list;
-}
-
-/* This is called when we know the name and dependencies of the
- version. */
-
-void
-lang_register_vers_node (const char *name,
- struct bfd_elf_version_tree *version,
- struct bfd_elf_version_deps *deps)
-{
- struct bfd_elf_version_tree *t, **pp;
- struct bfd_elf_version_expr *e1;
-
- if (name == NULL)
- 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"));
- free (version);
- return;
- }
-
- /* Make sure this node has a unique name. */
- for (t = lang_elf_version_info; t != NULL; t = t->next)
- if (strcmp (t->name, name) == 0)
- einfo (_("%X%P: duplicate version tag `%s'\n"), name);
-
- lang_finalize_version_expr_head (&version->globals);
- lang_finalize_version_expr_head (&version->locals);
-
- /* Check the global and local match names, and make sure there
- aren't any duplicates. */
-
- for (e1 = version->globals.list; e1 != NULL; e1 = e1->next)
- {
- for (t = lang_elf_version_info; t != NULL; t = t->next)
- {
- struct bfd_elf_version_expr *e2;
-
- if (t->locals.htab && e1->symbol)
- {
- e2 = htab_find (t->locals.htab, e1);
- 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);
- 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);
- }
- }
-
- for (e1 = version->locals.list; e1 != NULL; e1 = e1->next)
- {
- for (t = lang_elf_version_info; t != NULL; t = t->next)
- {
- struct bfd_elf_version_expr *e2;
-
- if (t->globals.htab && e1->symbol)
- {
- e2 = htab_find (t->globals.htab, e1);
- 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);
- 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);
- }
- }
-
- version->deps = deps;
- version->name = name;
- if (name[0] != '\0')
- {
- ++version_index;
- version->vernum = version_index;
- }
- else
- version->vernum = 0;
-
- for (pp = &lang_elf_version_info; *pp != NULL; pp = &(*pp)->next)
- ;
- *pp = version;
-}
-
-/* This is called when we see a version dependency. */
-
-struct bfd_elf_version_deps *
-lang_add_vers_depend (struct bfd_elf_version_deps *list, const char *name)
-{
- struct bfd_elf_version_deps *ret;
- struct bfd_elf_version_tree *t;
-
- ret = xmalloc (sizeof *ret);
- ret->next = list;
-
- for (t = lang_elf_version_info; t != NULL; t = t->next)
- {
- if (strcmp (t->name, name) == 0)
- {
- ret->version_needed = t;
- return ret;
- }
- }
-
- einfo (_("%X%P: unable to find version dependency `%s'\n"), name);
-
- return ret;
-}
-
-static void
-lang_do_version_exports_section (void)
-{
- struct bfd_elf_version_expr *greg = NULL, *lreg;
-
- LANG_FOR_EACH_INPUT_STATEMENT (is)
- {
- asection *sec = bfd_get_section_by_name (is->the_bfd, ".exports");
- char *contents, *p;
- bfd_size_type len;
-
- if (sec == NULL)
- continue;
-
- len = bfd_section_size (is->the_bfd, sec);
- 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);
-
- p = contents;
- while (p < contents + len)
- {
- greg = lang_new_vers_pattern (greg, p, NULL);
- 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);
- }
-
- lreg = lang_new_vers_pattern (NULL, "*", NULL);
- lang_register_vers_node (command_line.version_exports_section,
- lang_new_vers_node (greg, lreg), NULL);
-}
-
-void
-lang_add_unique (const char *name)
-{
- struct unique_sections *ent;
-
- for (ent = unique_section_list; ent; ent = ent->next)
- if (strcmp (ent->name, name) == 0)
- return;
-
- ent = xmalloc (sizeof *ent);
- ent->name = xstrdup (name);
- ent->next = unique_section_list;
- unique_section_list = ent;
-}
diff --git a/contrib/binutils/ld/ldlang.h b/contrib/binutils/ld/ldlang.h
deleted file mode 100644
index 649fea1..0000000
--- a/contrib/binutils/ld/ldlang.h
+++ /dev/null
@@ -1,569 +0,0 @@
-/* ldlang.h - linker command language support
- Copyright 1991, 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999, 2000,
- 2001, 2002, 2003, 2004
- 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, 59 Temple Place - Suite 330, Boston, MA
- 02111-1307, USA. */
-
-#ifndef LDLANG_H
-#define LDLANG_H
-
-#define DEFAULT_MEMORY_REGION "*default*"
-
-typedef enum
-{
- lang_input_file_is_l_enum,
- lang_input_file_is_symbols_only_enum,
- lang_input_file_is_marker_enum,
- lang_input_file_is_fake_enum,
- lang_input_file_is_search_file_enum,
- lang_input_file_is_file_enum
-} lang_input_file_enum_type;
-
-struct _fill_type
-{
- size_t size;
- unsigned char data[1];
-};
-
-typedef struct statement_list
-{
- union lang_statement_union *head;
- union lang_statement_union **tail;
-} lang_statement_list_type;
-
-typedef struct memory_region_struct
-{
- char *name;
- struct memory_region_struct *next;
- bfd_vma origin;
- bfd_size_type length;
- bfd_vma current;
- bfd_size_type old_length;
- flagword flags;
- flagword not_flags;
- bfd_boolean had_full_message;
-} lang_memory_region_type;
-
-typedef struct lang_statement_header_struct
-{
- union lang_statement_union *next;
- enum statement_enum
- {
- lang_output_section_statement_enum,
- lang_assignment_statement_enum,
- lang_input_statement_enum,
- lang_address_statement_enum,
- lang_wild_statement_enum,
- lang_input_section_enum,
- lang_object_symbols_statement_enum,
- lang_fill_statement_enum,
- lang_data_statement_enum,
- lang_reloc_statement_enum,
- lang_target_statement_enum,
- lang_output_statement_enum,
- lang_padding_statement_enum,
- lang_group_statement_enum,
-
- lang_afile_asection_pair_statement_enum,
- lang_constructors_statement_enum
- } type;
-} lang_statement_header_type;
-
-typedef struct
-{
- lang_statement_header_type header;
- union etree_union *exp;
-} lang_assignment_statement_type;
-
-typedef struct lang_target_statement_struct
-{
- lang_statement_header_type header;
- const char *target;
-} lang_target_statement_type;
-
-typedef struct lang_output_statement_struct
-{
- lang_statement_header_type header;
- const char *name;
-} lang_output_statement_type;
-
-/* Section types specified in a linker script. */
-
-enum section_type
-{
- normal_section,
- dsect_section,
- copy_section,
- noload_section,
- info_section,
- overlay_section
-};
-
-/* This structure holds a list of program headers describing
- segments in which this section should be placed. */
-
-typedef struct lang_output_section_phdr_list
-{
- struct lang_output_section_phdr_list *next;
- const char *name;
- bfd_boolean used;
-} 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;
- 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 *load_base;
-
- /* If non-null, an expression to evaluate after setting the section's
- size. The expression is evaluated inside REGION (above) with '.'
- set to the end of the section. Used in the last overlay section
- to move '.' past all the overlaid sections. */
- union etree_union *update_dot_tree;
-
- lang_output_section_phdr_list *phdrs;
-} lang_output_section_statement_type;
-
-typedef struct
-{
- lang_statement_header_type header;
-} lang_common_statement_type;
-
-typedef struct
-{
- lang_statement_header_type header;
-} lang_object_symbols_statement_type;
-
-typedef struct
-{
- lang_statement_header_type header;
- fill_type *fill;
- int size;
- asection *output_section;
-} lang_fill_statement_type;
-
-typedef struct
-{
- lang_statement_header_type header;
- unsigned int type;
- union etree_union *exp;
- bfd_vma value;
- asection *output_section;
- bfd_vma output_vma;
-} lang_data_statement_type;
-
-/* Generate a reloc in the output file. */
-
-typedef struct
-{
- lang_statement_header_type header;
-
- /* Reloc to generate. */
- bfd_reloc_code_real_type reloc;
-
- /* Reloc howto structure. */
- reloc_howto_type *howto;
-
- /* Section to generate reloc against.
- Exactly one of section and name must be NULL. */
- asection *section;
-
- /* Name of symbol to generate reloc against.
- Exactly one of section and name must be NULL. */
- const char *name;
-
- /* Expression for addend. */
- union etree_union *addend_exp;
-
- /* Resolved addend. */
- bfd_vma addend_value;
-
- /* Output section where reloc should be performed. */
- asection *output_section;
-
- /* VMA within output section. */
- bfd_vma output_vma;
-} lang_reloc_statement_type;
-
-typedef struct lang_input_statement_struct
-{
- lang_statement_header_type header;
- /* Name of this file. */
- const char *filename;
- /* Name to use for the symbol giving address of text start.
- Usually the same as filename, but for a file spec'd with
- -l this is the -l switch itself rather than the filename. */
- const char *local_sym_name;
-
- bfd *the_bfd;
-
- bfd_boolean closed;
- file_ptr passive_position;
-
- /* Symbol table of the file. */
- asymbol **asymbols;
- unsigned int symbol_count;
-
- /* Point to the next file - whatever it is, wanders up and down
- archives */
- union lang_statement_union *next;
-
- /* Point to the next file, but skips archive contents. */
- union lang_statement_union *next_real_file;
-
- bfd_boolean is_archive;
-
- /* 1 means search a set of directories for this file. */
- bfd_boolean search_dirs_flag;
-
- /* 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;
-
- /* 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;
-
- /* Whether to search for this entry as a dynamic archive. */
- bfd_boolean dynamic;
-
- /* Whether this entry should cause a DT_NEEDED tag only when
- satisfying references from regular files, or always. */
- bfd_boolean as_needed;
-
- /* Whether to include the entire contents of an archive. */
- bfd_boolean whole_archive;
-
- bfd_boolean loaded;
-
-#if 0
- unsigned int globals_in_this_file;
-#endif
- const char *target;
- bfd_boolean real;
-} lang_input_statement_type;
-
-typedef struct
-{
- lang_statement_header_type header;
- asection *section;
- lang_input_statement_type *ifile;
-
-} lang_input_section_type;
-
-typedef struct
-{
- lang_statement_header_type header;
- asection *section;
- union lang_statement_union *file;
-} lang_afile_asection_pair_statement_type;
-
-typedef struct lang_wild_statement_struct
-{
- lang_statement_header_type header;
- const char *filename;
- bfd_boolean filenames_sorted;
- struct wildcard_list *section_list;
- bfd_boolean keep_sections;
- lang_statement_list_type children;
-} lang_wild_statement_type;
-
-typedef struct lang_address_statement_struct
-{
- lang_statement_header_type header;
- const char *section_name;
- union etree_union *address;
-} lang_address_statement_type;
-
-typedef struct
-{
- lang_statement_header_type header;
- bfd_vma output_offset;
- size_t size;
- asection *output_section;
- fill_type *fill;
-} lang_padding_statement_type;
-
-/* A group statement collects a set of libraries together. The
- libraries are searched multiple times, until no new undefined
- symbols are found. The effect is to search a group of libraries as
- though they were a single library. */
-
-typedef struct
-{
- lang_statement_header_type header;
- lang_statement_list_type children;
-} lang_group_statement_type;
-
-typedef union lang_statement_union
-{
- lang_statement_header_type header;
- lang_wild_statement_type wild_statement;
- lang_data_statement_type data_statement;
- lang_reloc_statement_type reloc_statement;
- lang_address_statement_type address_statement;
- lang_output_section_statement_type output_section_statement;
- lang_afile_asection_pair_statement_type afile_asection_pair_statement;
- lang_assignment_statement_type assignment_statement;
- lang_input_statement_type input_statement;
- lang_target_statement_type target_statement;
- lang_output_statement_type output_statement;
- lang_input_section_type input_section;
- lang_common_statement_type common_statement;
- lang_object_symbols_statement_type object_symbols_statement;
- lang_fill_statement_type fill_statement;
- lang_padding_statement_type padding_statement;
- lang_group_statement_type group_statement;
-} lang_statement_union_type;
-
-/* This structure holds information about a program header, from the
- PHDRS command in the linker script. */
-
-struct lang_phdr
-{
- struct lang_phdr *next;
- const char *name;
- unsigned long type;
- bfd_boolean filehdr;
- bfd_boolean phdrs;
- etree_type *at;
- etree_type *flags;
-};
-
-/* This structure is used to hold a list of sections which may not
- cross reference each other. */
-
-typedef struct lang_nocrossref
-{
- struct lang_nocrossref *next;
- const char *name;
-} lang_nocrossref_type;
-
-/* The list of nocrossref lists. */
-
-struct lang_nocrossrefs
-{
- struct lang_nocrossrefs *next;
- lang_nocrossref_type *list;
-};
-
-extern struct lang_nocrossrefs *nocrossref_list;
-
-/* This structure is used to hold a list of input section names which
- will not match an output section in the linker script. */
-
-struct unique_sections
-{
- struct unique_sections *next;
- const char *name;
-};
-
-/* This structure records symbols for which we need to keep track of
- definedness for use in the DEFINED () test. */
-
-struct lang_definedness_hash_entry
-{
- struct bfd_hash_entry root;
- int iteration;
-};
-
-extern struct unique_sections *unique_section_list;
-
-extern lang_output_section_statement_type *abs_output_section;
-extern lang_statement_list_type lang_output_section_statement;
-extern bfd_boolean lang_has_input_file;
-extern etree_type *base;
-extern lang_statement_list_type *stat_ptr;
-extern bfd_boolean delete_output_file_on_failure;
-
-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 int lang_statement_iteration;
-
-extern void lang_init
- (void);
-extern lang_memory_region_type *lang_memory_region_lookup
- (const char *const, bfd_boolean);
-extern lang_memory_region_type *lang_memory_region_default
- (asection *);
-extern void lang_map
- (void);
-extern void lang_set_flags
- (lang_memory_region_type *, const char *, int);
-extern void lang_add_output
- (const char *, int from_script);
-extern lang_output_section_statement_type *lang_enter_output_section_statement
- (const char *output_section_statement_name,
- etree_type *address_exp,
- enum section_type sectype,
- etree_type *align,
- etree_type *subalign,
- etree_type *);
-extern void lang_final
- (void);
-extern void lang_process
- (void);
-extern void lang_section_start
- (const char *, union etree_union *);
-extern void lang_add_entry
- (const char *, bfd_boolean);
-extern void lang_add_target
- (const char *);
-extern void lang_add_wild
- (struct wildcard_spec *, struct wildcard_list *, bfd_boolean);
-extern void lang_add_map
- (const char *);
-extern void lang_add_fill
- (fill_type *);
-extern lang_assignment_statement_type *lang_add_assignment
- (union etree_union *);
-extern void lang_add_attribute
- (enum statement_enum);
-extern void lang_startup
- (const char *);
-extern void lang_float
- (bfd_boolean);
-extern void lang_leave_output_section_statement
- (fill_type *, const char *, lang_output_section_phdr_list *,
- const char *);
-extern void lang_abs_symbol_at_end_of
- (const char *, const char *);
-extern void lang_abs_symbol_at_beginning_of
- (const char *, const char *);
-extern void lang_statement_append
- (lang_statement_list_type *, lang_statement_union_type *,
- lang_statement_union_type **);
-extern void lang_for_each_input_file
- (void (*dothis) (lang_input_statement_type *));
-extern void lang_for_each_file
- (void (*dothis) (lang_input_statement_type *));
-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);
-
-#define LANG_FOR_EACH_INPUT_STATEMENT(statement) \
- lang_input_statement_type *statement; \
- for (statement = (lang_input_statement_type *) file_chain.head; \
- statement != (lang_input_statement_type *) NULL; \
- statement = (lang_input_statement_type *) statement->next) \
-
-extern void lang_process
- (void);
-extern void ldlang_add_file
- (lang_input_statement_type *);
-extern lang_output_section_statement_type *lang_output_section_find
- (const char * const);
-extern lang_input_statement_type *lang_add_input_file
- (const char *, lang_input_file_enum_type, const char *);
-extern void lang_add_keepsyms_file
- (const char *);
-extern lang_output_section_statement_type *
- lang_output_section_statement_lookup
- (const char *const);
-extern void ldlang_add_undef
- (const char *const);
-extern void lang_add_output_format
- (const char *, const char *, const char *, int);
-extern void lang_list_init
- (lang_statement_list_type *);
-extern void lang_add_data
- (int type, union etree_union *);
-extern void lang_add_reloc
- (bfd_reloc_code_real_type, reloc_howto_type *, asection *, const char *,
- union etree_union *);
-extern void lang_for_each_statement
- (void (*) (lang_statement_union_type *));
-extern void *stat_alloc
- (size_t);
-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_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 *);
-extern void lang_new_phdr
- (const char *, etree_type *, bfd_boolean, bfd_boolean, etree_type *,
- etree_type *);
-extern void lang_add_nocrossref
- (lang_nocrossref_type *);
-extern void lang_enter_overlay
- (etree_type *, etree_type *);
-extern void lang_enter_overlay_section
- (const char *);
-extern void lang_leave_overlay_section
- (fill_type *, lang_output_section_phdr_list *);
-extern void lang_leave_overlay
- (etree_type *, int, fill_type *, const char *,
- lang_output_section_phdr_list *, const char *);
-
-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 *);
-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 *);
-bfd_boolean unique_section_p
- (const char *);
-extern void lang_add_unique
- (const char *);
-extern const char *lang_get_output_target
- (void);
-extern void lang_track_definedness (const char *);
-extern int lang_symbol_definition_iteration (const char *);
-extern void lang_update_definedness
- (const char *, struct bfd_link_hash_entry *);
-
-#endif
diff --git a/contrib/binutils/ld/ldlex.h b/contrib/binutils/ld/ldlex.h
deleted file mode 100644
index f956e9c..0000000
--- a/contrib/binutils/ld/ldlex.h
+++ /dev/null
@@ -1,63 +0,0 @@
-/* ldlex.h -
- Copyright 1991, 1992, 1993, 1994, 1995, 1997, 2000, 2003
- 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 1, 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, 59 Temple Place - Suite 330, Boston, MA
- 02111-1307, USA. */
-
-#ifndef LDLEX_H
-#define LDLEX_H
-
-#include <stdio.h>
-
-/* The initial parser states. */
-typedef enum input_enum {
- input_selected, /* We've set the initial state. */
- input_script,
- input_mri_script,
- input_version_script,
- input_defsym
-} input_type;
-
-extern input_type parser_input;
-
-extern unsigned int lineno;
-extern const char *lex_string;
-
-/* In ldlex.l. */
-extern int yylex (void);
-extern void lex_push_file (FILE *, const char *);
-extern void lex_redirect (const char *);
-extern void ldlex_script (void);
-extern void ldlex_mri_script (void);
-extern void ldlex_version_script (void);
-extern void ldlex_version_file (void);
-extern void ldlex_defsym (void);
-extern void ldlex_expression (void);
-extern void ldlex_both (void);
-extern void ldlex_command (void);
-extern void ldlex_popstate (void);
-
-/* In lexsup.c. */
-extern int lex_input (void);
-extern void lex_unput (int);
-#ifndef yywrap
-extern int yywrap (void);
-#endif
-extern void parse_args (unsigned, char **);
-
-#endif
diff --git a/contrib/binutils/ld/ldlex.l b/contrib/binutils/ld/ldlex.l
deleted file mode 100644
index aeac817..0000000
--- a/contrib/binutils/ld/ldlex.l
+++ /dev/null
@@ -1,676 +0,0 @@
-%{
-
-/* Copyright 1991, 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999,
- 2000, 2001, 2002, 2003 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, 59 Temple Place - Suite 330, Boston, MA
-02111-1307, 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 "safe-ctype.h"
-#include "bfdlink.h"
-#include "ld.h"
-#include "ldmisc.h"
-#include "ldexp.h"
-#include "ldlang.h"
-#include <ldgram.h>
-#include "ldfile.h"
-#include "ldlex.h"
-#include "ldmain.h"
-#include "libiberty.h"
-
-/* The type of top-level parser input.
- yylex and yyparse (indirectly) both check this. */
-input_type parser_input;
-
-/* Line number in the current input file.
- (FIXME Actually, it doesn't appear to get reset for each file?) */
-unsigned int lineno = 1;
-
-/* The string we are currently lexing, or NULL if we are reading a
- file. */
-const char *lex_string = NULL;
-
-/* Support for flex reading from more than one input file (stream).
- `include_stack' is flex's input state for each open file;
- `file_name_stack' is the file names. `lineno_stack' is the current
- line numbers.
-
- If `include_stack_ptr' is 0, we haven't started reading anything yet.
- Otherwise, stack elements 0 through `include_stack_ptr - 1' are valid. */
-
-#undef YY_INPUT
-#define YY_INPUT(buf,result,max_size) yy_input (buf, &result, max_size)
-
-#define MAX_INCLUDE_DEPTH 10
-static YY_BUFFER_STATE include_stack[MAX_INCLUDE_DEPTH];
-static const char *file_name_stack[MAX_INCLUDE_DEPTH];
-static unsigned int lineno_stack[MAX_INCLUDE_DEPTH];
-static unsigned int include_stack_ptr = 0;
-static int vers_node_nesting = 0;
-
-static void yy_input (char *, int *, int);
-static void comment (void);
-static void lex_warn_invalid (char *where, char *what);
-
-/* STATES
- EXPRESSION definitely in an expression
- SCRIPT definitely in a script
- BOTH either EXPRESSION or SCRIPT
- DEFSYMEXP in an argument to -defsym
- MRI in an MRI script
- VERS_START starting a Sun style mapfile
- VERS_SCRIPT a Sun style mapfile
- VERS_NODE a node within a Sun style mapfile
-*/
-#define RTOKEN(x) { yylval.token = x; return x; }
-
-/* Some versions of flex want this. */
-#ifndef yywrap
-int yywrap (void) { return 1; }
-#endif
-%}
-
-%a 4000
-%o 5000
-
-CMDFILENAMECHAR [_a-zA-Z0-9\/\.\\_\+\$\:\[\]\\\,\=\&\!\<\>\-\~]
-CMDFILENAMECHAR1 [_a-zA-Z0-9\/\.\\_\+\$\:\[\]\\\,\=\&\!\<\>\~]
-FILENAMECHAR1 [_a-zA-Z\/\.\\\$\_\~]
-SYMBOLCHARN [_a-zA-Z\/\.\\\$\_\~0-9]
-FILENAMECHAR [_a-zA-Z0-9\/\.\-\_\+\=\$\:\[\]\\\,\~]
-WILDCHAR [_a-zA-Z0-9\/\.\-\_\+\=\$\:\[\]\\\,\~\?\*]
-WHITE [ \t\n\r]+
-
-NOCFILENAMECHAR [_a-zA-Z0-9\/\.\-\_\+\$\:\[\]\\\~]
-
-V_TAG [.$_a-zA-Z][._a-zA-Z0-9]*
-V_IDENTIFIER [*?.$_a-zA-Z\[\]\-\!\^\\]([*?.$_a-zA-Z0-9\[\]\-\!\^\\]|::)*
-
-%s SCRIPT
-%s EXPRESSION
-%s BOTH
-%s DEFSYMEXP
-%s MRI
-%s VERS_START
-%s VERS_SCRIPT
-%s VERS_NODE
-%%
-
- if (parser_input != input_selected)
- {
- /* The first token of the input determines the initial parser state. */
- input_type t = parser_input;
- parser_input = input_selected;
- switch (t)
- {
- 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_defsym: return INPUT_DEFSYM; break;
- default: abort ();
- }
- }
-
-<BOTH,SCRIPT,EXPRESSION,VERS_START,VERS_NODE,VERS_SCRIPT>"/*" { comment (); }
-
-
-<DEFSYMEXP>"-" { RTOKEN('-');}
-<DEFSYMEXP>"+" { RTOKEN('+');}
-<DEFSYMEXP>{FILENAMECHAR1}{SYMBOLCHARN}* { yylval.name = xstrdup (yytext); return NAME; }
-<DEFSYMEXP>"=" { RTOKEN('='); }
-
-<MRI,EXPRESSION>"$"([0-9A-Fa-f])+ {
- yylval.integer = bfd_scan_vma (yytext + 1, 0, 16);
- yylval.bigint.str = NULL;
- return INT;
- }
-
-<MRI,EXPRESSION>([0-9A-Fa-f])+(H|h|X|x|B|b|O|o|D|d) {
- int ibase ;
- switch (yytext[yyleng - 1]) {
- case 'X':
- case 'x':
- case 'H':
- case 'h':
- ibase = 16;
- break;
- case 'O':
- case 'o':
- ibase = 8;
- break;
- case 'B':
- case 'b':
- ibase = 2;
- break;
- default:
- ibase = 10;
- }
- yylval.integer = bfd_scan_vma (yytext, 0,
- ibase);
- yylval.bigint.str = NULL;
- return INT;
- }
-<SCRIPT,DEFSYMEXP,MRI,BOTH,EXPRESSION>((("$"|0[xX])([0-9A-Fa-f])+)|(([0-9])+))(M|K|m|k)? {
- char *s = yytext;
- int ibase = 0;
-
- if (*s == '$')
- {
- ++s;
- ibase = 16;
- }
- yylval.integer = bfd_scan_vma (s, 0, ibase);
- yylval.bigint.str = NULL;
- if (yytext[yyleng - 1] == 'M'
- || yytext[yyleng - 1] == 'm')
- {
- yylval.integer *= 1024 * 1024;
- }
- else if (yytext[yyleng - 1] == 'K'
- || yytext[yyleng - 1]=='k')
- {
- yylval.integer *= 1024;
- }
- else if (yytext[0] == '0'
- && (yytext[1] == 'x'
- || yytext[1] == 'X'))
- {
- yylval.bigint.str = xstrdup (yytext + 2);
- }
- return INT;
- }
-<BOTH,SCRIPT,EXPRESSION,MRI>"]" { RTOKEN(']');}
-<BOTH,SCRIPT,EXPRESSION,MRI>"[" { RTOKEN('[');}
-<BOTH,SCRIPT,EXPRESSION,MRI>"<<=" { RTOKEN(LSHIFTEQ);}
-<BOTH,SCRIPT,EXPRESSION,MRI>">>=" { RTOKEN(RSHIFTEQ);}
-<BOTH,SCRIPT,EXPRESSION,MRI>"||" { RTOKEN(OROR);}
-<BOTH,SCRIPT,EXPRESSION,MRI>"==" { RTOKEN(EQ);}
-<BOTH,SCRIPT,EXPRESSION,MRI>"!=" { RTOKEN(NE);}
-<BOTH,SCRIPT,EXPRESSION,MRI>">=" { RTOKEN(GE);}
-<BOTH,SCRIPT,EXPRESSION,MRI>"<=" { RTOKEN(LE);}
-<BOTH,SCRIPT,EXPRESSION,MRI>"<<" { RTOKEN(LSHIFT);}
-<BOTH,SCRIPT,EXPRESSION,MRI>">>" { RTOKEN(RSHIFT);}
-<BOTH,SCRIPT,EXPRESSION,MRI>"+=" { RTOKEN(PLUSEQ);}
-<BOTH,SCRIPT,EXPRESSION,MRI>"-=" { RTOKEN(MINUSEQ);}
-<BOTH,SCRIPT,EXPRESSION,MRI>"*=" { RTOKEN(MULTEQ);}
-<BOTH,SCRIPT,EXPRESSION,MRI>"/=" { RTOKEN(DIVEQ);}
-<BOTH,SCRIPT,EXPRESSION,MRI>"&=" { RTOKEN(ANDEQ);}
-<BOTH,SCRIPT,EXPRESSION,MRI>"|=" { RTOKEN(OREQ);}
-<BOTH,SCRIPT,EXPRESSION,MRI>"&&" { RTOKEN(ANDAND);}
-<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,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);}
-<EXPRESSION,BOTH,SCRIPT>"BLOCK" { RTOKEN(BLOCK);}
-<EXPRESSION,BOTH,SCRIPT>"BIND" { RTOKEN(BIND);}
-<BOTH,SCRIPT>"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_END" { RTOKEN(DATA_SEGMENT_END);}
-<EXPRESSION,BOTH,SCRIPT>"ADDR" { RTOKEN(ADDR);}
-<EXPRESSION,BOTH,SCRIPT>"LOADADDR" { RTOKEN(LOADADDR);}
-<EXPRESSION,BOTH>"MAX" { RTOKEN(MAX_K); }
-<EXPRESSION,BOTH>"MIN" { RTOKEN(MIN_K); }
-<EXPRESSION,BOTH>"ASSERT" { RTOKEN(ASSERT_K); }
-<BOTH,SCRIPT>"ENTRY" { RTOKEN(ENTRY);}
-<BOTH,SCRIPT,MRI>"EXTERN" { RTOKEN(EXTERN);}
-<EXPRESSION,BOTH,SCRIPT>"NEXT" { RTOKEN(NEXT);}
-<EXPRESSION,BOTH,SCRIPT>"sizeof_headers" { RTOKEN(SIZEOF_HEADERS);}
-<EXPRESSION,BOTH,SCRIPT>"SIZEOF_HEADERS" { RTOKEN(SIZEOF_HEADERS);}
-<BOTH,SCRIPT>"MAP" { RTOKEN(MAP);}
-<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>"INPUT" { RTOKEN(INPUT);}
-<EXPRESSION,BOTH,SCRIPT>"GROUP" { RTOKEN(GROUP);}
-<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>"INHIBIT_COMMON_ALLOCATION" { RTOKEN(INHIBIT_COMMON_ALLOCATION);}
-<BOTH,SCRIPT>"SECTIONS" { RTOKEN(SECTIONS);}
-<BOTH,SCRIPT>"FILL" { RTOKEN(FILL);}
-<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>"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);}
-<EXPRESSION,BOTH,SCRIPT>"NOCROSSREFS" { RTOKEN(NOCROSSREFS);}
-<BOTH,SCRIPT>"OVERLAY" { RTOKEN(OVERLAY); }
-<BOTH,SCRIPT>"SORT" { RTOKEN(SORT); }
-<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);}
-<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>"KEEP" { RTOKEN(KEEP); }
-<EXPRESSION,BOTH,SCRIPT>"EXCLUDE_FILE" { RTOKEN(EXCLUDE_FILE); }
-<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>"CHIP" { RTOKEN(CHIP); }
-<MRI>"BASE" { RTOKEN(BASE); }
-<MRI>"ALIAS" { RTOKEN(ALIAS); }
-<MRI>"TRUNCATE" { RTOKEN(TRUNCATE); }
-<MRI>"LOAD" { RTOKEN(LOAD); }
-<MRI>"PUBLIC" { RTOKEN(PUBLIC); }
-<MRI>"ORDER" { RTOKEN(ORDER); }
-<MRI>"NAME" { RTOKEN(NAMEWORD); }
-<MRI>"FORMAT" { RTOKEN(FORMAT); }
-<MRI>"CASE" { RTOKEN(CASE); }
-<MRI>"START" { RTOKEN(START); }
-<MRI>"LIST".* { RTOKEN(LIST); /* LIST and ignore to end of line */ }
-<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>"chip" { RTOKEN(CHIP); }
-<MRI>"base" { RTOKEN(BASE); }
-<MRI>"alias" { RTOKEN(ALIAS); }
-<MRI>"truncate" { RTOKEN(TRUNCATE); }
-<MRI>"load" { RTOKEN(LOAD); }
-<MRI>"public" { RTOKEN(PUBLIC); }
-<MRI>"order" { RTOKEN(ORDER); }
-<MRI>"name" { RTOKEN(NAMEWORD); }
-<MRI>"format" { RTOKEN(FORMAT); }
-<MRI>"case" { RTOKEN(CASE); }
-<MRI>"extern" { RTOKEN(EXTERN); }
-<MRI>"start" { RTOKEN(START); }
-<MRI>"list".* { RTOKEN(LIST); /* LIST and ignore to end of line */ }
-<MRI>"sect" { RTOKEN(SECT); }
-<EXPRESSION,BOTH,SCRIPT,MRI>"absolute" { RTOKEN(ABSOLUTE); }
-
-<MRI>{FILENAMECHAR1}{NOCFILENAMECHAR}* {
-/* Filename without commas, needed to parse mri stuff */
- yylval.name = xstrdup (yytext);
- return NAME;
- }
-
-
-<BOTH,EXPRESSION>{FILENAMECHAR1}{FILENAMECHAR}* {
- yylval.name = xstrdup (yytext);
- return NAME;
- }
-<BOTH,EXPRESSION>"-l"{FILENAMECHAR}+ {
- yylval.name = xstrdup (yytext + 2);
- return LNAME;
- }
-<SCRIPT>{WILDCHAR}* {
- /* Annoyingly, this pattern can match comments, and we have
- longest match issues to consider. So if the first two
- characters are a comment opening, put the input back and
- try again. */
- if (yytext[0] == '/' && yytext[1] == '*')
- {
- yyless (2);
- comment ();
- }
- else
- {
- yylval.name = xstrdup (yytext);
- return NAME;
- }
- }
-
-<EXPRESSION,BOTH,SCRIPT,VERS_NODE>"\""[^\"]*"\"" {
- /* No matter the state, quotes
- give what's inside */
- yylval.name = xstrdup (yytext + 1);
- yylval.name[yyleng - 2] = 0;
- return NAME;
- }
-<BOTH,SCRIPT,EXPRESSION>"\n" { lineno++;}
-<MRI,BOTH,SCRIPT,EXPRESSION>[ \t\r]+ { }
-
-<VERS_NODE,VERS_SCRIPT>[:,;] { return *yytext; }
-
-<VERS_NODE>global { RTOKEN(GLOBAL); }
-
-<VERS_NODE>local { RTOKEN(LOCAL); }
-
-<VERS_NODE>extern { RTOKEN(EXTERN); }
-
-<VERS_NODE>{V_IDENTIFIER} { yylval.name = xstrdup (yytext);
- return VERS_IDENTIFIER; }
-
-<VERS_SCRIPT>{V_TAG} { yylval.name = xstrdup (yytext);
- return VERS_TAG; }
-
-<VERS_START>"{" { BEGIN(VERS_SCRIPT); return *yytext; }
-
-<VERS_SCRIPT>"{" { BEGIN(VERS_NODE);
- vers_node_nesting = 0;
- return *yytext;
- }
-<VERS_SCRIPT>"}" { return *yytext; }
-<VERS_NODE>"{" { vers_node_nesting++; return *yytext; }
-<VERS_NODE>"}" { if (--vers_node_nesting < 0)
- BEGIN(VERS_SCRIPT);
- return *yytext;
- }
-
-<VERS_START,VERS_NODE,VERS_SCRIPT>[\n] { lineno++; }
-
-<VERS_START,VERS_NODE,VERS_SCRIPT>#.* { /* Eat up comments */ }
-
-<VERS_START,VERS_NODE,VERS_SCRIPT>[ \t\r]+ { /* Eat up whitespace */ }
-
-<<EOF>> {
- include_stack_ptr--;
-
- if (include_stack_ptr == 0)
- {
- yyterminate ();
- }
- else
- {
- yy_switch_to_buffer (include_stack[include_stack_ptr]);
- }
-
- ldfile_input_filename = file_name_stack[include_stack_ptr - 1];
- lineno = lineno_stack[include_stack_ptr];
-
- return END;
-}
-
-<SCRIPT,MRI,VERS_START,VERS_SCRIPT,VERS_NODE>. lex_warn_invalid (" in script", yytext);
-<EXPRESSION,DEFSYMEXP,BOTH>. lex_warn_invalid (" in expression", yytext);
-
-%%
-
-
-/* Switch flex to reading script file NAME, open on FILE,
- saving the current input info on the include stack. */
-
-void
-lex_push_file (FILE *file, const char *name)
-{
- if (include_stack_ptr >= MAX_INCLUDE_DEPTH)
- {
- einfo ("%F:includes nested too deeply\n");
- }
- file_name_stack[include_stack_ptr] = name;
- lineno_stack[include_stack_ptr] = lineno;
- include_stack[include_stack_ptr] = YY_CURRENT_BUFFER;
-
- include_stack_ptr++;
- lineno = 1;
- yyin = file;
- yy_switch_to_buffer (yy_create_buffer (yyin, YY_BUF_SIZE));
-}
-
-/* Return a newly created flex input buffer containing STRING,
- which is SIZE bytes long. */
-
-static YY_BUFFER_STATE
-yy_create_string_buffer (const char *string, size_t size)
-{
- YY_BUFFER_STATE b;
-
- /* Calls to m-alloc get turned by sed into xm-alloc. */
- b = malloc (sizeof (struct yy_buffer_state));
- b->yy_input_file = 0;
- b->yy_buf_size = size;
-
- /* yy_ch_buf has to be 2 characters longer than the size given because
- we need to put in 2 end-of-buffer characters. */
- b->yy_ch_buf = malloc ((unsigned) (b->yy_buf_size + 3));
-
- b->yy_ch_buf[0] = '\n';
- strcpy (b->yy_ch_buf+1, string);
- b->yy_ch_buf[size+1] = YY_END_OF_BUFFER_CHAR;
- b->yy_ch_buf[size+2] = YY_END_OF_BUFFER_CHAR;
- b->yy_n_chars = size+1;
- b->yy_buf_pos = &b->yy_ch_buf[1];
-
- b->yy_is_our_buffer = 1;
- b->yy_is_interactive = 0;
- b->yy_at_bol = 1;
- b->yy_fill_buffer = 0;
-
- /* flex 2.4.7 changed the interface. FIXME: We should not be using
- a flex internal interface in the first place! */
-#ifdef YY_BUFFER_NEW
- b->yy_buffer_status = YY_BUFFER_NEW;
-#else
- b->yy_eof_status = EOF_NOT_SEEN;
-#endif
-
- return b;
-}
-
-/* Switch flex to reading from STRING, saving the current input info
- on the include stack. */
-
-void
-lex_redirect (const char *string)
-{
- YY_BUFFER_STATE tmp;
-
- yy_init = 0;
- if (include_stack_ptr >= MAX_INCLUDE_DEPTH)
- {
- einfo("%F: macros nested too deeply\n");
- }
- file_name_stack[include_stack_ptr] = "redirect";
- lineno_stack[include_stack_ptr] = lineno;
- include_stack[include_stack_ptr] = YY_CURRENT_BUFFER;
- include_stack_ptr++;
- lineno = 1;
- tmp = yy_create_string_buffer (string, strlen (string));
- yy_switch_to_buffer (tmp);
-}
-
-/* Functions to switch to a different flex start condition,
- saving the current start condition on `state_stack'. */
-
-static int state_stack[MAX_INCLUDE_DEPTH * 2];
-static int *state_stack_p = state_stack;
-
-void
-ldlex_script (void)
-{
- *(state_stack_p)++ = yy_start;
- BEGIN (SCRIPT);
-}
-
-void
-ldlex_mri_script (void)
-{
- *(state_stack_p)++ = yy_start;
- BEGIN (MRI);
-}
-
-void
-ldlex_version_script (void)
-{
- *(state_stack_p)++ = yy_start;
- BEGIN (VERS_START);
-}
-
-void
-ldlex_version_file (void)
-{
- *(state_stack_p)++ = yy_start;
- BEGIN (VERS_SCRIPT);
-}
-
-void
-ldlex_defsym (void)
-{
- *(state_stack_p)++ = yy_start;
- BEGIN (DEFSYMEXP);
-}
-
-void
-ldlex_expression (void)
-{
- *(state_stack_p)++ = yy_start;
- BEGIN (EXPRESSION);
-}
-
-void
-ldlex_both (void)
-{
- *(state_stack_p)++ = yy_start;
- BEGIN (BOTH);
-}
-
-void
-ldlex_popstate (void)
-{
- yy_start = *(--state_stack_p);
-}
-
-
-/* Place up to MAX_SIZE characters in BUF and return in *RESULT
- either the number of characters read, or 0 to indicate EOF. */
-
-static void
-yy_input (char *buf, int *result, int max_size)
-{
- *result = 0;
- if (YY_CURRENT_BUFFER->yy_input_file)
- {
- if (yyin)
- {
- *result = fread (buf, 1, max_size, yyin);
- if (*result < max_size && ferror (yyin))
- einfo ("%F%P: read in flex scanner failed\n");
- }
- }
-}
-
-/* Eat the rest of a C-style comment. */
-
-static void
-comment (void)
-{
- int c;
-
- while (1)
- {
- c = input();
- while (c != '*' && c != EOF)
- {
- if (c == '\n')
- lineno++;
- c = input();
- }
-
- if (c == '*')
- {
- c = input();
- while (c == '*')
- c = input();
- if (c == '/')
- break; /* found the end */
- }
-
- if (c == '\n')
- lineno++;
-
- if (c == EOF)
- {
- einfo( "%F%P: EOF in comment\n");
- break;
- }
- }
-}
-
-/* Warn the user about a garbage character WHAT in the input
- in context WHERE. */
-
-static void
-lex_warn_invalid (char *where, char *what)
-{
- char buf[5];
-
- /* If we have found an input file whose format we do not recognize,
- and we are therefore treating it as a linker script, and we find
- an invalid character, then most likely this is a real object file
- of some different format. Treat it as such. */
- if (ldfile_assumed_script)
- {
- bfd_set_error (bfd_error_file_not_recognized);
- einfo ("%F%s: file not recognized: %E\n", ldfile_input_filename);
- }
-
- if (! ISPRINT (*what))
- {
- sprintf (buf, "\\%03o", (unsigned int) *what);
- what = buf;
- }
-
- einfo ("%P:%S: ignoring invalid character `%s'%s\n", what, where);
-}
diff --git a/contrib/binutils/ld/ldmain.c b/contrib/binutils/ld/ldmain.c
deleted file mode 100644
index d0e0b12..0000000
--- a/contrib/binutils/ld/ldmain.c
+++ /dev/null
@@ -1,1464 +0,0 @@
-/* Main program of GNU linker.
- Copyright 1991, 1992, 1993, 1994, 1995, 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.
-
- 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, 59 Temple Place - Suite 330, Boston, MA
- 02111-1307, USA. */
-
-#include "bfd.h"
-#include "sysdep.h"
-#include <stdio.h>
-#include "safe-ctype.h"
-#include "libiberty.h"
-#include "progress.h"
-#include "bfdlink.h"
-#include "filenames.h"
-
-#include "ld.h"
-#include "ldmain.h"
-#include "ldmisc.h"
-#include "ldwrite.h"
-#include "ldexp.h"
-#include "ldlang.h"
-#include <ldgram.h>
-#include "ldlex.h"
-#include "ldfile.h"
-#include "ldemul.h"
-#include "ldctor.h"
-
-/* Somewhere above, sys/stat.h got included. */
-#if !defined(S_ISDIR) && defined(S_IFDIR)
-#define S_ISDIR(m) (((m) & S_IFMT) == S_IFDIR)
-#endif
-
-#include <string.h>
-
-#ifdef HAVE_SBRK
-#ifdef NEED_DECLARATION_SBRK
-extern void *sbrk ();
-#endif
-#endif
-
-#ifndef TARGET_SYSTEM_ROOT
-#define TARGET_SYSTEM_ROOT ""
-#endif
-
-/* EXPORTS */
-
-char *default_target;
-const char *output_filename = "a.out";
-
-/* Name this program was invoked by. */
-char *program_name;
-
-/* The prefix for system library directories. */
-char *ld_sysroot;
-
-/* The canonical representation of ld_sysroot. */
-char * ld_canon_sysroot;
-int ld_canon_sysroot_len;
-
-/* The file that we're creating. */
-bfd *output_bfd = 0;
-
-/* Set by -G argument, for MIPS ECOFF target. */
-int g_switch_value = 8;
-
-/* Nonzero means print names of input files as processed. */
-bfd_boolean trace_files;
-
-/* Nonzero means same, but note open failures, too. */
-bfd_boolean trace_file_tries;
-
-/* Nonzero means version number was printed, so exit successfully
- instead of complaining if no input files are given. */
-bfd_boolean version_printed;
-
-/* Nonzero means link in every member of an archive. */
-bfd_boolean whole_archive;
-
-/* Nonzero means create DT_NEEDED entries only if a dynamic library
- actually satisfies some reference in a regular object. */
-bfd_boolean as_needed;
-
-/* TRUE if we should demangle symbol names. */
-bfd_boolean demangling;
-
-args_type command_line;
-
-ld_config_type config;
-
-static char *get_emulation
- (int, char **);
-static void set_scripts_dir
- (void);
-static bfd_boolean add_archive_element
- (struct bfd_link_info *, bfd *, const char *);
-static bfd_boolean multiple_definition
- (struct bfd_link_info *, const char *, bfd *, asection *, bfd_vma,
- bfd *, asection *, bfd_vma);
-static bfd_boolean multiple_common
- (struct bfd_link_info *, const char *, bfd *, enum bfd_link_hash_type,
- bfd_vma, bfd *, enum bfd_link_hash_type, bfd_vma);
-static bfd_boolean add_to_set
- (struct bfd_link_info *, struct bfd_link_hash_entry *,
- bfd_reloc_code_real_type, bfd *, asection *, bfd_vma);
-static bfd_boolean constructor_callback
- (struct bfd_link_info *, bfd_boolean, const char *, bfd *,
- asection *, bfd_vma);
-static bfd_boolean warning_callback
- (struct bfd_link_info *, const char *, const char *, bfd *,
- asection *, bfd_vma);
-static void warning_find_reloc
- (bfd *, asection *, void *);
-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);
-static bfd_boolean reloc_dangerous
- (struct bfd_link_info *, const char *, bfd *, asection *, bfd_vma);
-static bfd_boolean unattached_reloc
- (struct bfd_link_info *, const char *, bfd *, asection *, bfd_vma);
-static bfd_boolean notice
- (struct bfd_link_info *, const char *, bfd *, asection *, bfd_vma);
-
-static struct bfd_link_callbacks link_callbacks =
-{
- add_archive_element,
- multiple_definition,
- multiple_common,
- add_to_set,
- constructor_callback,
- warning_callback,
- undefined_symbol,
- reloc_overflow,
- reloc_dangerous,
- unattached_reloc,
- notice,
- error_handler
-};
-
-struct bfd_link_info link_info;
-
-static void
-remove_output (void)
-{
- if (output_filename)
- {
- if (output_bfd)
- bfd_cache_close (output_bfd);
- if (delete_output_file_on_failure)
- unlink (output_filename);
- }
-}
-
-int
-main (int argc, char **argv)
-{
- char *emulation;
- long start_time = get_run_time ();
-
-#if defined (HAVE_SETLOCALE) && defined (HAVE_LC_MESSAGES)
- setlocale (LC_MESSAGES, "");
-#endif
-#if defined (HAVE_SETLOCALE)
- setlocale (LC_CTYPE, "");
-#endif
- bindtextdomain (PACKAGE, LOCALEDIR);
- textdomain (PACKAGE);
-
- program_name = argv[0];
- xmalloc_set_program_name (program_name);
-
- START_PROGRESS (program_name, 0);
-
- 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)
- {
- ld_sysroot = make_relative_prefix (program_name, TOOLBINDIR,
- 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)
-#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
- ld_canon_sysroot_len = -1;
-
- /* Set the default BFD target based on the configured target. Doing
- this permits the linker to be configured for a particular target,
- and linked against a shared BFD library which was configured for
- a different target. The macro TARGET is defined by Makefile. */
- if (! bfd_set_default_target (TARGET))
- {
- einfo (_("%X%P: can't set BFD default target to `%s': %E\n"), TARGET);
- xexit (1);
- }
-
-#if YYDEBUG
- {
- extern int yydebug;
- yydebug = 1;
- }
-#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.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;
- command_line.warn_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
- output of the linker, unless COLLECT_NO_DEMANGLE is set in the
- environment. Acting the same way here lets us provide the same
- 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.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;
- /* 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.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);
- lang_init ();
- ldemul_before_parse ();
- lang_has_input_file = FALSE;
- parse_args (argc, argv);
-
- ldemul_set_symbols ();
-
- if (link_info.relocatable)
- {
- if (command_line.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"));
- if (link_info.shared)
- einfo (_("%P%F: -r and -shared may not be used together\n"));
- }
-
- if (! link_info.shared)
- {
- if (command_line.filter_shlib)
- einfo (_("%P%F: -F may not be used without -shared\n"));
- if (command_line.auxiliary_filters)
- einfo (_("%P%F: -f may not be used without -shared\n"));
- }
-
- if (! link_info.shared || link_info.pie)
- link_info.executable = TRUE;
-
- /* Treat ld -r -s as ld -r -S -x (i.e., strip all local symbols). I
- don't see how else this can be handled, since in this case we
- must preserve all externally visible symbols. */
- if (link_info.relocatable && link_info.strip == strip_all)
- {
- link_info.strip = strip_debugger;
- if (link_info.discard == discard_sec_merge)
- link_info.discard = discard_all;
- }
-
- /* This essentially adds another -L directory so this must be done after
- the -L's in argv have been processed. */
- set_scripts_dir ();
-
- /* If we have not already opened and parsed a linker script
- read the emulation's appropriate default script. */
- if (saved_script_handle == NULL)
- {
- int isfile;
- char *s = ldemul_get_script (&isfile);
-
- if (isfile)
- ldfile_open_command_file (s);
- else
- {
- lex_string = s;
- lex_redirect (s);
- }
- parser_input = input_script;
- yyparse ();
- lex_string = NULL;
- }
-
- if (trace_file_tries)
- {
- if (saved_script_handle)
- info_msg (_("using external linker script:"));
- else
- info_msg (_("using internal linker script:"));
- info_msg ("\n==================================================\n");
-
- if (saved_script_handle)
- {
- static const int ld_bufsz = 8193;
- size_t n;
- char *buf = xmalloc (ld_bufsz);
-
- rewind (saved_script_handle);
- while ((n = fread (buf, 1, ld_bufsz - 1, saved_script_handle)) > 0)
- {
- buf[n] = 0;
- info_msg (buf);
- }
- rewind (saved_script_handle);
- free (buf);
- }
- else
- {
- int isfile;
-
- info_msg (ldemul_get_script (&isfile));
- }
-
- info_msg ("\n==================================================\n");
- }
-
- lang_final ();
-
- if (!lang_has_input_file)
- {
- if (version_printed)
- xexit (0);
- einfo (_("%P%F: no input files\n"));
- }
-
- if (trace_files)
- info_msg (_("%P: mode %s\n"), emulation);
-
- ldemul_after_parse ();
-
- if (config.map_filename)
- {
- if (strcmp (config.map_filename, "-") == 0)
- {
- config.map_file = stdout;
- }
- else
- {
- config.map_file = fopen (config.map_filename, FOPEN_WT);
- if (config.map_file == (FILE *) NULL)
- {
- bfd_set_error (bfd_error_system_call);
- einfo (_("%P%F: cannot open map file %s: %E\n"),
- config.map_filename);
- }
- }
- }
-
- lang_process ();
-
- /* Print error messages for any missing symbols, for any warning
- symbols, and possibly multiple definitions. */
- if (link_info.relocatable)
- output_bfd->flags &= ~EXEC_P;
- else
- output_bfd->flags |= EXEC_P;
-
- ldwrite ();
-
- if (config.map_file != NULL)
- lang_map ();
- if (command_line.cref)
- output_cref (config.map_file != NULL ? config.map_file : stdout);
- if (nocrossref_list != NULL)
- check_nocrossrefs ();
-
- /* 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?) */
- if (!config.make_executable && !force_make_executable)
- {
- if (trace_files)
- einfo (_("%P: link errors found, deleting executable `%s'\n"),
- output_filename);
-
- /* The file will be removed by remove_output. */
- xexit (1);
- }
- else
- {
- if (! bfd_close (output_bfd))
- einfo (_("%F%B: final close failed: %E\n"), output_bfd);
-
- /* If the --force-exe-suffix is enabled, and we're making an
- executable file and it doesn't end in .exe, copy it to one
- which does. */
- if (! link_info.relocatable && command_line.force_exe_suffix)
- {
- int len = strlen (output_filename);
-
- if (len < 4
- || (strcasecmp (output_filename + len - 4, ".exe") != 0
- && strcasecmp (output_filename + len - 4, ".dll") != 0))
- {
- FILE *src;
- FILE *dst;
- const int bsize = 4096;
- char *buf = xmalloc (bsize);
- int l;
- char *dst_name = xmalloc (len + 5);
-
- strcpy (dst_name, output_filename);
- strcat (dst_name, ".exe");
- src = fopen (output_filename, FOPEN_RB);
- dst = fopen (dst_name, FOPEN_WB);
-
- if (!src)
- einfo (_("%X%P: unable to open for source of copy `%s'\n"),
- output_filename);
- if (!dst)
- einfo (_("%X%P: unable to open for destination of copy `%s'\n"),
- dst_name);
- while ((l = fread (buf, 1, bsize, src)) > 0)
- {
- int done = fwrite (buf, 1, l, dst);
-
- if (done != l)
- einfo (_("%P: Error writing file `%s'\n"), dst_name);
- }
-
- fclose (src);
- if (fclose (dst) == EOF)
- einfo (_("%P: Error closing file `%s'\n"), dst_name);
- free (dst_name);
- free (buf);
- }
- }
- }
-
- END_PROGRESS (program_name);
-
- if (config.stats)
- {
-#ifdef HAVE_SBRK
- char *lim = sbrk (0);
-#endif
- long run_time = get_run_time () - start_time;
-
- fprintf (stderr, _("%s: total time in link: %ld.%06ld\n"),
- program_name, run_time / 1000000, run_time % 1000000);
-#ifdef HAVE_SBRK
- fprintf (stderr, _("%s: data size %ld\n"), program_name,
- (long) (lim - (char *) &environ));
-#endif
- }
-
- /* Prevent remove_output from doing anything, after a successful link. */
- output_filename = NULL;
-
- xexit (0);
- return 0;
-}
-
-/* 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). */
-
-static char *
-get_emulation (int argc, char **argv)
-{
- char *emulation;
- int i;
-
- emulation = getenv (EMULATION_ENVIRON);
- if (emulation == NULL)
- emulation = DEFAULT_EMULATION;
-
- for (i = 1; i < argc; i++)
- {
- if (!strncmp (argv[i], "-m", 2))
- {
- if (argv[i][2] == '\0')
- {
- /* -m EMUL */
- if (i < argc - 1)
- {
- emulation = argv[i + 1];
- i++;
- }
- else
- einfo (_("%P%F: missing argument to -m\n"));
- }
- else if (strcmp (argv[i], "-mips1") == 0
- || strcmp (argv[i], "-mips2") == 0
- || strcmp (argv[i], "-mips3") == 0
- || strcmp (argv[i], "-mips4") == 0
- || strcmp (argv[i], "-mips5") == 0
- || strcmp (argv[i], "-mips32") == 0
- || strcmp (argv[i], "-mips32r2") == 0
- || strcmp (argv[i], "-mips64") == 0
- || strcmp (argv[i], "-mips64r2") == 0)
- {
- /* FIXME: The arguments -mips1, -mips2, -mips3, etc. are
- passed to the linker by some MIPS compilers. They
- generally tell the linker to use a slightly different
- library path. Perhaps someday these should be
- implemented as emulations; until then, we just ignore
- the arguments and hope that nobody ever creates
- emulations named ips1, ips2 or ips3. */
- }
- else if (strcmp (argv[i], "-m486") == 0)
- {
- /* FIXME: The argument -m486 is passed to the linker on
- some Linux systems. Hope that nobody creates an
- emulation named 486. */
- }
- else
- {
- /* -mEMUL */
- emulation = &argv[i][2];
- }
- }
- }
-
- return emulation;
-}
-
-/* If directory DIR contains an "ldscripts" subdirectory,
- add DIR to the library search path and return TRUE,
- else return FALSE. */
-
-static bfd_boolean
-check_for_scripts_dir (char *dir)
-{
- size_t dirlen;
- char *buf;
- struct stat s;
- bfd_boolean res;
-
- dirlen = strlen (dir);
- /* sizeof counts the terminating NUL. */
- buf = xmalloc (dirlen + sizeof ("/ldscripts"));
- sprintf (buf, "%s/ldscripts", dir);
-
- res = stat (buf, &s) == 0 && S_ISDIR (s.st_mode);
- free (buf);
- if (res)
- ldfile_add_library_path (dir, FALSE);
- return res;
-}
-
-/* Set the default directory for finding script files.
- Libraries will be searched for here too, but that's ok.
- We look for the "ldscripts" directory in:
-
- SCRIPTDIR (passed from Makefile)
- (adjusted according to the current location of the binary)
- SCRIPTDIR (passed from Makefile)
- the dir where this program is (for using it from the build tree)
- the dir where this program is/../lib
- (for installing the tool suite elsewhere). */
-
-static void
-set_scripts_dir (void)
-{
- char *end, *dir;
- size_t dirlen;
- bfd_boolean found;
-
- dir = make_relative_prefix (program_name, BINDIR, SCRIPTDIR);
- if (dir)
- {
- found = check_for_scripts_dir (dir);
- free (dir);
- if (found)
- return;
- }
-
- dir = make_relative_prefix (program_name, TOOLBINDIR, SCRIPTDIR);
- if (dir)
- {
- found = check_for_scripts_dir (dir);
- free (dir);
- if (found)
- return;
- }
-
- if (check_for_scripts_dir (SCRIPTDIR))
- /* We've been installed normally. */
- return;
-
- /* Look for "ldscripts" in the dir where our binary is. */
- end = strrchr (program_name, '/');
-#ifdef HAVE_DOS_BASED_FILE_SYSTEM
- {
- /* We could have \foo\bar, or /foo\bar. */
- char *bslash = strrchr (program_name, '\\');
-
- if (end == NULL || (bslash != NULL && bslash > end))
- end = bslash;
- }
-#endif
-
- if (end == NULL)
- /* Don't look for ldscripts in the current directory. There is
- too much potential for confusion. */
- return;
-
- dirlen = end - program_name;
- /* Make a copy of program_name in dir.
- Leave room for later "/../lib". */
- dir = xmalloc (dirlen + 8);
- strncpy (dir, program_name, dirlen);
- dir[dirlen] = '\0';
-
- if (check_for_scripts_dir (dir))
- {
- free (dir);
- return;
- }
-
- /* Look for "ldscripts" in <the dir where our binary is>/../lib. */
- strcpy (dir + dirlen, "/../lib");
- check_for_scripts_dir (dir);
- free (dir);
-}
-
-void
-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))
- einfo (_("%P%F: bfd_hash_table_init failed: %E\n"));
- }
-
- if (bfd_hash_lookup (link_info.notice_hash, name, TRUE, TRUE) == NULL)
- einfo (_("%P%F: bfd_hash_lookup failed: %E\n"));
-}
-
-/* Record a symbol to be wrapped, from the --wrap option. */
-
-void
-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))
- einfo (_("%P%F: bfd_hash_table_init failed: %E\n"));
- }
-
- if (bfd_hash_lookup (link_info.wrap_hash, name, TRUE, TRUE) == NULL)
- einfo (_("%P%F: bfd_hash_lookup failed: %E\n"));
-}
-
-/* Handle the -retain-symbols-file option. */
-
-void
-add_keepsyms_file (const char *filename)
-{
- FILE *file;
- char *buf;
- size_t bufsize;
- int c;
-
- if (link_info.strip == strip_some)
- einfo (_("%X%P: error: duplicate retain-symbols-file\n"));
-
- file = fopen (filename, "r");
- if (file == NULL)
- {
- bfd_set_error (bfd_error_system_call);
- einfo ("%X%P: %s: %E\n", filename);
- return;
- }
-
- link_info.keep_hash = xmalloc (sizeof (struct bfd_hash_table));
- if (! bfd_hash_table_init (link_info.keep_hash, bfd_hash_newfunc))
- einfo (_("%P%F: bfd_hash_table_init failed: %E\n"));
-
- bufsize = 100;
- buf = xmalloc (bufsize);
-
- c = getc (file);
- while (c != EOF)
- {
- while (ISSPACE (c))
- c = getc (file);
-
- if (c != EOF)
- {
- size_t len = 0;
-
- while (! ISSPACE (c) && c != EOF)
- {
- buf[len] = c;
- ++len;
- if (len >= bufsize)
- {
- bufsize *= 2;
- buf = xrealloc (buf, bufsize);
- }
- c = getc (file);
- }
-
- buf[len] = '\0';
-
- if (bfd_hash_lookup (link_info.keep_hash, buf, TRUE, TRUE) == NULL)
- einfo (_("%P%F: bfd_hash_lookup for insertion failed: %E\n"));
- }
- }
-
- if (link_info.strip != strip_none)
- einfo (_("%P: `-retain-symbols-file' overrides `-s' and `-S'\n"));
-
- free (buf);
- link_info.strip = strip_some;
-}
-
-/* Callbacks from the BFD linker routines. */
-
-/* This is called when BFD has decided to include an archive member in
- a link. */
-
-static bfd_boolean
-add_archive_element (struct bfd_link_info *info ATTRIBUTE_UNUSED,
- bfd *abfd,
- const char *name)
-{
- lang_input_statement_type *input;
-
- input = xmalloc (sizeof (lang_input_statement_type));
- input->filename = abfd->filename;
- input->local_sym_name = abfd->filename;
- input->the_bfd = abfd;
- input->asymbols = NULL;
- input->next = NULL;
- input->just_syms_flag = FALSE;
- input->loaded = FALSE;
- input->search_dirs_flag = FALSE;
-
- /* FIXME: The following fields are not set: header.next,
- header.type, closed, passive_position, symbol_count,
- next_real_file, is_archive, target, real. This bit of code is
- from the old decode_library_subfile function. I don't know
- whether any of those fields matters. */
-
- ldlang_add_file (input);
-
- if (config.map_file != NULL)
- {
- static bfd_boolean header_printed;
- struct bfd_link_hash_entry *h;
- bfd *from;
- int len;
-
- h = bfd_link_hash_lookup (link_info.hash, name, FALSE, FALSE, TRUE);
-
- if (h == NULL)
- from = NULL;
- else
- {
- switch (h->type)
- {
- default:
- from = NULL;
- break;
-
- case bfd_link_hash_defined:
- case bfd_link_hash_defweak:
- from = h->u.def.section->owner;
- break;
-
- case bfd_link_hash_undefined:
- case bfd_link_hash_undefweak:
- from = h->u.undef.abfd;
- break;
-
- case bfd_link_hash_common:
- from = h->u.c.p->section->owner;
- break;
- }
- }
-
- if (! header_printed)
- {
- char buf[100];
-
- sprintf (buf, _("Archive member included because of file (symbol)\n\n"));
- minfo ("%s", buf);
- header_printed = TRUE;
- }
-
- if (bfd_my_archive (abfd) == NULL)
- {
- minfo ("%s", bfd_get_filename (abfd));
- len = strlen (bfd_get_filename (abfd));
- }
- else
- {
- minfo ("%s(%s)", bfd_get_filename (bfd_my_archive (abfd)),
- bfd_get_filename (abfd));
- len = (strlen (bfd_get_filename (bfd_my_archive (abfd)))
- + strlen (bfd_get_filename (abfd))
- + 2);
- }
-
- if (len >= 29)
- {
- print_nl ();
- len = 0;
- }
- while (len < 30)
- {
- print_space ();
- ++len;
- }
-
- if (from != NULL)
- minfo ("%B ", from);
- if (h != NULL)
- minfo ("(%T)\n", h->root.string);
- else
- minfo ("(%s)\n", name);
- }
-
- if (trace_files || trace_file_tries)
- info_msg ("%I\n", input);
-
- return TRUE;
-}
-
-/* This is called when BFD has discovered a symbol which is defined
- multiple times. */
-
-static bfd_boolean
-multiple_definition (struct bfd_link_info *info ATTRIBUTE_UNUSED,
- const char *name,
- bfd *obfd,
- asection *osec,
- bfd_vma oval,
- bfd *nbfd,
- asection *nsec,
- bfd_vma nval)
-{
- /* If either section has the output_section field set to
- bfd_abs_section_ptr, it means that the section is being
- discarded, and this is not really a multiple definition at all.
- FIXME: It would be cleaner to somehow ignore symbols defined in
- sections which are being discarded. */
- if ((osec->output_section != NULL
- && ! bfd_is_abs_section (osec)
- && bfd_is_abs_section (osec->output_section))
- || (nsec->output_section != NULL
- && ! bfd_is_abs_section (nsec)
- && bfd_is_abs_section (nsec->output_section)))
- return TRUE;
-
- einfo (_("%X%C: multiple definition of `%T'\n"),
- nbfd, nsec, nval, name);
- if (obfd != NULL)
- einfo (_("%D: first defined here\n"), obfd, osec, oval);
-
- if (command_line.relax)
- {
- einfo (_("%P: Disabling relaxation: it will not work with multiple definitions\n"));
- command_line.relax = 0;
- }
-
- return TRUE;
-}
-
-/* This is called when there is a definition of a common symbol, or
- when a common symbol is found for a symbol that is already defined,
- or when two common symbols are found. We only do something if
- -warn-common was used. */
-
-static bfd_boolean
-multiple_common (struct bfd_link_info *info ATTRIBUTE_UNUSED,
- const char *name,
- bfd *obfd,
- enum bfd_link_hash_type otype,
- bfd_vma osize,
- bfd *nbfd,
- enum bfd_link_hash_type ntype,
- bfd_vma nsize)
-{
- if (! config.warn_common)
- return TRUE;
-
- if (ntype == bfd_link_hash_defined
- || ntype == bfd_link_hash_defweak
- || ntype == bfd_link_hash_indirect)
- {
- ASSERT (otype == bfd_link_hash_common);
- einfo (_("%B: warning: definition of `%T' overriding common\n"),
- nbfd, name);
- if (obfd != NULL)
- einfo (_("%B: warning: common is here\n"), obfd);
- }
- else if (otype == bfd_link_hash_defined
- || otype == bfd_link_hash_defweak
- || otype == bfd_link_hash_indirect)
- {
- ASSERT (ntype == bfd_link_hash_common);
- einfo (_("%B: warning: common of `%T' overridden by definition\n"),
- nbfd, name);
- if (obfd != NULL)
- einfo (_("%B: warning: defined here\n"), obfd);
- }
- else
- {
- ASSERT (otype == bfd_link_hash_common && ntype == bfd_link_hash_common);
- if (osize > nsize)
- {
- einfo (_("%B: warning: common of `%T' overridden by larger common\n"),
- nbfd, name);
- if (obfd != NULL)
- einfo (_("%B: warning: larger common is here\n"), obfd);
- }
- else if (nsize > osize)
- {
- einfo (_("%B: warning: common of `%T' overriding smaller common\n"),
- nbfd, name);
- if (obfd != NULL)
- einfo (_("%B: warning: smaller common is here\n"), obfd);
- }
- else
- {
- einfo (_("%B: warning: multiple common of `%T'\n"), nbfd, name);
- if (obfd != NULL)
- einfo (_("%B: warning: previous common is here\n"), obfd);
- }
- }
-
- return TRUE;
-}
-
-/* This is called when BFD has discovered a set element. H is the
- entry in the linker hash table for the set. SECTION and VALUE
- represent a value which should be added to the set. */
-
-static bfd_boolean
-add_to_set (struct bfd_link_info *info ATTRIBUTE_UNUSED,
- struct bfd_link_hash_entry *h,
- bfd_reloc_code_real_type reloc,
- bfd *abfd,
- asection *section,
- bfd_vma value)
-{
- if (config.warn_constructors)
- einfo (_("%P: warning: global constructor %s used\n"),
- h->root.string);
-
- if (! config.build_constructors)
- return TRUE;
-
- ldctor_add_set_entry (h, reloc, NULL, section, value);
-
- if (h->type == bfd_link_hash_new)
- {
- h->type = bfd_link_hash_undefined;
- h->u.undef.abfd = abfd;
- /* We don't call bfd_link_add_undef to add this to the list of
- undefined symbols because we are going to define it
- ourselves. */
- }
-
- return TRUE;
-}
-
-/* This is called when BFD has discovered a constructor. This is only
- called for some object file formats--those which do not handle
- constructors in some more clever fashion. This is similar to
- adding an element to a set, but less general. */
-
-static bfd_boolean
-constructor_callback (struct bfd_link_info *info,
- bfd_boolean constructor,
- const char *name,
- bfd *abfd,
- asection *section,
- bfd_vma value)
-{
- char *s;
- struct bfd_link_hash_entry *h;
- char set_name[1 + sizeof "__CTOR_LIST__"];
-
- if (config.warn_constructors)
- einfo (_("%P: warning: global constructor %s used\n"), name);
-
- if (! config.build_constructors)
- return TRUE;
-
- /* 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
- || bfd_reloc_type_lookup (abfd, BFD_RELOC_CTOR) == NULL))
- einfo (_("%P%F: BFD backend error: BFD_RELOC_CTOR unsupported\n"));
-
- s = set_name;
- if (bfd_get_symbol_leading_char (abfd) != '\0')
- *s++ = bfd_get_symbol_leading_char (abfd);
- if (constructor)
- strcpy (s, "__CTOR_LIST__");
- else
- strcpy (s, "__DTOR_LIST__");
-
- h = bfd_link_hash_lookup (info->hash, set_name, 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 = abfd;
- /* We don't call bfd_link_add_undef to add this to the list of
- undefined symbols because we are going to define it
- ourselves. */
- }
-
- ldctor_add_set_entry (h, BFD_RELOC_CTOR, name, section, value);
- return TRUE;
-}
-
-/* A structure used by warning_callback to pass information through
- bfd_map_over_sections. */
-
-struct warning_callback_info
-{
- bfd_boolean found;
- const char *warning;
- const char *symbol;
- asymbol **asymbols;
-};
-
-/* This is called when there is a reference to a warning symbol. */
-
-static bfd_boolean
-warning_callback (struct bfd_link_info *info ATTRIBUTE_UNUSED,
- const char *warning,
- const char *symbol,
- bfd *abfd,
- asection *section,
- bfd_vma address)
-{
- /* This is a hack to support warn_multiple_gp. FIXME: This should
- have a cleaner interface, but what? */
- if (! config.warn_multiple_gp
- && strcmp (warning, "using multiple gp values") == 0)
- return TRUE;
-
- if (section != NULL)
- einfo ("%C: %s\n", abfd, section, address, warning);
- else if (abfd == NULL)
- einfo ("%P: %s\n", warning);
- else if (symbol == NULL)
- einfo ("%B: %s\n", abfd, warning);
- else
- {
- lang_input_statement_type *entry;
- asymbol **asymbols;
- struct warning_callback_info info;
-
- /* Look through the relocs to see if we can find a plausible
- address. */
- entry = (lang_input_statement_type *) abfd->usrdata;
- if (entry != NULL && entry->asymbols != NULL)
- asymbols = entry->asymbols;
- else
- {
- 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 (entry != NULL)
- {
- entry->asymbols = asymbols;
- entry->symbol_count = symbol_count;
- }
- }
-
- info.found = FALSE;
- info.warning = warning;
- info.symbol = symbol;
- info.asymbols = asymbols;
- bfd_map_over_sections (abfd, warning_find_reloc, &info);
-
- if (! info.found)
- einfo ("%B: %s\n", abfd, warning);
-
- if (entry == NULL)
- free (asymbols);
- }
-
- return TRUE;
-}
-
-/* This is called by warning_callback for each section. It checks the
- relocs of the section to see if it can find a reference to the
- symbol which triggered the warning. If it can, it uses the reloc
- to give an error message with a file and line number. */
-
-static void
-warning_find_reloc (bfd *abfd, asection *sec, void *iarg)
-{
- struct warning_callback_info *info = iarg;
- long relsize;
- arelent **relpp;
- long relcount;
- arelent **p, **pend;
-
- if (info->found)
- return;
-
- relsize = bfd_get_reloc_upper_bound (abfd, sec);
- if (relsize < 0)
- einfo (_("%B%F: could not read relocs: %E\n"), abfd);
- if (relsize == 0)
- return;
-
- relpp = xmalloc (relsize);
- relcount = bfd_canonicalize_reloc (abfd, sec, relpp, info->asymbols);
- if (relcount < 0)
- einfo (_("%B%F: could not read relocs: %E\n"), abfd);
-
- p = relpp;
- pend = p + relcount;
- for (; p < pend && *p != NULL; p++)
- {
- arelent *q = *p;
-
- if (q->sym_ptr_ptr != NULL
- && *q->sym_ptr_ptr != NULL
- && 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);
- info->found = TRUE;
- break;
- }
- }
-
- free (relpp);
-}
-
-/* This is called when an undefined symbol is found. */
-
-static bfd_boolean
-undefined_symbol (struct bfd_link_info *info ATTRIBUTE_UNUSED,
- const char *name,
- bfd *abfd,
- asection *section,
- bfd_vma address,
- bfd_boolean error)
-{
- static char *error_name;
- static unsigned int error_count;
-
-#define MAX_ERRORS_IN_A_ROW 5
-
- if (config.warn_once)
- {
- static struct bfd_hash_table *hash;
-
- /* 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)
- return TRUE;
-
- if (bfd_hash_lookup (hash, name, TRUE, TRUE) == NULL)
- einfo (_("%F%P: bfd_hash_lookup failed: %E\n"));
- }
-
- /* We never print more than a reasonable number of errors in a row
- for a single symbol. */
- if (error_name != NULL
- && strcmp (name, error_name) == 0)
- ++error_count;
- else
- {
- error_count = 0;
- if (error_name != NULL)
- free (error_name);
- error_name = xstrdup (name);
- }
-
- if (section != NULL)
- {
- if (error_count < MAX_ERRORS_IN_A_ROW)
- {
- if (error)
- einfo (_("%X%C: undefined reference to `%T'\n"),
- abfd, section, address, name);
- else
- einfo (_("%C: warning: undefined reference to `%T'\n"),
- abfd, section, address, name);
- }
- else if (error_count == MAX_ERRORS_IN_A_ROW)
- {
- if (error)
- einfo (_("%X%D: more undefined references to `%T' follow\n"),
- abfd, section, address, name);
- else
- einfo (_("%D: warning: more undefined references to `%T' follow\n"),
- abfd, section, address, name);
- }
- else if (error)
- einfo ("%X");
- }
- else
- {
- if (error_count < MAX_ERRORS_IN_A_ROW)
- {
- if (error)
- einfo (_("%X%B: undefined reference to `%T'\n"),
- abfd, name);
- else
- einfo (_("%B: warning: undefined reference to `%T'\n"),
- abfd, name);
- }
- else if (error_count == MAX_ERRORS_IN_A_ROW)
- {
- if (error)
- einfo (_("%X%B: more undefined references to `%T' follow\n"),
- abfd, name);
- else
- einfo (_("%B: warning: more undefined references to `%T' follow\n"),
- abfd, name);
- }
- else if (error)
- einfo ("%X");
- }
-
- return TRUE;
-}
-
-/* Counter to limit the number of relocation overflow error messages
- to print. Errors are printed as it is decremented. When it's
- called and the counter is zero, a final message is printed
- indicating more relocations were omitted. When it gets to -1, no
- such errors are printed. If it's initially set to a value less
- than -1, all such errors will be printed (--verbose does this). */
-
-int overflow_cutoff_limit = 10;
-
-/* This is called when a reloc overflows. */
-
-static bfd_boolean
-reloc_overflow (struct bfd_link_info *info ATTRIBUTE_UNUSED,
- const char *name,
- const char *reloc_name,
- bfd_vma addend,
- bfd *abfd,
- asection *section,
- bfd_vma address)
-{
- if (overflow_cutoff_limit == -1)
- return TRUE;
-
- if (abfd == NULL)
- einfo (_("%P%X: generated"));
- else
- einfo ("%X%C:", abfd, section, address);
-
- if (overflow_cutoff_limit >= 0
- && overflow_cutoff_limit-- == 0)
- {
- einfo (_(" additional relocation overflows omitted from the output\n"));
- return TRUE;
- }
-
- einfo (_(" relocation truncated to fit: %s %T"), reloc_name, name);
- if (addend != 0)
- einfo ("+%v", addend);
- einfo ("\n");
- return TRUE;
-}
-
-/* This is called when a dangerous relocation is made. */
-
-static bfd_boolean
-reloc_dangerous (struct bfd_link_info *info ATTRIBUTE_UNUSED,
- const char *message,
- bfd *abfd,
- 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);
- return TRUE;
-}
-
-/* This is called when a reloc is being generated attached to a symbol
- that is not being output. */
-
-static bfd_boolean
-unattached_reloc (struct bfd_link_info *info ATTRIBUTE_UNUSED,
- const char *name,
- bfd *abfd,
- 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);
- return TRUE;
-}
-
-/* This is called if link_info.notice_all is set, or when a symbol in
- link_info.notice_hash is found. Symbols are put in notice_hash
- using the -y option. */
-
-static bfd_boolean
-notice (struct bfd_link_info *info,
- const char *name,
- bfd *abfd,
- asection *section,
- bfd_vma value)
-{
- if (! info->notice_all
- || (info->notice_hash != NULL
- && bfd_hash_lookup (info->notice_hash, name, FALSE, FALSE) != NULL))
- {
- if (bfd_is_und_section (section))
- einfo ("%B: reference to %s\n", abfd, name);
- else
- einfo ("%B: definition of %s\n", abfd, name);
- }
-
- if (command_line.cref || nocrossref_list != NULL)
- add_cref (name, abfd, section, value);
-
- return TRUE;
-}
diff --git a/contrib/binutils/ld/ldmain.h b/contrib/binutils/ld/ldmain.h
deleted file mode 100644
index 8cab5fe..0000000
--- a/contrib/binutils/ld/ldmain.h
+++ /dev/null
@@ -1,46 +0,0 @@
-/* ldmain.h -
- Copyright 1991, 1992, 1993, 1994, 1995, 1996, 1999, 2002, 2003, 2004
- 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 1, 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, 59 Temple Place - Suite 330, Boston, MA
- 02111-1307, USA. */
-
-#ifndef LDMAIN_H
-#define LDMAIN_H
-
-extern char *program_name;
-extern char *ld_sysroot;
-extern char *ld_canon_sysroot;
-extern int ld_canon_sysroot_len;
-extern bfd *output_bfd;
-extern char *default_target;
-extern bfd_boolean trace_files;
-extern bfd_boolean trace_file_tries;
-extern bfd_boolean version_printed;
-extern bfd_boolean whole_archive;
-extern bfd_boolean as_needed;
-extern bfd_boolean demangling;
-extern int g_switch_value;
-extern const char *output_filename;
-extern struct bfd_link_info link_info;
-extern int overflow_cutoff_limit;
-
-extern void add_ysym (const char *);
-extern void add_wrap (const char *);
-extern void add_keepsyms_file (const char *);
-
-#endif
diff --git a/contrib/binutils/ld/ldmisc.c b/contrib/binutils/ld/ldmisc.c
deleted file mode 100644
index def598d..0000000
--- a/contrib/binutils/ld/ldmisc.c
+++ /dev/null
@@ -1,552 +0,0 @@
-/* ldmisc.c
- Copyright 1991, 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999,
- 2000, 2002, 2003
- Free Software Foundation, Inc.
- Written by Steve Chamberlain of Cygnus Support.
-
- 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, 59 Temple Place - Suite 330, Boston, MA
- 02111-1307, USA. */
-
-#include "bfd.h"
-#include "bfdlink.h"
-#include "sysdep.h"
-#include "libiberty.h"
-#include "demangle.h"
-#include <stdarg.h>
-#include "ld.h"
-#include "ldmisc.h"
-#include "ldexp.h"
-#include "ldlang.h"
-#include <ldgram.h>
-#include "ldlex.h"
-#include "ldmain.h"
-#include "ldfile.h"
-
-/*
- %% literal %
- %F error is fatal
- %P print program name
- %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
- %d integer, like printf
- %u integer, like printf
-*/
-
-static void
-vfinfo (FILE *fp, const char *fmt, va_list arg)
-{
- bfd_boolean fatal = FALSE;
-
- while (*fmt != '\0')
- {
- while (*fmt != '%' && *fmt != '\0')
- {
- putc (*fmt, fp);
- fmt++;
- }
-
- if (*fmt == '%')
- {
- fmt++;
- switch (*fmt++)
- {
- default:
- fprintf (fp, "%%%c", fmt[-1]);
- break;
-
- case '%':
- /* literal % */
- putc ('%', fp);
- break;
-
- case 'X':
- /* no object output, fail return */
- config.make_executable = FALSE;
- break;
-
- case 'V':
- /* hex bfd_vma */
- {
- bfd_vma value = va_arg (arg, bfd_vma);
- fprintf_vma (fp, value);
- }
- break;
-
- case 'v':
- /* hex bfd_vma, no leading zeros */
- {
- char buf[100];
- char *p = buf;
- bfd_vma value = va_arg (arg, bfd_vma);
- sprintf_vma (p, value);
- while (*p == '0')
- p++;
- if (!*p)
- p--;
- fputs (p, fp);
- }
- break;
-
- case 'W':
- /* hex bfd_vma with 0x with no leading zeroes taking up
- 8 spaces. */
- {
- char buf[100];
- bfd_vma value;
- char *p;
- int len;
-
- value = va_arg (arg, bfd_vma);
- sprintf_vma (buf, value);
- for (p = buf; *p == '0'; ++p)
- ;
- if (*p == '\0')
- --p;
- len = strlen (p);
- while (len < 8)
- {
- putc (' ', fp);
- ++len;
- }
- fprintf (fp, "0x%s", p);
- }
- break;
-
- case 'T':
- /* Symbol name. */
- {
- 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
- {
- char *demangled;
-
- demangled = demangle (name);
- fprintf (fp, "%s", demangled);
- free (demangled);
- }
- }
- break;
-
- case 'B':
- /* filename from a bfd */
- {
- bfd *abfd = va_arg (arg, bfd *);
- if (abfd->my_archive)
- fprintf (fp, "%s(%s)", abfd->my_archive->filename,
- abfd->filename);
- else
- fprintf (fp, "%s", abfd->filename);
- }
- break;
-
- case 'F':
- /* Error is fatal. */
- fatal = TRUE;
- break;
-
- case 'P':
- /* Print program name. */
- fprintf (fp, "%s", program_name);
- break;
-
- case 'E':
- /* current bfd error or errno */
- fprintf (fp, "%s", bfd_errmsg (bfd_get_error ()));
- break;
-
- case 'I':
- /* filename from a lang_input_statement_type */
- {
- lang_input_statement_type *i;
-
- i = va_arg (arg, lang_input_statement_type *);
- if (bfd_my_archive (i->the_bfd) != NULL)
- fprintf (fp, "(%s)",
- bfd_get_filename (bfd_my_archive (i->the_bfd)));
- fprintf (fp, "%s", i->local_sym_name);
- if (bfd_my_archive (i->the_bfd) == NULL
- && strcmp (i->local_sym_name, i->filename) != 0)
- fprintf (fp, " (%s)", i->filename);
- }
- break;
-
- case 'S':
- /* Print script file and linenumber. */
- if (parsing_defsym)
- fprintf (fp, "--defsym %s", lex_string);
- else if (ldfile_input_filename != NULL)
- fprintf (fp, "%s:%u", ldfile_input_filename, lineno);
- else
- fprintf (fp, _("built in linker script:%u"), lineno);
- break;
-
- case 'R':
- /* Print all that's interesting about a relent. */
- {
- arelent *relent = va_arg (arg, arelent *);
-
- lfinfo (fp, "%s+0x%v (type %s)",
- (*(relent->sym_ptr_ptr))->name,
- relent->addend,
- relent->howto->name);
- }
- break;
-
- case 'C':
- case 'D':
- case 'G':
- /* Clever filename:linenumber with function name if possible.
- The arguments are a BFD, a section, and an offset. */
- {
- static bfd *last_bfd;
- static char *last_file = NULL;
- static char *last_function = NULL;
- bfd *abfd;
- asection *section;
- bfd_vma offset;
- lang_input_statement_type *entry;
- asymbol **asymbols;
- const char *filename;
- const char *functionname;
- unsigned int linenumber;
- bfd_boolean discard_last;
-
- abfd = va_arg (arg, bfd *);
- 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;
- 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->asymbols = asymbols;
- entry->symbol_count = symbol_count;
- }
- }
-
- lfinfo (fp, "%B(%s+0x%v)", abfd, section->name, offset);
-
- discard_last = TRUE;
- if (bfd_find_nearest_line (abfd, section, asymbols, offset,
- &filename, &functionname,
- &linenumber))
- {
- bfd_boolean need_colon = TRUE;
-
- if (functionname != NULL && fmt[-1] == 'C')
- {
- if (last_bfd == NULL
- || last_file == NULL
- || last_function == NULL
- || last_bfd != abfd
- || (filename != NULL
- && strcmp (last_file, filename) != 0)
- || strcmp (last_function, functionname) != 0)
- {
- lfinfo (fp, _(": In function `%T':\n"),
- functionname);
- need_colon = FALSE;
-
- last_bfd = abfd;
- if (last_file != NULL)
- free (last_file);
- last_file = NULL;
- if (filename)
- last_file = xstrdup (filename);
- if (last_function != NULL)
- free (last_function);
- last_function = xstrdup (functionname);
- }
- discard_last = FALSE;
- }
-
- if (filename != NULL)
- {
- if (need_colon)
- putc (':', fp);
- fputs (filename, fp);
- }
-
- if (functionname != NULL && fmt[-1] == 'G')
- lfinfo (fp, ":%T", functionname);
- else if (filename != NULL && linenumber != 0)
- fprintf (fp, ":%u", linenumber);
- }
-
- if (asymbols != NULL && entry == NULL)
- free (asymbols);
-
- if (discard_last)
- {
- last_bfd = NULL;
- if (last_file != NULL)
- {
- free (last_file);
- last_file = NULL;
- }
- if (last_function != NULL)
- {
- free (last_function);
- last_function = NULL;
- }
- }
- }
- break;
-
- case 's':
- /* arbitrary string, like printf */
- fprintf (fp, "%s", va_arg (arg, char *));
- break;
-
- case 'd':
- /* integer, like printf */
- fprintf (fp, "%d", va_arg (arg, int));
- break;
-
- case 'u':
- /* unsigned integer, like printf */
- fprintf (fp, "%u", va_arg (arg, unsigned int));
- break;
- }
- }
- }
-
- if (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
- would be hosed by LynxOS, which defines that name in its libc.) */
-
-void
-info_msg (const char *fmt, ...)
-{
- va_list arg;
-
- va_start (arg, fmt);
- vfinfo (stdout, fmt, arg);
- va_end (arg);
-}
-
-/* ('e' for error.) Format info message and print on stderr. */
-
-void
-einfo (const char *fmt, ...)
-{
- va_list arg;
-
- va_start (arg, fmt);
- vfinfo (stderr, fmt, arg);
- va_end (arg);
-}
-
-void
-info_assert (const char *file, unsigned int line)
-{
- einfo (_("%F%P: internal error %s %d\n"), file, line);
-}
-
-/* ('m' for map) Format info message and print on map. */
-
-void
-minfo (const char *fmt, ...)
-{
- va_list arg;
-
- va_start (arg, fmt);
- vfinfo (config.map_file, fmt, arg);
- va_end (arg);
-}
-
-void
-lfinfo (FILE *file, const char *fmt, ...)
-{
- va_list arg;
-
- va_start (arg, fmt);
- vfinfo (file, fmt, arg);
- va_end (arg);
-}
-
-/* Functions to print the link map. */
-
-void
-print_space (void)
-{
- fprintf (config.map_file, " ");
-}
-
-void
-print_nl (void)
-{
- fprintf (config.map_file, "\n");
-}
-
-/* A more or less friendly abort message. In ld.h abort is defined to
- call this function. */
-
-void
-ld_abort (const char *file, int line, const char *fn)
-{
- if (fn != NULL)
- einfo (_("%P: internal error: aborting at %s line %d in %s\n"),
- file, line, fn);
- else
- einfo (_("%P: internal error: aborting at %s line %d\n"),
- file, line);
- 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
deleted file mode 100644
index b2812fb..0000000
--- a/contrib/binutils/ld/ldmisc.h
+++ /dev/null
@@ -1,46 +0,0 @@
-/* ldmisc.h -
- Copyright 1991, 1992, 1993, 1994, 1996, 1997, 2001, 2003
- 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, 59 Temple Place - Suite 330, Boston,
- MA 02111-1307, 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 *, ...);
-extern void lfinfo (FILE *, const char *, ...);
-extern void info_assert (const char *, unsigned int);
-extern void yyerror (const char *);
-extern void *xmalloc (size_t);
-extern void *xrealloc (void *, size_t);
-extern void xexit (int);
-
-#define ASSERT(x) \
-do { if (!(x)) info_assert(__FILE__,__LINE__); } while (0)
-
-#define FAIL() \
-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
deleted file mode 100644
index 710bf90..0000000
--- a/contrib/binutils/ld/ldver.c
+++ /dev/null
@@ -1,59 +0,0 @@
-/* ldver.c -- Print linker version.
- Copyright 1991, 1992, 1993, 1994, 1995, 1996, 1997, 2000, 2001, 2002
- 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., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */
-
-#include <stdio.h>
-#include "bfd.h"
-#include "bfdver.h"
-#include "sysdep.h"
-
-#include "ld.h"
-#include "ldver.h"
-#include "ldexp.h"
-#include "ldlang.h"
-#include "ldfile.h"
-#include "ldemul.h"
-#include "ldmain.h"
-
-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);
-
- if (noisy & 2)
- {
- printf (_("Copyright 2002 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"));
- }
-
- if (noisy & 1)
- {
- ld_emulation_xfer_type **ptr = ld_emulations;
-
- printf (_(" Supported emulations:\n"));
- while (*ptr)
- {
- printf (" %s\n", (*ptr)->emulation_name);
- ptr++;
- }
- }
-}
diff --git a/contrib/binutils/ld/ldver.h b/contrib/binutils/ld/ldver.h
deleted file mode 100644
index fd840a8..0000000
--- a/contrib/binutils/ld/ldver.h
+++ /dev/null
@@ -1,20 +0,0 @@
-/* ldver.h -- Header file for ldver.c.
- Copyright 1991, 1992, 1993, 1996, 2003 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., 59 Temple Place - Suite 330, Boston, MA 02111-1307, 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
deleted file mode 100644
index e4bec32..0000000
--- a/contrib/binutils/ld/ldwrite.c
+++ /dev/null
@@ -1,576 +0,0 @@
-/* ldwrite.c -- write out the linked file
- Copyright 1991, 1992, 1993, 1994, 1995, 1996, 1997, 1998, 2000, 2002, 2003
- Free Software Foundation, Inc.
- Written by Steve Chamberlain sac@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. */
-
-#include "bfd.h"
-#include "sysdep.h"
-#include "bfdlink.h"
-#include "libiberty.h"
-#include "safe-ctype.h"
-
-#include "ld.h"
-#include "ldexp.h"
-#include "ldlang.h"
-#include "ldwrite.h"
-#include "ldmisc.h"
-#include <ldgram.h>
-#include "ldmain.h"
-
-/* Build link_order structures for the BFD linker. */
-
-static void
-build_link_order (lang_statement_union_type *statement)
-{
- switch (statement->header.type)
- {
- case lang_data_statement_enum:
- {
- asection *output_section;
- struct bfd_link_order *link_order;
- bfd_vma value;
- bfd_boolean big_endian = FALSE;
-
- output_section = statement->data_statement.output_section;
- ASSERT (output_section->owner == output_bfd);
-
- link_order = bfd_new_link_order (output_bfd, output_section);
- if (link_order == NULL)
- 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->u.data.contents = xmalloc (QUAD_SIZE);
-
- value = statement->data_statement.value;
-
- /* If the endianness of the output BFD is not known, then we
- base the endianness of the data on the first input file.
- By convention, the bfd_put routines for an unknown
- endianness are big endian, so we must swap here if the
- input file is little endian. */
- if (bfd_big_endian (output_bfd))
- big_endian = TRUE;
- else if (bfd_little_endian (output_bfd))
- big_endian = FALSE;
- else
- {
- bfd_boolean swap;
-
- swap = FALSE;
- if (command_line.endian == ENDIAN_BIG)
- big_endian = TRUE;
- else if (command_line.endian == ENDIAN_LITTLE)
- {
- big_endian = FALSE;
- swap = TRUE;
- }
- else if (command_line.endian == ENDIAN_UNSET)
- {
- big_endian = TRUE;
- {
- LANG_FOR_EACH_INPUT_STATEMENT (s)
- {
- if (s->the_bfd != NULL)
- {
- if (bfd_little_endian (s->the_bfd))
- {
- big_endian = FALSE;
- swap = TRUE;
- }
- break;
- }
- }
- }
- }
-
- if (swap)
- {
- bfd_byte buffer[8];
-
- switch (statement->data_statement.type)
- {
- case QUAD:
- case SQUAD:
- if (sizeof (bfd_vma) >= QUAD_SIZE)
- {
- bfd_putl64 (value, buffer);
- value = bfd_getb64 (buffer);
- break;
- }
- /* Fall through. */
- case LONG:
- bfd_putl32 (value, buffer);
- value = bfd_getb32 (buffer);
- break;
- case SHORT:
- bfd_putl16 (value, buffer);
- value = bfd_getb16 (buffer);
- break;
- case BYTE:
- break;
- default:
- abort ();
- }
- }
- }
-
- ASSERT (output_section->owner == output_bfd);
- switch (statement->data_statement.type)
- {
- case QUAD:
- case SQUAD:
- if (sizeof (bfd_vma) >= QUAD_SIZE)
- bfd_put_64 (output_bfd, value, link_order->u.data.contents);
- else
- {
- bfd_vma high;
-
- if (statement->data_statement.type == QUAD)
- high = 0;
- else if ((value & 0x80000000) == 0)
- high = 0;
- else
- high = (bfd_vma) -1;
- bfd_put_32 (output_bfd, high,
- (link_order->u.data.contents
- + (big_endian ? 0 : 4)));
- bfd_put_32 (output_bfd, value,
- (link_order->u.data.contents
- + (big_endian ? 4 : 0)));
- }
- link_order->size = QUAD_SIZE;
- break;
- case LONG:
- bfd_put_32 (output_bfd, value, link_order->u.data.contents);
- link_order->size = LONG_SIZE;
- break;
- case SHORT:
- bfd_put_16 (output_bfd, value, link_order->u.data.contents);
- link_order->size = SHORT_SIZE;
- break;
- case BYTE:
- bfd_put_8 (output_bfd, value, link_order->u.data.contents);
- link_order->size = BYTE_SIZE;
- break;
- default:
- abort ();
- }
- }
- break;
-
- case lang_reloc_statement_enum:
- {
- lang_reloc_statement_type *rs;
- asection *output_section;
- struct bfd_link_order *link_order;
-
- rs = &statement->reloc_statement;
-
- output_section = rs->output_section;
- ASSERT (output_section->owner == output_bfd);
-
- link_order = bfd_new_link_order (output_bfd, output_section);
- if (link_order == NULL)
- einfo (_("%P%F: bfd_new_link_order failed\n"));
-
- link_order->offset = rs->output_vma;
- link_order->size = bfd_get_reloc_size (rs->howto);
-
- link_order->u.reloc.p = xmalloc (sizeof (struct bfd_link_order_reloc));
-
- link_order->u.reloc.p->reloc = rs->reloc;
- link_order->u.reloc.p->addend = rs->addend_value;
-
- if (rs->name == NULL)
- {
- link_order->type = bfd_section_reloc_link_order;
- if (rs->section->owner == output_bfd)
- link_order->u.reloc.p->u.section = rs->section;
- else
- {
- link_order->u.reloc.p->u.section = rs->section->output_section;
- link_order->u.reloc.p->addend += rs->section->output_offset;
- }
- }
- else
- {
- link_order->type = bfd_symbol_reloc_link_order;
- link_order->u.reloc.p->u.name = rs->name;
- }
- }
- 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;
-
- ASSERT (output_section->owner == output_bfd);
-
- 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;
-
- 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 = "";
- 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;
- }
- }
- break;
-
- case lang_padding_statement_enum:
- /* Make a new link_order with the right filler */
- {
- asection *output_section;
- struct bfd_link_order *link_order;
-
- output_section = statement->padding_statement.output_section;
- ASSERT (statement->padding_statement.output_section->owner
- == output_bfd);
- if ((output_section->flags & SEC_HAS_CONTENTS) != 0)
- {
- link_order = bfd_new_link_order (output_bfd, output_section);
- link_order->type = bfd_data_link_order;
- link_order->size = statement->padding_statement.size;
- link_order->offset = statement->padding_statement.output_offset;
- link_order->u.data.contents = statement->padding_statement.fill->data;
- link_order->u.data.size = statement->padding_statement.fill->size;
- }
- }
- break;
-
- default:
- /* All the other ones fall through */
- break;
- }
-}
-
-/* Return true if NAME is the name of an unsplittable section. These
- are the stabs strings, dwarf strings. */
-
-static bfd_boolean
-unsplittable_name (const char *name)
-{
- if (strncmp (name, ".stab", 5) == 0)
- {
- /* There are several stab like string sections. We pattern match on
- ".stab...str" */
- unsigned len = strlen (name);
- if (strcmp (&name[len-3], "str") == 0)
- return TRUE;
- }
- else if (strcmp (name, "$GDB_STRINGS$") == 0)
- return TRUE;
- return FALSE;
-}
-
-/* Wander around the input sections, make sure that
- we'll never try and create an output section with more relocs
- than will fit.. Do this by always assuming the worst case, and
- creating new output sections with all the right bits. */
-#define TESTIT 1
-static asection *
-clone_section (bfd *abfd, asection *s, const char *name, int *count)
-{
- char *tname;
- char *sname;
- unsigned int len;
- asection *n;
- struct bfd_link_hash_entry *h;
-
- /* Invent a section name from the section name and a dotted numeric
- suffix. */
- len = strlen (name);
- tname = xmalloc (len + 1);
- memcpy (tname, name, len + 1);
- /* Remove a dotted number suffix, from a previous split link. */
- while (len && ISDIGIT (tname[len-1]))
- len--;
- if (len > 1 && tname[len-1] == '.')
- /* It was a dotted number. */
- tname[len-1] = 0;
-
- /* We want to use the whole of the original section name for the
- split name, but coff can be restricted to 8 character names. */
- if (bfd_family_coff (abfd) && strlen (tname) > 5)
- {
- /* Some section names cannot be truncated, as the name is
- used to locate some other section. */
- if (strncmp (name, ".stab", 5) == 0
- || strcmp (name, "$GDB_SYMBOLS$") == 0)
- {
- einfo (_ ("%F%P: cannot create split section name for %s\n"), name);
- /* Silence gcc warnings. einfo exits, so we never reach here. */
- return NULL;
- }
- tname[5] = 0;
- }
-
- if ((sname = bfd_get_unique_section_name (abfd, tname, count)) == NULL
- || (n = bfd_make_section_anyway (abfd, sname)) == NULL
- || (h = bfd_link_hash_lookup (link_info.hash,
- sname, TRUE, TRUE, FALSE)) == NULL)
- {
- einfo (_("%F%P: clone section failed: %E\n"));
- /* Silence gcc warnings. einfo exits, so we never reach here. */
- return NULL;
- }
- free (tname);
-
- /* Set up section symbol. */
- h->type = bfd_link_hash_defined;
- h->u.def.value = 0;
- h->u.def.section = n;
-
- n->flags = s->flags;
- 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->output_offset = s->output_offset;
- n->output_section = n;
- n->orelocation = 0;
- n->reloc_count = 0;
- n->alignment_power = s->alignment_power;
- return n;
-}
-
-#if TESTING
-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);
- while (l)
- {
- if (l->type == bfd_indirect_link_order)
- {
- printf ("%8x %s\n", l->offset, l->u.indirect.section->owner->filename);
- }
- else
- {
- printf (_("%8x something else\n"), l->offset);
- }
- l = l->next;
- }
- printf ("\n");
-}
-
-dump (char *s, asection *a1, asection *a2)
-{
- printf ("%s\n", s);
- ds (a1);
- ds (a2);
-}
-
-static void
-sanity_check (bfd *abfd)
-{
- asection *s;
- for (s = abfd->sections; s; s = s->next)
- {
- struct bfd_link_order *p;
- bfd_vma prev = 0;
- for (p = s->link_order_head; p; p = p->next)
- {
- if (p->offset > 100000)
- abort ();
- if (p->offset < prev)
- abort ();
- prev = p->offset;
- }
- }
-}
-#else
-#define sanity_check(a)
-#define dump(a, b, c)
-#endif
-
-static void
-split_sections (bfd *abfd, struct bfd_link_info *info)
-{
- asection *original_sec;
- int nsecs = abfd->section_count;
- sanity_check (abfd);
- /* Look through all the original sections. */
- for (original_sec = abfd->sections;
- original_sec && nsecs;
- original_sec = original_sec->next, nsecs--)
- {
- int count = 0;
- unsigned int lines = 0;
- unsigned int relocs = 0;
- bfd_size_type sec_size = 0;
- struct bfd_link_order *l;
- struct bfd_link_order *p;
- bfd_vma vma = original_sec->vma;
- asection *cursor = original_sec;
-
- /* 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)
- {
- unsigned int thislines = 0;
- unsigned int thisrelocs = 0;
- bfd_size_type thissize = 0;
- if (p->type == bfd_indirect_link_order)
- {
- asection *sec;
-
- sec = p->u.indirect.section;
-
- if (info->strip == strip_none
- || info->strip == strip_some)
- thislines = sec->lineno_count;
-
- if (info->relocatable)
- thisrelocs = sec->reloc_count;
-
- if (sec->_cooked_size != 0)
- thissize = sec->_cooked_size;
- else
- thissize = sec->_raw_size;
-
- }
- else if (info->relocatable
- && (p->type == bfd_section_reloc_link_order
- || p->type == bfd_symbol_reloc_link_order))
- thisrelocs++;
-
- if (l != NULL
- && (thisrelocs + relocs >= config.split_by_reloc
- || thislines + lines >= config.split_by_reloc
- || (thissize + sec_size >= config.split_by_file))
- && !unsplittable_name (cursor->name))
- {
- /* Create a new section and put this link order and the
- following link orders into it. */
- bfd_vma shift_offset;
- asection *n;
-
- n = clone_section (abfd, cursor, original_sec->name, &count);
-
- /* 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;
- l->next = NULL;
- l = p;
-
- /* Change the size of the original section and
- update the vma of the new one. */
-
- 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;
-
- vma += shift_offset;
- n->lma = n->vma = vma;
-
- /* Run down the chain and change the output section to
- the right one, update the offsets too. */
- do
- {
- p->offset -= shift_offset;
- if (p->type == bfd_indirect_link_order)
- {
- p->u.indirect.section->output_section = n;
- p->u.indirect.section->output_offset = p->offset;
- }
- p = p->next;
- }
- while (p);
-
- dump ("after snip", cursor, n);
- cursor = n;
- relocs = thisrelocs;
- lines = thislines;
- sec_size = thissize;
- }
- else
- {
- l = p;
- relocs += thisrelocs;
- lines += thislines;
- sec_size += thissize;
- }
- }
- }
- sanity_check (abfd);
-}
-
-/* Call BFD to write out the linked file. */
-
-void
-ldwrite (void)
-{
- /* Reset error indicator, which can typically something like invalid
- format from opening up the .o files. */
- bfd_set_error (bfd_error_no_error);
- lang_for_each_statement (build_link_order);
-
- if (config.split_by_reloc != (unsigned) -1
- || config.split_by_file != (bfd_size_type) -1)
- split_sections (output_bfd, &link_info);
- if (!bfd_final_link (output_bfd, &link_info))
- {
- /* If there was an error recorded, print it out. Otherwise assume
- an appropriate error message like unknown symbol was printed
- out. */
-
- if (bfd_get_error () != bfd_error_no_error)
- einfo (_("%F%P: final link failed: %E\n"));
- else
- xexit (1);
- }
-}
diff --git a/contrib/binutils/ld/ldwrite.h b/contrib/binutils/ld/ldwrite.h
deleted file mode 100644
index 13617c0..0000000
--- a/contrib/binutils/ld/ldwrite.h
+++ /dev/null
@@ -1,21 +0,0 @@
-/* ldwrite.h -
- Copyright 1991, 1992, 1993, 2003 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, 59 Temple Place - Suite 330,
- Boston, MA 02111-1307, USA. */
-
-void ldwrite (void);
diff --git a/contrib/binutils/ld/lexsup.c b/contrib/binutils/ld/lexsup.c
deleted file mode 100644
index b377bd4..0000000
--- a/contrib/binutils/ld/lexsup.c
+++ /dev/null
@@ -1,1387 +0,0 @@
-/* Parse options for the GNU linker.
- Copyright 1991, 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999, 2000,
- 2001, 2002, 2003, 2004
- 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, 59 Temple Place - Suite 330, Boston, MA
- 02111-1307, USA. */
-
-#include "bfd.h"
-#include "sysdep.h"
-#include "libiberty.h"
-#include <stdio.h>
-#include <string.h>
-#include "safe-ctype.h"
-#include "getopt.h"
-#include "bfdlink.h"
-#include "ld.h"
-#include "ldmain.h"
-#include "ldmisc.h"
-#include "ldexp.h"
-#include "ldlang.h"
-#include <ldgram.h>
-#include "ldlex.h"
-#include "ldfile.h"
-#include "ldver.h"
-#include "ldemul.h"
-#include "demangle.h"
-
-#ifndef PATH_SEPARATOR
-#if defined (__MSDOS__) || (defined (_WIN32) && ! defined (__CYGWIN32__))
-#define PATH_SEPARATOR ';'
-#else
-#define PATH_SEPARATOR ':'
-#endif
-#endif
-
-/* Somewhere above, sys/stat.h got included . . . . */
-#if !defined(S_ISDIR) && defined(S_IFDIR)
-#define S_ISDIR(m) (((m) & S_IFMT) == S_IFDIR)
-#endif
-
-static void set_default_dirlist (char *);
-static void set_section_start (char *, char *);
-static void help (void);
-
-/* Non-zero if we are processing a --defsym from the command line. */
-int parsing_defsym = 0;
-
-/* Codes used for the long options with no short synonyms. 150 isn't
- special; it's just an arbitrary non-ASCII char value. */
-enum option_values
-{
- OPTION_ASSERT = 150,
- OPTION_CALL_SHARED,
- OPTION_CREF,
- OPTION_DEFSYM,
- OPTION_DEMANGLE,
- OPTION_DYNAMIC_LINKER,
- OPTION_EB,
- OPTION_EL,
- OPTION_EMBEDDED_RELOCS,
- OPTION_EXPORT_DYNAMIC,
- OPTION_HELP,
- OPTION_IGNORE,
- OPTION_MAP,
- OPTION_NO_DEMANGLE,
- OPTION_NO_KEEP_MEMORY,
- OPTION_NO_WARN_MISMATCH,
- OPTION_NOINHIBIT_EXEC,
- OPTION_NON_SHARED,
- OPTION_NO_WHOLE_ARCHIVE,
- OPTION_OFORMAT,
- OPTION_RELAX,
- OPTION_RETAIN_SYMBOLS_FILE,
- OPTION_RPATH,
- OPTION_RPATH_LINK,
- OPTION_SHARED,
- OPTION_SONAME,
- OPTION_SORT_COMMON,
- OPTION_STATS,
- OPTION_SYMBOLIC,
- OPTION_TASK_LINK,
- OPTION_TBSS,
- OPTION_TDATA,
- OPTION_TTEXT,
- OPTION_TRADITIONAL_FORMAT,
- OPTION_UR,
- OPTION_VERBOSE,
- OPTION_VERSION,
- OPTION_VERSION_SCRIPT,
- OPTION_VERSION_EXPORTS_SECTION,
- OPTION_WARN_COMMON,
- OPTION_WARN_CONSTRUCTORS,
- OPTION_WARN_FATAL,
- OPTION_WARN_MULTIPLE_GP,
- OPTION_WARN_ONCE,
- OPTION_WARN_SECTION_ALIGN,
- OPTION_SPLIT_BY_RELOC,
- OPTION_SPLIT_BY_FILE ,
- OPTION_WHOLE_ARCHIVE,
- OPTION_AS_NEEDED,
- OPTION_NO_AS_NEEDED,
- OPTION_WRAP,
- OPTION_FORCE_EXE_SUFFIX,
- OPTION_GC_SECTIONS,
- OPTION_NO_GC_SECTIONS,
- OPTION_CHECK_SECTIONS,
- OPTION_NO_CHECK_SECTIONS,
- OPTION_NO_UNDEFINED,
- OPTION_INIT,
- OPTION_FINI,
- OPTION_SECTION_START,
- OPTION_UNIQUE,
- OPTION_TARGET_HELP,
- OPTION_ALLOW_SHLIB_UNDEFINED,
- OPTION_NO_ALLOW_SHLIB_UNDEFINED,
- OPTION_ALLOW_MULTIPLE_DEFINITION,
- OPTION_NO_UNDEFINED_VERSION,
- OPTION_DISCARD_NONE,
- OPTION_SPARE_DYNAMIC_TAGS,
- OPTION_NO_DEFINE_COMMON,
- OPTION_NOSTDLIB,
- OPTION_NO_OMAGIC,
- OPTION_STRIP_DISCARDED,
- OPTION_NO_STRIP_DISCARDED,
- OPTION_ACCEPT_UNKNOWN_INPUT_ARCH,
- OPTION_NO_ACCEPT_UNKNOWN_INPUT_ARCH,
- OPTION_PIE,
- OPTION_UNRESOLVED_SYMBOLS,
- OPTION_WARN_UNRESOLVED_SYMBOLS,
- OPTION_ERROR_UNRESOLVED_SYMBOLS
-};
-
-/* The long options. This structure is used for both the option
- parsing and the help text. */
-
-struct ld_option
-{
- /* The long option information. */
- struct option opt;
- /* The short option with the same meaning ('\0' if none). */
- char shortopt;
- /* The name of the argument (NULL if none). */
- const char *arg;
- /* The documentation string. If this is NULL, this is a synonym for
- the previous option. */
- const char *doc;
- enum {
- /* Use one dash before long option name. */
- ONE_DASH,
- /* Use two dashes before long option name. */
- TWO_DASHES,
- /* Only accept two dashes before the long option name.
- This is an overloading of the use of this enum, since originally it
- was only intended to tell the --help display function how to display
- the long option name. This feature was added in order to resolve
- the confusion about the -omagic command line switch. Is it setting
- the output file name to "magic" or is it setting the NMAGIC flag on
- the output ? It has been decided that it is setting the output file
- name, and that if you want to set the NMAGIC flag you should use -N
- or --omagic. */
- EXACTLY_TWO_DASHES,
- /* Don't mention this option in --help output. */
- NO_HELP
- } control;
-};
-
-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 },
- { {"architecture", required_argument, NULL, 'A'},
- '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 },
- { {"mri-script", required_argument, NULL, 'c'},
- '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 },
- { {"dp", no_argument, NULL, 'd'},
- '\0', NULL, NULL, ONE_DASH },
- { {"entry", required_argument, NULL, 'e'},
- '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 },
- { {"EB", no_argument, NULL, OPTION_EB},
- '\0', NULL, N_("Link big-endian objects"), ONE_DASH },
- { {"EL", no_argument, NULL, OPTION_EL},
- '\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 },
- { {"filter", required_argument, NULL, 'F'},
- 'F', N_("SHLIB"), N_("Filter for shared object symbol table"), TWO_DASHES },
- { {NULL, no_argument, NULL, '\0'},
- '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 },
- { {"soname", required_argument, NULL, OPTION_SONAME},
- '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 },
- { {"library", required_argument, NULL, 'l'},
- '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 },
- { {NULL, required_argument, NULL, '\0'},
- '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 },
- { {"nmagic", no_argument, NULL, 'n'},
- '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 },
- { {"no-omagic", no_argument, NULL, OPTION_NO_OMAGIC},
- '\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 },
- { {NULL, required_argument, NULL, '\0'},
- 'O', NULL, N_("Optimize output file"), ONE_DASH },
- { {"Qy", no_argument, NULL, OPTION_IGNORE},
- '\0', NULL, N_("Ignored for SVR4 compatibility"), ONE_DASH },
- { {"emit-relocs", no_argument, NULL, 'q'},
- 'q', NULL, "Generate relocations in final output", TWO_DASHES },
- { {"relocatable", no_argument, NULL, 'r'},
- 'r', NULL, N_("Generate relocatable output"), TWO_DASHES },
- { {NULL, no_argument, NULL, '\0'},
- '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 },
- { {"strip-all", no_argument, NULL, 's'},
- 's', NULL, N_("Strip all symbols"), TWO_DASHES },
- { {"strip-debug", no_argument, NULL, 'S'},
- '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 },
- { {"no-strip-discarded", no_argument, NULL, OPTION_NO_STRIP_DISCARDED},
- '\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 },
- { {"script", required_argument, NULL, 'T'},
- 'T', N_("FILE"), N_("Read linker script"), TWO_DASHES },
- { {"undefined", required_argument, NULL, 'u'},
- '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 },
- { {"Ur", no_argument, NULL, OPTION_UR},
- '\0', NULL, N_("Build global constructor/destructor tables"), ONE_DASH },
- { {"version", no_argument, NULL, OPTION_VERSION},
- 'v', NULL, N_("Print version information"), TWO_DASHES },
- { {NULL, no_argument, NULL, '\0'},
- '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 },
- { {"discard-locals", no_argument, NULL, 'X'},
- '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 },
- { {"trace-symbol", required_argument, NULL, 'y'},
- '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 },
- { {"start-group", no_argument, NULL, '('},
- '(', 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 },
- { {"assert", required_argument, NULL, OPTION_ASSERT},
- '\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 },
- { {"dy", no_argument, NULL, OPTION_CALL_SHARED},
- '\0', NULL, NULL, ONE_DASH },
- { {"call_shared", no_argument, NULL, OPTION_CALL_SHARED},
- '\0', NULL, NULL, ONE_DASH },
- { {"Bstatic", no_argument, NULL, OPTION_NON_SHARED},
- '\0', NULL, N_("Do not link against shared libraries"), ONE_DASH },
- { {"dn", no_argument, NULL, OPTION_NON_SHARED},
- '\0', NULL, NULL, ONE_DASH },
- { {"non_shared", no_argument, NULL, OPTION_NON_SHARED},
- '\0', NULL, NULL, ONE_DASH },
- { {"static", no_argument, NULL, OPTION_NON_SHARED},
- '\0', NULL, NULL, ONE_DASH },
- { {"Bsymbolic", no_argument, NULL, OPTION_SYMBOLIC},
- '\0', NULL, N_("Bind global references locally"), ONE_DASH },
- { {"check-sections", no_argument, NULL, OPTION_CHECK_SECTIONS},
- '\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 },
- { {"cref", no_argument, NULL, OPTION_CREF},
- '\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 },
- { {"demangle", optional_argument, NULL, OPTION_DEMANGLE},
- '\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},
- { {"fini", required_argument, NULL, OPTION_FINI},
- '\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},
- { {"gc-sections", no_argument, NULL, OPTION_GC_SECTIONS},
- '\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 },
- { {"help", no_argument, NULL, OPTION_HELP},
- '\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 },
- { {"Map", required_argument, NULL, OPTION_MAP},
- '\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 },
- { {"no-demangle", no_argument, NULL, OPTION_NO_DEMANGLE },
- '\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 },
- { {"no-undefined", no_argument, NULL, OPTION_NO_UNDEFINED},
- '\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 },
- { {"no-undefined-version", no_argument, NULL, OPTION_NO_UNDEFINED_VERSION},
- '\0', NULL, N_("Disallow undefined version"), TWO_DASHES },
- { {"no-warn-mismatch", no_argument, NULL, OPTION_NO_WARN_MISMATCH},
- '\0', NULL, N_("Don't warn about mismatched input files"), TWO_DASHES},
- { {"no-whole-archive", no_argument, NULL, OPTION_NO_WHOLE_ARCHIVE},
- '\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 },
- { {"noinhibit_exec", no_argument, NULL, OPTION_NOINHIBIT_EXEC},
- '\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 },
- { {"oformat", required_argument, NULL, OPTION_OFORMAT},
- '\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 },
- { {"relax", no_argument, NULL, OPTION_RELAX},
- '\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 },
- { {"rpath", required_argument, NULL, OPTION_RPATH},
- '\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 },
- { {"shared", no_argument, NULL, OPTION_SHARED},
- '\0', NULL, N_("Create a shared library"), ONE_DASH },
- { {"Bshareable", no_argument, NULL, OPTION_SHARED }, /* FreeBSD. */
- '\0', NULL, NULL, ONE_DASH },
- { {"pie", no_argument, NULL, OPTION_PIE},
- '\0', NULL, N_("Create a position independent executable"), ONE_DASH },
- { {"pic-executable", no_argument, NULL, OPTION_PIE},
- '\0', NULL, NULL, TWO_DASHES },
- { {"sort-common", no_argument, NULL, OPTION_SORT_COMMON},
- '\0', NULL, N_("Sort common symbols by size"), TWO_DASHES },
- { {"sort_common", no_argument, NULL, OPTION_SORT_COMMON},
- '\0', NULL, NULL, NO_HELP },
- { {"spare-dynamic-tags", required_argument, NULL, OPTION_SPARE_DYNAMIC_TAGS},
- '\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 },
- { {"split-by-reloc", optional_argument, NULL, OPTION_SPLIT_BY_RELOC},
- '\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 },
- { {"target-help", no_argument, NULL, OPTION_TARGET_HELP},
- '\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 },
- { {"traditional-format", no_argument, NULL, OPTION_TRADITIONAL_FORMAT},
- '\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 },
- { {"Tbss", required_argument, NULL, OPTION_TBSS},
- '\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 },
- { {"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 },
- { {"verbose", no_argument, NULL, OPTION_VERBOSE},
- '\0', NULL, N_("Output lots of information during link"), TWO_DASHES },
- { {"dll-verbose", no_argument, NULL, OPTION_VERBOSE}, /* Linux. */
- '\0', NULL, NULL, NO_HELP },
- { {"version-script", required_argument, NULL, OPTION_VERSION_SCRIPT },
- '\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 },
- { {"warn-common", no_argument, NULL, OPTION_WARN_COMMON},
- '\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 },
- { {"warn-multiple-gp", no_argument, NULL, OPTION_WARN_MULTIPLE_GP},
- '\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 },
- { {"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_("Report unresolved symbols as warnings"), TWO_DASHES },
- { {"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 },
- { {"wrap", required_argument, NULL, OPTION_WRAP},
- '\0', N_("SYMBOL"), N_("Use wrapper functions for SYMBOL"), TWO_DASHES }
-};
-
-#define OPTION_COUNT ARRAY_SIZE (ld_options)
-
-void
-parse_args (unsigned argc, char **argv)
-{
- unsigned i;
- int is, il, irl;
- int ingroup = 0;
- char *default_dirlist = NULL;
- char *shortopts;
- struct option *longopts;
- struct option *really_longopts;
- int last_optind;
- enum report_method how_to_report_unresolved_symbols = RM_GENERATE_ERROR;
-
- shortopts = xmalloc (OPTION_COUNT * 3 + 2);
- longopts = xmalloc (sizeof (*longopts) * (OPTION_COUNT + 1));
- really_longopts = xmalloc (sizeof (*really_longopts) * (OPTION_COUNT + 1));
-
- /* Starting the short option string with '-' is for programs that
- expect options and other ARGV-elements in any order and that care about
- the ordering of the two. We describe each non-option ARGV-element
- as if it were the argument of an option with character code 1. */
- shortopts[0] = '-';
- is = 1;
- il = 0;
- irl = 0;
- for (i = 0; i < OPTION_COUNT; i++)
- {
- if (ld_options[i].shortopt != '\0')
- {
- shortopts[is] = ld_options[i].shortopt;
- ++is;
- if (ld_options[i].opt.has_arg == required_argument
- || ld_options[i].opt.has_arg == optional_argument)
- {
- shortopts[is] = ':';
- ++is;
- if (ld_options[i].opt.has_arg == optional_argument)
- {
- shortopts[is] = ':';
- ++is;
- }
- }
- }
- if (ld_options[i].opt.name != NULL)
- {
- if (ld_options[i].control == EXACTLY_TWO_DASHES)
- {
- really_longopts[irl] = ld_options[i].opt;
- ++irl;
- }
- else
- {
- longopts[il] = ld_options[i].opt;
- ++il;
- }
- }
- }
- shortopts[is] = '\0';
- longopts[il].name = NULL;
- really_longopts[irl].name = NULL;
-
- ldemul_add_options (is, &shortopts, il, &longopts, irl, &really_longopts);
-
- /* The -G option is ambiguous on different platforms. Sometimes it
- specifies the largest data size to put into the small data
- section. Sometimes it is equivalent to --shared. Unfortunately,
- the first form takes an argument, while the second does not.
-
- We need to permit the --shared form because on some platforms,
- such as Solaris, gcc -shared will pass -G to the linker.
-
- To permit either usage, we look through the argument list. If we
- find -G not followed by a number, we change it into --shared.
- This will work for most normal cases. */
- for (i = 1; i < argc; i++)
- if (strcmp (argv[i], "-G") == 0
- && (i + 1 >= argc
- || ! ISDIGIT (argv[i + 1][0])))
- argv[i] = (char *) "--shared";
-
- /* Because we permit long options to start with a single dash, and
- we have a --library option, and the -l option is conventionally
- used with an immediately following argument, we can have bad
- results if somebody tries to use -l with a library whose name
- happens to start with "ibrary", as in -li. We avoid problems by
- simply turning -l into --library. This means that users will
- have to use two dashes in order to use --library, which is OK
- since that's how it is documented.
-
- FIXME: It's possible that this problem can arise for other short
- options as well, although the user does always have the recourse
- of adding a space between the option and the argument. */
- for (i = 1; i < argc; i++)
- {
- if (argv[i][0] == '-'
- && argv[i][1] == 'l'
- && argv[i][2] != '\0')
- {
- char *n;
-
- n = xmalloc (strlen (argv[i]) + 20);
- sprintf (n, "--library=%s", argv[i] + 2);
- argv[i] = n;
- }
- }
-
- last_optind = -1;
- while (1)
- {
- int longind;
- int optc;
-
- /* Using last_optind lets us avoid calling ldemul_parse_args
- multiple times on a single option, which would lead to
- confusion in the internal static variables maintained by
- getopt. This could otherwise happen for an argument like
- -nx, in which the -n is parsed as a single option, and we
- loop around to pick up the -x. */
- if (optind != last_optind)
- if (ldemul_parse_args (argc, argv))
- continue;
-
- /* getopt_long_only is like getopt_long, but '-' as well as '--'
- can indicate a long option. */
- opterr = 0;
- last_optind = optind;
- optc = getopt_long_only (argc, argv, shortopts, longopts, &longind);
- if (optc == '?')
- {
- optind = last_optind;
- optc = getopt_long (argc, argv, "-", really_longopts, &longind);
- }
-
- if (ldemul_handle_option (optc))
- continue;
-
- if (optc == -1)
- break;
-
- switch (optc)
- {
- case '?':
- einfo (_("%P: unrecognized option '%s'\n"), argv[last_optind]);
- default:
- einfo (_("%P%F: use the --help option for usage information\n"));
-
- case 1: /* File name. */
- lang_add_input_file (optarg, lang_input_file_is_file_enum, NULL);
- break;
-
- case OPTION_IGNORE:
- break;
- case 'a':
- /* For HP/UX compatibility. Actually -a shared should mean
- ``use only shared libraries'' but, then, we don't
- currently support shared libraries on HP/UX anyhow. */
- if (strcmp (optarg, "archive") == 0)
- config.dynamic_link = FALSE;
- else if (strcmp (optarg, "shared") == 0
- || strcmp (optarg, "default") == 0)
- config.dynamic_link = TRUE;
- else
- einfo (_("%P%F: unrecognized -a option `%s'\n"), optarg);
- break;
- case OPTION_ASSERT:
- /* FIXME: We just ignore these, but we should handle them. */
- if (strcmp (optarg, "definitions") == 0)
- ;
- else if (strcmp (optarg, "nodefinitions") == 0)
- ;
- else if (strcmp (optarg, "nosymbolic") == 0)
- ;
- else if (strcmp (optarg, "pure-text") == 0)
- ;
- else
- einfo (_("%P%F: unrecognized -assert option `%s'\n"), optarg);
- break;
- case 'A':
- ldfile_add_arch (optarg);
- break;
- case 'b':
- lang_add_target (optarg);
- break;
- case 'c':
- ldfile_open_command_file (optarg);
- parser_input = input_mri_script;
- yyparse ();
- break;
- case OPTION_CALL_SHARED:
- config.dynamic_link = TRUE;
- break;
- case OPTION_NON_SHARED:
- config.dynamic_link = FALSE;
- break;
- case OPTION_CREF:
- command_line.cref = TRUE;
- link_info.notice_all = TRUE;
- break;
- case 'd':
- command_line.force_common_definition = TRUE;
- break;
- case OPTION_DEFSYM:
- lex_string = optarg;
- lex_redirect (optarg);
- parser_input = input_defsym;
- parsing_defsym = 1;
- yyparse ();
- parsing_defsym = 0;
- lex_string = NULL;
- break;
- case OPTION_DEMANGLE:
- demangling = TRUE;
- if (optarg != NULL)
- {
- enum demangling_styles style;
-
- style = cplus_demangle_name_to_style (optarg);
- if (style == unknown_demangling)
- einfo (_("%F%P: unknown demangling style `%s'"),
- optarg);
-
- cplus_demangle_set_style (style);
- }
- break;
- case 'I': /* Used on Solaris. */
- case OPTION_DYNAMIC_LINKER:
- command_line.interpreter = optarg;
- break;
- case OPTION_EB:
- command_line.endian = ENDIAN_BIG;
- break;
- case OPTION_EL:
- command_line.endian = ENDIAN_LITTLE;
- break;
- case OPTION_EMBEDDED_RELOCS:
- command_line.embedded_relocs = TRUE;
- break;
- case OPTION_EXPORT_DYNAMIC:
- case 'E': /* HP/UX compatibility. */
- link_info.export_dynamic = TRUE;
- break;
- case 'e':
- lang_add_entry (optarg, TRUE);
- break;
- case 'f':
- if (command_line.auxiliary_filters == NULL)
- {
- command_line.auxiliary_filters = xmalloc (2 * sizeof (char *));
- command_line.auxiliary_filters[0] = optarg;
- command_line.auxiliary_filters[1] = NULL;
- }
- else
- {
- int c;
- char **p;
-
- c = 0;
- for (p = command_line.auxiliary_filters; *p != NULL; p++)
- ++c;
- command_line.auxiliary_filters
- = xrealloc (command_line.auxiliary_filters,
- (c + 2) * sizeof (char *));
- command_line.auxiliary_filters[c] = optarg;
- command_line.auxiliary_filters[c + 1] = NULL;
- }
- break;
- case 'F':
- command_line.filter_shlib = optarg;
- break;
- case OPTION_FORCE_EXE_SUFFIX:
- command_line.force_exe_suffix = TRUE;
- break;
- case 'G':
- {
- char *end;
- g_switch_value = strtoul (optarg, &end, 0);
- if (*end)
- einfo (_("%P%F: invalid number `%s'\n"), optarg);
- }
- break;
- case 'g':
- /* Ignore. */
- break;
- case OPTION_GC_SECTIONS:
- command_line.gc_sections = TRUE;
- break;
- case OPTION_HELP:
- help ();
- xexit (0);
- break;
- case 'L':
- ldfile_add_library_path (optarg, TRUE);
- break;
- case 'l':
- lang_add_input_file (optarg, lang_input_file_is_l_enum, NULL);
- break;
- case 'M':
- config.map_filename = "-";
- break;
- case 'm':
- /* Ignore. Was handled in a pre-parse. */
- break;
- case OPTION_MAP:
- config.map_filename = optarg;
- break;
- case 'N':
- config.text_read_only = FALSE;
- config.magic_demand_paged = FALSE;
- config.dynamic_link = FALSE;
- break;
- case OPTION_NO_OMAGIC:
- config.text_read_only = TRUE;
- config.magic_demand_paged = TRUE;
- /* NB/ Does not set dynamic_link to TRUE.
- Use --call-shared or -Bdynamic for this. */
- break;
- case 'n':
- config.magic_demand_paged = FALSE;
- config.dynamic_link = FALSE;
- break;
- case OPTION_NO_DEFINE_COMMON:
- command_line.inhibit_common_definition = TRUE;
- break;
- case OPTION_NO_DEMANGLE:
- demangling = FALSE;
- break;
- case OPTION_NO_GC_SECTIONS:
- command_line.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;
- 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;
- break;
- case OPTION_UNRESOLVED_SYMBOLS:
- if (strcmp (optarg, "ignore-all") == 0)
- {
- link_info.unresolved_syms_in_objects = RM_IGNORE;
- link_info.unresolved_syms_in_shared_libs = RM_IGNORE;
- }
- 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;
- }
- 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;
- }
- 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_shared_libs = RM_IGNORE;
- }
- else
- einfo (_("%P%F: bad --unresolved-symbols option: %s\n"), optarg);
- break;
- case OPTION_WARN_UNRESOLVED_SYMBOLS:
- how_to_report_unresolved_symbols = RM_GENERATE_WARNING;
- if (link_info.unresolved_syms_in_objects == RM_GENERATE_ERROR)
- link_info.unresolved_syms_in_objects = RM_GENERATE_WARNING;
- 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;
- 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_NO_WARN_MISMATCH:
- command_line.warn_mismatch = FALSE;
- break;
- case OPTION_NOINHIBIT_EXEC:
- force_make_executable = TRUE;
- break;
- case OPTION_NOSTDLIB:
- config.only_cmd_line_lib_dirs = TRUE;
- break;
- case OPTION_NO_WHOLE_ARCHIVE:
- whole_archive = FALSE;
- break;
- case 'O':
- /* FIXME "-O<non-digits> <value>" used to set the address of
- section <non-digits>. Was this for compatibility with
- something, or can we create a new option to do that
- (with a syntax similar to -defsym)?
- getopt can't handle two args to an option without kludges. */
-
- /* Enable optimizations of output files. */
- link_info.optimize = strtoul (optarg, NULL, 0) ? TRUE : FALSE;
- break;
- case 'o':
- lang_add_output (optarg, 0);
- break;
- case OPTION_OFORMAT:
- lang_add_output_format (optarg, NULL, NULL, 0);
- break;
- case 'q':
- link_info.emitrelocations = TRUE;
- break;
- case 'i':
- case 'r':
- if (optind == last_optind)
- /* 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
- but it cannot parse the text after the -r so it refuses to
- increment the optind counter. Detect this case and issue
- 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. */
- einfo(_("%P%F: bad -rpath option\n"));
-
- link_info.relocatable = TRUE;
- config.build_constructors = FALSE;
- config.magic_demand_paged = FALSE;
- config.text_read_only = FALSE;
- config.dynamic_link = FALSE;
- break;
- case 'R':
- /* The GNU linker traditionally uses -R to mean to include
- only the symbols from a file. The Solaris linker uses -R
- to set the path used by the runtime linker to find
- libraries. This is the GNU linker -rpath argument. We
- try to support both simultaneously by checking the file
- named. If it is a directory, rather than a regular file,
- we assume -rpath was meant. */
- {
- struct stat s;
-
- if (stat (optarg, &s) >= 0
- && ! S_ISDIR (s.st_mode))
- {
- lang_add_input_file (optarg,
- lang_input_file_is_symbols_only_enum,
- NULL);
- break;
- }
- }
- /* Fall through. */
- case OPTION_RPATH:
- if (command_line.rpath == NULL)
- command_line.rpath = xstrdup (optarg);
- else
- {
- size_t rpath_len = strlen (command_line.rpath);
- size_t optarg_len = strlen (optarg);
- char *buf;
- char *cp = command_line.rpath;
-
- /* 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] == ':'))
- /* We found it. */
- break;
-
- /* Not yet found. */
- cp = strchr (cp, ':');
- if (cp != NULL)
- ++cp;
- }
- while (cp != NULL);
-
- if (cp == NULL)
- {
- buf = xmalloc (rpath_len + optarg_len + 2);
- sprintf (buf, "%s:%s", command_line.rpath, optarg);
- free (command_line.rpath);
- command_line.rpath = buf;
- }
- }
- break;
- case OPTION_RPATH_LINK:
- if (command_line.rpath_link == NULL)
- command_line.rpath_link = xstrdup (optarg);
- else
- {
- char *buf;
-
- buf = xmalloc (strlen (command_line.rpath_link)
- + strlen (optarg)
- + 2);
- sprintf (buf, "%s:%s", command_line.rpath_link, optarg);
- free (command_line.rpath_link);
- command_line.rpath_link = buf;
- }
- break;
- case OPTION_RELAX:
- command_line.relax = TRUE;
- break;
- case OPTION_RETAIN_SYMBOLS_FILE:
- add_keepsyms_file (optarg);
- break;
- case 'S':
- link_info.strip = strip_debugger;
- break;
- case 's':
- link_info.strip = strip_all;
- break;
- case OPTION_STRIP_DISCARDED:
- link_info.strip_discarded = TRUE;
- break;
- case OPTION_NO_STRIP_DISCARDED:
- link_info.strip_discarded = FALSE;
- break;
- case OPTION_SHARED:
- if (config.has_shared)
- {
- link_info.shared = TRUE;
- /* When creating a shared library, the default
- behaviour is to ignore any unresolved references. */
- if (link_info.unresolved_syms_in_objects == RM_NOT_YET_SET)
- link_info.unresolved_syms_in_objects = RM_IGNORE;
- if (link_info.unresolved_syms_in_shared_libs == RM_NOT_YET_SET)
- link_info.unresolved_syms_in_shared_libs = RM_IGNORE;
- }
- else
- einfo (_("%P%F: -shared not supported\n"));
- break;
- case OPTION_PIE:
- if (config.has_shared)
- {
- link_info.shared = TRUE;
- link_info.pie = TRUE;
- }
- else
- einfo (_("%P%F: -pie not supported\n"));
- break;
- case 'h': /* Used on Solaris. */
- case OPTION_SONAME:
- command_line.soname = optarg;
- break;
- case OPTION_SORT_COMMON:
- config.sort_common = TRUE;
- break;
- case OPTION_STATS:
- config.stats = TRUE;
- break;
- case OPTION_SYMBOLIC:
- link_info.symbolic = TRUE;
- break;
- case 't':
- trace_files = TRUE;
- break;
- case 'T':
- ldfile_open_command_file (optarg);
- parser_input = input_script;
- yyparse ();
- break;
- case OPTION_SECTION_START:
- {
- char *optarg2;
- char *sec_name;
- int len;
-
- /* Check for <something>=<somthing>... */
- optarg2 = strchr (optarg, '=');
- if (optarg2 == NULL)
- 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"));
-
- /* We must copy the section name as set_section_start
- doesn't do it for us. */
- len = optarg2 - optarg;
- sec_name = xmalloc (len);
- memcpy (sec_name, optarg, len - 1);
- sec_name[len - 1] = 0;
-
- /* Then set it... */
- set_section_start (sec_name, optarg2);
- }
- break;
- case OPTION_TARGET_HELP:
- /* Mention any target specific options. */
- ldemul_list_emulation_options (stdout);
- exit (0);
- case OPTION_TBSS:
- set_section_start (".bss", optarg);
- break;
- case OPTION_TDATA:
- set_section_start (".data", optarg);
- break;
- case OPTION_TTEXT:
- set_section_start (".text", optarg);
- break;
- case OPTION_TRADITIONAL_FORMAT:
- link_info.traditional_format = TRUE;
- break;
- case OPTION_TASK_LINK:
- link_info.task_link = TRUE;
- /* Fall through - do an implied -r option. */
- case OPTION_UR:
- link_info.relocatable = TRUE;
- config.build_constructors = TRUE;
- config.magic_demand_paged = FALSE;
- config.text_read_only = FALSE;
- config.dynamic_link = FALSE;
- break;
- case 'u':
- ldlang_add_undef (optarg);
- break;
- case OPTION_UNIQUE:
- if (optarg != NULL)
- lang_add_unique (optarg);
- else
- config.unique_orphan_sections = TRUE;
- break;
- case OPTION_VERBOSE:
- ldversion (1);
- version_printed = TRUE;
- trace_file_tries = TRUE;
- overflow_cutoff_limit = -2;
- break;
- case 'v':
- ldversion (0);
- version_printed = TRUE;
- break;
- case 'V':
- ldversion (1);
- version_printed = TRUE;
- break;
- case OPTION_VERSION:
- ldversion (2);
- xexit (0);
- break;
- case OPTION_VERSION_SCRIPT:
- /* This option indicates a small script that only specifies
- version information. 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_version_script;
- yyparse ();
- }
- break;
- case OPTION_VERSION_EXPORTS_SECTION:
- /* This option records a version symbol to be applied to the
- symbols listed for export to be found in the object files
- .exports sections. */
- command_line.version_exports_section = optarg;
- break;
- case OPTION_WARN_COMMON:
- config.warn_common = TRUE;
- break;
- case OPTION_WARN_CONSTRUCTORS:
- config.warn_constructors = TRUE;
- break;
- case OPTION_WARN_FATAL:
- config.fatal_warnings = TRUE;
- break;
- case OPTION_WARN_MULTIPLE_GP:
- config.warn_multiple_gp = TRUE;
- break;
- case OPTION_WARN_ONCE:
- config.warn_once = TRUE;
- break;
- case OPTION_WARN_SECTION_ALIGN:
- config.warn_section_align = TRUE;
- break;
- case OPTION_WHOLE_ARCHIVE:
- whole_archive = TRUE;
- break;
- case OPTION_AS_NEEDED:
- as_needed = TRUE;
- break;
- case OPTION_NO_AS_NEEDED:
- as_needed = FALSE;
- break;
- case OPTION_WRAP:
- add_wrap (optarg);
- break;
- case OPTION_DISCARD_NONE:
- link_info.discard = discard_none;
- break;
- case 'X':
- link_info.discard = discard_l;
- break;
- case 'x':
- link_info.discard = discard_all;
- break;
- case 'Y':
- if (strncmp (optarg, "P,", 2) == 0)
- optarg += 2;
- if (default_dirlist != NULL)
- free (default_dirlist);
- default_dirlist = xstrdup (optarg);
- break;
- case 'y':
- add_ysym (optarg);
- break;
- case OPTION_SPARE_DYNAMIC_TAGS:
- link_info.spare_dynamic_tags = strtoul (optarg, NULL, 0);
- break;
- case OPTION_SPLIT_BY_RELOC:
- if (optarg != NULL)
- config.split_by_reloc = strtoul (optarg, NULL, 0);
- else
- config.split_by_reloc = 32768;
- break;
- case OPTION_SPLIT_BY_FILE:
- if (optarg != NULL)
- config.split_by_file = bfd_scan_vma (optarg, NULL, 0);
- else
- config.split_by_file = 1;
- break;
- case OPTION_CHECK_SECTIONS:
- command_line.check_section_addresses = TRUE;
- break;
- case OPTION_NO_CHECK_SECTIONS:
- command_line.check_section_addresses = FALSE;
- break;
- case OPTION_ACCEPT_UNKNOWN_INPUT_ARCH:
- command_line.accept_unknown_input_arch = TRUE;
- break;
- case OPTION_NO_ACCEPT_UNKNOWN_INPUT_ARCH:
- command_line.accept_unknown_input_arch = FALSE;
- break;
- case '(':
- if (ingroup)
- einfo (_("%P%F: may not nest groups (--help for usage)\n"));
-
- lang_enter_group ();
- ingroup = 1;
- break;
- case ')':
- if (! ingroup)
- einfo (_("%P%F: group ended before it began (--help for usage)\n"));
-
- lang_leave_group ();
- ingroup = 0;
- break;
-
- case OPTION_INIT:
- link_info.init_function = optarg;
- break;
-
- case OPTION_FINI:
- link_info.fini_function = optarg;
- break;
- }
- }
-
- if (ingroup)
- lang_leave_group ();
-
- if (default_dirlist != NULL)
- {
- set_default_dirlist (default_dirlist);
- free (default_dirlist);
- }
-
- 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;
-}
-
-/* Add the (colon-separated) elements of DIRLIST_PTR to the
- library search path. */
-
-static void
-set_default_dirlist (char *dirlist_ptr)
-{
- char *p;
-
- while (1)
- {
- p = strchr (dirlist_ptr, PATH_SEPARATOR);
- if (p != NULL)
- *p = '\0';
- if (*dirlist_ptr != '\0')
- ldfile_add_library_path (dirlist_ptr, TRUE);
- if (p == NULL)
- break;
- dirlist_ptr = p + 1;
- }
-}
-
-static void
-set_section_start (char *sect, char *valstr)
-{
- const char *end;
- 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));
-}
-
-/* Print help messages for the options. */
-
-static void
-help (void)
-{
- unsigned i;
- const char **targets, **pp;
-
- printf (_("Usage: %s [options] file...\n"), program_name);
-
- printf (_("Options:\n"));
- for (i = 0; i < OPTION_COUNT; i++)
- {
- if (ld_options[i].doc != NULL)
- {
- bfd_boolean comma;
- int len;
- unsigned j;
-
- printf (" ");
-
- comma = FALSE;
- len = 2;
-
- j = i;
- do
- {
- if (ld_options[j].shortopt != '\0'
- && ld_options[j].control != NO_HELP)
- {
- printf ("%s-%c", comma ? ", " : "", ld_options[j].shortopt);
- len += (comma ? 2 : 0) + 2;
- if (ld_options[j].arg != NULL)
- {
- if (ld_options[j].opt.has_arg != optional_argument)
- {
- printf (" ");
- ++len;
- }
- printf ("%s", _(ld_options[j].arg));
- len += strlen (_(ld_options[j].arg));
- }
- comma = TRUE;
- }
- ++j;
- }
- while (j < OPTION_COUNT && ld_options[j].doc == NULL);
-
- j = i;
- do
- {
- if (ld_options[j].opt.name != NULL
- && ld_options[j].control != NO_HELP)
- {
- int two_dashes =
- (ld_options[j].control == TWO_DASHES
- || ld_options[j].control == EXACTLY_TWO_DASHES);
-
- printf ("%s-%s%s",
- comma ? ", " : "",
- two_dashes ? "-" : "",
- ld_options[j].opt.name);
- len += ((comma ? 2 : 0)
- + 1
- + (two_dashes ? 1 : 0)
- + strlen (ld_options[j].opt.name));
- if (ld_options[j].arg != NULL)
- {
- printf (" %s", _(ld_options[j].arg));
- len += 1 + strlen (_(ld_options[j].arg));
- }
- comma = TRUE;
- }
- ++j;
- }
- while (j < OPTION_COUNT && ld_options[j].doc == NULL);
-
- if (len >= 30)
- {
- printf ("\n");
- len = 0;
- }
-
- for (; len < 30; len++)
- putchar (' ');
-
- printf ("%s\n", _(ld_options[i].doc));
- }
- }
-
- /* Note: Various tools (such as libtool) depend upon the
- format of the listings below - do not change them. */
- /* xgettext:c-format */
- printf (_("%s: supported targets:"), program_name);
- targets = bfd_target_list ();
- for (pp = targets; *pp != NULL; pp++)
- printf (" %s", *pp);
- free (targets);
- printf ("\n");
-
- /* xgettext:c-format */
- printf (_("%s: supported emulations: "), program_name);
- ldemul_list_emulations (stdout);
- printf ("\n");
-
- /* xgettext:c-format */
- printf (_("%s: emulation specific options:\n"), program_name);
- ldemul_list_emulation_options (stdout);
- printf ("\n");
-
- printf (_("Report bugs to %s\n"), REPORT_BUGS_TO);
-}
diff --git a/contrib/binutils/ld/mri.c b/contrib/binutils/ld/mri.c
deleted file mode 100644
index f7edd88..0000000
--- a/contrib/binutils/ld/mri.c
+++ /dev/null
@@ -1,332 +0,0 @@
-/* mri.c -- handle MRI style linker scripts
- Copyright 1991, 1992, 1993, 1994, 1996, 1997, 1998, 1999, 2000, 2002,
- 2003, 2004 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, 59 Temple Place - Suite 330, Boston, MA
-02111-1307, 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 "ld.h"
-#include "ldexp.h"
-#include "ldlang.h"
-#include "ldmisc.h"
-#include "mri.h"
-#include <ldgram.h>
-#include "libiberty.h"
-
-struct section_name_struct {
- struct section_name_struct *next;
- const char *name;
- const char *alias;
- etree_type *vma;
- etree_type *align;
- etree_type *subalign;
- 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;
-
-struct section_name_struct *alignment;
-struct section_name_struct *subalignment;
-
-static struct section_name_struct **
-lookup (const char *name, struct section_name_struct **list)
-{
- struct section_name_struct **ptr = list;
-
- while (*ptr)
- {
- if (strcmp (name, (*ptr)->name) == 0)
- /* If this is a match, delete it, we only keep the last instance
- of any name. */
- *ptr = (*ptr)->next;
- else
- ptr = &((*ptr)->next);
- }
-
- *ptr = xmalloc (sizeof (struct section_name_struct));
- return ptr;
-}
-
-static void
-mri_add_to_list (struct section_name_struct **list,
- const char *name,
- etree_type *vma,
- const char *zalias,
- etree_type *align,
- etree_type *subalign)
-{
- struct section_name_struct **ptr = lookup (name, list);
-
- (*ptr)->name = name;
- (*ptr)->vma = vma;
- (*ptr)->next = NULL;
- (*ptr)->ok_to_load = 0;
- (*ptr)->alias = zalias;
- (*ptr)->align = align;
- (*ptr)->subalign = subalign;
-}
-
-void
-mri_output_section (const char *name, etree_type *vma)
-{
- mri_add_to_list (&address, name, vma, 0, 0, 0);
-}
-
-/* If any ABSOLUTE <name> are in the script, only load those files
- marked thus. */
-
-void
-mri_only_load (const char *name)
-{
- mri_add_to_list (&only_load, name, 0, 0, 0, 0);
-}
-
-void
-mri_base (etree_type *exp)
-{
- base = exp;
-}
-
-static int done_tree = 0;
-
-void
-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,
- and add the ones not mentioned. */
- if (address != NULL)
- {
- struct section_name_struct *alist;
- struct section_name_struct *olist;
-
- if (order == NULL)
- order = address;
-
- for (alist = address;
- alist != NULL;
- alist = alist->next)
- {
- int done = 0;
-
- for (olist = order; done == 0 && olist != NULL; olist = olist->next)
- {
- if (strcmp (alist->name, olist->name) == 0)
- {
- olist->vma = alist->vma;
- done = 1;
- }
- }
-
- if (!done)
- {
- /* Add this onto end of order list. */
- mri_add_to_list (&order, alist->name, alist->vma, 0, 0, 0);
- }
- }
- }
-
- /* If we're only supposed to load a subset of them in, then prune
- the list. */
- if (only_load != NULL)
- {
- struct section_name_struct *ptr1;
- struct section_name_struct *ptr2;
-
- if (order == NULL)
- order = only_load;
-
- /* See if this name is in the list, if it is then we can load it. */
- for (ptr1 = only_load; ptr1; ptr1 = ptr1->next)
- for (ptr2 = order; ptr2; ptr2 = ptr2->next)
- if (strcmp (ptr2->name, ptr1->name) == 0)
- ptr2->ok_to_load = 1;
- }
- else
- {
- /* No only load list, so everything is ok to load. */
- struct section_name_struct *ptr;
-
- for (ptr = order; ptr; ptr = ptr->next)
- ptr->ok_to_load = 1;
- }
-
- /* Create the order of sections to load. */
- if (order != NULL)
- {
- /* Been told to output the sections in a certain order. */
- struct section_name_struct *p = order;
-
- while (p)
- {
- struct section_name_struct *aptr;
- etree_type *align = 0;
- etree_type *subalign = 0;
- struct wildcard_list *tmp;
-
- /* See if an alignment has been specified. */
- for (aptr = alignment; aptr; aptr = aptr->next)
- if (strcmp (aptr->name, p->name) == 0)
- align = aptr->align;
-
- for (aptr = subalignment; aptr; aptr = aptr->next)
- if (strcmp (aptr->name, p->name) == 0)
- subalign = aptr->subalign;
-
- if (base == 0)
- base = p->vma ? p->vma : exp_nameop (NAME, ".");
-
- lang_enter_output_section_statement (p->name, base,
- p->ok_to_load ? 0 : noload_section,
- align, subalign, NULL);
- base = 0;
- tmp = xmalloc (sizeof *tmp);
- tmp->next = NULL;
- tmp->spec.name = p->name;
- tmp->spec.exclude_name_list = NULL;
- tmp->spec.sorted = FALSE;
- lang_add_wild (NULL, tmp, FALSE);
-
- /* If there is an alias for this section, add it too. */
- for (aptr = alias; aptr; aptr = aptr->next)
- if (strcmp (aptr->alias, p->name) == 0)
- {
- tmp = xmalloc (sizeof *tmp);
- tmp->next = NULL;
- tmp->spec.name = aptr->name;
- tmp->spec.exclude_name_list = NULL;
- tmp->spec.sorted = FALSE;
- lang_add_wild (NULL, tmp, FALSE);
- }
-
- lang_leave_output_section_statement (0, "*default*", NULL, NULL);
-
- p = p->next;
- }
- }
-
- done_tree = 1;
-}
-
-void
-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
-mri_order (const char *name)
-{
- mri_add_to_list (&order, name, 0, 0, 0, 0);
-}
-
-void
-mri_alias (const char *want, const char *is, int isn)
-{
- if (!is)
- {
- char buf[20];
-
- /* Some sections are digits. */
- sprintf (buf, "%d", isn);
-
- is = xstrdup (buf);
-
- if (is == NULL)
- abort ();
- }
-
- mri_add_to_list (&alias, is, 0, want, 0, 0);
-}
-
-void
-mri_name (const char *name)
-{
- lang_add_output (name, 1);
-}
-
-void
-mri_format (const char *name)
-{
- if (strcmp (name, "S") == 0)
- lang_add_output_format ("srec", NULL, NULL, 1);
-
- else if (strcmp (name, "IEEE") == 0)
- lang_add_output_format ("ieee", NULL, NULL, 1);
-
- else if (strcmp (name, "COFF") == 0)
- lang_add_output_format ("coff-m68k", NULL, NULL, 1);
-
- else
- einfo (_("%P%F: unknown format type %s\n"), name);
-}
-
-void
-mri_public (const char *name, etree_type *exp)
-{
- lang_add_assignment (exp_assop ('=', name, exp));
-}
-
-void
-mri_align (const char *name, etree_type *exp)
-{
- mri_add_to_list (&alignment, name, 0, 0, exp, 0);
-}
-
-void
-mri_alignmod (const char *name, etree_type *exp)
-{
- mri_add_to_list (&subalignment, name, 0, 0, 0, exp);
-}
-
-void
-mri_truncate (unsigned int exp)
-{
- symbol_truncate = exp;
-}
diff --git a/contrib/binutils/ld/mri.h b/contrib/binutils/ld/mri.h
deleted file mode 100644
index b430d20..0000000
--- a/contrib/binutils/ld/mri.h
+++ /dev/null
@@ -1,39 +0,0 @@
-/* mri.h -- header file for MRI scripting functions
- Copyright 1993, 1995, 1996, 2003 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., 59 Temple Place - Suite 330, Boston, MA 02111-1307, 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 *);
-extern void mri_load (const char *);
-extern void mri_order (const char *);
-extern void mri_alias (const char *, const char *, int);
-extern void mri_name (const char *);
-extern void mri_format (const char *);
-extern void mri_public (const char *, etree_type *);
-extern void mri_align (const char *, etree_type *);
-extern void mri_alignmod (const char *, etree_type *);
-extern void mri_truncate (unsigned int);
-extern void mri_draw_tree (void);
-
-#endif
diff --git a/contrib/binutils/ld/pe-dll.c b/contrib/binutils/ld/pe-dll.c
deleted file mode 100644
index 45d00ae..0000000
--- a/contrib/binutils/ld/pe-dll.c
+++ /dev/null
@@ -1,2697 +0,0 @@
-/* Routines to help build PEI-format DLLs (Win32 etc)
- Copyright 1998, 1999, 2000, 2001, 2002, 2003, 2004
- Free Software Foundation, Inc.
- Written by DJ Delorie <dj@cygnus.com>
-
- 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, 59 Temple Place - Suite 330, Boston, MA
- 02111-1307, USA. */
-
-#include "bfd.h"
-#include "sysdep.h"
-#include "bfdlink.h"
-#include "libiberty.h"
-#include "safe-ctype.h"
-
-#include <time.h>
-
-#include "ld.h"
-#include "ldexp.h"
-#include "ldlang.h"
-#include "ldwrite.h"
-#include "ldmisc.h"
-#include <ldgram.h>
-#include "ldmain.h"
-#include "ldfile.h"
-#include "ldemul.h"
-#include "coff/internal.h"
-#include "../bfd/libcoff.h"
-#include "deffile.h"
-#include "pe-dll.h"
-
-/* 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
- at the end of this file. This function is not re-entrant and is
- 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. */
-
-/* Auto-import feature by Paul Sokolovsky
-
- Quick facts:
-
- 1. With this feature on, DLL clients can import variables from DLL
- without any concern from their side (for example, without any source
- code modifications).
-
- 2. This is done completely in bounds of the PE specification (to be fair,
- there's a place where it pokes nose out of, but in practice it works).
- So, resulting module can be used with any other PE compiler/linker.
-
- 3. Auto-import is fully compatible with standard import method and they
- can be mixed together.
-
- 4. Overheads: space: 8 bytes per imported symbol, plus 20 for each
- reference to it; load time: negligible; virtual/physical memory: should be
- less than effect of DLL relocation, and I sincerely hope it doesn't affect
- DLL sharability (too much).
-
- Idea
-
- The obvious and only way to get rid of dllimport insanity is to make client
- access variable directly in the DLL, bypassing extra dereference. I.e.,
- whenever client contains something like
-
- mov dll_var,%eax,
-
- address of dll_var in the command should be relocated to point 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 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. Before continuing, it is worth a note that,
- while authors strives to make PE act ELF-like, there're some other people
- make ELF act PE-like: elfvector, ;-) .
-
- Implementation
-
- 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
- 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
- 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
- this, since FirstThunk points directly into machine code. But in practice,
- OS loader implemented the sane way: it goes thru OriginalFirstThunk and
- puts addresses to FirstThunk, not something else. It once again should be
- noted that dll and symbol name structures are reused across fixup entries
- and should be there anyway to support standard import stuff, so sustained
- overhead is 20 bytes per reference. Other question is whether having several
- IMAGE_IMPORT_DESCRIPTORS for the same DLL is possible. Answer is yes, it is
- done even by native compiler/linker (libth32's functions are in fact reside
- in windows9x kernel32.dll, so if you use it, you have two
- IMAGE_IMPORT_DESCRIPTORS for kernel32.dll). Yet other question is whether
- referencing the same PE structures several times is valid. The answer is why
- not, prohibiting that (detecting violation) would require more work on
- behalf of loader than not doing it.
-
- See also: ld/emultempl/pe.em. */
-
-static void add_bfd_to_link (bfd *, const char *, struct bfd_link_info *);
-
-/* For emultempl/pe.em. */
-
-def_file * pe_def_file = 0;
-int pe_dll_export_everything = 0;
-int pe_dll_do_default_excludes = 1;
-int pe_dll_kill_ats = 0;
-int pe_dll_stdcall_aliases = 0;
-int pe_dll_warn_dup_exports = 0;
-int pe_dll_compat_implib = 0;
-int pe_dll_extra_pe_debug = 0;
-
-/* Static variables and types. */
-
-static bfd_vma image_base;
-static bfd *filler_bfd;
-static struct bfd_section *edata_s, *reloc_s;
-static unsigned char *edata_d, *reloc_d;
-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;
-
-typedef struct
- {
- char *name;
- int len;
- }
-autofilter_entry_type;
-
-#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
-
-static pe_details_type pe_detail_list[] =
-{
- {
- "pei-i386",
- "pe-i386",
- 7 /* R_IMAGEBASE */,
- PE_ARCH_i386,
- bfd_arch_i386,
- 1
- },
- {
- "pei-shl",
- "pe-shl",
- 16 /* R_SH_IMAGEBASE */,
- PE_ARCH_sh,
- bfd_arch_sh,
- 1
- },
- {
- "pei-mips",
- "pe-mips",
- 34 /* MIPS_R_RVA */,
- PE_ARCH_mips,
- bfd_arch_mips,
- 0
- },
- {
- "pei-arm-little",
- "pe-arm-little",
- 11 /* ARM_RVA32 */,
- PE_ARCH_arm,
- bfd_arch_arm,
- 1
- },
- {
- "epoc-pei-arm-little",
- "epoc-pe-arm-little",
- 11 /* ARM_RVA32 */,
- PE_ARCH_arm_epoc,
- bfd_arch_arm,
- 0
- },
- { NULL, NULL, 0, 0, 0, 0 }
-};
-
-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 }
-};
-
-/* Do not specify library suffix explicitly, to allow for dllized versions. */
-static 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 }
-};
-
-static 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 }
-};
-
-static autofilter_entry_type autofilter_symbolprefixlist[] =
-{
- /* { "__imp_", 6 }, */
- /* Do __imp_ explicitly to save time. */
- { "__rtti_", 7 },
- /* Don't re-export auto-imported symbols. */
- { "_nm_", 4 },
- { "__builtin_", 10 },
- /* 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 }
-};
-
-static autofilter_entry_type autofilter_symbolsuffixlist[] =
-{
- { "_iname", 6 },
- { NULL, 0 }
-};
-
-#define U(str) (pe_details->underscored ? "_" str : str)
-
-void
-pe_dll_id_target (const char *target)
-{
- int i;
-
- for (i = 0; pe_detail_list[i].target_name; i++)
- if (strcmp (pe_detail_list[i].target_name, target) == 0
- || strcmp (pe_detail_list[i].object_target, target) == 0)
- {
- pe_details = pe_detail_list + i;
- return;
- }
- einfo (_("%XUnsupported PEI architecture: %s\n"), target);
- exit (1);
-}
-
-/* Helper functions for qsort. Relocs must be sorted so that we can write
- them out by pages. */
-
-typedef struct
- {
- bfd_vma vma;
- char type;
- short extra;
- }
-reloc_data_type;
-
-static int
-reloc_sort (const void *va, const void *vb)
-{
- bfd_vma a = ((const reloc_data_type *) va)->vma;
- bfd_vma b = ((const reloc_data_type *) vb)->vma;
-
- return (a > b) ? 1 : ((a < b) ? -1 : 0);
-}
-
-static int
-pe_export_sort (const void *va, const void *vb)
-{
- const def_file_export *a = va;
- const def_file_export *b = vb;
-
- return strcmp (a->name, b->name);
-}
-
-/* Read and process the .DEF file. */
-
-/* These correspond to the entries in pe_def_file->exports[]. I use
- exported_symbol_sections[i] to tag whether or not the symbol was
- defined, since we can't export symbols we don't have. */
-
-static bfd_vma *exported_symbol_offsets;
-static struct bfd_section **exported_symbol_sections;
-static int export_table_size;
-static int count_exported;
-static int count_exported_byname;
-static int count_with_ordinals;
-static const char *dll_name;
-static int min_ordinal, max_ordinal;
-static int *exported_symbols;
-
-typedef struct exclude_list_struct
- {
- char *string;
- struct exclude_list_struct *next;
- int type;
- }
-exclude_list_struct;
-
-static struct exclude_list_struct *excludes = 0;
-
-void
-pe_dll_add_excludes (const char *new_excludes, const int type)
-{
- char *local_copy;
- char *exclude_string;
-
- local_copy = xstrdup (new_excludes);
-
- exclude_string = strtok (local_copy, ",:");
- for (; exclude_string; exclude_string = strtok (NULL, ",:"))
- {
- struct exclude_list_struct *new_exclude;
-
- new_exclude = xmalloc (sizeof (struct exclude_list_struct));
- new_exclude->string = xmalloc (strlen (exclude_string) + 1);
- strcpy (new_exclude->string, exclude_string);
- new_exclude->type = type;
- new_exclude->next = excludes;
- excludes = new_exclude;
- }
-
- free (local_copy);
-}
-
-
-/* abfd is a bfd containing n (or NULL)
- It can be used for contextual checks. */
-
-static int
-auto_export (bfd *abfd, def_file *d, const char *n)
-{
- int i;
- struct exclude_list_struct *ex;
- 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;
-
- if (pe_dll_do_default_excludes)
- {
- const char * p;
- int len;
-
- if (pe_dll_extra_pe_debug)
- printf ("considering exporting: %s, abfd=%p, abfd->my_arc=%p\n",
- n, abfd, abfd->my_archive);
-
- /* First of all, make context checks:
- Don't export anything from standard libs. */
- if (libname)
- {
- afptr = autofilter_liblist;
-
- while (afptr->name)
- {
- if (strncmp (libname, afptr->name, afptr->len) == 0 )
- return 0;
- afptr++;
- }
- }
-
- /* Next, exclude symbols from certain startup objects. */
-
- if (abfd && (p = lbasename (abfd->filename)))
- {
- afptr = autofilter_objlist;
- while (afptr->name)
- {
- if (strcmp (p, afptr->name) == 0)
- return 0;
- afptr++;
- }
- }
-
- /* Don't try to blindly exclude all symbols
- that begin with '__'; this was tried and
- it is too restrictive. */
-
- /* Then, exclude specific symbols. */
- afptr = autofilter_symbollist;
- while (afptr->name)
- {
- if (strcmp (n, afptr->name) == 0)
- return 0;
-
- afptr++;
- }
-
- /* Next, exclude symbols starting with ... */
- afptr = autofilter_symbolprefixlist;
- while (afptr->name)
- {
- if (strncmp (n, afptr->name, afptr->len) == 0)
- return 0;
-
- afptr++;
- }
-
- /* Finally, exclude symbols ending with ... */
- len = strlen (n);
- afptr = autofilter_symbolsuffixlist;
- while (afptr->name)
- {
- if ((len >= afptr->len)
- /* Add 1 to insure match with trailing '\0'. */
- && strncmp (n + len - afptr->len, afptr->name,
- afptr->len + 1) == 0)
- return 0;
-
- afptr++;
- }
- }
-
- for (ex = excludes; ex; ex = ex->next)
- {
- if (ex->type == 1) /* exclude-libs */
- {
- if (libname
- && ((strcmp (libname, ex->string) == 0)
- || (strcasecmp ("ALL", ex->string) == 0)))
- return 0;
- }
- else if (strcmp (n, ex->string) == 0)
- return 0;
- }
-
- return 1;
-}
-
-static void
-process_def_file (bfd *abfd ATTRIBUTE_UNUSED, struct bfd_link_info *info)
-{
- int i, j;
- struct bfd_link_hash_entry *blhe;
- bfd *b;
- struct bfd_section *s;
- def_file_export *e = 0;
-
- if (!pe_def_file)
- pe_def_file = def_file_empty ();
-
- /* First, run around to all the objects looking for the .drectve
- sections, and push those into the def file too. */
- for (b = info->input_bfds; b; b = b->link_next)
- {
- s = bfd_get_section_by_name (b, ".drectve");
- if (s)
- {
- int size = bfd_get_section_size_before_reloc (s);
- char *buf = xmalloc (size);
-
- bfd_get_section_contents (b, s, buf, 0, size);
- def_file_add_directive (pe_def_file, buf, size);
- free (buf);
- }
- }
-
- /* 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)
- return;
-
- /* Now, maybe export everything else the default way. */
- if (pe_dll_export_everything || pe_def_file->num_exports == 0)
- {
- for (b = info->input_bfds; b; b = b->link_next)
- {
- asymbol **symbols;
- int nsyms, symsize;
-
- symsize = bfd_get_symtab_upper_bound (b);
- symbols = xmalloc (symsize);
- nsyms = bfd_canonicalize_symtab (b, symbols);
-
- for (j = 0; j < nsyms; j++)
- {
- /* We should export symbols which are either global or not
- anything at all. (.bss data is the latter)
- We should not export undefined symbols. */
- if (symbols[j]->section != &bfd_und_section
- && ((symbols[j]->flags & BSF_GLOBAL)
- || (symbols[j]->flags == BFD_FORT_COMM_DEFAULT_VALUE)))
- {
- const char *sn = symbols[j]->name;
-
- /* We should not re-export imported stuff. */
- {
- char *name = xmalloc (strlen (sn) + 2 + 6);
- sprintf (name, "%s%s", U("_imp_"), sn);
-
- blhe = bfd_link_hash_lookup (info->hash, name,
- FALSE, FALSE, FALSE);
- free (name);
-
- if (blhe && blhe->type == bfd_link_hash_defined)
- continue;
- }
-
- if (*sn == '_')
- sn++;
-
- if (auto_export (b, pe_def_file, sn))
- {
- def_file_export *p;
- p=def_file_add_export (pe_def_file, sn, 0, -1);
- /* Fill data flag properly, from dlltool.c. */
- p->flag_data = !(symbols[j]->flags & BSF_FUNCTION);
- }
- }
- }
- }
- }
-
-#undef NE
-#define NE pe_def_file->num_exports
-
- /* Canonicalize the export list. */
- if (pe_dll_kill_ats)
- {
- for (i = 0; i < NE; i++)
- {
- if (strchr (pe_def_file->exports[i].name, '@'))
- {
- /* This will preserve internal_name, which may have been
- pointing to the same memory as name, or might not
- have. */
- int lead_at = (*pe_def_file->exports[i].name == '@');
- char *tmp = xstrdup (pe_def_file->exports[i].name + lead_at);
-
- *(strchr (tmp, '@')) = 0;
- pe_def_file->exports[i].name = tmp;
- }
- }
- }
-
- if (pe_dll_stdcall_aliases)
- {
- for (i = 0; i < NE; i++)
- {
- if (strchr (pe_def_file->exports[i].name, '@'))
- {
- int lead_at = (*pe_def_file->exports[i].name == '@');
- char *tmp = xstrdup (pe_def_file->exports[i].name + lead_at);
-
- *(strchr (tmp, '@')) = 0;
- if (auto_export (NULL, pe_def_file, tmp))
- def_file_add_export (pe_def_file, tmp,
- pe_def_file->exports[i].internal_name,
- -1);
- else
- free (tmp);
- }
- }
- }
-
- /* Convenience, but watch out for it changing. */
- e = pe_def_file->exports;
-
- exported_symbol_offsets = xmalloc (NE * sizeof (bfd_vma));
- exported_symbol_sections = xmalloc (NE * sizeof (struct bfd_section *));
-
- memset (exported_symbol_sections, 0, NE * sizeof (struct bfd_section *));
- max_ordinal = 0;
- min_ordinal = 65536;
- count_exported = 0;
- count_exported_byname = 0;
- count_with_ordinals = 0;
-
- qsort (pe_def_file->exports, NE, sizeof (pe_def_file->exports[0]),
- pe_export_sort);
- for (i = 0, j = 0; i < NE; i++)
- {
- if (i > 0 && strcmp (e[i].name, e[i - 1].name) == 0)
- {
- /* This is a duplicate. */
- if (e[j - 1].ordinal != -1
- && e[i].ordinal != -1
- && e[j - 1].ordinal != e[i].ordinal)
- {
- if (pe_dll_warn_dup_exports)
- /* xgettext:c-format */
- einfo (_("%XError, duplicate EXPORT with ordinals: %s (%d vs %d)\n"),
- e[j - 1].name, e[j - 1].ordinal, e[i].ordinal);
- }
- else
- {
- if (pe_dll_warn_dup_exports)
- /* xgettext:c-format */
- einfo (_("Warning, duplicate EXPORT: %s\n"),
- e[j - 1].name);
- }
-
- if (e[i].ordinal != -1)
- e[j - 1].ordinal = e[i].ordinal;
- e[j - 1].flag_private |= e[i].flag_private;
- e[j - 1].flag_constant |= e[i].flag_constant;
- e[j - 1].flag_noname |= e[i].flag_noname;
- e[j - 1].flag_data |= e[i].flag_data;
- }
- else
- {
- if (i != j)
- e[j] = e[i];
- j++;
- }
- }
- pe_def_file->num_exports = j; /* == NE */
-
- for (i = 0; i < NE; i++)
- {
- char *name;
-
- name = xmalloc (strlen (pe_def_file->exports[i].internal_name) + 2);
- if (pe_details->underscored
- && (*pe_def_file->exports[i].internal_name != '@'))
- {
- *name = '_';
- strcpy (name + 1, pe_def_file->exports[i].internal_name);
- }
- else
- strcpy (name, pe_def_file->exports[i].internal_name);
-
- blhe = bfd_link_hash_lookup (info->hash,
- name,
- FALSE, FALSE, TRUE);
-
- if (blhe
- && (blhe->type == bfd_link_hash_defined
- || (blhe->type == bfd_link_hash_common)))
- {
- count_exported++;
- if (!pe_def_file->exports[i].flag_noname)
- count_exported_byname++;
-
- /* Only fill in the sections. The actual offsets are computed
- in fill_exported_offsets() after common symbols are laid
- out. */
- if (blhe->type == bfd_link_hash_defined)
- exported_symbol_sections[i] = blhe->u.def.section;
- else
- exported_symbol_sections[i] = blhe->u.c.p->section;
-
- 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++;
- }
- }
- else if (blhe && blhe->type == bfd_link_hash_undefined)
- {
- /* xgettext:c-format */
- einfo (_("%XCannot export %s: symbol not defined\n"),
- pe_def_file->exports[i].internal_name);
- }
- else if (blhe)
- {
- /* xgettext:c-format */
- einfo (_("%XCannot export %s: symbol wrong type (%d vs %d)\n"),
- pe_def_file->exports[i].internal_name,
- blhe->type, bfd_link_hash_defined);
- }
- else
- {
- /* xgettext:c-format */
- einfo (_("%XCannot export %s: symbol not found\n"),
- pe_def_file->exports[i].internal_name);
- }
- free (name);
- }
-}
-
-/* Build the bfd that will contain .edata and .reloc sections. */
-
-static void
-build_filler_bfd (int include_edata)
-{
- lang_input_statement_type *filler_file;
- filler_file = lang_add_input_file ("dll stuff",
- lang_input_file_is_fake_enum,
- NULL);
- filler_file->the_bfd = filler_bfd = bfd_create ("dll stuff", output_bfd);
- if (filler_bfd == NULL
- || !bfd_set_arch_mach (filler_bfd,
- bfd_get_arch (output_bfd),
- bfd_get_mach (output_bfd)))
- {
- einfo ("%X%P: can not create BFD %E\n");
- return;
- }
-
- if (include_edata)
- {
- edata_s = bfd_make_section_old_way (filler_bfd, ".edata");
- if (edata_s == NULL
- || !bfd_set_section_flags (filler_bfd, edata_s,
- (SEC_HAS_CONTENTS
- | SEC_ALLOC
- | SEC_LOAD
- | SEC_KEEP
- | SEC_IN_MEMORY)))
- {
- einfo ("%X%P: can not create .edata section: %E\n");
- return;
- }
- bfd_set_section_size (filler_bfd, edata_s, edata_sz);
- }
-
- reloc_s = bfd_make_section_old_way (filler_bfd, ".reloc");
- if (reloc_s == NULL
- || !bfd_set_section_flags (filler_bfd, reloc_s,
- (SEC_HAS_CONTENTS
- | SEC_ALLOC
- | SEC_LOAD
- | SEC_KEEP
- | SEC_IN_MEMORY)))
- {
- einfo ("%X%P: can not create .reloc section: %E\n");
- return;
- }
-
- bfd_set_section_size (filler_bfd, reloc_s, 0);
-
- ldlang_add_file (filler_file);
-}
-
-/* Gather all the exported symbols and build the .edata section. */
-
-static void
-generate_edata (bfd *abfd, struct bfd_link_info *info ATTRIBUTE_UNUSED)
-{
- int i, next_ordinal;
- int name_table_size = 0;
- const char *dlnp;
-
- /* First, we need to know how many exported symbols there are,
- and what the range of ordinals is. */
- if (pe_def_file->name)
- dll_name = pe_def_file->name;
- else
- {
- dll_name = abfd->filename;
-
- for (dlnp = dll_name; *dlnp; dlnp++)
- if (*dlnp == '\\' || *dlnp == '/' || *dlnp == ':')
- dll_name = dlnp + 1;
- }
-
- if (count_with_ordinals && max_ordinal > count_exported)
- {
- if (min_ordinal > max_ordinal - count_exported + 1)
- min_ordinal = max_ordinal - count_exported + 1;
- }
- else
- {
- min_ordinal = 1;
- max_ordinal = count_exported;
- }
-
- export_table_size = max_ordinal - min_ordinal + 1;
- exported_symbols = xmalloc (export_table_size * sizeof (int));
- for (i = 0; i < export_table_size; i++)
- exported_symbols[i] = -1;
-
- /* 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 (pe_def_file->exports[i].ordinal != -1)
- {
- int ei = pe_def_file->exports[i].ordinal - min_ordinal;
- int pi = exported_symbols[ei];
-
- if (pi != -1)
- {
- /* xgettext:c-format */
- einfo (_("%XError, ordinal used twice: %d (%s vs %s)\n"),
- pe_def_file->exports[i].ordinal,
- pe_def_file->exports[i].name,
- pe_def_file->exports[pi].name);
- }
- exported_symbols[ei] = i;
- }
- name_table_size += strlen (pe_def_file->exports[i].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++;
-
- 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 */
- + 4 * export_table_size /* addresses */
- + 4 * count_exported_byname /* name ptrs */
- + 2 * count_exported_byname /* ordinals */
- + name_table_size + strlen (dll_name) + 1);
-}
-
-/* Fill the exported symbol offsets. The preliminary work has already
- been done in process_def_file(). */
-
-static void
-fill_exported_offsets (bfd *abfd ATTRIBUTE_UNUSED, struct bfd_link_info *info)
-{
- int i;
- struct bfd_link_hash_entry *blhe;
-
- for (i = 0; i < pe_def_file->num_exports; i++)
- {
- char *name;
-
- name = xmalloc (strlen (pe_def_file->exports[i].internal_name) + 2);
- if (pe_details->underscored
- && *pe_def_file->exports[i].internal_name != '@')
- {
- *name = '_';
- strcpy (name + 1, pe_def_file->exports[i].internal_name);
- }
- else
- strcpy (name, pe_def_file->exports[i].internal_name);
-
- blhe = bfd_link_hash_lookup (info->hash,
- name,
- FALSE, FALSE, TRUE);
-
- if (blhe && blhe->type == bfd_link_hash_defined)
- exported_symbol_offsets[i] = blhe->u.def.value;
-
- free (name);
- }
-}
-
-static void
-fill_edata (bfd *abfd, struct bfd_link_info *info ATTRIBUTE_UNUSED)
-{
- int s, hint;
- unsigned char *edirectory;
- unsigned char *eaddresses;
- unsigned char *enameptrs;
- unsigned char *eordinals;
- unsigned char *enamestr;
- time_t now;
-
- time (&now);
-
- edata_d = xmalloc (edata_sz);
-
- /* Note use of array pointer math here. */
- edirectory = edata_d;
- eaddresses = edata_d + 40;
- enameptrs = eaddresses + 4 * export_table_size;
- eordinals = enameptrs + 4 * count_exported_byname;
- enamestr = eordinals + 2 * count_exported_byname;
-
-#define ERVA(ptr) (((unsigned char *)(ptr) - edata_d) \
- + edata_s->output_section->vma - image_base)
-
- memset (edata_d, 0, edata_sz);
- bfd_put_32 (abfd, now, edata_d + 4);
- if (pe_def_file->version_major != -1)
- {
- bfd_put_16 (abfd, pe_def_file->version_major, edata_d + 8);
- bfd_put_16 (abfd, pe_def_file->version_minor, edata_d + 10);
- }
-
- bfd_put_32 (abfd, ERVA (enamestr), edata_d + 12);
- strcpy (enamestr, dll_name);
- enamestr += strlen (enamestr) + 1;
- bfd_put_32 (abfd, min_ordinal, edata_d + 16);
- bfd_put_32 (abfd, export_table_size, edata_d + 20);
- bfd_put_32 (abfd, count_exported_byname, edata_d + 24);
- bfd_put_32 (abfd, ERVA (eaddresses), edata_d + 28);
- bfd_put_32 (abfd, ERVA (enameptrs), edata_d + 32);
- bfd_put_32 (abfd, ERVA (eordinals), edata_d + 36);
-
- fill_exported_offsets (abfd, info);
-
- /* Ok, now for the filling in part.
- Scan alphabetically - ie the ordering in the exports[] table,
- rather than by ordinal - the ordering in the exported_symbol[]
- table. See dlltool.c and:
- http://sources.redhat.com/ml/binutils/2003-04/msg00379.html
- for more information. */
- hint = 0;
- for (s = 0; s < NE; s++)
- {
- struct bfd_section *ssec = exported_symbol_sections[s];
- if (ssec && pe_def_file->exports[s].ordinal != -1)
- {
- 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_noname)
- {
- char *ename = pe_def_file->exports[s].name;
-
- bfd_put_32 (abfd, ERVA (enamestr), enameptrs);
- enameptrs += 4;
- strcpy (enamestr, ename);
- enamestr += strlen (enamestr) + 1;
- bfd_put_16 (abfd, ord - min_ordinal, eordinals);
- eordinals += 2;
- pe_def_file->exports[s].hint = hint++;
- }
- }
- }
-}
-
-
-static struct bfd_section *current_sec;
-
-void
-pe_walk_relocs_of_symbol (struct bfd_link_info *info,
- const char *name,
- int (*cb) (arelent *, asection *))
-{
- bfd *b;
- asection *s;
-
- for (b = info->input_bfds; b; b = b->link_next)
- {
- asymbol **symbols;
- int nsyms, symsize;
-
- symsize = bfd_get_symtab_upper_bound (b);
- symbols = xmalloc (symsize);
- nsyms = bfd_canonicalize_symtab (b, symbols);
-
- for (s = b->sections; s; s = s->next)
- {
- arelent **relocs;
- int relsize, nrelocs, i;
- int flags = bfd_get_section_flags (b, s);
-
- /* Skip discarded linkonce sections. */
- if (flags & SEC_LINK_ONCE
- && s->output_section == bfd_abs_section_ptr)
- continue;
-
- current_sec = s;
-
- relsize = bfd_get_reloc_upper_bound (b, s);
- relocs = xmalloc (relsize);
- nrelocs = bfd_canonicalize_reloc (b, s, relocs, symbols);
-
- for (i = 0; i < nrelocs; i++)
- {
- struct bfd_symbol *sym = *relocs[i]->sym_ptr_ptr;
-
- if (!strcmp (name, sym->name))
- cb (relocs[i], s);
- }
-
- free (relocs);
-
- /* Warning: the allocated symbols are remembered in BFD and reused
- later, so don't free them! */
- /* free (symbols); */
- }
- }
-}
-
-/* Gather all the relocations and build the .reloc section. */
-
-static void
-generate_reloc (bfd *abfd, struct bfd_link_info *info)
-{
-
- /* For .reloc stuff. */
- reloc_data_type *reloc_data;
- int total_relocs = 0;
- int i;
- unsigned long sec_page = (unsigned long) -1;
- unsigned long page_ptr, page_count;
- int bi;
- bfd *b;
- struct bfd_section *s;
-
- total_relocs = 0;
- for (b = info->input_bfds; b; b = b->link_next)
- for (s = b->sections; s; s = s->next)
- total_relocs += s->reloc_count;
-
- reloc_data = xmalloc (total_relocs * sizeof (reloc_data_type));
-
- total_relocs = 0;
- bi = 0;
- for (bi = 0, b = info->input_bfds; b; bi++, b = b->link_next)
- {
- arelent **relocs;
- int relsize, nrelocs, i;
-
- for (s = b->sections; s; s = s->next)
- {
- unsigned long sec_vma = s->output_section->vma + s->output_offset;
- asymbol **symbols;
- int nsyms, symsize;
-
- /* If it's not loaded, we don't need to relocate it this way. */
- if (!(s->output_section->flags & SEC_LOAD))
- continue;
-
- /* I don't know why there would be a reloc for these, but I've
- seen it happen - DJ */
- if (s->output_section == &bfd_abs_section)
- continue;
-
- if (s->output_section->vma == 0)
- {
- /* Huh? Shouldn't happen, but punt if it does. */
- einfo ("DJ: zero vma section reloc detected: `%s' #%d f=%d\n",
- s->output_section->name, s->output_section->index,
- s->output_section->flags);
- continue;
- }
-
- symsize = bfd_get_symtab_upper_bound (b);
- symbols = xmalloc (symsize);
- nsyms = bfd_canonicalize_symtab (b, symbols);
-
- relsize = bfd_get_reloc_upper_bound (b, s);
- relocs = xmalloc (relsize);
- nrelocs = bfd_canonicalize_reloc (b, s, relocs, symbols);
-
- for (i = 0; i < nrelocs; i++)
- {
- if (pe_dll_extra_pe_debug)
- {
- struct bfd_symbol *sym = *relocs[i]->sym_ptr_ptr;
- printf ("rel: %s\n", sym->name);
- }
- if (!relocs[i]->howto->pc_relative
- && relocs[i]->howto->type != pe_details->imagebase_reloc)
- {
- bfd_vma sym_vma;
- struct bfd_symbol *sym = *relocs[i]->sym_ptr_ptr;
-
- sym_vma = (relocs[i]->addend
- + sym->value
- + sym->section->vma
- + sym->section->output_offset
- + sym->section->output_section->vma);
- reloc_data[total_relocs].vma = sec_vma + relocs[i]->address;
-
-#define BITS_AND_SHIFT(bits, shift) (bits * 1000 | shift)
-
- switch BITS_AND_SHIFT (relocs[i]->howto->bitsize,
- relocs[i]->howto->rightshift)
- {
- case BITS_AND_SHIFT (32, 0):
- reloc_data[total_relocs].type = 3;
- total_relocs++;
- break;
- case BITS_AND_SHIFT (16, 0):
- reloc_data[total_relocs].type = 2;
- total_relocs++;
- break;
- case BITS_AND_SHIFT (16, 16):
- reloc_data[total_relocs].type = 4;
- /* FIXME: we can't know the symbol's right value
- yet, but we probably can safely assume that
- CE will relocate us in 64k blocks, so leaving
- it zero is safe. */
- reloc_data[total_relocs].extra = 0;
- total_relocs++;
- break;
- case BITS_AND_SHIFT (26, 2):
- reloc_data[total_relocs].type = 5;
- total_relocs++;
- break;
- case BITS_AND_SHIFT (24, 2):
- /* FIXME: 0 is ARM_26D, it is defined in bfd/coff-arm.c
- Those ARM_xxx definitions should go in proper
- header someday. */
- if (relocs[i]->howto->type == 0
- /* Older GNU linkers used 5 instead of 0 for this reloc. */
- || relocs[i]->howto->type == 5)
- /* This is an ARM_26D reloc, which is an ARM_26 reloc
- that has already been fully processed during a
- previous link stage, so ignore it here. */
- break;
- /* Fall through. */
- default:
- /* xgettext:c-format */
- einfo (_("%XError: %d-bit reloc in dll\n"),
- relocs[i]->howto->bitsize);
- break;
- }
- }
- }
- free (relocs);
- /* Warning: the allocated symbols are remembered in BFD and
- reused later, so don't free them! */
-#if 0
- free (symbol);
-#endif
- }
- }
-
- /* At this point, we have total_relocs relocation addresses in
- reloc_addresses, which are all suitable for the .reloc section.
- We must now create the new sections. */
- qsort (reloc_data, total_relocs, sizeof (*reloc_data), reloc_sort);
-
- for (i = 0; i < total_relocs; i++)
- {
- unsigned long this_page = (reloc_data[i].vma >> 12);
-
- if (this_page != sec_page)
- {
- reloc_sz = (reloc_sz + 3) & ~3; /* 4-byte align. */
- reloc_sz += 8;
- sec_page = this_page;
- }
-
- reloc_sz += 2;
-
- if (reloc_data[i].type == 4)
- reloc_sz += 2;
- }
-
- reloc_sz = (reloc_sz + 3) & ~3; /* 4-byte align. */
- reloc_d = xmalloc (reloc_sz);
- sec_page = (unsigned long) -1;
- reloc_sz = 0;
- page_ptr = (unsigned long) -1;
- page_count = 0;
-
- for (i = 0; i < total_relocs; i++)
- {
- unsigned long rva = reloc_data[i].vma - image_base;
- unsigned long this_page = (rva & ~0xfff);
-
- if (this_page != sec_page)
- {
- while (reloc_sz & 3)
- reloc_d[reloc_sz++] = 0;
-
- if (page_ptr != (unsigned long) -1)
- bfd_put_32 (abfd, reloc_sz - page_ptr, reloc_d + page_ptr + 4);
-
- bfd_put_32 (abfd, this_page, reloc_d + reloc_sz);
- page_ptr = reloc_sz;
- reloc_sz += 8;
- sec_page = this_page;
- page_count = 0;
- }
-
- bfd_put_16 (abfd, (rva & 0xfff) + (reloc_data[i].type << 12),
- reloc_d + reloc_sz);
- reloc_sz += 2;
-
- if (reloc_data[i].type == 4)
- {
- bfd_put_16 (abfd, reloc_data[i].extra, reloc_d + reloc_sz);
- reloc_sz += 2;
- }
-
- page_count++;
- }
-
- while (reloc_sz & 3)
- reloc_d[reloc_sz++] = 0;
-
- 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)
- reloc_d[reloc_sz++] = 0;
-}
-
-/* Given the exiting def_file structure, print out a .DEF file that
- corresponds to it. */
-
-static void
-quoteput (char *s, FILE *f, int needs_quotes)
-{
- char *cp;
-
- for (cp = s; *cp; cp++)
- if (*cp == '\''
- || *cp == '"'
- || *cp == '\\'
- || ISSPACE (*cp)
- || *cp == ','
- || *cp == ';')
- needs_quotes = 1;
-
- if (needs_quotes)
- {
- putc ('"', f);
-
- while (*s)
- {
- if (*s == '"' || *s == '\\')
- putc ('\\', f);
-
- putc (*s, f);
- s++;
- }
-
- putc ('"', f);
- }
- else
- fputs (s, f);
-}
-
-void
-pe_dll_generate_def_file (const char *pe_out_def_filename)
-{
- int i;
- FILE *out = fopen (pe_out_def_filename, "w");
-
- if (out == NULL)
- /* xgettext:c-format */
- einfo (_("%s: Can't open output def file %s\n"),
- program_name, pe_out_def_filename);
-
- if (pe_def_file)
- {
- if (pe_def_file->name)
- {
- if (pe_def_file->is_dll)
- fprintf (out, "LIBRARY ");
- else
- fprintf (out, "NAME ");
-
- quoteput (pe_def_file->name, out, 1);
-
- if (pe_data (output_bfd)->pe_opthdr.ImageBase)
- fprintf (out, " BASE=0x%lx",
- (unsigned long) pe_data (output_bfd)->pe_opthdr.ImageBase);
- fprintf (out, "\n");
- }
-
- if (pe_def_file->description)
- {
- fprintf (out, "DESCRIPTION ");
- quoteput (pe_def_file->description, out, 1);
- fprintf (out, "\n");
- }
-
- if (pe_def_file->version_minor != -1)
- fprintf (out, "VERSION %d.%d\n", pe_def_file->version_major,
- pe_def_file->version_minor);
- else if (pe_def_file->version_major != -1)
- fprintf (out, "VERSION %d\n", pe_def_file->version_major);
-
- if (pe_def_file->stack_reserve != -1 || pe_def_file->heap_reserve != -1)
- fprintf (out, "\n");
-
- if (pe_def_file->stack_commit != -1)
- fprintf (out, "STACKSIZE 0x%x,0x%x\n",
- pe_def_file->stack_reserve, pe_def_file->stack_commit);
- else if (pe_def_file->stack_reserve != -1)
- fprintf (out, "STACKSIZE 0x%x\n", pe_def_file->stack_reserve);
-
- if (pe_def_file->heap_commit != -1)
- fprintf (out, "HEAPSIZE 0x%x,0x%x\n",
- pe_def_file->heap_reserve, pe_def_file->heap_commit);
- else if (pe_def_file->heap_reserve != -1)
- fprintf (out, "HEAPSIZE 0x%x\n", pe_def_file->heap_reserve);
-
- if (pe_def_file->num_section_defs > 0)
- {
- fprintf (out, "\nSECTIONS\n\n");
-
- for (i = 0; i < pe_def_file->num_section_defs; i++)
- {
- fprintf (out, " ");
- quoteput (pe_def_file->section_defs[i].name, out, 0);
-
- if (pe_def_file->section_defs[i].class)
- {
- fprintf (out, " CLASS ");
- quoteput (pe_def_file->section_defs[i].class, out, 0);
- }
-
- if (pe_def_file->section_defs[i].flag_read)
- fprintf (out, " READ");
-
- if (pe_def_file->section_defs[i].flag_write)
- fprintf (out, " WRITE");
-
- if (pe_def_file->section_defs[i].flag_execute)
- fprintf (out, " EXECUTE");
-
- if (pe_def_file->section_defs[i].flag_shared)
- fprintf (out, " SHARED");
-
- fprintf (out, "\n");
- }
- }
-
- if (pe_def_file->num_exports > 0)
- {
- fprintf (out, "EXPORTS\n");
-
- for (i = 0; i < pe_def_file->num_exports; i++)
- {
- def_file_export *e = pe_def_file->exports + i;
- fprintf (out, " ");
- quoteput (e->name, out, 0);
-
- if (e->internal_name && strcmp (e->internal_name, e->name))
- {
- fprintf (out, " = ");
- quoteput (e->internal_name, out, 0);
- }
-
- if (e->ordinal != -1)
- fprintf (out, " @%d", e->ordinal);
-
- if (e->flag_private)
- fprintf (out, " PRIVATE");
-
- if (e->flag_constant)
- fprintf (out, " CONSTANT");
-
- if (e->flag_noname)
- fprintf (out, " NONAME");
-
- if (e->flag_data)
- fprintf (out, " DATA");
-
- fprintf (out, "\n");
- }
- }
-
- if (pe_def_file->num_imports > 0)
- {
- fprintf (out, "\nIMPORTS\n\n");
-
- for (i = 0; i < pe_def_file->num_imports; i++)
- {
- def_file_import *im = pe_def_file->imports + i;
- fprintf (out, " ");
-
- if (im->internal_name
- && (!im->name || strcmp (im->internal_name, im->name)))
- {
- quoteput (im->internal_name, out, 0);
- fprintf (out, " = ");
- }
-
- quoteput (im->module->name, out, 0);
- fprintf (out, ".");
-
- if (im->name)
- quoteput (im->name, out, 0);
- else
- fprintf (out, "%d", im->ordinal);
-
- fprintf (out, "\n");
- }
- }
- }
- else
- fprintf (out, _("; no contents available\n"));
-
- if (fclose (out) == EOF)
- /* xgettext:c-format */
- einfo (_("%P: Error closing file `%s'\n"), pe_out_def_filename);
-}
-
-/* Generate the import library. */
-
-static asymbol **symtab;
-static int symptr;
-static int tmp_seq;
-static const char *dll_filename;
-static char *dll_symname;
-
-#define UNDSEC (asection *) &bfd_und_section
-
-static asection *
-quick_section (bfd *abfd, const char *name, int flags, int align)
-{
- asection *sec;
- asymbol *sym;
-
- sec = bfd_make_section_old_way (abfd, name);
- bfd_set_section_flags (abfd, sec, flags | SEC_ALLOC | SEC_LOAD | SEC_KEEP);
- bfd_set_section_alignment (abfd, sec, align);
- /* Remember to undo this before trying to link internally! */
- sec->output_section = sec;
-
- sym = bfd_make_empty_symbol (abfd);
- symtab[symptr++] = sym;
- sym->name = sec->name;
- sym->section = sec;
- sym->flags = BSF_LOCAL;
- sym->value = 0;
-
- return sec;
-}
-
-static void
-quick_symbol (bfd *abfd,
- const char *n1,
- const char *n2,
- const char *n3,
- asection *sec,
- int flags,
- int addr)
-{
- asymbol *sym;
- char *name = xmalloc (strlen (n1) + strlen (n2) + strlen (n3) + 1);
-
- strcpy (name, n1);
- strcat (name, n2);
- strcat (name, n3);
- sym = bfd_make_empty_symbol (abfd);
- sym->name = name;
- sym->section = sec;
- sym->flags = flags;
- sym->value = addr;
- symtab[symptr++] = sym;
-}
-
-static arelent *reltab = 0;
-static int relcount = 0, relsize = 0;
-
-static void
-quick_reloc (bfd *abfd, int address, int which_howto, int symidx)
-{
- if (relcount >= relsize - 1)
- {
- relsize += 10;
- if (reltab)
- reltab = xrealloc (reltab, relsize * sizeof (arelent));
- else
- reltab = xmalloc (relsize * sizeof (arelent));
- }
- reltab[relcount].address = address;
- reltab[relcount].addend = 0;
- reltab[relcount].howto = bfd_reloc_type_lookup (abfd, which_howto);
- reltab[relcount].sym_ptr_ptr = symtab + symidx;
- relcount++;
-}
-
-static void
-save_relocs (asection *sec)
-{
- int i;
-
- sec->relocation = reltab;
- sec->reloc_count = relcount;
- sec->orelocation = xmalloc ((relcount + 1) * sizeof (arelent *));
- for (i = 0; i < relcount; i++)
- sec->orelocation[i] = sec->relocation + i;
- sec->orelocation[relcount] = 0;
- sec->flags |= SEC_RELOC;
- reltab = 0;
- relcount = relsize = 0;
-}
-
-/* .section .idata$2
- .global __head_my_dll
- __head_my_dll:
- .rva hname
- .long 0
- .long 0
- .rva __my_dll_iname
- .rva fthunk
-
- .section .idata$5
- .long 0
- fthunk:
-
- .section .idata$4
- .long 0
- hname: */
-
-static bfd *
-make_head (bfd *parent)
-{
- asection *id2, *id5, *id4;
- unsigned char *d2, *d5, *d4;
- char *oname;
- bfd *abfd;
-
- oname = xmalloc (20);
- sprintf (oname, "d%06d.o", tmp_seq);
- tmp_seq++;
-
- abfd = bfd_create (oname, parent);
- bfd_find_target (pe_details->object_target, abfd);
- bfd_make_writable (abfd);
-
- bfd_set_format (abfd, bfd_object);
- bfd_set_arch_mach (abfd, pe_details->bfd_arch, 0);
-
- symptr = 0;
- symtab = xmalloc (6 * sizeof (asymbol *));
- id2 = quick_section (abfd, ".idata$2", SEC_HAS_CONTENTS, 2);
- id5 = quick_section (abfd, ".idata$5", SEC_HAS_CONTENTS, 2);
- id4 = quick_section (abfd, ".idata$4", SEC_HAS_CONTENTS, 2);
- quick_symbol (abfd, U ("_head_"), dll_symname, "", id2, BSF_GLOBAL, 0);
- quick_symbol (abfd, U (""), dll_symname, "_iname", UNDSEC, BSF_GLOBAL, 0);
-
- /* OK, pay attention here. I got confused myself looking back at
- it. We create a four-byte section to mark the beginning of the
- list, and we include an offset of 4 in the section, so that the
- pointer to the list points to the *end* of this section, which is
- the start of the list of sections from other objects. */
-
- bfd_set_section_size (abfd, id2, 20);
- d2 = xmalloc (20);
- id2->contents = d2;
- memset (d2, 0, 20);
- d2[0] = d2[16] = 4; /* Reloc addend. */
- quick_reloc (abfd, 0, BFD_RELOC_RVA, 2);
- quick_reloc (abfd, 12, BFD_RELOC_RVA, 4);
- quick_reloc (abfd, 16, BFD_RELOC_RVA, 1);
- save_relocs (id2);
-
- bfd_set_section_size (abfd, id5, 4);
- d5 = xmalloc (4);
- id5->contents = d5;
- memset (d5, 0, 4);
-
- bfd_set_section_size (abfd, id4, 4);
- d4 = xmalloc (4);
- id4->contents = d4;
- memset (d4, 0, 4);
-
- 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_make_readable (abfd);
- return abfd;
-}
-
-/* .section .idata$4
- .long 0
- .section .idata$5
- .long 0
- .section idata$7
- .global __my_dll_iname
- __my_dll_iname:
- .asciz "my.dll" */
-
-static bfd *
-make_tail (bfd *parent)
-{
- asection *id4, *id5, *id7;
- unsigned char *d4, *d5, *d7;
- int len;
- char *oname;
- bfd *abfd;
-
- oname = xmalloc (20);
- sprintf (oname, "d%06d.o", tmp_seq);
- tmp_seq++;
-
- abfd = bfd_create (oname, parent);
- bfd_find_target (pe_details->object_target, abfd);
- bfd_make_writable (abfd);
-
- bfd_set_format (abfd, bfd_object);
- bfd_set_arch_mach (abfd, pe_details->bfd_arch, 0);
-
- symptr = 0;
- symtab = xmalloc (5 * sizeof (asymbol *));
- id4 = quick_section (abfd, ".idata$4", SEC_HAS_CONTENTS, 2);
- id5 = quick_section (abfd, ".idata$5", SEC_HAS_CONTENTS, 2);
- 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);
- id4->contents = d4;
- memset (d4, 0, 4);
-
- bfd_set_section_size (abfd, id5, 4);
- d5 = xmalloc (4);
- id5->contents = d5;
- memset (d5, 0, 4);
-
- len = strlen (dll_filename) + 1;
- if (len & 1)
- len++;
- bfd_set_section_size (abfd, id7, len);
- d7 = xmalloc (len);
- id7->contents = d7;
- strcpy (d7, dll_filename);
-
- 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, id7, d7, 0, len);
-
- bfd_make_readable (abfd);
- return abfd;
-}
-
-/* .text
- .global _function
- .global ___imp_function
- .global __imp__function
- _function:
- jmp *__imp__function:
-
- .section idata$7
- .long __head_my_dll
-
- .section .idata$5
- ___imp_function:
- __imp__function:
- iat?
- .section .idata$4
- iat?
- .section .idata$6
- ID<ordinal>:
- .short <hint>
- .asciz "function" xlate? (add underscore, kill at) */
-
-static unsigned char jmp_ix86_bytes[] =
-{
- 0xff, 0x25, 0x00, 0x00, 0x00, 0x00, 0x90, 0x90
-};
-
-/* _function:
- mov.l ip+8,r0
- mov.l @r0,r0
- jmp @r0
- nop
- .dw __imp_function */
-
-static unsigned char jmp_sh_bytes[] =
-{
- 0x01, 0xd0, 0x02, 0x60, 0x2b, 0x40, 0x09, 0x00, 0x00, 0x00, 0x00, 0x00
-};
-
-/* _function:
- lui $t0,<high:__imp_function>
- lw $t0,<low:__imp_function>
- jr $t0
- nop */
-
-static unsigned char jmp_mips_bytes[] =
-{
- 0x00, 0x00, 0x08, 0x3c, 0x00, 0x00, 0x08, 0x8d,
- 0x08, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x00
-};
-
-static bfd *
-make_one (def_file_export *exp, bfd *parent)
-{
- 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;
- int jmp_byte_count = 0;
-
- 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;
- default:
- abort ();
- }
-
- oname = xmalloc (20);
- sprintf (oname, "d%06d.o", tmp_seq);
- tmp_seq++;
-
- abfd = bfd_create (oname, parent);
- bfd_find_target (pe_details->object_target, abfd);
- bfd_make_writable (abfd);
-
- bfd_set_format (abfd, bfd_object);
- bfd_set_arch_mach (abfd, pe_details->bfd_arch, 0);
-
- symptr = 0;
- symtab = xmalloc (11 * sizeof (asymbol *));
- tx = quick_section (abfd, ".text", SEC_CODE|SEC_HAS_CONTENTS, 2);
- id7 = quick_section (abfd, ".idata$7", SEC_HAS_CONTENTS, 2);
- id5 = quick_section (abfd, ".idata$5", SEC_HAS_CONTENTS, 2);
- id4 = quick_section (abfd, ".idata$4", SEC_HAS_CONTENTS, 2);
- id6 = quick_section (abfd, ".idata$6", SEC_HAS_CONTENTS, 2);
-
- if (*exp->internal_name == '@')
- {
- quick_symbol (abfd, U ("_head_"), dll_symname, "", UNDSEC,
- BSF_GLOBAL, 0);
- if (! exp->flag_data)
- quick_symbol (abfd, "", exp->internal_name, "", tx, BSF_GLOBAL, 0);
- quick_symbol (abfd, U ("_imp_"), exp->internal_name, "", id5,
- BSF_GLOBAL, 0);
- /* Fastcall applies only to functions,
- so no need for auto-import symbol. */
- }
- else
- {
- quick_symbol (abfd, U ("_head_"), dll_symname, "", UNDSEC,
- BSF_GLOBAL, 0);
- if (! exp->flag_data)
- quick_symbol (abfd, U (""), exp->internal_name, "", tx,
- BSF_GLOBAL, 0);
- quick_symbol (abfd, U ("_imp__"), 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,
- BSF_GLOBAL,0);
- }
- if (pe_dll_compat_implib)
- quick_symbol (abfd, U ("__imp_"), exp->internal_name, "", id5,
- BSF_GLOBAL, 0);
-
- if (! exp->flag_data)
- {
- bfd_set_section_size (abfd, tx, jmp_byte_count);
- td = xmalloc (jmp_byte_count);
- tx->contents = td;
- memcpy (td, jmp_bytes, jmp_byte_count);
-
- switch (pe_details->pe_arch)
- {
- case PE_ARCH_i386:
- quick_reloc (abfd, 2, BFD_RELOC_32, 2);
- break;
- case PE_ARCH_sh:
- quick_reloc (abfd, 8, BFD_RELOC_32, 2);
- break;
- case PE_ARCH_mips:
- quick_reloc (abfd, 0, BFD_RELOC_HI16_S, 2);
- quick_reloc (abfd, 0, BFD_RELOC_LO16, 0); /* MIPS_R_PAIR */
- quick_reloc (abfd, 4, BFD_RELOC_LO16, 2);
- break;
- default:
- abort ();
- }
- save_relocs (tx);
- }
-
- bfd_set_section_size (abfd, id7, 4);
- d7 = xmalloc (4);
- id7->contents = d7;
- memset (d7, 0, 4);
- quick_reloc (abfd, 0, BFD_RELOC_RVA, 5);
- save_relocs (id7);
-
- bfd_set_section_size (abfd, id5, 4);
- d5 = xmalloc (4);
- id5->contents = d5;
- memset (d5, 0, 4);
-
- if (exp->flag_noname)
- {
- d5[0] = exp->ordinal;
- d5[1] = exp->ordinal >> 8;
- d5[3] = 0x80;
- }
- else
- {
- quick_reloc (abfd, 0, BFD_RELOC_RVA, 4);
- save_relocs (id5);
- }
-
- bfd_set_section_size (abfd, id4, 4);
- d4 = xmalloc (4);
- id4->contents = d4;
- memset (d4, 0, 4);
-
- if (exp->flag_noname)
- {
- d4[0] = exp->ordinal;
- d4[1] = exp->ordinal >> 8;
- d4[3] = 0x80;
- }
- else
- {
- quick_reloc (abfd, 0, BFD_RELOC_RVA, 4);
- save_relocs (id4);
- }
-
- if (exp->flag_noname)
- {
- len = 0;
- bfd_set_section_size (abfd, id6, 0);
- }
- else
- {
- len = strlen (exp->name) + 3;
- if (len & 1)
- len++;
- bfd_set_section_size (abfd, id6, len);
- d6 = xmalloc (len);
- id6->contents = d6;
- memset (d6, 0, len);
- d6[0] = exp->hint & 0xff;
- d6[1] = exp->hint >> 8;
- strcpy (d6 + 2, exp->name);
- }
-
- bfd_set_symtab (abfd, symtab, symptr);
-
- 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);
- if (!exp->flag_noname)
- bfd_set_section_contents (abfd, id6, d6, 0, len);
-
- bfd_make_readable (abfd);
- return abfd;
-}
-
-static bfd *
-make_singleton_name_thunk (const char *import, bfd *parent)
-{
- /* Name thunks go to idata$4. */
- asection *id4;
- unsigned char *d4;
- char *oname;
- bfd *abfd;
-
- oname = xmalloc (20);
- sprintf (oname, "nmth%06d.o", tmp_seq);
- tmp_seq++;
-
- abfd = bfd_create (oname, parent);
- bfd_find_target (pe_details->object_target, abfd);
- bfd_make_writable (abfd);
-
- bfd_set_format (abfd, bfd_object);
- bfd_set_arch_mach (abfd, pe_details->bfd_arch, 0);
-
- symptr = 0;
- symtab = xmalloc (3 * sizeof (asymbol *));
- id4 = quick_section (abfd, ".idata$4", SEC_HAS_CONTENTS, 2);
- 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);
- id4->contents = d4;
- memset (d4, 0, 8);
- 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_make_readable (abfd);
- return abfd;
-}
-
-static char *
-make_import_fixup_mark (arelent *rel)
-{
- /* We convert reloc to symbol, for later reference. */
- static int counter;
- static char *fixup_name = NULL;
- static size_t buffer_len = 0;
-
- struct bfd_symbol *sym = *rel->sym_ptr_ptr;
-
- bfd *abfd = bfd_asymbol_bfd (sym);
- struct bfd_link_hash_entry *bh;
-
- if (!fixup_name)
- {
- fixup_name = xmalloc (384);
- buffer_len = 384;
- }
-
- if (strlen (sym->name) + 25 > buffer_len)
- /* Assume 25 chars for "__fu" + counter + "_". If counter is
- bigger than 20 digits long, we've got worse problems than
- overflowing this buffer... */
- {
- free (fixup_name);
- /* New buffer size is length of symbol, plus 25, but
- then rounded up to the nearest multiple of 128. */
- buffer_len = ((strlen (sym->name) + 25) + 127) & ~127;
- fixup_name = xmalloc (buffer_len);
- }
-
- sprintf (fixup_name, "__fu%d_%s", counter++, sym->name);
-
- bh = NULL;
- bfd_coff_link_add_one_symbol (&link_info, abfd, fixup_name, BSF_GLOBAL,
- 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
- .rva __nm_thnk_SYM (singleton thunk with name of func)
- .long 0
- .long 0
- .rva __my_dll_iname (name of dll)
- .rva __fuNN_SYM (pointer to reference (address) in text) */
-
-static bfd *
-make_import_fixup_entry (const char *name,
- const char *fixup_name,
- const char *dll_symname,
- bfd *parent)
-{
- asection *id3;
- unsigned char *d3;
- char *oname;
- bfd *abfd;
-
- oname = xmalloc (20);
- sprintf (oname, "fu%06d.o", tmp_seq);
- tmp_seq++;
-
- abfd = bfd_create (oname, parent);
- bfd_find_target (pe_details->object_target, abfd);
- bfd_make_writable (abfd);
-
- bfd_set_format (abfd, bfd_object);
- bfd_set_arch_mach (abfd, pe_details->bfd_arch, 0);
-
- symptr = 0;
- symtab = xmalloc (6 * sizeof (asymbol *));
- id3 = quick_section (abfd, ".idata$3", 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);
-
- 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);
-
- bfd_set_symtab (abfd, symtab, symptr);
-
- bfd_set_section_contents (abfd, id3, d3, 0, 20);
-
- bfd_make_readable (abfd);
- return abfd;
-}
-
-/* .section .rdata_runtime_pseudo_reloc
- .long addend
- .rva __fuNN_SYM (pointer to reference (address) in text) */
-
-static bfd *
-make_runtime_pseudo_reloc (const char *name ATTRIBUTE_UNUSED,
- const char *fixup_name,
- int addend,
- bfd *parent)
-{
- asection *rt_rel;
- unsigned char *rt_rel_d;
- char *oname;
- bfd *abfd;
-
- oname = xmalloc (20);
- sprintf (oname, "rtr%06d.o", tmp_seq);
- tmp_seq++;
-
- abfd = bfd_create (oname, parent);
- bfd_find_target (pe_details->object_target, abfd);
- bfd_make_writable (abfd);
-
- bfd_set_format (abfd, bfd_object);
- bfd_set_arch_mach (abfd, pe_details->bfd_arch, 0);
-
- symptr = 0;
- symtab = xmalloc (2 * sizeof (asymbol *));
- rt_rel = quick_section (abfd, ".rdata_runtime_pseudo_reloc",
- SEC_HAS_CONTENTS, 2);
-
- quick_symbol (abfd, "", fixup_name, "", UNDSEC, BSF_GLOBAL, 0);
-
- bfd_set_section_size (abfd, rt_rel, 8);
- rt_rel_d = xmalloc (8);
- rt_rel->contents = rt_rel_d;
- memset (rt_rel_d, 0, 8);
- bfd_put_32 (abfd, addend, rt_rel_d);
-
- quick_reloc (abfd, 4, BFD_RELOC_RVA, 1);
- save_relocs (rt_rel);
-
- bfd_set_symtab (abfd, symtab, symptr);
-
- bfd_set_section_contents (abfd, rt_rel, rt_rel_d, 0, 8);
-
- bfd_make_readable (abfd);
- return abfd;
-}
-
-/* .section .rdata
- .rva __pei386_runtime_relocator */
-
-static bfd *
-pe_create_runtime_relocator_reference (bfd *parent)
-{
- asection *extern_rt_rel;
- unsigned char *extern_rt_rel_d;
- char *oname;
- bfd *abfd;
-
- oname = xmalloc (20);
- sprintf (oname, "ertr%06d.o", tmp_seq);
- tmp_seq++;
-
- abfd = bfd_create (oname, parent);
- bfd_find_target (pe_details->object_target, abfd);
- bfd_make_writable (abfd);
-
- bfd_set_format (abfd, bfd_object);
- bfd_set_arch_mach (abfd, pe_details->bfd_arch, 0);
-
- symptr = 0;
- symtab = xmalloc (2 * sizeof (asymbol *));
- extern_rt_rel = quick_section (abfd, ".rdata", SEC_HAS_CONTENTS, 2);
-
- quick_symbol (abfd, "", "__pei386_runtime_relocator", "", UNDSEC,
- BSF_NO_FLAGS, 0);
-
- bfd_set_section_size (abfd, extern_rt_rel, 4);
- extern_rt_rel_d = xmalloc (4);
- extern_rt_rel->contents = extern_rt_rel_d;
-
- quick_reloc (abfd, 0, BFD_RELOC_RVA, 1);
- save_relocs (extern_rt_rel);
-
- bfd_set_symtab (abfd, symtab, symptr);
-
- bfd_set_section_contents (abfd, extern_rt_rel, extern_rt_rel_d, 0, 4);
-
- bfd_make_readable (abfd);
- return abfd;
-}
-
-void
-pe_create_import_fixup (arelent *rel, asection *s, int addend)
-{
- char buf[300];
- struct bfd_symbol *sym = *rel->sym_ptr_ptr;
- struct bfd_link_hash_entry *name_thunk_sym;
- const char *name = sym->name;
- char *fixup_name = make_import_fixup_mark (rel);
- bfd *b;
-
- sprintf (buf, U ("_nm_thnk_%s"), name);
-
- name_thunk_sym = bfd_link_hash_lookup (link_info.hash, buf, 0, 0, 1);
-
- if (!name_thunk_sym || name_thunk_sym->type != bfd_link_hash_defined)
- {
- bfd *b = make_singleton_name_thunk (name, output_bfd);
- add_bfd_to_link (b, b->filename, &link_info);
-
- /* If we ever use autoimport, we have to cast text section writable. */
- config.text_read_only = FALSE;
- output_bfd->flags &= ~WP_TEXT;
- }
-
- if (addend == 0 || link_info.pei386_runtime_pseudo_reloc)
- {
- extern char * pe_data_import_dll;
- char * dll_symname = pe_data_import_dll ? pe_data_import_dll : "unknown";
-
- b = make_import_fixup_entry (name, fixup_name, dll_symname, output_bfd);
- add_bfd_to_link (b, b->filename, &link_info);
- }
-
- if (addend != 0)
- {
- if (link_info.pei386_runtime_pseudo_reloc)
- {
- if (pe_dll_extra_pe_debug)
- printf ("creating runtime pseudo-reloc entry for %s (addend=%d)\n",
- fixup_name, addend);
- b = make_runtime_pseudo_reloc (name, fixup_name, addend, output_bfd);
- add_bfd_to_link (b, b->filename, &link_info);
-
- if (runtime_pseudo_relocs_created == 0)
- {
- b = pe_create_runtime_relocator_reference (output_bfd);
- add_bfd_to_link (b, b->filename, &link_info);
- }
- runtime_pseudo_relocs_created++;
- }
- else
- {
- einfo (_("%C: variable '%T' can't be auto-imported. Please read the documentation for ld's --enable-auto-import for details.\n"),
- s->owner, s, rel->address, sym->name);
- einfo ("%X");
- }
- }
-}
-
-
-void
-pe_dll_generate_implib (def_file *def, const char *impfilename)
-{
- int i;
- bfd *ar_head;
- bfd *ar_tail;
- bfd *outarch;
- bfd *head = 0;
-
- dll_filename = (def->name) ? def->name : dll_name;
- dll_symname = xstrdup (dll_filename);
- for (i = 0; dll_symname[i]; i++)
- if (!ISALNUM (dll_symname[i]))
- dll_symname[i] = '_';
-
- unlink (impfilename);
-
- outarch = bfd_openw (impfilename, 0);
-
- if (!outarch)
- {
- /* xgettext:c-format */
- einfo (_("%XCan't open .lib file: %s\n"), impfilename);
- return;
- }
-
- /* xgettext:c-format */
- einfo (_("Creating library file: %s\n"), impfilename);
-
- bfd_set_format (outarch, bfd_archive);
- outarch->has_armap = 1;
-
- /* Work out a reasonable size of things to put onto one line. */
- ar_head = make_head (outarch);
-
- for (i = 0; i < def->num_exports; i++)
- {
- /* The import library doesn't know about the internal name. */
- char *internal = def->exports[i].internal_name;
- bfd *n;
-
- /* Don't add PRIVATE entries to import lib. */
- 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;
- head = n;
- def->exports[i].internal_name = internal;
- }
-
- ar_tail = make_tail (outarch);
-
- if (ar_head == NULL || ar_tail == NULL)
- return;
-
- /* Now stick them all into the archive. */
- ar_head->next = head;
- ar_tail->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 ()));
-
- if (! bfd_close (outarch))
- einfo ("%Xbfd_close %s: %s\n", impfilename, bfd_errmsg (bfd_get_error ()));
-
- while (head != NULL)
- {
- bfd *n = head->next;
- bfd_close (head);
- head = n;
- }
-}
-
-static void
-add_bfd_to_link (bfd *abfd, const char *name, struct bfd_link_info *link_info)
-{
- lang_input_statement_type *fake_file;
-
- fake_file = lang_add_input_file (name,
- lang_input_file_is_fake_enum,
- NULL);
- fake_file->the_bfd = abfd;
- ldlang_add_file (fake_file);
-
- if (!bfd_link_add_symbols (abfd, link_info))
- einfo ("%Xaddsym %s: %s\n", name, bfd_errmsg (bfd_get_error ()));
-}
-
-void
-pe_process_import_defs (bfd *output_bfd, struct bfd_link_info *link_info)
-{
- def_file_module *module;
-
- pe_dll_id_target (bfd_get_target (output_bfd));
-
- if (!pe_def_file)
- return;
-
- for (module = pe_def_file->modules; module; module = module->next)
- {
- int i, do_this_dll;
-
- dll_filename = module->name;
- dll_symname = xstrdup (module->name);
- for (i = 0; dll_symname[i]; i++)
- if (!ISALNUM (dll_symname[i]))
- dll_symname[i] = '_';
-
- do_this_dll = 0;
-
- for (i = 0; i < pe_def_file->num_imports; i++)
- if (pe_def_file->imports[i].module == module)
- {
- def_file_export exp;
- struct bfd_link_hash_entry *blhe;
- int lead_at = (*pe_def_file->imports[i].internal_name == '@');
- /* See if we need this import. */
- size_t len = strlen (pe_def_file->imports[i].internal_name);
- char *name = xmalloc (len + 2 + 6);
-
- if (lead_at)
- sprintf (name, "%s%s", "",
- pe_def_file->imports[i].internal_name);
- else
- sprintf (name, "%s%s",U (""),
- pe_def_file->imports[i].internal_name);
-
- blhe = bfd_link_hash_lookup (link_info->hash, name,
- FALSE, FALSE, FALSE);
-
- if (!blhe || (blhe && blhe->type != bfd_link_hash_undefined))
- {
- if (lead_at)
- sprintf (name, "%s%s", U ("_imp_"),
- pe_def_file->imports[i].internal_name);
- else
- sprintf (name, "%s%s", U ("_imp__"),
- pe_def_file->imports[i].internal_name);
-
- blhe = bfd_link_hash_lookup (link_info->hash, name,
- FALSE, FALSE, FALSE);
- }
- free (name);
-
- if (blhe && blhe->type == bfd_link_hash_undefined)
- {
- bfd *one;
- /* We do. */
- if (!do_this_dll)
- {
- bfd *ar_head = make_head (output_bfd);
- add_bfd_to_link (ar_head, ar_head->filename, link_info);
- do_this_dll = 1;
- }
- exp.internal_name = pe_def_file->imports[i].internal_name;
- exp.name = pe_def_file->imports[i].name;
- exp.ordinal = pe_def_file->imports[i].ordinal;
- exp.hint = exp.ordinal >= 0 ? exp.ordinal : 0;
- exp.flag_private = 0;
- 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);
- add_bfd_to_link (one, one->filename, link_info);
- }
- }
- if (do_this_dll)
- {
- bfd *ar_tail = make_tail (output_bfd);
- add_bfd_to_link (ar_tail, ar_tail->filename, link_info);
- }
-
- free (dll_symname);
- }
-}
-
-/* We were handed a *.DLL file. Parse it and turn it into a set of
- IMPORTS directives in the def file. Return TRUE if the file was
- handled, FALSE if not. */
-
-static unsigned int
-pe_get16 (bfd *abfd, int where)
-{
- unsigned char b[2];
-
- bfd_seek (abfd, (file_ptr) where, SEEK_SET);
- bfd_bread (b, (bfd_size_type) 2, abfd);
- return b[0] + (b[1] << 8);
-}
-
-static unsigned int
-pe_get32 (bfd *abfd, int where)
-{
- unsigned char b[4];
-
- bfd_seek (abfd, (file_ptr) where, SEEK_SET);
- bfd_bread (b, (bfd_size_type) 4, abfd);
- 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)
-{
- unsigned char *b = ptr;
-
- return b[0] + (b[1] << 8) + (b[2] << 16) + (b[3] << 24);
-}
-
-bfd_boolean
-pe_implied_import_dll (const char *filename)
-{
- bfd *dll;
- 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 long name_rvas, ordinals, nexp, ordbase;
- const char *dll_name;
- /* Initialization with start > end guarantees that is_data
- will not be set by mistake, and avoids compiler warning. */
- unsigned long data_start = 1;
- unsigned long data_end = 0;
- unsigned long rdata_start = 1;
- unsigned long rdata_end = 0;
- unsigned long bss_start = 1;
- unsigned long bss_end = 0;
-
- /* No, I can't use bfd here. kernel32.dll puts its export table in
- the middle of the .rdata section. */
- dll = bfd_openr (filename, pe_details->target_name);
- if (!dll)
- {
- einfo ("%Xopen %s: %s\n", filename, bfd_errmsg (bfd_get_error ()));
- return FALSE;
- }
-
- /* PEI dlls seem to be bfd_objects. */
- if (!bfd_check_format (dll, bfd_object))
- {
- einfo ("%X%s: this doesn't appear to be a DLL\n", filename);
- return FALSE;
- }
-
- /* Get pe_header, optional header and numbers of export entries. */
- pe_header_offset = pe_get32 (dll, 0x3c);
- opthdr_ofs = pe_header_offset + 4 + 20;
- num_entries = pe_get32 (dll, opthdr_ofs + 92);
-
- if (num_entries < 1) /* No exports. */
- return FALSE;
-
- export_rva = pe_get32 (dll, opthdr_ofs + 96);
- export_size = pe_get32 (dll, opthdr_ofs + 100);
- nsections = pe_get16 (dll, pe_header_offset + 4 + 2);
- secptr = (pe_header_offset + 4 + 20 +
- pe_get16 (dll, pe_header_offset + 4 + 16));
- expptr = 0;
-
- /* Get the rva and size of the export section. */
- for (i = 0; i < nsections; i++)
- {
- char sname[8];
- unsigned long secptr1 = secptr + 40 * i;
- unsigned long vaddr = pe_get32 (dll, secptr1 + 12);
- unsigned long vsize = pe_get32 (dll, secptr1 + 16);
- unsigned long fptr = pe_get32 (dll, secptr1 + 20);
-
- bfd_seek (dll, (file_ptr) secptr1, SEEK_SET);
- bfd_bread (sname, (bfd_size_type) 8, dll);
-
- if (vaddr <= export_rva && vaddr + vsize > export_rva)
- {
- expptr = fptr + (export_rva - vaddr);
- if (export_rva + export_size > vaddr + vsize)
- export_size = vsize - (export_rva - vaddr);
- break;
- }
- }
-
- /* Scan sections and store the base and size of the
- data and bss segments in data/base_start/end. */
- for (i = 0; i < nsections; i++)
- {
- unsigned long secptr1 = secptr + 40 * i;
- unsigned long vsize = pe_get32 (dll, secptr1 + 8);
- unsigned long vaddr = pe_get32 (dll, secptr1 + 12);
- unsigned long flags = pe_get32 (dll, secptr1 + 36);
- char sec_name[9];
-
- sec_name[8] = '\0';
- bfd_seek (dll, (file_ptr) secptr1 + 0, SEEK_SET);
- bfd_bread (sec_name, (bfd_size_type) 8, dll);
-
- if (strcmp(sec_name,".data") == 0)
- {
- data_start = vaddr;
- data_end = vaddr + vsize;
-
- if (pe_dll_extra_pe_debug)
- printf ("%s %s: 0x%08lx-0x%08lx (0x%08lx)\n",
- __FUNCTION__, sec_name, vaddr, vaddr + vsize, flags);
- }
- else if (strcmp(sec_name,".rdata") == 0)
- {
- rdata_start = vaddr;
- rdata_end = vaddr + vsize;
-
- if (pe_dll_extra_pe_debug)
- printf ("%s %s: 0x%08lx-0x%08lx (0x%08lx)\n",
- __FUNCTION__, sec_name, vaddr, vaddr + vsize, flags);
- }
- else if (strcmp (sec_name,".bss") == 0)
- {
- bss_start = vaddr;
- bss_end = vaddr + vsize;
-
- if (pe_dll_extra_pe_debug)
- printf ("%s %s: 0x%08lx-0x%08lx (0x%08lx)\n",
- __FUNCTION__, sec_name, vaddr, vaddr + vsize, flags);
- }
- }
-
- 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;
-
- if (pe_def_file == 0)
- pe_def_file = def_file_empty ();
-
- nexp = pe_as32 (expdata + 24);
- name_rvas = pe_as32 (expdata + 32);
- ordinals = pe_as32 (expdata + 36);
- ordbase = pe_as32 (expdata + 16);
- exp_funcbase = pe_as32 (expdata + 28);
-
- /* Use internal dll name instead of filename
- to enable symbolic dll linking. */
- dll_name = pe_as32 (expdata + 12) + erva;
-
- /* Check to see if the dll has already been added to
- the definition list and if so return without error.
- This avoids multiple symbol definitions. */
- if (def_get_module (pe_def_file, dll_name))
- {
- if (pe_dll_extra_pe_debug)
- printf ("%s is already loaded\n", dll_name);
- return TRUE;
- }
-
- /* Iterate through the list of symbols. */
- for (i = 0; i < nexp; i++)
- {
- /* Pointer to the names vector. */
- unsigned long name_rva = pe_as32 (erva + name_rvas + i * 4);
- def_file_import *imp;
- /* Pointer to the function address vector. */
- unsigned long func_rva = pe_as32 (erva + exp_funcbase + i * 4);
- int is_data = 0;
-
- /* Skip unwanted symbols, which are
- exported in buggy auto-import releases. */
- if (strncmp (erva + name_rva, "_nm_", 4) != 0)
- {
- /* is_data is true if the address is in the data, rdata or bss
- segment. */
- is_data =
- (func_rva >= data_start && func_rva < data_end)
- || (func_rva >= rdata_start && func_rva < rdata_end)
- || (func_rva >= bss_start && func_rva < bss_end);
-
- imp = def_file_add_import (pe_def_file, erva + name_rva,
- dll_name, i, 0);
- /* Mark symbol type. */
- imp->data = is_data;
-
- if (pe_dll_extra_pe_debug)
- printf ("%s dll-name: %s sym: %s addr: 0x%lx %s\n",
- __FUNCTION__, dll_name, erva + name_rva,
- func_rva, is_data ? "(data)" : "");
- }
- }
-
- return TRUE;
-}
-
-/* These are the main functions, called from the emulation. The first
- is called after the bfds are read, so we can guess at how much space
- we need. The second is called after everything is placed, so we
- can put the right values in place. */
-
-void
-pe_dll_build_sections (bfd *abfd, struct bfd_link_info *info)
-{
- pe_dll_id_target (bfd_get_target (abfd));
- process_def_file (abfd, info);
-
- if (pe_def_file->num_exports == 0 && !info->shared)
- return;
-
- generate_edata (abfd, info);
- build_filler_bfd (1);
-}
-
-void
-pe_exe_build_sections (bfd *abfd, struct bfd_link_info *info ATTRIBUTE_UNUSED)
-{
- pe_dll_id_target (bfd_get_target (abfd));
- build_filler_bfd (0);
-}
-
-void
-pe_dll_fill_sections (bfd *abfd, struct bfd_link_info *info)
-{
- pe_dll_id_target (bfd_get_target (abfd));
- image_base = pe_data (abfd)->pe_opthdr.ImageBase;
-
- generate_reloc (abfd, info);
- if (reloc_sz > 0)
- {
- 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);
-
- /* Redo special stuff. */
- ldemul_after_allocation ();
-
- /* Do the assignments again. */
- lang_do_assignments (stat_ptr->head, abs_output_section, NULL, 0);
- }
-
- fill_edata (abfd, info);
-
- if (info->shared)
- pe_data (abfd)->dll = 1;
-
- edata_s->contents = edata_d;
- reloc_s->contents = reloc_d;
-}
-
-void
-pe_exe_fill_sections (bfd *abfd, struct bfd_link_info *info)
-{
- pe_dll_id_target (bfd_get_target (abfd));
- image_base = pe_data (abfd)->pe_opthdr.ImageBase;
-
- generate_reloc (abfd, info);
- if (reloc_sz > 0)
- {
- 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);
-
- /* Redo special stuff. */
- ldemul_after_allocation ();
-
- /* Do the assignments again. */
- lang_do_assignments (stat_ptr->head, abs_output_section, NULL, 0);
- }
- reloc_s->contents = reloc_d;
-}
diff --git a/contrib/binutils/ld/pe-dll.h b/contrib/binutils/ld/pe-dll.h
deleted file mode 100644
index 029bf33..0000000
--- a/contrib/binutils/ld/pe-dll.h
+++ /dev/null
@@ -1,62 +0,0 @@
-/* pe-dll.h: Header file for routines used to build Windows DLLs.
- Copyright 1999, 2000, 2002, 2003 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, 59 Temple Place - Suite 330, Boston, MA
- 02111-1307, USA. */
-
-#ifndef PE_DLL_H
-#define PE_DLL_H
-
-#include "bfd.h"
-#include "sysdep.h"
-#include "bfdlink.h"
-#include "deffile.h"
-
-extern def_file *pe_def_file;
-extern int pe_dll_export_everything;
-extern int pe_dll_do_default_excludes;
-extern int pe_dll_kill_ats;
-extern int pe_dll_stdcall_aliases;
-extern int pe_dll_warn_dup_exports;
-extern int pe_dll_compat_implib;
-extern int pe_dll_extra_pe_debug;
-
-extern void pe_dll_id_target
- (const char *);
-extern void pe_dll_add_excludes
- (const char *, const int);
-extern void pe_dll_generate_def_file
- (const char *);
-extern void pe_dll_generate_implib
- (def_file *, const char *);
-extern void pe_process_import_defs
- (bfd *, struct bfd_link_info *);
-extern bfd_boolean pe_implied_import_dll
- (const char *);
-extern void pe_dll_build_sections
- (bfd *, struct bfd_link_info *);
-extern void pe_exe_build_sections
- (bfd *, struct bfd_link_info *);
-extern void pe_dll_fill_sections
- (bfd *, struct bfd_link_info *);
-extern void pe_exe_fill_sections
- (bfd *, struct bfd_link_info *);
-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);
-#endif /* PE_DLL_H */
diff --git a/contrib/binutils/ld/po/Make-in b/contrib/binutils/ld/po/Make-in
deleted file mode 100644
index 4291090..0000000
--- a/contrib/binutils/ld/po/Make-in
+++ /dev/null
@@ -1,251 +0,0 @@
-# Makefile for program source directory in GNU NLS utilities package.
-# Copyright (C) 1995, 1996, 1997 by Ulrich Drepper <drepper@gnu.ai.mit.edu>
-#
-# This file file 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.
-
-PACKAGE = @PACKAGE@
-VERSION = @VERSION@
-
-SHELL = /bin/sh
-@SET_MAKE@
-
-srcdir = @srcdir@
-top_srcdir = @top_srcdir@
-VPATH = @srcdir@
-
-prefix = @prefix@
-exec_prefix = @exec_prefix@
-datadir = $(prefix)/@DATADIRNAME@
-localedir = $(datadir)/locale
-gnulocaledir = $(prefix)/share/locale
-gettextsrcdir = $(prefix)/share/gettext/po
-subdir = po
-
-INSTALL = @INSTALL@
-INSTALL_DATA = @INSTALL_DATA@
-MKINSTALLDIRS = @MKINSTALLDIRS@
-
-CC = @CC@
-GENCAT = @GENCAT@
-GMSGFMT = PATH=../src:$$PATH @GMSGFMT@
-MSGFMT = @MSGFMT@
-XGETTEXT = PATH=../src:$$PATH @XGETTEXT@
-MSGMERGE = PATH=../src:$$PATH msgmerge
-
-DEFS = @DEFS@
-CFLAGS = @CFLAGS@
-CPPFLAGS = @CPPFLAGS@
-
-INCLUDES = -I.. -I$(top_srcdir)/intl
-
-COMPILE = $(CC) -c $(DEFS) $(INCLUDES) $(CPPFLAGS) $(CFLAGS) $(XCFLAGS)
-
-SOURCES = cat-id-tbl.c
-POFILES = @POFILES@
-GMOFILES = @GMOFILES@
-DISTFILES = ChangeLog Makefile.in.in POTFILES.in $(PACKAGE).pot \
-stamp-cat-id $(POFILES) $(GMOFILES) $(SOURCES)
-
-POTFILES = \
-
-CATALOGS = @CATALOGS@
-CATOBJEXT = @CATOBJEXT@
-INSTOBJEXT = @INSTOBJEXT@
-
-.SUFFIXES:
-.SUFFIXES: .c .o .po .pox .gmo .mo .msg .cat
-
-.c.o:
- $(COMPILE) $<
-
-.po.pox:
- $(MAKE) $(PACKAGE).pot
- $(MSGMERGE) $< $(srcdir)/$(PACKAGE).pot -o $*.pox
-
-.po.mo:
- $(MSGFMT) -o $@ $<
-
-.po.gmo:
- file=$(srcdir)/`echo $* | sed 's,.*/,,'`.gmo \
- && rm -f $$file && $(GMSGFMT) -o $$file $<
-
-.po.cat:
- sed -f ../intl/po2msg.sed < $< > $*.msg \
- && rm -f $@ && $(GENCAT) $@ $*.msg
-
-
-all: all-@USE_NLS@
-
-all-yes: $(CATALOGS) @MAINT@ $(PACKAGE).pot
-all-no:
-
-$(srcdir)/$(PACKAGE).pot: $(POTFILES)
- $(XGETTEXT) --default-domain=$(PACKAGE) --directory=$(top_srcdir) \
- --add-comments -C --keyword=_ --keyword=N_ \
- --files-from=$(srcdir)/POTFILES.in
- rm -f $(srcdir)/$(PACKAGE).pot
- mv $(PACKAGE).po $(srcdir)/$(PACKAGE).pot
-
-$(srcdir)/cat-id-tbl.c: stamp-cat-id; @:
-$(srcdir)/stamp-cat-id: $(PACKAGE).pot
- rm -f cat-id-tbl.tmp
- sed -f ../intl/po2tbl.sed $(srcdir)/$(PACKAGE).pot \
- | sed -e "s/@PACKAGE NAME@/$(PACKAGE)/" > cat-id-tbl.tmp
- if cmp -s cat-id-tbl.tmp $(srcdir)/cat-id-tbl.c; then \
- rm cat-id-tbl.tmp; \
- else \
- echo cat-id-tbl.c changed; \
- rm -f $(srcdir)/cat-id-tbl.c; \
- mv cat-id-tbl.tmp $(srcdir)/cat-id-tbl.c; \
- fi
- cd $(srcdir) && rm -f stamp-cat-id && echo timestamp > stamp-cat-id
-
-
-install: install-exec install-data
-install-exec:
-install-info:
-install-data: install-data-@USE_NLS@
-install-data-no: all
-install-data-yes: all
- if test -r $(MKINSTALLDIRS); then \
- $(MKINSTALLDIRS) $(datadir); \
- else \
- $(top_srcdir)/mkinstalldirs $(datadir); \
- fi
- @catalogs='$(CATALOGS)'; \
- for cat in $$catalogs; do \
- cat=`basename $$cat`; \
- case "$$cat" in \
- *.gmo) destdir=$(gnulocaledir);; \
- *) destdir=$(localedir);; \
- esac; \
- lang=`echo $$cat | sed 's/\$(CATOBJEXT)$$//'`; \
- dir=$$destdir/$$lang/LC_MESSAGES; \
- if test -r $(MKINSTALLDIRS); then \
- $(MKINSTALLDIRS) $$dir; \
- else \
- $(top_srcdir)/mkinstalldirs $$dir; \
- fi; \
- if test -r $$cat; then \
- $(INSTALL_DATA) $$cat $$dir/$(PACKAGE)$(INSTOBJEXT); \
- echo "installing $$cat as $$dir/$(PACKAGE)$(INSTOBJEXT)"; \
- else \
- $(INSTALL_DATA) $(srcdir)/$$cat $$dir/$(PACKAGE)$(INSTOBJEXT); \
- echo "installing $(srcdir)/$$cat as" \
- "$$dir/$(PACKAGE)$(INSTOBJEXT)"; \
- fi; \
- if test -r $$cat.m; then \
- $(INSTALL_DATA) $$cat.m $$dir/$(PACKAGE)$(INSTOBJEXT).m; \
- echo "installing $$cat.m as $$dir/$(PACKAGE)$(INSTOBJEXT).m"; \
- else \
- if test -r $(srcdir)/$$cat.m ; then \
- $(INSTALL_DATA) $(srcdir)/$$cat.m \
- $$dir/$(PACKAGE)$(INSTOBJEXT).m; \
- echo "installing $(srcdir)/$$cat as" \
- "$$dir/$(PACKAGE)$(INSTOBJEXT).m"; \
- else \
- true; \
- fi; \
- fi; \
- done
- if test "$(PACKAGE)" = "gettext"; then \
- if test -r $(MKINSTALLDIRS); then \
- $(MKINSTALLDIRS) $(gettextsrcdir); \
- else \
- $(top_srcdir)/mkinstalldirs $(gettextsrcdir); \
- fi; \
- $(INSTALL_DATA) $(srcdir)/Makefile.in.in \
- $(gettextsrcdir)/Makefile.in.in; \
- else \
- : ; \
- fi
-
-# Define this as empty until I found a useful application.
-installcheck:
-
-uninstall:
- catalogs='$(CATALOGS)'; \
- 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; \
- done
- rm -f $(gettextsrcdir)/po-Makefile.in.in
-
-check: all
-
-cat-id-tbl.o: ../intl/libgettext.h
-
-dvi info tags TAGS ID:
-
-mostlyclean:
- rm -f core core.* *.pox $(PACKAGE).po *.old.po cat-id-tbl.tmp
- rm -fr *.o
-
-clean: mostlyclean
-
-distclean: clean
- rm -f Makefile Makefile.in POTFILES *.mo *.msg *.cat *.cat.m
-
-maintainer-clean: distclean
- @echo "This command is intended for maintainers to use;"
- @echo "it deletes files that may require special tools to rebuild."
- rm -f $(GMOFILES)
-
-distdir = ../$(PACKAGE)-$(VERSION)/$(subdir)
-dist distdir: update-po $(DISTFILES)
- dists="$(DISTFILES)"; \
- for file in $$dists; do \
- ln $(srcdir)/$$file $(distdir) 2> /dev/null \
- || cp -p $(srcdir)/$$file $(distdir); \
- done
-
-update-po: Makefile
- $(MAKE) $(PACKAGE).pot
- PATH=`pwd`/../src:$$PATH; \
- cd $(srcdir); \
- catalogs='$(CATALOGS)'; \
- for cat in $$catalogs; do \
- cat=`basename $$cat`; \
- lang=`echo $$cat | sed 's/\$(CATOBJEXT)$$//'`; \
- mv $$lang.po $$lang.old.po; \
- echo "$$lang:"; \
- if $(MSGMERGE) $$lang.old.po $(PACKAGE).pot -o $$lang.po; then \
- rm -f $$lang.old.po; \
- else \
- echo "msgmerge for $$cat failed!"; \
- rm -f $$lang.po; \
- mv $$lang.old.po $$lang.po; \
- fi; \
- done
-
-POTFILES: POTFILES.in
- ( if test 'x$(srcdir)' != 'x.'; then \
- posrcprefix='$(top_srcdir)/'; \
- else \
- posrcprefix="../"; \
- fi; \
- rm -f $@-t $@ \
- && (sed -e '/^#/d' -e '/^[ ]*$$/d' \
- -e "s@.*@ $$posrcprefix& \\\\@" < $(srcdir)/$@.in \
- | sed -e '$$s/\\$$//') > $@-t \
- && chmod a-w $@-t \
- && mv $@-t $@ )
-
-POTFILES.in: @MAINT@ ../Makefile
- cd .. && $(MAKE) po/POTFILES.in
-
-Makefile: Make-in ../config.status POTFILES
- cd .. \
- && CONFIG_FILES=$(subdir)/Makefile.in:$(subdir)/Make-in \
- CONFIG_HEADERS= $(SHELL) ./config.status
-
-# Tell versions [3.59,3.63) of GNU make not to export all variables.
-# Otherwise a system limit (for SysV at least) may be exceeded.
-.NOEXPORT:
diff --git a/contrib/binutils/ld/po/POTFILES.in b/contrib/binutils/ld/po/POTFILES.in
deleted file mode 100644
index f7a614d..0000000
--- a/contrib/binutils/ld/po/POTFILES.in
+++ /dev/null
@@ -1,29 +0,0 @@
-deffile.h
-emultempl/armcoff.em
-emultempl/pe.em
-ld.h
-ldcref.c
-ldctor.c
-ldctor.h
-ldemul.c
-ldemul.h
-ldexp.c
-ldexp.h
-ldfile.c
-ldfile.h
-ldlang.c
-ldlang.h
-ldlex.h
-ldmain.c
-ldmain.h
-ldmisc.c
-ldmisc.h
-ldver.c
-ldver.h
-ldwrite.c
-ldwrite.h
-lexsup.c
-mri.c
-mri.h
-pe-dll.c
-pe-dll.h
diff --git a/contrib/binutils/ld/po/ld.pot b/contrib/binutils/ld/po/ld.pot
deleted file mode 100644
index 87119b5..0000000
--- a/contrib/binutils/ld/po/ld.pot
+++ /dev/null
@@ -1,1693 +0,0 @@
-# SOME DESCRIPTIVE TITLE.
-# Copyright (C) YEAR THE PACKAGE'S COPYRIGHT HOLDER
-# This file is distributed under the same license as the PACKAGE package.
-# FIRST AUTHOR <EMAIL@ADDRESS>, YEAR.
-#
-#, fuzzy
-msgid ""
-msgstr ""
-"Project-Id-Version: PACKAGE VERSION\n"
-"POT-Creation-Date: 2002-10-30 10:08-0500\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"
-"MIME-Version: 1.0\n"
-"Content-Type: text/plain; charset=CHARSET\n"
-"Content-Transfer-Encoding: 8bit\n"
-
-#: emultempl/armcoff.em:71
-msgid " --support-old-code Support interworking with old code\n"
-msgstr ""
-
-#: emultempl/armcoff.em:72
-msgid " --thumb-entry=<sym> Set the entry point to be Thumb symbol <sym>\n"
-msgstr ""
-
-#: emultempl/armcoff.em:141
-#, c-format
-msgid "Errors encountered processing file %s"
-msgstr ""
-
-#: emultempl/armcoff.em:207 emultempl/pe.em:1422
-msgid "%P: warning: '--thumb-entry %s' is overriding '-e %s'\n"
-msgstr ""
-
-#: emultempl/armcoff.em:212 emultempl/pe.em:1427
-msgid "%P: warning: connot find thumb start symbol %s\n"
-msgstr ""
-
-#: emultempl/pe.em:317
-msgid ""
-" --base_file <basefile> Generate a base file for relocatable "
-"DLLs\n"
-msgstr ""
-
-#: emultempl/pe.em:318
-msgid ""
-" --dll Set image base to the default for DLLs\n"
-msgstr ""
-
-#: emultempl/pe.em:319
-msgid " --file-alignment <size> Set file alignment\n"
-msgstr ""
-
-#: emultempl/pe.em:320
-msgid " --heap <size> Set initial size of the heap\n"
-msgstr ""
-
-#: emultempl/pe.em:321
-msgid ""
-" --image-base <address> Set start address of the executable\n"
-msgstr ""
-
-#: emultempl/pe.em:322
-msgid ""
-" --major-image-version <number> Set version number of the executable\n"
-msgstr ""
-
-#: emultempl/pe.em:323
-msgid " --major-os-version <number> Set minimum required OS version\n"
-msgstr ""
-
-#: emultempl/pe.em:324
-msgid ""
-" --major-subsystem-version <number> Set minimum required OS subsystem "
-"version\n"
-msgstr ""
-
-#: emultempl/pe.em:325
-msgid ""
-" --minor-image-version <number> Set revision number of the executable\n"
-msgstr ""
-
-#: emultempl/pe.em:326
-msgid " --minor-os-version <number> Set minimum required OS revision\n"
-msgstr ""
-
-#: emultempl/pe.em:327
-msgid ""
-" --minor-subsystem-version <number> Set minimum required OS subsystem "
-"revision\n"
-msgstr ""
-
-#: emultempl/pe.em:328
-msgid " --section-alignment <size> Set section alignment\n"
-msgstr ""
-
-#: emultempl/pe.em:329
-msgid " --stack <size> Set size of the initial stack\n"
-msgstr ""
-
-#: emultempl/pe.em:330
-msgid ""
-" --subsystem <name>[:<version>] Set required OS subsystem [& version]\n"
-msgstr ""
-
-#: emultempl/pe.em:331
-msgid ""
-" --support-old-code Support interworking with old code\n"
-msgstr ""
-
-#: emultempl/pe.em:332
-msgid ""
-" --thumb-entry=<symbol> Set the entry point to be Thumb "
-"<symbol>\n"
-msgstr ""
-
-#: emultempl/pe.em:334
-msgid ""
-" --add-stdcall-alias Export symbols with and without @nn\n"
-msgstr ""
-
-#: emultempl/pe.em:335
-msgid " --disable-stdcall-fixup Don't link _sym to _sym@nn\n"
-msgstr ""
-
-#: emultempl/pe.em:336
-msgid ""
-" --enable-stdcall-fixup Link _sym to _sym@nn without warnings\n"
-msgstr ""
-
-#: emultempl/pe.em:337
-msgid ""
-" --exclude-symbols sym,sym,... Exclude symbols from automatic export\n"
-msgstr ""
-
-#: emultempl/pe.em:338
-msgid ""
-" --exclude-libs lib,lib,... Exclude libraries from automatic "
-"export\n"
-msgstr ""
-
-#: emultempl/pe.em:339
-msgid ""
-" --export-all-symbols Automatically export all globals to "
-"DLL\n"
-msgstr ""
-
-#: emultempl/pe.em:340
-msgid " --kill-at Remove @nn from exported symbols\n"
-msgstr ""
-
-#: emultempl/pe.em:341
-msgid " --out-implib <file> Generate import library\n"
-msgstr ""
-
-#: emultempl/pe.em:342
-msgid ""
-" --output-def <file> Generate a .DEF file for the built DLL\n"
-msgstr ""
-
-#: emultempl/pe.em:343
-msgid " --warn-duplicate-exports Warn about duplicate exports.\n"
-msgstr ""
-
-#: emultempl/pe.em:344
-msgid ""
-" --compat-implib Create backward compatible import "
-"libs;\n"
-" create __imp_<SYMBOL> as well.\n"
-msgstr ""
-
-#: emultempl/pe.em:346
-msgid ""
-" --enable-auto-image-base Automatically choose image base for "
-"DLLs\n"
-" unless user specifies one\n"
-msgstr ""
-
-#: emultempl/pe.em:348
-msgid ""
-" --disable-auto-image-base Do not auto-choose image base. "
-"(default)\n"
-msgstr ""
-
-#: emultempl/pe.em:349
-msgid ""
-" --dll-search-prefix=<string> When linking dynamically to a dll "
-"without an\n"
-" importlib, use <string><basename>."
-"dll \n"
-" in preference to lib<basename>.dll \n"
-msgstr ""
-
-#: emultempl/pe.em:352
-msgid ""
-" --enable-auto-import Do sophistcated linking of _sym to \n"
-" __imp_sym for DATA references\n"
-msgstr ""
-
-#: emultempl/pe.em:354
-msgid ""
-" --disable-auto-import Do not auto-import DATA items from "
-"DLLs\n"
-msgstr ""
-
-#: emultempl/pe.em:355
-msgid ""
-" --enable-extra-pe-debug Enable verbose debug output when "
-"building\n"
-" or linking to DLLs (esp. auto-"
-"import)\n"
-msgstr ""
-
-#: emultempl/pe.em:424
-msgid "%P: warning: bad version number in -subsystem option\n"
-msgstr ""
-
-#: emultempl/pe.em:460
-msgid "%P%F: invalid subsystem type %s\n"
-msgstr ""
-
-#: emultempl/pe.em:475
-msgid "%P%F: invalid hex number for PE parameter '%s'\n"
-msgstr ""
-
-#: emultempl/pe.em:493
-msgid "%P%F: strange hex info for PE parameter '%s'\n"
-msgstr ""
-
-#: emultempl/pe.em:532
-#, c-format
-msgid "%s: Can't open base file %s\n"
-msgstr ""
-
-#: emultempl/pe.em:738
-msgid "%P: warning, file alignment > section alignment.\n"
-msgstr ""
-
-#: emultempl/pe.em:822 emultempl/pe.em:848
-#, c-format
-msgid "Warning: resolving %s by linking to %s\n"
-msgstr ""
-
-#: emultempl/pe.em:827 emultempl/pe.em:853
-msgid "Use --enable-stdcall-fixup to disable these warnings\n"
-msgstr ""
-
-#: emultempl/pe.em:828 emultempl/pe.em:854
-msgid "Use --disable-stdcall-fixup to disable these fixups\n"
-msgstr ""
-
-#: emultempl/pe.em:879
-#, 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
-#, 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"
-msgstr ""
-
-#: emultempl/pe.em:1226
-#, c-format
-msgid "Errors encountered processing file %s\n"
-msgstr ""
-
-#: emultempl/pe.em:1249
-#, 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
-msgid "%P%F: bfd_link_hash_lookup failed: %E\n"
-msgstr ""
-
-#: ldcref.c:158
-msgid "%X%P: bfd_hash_table_init of cref table failed: %E\n"
-msgstr ""
-
-#: ldcref.c:164
-msgid "%X%P: cref_hash_lookup failed: %E\n"
-msgstr ""
-
-#: ldcref.c:235
-msgid ""
-"\n"
-"Cross Reference Table\n"
-"\n"
-msgstr ""
-
-#: ldcref.c:236
-msgid "Symbol"
-msgstr ""
-
-#: ldcref.c:244
-msgid "File\n"
-msgstr ""
-
-#: ldcref.c:248
-msgid "No symbols\n"
-msgstr ""
-
-#: ldcref.c:400
-msgid "%P: symbol `%T' missing from main hash table\n"
-msgstr ""
-
-#: ldcref.c:465
-msgid "%B%F: could not read symbols; %E\n"
-msgstr ""
-
-#: ldcref.c:469 ldmain.c:1128 ldmain.c:1132
-msgid "%B%F: could not read symbols: %E\n"
-msgstr ""
-
-#: ldcref.c:537 ldcref.c:544 ldmain.c:1178 ldmain.c:1185
-msgid "%B%F: could not read relocs: %E\n"
-msgstr ""
-
-#. We found a reloc for the symbol. The symbol is defined
-#. 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
-msgid "%X%C: prohibited cross reference from %s to `%T' in %s\n"
-msgstr ""
-
-#: ldctor.c:88
-msgid "%P%X: Different relocs used in set %s\n"
-msgstr ""
-
-#: ldctor.c:106
-msgid "%P%X: Different object file formats composing set %s\n"
-msgstr ""
-
-#: ldctor.c:288 ldctor.c:302
-msgid "%P%X: %s does not support reloc %s for set %s\n"
-msgstr ""
-
-#: ldctor.c:323
-msgid "%P%X: Unsupported size %d for set %s\n"
-msgstr ""
-
-#: ldctor.c:344
-msgid ""
-"\n"
-"Set Symbol\n"
-"\n"
-msgstr ""
-
-#: ldemul.c:225
-#, c-format
-msgid "%S SYSLIB ignored\n"
-msgstr ""
-
-#: ldemul.c:232
-#, c-format
-msgid "%S HLL ignored\n"
-msgstr ""
-
-#: ldemul.c:253
-msgid "%P: unrecognised emulation mode: %s\n"
-msgstr ""
-
-#: ldemul.c:254
-msgid "Supported emulations: "
-msgstr ""
-
-#: ldemul.c:298
-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
-#, c-format
-msgid "%F%S %% by zero\n"
-msgstr ""
-
-#: ldexp.c:407
-#, c-format
-msgid "%F%S / by zero\n"
-msgstr ""
-
-#: ldexp.c:581
-#, c-format
-msgid "%X%S: unresolvable symbol `%s' referenced in expression\n"
-msgstr ""
-
-#: ldexp.c:601
-#, c-format
-msgid "%F%S: undefined symbol `%s' referenced in expression\n"
-msgstr ""
-
-#: ldexp.c:726
-#, c-format
-msgid "%F%S can not PROVIDE assignment to location counter\n"
-msgstr ""
-
-#: ldexp.c:736
-#, c-format
-msgid "%F%S invalid assignment to location counter\n"
-msgstr ""
-
-#: ldexp.c:740
-#, c-format
-msgid "%F%S assignment to location counter invalid outside of SECTION\n"
-msgstr ""
-
-#: ldexp.c:749
-msgid "%F%S cannot move location counter backwards (from %V to %V)\n"
-msgstr ""
-
-#: ldexp.c:776
-msgid "%P%F:%s: hash creation failed\n"
-msgstr ""
-
-#: ldexp.c:1078 ldexp.c:1112
-#, c-format
-msgid "%F%S nonconstant expression for %s\n"
-msgstr ""
-
-#: ldexp.c:1167
-#, c-format
-msgid "%F%S non constant expression for %s\n"
-msgstr ""
-
-#: ldfile.c:105
-#, c-format
-msgid "attempt to open %s failed\n"
-msgstr ""
-
-#: ldfile.c:107
-#, c-format
-msgid "attempt to open %s succeeded\n"
-msgstr ""
-
-#: ldfile.c:113
-msgid "%F%P: invalid BFD target `%s'\n"
-msgstr ""
-
-#: ldfile.c:218 ldfile.c:234
-msgid "%P: skipping incompatible %s when searching for %s\n"
-msgstr ""
-
-#: ldfile.c:326
-msgid "%F%P: cannot open %s for %s: %E\n"
-msgstr ""
-
-#: ldfile.c:329
-msgid "%F%P: cannot open %s: %E\n"
-msgstr ""
-
-#: ldfile.c:359
-msgid "%F%P: cannot find %s\n"
-msgstr ""
-
-#: ldfile.c:378 ldfile.c:394
-#, c-format
-msgid "cannot find script file %s\n"
-msgstr ""
-
-#: ldfile.c:380 ldfile.c:396
-#, c-format
-msgid "opened script file %s\n"
-msgstr ""
-
-#: ldfile.c:445
-msgid "%P%F: cannot open linker script file %s: %E\n"
-msgstr ""
-
-#: ldfile.c:483
-msgid "%P%F: unknown architecture: %s\n"
-msgstr ""
-
-#: ldfile.c:499
-msgid "%P%F: target architecture respecified\n"
-msgstr ""
-
-#: ldfile.c:553
-msgid "%P%F: cannot represent machine `%s'\n"
-msgstr ""
-
-#: ldlang.c:784
-msgid ""
-"\n"
-"Memory Configuration\n"
-"\n"
-msgstr ""
-
-#: ldlang.c:786
-msgid "Name"
-msgstr ""
-
-#: ldlang.c:786
-msgid "Origin"
-msgstr ""
-
-#: ldlang.c:786
-msgid "Length"
-msgstr ""
-
-#: ldlang.c:786
-msgid "Attributes"
-msgstr ""
-
-#: ldlang.c:828
-msgid ""
-"\n"
-"Linker script and memory map\n"
-"\n"
-msgstr ""
-
-#: ldlang.c:845
-msgid "%P%F: Illegal use of `%s' section\n"
-msgstr ""
-
-#: ldlang.c:855
-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
-msgid "%B: file not recognized: %E\n"
-msgstr ""
-
-#: ldlang.c:1504
-msgid "%B: matching formats:"
-msgstr ""
-
-#: ldlang.c:1511
-msgid "%F%B: file not recognized: %E\n"
-msgstr ""
-
-#: ldlang.c:1567
-msgid "%F%B: member %B in archive is not an object\n"
-msgstr ""
-
-#: ldlang.c:1578 ldlang.c:1592
-msgid "%F%B: could not read symbols: %E\n"
-msgstr ""
-
-#: ldlang.c:1859
-msgid ""
-"%P: warning: could not find any targets that match endianness requirement\n"
-msgstr ""
-
-#: ldlang.c:1872
-msgid "%P%F: target %s not found\n"
-msgstr ""
-
-#: ldlang.c:1874
-msgid "%P%F: cannot open output file %s: %E\n"
-msgstr ""
-
-#: ldlang.c:1884
-msgid "%P%F:%s: can not make object file: %E\n"
-msgstr ""
-
-#: ldlang.c:1888
-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"
-msgstr ""
-
-#: ldlang.c:2241
-msgid " load address 0x%V"
-msgstr ""
-
-#: ldlang.c:2381
-msgid "%W (size before relaxing)\n"
-msgstr ""
-
-#: ldlang.c:2468
-#, c-format
-msgid "Address of section %s set to "
-msgstr ""
-
-#: ldlang.c:2629
-#, c-format
-msgid "Fail with %d\n"
-msgstr ""
-
-#: ldlang.c:2874
-msgid "%X%P: section %s [%V -> %V] overlaps section %s [%V -> %V]\n"
-msgstr ""
-
-#: ldlang.c:2903
-msgid "%X%P: address 0x%v of %B section %s is not within region %s\n"
-msgstr ""
-
-#: ldlang.c:2911
-msgid "%X%P: region %s is full (%B section %s)\n"
-msgstr ""
-
-#: ldlang.c:2961
-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"
-msgstr ""
-
-#: ldlang.c:3020
-msgid "%P: warning: changing start of section %s by %u bytes\n"
-msgstr ""
-
-#: ldlang.c:3033
-#, c-format
-msgid "%F%S: non constant address expression for section %s\n"
-msgstr ""
-
-#: ldlang.c:3208
-msgid "%P%F: can't relax section: %E\n"
-msgstr ""
-
-#: ldlang.c:3403
-msgid "%F%P: invalid data statement\n"
-msgstr ""
-
-#: ldlang.c:3440
-msgid "%F%P: invalid reloc statement\n"
-msgstr ""
-
-#: ldlang.c:3579
-msgid "%P%F:%s: can't set start address\n"
-msgstr ""
-
-#: ldlang.c:3592 ldlang.c:3610
-msgid "%P%F: can't set start address\n"
-msgstr ""
-
-#: ldlang.c:3604
-msgid "%P: warning: cannot find entry symbol %s; defaulting to %V\n"
-msgstr ""
-
-#: ldlang.c:3615
-msgid "%P: warning: cannot find entry symbol %s; not setting start address\n"
-msgstr ""
-
-#: ldlang.c:3665
-msgid ""
-"%P%F: Relocatable linking with relocations from format %s (%B) to format %s "
-"(%B) is not supported\n"
-msgstr ""
-
-#: ldlang.c:3674
-msgid ""
-"%P: warning: %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"
-msgstr ""
-
-#: ldlang.c:3784
-msgid ""
-"\n"
-"Allocating common symbols\n"
-msgstr ""
-
-#: ldlang.c:3785
-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"
-msgstr ""
-
-#: ldlang.c:3922
-msgid "%P%F: invalid syntax in flags\n"
-msgstr ""
-
-#: ldlang.c:4537
-msgid "%P%Fmultiple STARTUP files\n"
-msgstr ""
-
-#: ldlang.c:4580
-msgid "%X%P:%S: section has both a load address and a load region\n"
-msgstr ""
-
-#: ldlang.c:4830
-msgid "%F%P: bfd_record_phdr failed: %E\n"
-msgstr ""
-
-#: ldlang.c:4849
-msgid "%X%P: section `%s' assigned to non-existent phdr `%s'\n"
-msgstr ""
-
-#: ldlang.c:5150
-msgid "%X%P: unknown language `%s' in version information\n"
-msgstr ""
-
-#: ldlang.c:5202
-msgid ""
-"%X%P: anonymous version tag cannot be combined with other version tags\n"
-msgstr ""
-
-#: ldlang.c:5209
-msgid "%X%P: duplicate version tag `%s'\n"
-msgstr ""
-
-#: ldlang.c:5222 ldlang.c:5235
-msgid "%X%P: duplicate expression `%s' in version information\n"
-msgstr ""
-
-#: ldlang.c:5277
-msgid "%X%P: unable to find version dependency `%s'\n"
-msgstr ""
-
-#: ldlang.c:5299
-msgid "%X%P: unable to read .exports section contents\n"
-msgstr ""
-
-#: ldmain.c:198
-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
-msgid "%P%F: --relax and -r may not be used together\n"
-msgstr ""
-
-#: ldmain.c:295
-msgid "%P%F: -r and -shared may not be used together\n"
-msgstr ""
-
-#: ldmain.c:301
-msgid "%P%F: -F may not be used without -shared\n"
-msgstr ""
-
-#: ldmain.c:303
-msgid "%P%F: -f may not be used without -shared\n"
-msgstr ""
-
-#: ldmain.c:342
-msgid "using external linker script:"
-msgstr ""
-
-#: ldmain.c:344
-msgid "using internal linker script:"
-msgstr ""
-
-#: ldmain.c:378
-msgid "%P%F: no input files\n"
-msgstr ""
-
-#: ldmain.c:383
-msgid "%P: mode %s\n"
-msgstr ""
-
-#: ldmain.c:400
-msgid "%P%F: cannot open map file %s: %E\n"
-msgstr ""
-
-#: ldmain.c:433
-msgid "%P: link errors found, deleting executable `%s'\n"
-msgstr ""
-
-#: ldmain.c:444
-msgid "%F%B: final close failed: %E\n"
-msgstr ""
-
-#: ldmain.c:468
-msgid "%X%P: unable to open for source of copy `%s'\n"
-msgstr ""
-
-#: ldmain.c:470
-msgid "%X%P: unable to open for destination of copy `%s'\n"
-msgstr ""
-
-#: ldmain.c:476
-msgid "%P: Error writing file `%s'\n"
-msgstr ""
-
-#: ldmain.c:482 pe-dll.c:1465
-#, c-format
-msgid "%P: Error closing file `%s'\n"
-msgstr ""
-
-#: ldmain.c:499
-#, c-format
-msgid "%s: total time in link: %ld.%06ld\n"
-msgstr ""
-
-#: ldmain.c:502
-#, c-format
-msgid "%s: data size %ld\n"
-msgstr ""
-
-#: ldmain.c:543
-msgid "%P%F: missing argument to -m\n"
-msgstr ""
-
-#: ldmain.c:671 ldmain.c:692 ldmain.c:723
-msgid "%P%F: bfd_hash_table_init failed: %E\n"
-msgstr ""
-
-#: ldmain.c:676 ldmain.c:695
-msgid "%P%F: bfd_hash_lookup failed: %E\n"
-msgstr ""
-
-#: ldmain.c:710
-msgid "%X%P: error: duplicate retain-symbols-file\n"
-msgstr ""
-
-#: ldmain.c:754
-msgid "%P%F: bfd_hash_lookup for insertion failed: %E\n"
-msgstr ""
-
-#: ldmain.c:759
-msgid "%P: `-retain-symbols-file' overrides `-s' and `-S'\n"
-msgstr ""
-
-#: ldmain.c:835
-msgid ""
-"Archive member included because of file (symbol)\n"
-"\n"
-msgstr ""
-
-#: ldmain.c:906
-msgid "%X%C: multiple definition of `%T'\n"
-msgstr ""
-
-#: ldmain.c:909
-msgid "%D: first defined here\n"
-msgstr ""
-
-#: ldmain.c:913
-msgid "%P: Disabling relaxation: it will not work with multiple definitions\n"
-msgstr ""
-
-#: ldmain.c:944
-msgid "%B: warning: definition of `%T' overriding common\n"
-msgstr ""
-
-#: ldmain.c:947
-msgid "%B: warning: common is here\n"
-msgstr ""
-
-#: ldmain.c:954
-msgid "%B: warning: common of `%T' overridden by definition\n"
-msgstr ""
-
-#: ldmain.c:957
-msgid "%B: warning: defined here\n"
-msgstr ""
-
-#: ldmain.c:964
-msgid "%B: warning: common of `%T' overridden by larger common\n"
-msgstr ""
-
-#: ldmain.c:967
-msgid "%B: warning: larger common is here\n"
-msgstr ""
-
-#: ldmain.c:971
-msgid "%B: warning: common of `%T' overriding smaller common\n"
-msgstr ""
-
-#: ldmain.c:974
-msgid "%B: warning: smaller common is here\n"
-msgstr ""
-
-#: ldmain.c:978
-msgid "%B: warning: multiple common of `%T'\n"
-msgstr ""
-
-#: ldmain.c:980
-msgid "%B: warning: previous common is here\n"
-msgstr ""
-
-#: ldmain.c:1001 ldmain.c:1040
-msgid "%P: warning: global constructor %s used\n"
-msgstr ""
-
-#: ldmain.c:1050
-msgid "%P%F: BFD backend error: BFD_RELOC_CTOR unsupported\n"
-msgstr ""
-
-#: ldmain.c:1234
-msgid "%F%P: bfd_hash_table_init failed: %E\n"
-msgstr ""
-
-#: ldmain.c:1241
-msgid "%F%P: bfd_hash_lookup failed: %E\n"
-msgstr ""
-
-#: ldmain.c:1261
-msgid "%C: undefined reference to `%T'\n"
-msgstr ""
-
-#: ldmain.c:1267
-msgid "%D: more undefined references to `%T' follow\n"
-msgstr ""
-
-#: ldmain.c:1274
-msgid "%B: undefined reference to `%T'\n"
-msgstr ""
-
-#: ldmain.c:1280
-msgid "%B: more undefined references to `%T' follow\n"
-msgstr ""
-
-#: ldmain.c:1300 ldmain.c:1321 ldmain.c:1340
-msgid "%P%X: generated"
-msgstr ""
-
-#: ldmain.c:1303
-msgid " relocation truncated to fit: %s %T"
-msgstr ""
-
-#: ldmain.c:1324
-#, c-format
-msgid "dangerous relocation: %s\n"
-msgstr ""
-
-#: ldmain.c:1343
-msgid " reloc refers to symbol `%T' which is not being output\n"
-msgstr ""
-
-#: ldmisc.c:157
-msgid "no symbol"
-msgstr ""
-
-#: ldmisc.c:221
-#, c-format
-msgid "built in linker script:%u"
-msgstr ""
-
-#: ldmisc.c:271 ldmisc.c:275
-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
-msgid "%B: In function `%T':\n"
-msgstr ""
-
-#: ldmisc.c:463
-msgid "%F%P: internal error %s %d\n"
-msgstr ""
-
-#: ldmisc.c:513
-msgid "%P: internal error: aborting at %s line %d in %s\n"
-msgstr ""
-
-#: ldmisc.c:516
-msgid "%P: internal error: aborting at %s line %d\n"
-msgstr ""
-
-#: ldmisc.c:518
-msgid "%P%F: please report this bug\n"
-msgstr ""
-
-#. Output for noisy == 2 is intended to follow the GNU standards.
-#: ldver.c:38
-#, c-format
-msgid "GNU ld version %s\n"
-msgstr ""
-
-#: ldver.c:42
-msgid "Copyright 2002 Free Software Foundation, Inc.\n"
-msgstr ""
-
-#: ldver.c:43
-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
-msgid " Supported emulations:\n"
-msgstr ""
-
-#: ldwrite.c:59 ldwrite.c:195
-msgid "%P%F: bfd_new_link_order failed\n"
-msgstr ""
-
-#: ldwrite.c:325
-msgid "%F%P: clone section failed: %E\n"
-msgstr ""
-
-#: ldwrite.c:364
-#, c-format
-msgid "%8x something else\n"
-msgstr ""
-
-#: ldwrite.c:547
-msgid "%F%P: final link failed: %E\n"
-msgstr ""
-
-#: lexsup.c:173 lexsup.c:268
-msgid "KEYWORD"
-msgstr ""
-
-#: lexsup.c:173
-msgid "Shared library control for HP/UX compatibility"
-msgstr ""
-
-#: lexsup.c:176
-msgid "ARCH"
-msgstr ""
-
-#: lexsup.c:176
-msgid "Set architecture"
-msgstr ""
-
-#: lexsup.c:178 lexsup.c:339
-msgid "TARGET"
-msgstr ""
-
-#: lexsup.c:178
-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
-msgid "FILE"
-msgstr ""
-
-#: lexsup.c:180
-msgid "Read MRI format linker script"
-msgstr ""
-
-#: lexsup.c:182
-msgid "Force common symbols to be defined"
-msgstr ""
-
-#: lexsup.c:186 lexsup.c:376 lexsup.c:378 lexsup.c:380
-msgid "ADDRESS"
-msgstr ""
-
-#: lexsup.c:186
-msgid "Set start address"
-msgstr ""
-
-#: lexsup.c:188
-msgid "Export all dynamic symbols"
-msgstr ""
-
-#: lexsup.c:190
-msgid "Link big-endian objects"
-msgstr ""
-
-#: lexsup.c:192
-msgid "Link little-endian objects"
-msgstr ""
-
-#: lexsup.c:194 lexsup.c:197
-msgid "SHLIB"
-msgstr ""
-
-#: lexsup.c:194
-msgid "Auxiliary filter for shared object symbol table"
-msgstr ""
-
-#: lexsup.c:197
-msgid "Filter for shared object symbol table"
-msgstr ""
-
-#: lexsup.c:199
-msgid "Ignored"
-msgstr ""
-
-#: lexsup.c:201
-msgid "SIZE"
-msgstr ""
-
-#: lexsup.c:201
-msgid "Small data size (if no size, same as --shared)"
-msgstr ""
-
-#: lexsup.c:204
-msgid "FILENAME"
-msgstr ""
-
-#: lexsup.c:204
-msgid "Set internal name of shared library"
-msgstr ""
-
-#: lexsup.c:206
-msgid "PROGRAM"
-msgstr ""
-
-#: lexsup.c:206
-msgid "Set PROGRAM as the dynamic linker to use"
-msgstr ""
-
-#: lexsup.c:208
-msgid "LIBNAME"
-msgstr ""
-
-#: lexsup.c:208
-msgid "Search for library LIBNAME"
-msgstr ""
-
-#: lexsup.c:210
-msgid "DIRECTORY"
-msgstr ""
-
-#: lexsup.c:210
-msgid "Add DIRECTORY to library search path"
-msgstr ""
-
-#: lexsup.c:212
-msgid "EMULATION"
-msgstr ""
-
-#: lexsup.c:212
-msgid "Set emulation"
-msgstr ""
-
-#: lexsup.c:214
-msgid "Print map file on standard output"
-msgstr ""
-
-#: lexsup.c:216
-msgid "Do not page align data"
-msgstr ""
-
-#: lexsup.c:218
-msgid "Do not page align data, do not make text readonly"
-msgstr ""
-
-#: lexsup.c:221
-msgid "Set output file name"
-msgstr ""
-
-#: lexsup.c:223
-msgid "Optimize output file"
-msgstr ""
-
-#: lexsup.c:225
-msgid "Ignored for SVR4 compatibility"
-msgstr ""
-
-#: lexsup.c:229
-msgid "Generate relocateable output"
-msgstr ""
-
-#: lexsup.c:233
-msgid "Just link symbols (if directory, same as --rpath)"
-msgstr ""
-
-#: lexsup.c:236
-msgid "Strip all symbols"
-msgstr ""
-
-#: lexsup.c:238
-msgid "Strip debugging symbols"
-msgstr ""
-
-#: lexsup.c:240
-msgid "Trace file opens"
-msgstr ""
-
-#: lexsup.c:242
-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
-msgid "SYMBOL"
-msgstr ""
-
-#: lexsup.c:244
-msgid "Start with undefined reference to SYMBOL"
-msgstr ""
-
-#: lexsup.c:246
-msgid "[=SECTION]"
-msgstr ""
-
-#: lexsup.c:246
-msgid "Don't merge input [SECTION | orphan] sections"
-msgstr ""
-
-#: lexsup.c:248
-msgid "Build global constructor/destructor tables"
-msgstr ""
-
-#: lexsup.c:250
-msgid "Print version information"
-msgstr ""
-
-#: lexsup.c:252
-msgid "Print version and emulation information"
-msgstr ""
-
-#: lexsup.c:254
-msgid "Discard all local symbols"
-msgstr ""
-
-#: lexsup.c:256
-msgid "Discard temporary local symbols (default)"
-msgstr ""
-
-#: lexsup.c:258
-msgid "Don't discard any local symbols"
-msgstr ""
-
-#: lexsup.c:260
-msgid "Trace mentions of SYMBOL"
-msgstr ""
-
-#: lexsup.c:262 lexsup.c:348 lexsup.c:350
-msgid "PATH"
-msgstr ""
-
-#: lexsup.c:262
-msgid "Default search path for Solaris compatibility"
-msgstr ""
-
-#: lexsup.c:264
-msgid "Start a group"
-msgstr ""
-
-#: lexsup.c:266
-msgid "End a group"
-msgstr ""
-
-#: lexsup.c:268
-msgid "Ignored for SunOS compatibility"
-msgstr ""
-
-#: lexsup.c:270
-msgid "Link against shared libraries"
-msgstr ""
-
-#: lexsup.c:276
-msgid "Do not link against shared libraries"
-msgstr ""
-
-#: lexsup.c:284
-msgid "Bind global references locally"
-msgstr ""
-
-#: lexsup.c:286
-msgid "Check section addresses for overlaps (default)"
-msgstr ""
-
-#: lexsup.c:288
-msgid "Do not check section addresses for overlaps"
-msgstr ""
-
-#: lexsup.c:291
-msgid "Output cross reference table"
-msgstr ""
-
-#: lexsup.c:293
-msgid "SYMBOL=EXPRESSION"
-msgstr ""
-
-#: lexsup.c:293
-msgid "Define a symbol"
-msgstr ""
-
-#: lexsup.c:295
-msgid "[=STYLE]"
-msgstr ""
-
-#: lexsup.c:295
-msgid "Demangle symbol names [using STYLE]"
-msgstr ""
-
-#: lexsup.c:297
-msgid "Generate embedded relocs"
-msgstr ""
-
-#: lexsup.c:299
-msgid "Call SYMBOL at unload-time"
-msgstr ""
-
-#: lexsup.c:301
-msgid "Force generation of file with .exe suffix"
-msgstr ""
-
-#: lexsup.c:303
-msgid "Remove unused sections (on some targets)"
-msgstr ""
-
-#: lexsup.c:306
-msgid "Don't remove unused sections (default)"
-msgstr ""
-
-#: lexsup.c:309
-msgid "Print option help"
-msgstr ""
-
-#: lexsup.c:311
-msgid "Call SYMBOL at load-time"
-msgstr ""
-
-#: lexsup.c:313
-msgid "Write a map file"
-msgstr ""
-
-#: lexsup.c:315
-msgid "Do not define Common storage"
-msgstr ""
-
-#: lexsup.c:317
-msgid "Do not demangle symbol names"
-msgstr ""
-
-#: lexsup.c:319
-msgid "Use less memory and more disk I/O"
-msgstr ""
-
-#: lexsup.c:321
-msgid "Allow no undefined symbols"
-msgstr ""
-
-#: lexsup.c:323
-msgid "Allow undefined symbols in shared objects"
-msgstr ""
-
-#: lexsup.c:325
-msgid "Allow multiple definitions"
-msgstr ""
-
-#: lexsup.c:327
-msgid "Disallow undefined version"
-msgstr ""
-
-#: lexsup.c:329
-msgid "Don't warn about mismatched input files"
-msgstr ""
-
-#: lexsup.c:331
-msgid "Turn off --whole-archive"
-msgstr ""
-
-#: lexsup.c:333
-msgid "Create an output file even if errors occur"
-msgstr ""
-
-#: lexsup.c:337
-msgid ""
-"Only use library directories specified on\n"
-"\t\t\t\tthe command line"
-msgstr ""
-
-#: lexsup.c:339
-msgid "Specify target of output file"
-msgstr ""
-
-#: lexsup.c:341
-msgid "Ignored for Linux compatibility"
-msgstr ""
-
-#: lexsup.c:343
-msgid "Relax branches on certain targets"
-msgstr ""
-
-#: lexsup.c:346
-msgid "Keep only symbols listed in FILE"
-msgstr ""
-
-#: lexsup.c:348
-msgid "Set runtime shared library search path"
-msgstr ""
-
-#: lexsup.c:350
-msgid "Set link time shared library search path"
-msgstr ""
-
-#: lexsup.c:352
-msgid "Create a shared library"
-msgstr ""
-
-#: lexsup.c:356
-msgid "Sort common symbols by size"
-msgstr ""
-
-#: lexsup.c:360
-msgid "COUNT"
-msgstr ""
-
-#: lexsup.c:360
-msgid "How many tags to reserve in .dynamic section"
-msgstr ""
-
-#: lexsup.c:362
-msgid "[=SIZE]"
-msgstr ""
-
-#: lexsup.c:362
-msgid "Split output sections every SIZE octets"
-msgstr ""
-
-#: lexsup.c:364
-msgid "[=COUNT]"
-msgstr ""
-
-#: lexsup.c:364
-msgid "Split output sections every COUNT relocs"
-msgstr ""
-
-#: lexsup.c:366
-msgid "Print memory usage statistics"
-msgstr ""
-
-#: lexsup.c:368
-msgid "Display target specific options"
-msgstr ""
-
-#: lexsup.c:370
-msgid "Do task level linking"
-msgstr ""
-
-#: lexsup.c:372
-msgid "Use same format as native linker"
-msgstr ""
-
-#: lexsup.c:374
-msgid "SECTION=ADDRESS"
-msgstr ""
-
-#: lexsup.c:374
-msgid "Set address of named section"
-msgstr ""
-
-#: lexsup.c:376
-msgid "Set address of .bss section"
-msgstr ""
-
-#: lexsup.c:378
-msgid "Set address of .data section"
-msgstr ""
-
-#: lexsup.c:380
-msgid "Set address of .text section"
-msgstr ""
-
-#: lexsup.c:382
-msgid "Output lots of information during link"
-msgstr ""
-
-#: lexsup.c:386
-msgid "Read version information script"
-msgstr ""
-
-#: lexsup.c:389
-msgid ""
-"Take export symbols list from .exports, using\n"
-"\t\t\t\tSYMBOL as the version."
-msgstr ""
-
-#: lexsup.c:392
-msgid "Warn about duplicate common symbols"
-msgstr ""
-
-#: lexsup.c:394
-msgid "Warn if global constructors/destructors are seen"
-msgstr ""
-
-#: lexsup.c:397
-msgid "Warn if the multiple GP values are used"
-msgstr ""
-
-#: lexsup.c:399
-msgid "Warn only once per undefined symbol"
-msgstr ""
-
-#: lexsup.c:401
-msgid "Warn if start of section changes due to alignment"
-msgstr ""
-
-#: lexsup.c:404
-msgid "Treat warnings as errors"
-msgstr ""
-
-#: lexsup.c:407
-msgid "Include all objects from following archives"
-msgstr ""
-
-#: lexsup.c:409
-msgid "Use wrapper functions for SYMBOL"
-msgstr ""
-
-#: lexsup.c:411
-msgid "[=WORDS]"
-msgstr ""
-
-#: lexsup.c:411
-msgid ""
-"Modify problematic branches in last WORDS (1-10,\n"
-"\t\t\t\tdefault 5) words of a page"
-msgstr ""
-
-#: lexsup.c:577
-msgid "%P: unrecognized option '%s'\n"
-msgstr ""
-
-#: lexsup.c:579
-msgid "%P%F: use the --help option for usage information\n"
-msgstr ""
-
-#: lexsup.c:598
-msgid "%P%F: unrecognized -a option `%s'\n"
-msgstr ""
-
-#: lexsup.c:611
-msgid "%P%F: unrecognized -assert option `%s'\n"
-msgstr ""
-
-#: lexsup.c:654
-msgid "%F%P: unknown demangling style `%s'"
-msgstr ""
-
-#: lexsup.c:714
-msgid "%P%F: invalid number `%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
-#. but it cannot parse the text after the -r so it refuses to
-#. increment the optind counter. Detect this case and issue
-#. 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
-msgid "%P%F: bad -rpath option\n"
-msgstr ""
-
-#: lexsup.c:916
-msgid "%P%F: -shared not supported\n"
-msgstr ""
-
-#: lexsup.c:948
-msgid "%P%F: invalid argument to option \"--section-start\"\n"
-msgstr ""
-
-#: lexsup.c:954
-msgid "%P%F: missing argument(s) to option \"--section-start\"\n"
-msgstr ""
-
-#: lexsup.c:1103
-msgid "%P%F: may not nest groups (--help for usage)\n"
-msgstr ""
-
-#: lexsup.c:1110
-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"
-msgstr ""
-
-#: lexsup.c:1179
-msgid "%P%F: invalid hex number `%s'\n"
-msgstr ""
-
-#: lexsup.c:1191
-#, c-format
-msgid "Usage: %s [options] file...\n"
-msgstr ""
-
-#: lexsup.c:1193
-msgid "Options:\n"
-msgstr ""
-
-#. Note: Various tools (such as libtool) depend upon the
-#. format of the listings below - do not change them.
-#: lexsup.c:1276
-#, c-format
-msgid "%s: supported targets:"
-msgstr ""
-
-#: lexsup.c:1284
-#, c-format
-msgid "%s: supported emulations: "
-msgstr ""
-
-#: lexsup.c:1289
-#, c-format
-msgid "%s: emulation specific options:\n"
-msgstr ""
-
-#: lexsup.c:1293
-#, c-format
-msgid "Report bugs to %s\n"
-msgstr ""
-
-#: mri.c:334
-msgid "%P%F: unknown format type %s\n"
-msgstr ""
-
-#: pe-dll.c:323
-#, c-format
-msgid "%XUnsupported PEI architecture: %s\n"
-msgstr ""
-
-#: pe-dll.c:673
-#, c-format
-msgid "%XError, duplicate EXPORT with ordinals: %s (%d vs %d)\n"
-msgstr ""
-
-#: pe-dll.c:680
-#, c-format
-msgid "Warning, duplicate EXPORT: %s\n"
-msgstr ""
-
-#: pe-dll.c:744
-#, c-format
-msgid "%XCannot export %s: symbol not defined\n"
-msgstr ""
-
-#: pe-dll.c:750
-#, c-format
-msgid "%XCannot export %s: symbol wrong type (%d vs %d)\n"
-msgstr ""
-
-#: pe-dll.c:757
-#, c-format
-msgid "%XCannot export %s: symbol not found\n"
-msgstr ""
-
-#: pe-dll.c:872
-#, c-format
-msgid "%XError, ordinal used twice: %d (%s vs %s)\n"
-msgstr ""
-
-#: pe-dll.c:1183
-#, c-format
-msgid "%XError: %d-bit reloc in dll\n"
-msgstr ""
-
-#: pe-dll.c:1318
-#, c-format
-msgid "%s: Can't open output def file %s\n"
-msgstr ""
-
-#: pe-dll.c:1461
-msgid "; no contents available\n"
-msgstr ""
-
-#: pe-dll.c:2137
-#, c-format
-msgid "%XCan't open .lib file: %s\n"
-msgstr ""
-
-#: pe-dll.c:2142
-#, c-format
-msgid "Creating library file: %s\n"
-msgstr ""
diff --git a/contrib/binutils/ld/scripttempl/README b/contrib/binutils/ld/scripttempl/README
deleted file mode 100644
index 26ad2e9..0000000
--- a/contrib/binutils/ld/scripttempl/README
+++ /dev/null
@@ -1,4 +0,0 @@
-The files in this directory are linker script templates.
-genscripts.sh sets some shell variables, then sources
-EMULATION.sc, to generate EMULATION.{x,xr,xu,xn,xbn} -- the script
-files for default, -r, -Ur, -n, -N.
diff --git a/contrib/binutils/ld/scripttempl/alpha.sc b/contrib/binutils/ld/scripttempl/alpha.sc
deleted file mode 100644
index 44a10c4..0000000
--- a/contrib/binutils/ld/scripttempl/alpha.sc
+++ /dev/null
@@ -1,74 +0,0 @@
-# Linker script for Alpha systems.
-# Ian Lance Taylor <ian@cygnus.com>.
-# These variables may be overridden by the emulation file. The
-# defaults are appropriate for an Alpha running OSF/1.
-test -z "$ENTRY" && ENTRY=__start
-test -z "$TEXT_START_ADDR" && TEXT_START_ADDR="0x120000000 + SIZEOF_HEADERS"
-if test "x$LD_FLAG" = "xn" -o "x$LD_FLAG" = "xN"; then
- DATA_ADDR=.
-else
- test -z "$DATA_ADDR" && DATA_ADDR=0x140000000
-fi
-cat <<EOF
-OUTPUT_FORMAT("${OUTPUT_FORMAT}")
-${LIB_SEARCH_DIRS}
-
-ENTRY(${ENTRY})
-
-SECTIONS
-{
- ${RELOCATING+. = ${TEXT_START_ADDR};}
- .text : {
- ${RELOCATING+ _ftext = . };
- ${RELOCATING+ __istart = . };
- ${RELOCATING+ *(.init) }
- ${RELOCATING+ LONG (0x6bfa8001)}
- ${RELOCATING+ eprol = .};
- *(.text)
- ${RELOCATING+ __fstart = . };
- ${RELOCATING+ *(.fini)}
- ${RELOCATING+ LONG (0x6bfa8001)}
- ${RELOCATING+ _etext = .};
- }
- .rdata : {
- *(.rdata)
- }
- .rconst : {
- *(.rconst)
- }
- .pdata : {
- ${RELOCATING+ _fpdata = .;}
- *(.pdata)
- }
- ${RELOCATING+. = ${DATA_ADDR};}
- .data : {
- ${RELOCATING+ _fdata = .;}
- *(.data)
- ${CONSTRUCTING+CONSTRUCTORS}
- }
- .xdata : {
- *(.xdata)
- }
- ${RELOCATING+ _gp = ALIGN (16) + 0x8000;}
- .lit8 : {
- *(.lit8)
- }
- .lita : {
- *(.lita)
- }
- .sdata : {
- *(.sdata)
- }
- ${RELOCATING+ _EDATA = .;}
- ${RELOCATING+ _FBSS = .;}
- .sbss : {
- *(.sbss)
- *(.scommon)
- }
- .bss : {
- *(.bss)
- *(COMMON)
- }
- ${RELOCATING+ _end = .;}
-}
-EOF
diff --git a/contrib/binutils/ld/scripttempl/aout.sc b/contrib/binutils/ld/scripttempl/aout.sc
deleted file mode 100644
index 80dbb37..0000000
--- a/contrib/binutils/ld/scripttempl/aout.sc
+++ /dev/null
@@ -1,57 +0,0 @@
-test -z "${BIG_OUTPUT_FORMAT}" && BIG_OUTPUT_FORMAT=${OUTPUT_FORMAT}
-test -z "${LITTLE_OUTPUT_FORMAT}" && LITTLE_OUTPUT_FORMAT=${OUTPUT_FORMAT}
-test -z "${ALIGNMENT}" && ALIGNMENT="4"
-
-cat <<EOF
-OUTPUT_FORMAT("${OUTPUT_FORMAT}", "${BIG_OUTPUT_FORMAT}",
- "${LITTLE_OUTPUT_FORMAT}")
-OUTPUT_ARCH(${ARCH})
-
-${RELOCATING+${LIB_SEARCH_DIRS}}
-${STACKZERO+${RELOCATING+${STACKZERO}}}
-${SHLIB_PATH+${RELOCATING+${SHLIB_PATH}}}
-${RELOCATING+${EXECUTABLE_SYMBOLS}}
-${RELOCATING+PROVIDE (__stack = 0);}
-SECTIONS
-{
- ${RELOCATING+. = ${TEXT_START_ADDR};}
- .text :
- {
- CREATE_OBJECT_SYMBOLS
- *(.text)
- /* The next six sections are for SunOS dynamic linking. The order
- is important. */
- *(.dynrel)
- *(.hash)
- *(.dynsym)
- *(.dynstr)
- *(.rules)
- *(.need)
- ${RELOCATING+_etext = .;}
- ${RELOCATING+__etext = .;}
- ${PAD_TEXT+${RELOCATING+. = ${DATA_ALIGNMENT};}}
- }
- ${RELOCATING+. = ${DATA_ALIGNMENT};}
- .data :
- {
- /* The first three sections are for SunOS dynamic linking. */
- *(.dynamic)
- *(.got)
- *(.plt)
- *(.data)
- *(.linux-dynamic) /* For Linux dynamic linking. */
- ${CONSTRUCTING+CONSTRUCTORS}
- ${RELOCATING+_edata = .;}
- ${RELOCATING+__edata = .;}
- }
- .bss :
- {
- ${RELOCATING+ __bss_start = .};
- *(.bss)
- *(COMMON)
- ${RELOCATING+. = ALIGN(${ALIGNMENT});}
- ${RELOCATING+_end = . };
- ${RELOCATING+__end = . };
- }
-}
-EOF
diff --git a/contrib/binutils/ld/scripttempl/armaout.sc b/contrib/binutils/ld/scripttempl/armaout.sc
deleted file mode 100644
index 9bae887..0000000
--- a/contrib/binutils/ld/scripttempl/armaout.sc
+++ /dev/null
@@ -1,35 +0,0 @@
-cat <<EOF
-OUTPUT_FORMAT("${OUTPUT_FORMAT}")
-OUTPUT_ARCH(${ARCH})
-
-${RELOCATING+${LIB_SEARCH_DIRS}}
-${STACKZERO+${RELOCATING+${STACKZERO}}}
-SECTIONS
-{
- .text ${RELOCATING+${TEXT_START_ADDR}} :
- {
- CREATE_OBJECT_SYMBOLS
- ${RELOCATING+__stext_ = .;}
- *(.text)
- ${PAD_TEXT+${RELOCATING+. = ${DATA_ALIGNMENT};}}
- ${RELOCATING+_etext = ${DATA_ALIGNMENT};}
- ${RELOCATING+__etext = ${DATA_ALIGNMENT};}
- }
- .data ${RELOCATING+${DATA_ALIGNMENT}} :
- {
- ${RELOCATING+__sdata_ = .;}
- *(.data)
- ${CONSTRUCTING+CONSTRUCTORS}
- ${RELOCATING+_edata = ${DATA_ALIGNMENT};}
- ${RELOCATING+__edata = ${DATA_ALIGNMENT};}
- }
- .bss ${RELOCATING+${DATA_ALIGNMENT}} :
- {
- ${RELOCATING+ __bss_start = .};
- *(.bss)
- *(COMMON)
- ${RELOCATING+_end = ALIGN(4) };
- ${RELOCATING+__end = ALIGN(4) };
- }
-}
-EOF
diff --git a/contrib/binutils/ld/scripttempl/armcoff.sc b/contrib/binutils/ld/scripttempl/armcoff.sc
deleted file mode 100644
index 781301c..0000000
--- a/contrib/binutils/ld/scripttempl/armcoff.sc
+++ /dev/null
@@ -1,84 +0,0 @@
-# Linker script for ARM COFF.
-# Based on i386coff.sc by Ian Taylor <ian@cygnus.com>.
-test -z "$ENTRY" && ENTRY=_start
-if test -z "${DATA_ADDR}"; then
- if test "$LD_FLAG" = "N" || test "$LD_FLAG" = "n"; then
- DATA_ADDR=.
- fi
-fi
-
-# These are substituted in as variables in order to get '}' in a shell
-# conditional expansion.
-CTOR='.ctor : {
- *(SORT(.ctors.*))
- *(.ctor)
- }'
-DTOR='.dtor : {
- *(SORT(.dtors.*))
- *(.dtor)
- }'
-
-cat <<EOF
-OUTPUT_FORMAT("${OUTPUT_FORMAT}", "${BIG_OUTPUT_FORMAT}", "${LITTLE_OUTPUT_FORMAT}")
-${LIB_SEARCH_DIRS}
-
-ENTRY(${ENTRY})
-
-SECTIONS
-{
- /* We start at 0x8000 because gdb assumes it (see FRAME_CHAIN).
- This is an artifact of the ARM Demon monitor using the bottom 32k
- as workspace (shared with the FP instruction emulator if
- present): */
- .text ${RELOCATING+ 0x8000} : {
- *(.init)
- *(.text*)
- *(.glue_7t)
- *(.glue_7)
- *(.rdata)
- ${CONSTRUCTING+ ___CTOR_LIST__ = .; __CTOR_LIST__ = . ;
- LONG (-1); *(.ctors); *(.ctor); LONG (0); }
- ${CONSTRUCTING+ ___DTOR_LIST__ = .; __DTOR_LIST__ = . ;
- LONG (-1); *(.dtors); *(.dtor); LONG (0); }
- *(.fini)
- ${RELOCATING+ etext = .;}
- ${RELOCATING+ _etext = .;}
- }
- .data ${RELOCATING+${DATA_ADDR-0x40000 + (ALIGN(0x8) & 0xfffc0fff)}} : {
- ${RELOCATING+ __data_start__ = . ;}
- *(.data*)
-
- ${RELOCATING+*(.gcc_exc*)}
- ${RELOCATING+___EH_FRAME_BEGIN__ = . ;}
- ${RELOCATING+*(.eh_fram*)}
- ${RELOCATING+___EH_FRAME_END__ = . ;}
- ${RELOCATING+LONG(0);}
-
- ${RELOCATING+ __data_end__ = . ;}
- ${RELOCATING+ edata = .;}
- ${RELOCATING+ _edata = .;}
- }
- ${CONSTRUCTING+${RELOCATING-$CTOR}}
- ${CONSTRUCTING+${RELOCATING-$DTOR}}
- .bss ${RELOCATING+ ALIGN(0x8)} :
- {
- ${RELOCATING+ __bss_start__ = . ;}
- *(.bss)
- *(COMMON)
- ${RELOCATING+ __bss_end__ = . ;}
- }
-
- ${RELOCATING+ end = .;}
- ${RELOCATING+ _end = .;}
- ${RELOCATING+ __end__ = .;}
-
- .stab 0 ${RELOCATING+(NOLOAD)} :
- {
- [ .stab ]
- }
- .stabstr 0 ${RELOCATING+(NOLOAD)} :
- {
- [ .stabstr ]
- }
-}
-EOF
diff --git a/contrib/binutils/ld/scripttempl/elf.sc b/contrib/binutils/ld/scripttempl/elf.sc
deleted file mode 100644
index 187a289..0000000
--- a/contrib/binutils/ld/scripttempl/elf.sc
+++ /dev/null
@@ -1,404 +0,0 @@
-#
-# 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.
-# 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_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_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.
-# 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.
-#
-# 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=""
-DATA_SEGMENT_ALIGN="ALIGN(${SEGMENT_SIZE}) + (. & (${MAXPAGESIZE} - 1))"
-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 (.);"
-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.*}) }"
-STACKNOTE="/DISCARD/ : { *(.note.GNU-stack) }"
-if test -z "${NO_SMALL_DATA}"; then
- SBSS=".sbss ${RELOCATING-0} :
- {
- ${RELOCATING+PROVIDE (__sbss_start = .);}
- ${RELOCATING+PROVIDE (___sbss_start = .);}
- *(.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}}
- *(.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.*}) }"
-fi
-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 ${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.*})
- /* .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) }
-
- /* 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}};}}
-
- /* 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 = .);}}
-
- ${RELOCATING+${CREATE_SHLIB-PROVIDE (__init_array_start = .);}}
- .init_array ${RELOCATING-0} : { *(.init_array) }
- ${RELOCATING+${CREATE_SHLIB-PROVIDE (__init_array_end = .);}}
-
- ${RELOCATING+${CREATE_SHLIB-PROVIDE (__fini_array_start = .);}}
- .fini_array ${RELOCATING-0} : { *(.fini_array) }
- ${RELOCATING+${CREATE_SHLIB-PROVIDE (__fini_array_end = .);}}
-
- .data ${RELOCATING-0} :
- {
- ${RELOCATING+${DATA_START_SYMBOLS}}
- *(.data${RELOCATING+ .data.* .gnu.linkonce.d.*})
- ${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}}
- ${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/elfppc.sc b/contrib/binutils/ld/scripttempl/elfppc.sc
deleted file mode 100644
index ddab8f8..0000000
--- a/contrib/binutils/ld/scripttempl/elfppc.sc
+++ /dev/null
@@ -1,288 +0,0 @@
-#
-# Unusual variables checked by this code:
-# NOP - two byte opcode for no-op (defaults to 0)
-# DATA_ADDR - if end-of-text-plus-one-page isn't right for data start
-# OTHER_READONLY_SECTIONS - other than .text .init .rodata ...
-# (e.g., .PARISC.milli)
-# OTHER_READWRITE_SECTIONS - other than .data .bss .ctors .sdata ...
-# (e.g., .PARISC.global)
-# OTHER_SECTIONS - at the end
-# EXECUTABLE_SYMBOLS - symbols that must be defined for an
-# executable (e.g., _DYNAMIC_LINK)
-# 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_BSS_SYMBOLS - symbols that appear at the start of the
-# .bss section besides __bss_start.
-#
-# When adding sections, do note that the names of some sections are used
-# when specifying the start address of the next.
-#
-test -z "$ENTRY" && ENTRY=_start
-test -z "${BIG_OUTPUT_FORMAT}" && BIG_OUTPUT_FORMAT=${OUTPUT_FORMAT}
-test -z "${LITTLE_OUTPUT_FORMAT}" && LITTLE_OUTPUT_FORMAT=${OUTPUT_FORMAT}
-test "$LD_FLAG" = "N" && DATA_ADDR=.
-SBSS2=".sbss2 ${RELOCATING-0} : { *(.sbss2) }"
-SDATA2=".sdata2 ${RELOCATING-0} : { *(.sdata2) }"
-INTERP=".interp ${RELOCATING-0} : { *(.interp) }"
-PLT=".plt ${RELOCATING-0} : { *(.plt) }"
-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) .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) .dtors))
- KEEP (*(SORT(.dtors.*)))
- KEEP (*(.dtors))
- ${CONSTRUCTING+${DTOR_END}}
- }"
-
-cat <<EOF
-OUTPUT_FORMAT("${OUTPUT_FORMAT}", "${BIG_OUTPUT_FORMAT}",
- "${LITTLE_OUTPUT_FORMAT}")
-OUTPUT_ARCH(${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- /* 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. */}
-
-${RELOCATING+PROVIDE (__stack = 0);}
-${RELOCATING+PROVIDE (___stack = 0);}
-SECTIONS
-{
- /* Read-only sections, merged into text segment: */
- ${CREATE_SHLIB-${RELOCATING+. = ${TEXT_START_ADDR} + SIZEOF_HEADERS;}}
- ${CREATE_SHLIB+${RELOCATING+. = SIZEOF_HEADERS;}}
- ${CREATE_SHLIB-${INTERP}}
- .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) }
- .rela.text ${RELOCATING-0} :
- {
- *(.rela.text)
- ${RELOCATING+*(.rela.text.*)}
- ${RELOCATING+*(.rela.gnu.linkonce.t*)}
- }
- .rela.data ${RELOCATING-0} :
- {
- *(.rela.data)
- ${RELOCATING+*(.rela.data.*)}
- ${RELOCATING+*(.rela.gnu.linkonce.d*)}
- }
- .rela.rodata ${RELOCATING-0} :
- {
- *(.rela.rodata)
- ${RELOCATING+*(.rela.rodata.*)}
- ${RELOCATING+*(.rela.gnu.linkonce.r*)}
- }
- .rela.got ${RELOCATING-0} : { *(.rela.got) }
- .rela.got1 ${RELOCATING-0} : { *(.rela.got1) }
- .rela.got2 ${RELOCATING-0} : { *(.rela.got2) }
- .rela.ctors ${RELOCATING-0} : { *(.rela.ctors) }
- .rela.dtors ${RELOCATING-0} : { *(.rela.dtors) }
- .rela.init ${RELOCATING-0} : { *(.rela.init) }
- .rela.fini ${RELOCATING-0} : { *(.rela.fini) }
- .rela.bss ${RELOCATING-0} : { *(.rela.bss) }
- .rela.plt ${RELOCATING-0} : { *(.rela.plt) }
- .rela.sdata ${RELOCATING-0} : { *(.rela.sdata) }
- .rela.sbss ${RELOCATING-0} : { *(.rela.sbss) }
- .rela.sdata2 ${RELOCATING-0} : { *(.rela.sdata2) }
- .rela.sbss2 ${RELOCATING-0} : { *(.rela.sbss2) }
- .text ${RELOCATING-0} :
- {
- ${RELOCATING+${TEXT_START_SYMBOLS}}
- *(.text)
- ${RELOCATING+*(.text.*)}
- /* .gnu.warning sections are handled specially by elf32.em. */
- *(.gnu.warning)
- ${RELOCATING+*(.gnu.linkonce.t*)}
- } =${NOP-0}
- .init ${RELOCATING-0} : { KEEP (*(.init)) } =${NOP-0}
- .fini ${RELOCATING-0} : { KEEP (*(.fini)) } =${NOP-0}
- .rodata ${RELOCATING-0} :
- {
- *(.rodata)
- ${RELOCATING+*(.rodata.*)}
- ${RELOCATING+*(.gnu.linkonce.r*)}
- }
- .rodata1 ${RELOCATING-0} : { *(.rodata1) }
- ${RELOCATING+_etext = .;}
- ${RELOCATING+PROVIDE (etext = .);}
- ${RELOCATING+PROVIDE (__etext = .);}
- ${CREATE_SHLIB-${SDATA2}}
- ${CREATE_SHLIB-${SBSS2}}
- ${RELOCATING+${OTHER_READONLY_SECTIONS}}
-
- /* Adjust the address for the data segment. We want to adjust up to
- the same address within the page on the next page up. It would
- be more correct to do this:
- ${RELOCATING+. = ${DATA_ADDR-ALIGN(${MAXPAGESIZE}) + (ALIGN(8) & (${MAXPAGESIZE} - 1))};}
- The current expression does not correctly handle the case of a
- text segment ending precisely at the end of a page; it causes the
- data segment to skip a page. The above expression does not have
- this problem, but it will currently (2/95) cause BFD to allocate
- a single segment, combining both text and data, for this case.
- This will prevent the text segment from being shared among
- multiple executions of the program; I think that is more
- important than losing a page of the virtual address space (note
- that no actual memory is lost; the page which is skipped can not
- be referenced). */
- ${RELOCATING+. = ${DATA_ADDR- ALIGN(8) + ${MAXPAGESIZE}};}
-
- .data ${RELOCATING-0} :
- {
- ${RELOCATING+${DATA_START_SYMBOLS}}
- *(.data)
- ${RELOCATING+*(.data.*)}
- ${RELOCATING+*(.gnu.linkonce.d*)}
- ${CONSTRUCTING+CONSTRUCTORS}
- }
- .data1 ${RELOCATING-0} : { *(.data1) }
- ${RELOCATING+${OTHER_READWRITE_SECTIONS}}
-
- .got1 ${RELOCATING-0} : { *(.got1) }
- .dynamic ${RELOCATING-0} : { *(.dynamic) }
-
- /* Put .ctors and .dtors next to the .got2 section, so that the pointers
- get relocated with -mrelocatable. Also put in the .fixup pointers.
- The current compiler no longer needs this, but keep it around for 2.7.2 */
-
- ${RELOCATING+PROVIDE (_GOT2_START_ = .);}
- ${RELOCATING+PROVIDE (__GOT2_START_ = .);}
- .got2 ${RELOCATING-0} : { *(.got2) }
-
- ${RELOCATING+PROVIDE (__CTOR_LIST__ = .);}
- ${RELOCATING+PROVIDE (___CTOR_LIST__ = .);}
- ${RELOCATING+${CTOR}}
- ${RELOCATING+PROVIDE (__CTOR_END__ = .);}
- ${RELOCATING+PROVIDE (___CTOR_END__ = .);}
-
- ${RELOCATING+PROVIDE (__DTOR_LIST__ = .);}
- ${RELOCATING+PROVIDE (___DTOR_LIST__ = .);}
- ${RELOCATING+${DTOR}}
- ${RELOCATING+PROVIDE (__DTOR_END__ = .);}
- ${RELOCATING+PROVIDE (___DTOR_END__ = .);}
-
- ${RELOCATING+PROVIDE (_FIXUP_START_ = .);}
- ${RELOCATING+PROVIDE (__FIXUP_START_ = .);}
- .fixup ${RELOCATING-0} : { *(.fixup) }
- ${RELOCATING+PROVIDE (_FIXUP_END_ = .);}
- ${RELOCATING+PROVIDE (__FIXUP_END_ = .);}
- ${RELOCATING+PROVIDE (_GOT2_END_ = .);}
- ${RELOCATING+PROVIDE (__GOT2_END_ = .);}
-
- ${RELOCATING+PROVIDE (_GOT_START_ = .);}
- ${RELOCATING+PROVIDE (__GOT_START_ = .);}
- .got ${RELOCATING-0} : { *(.got) }
- .got.plt ${RELOCATING-0} : { *(.got.plt) }
- ${CREATE_SHLIB+${SDATA2}}
- ${CREATE_SHLIB+${SBSS2}}
- ${RELOCATING+PROVIDE (_GOT_END_ = .);}
- ${RELOCATING+PROVIDE (__GOT_END_ = .);}
-
- /* We want the small data sections together, so single-instruction offsets
- can access them all, and initialized data all before uninitialized, so
- we can shorten the on-disk segment size. */
- .sdata ${RELOCATING-0} : { *(.sdata) }
- ${RELOCATING+_edata = .;}
- ${RELOCATING+PROVIDE (edata = .);}
- ${RELOCATING+PROVIDE (__edata = .);}
- .sbss ${RELOCATING-0} :
- {
- ${RELOCATING+PROVIDE (__sbss_start = .);}
- ${RELOCATING+PROVIDE (___sbss_start = .);}
- *(.sbss)
- *(.scommon)
- *(.dynsbss)
- ${RELOCATING+PROVIDE (__sbss_end = .);}
- ${RELOCATING+PROVIDE (___sbss_end = .);}
- }
- ${PLT}
- .bss ${RELOCATING-0} :
- {
- ${RELOCATING+${OTHER_BSS_SYMBOLS}}
- ${RELOCATING+PROVIDE (__bss_start = .);}
- ${RELOCATING+PROVIDE (___bss_start = .);}
- *(.dynbss)
- *(.bss)
- *(COMMON)
- }
- ${RELOCATING+_end = . ;}
- ${RELOCATING+PROVIDE (end = .);}
- ${RELOCATING+PROVIDE (__end = .);}
-
- /* These are needed for ELF backends which have not yet been
- converted to the new style linker. */
- .stab 0 : { *(.stab) }
- .stabstr 0 : { *(.stabstr) }
-
- /* DWARF debug sections.
- Symbols in the DWARF debugging sections are relative to the beginning
- of the section so we begin them at 0. */
-
- /* DWARF 1 */
- .debug 0 : { *(.debug) }
- .line 0 : { *(.line) }
-
- /* GNU DWARF 1 extensions */
- .debug_srcinfo 0 : { *(.debug_srcinfo) }
- .debug_sfnames 0 : { *(.debug_sfnames) }
-
- /* DWARF 1.1 and DWARF 2 */
- .debug_aranges 0 : { *(.debug_aranges) }
- .debug_pubnames 0 : { *(.debug_pubnames) }
-
- /* DWARF 2 */
- .debug_info 0 : { *(.debug_info) }
- .debug_abbrev 0 : { *(.debug_abbrev) }
- .debug_line 0 : { *(.debug_line) }
- .debug_frame 0 : { *(.debug_frame) }
- .debug_str 0 : { *(.debug_str) }
- .debug_loc 0 : { *(.debug_loc) }
- .debug_macinfo 0 : { *(.debug_macinfo) }
-
- /* SGI/MIPS DWARF 2 extensions */
- .debug_weaknames 0 : { *(.debug_weaknames) }
- .debug_funcnames 0 : { *(.debug_funcnames) }
- .debug_typenames 0 : { *(.debug_typenames) }
- .debug_varnames 0 : { *(.debug_varnames) }
-
- /* These must appear regardless of ${RELOCATING}. */
- ${OTHER_SECTIONS}
-}
-EOF
diff --git a/contrib/binutils/ld/scripttempl/i386coff.sc b/contrib/binutils/ld/scripttempl/i386coff.sc
deleted file mode 100644
index fbb1b79..0000000
--- a/contrib/binutils/ld/scripttempl/i386coff.sc
+++ /dev/null
@@ -1,43 +0,0 @@
-# Linker script for 386 COFF. This works on SVR3.2 and SCO Unix 3.2.2.
-# Ian Taylor <ian@cygnus.com>.
-test -z "$ENTRY" && ENTRY=_start
-# These are substituted in as variables in order to get '}' in a shell
-# conditional expansion.
-INIT='.init : { *(.init) }'
-FINI='.fini : { *(.fini) }'
-cat <<EOF
-OUTPUT_FORMAT("${OUTPUT_FORMAT}")
-${LIB_SEARCH_DIRS}
-
-ENTRY(${ENTRY})
-
-SECTIONS
-{
- .text ${RELOCATING+ SIZEOF_HEADERS} : {
- ${RELOCATING+ *(.init)}
- *(.text)
- ${RELOCATING+ *(.fini)}
- ${RELOCATING+ etext = .};
- }
- .data ${RELOCATING+ 0x400000 + (. & 0xffc00fff)} : {
- *(.data)
- ${RELOCATING+ edata = .};
- }
- .bss ${RELOCATING+ SIZEOF(.data) + ADDR(.data)} :
- {
- *(.bss)
- *(COMMON)
- ${RELOCATING+ end = .};
- }
- ${RELOCATING- ${INIT}}
- ${RELOCATING- ${FINI}}
- .stab 0 ${RELOCATING+(NOLOAD)} :
- {
- [ .stab ]
- }
- .stabstr 0 ${RELOCATING+(NOLOAD)} :
- {
- [ .stabstr ]
- }
-}
-EOF
diff --git a/contrib/binutils/ld/scripttempl/mips.sc b/contrib/binutils/ld/scripttempl/mips.sc
deleted file mode 100644
index d60aeed..0000000
--- a/contrib/binutils/ld/scripttempl/mips.sc
+++ /dev/null
@@ -1,72 +0,0 @@
-# Linker script for MIPS systems.
-# Ian Lance Taylor <ian@cygnus.com>.
-# These variables may be overridden by the emulation file. The
-# defaults are appropriate for a DECstation running Ultrix.
-test -z "$ENTRY" && ENTRY=__start
-
-if [ -z "$EMBEDDED" ]; then
- test -z "$TEXT_START_ADDR" && TEXT_START_ADDR="0x400000 + SIZEOF_HEADERS"
-else
- test -z "$TEXT_START_ADDR" && TEXT_START_ADDR="0x400000"
-fi
-if test "x$LD_FLAG" = "xn" -o "x$LD_FLAG" = "xN"; then
- DATA_ADDR=.
-else
- test -z "$DATA_ADDR" && DATA_ADDR=0x10000000
-fi
-cat <<EOF
-OUTPUT_FORMAT("${OUTPUT_FORMAT}", "${BIG_OUTPUT_FORMAT}",
- "${LITTLE_OUTPUT_FORMAT}")
-${LIB_SEARCH_DIRS}
-
-ENTRY(${ENTRY})
-
-SECTIONS
-{
- ${RELOCATING+. = ${TEXT_START_ADDR};}
- .text : {
- ${RELOCATING+ _ftext = . };
- *(.init)
- ${RELOCATING+ eprol = .};
- *(.text)
- ${RELOCATING+PROVIDE (__runtime_reloc_start = .);}
- *(.rel.sdata)
- ${RELOCATING+PROVIDE (__runtime_reloc_stop = .);}
- *(.fini)
- ${RELOCATING+ etext = .};
- ${RELOCATING+ _etext = .};
- }
- ${RELOCATING+. = ${DATA_ADDR};}
- .rdata : {
- *(.rdata)
- }
- ${RELOCATING+ _fdata = ALIGN(16);}
- .data : {
- *(.data)
- ${CONSTRUCTING+CONSTRUCTORS}
- }
- ${RELOCATING+ _gp = ALIGN(16) + 0x8000;}
- .lit8 : {
- *(.lit8)
- }
- .lit4 : {
- *(.lit4)
- }
- .sdata : {
- *(.sdata)
- }
- ${RELOCATING+ edata = .;}
- ${RELOCATING+ _edata = .;}
- ${RELOCATING+ _fbss = .;}
- .sbss : {
- *(.sbss)
- *(.scommon)
- }
- .bss : {
- *(.bss)
- *(COMMON)
- }
- ${RELOCATING+ end = .;}
- ${RELOCATING+ _end = .;}
-}
-EOF
diff --git a/contrib/binutils/ld/scripttempl/mipsbsd.sc b/contrib/binutils/ld/scripttempl/mipsbsd.sc
deleted file mode 100644
index b222b33..0000000
--- a/contrib/binutils/ld/scripttempl/mipsbsd.sc
+++ /dev/null
@@ -1,30 +0,0 @@
-cat <<EOF
-OUTPUT_FORMAT("${OUTPUT_FORMAT}", "${BIG_OUTPUT_FORMAT}",
- "${LITTLE_OUTPUT_FORMAT}")
-OUTPUT_ARCH(${ARCH})
-
-${RELOCATING+${LIB_SEARCH_DIRS}}
-SECTIONS
-{
- ${RELOCATING+. = ${TEXT_START_ADDR};}
- .text :
- {
- CREATE_OBJECT_SYMBOLS
- *(.text)
- ${RELOCATING+etext = ${DATA_ALIGNMENT};}
- }
- ${RELOCATING+. = ${DATA_ALIGNMENT};}
- .data :
- {
- *(.data)
- ${CONSTRUCTING+CONSTRUCTORS}
- ${RELOCATING+edata = .;}
- }
- .bss :
- {
- *(.bss)
- *(COMMON)
- ${RELOCATING+end = . };
- }
-}
-EOF
diff --git a/contrib/binutils/ld/scripttempl/nw.sc b/contrib/binutils/ld/scripttempl/nw.sc
deleted file mode 100644
index 3fb9bce..0000000
--- a/contrib/binutils/ld/scripttempl/nw.sc
+++ /dev/null
@@ -1,130 +0,0 @@
-#
-# Unusual variables checked by this code:
-# NOP - four byte opcode for no-op (defaults to 0)
-# DATA_ADDR - if end-of-text-plus-one-page isn't right for data start
-# OTHER_READONLY_SECTIONS - other than .text .init .ctors .rodata ...
-# (e.g., .PARISC.milli)
-# OTHER_READWRITE_SECTIONS - other than .data .bss .sdata ...
-# (e.g., .PARISC.global)
-# OTHER_SECTIONS - at the end
-# EXECUTABLE_SYMBOLS - symbols that must be defined for an
-# executable (e.g., _DYNAMIC_LINK)
-# 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_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.
-#
-# When adding sections, do note that the names of some sections are used
-# when specifying the start address of the next.
-#
-test -z "${BIG_OUTPUT_FORMAT}" && BIG_OUTPUT_FORMAT=${OUTPUT_FORMAT}
-test -z "${LITTLE_OUTPUT_FORMAT}" && LITTLE_OUTPUT_FORMAT=${OUTPUT_FORMAT}
-test "$LD_FLAG" = "N" && DATA_ADDR=.
-INTERP=".interp ${RELOCATING-0} : { *(.interp) }"
-PLT=".plt ${RELOCATING-0} : { *(.plt) }"
-cat <<EOF
-OUTPUT_FORMAT("${OUTPUT_FORMAT}", "${BIG_OUTPUT_FORMAT}",
- "${LITTLE_OUTPUT_FORMAT}")
-OUTPUT_ARCH(${ARCH})
-
-${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- /* 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-${RELOCATING+. = ${TEXT_START_ADDR} + SIZEOF_HEADERS;}}
- ${CREATE_SHLIB+${RELOCATING+. = SIZEOF_HEADERS;}}
- ${CREATE_SHLIB-${INTERP}}
- .hash ${RELOCATING-0} : { *(.hash) }
- .dynsym ${RELOCATING-0} : { *(.dynsym) }
- .dynstr ${RELOCATING-0} : { *(.dynstr) }
- .rel.text ${RELOCATING-0} : { *(.rel.text) }
- .rela.text ${RELOCATING-0} : { *(.rela.text) }
- .rel.data ${RELOCATING-0} : { *(.rel.data) }
- .rela.data ${RELOCATING-0} : { *(.rela.data) }
- .rel.rodata ${RELOCATING-0} : { *(.rel.rodata) }
- .rela.rodata ${RELOCATING-0} : { *(.rela.rodata) }
- .rel.got ${RELOCATING-0} : { *(.rel.got) }
- .rela.got ${RELOCATING-0} : { *(.rela.got) }
- .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.bss ${RELOCATING-0} : { *(.rel.bss) }
- .rela.bss ${RELOCATING-0} : { *(.rela.bss) }
- .rel.plt ${RELOCATING-0} : { *(.rel.plt) }
- .rela.plt ${RELOCATING-0} : { *(.rela.plt) }
- .init ${RELOCATING-0} : { *(.init) } =${NOP-0}
- ${DATA_PLT-${PLT}}
- .text ${RELOCATING-0} :
- {
- ${RELOCATING+${TEXT_START_SYMBOLS}}
- *(.text)
- ${CONSTRUCTING+ __CTOR_LIST__ = .;}
- ${CONSTRUCTING+ LONG((__CTOR_END__ - __CTOR_LIST__) / 4 - 2)}
- ${CONSTRUCTING+ *(.ctors)}
- ${CONSTRUCTING+ LONG(0)}
- ${CONSTRUCTING+ __CTOR_END__ = .;}
- ${CONSTRUCTING+ __DTOR_LIST__ = .;}
- ${CONSTRUCTING+ LONG((__DTOR_END__ - __DTOR_LIST__) / 4 - 2)}
- ${CONSTRUCTING+ *(.dtors)}
- ${CONSTRUCTING+ LONG(0)}
- ${CONSTRUCTING+ __DTOR_END__ = .;}
- }
- ${RELOCATING+_etext = .;}
- ${RELOCATING+PROVIDE (etext = .);}
- .fini ${RELOCATING-0} : { *(.fini) } =${NOP-0}
- .ctors ${RELOCATING-0} : { *(.ctors) }
- .dtors ${RELOCATING-0} : { *(.dtors) }
- .rodata ${RELOCATING-0} : { *(.rodata) }
- .rodata1 ${RELOCATING-0} : { *(.rodata1) }
- ${OTHER_READONLY_SECTIONS}
-
- /* Read-write section, merged into data segment: */
- ${RELOCATING+. = ${DATA_ADDR- ALIGN(8) + ${MAXPAGESIZE}};}
- .data ${RELOCATING-0} :
- {
- ${RELOCATING+${DATA_START_SYMBOLS}}
- *(.data)
- ${CONSTRUCTING+CONSTRUCTORS}
- }
- .data1 ${RELOCATING-0} : { *(.data1) }
- ${OTHER_READWRITE_SECTIONS}
- .got ${RELOCATING-0} : { *(.got.plt) *(.got) }
- .dynamic ${RELOCATING-0} : { *(.dynamic) }
- ${DATA_PLT+${PLT}}
- /* We want the small data sections together, so single-instruction offsets
- can access them all, and initialized data all before uninitialized, so
- we can shorten the on-disk segment size. */
- .sdata ${RELOCATING-0} : { *(.sdata) }
- ${RELOCATING+_edata = .;}
- ${RELOCATING+PROVIDE (edata = .);}
- ${RELOCATING+__bss_start = .;}
- ${RELOCATING+${OTHER_BSS_SYMBOLS}}
- .sbss ${RELOCATING-0} : { *(.sbss) *(.scommon) }
- .bss ${RELOCATING-0} :
- {
- *(.dynbss)
- *(.bss)
- *(COMMON)
- }
- ${RELOCATING+_end = . ;}
- ${RELOCATING+PROVIDE (end = .);}
-
- /* These are needed for ELF backends which have not yet been
- converted to the new style linker. */
- .stab 0 : { *(.stab) }
- .stabstr 0 : { *(.stabstr) }
-
- ${OTHER_SECTIONS}
-}
-EOF
diff --git a/contrib/binutils/ld/scripttempl/pe.sc b/contrib/binutils/ld/scripttempl/pe.sc
deleted file mode 100644
index da09eb4..0000000
--- a/contrib/binutils/ld/scripttempl/pe.sc
+++ /dev/null
@@ -1,171 +0,0 @@
-# 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='*(SORT(.CRT$*))'
- 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}
-
-ENTRY(${ENTRY})
-
-SECTIONS
-{
- .text ${RELOCATING+ __image_base__ + __section_alignment__ } :
- {
- ${RELOCATING+ *(.init)}
- *(.text)
- ${R_TEXT}
- *(.glue_7t)
- *(.glue_7)
- ${CONSTRUCTING+ ___CTOR_LIST__ = .; __CTOR_LIST__ = . ;
- LONG (-1); *(SORT(.ctors.*)); *(.ctors); *(.ctor); LONG (0); }
- ${CONSTRUCTING+ ___DTOR_LIST__ = .; __DTOR_LIST__ = . ;
- LONG (-1); *(SORT(.dtors.*)); *(.dtors); *(.dtor); 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}
- ${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 pe.em:sort_sections. */
- ${R_IDATA}
- }
- .CRT ${RELOCATING+BLOCK(__section_alignment__)} :
- {
- ${R_CRT}
- }
-
- .tls ${RELOCATING+BLOCK(__section_alignment__)} :
- {
- ${R_TLS}
- }
-
- .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 ]
- }
-
-}
-EOF
diff --git a/contrib/binutils/ld/scripttempl/ppcpe.sc b/contrib/binutils/ld/scripttempl/ppcpe.sc
deleted file mode 100644
index 40fbe33..0000000
--- a/contrib/binutils/ld/scripttempl/ppcpe.sc
+++ /dev/null
@@ -1,198 +0,0 @@
-# A PE linker script for PowerPC.
-# Loosely based on Steve Chamberlain's pe.sc.
-# All new mistakes should be credited to Kim Knuttila (krk@cygnus.com)
-#
-# These are substituted in as variables in order to get '}' in a shell
-# conditional expansion.
-INIT='.init : { *(.init) }'
-FINI='.fini : { *(.fini) }'
-cat <<EOF
-OUTPUT_FORMAT(${OUTPUT_FORMAT})
-${LIB_SEARCH_DIRS}
-
-/* Much of this layout was determined by delving into .exe files for
- the box generated by other compilers/linkers/etc. This means that
- if a particular feature did not happen to appear in one of the
- subject files, then it may not be yet supported.
-*/
-
-/* It's "mainCRTStartup", not "_mainCRTStartup", and it's located in
- one of the two .lib files (libc.lib and kernel32.lib) that currently
- must be present on the link line. This means that you must use
- "-u mainCRTStartup" to make sure it gets included in the link.
-*/
-
-ENTRY(mainCRTStartup)
-
-SECTIONS
-{
-
- /* text - the usual meaning */
- .text ${RELOCATING+ __image_base__ + __section_alignment__ } :
- {
- ${RELOCATING+ *(.init);}
- *(.text)
- *(.gcc_except_table)
- ${CONSTRUCTING+ ___CTOR_LIST__ = .; __CTOR_LIST__ = . ;
- LONG (-1); *(.ctors); *(.ctor); LONG (0); }
- ${CONSTRUCTING+ ___DTOR_LIST__ = .; __DTOR_LIST__ = . ;
- LONG (-1); *(.dtors); *(.dtor); LONG (0); }
- ${RELOCATING+ *(.fini);}
- ${RELOCATING+ etext = .};
- }
-
- /* rdata - Read Only Runtime Data
- CTR sections: All of the CRT (read only C runtime data) sections
- appear at the start of the .rdata (read only runtime data)
- section, in the following order. Don't know if it matters or not.
- Not all sections are always present either.
- .rdata: compiler generated read only data
- .xdata: compiler generated exception handling table. (Most docs
- seem to suggest that this section is now deprecated infavor
- of the ydata section)
- .edata: The exported names table.
- */
- .rdata BLOCK(__section_alignment__) :
- {
- *(.CRT\$XCA);
- *(.CRT\$XCC);
- *(.CRT\$XCZ);
- *(.CRT\$XIA);
- *(.CRT\$XIC);
- *(.CRT\$XIZ);
- *(.CRT\$XLA);
- *(.CRT\$XLZ);
- *(.CRT\$XPA);
- *(.CRT\$XPX);
- *(.CRT\$XPZ);
- *(.CRT\$XTA);
- *(.CRT\$XTZ);
- *(.rdata);
- *(.xdata);
- }
-
- .edata BLOCK(__section_alignment__) :
- {
- *(.edata);
- }
-
- /* data - initialized data
- .ydata: exception handling information.
- .data: the usual meaning.
- .data2: more of the same.
- .bss: For some reason, bss appears to be included in the data
- section, as opposed to being given a section of it's own.
- COMMON:
- */
- .data BLOCK(__section_alignment__) :
- {
- __data_start__ = . ;
- *(.ydata);
- *(.data);
- *(.data2);
- __bss_start__ = . ;
- *(.bss) ;
- *(COMMON);
- __bss_end__ = . ;
- ${RELOCATING+ end = .};
- __data_end__ = . ;
- }
-
- /* The exception handling table. A sequence of 5 word entries. Section
- address and extent are placed in the DataDirectory.
- */
- .pdata BLOCK(__section_alignment__) :
- {
- *(.pdata)
- ;
- }
-
- /* The idata section is chock full of magic bits.
- 1. Boundaries around various idata parts are used to initialize
- some of the fields of the DataDirectory. In particular, the
- magic for 2, 4 and 5 are known to be used. Some compilers
- appear to generate magic section symbols for this purpose.
- Where we can, we catch such symbols and use our own. This of
- course is something less than a perfect strategy.
- 2. The table of contents is placed immediately after idata4.
- The ".private.toc" sections are generated by the ppc bfd. The
- .toc variable is generated by gas, and resolved here. It is
- used to initialized function descriptors (and anyone else who
- needs the address of the module's toc). The only thing
- interesting about it at all? Most ppc instructions using it
- have a 16bit displacement field. The convention for addressing
- is to initialize the .toc value to 32K past the start of the
- actual toc, and subtract 32K from all references, thus using
- the entire 64K range. Naturally, the reloc code must agree
- on this number or you get pretty stupid results.
- */
- .idata BLOCK(__section_alignment__) :
- {
- __idata2_magic__ = .;
- *(.idata\$2);
- __idata3_magic__ = .;
- *(.idata\$3);
- __idata4_magic__ = .;
- *(.idata\$4);
- . = ALIGN(4);
- .toc = . + 32768;
- *(.private.toc);
- __idata5_magic__ = .;
- *(.idata\$5);
- __idata6_magic__ = .;
- *(.idata\$6);
- __idata7_magic__ = .;
- *(.idata\$7);
- ;
- }
-
- /* reldata -- data that requires relocation
- */
- .reldata BLOCK(__section_alignment__) :
- {
- *(.reldata)
- ;
- }
-
-
- /* Resources */
- .rsrc BLOCK(__section_alignment__) :
- {
- *(.rsrc\$01)
- *(.rsrc\$02)
- ;
- }
-
- .stab BLOCK(__section_alignment__) ${RELOCATING+(NOLOAD)} :
- {
- [ .stab ]
- }
-
- .stabstr BLOCK(__section_alignment__) ${RELOCATING+(NOLOAD)} :
- {
- [ .stabstr ]
- }
-
- /* The .reloc section is currently generated by the dlltool from Steve
- Chamberlain in a second pass of linking. Section address and extent
- are placed in the DataDirectory.
- */
- .reloc BLOCK(__section_alignment__) :
- {
- *(.reloc)
- ;
- }
-
- /* We don't do anything useful with codeview debugger support or the
- directive section (yet). Hopefully, we junk them correctly.
- */
- /DISCARD/ BLOCK(__section_alignment__) :
- {
- *(.debug\$S)
- *(.debug\$T)
- *(.debug\$F)
- *(.drectve)
- ;
- }
-}
-EOF
diff --git a/contrib/binutils/ld/scripttempl/sh.sc b/contrib/binutils/ld/scripttempl/sh.sc
deleted file mode 100644
index e7f049f..0000000
--- a/contrib/binutils/ld/scripttempl/sh.sc
+++ /dev/null
@@ -1,64 +0,0 @@
-TORS=".tors :
- {
- ___ctors = . ;
- *(.ctors)
- ___ctors_end = . ;
- ___dtors = . ;
- *(.dtors)
- ___dtors_end = . ;
- } > ram"
-
-cat <<EOF
-OUTPUT_FORMAT("${OUTPUT_FORMAT}")
-OUTPUT_ARCH(${ARCH})
-
-MEMORY
-{
- ram : o = 0x1000, l = 512k
-}
-
-SECTIONS
-{
- .text :
- {
- *(.text)
- *(.strings)
- ${RELOCATING+ _etext = . ; }
- } ${RELOCATING+ > ram}
- ${CONSTRUCTING+${TORS}}
- .data :
- {
- *(.data)
- ${RELOCATING+*(.gcc_exc*)}
- ${RELOCATING+___EH_FRAME_BEGIN__ = . ;}
- ${RELOCATING+*(.eh_fram*)}
- ${RELOCATING+___EH_FRAME_END__ = . ;}
- ${RELOCATING+LONG(0);}
- ${RELOCATING+ _edata = . ; }
- } ${RELOCATING+ > ram}
- .bss :
- {
- ${RELOCATING+ _bss_start = . ; }
- *(.bss)
- *(COMMON)
- ${RELOCATING+ _end = . ; }
- } ${RELOCATING+ > ram}
- .stack ${RELOCATING+ 0x30000 } :
- {
- ${RELOCATING+ _stack = . ; }
- *(.stack)
- } ${RELOCATING+ > ram}
- .stab 0 ${RELOCATING+(NOLOAD)} :
- {
- *(.stab)
- }
- .stabstr 0 ${RELOCATING+(NOLOAD)} :
- {
- *(.stabstr)
- }
-}
-EOF
-
-
-
-
diff --git a/contrib/binutils/ld/scripttempl/sparccoff.sc b/contrib/binutils/ld/scripttempl/sparccoff.sc
deleted file mode 100644
index 6bbb7ad..0000000
--- a/contrib/binutils/ld/scripttempl/sparccoff.sc
+++ /dev/null
@@ -1,48 +0,0 @@
-# Linker script for Sparc COFF.
-# Based on i386coff.sc by Ian Taylor <ian@cygnus.com>.
-test -z "$ENTRY" && ENTRY=_start
-cat <<EOF
-OUTPUT_FORMAT("${OUTPUT_FORMAT}")
-${LIB_SEARCH_DIRS}
-
-ENTRY(${ENTRY})
-
-SECTIONS
-{
- .text ${RELOCATING+ SIZEOF_HEADERS} : {
- *(.init)
- *(.text)
- ${RELOCATING+ etext = .;}
- ${CONSTRUCTING+ ___CTOR_LIST__ = .;}
- ${CONSTRUCTING+ LONG((___CTOR_END__ - ___CTOR_LIST__) / 4 - 2)}
- ${CONSTRUCTING+ *(.ctors)}
- ${CONSTRUCTING+ LONG(0)}
- ${CONSTRUCTING+ ___CTOR_END__ = .;}
- ${CONSTRUCTING+ ___DTOR_LIST__ = .;}
- ${CONSTRUCTING+ LONG((___DTOR_END__ - ___DTOR_LIST__) / 4 - 2)}
- ${CONSTRUCTING+ *(.dtors)}
- ${CONSTRUCTING+ LONG(0)}
- ${CONSTRUCTING+ ___DTOR_END__ = .;}
- *(.fini)
- ${RELOCATING+ etext = .};
- }
- .data ${RELOCATING+ 0x400000 + (. & 0xffc00fff)} : {
- *(.data)
- ${RELOCATING+ edata = .};
- }
- .bss ${RELOCATING+ SIZEOF(.data) + ADDR(.data)} :
- {
- *(.bss)
- *(COMMON)
- ${RELOCATING+ end = .};
- }
- .stab 0 ${RELOCATING+(NOLOAD)} :
- {
- [ .stab ]
- }
- .stabstr 0 ${RELOCATING+(NOLOAD)} :
- {
- [ .stabstr ]
- }
-}
-EOF
diff --git a/contrib/binutils/ld/scripttempl/tic30aout.sc b/contrib/binutils/ld/scripttempl/tic30aout.sc
deleted file mode 100644
index 28baed3..0000000
--- a/contrib/binutils/ld/scripttempl/tic30aout.sc
+++ /dev/null
@@ -1,34 +0,0 @@
-cat <<EOF
-OUTPUT_FORMAT("${OUTPUT_FORMAT}")
-OUTPUT_ARCH(${ARCH})
-
-${STACKZERO+${RELOCATING+${STACKZERO}}}
-${RELOCATING+PROVIDE (__stack = 0);}
-SECTIONS
-{
- ${RELOCATING+. = ${TEXT_START_ADDR};}
- .text :
- {
- CREATE_OBJECT_SYMBOLS
- *(.text)
- ${RELOCATING+_etext = .;}
- ${RELOCATING+__etext = .;}
- ${PAD_TEXT+${RELOCATING+. = ${DATA_ALIGNMENT};}}
- }
- ${RELOCATING+. = ${DATA_ALIGNMENT};}
- .data :
- {
- *(.data)
- ${RELOCATING+_edata = .;}
- ${RELOCATING+__edata = .;}
- }
- .bss :
- {
- ${RELOCATING+ __bss_start = .};
- *(.bss)
- *(COMMON)
- ${RELOCATING+_end = ALIGN(4) };
- ${RELOCATING+__end = ALIGN(4) };
- }
-}
-EOF
diff --git a/contrib/binutils/ld/scripttempl/tic30coff.sc b/contrib/binutils/ld/scripttempl/tic30coff.sc
deleted file mode 100644
index df2d4f7..0000000
--- a/contrib/binutils/ld/scripttempl/tic30coff.sc
+++ /dev/null
@@ -1,58 +0,0 @@
-cat <<EOF
-OUTPUT_FORMAT("${OUTPUT_FORMAT}")
-OUTPUT_ARCH("${OUTPUT_ARCH}")
-
-MEMORY
-{
- rom : ORIGIN = 0x00000300, LENGTH = 16k
- ram : ORIGIN = 0x00000300 + 16k, LENGTH = 16k
- ramblk0 : ORIGIN = 0x02026000, LENGTH = 0x1000
- ramblk1 : ORIGIN = 0x02027000, LENGTH = 0x1000
-}
-
-SECTIONS
-{
-.vectors 0x00000000 :
-{
- *(vectors)
-}
-
-.text :
-{
- *(.text)
-} > rom
-
-.const :
-{
- *(.const)
- __etext = . ;
-} > rom
-
-.mdata : AT( ADDR(.const) + SIZEOF(.const) )
-{
- __data = . ;
- *(.data);
- __edata = . ;
-} > ram
-
-.bss :
-{
- __bss = . ;
- *(.bss);
- *(COMMON);
- __ebss = . ;
-} > ram
-
-.ram0 :
-{
- *(ram0)
-} > ramblk0
-
-.ram1 :
-{
- *(ram1)
-} > ramblk1
-
-}
-
-EOF
diff --git a/contrib/binutils/ld/scripttempl/v850.sc b/contrib/binutils/ld/scripttempl/v850.sc
deleted file mode 100644
index 8958321..0000000
--- a/contrib/binutils/ld/scripttempl/v850.sc
+++ /dev/null
@@ -1,230 +0,0 @@
-cat << EOF
-OUTPUT_FORMAT("elf32-v850", "elf32-v850",
- "elf32-v850")
-OUTPUT_ARCH(v850)
-ENTRY(_start)
-SEARCH_DIR(.);
-SECTIONS
-{
- /* This saves a little space in the ELF file, since the zda starts
- at a higher location that the ELF headers take up. */
-
- .zdata ${ZDATA_START_ADDR} :
- {
- *(.zdata)
- *(.zbss)
- *(reszdata)
- *(.zcommon)
- }
-
- /* This is the read only part of the zero data area.
- Having it as a seperate section prevents its
- attributes from being inherited by the zdata
- section. Specifically it prevents the zdata
- section from being marked READONLY. */
-
- .rozdata ${ROZDATA_START_ADDR} :
- {
- *(.rozdata)
- *(romzdata)
- *(romzbss)
- }
-
- /* Read-only sections, merged into text segment. */
- . = ${TEXT_START_ADDR};
- .interp : { *(.interp) }
- .hash : { *(.hash) }
- .dynsym : { *(.dynsym) }
- .dynstr : { *(.dynstr) }
- .rel.text : { *(.rel.text) }
- .rela.text : { *(.rela.text) }
- .rel.data : { *(.rel.data) }
- .rela.data : { *(.rela.data) }
- .rel.rodata : { *(.rel.rodata) }
- .rela.rodata : { *(.rela.rodata) }
- .rel.gcc_except_table : { *(.rel.gcc_except_table) }
- .rela.gcc_except_table : { *(.rela.gcc_except_table) }
- .rel.got : { *(.rel.got) }
- .rela.got : { *(.rela.got) }
- .rel.ctors : { *(.rel.ctors) }
- .rela.ctors : { *(.rela.ctors) }
- .rel.dtors : { *(.rel.dtors) }
- .rela.dtors : { *(.rela.dtors) }
- .rel.init : { *(.rel.init) }
- .rela.init : { *(.rela.init) }
- .rel.fini : { *(.rel.fini) }
- .rela.fini : { *(.rela.fini) }
- .rel.bss : { *(.rel.bss) }
- .rela.bss : { *(.rela.bss) }
- .rel.plt : { *(.rel.plt) }
- .rela.plt : { *(.rela.plt) }
- .init : { KEEP (*(.init)) } =0
- .plt : { *(.plt) }
-
- .text :
- {
- *(.text)
- ${RELOCATING+*(.text.*)}
-
- /* .gnu.warning sections are handled specially by elf32.em. */
- *(.gnu.warning)
- *(.gnu.linkonce.t*)
- } =0
-
- ${RELOCATING+_etext = .;}
- ${RELOCATING+PROVIDE (etext = .);}
-
- /* This is special code area at the end of the normal text section.
- It contains a small lookup table at the start followed by the
- code pointed to by entries in the lookup table. */
-
- .call_table_data ${CALL_TABLE_START_ADDR} :
- {
- ${RELOCATING+PROVIDE(__ctbp = .);}
- *(.call_table_data)
- } = 0xff /* Fill gaps with 0xff. */
-
- .call_table_text :
- {
- *(.call_table_text)
- }
-
- .fini : { KEEP (*(.fini)) } =0
- .rodata : { *(.rodata) ${RELOCATING+*(.rodata.*)} *(.gnu.linkonce.r*) }
- .rodata1 : { *(.rodata1) }
-
- .data :
- {
- *(.data)
- ${RELOCATING+*(.data.*)}
- *(.gnu.linkonce.d*)
- CONSTRUCTORS
- }
- .data1 : { *(.data1) }
- .ctors :
- {
- ${CONSTRUCTING+___ctors = .;}
- KEEP (*(EXCLUDE_FILE (*crtend.o) .ctors))
- KEEP (*(SORT(.ctors.*)))
- KEEP (*crtend(.ctors))
- ${CONSTRUCTING+___ctors_end = .;}
- }
- .dtors :
- {
- ${CONSTRUCTING+___dtors = .;}
- KEEP (*(EXCLUDE_FILE (*crtend.o) .dtors))
- KEEP (*(SORT(.dtors.*)))
- KEEP (*crtend.o(.dtors))
- ${CONSTRUCTING+___dtors_end = .;}
- }
- .jcr :
- {
- KEEP (*(.jcr))
- }
-
- .gcc_except_table : { *(.gcc_except_table) }
-
- .got : { *(.got.plt) *(.got) }
- .dynamic : { *(.dynamic) }
-
- .tdata ${TDATA_START_ADDR} :
- {
- ${RELOCATING+PROVIDE (__ep = .);}
- *(.tbyte)
- *(.tcommon_byte)
- *(.tdata)
- *(.tbss)
- *(.tcommon)
- }
-
- /* We want the small data sections together, so single-instruction offsets
- can access them all, and initialized data all before uninitialized, so
- we can shorten the on-disk segment size. */
-
- .sdata ${SDATA_START_ADDR} :
- {
- ${RELOCATING+PROVIDE (__gp = . + 0x8000);}
- *(.sdata)
- }
-
- /* See comment about .rozdata. */
- .rosdata ${ROSDATA_START_ADDR} :
- {
- *(.rosdata)
- }
-
- /* We place the .sbss data section AFTER the .rosdata section, so that
- it can directly preceed the .bss section. This allows runtime startup
- code to initialise all the zero-data sections by simply taking the
- value of '_edata' and zeroing until it reaches '_end'. */
-
- .sbss :
- {
- ${RELOCATING+__sbss_start = .;}
- *(.sbss)
- *(.scommon)
- }
-
- ${RELOCATING+_edata = DEFINED (__sbss_start) ? __sbss_start : . ;}
- ${RELOCATING+PROVIDE (edata = _edata);}
-
- .bss :
- {
- ${RELOCATING+__bss_start = DEFINED (__sbss_start) ? __sbss_start : . ;}
- ${RELOCATING+__real_bss_start = . ;}
- *(.dynbss)
- *(.bss)
- *(COMMON)
- }
-
- ${RELOCATING+_end = . ;}
- ${RELOCATING+PROVIDE (end = .);}
-
- /* Stabs debugging sections. */
- .stab 0 : { *(.stab) }
- .stabstr 0 : { *(.stabstr) }
- .stab.excl 0 : { *(.stab.excl) }
- .stab.exclstr 0 : { *(.stab.exclstr) }
- .stab.index 0 : { *(.stab.index) }
- .stab.indexstr 0 : { *(.stab.indexstr) }
- .comment 0 : { *(.comment) }
-
- /* DWARF debug sections.
- Symbols in the DWARF debugging sections are relative to the beginning
- of the section so we begin them at 0. */
-
- /* DWARF 1 */
- .debug 0 : { *(.debug) }
- .line 0 : { *(.line) }
-
- /* GNU DWARF 1 extensions */
- .debug_srcinfo 0 : { *(.debug_srcinfo) }
- .debug_sfnames 0 : { *(.debug_sfnames) }
-
- /* DWARF 1.1 and DWARF 2 */
- .debug_aranges 0 : { *(.debug_aranges) }
- .debug_pubnames 0 : { *(.debug_pubnames) }
-
- /* DWARF 2 */
- .debug_info 0 : { *(.debug_info) *(.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) }
-
- /* User stack. */
- .stack 0x200000 :
- {
- ${RELOCATING+__stack = .;}
- *(.stack)
- }
-}
-EOF
diff --git a/contrib/binutils/ld/scripttempl/vanilla.sc b/contrib/binutils/ld/scripttempl/vanilla.sc
deleted file mode 100644
index 1798480..0000000
--- a/contrib/binutils/ld/scripttempl/vanilla.sc
+++ /dev/null
@@ -1 +0,0 @@
-# Nothing to do.
diff --git a/contrib/binutils/ld/scripttempl/z8000.sc b/contrib/binutils/ld/scripttempl/z8000.sc
deleted file mode 100644
index 646c880..0000000
--- a/contrib/binutils/ld/scripttempl/z8000.sc
+++ /dev/null
@@ -1,57 +0,0 @@
-cat <<EOF
-OUTPUT_FORMAT("${OUTPUT_FORMAT}")
-OUTPUT_ARCH("${OUTPUT_ARCH}")
-ENTRY(_start)
-
-SECTIONS
-{
-.text ${BIG+ ${RELOCATING+ 0x0000000}} :
- {
- *(.text)
- *(.strings)
- *(.rdata)
- }
-
-.ctors ${BIG+ ${RELOCATING+ 0x2000000}} :
- {
- ${CONSTRUCTING+ ___ctors = . ; }
- *(.ctors);
- ${CONSTRUCTING+ ___ctors_end = . ; }
- ___dtors = . ;
- *(.dtors);
- ${CONSTRUCTING+ ___dtors_end = . ; }
- }
-
-.data ${BIG+ ${RELOCATING+ 0x3000000}} :
- {
- *(.data)
- }
-
-.bss ${BIG+ ${RELOCATING+ 0x4000000}} :
- {
- ${RELOCATING+ __start_bss = . ; }
- *(.bss);
- *(COMMON);
- ${RELOCATING+ __end_bss = . ; }
- }
-
-.heap ${BIG+ ${RELOCATING+ 0x5000000}} :
- {
- ${RELOCATING+ __start_heap = . ; }
- ${RELOCATING+ . = . + 20k ; }
- ${RELOCATING+ __end_heap = . ; }
- }
-
-.stack ${RELOCATING+ 0xf000 } :
- {
- ${RELOCATING+ _stack = . ; }
- *(.stack)
- ${RELOCATING+ __stack_top = . ; }
- }
-
-}
-EOF
-
-
-
-
diff --git a/contrib/binutils/ld/stamp-h.in b/contrib/binutils/ld/stamp-h.in
deleted file mode 100644
index 9788f70..0000000
--- a/contrib/binutils/ld/stamp-h.in
+++ /dev/null
@@ -1 +0,0 @@
-timestamp
diff --git a/contrib/binutils/ld/sysdep.h b/contrib/binutils/ld/sysdep.h
deleted file mode 100644
index f164e74..0000000
--- a/contrib/binutils/ld/sysdep.h
+++ /dev/null
@@ -1,96 +0,0 @@
-/* sysdep.h -- handle host dependencies for the GNU linker
- Copyright 1995, 1996, 1997, 1999, 2002, 2003
- 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, 59 Temple Place - Suite 330, Boston, MA
- 02111-1307, USA. */
-
-#ifndef LD_SYSDEP_H
-#define LD_SYSDEP_H
-
-#include "config.h"
-
-#include <stdio.h>
-#include <sys/types.h>
-#include <sys/stat.h>
-
-#ifdef HAVE_STRING_H
-#include <string.h>
-#else
-#ifdef HAVE_STRINGS_H
-#include <strings.h>
-#else
-extern char *strchr ();
-extern char *strrchr ();
-#endif
-#endif
-
-#ifdef HAVE_STDLIB_H
-#include <stdlib.h>
-#endif
-
-#ifdef HAVE_UNISTD_H
-#include <unistd.h>
-#endif
-
-/* for PATH_MAX */
-#ifdef HAVE_LIMITS_H
-#include <limits.h>
-#endif
-/* for MAXPATHLEN */
-#ifdef HAVE_SYS_PARAM_H
-#include <sys/param.h>
-#endif
-#ifdef PATH_MAX
-# define LD_PATHMAX PATH_MAX
-#else
-# ifdef MAXPATHLEN
-# define LD_PATHMAX MAXPATHLEN
-# else
-# define LD_PATHMAX 1024
-# endif
-#endif
-
-#ifdef HAVE_REALPATH
-# define REALPATH(a,b) realpath (a, b)
-#else
-# define REALPATH(a,b) NULL
-#endif
-
-#ifdef USE_BINARY_FOPEN
-#include "fopen-bin.h"
-#else
-#include "fopen-same.h"
-#endif
-
-#ifdef NEED_DECLARATION_STRSTR
-extern char *strstr ();
-#endif
-
-#ifdef NEED_DECLARATION_FREE
-extern void free ();
-#endif
-
-#ifdef NEED_DECLARATION_GETENV
-extern char *getenv ();
-#endif
-
-#ifdef NEED_DECLARATION_ENVIRON
-extern char **environ;
-#endif
-
-#endif /* ! defined (LD_SYSDEP_H) */
OpenPOWER on IntegriCloud