aboutsummaryrefslogtreecommitdiff
path: root/contrib/binutils/ld
diff options
context:
space:
mode:
Diffstat (limited to 'contrib/binutils/ld')
-rw-r--r--contrib/binutils/ld/ChangeLog709
-rw-r--r--contrib/binutils/ld/ChangeLog-00013376
-rw-r--r--contrib/binutils/ld/ChangeLog-02033580
-rw-r--r--contrib/binutils/ld/ChangeLog-20061364
-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.am2050
-rw-r--r--contrib/binutils/ld/Makefile.in2846
-rw-r--r--contrib/binutils/ld/NEWS408
-rw-r--r--contrib/binutils/ld/README67
-rw-r--r--contrib/binutils/ld/TODO9
-rw-r--r--contrib/binutils/ld/aclocal.m4903
-rw-r--r--contrib/binutils/ld/config.in138
-rw-r--r--contrib/binutils/ld/configdoc.texi25
-rwxr-xr-xcontrib/binutils/ld/configure15241
-rw-r--r--contrib/binutils/ld/configure.host252
-rw-r--r--contrib/binutils/ld/configure.in278
-rw-r--r--contrib/binutils/ld/configure.tgt698
-rw-r--r--contrib/binutils/ld/deffile.h103
-rw-r--r--contrib/binutils/ld/deffilep.y1076
-rw-r--r--contrib/binutils/ld/dep-in.sed21
-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.sh12
-rw-r--r--contrib/binutils/ld/emulparams/arm_wince_pe.sh14
-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.sh35
-rw-r--r--contrib/binutils/ld/emulparams/armelf_fbsd.sh3
-rw-r--r--contrib/binutils/ld/emulparams/armelf_linux.sh24
-rw-r--r--contrib/binutils/ld/emulparams/armelf_nbsd.sh7
-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.sh15
-rw-r--r--contrib/binutils/ld/emulparams/avr6.sh11
-rw-r--r--contrib/binutils/ld/emulparams/coff_sparc.sh7
-rw-r--r--contrib/binutils/ld/emulparams/elf32_sparc.sh17
-rw-r--r--contrib/binutils/ld/emulparams/elf32_spu.sh20
-rw-r--r--contrib/binutils/ld/emulparams/elf32b4300.sh10
-rw-r--r--contrib/binutils/ld/emulparams/elf32bmip.sh63
-rwxr-xr-xcontrib/binutils/ld/emulparams/elf32bmip_fbsd.sh3
-rw-r--r--contrib/binutils/ld/emulparams/elf32bmipn32-defs.sh77
-rwxr-xr-xcontrib/binutils/ld/emulparams/elf32bmipn32.sh22
-rwxr-xr-xcontrib/binutils/ld/emulparams/elf32bsmip.sh3
-rw-r--r--contrib/binutils/ld/emulparams/elf32btsmip.sh10
-rw-r--r--contrib/binutils/ld/emulparams/elf32btsmipn32.sh15
-rw-r--r--contrib/binutils/ld/emulparams/elf32cr16.sh6
-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
-rwxr-xr-xcontrib/binutils/ld/emulparams/elf32mep.sh55
-rw-r--r--contrib/binutils/ld/emulparams/elf32mipswindiss.sh27
-rw-r--r--contrib/binutils/ld/emulparams/elf32ppc.sh16
-rw-r--r--contrib/binutils/ld/emulparams/elf32ppc_fbsd.sh4
-rw-r--r--contrib/binutils/ld/emulparams/elf32ppccommon.sh49
-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.sh39
-rw-r--r--contrib/binutils/ld/emulparams/elf64_ia64_fbsd.sh7
-rw-r--r--contrib/binutils/ld/emulparams/elf64_s390.sh35
-rwxr-xr-xcontrib/binutils/ld/emulparams/elf64_s390_fbsd.sh2
-rw-r--r--contrib/binutils/ld/emulparams/elf64_sparc.sh51
-rw-r--r--contrib/binutils/ld/emulparams/elf64_sparc_fbsd.sh4
-rw-r--r--contrib/binutils/ld/emulparams/elf64alpha.sh27
-rw-r--r--contrib/binutils/ld/emulparams/elf64alpha_fbsd.sh3
-rw-r--r--contrib/binutils/ld/emulparams/elf64alpha_nbsd.sh2
-rw-r--r--contrib/binutils/ld/emulparams/elf64bmip-defs.sh11
-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.sh50
-rw-r--r--contrib/binutils/ld/emulparams/elf64ppc_fbsd.sh4
-rw-r--r--contrib/binutils/ld/emulparams/elf_fbsd.sh1
-rw-r--r--contrib/binutils/ld/emulparams/elf_i386.sh14
-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.sh13
-rwxr-xr-xcontrib/binutils/ld/emulparams/elf_s390_fbsd.sh2
-rw-r--r--contrib/binutils/ld/emulparams/elf_x86_64.sh37
-rw-r--r--contrib/binutils/ld/emulparams/elf_x86_64_fbsd.sh3
-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.sh9
-rw-r--r--contrib/binutils/ld/emulparams/i386pe_posix.sh10
-rw-r--r--contrib/binutils/ld/emulparams/i386pep.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.sh12
-rw-r--r--contrib/binutils/ld/emulparams/mipsidtl.sh12
-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.sh10
-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.sh8
-rw-r--r--contrib/binutils/ld/emulparams/scoreelf.sh31
-rw-r--r--contrib/binutils/ld/emulparams/sh.sh8
-rw-r--r--contrib/binutils/ld/emulparams/shelf_uclinux.sh4
-rw-r--r--contrib/binutils/ld/emulparams/shelf_vxworks.sh19
-rw-r--r--contrib/binutils/ld/emulparams/shl.sh2
-rwxr-xr-xcontrib/binutils/ld/emulparams/shlelf.sh2
-rw-r--r--contrib/binutils/ld/emulparams/shlelf_vxworks.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.em153
-rw-r--r--contrib/binutils/ld/emultempl/armcoff.em282
-rw-r--r--contrib/binutils/ld/emultempl/armelf.em360
-rw-r--r--contrib/binutils/ld/emultempl/astring.sed13
-rw-r--r--contrib/binutils/ld/emultempl/avrelf.em269
-rw-r--r--contrib/binutils/ld/emultempl/cr16elf.em92
-rw-r--r--contrib/binutils/ld/emultempl/elf-generic.em81
-rw-r--r--contrib/binutils/ld/emultempl/elf32.em2070
-rw-r--r--contrib/binutils/ld/emultempl/genelf.em39
-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.em209
-rw-r--r--contrib/binutils/ld/emultempl/mipsecoff.em37
-rw-r--r--contrib/binutils/ld/emultempl/mipself.em37
-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.em1909
-rw-r--r--contrib/binutils/ld/emultempl/pep.em1706
-rw-r--r--contrib/binutils/ld/emultempl/ppc32elf.em233
-rw-r--r--contrib/binutils/ld/emultempl/ppc64elf.em604
-rw-r--r--contrib/binutils/ld/emultempl/scoreelf.em74
-rw-r--r--contrib/binutils/ld/emultempl/spu_ovl.S294
-rw-r--r--contrib/binutils/ld/emultempl/spu_ovl.obin1432 -> 0 bytes
-rw-r--r--contrib/binutils/ld/emultempl/spuelf.em504
-rw-r--r--contrib/binutils/ld/emultempl/sunos.em1033
-rw-r--r--contrib/binutils/ld/emultempl/ticoff.em183
-rw-r--r--contrib/binutils/ld/emultempl/vanilla.em84
-rw-r--r--contrib/binutils/ld/fdl.texi367
-rw-r--r--contrib/binutils/ld/gen-doc.texi25
-rwxr-xr-xcontrib/binutils/ld/genscripts.sh379
-rw-r--r--contrib/binutils/ld/h8-doc.texi14
-rw-r--r--contrib/binutils/ld/ld.77819
-rw-r--r--contrib/binutils/ld/ld.h326
-rw-r--r--contrib/binutils/ld/ld.texinfo6908
-rw-r--r--contrib/binutils/ld/ldcref.c734
-rw-r--r--contrib/binutils/ld/ldctor.c376
-rw-r--r--contrib/binutils/ld/ldctor.h60
-rw-r--r--contrib/binutils/ld/ldemul.c322
-rw-r--r--contrib/binutils/ld/ldemul.h204
-rw-r--r--contrib/binutils/ld/ldexp.c1152
-rw-r--r--contrib/binutils/ld/ldexp.h184
-rw-r--r--contrib/binutils/ld/ldfile.c551
-rw-r--r--contrib/binutils/ld/ldfile.h63
-rw-r--r--contrib/binutils/ld/ldgram.y1339
-rw-r--r--contrib/binutils/ld/ldint.71277
-rw-r--r--contrib/binutils/ld/ldint.texinfo1062
-rw-r--r--contrib/binutils/ld/ldlang.c7095
-rw-r--r--contrib/binutils/ld/ldlang.h632
-rw-r--r--contrib/binutils/ld/ldlex.h64
-rw-r--r--contrib/binutils/ld/ldlex.l691
-rw-r--r--contrib/binutils/ld/ldmain.c1535
-rw-r--r--contrib/binutils/ld/ldmain.h47
-rw-r--r--contrib/binutils/ld/ldmisc.c528
-rw-r--r--contrib/binutils/ld/ldmisc.h44
-rw-r--r--contrib/binutils/ld/ldver.c58
-rw-r--r--contrib/binutils/ld/ldver.h21
-rw-r--r--contrib/binutils/ld/ldwrite.c568
-rw-r--r--contrib/binutils/ld/ldwrite.h21
-rw-r--r--contrib/binutils/ld/lexsup.c1653
-rw-r--r--contrib/binutils/ld/mri.c316
-rw-r--r--contrib/binutils/ld/mri.h37
-rw-r--r--contrib/binutils/ld/pe-dll.c2864
-rw-r--r--contrib/binutils/ld/pe-dll.h66
-rw-r--r--contrib/binutils/ld/pep-dll.c58
-rw-r--r--contrib/binutils/ld/pep-dll.h54
-rw-r--r--contrib/binutils/ld/po/Make-in256
-rw-r--r--contrib/binutils/ld/po/POTFILES.in32
-rw-r--r--contrib/binutils/ld/po/ld.pot1977
-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.sc523
-rw-r--r--contrib/binutils/ld/scripttempl/elf32cr16.sc175
-rw-r--r--contrib/binutils/ld/scripttempl/i386coff.sc43
-rw-r--r--contrib/binutils/ld/scripttempl/mep.sc446
-rw-r--r--contrib/binutils/ld/scripttempl/mips.sc69
-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.sc272
-rw-r--r--contrib/binutils/ld/scripttempl/pep.sc272
-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/vanilla.sc1
-rw-r--r--contrib/binutils/ld/stamp-h.in1
-rw-r--r--contrib/binutils/ld/sysdep.h99
214 files changed, 0 insertions, 99049 deletions
diff --git a/contrib/binutils/ld/ChangeLog b/contrib/binutils/ld/ChangeLog
deleted file mode 100644
index 25bfcd45680f..000000000000
--- a/contrib/binutils/ld/ChangeLog
+++ /dev/null
@@ -1,709 +0,0 @@
-2007-07-03 Matthias Klose <doko@ubuntu.com>
-
- * emultempl/spuelf.em (base_name): Correct backslash quoting.
-
-2007-07-02 Alan Modra <amodra@bigpond.net.au>
-
- * Makefile.in: Regenerate.
- * aclocal.m4: Regenerate.
- * config.in: Regenerate.
- * po/ld.pot: Regenerate.
-
-2007-06-30 H.J. Lu <hongjiu.lu@intel.com>
-
- * aclocal.m4: Regenerated.
- * Makefile.in: Likewise.
-
-2007-06-29 H.J. Lu <hongjiu.lu@intel.com>
-
- * NEWS: Remove a line with '*' only.
-
-2007-06-29 Joseph Myers <joseph@codesourcery.com>
-
- * emulparams/armelf.sh (OTHER_SECTIONS): Remove .ARM.attributes.
- (ATTRS_SECTIONS): Define.
- * scripttempl/elf.sc, scripttempl/elf32sh-symbian.sc,
- scripttempl/elf_chaos.sc, scripttempl/elfi370.sc,
- scripttempl/elfxtensa.sc: Handle ATTRS_SECTIONS.
-
-2006-06-29 M R Swami Reddy <MR.Swami.Reddy@nsc.com>
-
- * scripttemp/elf32cr16.sc: Default linker script.
- * emulparams/elf32cr16.sh: Emulation script.
- * emultempl/cr16elf.em: Emulation script.
- * Makefile.am: Add entry to make cr16 target.
- * Makefile.in: Regenerate.
- * configure.tgt: Specify default and other emulation parameters
- for cr16.
- * ChangeLog: Added CR16 target entry.
- * NEWS: Announce the support for the CR16 new target.
-
-2007-06-27 Alan Modra <amodra@bigpond.net.au>
-
- * pe-dll.c: Rename uses of bfd.next to bfd.archive_next throughout.
-
-2007-06-20 Alan Modra <amodra@bigpond.net.au>
-
- * emulparams/elf32_spu.sh (OTHER_SECTIONS): KEEP .note.spu_name.
-
-2007-06-18 Nathan Sidwell <nathan@codesourcery.com>
-
- * ldlex.l, ldgram.y: Add ALIGNOF.
- * ldexp.c (exp_print_token, foldname): Likewise.
- * ld.texinfo: Likewise.
-
-2007-06-18 Alan Modra <amodra@bigpond.net.au>
-
- * Makefile.am: Add eelf32_spu.o rule.
- * Makefile.in: Regenerate.
- * emultempl/spuelf.em: Revert last change. Instead use EMBEDSPU
- defined in Makefile for embedspu name.
-
-2007-06-18 Alan Modra <amodra@bigpond.net.au>
-
- * emultempl/spuelf.em (embedded_spu_file): Deduce embedspu program
- name prefix from that of ld.
-
-2007-06-14 H.J. Lu <hongjiu.lu@intel.com>
-
- * Makefile.am (ACLOCAL_AMFLAGS): Add -I ../config -I ../bfd.
-
- * acinclude.m4: Removed.
-
- * Makefile.in: Regenerated.
- * aclocal.m4: Likewise.
- * configure: Likewise.
-
-2007-06-14 Alan Modra <amodra@bigpond.net.au>
-
- * emultempl/spu_ovl.S: Don't trash lr on tail call from one
- overlay to another.
- * emultempl/spu_ovl.o: Regenerate.
-
-2007-06-11 Bob Wilson <bob.wilson@acm.org>
-
- * emulparams/elf32xtensa.sh (OTHER_READONLY_SECTIONS): Add ONLY_IF_RO
- for .xt_except_table.
- (OTHER_RELRO_SECTIONS): New.
-
-2007-06-11 Sterling Augustine <sterling@tensilica.com>
- Bob Wilson <bob.wilson@acm.org>
-
- * emultempl/xtensaelf.em (replace_insn_sec_with_prop_sec): Use renamed
- XTENSA_PROP_NO_TRANSFORM flag instead of XTENSA_PROP_INSN_NO_TRANSFORM.
-
-2007-06-01 Noah Misch <noah@cs.caltech.edu>
- Alan Modra <amodra@bigpond.net.au>
-
- * ldlang.c (ldlang_add_file): Use input_bfds_tail.
- * ldmain.c (main): Init input_bfds_tail. Sort link_info
- initialization.
-
-2007-05-29 Alan Modra <amodra@bigpond.net.au>
-
- * emultempl/spuelf.em (base_name): New function, split out from..
- (embedded_spu_file) ..here. Pass -fPIC or -fpie to embedspu
- invocation if we deduce a shared lib or position independent
- executable build by looking at ctrbegin* linker input files.
-
-2007-05-29 Alan Modra <amodra@bigpond.net.au>
-
- * emultempl/spu_ovl.S (__rv_pattern, __cg_pattern): Set symbol
- types and sizes.
- * emultempl/spu_ovl.o: Regenerate.
-
-2007-05-24 Steve Ellcey <sje@cup.hp.com>
-
- * Makefile.in: Regnerate.
- * configure: Regenerate.
- * aclocal.m4: Regenerate.
-
-2007-05-24 Nathan Sidwell <nathan@codesourcery.com>
-
- * ldlex.l: ASSERT is recognized in SCRIPT env. NAMES cannot
- contain commas in EXP env.
- * ldgram.y (extern_name_list): Push to EXP env, move body to ...
- (extern_name_list_body): ... here.
- (script_file, ifile_list): Reformat.
- (statement): Add ASSERT.
-
-2007-05-22 Nick Clifton <nickc@redhat.com>
-
- * ld.texinfo: Use @copying around the copyright notice.
- * ldint.texinfo: Likewise.
-
-2007-05-18 Richard Sandiford <richard@codesourcery.com>
-
- * emulparams/elf32ebmipvxworks.sh (OTHER_READONLY_SECTIONS)
- (OTHER_READWRITE_SECTIONS): Define. Add .rdata sections.
-
-2007-05-16 Richard Sandiford <richard@codesourcery.com>
-
- * configure.in: Allow sysroots to be relocated under $prefix as
- well as $exec_prefix.
- * configure: Regenerate.
-
-2007-05-14 Andreas Schwab <schwab@suse.de>
-
- * emultempl/ppc64elf.em (gld${EMULATION_NAME}_new_vers_pattern):
- Handle null pattern.
-
-2007-05-11 Alan Modra <amodra@bigpond.net.au>
-
- * emultempl/ppc32elf.em (plt_style): New variable.
- (old_plt): Delete.
- (ppc_after_open): Adjust ppc_elf_select_plt_layout call.
- (PARSE_AND_LIST_PROLOGUE): Define OPTION_NEW_PLT, renumber
- OPTION_OLD_PLT, OPTION_OLD_GOT and OPTION_STUBSYMS.
- (PARSE_AND_LIST_LONGOPTS, PARSE_AND_LIST_OPTIONS): Add secure-plt.
- (PARSE_AND_LIST_ARGS_CASES): Handle OPTION_NEW_PLT.
- * ld.texinfo (--secure-plt): Document.
-
-2007-05-08 Alan Modra <amodra@bigpond.net.au>
-
- * ld.h (args_type, ld_config_type): Reorder fields.
- * ldmain.c (main): Don't initialise a bunch of vars we know are
- zero already.
-
-2007-05-05 Anatoly Sokolov <aesok@post.ru>
-
- * multempl/avrelf.em (PARSE_AND_LIST_ARGS_CASES): Add new value for
- "--pmem-wrap-around".
- (PARSE_AND_LIST_OPTIONS): Describe new value for "--pmem-wrap-around".
-
-2007-05-03 Bob Wilson <bob.wilson@acm.org>
-
- * scripttempl/elfxtensa.sc: Merge changes from elf.sc.
-
-2007-05-03 Alan Modra <amodra@bigpond.net.au>
-
- * ld.texinfo (--no-warn-search-mismatch): Document.
- * ldfile.c (ldfile_try_open_bfd): Don't warn about skipping
- incompatible libraries if --no-warn-search-mismatch.
- * ld.h (args_type): Add warn_search_mismatch.
- * ldmain.c (main): Init it.
- * lexsup.c (enum option_values): Add OPTION_NO_WARN_SEARCH_MISMATCH.
- (ld_options): Add entry for --no-warn-search-mismatch.
- (parse_args): Handle OPTION_NO_WARN_SEARCH_MISMATCH.
-
-2007-05-03 Alan Modra <amodra@bigpond.net.au>
-
- * scripttempl/elf.sc: Add .debug_pubtypes and .debug_ranges.
-
-2007-05-01 Robert Millan <rmh@aybabtu.com>
-
- * ldlang.c (lang_check): Error on architecture mismatch.
-
-2007-04-30 Alan Modra <amodra@bigpond.net.au>
-
- * ldmain.c (link_callbacks): Init info and minfo fields.
- * ldmisc.c (minfo): Do nothing if no map file.
- * emultempl/spuelf.em (stack_analysis, emit_stack_syms): New vars.
- (spu_after_open): Adjust spu_elf_create_sections call.
- (spu_before_allocation): Likewise for spu_elf_size_stubs.
- (OPTION_SPU_STACK_ANALYSIS, OPTION_SPU_STACK_SYMS): Define.
- (PARSE_AND_LIST_LONGOPTS): Add new entries.
- (PARSE_AND_LIST_OPTIONS, PARSE_AND_LIST_ARGS_CASES): Likewise.
- * gen-doc.texi: Add @set for SPU and other missing targets.
- * ld.texinfo: Update man page selection to match gen-doc.texi.
- Document SPU features.
-
-2007-04-28 Alan Modra <amodra@bigpond.net.au>
-
- * ldcref.c (struct cref_hash_entry): Make "demangled" const.
- (cref_fill_array): Adjust for changed demangler.
- * ldlang.c (lang_one_common): Likewise.
-
-2007-04-27 Nathan Froyd <froydnj@codesourcery.com>
-
- * emulparams/elf32_sparc.sh: Update comments.
- * emulparams/elf32bmip.sh: Likewise.
- * emulparams/elf32ppc.sh: Likewise.
- * emulparams/vxworks.sh: Likewise.
-
-2007-04-27 Alan Modra <amodra@bigpond.net.au>
-
- Many files: Include sysdep.h first. Remove duplicate headers.
- * Makefile.am: Run "make dep-am".
- * Makefile.in: Regenerate.
-
-2007-04-24 Alan Modra <amodra@bigpond.net.au>
-
- * Makefile.in: Regenerate.
-
-2007-04-19 Alan Modra <amodra@bigpond.net.au>
-
- * ldcref.c (cref_fill_array): Call bfd_demangle rather than demangle.
- * ldlang.c (lang_one_common): Likewise.
- * ldmisc.c (vfinfo): Likewise.
- (demangle): Delete.
- * ldmisc.h (demangle): Delete.
- * Makefile.am: Run "make dep-am".
- * Makefile.in: Regenerate.
-
-2007-04-18 Alan Modra <amodra@bigpond.net.au>
-
- * ldlang.h (enum section_type): Add overlay_section.
- * ldlang.c (lang_add_section): Handle flags for overlay_section
- as per normal_section.
- (lang_size_sections_1): When setting lma, detect overlays by
- os->sectype rather than by looking for overlapping vmas.
- (lang_enter_overlay_section): Use overlay_section type.
- (lang_leave_overlay): Set first overlay section to normal.
-
-2007-04-14 Steve Ellcey <sje@cup.hp.com>
-
- * Makefile.am: Add ACLOCAL_AMFLAGS.
- * Makefile.in: Regenerate.
-
-2007-04-12 Bob Wilson <bob.wilson@acm.org>
-
- * emulparams/elf32xtensa.sh (OTHER_SECTIONS): KEEP property sections.
-
-2007-04-10 Richard Henderson <rth@redhat.com>
-
- * ldlang.c (relax_sections): Initialize and increment
- link_info.relax_trip.
-
-2007-04-04 Paul Brook <paul@codesourcery.com>
-
- * configure.tgt: Loosen checks for arm uclinux eabi targets.
-
-2007-04-02 H.J. Lu <hongjiu.lu@intel.com>
-
- PR ld/4090
- * ldexp.h (node_type): Add lineno.
- * ldexp.c: Include "ldlex.h".
- (exp_intop): Set the lineno field from lineno.
- (exp_bigintop): Likewise.
- (exp_relop): Likewise.
- (exp_nameop): Likewise.
- (exp_binop): Set the lineno field from lineno of lhs.
- (exp_trinop): Likewise.
- (exp_unop): Set the lineno field from lineno of child.
- (exp_assop): Set the lineno field from lineno of src.
- (exp_provide): Likewise.
- (exp_assert): Set the lineno field from lineno of exp.
- (exp_get_abs_int): Set lineno from lineno of nonconstant
- expression when report problem.
-
-2007-03-29 Richard Sandiford <richard@codesourcery.com>
- Daniel Jacobowitz <dan@codesourcery.com>
-
- * NEWS: Mention -l:foo.
- * ld.texinfo: Document it.
- * ldlang.c (new_afile): If a lang_input_file_is_l_enum
- entry as a name beginning with a coloh, convert it to a
- lang_input_file_is_search_file_enum entry without the colon.
-
-2007-03-28 Richard Sandiford <richard@codesourcery.com>
-
- * ld.h (ld_config_type): Add rpath_separator.
- * ldmain.c (main): Initialize it.
- * lexsup.c (parse_args): Honor config.rpath_separator.
- * emultempl/elf32.em (gld${EMULATION_NAME}_search_needed): Likewise.
- (gld${EMULATION_NAME}_add_sysroot): Likewise.
- (gld${EMULATION_NAME}_parse_ld_so_conf): Use config.rpath_separator
- rather than ':' when building the path.
- * emultempl/vxworks.em (vxworks_before_parse): New function.
- Override config.rpath_separator.
- (LDEMUL_AFTER_OPEN): Do not change if EXTRA_EM_FILE has been
- set to gld${EMULATION_NAME}_after_open; #define that identifier
- to vxworks_foo instead.
- (LDEMUL_BEFORE_PARSE): Override in the same way as LDEMUL_AFTER_OPEN.
-
-2007-03-28 Richard Sandiford <richard@codesourcery.com>
- Phil Edwards <phil@codesourcery.com>
-
- * ld.texinfo: Put the contents after the title page rather
- than at the end of the document.
-
-2007-03-26 Alan Modra <amodra@bigpond.net.au>
-
- * Makefile.am: Add dependency on ldemul-list.h for powerpc and
- spu target emul files.
- * configure.in: Check for mkstemp and waitpid.
- * Makefile.in: Regenerate.
- * configure: Regenerate.
- * config.in: Regenerate.
- * ldlang.c (input_file_chain): Make global.
- (lang_add_input_file): Don't set lang_has_input_file here.
- * ldlang.h (input_file_chain): Declare.
- * emultempl/ppc32elf.em (ppc_recognized_file): New function.
- (LDEMUL_RECOGNIZED_FILE): Define.
- * emultempl/ppc64elf.em (ppc64_recognized_file): New function.
- (LDEMUL_RECOGNIZED_FILE): Define.
- * emultempl/spuelf.em (struct tflist): New.
- (tmp_file_list): New var.
- (clean_tmp, embedded_spu_file): New functions.
-
-2007-03-24 Alan Modra <amodra@bigpond.net.au>
-
- * ldlang.c (lang_insert_orphan): Provide start/stop loadaddr syms
- rather than defining unconditionally.
- (lang_leave_overlay_section): Likewise.
- * ld.texinfo (Overlay Description): Update description and examples
- for start/stop syms.
-
-2007-03-22 Joseph Myers <joseph@codesourcery.com>
-
- * ld.texinfo: Include VERSION_PACKAGE when reporting version.
-
-2007-03-20 Paul Brook <paul@codesourcery.com>
-
- * emultempl/armelf.em (pic_veneer): New variable.
- (PARSE_AND_LIST_PROLOGUE): Add OPTION_PIC_VENEER.
- (PARSE_AND_LIST_ARGS_CASES): Ditto.
- (PARSE_AND_LIST_LONGOPTS): Add "pic-veneer".
- (PARSE_AND_LIST_OPTIONS): Ditto.
- * ld.texinfo: Document --pic-veneer.
-
-2007-03-18 Mark Shinwell <shinwell@codesourcery.com>
-
- * ld.texinfo: Document --no-enum-size-warning.
- * emultempl/armelf.em (no_enum_size_warning): New.
- (arm_elf_create_output_section_statements): Correct typo
- in comment. Pass no_enum_size_warning to
- bfd_elf32_arm_set_target_relocs.
- (PARSE_AND_LIST_PROLOGUE): Define OPTION_NO_ENUM_SIZE_WARNING.
- (PARSE_AND_LIST_OPTIONS): Document --no-enum-size-warning.
- (PARSE_AND_LIST_ARGS_CASES): Add OPTION_NO_ENUM_SIZE_WARNING
- case.
-
-2007-03-19 Bernd Schmidt <bernd.schmidt@analog.com>
-
- * configure.tgt (bfin-*-elf, bfin-*-uclinux*): Add targ_extra_libpath.
- (bfin-*-linux-uclibc*): New target.
-
-2007-03-16 Kai Tietz <Kai.Tietz@onevision.com>
-
- * pe-dll.c (make_one): Use pc-relative relocation instead of an
- absolute relocation for x86_64-pc-mingw32 target.
-
-2007-03-15 H.J. Lu <hongjiu.lu@intel.com>
-
- * Makefile.am (ld_TEXINFOS): Remove ldver.texi.
- (AM_MAKEINFOFLAGS): Add -I ../../bfd/doc.
- (TEXI2DVI): Likewise.
- (REPORT_BUGS_TO): Removed.
- (INCLUDES): Remove -DREPORT_BUGS_TO.
- (ldver.texi): Likewise.
- (ld.1): Don't depend on ldver.texi.
- (MOSTLYCLEANFILES): Remove ldver.texi.
- * Makefile.in: Regenerated.
-
- * configure.in (--with-bugurl): Removed.
- * configure: Regenerated.
-
- * lexsup.c: Include bfdver.h.
-
- * ld.texinfo: Include bfdver.texi instead of ldver.texi.
-
-2007-03-11 Hans-Peter Nilsson <hp@bitrange.com>
-
- * emultempl/mmixelf.em: Remove incorrect '#line' directive.
-
-2007-03-08 Alan Modra <amodra@bigpond.net.au>
-
- * ldlang.c (lang_size_sections_1): Correct backwards dot move
- test to not trigger on overlays. Only warn on backwards move
- if non-default lma.
-
-2007-03-07 Joseph Myers <joseph@codesourcery.com>
-
- * configure.in (REPORT_BUGS_TEXI): Define to Texinfo version of
- bug-reporting URL.
- * Makefile.am (ldver.texi): Define BUGURL.
- * ld.texinfo: Use BUGURL.
- * Makefile.in, configure: Regenerate.
-
-2007-03-07 Nick Clifton <nickc@redhat.com>
-
- PR ld/4023
- * emultempl/aix.em (..._before_allocation): Strip sysroot prefix
- from any paths being inserted into the output binary's DT_RPATH.
-
-2007-03-02 Nathan Sidwell <nathan@codesourcery.com>
-
- * emulparams/shelf_uclinux.sh: New. Missed in 2007-02-28 commit.
-
-2007-03-01 Joseph Myers <joseph@codesourcery.com>
-
- * ldver.c (ldversion): Remove word "version" from output. Update
- copyright date.
-
-2007-02-28 Nathan Sidwell <nathan@codesourcery.com>
-
- * Makefile.am (ALL_EMULATIONS): Add eshelf_uclinux.o
- (eshelf_uclinux.c): New target.
- * Makefile.in: Rebuilt.
- * configure.tgt (sh-*-uclinux* | sh[12]-*-uclinux*): New stanza.
- * emulparams/shelf_uclinux.sh: New.
-
-2007-02-28 Alan Modra <amodra@bigpond.net.au>
-
- * configure.tgt: Fix type last change.
- * configure.tgt (spu-*-elf*): Delete targ_extra_ofiles.
-
-2007-02-27 Alan Modra <amodra@bigpond.net.au>
-
- * Makefile.am (ALL_EMUL_EXTRA_OFILES): Remove spu_inc.o.
- (eelf32_spu.c): Adjust dependencies.
- * Makefile.in: Regenerate.
- * emultempl/spuelf.em (ovl_mgr): New array. Insert spu_ovl.o
- code using bin2c.
- (_binary_spu_ovl_o_start, _binary_spu_ovl_o_end): Delete.
- (ovl_mgr_stream): Update.
- * emultempl/spu_inc.s: Delete.
- * emultempl/spu_none.s: Delete.
-
-2007-02-26 Alan Modra <amodra@bigpond.net.au>
-
- * emultempl/spuelf.em (_binary_builtin_ovl_mgr_start): Rename
- to _binary_spu_ovl_o_start.
- (_binary_builtin_ovl_mgr_end): Rename to _binary_spu_ovl_o_end.
- (spu_elf_load_ovl_mgr): Fatal error on missing overlay manager.
- * emultempl/spu_inc.s: Rename symbols.
- * emultempl/spu_none.s: New file.
- * emultempl/spu_ovl.S: Update copyright.
- * Makefile.am (spu_inc.o): Try building with ld -r first, then
- gas incbin, then build without overlay manager.
- * Makefile.in: Regenerate.
-
-2007-02-22 Joseph Myers <joseph@codesourcery.com>
-
- * configure.tgt (mips64*el-*-linux-*, mips64*-*-linux-*,
- mips*el-*-linux-*, mips*-*-linux-*): Set
- targ_extra_libpath=$targ_extra_emuls.
-
-2007-02-21 Nick Clifton <nickc@redhat.com>
-
- * ldlang.c (ldlang_override_segment_assignment): New function.
- * ldlang.h (ldlang_override_segment_assignment): Prototype.
- * ldmain.c (link_callbacks): Add
- ldlang_override_segment_assignment.
-
-2007-02-20 Alan Modra <amodra@bigpond.net.au>
-
- * ldexp.c (fold_name <LOADADDR>): Ensure result is always absolute.
-
-2007-02-17 Mark Mitchell <mark@codesourcery.com>
- Nathan Sidwell <nathan@codesourcery.com>
- Vladimir Prus <vladimir@codesourcery.com
- Joseph Myers <joseph@codesourcery.com>
-
- * configure.in (--with-bugurl): New option.
- * configure: Regenerate.
- * Makefile.am (REPORT_BUGS_TO): Define.
- (INCLUDES): Define REPORT_BUGS_TO.
- Regenerate dependencies.
- * Makefile.in: Regenerate.
- * ld.h: Remove include of bin-bugs.h.
- * lexsup.c (help): Don't print empty REPORT_BUGS_TO.
-
-2007-02-17 Alan Modra <amodra@bigpond.net.au>
-
- * ldcref.c (check_reloc_refs): Compare section for local syms.
-
-2007-02-13 Alan Modra <amodra@bigpond.net.au>
-
- * emultempl/spu_ovl.S (__ovly_return, __ovly_load): Set sym size.
- (__ovly_load_event): Define.
- (size): Rename to osize.
- * emultempl/spu_ovl.o: Regenerate.
-
-2007-02-13 Alan Modra <amodra@bigpond.net.au>
-
- * emulparams/elf64ppc.sh (OTHER_READWRITE_SECTIONS): Add ".branch_lt".
- * emultempl/ppc64elf.em (ppc_add_stub_section): Create without
- SEC_RELOC flag set.
-
-2007-02-09 H.J. Lu <hongjiu.lu@intel.com>
-
- * configure.in (targ_extra_emuls): Add $targ64_extra_emuls if
- want64 is true.
- (targ_extra_libpath): Add $targ64_extra_libpath if want64 is
- true
- * configure: Regenerated.
-
- * configure.tgt (targ_extra_libpath): Initialize.
- (targ64_extra_emuls): New. Document. Initialize.
- (targ64_extra_libpath): Likewise.
- (i[3-7]86-*-linux-*): Set targ64_extra_emuls and
- targ64_extra_libpath.
- (powerpc*-*-linux*): Likewise.
- (s390-*-linux*): Likewise.
-
-2007-02-07 Paul Brook <paul@codesourcery.com>
-
- * configure.tgt: Add arm*-*-uclinux-*eabi.
-
-2007-02-06 H.J. Lu <hongjiu.lu@intel.com>
-
- * ldlang.c (lang_size_sections_1): Add a missing `)'.
-
-2007-02-06 Alan Modra <amodra@bigpond.net.au>
-
- PR ld/3966
- * ldlang.c (lang_size_sections_1): Don't warn on backwards dot
- move unless section size is non-zero.
-
-2007-02-05 Dave Brolley <brolley@redhat.com>
-
- * Makefile.am (ALL_EMULATIONS): Add support for Toshiba MeP.
- * configure.tgt: Likewise.
- * scripttempl/mep.sc: New file.
- * emulparams/elf32mep.sh: New file.
- * Makefile.in: Regenerate.
-
-2006-01-29 Julian Brown <julian@codesourcery.com>
-
- * NEWS: Mention --vfp11-denorm-fix option.
- * ld.texinfo: Document above.
- * emulparams/armelf_linux.sh (OTHER_TEXT_SECTIONS): Add
- .vfp11_veneer section.
- * emulparams/armelf.sh (OTHER_TEXT_SECTIONS): Likewise.
- * emultempl/armelf.em (vfp11_denorm_fix): New static variable.
- (arm_elf_before_allocation): Call bfd_elf32_arm_set_vfp11_fix,
- bfd_elf32_arm_init_maps and bfd_elf32_arm_vfp11_erratum_scan.
- (arm_elf_after_allocation): New function. Call
- bfd_elf32_arm_vfp11_fix_veneer_locations for all input statements.
- (arm_elf_create_output_section_statements): Pass vfp11 fix command
- line option to BFD.
- (OPTION_VFP11_DENORM_FIX): New option.
- (PARSE_AND_LIST_LONGOPTS): Handle new option.
- (PARSE_AND_LIST_OPTIONS): Likewise.
- (PARSE_AND_LIST_ARGS_CASES): Likewise.
- (LDEMUL_AFTER_ALLOCATION): Define.
-
-2007-01-24 H.J. Lu <hongjiu.lu@intel.com>
-
- * ldgram.y (SIZEOF_HEADERS): Remove duplicated one.
- (DEFSYMEND): Likewise.
- (NAME): Likewise.
- (LNAME): Likewise.
-
-2007-01-19 Murali Vemulapati <murali.vemulapati@gmail.com>
-
- * pe-dll.c: (make_one) Conditionally include jump stubs.
- * emultempl/pe.em (gld_${EMULATION_NAME}_after_open): Identify
- redundant jump stubs from import libraries and exclude them from
- link.
-
-2007-01-19 H.J. Lu <hongjiu.lu@intel.com>
-
- * ld.h (args_type): Add new symbolic and dynamic_list fields.
-
- * ld.texinfo: Update -Bsymbolic-functions.
-
- * ldmain.c (main): Initialize command_line.symbolic to
- symbolic_unset and command_line.dynamic_list to
- dynamic_list_unset. Check -Bsymbolic, -Bsymbolic-functions and
- --dynamic-list* before setting link_info.symbolic,
- link_info.dynamic and link_info.dynamic_data.
-
- * lexsup.c (option_values): Add OPTION_SYMBOLIC_FUNCTIONS.
- (ld_options): Use OPTION_SYMBOLIC_FUNCTIONS with
- -Bsymbolic-functions.
- (parse_args): Handle -Bsymbolic-functions. Don't set
- link_info.dynamic, link_info.dynamic_data and link_info.symbolic
- here. Set command_line.symbolic for -Bsymbolic. Set
- command_line.dynamic_list and command_line.symbolic for
- --dynamic-list-data, --dynamic-list-cpp-new,
- --dynamic-list-cpp-typeinfo and --dynamic-list.
-
-2007-01-19 Jakub Jelinek <jakub@redhat.com>
- H.J. Lu <hongjiu.lu@intel.com>
-
- * emultempl/elf32.em (handle_option): Make sure -z max-page-size
- or -z common-page-size argument is a power of 2. Call
- bfd_emul_set_maxpagesize and bfd_emul_set_commonpagesize.
-
-2007-01-19 H.J. Lu <hongjiu.lu@intel.com>
-
- * ldmain.c (main): Don't call bfd_emul_set_maxpagesize nor
- bfd_emul_set_commonpagesize.
-
-2007-01-19 H.J. Lu <hongjiu.lu@intel.com>
-
- * NEWS: Mention --default-script/-dT.
-
- * ld.h (args_type): Add a default_script field.
-
- * ld.texinfo: Document --default-script/-dT.
-
- * ldmain.c (main): Handle command_line.default_script.
-
- * lexsup.c (option_values): Add OPTION_DEFAULT_SCRIPT.
- (ld_options): Add entries for --default-script and -dT.
- (parse_args): Handle --default-script/-dT.
-
-2007-01-16 H.J. Lu <hongjiu.lu@intel.com>
-
- PR ld/3831
- * NEWS: Mention -Bsymbolic-functions, --dynamic-list-data and
- --dynamic-list-cpp-new.
-
- * ld.texinfo: Document -Bsymbolic-functions, --dynamic-list-data
- and --dynamic-list-cpp-new.
-
- * ldlang.c (lang_append_dynamic_list_cpp_new): New.
- (lang_process): Change link_info.dynamic to
- link_info.dynamic_list.
- (lang_append_dynamic_list): Likewise.
- * ldmain.c (main): Likewise. Initialize link_info.dynamic and
- link_info.dynamic_data to FALSE.
-
- * ldlang.h (lang_append_dynamic_list_cpp_new): New.
-
- * lexsup.c (option_values): Add OPTION_DYNAMIC_LIST_DATA and
- OPTION_DYNAMIC_LIST_CPP_NEW.
- (ld_options): Add entries for -Bsymbolic-functions,
- --dynamic-list-data and --dynamic-list-cpp-new. Make
- -Bsymbolic-functions an alias of --dynamic-list-data.
- (parse_args): Change link_info.dynamic to link_info.dynamic_list.
- Set link_info.dynamic to TRUE for --dynamic-list and
- --dynamic-list-cpp-typeinfo. Handle --dynamic-list-data and
- --dynamic-list-cpp-new.
-
-2007-01-11 Nathan Sidwell <nathan@codesourcery.com>
-
- * emultempl/elf-generic.em (gdl_map_segments): Only allow header
- shrinkage for the first few iterations.
-
-2007-01-08 Kai Tietz <kai.tietz@onevision.com>
-
- * configure.tgt: Renamed target x86_64-*-mingw64 to
- x86_64-*-mingw*.
-
-2007-01-08 Pedro Alves <pedro_alves@portugalmail.pt>
-
- * configure.host: Add i[3-7]86-*-mingw* case.
-
-2007-01-08 Nick Clifton <nickc@redhat.com>
-
- * pep-dll.h (pep_bfd_is_dll): Add prototype.
-
-2007-01-08 Aurelien Jarno <aurelien@aurel32.net>
-
- PR ld/3843
- * configure.tgt (x86_64_[k]freebsd*): Add targ_extra_libpath and
- tdir_elf_i386_fbsd.
-
-2007-01-06 Nathan Sidwell <nathan@codesourcery.com>
-
- * ldexp.c (fold_name): Issue error on undefined sections.
-
-2007-01-02 Alan Modra <amodra@bigpond.net.au>
-
- * pe-dll.c: Include pe-dll.h.
- * pep-dll.c (pe_bfd_is_dll): Define.
-
-For older changes see ChangeLog-2006
-
-Local Variables:
-mode: change-log
-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 9183afe56f16..000000000000
--- 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 ee5354dedf0f..000000000000
--- 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-2006 b/contrib/binutils/ld/ChangeLog-2006
deleted file mode 100644
index c28addf10bbb..000000000000
--- a/contrib/binutils/ld/ChangeLog-2006
+++ /dev/null
@@ -1,1364 +0,0 @@
-2006-12-23 Kazu Hirata <kazu@codesourcery.com>
-
- * configure.tgt: Recognize fido.
-
-2006-12-18 Pedro Alves <pedro_alves@portugalmail.pt>
-
- * pe-dll.c (pe_bfd_is_dll): New function.
- * pe-dll.h (pe_bfd_is_dll): Declare.
- * emultempl/pe.em (gld_${EMULATION_NAME}_recognized_file): Recognize
- dlls using pe_bfd_is_dll instead of using the filename extension.
-
-2006-12-15 Ulrich Weigand <uweigand@de.ibm.com>
-
- * configure.tgt (NATIVE_LIB_DIRS): Specify for spu-*-elf*.
-
-2006-12-12 Daniel Jacobowitz <dan@codesourcery.com>
-
- * Makefile.am (ld_TEXINFOS): Set.
- (ld.info ld.dvi ld.html): Delete rule.
- * Makefile.in: Regenerated.
-
-2006-12-12 Ina Pandit <inap@kpitcummins.com>
-
- * ldlang.c (print_output_section_statement): Print load address
- when lma differs from vma.
-
-2006-12-11 Daniel Jacobowitz <dan@codesourcery.com>
-
- * configure.in: Define GENINSRC_NEVER.
- * doc/Makefile.am (ld.info): Remove srcdir prefix.
- (MAINTAINERCLEANFILES): Add info file.
- (DISTCLEANFILES): Pretend to add info file.
- * po/Make-in (.po.gmo): Put gmo files in objdir.
- * configure, Makefile.in: Regenerated.
-
-2006-12-04 Jan Beulich <jbeulich@novell.com>
-
- * emultempl/elf32.em (gld${EMULATION_NAME}_after_open): Create
- .eh_frame_hdr section here.
-
-2006-11-27 Ian Lance Taylor <ian@airs.com>
-
- * Makefile.am (EXTRA_DIST): Put spu_ovl.o in the emultempl
- subdirectory.
- * Makefile.in: Regenerate.
-
-2006-11-27 Bob Wilson <bob.wilson@acm.org>
-
- * emultempl/xtensaelf.em (XSHAL_ABI): Add default definition.
- (replace_insn_sec_with_prop_sec): Use bfd_make_section_with_flags.
- Delete redundant code to set sections flags and alignment.
- (xt_config_info_unpack_and_check, check_xtensa_info): New.
- (elf_xtensa_after_open): Iterate over input statements instead of
- link_info.input_bfds.
- (elf_xtensa_before_allocation): Likewise. Call check_xtensa_info for
- each input, and write a new .xtensa.info section in the output.
-
-2006-11-22 Nick Clifton <nickc@redhat.com>
-
- * configure.in (LINGUAS): Add ga.
- * po/ga.po: New Irish translation.
-
-2006-11-20 H.J. Lu <hongjiu.lu@intel.com>
-
- * ld.texinfo: Fix a typo.
-
-2006-11-20 Alan Modra <amodra@bigpond.net.au>
-
- * emulparams/elf32_spu.sh (OTHER_SECTIONS): Define.
-
-2006-11-13 Daniel Jacobowitz <dan@codesourcery.com>
-
- * emultempl/armelf.em (arm_elf_before_allocation): Only call
- bfd_elf32_arm_process_before_allocation if no dynamic sections.
-
-2006-11-08 Alan Modra <amodra@bigpond.net.au>
-
- * emultempl/elf32.em (gld*_before_allocation): Adjust output section
- size for warning sections.
-
-2006-11-06 Vladimir Prus <vladimir@codesourcery.com>
-
- * emultempl/elf32.em (gld*_before_allocation): Don't prepend
- "warning" to the message.
-
-2006-10-31 Pedro Alves <pedro_alves@portugalmail.pt>
-
- * pe-dll.c (autofilter_entry_type): Change name to const.
- (pe_details_type) : Change target_name, object_target and
- autofilter_symbollist to const.
- (autofilter_symbollist_generic): Change to const.
- (autofilter_symbollist_i386, pe_detail_list, pe_details,
- autofilter_liblist, autofilter_objlist autofilter_symbolprefixlist,
- autofilter_symbolsuffixlist): Likewise.
- (is_import): Fix indentation.
- (auto_export): Change afptr to const. Move name declaration to
- beginning of scope.
- (make_tail): Clear undefined byte.
- (jmp_ix86_bytes, jmp_sh_bytes, jmp_mips_bytes, jmp_arm_bytes): Change
- to const.
- (make_one): Change jmp_bytes to const. Make idata$6 member size
- arithmetic explicit and add comment.
-
-2006-10-30 H.J. Lu <hongjiu.lu@intel.com>
-
- PR ld/3111
- * ld.h (args_type): Remove reduce_memory_overheads.
-
- * ldlang.c (lang_map): Updated.
- (section_already_linked): Likewise.
- (print_input_section): Likewise.
- * ldmain.c (main): Likewise.
- * lexsup.c (parse_args): Likewise.
-
-2006-10-29 Pedro Alves <pedro_alves@portugalmail.pt>
-
- * pe-dll.c (make_singleton_name_thunk): Re-add the NULL terminator.
-
-2006-10-27 Alan Modra <amodra@bigpond.net.au>
-
- * ldlang.c (lang_map): Don't say SEC_LINKER_CREATED and SEC_KEEP
- sections have been discarded.
- (lang_do_version_exports_section): Set SEC_KEEP on export section.
- * emultempl/elf32.em (before_allocation): Set SEC_KEEP on warning
- sections.
-
-2006-10-26 Joseph S. Myers <joseph@codesourcery.com>
- Mark Mitchell <mark@codesourcery.com>
-
- * configure.tgt (arm*linux*): Support both big- and little-endian.
-
-2006-10-25 H.J. Lu <hongjiu.lu@intel.com>
-
- * emulparams/hppa64linux.sh (LARGE_SECTIONS): Renamed to ...
- (OTHER_BSS_SECTIONS): This.
- * scripttempl/elf.sc (OTHER_BSS_SECTIONS): Support LARGE_SECTIONS.
- (LARGE_SECTIONS): Move .lbss sections to OTHER_BSS_SECTIONS.
-
-2006-10-25 Alan Modra <amodra@bigpond.net.au>
- Trevor Smigiel <Trevor_Smigiel@playstation.sony.com>
- Yukishige Shibata <shibata@rd.scei.sony.co.jp>
- Nobuhisa Fujinami <fnami@rd.scei.sony.co.jp>
- Takeaki Fukuoka <fukuoka@rd.scei.sony.co.jp>
-
- * emulparams/elf32_spu.sh: New file.
- * emultempl/spu_inc.s: New file.
- * emultempl/spu_ovl.S: New file.
- * emultempl/spu_ovl.o: New file.
- * emultempl/spuelf.em: New file.
- * Makefile.am: Add SPU support.
- * configure.tgt: Likewise.
- * ldlang.c (load_symbols): Make global.
- * ldlang.h (load_symbols): Declare.
- * scripttempl/elf.sc (OTHER_BSS_SECTIONS): Add.
- * Makefile.in: Regenerate.
-
-2006-10-24 Ben Elliston <bje@au.ibm.com>
-
- * lexsup.c (parse_args): Add a comment noting a fall-through.
-
-2006-10-24 H.J. Lu <hongjiu.lu@intel.com>
-
- * configure.in (AC_CHECK_HEADERS): Add limits.h and sys/param.h.
- * configure: Regenerated.
- * config.in: Likewise.
-
-2006-10-23 Alan Modra <amodra@bigpond.net.au>
-
- * emulparams/h8300elf.sh (TINY_DATA_SECTION, TINY_BSS_SECTION): Don't
- set section address on a relocatable link.
-
- * ld.texinfo (Output Section Discarding): Fix xref.
-
-2006-10-21 Kaz Kojima <kkojima@rr.iij4u.or.jp>
-
- * emulparams/shelf32.sh: Set default stack to 0x80000.
- * emulparams/shelf64.sh: Likewise.
-
-2006-10-20 Richard Sandiford <richard@codesourcery.com>
-
- * emulparams/elf32bmip.sh (OTHER_GOT_RELOC_SECTIONS): Define.
- * emulparams/elf32bmipn32-defs.sh (OTHER_GOT_RELOC_SECTIONS): Likewise.
-
-2006-10-19 Alan Modra <amodra@bigpond.net.au>
-
- * emultempl/armelf.em (arm_elf_before_allocation): Run
- gld${EMULATION_NAME}_before_allocation later.
- * ldlang.c (lang_size_sections_1): Revert 2006-09-15 change.
-
-2006-10-18 Roy Marples <uberlord@gentoo.org>
-
- * emulparams/elf64_sparc_fbsd.sh (OUTPUT_FORMAT): Define as
- elf64-sparc-freebsd.
-
-2006-10-18 Joseph Myers <joseph@codesourcery.com>
-
- * configure.tgt (i[3-7]86-*-linux-*): Also define
- targ_extra_libpath in want64 case.
- * emulparams/elf_x86_64.sh: Handle i[3-7]86-*-linux-* the same as
- x86_64*-linux*.
-
-2006-10-17 Alan Modra <amodra@bigpond.net.au>
-
- * scripttempl/elf.sc (INTERP): Delete. Move definition to..
- (INITIAL_READONLY_SECTIONS): ..here.
- * emulparams/criself.sh (INITIAL_READONLY_SECTIONS): Include .interp.
- * emulparams/elf32bmip.sh (INITIAL_READONLY_SECTIONS): Ditto.
- * emulparams/elf32bmipn32-defs.sh (INITIAL_READONLY_SECTIONS): Ditto.
-
-2006-10-17 Alan Modra <amodra@bigpond.net.au>
-
- * ldlang.c (strip_excluded_output_sections): Do strip sections
- that define syms, but don't ignore them.
- * ld.texinfo (Output Section Discarding): Revise.
- * emultempl/armcoff.em (gld${EMULATION_NAME}_finish): Always call
- finish_default.
-
-2006-10-16 Richard Sandiford <richard@codesourcery.com>
-
- * Makefile.am (eelf64bmip.c): Depend on emulparams/elf64bmip-defs.sh.
- (eelf64btsmip.c, eelf64ltsmip.c): Likewise.
- * Makefile.in: Regenerate.
- * emulparams/elf32bmipn32-defs.sh (INITIAL_READONLY_SECTIONS): Include
- .reginfo rather than .MIPS.options.
- * emulparams/elf64bmip-defs.sh: New file.
- * emulparams/elf64bmip.sh: Include it.
- (COMMONPAGESIZE): Delete.
- * emulparams/elf64btsmip.sh: As for elf64bmip.sh.
-
-2006-10-12 Bob Wilson <bob.wilson@acm.org>
-
- * emultempl/xtensaelf.em (is_inconsistent_linkonce_section): Check
- for linkonce XCC exception tables (".e" and ".h").
-
-2006-10-11 Bob Wilson <bob.wilson@acm.org>
-
- * emulparams/elf32xtensa.sh (TEXT_PLT): Enable.
- (OTHER_READONLY_SECTIONS): Add linkonce .xt_except_table sections.
- (OTHER_READWRITE_SECTIONS): Add linkonce .xt_except_desc sections.
- (OTHER_SDATA_SECTIONS): New.
- * scripttempl/elfxtensa.sc: Import changes from elf.sc.
-
-2006-10-11 Jakub Jelinek <jakub@redhat.com>
-
- * ldlang.c (lang_append_dynamic_list): When appending, add all elements
- of the dynamic list rather than just the first entry.
-
-2006-10-10 Bob Wilson <bob.wilson@acm.org>
-
- * emulparams/elf32xtensa.sh (GENERATE_PIE_SCRIPT): Enable.
-
-2006-10-06 Mike Frysinger <vapier@gentoo.org>
-
- * genscripts.sh: Respect LIBPATH_SUFFIX when not using sysroot.
-
-2006-10-04 Bob Wilson <bob.wilson@acm.org>
-
- * emulparams/xtensa-config.sh: Delete file.
- * emulparams/elf32xtensa.sh: Set MAXPAGESIZE here instead of including
- xtensa-config.sh.
- * Makefile.am (eelf32xtensa.c): Remove dependency on xtensa-config.sh.
- * Makefile.in: Regenerate.
-
-2006-10-03 Pedro Alves <pedro_alves@portugalmail.pt>
-
- * pe-dll.c : Fix typo.
- (autofilter_symbolprefixlist) : Remove __imp_.
- (is_import) : New.
- (auto-export) : Remove re-import check. Moved to callers.
- (process_def_file) : Check is symbol is an import. Always
- underscore __imp_.
- Only skip underscore on underscored targets.
- (make_one) : Always underscore __imp_.
- (pe_create_runtime_relocator_reference) : Only underscore
- _pei386_runtime_relocator on underscored targets.
- (pe_process_import_defs) : Always underscore __imp_.
- * pe.em (U) : New macro.
- (set_pe_subsystem) : Remove underscore from _WinMainCRTStartup
- on wince subsystem case.
- (pe_find_data_imports) : Use U on "_head_".
- (gld_${EMULATION_NAME}_unrecognized_file) : Use U.
-
-2006-09-26 H.J. Lu <hongjiu.lu@intel.com>
-
- PR ld/3223
- PR ld/3267
- * ld.texinfo: Updated Output Section Discarding.
-
- * ldlang.h (lang_output_section_statement_type): Add
- section_relative_symbol.
- * ldlang.c (strip_excluded_output_sections): Don't strip a
- section with a symbol relative to it.
- (lang_size_sections_1): Mark if an output section has a symbol
- symbol relative to it.
-
-2006-09-25 Bob Wilson <bob.wilson@acm.org>
-
- * ld.texinfo (Options): Update description of local symbols for -X.
-
-2006-09-23 H.J. Lu <hongjiu.lu@intel.com>
-
- PR ld/3249
- * scripttempl/elf.sc: Don't combine .gnu.linkonce.d.*personality*
- and .gnu.linkonce.wi.* sections with .data and .debug_info for
- relocatable link.
-
-2006-09-20 Kai Tietz <Kai.Tietz@onevision.com>
-
- * configure.in: Add new target x86_64-pc-mingw64.
- * configure: Regenerate.
- * configure.tgt: Add definition of target emulation i386pep.
- * Makefile.am: Add new target files for target-all.
- * Makefile.in: Regenerate.
- * pe-dll.c: Adjust to be inheritable by pep_dll.c as include.
- Fix memory out of bounds excess for idata relocation section data.
- * pep-dll.c: Add target specific shared object handling.
- * pep-dll.h: Add target specific definitions for shared object handling.
- * emulparams/i386pep.sh: Add new emulation params for target x86_64 coff.
- * emultempl/pep.em: Add new emulation file for target x86_64 coff.
- * po/POTFILES.in: Regenerate.
- * scripttempl/pep.sc: Add linker script template for target x86_64 coff.
- * NEWS: Mention new target.
-
-2006-09-18 Thiemo Seufer <ths@networkno.de>
-
- * configure.tgt: Add mips*el-sde-elf* and mips*-sde-elf*
- configurations.
-
-2006-09-17 Mei Ligang <ligang@sunnorth.com.cn>
-
- * emulparams/scoreelf.sh: New file.
- * emultempl/scoreelf.em: New file.
- * Makefile.am: Add Score files.
- * Makefile.in: Regenerate.
- * configure.tgt: Add Score target.
- * NEWS: Mention new target support.
-
-2006-09-16 Nick Clifton <nickc@redhat.com>
- Pedro Alves <pedro_alves@portugalmail.pt>
-
- * ldctor.c: Make use of new STRING_COMMA_LEN and CONST_STRNEQ
- macros defined in bfd.h.
- * ldmain.c: Likewise.
- * ldwrite.c: Likewise.
- * lexsup.c: Likewise.
- * pe-dll.c: Likewise.
- * emultempl/aix.em: Likewise.
- * emultempl/beos.em: Likewise.
- * emultempl/elf32.em: Likewise.
- * emultempl/pe.em: Likewise.
- * emultempl/sunos.em: Likewise.
- * emultempl/xtensaelf.em: Likewise.
-
-2006-09-15 Nick Clifton <nickc@redhat.com>
-
- PR ld/3107
- * ldlang.c (lang_size_sections_1): Do not abort when encountering
- a non-empty section that is ignored. Instead produce a warning
- message.
-
-2006-09-08 H.J. Lu <hongjiu.lu@intel.com>
-
- * ld.texinfo: Document --dynamic-list-cpp-typeinfo.
-
-2006-09-07 H.J. Lu <hongjiu.lu@intel.com>
-
- * Makefile.am (CXX): Set to g++.
- (CXX_FOR_TARGET): Likewise.
- * Makefile.in: Regenerated.
-
- * NEWS: Mention --dynamic-list.
-
- * ld.texinfo: Document --dynamic-list.
-
- * ldgram.y: Support dynamic list.
-
- * ldlang.c (lang_process): Call lang_finalize_version_expr_head
- on link_info.dynamic if needed.
- (lang_append_dynamic_list): New.
- (lang_append_dynamic_list_cpp_typeinfo): New.
- * ldlang.h (lang_append_dynamic_list): Likewise.
- * ldlang.h (lang_append_dynamic_list_cpp_typeinfo): Likewise.
-
- * ldlex.h (input_enum): Add input_dynamic_list.
- * ldlex.l: Handle it.
-
- * ldmain.c (main): Initialize link_info.dynamic.
-
- * lexsup.c (option_values): Add OPTION_DYNAMIC_LIST and
- OPTION_DYNAMIC_LIST_CPP_TYPEINFO.
- (ld_options): Add entries for OPTION_DYNAMIC_LIST and
- OPTION_DYNAMIC_LIST_CPP_TYPEINFO.
- (parse_args): Handle OPTION_DYNAMIC_LIST and
- OPTION_DYNAMIC_LIST_CPP_TYPEINFO.
-
-2006-09-07 Joel Sherrill <joel.sherrill@oarcorp.com>
-
- * emulparams/h8300elf.sh: _tinydata should not be placed in
- relocatables.
- * emulparams/h8300.sh: Likewise.
- * emulparams/h8300sxelf.sh: Likewise.
-
-2006-09-05 H.J. Lu <hongjiu.lu@intel.com>
-
- PR ld/3015
- * emultempl/elf32.em: Enable "-z relro" only if $COMMONPAGESIZE
- is defined.
-
-2006-08-29 Nathan Sidwell <nathan@codesourcery.com>
-
- * ldlang.c (walk_wild): Allow * to glob '/' in wildcarded match.
-
-2006-08-28 Alan Modra <amodra@bigpond.net.au>
-
- * scripttempl/elf.sc: Ensure that crtbegin and crtend entries will
- not match random object files in a path containing "crtbegin" or
- "crtend" as part of a directory name.
- * scripttempl/armbpabi.sc: Likewise.
- * scripttempl/crisaout.sc: Likewise.
- * scripttempl/elf32crx.sc: Likewise.
- * scripttempl/elf32sh-symbian.sc: Likewise.
- * scripttempl/elf_chaos.sc: Likewise.
- * scripttempl/elfd10v.sc: Likewise.
- * scripttempl/elfd30v.sc: Likewise.
- * scripttempl/elfxtensa.sc: Likewise.
- * scripttempl/iq2000.sc: Likewise.
- * scripttempl/mmo.sc: Likewise.
- * scripttempl/xstormy16.sc: Likewise.
-
-2006-08-24 Bob Wilson <bob.wilson@acm.org>
-
- * emulparams/elf32xtensa.sh (.xt.prop): Add .xt.prop.*.
- * scripttempl/elfxtensa.sc (.text): Add .literal.*.
-
-2006-08-24 Pedro Alves <pedro_alves@portugalmail.pt>
-
- * ldlang.c (lang_size_sections_1, lang_assignment_statement_enum):
- Adjust the current address of DEFAULT_MEMORY_REGION even
- when dot hasn't changed.
-
-2006-08-23 Alan Modra <amodra@bigpond.net.au>
-
- * ldexp.c (fold_name <LOADADDR>): Return an absolute value
- rather than a section relative value.
-
-2006-08-22 Alan Modra <amodra@bigpond.net.au>
-
- * NEWS: Mention LMA default change.
- * ld.texinfo (Output Section LMA): Update default description.
- (Location Counter): Clarify backward movement.
- * ldlang.c (lang_size_sections_1): Leave non-alloc sections with
- default lma equal to vma. Warn on backward movement of dot.
-
-2006-08-22 Pedro Alves <pedro_alves@portugalmail.pt>
-
- * configure.tgt: Set targ_emul to arm_wince_pe for ARM
- Windows CE targets.
-
-2006-08-22 Pedro Alves <pedro_alves@portugalmail.pt>
-
- * Makefile.am: Split arm-wince into its own emulation.
- * Makefile.in: Regenerate.
- * pe-dll.c : Define PE_ARCH_arm_wince.
- (pe_detail_list): Add PE_ARCH_arm_wince case.
- (make_one): Handle PE_ARCH_arm_epoc and PE_ARCH_arm_wince cases.
- * emulparams/arm_wince_pe.sh: New file.
- * emultempl/pe.em: Handle new TARGET_IS_arm_wince_pe define.
- Remap bfd_arm_allocate_interworking_sections,
- bfd_arm_get_bfd_for_interworking and
- bfd_arm_process_before_allocation for arm-pe and arm-wince-pe
- targets too.
- (gld_${EMULATION_NAME}_recognized_file): Handle arm-wince and
- arm-epoc bfd format names.
-
-2006-08-18 Paul Brook <paul@codesourcery.com>
-
- * emultempl/armelf.em (arm_elf_before_allocation): Call
- gld${EMULATION_NAME}_before_allocation after setting interworking bfd.
-
-2006-08-17 Pedro Alves <pedro_alves@portugalmail.pt>
-
- * pe-dll.c (autofilter_symbolprefixlist): Remove .idata$.
- (generate_reloc): Revert to skipping sections without a SEC_LOAD flag,
- and to not skipping .idata* sections.
-
-2006-08-16 Alan Modra <amodra@bigpond.net.au>
-
- PR 3052
- * ldlang.h (lang_output_section_statement_type): Replace
- "processed" field with "processed_vma" and "processed_lma".
- * ldlang.c (lang_do_assignments_1): Move lma setting code..
- (lang_size_sections_1): ..to here.
- (lang_reset_memory_regions): Adjust for
- lang_output_section_statement_type change.
- * ldexp.c (fold_name): Likewise.
-
-2006-08-08 Peter S. Mazinger <ps.m@gmx.net>
-
- * emulparams/armelf.sh (MAXPAGESIZE): Changed to
- "CONSTANT (MAXPAGESIZE)".
-
-2006-08-08 H.J. Lu <hongjiu.lu@intel.com>
-
- PR ld/3006
- * ldlang.c (lang_section_bst_type): Moved to ...
- * ldlang.h: Here.
-
- * ldlang.h (lang_wild_statement_struct): Add a tree field.
-
- * ldlang.c (wild_sort_fast): Use the tree field for BST.
- (wild): Likeise.
- (analyze_walk_wild_section_handler): Initialize the tree field.
-
-2006-08-08 H.J. Lu <hongjiu.lu@intel.com>
-
- PR ld/3009
- * ldlang.c (update_wild_statements): Update the whole wild
- section list.
-
-2006-08-04 Nick Clifton <nickc@redhat.com>
- Mike Frysinger <michael.frysinger@analog.com>
-
- * scripttempl/elf.sc (USER_LABEL_PREFIX): Define.
- (__preinit_array_start, __preinit_array_end, __init_array_start,
- __init_array_end, __fini_array_start, __fini_array_end, edata, end):
- Use ${USER_LABEL_PREFIX}.
- * emulparams/bfin.sh (DATA_END_SYMBOLS,END_SYMBOLS): Unset.
- (USER_LABEL_PREFIX): Set.
-
-2006-08-04 Marcelo Tosatti <marcelo@kvack.org>
-
- * ldmain.c (main): Initialise print_gc_sections field of link_info
- structure.
- * lexsup.c: Add --print-gc-sections and --no-print-gc-sections
- switches.
- * ld.texinfo: Document new switches.
- * NEWS: Mention new switches.
-
-2006-08-04 Richard Sandiford <richard@codesourcery.com>
- Kazu Hirata <kazu@codesourcery.com>
- Phil Edwards <phil@codesourcery.com>
-
- * Makefile.am (ALL_EMULATIONS): Add eshelf_vxworks.o and
- eshlelf_vxworks.o.
- (eshelf_vxworks.c, eshlelf_vxworks.c): New rules.
- * Makefile.in: Regenerate.
- * configure.tgt (sh-*-vxworks): Use shelf_vxworks and
- shlelf_vxworks.
- * emulparams/shelf_vxworks.sh: New file.
- * emulparams/shlelf_vxworks.sh: Likewise.
- * emulparams/vxworks.sh (FINI): Prefix _etext with ${SYMPREFIX}.
- (OTHER_END_SYMBOLS): Likewise _ehdr.
- (DATA_END_SYMBOLS): Likewise _edata.
- * emultempl/vxworks.em (vxworks_after_open): Check whether output_bfd
- is indeed an ELF file before dealing with --force-dynamic.
-
-2006-08-02 Petr Salinger <Petr.Salinger@seznam.cz>
-
- PR binutils/2983
- * emulparams/elf_x86_64_fbsd.sh (OUTPUT_FORMAT): Define as
- elf64-x86-64-freebsd.
-
-2006-08-01 H.J. Lu <hongjiu.lu@intel.com>
-
- * ldlang.c (init_os): Add flags. Replace bfd_make_section with
- bfd_make_section_with_flags.
- (exp_init_os): Updated.
- (lang_add_section): Call init_os with flags.
- (map_input_to_output_sections): Likewise.
-
-2006-07-29 Richard Sandiford <richard@codesourcery.com>
-
- * Makefile.am (eelf32b4300.c): Update dependencies.
- (eelf32bmip.c): Likewise.
- (eelf32bsmip.c): Likewise.
- (eelf32btsmip.c): Likewise.
- (eelf32btsmipn32.c): Likewise.
- (eelf32ltsmip.c): Likewise.
- (eelf32ltsmipn32.c): Likewise.
- (eelf32ebmip.c): Likewise.
- (eelf32ebmipvxworks.c): Likewise.
- (eelf32elmip.c): Likewise.
- (eelf32elmipvxworks.c): Likewise.
- (eelf32bmipn32.c): Likewise.
- (eelf32lmip.c): Likewise.
- (eelf32mipswindiss.c): Likewise.
- (eelf32lsmip.c): Likewise.
- (eelf64bmip.c): Likewise.
- (eelf64btsmip.c): Likewise.
- (eelf64ltsmip.c): Likewise.
- (emipsbig.c): Likewise. Canonicalize ${GENSCRIPTS} line.
- (emipsbsd.c): Likewise.
- (emipsidt.c): Update dependencies.
- (emipsidtl.c): Likewise.
- (emipslit.c): Likewise.
- (emipslnews.c): Likewise.
- (emipspe.c): Likewise. Fix ${GENSCRIPTS} invocation.
- * Makefile.in: Regenerate.
- * emulparams/elf32bmip.sh (EXTRA_EM_FILE): Define.
- * emulparams/elf32bmipn32-defs.sh (EXTRA_EM_FILE): Likewise.
- * emultempl/irix.em: Include emultempl/mipself.em.
- * emultempl/mipself.em: New file.
-
-2006-07-26 Alan Modra <amodra@bigpond.net.au>
-
- * emultempl/elf-generic.em (map_segments): Reorganise loop so that
- layout happens before segment map. Don't do segment map on
- relocatable link.
-
-2006-07-26 Alan Modra <amodra@bigpond.net.au>
-
- * ldexp.c (fold_name <LOADADDR>): Use the lma.
- * ldlang.h (lang_memory_region_type): Delete old_length. Add
- last_os.
- * ldlang.c (lang_memory_region_lookup): Init new field.
- (lang_reset_memory_regions): Reset new field.
- (lang_insert_orphan): Don't set load_base.
- (lang_leave_overlay): Likewise.
- (lang_size_sections_1): Delete unnecessary code setting lma_region
- to region. Correct lma region check.
- (lang_do_assignments_1): Rename output_section_statement parm
- to current_os. Set lma from previous section in region.
-
- * ldlang.c: Formatting.
-
-2006-07-25 Bob Wilson <bob.wilson@acm.org>
-
- * emultempl/xtensaelf.em (xtensa_strip_inconsistent_linkonce_sections):
- Set discarded section's output_section to bfd_abs_section_ptr.
-
-2006-07-26 Alan Modra <amodra@bigpond.net.au>
-
- * ldlang.c (analyze_walk_wild_section_handler): Init handler_data
- earlier.
-
-2006-07-24 Bob Wilson <bob.wilson@acm.org>
-
- * emultempl/xtensaelf.em (is_inconsistent_linkonce_section): Add space
- in dep_sec_name for null terminator. Make sure dep_sec_name has a
- ".t" linkonce tag.
-
-2006-07-14 Michael Wetherell <mike.wetherell@ntlworld.com>
-
- * emulparams/elf_x86_64.sh (LIBPATH_SUFFIX, ELF_INTERPRETER_NAME):
- Set for *-*-solaris2*.
-
-2006-07-24 Ralk Wildenhues <Ralf.Wildenhues@gmx.de>
-
- * ld.texinfo: Fix spelling mistakes.
- * ldint.texinfo: Likewise.
-
-2006-07-23 Sonal Santan <sonal.santan@xilinx.com>
-
- * ldlang.c (lang_section_bst): New structure for sorting sections
- by name.
- (wild_sort_fast): New function: Insert a section into a binary
- search tree.
- (output_section_callback_fast): New function: Store a section in
- BST.
- (output_section_callback_tree_to_list): New function: Convert a
- BST into a list.
- (analyze_walk_wild_section_handler): Initialize handler_data
- elements.
- (wild): If the data is sorted by name use the BST method to sort
- the names.
-
-2006-07-19 Alan Modra <amodra@bigpond.net.au>
-
- * ld.h (handle_asneeded_cref): Declare.
- * ldcref.c: Include objalloc.h.
- (old_table, old_count, old_tab, alloc_mark): New variables.
- (tabsize, entsize, refsize, old_symcount): Likewise.
- (add_cref): Use bfd_hash_allocate for refs.
- (handle_asneeded_cref): New function.
- * ldmain.c (notice): Call handle_asneeded_cref for NULL name.
-
-2006-07-14 Michael Wetherell <mike.wetherell@ntlworld.com>
-
- * configure.tgt (i[3-7]86-*-solaris2*, i[3-7]86-*-solaris*): Correct
- typo setting targ_extra_libpath.
-
-2006-07-10 Jakub Jelinek <jakub@redhat.com>
-
- * scripttempl/elf.sc: Add .gnu.hash section.
- * emultempl/elf32.em (OPTION_HASH_STYLE): Define.
- (gld${EMULATION_NAME}_add_options): Register --hash-style option.
- (gld${EMULATION_NAME}_handle_option): Handle it.
- (gld${EMULATION_NAME}_list_options): Document it.
- * ldmain.c (main): Initialize emit_hash and emit_gnu_hash.
- * ld.texinfo: Document --hash-style option.
-
-2006-07-10 Nick Clifton <nickc@redhat.com>
-
- * po/zh_TW.po: New Chinese (traditional) translation.
- * configure.in (ALL_LINGUAS): Add zh_TW.
- * configure: Regenerate.
-
-2006-07-07 Nick Clifton <nickc@redhat.com>
-
- PR ld/2874
- * ld.texinfo: Remove "Using LD" from the title since it is
- redundant.
-
-2006-07-06 Mohammed Adnène Trojette <adn@diwi.org>
-
- PR ld/2877
- * ld.texinfo: Fix spelling mistakes.
-
-2006-06-27 Pedro Alves <pedro_alves@portugalmail.pt>
- Nick Clifton <nickc@redhat.com>
-
- * emultempl/pe.em (gld_$_open_dynamic_archive): Compute maximum
- length of format strings in the libname_fmt[] array, rather than
- relying upon a statically chosen value. Adjust xmalloc call to
- use this longest length.
-
-2006-06-27 Nick Clifton <nickc@redhat.com>
-
- * ld.texinfo (-rpath-link): Clarify distinction between -rpath and
- -rpath-link.
-
-2006-06-23 Daniel Jacobowitz <dan@codesourcery.com>
-
- * configure.tgt (i[3-7]86-*-solaris2*, i[3-7]86-*-solaris*): Set
- targ_extra_libpath.
-
-2006-06-23 Pedro Alves <pedro_alves@portugalmail.pt>
-
- * pe-dll.c (pe_details_type): Add new pointer for symbols list
- autofilter.
- (autofilter_symbollist): Split into autofilter_symbollist_generic
- and autofilter_symbollist_i386.
- (pe_detail_list): Add autofilter_symbollist_i386 to i386 case and
- autofilter_symbollist_generic for all the others.
- (autofilter_symbolprefixlist): Moved _fmode, _impure_ptr, cygwin_attach_dll,
- cygwin_premain0, cygwin_premain1, cygwin_premain2, cygwin_premain3, environ,
- into autofilter_symbollist_i386.
- (auto_export): Get autofilter_symbollist from pe_details.
-
-2006-06-22 Nick Clifton <nickc@redhat.com>
-
- PR ld/2757
- * emultempl/pe.em (gld_$_after_open): When reporting non PE format
- output files mention the file name and the fact that it is an
- output file.
-
-2006-06-22 Danny Smith <dannysmith@users.sourceforge.net>
-
- * emultempl/pe.em (gld_${EMULATION_NAME}_open_dynamic_archive):
- Restructure. Add native "%s.lib" format to search list
- * ld.texinfo (node WIN32): Update documentation on dynamic lib
- search order. Add another reason for using import libs.
-
-2006-06-21 Mark Shinwell <shinwell@codesourcery.com>
-
- * ldlang.c (lang_insert_orphan): Correctly handle the case where
- the section is to end up after the section currently at the end
- of the list in output_bfd.
-
-2006-06-21 Hans-Peter Nilsson <hp@bitrange.com>
-
- * emultempl/mmo.em: Improve comments. Explain why there's
- ELF-stuff here.
-
-2006-06-21 Alan Modra <amodra@bigpond.net.au>
-
- * emultempl/elf-generic.em (gld${EMULATION_NAME}_map_segments): Limit
- loop to ten iterations. Throw away any previous linker generated
- segment map.
- * ldlang.c (lang_phdr_list): Make global.
- * ldlang.h (lang_phdr_list): Declare.
- * Makefile.am (ELF_GEN_DEPS): Define. Use in emul deps.
- * Makefile.in: Regenerate.
-
-2006-06-20 Alan Modra <amodra@bigpond.net.au>
-
- * Makefile.am (ELF_DEPS): Define. Use in emul file deps. Fix
- many ELF emul file deps that incorrectly said they needed elf32.em
- instead of generic.em. Add genelf.em as required.
- * Makefile.in: Regenerate.
- * ldlang.c (lang_process): Call ldemul_finish before
- lang_check_section_addresses.
- * emulparams/arcelf.sh: Generic elf target needs genelf.
- * emulparams/d30v_e.sh: Likewise.
- * emulparams/d30v_o.sh: Likewise.
- * emulparams/d30velf.sh: Likewise.
- * emulparams/elf32_dlx.sh: Likewise.
- * emulparams/elf32_i860.sh: Likewise.
- * emulparams/elf32fr30.sh: Likewise.
- * emulparams/elf32frv.sh: Likewise.
- * emulparams/elf32iq10.sh: Likewise.
- * emulparams/elf32iq2000.sh: Likewise.
- * emulparams/elf32mt.sh: Likewise.
- * emulparams/mn10200.sh: Likewise.
- * emulparams/or32.sh: Likewise.
- * emulparams/or32elf.sh: Likewise.
- * emulparams/pjelf.sh: Likewise.
- * emulparams/msp430all.sh: Likewise. Extract common entries.
- * emulparams/pjlelf.sh: Include pjelf.sh.
- * emulparams/elf32frvfd.sh (EXTRA_EM_FILE): Unset.
- * emulparams/mn10300.sh (EXTRA_EM_FILE): Unset.
- * emultempl/elf-generic.em: New file.
- * emultempl/genelf.em: New file.
- * emultempl/elf32.em: Include elf-generic.em.
- (gld${EMULATION_NAME}_layout_sections_again): Delete.
- (gld${EMULATION_NAME}_finish): Call gld${EMULATION_NAME}_map_segments.
- * emultempl/hppaelf.em (hppaelf_layout_sections_again): Likewise.
- (gld${EMULATION_NAME}_finish): Rename from hppaelf_finish. Call
- gld${EMULATION_NAME}_map_segments.
- (LDEMUL_FINISH): Update.
- * emultempl/mmo.em: Correct comment. Include elf-bfd.h and
- source elf-generic.em.
- (mmo_finish): Call gld${EMULATION_NAME}_map_segments.
- * emultempl/ppc64elf.em (ppc_layout_sections_again): Likewise.
- (gld${EMULATION_NAME}_finish): Rename from ppc_finish. Call
- gld${EMULATION_NAME}_map_segments.
- (LDEMUL_FINISH): Update.
-
-2006-06-19 Alan Modra <amodra@bigpond.net.au>
-
- * ldexp.c (fold_name): Adjust bfd_sizeof_headers call.
-
-2006-06-14 Kevin F. Quinn <kevquinn@gentoo.org>
-
- * ld.texinfo: Document new -z lazy option.
- * emultempl/elf32.em (gld${EMULATION_NAME}_handle_option): Handle
- new option.
- (gld${EMULATION_NAME}_list_options): Update help text.
-
-2006-06-12 Fred Fish <fnf@specifix.com>
-
- * emulparams/elf32bmip.sh (OTHER_SECTIONS): Keep the
- ".mdebug.<abi>" and ".gcc_compiled_long<size>" sections
- generated by mips gcc.
-
-2006-06-12 Thiemo Seufer <ths@mips.com>
-
- * emulparams/elf64bmip.sh, emulparams/elf64btsmip.sh (COMMONPAGESIZE):
- Define.
-
-2006-06-09 Alan Modra <amodra@bigpond.net.au>
-
- * ldlang.h (lang_input_statement_type): Use bitfields for booleans.
- * ldlang.c (struct out_section_hash_entry): Rename from
- output_statement_hash_entry. Delete output_section_statement_type
- entry. Add statement_union_type entry. Adjust all users.
- (output_section_statement_table): Rename from output_statement_table.
- Adjust all users.
- (output_section_statement_newfunc): Rename from
- output_statement_newfunc. Adjust all users.
- (output_section_statement_table_init): Rename from
- output_statement_table_init. Adjust all users.
- (output_section_statement_table_free): Rename from
- output_statement_table_free. Adjust all users.
-
-2006-06-07 Joseph S. Myers <joseph@codesourcery.com>
-
- * po/Make-in (pdf, ps): New dummy targets.
-
-2006-06-07 Alan Modra <amodra@bigpond.net.au>
-
- * ldlang.h (enum section_type): Delete dsect_section, copy_section,
- info_section and overlay_section. Add noalloc_section.
- * ldlang.c (lang_add_section): Adjust.
- * ldgram.y (type): Adjust.
-
-2006-06-06 Alan Modra <amodra@bigpond.net.au>
-
- * ldlang.c (init_os): Whitespace.
- (map_input_to_output_sections): Don't init_os for lang_input_section.
- (print_all_symbols): Remove forward declaration. Convert to ISO C.
-
-2006-06-05 Daniel Jacobowitz <dan@codesourcery.com>
-
- * po/Make-in (top_builddir): Define.
-
-2006-06-05 Alan Modra <amodra@bigpond.net.au>
-
- * ldexp.c (exp_get_abs_int): Make error message the same as
- others emitted in this file.
-
-2006-06-05 Alan Modra <amodra@bigpond.net.au>
-
- * config.in: Regenerate.
-
-2006-06-05 Alan Modra <amodra@bigpond.net.au>
-
- * ldlang.c (lookup_name): Delete dead code. Remove FIXMEs.
-
-2006-06-03 Alan Modra <amodra@bigpond.net.au>
-
- * emultempl/elf32.em (global_found): Make it a pointer.
- (stat_needed, try_needed): Adjust.
- (check_needed): Don't skip non-loaded as-needed entries. Only
- consider entries with both filename and the_bfd non-null.
- (after_open): Try loading non-loaded as-needed libs to satisfy
- DT_NEEDED libs.
-
-2006-06-02 Joseph S. Myers <joseph@codesourcery.com>
-
- * Makefile.am (TEXI2DVI): Add -I $(top_srcdir)/../libiberty.
- * Makefile.in: Regenerate.
-
-2006-05-31 Daniel Jacobowitz <dan@codesourcery.com>
-
- * Makefile.am: Replace INTLLIBS and INTLDEPS with LIBINTL
- and LIBINTL_DEP everywhere.
- (INTLLIBS): Remove.
- (INCLUDES): Use @INCINTL@.
- * configure.in: Use ZW_GNU_GETTEXT_SISTER_DIR and AM_PO_SUBDIRS.
- Remove local code for po/Makefile.
- * Makefile.in, configure: Regenerated.
-
-2006-05-30 H.J. Lu <hongjiu.lu@intel.com>
-
- * emulparams/arcelf.sh (MAXPAGESIZE): Changed to
- "CONSTANT (MAXPAGESIZE)".
- * emulparams/armelf_nbsd.sh: Likewise.
- * emulparams/armelf_vxworks.sh: Likewise.
- * emulparams/armnto.sh: Likewise.
- * emulparams/armsymbian.sh: Likewise.
- * emulparams/crislinux.sh: Likewise.
- * emulparams/elf32_i860.sh: Likewise.
- * emulparams/elf32_i960.sh: Likewise.
- * emulparams/elf32am33lin.sh: Likewise.
- * emulparams/elf32bfinfd.sh: Likewise.
- * emulparams/elf32bmipn32-defs.sh: Likewise.
- * emulparams/elf32frvfd.sh: Likewise.
- * emulparams/elf32i370.sh: Likewise.
- * emulparams/elf32lppcnto.sh: Likewise.
- * emulparams/elf32mcore.sh: Likewise.
- * emulparams/elf32openrisc.sh: Likewise.
- * emulparams/elf32ppcnto.sh: Likewise.
- * emulparams/elf32ppcwindiss.sh: Likewise.
- * emulparams/elf32vax.sh: Likewise.
- * emulparams/elf32xc16x.sh: Likewise.
- * emulparams/elf32xc16xl.sh: Likewise.
- * emulparams/elf32xc16xs.sh: Likewise.
- * emulparams/elf64_aix.sh: Likewise.
- * emulparams/elf64hppa.sh: Likewise.
- * emulparams/elf64mmix.sh: Likewise.
- * emulparams/elf_i386_be.sh: Likewise.
- * emulparams/elf_i386_chaos.sh: Likewise.
- * emulparams/elf_i386_ldso.sh: Likewise.
- * emulparams/hppa64linux.sh: Likewise.
- * emulparams/hppalinux.sh: Likewise.
- * emulparams/hppaobsd.sh: Likewise.
- * emulparams/i386lynx.sh: Likewise.
- * emulparams/i386moss.sh: Likewise.
- * emulparams/i386nto.sh: Likewise.
- * emulparams/i386nw.sh: Likewise.
- * emulparams/m32relf_linux.sh: Likewise.
- * emulparams/m68kpsos.sh: Likewise.
- * emulparams/or32elf.sh: Likewise.
- * emulparams/pjelf.sh: Likewise.
- * emulparams/pjlelf.sh: Likewise.
- * emulparams/ppclynx.sh: Likewise.
- * emulparams/ppcnw.sh: Likewise.
- * emulparams/shelf32_nbsd.sh : Likewise.
- * emulparams/shelf_nbsd.sh: Likewise.
- * emulparams/shelf_nto.sh: Likewise.
- * emulparams/shlelf_nto.sh: Likewise.
- * emulparams/xtensa-config.sh: Likewise.
-
- * emulparams/armelf_linux.sh (MAXPAGESIZE): Changed to
- "CONSTANT (MAXPAGESIZE)".
- (COMMONPAGESIZE): Changed to "CONSTANT (COMMONPAGESIZE)".
- * emulparams/elf32_sparc.sh: Likewise.
- * emulparams/elf32bmip.sh: Likewise.
- * emulparams/elf32ppccommon.sh: Likewise.
- * emulparams/elf64_ia64.sh: Likewise.
- * emulparams/elf64_s390.sh: Likewise.
- * emulparams/elf64_sparc.sh: Likewise.
- * emulparams/elf64alpha.sh: Likewise.
- * emulparams/elf64ppc.sh: Likewise.
- * emulparams/elf_i386.sh: Likewise.
- * emulparams/elf_i386_vxworks.sh: Likewise.
- * emulparams/elf_s390.sh: Likewise.
- * emulparams/elf_x86_64.sh: Likewise.
- * emulparams/shlelf32_linux.sh: Likewise.
- * emulparams/shlelf_linux.sh: Likewise.
-
- * emulparams/elf32bmipn32.sh (COMMONPAGESIZE): Changed to
- "CONSTANT (COMMONPAGESIZE)".
- * emulparams/elf32btsmipn32.sh: Likewise.
-
- * emultempl/elf32.em (gld${EMULATION_NAME}_handle_option): Add
- "-z max-page-size=" and "-z common-page-size=".
- (gld${EMULATION_NAME}_list_options): Likewise.
-
- * ld.h (ld_config_type): Add maxpagesize and commonpagesize.
-
- * ld.texinfo: Document "-z max-page-size=" and
- "-z common-page-size=".
-
- * ldexp.c (exp_print_token): Handle CONSTANT.
- (fold_name): Likewise.
- * ldgram.y: Likewise.
- * ldlex.l: Likewise.
-
- * ldmain.c (main): Initiliaze config.maxpagesize and
- config.commonpagesize. Call bfd_emul_set_maxpagesize if
- config.maxpagesize isn't 0. Call bfd_emul_set_commonpagesize if
- config.commonpagesize config.maxpagesize isn't 0.
-
-2006-05-30 Nick Clifton <nickc@redhat.com>
-
- * po/es.po: Updated Spanish translation.
-
-2006-05-25 H.J. Lu <hongjiu.lu@intel.com>
-
- * emulparams/elf_x86_64.sh (MAXPAGESIZE): Updated to 0x200000.
-
-2006-05-24 H.J. Lu <hongjiu.lu@intel.com>
-
- PR ld/1485
- * configure.in: Use ${srcdir}/../bfd/config.bfd to check 64bit
- bfd. Support 64bit host for --enable-targets=all.
- * configure: Regenerated.
-
-2006-05-24 Nick Clifton <nickc@redhat.com>
-
- * po/vi.po: Updated Vietnamese translation.
-
-2006-05-24 Bjoern Haase <bjoern.m.haase@web.de>
-
- * configure.tgt: Add avr6 to emulation list.
- * Makefile.am: Add eavr6.o and corresponding rule.
- * Makefile.in: Regenerate.
- * emulparams/avr6.sh: New file.
- * emulparams/avrX.sh (TEMPLATE_NAME): Use elf32 instead of generic
- for target option support.
- (EXTRA_EM_FILE): Add reference to new em template file avrelf.
- * scripttempl/avr.sc: Add ".trampolines" section.
- * emultempl/avrelf.em: Add new file for target specific options.
-
-2006-05-22 Nick Clifton <nickc@redhat.com>
-
- * scripttempl/elf32crx.sc (.rdata): Add .rodata.*.
-
-2006-05-19 Alan Modra <amodra@bigpond.net.au>
-
- * ldlang.c (lang_size_sections_1): Don't check mem regions for
- os->ignored sections.
-
-2005-05-17 Daniel Jacobowitz <dan@codesourcery.com>
-
- * ldlang.c (lang_size_sections): Call lang_reset_memory_regions
- before redoing one_lang_size_sections_pass.
-
-2006-05-11 Carlos O'Donell <carlos@codesourcery.com>
-
- * ld.texinfo: Rename "Index" to "LD Index"
-
-2006-05-11 Pedro Alves <pedro_alves@portugalmail.pt>
-
- * pe-dll.c (autofilter_symbollist): Add Dllmain,
- DllMainCRTStartup, _DllMainCRTStartup and .text.
- (autofilter_liblist): Add libcegcc.
- (autofilter_symbolprefixlist): Add __imp_ and .idata$.
- (generate_reloc): Do not skip sections without a SEC_LOAD flag,
- they can still contain relocs that need processing.
- Skip the .idata$6 section.
- (jmp_arm_bytes): New array: Contains byte codes for an ARM jump.
- (make_one): Use the new array.
- (make_import_fixup_entry): Use .idata$2 instead of .idata$3.
- * emultempl/pe.em (MajorSubsystemVersion): Set to 3 for armpe.
-
-2006-05-05 Alan Modra <amodra@bigpond.net.au>
-
- * ld.texinfo: Document PowerPC and PowerPC64 options.
- * gen-doc.texi: Enable.
-
-2006-05-02 Daniel Jacobowitz <dan@codesourcery.com>
-
- * Makefile.am (AM_MAKEINFOFLAGS): Add libiberty.
- (TEXI2POD): Use AM_MAKEINFOFLAGS.
- (configdoc.texi): Don't set top_srcdir.
- * ld.texinfo: Don't use top_srcdir.
- * aclocal.m4, Makefile.in: Regenerated.
-
-2006-04-19 Alan Modra <amodra@bigpond.net.au>
-
- * ldlang.c (wild): Tidy default_common_section loop.
- (print_input_section): Format.
-
- * configure: Regenerate.
-
-2006-04-16 Daniel Jacobowitz <dan@codesourcery.com>
-
- * po/POTFILES.in: Regenerated.
-
-2006-04-16 Daniel Jacobowitz <dan@codesourcery.com>
-
- * config.in: Regenerated.
-
-2006-04-14 David Heine <dlheine@tensilica.com>
- Bob Wilson <bob.wilson@acm.org>
-
- * emultempl/xtensaelf.em (elf_xtensa_before_allocation): Call new
- function to strip inconsistent linkonce sections.
- (input_section_linked_worker, input_section_linked): New.
- (is_inconsistent_linkonce_section): New.
- (xtensa_strip_inconsistent_linkonce_sections): New.
-
-2006-04-11 Diego Pettenò <flameeyes@gentoo.org>
-
- * emultempl/elf32.em: Add support for elf-hints.h on FreeBSD
- and Dragonfly targets.
- * configure.in (AC_CHECK_HEADERS): Add elf-hints.h.
- * Makefile.am (HFILES): Add elf-hints-local.h.
- * elf-hints-local.h: New file.
- * Makefile.in: Regenerate.
- * configure: Regenerate.
-
-2006-04-07 Bernhard Fischer <aldot@gcc.gnu.org>
-
- * ld.texinfo: Fix typo in documentation of --check-sections.
-
-2006-04-07 Kaz Kojima <kkojima@rr.iij4u.or.jp>
-
- * ldlang.c (load_symbols): Set as_needed and add_needed according
- to the corresponding script's fields while processing it.
-
-2006-04-06 Carlos O'Donell <carlos@codesourcery.com>
-
- * Makefile.am: Add install-html, install-html-am, and
- install-html-recursive targets.
- * Makefile.in: Regenerate.
- * configure.in: AC_SUBST datarootdir, docdir, htmldir.
- * configure: Regenerate.
- * po/Make-in: Add install-html target.
-
-2006-04-06 H.J. Lu <hongjiu.lu@intel.com>
-
- * emultempl/ia64elf.em: Set link_info.relax_pass to 2. Remove
- link_info.need_relax_finalize.
-
- * ldlang.c (relax_sections): New.
- (lang_process): Use. Call relax_sections link_info.relax_pass
- times.
-
- * ldmain.c (main): Set link_info.relax_pass to 1. Remove
- link_info.need_relax_finalize.
-
-2006-04-05 Alan Modra <amodra@bigpond.net.au>
-
- * Makefile.am (GENSCRIPTS): Pass prefix.
- * Makefile.in: Regenerate.
- * genscripts.sh: Adjust for extra parameter.
- * emultempl/elf32.em (parse_ld_so_conf): Return true iff file
- exists.
- (check_ld_so_conf): Use ${prefix}/etc/ld.so.conf if it exists.
- * NEWS: Update.
-
-2006-04-05 Richard Sandiford <richard@codesourcery.com>
- Daniel Jacobowitz <dan@codesourcery.com>
-
- * configure.tgt (sparc*-*-vxworks*): New stanza.
- * emulparams/elf32_sparc_vxworks.sh: New file.
- * Makefile.am (ALL_EMULATIONS): Add eelf32_sparc_vxworks.o.
- (eelf32_sparc_vxworks.c): New rule.
- * Makefile.in: Regenerate.
-
-2006-04-04 Eric Botcazou <ebotcazou@adacore.com>
-
- * ldlang.c (lang_map): Print the list of discarded input sections.
- (print_input_section): Change parameter and print zero-sized sections.
- (print_statement): Adjust call to print_input_section.
-
-2006-04-01 Danny Smith <dannysmith@users.sourceforge.net>
-
- * deffilep.y (def_image_name): If LIBRARY or NAME statement
- specifies an empty string, retain the name specified on command
- line.
- * ld.texinfo: Document above.
-
-2006-03-31 Jakub Jelinek <jakub@redhat.com>
-
- * ldmisc.c (vfinfo): Revert 2005-10-05 changes. If
- bfd_find_nearest_line succeeded for %C or %D, but filename
- is NULL, print section+offset at the end.
-
-2006-03-25 Bernd Schmidt <bernd.schmidt@analog.com>
-
- * emulparams/elf32bfinfd.sh: New file.
- * emultempl/bfin.em: Delete.
- * emulparams/bfin.sh: Lose reference to bfin.em.
- * Makefile.am (eelf32bfin.c): Likewise.
- (eelf32bfinfd.c): New.
- * Makefile.in: Regenerate.
- * configure.tgt (bfin-*-elf, bfin-*-uclinux): Add elf32bfinfd to
- targ_extra_emuls.
-
-2006-03-22 Richard Sandiford <richard@codesourcery.com>
- Daniel Jacobowitz <dan@codesourcery.com>
- Phil Edwards <phil@codesourcery.com>
- Zack Weinberg <zack@codesourcery.com>
- Mark Mitchell <mark@codesourcery.com>
- Nathan Sidwell <nathan@codesourcery.com>
-
- * configure.tgt (mips*el-*-vxworks*, mips*-*-vxworks*): Use
- separate VxWorks emulations.
- * emulparams/elf32ebmipvxworks.sh: New file.
- * emulparams/elf32elmipvxworks.sh: New file.
- * Makefile.am (ALL_EMULATIONS): Add eelf32ebmipvxworks.o and
- eelf32elmipvxworks.o.
- (eelf32ebmipvxworks.c, eelf32elmipvxworks.c): New rules.
- * Makefile.in: Regenerate.
-
-2006-03-16 Alan Modra <amodra@bigpond.net.au>
-
- PR 2434
- * ldcref.c (add_cref): Adjust bfd_hash_table_init calls.
- * ldlang.c (output_statement_table_init, lang_init): Likewise.
- * ldmain.c (add_ysym, add_wrap, add_keepsyms_file): Likewise.
- (undefined_symbol): Likewise.
-
-2006-03-07 Richard Sandiford <richard@codesourcery.com>
- Daniel Jacobowitz <dan@codesourcery.com>
- Zack Weinberg <zack@codesourcery.com>
- Nathan Sidwell <nathan@codesourcery.com>
- Paul Brook <paul@codesourcery.com>
- Ricardo Anguiano <anguiano@codesourcery.com>
- Phil Edwards <phil@codesourcery.com>
-
- * emulparams/armelf_vxworks.sh: Include vxworks.sh.
- (MAXPAGESIZE): Define.
- * emulparams/vxworks.sh: Undefine EMBEDDED.
- * Makefile.am (earmelf_vxworks.c): Depend on vxworks.sh and vxworks.em.
- * Makefile.in: Regenerate.
-
-2006-03-03 Bjoern Haase <bjoern.m.haase@web.de>
-
- * scripttempl/avr.sc: Add *(.jumptables) *(.lowtext) sections.
- Add KEEP() directives.
- Add *(.data*) *(.rodata) and *(.rodata*) and *(.bss*) to .data and
- .bss output sections.
-
-2006-03-03 Richard Sandiford <richard@codesourcery.com>
-
- * emulparams/vxworks.sh (VXWORKS_BASE_EM_FILE): New variable.
- (EXTRA_EM_FILE): Define.
- * emultempl/vxworks.em: New file.
- * ld.texinfo (--force-dynamic): Document.
- * Makefile.am (eelf32ppcvxworks.cm, eelf_i386_vxworks.c): Depend
- on vxworks.em.
- * Makefile.in: Regenerate.
-
-2006-03-02 Richard Sandiford <richard@codesourcery.com>
-
- * emulparams/elf32ppccommon.sh: New file, extracted from...
- * emulparams/elf32ppc.sh: ...here.
- * emulparams/elf32ppcvxworks.sh: Include elf32ppccommon.sh
- instead of elf32ppc.sh.
- (BSS_PLT): Remove override.
- * Makefile.am (eelf32lppc.c): Depend on elf32ppccommons.h.
- (eelf32lppcnto.c, eelf32lppcsim.c, eelf32ppcnto.c): Likewise.
- (eelf32ppc.c, eelf32ppc_fbsd.c, eelf32ppcsimm): Likewise.
- (eelf32ppclinux.c): Likewise.
- (eelf32ppcvxworks.c): Likewise. Add missing vxworks.sh dependency.
- * Makefile.in: Regenerate.
-
-2006-02-27 Carlos O'Donell <carlos@codesourcery.com>
-
- * Makefile.am: Add html target.
- * Makefile.in: Regenerate.
- * po/Make-in: Add html target.
-
-2006-02-17 Shrirang Khisti <shrirangk@kpitcummins.com>
- Anil Paranjape <anilp1@kpitcummins.com>
- Shilin Shakti <shilins@kpitcummins.com>
-
- * scripttemp/elf32xc16x.sc: Default linker script for tiny model.
- * scripttemp/elf32xc16xl.sc: Default linker script for large model.
- * scripttemp/elf32xc16xs.sc: Default linker script for small model.
- * emulparams/elf32xc16x.sh: Emulation script for tiny model.
- * emulparams/elf32xc16xl.sh: Emulation script for large model.
- * emulparams/elf32xc16xs.sh: Emulation script for small model.
- * Makefile.am: Add entry to make xc16x target.
- * Makefile.in: Regenerate.
- * configure.tgt: Specify default and other emulation parameters
- for xc16x.
- * NEWS: Announce the support for the new target.
-
-2006-02-16 Nick Hudson <nick.hudson@dsl.pipex.com>
-
- * configure.tgt (mips*el-*-netbsd*, mips*-*-netbsd*):
- Use the traditional target.
-
-2006-02-13 Joseph S. Myers <joseph@codesourcery.com>
-
- * configure.tgt (arm*b-*-linux-gnueabi): Change to
- arm*b-*-linux-*eabi.
- (arm*-*-linux-gnueabi): Change to arm*-*-linux-*eabi.
-
-2006-02-08 H.J. Lu <hongjiu.lu@intel.com>
-
- PR ld/2290
- * NEWS: Updated for the Linux linker search order change.
-
- * emultempl/elf32.em (gld${EMULATION_NAME}_after_open): Call
- gld${EMULATION_NAME}_check_ld_so_conf before checking default
- search directories for DT_NEEDED entries.
-
-2006-02-07 Paul Brook <paul@codesourcery.com>
-
- * emultempl/armelf.em: Include elf/arm.h.
- (arm_elf_finish): Set low address bit if enty point is a Thumb
- function.
-
-2006-02-01 Danny Smith <dannysmith@users.sourceforge.net>
-
- * deffilep.y (def_image_name): If the image name does not have
- a suffix, append the default.
- * ld.texinfo: Document NAME, LIBRARY usage in PE-COFF .def files.
-
-2006-01-31 Danny Smith dannysmith@users.sourceforge.net
-
- * NEWS: Mention support for forward exports in PE-COFF dll's.
- * ld.texinfo: Expand documentation of EXPORT statements in
- PE-COFF .def files.
-
-2006-01-31 Filip Navara <navaraf@reactos.com>
-
- * deffile.h (struct def_file_export): Add field flag_forward.
- * pe-dll.c (process_def_file): Check for forward exports.
- (generate_edata): Generate forward export symbols.
- (fill_edata): Emit them.
-
- * pe-dll.c (process_def_file): Don't crash on malformed
- fastcall symbol names in .def file.
-
-2006-01-30 Nick Clifton <nickc@redhat.com>
-
- * po/vi.po: Updated Vietnamese translation.
-
-2006-01-27 Yitzchak Scott-Thoennes <sthoenna@efn.org>
-
- * pe-dll.c (pe_dll_generate_implib): Issue "Creating library
- file:" as informational message, not a warning.
-
-2006-01-18 Roger Sayle <roger@eyesopen.com>
-
- * emultempl/irix.em: Use lbasename instead of basename.
-
-2006-01-16 Nick Clifton <nickc@redhat.com>
-
- * po/zh_CN.po: New Chinese (simplified) translation.
- * configure.in (ALL_LINGUAS): Add "zh_CH".
- * configure: Regenerate.
-
-2006-01-16 Bernhard Fischer <aldot@gcc.gnu.org>
-
- * ld.texinfo (Options): Fix typo.
-
-For older changes see ChangeLog-2005
-
-Local Variables:
-mode: change-log
-left-margin: 8
-fill-column: 74
-version-control: never
-End:
diff --git a/contrib/binutils/ld/ChangeLog-9197 b/contrib/binutils/ld/ChangeLog-9197
deleted file mode 100644
index 9307f333e3b1..000000000000
--- 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 866e4a0cfbb8..000000000000
--- 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 d59a3bd7f889..000000000000
--- 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 72dd649b641b..000000000000
--- a/contrib/binutils/ld/Makefile.am
+++ /dev/null
@@ -1,2050 +0,0 @@
-## Process this file with automake to generate Makefile.in
-
-AUTOMAKE_OPTIONS = cygnus dejagnu
-ACLOCAL_AMFLAGS = -I .. -I ../config -I ../bfd
-
-SUBDIRS = po
-
-tooldir = $(exec_prefix)/$(target_alias)
-
-YACC = `if [ -f ../bison/bison ]; then echo ../bison/bison -y -L$(srcdir)/../bison/; else echo @YACC@; fi`
-YFLAGS = -d
-LEX = `if [ -f ../flex/flex ]; then echo ../flex/flex; else echo @LEX@; fi`
-
-WARN_CFLAGS = @WARN_CFLAGS@
-NO_WERROR = @NO_WERROR@
-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 $(AM_MAKEINFOFLAGS)
-
-POD2MAN = pod2man --center="GNU Development Tools" \
- --release="binutils-$(VERSION)" --section=1
-
-#stuff for self hosting (can be overridden in config file).
-HOSTING_CRT0 = @HOSTING_CRT0@
-HOSTING_LIBS = @HOSTING_LIBS@
-HOSTING_EMU = -m $(EMUL)
-
-# Setup the testing framework, if you have one
-EXPECT = expect
-RUNTEST = runtest
-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 = g++
-CXX_FOR_TARGET = ` \
- if [ -f $$r/../gcc/g++ ] ; then \
- if [ -f $$r/../newlib/Makefile ] ; then \
- echo $$r/../gcc/g++ -B$$r/../gcc/ -idirafter $$r/../newlib/targ-include -idirafter $${srcroot}/../newlib/libc/include -nostdinc; \
- else \
- echo $$r/../gcc/g++ -B$$r/../gcc/; \
- fi; \
- else \
- if [ "@host@" = "@target@" ] ; then \
- echo $(CXX); \
- else \
- echo g++ | sed '$(transform)'; \
- fi; \
- fi`
-
-noinst_PROGRAMS = ld-new
-info_TEXINFOS = ld.texinfo
-ld_TEXINFOS = configdoc.texi
-noinst_TEXINFOS = ldint.texinfo
-man_MANS = ld.1
-
-AM_MAKEINFOFLAGS = -I $(srcdir) -I $(BFDDIR)/doc -I ../bfd/doc \
- -I $(top_srcdir)/../libiberty
-TEXI2DVI = texi2dvi -I $(srcdir) -I $(BFDDIR)/doc -I ../bfd/doc \
- -I $(top_srcdir)/../libiberty
-
-INCLUDES = -D_GNU_SOURCE -I. -I$(srcdir) -I../bfd -I$(BFDDIR) -I$(INCDIR) \
- @INCINTL@ $(HDEFINES) $(CFLAGS) \
- -DLOCALEDIR="\"$(datadir)/locale\""
-
-BFDLIB = ../bfd/libbfd.la
-LIBIBERTY = ../libiberty/libiberty.a
-
-ALL_EMULATIONS = \
- eaixppc.o \
- eaixrs6.o \
- ealpha.o \
- earcelf.o \
- earm_epoc_pe.o \
- earm_wince_pe.o \
- earmaoutb.o \
- earmaoutl.o \
- earmcoff.o \
- earmelf.o \
- earmelfb.o \
- earmelf_fbsd.o \
- earmelf_linux.o \
- earmelf_linux_eabi.o \
- earmelfb_linux.o \
- earmelfb_linux_eabi.o \
- earmelf_nbsd.o \
- earmelfb_nbsd.o \
- earmelf_vxworks.o \
- earmnto.o \
- earmnbsd.o \
- earmpe.o \
- earmsymbian.o \
- eavr2.o \
- eavr1.o \
- eavr3.o \
- eavr4.o \
- eavr5.o \
- eavr6.o \
- ecoff_i860.o \
- ecoff_sparc.o \
- eelf32_spu.o \
- ecrisaout.o \
- ecriself.o \
- ecrislinux.o \
- ed10velf.o \
- ed30v_e.o \
- ed30v_o.o \
- ed30velf.o \
- edelta68.o \
- eelf32_dlx.o \
- eelf32_i960.o \
- eelf32_i860.o \
- eelf32_sparc.o \
- eelf32_sparc_vxworks.o \
- eelf32b4300.o \
- eelf32bfin.o \
- eelf32bfinfd.o \
- eelf32cr16.o \
- eelf32cr16c.o \
- eelf32bmip.o \
- eelf32bmipn32.o \
- eelf32btsmip.o \
- eelf32crx.o \
- eelf32btsmipn32.o \
- eelf32ltsmip.o \
- eelf32ltsmipn32.o \
- eelf32ebmip.o \
- eelf32ebmipvxworks.o \
- eelf32elmip.o \
- eelf32elmipvxworks.o \
- eelf32fr30.o \
- eelf32frv.o \
- eelf32i370.o \
- eelf32ip2k.o \
- eelf32iq2000.o \
- eelf32iq10.o \
- eelf32l4300.o \
- eelf32lmip.o \
- eelf32lppc.o \
- eelf32lppcnto.o \
- eelf32lppcsim.o \
- eelf32m32c.o \
- eelf32mcore.o \
- eelf32mep.o \
- eelf32mipswindiss.o \
- eelf32mt.o \
- eelf32openrisc.o \
- eelf32ppc.o \
- eelf32ppc_fbsd.o \
- eelf32ppclinux.o \
- eelf32ppcnto.o \
- eelf32ppcsim.o \
- eelf32ppcwindiss.o \
- eelf32ppcvxworks.o \
- eelf32vax.o \
- eelf32xc16x.o \
- eelf32xc16xl.o \
- eelf32xc16xs.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_i386_vxworks.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 \
- ei386pep.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 \
- em68knbsd.o \
- em68kpsos.o \
- em88kbcs.o \
- emaxqcoff.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 \
- emsp430x1610.o \
- emsp430x1611.o \
- emsp430x1612.o \
- emsp430x2101.o \
- emsp430x2111.o \
- emsp430x2121.o \
- emsp430x2131.o \
- emsp430x311.o \
- emsp430x312.o \
- emsp430x313.o \
- emsp430x314.o \
- emsp430x315.o \
- emsp430x323.o \
- emsp430x325.o \
- emsp430x336.o \
- emsp430x337.o \
- emsp430x412.o \
- emsp430x413.o \
- emsp430x415.o \
- emsp430x417.o \
- emsp430xE423.o \
- emsp430xE425.o \
- emsp430xE427.o \
- emsp430xW423.o \
- emsp430xW425.o \
- emsp430xW427.o \
- emsp430xG437.o \
- emsp430xG438.o \
- emsp430xG439.o \
- emsp430x435.o \
- emsp430x436.o \
- emsp430x437.o \
- 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 \
- eppclynx.o \
- eriscix.o \
- escoreelf.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 \
- eshelf_uclinux.o \
- eshelf_vxworks.o \
- eshlelf_vxworks.o \
- eshl.o \
- eshlelf.o \
- eshlsymbian.o \
- eshpe.o \
- esparcaout.o \
- esparclinux.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 \
- ez80.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 \
- pep-dll.o
-
-CFILES = ldctor.c ldemul.c ldexp.c ldfile.c ldlang.c \
- ldmain.c ldmisc.c ldver.c ldwrite.c lexsup.c \
- mri.c ldcref.c pe-dll.c pep-dll.c
-
-HFILES = ld.h ldctor.h ldemul.h ldexp.h ldfile.h \
- ldlang.h ldlex.h ldmain.h ldmisc.h ldver.h \
- ldwrite.h mri.h deffile.h pe-dll.h pep-dll.h elf-hints-local.h
-
-GENERATED_CFILES = ldgram.c ldlex.c deffilep.c
-GENERATED_HFILES = ldgram.h ldemul-list.h deffilep.h
-
-OFILES = ldgram.o ldlex.o lexsup.o ldlang.o mri.o ldctor.o ldmain.o \
- ldwrite.o ldexp.o ldemul.o ldver.o ldmisc.o \
- ldfile.o ldcref.o ${EMULATION_OFILES} ${EMUL_EXTRA_OFILES}
-
-STAGESTUFF = *.o ldscripts/* e*.c
-
-# Disable -Werror, if it has been enabled, since old versions of bison/
-# yacc will produce working code which contain compile time warnings.
-ldgram.o:
- $(COMPILE) -c $< $(NO_WERROR)
-ldlex.o:
- $(COMPILE) -c $< $(NO_WERROR)
-deffilep.o:
- $(COMPILE) -c $< $(NO_WERROR)
-
-# At the moment this is just a list of those emulation template files
-# that contain internationalised strings.
-EMULATION_FILES = emultempl/pe.em emultempl/armcoff.em
-
-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
-
-eelf32_spu.o: eelf32_spu.c
- $(COMPILE) -c -DEMBEDSPU="\"`echo embedspu | sed '$(transform)'`\"" \
- eelf32_spu.c
-
-ldemul-list.h: Makefile
- (echo "/* This file is automatically generated. DO NOT EDIT! */";\
- for f in `echo " " ${EMULATION_OFILES} "" \
- | 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}" "${prefix}" "${exec_prefix}" @host@ @target@ @target_alias@ "@EMULATION_LIBPATH@" "@NATIVE_LIB_DIRS@" @use_sysroot@
-GEN_DEPENDS = $(srcdir)/genscripts.sh stringify.sed
-ELF_DEPS = $(srcdir)/emultempl/elf32.em $(srcdir)/emultempl/elf-generic.em
-ELF_GEN_DEPS = $(srcdir)/emultempl/generic.em $(srcdir)/emultempl/elf-generic.em $(srcdir)/emultempl/genelf.em
-
-@TDIRS@
-
-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 \
- $(ELF_GEN_DEPS) $(srcdir)/scripttempl/elf.sc ${GEN_DEPENDS}
- ${GENSCRIPTS} arcelf "$(tdir_arcelf)"
-earmelf.c: $(srcdir)/emulparams/armelf.sh \
- $(ELF_DEPS) $(srcdir)/emultempl/armelf.em \
- $(srcdir)/scripttempl/elf.sc ${GEN_DEPENDS}
- ${GENSCRIPTS} armelf "$(tdir_armelf)"
-earmelfb.c: $(srcdir)/emulparams/armelfb.sh $(srcdir)/emulparams/armelf.sh \
- $(ELF_DEPS) $(srcdir)/emultempl/armelf.em \
- $(srcdir)/scripttempl/elf.sc ${GEN_DEPENDS}
- ${GENSCRIPTS} armelfb "$(tdir_armelfb)"
-earmelf_fbsd.c: $(srcdir)/emulparams/armelf_fbsd.sh \
- $(srcdir)/emulparams/armelf.sh \
- $(ELF_DEPS) $(srcdir)/emultempl/armelf.em \
- $(srcdir)/scripttempl/elf.sc ${GEN_DEPENDS}
- ${GENSCRIPTS} armelf_fbsd "$(tdir_armelf_fbsd)"
-earmelf_linux.c: $(srcdir)/emulparams/armelf_linux.sh \
- $(ELF_DEPS) $(srcdir)/emultempl/armelf.em \
- $(srcdir)/scripttempl/elf.sc ${GEN_DEPENDS}
- ${GENSCRIPTS} armelf_linux "$(tdir_armelf_linux)"
-earmelf_linux_eabi.c: $(srcdir)/emulparams/armelf_linux_eabi.sh \
- $(srcdir)/emulparams/armelf_linux.sh \
- $(ELF_DEPS) $(srcdir)/emultempl/armelf.em \
- $(srcdir)/scripttempl/elf.sc ${GEN_DEPENDS}
- ${GENSCRIPTS} armelf_linux_eabi "$(tdir_armelf_linux_abi)"
-earmelfb_linux.c: $(srcdir)/emulparams/armelfb_linux.sh \
- $(srcdir)/emulparams/armelf_linux.sh \
- $(ELF_DEPS) $(srcdir)/emultempl/armelf.em \
- $(srcdir)/scripttempl/elf.sc ${GEN_DEPENDS}
- ${GENSCRIPTS} armelfb_linux "$(tdir_armelfb_linux)"
-earmelfb_linux_eabi.c: $(srcdir)/emulparams/armelfb_linux_eabi.sh \
- $(srcdir)/emulparams/armelf_linux_eabi.sh \
- $(srcdir)/emulparams/armelf_linux.sh \
- $(ELF_DEPS) $(srcdir)/emultempl/armelf.em \
- $(srcdir)/scripttempl/elf.sc ${GEN_DEPENDS}
- ${GENSCRIPTS} armelfb_linux_eabi "$(tdir_armelfb_linux_abi)"
-earmelf_nbsd.c: $(srcdir)/emulparams/armelf_nbsd.sh \
- $(srcdir)/emulparams/armelf.sh \
- $(ELF_DEPS) $(srcdir)/emultempl/armelf.em \
- $(srcdir)/scripttempl/elf.sc ${GEN_DEPENDS}
- ${GENSCRIPTS} armelf_nbsd "$(tdir_armelf_nbsd)"
-earmelfb_nbsd.c: $(srcdir)/emulparams/armelfb_nbsd.sh \
- $(srcdir)/emulparams/armelf_nbsd.sh \
- $(srcdir)/emulparams/armelf.sh \
- $(ELF_DEPS) $(srcdir)/emultempl/armelf.em \
- $(srcdir)/scripttempl/elf.sc ${GEN_DEPENDS}
- ${GENSCRIPTS} armelfb_nbsd "$(tdir_armelfb_nbsd)"
-earmelf_vxworks.c: $(srcdir)/emulparams/armelf_vxworks.sh \
- $(srcdir)/emulparams/vxworks.sh $(srcdir)/emulparams/armelf.sh \
- $(ELF_DEPS) $(srcdir)/emultempl/vxworks.em \
- $(srcdir)/emultempl/armelf.em $(srcdir)/scripttempl/elf.sc \
- ${GEN_DEPENDS}
- ${GENSCRIPTS} armelf_vxworks "$(tdir_armelf)"
-earmaoutb.c: $(srcdir)/emulparams/armaoutb.sh \
- $(srcdir)/emultempl/generic.em $(srcdir)/scripttempl/armaout.sc ${GEN_DEPENDS}
- ${GENSCRIPTS} armaoutb "$(tdir_armaoutb)"
-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 \
- $(ELF_DEPS) $(srcdir)/emultempl/armelf.em \
- $(srcdir)/scripttempl/elf.sc ${GEN_DEPENDS}
- ${GENSCRIPTS} armnto "$(tdir_armnto)"
-earm_epoc_pe.c: $(srcdir)/emulparams/arm_epoc_pe.sh \
- $(srcdir)/emultempl/pe.em $(srcdir)/scripttempl/epocpe.sc ${GEN_DEPENDS}
- ${GENSCRIPTS} arm_epoc_pe "$(tdir_armpe)"
-earm_wince_pe.c: $(srcdir)/emulparams/arm_wince_pe.sh \
- $(srcdir)/emultempl/pe.em $(srcdir)/scripttempl/pe.sc ${GEN_DEPENDS}
- ${GENSCRIPTS} arm_wince_pe "$(tdir_armpe)"
-earmpe.c: $(srcdir)/emulparams/armpe.sh \
- $(srcdir)/emultempl/pe.em $(srcdir)/scripttempl/pe.sc ${GEN_DEPENDS}
- ${GENSCRIPTS} armpe "$(tdir_armpe)"
-earmsymbian.c: $(srcdir)/emulparams/armsymbian.sh \
- $(srcdir)/emulparams/armelf.sh $(ELF_DEPS) \
- $(srcdir)/emultempl/armelf.em $(srcdir)/scripttempl/armbpabi.sc \
- ${GEN_DEPENDS}
- ${GENSCRIPTS} armsymbian "$(tdir_armelf)"
-eavr2.c: $(srcdir)/emulparams/avr2.sh $(srcdir)/emultempl/avrelf.em \
- $(ELF_DEPS) $(srcdir)/scripttempl/avr.sc \
- ${GEN_DEPENDS}
- ${GENSCRIPTS} avr2 "$(tdir_avr2)"
-eavr1.c: $(srcdir)/emulparams/avr1.sh $(srcdir)/emultempl/avrelf.em \
- $(ELF_DEPS) $(srcdir)/scripttempl/avr.sc \
- ${GEN_DEPENDS}
- ${GENSCRIPTS} avr1 "$(tdir_avr2)"
-eavr3.c: $(srcdir)/emulparams/avr3.sh $(srcdir)/emultempl/avrelf.em \
- $(ELF_DEPS) $(srcdir)/scripttempl/avr.sc \
- ${GEN_DEPENDS}
- ${GENSCRIPTS} avr3 "$(tdir_avr2)"
-eavr4.c: $(srcdir)/emulparams/avr4.sh $(srcdir)/emultempl/avrelf.em \
- $(ELF_DEPS) $(srcdir)/scripttempl/avr.sc \
- ${GEN_DEPENDS}
- ${GENSCRIPTS} avr4 "$(tdir_avr2)"
-eavr5.c: $(srcdir)/emulparams/avr5.sh $(srcdir)/emultempl/avrelf.em \
- $(ELF_DEPS) $(srcdir)/scripttempl/avr.sc \
- ${GEN_DEPENDS}
- ${GENSCRIPTS} avr5 "$(tdir_avr2)"
-eavr6.c: $(srcdir)/emulparams/avr6.sh $(srcdir)/emultempl/avrelf.em \
- $(ELF_DEPS) $(srcdir)/scripttempl/avr.sc \
- ${GEN_DEPENDS}
- ${GENSCRIPTS} avr6 "$(tdir_avr2)"
-ecoff_i860.c: $(srcdir)/emulparams/coff_i860.sh \
- $(srcdir)/emultempl/generic.em $(srcdir)/scripttempl/i860coff.sc ${GEN_DEPENDS}
- ${GENSCRIPTS} coff_i860 "$(tdir_coff_i860)"
-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 \
- $(ELF_DEPS) $(srcdir)/scripttempl/elf.sc ${GEN_DEPENDS}
- ${GENSCRIPTS} criself "$(tdir_cris)"
-ecrislinux.c: $(srcdir)/emulparams/crislinux.sh \
- $(ELF_DEPS) $(srcdir)/scripttempl/elf.sc ${GEN_DEPENDS}
- ${GENSCRIPTS} crislinux "$(tdir_cris)"
-ed10velf.c: $(srcdir)/emulparams/d10velf.sh \
- $(ELF_DEPS) $(srcdir)/scripttempl/elfd10v.sc ${GEN_DEPENDS}
- ${GENSCRIPTS} d10velf "$(tdir_d10v)"
-ed30velf.c: $(srcdir)/emulparams/d30velf.sh \
- $(ELF_GEN_DEPS) $(srcdir)/scripttempl/elfd30v.sc ${GEN_DEPENDS}
- ${GENSCRIPTS} d30velf "$(tdir_d30v)"
-ed30v_o.c: $(srcdir)/emulparams/d30v_o.sh \
- $(ELF_GEN_DEPS) $(srcdir)/scripttempl/elfd30v.sc ${GEN_DEPENDS}
- ${GENSCRIPTS} d30v_o "$(tdir_d30v)"
-ed30v_e.c: $(srcdir)/emulparams/d30v_e.sh \
- $(ELF_GEN_DEPS) $(srcdir)/scripttempl/elfd30v.sc ${GEN_DEPENDS}
- ${GENSCRIPTS} d30v_e "$(tdir_d30v)"
-edelta68.c: $(srcdir)/emulparams/delta68.sh \
- $(srcdir)/emultempl/generic.em $(srcdir)/scripttempl/delta68.sc ${GEN_DEPENDS}
- ${GENSCRIPTS} delta68 "$(tdir_delta68)"
-eelf32bfin.c: $(srcdir)/emulparams/bfin.sh \
- $(ELF_DEPS) \
- $(srcdir)/scripttempl/elf.sc ${GEN_DEPENDS}
- ${GENSCRIPTS} elf32bfin "$(tdir_elf32bfin)" bfin
-eelf32bfinfd.c: $(srcdir)/emulparams/elf32bfinfd.sh $(srcdir)/emulparams/bfin.sh \
- $(ELF_DEPS) \
- $(srcdir)/scripttempl/elf.sc ${GEN_DEPENDS}
- ${GENSCRIPTS} elf32bfinfd "$(tdir_elf32bfinfd)" elf32bfinfd
-eelf32_dlx.c: $(srcdir)/emulparams/elf32_dlx.sh \
- $(ELF_GEN_DEPS) $(srcdir)/scripttempl/dlx.sc ${GEN_DEPENDS}
- ${GENSCRIPTS} elf32_dlx "$(tdir_elf32_dlx)"
-eelf32xc16x.c: $(srcdir)/emulparams/elf32xc16x.sh \
- $(ELF_DEPS) $(srcdir)/emultempl/needrelax.em \
- $(srcdir)/scripttempl/elf.sc ${GEN_DEPENDS}
- ${GENSCRIPTS} elf32xc16x "$(tdir_xc16x)"
-eelf32xc16xl.c: $(srcdir)/emulparams/elf32xc16xl.sh \
- $(ELF_DEPS) $(srcdir)/emultempl/needrelax.em \
- $(srcdir)/scripttempl/elf.sc ${GEN_DEPENDS}
- ${GENSCRIPTS} elf32xc16xl "$(tdir_xc16xl)"
-eelf32xc16xs.c: $(srcdir)/emulparams/elf32xc16xs.sh \
- $(ELF_DEPS) $(srcdir)/emultempl/needrelax.em \
- $(srcdir)/scripttempl/elf.sc ${GEN_DEPENDS}
- ${GENSCRIPTS} elf32xc16xs "$(tdir_xc16xs)"
-eelf32xstormy16.c: $(srcdir)/emulparams/elf32xstormy16.sh \
- $(ELF_DEPS) $(srcdir)/emultempl/needrelax.em \
- $(srcdir)/scripttempl/xstormy16.sc ${GEN_DEPENDS}
- ${GENSCRIPTS} elf32xstormy16 "$(tdir_xstormy16)"
-eelf32am33lin.c: $(srcdir)/emulparams/elf32am33lin.sh \
- $(ELF_DEPS) $(srcdir)/scripttempl/elf.sc ${GEN_DEPENDS}
- ${GENSCRIPTS} elf32am33lin "$(tdir_mn10300)"
-eelf32vax.c: $(srcdir)/emulparams/elf32vax.sh \
- $(ELF_DEPS) $(srcdir)/scripttempl/elf.sc ${GEN_DEPENDS}
- ${GENSCRIPTS} elf32vax "$(tdir_elf32vax)"
-eelf32xtensa.c: $(srcdir)/emulparams/elf32xtensa.sh $(ELF_DEPS) \
- $(srcdir)/emultempl/xtensaelf.em $(INCDIR)/xtensa-config.h \
- $(BFDDIR)/elf-bfd.h $(BFDDIR)/libbfd.h $(INCDIR)/elf/xtensa.h \
- $(srcdir)/scripttempl/elfxtensa.sc ${GEN_DEPENDS}
- ${GENSCRIPTS} elf32xtensa "$(tdir_elf32xtensa)"
-eelf32fr30.c: $(srcdir)/emulparams/elf32fr30.sh \
- $(ELF_GEN_DEPS) $(srcdir)/scripttempl/elf.sc ${GEN_DEPENDS}
- ${GENSCRIPTS} elf32fr30 "$(tdir_fr30)"
-eelf32frv.c: $(srcdir)/emulparams/elf32frv.sh \
- $(ELF_GEN_DEPS) $(srcdir)/scripttempl/elf.sc ${GEN_DEPENDS}
- ${GENSCRIPTS} elf32frv "$(tdir_frv)"
-eelf32frvfd.c: $(srcdir)/emulparams/elf32frvfd.sh \
- $(srcdir)/emulparams/elf32frv.sh \
- $(ELF_DEPS) $(srcdir)/scripttempl/elf.sc ${GEN_DEPENDS}
- ${GENSCRIPTS} elf32frvfd "$(tdir_frv)"
-eelf32mcore.c: $(srcdir)/emulparams/elf32mcore.sh \
- $(ELF_DEPS) $(srcdir)/scripttempl/elf.sc ${GEN_DEPENDS}
- ${GENSCRIPTS} elf32mcore "$(tdir_mcore)"
-eelf32mep.c: $(srcdir)/emulparams/elf32mep.sh \
- $(srcdir)/emultempl/elf32.em $(srcdir)/scripttempl/mep.sc ${GEN_DEPENDS}
- ${GENSCRIPTS} elf32mep "$(tdir_mep)"
-em32relf.c: $(srcdir)/emulparams/m32relf.sh \
- $(ELF_DEPS) $(srcdir)/scripttempl/elf.sc ${GEN_DEPENDS}
- ${GENSCRIPTS} m32relf "$(tdir_m32r)"
-em32rlelf.c: $(srcdir)/emulparams/m32rlelf.sh \
- $(ELF_DEPS) $(srcdir)/scripttempl/elf.sc ${GEN_DEPENDS}
- ${GENSCRIPTS} m32rlelf "$(tdir_m32rlelf)"
-em32relf_linux.c: $(srcdir)/emulparams/m32relf_linux.sh \
- $(ELF_DEPS) $(srcdir)/scripttempl/elf.sc ${GEN_DEPENDS}
- ${GENSCRIPTS} m32relf_linux "$(tdir_m32relf_linux)"
-em32rlelf_linux.c: $(srcdir)/emulparams/m32rlelf_linux.sh \
- $(ELF_DEPS) $(srcdir)/scripttempl/elf.sc ${GEN_DEPENDS}
- ${GENSCRIPTS} m32rlelf_linux "$(tdir_m32rlelf_linux)"
-eelf32_sparc.c: $(srcdir)/emulparams/elf32_sparc.sh \
- $(ELF_DEPS) $(srcdir)/scripttempl/elf.sc ${GEN_DEPENDS}
- ${GENSCRIPTS} elf32_sparc "$(tdir_elf32_sparc)"
-eelf32_sparc_vxworks.c: $(srcdir)/emulparams/elf32_sparc_vxworks.sh \
- $(srcdir)/emulparams/vxworks.sh $(srcdir)/emulparams/elf32_sparc.sh \
- $(srcdir)/emultempl/vxworks.em $(ELF_DEPS) \
- $(srcdir)/scripttempl/elf.sc ${GEN_DEPENDS}
- ${GENSCRIPTS} elf32_sparc_vxworks "$(tdir_elf32_sparc_vxworks)"
-eelf32_spu.c: $(srcdir)/emulparams/elf32_spu.sh $(srcdir)/emultempl/spuelf.em \
- $(srcdir)/emultempl/spu_ovl.o \
- ldemul-list.h \
- $(ELF_DEPS) $(srcdir)/scripttempl/elf.sc ${GEN_DEPENDS}
- ${GENSCRIPTS} elf32_spu "$(tdir_elf32_spu)"
-$(srcdir)/emultempl/spu_ovl.o: @MAINT@ $(srcdir)/emultempl/spu_ovl.S
- cpp -DOVLY_IRQ_SAVE $(srcdir)/emultempl/spu_ovl.S spu_ovl.s
- if ../gas/as-new --version \
- | grep 'target.*spu' >/dev/null 2>/dev/null; then \
- ../gas/as-new -o $@ spu_ovl.s; \
- fi
-eelf32_i860.c: $(srcdir)/emulparams/elf32_i860.sh \
- $(ELF_GEN_DEPS) $(srcdir)/scripttempl/elf.sc ${GEN_DEPENDS}
- ${GENSCRIPTS} elf32_i860 "$(tdir_elf32_i860)"
-eelf32_i960.c: $(srcdir)/emulparams/elf32_i960.sh \
- $(ELF_DEPS) $(srcdir)/scripttempl/elf.sc ${GEN_DEPENDS}
- ${GENSCRIPTS} elf32_i960 "$(tdir_elf32_i960)"
-eelf32b4300.c: $(srcdir)/emulparams/elf32b4300.sh \
- $(srcdir)/emulparams/elf32bmip.sh $(ELF_DEPS) \
- $(srcdir)/emultempl/mipself.em $(srcdir)/scripttempl/elf.sc ${GEN_DEPENDS}
- ${GENSCRIPTS} elf32b4300 "$(tdir_elf32b4300)"
-eelf32cr16.c: $(srcdir)/emulparams/elf32cr16.sh \
- $(srcdir)/emultempl/elf32.em $(srcdir)/emultempl/cr16elf.em \
- $(srcdir)/scripttempl/elf32cr16.sc ${GEN_DEPENDS}
- ${GENSCRIPTS} elf32cr16 "$(tdir_elf32crx)"
-eelf32cr16c.c: $(srcdir)/emulparams/elf32cr16c.sh \
- $(ELF_DEPS) \
- $(srcdir)/scripttempl/elf32cr16c.sc ${GEN_DEPENDS}
- ${GENSCRIPTS} elf32cr16c "$(tdir_elf32cr16c)"
-eelf32bmip.c: $(srcdir)/emulparams/elf32bmip.sh $(ELF_DEPS) \
- $(srcdir)/emultempl/mipself.em $(srcdir)/scripttempl/elf.sc ${GEN_DEPENDS}
- ${GENSCRIPTS} elf32bmip "$(tdir_elf32bmip)"
-eelf32bsmip.c: $(srcdir)/emulparams/elf32bsmip.sh \
- $(srcdir)/emulparams/elf32bmip.sh $(ELF_DEPS) $(srcdir)/emultempl/irix.em \
- $(srcdir)/emultempl/mipself.em $(srcdir)/scripttempl/elf.sc ${GEN_DEPENDS}
- ${GENSCRIPTS} elf32bsmip "$(tdir_elf32bsmip)"
-eelf32btsmip.c: $(srcdir)/emulparams/elf32btsmip.sh \
- $(srcdir)/emulparams/elf32bmip.sh $(ELF_DEPS) \
- $(srcdir)/emultempl/mipself.em $(srcdir)/scripttempl/elf.sc ${GEN_DEPENDS}
- ${GENSCRIPTS} elf32btsmip "$(tdir_elf32btsmip)"
-eelf32crx.c: $(srcdir)/emulparams/elf32crx.sh \
- $(ELF_DEPS) $(srcdir)/emultempl/crxelf.em \
- $(srcdir)/scripttempl/elf32crx.sc ${GEN_DEPENDS}
- ${GENSCRIPTS} elf32crx "$(tdir_elf32crx)"
-eelf32btsmipn32.c: $(srcdir)/emulparams/elf32btsmipn32.sh \
- $(srcdir)/emulparams/elf32bmipn32-defs.sh $(ELF_DEPS) \
- $(srcdir)/emultempl/mipself.em $(srcdir)/scripttempl/elf.sc ${GEN_DEPENDS}
- ${GENSCRIPTS} elf32btsmipn32 "$(tdir_elf32btsmipn32)"
-eelf32ltsmip.c: $(srcdir)/emulparams/elf32ltsmip.sh \
- $(srcdir)/emulparams/elf32btsmip.sh $(srcdir)/emulparams/elf32bmip.sh \
- $(ELF_DEPS) $(srcdir)/emultempl/mipself.em $(srcdir)/scripttempl/elf.sc \
- ${GEN_DEPENDS}
- ${GENSCRIPTS} elf32ltsmip "$(tdir_elf32ltsmip)"
-eelf32ltsmipn32.c: $(srcdir)/emulparams/elf32ltsmipn32.sh \
- $(srcdir)/emulparams/elf32btsmipn32.sh \
- $(srcdir)/emulparams/elf32bmipn32-defs.sh $(ELF_DEPS) \
- $(srcdir)/emultempl/mipself.em $(srcdir)/scripttempl/elf.sc ${GEN_DEPENDS}
- ${GENSCRIPTS} elf32ltsmipn32 "$(tdir_elf32ltsmipn32)"
-eelf32ebmip.c: $(srcdir)/emulparams/elf32ebmip.sh \
- $(srcdir)/emulparams/elf32bmip.sh $(ELF_DEPS) \
- $(srcdir)/emultempl/mipself.em $(srcdir)/scripttempl/elf.sc ${GEN_DEPENDS}
- ${GENSCRIPTS} elf32ebmip "$(tdir_elf32ebmip)"
-eelf32ebmipvxworks.c: $(srcdir)/emulparams/elf32ebmipvxworks.sh \
- $(srcdir)/emulparams/elf32bmip.sh $(srcdir)/emulparams/vxworks.sh \
- $(ELF_DEPS) $(srcdir)/emultempl/generic.em $(srcdir)/emultempl/mipself.em \
- $(srcdir)/emultempl/vxworks.em $(srcdir)/scripttempl/elf.sc ${GEN_DEPENDS}
- ${GENSCRIPTS} elf32ebmipvxworks "$(tdir_elf32ebmipvxworks)"
-eelf32elmip.c: $(srcdir)/emulparams/elf32elmip.sh \
- $(srcdir)/emulparams/elf32lmip.sh $(srcdir)/emulparams/elf32bmip.sh \
- $(ELF_DEPS) $(srcdir)/emultempl/mipself.em $(srcdir)/scripttempl/elf.sc \
- ${GEN_DEPENDS}
- ${GENSCRIPTS} elf32elmip "$(tdir_elf32elmip)"
-eelf32elmipvxworks.c: $(srcdir)/emulparams/elf32elmipvxworks.sh \
- $(srcdir)/emulparams/elf32bmip.sh $(srcdir)/emulparams/vxworks.sh \
- $(ELF_DEPS) $(srcdir)/emultempl/generic.em $(srcdir)/emultempl/mipself.em \
- $(srcdir)/emultempl/vxworks.em $(srcdir)/scripttempl/elf.sc ${GEN_DEPENDS}
- ${GENSCRIPTS} elf32elmipvxworks "$(tdir_elf32elmipvxworks)"
-eelf32bmipn32.c: $(srcdir)/emulparams/elf32bmipn32.sh \
- $(srcdir)/emulparams/elf32bmipn32-defs.sh $(ELF_DEPS) \
- $(srcdir)/emultempl/irix.em $(srcdir)/emultempl/mipself.em \
- $(srcdir)/scripttempl/elf.sc ${GEN_DEPENDS}
- ${GENSCRIPTS} elf32bmipn32 "$(tdir_elf32bmipn32)"
-eelf32l4300.c: $(srcdir)/emulparams/elf32l4300.sh \
- $(srcdir)/emulparams/elf32b4300.sh $(srcdir)/emulparams/elf32bmip.sh \
- $(ELF_DEPS) $(srcdir)/emultempl/mipself.em $(srcdir)/scripttempl/elf.sc \
- ${GEN_DEPENDS}
- ${GENSCRIPTS} elf32l4300 "$(tdir_elf32l4300)"
-eelf32lmip.c: $(srcdir)/emulparams/elf32lmip.sh \
- $(srcdir)/emulparams/elf32bmip.sh $(ELF_DEPS) \
- $(srcdir)/emultempl/mipself.em $(srcdir)/scripttempl/elf.sc ${GEN_DEPENDS}
- ${GENSCRIPTS} elf32lmip "$(tdir_elf32lmip)"
-eelf32mipswindiss.c: $(srcdir)/emulparams/elf32mipswindiss.sh $(ELF_DEPS) \
- $(srcdir)/scripttempl/elf.sc ${GEN_DEPENDS}
- ${GENSCRIPTS} elf32mipswindiss "$(tdir_elf32mipswindiss)"
-eelf32m32c.c: $(srcdir)/emulparams/elf32m32c.sh \
- $(ELF_DEPS) $(srcdir)/emultempl/needrelax.em \
- $(srcdir)/scripttempl/elf.sc ${GEN_DEPENDS}
- ${GENSCRIPTS} elf32m32c "$(tdir_m32c)"
-eelf32mt.c: $(srcdir)/emulparams/elf32mt.sh \
- $(ELF_GEN_DEPS) $(srcdir)/scripttempl/elf.sc ${GEN_DEPENDS}
- ${GENSCRIPTS} elf32mt "$(tdir_mt)"
-eelf32lppc.c: $(srcdir)/emulparams/elf32lppc.sh \
- $(srcdir)/emulparams/elf32ppccommon.sh \
- $(srcdir)/emulparams/elf32ppc.sh $(srcdir)/emultempl/ppc32elf.em \
- ldemul-list.h \
- $(ELF_DEPS) $(srcdir)/scripttempl/elf.sc ${GEN_DEPENDS}
- ${GENSCRIPTS} elf32lppc "$(tdir_elf32lppc)"
-eelf32lppcnto.c: $(srcdir)/emulparams/elf32lppcnto.sh \
- $(srcdir)/emulparams/elf32ppc.sh $(srcdir)/emulparams/elf32ppccommon.sh \
- $(srcdir)/emultempl/ppc32elf.em $(ELF_DEPS) \
- ldemul-list.h \
- $(srcdir)/scripttempl/elf.sc ${GEN_DEPENDS}
- ${GENSCRIPTS} elf32lppcnto "$(tdir_elf32lppcnto)"
-eelf32lppcsim.c: $(srcdir)/emulparams/elf32lppcsim.sh \
- $(srcdir)/emulparams/elf32lppc.sh $(srcdir)/emulparams/elf32ppc.sh \
- $(srcdir)/emulparams/elf32ppccommon.sh $(srcdir)/emultempl/ppc32elf.em \
- ldemul-list.h \
- $(ELF_DEPS) $(srcdir)/scripttempl/elf.sc ${GEN_DEPENDS}
- ${GENSCRIPTS} elf32lppcsim "$(tdir_elf32lppcsim)"
-eelf32ppcnto.c: $(srcdir)/emulparams/elf32ppcnto.sh \
- $(srcdir)/emulparams/elf32ppc.sh $(srcdir)/emulparams/elf32ppccommon.sh \
- $(srcdir)/emultempl/ppc32elf.em $(ELF_DEPS) \
- ldemul-list.h \
- $(srcdir)/scripttempl/elf.sc ${GEN_DEPENDS}
- ${GENSCRIPTS} elf32ppcnto "$(tdir_elf32ppcnto)"
-eelf32ppcwindiss.c: $(srcdir)/emulparams/elf32ppcwindiss.sh \
- $(ELF_DEPS) $(srcdir)/scripttempl/elf.sc ${GEN_DEPENDS}
- ${GENSCRIPTS} elf32ppcwindiss "$(tdir_elf32ppcwindiss)"
-eelf32ppcvxworks.c: $(srcdir)/emulparams/elf32ppcvxworks.sh \
- $(srcdir)/emulparams/elf32ppccommon.sh $(srcdir)/emulparams/vxworks.sh \
- $(srcdir)/emultempl/vxworks.em $(ELF_DEPS) \
- $(srcdir)/scripttempl/elf.sc ${GEN_DEPENDS}
- ${GENSCRIPTS} elf32ppcvxworks "$(tdir_elf32ppcvxworks)"
-eelf32lsmip.c: $(srcdir)/emulparams/elf32lsmip.sh \
- $(srcdir)/emulparams/elf32lmip.sh $(srcdir)/emulparams/elf32bmip.sh \
- $(ELF_DEPS) $(srcdir)/emultempl/mipself.em $(srcdir)/scripttempl/elf.sc \
- ${GEN_DEPENDS}
- ${GENSCRIPTS} elf32lsmip "$(tdir_elf32lsmip)"
-eelf32openrisc.c: $(srcdir)/emulparams/elf32openrisc.sh \
- $(ELF_DEPS) $(srcdir)/scripttempl/elf.sc ${GEN_DEPENDS}
- ${GENSCRIPTS} elf32openrisc "$(tdir_openrisc)"
-eelf32ppc.c: $(srcdir)/emulparams/elf32ppc.sh \
- $(srcdir)/emulparams/elf32ppccommon.sh $(srcdir)/emultempl/ppc32elf.em \
- ldemul-list.h \
- $(ELF_DEPS) $(srcdir)/scripttempl/elf.sc ${GEN_DEPENDS}
- ${GENSCRIPTS} elf32ppc "$(tdir_elf32ppc)"
-eelf32ppc_fbsd.c: $(srcdir)/emulparams/elf32ppc_fbsd.sh \
- $(srcdir)/emulparams/elf32ppc.sh $(srcdir)/emulparams/elf32ppccommon.sh \
- $(srcdir)/emultempl/ppc32elf.em $(ELF_DEPS) \
- ldemul-list.h \
- $(srcdir)/scripttempl/elf.sc ${GEN_DEPENDS}
- ${GENSCRIPTS} elf32ppc_fbsd "$(tdir_elf32ppc_fbsd)"
-eelf32ppcsim.c: $(srcdir)/emulparams/elf32ppcsim.sh \
- $(srcdir)/emulparams/elf32ppc.sh $(srcdir)/emulparams/elf32ppccommon.sh \
- $(srcdir)/emultempl/ppc32elf.em $(ELF_DEPS) \
- ldemul-list.h \
- $(srcdir)/scripttempl/elf.sc ${GEN_DEPENDS}
- ${GENSCRIPTS} elf32ppcsim "$(tdir_elf32ppcsim)"
-eelf32ppclinux.c: $(srcdir)/emulparams/elf32ppclinux.sh \
- $(srcdir)/emulparams/elf32ppc.sh $(srcdir)/emulparams/elf32ppccommon.sh \
- $(srcdir)/emultempl/ppc32elf.em $(ELF_DEPS) \
- ldemul-list.h \
- $(srcdir)/scripttempl/elf.sc ${GEN_DEPENDS}
- ${GENSCRIPTS} elf32ppclinux "$(tdir_elf32ppclinux)"
-eelf64ppc.c: $(srcdir)/emulparams/elf64ppc.sh $(srcdir)/emultempl/ppc64elf.em \
- ldemul-list.h \
- $(ELF_DEPS) $(srcdir)/scripttempl/elf.sc ${GEN_DEPENDS}
- ${GENSCRIPTS} elf64ppc "$(tdir_elf64ppc)"
-eelf64lppc.c: $(srcdir)/emulparams/elf64lppc.sh \
- $(srcdir)/emulparams/elf64ppc.sh $(srcdir)/emultempl/ppc64elf.em \
- ldemul-list.h \
- $(ELF_DEPS) $(srcdir)/scripttempl/elf.sc ${GEN_DEPENDS}
- ${GENSCRIPTS} elf64lppc "$(tdir_elf64lppc)"
-eelf32i370.c: $(srcdir)/emulparams/elf32i370.sh \
- $(ELF_DEPS) $(srcdir)/scripttempl/elfi370.sc ${GEN_DEPENDS}
- ${GENSCRIPTS} elf32i370 "$(tdir_elf32i370)"
-eelf32ip2k.c: $(srcdir)/emulparams/elf32ip2k.sh \
- $(ELF_DEPS) $(srcdir)/scripttempl/ip2k.sc ${GEN_DEPENDS}
- ${GENSCRIPTS} elf32ip2k "$(tdir_ip2k)"
-eelf32iq2000.c: $(srcdir)/emulparams/elf32iq2000.sh \
- $(ELF_GEN_DEPS) $(srcdir)/scripttempl/iq2000.sc ${GEN_DEPENDS}
- ${GENSCRIPTS} elf32iq2000 "$(tdir_iq2000)"
-eelf32iq10.c: $(srcdir)/emulparams/elf32iq10.sh \
- $(ELF_GEN_DEPS) $(srcdir)/scripttempl/iq2000.sc ${GEN_DEPENDS}
- ${GENSCRIPTS} elf32iq10 "$(tdir_iq10)"
-eelf64alpha.c: $(srcdir)/emulparams/elf64alpha.sh \
- $(ELF_DEPS) $(srcdir)/emultempl/alphaelf.em \
- $(srcdir)/scripttempl/elf.sc ${GEN_DEPENDS}
- ${GENSCRIPTS} elf64alpha "$(tdir_elf64alpha)"
-eelf64alpha_fbsd.c: $(srcdir)/emulparams/elf64alpha_fbsd.sh \
- $(srcdir)/emulparams/elf64alpha.sh \
- $(ELF_DEPS) $(srcdir)/emultempl/alphaelf.em \
- $(srcdir)/scripttempl/elf.sc ${GEN_DEPENDS}
- ${GENSCRIPTS} elf64alpha_fbsd "$(tdir_elf64alpha_fbsd)"
-eelf64alpha_nbsd.c: $(srcdir)/emulparams/elf64alpha_nbsd.sh \
- $(srcdir)/emulparams/elf64alpha.sh \
- $(ELF_DEPS) $(srcdir)/emultempl/alphaelf.em \
- $(srcdir)/scripttempl/elf.sc ${GEN_DEPENDS}
- ${GENSCRIPTS} elf64alpha_nbsd "$(tdir_elf64alpha_nbsd)"
-eelf64hppa.c: $(srcdir)/emulparams/elf64hppa.sh \
- $(srcdir)/emulparams/hppa64linux.sh \
- $(ELF_DEPS) $(srcdir)/scripttempl/elf.sc ${GEN_DEPENDS}
- ${GENSCRIPTS} elf64hppa "$(tdir_elf64hppa)"
-eelf64_aix.c: $(srcdir)/emulparams/elf64_aix.sh \
- $(ELF_DEPS) $(srcdir)/scripttempl/elf.sc ${GEN_DEPENDS}
- ${GENSCRIPTS} elf64_aix "$(tdir_elf64_aix)"
-eelf64_ia64.c: $(srcdir)/emulparams/elf64_ia64.sh \
- $(ELF_DEPS) $(srcdir)/emultempl/ia64elf.em \
- $(srcdir)/emultempl/needrelax.em \
- $(srcdir)/scripttempl/elf.sc ${GEN_DEPENDS}
- ${GENSCRIPTS} elf64_ia64 "$(tdir_elf64_ia64)"
-eelf64_ia64_fbsd.c: $(srcdir)/emulparams/elf64_ia64_fbsd.sh \
- $(srcdir)/emulparams/elf64_ia64.sh \
- $(ELF_DEPS) $(srcdir)/emultempl/ia64elf.em \
- $(srcdir)/emultempl/needrelax.em \
- $(srcdir)/scripttempl/elf.sc ${GEN_DEPENDS}
- ${GENSCRIPTS} elf64_ia64_fbsd "$(tdir_elf64_ia64_fbsd)"
-eelf64_s390.c: $(srcdir)/emulparams/elf64_s390.sh \
- $(ELF_DEPS) $(srcdir)/scripttempl/elf.sc ${GEN_DEPENDS}
- ${GENSCRIPTS} elf64_s390 "$(tdir_elf64_s390)"
-eelf64_sparc.c: $(srcdir)/emulparams/elf64_sparc.sh \
- $(ELF_DEPS) $(srcdir)/scripttempl/elf.sc ${GEN_DEPENDS}
- ${GENSCRIPTS} elf64_sparc "$(tdir_elf64_sparc)"
-eelf64_sparc_fbsd.c: $(srcdir)/emulparams/elf64_sparc_fbsd.sh \
- $(srcdir)/emulparams/elf64_sparc.sh \
- $(ELF_DEPS) $(srcdir)/scripttempl/elf.sc ${GEN_DEPENDS}
- ${GENSCRIPTS} elf64_sparc_fbsd "$(tdir_elf64_sparc_fbsd)"
-eelf64bmip.c: $(srcdir)/emulparams/elf64bmip.sh \
- $(srcdir)/emulparams/elf64bmip-defs.sh \
- $(srcdir)/emulparams/elf32bmipn32-defs.sh $(ELF_DEPS) \
- $(srcdir)/emultempl/irix.em $(srcdir)/emultempl/mipself.em \
- $(srcdir)/scripttempl/elf.sc ${GEN_DEPENDS}
- ${GENSCRIPTS} elf64bmip "$(tdir_elf64bmip)"
-eelf64mmix.c: $(srcdir)/emulparams/elf64mmix.sh \
- $(ELF_DEPS) $(srcdir)/emultempl/mmix-elfnmmo.em \
- $(srcdir)/emultempl/mmixelf.em $(srcdir)/scripttempl/elf.sc ${GEN_DEPENDS}
- ${GENSCRIPTS} elf64mmix "$(tdir_elf64mmix)"
-emmo.c: $(srcdir)/emulparams/mmo.sh $(srcdir)/emultempl/mmix-elfnmmo.em \
- $(srcdir)/emultempl/generic.em $(srcdir)/emultempl/elf-generic.em \
- $(srcdir)/emultempl/mmo.em \
- $(srcdir)/scripttempl/mmo.sc ${GEN_DEPENDS}
- ${GENSCRIPTS} mmo "$(tdir_mmo)"
-eelf64btsmip.c: $(srcdir)/emulparams/elf64btsmip.sh \
- $(srcdir)/emulparams/elf64bmip-defs.sh \
- $(srcdir)/emulparams/elf32bmipn32-defs.sh $(ELF_DEPS) \
- $(srcdir)/emultempl/mipself.em $(srcdir)/scripttempl/elf.sc ${GEN_DEPENDS}
- ${GENSCRIPTS} elf64btsmip "$(tdir_elf64btsmip)"
-eelf64ltsmip.c: $(srcdir)/emulparams/elf64ltsmip.sh \
- $(srcdir)/emulparams/elf64btsmip.sh $(srcdir)/emulparams/elf64bmip-defs.sh \
- $(srcdir)/emulparams/elf32bmipn32-defs.sh $(ELF_DEPS) \
- $(srcdir)/emultempl/mipself.em $(srcdir)/scripttempl/elf.sc ${GEN_DEPENDS}
- ${GENSCRIPTS} elf64ltsmip "$(tdir_elf64ltsmip)"
-eelf_i386.c: $(srcdir)/emulparams/elf_i386.sh \
- $(ELF_DEPS) $(srcdir)/scripttempl/elf.sc ${GEN_DEPENDS}
- ${GENSCRIPTS} elf_i386 "$(tdir_elf_i386)"
-eelf_x86_64.c: $(srcdir)/emulparams/elf_x86_64.sh \
- $(ELF_DEPS) $(srcdir)/scripttempl/elf.sc ${GEN_DEPENDS}
- ${GENSCRIPTS} elf_x86_64 "$(tdir_elf_x86_64)"
-eelf_x86_64_fbsd.c: $(srcdir)/emulparams/elf_x86_64_fbsd.sh \
- $(srcdir)/emulparams/elf_x86_64.sh \
- $(ELF_DEPS) $(srcdir)/scripttempl/elf.sc ${GEN_DEPENDS}
- ${GENSCRIPTS} elf_x86_64_fbsd "$(tdir_elf_x86_64_fbsd)"
-eelf_i386_be.c: $(srcdir)/emulparams/elf_i386_be.sh \
- $(ELF_DEPS) $(srcdir)/scripttempl/elf.sc ${GEN_DEPENDS}
- ${GENSCRIPTS} elf_i386_be "$(tdir_elf_i386_be)"
-eelf_i386_chaos.c: $(srcdir)/emulparams/elf_i386_chaos.sh \
- $(ELF_DEPS) $(srcdir)/scripttempl/elf_chaos.sc ${GEN_DEPENDS}
- ${GENSCRIPTS} elf_i386_chaos "$(tdir_elf_i386_chaos)"
-eelf_i386_fbsd.c: $(srcdir)/emulparams/elf_i386_fbsd.sh \
- $(srcdir)/emulparams/elf_i386.sh \
- $(ELF_DEPS) $(srcdir)/scripttempl/elf.sc ${GEN_DEPENDS}
- ${GENSCRIPTS} elf_i386_fbsd "$(tdir_elf_i386_fbsd)"
-eelf_i386_ldso.c: $(srcdir)/emulparams/elf_i386_ldso.sh \
- $(ELF_DEPS) $(srcdir)/scripttempl/elf.sc ${GEN_DEPENDS}
- ${GENSCRIPTS} elf_i386_ldso "$(tdir_elf_i386_ldso)"
-eelf_i386_vxworks.c: $(srcdir)/emulparams/elf_i386_vxworks.sh \
- $(srcdir)/emulparams/vxworks.sh $(srcdir)/emultempl/vxworks.em \
- $(ELF_DEPS) $(srcdir)/scripttempl/elf.sc ${GEN_DEPENDS}
- ${GENSCRIPTS} elf_i386_vxworks "$(tdir_elf_i386_vxworks)"
-eelf_s390.c: $(srcdir)/emulparams/elf_s390.sh \
- $(ELF_DEPS) $(srcdir)/scripttempl/elf.sc ${GEN_DEPENDS}
- ${GENSCRIPTS} elf_s390 "$(tdir_elf_s390)"
-egld960.c: $(srcdir)/emulparams/gld960.sh \
- $(srcdir)/emultempl/gld960.em $(srcdir)/scripttempl/i960.sc ${GEN_DEPENDS}
- ${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 \
- $(ELF_DEPS) $(srcdir)/scripttempl/elf.sc ${GEN_DEPENDS}
- ${GENSCRIPTS} h8300elf "$(tdir_h8300elf)"
-eh8300helf.c: $(srcdir)/emulparams/h8300helf.sh \
- $(srcdir)/emulparams/h8300elf.sh \
- $(ELF_DEPS) $(srcdir)/scripttempl/elf.sc ${GEN_DEPENDS}
- ${GENSCRIPTS} h8300helf "$(tdir_h8300helf)"
-eh8300self.c: $(srcdir)/emulparams/h8300self.sh \
- $(srcdir)/emulparams/h8300elf.sh \
- $(ELF_DEPS) $(srcdir)/scripttempl/elf.sc ${GEN_DEPENDS}
- ${GENSCRIPTS} h8300self "$(tdir_h8300self)"
-eh8300hnelf.c: $(srcdir)/emulparams/h8300hnelf.sh \
- $(srcdir)/emulparams/h8300elf.sh \
- $(ELF_DEPS) $(srcdir)/scripttempl/elf.sc ${GEN_DEPENDS}
- ${GENSCRIPTS} h8300hnelf "$(tdir_h8300hnelf)"
-eh8300snelf.c: $(srcdir)/emulparams/h8300snelf.sh \
- $(srcdir)/emulparams/h8300elf.sh \
- $(ELF_DEPS) $(srcdir)/scripttempl/elf.sc ${GEN_DEPENDS}
- ${GENSCRIPTS} h8300snelf "$(tdir_h8300snelf)"
-eh8300sxelf.c: $(srcdir)/emulparams/h8300sxelf.sh \
- $(srcdir)/emulparams/h8300elf.sh \
- $(ELF_DEPS) $(srcdir)/scripttempl/elf.sc ${GEN_DEPENDS}
- ${GENSCRIPTS} h8300sxelf "$(tdir_h8300sxelf)"
-eh8300sxnelf.c: $(srcdir)/emulparams/h8300sxnelf.sh \
- $(srcdir)/emulparams/h8300elf.sh \
- $(ELF_DEPS) $(srcdir)/scripttempl/elf.sc ${GEN_DEPENDS}
- ${GENSCRIPTS} h8300sxnelf "$(tdir_h8300sxnelf)"
-eh8500.c: $(srcdir)/emulparams/h8500.sh \
- $(srcdir)/emultempl/generic.em $(srcdir)/scripttempl/h8500.sc ${GEN_DEPENDS}
- ${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 \
- $(ELF_DEPS) $(srcdir)/emultempl/hppaelf.em \
- $(srcdir)/scripttempl/hppaelf.sc ${GEN_DEPENDS}
- ${GENSCRIPTS} hppaelf "$(tdir_hppaelf)"
-ehppalinux.c: $(srcdir)/emulparams/hppalinux.sh \
- $(ELF_DEPS) $(srcdir)/emultempl/hppaelf.em \
- $(srcdir)/scripttempl/elf.sc ${GEN_DEPENDS}
- ${GENSCRIPTS} hppalinux "$(tdir_hppalinux)"
-ehppanbsd.c: $(srcdir)/emulparams/hppanbsd.sh \
- $(srcdir)/emulparams/hppaelf.sh \
- $(ELF_DEPS) $(srcdir)/emultempl/hppaelf.em \
- $(srcdir)/scripttempl/elf.sc ${GEN_DEPENDS}
- ${GENSCRIPTS} hppanbsd "$(tdir_hppanbsd)"
-ehppaobsd.c: $(srcdir)/emulparams/hppaobsd.sh \
- $(ELF_DEPS) $(srcdir)/emultempl/hppaelf.em \
- $(srcdir)/scripttempl/elf.sc ${GEN_DEPENDS}
- ${GENSCRIPTS} hppaobsd "$(tdir_hppaobsd)"
-ehppa64linux.c: $(srcdir)/emulparams/hppa64linux.sh \
- $(ELF_DEPS) $(srcdir)/scripttempl/elf.sc ${GEN_DEPENDS}
- ${GENSCRIPTS} hppa64linux "$(tdir_hppa64linux)"
-ei386aout.c: $(srcdir)/emulparams/i386aout.sh \
- $(srcdir)/emultempl/generic.em $(srcdir)/scripttempl/aout.sc ${GEN_DEPENDS}
- ${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 \
- $(ELF_DEPS) $(srcdir)/scripttempl/elf.sc ${GEN_DEPENDS}
- ${GENSCRIPTS} i386lynx "$(tdir_i386lynx)"
-ei386mach.c: $(srcdir)/emulparams/i386mach.sh \
- $(srcdir)/emultempl/generic.em $(srcdir)/scripttempl/aout.sc ${GEN_DEPENDS}
- ${GENSCRIPTS} i386mach "$(tdir_i386mach)"
-ei386moss.c: $(srcdir)/emulparams/i386moss.sh \
- $(ELF_DEPS) $(srcdir)/scripttempl/elf.sc ${GEN_DEPENDS}
- ${GENSCRIPTS} i386moss "$(tdir_i386moss)"
-ei386msdos.c: $(srcdir)/emulparams/i386msdos.sh \
- $(srcdir)/emultempl/generic.em $(srcdir)/scripttempl/i386msdos.sc ${GEN_DEPENDS}
- ${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 \
- $(ELF_DEPS) $(srcdir)/scripttempl/elf.sc ${GEN_DEPENDS}
- ${GENSCRIPTS} i386nto "$(tdir_i386nto)"
-ei386nw.c: $(srcdir)/emulparams/i386nw.sh \
- $(ELF_DEPS) $(srcdir)/scripttempl/nw.sc ${GEN_DEPENDS}
- ${GENSCRIPTS} i386nw "$(tdir_i386nw)"
-ei386pe.c: $(srcdir)/emulparams/i386pe.sh \
- $(srcdir)/emultempl/pe.em $(srcdir)/scripttempl/pe.sc ${GEN_DEPENDS}
- ${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)"
-ei386pep.c: $(srcdir)/emulparams/i386pep.sh \
- $(srcdir)/emultempl/pep.em $(srcdir)/scripttempl/pep.sc ${GEN_DEPENDS}
- ${GENSCRIPTS} i386pep "$(tdir_i386pe)"
-elnk960.c: $(srcdir)/emulparams/lnk960.sh \
- $(srcdir)/emultempl/lnk960.em $(srcdir)/scripttempl/i960.sc ${GEN_DEPENDS}
- ${GENSCRIPTS} lnk960 "$(tdir_lnk960)"
-em68hc11elf.c: $(srcdir)/emulparams/m68hc11elf.sh \
- $(srcdir)/emultempl/m68hc1xelf.em $(ELF_DEPS) \
- $(srcdir)/scripttempl/elfm68hc11.sc ${GEN_DEPENDS}
- ${GENSCRIPTS} m68hc11elf "$(tdir_m68hc11)"
-em68hc11elfb.c: $(srcdir)/emulparams/m68hc11elfb.sh \
- $(srcdir)/emultempl/m68hc1xelf.em $(ELF_DEPS) \
- $(srcdir)/scripttempl/elfm68hc11.sc ${GEN_DEPENDS}
- ${GENSCRIPTS} m68hc11elfb "$(tdir_m68hc11b)"
-em68hc12elf.c: $(srcdir)/emulparams/m68hc12elf.sh \
- $(srcdir)/emultempl/m68hc1xelf.em $(ELF_DEPS) \
- $(srcdir)/scripttempl/elfm68hc12.sc ${GEN_DEPENDS}
- ${GENSCRIPTS} m68hc12elf "$(tdir_m68hc12)"
-em68hc12elfb.c: $(srcdir)/emulparams/m68hc12elfb.sh \
- $(srcdir)/emultempl/m68hc1xelf.em $(ELF_DEPS) \
- $(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 \
- $(ELF_DEPS) $(srcdir)/emultempl/m68kelf.em \
- $(srcdir)/scripttempl/elf.sc ${GEN_DEPENDS}
- ${GENSCRIPTS} m68kelf "$(tdir_m68kelf)"
-em68kelfnbsd.c: $(srcdir)/emulparams/m68kelfnbsd.sh \
- $(srcdir)/emulparams/m68kelf.sh \
- $(ELF_DEPS) $(srcdir)/emultempl/m68kelf.em \
- $(srcdir)/scripttempl/elf.sc ${GEN_DEPENDS}
- ${GENSCRIPTS} m68kelfnbsd "$(tdir_m68kelfnbsd)"
-em68klinux.c: $(srcdir)/emulparams/m68klinux.sh \
- $(srcdir)/emultempl/linux.em $(srcdir)/scripttempl/aout.sc ${GEN_DEPENDS}
- ${GENSCRIPTS} m68klinux "$(tdir_m68klinux)"
-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 \
- $(ELF_DEPS) $(srcdir)/scripttempl/psos.sc ${GEN_DEPENDS}
- ${GENSCRIPTS} m68kpsos "$(tdir_m68kpsos)"
-em88kbcs.c: $(srcdir)/emulparams/m88kbcs.sh \
- $(srcdir)/emultempl/generic.em $(srcdir)/scripttempl/m88kbcs.sc ${GEN_DEPENDS}
- ${GENSCRIPTS} m88kbcs "$(tdir_m88kbcs)"
-emaxqcoff.c: $(srcdir)/emulparams/maxqcoff.sh \
- $(srcdir)/emultempl/generic.em $(srcdir)/scripttempl/maxqcoff.sc ${GEN_DEPENDS}
- ${GENSCRIPTS} maxqcoff "$(tdir_maxqcoff)"
-emcorepe.c: $(srcdir)/emulparams/mcorepe.sh \
- $(srcdir)/emultempl/pe.em $(srcdir)/scripttempl/pe.sc ${GEN_DEPENDS}
- ${GENSCRIPTS} mcorepe "$(tdir_mcorepe)"
-emipsbig.c: $(srcdir)/emulparams/mipsbig.sh $(srcdir)/emultempl/generic.em \
- $(srcdir)/scripttempl/mips.sc ${GEN_DEPENDS}
- ${GENSCRIPTS} mipsbig "$(tdir_mipsbig)"
-emipsbsd.c: $(srcdir)/emulparams/mipsbsd.sh $(srcdir)/emultempl/generic.em \
- $(srcdir)/scripttempl/mipsbsd.sc ${GEN_DEPENDS}
- ${GENSCRIPTS} mipsbsd "$(tdir_mipsbsd)"
-emipsidt.c: $(srcdir)/emulparams/mipsidt.sh $(srcdir)/emultempl/generic.em \
- $(srcdir)/emultempl/mipsecoff.em $(srcdir)/scripttempl/mips.sc \
- ${GEN_DEPENDS}
- ${GENSCRIPTS} mipsidt "$(tdir_mipsidt)"
-emipsidtl.c: $(srcdir)/emulparams/mipsidtl.sh $(srcdir)/emultempl/generic.em \
- $(srcdir)/emultempl/mipsecoff.em $(srcdir)/scripttempl/mips.sc \
- ${GEN_DEPENDS}
- ${GENSCRIPTS} mipsidtl "$(tdir_mipsidtl)"
-emipslit.c: $(srcdir)/emulparams/mipslit.sh $(srcdir)/emultempl/generic.em \
- $(srcdir)/scripttempl/mips.sc ${GEN_DEPENDS}
- ${GENSCRIPTS} mipslit "$(tdir_mipslit)"
-emipslnews.c: $(srcdir)/emulparams/mipslnews.sh \
- $(srcdir)/emultempl/generic.em $(srcdir)/scripttempl/mips.sc ${GEN_DEPENDS}
- ${GENSCRIPTS} mipslnews "$(tdir_mipslnews)"
-emipspe.c: $(srcdir)/emulparams/mipspe.sh $(srcdir)/emultempl/pe.em \
- $(srcdir)/scripttempl/pe.sc ${GEN_DEPENDS}
- ${GENSCRIPTS} mipspe "$(tdir_mipspe)"
-emn10300.c: $(srcdir)/emulparams/mn10300.sh \
- $(srcdir)/emulparams/mn10200.sh \
- $(ELF_DEPS) $(srcdir)/scripttempl/elf.sc ${GEN_DEPENDS}
- ${GENSCRIPTS} mn10300 "$(tdir_mn10300)"
-emn10200.c: $(srcdir)/emulparams/mn10200.sh \
- $(ELF_GEN_DEPS) $(srcdir)/scripttempl/elf.sc ${GEN_DEPENDS}
- ${GENSCRIPTS} mn10200 "$(tdir_mn10200)"
-emsp430x110.c: $(srcdir)/emulparams/msp430all.sh \
- $(ELF_GEN_DEPS) $(srcdir)/scripttempl/elf32msp430.sc \
- ${GEN_DEPENDS}
- ${GENSCRIPTS} msp430x110 "$(tdir_msp430x110)" msp430all
-emsp430x112.c: $(srcdir)/emulparams/msp430all.sh \
- $(ELF_GEN_DEPS) $(srcdir)/scripttempl/elf32msp430.sc \
- ${GEN_DEPENDS}
- ${GENSCRIPTS} msp430x112 "$(tdir_msp430x112)" msp430all
-emsp430x1101.c: $(srcdir)/emulparams/msp430all.sh \
- $(ELF_GEN_DEPS) $(srcdir)/scripttempl/elf32msp430.sc \
- ${GEN_DEPENDS}
- ${GENSCRIPTS} msp430x1101 "$(tdir_msp430x1101)" msp430all
-emsp430x1111.c: $(srcdir)/emulparams/msp430all.sh \
- $(ELF_GEN_DEPS) $(srcdir)/scripttempl/elf32msp430.sc \
- ${GEN_DEPENDS}
- ${GENSCRIPTS} msp430x1111 "$(tdir_msp430x1111)" msp430all
-emsp430x1121.c: $(srcdir)/emulparams/msp430all.sh \
- $(ELF_GEN_DEPS) $(srcdir)/scripttempl/elf32msp430.sc \
- ${GEN_DEPENDS}
- ${GENSCRIPTS} msp430x1121 "$(tdir_msp430x1121)" msp430all
-emsp430x1122.c: $(srcdir)/emulparams/msp430all.sh \
- $(ELF_GEN_DEPS) $(srcdir)/scripttempl/elf32msp430.sc \
- ${GEN_DEPENDS}
- ${GENSCRIPTS} msp430x1122 "$(tdir_msp430x1122)" msp430all
-emsp430x1132.c: $(srcdir)/emulparams/msp430all.sh \
- $(ELF_GEN_DEPS) $(srcdir)/scripttempl/elf32msp430.sc \
- ${GEN_DEPENDS}
- ${GENSCRIPTS} msp430x1132 "$(tdir_msp430x1132)" msp430all
-emsp430x122.c: $(srcdir)/emulparams/msp430all.sh \
- $(ELF_GEN_DEPS) $(srcdir)/scripttempl/elf32msp430.sc \
- ${GEN_DEPENDS}
- ${GENSCRIPTS} msp430x122 "$(tdir_msp430x122)" msp430all
-emsp430x123.c: $(srcdir)/emulparams/msp430all.sh \
- $(ELF_GEN_DEPS) $(srcdir)/scripttempl/elf32msp430.sc \
- ${GEN_DEPENDS}
- ${GENSCRIPTS} msp430x123 "$(tdir_msp430x123)" msp430all
-emsp430x1222.c: $(srcdir)/emulparams/msp430all.sh \
- $(ELF_GEN_DEPS) $(srcdir)/scripttempl/elf32msp430.sc \
- ${GEN_DEPENDS}
- ${GENSCRIPTS} msp430x1222 "$(tdir_msp430x1222)" msp430all
-emsp430x1232.c: $(srcdir)/emulparams/msp430all.sh \
- $(ELF_GEN_DEPS) $(srcdir)/scripttempl/elf32msp430.sc \
- ${GEN_DEPENDS}
- ${GENSCRIPTS} msp430x1232 "$(tdir_msp430x1232)" msp430all
-emsp430x133.c: $(srcdir)/emulparams/msp430all.sh \
- $(ELF_GEN_DEPS) $(srcdir)/scripttempl/elf32msp430.sc \
- ${GEN_DEPENDS}
- ${GENSCRIPTS} msp430x133 "$(tdir_msp430x133)" msp430all
-emsp430x135.c: $(srcdir)/emulparams/msp430all.sh \
- $(ELF_GEN_DEPS) $(srcdir)/scripttempl/elf32msp430.sc \
- ${GEN_DEPENDS}
- ${GENSCRIPTS} msp430x135 "$(tdir_msp430x135)" msp430all
-emsp430x1331.c: $(srcdir)/emulparams/msp430all.sh \
- $(ELF_GEN_DEPS) $(srcdir)/scripttempl/elf32msp430.sc \
- ${GEN_DEPENDS}
- ${GENSCRIPTS} msp430x1331 "$(tdir_msp430x1331)" msp430all
-emsp430x1351.c: $(srcdir)/emulparams/msp430all.sh \
- $(ELF_GEN_DEPS) $(srcdir)/scripttempl/elf32msp430.sc \
- ${GEN_DEPENDS}
- ${GENSCRIPTS} msp430x1351 "$(tdir_msp430x1351)" msp430all
-emsp430x147.c: $(srcdir)/emulparams/msp430all.sh \
- $(ELF_GEN_DEPS) $(srcdir)/scripttempl/elf32msp430.sc \
- ${GEN_DEPENDS}
- ${GENSCRIPTS} msp430x147 "$(tdir_msp430x147)" msp430all
-emsp430x148.c: $(srcdir)/emulparams/msp430all.sh \
- $(ELF_GEN_DEPS) $(srcdir)/scripttempl/elf32msp430.sc \
- ${GEN_DEPENDS}
- ${GENSCRIPTS} msp430x148 "$(tdir_msp430x148)" msp430all
-emsp430x149.c: $(srcdir)/emulparams/msp430all.sh \
- $(ELF_GEN_DEPS) $(srcdir)/scripttempl/elf32msp430.sc \
- ${GEN_DEPENDS}
- ${GENSCRIPTS} msp430x149 "$(tdir_msp430x149)" msp430all
-emsp430x155.c: $(srcdir)/emulparams/msp430all.sh \
- $(ELF_GEN_DEPS) $(srcdir)/scripttempl/elf32msp430.sc \
- ${GEN_DEPENDS}
- ${GENSCRIPTS} msp430x155 "$(tdir_msp430x155)" msp430all
-emsp430x156.c: $(srcdir)/emulparams/msp430all.sh \
- $(ELF_GEN_DEPS) $(srcdir)/scripttempl/elf32msp430.sc \
- ${GEN_DEPENDS}
- ${GENSCRIPTS} msp430x156 "$(tdir_msp430x156)" msp430all
-emsp430x157.c: $(srcdir)/emulparams/msp430all.sh \
- $(ELF_GEN_DEPS) $(srcdir)/scripttempl/elf32msp430.sc \
- ${GEN_DEPENDS}
- ${GENSCRIPTS} msp430x157 "$(tdir_msp430x157)" msp430all
-emsp430x167.c: $(srcdir)/emulparams/msp430all.sh \
- $(ELF_GEN_DEPS) $(srcdir)/scripttempl/elf32msp430.sc \
- ${GEN_DEPENDS}
- ${GENSCRIPTS} msp430x167 "$(tdir_msp430x167)" msp430all
-emsp430x168.c: $(srcdir)/emulparams/msp430all.sh \
- $(ELF_GEN_DEPS) $(srcdir)/scripttempl/elf32msp430.sc \
- ${GEN_DEPENDS}
- ${GENSCRIPTS} msp430x168 "$(tdir_msp430x168)" msp430all
-emsp430x169.c: $(srcdir)/emulparams/msp430all.sh \
- $(ELF_GEN_DEPS) $(srcdir)/scripttempl/elf32msp430.sc \
- ${GEN_DEPENDS}
- ${GENSCRIPTS} msp430x169 "$(tdir_msp430x169)" msp430all
-emsp430x1610.c: $(srcdir)/emulparams/msp430all.sh \
- $(ELF_GEN_DEPS) $(srcdir)/scripttempl/elf32msp430.sc \
- ${GEN_DEPENDS}
- ${GENSCRIPTS} msp430x1610 "$(tdir_msp430x1610)" msp430all
-emsp430x1611.c: $(srcdir)/emulparams/msp430all.sh \
- $(ELF_GEN_DEPS) $(srcdir)/scripttempl/elf32msp430.sc \
- ${GEN_DEPENDS}
- ${GENSCRIPTS} msp430x1611 "$(tdir_msp430x1611)" msp430all
-emsp430x1612.c: $(srcdir)/emulparams/msp430all.sh \
- $(ELF_GEN_DEPS) $(srcdir)/scripttempl/elf32msp430.sc \
- ${GEN_DEPENDS}
- ${GENSCRIPTS} msp430x1612 "$(tdir_msp430x1612)" msp430all
-emsp430x2101.c: $(srcdir)/emulparams/msp430all.sh \
- $(ELF_GEN_DEPS) $(srcdir)/scripttempl/elf32msp430.sc \
- ${GEN_DEPENDS}
- ${GENSCRIPTS} msp430x2101 "$(tdir_msp430x2101)" msp430all
-emsp430x2111.c: $(srcdir)/emulparams/msp430all.sh \
- $(ELF_GEN_DEPS) $(srcdir)/scripttempl/elf32msp430.sc \
- ${GEN_DEPENDS}
- ${GENSCRIPTS} msp430x2111 "$(tdir_msp430x2111)" msp430all
-emsp430x2121.c: $(srcdir)/emulparams/msp430all.sh \
- $(ELF_GEN_DEPS) $(srcdir)/scripttempl/elf32msp430.sc \
- ${GEN_DEPENDS}
- ${GENSCRIPTS} msp430x2121 "$(tdir_msp430x2121)" msp430all
-emsp430x2131.c: $(srcdir)/emulparams/msp430all.sh \
- $(ELF_GEN_DEPS) $(srcdir)/scripttempl/elf32msp430.sc \
- ${GEN_DEPENDS}
- ${GENSCRIPTS} msp430x2131 "$(tdir_msp430x2131)" msp430all
-emsp430x311.c: $(srcdir)/emulparams/msp430all.sh \
- $(ELF_GEN_DEPS) $(srcdir)/scripttempl/elf32msp430_3.sc \
- ${GEN_DEPENDS}
- ${GENSCRIPTS} msp430x311 "$(tdir_msp430x311)" msp430all
-emsp430x312.c: $(srcdir)/emulparams/msp430all.sh \
- $(ELF_GEN_DEPS) $(srcdir)/scripttempl/elf32msp430_3.sc \
- ${GEN_DEPENDS}
- ${GENSCRIPTS} msp430x312 "$(tdir_msp430x312)" msp430all
-emsp430x313.c: $(srcdir)/emulparams/msp430all.sh \
- $(ELF_GEN_DEPS) $(srcdir)/scripttempl/elf32msp430_3.sc \
- ${GEN_DEPENDS}
- ${GENSCRIPTS} msp430x313 "$(tdir_msp430x313)" msp430all
-emsp430x314.c: $(srcdir)/emulparams/msp430all.sh \
- $(ELF_GEN_DEPS) $(srcdir)/scripttempl/elf32msp430_3.sc \
- ${GEN_DEPENDS}
- ${GENSCRIPTS} msp430x314 "$(tdir_msp430x314)" msp430all
-emsp430x315.c: $(srcdir)/emulparams/msp430all.sh \
- $(ELF_GEN_DEPS) $(srcdir)/scripttempl/elf32msp430_3.sc \
- ${GEN_DEPENDS}
- ${GENSCRIPTS} msp430x315 "$(tdir_msp430x315)" msp430all
-emsp430x323.c: $(srcdir)/emulparams/msp430all.sh \
- $(ELF_GEN_DEPS) $(srcdir)/scripttempl/elf32msp430_3.sc \
- ${GEN_DEPENDS}
- ${GENSCRIPTS} msp430x323 "$(tdir_msp430x323)" msp430all
-emsp430x325.c: $(srcdir)/emulparams/msp430all.sh \
- $(ELF_GEN_DEPS) $(srcdir)/scripttempl/elf32msp430_3.sc \
- ${GEN_DEPENDS}
- ${GENSCRIPTS} msp430x325 "$(tdir_msp430x325)" msp430all
-emsp430x336.c: $(srcdir)/emulparams/msp430all.sh \
- $(ELF_GEN_DEPS) $(srcdir)/scripttempl/elf32msp430_3.sc \
- ${GEN_DEPENDS}
- ${GENSCRIPTS} msp430x336 "$(tdir_msp430x336)" msp430all
-emsp430x337.c: $(srcdir)/emulparams/msp430all.sh \
- $(ELF_GEN_DEPS) $(srcdir)/scripttempl/elf32msp430_3.sc \
- ${GEN_DEPENDS}
- ${GENSCRIPTS} msp430x337 "$(tdir_msp430x337)" msp430all
-emsp430x412.c: $(srcdir)/emulparams/msp430all.sh \
- $(ELF_GEN_DEPS) $(srcdir)/scripttempl/elf32msp430.sc \
- ${GEN_DEPENDS}
- ${GENSCRIPTS} msp430x412 "$(tdir_msp430x412)" msp430all
-emsp430x413.c: $(srcdir)/emulparams/msp430all.sh \
- $(ELF_GEN_DEPS) $(srcdir)/scripttempl/elf32msp430.sc \
- ${GEN_DEPENDS}
- ${GENSCRIPTS} msp430x413 "$(tdir_msp430x413)" msp430all
-emsp430x415.c: $(srcdir)/emulparams/msp430all.sh \
- $(ELF_GEN_DEPS) $(srcdir)/scripttempl/elf32msp430.sc \
- ${GEN_DEPENDS}
- ${GENSCRIPTS} msp430x415 "$(tdir_msp430x415)" msp430all
-emsp430x417.c: $(srcdir)/emulparams/msp430all.sh \
- $(ELF_GEN_DEPS) $(srcdir)/scripttempl/elf32msp430.sc \
- ${GEN_DEPENDS}
- ${GENSCRIPTS} msp430x417 "$(tdir_msp430x417)" msp430all
-emsp430xE423.c: $(srcdir)/emulparams/msp430all.sh \
- $(ELF_GEN_DEPS) $(srcdir)/scripttempl/elf32msp430.sc \
- ${GEN_DEPENDS}
- ${GENSCRIPTS} msp430xE423 "$(tdir_msp430xE423)" msp430all
-emsp430xE425.c: $(srcdir)/emulparams/msp430all.sh \
- $(ELF_GEN_DEPS) $(srcdir)/scripttempl/elf32msp430.sc \
- ${GEN_DEPENDS}
- ${GENSCRIPTS} msp430xE425 "$(tdir_msp430xE425)" msp430all
-emsp430xE427.c: $(srcdir)/emulparams/msp430all.sh \
- $(ELF_GEN_DEPS) $(srcdir)/scripttempl/elf32msp430.sc \
- ${GEN_DEPENDS}
- ${GENSCRIPTS} msp430xE427 "$(tdir_msp430xE427)" msp430all
-emsp430xW423.c: $(srcdir)/emulparams/msp430all.sh \
- $(ELF_GEN_DEPS) $(srcdir)/scripttempl/elf32msp430.sc \
- ${GEN_DEPENDS}
- ${GENSCRIPTS} msp430xW423 "$(tdir_msp430xW423)" msp430all
-emsp430xW425.c: $(srcdir)/emulparams/msp430all.sh \
- $(ELF_GEN_DEPS) $(srcdir)/scripttempl/elf32msp430.sc \
- ${GEN_DEPENDS}
- ${GENSCRIPTS} msp430xW425 "$(tdir_msp430xW425)" msp430all
-emsp430xW427.c: $(srcdir)/emulparams/msp430all.sh \
- $(ELF_GEN_DEPS) $(srcdir)/scripttempl/elf32msp430.sc \
- ${GEN_DEPENDS}
- ${GENSCRIPTS} msp430xW427 "$(tdir_msp430xW427)" msp430all
-emsp430xG437.c: $(srcdir)/emulparams/msp430all.sh \
- $(ELF_GEN_DEPS) $(srcdir)/scripttempl/elf32msp430.sc \
- ${GEN_DEPENDS}
- ${GENSCRIPTS} msp430xG437 "$(tdir_msp430xG437)" msp430all
-emsp430xG438.c: $(srcdir)/emulparams/msp430all.sh \
- $(ELF_GEN_DEPS) $(srcdir)/scripttempl/elf32msp430.sc \
- ${GEN_DEPENDS}
- ${GENSCRIPTS} msp430xG438 "$(tdir_msp430xG438)" msp430all
-emsp430xG439.c: $(srcdir)/emulparams/msp430all.sh \
- $(ELF_GEN_DEPS) $(srcdir)/scripttempl/elf32msp430.sc \
- ${GEN_DEPENDS}
- ${GENSCRIPTS} msp430xG439 "$(tdir_msp430xG439)" msp430all
-emsp430x435.c: $(srcdir)/emulparams/msp430all.sh \
- $(ELF_GEN_DEPS) $(srcdir)/scripttempl/elf32msp430.sc \
- ${GEN_DEPENDS}
- ${GENSCRIPTS} msp430x435 "$(tdir_msp430x435)" msp430all
-emsp430x436.c: $(srcdir)/emulparams/msp430all.sh \
- $(ELF_GEN_DEPS) $(srcdir)/scripttempl/elf32msp430.sc \
- ${GEN_DEPENDS}
- ${GENSCRIPTS} msp430x436 "$(tdir_msp430x436)" msp430all
-emsp430x437.c: $(srcdir)/emulparams/msp430all.sh \
- $(ELF_GEN_DEPS) $(srcdir)/scripttempl/elf32msp430.sc \
- ${GEN_DEPENDS}
- ${GENSCRIPTS} msp430x437 "$(tdir_msp430x437)" msp430all
-emsp430x447.c: $(srcdir)/emulparams/msp430all.sh \
- $(ELF_GEN_DEPS) $(srcdir)/scripttempl/elf32msp430.sc \
- ${GEN_DEPENDS}
- ${GENSCRIPTS} msp430x447 "$(tdir_msp430x447)" msp430all
-emsp430x448.c: $(srcdir)/emulparams/msp430all.sh \
- $(ELF_GEN_DEPS) $(srcdir)/scripttempl/elf32msp430.sc \
- ${GEN_DEPENDS}
- ${GENSCRIPTS} msp430x448 "$(tdir_msp430x448)" msp430all
-emsp430x449.c: $(srcdir)/emulparams/msp430all.sh \
- $(ELF_GEN_DEPS) $(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 \
- $(ELF_GEN_DEPS) $(srcdir)/scripttempl/elf.sc ${GEN_DEPENDS}
- ${GENSCRIPTS} or32elf "$(tdir_or32elf)"
-epc532macha.c: $(srcdir)/emulparams/pc532macha.sh \
- $(srcdir)/emultempl/generic.em $(srcdir)/scripttempl/aout.sc ${GEN_DEPENDS}
- ${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 \
- $(ELF_GEN_DEPS) $(srcdir)/scripttempl/elf.sc ${GEN_DEPENDS}
- ${GENSCRIPTS} pjelf "$(tdir_pjelf)"
-epjlelf.c: $(srcdir)/emulparams/pjlelf.sh $(srcdir)/emulparams/pjelf.sh \
- $(ELF_GEN_DEPS) $(srcdir)/scripttempl/elf.sc ${GEN_DEPENDS}
- ${GENSCRIPTS} pjlelf "$(tdir_pjlelf)"
-eppcmacos.c: $(srcdir)/emulparams/ppcmacos.sh \
- $(srcdir)/emultempl/aix.em $(srcdir)/scripttempl/aix.sc ${GEN_DEPENDS}
- ${GENSCRIPTS} ppcmacos "$(tdir_ppcmacos)"
-eppcnw.c: $(srcdir)/emulparams/ppcnw.sh \
- $(ELF_DEPS) $(srcdir)/scripttempl/nw.sc ${GEN_DEPENDS}
- ${GENSCRIPTS} ppcnw "$(tdir_ppcnw)"
-eppcpe.c: $(srcdir)/emulparams/ppcpe.sh \
- $(srcdir)/emultempl/pe.em $(srcdir)/scripttempl/ppcpe.sc ${GEN_DEPENDS}
- ${GENSCRIPTS} ppcpe "$(tdir_ppcpe)"
-eppclynx.c: $(srcdir)/emulparams/ppclynx.sh \
- $(ELF_DEPS) $(srcdir)/scripttempl/elf.sc ${GEN_DEPENDS}
- ${GENSCRIPTS} ppclynx "$(tdir_ppclynx)"
-eriscix.c: $(srcdir)/emulparams/riscix.sh \
- $(srcdir)/emultempl/generic.em $(srcdir)/scripttempl/aout.sc ${GEN_DEPENDS}
- ${GENSCRIPTS} riscix "$(tdir_riscix)"
-escoreelf.c: $(srcdir)/emulparams/scoreelf.sh \
- $(srcdir)/emultempl/elf32.em $(srcdir)/emultempl/scoreelf.em \
- $(srcdir)/scripttempl/elf.sc ${GEN_DEPENDS}
- ${GENSCRIPTS} scoreelf "$(tdir_scoreelf)"
-esh.c: $(srcdir)/emulparams/sh.sh \
- $(srcdir)/emultempl/generic.em $(srcdir)/scripttempl/sh.sc ${GEN_DEPENDS}
- ${GENSCRIPTS} sh "$(tdir_sh)"
-eshelf.c: $(srcdir)/emulparams/shelf.sh \
- $(ELF_DEPS) $(srcdir)/scripttempl/elf.sc ${GEN_DEPENDS}
- ${GENSCRIPTS} shelf "$(tdir_shelf)"
-eshelf32.c: $(srcdir)/emulparams/shelf32.sh \
- $(BFDDIR)/libbfd.h $(INCDIR)/libiberty.h \
- $(srcdir)/emultempl/sh64elf.em $(INCDIR)/elf/sh.h $(BFDDIR)/elf-bfd.h \
- $(ELF_DEPS) $(srcdir)/scripttempl/elf.sc ${GEN_DEPENDS}
- ${GENSCRIPTS} shelf32 "$(tdir_shelf32)"
-eshelf32_linux.c: $(srcdir)/emulparams/shelf32_linux.sh \
- $(srcdir)/emulparams/shelf32.sh \
- $(BFDDIR)/libbfd.h $(INCDIR)/libiberty.h \
- $(srcdir)/emultempl/sh64elf.em $(INCDIR)/elf/sh.h $(BFDDIR)/elf-bfd.h \
- $(ELF_DEPS) $(srcdir)/scripttempl/elf.sc ${GEN_DEPENDS}
- ${GENSCRIPTS} shelf32_linux "$(tdir_shelf32_linux)"
-eshelf32_nbsd.c: $(srcdir)/emulparams/shelf32_nbsd.sh \
- $(srcdir)/emulparams/shelf32.sh \
- $(BFDDIR)/libbfd.h $(INCDIR)/libiberty.h \
- $(srcdir)/emultempl/sh64elf.em $(INCDIR)/elf/sh.h $(BFDDIR)/elf-bfd.h \
- $(ELF_DEPS) $(srcdir)/scripttempl/elf.sc ${GEN_DEPENDS}
- ${GENSCRIPTS} shelf32_nbsd "$(tdir_shelf32_nbsd)"
-eshelf64.c: $(srcdir)/emulparams/shelf64.sh $(srcdir)/emulparams/shelf32.sh \
- $(ELF_DEPS) $(srcdir)/scripttempl/elf.sc ${GEN_DEPENDS}
- ${GENSCRIPTS} shelf64 "$(tdir_shelf64)"
-eshelf64_nbsd.c: $(srcdir)/emulparams/shelf64_nbsd.sh \
- $(srcdir)/emulparams/shelf32_nbsd.sh $(srcdir)/emulparams/shelf32.sh \
- $(ELF_DEPS) $(srcdir)/scripttempl/elf.sc ${GEN_DEPENDS}
- ${GENSCRIPTS} shelf64_nbsd "$(tdir_shelf64_nbsd)"
-eshelf_linux.c: $(srcdir)/emulparams/shelf_linux.sh \
- $(srcdir)/emulparams/shlelf_linux.sh \
- $(ELF_DEPS) $(srcdir)/scripttempl/elf.sc ${GEN_DEPENDS}
- ${GENSCRIPTS} shelf_linux "$(tdir_shelf_linux)"
-eshlelf_linux.c: $(srcdir)/emulparams/shlelf_linux.sh \
- $(ELF_DEPS) $(srcdir)/scripttempl/elf.sc ${GEN_DEPENDS}
- ${GENSCRIPTS} shlelf_linux "$(tdir_shlelf_linux)"
-eshelf_nbsd.c: $(srcdir)/emulparams/shelf_nbsd.sh \
- $(srcdir)/emulparams/shelf.sh \
- $(ELF_DEPS) $(srcdir)/scripttempl/elf.sc ${GEN_DEPENDS}
- ${GENSCRIPTS} shelf_nbsd "$(tdir_shelf_nbsd)"
-eshelf_nto.c: $(srcdir)/emulparams/shelf_nto.sh \
- $(ELF_DEPS) $(srcdir)/scripttempl/elf.sc ${GEN_DEPENDS}
- ${GENSCRIPTS} shelf_nto "$(tdir_shelf_nto)"
-eshelf_vxworks.c: $(srcdir)/emulparams/shelf_vxworks.sh \
- $(srcdir)/emulparams/vxworks.sh $(ELF_DEPS) $(srcdir)/scripttempl/elf.sc \
- $(srcdir)/emultempl/vxworks.em ${GEN_DEPENDS}
- ${GENSCRIPTS} shelf_vxworks "$(tdir_shelf_vxworks)"
-eshlelf_nbsd.c: $(srcdir)/emulparams/shlelf_nbsd.sh \
- $(srcdir)/emulparams/shelf_nbsd.sh \
- $(srcdir)/emulparams/shelf.sh \
- $(ELF_DEPS) $(srcdir)/scripttempl/elf.sc ${GEN_DEPENDS}
- ${GENSCRIPTS} shlelf_nbsd "$(tdir_shlelf_nbsd)"
-eshlelf_nto.c: $(srcdir)/emulparams/shlelf_nto.sh \
- $(ELF_DEPS) $(srcdir)/scripttempl/elf.sc ${GEN_DEPENDS}
- ${GENSCRIPTS} shlelf_nto "$(tdir_shlelf_nto)"
-eshlelf_vxworks.c: $(srcdir)/emulparams/shlelf_vxworks.sh \
- $(srcdir)/emulparams/shelf_vxworks.sh $(srcdir)/emulparams/vxworks.sh \
- $(ELF_DEPS) $(srcdir)/scripttempl/elf.sc $(srcdir)/emultempl/vxworks.em \
- ${GEN_DEPENDS}
- ${GENSCRIPTS} shlelf_vxworks "$(tdir_shlelf_vxworks)"
-eshelf_uclinux.c: $(srcdir)/emulparams/shelf_uclinux.sh \
- $(srcdir)/emultempl/elf32.em $(srcdir)/scripttempl/elf.sc ${GEN_DEPENDS}
- ${GENSCRIPTS} shelf_uclinux "$(tdir_shelf_uclinux)"
-eshlelf.c: $(srcdir)/emulparams/shlelf.sh \
- $(srcdir)/emulparams/shelf.sh \
- $(ELF_DEPS) $(srcdir)/scripttempl/elf.sc ${GEN_DEPENDS}
- ${GENSCRIPTS} shlelf "$(tdir_shlelf)"
-eshlsymbian.c: $(srcdir)/emulparams/shlsymbian.sh \
- $(srcdir)/emulparams/shelf.sh \
- $(ELF_DEPS) $(srcdir)/scripttempl/elf32sh-symbian.sc ${GEN_DEPENDS}
- ${GENSCRIPTS} shlsymbian "$(tdir_shlelf)"
-eshlelf32.c: $(srcdir)/emulparams/shlelf32.sh \
- $(BFDDIR)/libbfd.h $(INCDIR)/libiberty.h $(srcdir)/emulparams/shelf32.sh \
- $(srcdir)/emultempl/sh64elf.em $(INCDIR)/elf/sh.h $(BFDDIR)/elf-bfd.h \
- $(ELF_DEPS) $(srcdir)/scripttempl/elf.sc ${GEN_DEPENDS}
- ${GENSCRIPTS} shlelf32 "$(tdir_shlelf32)"
-eshlelf32_linux.c: $(srcdir)/emulparams/shlelf32_linux.sh \
- $(srcdir)/emulparams/shelf32_linux.sh $(srcdir)/emulparams/shelf32.sh \
- $(BFDDIR)/libbfd.h $(INCDIR)/libiberty.h \
- $(srcdir)/emultempl/sh64elf.em $(INCDIR)/elf/sh.h $(BFDDIR)/elf-bfd.h \
- $(ELF_DEPS) $(srcdir)/scripttempl/elf.sc ${GEN_DEPENDS}
- ${GENSCRIPTS} shlelf32_linux "$(tdir_shlelf32_linux)"
-eshlelf32_nbsd.c: $(srcdir)/emulparams/shlelf32_nbsd.sh \
- $(srcdir)/emulparams/shelf32_nbsd.sh $(srcdir)/emulparams/shelf32.sh \
- $(BFDDIR)/libbfd.h $(INCDIR)/libiberty.h \
- $(srcdir)/emultempl/sh64elf.em $(INCDIR)/elf/sh.h $(BFDDIR)/elf-bfd.h \
- $(ELF_DEPS) $(srcdir)/scripttempl/elf.sc ${GEN_DEPENDS}
- ${GENSCRIPTS} shlelf32_nbsd "$(tdir_shlelf32_nbsd)"
-eshlelf64.c: $(srcdir)/emulparams/shlelf64.sh \
- $(srcdir)/emulparams/shelf64.sh $(srcdir)/emulparams/shelf32.sh \
- $(ELF_DEPS) $(srcdir)/scripttempl/elf.sc ${GEN_DEPENDS}
- ${GENSCRIPTS} shlelf64 "$(tdir_shlelf64)"
-eshlelf64_nbsd.c: $(srcdir)/emulparams/shlelf64_nbsd.sh \
- $(srcdir)/emulparams/shelf64_nbsd.sh \
- $(srcdir)/emulparams/shelf32_nbsd.sh $(srcdir)/emulparams/shelf32.sh \
- $(ELF_DEPS) $(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)"
-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 \
- $(ELF_DEPS) $(srcdir)/scripttempl/v850.sc ${GEN_DEPENDS}
- ${GENSCRIPTS} v850 "$(tdir_v850)"
-ew65.c: $(srcdir)/emulparams/w65.sh \
- $(srcdir)/emultempl/generic.em $(srcdir)/scripttempl/w65.sc ${GEN_DEPENDS}
- ${GENSCRIPTS} w65 "$(tdir_w65)"
-ez80.c: $(srcdir)/emulparams/z80.sh \
- $(srcdir)/emultempl/generic.em $(srcdir)/emultempl/z80.em \
- $(srcdir)/scripttempl/z80.sc ${GEN_DEPENDS}
- ${GENSCRIPTS} z80 "$(tdir_z80)"
-ez8001.c: $(srcdir)/emulparams/z8001.sh \
- $(srcdir)/emultempl/generic.em $(srcdir)/scripttempl/z8000.sc ${GEN_DEPENDS}
- ${GENSCRIPTS} z8001 "$(tdir_z8001)"
-ez8002.c: $(srcdir)/emulparams/z8002.sh \
- $(srcdir)/emultempl/generic.em $(srcdir)/scripttempl/z8000.sc ${GEN_DEPENDS}
- ${GENSCRIPTS} z8002 "$(tdir_z8002)"
-
-# 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) $(LIBINTL_DEP)
-ld_new_LDADD = $(EMULATION_OFILES) $(EMUL_EXTRA_OFILES) $(BFDLIB) $(LIBIBERTY) $(LIBINTL)
-
-# The generated emulation files mostly have the same dependencies.
-$(EMULATION_OFILES): ../bfd/bfd.h sysdep.h config.h $(INCDIR)/bfdlink.h \
- 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; \
- 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) $(LIBINTL)" 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
- cp ${srcdir}/${DOCVER}-doc.texi ./configdoc.texi
- chmod u+w ./configdoc.texi
-
-# Build the man page from the texinfo file
-# The sed command removes the no-adjust Nroff command so that
-# the man output looks standard.
-ld.1: $(srcdir)/ld.texinfo configdoc.texi
- 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 = configdoc.texi
-
-# We want to reconfigure if configure.host or configure.tgt changes. We
-# extract version from bfd/configure.in, so we must depend on that also.
-CONFIG_STATUS_DEPENDENCIES = $(srcdir)/configure.host $(srcdir)/configure.tgt \
- $(srcdir)/../bfd/configure.in
-
-MOSTLYCLEANFILES = $(STAGESTUFF) ld1$(EXEEXT) ld2$(EXEEXT) ld3$(EXEEXT) \
- ldemul-list.h crtbegin.o crtend.o ld.log ld.sum
-mostlyclean-local:
- -rm -rf tmpdir
-CLEANFILES = dep.sed DEP DEPA DEP1 DEP2 spu_ovl.s
-
-.PHONY: install-html install-html-am install-html-recursive
-
-html__strip_dir = `echo $$p | sed -e 's|^.*/||'`;
-
-install-html: install-html-recursive install-html-am
-
-install-html-am: $(HTMLS)
- @$(NORMAL_INSTALL)
- test -z "$(htmldir)" || $(mkdir_p) "$(DESTDIR)$(htmldir)"
- @list='$(HTMLS)'; for p in $$list; do \
- if test -f "$$p" || test -d "$$p"; then d=""; else d="$(srcdir)/"; fi; \
- f=$(html__strip_dir) \
- if test -d "$$d$$p"; then \
- echo " $(mkdir_p) '$(DESTDIR)$(htmldir)/$$f'"; \
- $(mkdir_p) "$(DESTDIR)$(htmldir)/$$f" || exit 1; \
- echo " $(INSTALL_DATA) '$$d$$p'/* '$(DESTDIR)$(htmldir)/$$f'"; \
- $(INSTALL_DATA) "$$d$$p"/* "$(DESTDIR)$(htmldir)/$$f"; \
- else \
- echo " $(INSTALL_DATA) '$$d$$p' '$(DESTDIR)$(htmldir)/$$f'"; \
- $(INSTALL_DATA) "$$d$$p" "$(DESTDIR)$(htmldir)/$$f"; \
- fi; \
- done
-
-install-html-recursive:
- @failcom='exit 1'; \
- for f in x $$MAKEFLAGS; do \
- case $$f in \
- *=* | --[!k]*);; \
- *k*) failcom='fail=yes';; \
- esac; \
- done; \
- dot_seen=no; \
- target=`echo $@ | sed s/-recursive//`; \
- list='$(SUBDIRS)'; for subdir in $$list; do \
- echo "Making $$target in $$subdir"; \
- if test "$$subdir" = "."; then \
- dot_seen=yes; \
- local_target="$$target-am"; \
- else \
- local_target="$$target"; \
- fi; \
- (cd $$subdir && $(MAKE) $(AM_MAKEFLAGS) $$local_target) \
- || eval $$failcom; \
- done; \
- if test "$$dot_seen" = "no"; then \
- $(MAKE) $(AM_MAKEFLAGS) "$$target-am" || exit 1; \
- fi; test -z "$$fail"
-
-.PHONY: install-exec-local install-data-local
-
-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-data-local: install-info
-
-# Stuff that should be included in a distribution. The diststuff
-# target is run by the taz target in ../Makefile.in.
-EXTRA_DIST = ldgram.c ldgram.h ldlex.c emultempl/spu_ovl.o $(man_MANS)
-diststuff: info $(EXTRA_DIST)
-all: info ld.1
-
-# Both info (ld.info) and ld.1 depend on configdoc.texi.
-# But info isn't a direct target. Make info-recursive to depend on
-# ld.1 to support parallel build.
-info-recursive: ld.1
-
-DISTCLEANFILES = tdirs site.exp site.bak stringify.sed
-distclean-local:
- rm -rf ldscripts
-
-MAINTAINERCLEANFILES += ld.info
-
-# Automake 1.9 will only build info files in the objdir if they are
-# mentioned in DISTCLEANFILES. It doesn't have to be unconditional,
-# though, so we use a bogus condition.
-if GENINSRC_NEVER
-DISTCLEANFILES += ld.info
-endif
-
-# Targets to rebuild dependencies in this Makefile.
-# Have to get rid of DEP1 here so that "$?" later includes all of $(CFILES).
-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
-
-# 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 sysdep.h config.h $(INCDIR)/fopen-same.h \
- ../bfd/bfd.h $(INCDIR)/ansidecl.h $(INCDIR)/symcat.h \
- $(INCDIR)/bfdlink.h $(INCDIR)/safe-ctype.h ld.h ldexp.h \
- ldlang.h ldmisc.h ldgram.h ldmain.h ldctor.h
-ldemul.o: ldemul.c sysdep.h config.h $(INCDIR)/fopen-same.h \
- ../bfd/bfd.h $(INCDIR)/ansidecl.h $(INCDIR)/symcat.h \
- $(INCDIR)/bfdlink.h ld.h ldmisc.h ldexp.h ldlang.h \
- ldfile.h ldemul.h ldmain.h ldemul-list.h
-ldexp.o: ldexp.c sysdep.h config.h $(INCDIR)/fopen-same.h \
- ../bfd/bfd.h $(INCDIR)/ansidecl.h $(INCDIR)/symcat.h \
- $(INCDIR)/bfdlink.h ld.h ldmain.h ldmisc.h ldexp.h \
- ldlex.h ldgram.h ldlang.h $(INCDIR)/libiberty.h $(INCDIR)/ansidecl.h \
- $(INCDIR)/safe-ctype.h
-ldfile.o: ldfile.c sysdep.h config.h $(INCDIR)/fopen-same.h \
- ../bfd/bfd.h $(INCDIR)/ansidecl.h $(INCDIR)/symcat.h \
- $(INCDIR)/bfdlink.h $(INCDIR)/safe-ctype.h ld.h ldmisc.h \
- ldexp.h ldlang.h ldfile.h ldmain.h ldgram.h ldlex.h \
- ldemul.h $(INCDIR)/libiberty.h $(INCDIR)/ansidecl.h \
- $(INCDIR)/filenames.h
-ldlang.o: ldlang.c sysdep.h config.h $(INCDIR)/fopen-same.h \
- ../bfd/bfd.h $(INCDIR)/ansidecl.h $(INCDIR)/symcat.h \
- $(INCDIR)/libiberty.h $(INCDIR)/ansidecl.h $(INCDIR)/safe-ctype.h \
- $(INCDIR)/obstack.h $(INCDIR)/bfdlink.h ld.h ldmain.h \
- ldexp.h ldlang.h ldgram.h ldlex.h ldmisc.h ldctor.h \
- ldfile.h ldemul.h $(INCDIR)/fnmatch.h $(INCDIR)/demangle.h \
- $(INCDIR)/libiberty.h $(INCDIR)/hashtab.h
-ldmain.o: ldmain.c sysdep.h config.h $(INCDIR)/fopen-same.h \
- ../bfd/bfd.h $(INCDIR)/ansidecl.h $(INCDIR)/symcat.h \
- $(INCDIR)/safe-ctype.h $(INCDIR)/libiberty.h $(INCDIR)/ansidecl.h \
- $(INCDIR)/progress.h $(INCDIR)/bfdlink.h $(INCDIR)/filenames.h \
- ld.h ldmain.h ldmisc.h ldwrite.h ldexp.h ldlang.h ldgram.h \
- ldlex.h ldfile.h ldemul.h ldctor.h
-ldmisc.o: ldmisc.c sysdep.h config.h $(INCDIR)/fopen-same.h \
- ../bfd/bfd.h $(INCDIR)/ansidecl.h $(INCDIR)/symcat.h \
- $(INCDIR)/bfdlink.h $(INCDIR)/libiberty.h $(INCDIR)/ansidecl.h \
- $(INCDIR)/demangle.h $(INCDIR)/libiberty.h ld.h ldmisc.h \
- ldexp.h ldlang.h ldgram.h ldlex.h ldmain.h ldfile.h \
- $(BFDDIR)/elf-bfd.h $(INCDIR)/elf/common.h $(INCDIR)/elf/internal.h \
- $(INCDIR)/elf/external.h $(INCDIR)/bfdlink.h
-ldver.o: ldver.c sysdep.h config.h $(INCDIR)/fopen-same.h \
- ../bfd/bfd.h $(INCDIR)/ansidecl.h $(INCDIR)/symcat.h \
- ../bfd/bfdver.h ld.h ldver.h ldexp.h ldlang.h ldfile.h \
- ldemul.h ldmain.h
-ldwrite.o: ldwrite.c sysdep.h config.h $(INCDIR)/fopen-same.h \
- ../bfd/bfd.h $(INCDIR)/ansidecl.h $(INCDIR)/symcat.h \
- $(INCDIR)/bfdlink.h $(INCDIR)/libiberty.h $(INCDIR)/ansidecl.h \
- $(INCDIR)/safe-ctype.h ld.h ldexp.h ldlang.h ldwrite.h \
- ldmisc.h ldgram.h ldmain.h
-lexsup.o: lexsup.c sysdep.h config.h $(INCDIR)/fopen-same.h \
- ../bfd/bfd.h $(INCDIR)/ansidecl.h $(INCDIR)/symcat.h \
- ../bfd/bfdver.h $(INCDIR)/libiberty.h $(INCDIR)/ansidecl.h \
- $(INCDIR)/safe-ctype.h $(INCDIR)/bfdlink.h ld.h ldmain.h \
- ldmisc.h ldexp.h ldlang.h ldgram.h ldlex.h ldfile.h \
- ldver.h ldemul.h $(INCDIR)/demangle.h $(INCDIR)/libiberty.h
-mri.o: mri.c sysdep.h config.h $(INCDIR)/fopen-same.h \
- ../bfd/bfd.h $(INCDIR)/ansidecl.h $(INCDIR)/symcat.h \
- ld.h ldexp.h ldlang.h ldmisc.h mri.h ldgram.h $(INCDIR)/libiberty.h \
- $(INCDIR)/ansidecl.h
-ldcref.o: ldcref.c sysdep.h config.h $(INCDIR)/fopen-same.h \
- ../bfd/bfd.h $(INCDIR)/ansidecl.h $(INCDIR)/symcat.h \
- $(INCDIR)/bfdlink.h $(INCDIR)/libiberty.h $(INCDIR)/ansidecl.h \
- $(INCDIR)/demangle.h $(INCDIR)/libiberty.h $(INCDIR)/objalloc.h \
- ld.h ldmain.h ldmisc.h ldexp.h ldlang.h
-pe-dll.o: pe-dll.c sysdep.h config.h $(INCDIR)/fopen-same.h \
- ../bfd/bfd.h $(INCDIR)/ansidecl.h $(INCDIR)/symcat.h \
- $(INCDIR)/bfdlink.h $(INCDIR)/libiberty.h $(INCDIR)/ansidecl.h \
- $(INCDIR)/safe-ctype.h ld.h ldexp.h ldlang.h ldwrite.h \
- ldmisc.h ldgram.h ldmain.h ldfile.h ldemul.h $(INCDIR)/coff/internal.h \
- $(BFDDIR)/libcoff.h $(INCDIR)/bfdlink.h deffile.h pe-dll.h
-pep-dll.o: pep-dll.c pe-dll.c sysdep.h config.h $(INCDIR)/fopen-same.h \
- ../bfd/bfd.h $(INCDIR)/ansidecl.h $(INCDIR)/symcat.h \
- $(INCDIR)/bfdlink.h $(INCDIR)/libiberty.h $(INCDIR)/ansidecl.h \
- $(INCDIR)/safe-ctype.h ld.h ldexp.h ldlang.h ldwrite.h \
- ldmisc.h ldgram.h ldmain.h ldfile.h ldemul.h $(INCDIR)/coff/internal.h \
- $(BFDDIR)/libcoff.h $(INCDIR)/bfdlink.h deffile.h pe-dll.h \
- pep-dll.h
-ldgram.o: ldgram.c sysdep.h config.h $(INCDIR)/fopen-same.h \
- ../bfd/bfd.h $(INCDIR)/ansidecl.h $(INCDIR)/symcat.h \
- $(INCDIR)/bfdlink.h ld.h ldexp.h ldver.h ldlang.h ldfile.h \
- ldemul.h ldmisc.h ldmain.h mri.h ldctor.h ldlex.h
-ldlex.o: ldlex.c sysdep.h config.h $(INCDIR)/fopen-same.h \
- ../bfd/bfd.h $(INCDIR)/ansidecl.h $(INCDIR)/symcat.h \
- $(INCDIR)/safe-ctype.h $(INCDIR)/bfdlink.h ld.h ldmisc.h \
- ldexp.h ldlang.h ldgram.h ldfile.h ldlex.h ldmain.h \
- $(INCDIR)/libiberty.h $(INCDIR)/ansidecl.h
-deffilep.o: deffilep.c sysdep.h config.h $(INCDIR)/fopen-same.h \
- $(INCDIR)/libiberty.h $(INCDIR)/ansidecl.h $(INCDIR)/safe-ctype.h \
- ../bfd/bfd.h $(INCDIR)/ansidecl.h $(INCDIR)/symcat.h \
- ld.h ldmisc.h deffile.h
-# IF YOU PUT ANYTHING HERE IT WILL GO AWAY
diff --git a/contrib/binutils/ld/Makefile.in b/contrib/binutils/ld/Makefile.in
deleted file mode 100644
index 861822f37969..000000000000
--- a/contrib/binutils/ld/Makefile.in
+++ /dev/null
@@ -1,2846 +0,0 @@
-# Makefile.in generated by automake 1.9.6 from Makefile.am.
-# @configure_input@
-
-# Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002,
-# 2003, 2004, 2005 Free Software Foundation, Inc.
-# This Makefile.in is free software; the Free Software Foundation
-# gives unlimited permission to copy and/or distribute it,
-# with or without modifications, as long as this notice is preserved.
-
-# 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.
-
-# $FreeBSD$
-
-@SET_MAKE@
-
-srcdir = @srcdir@
-top_srcdir = @top_srcdir@
-VPATH = @srcdir@
-pkgdatadir = $(datadir)/@PACKAGE@
-pkglibdir = $(libdir)/@PACKAGE@
-pkgincludedir = $(includedir)/@PACKAGE@
-top_builddir = .
-am__cd = CDPATH="$${ZSH_VERSION+.}$(PATH_SEPARATOR)" && cd
-INSTALL = @INSTALL@
-install_sh_DATA = $(install_sh) -c -m 644
-install_sh_PROGRAM = $(install_sh) -c
-install_sh_SCRIPT = $(install_sh) -c
-INSTALL_HEADER = $(INSTALL_DATA)
-transform = $(program_transform_name)
-NORMAL_INSTALL = :
-PRE_INSTALL = :
-POST_INSTALL = :
-NORMAL_UNINSTALL = :
-PRE_UNINSTALL = :
-POST_UNINSTALL = :
-build_triplet = @build@
-host_triplet = @host@
-target_triplet = @target@
-noinst_PROGRAMS = ld-new$(EXEEXT)
-
-# Automake 1.9 will only build info files in the objdir if they are
-# mentioned in DISTCLEANFILES. It doesn't have to be unconditional,
-# though, so we use a bogus condition.
-@GENINSRC_NEVER_TRUE@am__append_1 = ld.info
-DIST_COMMON = $(srcdir)/../config.guess $(srcdir)/../config.sub NEWS \
- README ChangeLog $(srcdir)/Makefile.in $(srcdir)/Makefile.am \
- $(top_srcdir)/configure $(am__configure_deps) \
- $(srcdir)/config.in $(srcdir)/../mkinstalldirs \
- $(top_srcdir)/po/Make-in ldgram.h ldgram.c ldlex.c deffilep.h \
- deffilep.c $(srcdir)/../ylwrap $(srcdir)/../ltmain.sh \
- $(srcdir)/../config.guess $(srcdir)/../config.sub \
- $(ld_TEXINFOS)
-subdir = .
-ACLOCAL_M4 = $(top_srcdir)/aclocal.m4
-am__aclocal_m4_deps = $(top_srcdir)/../bfd/acinclude.m4 \
- $(top_srcdir)/../bfd/warning.m4 \
- $(top_srcdir)/../config/depstand.m4 \
- $(top_srcdir)/../config/gettext-sister.m4 \
- $(top_srcdir)/../config/lead-dot.m4 \
- $(top_srcdir)/../config/nls.m4 $(top_srcdir)/../config/po.m4 \
- $(top_srcdir)/../config/progtest.m4 \
- $(top_srcdir)/../libtool.m4 $(top_srcdir)/../ltoptions.m4 \
- $(top_srcdir)/../ltsugar.m4 $(top_srcdir)/../ltversion.m4 \
- $(top_srcdir)/configure.in
-am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \
- $(ACLOCAL_M4)
-am__CONFIG_DISTCLEAN_FILES = config.status config.cache config.log \
- configure.lineno configure.status.lineno
-mkinstalldirs = $(SHELL) $(top_srcdir)/../mkinstalldirs
-CONFIG_HEADER = config.h
-CONFIG_CLEAN_FILES = po/Makefile.in
-PROGRAMS = $(noinst_PROGRAMS)
-am_ld_new_OBJECTS = ldgram.$(OBJEXT) ldlex.$(OBJEXT) lexsup.$(OBJEXT) \
- ldlang.$(OBJEXT) mri.$(OBJEXT) ldctor.$(OBJEXT) \
- ldmain.$(OBJEXT) ldwrite.$(OBJEXT) ldexp.$(OBJEXT) \
- ldemul.$(OBJEXT) ldver.$(OBJEXT) ldmisc.$(OBJEXT) \
- ldfile.$(OBJEXT) ldcref.$(OBJEXT)
-ld_new_OBJECTS = $(am_ld_new_OBJECTS)
-am__DEPENDENCIES_1 =
-am__DEPENDENCIES_2 = ../bfd/libbfd.la
-am__DEPENDENCIES_3 = ../libiberty/libiberty.a
-DEFAULT_INCLUDES = -I. -I$(srcdir) -I.
-depcomp =
-am__depfiles_maybe =
-COMPILE = $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) \
- $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS)
-LTCOMPILE = $(LIBTOOL) --tag=CC --mode=compile $(CC) $(DEFS) \
- $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) \
- $(AM_CFLAGS) $(CFLAGS)
-CCLD = $(CC)
-LINK = $(LIBTOOL) --tag=CC --mode=link $(CCLD) $(AM_CFLAGS) $(CFLAGS) \
- $(AM_LDFLAGS) $(LDFLAGS) -o $@
-LEXCOMPILE = $(LEX) $(LFLAGS) $(AM_LFLAGS)
-LTLEXCOMPILE = $(LIBTOOL) --mode=compile $(LEX) $(LFLAGS) $(AM_LFLAGS)
-YACCCOMPILE = $(YACC) $(YFLAGS) $(AM_YFLAGS)
-LTYACCCOMPILE = $(LIBTOOL) --mode=compile $(YACC) $(YFLAGS) \
- $(AM_YFLAGS)
-YLWRAP = $(top_srcdir)/../ylwrap
-SOURCES = $(ld_new_SOURCES) $(EXTRA_ld_new_SOURCES)
-INFO_DEPS = ld.info
-TEXINFO_TEX = $(top_srcdir)/../texinfo/texinfo.tex
-am__TEXINFO_TEX_DIR = $(top_srcdir)/../texinfo
-DVIS = ld.dvi
-PDFS = ld.pdf
-PSS = ld.ps
-HTMLS = ld.html
-TEXINFOS = ld.texinfo
-TEXI2PDF = $(TEXI2DVI) --pdf --batch
-MAKEINFOHTML = $(MAKEINFO) --html
-AM_MAKEINFOHTMLFLAGS = $(AM_MAKEINFOFLAGS)
-DVIPS = dvips
-RECURSIVE_TARGETS = all-recursive check-recursive dvi-recursive \
- html-recursive info-recursive install-data-recursive \
- install-exec-recursive install-info-recursive \
- install-recursive installcheck-recursive installdirs-recursive \
- pdf-recursive ps-recursive uninstall-info-recursive \
- uninstall-recursive
-man1dir = $(mandir)/man1
-am__installdirs = "$(DESTDIR)$(man1dir)"
-NROFF = nroff
-MANS = $(man_MANS)
-ETAGS = etags
-CTAGS = ctags
-DEJATOOL = $(PACKAGE)
-RUNTESTDEFAULTFLAGS = --tool $$tool --srcdir $$srcdir
-DIST_SUBDIRS = $(SUBDIRS)
-ACLOCAL = @ACLOCAL@
-AMDEP_FALSE = @AMDEP_FALSE@
-AMDEP_TRUE = @AMDEP_TRUE@
-AMTAR = @AMTAR@
-AR = @AR@
-AUTOCONF = @AUTOCONF@
-AUTOHEADER = @AUTOHEADER@
-AUTOMAKE = @AUTOMAKE@
-AWK = @AWK@
-CATALOGS = @CATALOGS@
-CATOBJEXT = @CATOBJEXT@
-CC = @CC@
-CCDEPMODE = @CCDEPMODE@
-CFLAGS = @CFLAGS@
-CPP = @CPP@
-CPPFLAGS = @CPPFLAGS@
-CYGPATH_W = @CYGPATH_W@
-DATADIRNAME = @DATADIRNAME@
-DEFS = @DEFS@
-DEPDIR = @DEPDIR@
-DUMPBIN = @DUMPBIN@
-ECHO_C = @ECHO_C@
-ECHO_N = @ECHO_N@
-ECHO_T = @ECHO_T@
-EGREP = @EGREP@
-EMUL = @EMUL@
-EMULATION_LIBPATH = @EMULATION_LIBPATH@
-EMULATION_OFILES = @EMULATION_OFILES@
-EMUL_EXTRA_OFILES = @EMUL_EXTRA_OFILES@
-EXEEXT = @EXEEXT@
-FGREP = @FGREP@
-GENCAT = @GENCAT@
-GENINSRC_NEVER_FALSE = @GENINSRC_NEVER_FALSE@
-GENINSRC_NEVER_TRUE = @GENINSRC_NEVER_TRUE@
-GMSGFMT = @GMSGFMT@
-GREP = @GREP@
-HDEFINES = @HDEFINES@
-
-#stuff for self hosting (can be overridden in config file).
-HOSTING_CRT0 = @HOSTING_CRT0@
-HOSTING_LIBS = @HOSTING_LIBS@
-INCINTL = @INCINTL@
-INSTALL_DATA = @INSTALL_DATA@
-INSTALL_PROGRAM = @INSTALL_PROGRAM@
-INSTALL_SCRIPT = @INSTALL_SCRIPT@
-INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@
-INSTOBJEXT = @INSTOBJEXT@
-LD = @LD@
-LDFLAGS = @LDFLAGS@
-LEX = `if [ -f ../flex/flex ]; then echo ../flex/flex; else echo @LEX@; fi`
-LEXLIB = @LEXLIB@
-LEX_OUTPUT_ROOT = @LEX_OUTPUT_ROOT@
-LIBINTL = @LIBINTL@
-LIBINTL_DEP = @LIBINTL_DEP@
-LIBOBJS = @LIBOBJS@
-LIBS = @LIBS@
-LIBTOOL = @LIBTOOL@
-
-# Search path to override the default search path for -lfoo libraries.
-# If LIB_PATH is empty, the ones in the script (if any) are left alone.
-# (The default is usually /lib:/usr/lib:/usr/local/lib, unless building
-# a cross-linker, in which case the default is empty. See genscripts.sh.)
-# Otherwise, they are replaced with the ones given in LIB_PATH,
-# which may have the form: LIB_PATH=/lib:/usr/local/lib. This can be set
-# when the linker is configured via the --with-lib-path configure switch.
-LIB_PATH = @LIB_PATH@
-LN_S = @LN_S@
-LTLIBOBJS = @LTLIBOBJS@
-MAINT = @MAINT@
-MAINTAINER_MODE_FALSE = @MAINTAINER_MODE_FALSE@
-MAINTAINER_MODE_TRUE = @MAINTAINER_MODE_TRUE@
-MAKEINFO = @MAKEINFO@
-MKINSTALLDIRS = @MKINSTALLDIRS@
-MSGFMT = @MSGFMT@
-MSGMERGE = @MSGMERGE@
-NATIVE_LIB_DIRS = @NATIVE_LIB_DIRS@
-NM = @NM@
-NO_WERROR = @NO_WERROR@
-OBJEXT = @OBJEXT@
-PACKAGE = @PACKAGE@
-PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@
-PACKAGE_NAME = @PACKAGE_NAME@
-PACKAGE_STRING = @PACKAGE_STRING@
-PACKAGE_TARNAME = @PACKAGE_TARNAME@
-PACKAGE_VERSION = @PACKAGE_VERSION@
-PATH_SEPARATOR = @PATH_SEPARATOR@
-POSUB = @POSUB@
-RANLIB = @RANLIB@
-SED = @SED@
-SET_MAKE = @SET_MAKE@
-SHELL = @SHELL@
-STRINGIFY = @STRINGIFY@
-STRIP = @STRIP@
-TARGET_SYSTEM_ROOT = @TARGET_SYSTEM_ROOT@
-TARGET_SYSTEM_ROOT_DEFINE = @TARGET_SYSTEM_ROOT_DEFINE@
-
-# This is the real libbfd.a created by libtool.
-TESTBFDLIB = @TESTBFDLIB@
-USE_NLS = @USE_NLS@
-VERSION = @VERSION@
-WARN_CFLAGS = @WARN_CFLAGS@
-XGETTEXT = @XGETTEXT@
-YACC = `if [ -f ../bison/bison ]; then echo ../bison/bison -y -L$(srcdir)/../bison/; else echo @YACC@; fi`
-ac_ct_AR = @ac_ct_AR@
-ac_ct_CC = @ac_ct_CC@
-ac_ct_DUMPBIN = @ac_ct_DUMPBIN@
-ac_ct_RANLIB = @ac_ct_RANLIB@
-ac_ct_STRIP = @ac_ct_STRIP@
-am__fastdepCC_FALSE = @am__fastdepCC_FALSE@
-am__fastdepCC_TRUE = @am__fastdepCC_TRUE@
-am__include = @am__include@
-am__leading_dot = @am__leading_dot@
-am__quote = @am__quote@
-am__tar = @am__tar@
-am__untar = @am__untar@
-bindir = @bindir@
-build = @build@
-build_alias = @build_alias@
-build_cpu = @build_cpu@
-build_os = @build_os@
-build_vendor = @build_vendor@
-datadir = @datadir@
-datarootdir = @datarootdir@
-docdir = @docdir@
-exec_prefix = @exec_prefix@
-host = @host@
-host_alias = @host_alias@
-host_cpu = @host_cpu@
-host_os = @host_os@
-host_vendor = @host_vendor@
-htmldir = @htmldir@
-includedir = @includedir@
-infodir = @infodir@
-install_sh = @install_sh@
-libdir = @libdir@
-libexecdir = @libexecdir@
-localstatedir = @localstatedir@
-lt_ECHO = @lt_ECHO@
-mandir = @mandir@
-mkdir_p = @mkdir_p@
-oldincludedir = @oldincludedir@
-prefix = @prefix@
-program_transform_name = @program_transform_name@
-sbindir = @sbindir@
-sharedstatedir = @sharedstatedir@
-sysconfdir = @sysconfdir@
-target = @target@
-target_alias = @target_alias@
-target_cpu = @target_cpu@
-target_os = @target_os@
-target_vendor = @target_vendor@
-use_sysroot = @use_sysroot@
-AUTOMAKE_OPTIONS = cygnus dejagnu
-ACLOCAL_AMFLAGS = -I .. -I ../config -I ../bfd
-SUBDIRS = po
-tooldir = $(exec_prefix)/$(target_alias)
-YFLAGS = -d
-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
-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 $(AM_MAKEINFOFLAGS)
-POD2MAN = pod2man --center="GNU Development Tools" \
- --release="binutils-$(VERSION)" --section=1
-
-HOSTING_EMU = -m $(EMUL)
-
-# Setup the testing framework, if you have one
-EXPECT = expect
-RUNTEST = runtest
-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 = g++
-CXX_FOR_TARGET = ` \
- if [ -f $$r/../gcc/g++ ] ; then \
- if [ -f $$r/../newlib/Makefile ] ; then \
- echo $$r/../gcc/g++ -B$$r/../gcc/ -idirafter $$r/../newlib/targ-include -idirafter $${srcroot}/../newlib/libc/include -nostdinc; \
- else \
- echo $$r/../gcc/g++ -B$$r/../gcc/; \
- fi; \
- else \
- if [ "@host@" = "@target@" ] ; then \
- echo $(CXX); \
- else \
- echo g++ | sed '$(transform)'; \
- fi; \
- fi`
-
-info_TEXINFOS = ld.texinfo
-ld_TEXINFOS = configdoc.texi
-noinst_TEXINFOS = ldint.texinfo
-man_MANS = ld.1
-AM_MAKEINFOFLAGS = -I $(srcdir) -I $(BFDDIR)/doc -I ../bfd/doc \
- -I $(top_srcdir)/../libiberty
-
-TEXI2DVI = texi2dvi -I $(srcdir) -I $(BFDDIR)/doc -I ../bfd/doc \
- -I $(top_srcdir)/../libiberty
-
-INCLUDES = -D_GNU_SOURCE -I. -I$(srcdir) -I../bfd -I$(BFDDIR) -I$(INCDIR) \
- @INCINTL@ $(HDEFINES) $(CFLAGS) \
- -DLOCALEDIR="\"$(datadir)/locale\""
-
-BFDLIB = ../bfd/libbfd.la
-LIBIBERTY = ../libiberty/libiberty.a
-ALL_EMULATIONS = \
- eaixppc.o \
- eaixrs6.o \
- ealpha.o \
- earcelf.o \
- earm_epoc_pe.o \
- earm_wince_pe.o \
- earmaoutb.o \
- earmaoutl.o \
- earmcoff.o \
- earmelf.o \
- earmelfb.o \
- earmelf_fbsd.o \
- earmelf_linux.o \
- earmelf_linux_eabi.o \
- earmelfb_linux.o \
- earmelfb_linux_eabi.o \
- earmelf_nbsd.o \
- earmelfb_nbsd.o \
- earmelf_vxworks.o \
- earmnto.o \
- earmnbsd.o \
- earmpe.o \
- earmsymbian.o \
- eavr2.o \
- eavr1.o \
- eavr3.o \
- eavr4.o \
- eavr5.o \
- eavr6.o \
- ecoff_i860.o \
- ecoff_sparc.o \
- eelf32_spu.o \
- ecrisaout.o \
- ecriself.o \
- ecrislinux.o \
- ed10velf.o \
- ed30v_e.o \
- ed30v_o.o \
- ed30velf.o \
- edelta68.o \
- eelf32_dlx.o \
- eelf32_i960.o \
- eelf32_i860.o \
- eelf32_sparc.o \
- eelf32_sparc_vxworks.o \
- eelf32b4300.o \
- eelf32bfin.o \
- eelf32bfinfd.o \
- eelf32cr16.o \
- eelf32cr16c.o \
- eelf32bmip.o \
- eelf32bmipn32.o \
- eelf32btsmip.o \
- eelf32crx.o \
- eelf32btsmipn32.o \
- eelf32ltsmip.o \
- eelf32ltsmipn32.o \
- eelf32ebmip.o \
- eelf32ebmipvxworks.o \
- eelf32elmip.o \
- eelf32elmipvxworks.o \
- eelf32fr30.o \
- eelf32frv.o \
- eelf32i370.o \
- eelf32ip2k.o \
- eelf32iq2000.o \
- eelf32iq10.o \
- eelf32l4300.o \
- eelf32lmip.o \
- eelf32lppc.o \
- eelf32lppcnto.o \
- eelf32lppcsim.o \
- eelf32m32c.o \
- eelf32mcore.o \
- eelf32mep.o \
- eelf32mipswindiss.o \
- eelf32mt.o \
- eelf32openrisc.o \
- eelf32ppc.o \
- eelf32ppc_fbsd.o \
- eelf32ppclinux.o \
- eelf32ppcnto.o \
- eelf32ppcsim.o \
- eelf32ppcwindiss.o \
- eelf32ppcvxworks.o \
- eelf32vax.o \
- eelf32xc16x.o \
- eelf32xc16xl.o \
- eelf32xc16xs.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_i386_vxworks.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 \
- ei386freebsd.o \
- ei386go32.o \
- ei386linux.o \
- ei386lynx.o \
- ei386mach.o \
- ei386moss.o \
- ei386msdos.o \
- ei386nbsd.o \
- ei386nto.o \
- ei386nw.o \
- ei386pe.o \
- ei386pe_posix.o \
- ei386pep.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 \
- em68knbsd.o \
- em68kpsos.o \
- em88kbcs.o \
- emaxqcoff.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 \
- emsp430x1610.o \
- emsp430x1611.o \
- emsp430x1612.o \
- emsp430x2101.o \
- emsp430x2111.o \
- emsp430x2121.o \
- emsp430x2131.o \
- emsp430x311.o \
- emsp430x312.o \
- emsp430x313.o \
- emsp430x314.o \
- emsp430x315.o \
- emsp430x323.o \
- emsp430x325.o \
- emsp430x336.o \
- emsp430x337.o \
- emsp430x412.o \
- emsp430x413.o \
- emsp430x415.o \
- emsp430x417.o \
- emsp430xE423.o \
- emsp430xE425.o \
- emsp430xE427.o \
- emsp430xW423.o \
- emsp430xW425.o \
- emsp430xW427.o \
- emsp430xG437.o \
- emsp430xG438.o \
- emsp430xG439.o \
- emsp430x435.o \
- emsp430x436.o \
- emsp430x437.o \
- 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 \
- eppclynx.o \
- eriscix.o \
- escoreelf.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 \
- eshelf_uclinux.o \
- eshelf_vxworks.o \
- eshlelf_vxworks.o \
- eshl.o \
- eshlelf.o \
- eshlsymbian.o \
- eshpe.o \
- esparcaout.o \
- esparclinux.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 \
- ez80.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 \
- pep-dll.o
-
-CFILES = ldctor.c ldemul.c ldexp.c ldfile.c ldlang.c \
- ldmain.c ldmisc.c ldver.c ldwrite.c lexsup.c \
- mri.c ldcref.c pe-dll.c pep-dll.c
-
-HFILES = ld.h ldctor.h ldemul.h ldexp.h ldfile.h \
- ldlang.h ldlex.h ldmain.h ldmisc.h ldver.h \
- ldwrite.h mri.h deffile.h pe-dll.h pep-dll.h elf-hints-local.h
-
-GENERATED_CFILES = ldgram.c ldlex.c deffilep.c
-GENERATED_HFILES = ldgram.h ldemul-list.h deffilep.h
-OFILES = ldgram.o ldlex.o lexsup.o ldlang.o mri.o ldctor.o ldmain.o \
- ldwrite.o ldexp.o ldemul.o ldver.o ldmisc.o \
- ldfile.o ldcref.o ${EMULATION_OFILES} ${EMUL_EXTRA_OFILES}
-
-STAGESTUFF = *.o ldscripts/* e*.c
-
-# At the moment this is just a list of those emulation template files
-# that contain internationalised strings.
-EMULATION_FILES = emultempl/pe.em emultempl/armcoff.em
-POTFILES = $(CFILES) $(HFILES) $(EMULATION_FILES)
-
-# These all start with e so 'make clean' can find them.
-GENSCRIPTS = LIB_PATH='${LIB_PATH}' $(SHELL) $(srcdir)/genscripts.sh "${srcdir}" "${libdir}" "${prefix}" "${exec_prefix}" @host@ @target@ @target_alias@ "@EMULATION_LIBPATH@" "@NATIVE_LIB_DIRS@" @use_sysroot@
-GEN_DEPENDS = $(srcdir)/genscripts.sh stringify.sed
-ELF_DEPS = $(srcdir)/emultempl/elf32.em $(srcdir)/emultempl/elf-generic.em
-ELF_GEN_DEPS = $(srcdir)/emultempl/generic.em $(srcdir)/emultempl/elf-generic.em $(srcdir)/emultempl/genelf.em
-
-# We need this for automake to use YLWRAP.
-EXTRA_ld_new_SOURCES = deffilep.y
-ld_new_SOURCES = ldgram.y ldlex.l lexsup.c ldlang.c mri.c ldctor.c ldmain.c \
- ldwrite.c ldexp.c ldemul.c ldver.c ldmisc.c ldfile.c ldcref.c
-
-ld_new_DEPENDENCIES = $(EMULATION_OFILES) $(EMUL_EXTRA_OFILES) $(BFDLIB) $(LIBIBERTY) $(LIBINTL_DEP)
-ld_new_LDADD = $(EMULATION_OFILES) $(EMUL_EXTRA_OFILES) $(BFDLIB) $(LIBIBERTY) $(LIBINTL)
-MAINTAINERCLEANFILES = configdoc.texi ld.info
-
-# We want to reconfigure if configure.host or configure.tgt changes. We
-# extract version from bfd/configure.in, so we must depend on that also.
-CONFIG_STATUS_DEPENDENCIES = $(srcdir)/configure.host $(srcdir)/configure.tgt \
- $(srcdir)/../bfd/configure.in
-
-MOSTLYCLEANFILES = $(STAGESTUFF) ld1$(EXEEXT) ld2$(EXEEXT) ld3$(EXEEXT) \
- ldemul-list.h crtbegin.o crtend.o ld.log ld.sum
-
-CLEANFILES = dep.sed DEP DEPA DEP1 DEP2 spu_ovl.s
-html__strip_dir = `echo $$p | sed -e 's|^.*/||'`;
-
-# Stuff that should be included in a distribution. The diststuff
-# target is run by the taz target in ../Makefile.in.
-EXTRA_DIST = ldgram.c ldgram.h ldlex.c emultempl/spu_ovl.o $(man_MANS)
-DISTCLEANFILES = tdirs site.exp site.bak stringify.sed $(am__append_1)
-all: config.h
- $(MAKE) $(AM_MAKEFLAGS) all-recursive
-
-.SUFFIXES:
-.SUFFIXES: .c .dvi .l .lo .o .obj .ps .y
-am--refresh:
- @:
-$(srcdir)/Makefile.in: @MAINTAINER_MODE_TRUE@ $(srcdir)/Makefile.am $(am__configure_deps)
- @for dep in $?; do \
- case '$(am__configure_deps)' in \
- *$$dep*) \
- echo ' cd $(srcdir) && $(AUTOMAKE) --cygnus '; \
- cd $(srcdir) && $(AUTOMAKE) --cygnus \
- && exit 0; \
- exit 1;; \
- esac; \
- done; \
- echo ' cd $(top_srcdir) && $(AUTOMAKE) --cygnus Makefile'; \
- cd $(top_srcdir) && \
- $(AUTOMAKE) --cygnus Makefile
-.PRECIOUS: Makefile
-Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status
- @case '$?' in \
- *config.status*) \
- echo ' $(SHELL) ./config.status'; \
- $(SHELL) ./config.status;; \
- *) \
- echo ' cd $(top_builddir) && $(SHELL) ./config.status $@ $(am__depfiles_maybe)'; \
- cd $(top_builddir) && $(SHELL) ./config.status $@ $(am__depfiles_maybe);; \
- esac;
-
-$(top_builddir)/config.status: $(top_srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES)
- $(SHELL) ./config.status --recheck
-
-$(top_srcdir)/configure: @MAINTAINER_MODE_TRUE@ $(am__configure_deps)
- cd $(srcdir) && $(AUTOCONF)
-$(ACLOCAL_M4): @MAINTAINER_MODE_TRUE@ $(am__aclocal_m4_deps)
- cd $(srcdir) && $(ACLOCAL) $(ACLOCAL_AMFLAGS)
-
-config.h: stamp-h1
- @if test ! -f $@; then \
- rm -f stamp-h1; \
- $(MAKE) stamp-h1; \
- else :; fi
-
-stamp-h1: $(srcdir)/config.in $(top_builddir)/config.status
- @rm -f stamp-h1
- cd $(top_builddir) && $(SHELL) ./config.status config.h
-$(srcdir)/config.in: @MAINTAINER_MODE_TRUE@ $(am__configure_deps)
- cd $(top_srcdir) && $(AUTOHEADER)
- rm -f stamp-h1
- touch $@
-
-distclean-hdr:
- -rm -f config.h stamp-h1
-po/Makefile.in: $(top_builddir)/config.status $(top_srcdir)/po/Make-in
- cd $(top_builddir) && $(SHELL) ./config.status $@
-
-clean-noinstPROGRAMS:
- @list='$(noinst_PROGRAMS)'; for p in $$list; do \
- f=`echo $$p|sed 's/$(EXEEXT)$$//'`; \
- echo " rm -f $$p $$f"; \
- rm -f $$p $$f ; \
- done
-ldgram.h: ldgram.c
- @if test ! -f $@; then \
- rm -f ldgram.c; \
- $(MAKE) ldgram.c; \
- else :; fi
-deffilep.h: deffilep.c
- @if test ! -f $@; then \
- rm -f deffilep.c; \
- $(MAKE) deffilep.c; \
- else :; fi
-ld-new$(EXEEXT): $(ld_new_OBJECTS) $(ld_new_DEPENDENCIES)
- @rm -f ld-new$(EXEEXT)
- $(LINK) $(ld_new_LDFLAGS) $(ld_new_OBJECTS) $(ld_new_LDADD) $(LIBS)
-
-mostlyclean-compile:
- -rm -f *.$(OBJEXT)
-
-distclean-compile:
- -rm -f *.tab.c
-
-.c.o:
- $(COMPILE) -c $<
-
-.c.obj:
- $(COMPILE) -c `$(CYGPATH_W) '$<'`
-
-.c.lo:
- $(LTCOMPILE) -c -o $@ $<
-
-.l.c:
- $(LEXCOMPILE) $<
- sed '/^#/ s|$(LEX_OUTPUT_ROOT)\.c|$@|' $(LEX_OUTPUT_ROOT).c >$@
- rm -f $(LEX_OUTPUT_ROOT).c
-
-.y.c:
- $(SHELL) $(YLWRAP) $< y.tab.c $@ y.tab.h $*.h y.output $*.output -- $(YACCCOMPILE)
-
-mostlyclean-libtool:
- -rm -f *.lo
-
-clean-libtool:
- -rm -rf .libs _libs
-
-distclean-libtool:
- -rm -f libtool
-
-ld.info: ld.texinfo $(ld_TEXINFOS)
- restore=: && backupdir="$(am__leading_dot)am$$$$" && \
- rm -rf $$backupdir && mkdir $$backupdir && \
- if ($(MAKEINFO) --version) >/dev/null 2>&1; then \
- for f in $@ $@-[0-9] $@-[0-9][0-9] $(@:.info=).i[0-9] $(@:.info=).i[0-9][0-9]; do \
- if test -f $$f; then mv $$f $$backupdir; restore=mv; else :; fi; \
- done; \
- else :; fi && \
- if $(MAKEINFO) $(AM_MAKEINFOFLAGS) $(MAKEINFOFLAGS) -I $(srcdir) \
- -o $@ `test -f 'ld.texinfo' || echo '$(srcdir)/'`ld.texinfo; \
- then \
- rc=0; \
- else \
- rc=$$?; \
- $$restore $$backupdir/* `echo "./$@" | sed 's|[^/]*$$||'`; \
- fi; \
- rm -rf $$backupdir; exit $$rc
-
-ld.dvi: ld.texinfo $(ld_TEXINFOS)
- TEXINPUTS="$(am__TEXINFO_TEX_DIR)$(PATH_SEPARATOR)$$TEXINPUTS" \
- MAKEINFO='$(MAKEINFO) $(AM_MAKEINFOFLAGS) $(MAKEINFOFLAGS) -I $(srcdir)' \
- $(TEXI2DVI) -o $@ `test -f 'ld.texinfo' || echo '$(srcdir)/'`ld.texinfo
-
-ld.pdf: ld.texinfo $(ld_TEXINFOS)
- TEXINPUTS="$(am__TEXINFO_TEX_DIR)$(PATH_SEPARATOR)$$TEXINPUTS" \
- MAKEINFO='$(MAKEINFO) $(AM_MAKEINFOFLAGS) $(MAKEINFOFLAGS) -I $(srcdir)' \
- $(TEXI2PDF) -o $@ `test -f 'ld.texinfo' || echo '$(srcdir)/'`ld.texinfo
-
-ld.html: ld.texinfo $(ld_TEXINFOS)
- rm -rf $(@:.html=.htp)
- if $(MAKEINFOHTML) $(AM_MAKEINFOHTMLFLAGS) $(MAKEINFOFLAGS) -I $(srcdir) \
- -o $(@:.html=.htp) `test -f 'ld.texinfo' || echo '$(srcdir)/'`ld.texinfo; \
- then \
- rm -rf $@; \
- if test ! -d $(@:.html=.htp) && test -d $(@:.html=); then \
- mv $(@:.html=) $@; else mv $(@:.html=.htp) $@; fi; \
- else \
- if test ! -d $(@:.html=.htp) && test -d $(@:.html=); then \
- rm -rf $(@:.html=); else rm -Rf $(@:.html=.htp) $@; fi; \
- exit 1; \
- fi
-.dvi.ps:
- TEXINPUTS="$(am__TEXINFO_TEX_DIR)$(PATH_SEPARATOR)$$TEXINPUTS" \
- $(DVIPS) -o $@ $<
-
-uninstall-info-am:
- @$(PRE_UNINSTALL)
- @if (install-info --version && \
- install-info --version 2>&1 | sed 1q | grep -i -v debian) >/dev/null 2>&1; then \
- list='$(INFO_DEPS)'; \
- for file in $$list; do \
- relfile=`echo "$$file" | sed 's|^.*/||'`; \
- echo " install-info --info-dir='$(DESTDIR)$(infodir)' --remove '$(DESTDIR)$(infodir)/$$relfile'"; \
- install-info --info-dir="$(DESTDIR)$(infodir)" --remove "$(DESTDIR)$(infodir)/$$relfile"; \
- done; \
- else :; fi
- @$(NORMAL_UNINSTALL)
- @list='$(INFO_DEPS)'; \
- for file in $$list; do \
- relfile=`echo "$$file" | sed 's|^.*/||'`; \
- relfile_i=`echo "$$relfile" | sed 's|\.info$$||;s|$$|.i|'`; \
- (if cd "$(DESTDIR)$(infodir)"; then \
- echo " cd '$(DESTDIR)$(infodir)' && rm -f $$relfile $$relfile-[0-9] $$relfile-[0-9][0-9] $$relfile_i[0-9] $$relfile_i[0-9][0-9]"; \
- rm -f $$relfile $$relfile-[0-9] $$relfile-[0-9][0-9] $$relfile_i[0-9] $$relfile_i[0-9][0-9]; \
- else :; fi); \
- done
-
-dist-info: $(INFO_DEPS)
- @srcdirstrip=`echo "$(srcdir)" | sed 's|.|.|g'`; \
- list='$(INFO_DEPS)'; \
- for base in $$list; do \
- case $$base in \
- $(srcdir)/*) base=`echo "$$base" | sed "s|^$$srcdirstrip/||"`;; \
- esac; \
- if test -f $$base; then d=.; else d=$(srcdir); fi; \
- for file in $$d/$$base*; do \
- relfile=`expr "$$file" : "$$d/\(.*\)"`; \
- test -f $(distdir)/$$relfile || \
- cp -p $$file $(distdir)/$$relfile; \
- done; \
- done
-
-mostlyclean-aminfo:
- -rm -rf ld.aux ld.cp ld.cps ld.fn ld.fns ld.ky ld.log ld.pg ld.pgs ld.tmp \
- ld.toc ld.tp ld.tps ld.vr ld.vrs ld.dvi ld.pdf ld.ps ld.html
-
-maintainer-clean-aminfo:
- @list='$(INFO_DEPS)'; for i in $$list; do \
- i_i=`echo "$$i" | sed 's|\.info$$||;s|$$|.i|'`; \
- echo " rm -f $$i $$i-[0-9] $$i-[0-9][0-9] $$i_i[0-9] $$i_i[0-9][0-9]"; \
- rm -f $$i $$i-[0-9] $$i-[0-9][0-9] $$i_i[0-9] $$i_i[0-9][0-9]; \
- done
-
-clean-info: mostlyclean-aminfo
-install-man1: $(man1_MANS) $(man_MANS)
- @$(NORMAL_INSTALL)
- test -z "$(man1dir)" || $(mkdir_p) "$(DESTDIR)$(man1dir)"
- @list='$(man1_MANS) $(dist_man1_MANS) $(nodist_man1_MANS)'; \
- l2='$(man_MANS) $(dist_man_MANS) $(nodist_man_MANS)'; \
- for i in $$l2; do \
- case "$$i" in \
- *.1*) list="$$list $$i" ;; \
- esac; \
- 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/^.*\\.//'`; \
- case "$$ext" in \
- 1*) ;; \
- *) ext='1' ;; \
- esac; \
- inst=`echo $$i | sed -e 's/\\.[0-9a-z]*$$//'`; \
- inst=`echo $$inst | sed -e 's/^.*\///'`; \
- inst=`echo $$inst | sed '$(transform)'`.$$ext; \
- echo " $(INSTALL_DATA) '$$file' '$(DESTDIR)$(man1dir)/$$inst'"; \
- $(INSTALL_DATA) "$$file" "$(DESTDIR)$(man1dir)/$$inst"; \
- done
-uninstall-man1:
- @$(NORMAL_UNINSTALL)
- @list='$(man1_MANS) $(dist_man1_MANS) $(nodist_man1_MANS)'; \
- l2='$(man_MANS) $(dist_man_MANS) $(nodist_man_MANS)'; \
- for i in $$l2; do \
- case "$$i" in \
- *.1*) list="$$list $$i" ;; \
- esac; \
- done; \
- for i in $$list; do \
- ext=`echo $$i | sed -e 's/^.*\\.//'`; \
- case "$$ext" in \
- 1*) ;; \
- *) ext='1' ;; \
- esac; \
- inst=`echo $$i | sed -e 's/\\.[0-9a-z]*$$//'`; \
- inst=`echo $$inst | sed -e 's/^.*\///'`; \
- inst=`echo $$inst | sed '$(transform)'`.$$ext; \
- echo " rm -f '$(DESTDIR)$(man1dir)/$$inst'"; \
- rm -f "$(DESTDIR)$(man1dir)/$$inst"; \
- done
-
-# 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.
-$(RECURSIVE_TARGETS):
- @failcom='exit 1'; \
- for f in x $$MAKEFLAGS; do \
- case $$f in \
- *=* | --[!k]*);; \
- *k*) failcom='fail=yes';; \
- esac; \
- done; \
- dot_seen=no; \
- target=`echo $@ | sed s/-recursive//`; \
- list='$(SUBDIRS)'; for subdir in $$list; do \
- echo "Making $$target in $$subdir"; \
- if test "$$subdir" = "."; then \
- dot_seen=yes; \
- local_target="$$target-am"; \
- else \
- local_target="$$target"; \
- fi; \
- (cd $$subdir && $(MAKE) $(AM_MAKEFLAGS) $$local_target) \
- || eval $$failcom; \
- done; \
- if test "$$dot_seen" = "no"; then \
- $(MAKE) $(AM_MAKEFLAGS) "$$target-am" || exit 1; \
- fi; test -z "$$fail"
-
-mostlyclean-recursive clean-recursive distclean-recursive \
-maintainer-clean-recursive:
- @failcom='exit 1'; \
- for f in x $$MAKEFLAGS; do \
- case $$f in \
- *=* | --[!k]*);; \
- *k*) failcom='fail=yes';; \
- esac; \
- done; \
- dot_seen=no; \
- case "$@" in \
- distclean-* | maintainer-clean-*) list='$(DIST_SUBDIRS)' ;; \
- *) list='$(SUBDIRS)' ;; \
- esac; \
- rev=''; for subdir in $$list; do \
- if test "$$subdir" = "."; then :; else \
- rev="$$subdir $$rev"; \
- fi; \
- done; \
- 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) \
- || eval $$failcom; \
- done && test -z "$$fail"
-tags-recursive:
- list='$(SUBDIRS)'; for subdir in $$list; do \
- test "$$subdir" = . || (cd $$subdir && $(MAKE) $(AM_MAKEFLAGS) tags); \
- done
-ctags-recursive:
- list='$(SUBDIRS)'; for subdir in $$list; do \
- test "$$subdir" = . || (cd $$subdir && $(MAKE) $(AM_MAKEFLAGS) ctags); \
- done
-
-ID: $(HEADERS) $(SOURCES) $(LISP) $(TAGS_FILES)
- list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \
- unique=`for i in $$list; do \
- if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \
- done | \
- $(AWK) ' { files[$$0] = 1; } \
- END { for (i in files) print i; }'`; \
- mkid -fID $$unique
-tags: TAGS
-
-TAGS: tags-recursive $(HEADERS) $(SOURCES) config.in $(TAGS_DEPENDENCIES) \
- $(TAGS_FILES) $(LISP)
- tags=; \
- here=`pwd`; \
- if ($(ETAGS) --etags-include --version) >/dev/null 2>&1; then \
- include_option=--etags-include; \
- empty_fix=.; \
- else \
- include_option=--include; \
- empty_fix=; \
- fi; \
- list='$(SUBDIRS)'; for subdir in $$list; do \
- if test "$$subdir" = .; then :; else \
- test ! -f $$subdir/TAGS || \
- tags="$$tags $$include_option=$$here/$$subdir/TAGS"; \
- fi; \
- done; \
- list='$(SOURCES) $(HEADERS) config.in $(LISP) $(TAGS_FILES)'; \
- unique=`for i in $$list; do \
- if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \
- done | \
- $(AWK) ' { files[$$0] = 1; } \
- END { for (i in files) print i; }'`; \
- if test -z "$(ETAGS_ARGS)$$tags$$unique"; then :; else \
- test -n "$$unique" || unique=$$empty_fix; \
- $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \
- $$tags $$unique; \
- fi
-ctags: CTAGS
-CTAGS: ctags-recursive $(HEADERS) $(SOURCES) config.in $(TAGS_DEPENDENCIES) \
- $(TAGS_FILES) $(LISP)
- tags=; \
- here=`pwd`; \
- list='$(SOURCES) $(HEADERS) config.in $(LISP) $(TAGS_FILES)'; \
- unique=`for i in $$list; do \
- if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \
- done | \
- $(AWK) ' { files[$$0] = 1; } \
- END { for (i in files) print i; }'`; \
- test -z "$(CTAGS_ARGS)$$tags$$unique" \
- || $(CTAGS) $(CTAGSFLAGS) $(AM_CTAGSFLAGS) $(CTAGS_ARGS) \
- $$tags $$unique
-
-GTAGS:
- here=`$(am__cd) $(top_builddir) && pwd` \
- && cd $(top_srcdir) \
- && gtags -i $(GTAGS_ARGS) $$here
-
-distclean-tags:
- -rm -f TAGS ID GTAGS GRTAGS GSYMS GPATH tags
-site.exp: Makefile
- @echo 'Making a new site.exp file...'
- @echo '## these variables are automatically generated by make ##' >site.tmp
- @echo '# Do not edit here. If you wish to override these values' >>site.tmp
- @echo '# edit the last section' >>site.tmp
- @echo 'set srcdir $(srcdir)' >>site.tmp
- @echo "set objdir `pwd`" >>site.tmp
- @echo 'set build_alias "$(build_alias)"' >>site.tmp
- @echo 'set build_triplet $(build_triplet)' >>site.tmp
- @echo 'set host_alias "$(host_alias)"' >>site.tmp
- @echo 'set host_triplet $(host_triplet)' >>site.tmp
- @echo 'set target_alias "$(target_alias)"' >>site.tmp
- @echo 'set target_triplet $(target_triplet)' >>site.tmp
- @echo '## All variables above are generated by configure. Do Not Edit ##' >>site.tmp
- @test ! -f site.exp || \
- sed '1,/^## All variables above are.*##/ d' site.exp >> site.tmp
- @-rm -f site.bak
- @test ! -f site.exp || mv site.exp site.bak
- @mv site.tmp site.exp
-
-distclean-DEJAGNU:
- -rm -f site.exp site.bak
- -l='$(DEJATOOL)'; for tool in $$l; do \
- rm -f $$tool.sum $$tool.log; \
- done
-check-am:
- $(MAKE) $(AM_MAKEFLAGS) check-DEJAGNU
-check: check-recursive
-all-am: Makefile $(PROGRAMS) $(MANS) config.h
-installdirs: installdirs-recursive
-installdirs-am:
- for dir in "$(DESTDIR)$(man1dir)"; do \
- test -z "$$dir" || $(mkdir_p) "$$dir"; \
- done
-install: install-recursive
-install-exec: install-exec-recursive
-install-data: install-data-recursive
-uninstall: uninstall-recursive
-
-install-am: all-am
- @$(MAKE) $(AM_MAKEFLAGS) install-exec-am install-data-am
-
-installcheck: installcheck-recursive
-install-strip:
- $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \
- install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \
- `test -z '$(STRIP)' || \
- echo "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'"` install
-mostlyclean-generic:
- -test -z "$(MOSTLYCLEANFILES)" || rm -f $(MOSTLYCLEANFILES)
-
-clean-generic:
- -test -z "$(CLEANFILES)" || rm -f $(CLEANFILES)
-
-distclean-generic:
- -test -z "$(CONFIG_CLEAN_FILES)" || rm -f $(CONFIG_CLEAN_FILES)
- -test -z "$(DISTCLEANFILES)" || rm -f $(DISTCLEANFILES)
-
-maintainer-clean-generic:
- @echo "This command is intended for maintainers to use"
- @echo "it deletes files that may require special tools to rebuild."
- -rm -f deffilep.c
- -rm -f deffilep.h
- -rm -f ldgram.c
- -rm -f ldgram.h
- -rm -f ldlex.c
- -test -z "$(MAINTAINERCLEANFILES)" || rm -f $(MAINTAINERCLEANFILES)
-clean: clean-recursive
-
-clean-am: clean-generic clean-libtool clean-noinstPROGRAMS \
- mostlyclean-am
-
-distclean: distclean-recursive
- -rm -f $(am__CONFIG_DISTCLEAN_FILES)
- -rm -f Makefile
-distclean-am: clean-am distclean-DEJAGNU distclean-compile \
- distclean-generic distclean-hdr distclean-libtool \
- distclean-local distclean-tags
-
-dvi: dvi-recursive
-
-dvi-am: $(DVIS)
-
-html: html-recursive
-
-html-am: $(HTMLS)
-
-info: info-recursive
-
-info-am: $(INFO_DEPS)
-
-install-data-am: install-data-local install-man
-
-install-exec-am: install-exec-local
-
-install-info: install-info-recursive
-
-install-info-am: $(INFO_DEPS)
- @$(NORMAL_INSTALL)
- test -z "$(infodir)" || $(mkdir_p) "$(DESTDIR)$(infodir)"
- @srcdirstrip=`echo "$(srcdir)" | sed 's|.|.|g'`; \
- list='$(INFO_DEPS)'; \
- for file in $$list; do \
- case $$file in \
- $(srcdir)/*) file=`echo "$$file" | sed "s|^$$srcdirstrip/||"`;; \
- esac; \
- if test -f $$file; then d=.; else d=$(srcdir); fi; \
- file_i=`echo "$$file" | sed 's|\.info$$||;s|$$|.i|'`; \
- for ifile in $$d/$$file $$d/$$file-[0-9] $$d/$$file-[0-9][0-9] \
- $$d/$$file_i[0-9] $$d/$$file_i[0-9][0-9] ; do \
- if test -f $$ifile; then \
- relfile=`echo "$$ifile" | sed 's|^.*/||'`; \
- echo " $(INSTALL_DATA) '$$ifile' '$(DESTDIR)$(infodir)/$$relfile'"; \
- $(INSTALL_DATA) "$$ifile" "$(DESTDIR)$(infodir)/$$relfile"; \
- else : ; fi; \
- done; \
- done
- @$(POST_INSTALL)
- @if (install-info --version && \
- install-info --version 2>&1 | sed 1q | grep -i -v debian) >/dev/null 2>&1; then \
- list='$(INFO_DEPS)'; \
- for file in $$list; do \
- relfile=`echo "$$file" | sed 's|^.*/||'`; \
- echo " install-info --info-dir='$(DESTDIR)$(infodir)' '$(DESTDIR)$(infodir)/$$relfile'";\
- install-info --info-dir="$(DESTDIR)$(infodir)" "$(DESTDIR)$(infodir)/$$relfile" || :;\
- done; \
- else : ; fi
-install-man: install-man1
-
-installcheck-am:
-
-maintainer-clean: maintainer-clean-recursive
- -rm -f $(am__CONFIG_DISTCLEAN_FILES)
- -rm -rf $(top_srcdir)/autom4te.cache
- -rm -f Makefile
-maintainer-clean-am: distclean-am maintainer-clean-aminfo \
- maintainer-clean-generic
-
-mostlyclean: mostlyclean-recursive
-
-mostlyclean-am: mostlyclean-aminfo mostlyclean-compile \
- mostlyclean-generic mostlyclean-libtool mostlyclean-local
-
-pdf: pdf-recursive
-
-pdf-am: $(PDFS)
-
-ps: ps-recursive
-
-ps-am: $(PSS)
-
-uninstall-am: uninstall-man
-
-uninstall-info: uninstall-info-recursive
-
-uninstall-man: uninstall-man1
-
-.PHONY: $(RECURSIVE_TARGETS) CTAGS GTAGS all all-am am--refresh check \
- check-DEJAGNU check-am clean clean-generic clean-info \
- clean-libtool clean-noinstPROGRAMS clean-recursive ctags \
- ctags-recursive dist-info distclean distclean-DEJAGNU \
- distclean-compile distclean-generic distclean-hdr \
- distclean-libtool distclean-local distclean-recursive \
- distclean-tags dvi dvi-am html html-am info info-am install \
- install-am install-data install-data-am install-data-local \
- install-exec install-exec-am install-exec-local install-info \
- install-info-am install-man install-man1 install-strip \
- installcheck installcheck-am installdirs installdirs-am \
- maintainer-clean maintainer-clean-aminfo \
- maintainer-clean-generic maintainer-clean-recursive \
- mostlyclean mostlyclean-aminfo mostlyclean-compile \
- mostlyclean-generic mostlyclean-libtool mostlyclean-local \
- mostlyclean-recursive pdf pdf-am ps ps-am tags tags-recursive \
- uninstall uninstall-am uninstall-info-am uninstall-man \
- uninstall-man1
-
-
-# Disable -Werror, if it has been enabled, since old versions of bison/
-# yacc will produce working code which contain compile time warnings.
-ldgram.o:
- $(COMPILE) -c $< $(NO_WERROR)
-ldlex.o:
- $(COMPILE) -c $< $(NO_WERROR)
-deffilep.o:
- $(COMPILE) -c $< $(NO_WERROR)
-
-po/POTFILES.in: @MAINT@ Makefile
- for f in $(POTFILES); do echo $$f; done | LC_COLLATE= sort > tmp \
- && 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
-
-eelf32_spu.o: eelf32_spu.c
- $(COMPILE) -c -DEMBEDSPU="\"`echo embedspu | sed '$(transform)'`\"" \
- eelf32_spu.c
-
-ldemul-list.h: Makefile
- (echo "/* This file is automatically generated. DO NOT EDIT! */";\
- for f in `echo " " ${EMULATION_OFILES} "" \
- | 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@
-
-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 \
- $(ELF_GEN_DEPS) $(srcdir)/scripttempl/elf.sc ${GEN_DEPENDS}
- ${GENSCRIPTS} arcelf "$(tdir_arcelf)"
-earmelf.c: $(srcdir)/emulparams/armelf.sh \
- $(ELF_DEPS) $(srcdir)/emultempl/armelf.em \
- $(srcdir)/scripttempl/elf.sc ${GEN_DEPENDS}
- ${GENSCRIPTS} armelf "$(tdir_armelf)"
-earmelfb.c: $(srcdir)/emulparams/armelfb.sh $(srcdir)/emulparams/armelf.sh \
- $(ELF_DEPS) $(srcdir)/emultempl/armelf.em \
- $(srcdir)/scripttempl/elf.sc ${GEN_DEPENDS}
- ${GENSCRIPTS} armelfb "$(tdir_armelfb)"
-earmelf_fbsd.c: $(srcdir)/emulparams/armelf_fbsd.sh \
- $(srcdir)/emulparams/armelf.sh \
- $(ELF_DEPS) $(srcdir)/emultempl/armelf.em \
- $(srcdir)/scripttempl/elf.sc ${GEN_DEPENDS}
- ${GENSCRIPTS} armelf_fbsd "$(tdir_armelf_fbsd)"
-earmelf_linux.c: $(srcdir)/emulparams/armelf_linux.sh \
- $(ELF_DEPS) $(srcdir)/emultempl/armelf.em \
- $(srcdir)/scripttempl/elf.sc ${GEN_DEPENDS}
- ${GENSCRIPTS} armelf_linux "$(tdir_armelf_linux)"
-earmelf_linux_eabi.c: $(srcdir)/emulparams/armelf_linux_eabi.sh \
- $(srcdir)/emulparams/armelf_linux.sh \
- $(ELF_DEPS) $(srcdir)/emultempl/armelf.em \
- $(srcdir)/scripttempl/elf.sc ${GEN_DEPENDS}
- ${GENSCRIPTS} armelf_linux_eabi "$(tdir_armelf_linux_abi)"
-earmelfb_linux.c: $(srcdir)/emulparams/armelfb_linux.sh \
- $(srcdir)/emulparams/armelf_linux.sh \
- $(ELF_DEPS) $(srcdir)/emultempl/armelf.em \
- $(srcdir)/scripttempl/elf.sc ${GEN_DEPENDS}
- ${GENSCRIPTS} armelfb_linux "$(tdir_armelfb_linux)"
-earmelfb_linux_eabi.c: $(srcdir)/emulparams/armelfb_linux_eabi.sh \
- $(srcdir)/emulparams/armelf_linux_eabi.sh \
- $(srcdir)/emulparams/armelf_linux.sh \
- $(ELF_DEPS) $(srcdir)/emultempl/armelf.em \
- $(srcdir)/scripttempl/elf.sc ${GEN_DEPENDS}
- ${GENSCRIPTS} armelfb_linux_eabi "$(tdir_armelfb_linux_abi)"
-earmelf_nbsd.c: $(srcdir)/emulparams/armelf_nbsd.sh \
- $(srcdir)/emulparams/armelf.sh \
- $(ELF_DEPS) $(srcdir)/emultempl/armelf.em \
- $(srcdir)/scripttempl/elf.sc ${GEN_DEPENDS}
- ${GENSCRIPTS} armelf_nbsd "$(tdir_armelf_nbsd)"
-earmelfb_nbsd.c: $(srcdir)/emulparams/armelfb_nbsd.sh \
- $(srcdir)/emulparams/armelf_nbsd.sh \
- $(srcdir)/emulparams/armelf.sh \
- $(ELF_DEPS) $(srcdir)/emultempl/armelf.em \
- $(srcdir)/scripttempl/elf.sc ${GEN_DEPENDS}
- ${GENSCRIPTS} armelfb_nbsd "$(tdir_armelfb_nbsd)"
-earmelf_vxworks.c: $(srcdir)/emulparams/armelf_vxworks.sh \
- $(srcdir)/emulparams/vxworks.sh $(srcdir)/emulparams/armelf.sh \
- $(ELF_DEPS) $(srcdir)/emultempl/vxworks.em \
- $(srcdir)/emultempl/armelf.em $(srcdir)/scripttempl/elf.sc \
- ${GEN_DEPENDS}
- ${GENSCRIPTS} armelf_vxworks "$(tdir_armelf)"
-earmaoutb.c: $(srcdir)/emulparams/armaoutb.sh \
- $(srcdir)/emultempl/generic.em $(srcdir)/scripttempl/armaout.sc ${GEN_DEPENDS}
- ${GENSCRIPTS} armaoutb "$(tdir_armaoutb)"
-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 \
- $(ELF_DEPS) $(srcdir)/emultempl/armelf.em \
- $(srcdir)/scripttempl/elf.sc ${GEN_DEPENDS}
- ${GENSCRIPTS} armnto "$(tdir_armnto)"
-earm_epoc_pe.c: $(srcdir)/emulparams/arm_epoc_pe.sh \
- $(srcdir)/emultempl/pe.em $(srcdir)/scripttempl/epocpe.sc ${GEN_DEPENDS}
- ${GENSCRIPTS} arm_epoc_pe "$(tdir_armpe)"
-earm_wince_pe.c: $(srcdir)/emulparams/arm_wince_pe.sh \
- $(srcdir)/emultempl/pe.em $(srcdir)/scripttempl/pe.sc ${GEN_DEPENDS}
- ${GENSCRIPTS} arm_wince_pe "$(tdir_armpe)"
-earmpe.c: $(srcdir)/emulparams/armpe.sh \
- $(srcdir)/emultempl/pe.em $(srcdir)/scripttempl/pe.sc ${GEN_DEPENDS}
- ${GENSCRIPTS} armpe "$(tdir_armpe)"
-earmsymbian.c: $(srcdir)/emulparams/armsymbian.sh \
- $(srcdir)/emulparams/armelf.sh $(ELF_DEPS) \
- $(srcdir)/emultempl/armelf.em $(srcdir)/scripttempl/armbpabi.sc \
- ${GEN_DEPENDS}
- ${GENSCRIPTS} armsymbian "$(tdir_armelf)"
-eavr2.c: $(srcdir)/emulparams/avr2.sh $(srcdir)/emultempl/avrelf.em \
- $(ELF_DEPS) $(srcdir)/scripttempl/avr.sc \
- ${GEN_DEPENDS}
- ${GENSCRIPTS} avr2 "$(tdir_avr2)"
-eavr1.c: $(srcdir)/emulparams/avr1.sh $(srcdir)/emultempl/avrelf.em \
- $(ELF_DEPS) $(srcdir)/scripttempl/avr.sc \
- ${GEN_DEPENDS}
- ${GENSCRIPTS} avr1 "$(tdir_avr2)"
-eavr3.c: $(srcdir)/emulparams/avr3.sh $(srcdir)/emultempl/avrelf.em \
- $(ELF_DEPS) $(srcdir)/scripttempl/avr.sc \
- ${GEN_DEPENDS}
- ${GENSCRIPTS} avr3 "$(tdir_avr2)"
-eavr4.c: $(srcdir)/emulparams/avr4.sh $(srcdir)/emultempl/avrelf.em \
- $(ELF_DEPS) $(srcdir)/scripttempl/avr.sc \
- ${GEN_DEPENDS}
- ${GENSCRIPTS} avr4 "$(tdir_avr2)"
-eavr5.c: $(srcdir)/emulparams/avr5.sh $(srcdir)/emultempl/avrelf.em \
- $(ELF_DEPS) $(srcdir)/scripttempl/avr.sc \
- ${GEN_DEPENDS}
- ${GENSCRIPTS} avr5 "$(tdir_avr2)"
-eavr6.c: $(srcdir)/emulparams/avr6.sh $(srcdir)/emultempl/avrelf.em \
- $(ELF_DEPS) $(srcdir)/scripttempl/avr.sc \
- ${GEN_DEPENDS}
- ${GENSCRIPTS} avr6 "$(tdir_avr2)"
-ecoff_i860.c: $(srcdir)/emulparams/coff_i860.sh \
- $(srcdir)/emultempl/generic.em $(srcdir)/scripttempl/i860coff.sc ${GEN_DEPENDS}
- ${GENSCRIPTS} coff_i860 "$(tdir_coff_i860)"
-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 \
- $(ELF_DEPS) $(srcdir)/scripttempl/elf.sc ${GEN_DEPENDS}
- ${GENSCRIPTS} criself "$(tdir_cris)"
-ecrislinux.c: $(srcdir)/emulparams/crislinux.sh \
- $(ELF_DEPS) $(srcdir)/scripttempl/elf.sc ${GEN_DEPENDS}
- ${GENSCRIPTS} crislinux "$(tdir_cris)"
-ed10velf.c: $(srcdir)/emulparams/d10velf.sh \
- $(ELF_DEPS) $(srcdir)/scripttempl/elfd10v.sc ${GEN_DEPENDS}
- ${GENSCRIPTS} d10velf "$(tdir_d10v)"
-ed30velf.c: $(srcdir)/emulparams/d30velf.sh \
- $(ELF_GEN_DEPS) $(srcdir)/scripttempl/elfd30v.sc ${GEN_DEPENDS}
- ${GENSCRIPTS} d30velf "$(tdir_d30v)"
-ed30v_o.c: $(srcdir)/emulparams/d30v_o.sh \
- $(ELF_GEN_DEPS) $(srcdir)/scripttempl/elfd30v.sc ${GEN_DEPENDS}
- ${GENSCRIPTS} d30v_o "$(tdir_d30v)"
-ed30v_e.c: $(srcdir)/emulparams/d30v_e.sh \
- $(ELF_GEN_DEPS) $(srcdir)/scripttempl/elfd30v.sc ${GEN_DEPENDS}
- ${GENSCRIPTS} d30v_e "$(tdir_d30v)"
-edelta68.c: $(srcdir)/emulparams/delta68.sh \
- $(srcdir)/emultempl/generic.em $(srcdir)/scripttempl/delta68.sc ${GEN_DEPENDS}
- ${GENSCRIPTS} delta68 "$(tdir_delta68)"
-eelf32bfin.c: $(srcdir)/emulparams/bfin.sh \
- $(ELF_DEPS) \
- $(srcdir)/scripttempl/elf.sc ${GEN_DEPENDS}
- ${GENSCRIPTS} elf32bfin "$(tdir_elf32bfin)" bfin
-eelf32bfinfd.c: $(srcdir)/emulparams/elf32bfinfd.sh $(srcdir)/emulparams/bfin.sh \
- $(ELF_DEPS) \
- $(srcdir)/scripttempl/elf.sc ${GEN_DEPENDS}
- ${GENSCRIPTS} elf32bfinfd "$(tdir_elf32bfinfd)" elf32bfinfd
-eelf32_dlx.c: $(srcdir)/emulparams/elf32_dlx.sh \
- $(ELF_GEN_DEPS) $(srcdir)/scripttempl/dlx.sc ${GEN_DEPENDS}
- ${GENSCRIPTS} elf32_dlx "$(tdir_elf32_dlx)"
-eelf32xc16x.c: $(srcdir)/emulparams/elf32xc16x.sh \
- $(ELF_DEPS) $(srcdir)/emultempl/needrelax.em \
- $(srcdir)/scripttempl/elf.sc ${GEN_DEPENDS}
- ${GENSCRIPTS} elf32xc16x "$(tdir_xc16x)"
-eelf32xc16xl.c: $(srcdir)/emulparams/elf32xc16xl.sh \
- $(ELF_DEPS) $(srcdir)/emultempl/needrelax.em \
- $(srcdir)/scripttempl/elf.sc ${GEN_DEPENDS}
- ${GENSCRIPTS} elf32xc16xl "$(tdir_xc16xl)"
-eelf32xc16xs.c: $(srcdir)/emulparams/elf32xc16xs.sh \
- $(ELF_DEPS) $(srcdir)/emultempl/needrelax.em \
- $(srcdir)/scripttempl/elf.sc ${GEN_DEPENDS}
- ${GENSCRIPTS} elf32xc16xs "$(tdir_xc16xs)"
-eelf32xstormy16.c: $(srcdir)/emulparams/elf32xstormy16.sh \
- $(ELF_DEPS) $(srcdir)/emultempl/needrelax.em \
- $(srcdir)/scripttempl/xstormy16.sc ${GEN_DEPENDS}
- ${GENSCRIPTS} elf32xstormy16 "$(tdir_xstormy16)"
-eelf32am33lin.c: $(srcdir)/emulparams/elf32am33lin.sh \
- $(ELF_DEPS) $(srcdir)/scripttempl/elf.sc ${GEN_DEPENDS}
- ${GENSCRIPTS} elf32am33lin "$(tdir_mn10300)"
-eelf32vax.c: $(srcdir)/emulparams/elf32vax.sh \
- $(ELF_DEPS) $(srcdir)/scripttempl/elf.sc ${GEN_DEPENDS}
- ${GENSCRIPTS} elf32vax "$(tdir_elf32vax)"
-eelf32xtensa.c: $(srcdir)/emulparams/elf32xtensa.sh $(ELF_DEPS) \
- $(srcdir)/emultempl/xtensaelf.em $(INCDIR)/xtensa-config.h \
- $(BFDDIR)/elf-bfd.h $(BFDDIR)/libbfd.h $(INCDIR)/elf/xtensa.h \
- $(srcdir)/scripttempl/elfxtensa.sc ${GEN_DEPENDS}
- ${GENSCRIPTS} elf32xtensa "$(tdir_elf32xtensa)"
-eelf32fr30.c: $(srcdir)/emulparams/elf32fr30.sh \
- $(ELF_GEN_DEPS) $(srcdir)/scripttempl/elf.sc ${GEN_DEPENDS}
- ${GENSCRIPTS} elf32fr30 "$(tdir_fr30)"
-eelf32frv.c: $(srcdir)/emulparams/elf32frv.sh \
- $(ELF_GEN_DEPS) $(srcdir)/scripttempl/elf.sc ${GEN_DEPENDS}
- ${GENSCRIPTS} elf32frv "$(tdir_frv)"
-eelf32frvfd.c: $(srcdir)/emulparams/elf32frvfd.sh \
- $(srcdir)/emulparams/elf32frv.sh \
- $(ELF_DEPS) $(srcdir)/scripttempl/elf.sc ${GEN_DEPENDS}
- ${GENSCRIPTS} elf32frvfd "$(tdir_frv)"
-eelf32mcore.c: $(srcdir)/emulparams/elf32mcore.sh \
- $(ELF_DEPS) $(srcdir)/scripttempl/elf.sc ${GEN_DEPENDS}
- ${GENSCRIPTS} elf32mcore "$(tdir_mcore)"
-eelf32mep.c: $(srcdir)/emulparams/elf32mep.sh \
- $(srcdir)/emultempl/elf32.em $(srcdir)/scripttempl/mep.sc ${GEN_DEPENDS}
- ${GENSCRIPTS} elf32mep "$(tdir_mep)"
-em32relf.c: $(srcdir)/emulparams/m32relf.sh \
- $(ELF_DEPS) $(srcdir)/scripttempl/elf.sc ${GEN_DEPENDS}
- ${GENSCRIPTS} m32relf "$(tdir_m32r)"
-em32rlelf.c: $(srcdir)/emulparams/m32rlelf.sh \
- $(ELF_DEPS) $(srcdir)/scripttempl/elf.sc ${GEN_DEPENDS}
- ${GENSCRIPTS} m32rlelf "$(tdir_m32rlelf)"
-em32relf_linux.c: $(srcdir)/emulparams/m32relf_linux.sh \
- $(ELF_DEPS) $(srcdir)/scripttempl/elf.sc ${GEN_DEPENDS}
- ${GENSCRIPTS} m32relf_linux "$(tdir_m32relf_linux)"
-em32rlelf_linux.c: $(srcdir)/emulparams/m32rlelf_linux.sh \
- $(ELF_DEPS) $(srcdir)/scripttempl/elf.sc ${GEN_DEPENDS}
- ${GENSCRIPTS} m32rlelf_linux "$(tdir_m32rlelf_linux)"
-eelf32_sparc.c: $(srcdir)/emulparams/elf32_sparc.sh \
- $(ELF_DEPS) $(srcdir)/scripttempl/elf.sc ${GEN_DEPENDS}
- ${GENSCRIPTS} elf32_sparc "$(tdir_elf32_sparc)"
-eelf32_sparc_vxworks.c: $(srcdir)/emulparams/elf32_sparc_vxworks.sh \
- $(srcdir)/emulparams/vxworks.sh $(srcdir)/emulparams/elf32_sparc.sh \
- $(srcdir)/emultempl/vxworks.em $(ELF_DEPS) \
- $(srcdir)/scripttempl/elf.sc ${GEN_DEPENDS}
- ${GENSCRIPTS} elf32_sparc_vxworks "$(tdir_elf32_sparc_vxworks)"
-eelf32_spu.c: $(srcdir)/emulparams/elf32_spu.sh $(srcdir)/emultempl/spuelf.em \
- $(srcdir)/emultempl/spu_ovl.o \
- ldemul-list.h \
- $(ELF_DEPS) $(srcdir)/scripttempl/elf.sc ${GEN_DEPENDS}
- ${GENSCRIPTS} elf32_spu "$(tdir_elf32_spu)"
-$(srcdir)/emultempl/spu_ovl.o: @MAINT@ $(srcdir)/emultempl/spu_ovl.S
- cpp -DOVLY_IRQ_SAVE $(srcdir)/emultempl/spu_ovl.S spu_ovl.s
- if ../gas/as-new --version \
- | grep 'target.*spu' >/dev/null 2>/dev/null; then \
- ../gas/as-new -o $@ spu_ovl.s; \
- fi
-eelf32_i860.c: $(srcdir)/emulparams/elf32_i860.sh \
- $(ELF_GEN_DEPS) $(srcdir)/scripttempl/elf.sc ${GEN_DEPENDS}
- ${GENSCRIPTS} elf32_i860 "$(tdir_elf32_i860)"
-eelf32_i960.c: $(srcdir)/emulparams/elf32_i960.sh \
- $(ELF_DEPS) $(srcdir)/scripttempl/elf.sc ${GEN_DEPENDS}
- ${GENSCRIPTS} elf32_i960 "$(tdir_elf32_i960)"
-eelf32b4300.c: $(srcdir)/emulparams/elf32b4300.sh \
- $(srcdir)/emulparams/elf32bmip.sh $(ELF_DEPS) \
- $(srcdir)/emultempl/mipself.em $(srcdir)/scripttempl/elf.sc ${GEN_DEPENDS}
- ${GENSCRIPTS} elf32b4300 "$(tdir_elf32b4300)"
-eelf32cr16.c: $(srcdir)/emulparams/elf32cr16.sh \
- $(srcdir)/emultempl/elf32.em $(srcdir)/emultempl/cr16elf.em \
- $(srcdir)/scripttempl/elf32cr16.sc ${GEN_DEPENDS}
- ${GENSCRIPTS} elf32cr16 "$(tdir_elf32crx)"
-eelf32cr16c.c: $(srcdir)/emulparams/elf32cr16c.sh \
- $(ELF_DEPS) \
- $(srcdir)/scripttempl/elf32cr16c.sc ${GEN_DEPENDS}
- ${GENSCRIPTS} elf32cr16c "$(tdir_elf32cr16c)"
-eelf32bmip.c: $(srcdir)/emulparams/elf32bmip.sh $(ELF_DEPS) \
- $(srcdir)/emultempl/mipself.em $(srcdir)/scripttempl/elf.sc ${GEN_DEPENDS}
- ${GENSCRIPTS} elf32bmip "$(tdir_elf32bmip)"
-eelf32bsmip.c: $(srcdir)/emulparams/elf32bsmip.sh \
- $(srcdir)/emulparams/elf32bmip.sh $(ELF_DEPS) $(srcdir)/emultempl/irix.em \
- $(srcdir)/emultempl/mipself.em $(srcdir)/scripttempl/elf.sc ${GEN_DEPENDS}
- ${GENSCRIPTS} elf32bsmip "$(tdir_elf32bsmip)"
-eelf32btsmip.c: $(srcdir)/emulparams/elf32btsmip.sh \
- $(srcdir)/emulparams/elf32bmip.sh $(ELF_DEPS) \
- $(srcdir)/emultempl/mipself.em $(srcdir)/scripttempl/elf.sc ${GEN_DEPENDS}
- ${GENSCRIPTS} elf32btsmip "$(tdir_elf32btsmip)"
-eelf32crx.c: $(srcdir)/emulparams/elf32crx.sh \
- $(ELF_DEPS) $(srcdir)/emultempl/crxelf.em \
- $(srcdir)/scripttempl/elf32crx.sc ${GEN_DEPENDS}
- ${GENSCRIPTS} elf32crx "$(tdir_elf32crx)"
-eelf32btsmipn32.c: $(srcdir)/emulparams/elf32btsmipn32.sh \
- $(srcdir)/emulparams/elf32bmipn32-defs.sh $(ELF_DEPS) \
- $(srcdir)/emultempl/mipself.em $(srcdir)/scripttempl/elf.sc ${GEN_DEPENDS}
- ${GENSCRIPTS} elf32btsmipn32 "$(tdir_elf32btsmipn32)"
-eelf32ltsmip.c: $(srcdir)/emulparams/elf32ltsmip.sh \
- $(srcdir)/emulparams/elf32btsmip.sh $(srcdir)/emulparams/elf32bmip.sh \
- $(ELF_DEPS) $(srcdir)/emultempl/mipself.em $(srcdir)/scripttempl/elf.sc \
- ${GEN_DEPENDS}
- ${GENSCRIPTS} elf32ltsmip "$(tdir_elf32ltsmip)"
-eelf32ltsmipn32.c: $(srcdir)/emulparams/elf32ltsmipn32.sh \
- $(srcdir)/emulparams/elf32btsmipn32.sh \
- $(srcdir)/emulparams/elf32bmipn32-defs.sh $(ELF_DEPS) \
- $(srcdir)/emultempl/mipself.em $(srcdir)/scripttempl/elf.sc ${GEN_DEPENDS}
- ${GENSCRIPTS} elf32ltsmipn32 "$(tdir_elf32ltsmipn32)"
-eelf32ebmip.c: $(srcdir)/emulparams/elf32ebmip.sh \
- $(srcdir)/emulparams/elf32bmip.sh $(ELF_DEPS) \
- $(srcdir)/emultempl/mipself.em $(srcdir)/scripttempl/elf.sc ${GEN_DEPENDS}
- ${GENSCRIPTS} elf32ebmip "$(tdir_elf32ebmip)"
-eelf32ebmipvxworks.c: $(srcdir)/emulparams/elf32ebmipvxworks.sh \
- $(srcdir)/emulparams/elf32bmip.sh $(srcdir)/emulparams/vxworks.sh \
- $(ELF_DEPS) $(srcdir)/emultempl/generic.em $(srcdir)/emultempl/mipself.em \
- $(srcdir)/emultempl/vxworks.em $(srcdir)/scripttempl/elf.sc ${GEN_DEPENDS}
- ${GENSCRIPTS} elf32ebmipvxworks "$(tdir_elf32ebmipvxworks)"
-eelf32elmip.c: $(srcdir)/emulparams/elf32elmip.sh \
- $(srcdir)/emulparams/elf32lmip.sh $(srcdir)/emulparams/elf32bmip.sh \
- $(ELF_DEPS) $(srcdir)/emultempl/mipself.em $(srcdir)/scripttempl/elf.sc \
- ${GEN_DEPENDS}
- ${GENSCRIPTS} elf32elmip "$(tdir_elf32elmip)"
-eelf32elmipvxworks.c: $(srcdir)/emulparams/elf32elmipvxworks.sh \
- $(srcdir)/emulparams/elf32bmip.sh $(srcdir)/emulparams/vxworks.sh \
- $(ELF_DEPS) $(srcdir)/emultempl/generic.em $(srcdir)/emultempl/mipself.em \
- $(srcdir)/emultempl/vxworks.em $(srcdir)/scripttempl/elf.sc ${GEN_DEPENDS}
- ${GENSCRIPTS} elf32elmipvxworks "$(tdir_elf32elmipvxworks)"
-eelf32bmipn32.c: $(srcdir)/emulparams/elf32bmipn32.sh \
- $(srcdir)/emulparams/elf32bmipn32-defs.sh $(ELF_DEPS) \
- $(srcdir)/emultempl/irix.em $(srcdir)/emultempl/mipself.em \
- $(srcdir)/scripttempl/elf.sc ${GEN_DEPENDS}
- ${GENSCRIPTS} elf32bmipn32 "$(tdir_elf32bmipn32)"
-eelf32l4300.c: $(srcdir)/emulparams/elf32l4300.sh \
- $(srcdir)/emulparams/elf32b4300.sh $(srcdir)/emulparams/elf32bmip.sh \
- $(ELF_DEPS) $(srcdir)/emultempl/mipself.em $(srcdir)/scripttempl/elf.sc \
- ${GEN_DEPENDS}
- ${GENSCRIPTS} elf32l4300 "$(tdir_elf32l4300)"
-eelf32lmip.c: $(srcdir)/emulparams/elf32lmip.sh \
- $(srcdir)/emulparams/elf32bmip.sh $(ELF_DEPS) \
- $(srcdir)/emultempl/mipself.em $(srcdir)/scripttempl/elf.sc ${GEN_DEPENDS}
- ${GENSCRIPTS} elf32lmip "$(tdir_elf32lmip)"
-eelf32mipswindiss.c: $(srcdir)/emulparams/elf32mipswindiss.sh $(ELF_DEPS) \
- $(srcdir)/scripttempl/elf.sc ${GEN_DEPENDS}
- ${GENSCRIPTS} elf32mipswindiss "$(tdir_elf32mipswindiss)"
-eelf32m32c.c: $(srcdir)/emulparams/elf32m32c.sh \
- $(ELF_DEPS) $(srcdir)/emultempl/needrelax.em \
- $(srcdir)/scripttempl/elf.sc ${GEN_DEPENDS}
- ${GENSCRIPTS} elf32m32c "$(tdir_m32c)"
-eelf32mt.c: $(srcdir)/emulparams/elf32mt.sh \
- $(ELF_GEN_DEPS) $(srcdir)/scripttempl/elf.sc ${GEN_DEPENDS}
- ${GENSCRIPTS} elf32mt "$(tdir_mt)"
-eelf32lppc.c: $(srcdir)/emulparams/elf32lppc.sh \
- $(srcdir)/emulparams/elf32ppccommon.sh \
- $(srcdir)/emulparams/elf32ppc.sh $(srcdir)/emultempl/ppc32elf.em \
- ldemul-list.h \
- $(ELF_DEPS) $(srcdir)/scripttempl/elf.sc ${GEN_DEPENDS}
- ${GENSCRIPTS} elf32lppc "$(tdir_elf32lppc)"
-eelf32lppcnto.c: $(srcdir)/emulparams/elf32lppcnto.sh \
- $(srcdir)/emulparams/elf32ppc.sh $(srcdir)/emulparams/elf32ppccommon.sh \
- $(srcdir)/emultempl/ppc32elf.em $(ELF_DEPS) \
- ldemul-list.h \
- $(srcdir)/scripttempl/elf.sc ${GEN_DEPENDS}
- ${GENSCRIPTS} elf32lppcnto "$(tdir_elf32lppcnto)"
-eelf32lppcsim.c: $(srcdir)/emulparams/elf32lppcsim.sh \
- $(srcdir)/emulparams/elf32lppc.sh $(srcdir)/emulparams/elf32ppc.sh \
- $(srcdir)/emulparams/elf32ppccommon.sh $(srcdir)/emultempl/ppc32elf.em \
- ldemul-list.h \
- $(ELF_DEPS) $(srcdir)/scripttempl/elf.sc ${GEN_DEPENDS}
- ${GENSCRIPTS} elf32lppcsim "$(tdir_elf32lppcsim)"
-eelf32ppcnto.c: $(srcdir)/emulparams/elf32ppcnto.sh \
- $(srcdir)/emulparams/elf32ppc.sh $(srcdir)/emulparams/elf32ppccommon.sh \
- $(srcdir)/emultempl/ppc32elf.em $(ELF_DEPS) \
- ldemul-list.h \
- $(srcdir)/scripttempl/elf.sc ${GEN_DEPENDS}
- ${GENSCRIPTS} elf32ppcnto "$(tdir_elf32ppcnto)"
-eelf32ppcwindiss.c: $(srcdir)/emulparams/elf32ppcwindiss.sh \
- $(ELF_DEPS) $(srcdir)/scripttempl/elf.sc ${GEN_DEPENDS}
- ${GENSCRIPTS} elf32ppcwindiss "$(tdir_elf32ppcwindiss)"
-eelf32ppcvxworks.c: $(srcdir)/emulparams/elf32ppcvxworks.sh \
- $(srcdir)/emulparams/elf32ppccommon.sh $(srcdir)/emulparams/vxworks.sh \
- $(srcdir)/emultempl/vxworks.em $(ELF_DEPS) \
- $(srcdir)/scripttempl/elf.sc ${GEN_DEPENDS}
- ${GENSCRIPTS} elf32ppcvxworks "$(tdir_elf32ppcvxworks)"
-eelf32lsmip.c: $(srcdir)/emulparams/elf32lsmip.sh \
- $(srcdir)/emulparams/elf32lmip.sh $(srcdir)/emulparams/elf32bmip.sh \
- $(ELF_DEPS) $(srcdir)/emultempl/mipself.em $(srcdir)/scripttempl/elf.sc \
- ${GEN_DEPENDS}
- ${GENSCRIPTS} elf32lsmip "$(tdir_elf32lsmip)"
-eelf32openrisc.c: $(srcdir)/emulparams/elf32openrisc.sh \
- $(ELF_DEPS) $(srcdir)/scripttempl/elf.sc ${GEN_DEPENDS}
- ${GENSCRIPTS} elf32openrisc "$(tdir_openrisc)"
-eelf32ppc.c: $(srcdir)/emulparams/elf32ppc.sh \
- $(srcdir)/emulparams/elf32ppccommon.sh $(srcdir)/emultempl/ppc32elf.em \
- ldemul-list.h \
- $(ELF_DEPS) $(srcdir)/scripttempl/elf.sc ${GEN_DEPENDS}
- ${GENSCRIPTS} elf32ppc "$(tdir_elf32ppc)"
-eelf32ppc_fbsd.c: $(srcdir)/emulparams/elf32ppc_fbsd.sh \
- $(srcdir)/emulparams/elf32ppc.sh $(srcdir)/emulparams/elf32ppccommon.sh \
- $(srcdir)/emultempl/ppc32elf.em $(ELF_DEPS) \
- ldemul-list.h \
- $(srcdir)/scripttempl/elf.sc ${GEN_DEPENDS}
- ${GENSCRIPTS} elf32ppc_fbsd "$(tdir_elf32ppc_fbsd)"
-eelf32ppcsim.c: $(srcdir)/emulparams/elf32ppcsim.sh \
- $(srcdir)/emulparams/elf32ppc.sh $(srcdir)/emulparams/elf32ppccommon.sh \
- $(srcdir)/emultempl/ppc32elf.em $(ELF_DEPS) \
- ldemul-list.h \
- $(srcdir)/scripttempl/elf.sc ${GEN_DEPENDS}
- ${GENSCRIPTS} elf32ppcsim "$(tdir_elf32ppcsim)"
-eelf32ppclinux.c: $(srcdir)/emulparams/elf32ppclinux.sh \
- $(srcdir)/emulparams/elf32ppc.sh $(srcdir)/emulparams/elf32ppccommon.sh \
- $(srcdir)/emultempl/ppc32elf.em $(ELF_DEPS) \
- ldemul-list.h \
- $(srcdir)/scripttempl/elf.sc ${GEN_DEPENDS}
- ${GENSCRIPTS} elf32ppclinux "$(tdir_elf32ppclinux)"
-eelf64ppc.c: $(srcdir)/emulparams/elf64ppc.sh $(srcdir)/emultempl/ppc64elf.em \
- ldemul-list.h \
- $(ELF_DEPS) $(srcdir)/scripttempl/elf.sc ${GEN_DEPENDS}
- ${GENSCRIPTS} elf64ppc "$(tdir_elf64ppc)"
-eelf64lppc.c: $(srcdir)/emulparams/elf64lppc.sh \
- $(srcdir)/emulparams/elf64ppc.sh $(srcdir)/emultempl/ppc64elf.em \
- ldemul-list.h \
- $(ELF_DEPS) $(srcdir)/scripttempl/elf.sc ${GEN_DEPENDS}
- ${GENSCRIPTS} elf64lppc "$(tdir_elf64lppc)"
-eelf32i370.c: $(srcdir)/emulparams/elf32i370.sh \
- $(ELF_DEPS) $(srcdir)/scripttempl/elfi370.sc ${GEN_DEPENDS}
- ${GENSCRIPTS} elf32i370 "$(tdir_elf32i370)"
-eelf32ip2k.c: $(srcdir)/emulparams/elf32ip2k.sh \
- $(ELF_DEPS) $(srcdir)/scripttempl/ip2k.sc ${GEN_DEPENDS}
- ${GENSCRIPTS} elf32ip2k "$(tdir_ip2k)"
-eelf32iq2000.c: $(srcdir)/emulparams/elf32iq2000.sh \
- $(ELF_GEN_DEPS) $(srcdir)/scripttempl/iq2000.sc ${GEN_DEPENDS}
- ${GENSCRIPTS} elf32iq2000 "$(tdir_iq2000)"
-eelf32iq10.c: $(srcdir)/emulparams/elf32iq10.sh \
- $(ELF_GEN_DEPS) $(srcdir)/scripttempl/iq2000.sc ${GEN_DEPENDS}
- ${GENSCRIPTS} elf32iq10 "$(tdir_iq10)"
-eelf64alpha.c: $(srcdir)/emulparams/elf64alpha.sh \
- $(ELF_DEPS) $(srcdir)/emultempl/alphaelf.em \
- $(srcdir)/scripttempl/elf.sc ${GEN_DEPENDS}
- ${GENSCRIPTS} elf64alpha "$(tdir_elf64alpha)"
-eelf64alpha_fbsd.c: $(srcdir)/emulparams/elf64alpha_fbsd.sh \
- $(srcdir)/emulparams/elf64alpha.sh \
- $(ELF_DEPS) $(srcdir)/emultempl/alphaelf.em \
- $(srcdir)/scripttempl/elf.sc ${GEN_DEPENDS}
- ${GENSCRIPTS} elf64alpha_fbsd "$(tdir_elf64alpha_fbsd)"
-eelf64alpha_nbsd.c: $(srcdir)/emulparams/elf64alpha_nbsd.sh \
- $(srcdir)/emulparams/elf64alpha.sh \
- $(ELF_DEPS) $(srcdir)/emultempl/alphaelf.em \
- $(srcdir)/scripttempl/elf.sc ${GEN_DEPENDS}
- ${GENSCRIPTS} elf64alpha_nbsd "$(tdir_elf64alpha_nbsd)"
-eelf64hppa.c: $(srcdir)/emulparams/elf64hppa.sh \
- $(srcdir)/emulparams/hppa64linux.sh \
- $(ELF_DEPS) $(srcdir)/scripttempl/elf.sc ${GEN_DEPENDS}
- ${GENSCRIPTS} elf64hppa "$(tdir_elf64hppa)"
-eelf64_aix.c: $(srcdir)/emulparams/elf64_aix.sh \
- $(ELF_DEPS) $(srcdir)/scripttempl/elf.sc ${GEN_DEPENDS}
- ${GENSCRIPTS} elf64_aix "$(tdir_elf64_aix)"
-eelf64_ia64.c: $(srcdir)/emulparams/elf64_ia64.sh \
- $(ELF_DEPS) $(srcdir)/emultempl/ia64elf.em \
- $(srcdir)/emultempl/needrelax.em \
- $(srcdir)/scripttempl/elf.sc ${GEN_DEPENDS}
- ${GENSCRIPTS} elf64_ia64 "$(tdir_elf64_ia64)"
-eelf64_ia64_fbsd.c: $(srcdir)/emulparams/elf64_ia64_fbsd.sh \
- $(srcdir)/emulparams/elf64_ia64.sh \
- $(ELF_DEPS) $(srcdir)/emultempl/ia64elf.em \
- $(srcdir)/emultempl/needrelax.em \
- $(srcdir)/scripttempl/elf.sc ${GEN_DEPENDS}
- ${GENSCRIPTS} elf64_ia64_fbsd "$(tdir_elf64_ia64_fbsd)"
-eelf64_s390.c: $(srcdir)/emulparams/elf64_s390.sh \
- $(ELF_DEPS) $(srcdir)/scripttempl/elf.sc ${GEN_DEPENDS}
- ${GENSCRIPTS} elf64_s390 "$(tdir_elf64_s390)"
-eelf64_sparc.c: $(srcdir)/emulparams/elf64_sparc.sh \
- $(ELF_DEPS) $(srcdir)/scripttempl/elf.sc ${GEN_DEPENDS}
- ${GENSCRIPTS} elf64_sparc "$(tdir_elf64_sparc)"
-eelf64_sparc_fbsd.c: $(srcdir)/emulparams/elf64_sparc_fbsd.sh \
- $(srcdir)/emulparams/elf64_sparc.sh \
- $(ELF_DEPS) $(srcdir)/scripttempl/elf.sc ${GEN_DEPENDS}
- ${GENSCRIPTS} elf64_sparc_fbsd "$(tdir_elf64_sparc_fbsd)"
-eelf64bmip.c: $(srcdir)/emulparams/elf64bmip.sh \
- $(srcdir)/emulparams/elf64bmip-defs.sh \
- $(srcdir)/emulparams/elf32bmipn32-defs.sh $(ELF_DEPS) \
- $(srcdir)/emultempl/irix.em $(srcdir)/emultempl/mipself.em \
- $(srcdir)/scripttempl/elf.sc ${GEN_DEPENDS}
- ${GENSCRIPTS} elf64bmip "$(tdir_elf64bmip)"
-eelf64mmix.c: $(srcdir)/emulparams/elf64mmix.sh \
- $(ELF_DEPS) $(srcdir)/emultempl/mmix-elfnmmo.em \
- $(srcdir)/emultempl/mmixelf.em $(srcdir)/scripttempl/elf.sc ${GEN_DEPENDS}
- ${GENSCRIPTS} elf64mmix "$(tdir_elf64mmix)"
-emmo.c: $(srcdir)/emulparams/mmo.sh $(srcdir)/emultempl/mmix-elfnmmo.em \
- $(srcdir)/emultempl/generic.em $(srcdir)/emultempl/elf-generic.em \
- $(srcdir)/emultempl/mmo.em \
- $(srcdir)/scripttempl/mmo.sc ${GEN_DEPENDS}
- ${GENSCRIPTS} mmo "$(tdir_mmo)"
-eelf64btsmip.c: $(srcdir)/emulparams/elf64btsmip.sh \
- $(srcdir)/emulparams/elf64bmip-defs.sh \
- $(srcdir)/emulparams/elf32bmipn32-defs.sh $(ELF_DEPS) \
- $(srcdir)/emultempl/mipself.em $(srcdir)/scripttempl/elf.sc ${GEN_DEPENDS}
- ${GENSCRIPTS} elf64btsmip "$(tdir_elf64btsmip)"
-eelf64ltsmip.c: $(srcdir)/emulparams/elf64ltsmip.sh \
- $(srcdir)/emulparams/elf64btsmip.sh $(srcdir)/emulparams/elf64bmip-defs.sh \
- $(srcdir)/emulparams/elf32bmipn32-defs.sh $(ELF_DEPS) \
- $(srcdir)/emultempl/mipself.em $(srcdir)/scripttempl/elf.sc ${GEN_DEPENDS}
- ${GENSCRIPTS} elf64ltsmip "$(tdir_elf64ltsmip)"
-eelf_i386.c: $(srcdir)/emulparams/elf_i386.sh \
- $(ELF_DEPS) $(srcdir)/scripttempl/elf.sc ${GEN_DEPENDS}
- ${GENSCRIPTS} elf_i386 "$(tdir_elf_i386)"
-eelf_x86_64.c: $(srcdir)/emulparams/elf_x86_64.sh \
- $(ELF_DEPS) $(srcdir)/scripttempl/elf.sc ${GEN_DEPENDS}
- ${GENSCRIPTS} elf_x86_64 "$(tdir_elf_x86_64)"
-eelf_x86_64_fbsd.c: $(srcdir)/emulparams/elf_x86_64_fbsd.sh \
- $(srcdir)/emulparams/elf_x86_64.sh \
- $(ELF_DEPS) $(srcdir)/scripttempl/elf.sc ${GEN_DEPENDS}
- ${GENSCRIPTS} elf_x86_64_fbsd "$(tdir_elf_x86_64_fbsd)"
-eelf_i386_be.c: $(srcdir)/emulparams/elf_i386_be.sh \
- $(ELF_DEPS) $(srcdir)/scripttempl/elf.sc ${GEN_DEPENDS}
- ${GENSCRIPTS} elf_i386_be "$(tdir_elf_i386_be)"
-eelf_i386_chaos.c: $(srcdir)/emulparams/elf_i386_chaos.sh \
- $(ELF_DEPS) $(srcdir)/scripttempl/elf_chaos.sc ${GEN_DEPENDS}
- ${GENSCRIPTS} elf_i386_chaos "$(tdir_elf_i386_chaos)"
-eelf_i386_fbsd.c: $(srcdir)/emulparams/elf_i386_fbsd.sh \
- $(srcdir)/emulparams/elf_i386.sh \
- $(ELF_DEPS) $(srcdir)/scripttempl/elf.sc ${GEN_DEPENDS}
- ${GENSCRIPTS} elf_i386_fbsd "$(tdir_elf_i386_fbsd)"
-eelf_i386_ldso.c: $(srcdir)/emulparams/elf_i386_ldso.sh \
- $(ELF_DEPS) $(srcdir)/scripttempl/elf.sc ${GEN_DEPENDS}
- ${GENSCRIPTS} elf_i386_ldso "$(tdir_elf_i386_ldso)"
-eelf_i386_vxworks.c: $(srcdir)/emulparams/elf_i386_vxworks.sh \
- $(srcdir)/emulparams/vxworks.sh $(srcdir)/emultempl/vxworks.em \
- $(ELF_DEPS) $(srcdir)/scripttempl/elf.sc ${GEN_DEPENDS}
- ${GENSCRIPTS} elf_i386_vxworks "$(tdir_elf_i386_vxworks)"
-eelf_s390.c: $(srcdir)/emulparams/elf_s390.sh \
- $(ELF_DEPS) $(srcdir)/scripttempl/elf.sc ${GEN_DEPENDS}
- ${GENSCRIPTS} elf_s390 "$(tdir_elf_s390)"
-egld960.c: $(srcdir)/emulparams/gld960.sh \
- $(srcdir)/emultempl/gld960.em $(srcdir)/scripttempl/i960.sc ${GEN_DEPENDS}
- ${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 \
- $(ELF_DEPS) $(srcdir)/scripttempl/elf.sc ${GEN_DEPENDS}
- ${GENSCRIPTS} h8300elf "$(tdir_h8300elf)"
-eh8300helf.c: $(srcdir)/emulparams/h8300helf.sh \
- $(srcdir)/emulparams/h8300elf.sh \
- $(ELF_DEPS) $(srcdir)/scripttempl/elf.sc ${GEN_DEPENDS}
- ${GENSCRIPTS} h8300helf "$(tdir_h8300helf)"
-eh8300self.c: $(srcdir)/emulparams/h8300self.sh \
- $(srcdir)/emulparams/h8300elf.sh \
- $(ELF_DEPS) $(srcdir)/scripttempl/elf.sc ${GEN_DEPENDS}
- ${GENSCRIPTS} h8300self "$(tdir_h8300self)"
-eh8300hnelf.c: $(srcdir)/emulparams/h8300hnelf.sh \
- $(srcdir)/emulparams/h8300elf.sh \
- $(ELF_DEPS) $(srcdir)/scripttempl/elf.sc ${GEN_DEPENDS}
- ${GENSCRIPTS} h8300hnelf "$(tdir_h8300hnelf)"
-eh8300snelf.c: $(srcdir)/emulparams/h8300snelf.sh \
- $(srcdir)/emulparams/h8300elf.sh \
- $(ELF_DEPS) $(srcdir)/scripttempl/elf.sc ${GEN_DEPENDS}
- ${GENSCRIPTS} h8300snelf "$(tdir_h8300snelf)"
-eh8300sxelf.c: $(srcdir)/emulparams/h8300sxelf.sh \
- $(srcdir)/emulparams/h8300elf.sh \
- $(ELF_DEPS) $(srcdir)/scripttempl/elf.sc ${GEN_DEPENDS}
- ${GENSCRIPTS} h8300sxelf "$(tdir_h8300sxelf)"
-eh8300sxnelf.c: $(srcdir)/emulparams/h8300sxnelf.sh \
- $(srcdir)/emulparams/h8300elf.sh \
- $(ELF_DEPS) $(srcdir)/scripttempl/elf.sc ${GEN_DEPENDS}
- ${GENSCRIPTS} h8300sxnelf "$(tdir_h8300sxnelf)"
-eh8500.c: $(srcdir)/emulparams/h8500.sh \
- $(srcdir)/emultempl/generic.em $(srcdir)/scripttempl/h8500.sc ${GEN_DEPENDS}
- ${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 \
- $(ELF_DEPS) $(srcdir)/emultempl/hppaelf.em \
- $(srcdir)/scripttempl/hppaelf.sc ${GEN_DEPENDS}
- ${GENSCRIPTS} hppaelf "$(tdir_hppaelf)"
-ehppalinux.c: $(srcdir)/emulparams/hppalinux.sh \
- $(ELF_DEPS) $(srcdir)/emultempl/hppaelf.em \
- $(srcdir)/scripttempl/elf.sc ${GEN_DEPENDS}
- ${GENSCRIPTS} hppalinux "$(tdir_hppalinux)"
-ehppanbsd.c: $(srcdir)/emulparams/hppanbsd.sh \
- $(srcdir)/emulparams/hppaelf.sh \
- $(ELF_DEPS) $(srcdir)/emultempl/hppaelf.em \
- $(srcdir)/scripttempl/elf.sc ${GEN_DEPENDS}
- ${GENSCRIPTS} hppanbsd "$(tdir_hppanbsd)"
-ehppaobsd.c: $(srcdir)/emulparams/hppaobsd.sh \
- $(ELF_DEPS) $(srcdir)/emultempl/hppaelf.em \
- $(srcdir)/scripttempl/elf.sc ${GEN_DEPENDS}
- ${GENSCRIPTS} hppaobsd "$(tdir_hppaobsd)"
-ehppa64linux.c: $(srcdir)/emulparams/hppa64linux.sh \
- $(ELF_DEPS) $(srcdir)/scripttempl/elf.sc ${GEN_DEPENDS}
- ${GENSCRIPTS} hppa64linux "$(tdir_hppa64linux)"
-ei386aout.c: $(srcdir)/emulparams/i386aout.sh \
- $(srcdir)/emultempl/generic.em $(srcdir)/scripttempl/aout.sc ${GEN_DEPENDS}
- ${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)"
-ei386freebsd.c: $(srcdir)/emulparams/i386freebsd.sh \
- $(srcdir)/emultempl/generic.em $(srcdir)/scripttempl/aout.sc ${GEN_DEPENDS}
- ${GENSCRIPTS} i386freebsd "$(tdir_i386freebsd)"
-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 \
- $(ELF_DEPS) $(srcdir)/scripttempl/elf.sc ${GEN_DEPENDS}
- ${GENSCRIPTS} i386lynx "$(tdir_i386lynx)"
-ei386mach.c: $(srcdir)/emulparams/i386mach.sh \
- $(srcdir)/emultempl/generic.em $(srcdir)/scripttempl/aout.sc ${GEN_DEPENDS}
- ${GENSCRIPTS} i386mach "$(tdir_i386mach)"
-ei386moss.c: $(srcdir)/emulparams/i386moss.sh \
- $(ELF_DEPS) $(srcdir)/scripttempl/elf.sc ${GEN_DEPENDS}
- ${GENSCRIPTS} i386moss "$(tdir_i386moss)"
-ei386msdos.c: $(srcdir)/emulparams/i386msdos.sh \
- $(srcdir)/emultempl/generic.em $(srcdir)/scripttempl/i386msdos.sc ${GEN_DEPENDS}
- ${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 \
- $(ELF_DEPS) $(srcdir)/scripttempl/elf.sc ${GEN_DEPENDS}
- ${GENSCRIPTS} i386nto "$(tdir_i386nto)"
-ei386nw.c: $(srcdir)/emulparams/i386nw.sh \
- $(ELF_DEPS) $(srcdir)/scripttempl/nw.sc ${GEN_DEPENDS}
- ${GENSCRIPTS} i386nw "$(tdir_i386nw)"
-ei386pe.c: $(srcdir)/emulparams/i386pe.sh \
- $(srcdir)/emultempl/pe.em $(srcdir)/scripttempl/pe.sc ${GEN_DEPENDS}
- ${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)"
-ei386pep.c: $(srcdir)/emulparams/i386pep.sh \
- $(srcdir)/emultempl/pep.em $(srcdir)/scripttempl/pep.sc ${GEN_DEPENDS}
- ${GENSCRIPTS} i386pep "$(tdir_i386pe)"
-elnk960.c: $(srcdir)/emulparams/lnk960.sh \
- $(srcdir)/emultempl/lnk960.em $(srcdir)/scripttempl/i960.sc ${GEN_DEPENDS}
- ${GENSCRIPTS} lnk960 "$(tdir_lnk960)"
-em68hc11elf.c: $(srcdir)/emulparams/m68hc11elf.sh \
- $(srcdir)/emultempl/m68hc1xelf.em $(ELF_DEPS) \
- $(srcdir)/scripttempl/elfm68hc11.sc ${GEN_DEPENDS}
- ${GENSCRIPTS} m68hc11elf "$(tdir_m68hc11)"
-em68hc11elfb.c: $(srcdir)/emulparams/m68hc11elfb.sh \
- $(srcdir)/emultempl/m68hc1xelf.em $(ELF_DEPS) \
- $(srcdir)/scripttempl/elfm68hc11.sc ${GEN_DEPENDS}
- ${GENSCRIPTS} m68hc11elfb "$(tdir_m68hc11b)"
-em68hc12elf.c: $(srcdir)/emulparams/m68hc12elf.sh \
- $(srcdir)/emultempl/m68hc1xelf.em $(ELF_DEPS) \
- $(srcdir)/scripttempl/elfm68hc12.sc ${GEN_DEPENDS}
- ${GENSCRIPTS} m68hc12elf "$(tdir_m68hc12)"
-em68hc12elfb.c: $(srcdir)/emulparams/m68hc12elfb.sh \
- $(srcdir)/emultempl/m68hc1xelf.em $(ELF_DEPS) \
- $(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 \
- $(ELF_DEPS) $(srcdir)/emultempl/m68kelf.em \
- $(srcdir)/scripttempl/elf.sc ${GEN_DEPENDS}
- ${GENSCRIPTS} m68kelf "$(tdir_m68kelf)"
-em68kelfnbsd.c: $(srcdir)/emulparams/m68kelfnbsd.sh \
- $(srcdir)/emulparams/m68kelf.sh \
- $(ELF_DEPS) $(srcdir)/emultempl/m68kelf.em \
- $(srcdir)/scripttempl/elf.sc ${GEN_DEPENDS}
- ${GENSCRIPTS} m68kelfnbsd "$(tdir_m68kelfnbsd)"
-em68klinux.c: $(srcdir)/emulparams/m68klinux.sh \
- $(srcdir)/emultempl/linux.em $(srcdir)/scripttempl/aout.sc ${GEN_DEPENDS}
- ${GENSCRIPTS} m68klinux "$(tdir_m68klinux)"
-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 \
- $(ELF_DEPS) $(srcdir)/scripttempl/psos.sc ${GEN_DEPENDS}
- ${GENSCRIPTS} m68kpsos "$(tdir_m68kpsos)"
-em88kbcs.c: $(srcdir)/emulparams/m88kbcs.sh \
- $(srcdir)/emultempl/generic.em $(srcdir)/scripttempl/m88kbcs.sc ${GEN_DEPENDS}
- ${GENSCRIPTS} m88kbcs "$(tdir_m88kbcs)"
-emaxqcoff.c: $(srcdir)/emulparams/maxqcoff.sh \
- $(srcdir)/emultempl/generic.em $(srcdir)/scripttempl/maxqcoff.sc ${GEN_DEPENDS}
- ${GENSCRIPTS} maxqcoff "$(tdir_maxqcoff)"
-emcorepe.c: $(srcdir)/emulparams/mcorepe.sh \
- $(srcdir)/emultempl/pe.em $(srcdir)/scripttempl/pe.sc ${GEN_DEPENDS}
- ${GENSCRIPTS} mcorepe "$(tdir_mcorepe)"
-emipsbig.c: $(srcdir)/emulparams/mipsbig.sh $(srcdir)/emultempl/generic.em \
- $(srcdir)/scripttempl/mips.sc ${GEN_DEPENDS}
- ${GENSCRIPTS} mipsbig "$(tdir_mipsbig)"
-emipsbsd.c: $(srcdir)/emulparams/mipsbsd.sh $(srcdir)/emultempl/generic.em \
- $(srcdir)/scripttempl/mipsbsd.sc ${GEN_DEPENDS}
- ${GENSCRIPTS} mipsbsd "$(tdir_mipsbsd)"
-emipsidt.c: $(srcdir)/emulparams/mipsidt.sh $(srcdir)/emultempl/generic.em \
- $(srcdir)/emultempl/mipsecoff.em $(srcdir)/scripttempl/mips.sc \
- ${GEN_DEPENDS}
- ${GENSCRIPTS} mipsidt "$(tdir_mipsidt)"
-emipsidtl.c: $(srcdir)/emulparams/mipsidtl.sh $(srcdir)/emultempl/generic.em \
- $(srcdir)/emultempl/mipsecoff.em $(srcdir)/scripttempl/mips.sc \
- ${GEN_DEPENDS}
- ${GENSCRIPTS} mipsidtl "$(tdir_mipsidtl)"
-emipslit.c: $(srcdir)/emulparams/mipslit.sh $(srcdir)/emultempl/generic.em \
- $(srcdir)/scripttempl/mips.sc ${GEN_DEPENDS}
- ${GENSCRIPTS} mipslit "$(tdir_mipslit)"
-emipslnews.c: $(srcdir)/emulparams/mipslnews.sh \
- $(srcdir)/emultempl/generic.em $(srcdir)/scripttempl/mips.sc ${GEN_DEPENDS}
- ${GENSCRIPTS} mipslnews "$(tdir_mipslnews)"
-emipspe.c: $(srcdir)/emulparams/mipspe.sh $(srcdir)/emultempl/pe.em \
- $(srcdir)/scripttempl/pe.sc ${GEN_DEPENDS}
- ${GENSCRIPTS} mipspe "$(tdir_mipspe)"
-emn10300.c: $(srcdir)/emulparams/mn10300.sh \
- $(srcdir)/emulparams/mn10200.sh \
- $(ELF_DEPS) $(srcdir)/scripttempl/elf.sc ${GEN_DEPENDS}
- ${GENSCRIPTS} mn10300 "$(tdir_mn10300)"
-emn10200.c: $(srcdir)/emulparams/mn10200.sh \
- $(ELF_GEN_DEPS) $(srcdir)/scripttempl/elf.sc ${GEN_DEPENDS}
- ${GENSCRIPTS} mn10200 "$(tdir_mn10200)"
-emsp430x110.c: $(srcdir)/emulparams/msp430all.sh \
- $(ELF_GEN_DEPS) $(srcdir)/scripttempl/elf32msp430.sc \
- ${GEN_DEPENDS}
- ${GENSCRIPTS} msp430x110 "$(tdir_msp430x110)" msp430all
-emsp430x112.c: $(srcdir)/emulparams/msp430all.sh \
- $(ELF_GEN_DEPS) $(srcdir)/scripttempl/elf32msp430.sc \
- ${GEN_DEPENDS}
- ${GENSCRIPTS} msp430x112 "$(tdir_msp430x112)" msp430all
-emsp430x1101.c: $(srcdir)/emulparams/msp430all.sh \
- $(ELF_GEN_DEPS) $(srcdir)/scripttempl/elf32msp430.sc \
- ${GEN_DEPENDS}
- ${GENSCRIPTS} msp430x1101 "$(tdir_msp430x1101)" msp430all
-emsp430x1111.c: $(srcdir)/emulparams/msp430all.sh \
- $(ELF_GEN_DEPS) $(srcdir)/scripttempl/elf32msp430.sc \
- ${GEN_DEPENDS}
- ${GENSCRIPTS} msp430x1111 "$(tdir_msp430x1111)" msp430all
-emsp430x1121.c: $(srcdir)/emulparams/msp430all.sh \
- $(ELF_GEN_DEPS) $(srcdir)/scripttempl/elf32msp430.sc \
- ${GEN_DEPENDS}
- ${GENSCRIPTS} msp430x1121 "$(tdir_msp430x1121)" msp430all
-emsp430x1122.c: $(srcdir)/emulparams/msp430all.sh \
- $(ELF_GEN_DEPS) $(srcdir)/scripttempl/elf32msp430.sc \
- ${GEN_DEPENDS}
- ${GENSCRIPTS} msp430x1122 "$(tdir_msp430x1122)" msp430all
-emsp430x1132.c: $(srcdir)/emulparams/msp430all.sh \
- $(ELF_GEN_DEPS) $(srcdir)/scripttempl/elf32msp430.sc \
- ${GEN_DEPENDS}
- ${GENSCRIPTS} msp430x1132 "$(tdir_msp430x1132)" msp430all
-emsp430x122.c: $(srcdir)/emulparams/msp430all.sh \
- $(ELF_GEN_DEPS) $(srcdir)/scripttempl/elf32msp430.sc \
- ${GEN_DEPENDS}
- ${GENSCRIPTS} msp430x122 "$(tdir_msp430x122)" msp430all
-emsp430x123.c: $(srcdir)/emulparams/msp430all.sh \
- $(ELF_GEN_DEPS) $(srcdir)/scripttempl/elf32msp430.sc \
- ${GEN_DEPENDS}
- ${GENSCRIPTS} msp430x123 "$(tdir_msp430x123)" msp430all
-emsp430x1222.c: $(srcdir)/emulparams/msp430all.sh \
- $(ELF_GEN_DEPS) $(srcdir)/scripttempl/elf32msp430.sc \
- ${GEN_DEPENDS}
- ${GENSCRIPTS} msp430x1222 "$(tdir_msp430x1222)" msp430all
-emsp430x1232.c: $(srcdir)/emulparams/msp430all.sh \
- $(ELF_GEN_DEPS) $(srcdir)/scripttempl/elf32msp430.sc \
- ${GEN_DEPENDS}
- ${GENSCRIPTS} msp430x1232 "$(tdir_msp430x1232)" msp430all
-emsp430x133.c: $(srcdir)/emulparams/msp430all.sh \
- $(ELF_GEN_DEPS) $(srcdir)/scripttempl/elf32msp430.sc \
- ${GEN_DEPENDS}
- ${GENSCRIPTS} msp430x133 "$(tdir_msp430x133)" msp430all
-emsp430x135.c: $(srcdir)/emulparams/msp430all.sh \
- $(ELF_GEN_DEPS) $(srcdir)/scripttempl/elf32msp430.sc \
- ${GEN_DEPENDS}
- ${GENSCRIPTS} msp430x135 "$(tdir_msp430x135)" msp430all
-emsp430x1331.c: $(srcdir)/emulparams/msp430all.sh \
- $(ELF_GEN_DEPS) $(srcdir)/scripttempl/elf32msp430.sc \
- ${GEN_DEPENDS}
- ${GENSCRIPTS} msp430x1331 "$(tdir_msp430x1331)" msp430all
-emsp430x1351.c: $(srcdir)/emulparams/msp430all.sh \
- $(ELF_GEN_DEPS) $(srcdir)/scripttempl/elf32msp430.sc \
- ${GEN_DEPENDS}
- ${GENSCRIPTS} msp430x1351 "$(tdir_msp430x1351)" msp430all
-emsp430x147.c: $(srcdir)/emulparams/msp430all.sh \
- $(ELF_GEN_DEPS) $(srcdir)/scripttempl/elf32msp430.sc \
- ${GEN_DEPENDS}
- ${GENSCRIPTS} msp430x147 "$(tdir_msp430x147)" msp430all
-emsp430x148.c: $(srcdir)/emulparams/msp430all.sh \
- $(ELF_GEN_DEPS) $(srcdir)/scripttempl/elf32msp430.sc \
- ${GEN_DEPENDS}
- ${GENSCRIPTS} msp430x148 "$(tdir_msp430x148)" msp430all
-emsp430x149.c: $(srcdir)/emulparams/msp430all.sh \
- $(ELF_GEN_DEPS) $(srcdir)/scripttempl/elf32msp430.sc \
- ${GEN_DEPENDS}
- ${GENSCRIPTS} msp430x149 "$(tdir_msp430x149)" msp430all
-emsp430x155.c: $(srcdir)/emulparams/msp430all.sh \
- $(ELF_GEN_DEPS) $(srcdir)/scripttempl/elf32msp430.sc \
- ${GEN_DEPENDS}
- ${GENSCRIPTS} msp430x155 "$(tdir_msp430x155)" msp430all
-emsp430x156.c: $(srcdir)/emulparams/msp430all.sh \
- $(ELF_GEN_DEPS) $(srcdir)/scripttempl/elf32msp430.sc \
- ${GEN_DEPENDS}
- ${GENSCRIPTS} msp430x156 "$(tdir_msp430x156)" msp430all
-emsp430x157.c: $(srcdir)/emulparams/msp430all.sh \
- $(ELF_GEN_DEPS) $(srcdir)/scripttempl/elf32msp430.sc \
- ${GEN_DEPENDS}
- ${GENSCRIPTS} msp430x157 "$(tdir_msp430x157)" msp430all
-emsp430x167.c: $(srcdir)/emulparams/msp430all.sh \
- $(ELF_GEN_DEPS) $(srcdir)/scripttempl/elf32msp430.sc \
- ${GEN_DEPENDS}
- ${GENSCRIPTS} msp430x167 "$(tdir_msp430x167)" msp430all
-emsp430x168.c: $(srcdir)/emulparams/msp430all.sh \
- $(ELF_GEN_DEPS) $(srcdir)/scripttempl/elf32msp430.sc \
- ${GEN_DEPENDS}
- ${GENSCRIPTS} msp430x168 "$(tdir_msp430x168)" msp430all
-emsp430x169.c: $(srcdir)/emulparams/msp430all.sh \
- $(ELF_GEN_DEPS) $(srcdir)/scripttempl/elf32msp430.sc \
- ${GEN_DEPENDS}
- ${GENSCRIPTS} msp430x169 "$(tdir_msp430x169)" msp430all
-emsp430x1610.c: $(srcdir)/emulparams/msp430all.sh \
- $(ELF_GEN_DEPS) $(srcdir)/scripttempl/elf32msp430.sc \
- ${GEN_DEPENDS}
- ${GENSCRIPTS} msp430x1610 "$(tdir_msp430x1610)" msp430all
-emsp430x1611.c: $(srcdir)/emulparams/msp430all.sh \
- $(ELF_GEN_DEPS) $(srcdir)/scripttempl/elf32msp430.sc \
- ${GEN_DEPENDS}
- ${GENSCRIPTS} msp430x1611 "$(tdir_msp430x1611)" msp430all
-emsp430x1612.c: $(srcdir)/emulparams/msp430all.sh \
- $(ELF_GEN_DEPS) $(srcdir)/scripttempl/elf32msp430.sc \
- ${GEN_DEPENDS}
- ${GENSCRIPTS} msp430x1612 "$(tdir_msp430x1612)" msp430all
-emsp430x2101.c: $(srcdir)/emulparams/msp430all.sh \
- $(ELF_GEN_DEPS) $(srcdir)/scripttempl/elf32msp430.sc \
- ${GEN_DEPENDS}
- ${GENSCRIPTS} msp430x2101 "$(tdir_msp430x2101)" msp430all
-emsp430x2111.c: $(srcdir)/emulparams/msp430all.sh \
- $(ELF_GEN_DEPS) $(srcdir)/scripttempl/elf32msp430.sc \
- ${GEN_DEPENDS}
- ${GENSCRIPTS} msp430x2111 "$(tdir_msp430x2111)" msp430all
-emsp430x2121.c: $(srcdir)/emulparams/msp430all.sh \
- $(ELF_GEN_DEPS) $(srcdir)/scripttempl/elf32msp430.sc \
- ${GEN_DEPENDS}
- ${GENSCRIPTS} msp430x2121 "$(tdir_msp430x2121)" msp430all
-emsp430x2131.c: $(srcdir)/emulparams/msp430all.sh \
- $(ELF_GEN_DEPS) $(srcdir)/scripttempl/elf32msp430.sc \
- ${GEN_DEPENDS}
- ${GENSCRIPTS} msp430x2131 "$(tdir_msp430x2131)" msp430all
-emsp430x311.c: $(srcdir)/emulparams/msp430all.sh \
- $(ELF_GEN_DEPS) $(srcdir)/scripttempl/elf32msp430_3.sc \
- ${GEN_DEPENDS}
- ${GENSCRIPTS} msp430x311 "$(tdir_msp430x311)" msp430all
-emsp430x312.c: $(srcdir)/emulparams/msp430all.sh \
- $(ELF_GEN_DEPS) $(srcdir)/scripttempl/elf32msp430_3.sc \
- ${GEN_DEPENDS}
- ${GENSCRIPTS} msp430x312 "$(tdir_msp430x312)" msp430all
-emsp430x313.c: $(srcdir)/emulparams/msp430all.sh \
- $(ELF_GEN_DEPS) $(srcdir)/scripttempl/elf32msp430_3.sc \
- ${GEN_DEPENDS}
- ${GENSCRIPTS} msp430x313 "$(tdir_msp430x313)" msp430all
-emsp430x314.c: $(srcdir)/emulparams/msp430all.sh \
- $(ELF_GEN_DEPS) $(srcdir)/scripttempl/elf32msp430_3.sc \
- ${GEN_DEPENDS}
- ${GENSCRIPTS} msp430x314 "$(tdir_msp430x314)" msp430all
-emsp430x315.c: $(srcdir)/emulparams/msp430all.sh \
- $(ELF_GEN_DEPS) $(srcdir)/scripttempl/elf32msp430_3.sc \
- ${GEN_DEPENDS}
- ${GENSCRIPTS} msp430x315 "$(tdir_msp430x315)" msp430all
-emsp430x323.c: $(srcdir)/emulparams/msp430all.sh \
- $(ELF_GEN_DEPS) $(srcdir)/scripttempl/elf32msp430_3.sc \
- ${GEN_DEPENDS}
- ${GENSCRIPTS} msp430x323 "$(tdir_msp430x323)" msp430all
-emsp430x325.c: $(srcdir)/emulparams/msp430all.sh \
- $(ELF_GEN_DEPS) $(srcdir)/scripttempl/elf32msp430_3.sc \
- ${GEN_DEPENDS}
- ${GENSCRIPTS} msp430x325 "$(tdir_msp430x325)" msp430all
-emsp430x336.c: $(srcdir)/emulparams/msp430all.sh \
- $(ELF_GEN_DEPS) $(srcdir)/scripttempl/elf32msp430_3.sc \
- ${GEN_DEPENDS}
- ${GENSCRIPTS} msp430x336 "$(tdir_msp430x336)" msp430all
-emsp430x337.c: $(srcdir)/emulparams/msp430all.sh \
- $(ELF_GEN_DEPS) $(srcdir)/scripttempl/elf32msp430_3.sc \
- ${GEN_DEPENDS}
- ${GENSCRIPTS} msp430x337 "$(tdir_msp430x337)" msp430all
-emsp430x412.c: $(srcdir)/emulparams/msp430all.sh \
- $(ELF_GEN_DEPS) $(srcdir)/scripttempl/elf32msp430.sc \
- ${GEN_DEPENDS}
- ${GENSCRIPTS} msp430x412 "$(tdir_msp430x412)" msp430all
-emsp430x413.c: $(srcdir)/emulparams/msp430all.sh \
- $(ELF_GEN_DEPS) $(srcdir)/scripttempl/elf32msp430.sc \
- ${GEN_DEPENDS}
- ${GENSCRIPTS} msp430x413 "$(tdir_msp430x413)" msp430all
-emsp430x415.c: $(srcdir)/emulparams/msp430all.sh \
- $(ELF_GEN_DEPS) $(srcdir)/scripttempl/elf32msp430.sc \
- ${GEN_DEPENDS}
- ${GENSCRIPTS} msp430x415 "$(tdir_msp430x415)" msp430all
-emsp430x417.c: $(srcdir)/emulparams/msp430all.sh \
- $(ELF_GEN_DEPS) $(srcdir)/scripttempl/elf32msp430.sc \
- ${GEN_DEPENDS}
- ${GENSCRIPTS} msp430x417 "$(tdir_msp430x417)" msp430all
-emsp430xE423.c: $(srcdir)/emulparams/msp430all.sh \
- $(ELF_GEN_DEPS) $(srcdir)/scripttempl/elf32msp430.sc \
- ${GEN_DEPENDS}
- ${GENSCRIPTS} msp430xE423 "$(tdir_msp430xE423)" msp430all
-emsp430xE425.c: $(srcdir)/emulparams/msp430all.sh \
- $(ELF_GEN_DEPS) $(srcdir)/scripttempl/elf32msp430.sc \
- ${GEN_DEPENDS}
- ${GENSCRIPTS} msp430xE425 "$(tdir_msp430xE425)" msp430all
-emsp430xE427.c: $(srcdir)/emulparams/msp430all.sh \
- $(ELF_GEN_DEPS) $(srcdir)/scripttempl/elf32msp430.sc \
- ${GEN_DEPENDS}
- ${GENSCRIPTS} msp430xE427 "$(tdir_msp430xE427)" msp430all
-emsp430xW423.c: $(srcdir)/emulparams/msp430all.sh \
- $(ELF_GEN_DEPS) $(srcdir)/scripttempl/elf32msp430.sc \
- ${GEN_DEPENDS}
- ${GENSCRIPTS} msp430xW423 "$(tdir_msp430xW423)" msp430all
-emsp430xW425.c: $(srcdir)/emulparams/msp430all.sh \
- $(ELF_GEN_DEPS) $(srcdir)/scripttempl/elf32msp430.sc \
- ${GEN_DEPENDS}
- ${GENSCRIPTS} msp430xW425 "$(tdir_msp430xW425)" msp430all
-emsp430xW427.c: $(srcdir)/emulparams/msp430all.sh \
- $(ELF_GEN_DEPS) $(srcdir)/scripttempl/elf32msp430.sc \
- ${GEN_DEPENDS}
- ${GENSCRIPTS} msp430xW427 "$(tdir_msp430xW427)" msp430all
-emsp430xG437.c: $(srcdir)/emulparams/msp430all.sh \
- $(ELF_GEN_DEPS) $(srcdir)/scripttempl/elf32msp430.sc \
- ${GEN_DEPENDS}
- ${GENSCRIPTS} msp430xG437 "$(tdir_msp430xG437)" msp430all
-emsp430xG438.c: $(srcdir)/emulparams/msp430all.sh \
- $(ELF_GEN_DEPS) $(srcdir)/scripttempl/elf32msp430.sc \
- ${GEN_DEPENDS}
- ${GENSCRIPTS} msp430xG438 "$(tdir_msp430xG438)" msp430all
-emsp430xG439.c: $(srcdir)/emulparams/msp430all.sh \
- $(ELF_GEN_DEPS) $(srcdir)/scripttempl/elf32msp430.sc \
- ${GEN_DEPENDS}
- ${GENSCRIPTS} msp430xG439 "$(tdir_msp430xG439)" msp430all
-emsp430x435.c: $(srcdir)/emulparams/msp430all.sh \
- $(ELF_GEN_DEPS) $(srcdir)/scripttempl/elf32msp430.sc \
- ${GEN_DEPENDS}
- ${GENSCRIPTS} msp430x435 "$(tdir_msp430x435)" msp430all
-emsp430x436.c: $(srcdir)/emulparams/msp430all.sh \
- $(ELF_GEN_DEPS) $(srcdir)/scripttempl/elf32msp430.sc \
- ${GEN_DEPENDS}
- ${GENSCRIPTS} msp430x436 "$(tdir_msp430x436)" msp430all
-emsp430x437.c: $(srcdir)/emulparams/msp430all.sh \
- $(ELF_GEN_DEPS) $(srcdir)/scripttempl/elf32msp430.sc \
- ${GEN_DEPENDS}
- ${GENSCRIPTS} msp430x437 "$(tdir_msp430x437)" msp430all
-emsp430x447.c: $(srcdir)/emulparams/msp430all.sh \
- $(ELF_GEN_DEPS) $(srcdir)/scripttempl/elf32msp430.sc \
- ${GEN_DEPENDS}
- ${GENSCRIPTS} msp430x447 "$(tdir_msp430x447)" msp430all
-emsp430x448.c: $(srcdir)/emulparams/msp430all.sh \
- $(ELF_GEN_DEPS) $(srcdir)/scripttempl/elf32msp430.sc \
- ${GEN_DEPENDS}
- ${GENSCRIPTS} msp430x448 "$(tdir_msp430x448)" msp430all
-emsp430x449.c: $(srcdir)/emulparams/msp430all.sh \
- $(ELF_GEN_DEPS) $(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 \
- $(ELF_GEN_DEPS) $(srcdir)/scripttempl/elf.sc ${GEN_DEPENDS}
- ${GENSCRIPTS} or32elf "$(tdir_or32elf)"
-epc532macha.c: $(srcdir)/emulparams/pc532macha.sh \
- $(srcdir)/emultempl/generic.em $(srcdir)/scripttempl/aout.sc ${GEN_DEPENDS}
- ${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 \
- $(ELF_GEN_DEPS) $(srcdir)/scripttempl/elf.sc ${GEN_DEPENDS}
- ${GENSCRIPTS} pjelf "$(tdir_pjelf)"
-epjlelf.c: $(srcdir)/emulparams/pjlelf.sh $(srcdir)/emulparams/pjelf.sh \
- $(ELF_GEN_DEPS) $(srcdir)/scripttempl/elf.sc ${GEN_DEPENDS}
- ${GENSCRIPTS} pjlelf "$(tdir_pjlelf)"
-eppcmacos.c: $(srcdir)/emulparams/ppcmacos.sh \
- $(srcdir)/emultempl/aix.em $(srcdir)/scripttempl/aix.sc ${GEN_DEPENDS}
- ${GENSCRIPTS} ppcmacos "$(tdir_ppcmacos)"
-eppcnw.c: $(srcdir)/emulparams/ppcnw.sh \
- $(ELF_DEPS) $(srcdir)/scripttempl/nw.sc ${GEN_DEPENDS}
- ${GENSCRIPTS} ppcnw "$(tdir_ppcnw)"
-eppcpe.c: $(srcdir)/emulparams/ppcpe.sh \
- $(srcdir)/emultempl/pe.em $(srcdir)/scripttempl/ppcpe.sc ${GEN_DEPENDS}
- ${GENSCRIPTS} ppcpe "$(tdir_ppcpe)"
-eppclynx.c: $(srcdir)/emulparams/ppclynx.sh \
- $(ELF_DEPS) $(srcdir)/scripttempl/elf.sc ${GEN_DEPENDS}
- ${GENSCRIPTS} ppclynx "$(tdir_ppclynx)"
-eriscix.c: $(srcdir)/emulparams/riscix.sh \
- $(srcdir)/emultempl/generic.em $(srcdir)/scripttempl/aout.sc ${GEN_DEPENDS}
- ${GENSCRIPTS} riscix "$(tdir_riscix)"
-escoreelf.c: $(srcdir)/emulparams/scoreelf.sh \
- $(srcdir)/emultempl/elf32.em $(srcdir)/emultempl/scoreelf.em \
- $(srcdir)/scripttempl/elf.sc ${GEN_DEPENDS}
- ${GENSCRIPTS} scoreelf "$(tdir_scoreelf)"
-esh.c: $(srcdir)/emulparams/sh.sh \
- $(srcdir)/emultempl/generic.em $(srcdir)/scripttempl/sh.sc ${GEN_DEPENDS}
- ${GENSCRIPTS} sh "$(tdir_sh)"
-eshelf.c: $(srcdir)/emulparams/shelf.sh \
- $(ELF_DEPS) $(srcdir)/scripttempl/elf.sc ${GEN_DEPENDS}
- ${GENSCRIPTS} shelf "$(tdir_shelf)"
-eshelf32.c: $(srcdir)/emulparams/shelf32.sh \
- $(BFDDIR)/libbfd.h $(INCDIR)/libiberty.h \
- $(srcdir)/emultempl/sh64elf.em $(INCDIR)/elf/sh.h $(BFDDIR)/elf-bfd.h \
- $(ELF_DEPS) $(srcdir)/scripttempl/elf.sc ${GEN_DEPENDS}
- ${GENSCRIPTS} shelf32 "$(tdir_shelf32)"
-eshelf32_linux.c: $(srcdir)/emulparams/shelf32_linux.sh \
- $(srcdir)/emulparams/shelf32.sh \
- $(BFDDIR)/libbfd.h $(INCDIR)/libiberty.h \
- $(srcdir)/emultempl/sh64elf.em $(INCDIR)/elf/sh.h $(BFDDIR)/elf-bfd.h \
- $(ELF_DEPS) $(srcdir)/scripttempl/elf.sc ${GEN_DEPENDS}
- ${GENSCRIPTS} shelf32_linux "$(tdir_shelf32_linux)"
-eshelf32_nbsd.c: $(srcdir)/emulparams/shelf32_nbsd.sh \
- $(srcdir)/emulparams/shelf32.sh \
- $(BFDDIR)/libbfd.h $(INCDIR)/libiberty.h \
- $(srcdir)/emultempl/sh64elf.em $(INCDIR)/elf/sh.h $(BFDDIR)/elf-bfd.h \
- $(ELF_DEPS) $(srcdir)/scripttempl/elf.sc ${GEN_DEPENDS}
- ${GENSCRIPTS} shelf32_nbsd "$(tdir_shelf32_nbsd)"
-eshelf64.c: $(srcdir)/emulparams/shelf64.sh $(srcdir)/emulparams/shelf32.sh \
- $(ELF_DEPS) $(srcdir)/scripttempl/elf.sc ${GEN_DEPENDS}
- ${GENSCRIPTS} shelf64 "$(tdir_shelf64)"
-eshelf64_nbsd.c: $(srcdir)/emulparams/shelf64_nbsd.sh \
- $(srcdir)/emulparams/shelf32_nbsd.sh $(srcdir)/emulparams/shelf32.sh \
- $(ELF_DEPS) $(srcdir)/scripttempl/elf.sc ${GEN_DEPENDS}
- ${GENSCRIPTS} shelf64_nbsd "$(tdir_shelf64_nbsd)"
-eshelf_linux.c: $(srcdir)/emulparams/shelf_linux.sh \
- $(srcdir)/emulparams/shlelf_linux.sh \
- $(ELF_DEPS) $(srcdir)/scripttempl/elf.sc ${GEN_DEPENDS}
- ${GENSCRIPTS} shelf_linux "$(tdir_shelf_linux)"
-eshlelf_linux.c: $(srcdir)/emulparams/shlelf_linux.sh \
- $(ELF_DEPS) $(srcdir)/scripttempl/elf.sc ${GEN_DEPENDS}
- ${GENSCRIPTS} shlelf_linux "$(tdir_shlelf_linux)"
-eshelf_nbsd.c: $(srcdir)/emulparams/shelf_nbsd.sh \
- $(srcdir)/emulparams/shelf.sh \
- $(ELF_DEPS) $(srcdir)/scripttempl/elf.sc ${GEN_DEPENDS}
- ${GENSCRIPTS} shelf_nbsd "$(tdir_shelf_nbsd)"
-eshelf_nto.c: $(srcdir)/emulparams/shelf_nto.sh \
- $(ELF_DEPS) $(srcdir)/scripttempl/elf.sc ${GEN_DEPENDS}
- ${GENSCRIPTS} shelf_nto "$(tdir_shelf_nto)"
-eshelf_vxworks.c: $(srcdir)/emulparams/shelf_vxworks.sh \
- $(srcdir)/emulparams/vxworks.sh $(ELF_DEPS) $(srcdir)/scripttempl/elf.sc \
- $(srcdir)/emultempl/vxworks.em ${GEN_DEPENDS}
- ${GENSCRIPTS} shelf_vxworks "$(tdir_shelf_vxworks)"
-eshlelf_nbsd.c: $(srcdir)/emulparams/shlelf_nbsd.sh \
- $(srcdir)/emulparams/shelf_nbsd.sh \
- $(srcdir)/emulparams/shelf.sh \
- $(ELF_DEPS) $(srcdir)/scripttempl/elf.sc ${GEN_DEPENDS}
- ${GENSCRIPTS} shlelf_nbsd "$(tdir_shlelf_nbsd)"
-eshlelf_nto.c: $(srcdir)/emulparams/shlelf_nto.sh \
- $(ELF_DEPS) $(srcdir)/scripttempl/elf.sc ${GEN_DEPENDS}
- ${GENSCRIPTS} shlelf_nto "$(tdir_shlelf_nto)"
-eshlelf_vxworks.c: $(srcdir)/emulparams/shlelf_vxworks.sh \
- $(srcdir)/emulparams/shelf_vxworks.sh $(srcdir)/emulparams/vxworks.sh \
- $(ELF_DEPS) $(srcdir)/scripttempl/elf.sc $(srcdir)/emultempl/vxworks.em \
- ${GEN_DEPENDS}
- ${GENSCRIPTS} shlelf_vxworks "$(tdir_shlelf_vxworks)"
-eshelf_uclinux.c: $(srcdir)/emulparams/shelf_uclinux.sh \
- $(srcdir)/emultempl/elf32.em $(srcdir)/scripttempl/elf.sc ${GEN_DEPENDS}
- ${GENSCRIPTS} shelf_uclinux "$(tdir_shelf_uclinux)"
-eshlelf.c: $(srcdir)/emulparams/shlelf.sh \
- $(srcdir)/emulparams/shelf.sh \
- $(ELF_DEPS) $(srcdir)/scripttempl/elf.sc ${GEN_DEPENDS}
- ${GENSCRIPTS} shlelf "$(tdir_shlelf)"
-eshlsymbian.c: $(srcdir)/emulparams/shlsymbian.sh \
- $(srcdir)/emulparams/shelf.sh \
- $(ELF_DEPS) $(srcdir)/scripttempl/elf32sh-symbian.sc ${GEN_DEPENDS}
- ${GENSCRIPTS} shlsymbian "$(tdir_shlelf)"
-eshlelf32.c: $(srcdir)/emulparams/shlelf32.sh \
- $(BFDDIR)/libbfd.h $(INCDIR)/libiberty.h $(srcdir)/emulparams/shelf32.sh \
- $(srcdir)/emultempl/sh64elf.em $(INCDIR)/elf/sh.h $(BFDDIR)/elf-bfd.h \
- $(ELF_DEPS) $(srcdir)/scripttempl/elf.sc ${GEN_DEPENDS}
- ${GENSCRIPTS} shlelf32 "$(tdir_shlelf32)"
-eshlelf32_linux.c: $(srcdir)/emulparams/shlelf32_linux.sh \
- $(srcdir)/emulparams/shelf32_linux.sh $(srcdir)/emulparams/shelf32.sh \
- $(BFDDIR)/libbfd.h $(INCDIR)/libiberty.h \
- $(srcdir)/emultempl/sh64elf.em $(INCDIR)/elf/sh.h $(BFDDIR)/elf-bfd.h \
- $(ELF_DEPS) $(srcdir)/scripttempl/elf.sc ${GEN_DEPENDS}
- ${GENSCRIPTS} shlelf32_linux "$(tdir_shlelf32_linux)"
-eshlelf32_nbsd.c: $(srcdir)/emulparams/shlelf32_nbsd.sh \
- $(srcdir)/emulparams/shelf32_nbsd.sh $(srcdir)/emulparams/shelf32.sh \
- $(BFDDIR)/libbfd.h $(INCDIR)/libiberty.h \
- $(srcdir)/emultempl/sh64elf.em $(INCDIR)/elf/sh.h $(BFDDIR)/elf-bfd.h \
- $(ELF_DEPS) $(srcdir)/scripttempl/elf.sc ${GEN_DEPENDS}
- ${GENSCRIPTS} shlelf32_nbsd "$(tdir_shlelf32_nbsd)"
-eshlelf64.c: $(srcdir)/emulparams/shlelf64.sh \
- $(srcdir)/emulparams/shelf64.sh $(srcdir)/emulparams/shelf32.sh \
- $(ELF_DEPS) $(srcdir)/scripttempl/elf.sc ${GEN_DEPENDS}
- ${GENSCRIPTS} shlelf64 "$(tdir_shlelf64)"
-eshlelf64_nbsd.c: $(srcdir)/emulparams/shlelf64_nbsd.sh \
- $(srcdir)/emulparams/shelf64_nbsd.sh \
- $(srcdir)/emulparams/shelf32_nbsd.sh $(srcdir)/emulparams/shelf32.sh \
- $(ELF_DEPS) $(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)"
-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 \
- $(ELF_DEPS) $(srcdir)/scripttempl/v850.sc ${GEN_DEPENDS}
- ${GENSCRIPTS} v850 "$(tdir_v850)"
-ew65.c: $(srcdir)/emulparams/w65.sh \
- $(srcdir)/emultempl/generic.em $(srcdir)/scripttempl/w65.sc ${GEN_DEPENDS}
- ${GENSCRIPTS} w65 "$(tdir_w65)"
-ez80.c: $(srcdir)/emulparams/z80.sh \
- $(srcdir)/emultempl/generic.em $(srcdir)/emultempl/z80.em \
- $(srcdir)/scripttempl/z80.sc ${GEN_DEPENDS}
- ${GENSCRIPTS} z80 "$(tdir_z80)"
-ez8001.c: $(srcdir)/emulparams/z8001.sh \
- $(srcdir)/emultempl/generic.em $(srcdir)/scripttempl/z8000.sc ${GEN_DEPENDS}
- ${GENSCRIPTS} z8001 "$(tdir_z8001)"
-ez8002.c: $(srcdir)/emulparams/z8002.sh \
- $(srcdir)/emultempl/generic.em $(srcdir)/scripttempl/z8000.sc ${GEN_DEPENDS}
- ${GENSCRIPTS} z8002 "$(tdir_z8002)"
-
-# 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; \
- 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) $(LIBINTL)" 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
- cp ${srcdir}/${DOCVER}-doc.texi ./configdoc.texi
- chmod u+w ./configdoc.texi
-
-# Build the man page from the texinfo file
-# The sed command removes the no-adjust Nroff command so that
-# the man output looks standard.
-ld.1: $(srcdir)/ld.texinfo configdoc.texi
- 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-html install-html-am install-html-recursive
-
-install-html: install-html-recursive install-html-am
-
-install-html-am: $(HTMLS)
- @$(NORMAL_INSTALL)
- test -z "$(htmldir)" || $(mkdir_p) "$(DESTDIR)$(htmldir)"
- @list='$(HTMLS)'; for p in $$list; do \
- if test -f "$$p" || test -d "$$p"; then d=""; else d="$(srcdir)/"; fi; \
- f=$(html__strip_dir) \
- if test -d "$$d$$p"; then \
- echo " $(mkdir_p) '$(DESTDIR)$(htmldir)/$$f'"; \
- $(mkdir_p) "$(DESTDIR)$(htmldir)/$$f" || exit 1; \
- echo " $(INSTALL_DATA) '$$d$$p'/* '$(DESTDIR)$(htmldir)/$$f'"; \
- $(INSTALL_DATA) "$$d$$p"/* "$(DESTDIR)$(htmldir)/$$f"; \
- else \
- echo " $(INSTALL_DATA) '$$d$$p' '$(DESTDIR)$(htmldir)/$$f'"; \
- $(INSTALL_DATA) "$$d$$p" "$(DESTDIR)$(htmldir)/$$f"; \
- fi; \
- done
-
-install-html-recursive:
- @failcom='exit 1'; \
- for f in x $$MAKEFLAGS; do \
- case $$f in \
- *=* | --[!k]*);; \
- *k*) failcom='fail=yes';; \
- esac; \
- done; \
- dot_seen=no; \
- target=`echo $@ | sed s/-recursive//`; \
- list='$(SUBDIRS)'; for subdir in $$list; do \
- echo "Making $$target in $$subdir"; \
- if test "$$subdir" = "."; then \
- dot_seen=yes; \
- local_target="$$target-am"; \
- else \
- local_target="$$target"; \
- fi; \
- (cd $$subdir && $(MAKE) $(AM_MAKEFLAGS) $$local_target) \
- || eval $$failcom; \
- done; \
- if test "$$dot_seen" = "no"; then \
- $(MAKE) $(AM_MAKEFLAGS) "$$target-am" || exit 1; \
- fi; test -z "$$fail"
-
-.PHONY: install-exec-local install-data-local
-
-install-exec-local: ld-new$(EXEEXT)
- $(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-data-local: install-info
-diststuff: info $(EXTRA_DIST)
-all: info ld.1
-
-# Both info (ld.info) and ld.1 depend on configdoc.texi.
-# But info isn't a direct target. Make info-recursive to depend on
-# ld.1 to support parallel build.
-info-recursive: ld.1
-distclean-local:
- rm -rf ldscripts
-
-# 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
-
-# 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 sysdep.h config.h $(INCDIR)/fopen-same.h \
- ../bfd/bfd.h $(INCDIR)/ansidecl.h $(INCDIR)/symcat.h \
- $(INCDIR)/bfdlink.h $(INCDIR)/safe-ctype.h ld.h ldexp.h \
- ldlang.h ldmisc.h ldgram.h ldmain.h ldctor.h
-ldemul.o: ldemul.c sysdep.h config.h $(INCDIR)/fopen-same.h \
- ../bfd/bfd.h $(INCDIR)/ansidecl.h $(INCDIR)/symcat.h \
- $(INCDIR)/bfdlink.h ld.h ldmisc.h ldexp.h ldlang.h \
- ldfile.h ldemul.h ldmain.h ldemul-list.h
-ldexp.o: ldexp.c sysdep.h config.h $(INCDIR)/fopen-same.h \
- ../bfd/bfd.h $(INCDIR)/ansidecl.h $(INCDIR)/symcat.h \
- $(INCDIR)/bfdlink.h ld.h ldmain.h ldmisc.h ldexp.h \
- ldlex.h ldgram.h ldlang.h $(INCDIR)/libiberty.h $(INCDIR)/ansidecl.h \
- $(INCDIR)/safe-ctype.h
-ldfile.o: ldfile.c sysdep.h config.h $(INCDIR)/fopen-same.h \
- ../bfd/bfd.h $(INCDIR)/ansidecl.h $(INCDIR)/symcat.h \
- $(INCDIR)/bfdlink.h $(INCDIR)/safe-ctype.h ld.h ldmisc.h \
- ldexp.h ldlang.h ldfile.h ldmain.h ldgram.h ldlex.h \
- ldemul.h $(INCDIR)/libiberty.h $(INCDIR)/ansidecl.h \
- $(INCDIR)/filenames.h
-ldlang.o: ldlang.c sysdep.h config.h $(INCDIR)/fopen-same.h \
- ../bfd/bfd.h $(INCDIR)/ansidecl.h $(INCDIR)/symcat.h \
- $(INCDIR)/libiberty.h $(INCDIR)/ansidecl.h $(INCDIR)/safe-ctype.h \
- $(INCDIR)/obstack.h $(INCDIR)/bfdlink.h ld.h ldmain.h \
- ldexp.h ldlang.h ldgram.h ldlex.h ldmisc.h ldctor.h \
- ldfile.h ldemul.h $(INCDIR)/fnmatch.h $(INCDIR)/demangle.h \
- $(INCDIR)/libiberty.h $(INCDIR)/hashtab.h
-ldmain.o: ldmain.c sysdep.h config.h $(INCDIR)/fopen-same.h \
- ../bfd/bfd.h $(INCDIR)/ansidecl.h $(INCDIR)/symcat.h \
- $(INCDIR)/safe-ctype.h $(INCDIR)/libiberty.h $(INCDIR)/ansidecl.h \
- $(INCDIR)/progress.h $(INCDIR)/bfdlink.h $(INCDIR)/filenames.h \
- ld.h ldmain.h ldmisc.h ldwrite.h ldexp.h ldlang.h ldgram.h \
- ldlex.h ldfile.h ldemul.h ldctor.h
-ldmisc.o: ldmisc.c sysdep.h config.h $(INCDIR)/fopen-same.h \
- ../bfd/bfd.h $(INCDIR)/ansidecl.h $(INCDIR)/symcat.h \
- $(INCDIR)/bfdlink.h $(INCDIR)/libiberty.h $(INCDIR)/ansidecl.h \
- $(INCDIR)/demangle.h $(INCDIR)/libiberty.h ld.h ldmisc.h \
- ldexp.h ldlang.h ldgram.h ldlex.h ldmain.h ldfile.h \
- $(BFDDIR)/elf-bfd.h $(INCDIR)/elf/common.h $(INCDIR)/elf/internal.h \
- $(INCDIR)/elf/external.h $(INCDIR)/bfdlink.h
-ldver.o: ldver.c sysdep.h config.h $(INCDIR)/fopen-same.h \
- ../bfd/bfd.h $(INCDIR)/ansidecl.h $(INCDIR)/symcat.h \
- ../bfd/bfdver.h ld.h ldver.h ldexp.h ldlang.h ldfile.h \
- ldemul.h ldmain.h
-ldwrite.o: ldwrite.c sysdep.h config.h $(INCDIR)/fopen-same.h \
- ../bfd/bfd.h $(INCDIR)/ansidecl.h $(INCDIR)/symcat.h \
- $(INCDIR)/bfdlink.h $(INCDIR)/libiberty.h $(INCDIR)/ansidecl.h \
- $(INCDIR)/safe-ctype.h ld.h ldexp.h ldlang.h ldwrite.h \
- ldmisc.h ldgram.h ldmain.h
-lexsup.o: lexsup.c sysdep.h config.h $(INCDIR)/fopen-same.h \
- ../bfd/bfd.h $(INCDIR)/ansidecl.h $(INCDIR)/symcat.h \
- ../bfd/bfdver.h $(INCDIR)/libiberty.h $(INCDIR)/ansidecl.h \
- $(INCDIR)/safe-ctype.h $(INCDIR)/bfdlink.h ld.h ldmain.h \
- ldmisc.h ldexp.h ldlang.h ldgram.h ldlex.h ldfile.h \
- ldver.h ldemul.h $(INCDIR)/demangle.h $(INCDIR)/libiberty.h
-mri.o: mri.c sysdep.h config.h $(INCDIR)/fopen-same.h \
- ../bfd/bfd.h $(INCDIR)/ansidecl.h $(INCDIR)/symcat.h \
- ld.h ldexp.h ldlang.h ldmisc.h mri.h ldgram.h $(INCDIR)/libiberty.h \
- $(INCDIR)/ansidecl.h
-ldcref.o: ldcref.c sysdep.h config.h $(INCDIR)/fopen-same.h \
- ../bfd/bfd.h $(INCDIR)/ansidecl.h $(INCDIR)/symcat.h \
- $(INCDIR)/bfdlink.h $(INCDIR)/libiberty.h $(INCDIR)/ansidecl.h \
- $(INCDIR)/demangle.h $(INCDIR)/libiberty.h $(INCDIR)/objalloc.h \
- ld.h ldmain.h ldmisc.h ldexp.h ldlang.h
-pe-dll.o: pe-dll.c sysdep.h config.h $(INCDIR)/fopen-same.h \
- ../bfd/bfd.h $(INCDIR)/ansidecl.h $(INCDIR)/symcat.h \
- $(INCDIR)/bfdlink.h $(INCDIR)/libiberty.h $(INCDIR)/ansidecl.h \
- $(INCDIR)/safe-ctype.h ld.h ldexp.h ldlang.h ldwrite.h \
- ldmisc.h ldgram.h ldmain.h ldfile.h ldemul.h $(INCDIR)/coff/internal.h \
- $(BFDDIR)/libcoff.h $(INCDIR)/bfdlink.h deffile.h pe-dll.h
-pep-dll.o: pep-dll.c pe-dll.c sysdep.h config.h $(INCDIR)/fopen-same.h \
- ../bfd/bfd.h $(INCDIR)/ansidecl.h $(INCDIR)/symcat.h \
- $(INCDIR)/bfdlink.h $(INCDIR)/libiberty.h $(INCDIR)/ansidecl.h \
- $(INCDIR)/safe-ctype.h ld.h ldexp.h ldlang.h ldwrite.h \
- ldmisc.h ldgram.h ldmain.h ldfile.h ldemul.h $(INCDIR)/coff/internal.h \
- $(BFDDIR)/libcoff.h $(INCDIR)/bfdlink.h deffile.h pe-dll.h \
- pep-dll.h
-ldgram.o: ldgram.c sysdep.h config.h $(INCDIR)/fopen-same.h \
- ../bfd/bfd.h $(INCDIR)/ansidecl.h $(INCDIR)/symcat.h \
- $(INCDIR)/bfdlink.h ld.h ldexp.h ldver.h ldlang.h ldfile.h \
- ldemul.h ldmisc.h ldmain.h mri.h ldctor.h ldlex.h
-ldlex.o: ldlex.c sysdep.h config.h $(INCDIR)/fopen-same.h \
- ../bfd/bfd.h $(INCDIR)/ansidecl.h $(INCDIR)/symcat.h \
- $(INCDIR)/safe-ctype.h $(INCDIR)/bfdlink.h ld.h ldmisc.h \
- ldexp.h ldlang.h ldgram.h ldfile.h ldlex.h ldmain.h \
- $(INCDIR)/libiberty.h $(INCDIR)/ansidecl.h
-deffilep.o: deffilep.c sysdep.h config.h $(INCDIR)/fopen-same.h \
- $(INCDIR)/libiberty.h $(INCDIR)/ansidecl.h $(INCDIR)/safe-ctype.h \
- ../bfd/bfd.h $(INCDIR)/ansidecl.h $(INCDIR)/symcat.h \
- ld.h ldmisc.h deffile.h
-# IF YOU PUT ANYTHING HERE IT WILL GO AWAY
-# Tell versions [3.59,3.63) of GNU make to not export all variables.
-# Otherwise a system limit (for SysV at least) may be exceeded.
-.NOEXPORT:
diff --git a/contrib/binutils/ld/NEWS b/contrib/binutils/ld/NEWS
deleted file mode 100644
index 5de0b5d69fd5..000000000000
--- a/contrib/binutils/ld/NEWS
+++ /dev/null
@@ -1,408 +0,0 @@
--*- text -*-
-* Added support for National Semicondutor CompactRISC (ie CR16) target.
-
-* -l:foo now searches the library path for a filename called foo,
- without converting it to libfoo.a or libfoo.so.
-
-* Add a new command line option '--default-script=FILE' or '-dT FILE'
- which specifies a replacement for the built in, default linker
- script.
-
-* ELF: Add -Bsymbolic-functions, --dynamic-list-cpp-new, which puts C++
- operator new and delete on the dynamic list, and --dynamic-list-data,
- builtin list for --dynamic-list, which puts global data symbols on the
- dynamic list.
-
-* Add support for x86_64 PE+ target.
-
-* Add support for Score target.
-
-* ELF: Add --dynamic-list option to specify a list of global symbols
- whose references shouldn't be bound to the definition within the
- shared library, or a list of symbols which should be added to the
- symbol table in the executable.
-
-* The default output section LMA has changed for allocatable sections from
- being equal to VMA, to keeping the difference between LMA and VMA the same as
- the previous output section in the same region. This is a more useful
- default when using overlays and other cases where you specify an LMA
- differing from the VMA for some sections.
-
-* New switch: --print-gc-sections to list any sections removed by garabge
- collection.
-
-* ARM: Added --vfp11-denorm-fix option to work around an erratum in current
-VFP11 coprocessors.
-
-Changes in 2.17:
-
-* Support for the Infineon XC16X has been added by KPIT Cummins Infosystems.
-
-* Modify the Linux linker search order to better match ld.so search order.
- Look for DT_NEEDED libraries in paths specified by ld.so.conf before
- searching the default directories, rather than vice versa.
- Use $prefix/etc/ld.so.conf if it exists, otherwise /etc/ld.so.conf.
-
-* PE-COFF: Forward exports from DLL's can now be specified in .def files
- passed directly to ld.
-
-* Support for the Z80 processor family has been added.
-
-* Add support for the "@<file>" syntax to the command line, so that extra
- switches can be read from <file>.
-
-Changes in 2.16:
-
-* Support for the R_ARM_V4BX relocation as defined in the ARM AAELF
- specification has been added via the --fix-v4bx command-line option.
-
-* New linker script construct AS_NEEDED(), which sets the --as-needed flag
- for input files listed inside of it.
-
-* A new command-line option, --sysroot, can be used to override the
- default sysroot location. It only applies to toolchains that were
- configured using --with-sysroot.
-
-* New linker script functions: ORIGIN() and LENGTH() which return information
- about a specified memory region.
-
-* Port to MAXQ processor contributed by HCL Tech.
-
-* Added SEGMENT_START to the linker script language to permit the user to
- override the base address for a segment from the command-line.
-
-* ELF: --warn-shared-textrel option to warn if adding a DT_TEXTREL to a shared
- object.
-
-* Added SORT_BY_NAME and SORT_BY_ALIGNMENT to the linker script
- language to permit sorting sections by section name or section
- maximum alignment.
-
-* Added a new linker command line switch, --sort-section name|alignment,
- to sort sections by section name or maximum alignment.
-
-* ELF: --add-needed/--no-add-needed options to control if a DT_NEEDED tag
- should be added when a shared library comes from DT_NEEDED tags.
-
-* Support for the crx-elf target added.
-
-* Support for the sh-symbianelf target added.
-
-* A new linker command line switch has been added which allows the hash table
- size to be set to a suitable prime value near to its argument. This switch
- is --hash-size=<NUMBER>. Also if the switch --reduce-memory-overheads is
- used, and --hash-size has not been used, then the default value will be set
- to 1021.
-
-* Linker map files are now generated with an O(N) algorithm for finding symbols
- that are defined in each section. This uses about 40% more memory for
- symbols than the old O(N^2) algorithm. You can use the new
- --reduce-memory-overheads option to select the old algorithm; this option
- might also be used in the future to select similar tradeoffs.
-
-Changes in 2.15:
-
-* ELF: --as-needed/--no-as-needed options to control if a DT_NEEDED tag should
- be added only when a shared library is referenced.
-
-* PE: --large-address-aware option to indicate executables support virtual
- addresses greater than 2 gigabytes.
-
-* DWARF 2 support for i386pe added.
-
-* The linker script operator DEFINED() will now yield 1 only for a symbol that
- is defined before the statement where DEFINED is used.
-
-* The MIPS --embedded-relocs (used to embed relocations into binaries for
- Embedded-PIC code) is deprecated and will be removed in a future release.
-
-* cr16c support added by NSC.
-
-* m32r Linux (ELF) support added by Renesas.
-
-* Improved linker's handling of unresolved symbols. The switch
- --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 a953e422f7d1..000000000000
--- 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 31cd98ba236f..000000000000
--- 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/aclocal.m4 b/contrib/binutils/ld/aclocal.m4
deleted file mode 100644
index ef6a062f1c0e..000000000000
--- a/contrib/binutils/ld/aclocal.m4
+++ /dev/null
@@ -1,903 +0,0 @@
-# generated automatically by aclocal 1.9.6 -*- Autoconf -*-
-
-# Copyright (C) 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004,
-# 2005 Free Software Foundation, Inc.
-# This file is free software; the Free Software Foundation
-# gives unlimited permission to copy and/or distribute it,
-# with or without modifications, as long as this notice is preserved.
-
-# This program is distributed in the hope that it will be useful,
-# but WITHOUT ANY WARRANTY, to the extent permitted by law; without
-# even the implied warranty of MERCHANTABILITY or FITNESS FOR A
-# PARTICULAR PURPOSE.
-
-# Copyright (C) 2002, 2003, 2005 Free Software Foundation, Inc.
-#
-# This file is free software; the Free Software Foundation
-# gives unlimited permission to copy and/or distribute it,
-# with or without modifications, as long as this notice is preserved.
-
-# AM_AUTOMAKE_VERSION(VERSION)
-# ----------------------------
-# Automake X.Y traces this macro to ensure aclocal.m4 has been
-# generated from the m4 files accompanying Automake X.Y.
-AC_DEFUN([AM_AUTOMAKE_VERSION], [am__api_version="1.9"])
-
-# AM_SET_CURRENT_AUTOMAKE_VERSION
-# -------------------------------
-# Call AM_AUTOMAKE_VERSION so it can be traced.
-# This function is AC_REQUIREd by AC_INIT_AUTOMAKE.
-AC_DEFUN([AM_SET_CURRENT_AUTOMAKE_VERSION],
- [AM_AUTOMAKE_VERSION([1.9.6])])
-
-# AM_AUX_DIR_EXPAND -*- Autoconf -*-
-
-# Copyright (C) 2001, 2003, 2005 Free Software Foundation, Inc.
-#
-# This file is free software; the Free Software Foundation
-# gives unlimited permission to copy and/or distribute it,
-# with or without modifications, as long as this notice is preserved.
-
-# For projects using AC_CONFIG_AUX_DIR([foo]), Autoconf sets
-# $ac_aux_dir to `$srcdir/foo'. In other projects, it is set to
-# `$srcdir', `$srcdir/..', or `$srcdir/../..'.
-#
-# Of course, Automake must honor this variable whenever it calls a
-# tool from the auxiliary directory. The problem is that $srcdir (and
-# therefore $ac_aux_dir as well) can be either absolute or relative,
-# depending on how configure is run. This is pretty annoying, since
-# it makes $ac_aux_dir quite unusable in subdirectories: in the top
-# source directory, any form will work fine, but in subdirectories a
-# relative path needs to be adjusted first.
-#
-# $ac_aux_dir/missing
-# fails when called from a subdirectory if $ac_aux_dir is relative
-# $top_srcdir/$ac_aux_dir/missing
-# fails if $ac_aux_dir is absolute,
-# fails when called from a subdirectory in a VPATH build with
-# a relative $ac_aux_dir
-#
-# The reason of the latter failure is that $top_srcdir and $ac_aux_dir
-# are both prefixed by $srcdir. In an in-source build this is usually
-# harmless because $srcdir is `.', but things will broke when you
-# start a VPATH build or use an absolute $srcdir.
-#
-# So we could use something similar to $top_srcdir/$ac_aux_dir/missing,
-# iff we strip the leading $srcdir from $ac_aux_dir. That would be:
-# am_aux_dir='\$(top_srcdir)/'`expr "$ac_aux_dir" : "$srcdir//*\(.*\)"`
-# and then we would define $MISSING as
-# MISSING="\${SHELL} $am_aux_dir/missing"
-# This will work as long as MISSING is not called from configure, because
-# unfortunately $(top_srcdir) has no meaning in configure.
-# However there are other variables, like CC, which are often used in
-# configure, and could therefore not use this "fixed" $ac_aux_dir.
-#
-# Another solution, used here, is to always expand $ac_aux_dir to an
-# absolute PATH. The drawback is that using absolute paths prevent a
-# configured tree to be moved without reconfiguration.
-
-AC_DEFUN([AM_AUX_DIR_EXPAND],
-[dnl Rely on autoconf to set up CDPATH properly.
-AC_PREREQ([2.50])dnl
-# expand $ac_aux_dir to an absolute path
-am_aux_dir=`cd $ac_aux_dir && pwd`
-])
-
-# AM_CONDITIONAL -*- Autoconf -*-
-
-# Copyright (C) 1997, 2000, 2001, 2003, 2004, 2005
-# Free Software Foundation, Inc.
-#
-# This file is free software; the Free Software Foundation
-# gives unlimited permission to copy and/or distribute it,
-# with or without modifications, as long as this notice is preserved.
-
-# serial 7
-
-# AM_CONDITIONAL(NAME, SHELL-CONDITION)
-# -------------------------------------
-# Define a conditional.
-AC_DEFUN([AM_CONDITIONAL],
-[AC_PREREQ(2.52)dnl
- ifelse([$1], [TRUE], [AC_FATAL([$0: invalid condition: $1])],
- [$1], [FALSE], [AC_FATAL([$0: invalid condition: $1])])dnl
-AC_SUBST([$1_TRUE])
-AC_SUBST([$1_FALSE])
-if $2; then
- $1_TRUE=
- $1_FALSE='#'
-else
- $1_TRUE='#'
- $1_FALSE=
-fi
-AC_CONFIG_COMMANDS_PRE(
-[if test -z "${$1_TRUE}" && test -z "${$1_FALSE}"; then
- AC_MSG_ERROR([[conditional "$1" was never defined.
-Usually this means the macro was only invoked conditionally.]])
-fi])])
-
-
-# Copyright (C) 1999, 2000, 2001, 2002, 2003, 2004, 2005
-# Free Software Foundation, Inc.
-#
-# This file is free software; the Free Software Foundation
-# gives unlimited permission to copy and/or distribute it,
-# with or without modifications, as long as this notice is preserved.
-
-# serial 8
-
-# There are a few dirty hacks below to avoid letting `AC_PROG_CC' be
-# written in clear, in which case automake, when reading aclocal.m4,
-# will think it sees a *use*, and therefore will trigger all it's
-# C support machinery. Also note that it means that autoscan, seeing
-# CC etc. in the Makefile, will ask for an AC_PROG_CC use...
-
-
-# _AM_DEPENDENCIES(NAME)
-# ----------------------
-# See how the compiler implements dependency checking.
-# NAME is "CC", "CXX", "GCJ", or "OBJC".
-# We try a few techniques and use that to set a single cache variable.
-#
-# We don't AC_REQUIRE the corresponding AC_PROG_CC since the latter was
-# modified to invoke _AM_DEPENDENCIES(CC); we would have a circular
-# dependency, and given that the user is not expected to run this macro,
-# just rely on AC_PROG_CC.
-AC_DEFUN([_AM_DEPENDENCIES],
-[AC_REQUIRE([AM_SET_DEPDIR])dnl
-AC_REQUIRE([AM_OUTPUT_DEPENDENCY_COMMANDS])dnl
-AC_REQUIRE([AM_MAKE_INCLUDE])dnl
-AC_REQUIRE([AM_DEP_TRACK])dnl
-
-ifelse([$1], CC, [depcc="$CC" am_compiler_list=],
- [$1], CXX, [depcc="$CXX" am_compiler_list=],
- [$1], OBJC, [depcc="$OBJC" am_compiler_list='gcc3 gcc'],
- [$1], GCJ, [depcc="$GCJ" am_compiler_list='gcc3 gcc'],
- [depcc="$$1" am_compiler_list=])
-
-AC_CACHE_CHECK([dependency style of $depcc],
- [am_cv_$1_dependencies_compiler_type],
-[if test -z "$AMDEP_TRUE" && test -f "$am_depcomp"; then
- # We make a subdir and do the tests there. Otherwise we can end up
- # making bogus files that we don't know about and never remove. For
- # instance it was reported that on HP-UX the gcc test will end up
- # making a dummy file named `D' -- because `-MD' means `put the output
- # in D'.
- mkdir conftest.dir
- # Copy depcomp to subdir because otherwise we won't find it if we're
- # using a relative directory.
- cp "$am_depcomp" conftest.dir
- cd conftest.dir
- # We will build objects and dependencies in a subdirectory because
- # it helps to detect inapplicable dependency modes. For instance
- # both Tru64's cc and ICC support -MD to output dependencies as a
- # side effect of compilation, but ICC will put the dependencies in
- # the current directory while Tru64 will put them in the object
- # directory.
- mkdir sub
-
- am_cv_$1_dependencies_compiler_type=none
- if test "$am_compiler_list" = ""; then
- am_compiler_list=`sed -n ['s/^#*\([a-zA-Z0-9]*\))$/\1/p'] < ./depcomp`
- fi
- for depmode in $am_compiler_list; do
- # Setup a source with many dependencies, because some compilers
- # like to wrap large dependency lists on column 80 (with \), and
- # we should not choose a depcomp mode which is confused by this.
- #
- # We need to recreate these files for each test, as the compiler may
- # overwrite some of them when testing with obscure command lines.
- # This happens at least with the AIX C compiler.
- : > sub/conftest.c
- for i in 1 2 3 4 5 6; do
- echo '#include "conftst'$i'.h"' >> sub/conftest.c
- # Using `: > sub/conftst$i.h' creates only sub/conftst1.h with
- # Solaris 8's {/usr,}/bin/sh.
- touch sub/conftst$i.h
- done
- echo "${am__include} ${am__quote}sub/conftest.Po${am__quote}" > confmf
-
- case $depmode in
- nosideeffect)
- # after this tag, mechanisms are not by side-effect, so they'll
- # only be used when explicitly requested
- if test "x$enable_dependency_tracking" = xyes; then
- continue
- else
- break
- fi
- ;;
- none) break ;;
- esac
- # We check with `-c' and `-o' for the sake of the "dashmstdout"
- # mode. It turns out that the SunPro C++ compiler does not properly
- # handle `-M -o', and we need to detect this.
- if depmode=$depmode \
- source=sub/conftest.c object=sub/conftest.${OBJEXT-o} \
- depfile=sub/conftest.Po tmpdepfile=sub/conftest.TPo \
- $SHELL ./depcomp $depcc -c -o sub/conftest.${OBJEXT-o} sub/conftest.c \
- >/dev/null 2>conftest.err &&
- grep sub/conftst6.h sub/conftest.Po > /dev/null 2>&1 &&
- grep sub/conftest.${OBJEXT-o} sub/conftest.Po > /dev/null 2>&1 &&
- ${MAKE-make} -s -f confmf > /dev/null 2>&1; then
- # icc doesn't choke on unknown options, it will just issue warnings
- # or remarks (even with -Werror). So we grep stderr for any message
- # that says an option was ignored or not supported.
- # When given -MP, icc 7.0 and 7.1 complain thusly:
- # icc: Command line warning: ignoring option '-M'; no argument required
- # The diagnosis changed in icc 8.0:
- # icc: Command line remark: option '-MP' not supported
- if (grep 'ignoring option' conftest.err ||
- grep 'not supported' conftest.err) >/dev/null 2>&1; then :; else
- am_cv_$1_dependencies_compiler_type=$depmode
- break
- fi
- fi
- done
-
- cd ..
- rm -rf conftest.dir
-else
- am_cv_$1_dependencies_compiler_type=none
-fi
-])
-AC_SUBST([$1DEPMODE], [depmode=$am_cv_$1_dependencies_compiler_type])
-AM_CONDITIONAL([am__fastdep$1], [
- test "x$enable_dependency_tracking" != xno \
- && test "$am_cv_$1_dependencies_compiler_type" = gcc3])
-])
-
-
-# AM_SET_DEPDIR
-# -------------
-# Choose a directory name for dependency files.
-# This macro is AC_REQUIREd in _AM_DEPENDENCIES
-AC_DEFUN([AM_SET_DEPDIR],
-[AC_REQUIRE([AM_SET_LEADING_DOT])dnl
-AC_SUBST([DEPDIR], ["${am__leading_dot}deps"])dnl
-])
-
-
-# AM_DEP_TRACK
-# ------------
-AC_DEFUN([AM_DEP_TRACK],
-[AC_ARG_ENABLE(dependency-tracking,
-[ --disable-dependency-tracking speeds up one-time build
- --enable-dependency-tracking do not reject slow dependency extractors])
-if test "x$enable_dependency_tracking" != xno; then
- am_depcomp="$ac_aux_dir/depcomp"
- AMDEPBACKSLASH='\'
-fi
-AM_CONDITIONAL([AMDEP], [test "x$enable_dependency_tracking" != xno])
-AC_SUBST([AMDEPBACKSLASH])
-])
-
-# Generate code to set up dependency tracking. -*- Autoconf -*-
-
-# Copyright (C) 1999, 2000, 2001, 2002, 2003, 2004, 2005
-# Free Software Foundation, Inc.
-#
-# This file is free software; the Free Software Foundation
-# gives unlimited permission to copy and/or distribute it,
-# with or without modifications, as long as this notice is preserved.
-
-#serial 3
-
-# _AM_OUTPUT_DEPENDENCY_COMMANDS
-# ------------------------------
-AC_DEFUN([_AM_OUTPUT_DEPENDENCY_COMMANDS],
-[for mf in $CONFIG_FILES; do
- # Strip MF so we end up with the name of the file.
- mf=`echo "$mf" | sed -e 's/:.*$//'`
- # Check whether this is an Automake generated Makefile or not.
- # We used to match only the files named `Makefile.in', but
- # some people rename them; so instead we look at the file content.
- # Grep'ing the first line is not enough: some people post-process
- # each Makefile.in and add a new line on top of each file to say so.
- # So let's grep whole file.
- if grep '^#.*generated by automake' $mf > /dev/null 2>&1; then
- dirpart=`AS_DIRNAME("$mf")`
- else
- continue
- fi
- # Extract the definition of DEPDIR, am__include, and am__quote
- # from the Makefile without running `make'.
- DEPDIR=`sed -n 's/^DEPDIR = //p' < "$mf"`
- test -z "$DEPDIR" && continue
- am__include=`sed -n 's/^am__include = //p' < "$mf"`
- test -z "am__include" && continue
- am__quote=`sed -n 's/^am__quote = //p' < "$mf"`
- # When using ansi2knr, U may be empty or an underscore; expand it
- U=`sed -n 's/^U = //p' < "$mf"`
- # Find all dependency output files, they are included files with
- # $(DEPDIR) in their names. We invoke sed twice because it is the
- # simplest approach to changing $(DEPDIR) to its actual value in the
- # expansion.
- for file in `sed -n "
- s/^$am__include $am__quote\(.*(DEPDIR).*\)$am__quote"'$/\1/p' <"$mf" | \
- sed -e 's/\$(DEPDIR)/'"$DEPDIR"'/g' -e 's/\$U/'"$U"'/g'`; do
- # Make sure the directory exists.
- test -f "$dirpart/$file" && continue
- fdir=`AS_DIRNAME(["$file"])`
- AS_MKDIR_P([$dirpart/$fdir])
- # echo "creating $dirpart/$file"
- echo '# dummy' > "$dirpart/$file"
- done
-done
-])# _AM_OUTPUT_DEPENDENCY_COMMANDS
-
-
-# AM_OUTPUT_DEPENDENCY_COMMANDS
-# -----------------------------
-# This macro should only be invoked once -- use via AC_REQUIRE.
-#
-# This code is only required when automatic dependency tracking
-# is enabled. FIXME. This creates each `.P' file that we will
-# need in order to bootstrap the dependency handling code.
-AC_DEFUN([AM_OUTPUT_DEPENDENCY_COMMANDS],
-[AC_CONFIG_COMMANDS([depfiles],
- [test x"$AMDEP_TRUE" != x"" || _AM_OUTPUT_DEPENDENCY_COMMANDS],
- [AMDEP_TRUE="$AMDEP_TRUE" ac_aux_dir="$ac_aux_dir"])
-])
-
-# Copyright (C) 1996, 1997, 2000, 2001, 2003, 2005
-# Free Software Foundation, Inc.
-#
-# This file is free software; the Free Software Foundation
-# gives unlimited permission to copy and/or distribute it,
-# with or without modifications, as long as this notice is preserved.
-
-# serial 8
-
-# AM_CONFIG_HEADER is obsolete. It has been replaced by AC_CONFIG_HEADERS.
-AU_DEFUN([AM_CONFIG_HEADER], [AC_CONFIG_HEADERS($@)])
-
-# Do all the work for Automake. -*- Autoconf -*-
-
-# Copyright (C) 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004, 2005
-# Free Software Foundation, Inc.
-#
-# This file is free software; the Free Software Foundation
-# gives unlimited permission to copy and/or distribute it,
-# with or without modifications, as long as this notice is preserved.
-
-# serial 12
-
-# This macro actually does too much. Some checks are only needed if
-# your package does certain things. But this isn't really a big deal.
-
-# AM_INIT_AUTOMAKE(PACKAGE, VERSION, [NO-DEFINE])
-# AM_INIT_AUTOMAKE([OPTIONS])
-# -----------------------------------------------
-# The call with PACKAGE and VERSION arguments is the old style
-# call (pre autoconf-2.50), which is being phased out. PACKAGE
-# and VERSION should now be passed to AC_INIT and removed from
-# the call to AM_INIT_AUTOMAKE.
-# We support both call styles for the transition. After
-# the next Automake release, Autoconf can make the AC_INIT
-# arguments mandatory, and then we can depend on a new Autoconf
-# release and drop the old call support.
-AC_DEFUN([AM_INIT_AUTOMAKE],
-[AC_PREREQ([2.58])dnl
-dnl Autoconf wants to disallow AM_ names. We explicitly allow
-dnl the ones we care about.
-m4_pattern_allow([^AM_[A-Z]+FLAGS$])dnl
-AC_REQUIRE([AM_SET_CURRENT_AUTOMAKE_VERSION])dnl
-AC_REQUIRE([AC_PROG_INSTALL])dnl
-# test to see if srcdir already configured
-if test "`cd $srcdir && pwd`" != "`pwd`" &&
- test -f $srcdir/config.status; then
- AC_MSG_ERROR([source directory already configured; run "make distclean" there first])
-fi
-
-# test whether we have cygpath
-if test -z "$CYGPATH_W"; then
- if (cygpath --version) >/dev/null 2>/dev/null; then
- CYGPATH_W='cygpath -w'
- else
- CYGPATH_W=echo
- fi
-fi
-AC_SUBST([CYGPATH_W])
-
-# Define the identity of the package.
-dnl Distinguish between old-style and new-style calls.
-m4_ifval([$2],
-[m4_ifval([$3], [_AM_SET_OPTION([no-define])])dnl
- AC_SUBST([PACKAGE], [$1])dnl
- AC_SUBST([VERSION], [$2])],
-[_AM_SET_OPTIONS([$1])dnl
- AC_SUBST([PACKAGE], ['AC_PACKAGE_TARNAME'])dnl
- AC_SUBST([VERSION], ['AC_PACKAGE_VERSION'])])dnl
-
-_AM_IF_OPTION([no-define],,
-[AC_DEFINE_UNQUOTED(PACKAGE, "$PACKAGE", [Name of package])
- AC_DEFINE_UNQUOTED(VERSION, "$VERSION", [Version number of package])])dnl
-
-# Some tools Automake needs.
-AC_REQUIRE([AM_SANITY_CHECK])dnl
-AC_REQUIRE([AC_ARG_PROGRAM])dnl
-AM_MISSING_PROG(ACLOCAL, aclocal-${am__api_version})
-AM_MISSING_PROG(AUTOCONF, autoconf)
-AM_MISSING_PROG(AUTOMAKE, automake-${am__api_version})
-AM_MISSING_PROG(AUTOHEADER, autoheader)
-AM_MISSING_PROG(MAKEINFO, makeinfo)
-AM_PROG_INSTALL_SH
-AM_PROG_INSTALL_STRIP
-AC_REQUIRE([AM_PROG_MKDIR_P])dnl
-# We need awk for the "check" target. The system "awk" is bad on
-# some platforms.
-AC_REQUIRE([AC_PROG_AWK])dnl
-AC_REQUIRE([AC_PROG_MAKE_SET])dnl
-AC_REQUIRE([AM_SET_LEADING_DOT])dnl
-_AM_IF_OPTION([tar-ustar], [_AM_PROG_TAR([ustar])],
- [_AM_IF_OPTION([tar-pax], [_AM_PROG_TAR([pax])],
- [_AM_PROG_TAR([v7])])])
-_AM_IF_OPTION([no-dependencies],,
-[AC_PROVIDE_IFELSE([AC_PROG_CC],
- [_AM_DEPENDENCIES(CC)],
- [define([AC_PROG_CC],
- defn([AC_PROG_CC])[_AM_DEPENDENCIES(CC)])])dnl
-AC_PROVIDE_IFELSE([AC_PROG_CXX],
- [_AM_DEPENDENCIES(CXX)],
- [define([AC_PROG_CXX],
- defn([AC_PROG_CXX])[_AM_DEPENDENCIES(CXX)])])dnl
-])
-])
-
-
-# When config.status generates a header, we must update the stamp-h file.
-# This file resides in the same directory as the config header
-# that is generated. The stamp files are numbered to have different names.
-
-# Autoconf calls _AC_AM_CONFIG_HEADER_HOOK (when defined) in the
-# loop where config.status creates the headers, so we can generate
-# our stamp files there.
-AC_DEFUN([_AC_AM_CONFIG_HEADER_HOOK],
-[# Compute $1's index in $config_headers.
-_am_stamp_count=1
-for _am_header in $config_headers :; do
- case $_am_header in
- $1 | $1:* )
- break ;;
- * )
- _am_stamp_count=`expr $_am_stamp_count + 1` ;;
- esac
-done
-echo "timestamp for $1" >`AS_DIRNAME([$1])`/stamp-h[]$_am_stamp_count])
-
-# Copyright (C) 2001, 2003, 2005 Free Software Foundation, Inc.
-#
-# This file is free software; the Free Software Foundation
-# gives unlimited permission to copy and/or distribute it,
-# with or without modifications, as long as this notice is preserved.
-
-# AM_PROG_INSTALL_SH
-# ------------------
-# Define $install_sh.
-AC_DEFUN([AM_PROG_INSTALL_SH],
-[AC_REQUIRE([AM_AUX_DIR_EXPAND])dnl
-install_sh=${install_sh-"$am_aux_dir/install-sh"}
-AC_SUBST(install_sh)])
-
-# Copyright (C) 1998, 1999, 2000, 2001, 2002, 2003, 2005
-# Free Software Foundation, Inc.
-#
-# This file is free software; the Free Software Foundation
-# gives unlimited permission to copy and/or distribute it,
-# with or without modifications, as long as this notice is preserved.
-
-# serial 5
-
-# AM_PROG_LEX
-# -----------
-# Autoconf leaves LEX=: if lex or flex can't be found. Change that to a
-# "missing" invocation, for better error output.
-AC_DEFUN([AM_PROG_LEX],
-[AC_PREREQ(2.50)dnl
-AC_REQUIRE([AM_MISSING_HAS_RUN])dnl
-AC_REQUIRE([AC_PROG_LEX])dnl
-if test "$LEX" = :; then
- LEX=${am_missing_run}flex
-fi])
-
-# Add --enable-maintainer-mode option to configure. -*- Autoconf -*-
-# From Jim Meyering
-
-# Copyright (C) 1996, 1998, 2000, 2001, 2002, 2003, 2004, 2005
-# Free Software Foundation, Inc.
-#
-# This file is free software; the Free Software Foundation
-# gives unlimited permission to copy and/or distribute it,
-# with or without modifications, as long as this notice is preserved.
-
-# serial 4
-
-AC_DEFUN([AM_MAINTAINER_MODE],
-[AC_MSG_CHECKING([whether to enable maintainer-specific portions of Makefiles])
- dnl maintainer-mode is disabled by default
- AC_ARG_ENABLE(maintainer-mode,
-[ --enable-maintainer-mode enable make rules and dependencies not useful
- (and sometimes confusing) to the casual installer],
- USE_MAINTAINER_MODE=$enableval,
- USE_MAINTAINER_MODE=no)
- AC_MSG_RESULT([$USE_MAINTAINER_MODE])
- AM_CONDITIONAL(MAINTAINER_MODE, [test $USE_MAINTAINER_MODE = yes])
- MAINT=$MAINTAINER_MODE_TRUE
- AC_SUBST(MAINT)dnl
-]
-)
-
-AU_DEFUN([jm_MAINTAINER_MODE], [AM_MAINTAINER_MODE])
-
-# Check to see how 'make' treats includes. -*- Autoconf -*-
-
-# Copyright (C) 2001, 2002, 2003, 2005 Free Software Foundation, Inc.
-#
-# This file is free software; the Free Software Foundation
-# gives unlimited permission to copy and/or distribute it,
-# with or without modifications, as long as this notice is preserved.
-
-# serial 3
-
-# AM_MAKE_INCLUDE()
-# -----------------
-# Check to see how make treats includes.
-AC_DEFUN([AM_MAKE_INCLUDE],
-[am_make=${MAKE-make}
-cat > confinc << 'END'
-am__doit:
- @echo done
-.PHONY: am__doit
-END
-# If we don't find an include directive, just comment out the code.
-AC_MSG_CHECKING([for style of include used by $am_make])
-am__include="#"
-am__quote=
-_am_result=none
-# First try GNU make style include.
-echo "include confinc" > confmf
-# We grep out `Entering directory' and `Leaving directory'
-# messages which can occur if `w' ends up in MAKEFLAGS.
-# In particular we don't look at `^make:' because GNU make might
-# be invoked under some other name (usually "gmake"), in which
-# case it prints its new name instead of `make'.
-if test "`$am_make -s -f confmf 2> /dev/null | grep -v 'ing directory'`" = "done"; then
- am__include=include
- am__quote=
- _am_result=GNU
-fi
-# Now try BSD make style include.
-if test "$am__include" = "#"; then
- echo '.include "confinc"' > confmf
- if test "`$am_make -s -f confmf 2> /dev/null`" = "done"; then
- am__include=.include
- am__quote="\""
- _am_result=BSD
- fi
-fi
-AC_SUBST([am__include])
-AC_SUBST([am__quote])
-AC_MSG_RESULT([$_am_result])
-rm -f confinc confmf
-])
-
-# Fake the existence of programs that GNU maintainers use. -*- Autoconf -*-
-
-# Copyright (C) 1997, 1999, 2000, 2001, 2003, 2005
-# Free Software Foundation, Inc.
-#
-# This file is free software; the Free Software Foundation
-# gives unlimited permission to copy and/or distribute it,
-# with or without modifications, as long as this notice is preserved.
-
-# serial 4
-
-# AM_MISSING_PROG(NAME, PROGRAM)
-# ------------------------------
-AC_DEFUN([AM_MISSING_PROG],
-[AC_REQUIRE([AM_MISSING_HAS_RUN])
-$1=${$1-"${am_missing_run}$2"}
-AC_SUBST($1)])
-
-
-# AM_MISSING_HAS_RUN
-# ------------------
-# Define MISSING if not defined so far and test if it supports --run.
-# If it does, set am_missing_run to use it, otherwise, to nothing.
-AC_DEFUN([AM_MISSING_HAS_RUN],
-[AC_REQUIRE([AM_AUX_DIR_EXPAND])dnl
-test x"${MISSING+set}" = xset || MISSING="\${SHELL} $am_aux_dir/missing"
-# Use eval to expand $SHELL
-if eval "$MISSING --run true"; then
- am_missing_run="$MISSING --run "
-else
- am_missing_run=
- AC_MSG_WARN([`missing' script is too old or missing])
-fi
-])
-
-# Copyright (C) 2003, 2004, 2005 Free Software Foundation, Inc.
-#
-# This file is free software; the Free Software Foundation
-# gives unlimited permission to copy and/or distribute it,
-# with or without modifications, as long as this notice is preserved.
-
-# AM_PROG_MKDIR_P
-# ---------------
-# Check whether `mkdir -p' is supported, fallback to mkinstalldirs otherwise.
-#
-# Automake 1.8 used `mkdir -m 0755 -p --' to ensure that directories
-# created by `make install' are always world readable, even if the
-# installer happens to have an overly restrictive umask (e.g. 077).
-# This was a mistake. There are at least two reasons why we must not
-# use `-m 0755':
-# - it causes special bits like SGID to be ignored,
-# - it may be too restrictive (some setups expect 775 directories).
-#
-# Do not use -m 0755 and let people choose whatever they expect by
-# setting umask.
-#
-# We cannot accept any implementation of `mkdir' that recognizes `-p'.
-# Some implementations (such as Solaris 8's) are not thread-safe: if a
-# parallel make tries to run `mkdir -p a/b' and `mkdir -p a/c'
-# concurrently, both version can detect that a/ is missing, but only
-# one can create it and the other will error out. Consequently we
-# restrict ourselves to GNU make (using the --version option ensures
-# this.)
-AC_DEFUN([AM_PROG_MKDIR_P],
-[if mkdir -p --version . >/dev/null 2>&1 && test ! -d ./--version; then
- # We used to keeping the `.' as first argument, in order to
- # allow $(mkdir_p) to be used without argument. As in
- # $(mkdir_p) $(somedir)
- # where $(somedir) is conditionally defined. However this is wrong
- # for two reasons:
- # 1. if the package is installed by a user who cannot write `.'
- # make install will fail,
- # 2. the above comment should most certainly read
- # $(mkdir_p) $(DESTDIR)$(somedir)
- # so it does not work when $(somedir) is undefined and
- # $(DESTDIR) is not.
- # To support the latter case, we have to write
- # test -z "$(somedir)" || $(mkdir_p) $(DESTDIR)$(somedir),
- # so the `.' trick is pointless.
- mkdir_p='mkdir -p --'
-else
- # On NextStep and OpenStep, the `mkdir' command does not
- # recognize any option. It will interpret all options as
- # directories to create, and then abort because `.' already
- # exists.
- for d in ./-p ./--version;
- do
- test -d $d && rmdir $d
- done
- # $(mkinstalldirs) is defined by Automake if mkinstalldirs exists.
- if test -f "$ac_aux_dir/mkinstalldirs"; then
- mkdir_p='$(mkinstalldirs)'
- else
- mkdir_p='$(install_sh) -d'
- fi
-fi
-AC_SUBST([mkdir_p])])
-
-# Helper functions for option handling. -*- Autoconf -*-
-
-# Copyright (C) 2001, 2002, 2003, 2005 Free Software Foundation, Inc.
-#
-# This file is free software; the Free Software Foundation
-# gives unlimited permission to copy and/or distribute it,
-# with or without modifications, as long as this notice is preserved.
-
-# serial 3
-
-# _AM_MANGLE_OPTION(NAME)
-# -----------------------
-AC_DEFUN([_AM_MANGLE_OPTION],
-[[_AM_OPTION_]m4_bpatsubst($1, [[^a-zA-Z0-9_]], [_])])
-
-# _AM_SET_OPTION(NAME)
-# ------------------------------
-# Set option NAME. Presently that only means defining a flag for this option.
-AC_DEFUN([_AM_SET_OPTION],
-[m4_define(_AM_MANGLE_OPTION([$1]), 1)])
-
-# _AM_SET_OPTIONS(OPTIONS)
-# ----------------------------------
-# OPTIONS is a space-separated list of Automake options.
-AC_DEFUN([_AM_SET_OPTIONS],
-[AC_FOREACH([_AM_Option], [$1], [_AM_SET_OPTION(_AM_Option)])])
-
-# _AM_IF_OPTION(OPTION, IF-SET, [IF-NOT-SET])
-# -------------------------------------------
-# Execute IF-SET if OPTION is set, IF-NOT-SET otherwise.
-AC_DEFUN([_AM_IF_OPTION],
-[m4_ifset(_AM_MANGLE_OPTION([$1]), [$2], [$3])])
-
-# Check to make sure that the build environment is sane. -*- Autoconf -*-
-
-# Copyright (C) 1996, 1997, 2000, 2001, 2003, 2005
-# Free Software Foundation, Inc.
-#
-# This file is free software; the Free Software Foundation
-# gives unlimited permission to copy and/or distribute it,
-# with or without modifications, as long as this notice is preserved.
-
-# serial 4
-
-# AM_SANITY_CHECK
-# ---------------
-AC_DEFUN([AM_SANITY_CHECK],
-[AC_MSG_CHECKING([whether build environment is sane])
-# Just in case
-sleep 1
-echo timestamp > conftest.file
-# Do `set' in a subshell so we don't clobber the current shell's
-# arguments. Must try -L first in case configure is actually a
-# symlink; some systems play weird games with the mod time of symlinks
-# (eg FreeBSD returns the mod time of the symlink's containing
-# directory).
-if (
- set X `ls -Lt $srcdir/configure conftest.file 2> /dev/null`
- if test "$[*]" = "X"; then
- # -L didn't work.
- set X `ls -t $srcdir/configure conftest.file`
- fi
- rm -f conftest.file
- if test "$[*]" != "X $srcdir/configure conftest.file" \
- && test "$[*]" != "X conftest.file $srcdir/configure"; then
-
- # If neither matched, then we have a broken ls. This can happen
- # if, for instance, CONFIG_SHELL is bash and it inherits a
- # broken ls alias from the environment. This has actually
- # happened. Such a system could not be considered "sane".
- AC_MSG_ERROR([ls -t appears to fail. Make sure there is not a broken
-alias in your environment])
- fi
-
- test "$[2]" = conftest.file
- )
-then
- # Ok.
- :
-else
- AC_MSG_ERROR([newly created file is older than distributed files!
-Check your system clock])
-fi
-AC_MSG_RESULT(yes)])
-
-# Copyright (C) 2001, 2003, 2005 Free Software Foundation, Inc.
-#
-# This file is free software; the Free Software Foundation
-# gives unlimited permission to copy and/or distribute it,
-# with or without modifications, as long as this notice is preserved.
-
-# AM_PROG_INSTALL_STRIP
-# ---------------------
-# One issue with vendor `install' (even GNU) is that you can't
-# specify the program used to strip binaries. This is especially
-# annoying in cross-compiling environments, where the build's strip
-# is unlikely to handle the host's binaries.
-# Fortunately install-sh will honor a STRIPPROG variable, so we
-# always use install-sh in `make install-strip', and initialize
-# STRIPPROG with the value of the STRIP variable (set by the user).
-AC_DEFUN([AM_PROG_INSTALL_STRIP],
-[AC_REQUIRE([AM_PROG_INSTALL_SH])dnl
-# Installed binaries are usually stripped using `strip' when the user
-# run `make install-strip'. However `strip' might not be the right
-# tool to use in cross-compilation environments, therefore Automake
-# will honor the `STRIP' environment variable to overrule this program.
-dnl Don't test for $cross_compiling = yes, because it might be `maybe'.
-if test "$cross_compiling" != no; then
- AC_CHECK_TOOL([STRIP], [strip], :)
-fi
-INSTALL_STRIP_PROGRAM="\${SHELL} \$(install_sh) -c -s"
-AC_SUBST([INSTALL_STRIP_PROGRAM])])
-
-# Check how to create a tarball. -*- Autoconf -*-
-
-# Copyright (C) 2004, 2005 Free Software Foundation, Inc.
-#
-# This file is free software; the Free Software Foundation
-# gives unlimited permission to copy and/or distribute it,
-# with or without modifications, as long as this notice is preserved.
-
-# serial 2
-
-# _AM_PROG_TAR(FORMAT)
-# --------------------
-# Check how to create a tarball in format FORMAT.
-# FORMAT should be one of `v7', `ustar', or `pax'.
-#
-# Substitute a variable $(am__tar) that is a command
-# writing to stdout a FORMAT-tarball containing the directory
-# $tardir.
-# tardir=directory && $(am__tar) > result.tar
-#
-# Substitute a variable $(am__untar) that extract such
-# a tarball read from stdin.
-# $(am__untar) < result.tar
-AC_DEFUN([_AM_PROG_TAR],
-[# Always define AMTAR for backward compatibility.
-AM_MISSING_PROG([AMTAR], [tar])
-m4_if([$1], [v7],
- [am__tar='${AMTAR} chof - "$$tardir"'; am__untar='${AMTAR} xf -'],
- [m4_case([$1], [ustar],, [pax],,
- [m4_fatal([Unknown tar format])])
-AC_MSG_CHECKING([how to create a $1 tar archive])
-# Loop over all known methods to create a tar archive until one works.
-_am_tools='gnutar m4_if([$1], [ustar], [plaintar]) pax cpio none'
-_am_tools=${am_cv_prog_tar_$1-$_am_tools}
-# Do not fold the above two line into one, because Tru64 sh and
-# Solaris sh will not grok spaces in the rhs of `-'.
-for _am_tool in $_am_tools
-do
- case $_am_tool in
- gnutar)
- for _am_tar in tar gnutar gtar;
- do
- AM_RUN_LOG([$_am_tar --version]) && break
- done
- am__tar="$_am_tar --format=m4_if([$1], [pax], [posix], [$1]) -chf - "'"$$tardir"'
- am__tar_="$_am_tar --format=m4_if([$1], [pax], [posix], [$1]) -chf - "'"$tardir"'
- am__untar="$_am_tar -xf -"
- ;;
- plaintar)
- # Must skip GNU tar: if it does not support --format= it doesn't create
- # ustar tarball either.
- (tar --version) >/dev/null 2>&1 && continue
- am__tar='tar chf - "$$tardir"'
- am__tar_='tar chf - "$tardir"'
- am__untar='tar xf -'
- ;;
- pax)
- am__tar='pax -L -x $1 -w "$$tardir"'
- am__tar_='pax -L -x $1 -w "$tardir"'
- am__untar='pax -r'
- ;;
- cpio)
- am__tar='find "$$tardir" -print | cpio -o -H $1 -L'
- am__tar_='find "$tardir" -print | cpio -o -H $1 -L'
- am__untar='cpio -i -H $1 -d'
- ;;
- none)
- am__tar=false
- am__tar_=false
- am__untar=false
- ;;
- esac
-
- # If the value was cached, stop now. We just wanted to have am__tar
- # and am__untar set.
- test -n "${am_cv_prog_tar_$1}" && break
-
- # tar/untar a dummy directory, and stop if the command works
- rm -rf conftest.dir
- mkdir conftest.dir
- echo GrepMe > conftest.dir/file
- AM_RUN_LOG([tardir=conftest.dir && eval $am__tar_ >conftest.tar])
- rm -rf conftest.dir
- if test -s conftest.tar; then
- AM_RUN_LOG([$am__untar <conftest.tar])
- grep GrepMe conftest.dir/file >/dev/null 2>&1 && break
- fi
-done
-rm -rf conftest.dir
-
-AC_CACHE_VAL([am_cv_prog_tar_$1], [am_cv_prog_tar_$1=$_am_tool])
-AC_MSG_RESULT([$am_cv_prog_tar_$1])])
-AC_SUBST([am__tar])
-AC_SUBST([am__untar])
-]) # _AM_PROG_TAR
-
-m4_include([../bfd/acinclude.m4])
-m4_include([../bfd/warning.m4])
-m4_include([../config/depstand.m4])
-m4_include([../config/gettext-sister.m4])
-m4_include([../config/lead-dot.m4])
-m4_include([../config/nls.m4])
-m4_include([../config/po.m4])
-m4_include([../config/progtest.m4])
-m4_include([../libtool.m4])
-m4_include([../ltoptions.m4])
-m4_include([../ltsugar.m4])
-m4_include([../ltversion.m4])
diff --git a/contrib/binutils/ld/config.in b/contrib/binutils/ld/config.in
deleted file mode 100644
index cae19e76240a..000000000000
--- a/contrib/binutils/ld/config.in
+++ /dev/null
@@ -1,138 +0,0 @@
-/* config.in. Generated from configure.in by autoheader. */
-
-/* Define to 1 if translation of program messages to the user's native
- language is requested. */
-#undef ENABLE_NLS
-
-/* Additional extension a shared object might have. */
-#undef EXTRA_SHLIB_EXTENSION
-
-/* Define to 1 if you have the declaration of `environ', and to 0 if you
- don't. */
-#undef HAVE_DECL_ENVIRON
-
-/* Define to 1 if you have the declaration of `free', and to 0 if you don't.
- */
-#undef HAVE_DECL_FREE
-
-/* Define to 1 if you have the declaration of `getenv', and to 0 if you don't.
- */
-#undef HAVE_DECL_GETENV
-
-/* Is the prototype for getopt in <unistd.h> in the expected format? */
-#undef HAVE_DECL_GETOPT
-
-/* Define to 1 if you have the declaration of `sbrk', and to 0 if you don't.
- */
-#undef HAVE_DECL_SBRK
-
-/* Define to 1 if you have the declaration of `strstr', and to 0 if you don't.
- */
-#undef HAVE_DECL_STRSTR
-
-/* Define to 1 if you have the <dirent.h> header file, and it defines `DIR'.
- */
-#undef HAVE_DIRENT_H
-
-/* Define to 1 if you have the <dlfcn.h> header file. */
-#undef HAVE_DLFCN_H
-
-/* Define to 1 if you have the <elf-hints.h> header file. */
-#undef HAVE_ELF_HINTS_H
-
-/* Define to 1 if you have the `glob' function. */
-#undef HAVE_GLOB
-
-/* Define to 1 if you have the <inttypes.h> header file. */
-#undef HAVE_INTTYPES_H
-
-/* Define to 1 if you have the <limits.h> header file. */
-#undef HAVE_LIMITS_H
-
-/* Define to 1 if you have the <memory.h> header file. */
-#undef HAVE_MEMORY_H
-
-/* Define to 1 if you have the `mkstemp' function. */
-#undef HAVE_MKSTEMP
-
-/* Define to 1 if you have the <ndir.h> header file, and it defines `DIR'. */
-#undef HAVE_NDIR_H
-
-/* Define to 1 if you have the `realpath' function. */
-#undef HAVE_REALPATH
-
-/* Define to 1 if you have the `sbrk' function. */
-#undef HAVE_SBRK
-
-/* Define to 1 if you have the <stdint.h> header file. */
-#undef HAVE_STDINT_H
-
-/* Define to 1 if you have the <stdlib.h> header file. */
-#undef HAVE_STDLIB_H
-
-/* Define to 1 if you have the <strings.h> header file. */
-#undef HAVE_STRINGS_H
-
-/* Define to 1 if you have the <string.h> header file. */
-#undef HAVE_STRING_H
-
-/* Define to 1 if you have the <sys/dir.h> header file, and it defines `DIR'.
- */
-#undef HAVE_SYS_DIR_H
-
-/* Define to 1 if you have the <sys/ndir.h> header file, and it defines `DIR'.
- */
-#undef HAVE_SYS_NDIR_H
-
-/* Define to 1 if you have the <sys/param.h> header file. */
-#undef HAVE_SYS_PARAM_H
-
-/* Define to 1 if you have the <sys/stat.h> header file. */
-#undef HAVE_SYS_STAT_H
-
-/* Define to 1 if you have the <sys/types.h> header file. */
-#undef HAVE_SYS_TYPES_H
-
-/* Define to 1 if you have the <unistd.h> header file. */
-#undef HAVE_UNISTD_H
-
-/* Define to 1 if you have the `waitpid' function. */
-#undef HAVE_WAITPID
-
-/* Define to the sub-directory in which libtool stores uninstalled libraries.
- */
-#undef LT_OBJDIR
-
-/* Name of package */
-#undef PACKAGE
-
-/* Define to the address where bug reports for this package should be sent. */
-#undef PACKAGE_BUGREPORT
-
-/* Define to the full name of this package. */
-#undef PACKAGE_NAME
-
-/* Define to the full name and version of this package. */
-#undef PACKAGE_STRING
-
-/* Define to the one symbol short name of this package. */
-#undef PACKAGE_TARNAME
-
-/* Define to the version of this package. */
-#undef PACKAGE_VERSION
-
-/* The size of a `long', as computed by sizeof. */
-#undef SIZEOF_LONG
-
-/* Define to 1 if you have the ANSI C header files. */
-#undef STDC_HEADERS
-
-/* Use b modifier when opening binary files? */
-#undef USE_BINARY_FOPEN
-
-/* Version number of package */
-#undef VERSION
-
-/* Define to 1 if `lex' declares `yytext' as a `char *' by default, not a
- `char[]'. */
-#undef YYTEXT_POINTER
diff --git a/contrib/binutils/ld/configdoc.texi b/contrib/binutils/ld/configdoc.texi
deleted file mode 100644
index 03ab5583bdab..000000000000
--- a/contrib/binutils/ld/configdoc.texi
+++ /dev/null
@@ -1,25 +0,0 @@
-@c ------------------------------ CONFIGURATION VARS:
-@c 1. Inclusiveness of this manual
-@set GENERIC
-
-@c 2. Specific target machines
-@set ARM
-@set H8300
-@set HPPA
-@set I960
-@set M68HC11
-@set MMIX
-@set MSP430
-@set POWERPC
-@set POWERPC64
-@set Renesas
-@set SPU
-@set TICOFF
-@set WIN32
-@set XTENSA
-
-@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 b31790503b3e..000000000000
--- a/contrib/binutils/ld/configure
+++ /dev/null
@@ -1,15241 +0,0 @@
-#! /bin/sh
-# Guess values for system-dependent variables and create Makefiles.
-# Generated by GNU Autoconf 2.59.
-#
-# Copyright (C) 2003 Free Software Foundation, Inc.
-# This configure script is free software; the Free Software Foundation
-# gives unlimited permission to copy, distribute and modify it.
-## --------------------- ##
-## M4sh Initialization. ##
-## --------------------- ##
-
-# Be Bourne compatible
-if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then
- emulate sh
- NULLCMD=:
- # Zsh 3.x and 4.x performs word splitting on ${1+"$@"}, which
- # is contrary to our usage. Disable this feature.
- alias -g '${1+"$@"}'='"$@"'
-elif test -n "${BASH_VERSION+set}" && (set -o posix) >/dev/null 2>&1; then
- set -o posix
-fi
-DUALCASE=1; export DUALCASE # for MKS sh
-
-# Support unset when possible.
-if ( (MAIL=60; unset MAIL) || exit) >/dev/null 2>&1; then
- as_unset=unset
-else
- as_unset=false
-fi
-
-
-# Work around bugs in pre-3.0 UWIN ksh.
-$as_unset ENV MAIL MAILPATH
-PS1='$ '
-PS2='> '
-PS4='+ '
-
-# NLS nuisances.
-for as_var in \
- LANG LANGUAGE LC_ADDRESS LC_ALL LC_COLLATE LC_CTYPE LC_IDENTIFICATION \
- LC_MEASUREMENT LC_MESSAGES LC_MONETARY LC_NAME LC_NUMERIC LC_PAPER \
- LC_TELEPHONE LC_TIME
-do
- if (set +x; test -z "`(eval $as_var=C; export $as_var) 2>&1`"); then
- eval $as_var=C; export $as_var
- else
- $as_unset $as_var
- fi
-done
-
-# Required to use basename.
-if expr a : '\(a\)' >/dev/null 2>&1; then
- as_expr=expr
-else
- as_expr=false
-fi
-
-if (basename /) >/dev/null 2>&1 && test "X`basename / 2>&1`" = "X/"; then
- as_basename=basename
-else
- as_basename=false
-fi
-
-
-# Name of the executable.
-as_me=`$as_basename "$0" ||
-$as_expr X/"$0" : '.*/\([^/][^/]*\)/*$' \| \
- X"$0" : 'X\(//\)$' \| \
- X"$0" : 'X\(/\)$' \| \
- . : '\(.\)' 2>/dev/null ||
-echo X/"$0" |
- sed '/^.*\/\([^/][^/]*\)\/*$/{ s//\1/; q; }
- /^X\/\(\/\/\)$/{ s//\1/; q; }
- /^X\/\(\/\).*/{ s//\1/; q; }
- s/.*/./; q'`
-
-
-# PATH needs CR, and LINENO needs CR and PATH.
-# Avoid depending upon Character Ranges.
-as_cr_letters='abcdefghijklmnopqrstuvwxyz'
-as_cr_LETTERS='ABCDEFGHIJKLMNOPQRSTUVWXYZ'
-as_cr_Letters=$as_cr_letters$as_cr_LETTERS
-as_cr_digits='0123456789'
-as_cr_alnum=$as_cr_Letters$as_cr_digits
-
-# The user is always right.
-if test "${PATH_SEPARATOR+set}" != set; then
- echo "#! /bin/sh" >conf$$.sh
- echo "exit 0" >>conf$$.sh
- chmod +x conf$$.sh
- if (PATH="/nonexistent;."; conf$$.sh) >/dev/null 2>&1; then
- PATH_SEPARATOR=';'
- else
- PATH_SEPARATOR=:
- fi
- rm -f conf$$.sh
-fi
-
-
- as_lineno_1=$LINENO
- as_lineno_2=$LINENO
- as_lineno_3=`(expr $as_lineno_1 + 1) 2>/dev/null`
- test "x$as_lineno_1" != "x$as_lineno_2" &&
- test "x$as_lineno_3" = "x$as_lineno_2" || {
- # Find who we are. Look in the path if we contain no path at all
- # relative or not.
- case $0 in
- *[\\/]* ) as_myself=$0 ;;
- *) as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
-for as_dir in $PATH
-do
- IFS=$as_save_IFS
- test -z "$as_dir" && as_dir=.
- test -r "$as_dir/$0" && as_myself=$as_dir/$0 && break
-done
-
- ;;
- esac
- # We did not find ourselves, most probably we were run as `sh COMMAND'
- # in which case we are not to be found in the path.
- if test "x$as_myself" = x; then
- as_myself=$0
- fi
- if test ! -f "$as_myself"; then
- { echo "$as_me: error: cannot find myself; rerun with an absolute path" >&2
- { (exit 1); exit 1; }; }
- fi
- case $CONFIG_SHELL in
- '')
- as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
-for as_dir in /bin$PATH_SEPARATOR/usr/bin$PATH_SEPARATOR$PATH
-do
- IFS=$as_save_IFS
- test -z "$as_dir" && as_dir=.
- for as_base in sh bash ksh sh5; do
- case $as_dir in
- /*)
- if ("$as_dir/$as_base" -c '
- as_lineno_1=$LINENO
- as_lineno_2=$LINENO
- as_lineno_3=`(expr $as_lineno_1 + 1) 2>/dev/null`
- test "x$as_lineno_1" != "x$as_lineno_2" &&
- test "x$as_lineno_3" = "x$as_lineno_2" ') 2>/dev/null; then
- $as_unset BASH_ENV || test "${BASH_ENV+set}" != set || { BASH_ENV=; export BASH_ENV; }
- $as_unset ENV || test "${ENV+set}" != set || { ENV=; export ENV; }
- CONFIG_SHELL=$as_dir/$as_base
- export CONFIG_SHELL
- exec "$CONFIG_SHELL" "$0" ${1+"$@"}
- fi;;
- esac
- done
-done
-;;
- esac
-
- # Create $as_me.lineno as a copy of $as_myself, but with $LINENO
- # uniformly replaced by the line number. The first 'sed' inserts a
- # line-number line before each line; the second 'sed' does the real
- # work. The second script uses 'N' to pair each line-number line
- # with the numbered line, and appends trailing '-' during
- # substitution so that $LINENO is not a special case at line end.
- # (Raja R Harinath suggested sed '=', and Paul Eggert wrote the
- # second 'sed' script. Blame Lee E. McMahon for sed's syntax. :-)
- sed '=' <$as_myself |
- sed '
- N
- s,$,-,
- : loop
- s,^\(['$as_cr_digits']*\)\(.*\)[$]LINENO\([^'$as_cr_alnum'_]\),\1\2\1\3,
- t loop
- s,-$,,
- s,^['$as_cr_digits']*\n,,
- ' >$as_me.lineno &&
- chmod +x $as_me.lineno ||
- { echo "$as_me: error: cannot create $as_me.lineno; rerun with a POSIX shell" >&2
- { (exit 1); exit 1; }; }
-
- # Don't try to exec as it changes $[0], causing all sort of problems
- # (the dirname of $[0] is not the place where we might find the
- # original and so on. Autoconf is especially sensible to this).
- . ./$as_me.lineno
- # Exit status is that of the last command.
- exit
-}
-
-
-case `echo "testing\c"; echo 1,2,3`,`echo -n testing; echo 1,2,3` in
- *c*,-n*) ECHO_N= ECHO_C='
-' ECHO_T=' ' ;;
- *c*,* ) ECHO_N=-n ECHO_C= ECHO_T= ;;
- *) ECHO_N= ECHO_C='\c' ECHO_T= ;;
-esac
-
-if expr a : '\(a\)' >/dev/null 2>&1; then
- as_expr=expr
-else
- as_expr=false
-fi
-
-rm -f conf$$ conf$$.exe conf$$.file
-echo >conf$$.file
-if ln -s conf$$.file conf$$ 2>/dev/null; then
- # We could just check for DJGPP; but this test a) works b) is more generic
- # and c) will remain valid once DJGPP supports symlinks (DJGPP 2.04).
- if test -f conf$$.exe; then
- # Don't use ln at all; we don't have any links
- as_ln_s='cp -p'
- else
- as_ln_s='ln -s'
- fi
-elif ln conf$$.file conf$$ 2>/dev/null; then
- as_ln_s=ln
-else
- as_ln_s='cp -p'
-fi
-rm -f conf$$ conf$$.exe conf$$.file
-
-if mkdir -p . 2>/dev/null; then
- as_mkdir_p=:
-else
- test -d ./-p && rmdir ./-p
- as_mkdir_p=false
-fi
-
-as_executable_p="test -f"
-
-# Sed expression to map a string onto a valid CPP name.
-as_tr_cpp="eval sed 'y%*$as_cr_letters%P$as_cr_LETTERS%;s%[^_$as_cr_alnum]%_%g'"
-
-# Sed expression to map a string onto a valid variable name.
-as_tr_sh="eval sed 'y%*+%pp%;s%[^_$as_cr_alnum]%_%g'"
-
-
-# IFS
-# We need space, tab and new line, in precisely that order.
-as_nl='
-'
-IFS=" $as_nl"
-
-# CDPATH.
-$as_unset CDPATH
-
-
-
-# Check that we are running under the correct shell.
-SHELL=${CONFIG_SHELL-/bin/sh}
-
-case X$lt_ECHO in
-X*--fallback-echo)
- # Remove one level of quotation (which was required for Make).
- ECHO=`echo "$lt_ECHO" | sed 's,\\\\\$\\$0,'$0','`
- ;;
-esac
-
-ECHO=${lt_ECHO-echo}
-if test "X$1" = X--no-reexec; then
- # Discard the --no-reexec flag, and continue.
- shift
-elif test "X$1" = X--fallback-echo; then
- # Avoid inline document here, it may be left over
- :
-elif test "X`{ $ECHO '\t'; } 2>/dev/null`" = 'X\t' ; then
- # Yippee, $ECHO works!
- :
-else
- # Restart under the correct shell.
- exec $SHELL "$0" --no-reexec ${1+"$@"}
-fi
-
-if test "X$1" = X--fallback-echo; then
- # used as fallback echo
- shift
- cat <<_LT_EOF
-$*
-_LT_EOF
- exit 0
-fi
-
-# The HP-UX ksh and POSIX shell print the target directory to stdout
-# if CDPATH is set.
-(unset CDPATH) >/dev/null 2>&1 && unset CDPATH
-
-if test -z "$lt_ECHO"; then
- if test "X${echo_test_string+set}" != Xset; then
- # find a string as large as possible, as long as the shell can cope with it
- for cmd in 'sed 50q "$0"' 'sed 20q "$0"' 'sed 10q "$0"' 'sed 2q "$0"' 'echo test'; do
- # expected sizes: less than 2Kb, 1Kb, 512 bytes, 16 bytes, ...
- if { echo_test_string=`eval $cmd`; } 2>/dev/null &&
- { test "X$echo_test_string" = "X$echo_test_string"; } 2>/dev/null
- then
- break
- fi
- done
- fi
-
- if test "X`{ $ECHO '\t'; } 2>/dev/null`" = 'X\t' &&
- echo_testing_string=`{ $ECHO "$echo_test_string"; } 2>/dev/null` &&
- test "X$echo_testing_string" = "X$echo_test_string"; then
- :
- else
- # The Solaris, AIX, and Digital Unix default echo programs unquote
- # backslashes. This makes it impossible to quote backslashes using
- # echo "$something" | sed 's/\\/\\\\/g'
- #
- # So, first we look for a working echo in the user's PATH.
-
- lt_save_ifs="$IFS"; IFS=$PATH_SEPARATOR
- for dir in $PATH /usr/ucb; do
- IFS="$lt_save_ifs"
- if (test -f $dir/echo || test -f $dir/echo$ac_exeext) &&
- test "X`($dir/echo '\t') 2>/dev/null`" = 'X\t' &&
- echo_testing_string=`($dir/echo "$echo_test_string") 2>/dev/null` &&
- test "X$echo_testing_string" = "X$echo_test_string"; then
- ECHO="$dir/echo"
- break
- fi
- done
- IFS="$lt_save_ifs"
-
- if test "X$ECHO" = Xecho; then
- # We didn't find a better echo, so look for alternatives.
- if test "X`{ print -r '\t'; } 2>/dev/null`" = 'X\t' &&
- echo_testing_string=`{ print -r "$echo_test_string"; } 2>/dev/null` &&
- test "X$echo_testing_string" = "X$echo_test_string"; then
- # This shell has a builtin print -r that does the trick.
- ECHO='print -r'
- elif { test -f /bin/ksh || test -f /bin/ksh$ac_exeext; } &&
- test "X$CONFIG_SHELL" != X/bin/ksh; then
- # If we have ksh, try running configure again with it.
- ORIGINAL_CONFIG_SHELL=${CONFIG_SHELL-/bin/sh}
- export ORIGINAL_CONFIG_SHELL
- CONFIG_SHELL=/bin/ksh
- export CONFIG_SHELL
- exec $CONFIG_SHELL "$0" --no-reexec ${1+"$@"}
- else
- # Try using printf.
- ECHO='printf %s\n'
- if test "X`{ $ECHO '\t'; } 2>/dev/null`" = 'X\t' &&
- echo_testing_string=`{ $ECHO "$echo_test_string"; } 2>/dev/null` &&
- test "X$echo_testing_string" = "X$echo_test_string"; then
- # Cool, printf works
- :
- elif echo_testing_string=`($ORIGINAL_CONFIG_SHELL "$0" --fallback-echo '\t') 2>/dev/null` &&
- test "X$echo_testing_string" = 'X\t' &&
- echo_testing_string=`($ORIGINAL_CONFIG_SHELL "$0" --fallback-echo "$echo_test_string") 2>/dev/null` &&
- test "X$echo_testing_string" = "X$echo_test_string"; then
- CONFIG_SHELL=$ORIGINAL_CONFIG_SHELL
- export CONFIG_SHELL
- SHELL="$CONFIG_SHELL"
- export SHELL
- ECHO="$CONFIG_SHELL $0 --fallback-echo"
- elif echo_testing_string=`($CONFIG_SHELL "$0" --fallback-echo '\t') 2>/dev/null` &&
- test "X$echo_testing_string" = 'X\t' &&
- echo_testing_string=`($CONFIG_SHELL "$0" --fallback-echo "$echo_test_string") 2>/dev/null` &&
- test "X$echo_testing_string" = "X$echo_test_string"; then
- ECHO="$CONFIG_SHELL $0 --fallback-echo"
- else
- # maybe with a smaller string...
- prev=:
-
- for cmd in 'echo test' 'sed 2q "$0"' 'sed 10q "$0"' 'sed 20q "$0"' 'sed 50q "$0"'; do
- if { test "X$echo_test_string" = "X`eval $cmd`"; } 2>/dev/null
- then
- break
- fi
- prev="$cmd"
- done
-
- if test "$prev" != 'sed 50q "$0"'; then
- echo_test_string=`eval $prev`
- export echo_test_string
- exec ${ORIGINAL_CONFIG_SHELL-${CONFIG_SHELL-/bin/sh}} "$0" ${1+"$@"}
- else
- # Oops. We lost completely, so just stick with echo.
- ECHO=echo
- fi
- fi
- fi
- fi
- fi
-fi
-
-# Copy echo and quote the copy suitably for passing to libtool from
-# the Makefile, instead of quoting the original, which is used later.
-lt_ECHO=$ECHO
-if test "X$lt_ECHO" = "X$CONFIG_SHELL $0 --fallback-echo"; then
- lt_ECHO="$CONFIG_SHELL \\\$\$0 --fallback-echo"
-fi
-
-
-
-
-# Name of the host.
-# hostname on some systems (SVR3.2, Linux) returns a bogus exit status,
-# so uname gets run too.
-ac_hostname=`(hostname || uname -n) 2>/dev/null | sed 1q`
-
-exec 6>&1
-
-#
-# Initializations.
-#
-ac_default_prefix=/usr/local
-ac_config_libobj_dir=.
-cross_compiling=no
-subdirs=
-MFLAGS=
-MAKEFLAGS=
-SHELL=${CONFIG_SHELL-/bin/sh}
-
-# Maximum number of lines to put in a shell here document.
-# This variable seems obsolete. It should probably be removed, and
-# only ac_max_sed_lines should be used.
-: ${ac_max_here_lines=38}
-
-# Identity of this package.
-PACKAGE_NAME=
-PACKAGE_TARNAME=
-PACKAGE_VERSION=
-PACKAGE_STRING=
-PACKAGE_BUGREPORT=
-
-ac_unique_file="ldmain.c"
-# Factoring default headers for most tests.
-ac_includes_default="\
-#include <stdio.h>
-#if HAVE_SYS_TYPES_H
-# include <sys/types.h>
-#endif
-#if HAVE_SYS_STAT_H
-# include <sys/stat.h>
-#endif
-#if STDC_HEADERS
-# include <stdlib.h>
-# include <stddef.h>
-#else
-# if HAVE_STDLIB_H
-# include <stdlib.h>
-# endif
-#endif
-#if HAVE_STRING_H
-# if !STDC_HEADERS && HAVE_MEMORY_H
-# include <memory.h>
-# endif
-# include <string.h>
-#endif
-#if HAVE_STRINGS_H
-# include <strings.h>
-#endif
-#if HAVE_INTTYPES_H
-# include <inttypes.h>
-#else
-# if HAVE_STDINT_H
-# include <stdint.h>
-# endif
-#endif
-#if HAVE_UNISTD_H
-# include <unistd.h>
-#endif"
-
-ac_subst_vars='SHELL PATH_SEPARATOR PACKAGE_NAME PACKAGE_TARNAME PACKAGE_VERSION PACKAGE_STRING PACKAGE_BUGREPORT exec_prefix prefix program_transform_name bindir sbindir libexecdir datadir sysconfdir sharedstatedir localstatedir libdir includedir oldincludedir infodir mandir build_alias host_alias target_alias DEFS ECHO_C ECHO_N ECHO_T LIBS build build_cpu build_vendor build_os host host_cpu host_vendor host_os target target_cpu target_vendor target_os CC CFLAGS LDFLAGS CPPFLAGS ac_ct_CC EXEEXT OBJEXT INSTALL_PROGRAM INSTALL_SCRIPT INSTALL_DATA CYGPATH_W PACKAGE VERSION ACLOCAL AUTOCONF AUTOMAKE AUTOHEADER MAKEINFO install_sh STRIP ac_ct_STRIP INSTALL_STRIP_PROGRAM mkdir_p AWK SET_MAKE am__leading_dot AMTAR am__tar am__untar DEPDIR am__include am__quote AMDEP_TRUE AMDEP_FALSE AMDEPBACKSLASH CCDEPMODE am__fastdepCC_TRUE am__fastdepCC_FALSE LIBTOOL SED EGREP FGREP GREP LD DUMPBIN ac_ct_DUMPBIN NM LN_S AR ac_ct_AR RANLIB ac_ct_RANLIB lt_ECHO CPP use_sysroot TARGET_SYSTEM_ROOT TARGET_SYSTEM_ROOT_DEFINE WARN_CFLAGS NO_WERROR USE_NLS LIBINTL LIBINTL_DEP INCINTL XGETTEXT GMSGFMT POSUB CATALOGS DATADIRNAME INSTOBJEXT GENCAT CATOBJEXT MKINSTALLDIRS MSGFMT MSGMERGE YACC LEX LEXLIB LEX_OUTPUT_ROOT MAINTAINER_MODE_TRUE MAINTAINER_MODE_FALSE MAINT GENINSRC_NEVER_TRUE GENINSRC_NEVER_FALSE HDEFINES HOSTING_CRT0 HOSTING_LIBS NATIVE_LIB_DIRS STRINGIFY EMUL EMULATION_OFILES EMUL_EXTRA_OFILES LIB_PATH EMULATION_LIBPATH TESTBFDLIB datarootdir docdir htmldir LIBOBJS LTLIBOBJS'
-ac_subst_files='TDIRS'
-
-# Initialize some variables set by options.
-ac_init_help=
-ac_init_version=false
-# The variables have the same names as the options, with
-# dashes changed to underlines.
-cache_file=/dev/null
-exec_prefix=NONE
-no_create=
-no_recursion=
-prefix=NONE
-program_prefix=NONE
-program_suffix=NONE
-program_transform_name=s,x,x,
-silent=
-site=
-srcdir=
-verbose=
-x_includes=NONE
-x_libraries=NONE
-
-# Installation directory options.
-# These are left unexpanded so users can "make install exec_prefix=/foo"
-# and all the variables that are supposed to be based on exec_prefix
-# by default will actually change.
-# Use braces instead of parens because sh, perl, etc. also accept them.
-bindir='${exec_prefix}/bin'
-sbindir='${exec_prefix}/sbin'
-libexecdir='${exec_prefix}/libexec'
-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'
-
-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
-
- ac_optarg=`expr "x$ac_option" : 'x[^=]*=\(.*\)'`
-
- # 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_alias ;;
- -build=* | --build=* | --buil=* | --bui=* | --bu=*)
- build_alias=$ac_optarg ;;
-
- -cache-file | --cache-file | --cache-fil | --cache-fi \
- | --cache-f | --cache- | --cache | --cach | --cac | --ca | --c)
- ac_prev=cache_file ;;
- -cache-file=* | --cache-file=* | --cache-fil=* | --cache-fi=* \
- | --cache-f=* | --cache-=* | --cache=* | --cach=* | --cac=* | --ca=* | --c=*)
- cache_file=$ac_optarg ;;
-
- --config-cache | -C)
- cache_file=config.cache ;;
-
- -datadir | --datadir | --datadi | --datad | --data | --dat | --da)
- ac_prev=datadir ;;
- -datadir=* | --datadir=* | --datadi=* | --datad=* | --data=* | --dat=* \
- | --da=*)
- datadir=$ac_optarg ;;
-
- -disable-* | --disable-*)
- ac_feature=`expr "x$ac_option" : 'x-*disable-\(.*\)'`
- # Reject names that are not valid shell variable names.
- expr "x$ac_feature" : ".*[^-_$as_cr_alnum]" >/dev/null &&
- { echo "$as_me: error: invalid feature name: $ac_feature" >&2
- { (exit 1); exit 1; }; }
- ac_feature=`echo $ac_feature | sed 's/-/_/g'`
- eval "enable_$ac_feature=no" ;;
-
- -enable-* | --enable-*)
- ac_feature=`expr "x$ac_option" : 'x-*enable-\([^=]*\)'`
- # Reject names that are not valid shell variable names.
- expr "x$ac_feature" : ".*[^-_$as_cr_alnum]" >/dev/null &&
- { echo "$as_me: error: invalid feature name: $ac_feature" >&2
- { (exit 1); exit 1; }; }
- ac_feature=`echo $ac_feature | sed 's/-/_/g'`
- case $ac_option in
- *=*) ac_optarg=`echo "$ac_optarg" | sed "s/'/'\\\\\\\\''/g"`;;
- *) ac_optarg=yes ;;
- esac
- eval "enable_$ac_feature='$ac_optarg'" ;;
-
- -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 | -h)
- ac_init_help=long ;;
- -help=r* | --help=r* | --hel=r* | --he=r* | -hr*)
- ac_init_help=recursive ;;
- -help=s* | --help=s* | --hel=s* | --he=s* | -hs*)
- ac_init_help=short ;;
-
- -host | --host | --hos | --ho)
- ac_prev=host_alias ;;
- -host=* | --host=* | --hos=* | --ho=*)
- host_alias=$ac_optarg ;;
-
- -includedir | --includedir | --includedi | --included | --include \
- | --includ | --inclu | --incl | --inc)
- ac_prev=includedir ;;
- -includedir=* | --includedir=* | --includedi=* | --included=* | --include=* \
- | --includ=* | --inclu=* | --incl=* | --inc=*)
- includedir=$ac_optarg ;;
-
- -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 | -n)
- 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 ;;
-
- -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_alias ;;
- -target=* | --target=* | --targe=* | --targ=* | --tar=* | --ta=* | --t=*)
- target_alias=$ac_optarg ;;
-
- -v | -verbose | --verbose | --verbos | --verbo | --verb)
- verbose=yes ;;
-
- -version | --version | --versio | --versi | --vers | -V)
- ac_init_version=: ;;
-
- -with-* | --with-*)
- ac_package=`expr "x$ac_option" : 'x-*with-\([^=]*\)'`
- # Reject names that are not valid shell variable names.
- expr "x$ac_package" : ".*[^-_$as_cr_alnum]" >/dev/null &&
- { echo "$as_me: error: invalid package name: $ac_package" >&2
- { (exit 1); exit 1; }; }
- ac_package=`echo $ac_package| sed 's/-/_/g'`
- case $ac_option in
- *=*) ac_optarg=`echo "$ac_optarg" | sed "s/'/'\\\\\\\\''/g"`;;
- *) ac_optarg=yes ;;
- esac
- eval "with_$ac_package='$ac_optarg'" ;;
-
- -without-* | --without-*)
- ac_package=`expr "x$ac_option" : 'x-*without-\(.*\)'`
- # Reject names that are not valid shell variable names.
- expr "x$ac_package" : ".*[^-_$as_cr_alnum]" >/dev/null &&
- { echo "$as_me: error: invalid package name: $ac_package" >&2
- { (exit 1); exit 1; }; }
- ac_package=`echo $ac_package | sed 's/-/_/g'`
- eval "with_$ac_package=no" ;;
-
- --x)
- # Obsolete; use --with-x.
- 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 "$as_me: error: unrecognized option: $ac_option
-Try \`$0 --help' for more information." >&2
- { (exit 1); exit 1; }; }
- ;;
-
- *=*)
- ac_envvar=`expr "x$ac_option" : 'x\([^=]*\)='`
- # Reject names that are not valid shell variable names.
- expr "x$ac_envvar" : ".*[^_$as_cr_alnum]" >/dev/null &&
- { echo "$as_me: error: invalid variable name: $ac_envvar" >&2
- { (exit 1); exit 1; }; }
- ac_optarg=`echo "$ac_optarg" | sed "s/'/'\\\\\\\\''/g"`
- eval "$ac_envvar='$ac_optarg'"
- export $ac_envvar ;;
-
- *)
- # FIXME: should be removed in autoconf 3.0.
- echo "$as_me: WARNING: you should use --build, --host, --target" >&2
- expr "x$ac_option" : ".*[^-._$as_cr_alnum]" >/dev/null &&
- echo "$as_me: WARNING: invalid host type: $ac_option" >&2
- : ${build_alias=$ac_option} ${host_alias=$ac_option} ${target_alias=$ac_option}
- ;;
-
- esac
-done
-
-if test -n "$ac_prev"; then
- ac_option=--`echo $ac_prev | sed 's/_/-/g'`
- { echo "$as_me: error: missing argument to $ac_option" >&2
- { (exit 1); exit 1; }; }
-fi
-
-# Be sure to have absolute paths.
-for ac_var in exec_prefix prefix
-do
- eval ac_val=$`echo $ac_var`
- case $ac_val in
- [\\/$]* | ?:[\\/]* | NONE | '' ) ;;
- *) { echo "$as_me: error: expected an absolute directory name for --$ac_var: $ac_val" >&2
- { (exit 1); exit 1; }; };;
- esac
-done
-
-# Be sure to have absolute paths.
-for ac_var in bindir sbindir libexecdir datadir sysconfdir sharedstatedir \
- localstatedir libdir includedir oldincludedir infodir mandir
-do
- eval ac_val=$`echo $ac_var`
- case $ac_val in
- [\\/$]* | ?:[\\/]* ) ;;
- *) { echo "$as_me: error: expected an absolute directory name for --$ac_var: $ac_val" >&2
- { (exit 1); exit 1; }; };;
- esac
-done
-
-# There might be people who depend on the old broken behavior: `$host'
-# used to hold the argument of --host etc.
-# FIXME: To remove some day.
-build=$build_alias
-host=$host_alias
-target=$target_alias
-
-# FIXME: To remove some day.
-if test "x$host_alias" != x; then
- if test "x$build_alias" = x; then
- cross_compiling=maybe
- echo "$as_me: WARNING: If you wanted to set the --build type, don't use --host.
- If a cross compiler is detected then cross compile mode will be used." >&2
- elif test "x$build_alias" != "x$host_alias"; then
- cross_compiling=yes
- fi
-fi
-
-ac_tool_prefix=
-test -n "$host_alias" && ac_tool_prefix=$host_alias-
-
-test "$silent" = yes && exec 6>/dev/null
-
-
-# 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_confdir=`(dirname "$0") 2>/dev/null ||
-$as_expr X"$0" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
- X"$0" : 'X\(//\)[^/]' \| \
- X"$0" : 'X\(//\)$' \| \
- X"$0" : 'X\(/\)' \| \
- . : '\(.\)' 2>/dev/null ||
-echo X"$0" |
- sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ s//\1/; q; }
- /^X\(\/\/\)[^/].*/{ s//\1/; q; }
- /^X\(\/\/\)$/{ s//\1/; q; }
- /^X\(\/\).*/{ s//\1/; q; }
- s/.*/./; q'`
- srcdir=$ac_confdir
- if test ! -r $srcdir/$ac_unique_file; then
- srcdir=..
- fi
-else
- ac_srcdir_defaulted=no
-fi
-if test ! -r $srcdir/$ac_unique_file; then
- if test "$ac_srcdir_defaulted" = yes; then
- { echo "$as_me: error: cannot find sources ($ac_unique_file) in $ac_confdir or .." >&2
- { (exit 1); exit 1; }; }
- else
- { echo "$as_me: error: cannot find sources ($ac_unique_file) in $srcdir" >&2
- { (exit 1); exit 1; }; }
- fi
-fi
-(cd $srcdir && test -r ./$ac_unique_file) 2>/dev/null ||
- { echo "$as_me: error: sources are in $srcdir, but \`cd $srcdir' does not work" >&2
- { (exit 1); exit 1; }; }
-srcdir=`echo "$srcdir" | sed 's%\([^\\/]\)[\\/]*$%\1%'`
-ac_env_build_alias_set=${build_alias+set}
-ac_env_build_alias_value=$build_alias
-ac_cv_env_build_alias_set=${build_alias+set}
-ac_cv_env_build_alias_value=$build_alias
-ac_env_host_alias_set=${host_alias+set}
-ac_env_host_alias_value=$host_alias
-ac_cv_env_host_alias_set=${host_alias+set}
-ac_cv_env_host_alias_value=$host_alias
-ac_env_target_alias_set=${target_alias+set}
-ac_env_target_alias_value=$target_alias
-ac_cv_env_target_alias_set=${target_alias+set}
-ac_cv_env_target_alias_value=$target_alias
-ac_env_CC_set=${CC+set}
-ac_env_CC_value=$CC
-ac_cv_env_CC_set=${CC+set}
-ac_cv_env_CC_value=$CC
-ac_env_CFLAGS_set=${CFLAGS+set}
-ac_env_CFLAGS_value=$CFLAGS
-ac_cv_env_CFLAGS_set=${CFLAGS+set}
-ac_cv_env_CFLAGS_value=$CFLAGS
-ac_env_LDFLAGS_set=${LDFLAGS+set}
-ac_env_LDFLAGS_value=$LDFLAGS
-ac_cv_env_LDFLAGS_set=${LDFLAGS+set}
-ac_cv_env_LDFLAGS_value=$LDFLAGS
-ac_env_CPPFLAGS_set=${CPPFLAGS+set}
-ac_env_CPPFLAGS_value=$CPPFLAGS
-ac_cv_env_CPPFLAGS_set=${CPPFLAGS+set}
-ac_cv_env_CPPFLAGS_value=$CPPFLAGS
-ac_env_CPP_set=${CPP+set}
-ac_env_CPP_value=$CPP
-ac_cv_env_CPP_set=${CPP+set}
-ac_cv_env_CPP_value=$CPP
-
-#
-# Report the --help message.
-#
-if test "$ac_init_help" = "long"; then
- # Omit some internal or obsolete options to make the list less imposing.
- # This message is too long to be a string in the A/UX 3.1 sh.
- cat <<_ACEOF
-\`configure' configures this package to adapt to many kinds of systems.
-
-Usage: $0 [OPTION]... [VAR=VALUE]...
-
-To assign environment variables (e.g., CC, CFLAGS...), specify them as
-VAR=VALUE. See below for descriptions of some of the useful variables.
-
-Defaults for the options are specified in brackets.
-
-Configuration:
- -h, --help display this help and exit
- --help=short display options specific to this package
- --help=recursive display the short help of all the included packages
- -V, --version display version information and exit
- -q, --quiet, --silent do not print \`checking...' messages
- --cache-file=FILE cache test results in FILE [disabled]
- -C, --config-cache alias for \`--cache-file=config.cache'
- -n, --no-create do not create output files
- --srcdir=DIR find the sources in DIR [configure dir or \`..']
-
-_ACEOF
-
- cat <<_ACEOF
-Installation directories:
- --prefix=PREFIX install architecture-independent files in PREFIX
- [$ac_default_prefix]
- --exec-prefix=EPREFIX install architecture-dependent files in EPREFIX
- [PREFIX]
-
-By default, \`make install' will install all the files in
-\`$ac_default_prefix/bin', \`$ac_default_prefix/lib' etc. You can specify
-an installation prefix other than \`$ac_default_prefix' using \`--prefix',
-for instance \`--prefix=\$HOME'.
-
-For better control, use the options below.
-
-Fine tuning of the installation directories:
- --bindir=DIR user executables [EPREFIX/bin]
- --sbindir=DIR system admin executables [EPREFIX/sbin]
- --libexecdir=DIR program executables [EPREFIX/libexec]
- --datadir=DIR read-only architecture-independent data [PREFIX/share]
- --sysconfdir=DIR read-only single-machine data [PREFIX/etc]
- --sharedstatedir=DIR modifiable architecture-independent data [PREFIX/com]
- --localstatedir=DIR modifiable single-machine data [PREFIX/var]
- --libdir=DIR object code libraries [EPREFIX/lib]
- --includedir=DIR C header files [PREFIX/include]
- --oldincludedir=DIR C header files for non-gcc [/usr/include]
- --infodir=DIR info documentation [PREFIX/info]
- --mandir=DIR man documentation [PREFIX/man]
-_ACEOF
-
- cat <<\_ACEOF
-
-Program names:
- --program-prefix=PREFIX prepend PREFIX to installed program names
- --program-suffix=SUFFIX append SUFFIX to installed program names
- --program-transform-name=PROGRAM run sed PROGRAM on installed program names
-
-System types:
- --build=BUILD configure for building on BUILD [guessed]
- --host=HOST cross-compile to build programs to run on HOST [BUILD]
- --target=TARGET configure for building compilers for TARGET [HOST]
-_ACEOF
-fi
-
-if test -n "$ac_init_help"; then
-
- cat <<\_ACEOF
-
-Optional Features:
- --disable-FEATURE do not include FEATURE (same as --enable-FEATURE=no)
- --enable-FEATURE[=ARG] include FEATURE [ARG=yes]
- --disable-dependency-tracking speeds up one-time build
- --enable-dependency-tracking do not reject slow dependency extractors
- --enable-shared[=PKGS]
- build shared libraries [default=yes]
- --enable-static[=PKGS]
- build static libraries [default=yes]
- --enable-fast-install[=PKGS]
- optimize for fast installation [default=yes]
- --disable-libtool-lock avoid locking (might break parallel builds)
- --enable-targets alternative target configurations
- --enable-64-bit-bfd 64-bit support (on hosts with narrower word sizes)
- --enable-werror treat compile warnings as errors
- --enable-build-warnings enable build-time compiler warnings
- --disable-nls do not use Native Language Support
- --enable-maintainer-mode enable make rules and dependencies not useful
- (and sometimes confusing) to the casual installer
-
-Optional Packages:
- --with-PACKAGE[=ARG] use PACKAGE [ARG=yes]
- --without-PACKAGE do not use PACKAGE (same as --with-PACKAGE=no)
- --with-pic try to use only PIC/non-PIC objects [default=use
- both]
- --with-gnu-ld assume the C compiler uses GNU ld [default=no]
- --with-lib-path=dir1:dir2... set default LIB_PATH
- --with-sysroot=DIR Search for usr/lib et al within DIR.
-
-Some influential environment variables:
- CC C compiler command
- CFLAGS C compiler flags
- LDFLAGS linker flags, e.g. -L<lib dir> if you have libraries in a
- nonstandard directory <lib dir>
- CPPFLAGS C/C++ preprocessor flags, e.g. -I<include dir> if you have
- headers in a nonstandard directory <include dir>
- CPP C preprocessor
-
-Use these variables to override the choices made by `configure' or to help
-it to find libraries and programs with nonstandard names/locations.
-
-_ACEOF
-fi
-
-if test "$ac_init_help" = "recursive"; then
- # If there are subdirs, report their specific --help.
- ac_popdir=`pwd`
- for ac_dir in : $ac_subdirs_all; do test "x$ac_dir" = x: && continue
- test -d $ac_dir || continue
- ac_builddir=.
-
-if test "$ac_dir" != .; then
- ac_dir_suffix=/`echo "$ac_dir" | sed 's,^\.[\\/],,'`
- # A "../" for each directory in $ac_dir_suffix.
- ac_top_builddir=`echo "$ac_dir_suffix" | sed 's,/[^\\/]*,../,g'`
-else
- ac_dir_suffix= ac_top_builddir=
-fi
-
-case $srcdir in
- .) # No --srcdir option. We are building in place.
- ac_srcdir=.
- if test -z "$ac_top_builddir"; then
- ac_top_srcdir=.
- else
- ac_top_srcdir=`echo $ac_top_builddir | sed 's,/$,,'`
- fi ;;
- [\\/]* | ?:[\\/]* ) # Absolute path.
- ac_srcdir=$srcdir$ac_dir_suffix;
- ac_top_srcdir=$srcdir ;;
- *) # Relative path.
- ac_srcdir=$ac_top_builddir$srcdir$ac_dir_suffix
- ac_top_srcdir=$ac_top_builddir$srcdir ;;
-esac
-
-# Do not use `cd foo && pwd` to compute absolute paths, because
-# the directories may not exist.
-case `pwd` in
-.) ac_abs_builddir="$ac_dir";;
-*)
- case "$ac_dir" in
- .) ac_abs_builddir=`pwd`;;
- [\\/]* | ?:[\\/]* ) ac_abs_builddir="$ac_dir";;
- *) ac_abs_builddir=`pwd`/"$ac_dir";;
- esac;;
-esac
-case $ac_abs_builddir in
-.) ac_abs_top_builddir=${ac_top_builddir}.;;
-*)
- case ${ac_top_builddir}. in
- .) ac_abs_top_builddir=$ac_abs_builddir;;
- [\\/]* | ?:[\\/]* ) ac_abs_top_builddir=${ac_top_builddir}.;;
- *) ac_abs_top_builddir=$ac_abs_builddir/${ac_top_builddir}.;;
- esac;;
-esac
-case $ac_abs_builddir in
-.) ac_abs_srcdir=$ac_srcdir;;
-*)
- case $ac_srcdir in
- .) ac_abs_srcdir=$ac_abs_builddir;;
- [\\/]* | ?:[\\/]* ) ac_abs_srcdir=$ac_srcdir;;
- *) ac_abs_srcdir=$ac_abs_builddir/$ac_srcdir;;
- esac;;
-esac
-case $ac_abs_builddir in
-.) ac_abs_top_srcdir=$ac_top_srcdir;;
-*)
- case $ac_top_srcdir in
- .) ac_abs_top_srcdir=$ac_abs_builddir;;
- [\\/]* | ?:[\\/]* ) ac_abs_top_srcdir=$ac_top_srcdir;;
- *) ac_abs_top_srcdir=$ac_abs_builddir/$ac_top_srcdir;;
- esac;;
-esac
-
- cd $ac_dir
- # Check for guested configure; otherwise get Cygnus style configure.
- if test -f $ac_srcdir/configure.gnu; then
- echo
- $SHELL $ac_srcdir/configure.gnu --help=recursive
- elif test -f $ac_srcdir/configure; then
- echo
- $SHELL $ac_srcdir/configure --help=recursive
- elif test -f $ac_srcdir/configure.ac ||
- test -f $ac_srcdir/configure.in; then
- echo
- $ac_configure --help
- else
- echo "$as_me: WARNING: no configuration information is in $ac_dir" >&2
- fi
- cd $ac_popdir
- done
-fi
-
-test -n "$ac_init_help" && exit 0
-if $ac_init_version; then
- cat <<\_ACEOF
-
-Copyright (C) 2003 Free Software Foundation, Inc.
-This configure script is free software; the Free Software Foundation
-gives unlimited permission to copy, distribute and modify it.
-_ACEOF
- exit 0
-fi
-exec 5>config.log
-cat >&5 <<_ACEOF
-This file contains any messages produced by compilers while
-running configure, to aid debugging if configure makes a mistake.
-
-It was created by $as_me, which was
-generated by GNU Autoconf 2.59. Invocation command line was
-
- $ $0 $@
-
-_ACEOF
-{
-cat <<_ASUNAME
-## --------- ##
-## Platform. ##
-## --------- ##
-
-hostname = `(hostname || uname -n) 2>/dev/null | sed 1q`
-uname -m = `(uname -m) 2>/dev/null || echo unknown`
-uname -r = `(uname -r) 2>/dev/null || echo unknown`
-uname -s = `(uname -s) 2>/dev/null || echo unknown`
-uname -v = `(uname -v) 2>/dev/null || echo unknown`
-
-/usr/bin/uname -p = `(/usr/bin/uname -p) 2>/dev/null || echo unknown`
-/bin/uname -X = `(/bin/uname -X) 2>/dev/null || echo unknown`
-
-/bin/arch = `(/bin/arch) 2>/dev/null || echo unknown`
-/usr/bin/arch -k = `(/usr/bin/arch -k) 2>/dev/null || echo unknown`
-/usr/convex/getsysinfo = `(/usr/convex/getsysinfo) 2>/dev/null || echo unknown`
-hostinfo = `(hostinfo) 2>/dev/null || echo unknown`
-/bin/machine = `(/bin/machine) 2>/dev/null || echo unknown`
-/usr/bin/oslevel = `(/usr/bin/oslevel) 2>/dev/null || echo unknown`
-/bin/universe = `(/bin/universe) 2>/dev/null || echo unknown`
-
-_ASUNAME
-
-as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
-for as_dir in $PATH
-do
- IFS=$as_save_IFS
- test -z "$as_dir" && as_dir=.
- echo "PATH: $as_dir"
-done
-
-} >&5
-
-cat >&5 <<_ACEOF
-
-
-## ----------- ##
-## Core tests. ##
-## ----------- ##
-
-_ACEOF
-
-
-# Keep a trace of the command line.
-# Strip out --no-create and --no-recursion so they do not pile up.
-# Strip out --silent because we don't want to record it for future runs.
-# Also quote any args containing shell meta-characters.
-# Make two passes to allow for proper duplicate-argument suppression.
-ac_configure_args=
-ac_configure_args0=
-ac_configure_args1=
-ac_sep=
-ac_must_keep_next=false
-for ac_pass in 1 2
-do
- for ac_arg
- do
- case $ac_arg in
- -no-create | --no-c* | -n | -no-recursion | --no-r*) continue ;;
- -q | -quiet | --quiet | --quie | --qui | --qu | --q \
- | -silent | --silent | --silen | --sile | --sil)
- continue ;;
- *" "*|*" "*|*[\[\]\~\#\$\^\&\*\(\)\{\}\\\|\;\<\>\?\"\']*)
- ac_arg=`echo "$ac_arg" | sed "s/'/'\\\\\\\\''/g"` ;;
- esac
- case $ac_pass in
- 1) ac_configure_args0="$ac_configure_args0 '$ac_arg'" ;;
- 2)
- ac_configure_args1="$ac_configure_args1 '$ac_arg'"
- if test $ac_must_keep_next = true; then
- ac_must_keep_next=false # Got value, back to normal.
- else
- case $ac_arg in
- *=* | --config-cache | -C | -disable-* | --disable-* \
- | -enable-* | --enable-* | -gas | --g* | -nfp | --nf* \
- | -q | -quiet | --q* | -silent | --sil* | -v | -verb* \
- | -with-* | --with-* | -without-* | --without-* | --x)
- case "$ac_configure_args0 " in
- "$ac_configure_args1"*" '$ac_arg' "* ) continue ;;
- esac
- ;;
- -* ) ac_must_keep_next=true ;;
- esac
- fi
- ac_configure_args="$ac_configure_args$ac_sep'$ac_arg'"
- # Get rid of the leading space.
- ac_sep=" "
- ;;
- esac
- done
-done
-$as_unset ac_configure_args0 || test "${ac_configure_args0+set}" != set || { ac_configure_args0=; export ac_configure_args0; }
-$as_unset ac_configure_args1 || test "${ac_configure_args1+set}" != set || { ac_configure_args1=; export ac_configure_args1; }
-
-# When interrupted or exit'd, cleanup temporary files, and complete
-# config.log. We remove comments because anyway the quotes in there
-# would cause problems or look ugly.
-# WARNING: Be sure not to use single quotes in there, as some shells,
-# such as our DU 5.0 friend, will then `close' the trap.
-trap 'exit_status=$?
- # Save into config.log some information that might help in debugging.
- {
- echo
-
- cat <<\_ASBOX
-## ---------------- ##
-## Cache variables. ##
-## ---------------- ##
-_ASBOX
- echo
- # The following way of writing the cache mishandles newlines in values,
-{
- (set) 2>&1 |
- case `(ac_space='"'"' '"'"'; set | grep ac_space) 2>&1` in
- *ac_space=\ *)
- sed -n \
- "s/'"'"'/'"'"'\\\\'"'"''"'"'/g;
- s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1='"'"'\\2'"'"'/p"
- ;;
- *)
- sed -n \
- "s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1=\\2/p"
- ;;
- esac;
-}
- echo
-
- cat <<\_ASBOX
-## ----------------- ##
-## Output variables. ##
-## ----------------- ##
-_ASBOX
- echo
- for ac_var in $ac_subst_vars
- do
- eval ac_val=$`echo $ac_var`
- echo "$ac_var='"'"'$ac_val'"'"'"
- done | sort
- echo
-
- if test -n "$ac_subst_files"; then
- cat <<\_ASBOX
-## ------------- ##
-## Output files. ##
-## ------------- ##
-_ASBOX
- echo
- for ac_var in $ac_subst_files
- do
- eval ac_val=$`echo $ac_var`
- echo "$ac_var='"'"'$ac_val'"'"'"
- done | sort
- echo
- fi
-
- if test -s confdefs.h; then
- cat <<\_ASBOX
-## ----------- ##
-## confdefs.h. ##
-## ----------- ##
-_ASBOX
- echo
- sed "/^$/d" confdefs.h | sort
- echo
- fi
- test "$ac_signal" != 0 &&
- echo "$as_me: caught signal $ac_signal"
- echo "$as_me: exit $exit_status"
- } >&5
- rm -f core *.core &&
- rm -rf conftest* confdefs* conf$$* $ac_clean_files &&
- exit $exit_status
- ' 0
-for ac_signal in 1 2 13 15; do
- trap 'ac_signal='$ac_signal'; { (exit 1); exit 1; }' $ac_signal
-done
-ac_signal=0
-
-# confdefs.h avoids OS command line length limits that DEFS can exceed.
-rm -rf conftest* confdefs.h
-# AIX cpp loses on an empty file, so make sure it contains at least a newline.
-echo >confdefs.h
-
-# Predefined preprocessor variables.
-
-cat >>confdefs.h <<_ACEOF
-#define PACKAGE_NAME "$PACKAGE_NAME"
-_ACEOF
-
-
-cat >>confdefs.h <<_ACEOF
-#define PACKAGE_TARNAME "$PACKAGE_TARNAME"
-_ACEOF
-
-
-cat >>confdefs.h <<_ACEOF
-#define PACKAGE_VERSION "$PACKAGE_VERSION"
-_ACEOF
-
-
-cat >>confdefs.h <<_ACEOF
-#define PACKAGE_STRING "$PACKAGE_STRING"
-_ACEOF
-
-
-cat >>confdefs.h <<_ACEOF
-#define PACKAGE_BUGREPORT "$PACKAGE_BUGREPORT"
-_ACEOF
-
-
-# Let the site file select an alternate cache file if it wants to.
-# Prefer explicitly selected file to automatically selected ones.
-if test -z "$CONFIG_SITE"; then
- if test "x$prefix" != xNONE; then
- CONFIG_SITE="$prefix/share/config.site $prefix/etc/config.site"
- else
- CONFIG_SITE="$ac_default_prefix/share/config.site $ac_default_prefix/etc/config.site"
- fi
-fi
-for ac_site_file in $CONFIG_SITE; do
- if test -r "$ac_site_file"; then
- { echo "$as_me:$LINENO: loading site script $ac_site_file" >&5
-echo "$as_me: loading site script $ac_site_file" >&6;}
- sed 's/^/| /' "$ac_site_file" >&5
- . "$ac_site_file"
- fi
-done
-
-if test -r "$cache_file"; then
- # Some versions of bash will fail to source /dev/null (special
- # files actually), so we avoid doing that.
- if test -f "$cache_file"; then
- { echo "$as_me:$LINENO: loading cache $cache_file" >&5
-echo "$as_me: loading cache $cache_file" >&6;}
- case $cache_file in
- [\\/]* | ?:[\\/]* ) . $cache_file;;
- *) . ./$cache_file;;
- esac
- fi
-else
- { echo "$as_me:$LINENO: creating cache $cache_file" >&5
-echo "$as_me: creating cache $cache_file" >&6;}
- >$cache_file
-fi
-
-# Check that the precious variables saved in the cache have kept the same
-# value.
-ac_cache_corrupted=false
-for ac_var in `(set) 2>&1 |
- sed -n 's/^ac_env_\([a-zA-Z_0-9]*\)_set=.*/\1/p'`; do
- eval ac_old_set=\$ac_cv_env_${ac_var}_set
- eval ac_new_set=\$ac_env_${ac_var}_set
- eval ac_old_val="\$ac_cv_env_${ac_var}_value"
- eval ac_new_val="\$ac_env_${ac_var}_value"
- case $ac_old_set,$ac_new_set in
- set,)
- { echo "$as_me:$LINENO: error: \`$ac_var' was set to \`$ac_old_val' in the previous run" >&5
-echo "$as_me: error: \`$ac_var' was set to \`$ac_old_val' in the previous run" >&2;}
- ac_cache_corrupted=: ;;
- ,set)
- { echo "$as_me:$LINENO: error: \`$ac_var' was not set in the previous run" >&5
-echo "$as_me: error: \`$ac_var' was not set in the previous run" >&2;}
- ac_cache_corrupted=: ;;
- ,);;
- *)
- if test "x$ac_old_val" != "x$ac_new_val"; then
- { echo "$as_me:$LINENO: error: \`$ac_var' has changed since the previous run:" >&5
-echo "$as_me: error: \`$ac_var' has changed since the previous run:" >&2;}
- { echo "$as_me:$LINENO: former value: $ac_old_val" >&5
-echo "$as_me: former value: $ac_old_val" >&2;}
- { echo "$as_me:$LINENO: current value: $ac_new_val" >&5
-echo "$as_me: current value: $ac_new_val" >&2;}
- ac_cache_corrupted=:
- fi;;
- esac
- # Pass precious variables to config.status.
- if test "$ac_new_set" = set; then
- case $ac_new_val in
- *" "*|*" "*|*[\[\]\~\#\$\^\&\*\(\)\{\}\\\|\;\<\>\?\"\']*)
- ac_arg=$ac_var=`echo "$ac_new_val" | sed "s/'/'\\\\\\\\''/g"` ;;
- *) ac_arg=$ac_var=$ac_new_val ;;
- esac
- case " $ac_configure_args " in
- *" '$ac_arg' "*) ;; # Avoid dups. Use of quotes ensures accuracy.
- *) ac_configure_args="$ac_configure_args '$ac_arg'" ;;
- esac
- fi
-done
-if $ac_cache_corrupted; then
- { echo "$as_me:$LINENO: error: changes in the environment can compromise the build" >&5
-echo "$as_me: error: changes in the environment can compromise the build" >&2;}
- { { echo "$as_me:$LINENO: error: run \`make distclean' and/or \`rm $cache_file' and start over" >&5
-echo "$as_me: error: run \`make distclean' and/or \`rm $cache_file' and start over" >&2;}
- { (exit 1); exit 1; }; }
-fi
-
-ac_ext=c
-ac_cpp='$CPP $CPPFLAGS'
-ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
-ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
-ac_compiler_gnu=$ac_cv_c_compiler_gnu
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-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
- elif test -f $ac_dir/shtool; then
- ac_aux_dir=$ac_dir
- ac_install_sh="$ac_aux_dir/shtool install -c"
- break
- fi
-done
-if test -z "$ac_aux_dir"; then
- { { echo "$as_me:$LINENO: error: cannot find install-sh or install.sh in $srcdir $srcdir/.. $srcdir/../.." >&5
-echo "$as_me: error: cannot find install-sh or install.sh in $srcdir $srcdir/.. $srcdir/../.." >&2;}
- { (exit 1); exit 1; }; }
-fi
-ac_config_guess="$SHELL $ac_aux_dir/config.guess"
-ac_config_sub="$SHELL $ac_aux_dir/config.sub"
-ac_configure="$SHELL $ac_aux_dir/configure" # This should be Cygnus configure.
-
-# Make sure we can run config.sub.
-$ac_config_sub sun4 >/dev/null 2>&1 ||
- { { echo "$as_me:$LINENO: error: cannot run $ac_config_sub" >&5
-echo "$as_me: error: cannot run $ac_config_sub" >&2;}
- { (exit 1); exit 1; }; }
-
-echo "$as_me:$LINENO: checking build system type" >&5
-echo $ECHO_N "checking build system type... $ECHO_C" >&6
-if test "${ac_cv_build+set}" = set; then
- echo $ECHO_N "(cached) $ECHO_C" >&6
-else
- ac_cv_build_alias=$build_alias
-test -z "$ac_cv_build_alias" &&
- ac_cv_build_alias=`$ac_config_guess`
-test -z "$ac_cv_build_alias" &&
- { { echo "$as_me:$LINENO: error: cannot guess build type; you must specify one" >&5
-echo "$as_me: error: cannot guess build type; you must specify one" >&2;}
- { (exit 1); exit 1; }; }
-ac_cv_build=`$ac_config_sub $ac_cv_build_alias` ||
- { { echo "$as_me:$LINENO: error: $ac_config_sub $ac_cv_build_alias failed" >&5
-echo "$as_me: error: $ac_config_sub $ac_cv_build_alias failed" >&2;}
- { (exit 1); exit 1; }; }
-
-fi
-echo "$as_me:$LINENO: result: $ac_cv_build" >&5
-echo "${ECHO_T}$ac_cv_build" >&6
-build=$ac_cv_build
-build_cpu=`echo $ac_cv_build | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\1/'`
-build_vendor=`echo $ac_cv_build | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\2/'`
-build_os=`echo $ac_cv_build | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\3/'`
-
-
-echo "$as_me:$LINENO: checking host system type" >&5
-echo $ECHO_N "checking host system type... $ECHO_C" >&6
-if test "${ac_cv_host+set}" = set; then
- echo $ECHO_N "(cached) $ECHO_C" >&6
-else
- ac_cv_host_alias=$host_alias
-test -z "$ac_cv_host_alias" &&
- ac_cv_host_alias=$ac_cv_build_alias
-ac_cv_host=`$ac_config_sub $ac_cv_host_alias` ||
- { { echo "$as_me:$LINENO: error: $ac_config_sub $ac_cv_host_alias failed" >&5
-echo "$as_me: error: $ac_config_sub $ac_cv_host_alias failed" >&2;}
- { (exit 1); exit 1; }; }
-
-fi
-echo "$as_me:$LINENO: result: $ac_cv_host" >&5
-echo "${ECHO_T}$ac_cv_host" >&6
-host=$ac_cv_host
-host_cpu=`echo $ac_cv_host | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\1/'`
-host_vendor=`echo $ac_cv_host | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\2/'`
-host_os=`echo $ac_cv_host | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\3/'`
-
-
-echo "$as_me:$LINENO: checking target system type" >&5
-echo $ECHO_N "checking target system type... $ECHO_C" >&6
-if test "${ac_cv_target+set}" = set; then
- echo $ECHO_N "(cached) $ECHO_C" >&6
-else
- ac_cv_target_alias=$target_alias
-test "x$ac_cv_target_alias" = "x" &&
- ac_cv_target_alias=$ac_cv_host_alias
-ac_cv_target=`$ac_config_sub $ac_cv_target_alias` ||
- { { echo "$as_me:$LINENO: error: $ac_config_sub $ac_cv_target_alias failed" >&5
-echo "$as_me: error: $ac_config_sub $ac_cv_target_alias failed" >&2;}
- { (exit 1); exit 1; }; }
-
-fi
-echo "$as_me:$LINENO: result: $ac_cv_target" >&5
-echo "${ECHO_T}$ac_cv_target" >&6
-target=$ac_cv_target
-target_cpu=`echo $ac_cv_target | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\1/'`
-target_vendor=`echo $ac_cv_target | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\2/'`
-target_os=`echo $ac_cv_target | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\3/'`
-
-
-# The aliases save the names the user supplied, while $host etc.
-# will get canonicalized.
-test -n "$target_alias" &&
- test "$program_prefix$program_suffix$program_transform_name" = \
- NONENONEs,x,x, &&
- program_prefix=${target_alias}-
-ac_ext=c
-ac_cpp='$CPP $CPPFLAGS'
-ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
-ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
-ac_compiler_gnu=$ac_cv_c_compiler_gnu
-if test -n "$ac_tool_prefix"; then
- # Extract the first word of "${ac_tool_prefix}gcc", so it can be a program name with args.
-set dummy ${ac_tool_prefix}gcc; ac_word=$2
-echo "$as_me:$LINENO: checking for $ac_word" >&5
-echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
-if test "${ac_cv_prog_CC+set}" = set; then
- echo $ECHO_N "(cached) $ECHO_C" >&6
-else
- if test -n "$CC"; then
- ac_cv_prog_CC="$CC" # Let the user override the test.
-else
-as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
-for as_dir in $PATH
-do
- IFS=$as_save_IFS
- test -z "$as_dir" && as_dir=.
- for ac_exec_ext in '' $ac_executable_extensions; do
- if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
- ac_cv_prog_CC="${ac_tool_prefix}gcc"
- echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
- break 2
- fi
-done
-done
-
-fi
-fi
-CC=$ac_cv_prog_CC
-if test -n "$CC"; then
- echo "$as_me:$LINENO: result: $CC" >&5
-echo "${ECHO_T}$CC" >&6
-else
- echo "$as_me:$LINENO: result: no" >&5
-echo "${ECHO_T}no" >&6
-fi
-
-fi
-if test -z "$ac_cv_prog_CC"; then
- ac_ct_CC=$CC
- # Extract the first word of "gcc", so it can be a program name with args.
-set dummy gcc; ac_word=$2
-echo "$as_me:$LINENO: checking for $ac_word" >&5
-echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
-if test "${ac_cv_prog_ac_ct_CC+set}" = set; then
- echo $ECHO_N "(cached) $ECHO_C" >&6
-else
- if test -n "$ac_ct_CC"; then
- ac_cv_prog_ac_ct_CC="$ac_ct_CC" # Let the user override the test.
-else
-as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
-for as_dir in $PATH
-do
- IFS=$as_save_IFS
- test -z "$as_dir" && as_dir=.
- for ac_exec_ext in '' $ac_executable_extensions; do
- if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
- ac_cv_prog_ac_ct_CC="gcc"
- echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
- break 2
- fi
-done
-done
-
-fi
-fi
-ac_ct_CC=$ac_cv_prog_ac_ct_CC
-if test -n "$ac_ct_CC"; then
- echo "$as_me:$LINENO: result: $ac_ct_CC" >&5
-echo "${ECHO_T}$ac_ct_CC" >&6
-else
- echo "$as_me:$LINENO: result: no" >&5
-echo "${ECHO_T}no" >&6
-fi
-
- CC=$ac_ct_CC
-else
- CC="$ac_cv_prog_CC"
-fi
-
-if test -z "$CC"; then
- if test -n "$ac_tool_prefix"; then
- # Extract the first word of "${ac_tool_prefix}cc", so it can be a program name with args.
-set dummy ${ac_tool_prefix}cc; ac_word=$2
-echo "$as_me:$LINENO: checking for $ac_word" >&5
-echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
-if test "${ac_cv_prog_CC+set}" = set; then
- echo $ECHO_N "(cached) $ECHO_C" >&6
-else
- if test -n "$CC"; then
- ac_cv_prog_CC="$CC" # Let the user override the test.
-else
-as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
-for as_dir in $PATH
-do
- IFS=$as_save_IFS
- test -z "$as_dir" && as_dir=.
- for ac_exec_ext in '' $ac_executable_extensions; do
- if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
- ac_cv_prog_CC="${ac_tool_prefix}cc"
- echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
- break 2
- fi
-done
-done
-
-fi
-fi
-CC=$ac_cv_prog_CC
-if test -n "$CC"; then
- echo "$as_me:$LINENO: result: $CC" >&5
-echo "${ECHO_T}$CC" >&6
-else
- echo "$as_me:$LINENO: result: no" >&5
-echo "${ECHO_T}no" >&6
-fi
-
-fi
-if test -z "$ac_cv_prog_CC"; then
- ac_ct_CC=$CC
- # Extract the first word of "cc", so it can be a program name with args.
-set dummy cc; ac_word=$2
-echo "$as_me:$LINENO: checking for $ac_word" >&5
-echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
-if test "${ac_cv_prog_ac_ct_CC+set}" = set; then
- echo $ECHO_N "(cached) $ECHO_C" >&6
-else
- if test -n "$ac_ct_CC"; then
- ac_cv_prog_ac_ct_CC="$ac_ct_CC" # Let the user override the test.
-else
-as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
-for as_dir in $PATH
-do
- IFS=$as_save_IFS
- test -z "$as_dir" && as_dir=.
- for ac_exec_ext in '' $ac_executable_extensions; do
- if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
- ac_cv_prog_ac_ct_CC="cc"
- echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
- break 2
- fi
-done
-done
-
-fi
-fi
-ac_ct_CC=$ac_cv_prog_ac_ct_CC
-if test -n "$ac_ct_CC"; then
- echo "$as_me:$LINENO: result: $ac_ct_CC" >&5
-echo "${ECHO_T}$ac_ct_CC" >&6
-else
- echo "$as_me:$LINENO: result: no" >&5
-echo "${ECHO_T}no" >&6
-fi
-
- CC=$ac_ct_CC
-else
- CC="$ac_cv_prog_CC"
-fi
-
-fi
-if test -z "$CC"; then
- # Extract the first word of "cc", so it can be a program name with args.
-set dummy cc; ac_word=$2
-echo "$as_me:$LINENO: checking for $ac_word" >&5
-echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
-if test "${ac_cv_prog_CC+set}" = set; then
- echo $ECHO_N "(cached) $ECHO_C" >&6
-else
- if test -n "$CC"; then
- ac_cv_prog_CC="$CC" # Let the user override the test.
-else
- ac_prog_rejected=no
-as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
-for as_dir in $PATH
-do
- IFS=$as_save_IFS
- test -z "$as_dir" && as_dir=.
- for ac_exec_ext in '' $ac_executable_extensions; do
- if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
- if test "$as_dir/$ac_word$ac_exec_ext" = "/usr/ucb/cc"; then
- ac_prog_rejected=yes
- continue
- fi
- ac_cv_prog_CC="cc"
- echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
- break 2
- fi
-done
-done
-
-if test $ac_prog_rejected = yes; then
- # We found a bogon in the path, so make sure we never use it.
- set dummy $ac_cv_prog_CC
- shift
- if test $# != 0; then
- # We chose a different compiler from the bogus one.
- # However, it has the same basename, so the bogon will be chosen
- # first if we set CC to just the basename; use the full file name.
- shift
- ac_cv_prog_CC="$as_dir/$ac_word${1+' '}$@"
- fi
-fi
-fi
-fi
-CC=$ac_cv_prog_CC
-if test -n "$CC"; then
- echo "$as_me:$LINENO: result: $CC" >&5
-echo "${ECHO_T}$CC" >&6
-else
- echo "$as_me:$LINENO: result: no" >&5
-echo "${ECHO_T}no" >&6
-fi
-
-fi
-if test -z "$CC"; then
- if test -n "$ac_tool_prefix"; then
- for ac_prog in cl
- do
- # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
-set dummy $ac_tool_prefix$ac_prog; ac_word=$2
-echo "$as_me:$LINENO: checking for $ac_word" >&5
-echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
-if test "${ac_cv_prog_CC+set}" = set; then
- echo $ECHO_N "(cached) $ECHO_C" >&6
-else
- if test -n "$CC"; then
- ac_cv_prog_CC="$CC" # Let the user override the test.
-else
-as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
-for as_dir in $PATH
-do
- IFS=$as_save_IFS
- test -z "$as_dir" && as_dir=.
- for ac_exec_ext in '' $ac_executable_extensions; do
- if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
- ac_cv_prog_CC="$ac_tool_prefix$ac_prog"
- echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
- break 2
- fi
-done
-done
-
-fi
-fi
-CC=$ac_cv_prog_CC
-if test -n "$CC"; then
- echo "$as_me:$LINENO: result: $CC" >&5
-echo "${ECHO_T}$CC" >&6
-else
- echo "$as_me:$LINENO: result: no" >&5
-echo "${ECHO_T}no" >&6
-fi
-
- test -n "$CC" && break
- done
-fi
-if test -z "$CC"; then
- ac_ct_CC=$CC
- for ac_prog in cl
-do
- # Extract the first word of "$ac_prog", so it can be a program name with args.
-set dummy $ac_prog; ac_word=$2
-echo "$as_me:$LINENO: checking for $ac_word" >&5
-echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
-if test "${ac_cv_prog_ac_ct_CC+set}" = set; then
- echo $ECHO_N "(cached) $ECHO_C" >&6
-else
- if test -n "$ac_ct_CC"; then
- ac_cv_prog_ac_ct_CC="$ac_ct_CC" # Let the user override the test.
-else
-as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
-for as_dir in $PATH
-do
- IFS=$as_save_IFS
- test -z "$as_dir" && as_dir=.
- for ac_exec_ext in '' $ac_executable_extensions; do
- if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
- ac_cv_prog_ac_ct_CC="$ac_prog"
- echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
- break 2
- fi
-done
-done
-
-fi
-fi
-ac_ct_CC=$ac_cv_prog_ac_ct_CC
-if test -n "$ac_ct_CC"; then
- echo "$as_me:$LINENO: result: $ac_ct_CC" >&5
-echo "${ECHO_T}$ac_ct_CC" >&6
-else
- echo "$as_me:$LINENO: result: no" >&5
-echo "${ECHO_T}no" >&6
-fi
-
- test -n "$ac_ct_CC" && break
-done
-
- CC=$ac_ct_CC
-fi
-
-fi
-
-
-test -z "$CC" && { { echo "$as_me:$LINENO: error: no acceptable C compiler found in \$PATH
-See \`config.log' for more details." >&5
-echo "$as_me: error: no acceptable C compiler found in \$PATH
-See \`config.log' for more details." >&2;}
- { (exit 1); exit 1; }; }
-
-# Provide some information about the compiler.
-echo "$as_me:$LINENO:" \
- "checking for C compiler version" >&5
-ac_compiler=`set X $ac_compile; echo $2`
-{ (eval echo "$as_me:$LINENO: \"$ac_compiler --version </dev/null >&5\"") >&5
- (eval $ac_compiler --version </dev/null >&5) 2>&5
- ac_status=$?
- echo "$as_me:$LINENO: \$? = $ac_status" >&5
- (exit $ac_status); }
-{ (eval echo "$as_me:$LINENO: \"$ac_compiler -v </dev/null >&5\"") >&5
- (eval $ac_compiler -v </dev/null >&5) 2>&5
- ac_status=$?
- echo "$as_me:$LINENO: \$? = $ac_status" >&5
- (exit $ac_status); }
-{ (eval echo "$as_me:$LINENO: \"$ac_compiler -V </dev/null >&5\"") >&5
- (eval $ac_compiler -V </dev/null >&5) 2>&5
- ac_status=$?
- echo "$as_me:$LINENO: \$? = $ac_status" >&5
- (exit $ac_status); }
-
-cat >conftest.$ac_ext <<_ACEOF
-/* confdefs.h. */
-_ACEOF
-cat confdefs.h >>conftest.$ac_ext
-cat >>conftest.$ac_ext <<_ACEOF
-/* end confdefs.h. */
-
-int
-main ()
-{
-
- ;
- return 0;
-}
-_ACEOF
-ac_clean_files_save=$ac_clean_files
-ac_clean_files="$ac_clean_files a.out a.exe b.out"
-# Try to create an executable without -o first, disregard a.out.
-# It will help us diagnose broken compilers, and finding out an intuition
-# of exeext.
-echo "$as_me:$LINENO: checking for C compiler default output file name" >&5
-echo $ECHO_N "checking for C compiler default output file name... $ECHO_C" >&6
-ac_link_default=`echo "$ac_link" | sed 's/ -o *conftest[^ ]*//'`
-if { (eval echo "$as_me:$LINENO: \"$ac_link_default\"") >&5
- (eval $ac_link_default) 2>&5
- ac_status=$?
- echo "$as_me:$LINENO: \$? = $ac_status" >&5
- (exit $ac_status); }; then
- # Find the output, starting from the most likely. This scheme is
-# not robust to junk in `.', hence go to wildcards (a.*) only as a last
-# resort.
-
-# Be careful to initialize this variable, since it used to be cached.
-# Otherwise an old cache value of `no' led to `EXEEXT = no' in a Makefile.
-ac_cv_exeext=
-# b.out is created by i960 compilers.
-for ac_file in a_out.exe a.exe conftest.exe a.out conftest a.* conftest.* b.out
-do
- test -f "$ac_file" || continue
- case $ac_file in
- *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.o | *.obj )
- ;;
- conftest.$ac_ext )
- # This is the source file.
- ;;
- [ab].out )
- # We found the default executable, but exeext='' is most
- # certainly right.
- break;;
- *.* )
- ac_cv_exeext=`expr "$ac_file" : '[^.]*\(\..*\)'`
- # FIXME: I believe we export ac_cv_exeext for Libtool,
- # but it would be cool to find out if it's true. Does anybody
- # maintain Libtool? --akim.
- export ac_cv_exeext
- break;;
- * )
- break;;
- esac
-done
-else
- echo "$as_me: failed program was:" >&5
-sed 's/^/| /' conftest.$ac_ext >&5
-
-{ { echo "$as_me:$LINENO: error: C compiler cannot create executables
-See \`config.log' for more details." >&5
-echo "$as_me: error: C compiler cannot create executables
-See \`config.log' for more details." >&2;}
- { (exit 77); exit 77; }; }
-fi
-
-ac_exeext=$ac_cv_exeext
-echo "$as_me:$LINENO: result: $ac_file" >&5
-echo "${ECHO_T}$ac_file" >&6
-
-# Check the compiler produces executables we can run. If not, either
-# the compiler is broken, or we cross compile.
-echo "$as_me:$LINENO: checking whether the C compiler works" >&5
-echo $ECHO_N "checking whether the C compiler works... $ECHO_C" >&6
-# FIXME: These cross compiler hacks should be removed for Autoconf 3.0
-# If not cross compiling, check that we can run a simple program.
-if test "$cross_compiling" != yes; then
- if { ac_try='./$ac_file'
- { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
- (eval $ac_try) 2>&5
- ac_status=$?
- echo "$as_me:$LINENO: \$? = $ac_status" >&5
- (exit $ac_status); }; }; then
- cross_compiling=no
- else
- if test "$cross_compiling" = maybe; then
- cross_compiling=yes
- else
- { { echo "$as_me:$LINENO: error: cannot run C compiled programs.
-If you meant to cross compile, use \`--host'.
-See \`config.log' for more details." >&5
-echo "$as_me: error: cannot run C compiled programs.
-If you meant to cross compile, use \`--host'.
-See \`config.log' for more details." >&2;}
- { (exit 1); exit 1; }; }
- fi
- fi
-fi
-echo "$as_me:$LINENO: result: yes" >&5
-echo "${ECHO_T}yes" >&6
-
-rm -f a.out a.exe conftest$ac_cv_exeext b.out
-ac_clean_files=$ac_clean_files_save
-# Check the compiler produces executables we can run. If not, either
-# the compiler is broken, or we cross compile.
-echo "$as_me:$LINENO: checking whether we are cross compiling" >&5
-echo $ECHO_N "checking whether we are cross compiling... $ECHO_C" >&6
-echo "$as_me:$LINENO: result: $cross_compiling" >&5
-echo "${ECHO_T}$cross_compiling" >&6
-
-echo "$as_me:$LINENO: checking for suffix of executables" >&5
-echo $ECHO_N "checking for suffix of executables... $ECHO_C" >&6
-if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
- (eval $ac_link) 2>&5
- ac_status=$?
- echo "$as_me:$LINENO: \$? = $ac_status" >&5
- (exit $ac_status); }; then
- # If both `conftest.exe' and `conftest' are `present' (well, observable)
-# catch `conftest.exe'. For instance with Cygwin, `ls conftest' will
-# work properly (i.e., refer to `conftest.exe'), while it won't with
-# `rm'.
-for ac_file in conftest.exe conftest conftest.*; do
- test -f "$ac_file" || continue
- case $ac_file in
- *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.o | *.obj ) ;;
- *.* ) ac_cv_exeext=`expr "$ac_file" : '[^.]*\(\..*\)'`
- export ac_cv_exeext
- break;;
- * ) break;;
- esac
-done
-else
- { { echo "$as_me:$LINENO: error: cannot compute suffix of executables: cannot compile and link
-See \`config.log' for more details." >&5
-echo "$as_me: error: cannot compute suffix of executables: cannot compile and link
-See \`config.log' for more details." >&2;}
- { (exit 1); exit 1; }; }
-fi
-
-rm -f conftest$ac_cv_exeext
-echo "$as_me:$LINENO: result: $ac_cv_exeext" >&5
-echo "${ECHO_T}$ac_cv_exeext" >&6
-
-rm -f conftest.$ac_ext
-EXEEXT=$ac_cv_exeext
-ac_exeext=$EXEEXT
-echo "$as_me:$LINENO: checking for suffix of object files" >&5
-echo $ECHO_N "checking for suffix of object files... $ECHO_C" >&6
-if test "${ac_cv_objext+set}" = set; then
- echo $ECHO_N "(cached) $ECHO_C" >&6
-else
- cat >conftest.$ac_ext <<_ACEOF
-/* confdefs.h. */
-_ACEOF
-cat confdefs.h >>conftest.$ac_ext
-cat >>conftest.$ac_ext <<_ACEOF
-/* end confdefs.h. */
-
-int
-main ()
-{
-
- ;
- return 0;
-}
-_ACEOF
-rm -f conftest.o conftest.obj
-if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
- (eval $ac_compile) 2>&5
- ac_status=$?
- echo "$as_me:$LINENO: \$? = $ac_status" >&5
- (exit $ac_status); }; then
- for ac_file in `(ls conftest.o conftest.obj; ls conftest.*) 2>/dev/null`; do
- case $ac_file in
- *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg ) ;;
- *) ac_cv_objext=`expr "$ac_file" : '.*\.\(.*\)'`
- break;;
- esac
-done
-else
- echo "$as_me: failed program was:" >&5
-sed 's/^/| /' conftest.$ac_ext >&5
-
-{ { echo "$as_me:$LINENO: error: cannot compute suffix of object files: cannot compile
-See \`config.log' for more details." >&5
-echo "$as_me: error: cannot compute suffix of object files: cannot compile
-See \`config.log' for more details." >&2;}
- { (exit 1); exit 1; }; }
-fi
-
-rm -f conftest.$ac_cv_objext conftest.$ac_ext
-fi
-echo "$as_me:$LINENO: result: $ac_cv_objext" >&5
-echo "${ECHO_T}$ac_cv_objext" >&6
-OBJEXT=$ac_cv_objext
-ac_objext=$OBJEXT
-echo "$as_me:$LINENO: checking whether we are using the GNU C compiler" >&5
-echo $ECHO_N "checking whether we are using the GNU C compiler... $ECHO_C" >&6
-if test "${ac_cv_c_compiler_gnu+set}" = set; then
- echo $ECHO_N "(cached) $ECHO_C" >&6
-else
- cat >conftest.$ac_ext <<_ACEOF
-/* confdefs.h. */
-_ACEOF
-cat confdefs.h >>conftest.$ac_ext
-cat >>conftest.$ac_ext <<_ACEOF
-/* end confdefs.h. */
-
-int
-main ()
-{
-#ifndef __GNUC__
- choke me
-#endif
-
- ;
- return 0;
-}
-_ACEOF
-rm -f conftest.$ac_objext
-if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
- (eval $ac_compile) 2>conftest.er1
- ac_status=$?
- grep -v '^ *+' conftest.er1 >conftest.err
- rm -f conftest.er1
- cat conftest.err >&5
- echo "$as_me:$LINENO: \$? = $ac_status" >&5
- (exit $ac_status); } &&
- { ac_try='test -z "$ac_c_werror_flag"
- || test ! -s conftest.err'
- { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
- (eval $ac_try) 2>&5
- ac_status=$?
- echo "$as_me:$LINENO: \$? = $ac_status" >&5
- (exit $ac_status); }; } &&
- { ac_try='test -s conftest.$ac_objext'
- { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
- (eval $ac_try) 2>&5
- ac_status=$?
- echo "$as_me:$LINENO: \$? = $ac_status" >&5
- (exit $ac_status); }; }; then
- ac_compiler_gnu=yes
-else
- echo "$as_me: failed program was:" >&5
-sed 's/^/| /' conftest.$ac_ext >&5
-
-ac_compiler_gnu=no
-fi
-rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
-ac_cv_c_compiler_gnu=$ac_compiler_gnu
-
-fi
-echo "$as_me:$LINENO: result: $ac_cv_c_compiler_gnu" >&5
-echo "${ECHO_T}$ac_cv_c_compiler_gnu" >&6
-GCC=`test $ac_compiler_gnu = yes && echo yes`
-ac_test_CFLAGS=${CFLAGS+set}
-ac_save_CFLAGS=$CFLAGS
-CFLAGS="-g"
-echo "$as_me:$LINENO: checking whether $CC accepts -g" >&5
-echo $ECHO_N "checking whether $CC accepts -g... $ECHO_C" >&6
-if test "${ac_cv_prog_cc_g+set}" = set; then
- echo $ECHO_N "(cached) $ECHO_C" >&6
-else
- cat >conftest.$ac_ext <<_ACEOF
-/* confdefs.h. */
-_ACEOF
-cat confdefs.h >>conftest.$ac_ext
-cat >>conftest.$ac_ext <<_ACEOF
-/* end confdefs.h. */
-
-int
-main ()
-{
-
- ;
- return 0;
-}
-_ACEOF
-rm -f conftest.$ac_objext
-if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
- (eval $ac_compile) 2>conftest.er1
- ac_status=$?
- grep -v '^ *+' conftest.er1 >conftest.err
- rm -f conftest.er1
- cat conftest.err >&5
- echo "$as_me:$LINENO: \$? = $ac_status" >&5
- (exit $ac_status); } &&
- { ac_try='test -z "$ac_c_werror_flag"
- || test ! -s conftest.err'
- { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
- (eval $ac_try) 2>&5
- ac_status=$?
- echo "$as_me:$LINENO: \$? = $ac_status" >&5
- (exit $ac_status); }; } &&
- { ac_try='test -s conftest.$ac_objext'
- { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
- (eval $ac_try) 2>&5
- ac_status=$?
- echo "$as_me:$LINENO: \$? = $ac_status" >&5
- (exit $ac_status); }; }; then
- ac_cv_prog_cc_g=yes
-else
- echo "$as_me: failed program was:" >&5
-sed 's/^/| /' conftest.$ac_ext >&5
-
-ac_cv_prog_cc_g=no
-fi
-rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
-fi
-echo "$as_me:$LINENO: result: $ac_cv_prog_cc_g" >&5
-echo "${ECHO_T}$ac_cv_prog_cc_g" >&6
-if test "$ac_test_CFLAGS" = set; then
- CFLAGS=$ac_save_CFLAGS
-elif test $ac_cv_prog_cc_g = yes; then
- if test "$GCC" = yes; then
- CFLAGS="-g -O2"
- else
- CFLAGS="-g"
- fi
-else
- if test "$GCC" = yes; then
- CFLAGS="-O2"
- else
- CFLAGS=
- fi
-fi
-echo "$as_me:$LINENO: checking for $CC option to accept ANSI C" >&5
-echo $ECHO_N "checking for $CC option to accept ANSI C... $ECHO_C" >&6
-if test "${ac_cv_prog_cc_stdc+set}" = set; then
- echo $ECHO_N "(cached) $ECHO_C" >&6
-else
- ac_cv_prog_cc_stdc=no
-ac_save_CC=$CC
-cat >conftest.$ac_ext <<_ACEOF
-/* confdefs.h. */
-_ACEOF
-cat confdefs.h >>conftest.$ac_ext
-cat >>conftest.$ac_ext <<_ACEOF
-/* end confdefs.h. */
-#include <stdarg.h>
-#include <stdio.h>
-#include <sys/types.h>
-#include <sys/stat.h>
-/* Most of the following tests are stolen from RCS 5.7's src/conf.sh. */
-struct buf { int x; };
-FILE * (*rcsopen) (struct buf *, struct stat *, int);
-static char *e (p, i)
- char **p;
- int i;
-{
- return p[i];
-}
-static char *f (char * (*g) (char **, int), char **p, ...)
-{
- char *s;
- va_list v;
- va_start (v,p);
- s = g (p, va_arg (v,int));
- va_end (v);
- return s;
-}
-
-/* OSF 4.0 Compaq cc is some sort of almost-ANSI by default. It has
- function prototypes and stuff, but not '\xHH' hex character constants.
- These don't provoke an error unfortunately, instead are silently treated
- as 'x'. The following induces an error, until -std1 is added to get
- proper ANSI mode. Curiously '\x00'!='x' always comes out true, for an
- array size at least. It's necessary to write '\x00'==0 to get something
- that's true only with -std1. */
-int osf4_cc_array ['\x00' == 0 ? 1 : -1];
-
-int test (int i, double x);
-struct s1 {int (*f) (int a);};
-struct s2 {int (*f) (double a);};
-int pairnames (int, char **, FILE *(*)(struct buf *, struct stat *, int), int, int);
-int argc;
-char **argv;
-int
-main ()
-{
-return f (e, argv, 0) != argv[0] || f (e, argv, 1) != argv[1];
- ;
- return 0;
-}
-_ACEOF
-# Don't try gcc -ansi; that turns off useful extensions and
-# breaks some systems' header files.
-# AIX -qlanglvl=ansi
-# Ultrix and OSF/1 -std1
-# HP-UX 10.20 and later -Ae
-# HP-UX older versions -Aa -D_HPUX_SOURCE
-# SVR4 -Xc -D__EXTENSIONS__
-for ac_arg in "" -qlanglvl=ansi -std1 -Ae "-Aa -D_HPUX_SOURCE" "-Xc -D__EXTENSIONS__"
-do
- CC="$ac_save_CC $ac_arg"
- rm -f conftest.$ac_objext
-if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
- (eval $ac_compile) 2>conftest.er1
- ac_status=$?
- grep -v '^ *+' conftest.er1 >conftest.err
- rm -f conftest.er1
- cat conftest.err >&5
- echo "$as_me:$LINENO: \$? = $ac_status" >&5
- (exit $ac_status); } &&
- { ac_try='test -z "$ac_c_werror_flag"
- || test ! -s conftest.err'
- { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
- (eval $ac_try) 2>&5
- ac_status=$?
- echo "$as_me:$LINENO: \$? = $ac_status" >&5
- (exit $ac_status); }; } &&
- { ac_try='test -s conftest.$ac_objext'
- { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
- (eval $ac_try) 2>&5
- ac_status=$?
- echo "$as_me:$LINENO: \$? = $ac_status" >&5
- (exit $ac_status); }; }; then
- ac_cv_prog_cc_stdc=$ac_arg
-break
-else
- echo "$as_me: failed program was:" >&5
-sed 's/^/| /' conftest.$ac_ext >&5
-
-fi
-rm -f conftest.err conftest.$ac_objext
-done
-rm -f conftest.$ac_ext conftest.$ac_objext
-CC=$ac_save_CC
-
-fi
-
-case "x$ac_cv_prog_cc_stdc" in
- x|xno)
- echo "$as_me:$LINENO: result: none needed" >&5
-echo "${ECHO_T}none needed" >&6 ;;
- *)
- echo "$as_me:$LINENO: result: $ac_cv_prog_cc_stdc" >&5
-echo "${ECHO_T}$ac_cv_prog_cc_stdc" >&6
- CC="$CC $ac_cv_prog_cc_stdc" ;;
-esac
-
-# Some people use a C++ compiler to compile C. Since we use `exit',
-# in C++ we need to declare it. In case someone uses the same compiler
-# for both compiling C and C++ we need to have the C++ compiler decide
-# the declaration of exit, since it's the most demanding environment.
-cat >conftest.$ac_ext <<_ACEOF
-#ifndef __cplusplus
- choke me
-#endif
-_ACEOF
-rm -f conftest.$ac_objext
-if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
- (eval $ac_compile) 2>conftest.er1
- ac_status=$?
- grep -v '^ *+' conftest.er1 >conftest.err
- rm -f conftest.er1
- cat conftest.err >&5
- echo "$as_me:$LINENO: \$? = $ac_status" >&5
- (exit $ac_status); } &&
- { ac_try='test -z "$ac_c_werror_flag"
- || test ! -s conftest.err'
- { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
- (eval $ac_try) 2>&5
- ac_status=$?
- echo "$as_me:$LINENO: \$? = $ac_status" >&5
- (exit $ac_status); }; } &&
- { ac_try='test -s conftest.$ac_objext'
- { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
- (eval $ac_try) 2>&5
- ac_status=$?
- echo "$as_me:$LINENO: \$? = $ac_status" >&5
- (exit $ac_status); }; }; then
- for ac_declaration in \
- '' \
- 'extern "C" void std::exit (int) throw (); using std::exit;' \
- 'extern "C" void std::exit (int); using std::exit;' \
- 'extern "C" void exit (int) throw ();' \
- 'extern "C" void exit (int);' \
- 'void exit (int);'
-do
- cat >conftest.$ac_ext <<_ACEOF
-/* confdefs.h. */
-_ACEOF
-cat confdefs.h >>conftest.$ac_ext
-cat >>conftest.$ac_ext <<_ACEOF
-/* end confdefs.h. */
-$ac_declaration
-#include <stdlib.h>
-int
-main ()
-{
-exit (42);
- ;
- return 0;
-}
-_ACEOF
-rm -f conftest.$ac_objext
-if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
- (eval $ac_compile) 2>conftest.er1
- ac_status=$?
- grep -v '^ *+' conftest.er1 >conftest.err
- rm -f conftest.er1
- cat conftest.err >&5
- echo "$as_me:$LINENO: \$? = $ac_status" >&5
- (exit $ac_status); } &&
- { ac_try='test -z "$ac_c_werror_flag"
- || test ! -s conftest.err'
- { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
- (eval $ac_try) 2>&5
- ac_status=$?
- echo "$as_me:$LINENO: \$? = $ac_status" >&5
- (exit $ac_status); }; } &&
- { ac_try='test -s conftest.$ac_objext'
- { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
- (eval $ac_try) 2>&5
- ac_status=$?
- echo "$as_me:$LINENO: \$? = $ac_status" >&5
- (exit $ac_status); }; }; then
- :
-else
- echo "$as_me: failed program was:" >&5
-sed 's/^/| /' conftest.$ac_ext >&5
-
-continue
-fi
-rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
- cat >conftest.$ac_ext <<_ACEOF
-/* confdefs.h. */
-_ACEOF
-cat confdefs.h >>conftest.$ac_ext
-cat >>conftest.$ac_ext <<_ACEOF
-/* end confdefs.h. */
-$ac_declaration
-int
-main ()
-{
-exit (42);
- ;
- return 0;
-}
-_ACEOF
-rm -f conftest.$ac_objext
-if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
- (eval $ac_compile) 2>conftest.er1
- ac_status=$?
- grep -v '^ *+' conftest.er1 >conftest.err
- rm -f conftest.er1
- cat conftest.err >&5
- echo "$as_me:$LINENO: \$? = $ac_status" >&5
- (exit $ac_status); } &&
- { ac_try='test -z "$ac_c_werror_flag"
- || test ! -s conftest.err'
- { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
- (eval $ac_try) 2>&5
- ac_status=$?
- echo "$as_me:$LINENO: \$? = $ac_status" >&5
- (exit $ac_status); }; } &&
- { ac_try='test -s conftest.$ac_objext'
- { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
- (eval $ac_try) 2>&5
- ac_status=$?
- echo "$as_me:$LINENO: \$? = $ac_status" >&5
- (exit $ac_status); }; }; then
- break
-else
- echo "$as_me: failed program was:" >&5
-sed 's/^/| /' conftest.$ac_ext >&5
-
-fi
-rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
-done
-rm -f conftest*
-if test -n "$ac_declaration"; then
- echo '#ifdef __cplusplus' >>confdefs.h
- echo $ac_declaration >>confdefs.h
- echo '#endif' >>confdefs.h
-fi
-
-else
- echo "$as_me: failed program was:" >&5
-sed 's/^/| /' conftest.$ac_ext >&5
-
-fi
-rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
-ac_ext=c
-ac_cpp='$CPP $CPPFLAGS'
-ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
-ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
-ac_compiler_gnu=$ac_cv_c_compiler_gnu
-
-
-echo "$as_me:$LINENO: checking for library containing strerror" >&5
-echo $ECHO_N "checking for library containing strerror... $ECHO_C" >&6
-if test "${ac_cv_search_strerror+set}" = set; then
- echo $ECHO_N "(cached) $ECHO_C" >&6
-else
- ac_func_search_save_LIBS=$LIBS
-ac_cv_search_strerror=no
-cat >conftest.$ac_ext <<_ACEOF
-/* confdefs.h. */
-_ACEOF
-cat confdefs.h >>conftest.$ac_ext
-cat >>conftest.$ac_ext <<_ACEOF
-/* end confdefs.h. */
-
-/* Override any gcc2 internal prototype to avoid an error. */
-#ifdef __cplusplus
-extern "C"
-#endif
-/* We use char because int might match the return type of a gcc2
- builtin and then its argument prototype would still apply. */
-char strerror ();
-int
-main ()
-{
-strerror ();
- ;
- return 0;
-}
-_ACEOF
-rm -f conftest.$ac_objext conftest$ac_exeext
-if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
- (eval $ac_link) 2>conftest.er1
- ac_status=$?
- grep -v '^ *+' conftest.er1 >conftest.err
- rm -f conftest.er1
- cat conftest.err >&5
- echo "$as_me:$LINENO: \$? = $ac_status" >&5
- (exit $ac_status); } &&
- { ac_try='test -z "$ac_c_werror_flag"
- || test ! -s conftest.err'
- { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
- (eval $ac_try) 2>&5
- ac_status=$?
- echo "$as_me:$LINENO: \$? = $ac_status" >&5
- (exit $ac_status); }; } &&
- { ac_try='test -s conftest$ac_exeext'
- { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
- (eval $ac_try) 2>&5
- ac_status=$?
- echo "$as_me:$LINENO: \$? = $ac_status" >&5
- (exit $ac_status); }; }; then
- ac_cv_search_strerror="none required"
-else
- echo "$as_me: failed program was:" >&5
-sed 's/^/| /' conftest.$ac_ext >&5
-
-fi
-rm -f conftest.err conftest.$ac_objext \
- conftest$ac_exeext conftest.$ac_ext
-if test "$ac_cv_search_strerror" = no; then
- for ac_lib in cposix; do
- LIBS="-l$ac_lib $ac_func_search_save_LIBS"
- cat >conftest.$ac_ext <<_ACEOF
-/* confdefs.h. */
-_ACEOF
-cat confdefs.h >>conftest.$ac_ext
-cat >>conftest.$ac_ext <<_ACEOF
-/* end confdefs.h. */
-
-/* Override any gcc2 internal prototype to avoid an error. */
-#ifdef __cplusplus
-extern "C"
-#endif
-/* We use char because int might match the return type of a gcc2
- builtin and then its argument prototype would still apply. */
-char strerror ();
-int
-main ()
-{
-strerror ();
- ;
- return 0;
-}
-_ACEOF
-rm -f conftest.$ac_objext conftest$ac_exeext
-if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
- (eval $ac_link) 2>conftest.er1
- ac_status=$?
- grep -v '^ *+' conftest.er1 >conftest.err
- rm -f conftest.er1
- cat conftest.err >&5
- echo "$as_me:$LINENO: \$? = $ac_status" >&5
- (exit $ac_status); } &&
- { ac_try='test -z "$ac_c_werror_flag"
- || test ! -s conftest.err'
- { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
- (eval $ac_try) 2>&5
- ac_status=$?
- echo "$as_me:$LINENO: \$? = $ac_status" >&5
- (exit $ac_status); }; } &&
- { ac_try='test -s conftest$ac_exeext'
- { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
- (eval $ac_try) 2>&5
- ac_status=$?
- echo "$as_me:$LINENO: \$? = $ac_status" >&5
- (exit $ac_status); }; }; then
- ac_cv_search_strerror="-l$ac_lib"
-break
-else
- echo "$as_me: failed program was:" >&5
-sed 's/^/| /' conftest.$ac_ext >&5
-
-fi
-rm -f conftest.err conftest.$ac_objext \
- conftest$ac_exeext conftest.$ac_ext
- done
-fi
-LIBS=$ac_func_search_save_LIBS
-fi
-echo "$as_me:$LINENO: result: $ac_cv_search_strerror" >&5
-echo "${ECHO_T}$ac_cv_search_strerror" >&6
-if test "$ac_cv_search_strerror" != no; then
- test "$ac_cv_search_strerror" = "none required" || LIBS="$ac_cv_search_strerror $LIBS"
-
-fi
-
-
-BFD_VERSION=`sed -n -e 's/^.._INIT_AUTOMAKE.*,[ ]*\([^ ]*\)[ ]*).*/\1/p' < ${srcdir}/../bfd/configure.in`
-am__api_version="1.9"
-# Find a good install program. We prefer a C program (faster),
-# so one script is as good as another. But avoid the broken or
-# incompatible versions:
-# SysV /etc/install, /usr/sbin/install
-# SunOS /usr/etc/install
-# IRIX /sbin/install
-# AIX /bin/install
-# AmigaOS /C/install, which installs bootblocks on floppy discs
-# AIX 4 /usr/bin/installbsd, which doesn't work without a -g flag
-# AFS /usr/afsws/bin/install, which mishandles nonexistent args
-# SVR4 /usr/ucb/install, which tries to use the nonexistent group "staff"
-# OS/2's system install, which has a completely different semantic
-# ./install, which can be erroneously created by make from ./install.sh.
-echo "$as_me:$LINENO: checking for a BSD-compatible install" >&5
-echo $ECHO_N "checking for a BSD-compatible install... $ECHO_C" >&6
-if test -z "$INSTALL"; then
-if test "${ac_cv_path_install+set}" = set; then
- echo $ECHO_N "(cached) $ECHO_C" >&6
-else
- as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
-for as_dir in $PATH
-do
- IFS=$as_save_IFS
- test -z "$as_dir" && as_dir=.
- # Account for people who put trailing slashes in PATH elements.
-case $as_dir/ in
- ./ | .// | /cC/* | \
- /etc/* | /usr/sbin/* | /usr/etc/* | /sbin/* | /usr/afsws/bin/* | \
- ?:\\/os2\\/install\\/* | ?:\\/OS2\\/INSTALL\\/* | \
- /usr/ucb/* ) ;;
- *)
- # OSF1 and SCO ODT 3.0 have their own names for install.
- # Don't use installbsd from OSF since it installs stuff as root
- # by default.
- for ac_prog in ginstall scoinst install; do
- for ac_exec_ext in '' $ac_executable_extensions; do
- if $as_executable_p "$as_dir/$ac_prog$ac_exec_ext"; then
- if test $ac_prog = install &&
- grep dspmsg "$as_dir/$ac_prog$ac_exec_ext" >/dev/null 2>&1; then
- # AIX install. It has an incompatible calling convention.
- :
- elif test $ac_prog = install &&
- grep pwplus "$as_dir/$ac_prog$ac_exec_ext" >/dev/null 2>&1; then
- # program-specific install script used by HP pwplus--don't use.
- :
- else
- ac_cv_path_install="$as_dir/$ac_prog$ac_exec_ext -c"
- break 3
- fi
- fi
- done
- done
- ;;
-esac
-done
-
-
-fi
- if test "${ac_cv_path_install+set}" = set; then
- INSTALL=$ac_cv_path_install
- else
- # As a last resort, use the slow shell script. We don't cache a
- # path for INSTALL within a source directory, because that will
- # break other packages using the cache if that directory is
- # removed, or if the path is relative.
- INSTALL=$ac_install_sh
- fi
-fi
-echo "$as_me:$LINENO: result: $INSTALL" >&5
-echo "${ECHO_T}$INSTALL" >&6
-
-# Use test -z because SunOS4 sh mishandles braces in ${var-val}.
-# It thinks the first close brace ends the variable substitution.
-test -z "$INSTALL_PROGRAM" && INSTALL_PROGRAM='${INSTALL}'
-
-test -z "$INSTALL_SCRIPT" && INSTALL_SCRIPT='${INSTALL}'
-
-test -z "$INSTALL_DATA" && INSTALL_DATA='${INSTALL} -m 644'
-
-echo "$as_me:$LINENO: checking whether build environment is sane" >&5
-echo $ECHO_N "checking whether build environment is sane... $ECHO_C" >&6
-# Just in case
-sleep 1
-echo timestamp > conftest.file
-# Do `set' in a subshell so we don't clobber the current shell's
-# arguments. Must try -L first in case configure is actually a
-# symlink; some systems play weird games with the mod time of symlinks
-# (eg FreeBSD returns the mod time of the symlink's containing
-# directory).
-if (
- set X `ls -Lt $srcdir/configure conftest.file 2> /dev/null`
- if test "$*" = "X"; then
- # -L didn't work.
- set X `ls -t $srcdir/configure conftest.file`
- fi
- rm -f conftest.file
- if test "$*" != "X $srcdir/configure conftest.file" \
- && test "$*" != "X conftest.file $srcdir/configure"; then
-
- # If neither matched, then we have a broken ls. This can happen
- # if, for instance, CONFIG_SHELL is bash and it inherits a
- # broken ls alias from the environment. This has actually
- # happened. Such a system could not be considered "sane".
- { { echo "$as_me:$LINENO: error: ls -t appears to fail. Make sure there is not a broken
-alias in your environment" >&5
-echo "$as_me: error: ls -t appears to fail. Make sure there is not a broken
-alias in your environment" >&2;}
- { (exit 1); exit 1; }; }
- fi
-
- test "$2" = conftest.file
- )
-then
- # Ok.
- :
-else
- { { echo "$as_me:$LINENO: error: newly created file is older than distributed files!
-Check your system clock" >&5
-echo "$as_me: error: newly created file is older than distributed files!
-Check your system clock" >&2;}
- { (exit 1); exit 1; }; }
-fi
-echo "$as_me:$LINENO: result: yes" >&5
-echo "${ECHO_T}yes" >&6
-test "$program_prefix" != NONE &&
- program_transform_name="s,^,$program_prefix,;$program_transform_name"
-# Use a double $ so make ignores it.
-test "$program_suffix" != NONE &&
- program_transform_name="s,\$,$program_suffix,;$program_transform_name"
-# Double any \ or $. echo might interpret backslashes.
-# By default was `s,x,x', remove it if useless.
-cat <<\_ACEOF >conftest.sed
-s/[\\$]/&&/g;s/;s,x,x,$//
-_ACEOF
-program_transform_name=`echo $program_transform_name | sed -f conftest.sed`
-rm conftest.sed
-
-# expand $ac_aux_dir to an absolute path
-am_aux_dir=`cd $ac_aux_dir && pwd`
-
-test x"${MISSING+set}" = xset || MISSING="\${SHELL} $am_aux_dir/missing"
-# Use eval to expand $SHELL
-if eval "$MISSING --run true"; then
- am_missing_run="$MISSING --run "
-else
- am_missing_run=
- { echo "$as_me:$LINENO: WARNING: \`missing' script is too old or missing" >&5
-echo "$as_me: WARNING: \`missing' script is too old or missing" >&2;}
-fi
-
-if mkdir -p --version . >/dev/null 2>&1 && test ! -d ./--version; then
- # We used to keeping the `.' as first argument, in order to
- # allow $(mkdir_p) to be used without argument. As in
- # $(mkdir_p) $(somedir)
- # where $(somedir) is conditionally defined. However this is wrong
- # for two reasons:
- # 1. if the package is installed by a user who cannot write `.'
- # make install will fail,
- # 2. the above comment should most certainly read
- # $(mkdir_p) $(DESTDIR)$(somedir)
- # so it does not work when $(somedir) is undefined and
- # $(DESTDIR) is not.
- # To support the latter case, we have to write
- # test -z "$(somedir)" || $(mkdir_p) $(DESTDIR)$(somedir),
- # so the `.' trick is pointless.
- mkdir_p='mkdir -p --'
-else
- # On NextStep and OpenStep, the `mkdir' command does not
- # recognize any option. It will interpret all options as
- # directories to create, and then abort because `.' already
- # exists.
- for d in ./-p ./--version;
- do
- test -d $d && rmdir $d
- done
- # $(mkinstalldirs) is defined by Automake if mkinstalldirs exists.
- if test -f "$ac_aux_dir/mkinstalldirs"; then
- mkdir_p='$(mkinstalldirs)'
- else
- mkdir_p='$(install_sh) -d'
- fi
-fi
-
-for ac_prog in gawk mawk nawk awk
-do
- # Extract the first word of "$ac_prog", so it can be a program name with args.
-set dummy $ac_prog; ac_word=$2
-echo "$as_me:$LINENO: checking for $ac_word" >&5
-echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
-if test "${ac_cv_prog_AWK+set}" = set; then
- echo $ECHO_N "(cached) $ECHO_C" >&6
-else
- if test -n "$AWK"; then
- ac_cv_prog_AWK="$AWK" # Let the user override the test.
-else
-as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
-for as_dir in $PATH
-do
- IFS=$as_save_IFS
- test -z "$as_dir" && as_dir=.
- for ac_exec_ext in '' $ac_executable_extensions; do
- if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
- ac_cv_prog_AWK="$ac_prog"
- echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
- break 2
- fi
-done
-done
-
-fi
-fi
-AWK=$ac_cv_prog_AWK
-if test -n "$AWK"; then
- echo "$as_me:$LINENO: result: $AWK" >&5
-echo "${ECHO_T}$AWK" >&6
-else
- echo "$as_me:$LINENO: result: no" >&5
-echo "${ECHO_T}no" >&6
-fi
-
- test -n "$AWK" && break
-done
-
-echo "$as_me:$LINENO: checking whether ${MAKE-make} sets \$(MAKE)" >&5
-echo $ECHO_N "checking whether ${MAKE-make} sets \$(MAKE)... $ECHO_C" >&6
-set dummy ${MAKE-make}; ac_make=`echo "$2" | sed 'y,:./+-,___p_,'`
-if eval "test \"\${ac_cv_prog_make_${ac_make}_set+set}\" = set"; then
- echo $ECHO_N "(cached) $ECHO_C" >&6
-else
- cat >conftest.make <<\_ACEOF
-all:
- @echo 'ac_maketemp="$(MAKE)"'
-_ACEOF
-# GNU make sometimes prints "make[1]: Entering...", which would confuse us.
-eval `${MAKE-make} -f conftest.make 2>/dev/null | grep temp=`
-if test -n "$ac_maketemp"; then
- eval ac_cv_prog_make_${ac_make}_set=yes
-else
- eval ac_cv_prog_make_${ac_make}_set=no
-fi
-rm -f conftest.make
-fi
-if eval "test \"`echo '$ac_cv_prog_make_'${ac_make}_set`\" = yes"; then
- echo "$as_me:$LINENO: result: yes" >&5
-echo "${ECHO_T}yes" >&6
- SET_MAKE=
-else
- echo "$as_me:$LINENO: result: no" >&5
-echo "${ECHO_T}no" >&6
- SET_MAKE="MAKE=${MAKE-make}"
-fi
-
-rm -rf .tst 2>/dev/null
-mkdir .tst 2>/dev/null
-if test -d .tst; then
- am__leading_dot=.
-else
- am__leading_dot=_
-fi
-rmdir .tst 2>/dev/null
-
-DEPDIR="${am__leading_dot}deps"
-
- ac_config_commands="$ac_config_commands depfiles"
-
-
-am_make=${MAKE-make}
-cat > confinc << 'END'
-am__doit:
- @echo done
-.PHONY: am__doit
-END
-# If we don't find an include directive, just comment out the code.
-echo "$as_me:$LINENO: checking for style of include used by $am_make" >&5
-echo $ECHO_N "checking for style of include used by $am_make... $ECHO_C" >&6
-am__include="#"
-am__quote=
-_am_result=none
-# First try GNU make style include.
-echo "include confinc" > confmf
-# We grep out `Entering directory' and `Leaving directory'
-# messages which can occur if `w' ends up in MAKEFLAGS.
-# In particular we don't look at `^make:' because GNU make might
-# be invoked under some other name (usually "gmake"), in which
-# case it prints its new name instead of `make'.
-if test "`$am_make -s -f confmf 2> /dev/null | grep -v 'ing directory'`" = "done"; then
- am__include=include
- am__quote=
- _am_result=GNU
-fi
-# Now try BSD make style include.
-if test "$am__include" = "#"; then
- echo '.include "confinc"' > confmf
- if test "`$am_make -s -f confmf 2> /dev/null`" = "done"; then
- am__include=.include
- am__quote="\""
- _am_result=BSD
- fi
-fi
-
-
-echo "$as_me:$LINENO: result: $_am_result" >&5
-echo "${ECHO_T}$_am_result" >&6
-rm -f confinc confmf
-
-# Check whether --enable-dependency-tracking or --disable-dependency-tracking was given.
-if test "${enable_dependency_tracking+set}" = set; then
- enableval="$enable_dependency_tracking"
-
-fi;
-if test "x$enable_dependency_tracking" != xno; then
- am_depcomp="$ac_aux_dir/depcomp"
- AMDEPBACKSLASH='\'
-fi
-
-
-if test "x$enable_dependency_tracking" != xno; then
- AMDEP_TRUE=
- AMDEP_FALSE='#'
-else
- AMDEP_TRUE='#'
- AMDEP_FALSE=
-fi
-
-
-
-# test to see if srcdir already configured
-if test "`cd $srcdir && pwd`" != "`pwd`" &&
- test -f $srcdir/config.status; then
- { { echo "$as_me:$LINENO: error: source directory already configured; run \"make distclean\" there first" >&5
-echo "$as_me: error: source directory already configured; run \"make distclean\" there first" >&2;}
- { (exit 1); exit 1; }; }
-fi
-
-# test whether we have cygpath
-if test -z "$CYGPATH_W"; then
- if (cygpath --version) >/dev/null 2>/dev/null; then
- CYGPATH_W='cygpath -w'
- else
- CYGPATH_W=echo
- fi
-fi
-
-
-# Define the identity of the package.
- PACKAGE=ld
- VERSION=${BFD_VERSION}
-
-
-cat >>confdefs.h <<_ACEOF
-#define PACKAGE "$PACKAGE"
-_ACEOF
-
-
-cat >>confdefs.h <<_ACEOF
-#define VERSION "$VERSION"
-_ACEOF
-
-# Some tools Automake needs.
-
-ACLOCAL=${ACLOCAL-"${am_missing_run}aclocal-${am__api_version}"}
-
-
-AUTOCONF=${AUTOCONF-"${am_missing_run}autoconf"}
-
-
-AUTOMAKE=${AUTOMAKE-"${am_missing_run}automake-${am__api_version}"}
-
-
-AUTOHEADER=${AUTOHEADER-"${am_missing_run}autoheader"}
-
-
-MAKEINFO=${MAKEINFO-"${am_missing_run}makeinfo"}
-
-install_sh=${install_sh-"$am_aux_dir/install-sh"}
-
-# Installed binaries are usually stripped using `strip' when the user
-# run `make install-strip'. However `strip' might not be the right
-# tool to use in cross-compilation environments, therefore Automake
-# will honor the `STRIP' environment variable to overrule this program.
-if test "$cross_compiling" != no; then
- if test -n "$ac_tool_prefix"; then
- # Extract the first word of "${ac_tool_prefix}strip", so it can be a program name with args.
-set dummy ${ac_tool_prefix}strip; ac_word=$2
-echo "$as_me:$LINENO: checking for $ac_word" >&5
-echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
-if test "${ac_cv_prog_STRIP+set}" = set; then
- echo $ECHO_N "(cached) $ECHO_C" >&6
-else
- if test -n "$STRIP"; then
- ac_cv_prog_STRIP="$STRIP" # Let the user override the test.
-else
-as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
-for as_dir in $PATH
-do
- IFS=$as_save_IFS
- test -z "$as_dir" && as_dir=.
- for ac_exec_ext in '' $ac_executable_extensions; do
- if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
- ac_cv_prog_STRIP="${ac_tool_prefix}strip"
- echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
- break 2
- fi
-done
-done
-
-fi
-fi
-STRIP=$ac_cv_prog_STRIP
-if test -n "$STRIP"; then
- echo "$as_me:$LINENO: result: $STRIP" >&5
-echo "${ECHO_T}$STRIP" >&6
-else
- echo "$as_me:$LINENO: result: no" >&5
-echo "${ECHO_T}no" >&6
-fi
-
-fi
-if test -z "$ac_cv_prog_STRIP"; then
- ac_ct_STRIP=$STRIP
- # Extract the first word of "strip", so it can be a program name with args.
-set dummy strip; ac_word=$2
-echo "$as_me:$LINENO: checking for $ac_word" >&5
-echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
-if test "${ac_cv_prog_ac_ct_STRIP+set}" = set; then
- echo $ECHO_N "(cached) $ECHO_C" >&6
-else
- if test -n "$ac_ct_STRIP"; then
- ac_cv_prog_ac_ct_STRIP="$ac_ct_STRIP" # Let the user override the test.
-else
-as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
-for as_dir in $PATH
-do
- IFS=$as_save_IFS
- test -z "$as_dir" && as_dir=.
- for ac_exec_ext in '' $ac_executable_extensions; do
- if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
- ac_cv_prog_ac_ct_STRIP="strip"
- echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
- break 2
- fi
-done
-done
-
- test -z "$ac_cv_prog_ac_ct_STRIP" && ac_cv_prog_ac_ct_STRIP=":"
-fi
-fi
-ac_ct_STRIP=$ac_cv_prog_ac_ct_STRIP
-if test -n "$ac_ct_STRIP"; then
- echo "$as_me:$LINENO: result: $ac_ct_STRIP" >&5
-echo "${ECHO_T}$ac_ct_STRIP" >&6
-else
- echo "$as_me:$LINENO: result: no" >&5
-echo "${ECHO_T}no" >&6
-fi
-
- STRIP=$ac_ct_STRIP
-else
- STRIP="$ac_cv_prog_STRIP"
-fi
-
-fi
-INSTALL_STRIP_PROGRAM="\${SHELL} \$(install_sh) -c -s"
-
-# We need awk for the "check" target. The system "awk" is bad on
-# some platforms.
-# Always define AMTAR for backward compatibility.
-
-AMTAR=${AMTAR-"${am_missing_run}tar"}
-
-am__tar='${AMTAR} chof - "$$tardir"'; am__untar='${AMTAR} xf -'
-
-
-
-
-depcc="$CC" am_compiler_list=
-
-echo "$as_me:$LINENO: checking dependency style of $depcc" >&5
-echo $ECHO_N "checking dependency style of $depcc... $ECHO_C" >&6
-if test "${am_cv_CC_dependencies_compiler_type+set}" = set; then
- echo $ECHO_N "(cached) $ECHO_C" >&6
-else
- if test -z "$AMDEP_TRUE" && test -f "$am_depcomp"; then
- # We make a subdir and do the tests there. Otherwise we can end up
- # making bogus files that we don't know about and never remove. For
- # instance it was reported that on HP-UX the gcc test will end up
- # making a dummy file named `D' -- because `-MD' means `put the output
- # in D'.
- mkdir conftest.dir
- # Copy depcomp to subdir because otherwise we won't find it if we're
- # using a relative directory.
- cp "$am_depcomp" conftest.dir
- cd conftest.dir
- # We will build objects and dependencies in a subdirectory because
- # it helps to detect inapplicable dependency modes. For instance
- # both Tru64's cc and ICC support -MD to output dependencies as a
- # side effect of compilation, but ICC will put the dependencies in
- # the current directory while Tru64 will put them in the object
- # directory.
- mkdir sub
-
- am_cv_CC_dependencies_compiler_type=none
- if test "$am_compiler_list" = ""; then
- am_compiler_list=`sed -n 's/^#*\([a-zA-Z0-9]*\))$/\1/p' < ./depcomp`
- fi
- for depmode in $am_compiler_list; do
- # Setup a source with many dependencies, because some compilers
- # like to wrap large dependency lists on column 80 (with \), and
- # we should not choose a depcomp mode which is confused by this.
- #
- # We need to recreate these files for each test, as the compiler may
- # overwrite some of them when testing with obscure command lines.
- # This happens at least with the AIX C compiler.
- : > sub/conftest.c
- for i in 1 2 3 4 5 6; do
- echo '#include "conftst'$i'.h"' >> sub/conftest.c
- # Using `: > sub/conftst$i.h' creates only sub/conftst1.h with
- # Solaris 8's {/usr,}/bin/sh.
- touch sub/conftst$i.h
- done
- echo "${am__include} ${am__quote}sub/conftest.Po${am__quote}" > confmf
-
- case $depmode in
- nosideeffect)
- # after this tag, mechanisms are not by side-effect, so they'll
- # only be used when explicitly requested
- if test "x$enable_dependency_tracking" = xyes; then
- continue
- else
- break
- fi
- ;;
- none) break ;;
- esac
- # We check with `-c' and `-o' for the sake of the "dashmstdout"
- # mode. It turns out that the SunPro C++ compiler does not properly
- # handle `-M -o', and we need to detect this.
- if depmode=$depmode \
- source=sub/conftest.c object=sub/conftest.${OBJEXT-o} \
- depfile=sub/conftest.Po tmpdepfile=sub/conftest.TPo \
- $SHELL ./depcomp $depcc -c -o sub/conftest.${OBJEXT-o} sub/conftest.c \
- >/dev/null 2>conftest.err &&
- grep sub/conftst6.h sub/conftest.Po > /dev/null 2>&1 &&
- grep sub/conftest.${OBJEXT-o} sub/conftest.Po > /dev/null 2>&1 &&
- ${MAKE-make} -s -f confmf > /dev/null 2>&1; then
- # icc doesn't choke on unknown options, it will just issue warnings
- # or remarks (even with -Werror). So we grep stderr for any message
- # that says an option was ignored or not supported.
- # When given -MP, icc 7.0 and 7.1 complain thusly:
- # icc: Command line warning: ignoring option '-M'; no argument required
- # The diagnosis changed in icc 8.0:
- # icc: Command line remark: option '-MP' not supported
- if (grep 'ignoring option' conftest.err ||
- grep 'not supported' conftest.err) >/dev/null 2>&1; then :; else
- am_cv_CC_dependencies_compiler_type=$depmode
- break
- fi
- fi
- done
-
- cd ..
- rm -rf conftest.dir
-else
- am_cv_CC_dependencies_compiler_type=none
-fi
-
-fi
-echo "$as_me:$LINENO: result: $am_cv_CC_dependencies_compiler_type" >&5
-echo "${ECHO_T}$am_cv_CC_dependencies_compiler_type" >&6
-CCDEPMODE=depmode=$am_cv_CC_dependencies_compiler_type
-
-
-
-if
- test "x$enable_dependency_tracking" != xno \
- && test "$am_cv_CC_dependencies_compiler_type" = gcc3; then
- am__fastdepCC_TRUE=
- am__fastdepCC_FALSE='#'
-else
- am__fastdepCC_TRUE='#'
- am__fastdepCC_FALSE=
-fi
-
-
-
-
-
-
-macro_version='2.1a'
-macro_revision='1.2435'
-
-
-
-
-
-
-
-
-
-
-
-
-ltmain="$ac_aux_dir/ltmain.sh"
-
-# Set options
-
-enable_dlopen=no
-
-
-enable_win32_dll=no
-
-
-# Check whether --enable-shared or --disable-shared was given.
-if test "${enable_shared+set}" = set; then
- enableval="$enable_shared"
- p=${PACKAGE-default}
- case $enableval in
- yes) enable_shared=yes ;;
- no) enable_shared=no ;;
- *)
- enable_shared=no
- # Look at the argument we got. We use all the common list separators.
- lt_save_ifs="$IFS"; IFS="${IFS}$PATH_SEPARATOR,"
- for pkg in $enableval; do
- IFS="$lt_save_ifs"
- if test "X$pkg" = "X$p"; then
- enable_shared=yes
- fi
- done
- IFS="$lt_save_ifs"
- ;;
- esac
-else
- enable_shared=yes
-fi;
-
-
-
-
-
-
-
-
-# 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.
- lt_save_ifs="$IFS"; IFS="${IFS}$PATH_SEPARATOR,"
- for pkg in $enableval; do
- IFS="$lt_save_ifs"
- if test "X$pkg" = "X$p"; then
- enable_static=yes
- fi
- done
- IFS="$lt_save_ifs"
- ;;
- esac
-else
- enable_static=yes
-fi;
-
-
-
-
-
-
-
-
-
-# Check whether --with-pic or --without-pic was given.
-if test "${with_pic+set}" = set; then
- withval="$with_pic"
- pic_mode="$withval"
-else
- pic_mode=default
-fi;
-
-test -z "$pic_mode" && pic_mode=default
-
-
-
-
-
-
-
-# Check whether --enable-fast-install or --disable-fast-install was given.
-if test "${enable_fast_install+set}" = set; then
- enableval="$enable_fast_install"
- p=${PACKAGE-default}
- case $enableval in
- yes) enable_fast_install=yes ;;
- no) enable_fast_install=no ;;
- *)
- enable_fast_install=no
- # Look at the argument we got. We use all the common list separators.
- lt_save_ifs="$IFS"; IFS="${IFS}$PATH_SEPARATOR,"
- for pkg in $enableval; do
- IFS="$lt_save_ifs"
- if test "X$pkg" = "X$p"; then
- enable_fast_install=yes
- fi
- done
- IFS="$lt_save_ifs"
- ;;
- esac
-else
- enable_fast_install=yes
-fi;
-
-
-
-
-
-
-
-
-echo "$as_me:$LINENO: checking for a sed that does not truncate output" >&5
-echo $ECHO_N "checking for a sed that does not truncate output... $ECHO_C" >&6
-if test "${lt_cv_path_SED+set}" = set; then
- echo $ECHO_N "(cached) $ECHO_C" >&6
-else
- # Loop through the user's path and test for sed and gsed.
-# Then use that list of sed's as ones to test for truncation.
-as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
-for as_dir in $PATH
-do
- IFS=$as_save_IFS
- test -z "$as_dir" && as_dir=.
- for lt_ac_prog in sed gsed; do
- for ac_exec_ext in '' $ac_executable_extensions; do
- if $as_executable_p "$as_dir/$lt_ac_prog$ac_exec_ext"; then
- lt_ac_sed_list="$lt_ac_sed_list $as_dir/$lt_ac_prog$ac_exec_ext"
- fi
- done
- done
-done
-IFS=$as_save_IFS
-lt_ac_max=0
-lt_ac_count=0
-# Add /usr/xpg4/bin/sed as it is typically found on Solaris
-# along with /bin/sed that truncates output.
-for lt_ac_sed in $lt_ac_sed_list /usr/xpg4/bin/sed; do
- test ! -f $lt_ac_sed && continue
- cat /dev/null > conftest.in
- lt_ac_count=0
- echo $ECHO_N "0123456789$ECHO_C" >conftest.in
- # Check for GNU sed and select it if it is found.
- if "$lt_ac_sed" --version 2>&1 < /dev/null | grep 'GNU' > /dev/null; then
- lt_cv_path_SED=$lt_ac_sed
- break
- fi
- while true; do
- cat conftest.in conftest.in >conftest.tmp
- mv conftest.tmp conftest.in
- cp conftest.in conftest.nl
- echo >>conftest.nl
- $lt_ac_sed -e 's/a$//' < conftest.nl >conftest.out || break
- cmp -s conftest.out conftest.nl || break
- # 10000 chars as input seems more than enough
- test $lt_ac_count -gt 10 && break
- lt_ac_count=`expr $lt_ac_count + 1`
- if test $lt_ac_count -gt $lt_ac_max; then
- lt_ac_max=$lt_ac_count
- lt_cv_path_SED=$lt_ac_sed
- fi
- done
-done
-
-fi
-
-SED=$lt_cv_path_SED
-
-echo "$as_me:$LINENO: result: $SED" >&5
-echo "${ECHO_T}$SED" >&6
-
-test -z "$SED" && SED=sed
-Xsed="$SED -e 1s/^X//"
-
-
-
-
-
-
-
-
-
-
-
-echo "$as_me:$LINENO: checking for egrep" >&5
-echo $ECHO_N "checking for egrep... $ECHO_C" >&6
-if test "${ac_cv_prog_egrep+set}" = set; then
- echo $ECHO_N "(cached) $ECHO_C" >&6
-else
- if echo a | (grep -E '(a|b)') >/dev/null 2>&1
- then ac_cv_prog_egrep='grep -E'
- else ac_cv_prog_egrep='egrep'
- fi
-fi
-echo "$as_me:$LINENO: result: $ac_cv_prog_egrep" >&5
-echo "${ECHO_T}$ac_cv_prog_egrep" >&6
- EGREP=$ac_cv_prog_egrep
-
-
-echo "$as_me:$LINENO: checking for fgrep" >&5
-echo $ECHO_N "checking for fgrep... $ECHO_C" >&6
-if test "${ac_cv_prog_fgrep+set}" = set; then
- echo $ECHO_N "(cached) $ECHO_C" >&6
-else
- if echo 'ab*c' | (grep -F 'ab*c') >/dev/null 2>&1
- then ac_cv_prog_fgrep='grep -F'
- else ac_cv_prog_fgrep='fgrep'
- fi
-fi
-echo "$as_me:$LINENO: result: $ac_cv_prog_fgrep" >&5
-echo "${ECHO_T}$ac_cv_prog_fgrep" >&6
- FGREP=$ac_cv_prog_fgrep
-
-
-test -z "$GREP" && GREP=grep
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-# Check whether --with-gnu-ld or --without-gnu-ld was given.
-if test "${with_gnu_ld+set}" = set; then
- 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 "$as_me:$LINENO: checking for ld used by $CC" >&5
-echo $ECHO_N "checking for ld used by $CC... $ECHO_C" >&6
- case $host in
- *-*-mingw*)
- # gcc leaves a trailing carriage return which upsets mingw
- 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.
- [\\/]* | ?:[\\/]*)
- re_direlt='/[^/][^/]*/\.\./'
- # Canonicalize the pathname of ld
- ac_prog=`$ECHO "$ac_prog"| $SED 's%\\\\%/%g'`
- while $ECHO "$ac_prog" | $GREP "$re_direlt" > /dev/null 2>&1; do
- ac_prog=`$ECHO $ac_prog| $SED "s%$re_direlt%/%"`
- done
- test -z "$LD" && LD="$ac_prog"
- ;;
- "")
- # 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 "$as_me:$LINENO: checking for GNU ld" >&5
-echo $ECHO_N "checking for GNU ld... $ECHO_C" >&6
-else
- echo "$as_me:$LINENO: checking for non-GNU ld" >&5
-echo $ECHO_N "checking for non-GNU ld... $ECHO_C" >&6
-fi
-if test "${lt_cv_path_LD+set}" = set; then
- echo $ECHO_N "(cached) $ECHO_C" >&6
-else
- if test -z "$LD"; then
- lt_save_ifs="$IFS"; IFS=$PATH_SEPARATOR
- for ac_dir in $PATH; do
- IFS="$lt_save_ifs"
- test -z "$ac_dir" && ac_dir=.
- if test -f "$ac_dir/$ac_prog" || test -f "$ac_dir/$ac_prog$ac_exeext"; then
- lt_cv_path_LD="$ac_dir/$ac_prog"
- # Check to see if the program is GNU ld. I'd rather use --version,
- # but apparently some variants of GNU ld only accept -v.
- # Break only if it was the GNU/non-GNU ld that we prefer.
- case `"$lt_cv_path_LD" -v 2>&1 </dev/null` in
- *GNU* | *'with BFD'*)
- test "$with_gnu_ld" != no && break
- ;;
- *)
- test "$with_gnu_ld" != yes && break
- ;;
- esac
- fi
- done
- IFS="$lt_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 "$as_me:$LINENO: result: $LD" >&5
-echo "${ECHO_T}$LD" >&6
-else
- echo "$as_me:$LINENO: result: no" >&5
-echo "${ECHO_T}no" >&6
-fi
-test -z "$LD" && { { echo "$as_me:$LINENO: error: no acceptable ld found in \$PATH" >&5
-echo "$as_me: error: no acceptable ld found in \$PATH" >&2;}
- { (exit 1); exit 1; }; }
-echo "$as_me:$LINENO: checking if the linker ($LD) is GNU ld" >&5
-echo $ECHO_N "checking if the linker ($LD) is GNU ld... $ECHO_C" >&6
-if test "${lt_cv_prog_gnu_ld+set}" = set; then
- echo $ECHO_N "(cached) $ECHO_C" >&6
-else
- # I'd rather use --version here, but apparently some GNU lds only accept -v.
-case `$LD -v 2>&1 </dev/null` in
-*GNU* | *'with BFD'*)
- lt_cv_prog_gnu_ld=yes
- ;;
-*)
- lt_cv_prog_gnu_ld=no
- ;;
-esac
-fi
-echo "$as_me:$LINENO: result: $lt_cv_prog_gnu_ld" >&5
-echo "${ECHO_T}$lt_cv_prog_gnu_ld" >&6
-with_gnu_ld=$lt_cv_prog_gnu_ld
-
-
-
-
-
-
-
-
-
-
-echo "$as_me:$LINENO: checking for BSD- or MS-compatible name lister (nm)" >&5
-echo $ECHO_N "checking for BSD- or MS-compatible name lister (nm)... $ECHO_C" >&6
-if test "${lt_cv_path_NM+set}" = set; then
- echo $ECHO_N "(cached) $ECHO_C" >&6
-else
- if test -n "$NM"; then
- # Let the user override the test.
- lt_cv_path_NM="$NM"
-else
- lt_nm_to_check="${ac_tool_prefix}nm"
- if test -n "$ac_tool_prefix" && test "$build" = "$host"; then
- lt_nm_to_check="$lt_nm_to_check nm"
- fi
- for lt_tmp_nm in $lt_nm_to_check; do
- lt_save_ifs="$IFS"; IFS=$PATH_SEPARATOR
- for ac_dir in $PATH /usr/ccs/bin/elf /usr/ccs/bin /usr/ucb /bin; do
- IFS="$lt_save_ifs"
- test -z "$ac_dir" && ac_dir=.
- tmp_nm="$ac_dir/$lt_tmp_nm"
- if test -f "$tmp_nm" || test -f "$tmp_nm$ac_exeext" ; then
- # Check to see if the nm accepts a BSD-compat flag.
- # Adding the `sed 1q' prevents false positives on HP-UX, which says:
- # nm: unknown option "B" ignored
- # Tru64's nm complains that /dev/null is an invalid object file
- case `"$tmp_nm" -B /dev/null 2>&1 | sed '1q'` in
- */dev/null* | *'Invalid file or object type'*)
- lt_cv_path_NM="$tmp_nm -B"
- break
- ;;
- *)
- case `"$tmp_nm" -p /dev/null 2>&1 | sed '1q'` in
- */dev/null*)
- lt_cv_path_NM="$tmp_nm -p"
- break
- ;;
- *)
- lt_cv_path_NM=${lt_cv_path_NM="$tmp_nm"} # keep the first match, but
- continue # so that we can try to find one that supports BSD flags
- ;;
- esac
- ;;
- esac
- fi
- done
- IFS="$lt_save_ifs"
- done
- : ${lt_cv_path_NM=no}
-fi
-fi
-echo "$as_me:$LINENO: result: $lt_cv_path_NM" >&5
-echo "${ECHO_T}$lt_cv_path_NM" >&6
-if test "$lt_cv_path_NM" != "no"; then
- NM="$lt_cv_path_NM"
-else
- # Didn't find any BSD compatible name lister, look for dumpbin.
- if test -n "$ac_tool_prefix"; then
- for ac_prog in "dumpbin -symbols" "link -dump -symbols"
- do
- # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
-set dummy $ac_tool_prefix$ac_prog; ac_word=$2
-echo "$as_me:$LINENO: checking for $ac_word" >&5
-echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
-if test "${ac_cv_prog_DUMPBIN+set}" = set; then
- echo $ECHO_N "(cached) $ECHO_C" >&6
-else
- if test -n "$DUMPBIN"; then
- ac_cv_prog_DUMPBIN="$DUMPBIN" # Let the user override the test.
-else
-as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
-for as_dir in $PATH
-do
- IFS=$as_save_IFS
- test -z "$as_dir" && as_dir=.
- for ac_exec_ext in '' $ac_executable_extensions; do
- if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
- ac_cv_prog_DUMPBIN="$ac_tool_prefix$ac_prog"
- echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
- break 2
- fi
-done
-done
-
-fi
-fi
-DUMPBIN=$ac_cv_prog_DUMPBIN
-if test -n "$DUMPBIN"; then
- echo "$as_me:$LINENO: result: $DUMPBIN" >&5
-echo "${ECHO_T}$DUMPBIN" >&6
-else
- echo "$as_me:$LINENO: result: no" >&5
-echo "${ECHO_T}no" >&6
-fi
-
- test -n "$DUMPBIN" && break
- done
-fi
-if test -z "$DUMPBIN"; then
- ac_ct_DUMPBIN=$DUMPBIN
- for ac_prog in "dumpbin -symbols" "link -dump -symbols"
-do
- # Extract the first word of "$ac_prog", so it can be a program name with args.
-set dummy $ac_prog; ac_word=$2
-echo "$as_me:$LINENO: checking for $ac_word" >&5
-echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
-if test "${ac_cv_prog_ac_ct_DUMPBIN+set}" = set; then
- echo $ECHO_N "(cached) $ECHO_C" >&6
-else
- if test -n "$ac_ct_DUMPBIN"; then
- ac_cv_prog_ac_ct_DUMPBIN="$ac_ct_DUMPBIN" # Let the user override the test.
-else
-as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
-for as_dir in $PATH
-do
- IFS=$as_save_IFS
- test -z "$as_dir" && as_dir=.
- for ac_exec_ext in '' $ac_executable_extensions; do
- if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
- ac_cv_prog_ac_ct_DUMPBIN="$ac_prog"
- echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
- break 2
- fi
-done
-done
-
-fi
-fi
-ac_ct_DUMPBIN=$ac_cv_prog_ac_ct_DUMPBIN
-if test -n "$ac_ct_DUMPBIN"; then
- echo "$as_me:$LINENO: result: $ac_ct_DUMPBIN" >&5
-echo "${ECHO_T}$ac_ct_DUMPBIN" >&6
-else
- echo "$as_me:$LINENO: result: no" >&5
-echo "${ECHO_T}no" >&6
-fi
-
- test -n "$ac_ct_DUMPBIN" && break
-done
-test -n "$ac_ct_DUMPBIN" || ac_ct_DUMPBIN=":"
-
- DUMPBIN=$ac_ct_DUMPBIN
-fi
-
-
- if test "$DUMPBIN" != ":"; then
- NM="$DUMPBIN"
- fi
-fi
-test -z "$NM" && NM=nm
-
-
-
-
-
-
-echo "$as_me:$LINENO: checking the name lister ($NM) interface" >&5
-echo $ECHO_N "checking the name lister ($NM) interface... $ECHO_C" >&6
-if test "${lt_cv_nm_interface+set}" = set; then
- echo $ECHO_N "(cached) $ECHO_C" >&6
-else
- lt_cv_nm_interface="BSD nm"
- echo "int some_variable = 0;" > conftest.$ac_ext
- (eval echo "\"\$as_me:3762: $ac_compile\"" >&5)
- (eval "$ac_compile" 2>conftest.err)
- cat conftest.err >&5
- (eval echo "\"\$as_me:3765: $NM \\\"conftest.$ac_objext\\\"\"" >&5)
- (eval "$NM \"conftest.$ac_objext\"" 2>conftest.err > conftest.out)
- cat conftest.err >&5
- (eval echo "\"\$as_me:3768: output\"" >&5)
- cat conftest.out >&5
- if $GREP 'External.*some_variable' conftest.out > /dev/null; then
- lt_cv_nm_interface="MS dumpbin"
- fi
- rm -f conftest*
-fi
-echo "$as_me:$LINENO: result: $lt_cv_nm_interface" >&5
-echo "${ECHO_T}$lt_cv_nm_interface" >&6
-
-echo "$as_me:$LINENO: checking whether ln -s works" >&5
-echo $ECHO_N "checking whether ln -s works... $ECHO_C" >&6
-LN_S=$as_ln_s
-if test "$LN_S" = "ln -s"; then
- echo "$as_me:$LINENO: result: yes" >&5
-echo "${ECHO_T}yes" >&6
-else
- echo "$as_me:$LINENO: result: no, using $LN_S" >&5
-echo "${ECHO_T}no, using $LN_S" >&6
-fi
-
-# find the maximum length of command line arguments
-echo "$as_me:$LINENO: checking the maximum length of command line arguments" >&5
-echo $ECHO_N "checking the maximum length of command line arguments... $ECHO_C" >&6
-if test "${lt_cv_sys_max_cmd_len+set}" = set; then
- echo $ECHO_N "(cached) $ECHO_C" >&6
-else
- i=0
- teststring="ABCD"
-
- case $build_os in
- msdosdjgpp*)
- # On DJGPP, this test can blow up pretty badly due to problems in libc
- # (any single argument exceeding 2000 bytes causes a buffer overrun
- # during glob expansion). Even if it were fixed, the result of this
- # check would be larger than it should be.
- lt_cv_sys_max_cmd_len=12288; # 12K is about right
- ;;
-
- gnu*)
- # Under GNU Hurd, this test is not required because there is
- # no limit to the length of command line arguments.
- # Libtool will interpret -1 as no limit whatsoever
- lt_cv_sys_max_cmd_len=-1;
- ;;
-
- cygwin* | mingw*)
- # On Win9x/ME, this test blows up -- it succeeds, but takes
- # about 5 minutes as the teststring grows exponentially.
- # Worse, since 9x/ME are not pre-emptively multitasking,
- # you end up with a "frozen" computer, even though with patience
- # the test eventually succeeds (with a max line length of 256k).
- # Instead, let's just punt: use the minimum linelength reported by
- # all of the supported platforms: 8192 (on NT/2K/XP).
- lt_cv_sys_max_cmd_len=8192;
- ;;
-
- amigaos*)
- # On AmigaOS with pdksh, this test takes hours, literally.
- # So we just punt and use a minimum line length of 8192.
- lt_cv_sys_max_cmd_len=8192;
- ;;
-
- netbsd* | freebsd* | openbsd* | darwin* | dragonfly*)
- # This has been around since 386BSD, at least. Likely further.
- if test -x /sbin/sysctl; then
- lt_cv_sys_max_cmd_len=`/sbin/sysctl -n kern.argmax`
- elif test -x /usr/sbin/sysctl; then
- lt_cv_sys_max_cmd_len=`/usr/sbin/sysctl -n kern.argmax`
- else
- lt_cv_sys_max_cmd_len=65536 # usable default for all BSDs
- fi
- # And add a safety zone
- lt_cv_sys_max_cmd_len=`expr $lt_cv_sys_max_cmd_len \/ 4`
- lt_cv_sys_max_cmd_len=`expr $lt_cv_sys_max_cmd_len \* 3`
- ;;
-
- interix*)
- # We know the value 262144 and hardcode it with a safety zone (like BSD)
- lt_cv_sys_max_cmd_len=196608
- ;;
-
- osf*)
- # Dr. Hans Ekkehard Plesser reports seeing a kernel panic running configure
- # due to this test when exec_disable_arg_limit is 1 on Tru64. It is not
- # nice to cause kernel panics so lets avoid the loop below.
- # First set a reasonable default.
- lt_cv_sys_max_cmd_len=16384
- #
- if test -x /sbin/sysconfig; then
- case `/sbin/sysconfig -q proc exec_disable_arg_limit` in
- *1*) lt_cv_sys_max_cmd_len=-1 ;;
- esac
- fi
- ;;
- sco3.2v5*)
- lt_cv_sys_max_cmd_len=102400
- ;;
- sysv5* | sco5v6* | sysv4.2uw2*)
- kargmax=`grep ARG_MAX /etc/conf/cf.d/stune 2>/dev/null`
- if test -n "$kargmax"; then
- lt_cv_sys_max_cmd_len=`echo $kargmax | sed 's/.*[ ]//'`
- else
- lt_cv_sys_max_cmd_len=32768
- fi
- ;;
- *)
- lt_cv_sys_max_cmd_len=`getconf ARG_MAX 2> /dev/null`
- if test -n $lt_cv_sys_max_cmd_len; then
- lt_cv_sys_max_cmd_len=`expr $lt_cv_sys_max_cmd_len \/ 4`
- lt_cv_sys_max_cmd_len=`expr $lt_cv_sys_max_cmd_len \* 3`
- else
- # Make teststring a little bigger before we do anything with it.
- # a 1K string should be a reasonable start.
- for i in 1 2 3 4 5 6 7 8 ; do
- teststring=$teststring$teststring
- done
- SHELL=${SHELL-${CONFIG_SHELL-/bin/sh}}
- # If test is not a shell built-in, we'll probably end up computing a
- # maximum length that is only half of the actual maximum length, but
- # we can't tell.
- while { test "X"`$SHELL $0 --fallback-echo "X$teststring$teststring" 2>/dev/null` \
- = "XX$teststring$teststring"; } >/dev/null 2>&1 &&
- test $i != 17 # 1/2 MB should be enough
- do
- i=`expr $i + 1`
- teststring=$teststring$teststring
- done
- # Only check the string length outside the loop.
- lt_cv_sys_max_cmd_len=`expr "X$teststring" : ".*" 2>&1`
- teststring=
- # Add a significant safety factor because C++ compilers can tack on
- # massive amounts of additional arguments before passing them to the
- # linker. It appears as though 1/2 is a usable value.
- lt_cv_sys_max_cmd_len=`expr $lt_cv_sys_max_cmd_len \/ 2`
- fi
- ;;
- esac
-
-fi
-
-if test -n $lt_cv_sys_max_cmd_len ; then
- echo "$as_me:$LINENO: result: $lt_cv_sys_max_cmd_len" >&5
-echo "${ECHO_T}$lt_cv_sys_max_cmd_len" >&6
-else
- echo "$as_me:$LINENO: result: none" >&5
-echo "${ECHO_T}none" >&6
-fi
-max_cmd_len=$lt_cv_sys_max_cmd_len
-
-
-
-
-
-
-
-: ${CP="cp -f"}
-: ${MV="mv -f"}
-: ${RM="rm -f"}
-
-echo "$as_me:$LINENO: checking whether the shell understands some XSI constructs" >&5
-echo $ECHO_N "checking whether the shell understands some XSI constructs... $ECHO_C" >&6
-# Try some XSI features
-xsi_shell=no
-( _lt_dummy="a/b/c"
- test "${_lt_dummy##*/},${_lt_dummy%/*},"${_lt_dummy%"$_lt_dummy"}, \
- = c,a/b,, ) >/dev/null 2>&1 \
- && xsi_shell=yes
-echo "$as_me:$LINENO: result: $xsi_shell" >&5
-echo "${ECHO_T}$xsi_shell" >&6
-
-
-echo "$as_me:$LINENO: checking whether the shell understands \"+=\"" >&5
-echo $ECHO_N "checking whether the shell understands \"+=\"... $ECHO_C" >&6
-lt_shell_append=no
-( foo=bar; set foo baz; eval "$1+=\$2" && test "$foo" = barbaz ) \
- >/dev/null 2>&1 \
- && lt_shell_append=yes
-echo "$as_me:$LINENO: result: $lt_shell_append" >&5
-echo "${ECHO_T}$lt_shell_append" >&6
-
-
-if ( (MAIL=60; unset MAIL) || exit) >/dev/null 2>&1; then
- lt_unset=unset
-else
- lt_unset=false
-fi
-
-
-
-
-
-# test EBCDIC or ASCII
-case `echo X|tr X '\101'` in
- A) # ASCII based system
- # \n is not interpreted correctly by Solaris 8 /usr/ucb/tr
- lt_SP2NL='tr \040 \012'
- lt_NL2SP='tr \015\012 \040\040'
- ;;
- *) # EBCDIC based system
- lt_SP2NL='tr \100 \n'
- lt_NL2SP='tr \r\n \100\100'
- ;;
-esac
-
-
-
-
-
-
-
-
-
-echo "$as_me:$LINENO: checking for $LD option to reload object files" >&5
-echo $ECHO_N "checking for $LD option to reload object files... $ECHO_C" >&6
-if test "${lt_cv_ld_reload_flag+set}" = set; then
- echo $ECHO_N "(cached) $ECHO_C" >&6
-else
- lt_cv_ld_reload_flag='-r'
-fi
-echo "$as_me:$LINENO: result: $lt_cv_ld_reload_flag" >&5
-echo "${ECHO_T}$lt_cv_ld_reload_flag" >&6
-reload_flag=$lt_cv_ld_reload_flag
-case $reload_flag in
-"" | " "*) ;;
-*) reload_flag=" $reload_flag" ;;
-esac
-reload_cmds='$LD$reload_flag -o $output$reload_objs'
-case $host_os in
- darwin*)
- if test "$GCC" = yes; then
- reload_cmds='$LTCC $LTCFLAGS -nostdlib ${wl}-r -o $output$reload_objs'
- else
- reload_cmds='$LD$reload_flag -o $output$reload_objs'
- fi
- ;;
-esac
-
-
-
-
-
-
-
-
-
-
-echo "$as_me:$LINENO: checking how to recognize dependent libraries" >&5
-echo $ECHO_N "checking how to recognize dependent libraries... $ECHO_C" >&6
-if test "${lt_cv_deplibs_check_method+set}" = set; then
- echo $ECHO_N "(cached) $ECHO_C" >&6
-else
- lt_cv_file_magic_cmd='$MAGIC_CMD'
-lt_cv_file_magic_test_file=
-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 extended regex.
-# If you have `file' or equivalent on your system and you're not sure
-# whether `pass_all' will *always* work, you probably want this one.
-
-case $host_os in
-aix4* | aix5*)
- lt_cv_deplibs_check_method=pass_all
- ;;
-
-beos*)
- lt_cv_deplibs_check_method=pass_all
- ;;
-
-bsdi[45]*)
- lt_cv_deplibs_check_method='file_magic ELF [0-9][0-9]*-bit [ML]SB (shared object|dynamic lib)'
- lt_cv_file_magic_cmd='/usr/bin/file -L'
- lt_cv_file_magic_test_file=/shlib/libc.so
- ;;
-
-cygwin*)
- # func_win32_libid is a shell function defined in ltmain.sh
- lt_cv_deplibs_check_method='file_magic ^x86 archive import|^x86 DLL'
- lt_cv_file_magic_cmd='func_win32_libid'
- ;;
-
-mingw* | pw32*)
- # Base MSYS/MinGW do not provide the 'file' command needed by
- # func_win32_libid shell function, so use a weaker test based on 'objdump',
- # unless we find 'file', for example because we are cross-compiling.
- if ( file / ) >/dev/null 2>&1; then
- lt_cv_deplibs_check_method='file_magic ^x86 archive import|^x86 DLL'
- lt_cv_file_magic_cmd='func_win32_libid'
- else
- lt_cv_deplibs_check_method='file_magic file format pei*-i386(.*architecture: i386)?'
- lt_cv_file_magic_cmd='$OBJDUMP -f'
- fi
- ;;
-
-darwin* | rhapsody*)
- lt_cv_deplibs_check_method=pass_all
- ;;
-
-freebsd* | dragonfly*)
- if echo __ELF__ | $CC -E - | $GREP __ELF__ > /dev/null; then
- case $host_cpu in
- i*86 )
- # Not sure whether the presence of OpenBSD here was a mistake.
- # Let's accept both of them until this is cleared up.
- lt_cv_deplibs_check_method='file_magic (FreeBSD|OpenBSD|DragonFly)/i[3-9]86 (compact )?demand paged shared library'
- lt_cv_file_magic_cmd=/usr/bin/file
- lt_cv_file_magic_test_file=`echo /usr/lib/libc.so.*`
- ;;
- esac
- else
- lt_cv_deplibs_check_method=pass_all
- fi
- ;;
-
-gnu*)
- lt_cv_deplibs_check_method=pass_all
- ;;
-
-hpux10.20* | hpux11*)
- lt_cv_file_magic_cmd=/usr/bin/file
- case $host_cpu in
- 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_test_file=/usr/lib/hpux32/libc.so
- ;;
- hppa*64*)
- lt_cv_deplibs_check_method='file_magic (s[0-9][0-9][0-9]|ELF-[0-9][0-9]) shared object file - PA-RISC [0-9].[0-9]'
- lt_cv_file_magic_test_file=/usr/lib/pa20_64/libc.sl
- ;;
- *)
- lt_cv_deplibs_check_method='file_magic (s[0-9][0-9][0-9]|PA-RISC[0-9].[0-9]) shared library'
- lt_cv_file_magic_test_file=/usr/lib/libc.sl
- ;;
- esac
- ;;
-
-interix[3-9]*)
- # PIC code is broken on Interix 3.x, that's why |\.a not |_pic\.a here
- lt_cv_deplibs_check_method='match_pattern /lib[^/]+(\.so|\.a)$'
- ;;
-
-irix5* | irix6* | nonstopux*)
- case $LD in
- *-32|*"-32 ") libmagic=32-bit;;
- *-n32|*"-n32 ") libmagic=N32;;
- *-64|*"-64 ") libmagic=64-bit;;
- *) libmagic=never-match;;
- esac
- lt_cv_deplibs_check_method=pass_all
- ;;
-
-# This must be Linux ELF.
-linux* | k*bsd*-gnu)
- lt_cv_deplibs_check_method=pass_all
- ;;
-
-netbsd*)
- if echo __ELF__ | $CC -E - | $GREP __ELF__ > /dev/null; then
- lt_cv_deplibs_check_method='match_pattern /lib[^/]+(\.so\.[0-9]+\.[0-9]+|_pic\.a)$'
- else
- lt_cv_deplibs_check_method='match_pattern /lib[^/]+(\.so|_pic\.a)$'
- fi
- ;;
-
-newos6*)
- lt_cv_deplibs_check_method='file_magic ELF [0-9][0-9]*-bit [ML]SB (executable|dynamic lib)'
- lt_cv_file_magic_cmd=/usr/bin/file
- lt_cv_file_magic_test_file=/usr/lib/libnls.so
- ;;
-
-*nto* | *qnx*)
- lt_cv_deplibs_check_method=pass_all
- ;;
-
-openbsd*)
- if test -z "`echo __ELF__ | $CC -E - | $GREP __ELF__`" || test "$host_os-$host_cpu" = "openbsd2.8-powerpc"; then
- lt_cv_deplibs_check_method='match_pattern /lib[^/]+(\.so\.[0-9]+\.[0-9]+|\.so|_pic\.a)$'
- else
- lt_cv_deplibs_check_method='match_pattern /lib[^/]+(\.so\.[0-9]+\.[0-9]+|_pic\.a)$'
- fi
- ;;
-
-osf3* | osf4* | osf5*)
- lt_cv_deplibs_check_method=pass_all
- ;;
-
-rdos*)
- lt_cv_deplibs_check_method=pass_all
- ;;
-
-solaris*)
- lt_cv_deplibs_check_method=pass_all
- ;;
-
-sysv5* | sco3.2v5* | sco5v6* | unixware* | OpenUNIX* | sysv4*uw2*)
- lt_cv_deplibs_check_method=pass_all
- ;;
-
-sysv4 | sysv4.3*)
- case $host_vendor in
- motorola)
- lt_cv_deplibs_check_method='file_magic ELF [0-9][0-9]*-bit [ML]SB (shared object|dynamic lib) M[0-9][0-9]* Version [0-9]'
- lt_cv_file_magic_test_file=`echo /usr/lib/libc.so*`
- ;;
- ncr)
- lt_cv_deplibs_check_method=pass_all
- ;;
- sequent)
- lt_cv_file_magic_cmd='/bin/file'
- lt_cv_deplibs_check_method='file_magic ELF [0-9][0-9]*-bit [LM]SB (shared object|dynamic lib )'
- ;;
- sni)
- lt_cv_file_magic_cmd='/bin/file'
- lt_cv_deplibs_check_method="file_magic ELF [0-9][0-9]*-bit [LM]SB dynamic lib"
- lt_cv_file_magic_test_file=/lib/libc.so
- ;;
- siemens)
- lt_cv_deplibs_check_method=pass_all
- ;;
- pc)
- lt_cv_deplibs_check_method=pass_all
- ;;
- esac
- ;;
-
-tpf*)
- lt_cv_deplibs_check_method=pass_all
- ;;
-esac
-
-fi
-echo "$as_me:$LINENO: result: $lt_cv_deplibs_check_method" >&5
-echo "${ECHO_T}$lt_cv_deplibs_check_method" >&6
-file_magic_cmd=$lt_cv_file_magic_cmd
-deplibs_check_method=$lt_cv_deplibs_check_method
-test -z "$deplibs_check_method" && deplibs_check_method=unknown
-
-
-
-
-
-
-
-
-
-
-
-
-if test -n "$ac_tool_prefix"; then
- # Extract the first word of "${ac_tool_prefix}ar", so it can be a program name with args.
-set dummy ${ac_tool_prefix}ar; ac_word=$2
-echo "$as_me:$LINENO: checking for $ac_word" >&5
-echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
-if test "${ac_cv_prog_AR+set}" = set; then
- echo $ECHO_N "(cached) $ECHO_C" >&6
-else
- if test -n "$AR"; then
- ac_cv_prog_AR="$AR" # Let the user override the test.
-else
-as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
-for as_dir in $PATH
-do
- IFS=$as_save_IFS
- test -z "$as_dir" && as_dir=.
- for ac_exec_ext in '' $ac_executable_extensions; do
- if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
- ac_cv_prog_AR="${ac_tool_prefix}ar"
- echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
- break 2
- fi
-done
-done
-
-fi
-fi
-AR=$ac_cv_prog_AR
-if test -n "$AR"; then
- echo "$as_me:$LINENO: result: $AR" >&5
-echo "${ECHO_T}$AR" >&6
-else
- echo "$as_me:$LINENO: result: no" >&5
-echo "${ECHO_T}no" >&6
-fi
-
-fi
-if test -z "$ac_cv_prog_AR"; then
- ac_ct_AR=$AR
- # Extract the first word of "ar", so it can be a program name with args.
-set dummy ar; ac_word=$2
-echo "$as_me:$LINENO: checking for $ac_word" >&5
-echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
-if test "${ac_cv_prog_ac_ct_AR+set}" = set; then
- echo $ECHO_N "(cached) $ECHO_C" >&6
-else
- if test -n "$ac_ct_AR"; then
- ac_cv_prog_ac_ct_AR="$ac_ct_AR" # Let the user override the test.
-else
-as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
-for as_dir in $PATH
-do
- IFS=$as_save_IFS
- test -z "$as_dir" && as_dir=.
- for ac_exec_ext in '' $ac_executable_extensions; do
- if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
- ac_cv_prog_ac_ct_AR="ar"
- echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
- break 2
- fi
-done
-done
-
- test -z "$ac_cv_prog_ac_ct_AR" && ac_cv_prog_ac_ct_AR="false"
-fi
-fi
-ac_ct_AR=$ac_cv_prog_ac_ct_AR
-if test -n "$ac_ct_AR"; then
- echo "$as_me:$LINENO: result: $ac_ct_AR" >&5
-echo "${ECHO_T}$ac_ct_AR" >&6
-else
- echo "$as_me:$LINENO: result: no" >&5
-echo "${ECHO_T}no" >&6
-fi
-
- AR=$ac_ct_AR
-else
- AR="$ac_cv_prog_AR"
-fi
-
-test -z "$AR" && AR=ar
-test -z "$AR_FLAGS" && AR_FLAGS=cru
-
-
-
-
-
-
-
-
-
-
-
-if test -n "$ac_tool_prefix"; then
- # Extract the first word of "${ac_tool_prefix}strip", so it can be a program name with args.
-set dummy ${ac_tool_prefix}strip; ac_word=$2
-echo "$as_me:$LINENO: checking for $ac_word" >&5
-echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
-if test "${ac_cv_prog_STRIP+set}" = set; then
- echo $ECHO_N "(cached) $ECHO_C" >&6
-else
- if test -n "$STRIP"; then
- ac_cv_prog_STRIP="$STRIP" # Let the user override the test.
-else
-as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
-for as_dir in $PATH
-do
- IFS=$as_save_IFS
- test -z "$as_dir" && as_dir=.
- for ac_exec_ext in '' $ac_executable_extensions; do
- if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
- ac_cv_prog_STRIP="${ac_tool_prefix}strip"
- echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
- break 2
- fi
-done
-done
-
-fi
-fi
-STRIP=$ac_cv_prog_STRIP
-if test -n "$STRIP"; then
- echo "$as_me:$LINENO: result: $STRIP" >&5
-echo "${ECHO_T}$STRIP" >&6
-else
- echo "$as_me:$LINENO: result: no" >&5
-echo "${ECHO_T}no" >&6
-fi
-
-fi
-if test -z "$ac_cv_prog_STRIP"; then
- ac_ct_STRIP=$STRIP
- # Extract the first word of "strip", so it can be a program name with args.
-set dummy strip; ac_word=$2
-echo "$as_me:$LINENO: checking for $ac_word" >&5
-echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
-if test "${ac_cv_prog_ac_ct_STRIP+set}" = set; then
- echo $ECHO_N "(cached) $ECHO_C" >&6
-else
- if test -n "$ac_ct_STRIP"; then
- ac_cv_prog_ac_ct_STRIP="$ac_ct_STRIP" # Let the user override the test.
-else
-as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
-for as_dir in $PATH
-do
- IFS=$as_save_IFS
- test -z "$as_dir" && as_dir=.
- for ac_exec_ext in '' $ac_executable_extensions; do
- if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
- ac_cv_prog_ac_ct_STRIP="strip"
- echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
- break 2
- fi
-done
-done
-
- test -z "$ac_cv_prog_ac_ct_STRIP" && ac_cv_prog_ac_ct_STRIP=":"
-fi
-fi
-ac_ct_STRIP=$ac_cv_prog_ac_ct_STRIP
-if test -n "$ac_ct_STRIP"; then
- echo "$as_me:$LINENO: result: $ac_ct_STRIP" >&5
-echo "${ECHO_T}$ac_ct_STRIP" >&6
-else
- echo "$as_me:$LINENO: result: no" >&5
-echo "${ECHO_T}no" >&6
-fi
-
- STRIP=$ac_ct_STRIP
-else
- STRIP="$ac_cv_prog_STRIP"
-fi
-
-test -z "$STRIP" && STRIP=:
-
-
-
-
-
-
-if test -n "$ac_tool_prefix"; then
- # Extract the first word of "${ac_tool_prefix}ranlib", so it can be a program name with args.
-set dummy ${ac_tool_prefix}ranlib; ac_word=$2
-echo "$as_me:$LINENO: checking for $ac_word" >&5
-echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
-if test "${ac_cv_prog_RANLIB+set}" = set; then
- echo $ECHO_N "(cached) $ECHO_C" >&6
-else
- if test -n "$RANLIB"; then
- ac_cv_prog_RANLIB="$RANLIB" # Let the user override the test.
-else
-as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
-for as_dir in $PATH
-do
- IFS=$as_save_IFS
- test -z "$as_dir" && as_dir=.
- for ac_exec_ext in '' $ac_executable_extensions; do
- if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
- ac_cv_prog_RANLIB="${ac_tool_prefix}ranlib"
- echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
- break 2
- fi
-done
-done
-
-fi
-fi
-RANLIB=$ac_cv_prog_RANLIB
-if test -n "$RANLIB"; then
- echo "$as_me:$LINENO: result: $RANLIB" >&5
-echo "${ECHO_T}$RANLIB" >&6
-else
- echo "$as_me:$LINENO: result: no" >&5
-echo "${ECHO_T}no" >&6
-fi
-
-fi
-if test -z "$ac_cv_prog_RANLIB"; then
- ac_ct_RANLIB=$RANLIB
- # Extract the first word of "ranlib", so it can be a program name with args.
-set dummy ranlib; ac_word=$2
-echo "$as_me:$LINENO: checking for $ac_word" >&5
-echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
-if test "${ac_cv_prog_ac_ct_RANLIB+set}" = set; then
- echo $ECHO_N "(cached) $ECHO_C" >&6
-else
- if test -n "$ac_ct_RANLIB"; then
- ac_cv_prog_ac_ct_RANLIB="$ac_ct_RANLIB" # Let the user override the test.
-else
-as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
-for as_dir in $PATH
-do
- IFS=$as_save_IFS
- test -z "$as_dir" && as_dir=.
- for ac_exec_ext in '' $ac_executable_extensions; do
- if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
- ac_cv_prog_ac_ct_RANLIB="ranlib"
- echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
- break 2
- fi
-done
-done
-
- test -z "$ac_cv_prog_ac_ct_RANLIB" && ac_cv_prog_ac_ct_RANLIB=":"
-fi
-fi
-ac_ct_RANLIB=$ac_cv_prog_ac_ct_RANLIB
-if test -n "$ac_ct_RANLIB"; then
- echo "$as_me:$LINENO: result: $ac_ct_RANLIB" >&5
-echo "${ECHO_T}$ac_ct_RANLIB" >&6
-else
- echo "$as_me:$LINENO: result: no" >&5
-echo "${ECHO_T}no" >&6
-fi
-
- RANLIB=$ac_ct_RANLIB
-else
- RANLIB="$ac_cv_prog_RANLIB"
-fi
-
-test -z "$RANLIB" && RANLIB=:
-
-
-
-
-
-
-# Determine commands to create old-style static archives.
-old_archive_cmds='$AR $AR_FLAGS $oldlib$oldobjs$old_deplibs'
-old_postinstall_cmds='chmod 644 $oldlib'
-old_postuninstall_cmds=
-
-if test -n "$RANLIB"; then
- case $host_os in
- openbsd*)
- old_postinstall_cmds="$old_postinstall_cmds~\$RANLIB -t \$oldlib"
- ;;
- *)
- old_postinstall_cmds="$old_postinstall_cmds~\$RANLIB \$oldlib"
- ;;
- esac
- old_archive_cmds="$old_archive_cmds~\$RANLIB \$oldlib"
-fi
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-# If no C compiler was specified, use CC.
-LTCC=${LTCC-"$CC"}
-
-# If no C compiler flags were specified, use CFLAGS.
-LTCFLAGS=${LTCFLAGS-"$CFLAGS"}
-
-# Allow CC to be a program name with arguments.
-compiler=$CC
-
-
-# Check for command to grab the raw symbol name followed by C symbol from nm.
-echo "$as_me:$LINENO: checking command to parse $NM output from $compiler object" >&5
-echo $ECHO_N "checking command to parse $NM output from $compiler object... $ECHO_C" >&6
-if test "${lt_cv_sys_global_symbol_pipe+set}" = set; then
- echo $ECHO_N "(cached) $ECHO_C" >&6
-else
-
-# These are sane defaults that work on at least a few old systems.
-# [They come from Ultrix. What could be older than Ultrix?!! ;)]
-
-# Character class describing NM global symbol codes.
-symcode='[BCDEGRST]'
-
-# Regexp to match symbols that can be accessed directly from C.
-sympat='\([_A-Za-z][_A-Za-z0-9]*\)'
-
-# Define system-specific variables.
-case $host_os in
-aix*)
- symcode='[BCDT]'
- ;;
-cygwin* | mingw* | pw32*)
- symcode='[ABCDGISTW]'
- ;;
-hpux*)
- if test "$host_cpu" = ia64; then
- symcode='[ABCDEGRST]'
- fi
- ;;
-irix* | nonstopux*)
- symcode='[BCDEGRST]'
- ;;
-osf*)
- symcode='[BCDEGQRST]'
- ;;
-solaris*)
- symcode='[BDRT]'
- ;;
-sco3.2v5*)
- symcode='[DT]'
- ;;
-sysv4.2uw2*)
- symcode='[DT]'
- ;;
-sysv5* | sco5v6* | unixware* | OpenUNIX*)
- symcode='[ABDT]'
- ;;
-sysv4)
- symcode='[DFNSTU]'
- ;;
-esac
-
-# If we're using GNU nm, then use its standard symbol codes.
-case `$NM -V 2>&1` in
-*GNU* | *'with BFD'*)
- symcode='[ABCDGIRSTW]' ;;
-esac
-
-# Transform an extracted symbol line into a proper C declaration.
-# Some systems (esp. on ia64) link data and code symbols differently,
-# so use this general approach.
-lt_cv_sys_global_symbol_to_cdecl="sed -n -e 's/^T .* \(.*\)$/extern int \1();/p' -e 's/^$symcode* .* \(.*\)$/extern char \1;/p'"
-
-# Transform an extracted symbol line into symbol name and symbol address
-lt_cv_sys_global_symbol_to_c_name_address="sed -n -e 's/^: \([^ ]*\) $/ {\\\"\1\\\", (void *) 0},/p' -e 's/^$symcode* \([^ ]*\) \([^ ]*\)$/ {\"\2\", (void *) \&\2},/p'"
-
-# Handle CRLF in mingw tool chain
-opt_cr=
-case $build_os in
-mingw*)
- opt_cr=`$ECHO 'x\{0,1\}' | tr x '\015'` # option cr in regexp
- ;;
-esac
-
-# Try without a prefix underscore, then with it.
-for ac_symprfx in "" "_"; do
-
- # Transform symcode, sympat, and symprfx into a raw symbol and a C symbol.
- symxfrm="\\1 $ac_symprfx\\2 \\2"
-
- # Write the raw and C identifiers.
- if test "$lt_cv_nm_interface" = "MS dumpbin"; then
- # Fake it for dumpbin and say T for any non-static function
- # and D for any global variable.
- # Also find C++ and __fastcall symbols from MSVC++,
- # which start with @ or ?.
- lt_cv_sys_global_symbol_pipe="$AWK '"\
-" {last_section=section; section=\$ 3};"\
-" /Section length .*#relocs.*(pick any)/{hide[last_section]=1};"\
-" \$ 0!~/External *\|/{next};"\
-" / 0+ UNDEF /{next}; / UNDEF \([^|]\)*()/{next};"\
-" {if(hide[section]) next};"\
-" {f=0}; \$ 0~/\(\).*\|/{f=1}; {printf f ? \"T \" : \"D \"};"\
-" {split(\$ 0, a, /\||\r/); split(a[2], s)};"\
-" s[1]~/^[@?]/{print s[1], s[1]; next};"\
-" s[1]~prfx {split(s[1],t,\"@\"); print t[1], substr(t[1],length(prfx))}"\
-" ' prfx=^$ac_symprfx"
- else
- lt_cv_sys_global_symbol_pipe="sed -n -e 's/^.*[ ]\($symcode$symcode*\)[ ][ ]*$ac_symprfx$sympat$opt_cr$/$symxfrm/p'"
- fi
-
- # Check to see that the pipe works correctly.
- pipe_works=no
-
- rm -f conftest*
- cat > conftest.$ac_ext <<_LT_EOF
-#ifdef __cplusplus
-extern "C" {
-#endif
-char nm_test_var;
-void nm_test_func(void);
-void nm_test_func(void){}
-#ifdef __cplusplus
-}
-#endif
-int main(){nm_test_var='a';nm_test_func();return(0);}
-_LT_EOF
-
- if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
- (eval $ac_compile) 2>&5
- ac_status=$?
- echo "$as_me:$LINENO: \$? = $ac_status" >&5
- (exit $ac_status); }; then
- # Now try to grab the symbols.
- nlist=conftest.nm
- if { (eval echo "$as_me:$LINENO: \"$NM conftest.$ac_objext \| $lt_cv_sys_global_symbol_pipe \> $nlist\"") >&5
- (eval $NM conftest.$ac_objext \| $lt_cv_sys_global_symbol_pipe \> $nlist) 2>&5
- ac_status=$?
- echo "$as_me:$LINENO: \$? = $ac_status" >&5
- (exit $ac_status); } && test -s "$nlist"; then
- # Try sorting and uniquifying the output.
- if sort "$nlist" | uniq > "$nlist"T; then
- mv -f "$nlist"T "$nlist"
- else
- rm -f "$nlist"T
- fi
-
- # Make sure that we snagged all the symbols we need.
- if $GREP ' nm_test_var$' "$nlist" >/dev/null; then
- if $GREP ' nm_test_func$' "$nlist" >/dev/null; then
- cat <<_LT_EOF > conftest.$ac_ext
-#ifdef __cplusplus
-extern "C" {
-#endif
-
-_LT_EOF
- # Now generate the symbol file.
- eval "$lt_cv_sys_global_symbol_to_cdecl"' < "$nlist" | $GREP -v main >> conftest.$ac_ext'
-
- cat <<_LT_EOF >> conftest.$ac_ext
-
-/* The mapping between symbol names and symbols. */
-const struct {
- const char *name;
- void *address;
-}
-lt__PROGRAM__LTX_preloaded_symbols[] =
-{
- { "@PROGRAM@", (void *) 0 },
-_LT_EOF
- $SED "s/^$symcode$symcode* \(.*\) \(.*\)$/ {\"\2\", (void *) \&\2},/" < "$nlist" | $GREP -v main >> conftest.$ac_ext
- cat <<\_LT_EOF >> conftest.$ac_ext
- {0, (void *) 0}
-};
-
-/* This works around a problem in FreeBSD linker */
-#ifdef FREEBSD_WORKAROUND
-static const void *lt_preloaded_setup() {
- return lt__PROGRAM__LTX_preloaded_symbols;
-}
-#endif
-
-#ifdef __cplusplus
-}
-#endif
-_LT_EOF
- # Now try linking the two files.
- mv conftest.$ac_objext conftstm.$ac_objext
- lt_save_LIBS="$LIBS"
- lt_save_CFLAGS="$CFLAGS"
- LIBS="conftstm.$ac_objext"
- CFLAGS="$CFLAGS$lt_prog_compiler_no_builtin_flag"
- if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
- (eval $ac_link) 2>&5
- ac_status=$?
- echo "$as_me:$LINENO: \$? = $ac_status" >&5
- (exit $ac_status); } && test -s conftest${ac_exeext}; then
- pipe_works=yes
- fi
- LIBS="$lt_save_LIBS"
- CFLAGS="$lt_save_CFLAGS"
- else
- echo "cannot find nm_test_func in $nlist" >&5
- fi
- else
- echo "cannot find nm_test_var in $nlist" >&5
- fi
- else
- echo "cannot run $lt_cv_sys_global_symbol_pipe" >&5
- fi
- else
- echo "$progname: failed program was:" >&5
- cat conftest.$ac_ext >&5
- fi
- rm -f conftest* conftst*
-
- # Do not use the global_symbol_pipe unless it works.
- if test "$pipe_works" = yes; then
- break
- else
- lt_cv_sys_global_symbol_pipe=
- fi
-done
-
-fi
-
-if test -z "$lt_cv_sys_global_symbol_pipe"; then
- lt_cv_sys_global_symbol_to_cdecl=
-fi
-if test -z "$lt_cv_sys_global_symbol_pipe$lt_cv_sys_global_symbol_to_cdecl"; then
- echo "$as_me:$LINENO: result: failed" >&5
-echo "${ECHO_T}failed" >&6
-else
- echo "$as_me:$LINENO: result: ok" >&5
-echo "${ECHO_T}ok" >&6
-fi
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-# Check whether --enable-libtool-lock or --disable-libtool-lock was given.
-if test "${enable_libtool_lock+set}" = set; then
- enableval="$enable_libtool_lock"
-
-fi;
-test "x$enable_libtool_lock" != xno && enable_libtool_lock=yes
-
-# Some flags need to be propagated to the compiler or linker for good
-# libtool support.
-case $host in
-ia64-*-hpux*)
- # Find out which ABI we are using.
- echo 'int i;' > conftest.$ac_ext
- if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
- (eval $ac_compile) 2>&5
- ac_status=$?
- echo "$as_me:$LINENO: \$? = $ac_status" >&5
- (exit $ac_status); }; then
- case `/usr/bin/file conftest.$ac_objext` in
- *ELF-32*)
- HPUX_IA64_MODE="32"
- ;;
- *ELF-64*)
- HPUX_IA64_MODE="64"
- ;;
- esac
- fi
- rm -rf conftest*
- ;;
-*-*-irix6*)
- # Find out which ABI we are using.
- echo '#line 4823 "configure"' > conftest.$ac_ext
- if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
- (eval $ac_compile) 2>&5
- ac_status=$?
- echo "$as_me:$LINENO: \$? = $ac_status" >&5
- (exit $ac_status); }; then
- if test "$lt_cv_prog_gnu_ld" = yes; then
- case `/usr/bin/file conftest.$ac_objext` in
- *32-bit*)
- LD="${LD-ld} -melf32bsmip"
- ;;
- *N32*)
- LD="${LD-ld} -melf32bmipn32"
- ;;
- *64-bit*)
- LD="${LD-ld} -melf64bmip"
- ;;
- esac
- else
- case `/usr/bin/file conftest.$ac_objext` in
- *32-bit*)
- LD="${LD-ld} -32"
- ;;
- *N32*)
- LD="${LD-ld} -n32"
- ;;
- *64-bit*)
- LD="${LD-ld} -64"
- ;;
- esac
- fi
- fi
- rm -rf conftest*
- ;;
-
-x86_64-*kfreebsd*-gnu|x86_64-*linux*|ppc*-*linux*|powerpc*-*linux*| \
-s390*-*linux*|s390*-*tpf*|sparc*-*linux*)
- # Find out which ABI we are using.
- echo 'int i;' > conftest.$ac_ext
- if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
- (eval $ac_compile) 2>&5
- ac_status=$?
- echo "$as_me:$LINENO: \$? = $ac_status" >&5
- (exit $ac_status); }; then
- case `/usr/bin/file conftest.o` in
- *32-bit*)
- case $host in
- x86_64-*kfreebsd*-gnu)
- LD="${LD-ld} -m elf_i386_fbsd"
- ;;
- x86_64-*linux*)
- LD="${LD-ld} -m elf_i386"
- ;;
- ppc64-*linux*|powerpc64-*linux*)
- LD="${LD-ld} -m elf32ppclinux"
- ;;
- s390x-*linux*)
- LD="${LD-ld} -m elf_s390"
- ;;
- sparc64-*linux*)
- LD="${LD-ld} -m elf32_sparc"
- ;;
- esac
- ;;
- *64-bit*)
- case $host in
- x86_64-*kfreebsd*-gnu)
- LD="${LD-ld} -m elf_x86_64_fbsd"
- ;;
- x86_64-*linux*)
- LD="${LD-ld} -m elf_x86_64"
- ;;
- ppc*-*linux*|powerpc*-*linux*)
- LD="${LD-ld} -m elf64ppc"
- ;;
- s390*-*linux*|s390*-*tpf*)
- LD="${LD-ld} -m elf64_s390"
- ;;
- sparc*-*linux*)
- LD="${LD-ld} -m elf64_sparc"
- ;;
- esac
- ;;
- esac
- fi
- rm -rf conftest*
- ;;
-
-*-*-sco3.2v5*)
- # On SCO OpenServer 5, we need -belf to get full-featured binaries.
- SAVE_CFLAGS="$CFLAGS"
- CFLAGS="$CFLAGS -belf"
- echo "$as_me:$LINENO: checking whether the C compiler needs -belf" >&5
-echo $ECHO_N "checking whether the C compiler needs -belf... $ECHO_C" >&6
-if test "${lt_cv_cc_needs_belf+set}" = set; then
- echo $ECHO_N "(cached) $ECHO_C" >&6
-else
- ac_ext=c
-ac_cpp='$CPP $CPPFLAGS'
-ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
-ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
-ac_compiler_gnu=$ac_cv_c_compiler_gnu
-
- cat >conftest.$ac_ext <<_ACEOF
-/* confdefs.h. */
-_ACEOF
-cat confdefs.h >>conftest.$ac_ext
-cat >>conftest.$ac_ext <<_ACEOF
-/* end confdefs.h. */
-
-int
-main ()
-{
-
- ;
- return 0;
-}
-_ACEOF
-rm -f conftest.$ac_objext conftest$ac_exeext
-if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
- (eval $ac_link) 2>conftest.er1
- ac_status=$?
- grep -v '^ *+' conftest.er1 >conftest.err
- rm -f conftest.er1
- cat conftest.err >&5
- echo "$as_me:$LINENO: \$? = $ac_status" >&5
- (exit $ac_status); } &&
- { ac_try='test -z "$ac_c_werror_flag"
- || test ! -s conftest.err'
- { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
- (eval $ac_try) 2>&5
- ac_status=$?
- echo "$as_me:$LINENO: \$? = $ac_status" >&5
- (exit $ac_status); }; } &&
- { ac_try='test -s conftest$ac_exeext'
- { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
- (eval $ac_try) 2>&5
- ac_status=$?
- echo "$as_me:$LINENO: \$? = $ac_status" >&5
- (exit $ac_status); }; }; then
- lt_cv_cc_needs_belf=yes
-else
- echo "$as_me: failed program was:" >&5
-sed 's/^/| /' conftest.$ac_ext >&5
-
-lt_cv_cc_needs_belf=no
-fi
-rm -f conftest.err conftest.$ac_objext \
- conftest$ac_exeext conftest.$ac_ext
- ac_ext=c
-ac_cpp='$CPP $CPPFLAGS'
-ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
-ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
-ac_compiler_gnu=$ac_cv_c_compiler_gnu
-
-fi
-echo "$as_me:$LINENO: result: $lt_cv_cc_needs_belf" >&5
-echo "${ECHO_T}$lt_cv_cc_needs_belf" >&6
- if test x"$lt_cv_cc_needs_belf" != x"yes"; then
- # this is probably gcc 2.8.0, egcs 1.0 or newer; no need for -belf
- CFLAGS="$SAVE_CFLAGS"
- fi
- ;;
-sparc*-*solaris*)
- # Find out which ABI we are using.
- echo 'int i;' > conftest.$ac_ext
- if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
- (eval $ac_compile) 2>&5
- ac_status=$?
- echo "$as_me:$LINENO: \$? = $ac_status" >&5
- (exit $ac_status); }; then
- case `/usr/bin/file conftest.o` in
- *64-bit*)
- case $lt_cv_prog_gnu_ld in
- yes*) LD="${LD-ld} -m elf64_sparc" ;;
- *) LD="${LD-ld} -64" ;;
- esac
- ;;
- esac
- fi
- rm -rf conftest*
- ;;
-esac
-
-need_locks="$enable_libtool_lock"
-
-ac_ext=c
-ac_cpp='$CPP $CPPFLAGS'
-ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
-ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
-ac_compiler_gnu=$ac_cv_c_compiler_gnu
-echo "$as_me:$LINENO: checking how to run the C preprocessor" >&5
-echo $ECHO_N "checking how to run the C preprocessor... $ECHO_C" >&6
-# On Suns, sometimes $CPP names a directory.
-if test -n "$CPP" && test -d "$CPP"; then
- CPP=
-fi
-if test -z "$CPP"; then
- if test "${ac_cv_prog_CPP+set}" = set; then
- echo $ECHO_N "(cached) $ECHO_C" >&6
-else
- # Double quotes because CPP needs to be expanded
- for CPP in "$CC -E" "$CC -E -traditional-cpp" "/lib/cpp"
- do
- ac_preproc_ok=false
-for ac_c_preproc_warn_flag in '' yes
-do
- # Use a header file that comes with gcc, so configuring glibc
- # with a fresh cross-compiler works.
- # Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
- # <limits.h> exists even on freestanding compilers.
- # On the NeXT, cc -E runs the code through the compiler's parser,
- # not just through cpp. "Syntax error" is here to catch this case.
- cat >conftest.$ac_ext <<_ACEOF
-/* confdefs.h. */
-_ACEOF
-cat confdefs.h >>conftest.$ac_ext
-cat >>conftest.$ac_ext <<_ACEOF
-/* end confdefs.h. */
-#ifdef __STDC__
-# include <limits.h>
-#else
-# include <assert.h>
-#endif
- Syntax error
-_ACEOF
-if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5
- (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
- ac_status=$?
- grep -v '^ *+' conftest.er1 >conftest.err
- rm -f conftest.er1
- cat conftest.err >&5
- echo "$as_me:$LINENO: \$? = $ac_status" >&5
- (exit $ac_status); } >/dev/null; then
- if test -s conftest.err; then
- ac_cpp_err=$ac_c_preproc_warn_flag
- ac_cpp_err=$ac_cpp_err$ac_c_werror_flag
- else
- ac_cpp_err=
- fi
-else
- ac_cpp_err=yes
-fi
-if test -z "$ac_cpp_err"; then
- :
-else
- echo "$as_me: failed program was:" >&5
-sed 's/^/| /' conftest.$ac_ext >&5
-
- # Broken: fails on valid input.
-continue
-fi
-rm -f conftest.err conftest.$ac_ext
-
- # OK, works on sane cases. Now check whether non-existent headers
- # can be detected and how.
- cat >conftest.$ac_ext <<_ACEOF
-/* confdefs.h. */
-_ACEOF
-cat confdefs.h >>conftest.$ac_ext
-cat >>conftest.$ac_ext <<_ACEOF
-/* end confdefs.h. */
-#include <ac_nonexistent.h>
-_ACEOF
-if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5
- (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
- ac_status=$?
- grep -v '^ *+' conftest.er1 >conftest.err
- rm -f conftest.er1
- cat conftest.err >&5
- echo "$as_me:$LINENO: \$? = $ac_status" >&5
- (exit $ac_status); } >/dev/null; then
- if test -s conftest.err; then
- ac_cpp_err=$ac_c_preproc_warn_flag
- ac_cpp_err=$ac_cpp_err$ac_c_werror_flag
- else
- ac_cpp_err=
- fi
-else
- ac_cpp_err=yes
-fi
-if test -z "$ac_cpp_err"; then
- # Broken: success on invalid input.
-continue
-else
- echo "$as_me: failed program was:" >&5
-sed 's/^/| /' conftest.$ac_ext >&5
-
- # Passes both tests.
-ac_preproc_ok=:
-break
-fi
-rm -f conftest.err conftest.$ac_ext
-
-done
-# Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped.
-rm -f conftest.err conftest.$ac_ext
-if $ac_preproc_ok; then
- break
-fi
-
- done
- ac_cv_prog_CPP=$CPP
-
-fi
- CPP=$ac_cv_prog_CPP
-else
- ac_cv_prog_CPP=$CPP
-fi
-echo "$as_me:$LINENO: result: $CPP" >&5
-echo "${ECHO_T}$CPP" >&6
-ac_preproc_ok=false
-for ac_c_preproc_warn_flag in '' yes
-do
- # Use a header file that comes with gcc, so configuring glibc
- # with a fresh cross-compiler works.
- # Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
- # <limits.h> exists even on freestanding compilers.
- # On the NeXT, cc -E runs the code through the compiler's parser,
- # not just through cpp. "Syntax error" is here to catch this case.
- cat >conftest.$ac_ext <<_ACEOF
-/* confdefs.h. */
-_ACEOF
-cat confdefs.h >>conftest.$ac_ext
-cat >>conftest.$ac_ext <<_ACEOF
-/* end confdefs.h. */
-#ifdef __STDC__
-# include <limits.h>
-#else
-# include <assert.h>
-#endif
- Syntax error
-_ACEOF
-if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5
- (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
- ac_status=$?
- grep -v '^ *+' conftest.er1 >conftest.err
- rm -f conftest.er1
- cat conftest.err >&5
- echo "$as_me:$LINENO: \$? = $ac_status" >&5
- (exit $ac_status); } >/dev/null; then
- if test -s conftest.err; then
- ac_cpp_err=$ac_c_preproc_warn_flag
- ac_cpp_err=$ac_cpp_err$ac_c_werror_flag
- else
- ac_cpp_err=
- fi
-else
- ac_cpp_err=yes
-fi
-if test -z "$ac_cpp_err"; then
- :
-else
- echo "$as_me: failed program was:" >&5
-sed 's/^/| /' conftest.$ac_ext >&5
-
- # Broken: fails on valid input.
-continue
-fi
-rm -f conftest.err conftest.$ac_ext
-
- # OK, works on sane cases. Now check whether non-existent headers
- # can be detected and how.
- cat >conftest.$ac_ext <<_ACEOF
-/* confdefs.h. */
-_ACEOF
-cat confdefs.h >>conftest.$ac_ext
-cat >>conftest.$ac_ext <<_ACEOF
-/* end confdefs.h. */
-#include <ac_nonexistent.h>
-_ACEOF
-if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5
- (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
- ac_status=$?
- grep -v '^ *+' conftest.er1 >conftest.err
- rm -f conftest.er1
- cat conftest.err >&5
- echo "$as_me:$LINENO: \$? = $ac_status" >&5
- (exit $ac_status); } >/dev/null; then
- if test -s conftest.err; then
- ac_cpp_err=$ac_c_preproc_warn_flag
- ac_cpp_err=$ac_cpp_err$ac_c_werror_flag
- else
- ac_cpp_err=
- fi
-else
- ac_cpp_err=yes
-fi
-if test -z "$ac_cpp_err"; then
- # Broken: success on invalid input.
-continue
-else
- echo "$as_me: failed program was:" >&5
-sed 's/^/| /' conftest.$ac_ext >&5
-
- # Passes both tests.
-ac_preproc_ok=:
-break
-fi
-rm -f conftest.err conftest.$ac_ext
-
-done
-# Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped.
-rm -f conftest.err conftest.$ac_ext
-if $ac_preproc_ok; then
- :
-else
- { { echo "$as_me:$LINENO: error: C preprocessor \"$CPP\" fails sanity check
-See \`config.log' for more details." >&5
-echo "$as_me: error: C preprocessor \"$CPP\" fails sanity check
-See \`config.log' for more details." >&2;}
- { (exit 1); exit 1; }; }
-fi
-
-ac_ext=c
-ac_cpp='$CPP $CPPFLAGS'
-ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
-ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
-ac_compiler_gnu=$ac_cv_c_compiler_gnu
-
-
-echo "$as_me:$LINENO: checking for ANSI C header files" >&5
-echo $ECHO_N "checking for ANSI C header files... $ECHO_C" >&6
-if test "${ac_cv_header_stdc+set}" = set; then
- echo $ECHO_N "(cached) $ECHO_C" >&6
-else
- cat >conftest.$ac_ext <<_ACEOF
-/* confdefs.h. */
-_ACEOF
-cat confdefs.h >>conftest.$ac_ext
-cat >>conftest.$ac_ext <<_ACEOF
-/* end confdefs.h. */
-#include <stdlib.h>
-#include <stdarg.h>
-#include <string.h>
-#include <float.h>
-
-int
-main ()
-{
-
- ;
- return 0;
-}
-_ACEOF
-rm -f conftest.$ac_objext
-if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
- (eval $ac_compile) 2>conftest.er1
- ac_status=$?
- grep -v '^ *+' conftest.er1 >conftest.err
- rm -f conftest.er1
- cat conftest.err >&5
- echo "$as_me:$LINENO: \$? = $ac_status" >&5
- (exit $ac_status); } &&
- { ac_try='test -z "$ac_c_werror_flag"
- || test ! -s conftest.err'
- { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
- (eval $ac_try) 2>&5
- ac_status=$?
- echo "$as_me:$LINENO: \$? = $ac_status" >&5
- (exit $ac_status); }; } &&
- { ac_try='test -s conftest.$ac_objext'
- { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
- (eval $ac_try) 2>&5
- ac_status=$?
- echo "$as_me:$LINENO: \$? = $ac_status" >&5
- (exit $ac_status); }; }; then
- ac_cv_header_stdc=yes
-else
- echo "$as_me: failed program was:" >&5
-sed 's/^/| /' conftest.$ac_ext >&5
-
-ac_cv_header_stdc=no
-fi
-rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
-
-if test $ac_cv_header_stdc = yes; then
- # SunOS 4.x string.h does not declare mem*, contrary to ANSI.
- cat >conftest.$ac_ext <<_ACEOF
-/* confdefs.h. */
-_ACEOF
-cat confdefs.h >>conftest.$ac_ext
-cat >>conftest.$ac_ext <<_ACEOF
-/* end confdefs.h. */
-#include <string.h>
-
-_ACEOF
-if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
- $EGREP "memchr" >/dev/null 2>&1; then
- :
-else
- ac_cv_header_stdc=no
-fi
-rm -f conftest*
-
-fi
-
-if test $ac_cv_header_stdc = yes; then
- # ISC 2.0.2 stdlib.h does not declare free, contrary to ANSI.
- cat >conftest.$ac_ext <<_ACEOF
-/* confdefs.h. */
-_ACEOF
-cat confdefs.h >>conftest.$ac_ext
-cat >>conftest.$ac_ext <<_ACEOF
-/* end confdefs.h. */
-#include <stdlib.h>
-
-_ACEOF
-if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
- $EGREP "free" >/dev/null 2>&1; then
- :
-else
- ac_cv_header_stdc=no
-fi
-rm -f conftest*
-
-fi
-
-if test $ac_cv_header_stdc = yes; then
- # /bin/cc in Irix-4.0.5 gets non-ANSI ctype macros unless using -ansi.
- if test "$cross_compiling" = yes; then
- :
-else
- cat >conftest.$ac_ext <<_ACEOF
-/* confdefs.h. */
-_ACEOF
-cat confdefs.h >>conftest.$ac_ext
-cat >>conftest.$ac_ext <<_ACEOF
-/* end confdefs.h. */
-#include <ctype.h>
-#if ((' ' & 0x0FF) == 0x020)
-# define ISLOWER(c) ('a' <= (c) && (c) <= 'z')
-# define TOUPPER(c) (ISLOWER(c) ? 'A' + ((c) - 'a') : (c))
-#else
-# define ISLOWER(c) \
- (('a' <= (c) && (c) <= 'i') \
- || ('j' <= (c) && (c) <= 'r') \
- || ('s' <= (c) && (c) <= 'z'))
-# define TOUPPER(c) (ISLOWER(c) ? ((c) | 0x40) : (c))
-#endif
-
-#define XOR(e, f) (((e) && !(f)) || (!(e) && (f)))
-int
-main ()
-{
- int i;
- for (i = 0; i < 256; i++)
- if (XOR (islower (i), ISLOWER (i))
- || toupper (i) != TOUPPER (i))
- exit(2);
- exit (0);
-}
-_ACEOF
-rm -f conftest$ac_exeext
-if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
- (eval $ac_link) 2>&5
- ac_status=$?
- echo "$as_me:$LINENO: \$? = $ac_status" >&5
- (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
- { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
- (eval $ac_try) 2>&5
- ac_status=$?
- echo "$as_me:$LINENO: \$? = $ac_status" >&5
- (exit $ac_status); }; }; then
- :
-else
- echo "$as_me: program exited with status $ac_status" >&5
-echo "$as_me: failed program was:" >&5
-sed 's/^/| /' conftest.$ac_ext >&5
-
-( exit $ac_status )
-ac_cv_header_stdc=no
-fi
-rm -f core *.core gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
-fi
-fi
-fi
-echo "$as_me:$LINENO: result: $ac_cv_header_stdc" >&5
-echo "${ECHO_T}$ac_cv_header_stdc" >&6
-if test $ac_cv_header_stdc = yes; then
-
-cat >>confdefs.h <<\_ACEOF
-#define STDC_HEADERS 1
-_ACEOF
-
-fi
-
-# On IRIX 5.3, sys/types and inttypes.h are conflicting.
-
-
-
-
-
-
-
-
-
-for ac_header in sys/types.h sys/stat.h stdlib.h string.h memory.h strings.h \
- inttypes.h stdint.h unistd.h
-do
-as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
-echo "$as_me:$LINENO: checking for $ac_header" >&5
-echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
-if eval "test \"\${$as_ac_Header+set}\" = set"; then
- echo $ECHO_N "(cached) $ECHO_C" >&6
-else
- cat >conftest.$ac_ext <<_ACEOF
-/* confdefs.h. */
-_ACEOF
-cat confdefs.h >>conftest.$ac_ext
-cat >>conftest.$ac_ext <<_ACEOF
-/* end confdefs.h. */
-$ac_includes_default
-
-#include <$ac_header>
-_ACEOF
-rm -f conftest.$ac_objext
-if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
- (eval $ac_compile) 2>conftest.er1
- ac_status=$?
- grep -v '^ *+' conftest.er1 >conftest.err
- rm -f conftest.er1
- cat conftest.err >&5
- echo "$as_me:$LINENO: \$? = $ac_status" >&5
- (exit $ac_status); } &&
- { ac_try='test -z "$ac_c_werror_flag"
- || test ! -s conftest.err'
- { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
- (eval $ac_try) 2>&5
- ac_status=$?
- echo "$as_me:$LINENO: \$? = $ac_status" >&5
- (exit $ac_status); }; } &&
- { ac_try='test -s conftest.$ac_objext'
- { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
- (eval $ac_try) 2>&5
- ac_status=$?
- echo "$as_me:$LINENO: \$? = $ac_status" >&5
- (exit $ac_status); }; }; then
- eval "$as_ac_Header=yes"
-else
- echo "$as_me: failed program was:" >&5
-sed 's/^/| /' conftest.$ac_ext >&5
-
-eval "$as_ac_Header=no"
-fi
-rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
-fi
-echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5
-echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
-if test `eval echo '${'$as_ac_Header'}'` = yes; then
- cat >>confdefs.h <<_ACEOF
-#define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
-_ACEOF
-
-fi
-
-done
-
-
-
-for ac_header in dlfcn.h
-do
-as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
-echo "$as_me:$LINENO: checking for $ac_header" >&5
-echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
-if eval "test \"\${$as_ac_Header+set}\" = set"; then
- echo $ECHO_N "(cached) $ECHO_C" >&6
-else
- cat >conftest.$ac_ext <<_ACEOF
-/* confdefs.h. */
-_ACEOF
-cat confdefs.h >>conftest.$ac_ext
-cat >>conftest.$ac_ext <<_ACEOF
-/* end confdefs.h. */
-$ac_includes_default
-
-#include <$ac_header>
-_ACEOF
-rm -f conftest.$ac_objext
-if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
- (eval $ac_compile) 2>conftest.er1
- ac_status=$?
- grep -v '^ *+' conftest.er1 >conftest.err
- rm -f conftest.er1
- cat conftest.err >&5
- echo "$as_me:$LINENO: \$? = $ac_status" >&5
- (exit $ac_status); } &&
- { ac_try='test -z "$ac_c_werror_flag"
- || test ! -s conftest.err'
- { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
- (eval $ac_try) 2>&5
- ac_status=$?
- echo "$as_me:$LINENO: \$? = $ac_status" >&5
- (exit $ac_status); }; } &&
- { ac_try='test -s conftest.$ac_objext'
- { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
- (eval $ac_try) 2>&5
- ac_status=$?
- echo "$as_me:$LINENO: \$? = $ac_status" >&5
- (exit $ac_status); }; }; then
- eval "$as_ac_Header=yes"
-else
- echo "$as_me: failed program was:" >&5
-sed 's/^/| /' conftest.$ac_ext >&5
-
-eval "$as_ac_Header=no"
-fi
-rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
-fi
-echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5
-echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
-if test `eval echo '${'$as_ac_Header'}'` = yes; then
- cat >>confdefs.h <<_ACEOF
-#define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
-_ACEOF
-
-fi
-
-done
-
-
-
-# This can be used to rebuild libtool when needed
-LIBTOOL_DEPS="$ltmain"
-
-# Always use our own libtool.
-LIBTOOL='$(SHELL) $(top_builddir)/libtool'
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-test -z "$LN_S" && LN_S="ln -s"
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-if test -n "${ZSH_VERSION+set}" ; then
- setopt NO_GLOB_SUBST
-fi
-
-echo "$as_me:$LINENO: checking for objdir" >&5
-echo $ECHO_N "checking for objdir... $ECHO_C" >&6
-if test "${lt_cv_objdir+set}" = set; then
- echo $ECHO_N "(cached) $ECHO_C" >&6
-else
- rm -f .libs 2>/dev/null
-mkdir .libs 2>/dev/null
-if test -d .libs; then
- lt_cv_objdir=.libs
-else
- # MS-DOS does not allow filenames that begin with a dot.
- lt_cv_objdir=_libs
-fi
-rmdir .libs 2>/dev/null
-fi
-echo "$as_me:$LINENO: result: $lt_cv_objdir" >&5
-echo "${ECHO_T}$lt_cv_objdir" >&6
-objdir=$lt_cv_objdir
-
-
-
-
-
-cat >>confdefs.h <<_ACEOF
-#define LT_OBJDIR "$lt_cv_objdir/"
-_ACEOF
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-case $host_os in
-aix3*)
- # AIX sometimes has problems with the GCC collect2 program. For some
- # reason, if we set the COLLECT_NAMES environment variable, the problems
- # vanish in a puff of smoke.
- if test "X${COLLECT_NAMES+set}" != Xset; then
- COLLECT_NAMES=
- export COLLECT_NAMES
- fi
- ;;
-esac
-
-# Sed substitution that helps us do robust quoting. It backslashifies
-# metacharacters that are still active within double-quoted strings.
-sed_quote_subst='s/\(["`$\\]\)/\\\1/g'
-
-# Same as above, but do not quote variable references.
-double_quote_subst='s/\(["`\\]\)/\\\1/g'
-
-# Sed substitution to delay expansion of an escaped shell variable in a
-# double_quote_subst'ed string.
-delay_variable_subst='s/\\\\\\\\\\\$/\\\\\\$/g'
-
-# Sed substitution to delay expansion of an escaped single quote.
-delay_single_quote_subst='s/'\''/'\'\\\\\\\'\''/g'
-
-# Sed substitution to avoid accidental globbing in evaled expressions
-no_glob_subst='s/\*/\\\*/g'
-
-# Global variables:
-ofile=libtool
-can_build_shared=yes
-
-# All known linkers require a `.a' archive for static linking (except MSVC,
-# which needs '.lib').
-libext=a
-
-with_gnu_ld="$lt_cv_prog_gnu_ld"
-
-old_CC="$CC"
-old_CFLAGS="$CFLAGS"
-
-# Set sane defaults for various variables
-test -z "$CC" && CC=cc
-test -z "$LTCC" && LTCC=$CC
-test -z "$LTCFLAGS" && LTCFLAGS=$CFLAGS
-test -z "$LD" && LD=ld
-test -z "$ac_objext" && ac_objext=o
-
-for cc_temp in $compiler""; do
- case $cc_temp in
- compile | *[\\/]compile | ccache | *[\\/]ccache ) ;;
- distcc | *[\\/]distcc | purify | *[\\/]purify ) ;;
- \-*) ;;
- *) break;;
- esac
-done
-cc_basename=`$ECHO "X$cc_temp" | $Xsed -e 's%.*/%%' -e "s%^$host_alias-%%"`
-
-
-# Only perform the check for file, if the check method requires it
-test -z "$MAGIC_CMD" && MAGIC_CMD=file
-case $deplibs_check_method in
-file_magic*)
- if test "$file_magic_cmd" = '$MAGIC_CMD'; then
- echo "$as_me:$LINENO: checking for ${ac_tool_prefix}file" >&5
-echo $ECHO_N "checking for ${ac_tool_prefix}file... $ECHO_C" >&6
-if test "${lt_cv_path_MAGIC_CMD+set}" = set; then
- echo $ECHO_N "(cached) $ECHO_C" >&6
-else
- case $MAGIC_CMD in
-[\\/*] | ?:[\\/]*)
- lt_cv_path_MAGIC_CMD="$MAGIC_CMD" # Let the user override the test with a path.
- ;;
-*)
- lt_save_MAGIC_CMD="$MAGIC_CMD"
- lt_save_ifs="$IFS"; IFS=$PATH_SEPARATOR
- ac_dummy="/usr/bin$PATH_SEPARATOR$PATH"
- for ac_dir in $ac_dummy; do
- IFS="$lt_save_ifs"
- test -z "$ac_dir" && ac_dir=.
- if test -f $ac_dir/${ac_tool_prefix}file; then
- lt_cv_path_MAGIC_CMD="$ac_dir/${ac_tool_prefix}file"
- if test -n "$file_magic_test_file"; then
- case $deplibs_check_method in
- "file_magic "*)
- file_magic_regex=`expr "$deplibs_check_method" : "file_magic \(.*\)"`
- 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 <<_LT_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
-
-_LT_EOF
- fi ;;
- esac
- fi
- break
- fi
- done
- IFS="$lt_save_ifs"
- MAGIC_CMD="$lt_save_MAGIC_CMD"
- ;;
-esac
-fi
-
-MAGIC_CMD="$lt_cv_path_MAGIC_CMD"
-if test -n "$MAGIC_CMD"; then
- echo "$as_me:$LINENO: result: $MAGIC_CMD" >&5
-echo "${ECHO_T}$MAGIC_CMD" >&6
-else
- echo "$as_me:$LINENO: result: no" >&5
-echo "${ECHO_T}no" >&6
-fi
-
-
-
-
-
-if test -z "$lt_cv_path_MAGIC_CMD"; then
- if test -n "$ac_tool_prefix"; then
- echo "$as_me:$LINENO: checking for file" >&5
-echo $ECHO_N "checking for file... $ECHO_C" >&6
-if test "${lt_cv_path_MAGIC_CMD+set}" = set; then
- echo $ECHO_N "(cached) $ECHO_C" >&6
-else
- case $MAGIC_CMD in
-[\\/*] | ?:[\\/]*)
- lt_cv_path_MAGIC_CMD="$MAGIC_CMD" # Let the user override the test with a path.
- ;;
-*)
- lt_save_MAGIC_CMD="$MAGIC_CMD"
- lt_save_ifs="$IFS"; IFS=$PATH_SEPARATOR
- ac_dummy="/usr/bin$PATH_SEPARATOR$PATH"
- for ac_dir in $ac_dummy; do
- IFS="$lt_save_ifs"
- test -z "$ac_dir" && ac_dir=.
- if test -f $ac_dir/file; then
- lt_cv_path_MAGIC_CMD="$ac_dir/file"
- if test -n "$file_magic_test_file"; then
- case $deplibs_check_method in
- "file_magic "*)
- file_magic_regex=`expr "$deplibs_check_method" : "file_magic \(.*\)"`
- 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 <<_LT_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
-
-_LT_EOF
- fi ;;
- esac
- fi
- break
- fi
- done
- IFS="$lt_save_ifs"
- MAGIC_CMD="$lt_save_MAGIC_CMD"
- ;;
-esac
-fi
-
-MAGIC_CMD="$lt_cv_path_MAGIC_CMD"
-if test -n "$MAGIC_CMD"; then
- echo "$as_me:$LINENO: result: $MAGIC_CMD" >&5
-echo "${ECHO_T}$MAGIC_CMD" >&6
-else
- echo "$as_me:$LINENO: result: no" >&5
-echo "${ECHO_T}no" >&6
-fi
-
-
- else
- MAGIC_CMD=:
- fi
-fi
-
- fi
- ;;
-esac
-
-# Use C for the default configuration in the libtool script
-
-lt_save_CC="$CC"
-ac_ext=c
-ac_cpp='$CPP $CPPFLAGS'
-ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
-ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
-ac_compiler_gnu=$ac_cv_c_compiler_gnu
-
-
-# Source file extension for C test sources.
-ac_ext=c
-
-# Object file extension for compiled C test sources.
-objext=o
-objext=$objext
-
-# Code to be used in simple compile tests
-lt_simple_compile_test_code="int some_variable = 0;"
-
-# Code to be used in simple link tests
-lt_simple_link_test_code='int main(){return(0);}'
-
-
-
-
-
-
-
-# If no C compiler was specified, use CC.
-LTCC=${LTCC-"$CC"}
-
-# If no C compiler flags were specified, use CFLAGS.
-LTCFLAGS=${LTCFLAGS-"$CFLAGS"}
-
-# Allow CC to be a program name with arguments.
-compiler=$CC
-
-# Save the default compiler, since it gets overwritten when the other
-# tags are being tested, and _LT_TAGVAR(compiler, []) is a NOP.
-compiler_DEFAULT=$CC
-
-# save warnings/boilerplate of simple test code
-ac_outfile=conftest.$ac_objext
-echo "$lt_simple_compile_test_code" >conftest.$ac_ext
-eval "$ac_compile" 2>&1 >/dev/null | $SED '/^$/d; /^ *+/d' >conftest.err
-_lt_compiler_boilerplate=`cat conftest.err`
-$RM conftest*
-
-ac_outfile=conftest.$ac_objext
-echo "$lt_simple_link_test_code" >conftest.$ac_ext
-eval "$ac_link" 2>&1 >/dev/null | $SED '/^$/d; /^ *+/d' >conftest.err
-_lt_linker_boilerplate=`cat conftest.err`
-$RM conftest*
-
-
-## CAVEAT EMPTOR:
-## There is no encapsulation within the following macros, do not change
-## the running order or otherwise move them around unless you know exactly
-## what you are doing...
-if test -n "$compiler"; then
-
-lt_prog_compiler_no_builtin_flag=
-
-if test "$GCC" = yes; then
- lt_prog_compiler_no_builtin_flag=' -fno-builtin'
-
- echo "$as_me:$LINENO: checking if $compiler supports -fno-rtti -fno-exceptions" >&5
-echo $ECHO_N "checking if $compiler supports -fno-rtti -fno-exceptions... $ECHO_C" >&6
-if test "${lt_cv_prog_compiler_rtti_exceptions+set}" = set; then
- echo $ECHO_N "(cached) $ECHO_C" >&6
-else
- lt_cv_prog_compiler_rtti_exceptions=no
- ac_outfile=conftest.$ac_objext
- echo "$lt_simple_compile_test_code" > conftest.$ac_ext
- lt_compiler_flag="-fno-rtti -fno-exceptions"
- # Insert the option either (1) after the last *FLAGS variable, or
- # (2) before a word containing "conftest.", or (3) at the end.
- # Note that $ac_compile itself does not contain backslashes and begins
- # with a dollar sign (not a hyphen), so the echo should work correctly.
- # The option is referenced via a variable to avoid confusing sed.
- lt_compile=`echo "$ac_compile" | $SED \
- -e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \
- -e 's: [^ ]*conftest\.: $lt_compiler_flag&:; t' \
- -e 's:$: $lt_compiler_flag:'`
- (eval echo "\"\$as_me:5923: $lt_compile\"" >&5)
- (eval "$lt_compile" 2>conftest.err)
- ac_status=$?
- cat conftest.err >&5
- echo "$as_me:5927: \$? = $ac_status" >&5
- if (exit $ac_status) && test -s "$ac_outfile"; then
- # The compiler can only warn and ignore the option if not recognized
- # So say no if there are warnings other than the usual output.
- $ECHO "X$_lt_compiler_boilerplate" | $Xsed -e '/^$/d' >conftest.exp
- $SED '/^$/d; /^ *+/d' conftest.err >conftest.er2
- if test ! -s conftest.er2 || diff conftest.exp conftest.er2 >/dev/null; then
- lt_cv_prog_compiler_rtti_exceptions=yes
- fi
- fi
- $RM conftest*
-
-fi
-echo "$as_me:$LINENO: result: $lt_cv_prog_compiler_rtti_exceptions" >&5
-echo "${ECHO_T}$lt_cv_prog_compiler_rtti_exceptions" >&6
-
-if test x"$lt_cv_prog_compiler_rtti_exceptions" = xyes; then
- lt_prog_compiler_no_builtin_flag="$lt_prog_compiler_no_builtin_flag -fno-rtti -fno-exceptions"
-else
- :
-fi
-
-fi
-
-
-
-
-
-
- lt_prog_compiler_wl=
-lt_prog_compiler_pic=
-lt_prog_compiler_static=
-
-echo "$as_me:$LINENO: checking for $compiler option to produce PIC" >&5
-echo $ECHO_N "checking for $compiler option to produce PIC... $ECHO_C" >&6
-
- if test "$GCC" = yes; then
- lt_prog_compiler_wl='-Wl,'
- lt_prog_compiler_static='-static'
-
- case $host_os in
- aix*)
- # All AIX code is PIC.
- if test "$host_cpu" = ia64; then
- # AIX 5 now supports IA64 processor
- lt_prog_compiler_static='-Bstatic'
- fi
- ;;
-
- amigaos*)
- if test "$host_cpu" = m68k; then
- # FIXME: we need at least 68020 code to build shared libraries, but
- # adding the `-m68020' flag to GCC prevents building anything better,
- # like `-m68040'.
- lt_prog_compiler_pic='-m68020 -resident32 -malways-restore-a4'
- fi
- ;;
-
- beos* | irix5* | irix6* | nonstopux* | osf3* | osf4* | osf5*)
- # PIC is the default for these OSes.
- ;;
-
- mingw* | cygwin* | pw32* | os2*)
- # This hack is so that the source file can tell whether it is being
- # built for inclusion in a dll (and should export symbols for example).
- # Although the cygwin gcc ignores -fPIC, still need this for old-style
- # (--disable-auto-import) libraries
- lt_prog_compiler_pic='-DDLL_EXPORT'
- ;;
-
- darwin* | rhapsody*)
- # PIC is the default on this platform
- # Common symbols not allowed in MH_DYLIB files
- lt_prog_compiler_pic='-fno-common'
- ;;
-
- hpux*)
- # PIC is the default for IA64 HP-UX and 64-bit HP-UX, but
- # not for PA HP-UX.
- case $host_cpu in
- hppa*64*|ia64*)
- # +Z the default
- ;;
- *)
- lt_prog_compiler_pic='-fPIC'
- ;;
- esac
- ;;
-
- interix[3-9]*)
- # Interix 3.x gcc -fpic/-fPIC options generate broken code.
- # Instead, we relocate shared libraries at runtime.
- ;;
-
- msdosdjgpp*)
- # Just because we use GCC doesn't mean we suddenly get shared libraries
- # on systems that don't support them.
- lt_prog_compiler_can_build_shared=no
- enable_shared=no
- ;;
-
- *nto* | *qnx*)
- # QNX uses GNU C++, but need to define -shared option too, otherwise
- # it will coredump.
- lt_prog_compiler_pic='-fPIC -shared'
- ;;
-
- sysv4*MP*)
- if test -d /usr/nec; then
- lt_prog_compiler_pic=-Kconform_pic
- fi
- ;;
-
- *)
- lt_prog_compiler_pic='-fPIC'
- ;;
- esac
- else
- # PORTME Check for flag to pass linker flags through the system compiler.
- case $host_os in
- aix*)
- lt_prog_compiler_wl='-Wl,'
- if test "$host_cpu" = ia64; then
- # AIX 5 now supports IA64 processor
- lt_prog_compiler_static='-Bstatic'
- else
- lt_prog_compiler_static='-bnso -bI:/lib/syscalls.exp'
- fi
- ;;
- darwin*)
- # PIC is the default on this platform
- # Common symbols not allowed in MH_DYLIB files
- case $cc_basename in
- xlc*)
- lt_prog_compiler_pic='-qnocommon'
- lt_prog_compiler_wl='-Wl,'
- ;;
- esac
- ;;
-
- mingw* | cygwin* | pw32* | os2*)
- # This hack is so that the source file can tell whether it is being
- # built for inclusion in a dll (and should export symbols for example).
- lt_prog_compiler_pic='-DDLL_EXPORT'
- ;;
-
- hpux9* | hpux10* | hpux11*)
- lt_prog_compiler_wl='-Wl,'
- # PIC is the default for IA64 HP-UX and 64-bit HP-UX, but
- # not for PA HP-UX.
- case $host_cpu in
- hppa*64*|ia64*)
- # +Z the default
- ;;
- *)
- lt_prog_compiler_pic='+Z'
- ;;
- esac
- # Is there a better lt_prog_compiler_static that works with the bundled CC?
- lt_prog_compiler_static='${wl}-a ${wl}archive'
- ;;
-
- irix5* | irix6* | nonstopux*)
- lt_prog_compiler_wl='-Wl,'
- # PIC (with -KPIC) is the default.
- lt_prog_compiler_static='-non_shared'
- ;;
-
- linux* | k*bsd*-gnu)
- case $cc_basename in
- icc* | ecc*)
- lt_prog_compiler_wl='-Wl,'
- lt_prog_compiler_pic='-KPIC'
- lt_prog_compiler_static='-static'
- ;;
- pgcc* | pgf77* | pgf90* | pgf95*)
- # Portland Group compilers (*not* the Pentium gcc compiler,
- # which looks to be a dead project)
- lt_prog_compiler_wl='-Wl,'
- lt_prog_compiler_pic='-fpic'
- lt_prog_compiler_static='-Bstatic'
- ;;
- ccc*)
- lt_prog_compiler_wl='-Wl,'
- # All Alpha code is PIC.
- lt_prog_compiler_static='-non_shared'
- ;;
- *)
- case `$CC -V 2>&1 | sed 5q` in
- *Sun\ C*)
- # Sun C 5.9
- lt_prog_compiler_pic='-KPIC'
- lt_prog_compiler_static='-Bstatic'
- lt_prog_compiler_wl='-Wl,'
- ;;
- *Sun\ F*)
- # Sun Fortran 8.3 passes all unrecognized flags to the linker
- lt_prog_compiler_pic='-KPIC'
- lt_prog_compiler_static='-Bstatic'
- lt_prog_compiler_wl=''
- ;;
- esac
- ;;
- esac
- ;;
-
- newsos6)
- lt_prog_compiler_pic='-KPIC'
- lt_prog_compiler_static='-Bstatic'
- ;;
-
- *nto* | *qnx*)
- # QNX uses GNU C++, but need to define -shared option too, otherwise
- # it will coredump.
- lt_prog_compiler_pic='-fPIC -shared'
- ;;
-
- osf3* | osf4* | osf5*)
- lt_prog_compiler_wl='-Wl,'
- # All OSF/1 code is PIC.
- lt_prog_compiler_static='-non_shared'
- ;;
-
- rdos*)
- lt_prog_compiler_static='-non_shared'
- ;;
-
- solaris*)
- lt_prog_compiler_pic='-KPIC'
- lt_prog_compiler_static='-Bstatic'
- case $cc_basename in
- f77* | f90* | f95*)
- lt_prog_compiler_wl='-Qoption ld ';;
- *)
- lt_prog_compiler_wl='-Wl,';;
- esac
- ;;
-
- sunos4*)
- lt_prog_compiler_wl='-Qoption ld '
- lt_prog_compiler_pic='-PIC'
- lt_prog_compiler_static='-Bstatic'
- ;;
-
- sysv4 | sysv4.2uw2* | sysv4.3*)
- lt_prog_compiler_wl='-Wl,'
- lt_prog_compiler_pic='-KPIC'
- lt_prog_compiler_static='-Bstatic'
- ;;
-
- sysv4*MP*)
- if test -d /usr/nec ;then
- lt_prog_compiler_pic='-Kconform_pic'
- lt_prog_compiler_static='-Bstatic'
- fi
- ;;
-
- sysv5* | unixware* | sco3.2v5* | sco5v6* | OpenUNIX*)
- lt_prog_compiler_wl='-Wl,'
- lt_prog_compiler_pic='-KPIC'
- lt_prog_compiler_static='-Bstatic'
- ;;
-
- unicos*)
- lt_prog_compiler_wl='-Wl,'
- lt_prog_compiler_can_build_shared=no
- ;;
-
- uts4*)
- lt_prog_compiler_pic='-pic'
- lt_prog_compiler_static='-Bstatic'
- ;;
-
- *)
- lt_prog_compiler_can_build_shared=no
- ;;
- esac
- fi
-
-case $host_os in
- # For platforms which do not support PIC, -DPIC is meaningless:
- *djgpp*)
- lt_prog_compiler_pic=
- ;;
- *)
- lt_prog_compiler_pic="$lt_prog_compiler_pic -DPIC"
- ;;
-esac
-echo "$as_me:$LINENO: result: $lt_prog_compiler_pic" >&5
-echo "${ECHO_T}$lt_prog_compiler_pic" >&6
-
-
-
-
-
-
-#
-# Check to make sure the PIC flag actually works.
-#
-if test -n "$lt_prog_compiler_pic"; then
- echo "$as_me:$LINENO: checking if $compiler PIC flag $lt_prog_compiler_pic works" >&5
-echo $ECHO_N "checking if $compiler PIC flag $lt_prog_compiler_pic works... $ECHO_C" >&6
-if test "${lt_prog_compiler_pic_works+set}" = set; then
- echo $ECHO_N "(cached) $ECHO_C" >&6
-else
- lt_prog_compiler_pic_works=no
- ac_outfile=conftest.$ac_objext
- echo "$lt_simple_compile_test_code" > conftest.$ac_ext
- lt_compiler_flag="$lt_prog_compiler_pic -DPIC"
- # Insert the option either (1) after the last *FLAGS variable, or
- # (2) before a word containing "conftest.", or (3) at the end.
- # Note that $ac_compile itself does not contain backslashes and begins
- # with a dollar sign (not a hyphen), so the echo should work correctly.
- # The option is referenced via a variable to avoid confusing sed.
- lt_compile=`echo "$ac_compile" | $SED \
- -e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \
- -e 's: [^ ]*conftest\.: $lt_compiler_flag&:; t' \
- -e 's:$: $lt_compiler_flag:'`
- (eval echo "\"\$as_me:6245: $lt_compile\"" >&5)
- (eval "$lt_compile" 2>conftest.err)
- ac_status=$?
- cat conftest.err >&5
- echo "$as_me:6249: \$? = $ac_status" >&5
- if (exit $ac_status) && test -s "$ac_outfile"; then
- # The compiler can only warn and ignore the option if not recognized
- # So say no if there are warnings other than the usual output.
- $ECHO "X$_lt_compiler_boilerplate" | $Xsed -e '/^$/d' >conftest.exp
- $SED '/^$/d; /^ *+/d' conftest.err >conftest.er2
- if test ! -s conftest.er2 || diff conftest.exp conftest.er2 >/dev/null; then
- lt_prog_compiler_pic_works=yes
- fi
- fi
- $RM conftest*
-
-fi
-echo "$as_me:$LINENO: result: $lt_prog_compiler_pic_works" >&5
-echo "${ECHO_T}$lt_prog_compiler_pic_works" >&6
-
-if test x"$lt_prog_compiler_pic_works" = xyes; then
- case $lt_prog_compiler_pic in
- "" | " "*) ;;
- *) lt_prog_compiler_pic=" $lt_prog_compiler_pic" ;;
- esac
-else
- lt_prog_compiler_pic=
- lt_prog_compiler_can_build_shared=no
-fi
-
-fi
-
-
-
-
-
-
-#
-# Check to make sure the static flag actually works.
-#
-wl=$lt_prog_compiler_wl eval lt_tmp_static_flag=\"$lt_prog_compiler_static\"
-echo "$as_me:$LINENO: checking if $compiler static flag $lt_tmp_static_flag works" >&5
-echo $ECHO_N "checking if $compiler static flag $lt_tmp_static_flag works... $ECHO_C" >&6
-if test "${lt_prog_compiler_static_works+set}" = set; then
- echo $ECHO_N "(cached) $ECHO_C" >&6
-else
- lt_prog_compiler_static_works=no
- save_LDFLAGS="$LDFLAGS"
- LDFLAGS="$LDFLAGS $lt_tmp_static_flag"
- echo "$lt_simple_link_test_code" > conftest.$ac_ext
- if (eval $ac_link 2>conftest.err) && test -s conftest$ac_exeext; then
- # The linker can only warn and ignore the option if not recognized
- # So say no if there are warnings
- if test -s conftest.err; then
- # Append any errors to the config.log.
- cat conftest.err 1>&5
- $ECHO "X$_lt_linker_boilerplate" | $Xsed -e '/^$/d' > conftest.exp
- $SED '/^$/d; /^ *+/d' conftest.err >conftest.er2
- if diff conftest.exp conftest.er2 >/dev/null; then
- lt_prog_compiler_static_works=yes
- fi
- else
- lt_prog_compiler_static_works=yes
- fi
- fi
- $RM conftest*
- LDFLAGS="$save_LDFLAGS"
-
-fi
-echo "$as_me:$LINENO: result: $lt_prog_compiler_static_works" >&5
-echo "${ECHO_T}$lt_prog_compiler_static_works" >&6
-
-if test x"$lt_prog_compiler_static_works" = xyes; then
- :
-else
- lt_prog_compiler_static=
-fi
-
-
-
-
-
-
-
- echo "$as_me:$LINENO: checking if $compiler supports -c -o file.$ac_objext" >&5
-echo $ECHO_N "checking if $compiler supports -c -o file.$ac_objext... $ECHO_C" >&6
-if test "${lt_cv_prog_compiler_c_o+set}" = set; then
- echo $ECHO_N "(cached) $ECHO_C" >&6
-else
- lt_cv_prog_compiler_c_o=no
- $RM -r conftest 2>/dev/null
- mkdir conftest
- cd conftest
- mkdir out
- echo "$lt_simple_compile_test_code" > conftest.$ac_ext
-
- lt_compiler_flag="-o out/conftest2.$ac_objext"
- # Insert the option either (1) after the last *FLAGS variable, or
- # (2) before a word containing "conftest.", or (3) at the end.
- # Note that $ac_compile itself does not contain backslashes and begins
- # with a dollar sign (not a hyphen), so the echo should work correctly.
- lt_compile=`echo "$ac_compile" | $SED \
- -e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \
- -e 's: [^ ]*conftest\.: $lt_compiler_flag&:; t' \
- -e 's:$: $lt_compiler_flag:'`
- (eval echo "\"\$as_me:6350: $lt_compile\"" >&5)
- (eval "$lt_compile" 2>out/conftest.err)
- ac_status=$?
- cat out/conftest.err >&5
- echo "$as_me:6354: \$? = $ac_status" >&5
- if (exit $ac_status) && test -s out/conftest2.$ac_objext
- then
- # The compiler can only warn and ignore the option if not recognized
- # So say no if there are warnings
- $ECHO "X$_lt_compiler_boilerplate" | $Xsed -e '/^$/d' > out/conftest.exp
- $SED '/^$/d; /^ *+/d' out/conftest.err >out/conftest.er2
- if test ! -s out/conftest.er2 || diff out/conftest.exp out/conftest.er2 >/dev/null; then
- lt_cv_prog_compiler_c_o=yes
- fi
- fi
- chmod u+w . 2>&5
- $RM conftest*
- # SGI C++ compiler will create directory out/ii_files/ for
- # template instantiation
- test -d out/ii_files && $RM out/ii_files/* && rmdir out/ii_files
- $RM out/* && rmdir out
- cd ..
- $RM -r conftest
- $RM conftest*
-
-fi
-echo "$as_me:$LINENO: result: $lt_cv_prog_compiler_c_o" >&5
-echo "${ECHO_T}$lt_cv_prog_compiler_c_o" >&6
-
-
-
-
-
-
- echo "$as_me:$LINENO: checking if $compiler supports -c -o file.$ac_objext" >&5
-echo $ECHO_N "checking if $compiler supports -c -o file.$ac_objext... $ECHO_C" >&6
-if test "${lt_cv_prog_compiler_c_o+set}" = set; then
- echo $ECHO_N "(cached) $ECHO_C" >&6
-else
- lt_cv_prog_compiler_c_o=no
- $RM -r conftest 2>/dev/null
- mkdir conftest
- cd conftest
- mkdir out
- echo "$lt_simple_compile_test_code" > conftest.$ac_ext
-
- lt_compiler_flag="-o out/conftest2.$ac_objext"
- # Insert the option either (1) after the last *FLAGS variable, or
- # (2) before a word containing "conftest.", or (3) at the end.
- # Note that $ac_compile itself does not contain backslashes and begins
- # with a dollar sign (not a hyphen), so the echo should work correctly.
- lt_compile=`echo "$ac_compile" | $SED \
- -e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \
- -e 's: [^ ]*conftest\.: $lt_compiler_flag&:; t' \
- -e 's:$: $lt_compiler_flag:'`
- (eval echo "\"\$as_me:6405: $lt_compile\"" >&5)
- (eval "$lt_compile" 2>out/conftest.err)
- ac_status=$?
- cat out/conftest.err >&5
- echo "$as_me:6409: \$? = $ac_status" >&5
- if (exit $ac_status) && test -s out/conftest2.$ac_objext
- then
- # The compiler can only warn and ignore the option if not recognized
- # So say no if there are warnings
- $ECHO "X$_lt_compiler_boilerplate" | $Xsed -e '/^$/d' > out/conftest.exp
- $SED '/^$/d; /^ *+/d' out/conftest.err >out/conftest.er2
- if test ! -s out/conftest.er2 || diff out/conftest.exp out/conftest.er2 >/dev/null; then
- lt_cv_prog_compiler_c_o=yes
- fi
- fi
- chmod u+w . 2>&5
- $RM conftest*
- # SGI C++ compiler will create directory out/ii_files/ for
- # template instantiation
- test -d out/ii_files && $RM out/ii_files/* && rmdir out/ii_files
- $RM out/* && rmdir out
- cd ..
- $RM -r conftest
- $RM conftest*
-
-fi
-echo "$as_me:$LINENO: result: $lt_cv_prog_compiler_c_o" >&5
-echo "${ECHO_T}$lt_cv_prog_compiler_c_o" >&6
-
-
-
-
-hard_links="nottested"
-if test "$lt_cv_prog_compiler_c_o" = no && test "$need_locks" != no; then
- # do not overwrite the value of need_locks provided by the user
- echo "$as_me:$LINENO: checking if we can lock with hard links" >&5
-echo $ECHO_N "checking if we can lock with hard links... $ECHO_C" >&6
- hard_links=yes
- $RM conftest*
- ln conftest.a conftest.b 2>/dev/null && hard_links=no
- touch conftest.a
- ln conftest.a conftest.b 2>&5 || hard_links=no
- ln conftest.a conftest.b 2>/dev/null && hard_links=no
- echo "$as_me:$LINENO: result: $hard_links" >&5
-echo "${ECHO_T}$hard_links" >&6
- if test "$hard_links" = no; then
- { echo "$as_me:$LINENO: WARNING: \`$CC' does not support \`-c -o', so \`make -j' may be unsafe" >&5
-echo "$as_me: WARNING: \`$CC' does not support \`-c -o', so \`make -j' may be unsafe" >&2;}
- need_locks=warn
- fi
-else
- need_locks=no
-fi
-
-
-
-
-
-
- echo "$as_me:$LINENO: checking whether the $compiler linker ($LD) supports shared libraries" >&5
-echo $ECHO_N "checking whether the $compiler linker ($LD) supports shared libraries... $ECHO_C" >&6
-
- runpath_var=
- allow_undefined_flag=
- always_export_symbols=no
- archive_cmds=
- archive_expsym_cmds=
- compiler_needs_object=no
- enable_shared_with_static_runtimes=no
- export_dynamic_flag_spec=
- export_symbols_cmds='$NM $libobjs $convenience | $global_symbol_pipe | $SED '\''s/.* //'\'' | sort | uniq > $export_symbols'
- hardcode_automatic=no
- hardcode_direct=no
- hardcode_direct_absolute=no
- hardcode_libdir_flag_spec=
- hardcode_libdir_flag_spec_ld=
- hardcode_libdir_separator=
- hardcode_minus_L=no
- hardcode_shlibpath_var=unsupported
- inherit_rpath=no
- link_all_deplibs=unknown
- module_cmds=
- module_expsym_cmds=
- old_archive_from_new_cmds=
- old_archive_from_expsyms_cmds=
- thread_safe_flag_spec=
- whole_archive_flag_spec=
- # include_expsyms should be a list of space-separated symbols to be *always*
- # included in the symbol list
- include_expsyms=
- # exclude_expsyms can be an extended regexp of symbols to exclude
- # it will be wrapped by ` (' and `)$', so one must not match beginning or
- # end of line. Example: `a|bc|.*d.*' will exclude the symbols `a' and `bc',
- # as well as any symbol that contains `d'.
- exclude_expsyms="_GLOBAL_OFFSET_TABLE_"
- # Although _GLOBAL_OFFSET_TABLE_ is a valid symbol C name, most a.out
- # platforms (ab)use it in PIC code, but their linkers get confused if
- # the symbol is explicitly referenced. Since portable code cannot
- # rely on this symbol name, it's probably fine to never include it in
- # preloaded symbol tables.
- extract_expsyms_cmds=
-
- case $host_os in
- cygwin* | mingw* | pw32*)
- # FIXME: the MSVC++ port hasn't been tested in a loooong time
- # When not using gcc, we currently assume that we are using
- # Microsoft Visual C++.
- if test "$GCC" != yes; then
- with_gnu_ld=no
- fi
- ;;
- interix*)
- # we just hope/assume this is gcc and not c89 (= MSVC++)
- with_gnu_ld=yes
- ;;
- openbsd*)
- with_gnu_ld=no
- ;;
- esac
-
- ld_shlibs=yes
- if test "$with_gnu_ld" = yes; then
- # If archive_cmds runs LD, not CC, wlarc should be empty
- wlarc='${wl}'
-
- # Set some defaults for GNU ld with shared library support. These
- # are reset later if shared libraries are not supported. Putting them
- # here allows them to be overridden if necessary.
- runpath_var=LD_RUN_PATH
- hardcode_libdir_flag_spec='${wl}-rpath ${wl}$libdir'
- export_dynamic_flag_spec='${wl}--export-dynamic'
- # ancient GNU ld didn't support --whole-archive et. al.
- if $LD --help 2>&1 | $GREP 'no-whole-archive' > /dev/null; then
- whole_archive_flag_spec="$wlarc"'--whole-archive$convenience '"$wlarc"'--no-whole-archive'
- else
- whole_archive_flag_spec=
- fi
- supports_anon_versioning=no
- case `$LD -v 2>&1` in
- *\ [01].* | *\ 2.[0-9].* | *\ 2.10.*) ;; # catch versions < 2.11
- *\ 2.11.93.0.2\ *) supports_anon_versioning=yes ;; # RH7.3 ...
- *\ 2.11.92.0.12\ *) supports_anon_versioning=yes ;; # Mandrake 8.2 ...
- *\ 2.11.*) ;; # other 2.11 versions
- *) supports_anon_versioning=yes ;;
- esac
-
- # See if GNU ld supports shared libraries.
- case $host_os in
- aix3* | aix4* | aix5*)
- # On AIX/PPC, the GNU linker is very broken
- if test "$host_cpu" != ia64; then
- ld_shlibs=no
- cat <<_LT_EOF 1>&2
-
-*** Warning: the GNU linker, at least up to release 2.9.1, is reported
-*** to be unable to reliably create shared libraries on AIX.
-*** Therefore, libtool is disabling shared libraries support. If you
-*** really care for shared libraries, you may want to modify your PATH
-*** so that a non-GNU linker is found, and then restart.
-
-_LT_EOF
- fi
- ;;
-
- amigaos*)
- if test "$host_cpu" = m68k; then
- archive_cmds='$RM $output_objdir/a2ixlibrary.data~$ECHO "#define NAME $libname" > $output_objdir/a2ixlibrary.data~$ECHO "#define LIBRARY_ID 1" >> $output_objdir/a2ixlibrary.data~$ECHO "#define VERSION $major" >> $output_objdir/a2ixlibrary.data~$ECHO "#define REVISION $revision" >> $output_objdir/a2ixlibrary.data~$AR $AR_FLAGS $lib $libobjs~$RANLIB $lib~(cd $output_objdir && a2ixlibrary -32)'
- hardcode_libdir_flag_spec='-L$libdir'
- hardcode_minus_L=yes
- fi
-
- # Samuel A. Falvo II <kc5tja@dolphin.openprojects.net> reports
- # that the semantics of dynamic libraries on AmigaOS, at least up
- # to version 4, is to share data among multiple programs linked
- # with the same dynamic library. Since this doesn't match the
- # behavior of shared libraries on other platforms, we can't use
- # them.
- ld_shlibs=no
- ;;
-
- beos*)
- if $LD --help 2>&1 | $GREP ': supported targets:.* elf' > /dev/null; then
- allow_undefined_flag=unsupported
- # Joseph Beckenbach <jrb3@best.com> says some releases of gcc
- # support --undefined. This deserves some investigation. FIXME
- archive_cmds='$CC -nostart $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'
- else
- ld_shlibs=no
- fi
- ;;
-
- cygwin* | mingw* | pw32*)
- # _LT_TAGVAR(hardcode_libdir_flag_spec, ) is actually meaningless,
- # as there is no search path for DLLs.
- hardcode_libdir_flag_spec='-L$libdir'
- allow_undefined_flag=unsupported
- always_export_symbols=no
- enable_shared_with_static_runtimes=yes
- export_symbols_cmds='$NM $libobjs $convenience | $global_symbol_pipe | $SED -e '\''/^[BCDGRS][ ]/s/.*[ ]\([^ ]*\)/\1 DATA/'\'' | $SED -e '\''/^[AITW][ ]/s/.*[ ]//'\'' | sort | uniq > $export_symbols'
-
- if $LD --help 2>&1 | $GREP 'auto-import' > /dev/null; then
- archive_cmds='$CC -shared $libobjs $deplibs $compiler_flags -o $output_objdir/$soname ${wl}--enable-auto-image-base -Xlinker --out-implib -Xlinker $lib'
- # If the export-symbols file already is a .def file (1st line
- # is EXPORTS), use it as is; otherwise, prepend...
- archive_expsym_cmds='if test "x`$SED 1q $export_symbols`" = xEXPORTS; then
- cp $export_symbols $output_objdir/$soname.def;
- else
- echo EXPORTS > $output_objdir/$soname.def;
- cat $export_symbols >> $output_objdir/$soname.def;
- fi~
- $CC -shared $output_objdir/$soname.def $libobjs $deplibs $compiler_flags -o $output_objdir/$soname ${wl}--enable-auto-image-base -Xlinker --out-implib -Xlinker $lib'
- else
- ld_shlibs=no
- fi
- ;;
-
- interix[3-9]*)
- hardcode_direct=no
- hardcode_shlibpath_var=no
- hardcode_libdir_flag_spec='${wl}-rpath,$libdir'
- export_dynamic_flag_spec='${wl}-E'
- # Hack: On Interix 3.x, we cannot compile PIC because of a broken gcc.
- # Instead, shared libraries are loaded at an image base (0x10000000 by
- # default) and relocated if they conflict, which is a slow very memory
- # consuming and fragmenting process. To avoid this, we pick a random,
- # 256 KiB-aligned image base between 0x50000000 and 0x6FFC0000 at link
- # time. Moving up from 0x10000000 also allows more sbrk(2) space.
- archive_cmds='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags ${wl}-h,$soname ${wl}--image-base,`expr ${RANDOM-$$} % 4096 / 2 \* 262144 + 1342177280` -o $lib'
- archive_expsym_cmds='sed "s,^,_," $export_symbols >$output_objdir/$soname.expsym~$CC -shared $pic_flag $libobjs $deplibs $compiler_flags ${wl}-h,$soname ${wl}--retain-symbols-file,$output_objdir/$soname.expsym ${wl}--image-base,`expr ${RANDOM-$$} % 4096 / 2 \* 262144 + 1342177280` -o $lib'
- ;;
-
- gnu* | linux* | tpf* | k*bsd*-gnu)
- tmp_diet=no
- if test "$host_os" = linux-dietlibc; then
- case $cc_basename in
- diet\ *) tmp_diet=yes;; # linux-dietlibc with static linking (!diet-dyn)
- esac
- fi
- if $LD --help 2>&1 | $EGREP ': supported targets:.* elf' > /dev/null \
- && test "$tmp_diet" = no
- then
- tmp_addflag=
- case $cc_basename,$host_cpu in
- pgcc*) # Portland Group C compiler
- whole_archive_flag_spec='${wl}--whole-archive`for conv in $convenience\"\"; do test -n \"$conv\" && new_convenience=\"$new_convenience,$conv\"; done; $ECHO \"$new_convenience\"` ${wl}--no-whole-archive'
- tmp_addflag=' $pic_flag'
- ;;
- pgf77* | pgf90* | pgf95*) # Portland Group f77 and f90 compilers
- whole_archive_flag_spec='${wl}--whole-archive`for conv in $convenience\"\"; do test -n \"$conv\" && new_convenience=\"$new_convenience,$conv\"; done; $ECHO \"$new_convenience\"` ${wl}--no-whole-archive'
- tmp_addflag=' $pic_flag -Mnomain' ;;
- ecc*,ia64* | icc*,ia64*) # Intel C compiler on ia64
- tmp_addflag=' -i_dynamic' ;;
- efc*,ia64* | ifort*,ia64*) # Intel Fortran compiler on ia64
- tmp_addflag=' -i_dynamic -nofor_main' ;;
- ifc* | ifort*) # Intel Fortran compiler
- tmp_addflag=' -nofor_main' ;;
- esac
- case `$CC -V 2>&1 | sed 5q` in
- *Sun\ C*) # Sun C 5.9
- whole_archive_flag_spec='${wl}--whole-archive`new_convenience=; for conv in $convenience\"\"; do test -z \"$conv\" || new_convenience=\"$new_convenience,$conv\"; done; $ECHO \"$new_convenience\"` ${wl}--no-whole-archive'
- compiler_needs_object=yes
- tmp_sharedflag='-G' ;;
- *Sun\ F*) # Sun Fortran 8.3
- tmp_sharedflag='-G' ;;
- *)
- tmp_sharedflag='-shared' ;;
- esac
- archive_cmds='$CC '"$tmp_sharedflag""$tmp_addflag"' $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'
-
- if test "x$supports_anon_versioning" = xyes; then
- archive_expsym_cmds='echo "{ global:" > $output_objdir/$libname.ver~
- cat $export_symbols | sed -e "s/\(.*\)/\1;/" >> $output_objdir/$libname.ver~
- echo "local: *; };" >> $output_objdir/$libname.ver~
- $CC '"$tmp_sharedflag""$tmp_addflag"' $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-version-script ${wl}$output_objdir/$libname.ver -o $lib'
- fi
- else
- ld_shlibs=no
- fi
- ;;
-
- netbsd*)
- if echo __ELF__ | $CC -E - | $GREP __ELF__ >/dev/null; then
- archive_cmds='$LD -Bshareable $libobjs $deplibs $linker_flags -o $lib'
- wlarc=
- else
- archive_cmds='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'
- archive_expsym_cmds='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib'
- fi
- ;;
-
- solaris*)
- if $LD -v 2>&1 | $GREP 'BFD 2\.8' > /dev/null; then
- ld_shlibs=no
- cat <<_LT_EOF 1>&2
-
-*** Warning: The releases 2.8.* of the GNU linker cannot reliably
-*** create shared libraries on Solaris systems. Therefore, libtool
-*** is disabling shared libraries support. We urge you to upgrade GNU
-*** binutils to release 2.9.1 or newer. Another option is to modify
-*** your PATH or compiler configuration so that the native linker is
-*** used, and then restart.
-
-_LT_EOF
- elif $LD --help 2>&1 | $GREP ': supported targets:.* elf' > /dev/null; then
- archive_cmds='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'
- archive_expsym_cmds='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib'
- else
- ld_shlibs=no
- fi
- ;;
-
- sysv5* | sco3.2v5* | sco5v6* | unixware* | OpenUNIX*)
- case `$LD -v 2>&1` in
- *\ [01].* | *\ 2.[0-9].* | *\ 2.1[0-5].*)
- ld_shlibs=no
- cat <<_LT_EOF 1>&2
-
-*** Warning: Releases of the GNU linker prior to 2.16.91.0.3 can not
-*** reliably create shared libraries on SCO systems. Therefore, libtool
-*** is disabling shared libraries support. We urge you to upgrade GNU
-*** binutils to release 2.16.91.0.3 or newer. Another option is to modify
-*** your PATH or compiler configuration so that the native linker is
-*** used, and then restart.
-
-_LT_EOF
- ;;
- *)
- # For security reasons, it is highly recommended that you always
- # use absolute paths for naming shared libraries, and exclude the
- # DT_RUNPATH tag from executables and libraries. But doing so
- # requires that you compile everything twice, which is a pain.
- if $LD --help 2>&1 | $GREP ': supported targets:.* elf' > /dev/null; then
- hardcode_libdir_flag_spec='${wl}-rpath ${wl}$libdir'
- archive_cmds='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'
- archive_expsym_cmds='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib'
- else
- ld_shlibs=no
- fi
- ;;
- esac
- ;;
-
- sunos4*)
- archive_cmds='$LD -assert pure-text -Bshareable -o $lib $libobjs $deplibs $linker_flags'
- wlarc=
- hardcode_direct=yes
- hardcode_shlibpath_var=no
- ;;
-
- *)
- if $LD --help 2>&1 | $GREP ': supported targets:.* elf' > /dev/null; then
- archive_cmds='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'
- archive_expsym_cmds='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib'
- else
- ld_shlibs=no
- fi
- ;;
- esac
-
- if test "$ld_shlibs" = no; then
- runpath_var=
- hardcode_libdir_flag_spec=
- export_dynamic_flag_spec=
- whole_archive_flag_spec=
- fi
- else
- # PORTME fill in a description of your system's linker (not GNU ld)
- case $host_os in
- aix3*)
- allow_undefined_flag=unsupported
- always_export_symbols=yes
- archive_expsym_cmds='$LD -o $output_objdir/$soname $libobjs $deplibs $linker_flags -bE:$export_symbols -T512 -H512 -bM:SRE~$AR $AR_FLAGS $lib $output_objdir/$soname'
- # Note: this linker hardcodes the directories in LIBPATH if there
- # are no directories specified by -L.
- hardcode_minus_L=yes
- if test "$GCC" = yes && test -z "$lt_prog_compiler_static"; then
- # Neither direct hardcoding nor static linking is supported with a
- # broken collect2.
- hardcode_direct=unsupported
- fi
- ;;
-
- aix4* | aix5*)
- if test "$host_cpu" = ia64; then
- # On IA64, the linker does run time linking by default, so we don't
- # have to do anything special.
- aix_use_runtimelinking=no
- exp_sym_flag='-Bexport'
- no_entry_flag=""
- else
- # If we're using GNU nm, then we don't want the "-C" option.
- # -C means demangle to AIX nm, but means don't demangle with GNU nm
- if $NM -V 2>&1 | $GREP 'GNU' > /dev/null; then
- export_symbols_cmds='$NM -Bpg $libobjs $convenience | awk '\''{ if (((\$ 2 == "T") || (\$ 2 == "D") || (\$ 2 == "B")) && (substr(\$ 3,1,1) != ".")) { print \$ 3 } }'\'' | sort -u > $export_symbols'
- else
- export_symbols_cmds='$NM -BCpg $libobjs $convenience | awk '\''{ if (((\$ 2 == "T") || (\$ 2 == "D") || (\$ 2 == "B")) && (substr(\$ 3,1,1) != ".")) { print \$ 3 } }'\'' | sort -u > $export_symbols'
- fi
- aix_use_runtimelinking=no
-
- # Test if we are trying to use run time linking or normal
- # AIX style linking. If -brtl is somewhere in LDFLAGS, we
- # need to do runtime linking.
- case $host_os in aix4.[23]|aix4.[23].*|aix5*)
- for ld_flag in $LDFLAGS; do
- if (test $ld_flag = "-brtl" || test $ld_flag = "-Wl,-brtl"); then
- aix_use_runtimelinking=yes
- break
- fi
- done
- ;;
- esac
-
- exp_sym_flag='-bexport'
- no_entry_flag='-bnoentry'
- fi
-
- # When large executables or shared objects are built, AIX ld can
- # have problems creating the table of contents. If linking a library
- # or program results in "error TOC overflow" add -mminimal-toc to
- # CXXFLAGS/CFLAGS for g++/gcc. In the cases where that is not
- # enough to fix the problem, add -Wl,-bbigtoc to LDFLAGS.
-
- archive_cmds=''
- hardcode_direct=yes
- hardcode_direct_absolute=yes
- hardcode_libdir_separator=':'
- link_all_deplibs=yes
- file_list_spec='${wl}-f,'
-
- if test "$GCC" = yes; then
- case $host_os in aix4.[012]|aix4.[012].*)
- # We only want to do this on AIX 4.2 and lower, the check
- # below for broken collect2 doesn't work under 4.3+
- collect2name=`${CC} -print-prog-name=collect2`
- if test -f "$collect2name" &&
- strings "$collect2name" | $GREP resolve_lib_name >/dev/null
- then
- # We have reworked collect2
- :
- else
- # We have old collect2
- hardcode_direct=unsupported
- # It fails to find uninstalled libraries when the uninstalled
- # path is not listed in the libpath. Setting hardcode_minus_L
- # to unsupported forces relinking
- hardcode_minus_L=yes
- hardcode_libdir_flag_spec='-L$libdir'
- hardcode_libdir_separator=
- fi
- ;;
- esac
- shared_flag='-shared'
- if test "$aix_use_runtimelinking" = yes; then
- shared_flag="$shared_flag "'${wl}-G'
- fi
- else
- # not using gcc
- if test "$host_cpu" = ia64; then
- # VisualAge C++, Version 5.5 for AIX 5L for IA-64, Beta 3 Release
- # chokes on -Wl,-G. The following line is correct:
- shared_flag='-G'
- else
- if test "$aix_use_runtimelinking" = yes; then
- shared_flag='${wl}-G'
- else
- shared_flag='${wl}-bM:SRE'
- fi
- fi
- fi
-
- # It seems that -bexpall does not export symbols beginning with
- # underscore (_), so it is better to generate a list of symbols to export.
- always_export_symbols=yes
- if test "$aix_use_runtimelinking" = yes; then
- # Warning - without using the other runtime loading flags (-brtl),
- # -berok will link without error, but may produce a broken library.
- allow_undefined_flag='-berok'
- # Determine the default libpath from the value encoded in an
- # empty executable.
- cat >conftest.$ac_ext <<_ACEOF
-/* confdefs.h. */
-_ACEOF
-cat confdefs.h >>conftest.$ac_ext
-cat >>conftest.$ac_ext <<_ACEOF
-/* end confdefs.h. */
-
-int
-main ()
-{
-
- ;
- return 0;
-}
-_ACEOF
-rm -f conftest.$ac_objext conftest$ac_exeext
-if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
- (eval $ac_link) 2>conftest.er1
- ac_status=$?
- grep -v '^ *+' conftest.er1 >conftest.err
- rm -f conftest.er1
- cat conftest.err >&5
- echo "$as_me:$LINENO: \$? = $ac_status" >&5
- (exit $ac_status); } &&
- { ac_try='test -z "$ac_c_werror_flag"
- || test ! -s conftest.err'
- { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
- (eval $ac_try) 2>&5
- ac_status=$?
- echo "$as_me:$LINENO: \$? = $ac_status" >&5
- (exit $ac_status); }; } &&
- { ac_try='test -s conftest$ac_exeext'
- { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
- (eval $ac_try) 2>&5
- ac_status=$?
- echo "$as_me:$LINENO: \$? = $ac_status" >&5
- (exit $ac_status); }; }; then
-
-lt_aix_libpath_sed='
- /Import File Strings/,/^$/ {
- /^0/ {
- s/^0 *\(.*\)$/\1/
- p
- }
- }'
-aix_libpath=`dump -H conftest$ac_exeext 2>/dev/null | $SED -n -e "$lt_aix_libpath_sed"`
-# Check for a 64-bit object if we didn't find anything.
-if test -z "$aix_libpath"; then
- aix_libpath=`dump -HX64 conftest$ac_exeext 2>/dev/null | $SED -n -e "$lt_aix_libpath_sed"`
-fi
-else
- echo "$as_me: failed program was:" >&5
-sed 's/^/| /' conftest.$ac_ext >&5
-
-fi
-rm -f conftest.err conftest.$ac_objext \
- conftest$ac_exeext conftest.$ac_ext
-if test -z "$aix_libpath"; then aix_libpath="/usr/lib:/lib"; fi
-
- hardcode_libdir_flag_spec='${wl}-blibpath:$libdir:'"$aix_libpath"
- archive_expsym_cmds='$CC -o $output_objdir/$soname $libobjs $deplibs '"\${wl}$no_entry_flag"' $compiler_flags `if test "x${allow_undefined_flag}" != "x"; then $ECHO "X${wl}${allow_undefined_flag}" | $Xsed; else :; fi` '"\${wl}$exp_sym_flag:\$export_symbols $shared_flag"
- else
- if test "$host_cpu" = ia64; then
- hardcode_libdir_flag_spec='${wl}-R $libdir:/usr/lib:/lib'
- allow_undefined_flag="-z nodefs"
- archive_expsym_cmds="\$CC $shared_flag"' -o $output_objdir/$soname $libobjs $deplibs '"\${wl}$no_entry_flag"' $compiler_flags ${wl}${allow_undefined_flag} '"\${wl}$exp_sym_flag:\$export_symbols"
- else
- # Determine the default libpath from the value encoded in an
- # empty executable.
- cat >conftest.$ac_ext <<_ACEOF
-/* confdefs.h. */
-_ACEOF
-cat confdefs.h >>conftest.$ac_ext
-cat >>conftest.$ac_ext <<_ACEOF
-/* end confdefs.h. */
-
-int
-main ()
-{
-
- ;
- return 0;
-}
-_ACEOF
-rm -f conftest.$ac_objext conftest$ac_exeext
-if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
- (eval $ac_link) 2>conftest.er1
- ac_status=$?
- grep -v '^ *+' conftest.er1 >conftest.err
- rm -f conftest.er1
- cat conftest.err >&5
- echo "$as_me:$LINENO: \$? = $ac_status" >&5
- (exit $ac_status); } &&
- { ac_try='test -z "$ac_c_werror_flag"
- || test ! -s conftest.err'
- { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
- (eval $ac_try) 2>&5
- ac_status=$?
- echo "$as_me:$LINENO: \$? = $ac_status" >&5
- (exit $ac_status); }; } &&
- { ac_try='test -s conftest$ac_exeext'
- { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
- (eval $ac_try) 2>&5
- ac_status=$?
- echo "$as_me:$LINENO: \$? = $ac_status" >&5
- (exit $ac_status); }; }; then
-
-lt_aix_libpath_sed='
- /Import File Strings/,/^$/ {
- /^0/ {
- s/^0 *\(.*\)$/\1/
- p
- }
- }'
-aix_libpath=`dump -H conftest$ac_exeext 2>/dev/null | $SED -n -e "$lt_aix_libpath_sed"`
-# Check for a 64-bit object if we didn't find anything.
-if test -z "$aix_libpath"; then
- aix_libpath=`dump -HX64 conftest$ac_exeext 2>/dev/null | $SED -n -e "$lt_aix_libpath_sed"`
-fi
-else
- echo "$as_me: failed program was:" >&5
-sed 's/^/| /' conftest.$ac_ext >&5
-
-fi
-rm -f conftest.err conftest.$ac_objext \
- conftest$ac_exeext conftest.$ac_ext
-if test -z "$aix_libpath"; then aix_libpath="/usr/lib:/lib"; fi
-
- hardcode_libdir_flag_spec='${wl}-blibpath:$libdir:'"$aix_libpath"
- # Warning - without using the other run time loading flags,
- # -berok will link without error, but may produce a broken library.
- no_undefined_flag=' ${wl}-bernotok'
- allow_undefined_flag=' ${wl}-berok'
- # Exported symbols can be pulled into shared objects from archives
- whole_archive_flag_spec='$convenience'
- archive_cmds_need_lc=yes
- # This is similar to how AIX traditionally builds its shared libraries.
- archive_expsym_cmds="\$CC $shared_flag"' -o $output_objdir/$soname $libobjs $deplibs ${wl}-bnoentry $compiler_flags ${wl}-bE:$export_symbols${allow_undefined_flag}~$AR $AR_FLAGS $output_objdir/$libname$release.a $output_objdir/$soname'
- fi
- fi
- ;;
-
- amigaos*)
- if test "$host_cpu" = m68k; then
- archive_cmds='$RM $output_objdir/a2ixlibrary.data~$ECHO "#define NAME $libname" > $output_objdir/a2ixlibrary.data~$ECHO "#define LIBRARY_ID 1" >> $output_objdir/a2ixlibrary.data~$ECHO "#define VERSION $major" >> $output_objdir/a2ixlibrary.data~$ECHO "#define REVISION $revision" >> $output_objdir/a2ixlibrary.data~$AR $AR_FLAGS $lib $libobjs~$RANLIB $lib~(cd $output_objdir && a2ixlibrary -32)'
- hardcode_libdir_flag_spec='-L$libdir'
- hardcode_minus_L=yes
- fi
- # see comment about different semantics on the GNU ld section
- ld_shlibs=no
- ;;
-
- bsdi[45]*)
- export_dynamic_flag_spec=-rdynamic
- ;;
-
- cygwin* | mingw* | pw32*)
- # When not using gcc, we currently assume that we are using
- # Microsoft Visual C++.
- # hardcode_libdir_flag_spec is actually meaningless, as there is
- # no search path for DLLs.
- hardcode_libdir_flag_spec=' '
- allow_undefined_flag=unsupported
- # Tell ltmain to make .lib files, not .a files.
- libext=lib
- # Tell ltmain to make .dll files, not .so files.
- shrext_cmds=".dll"
- # FIXME: Setting linknames here is a bad hack.
- archive_cmds='$CC -o $lib $libobjs $compiler_flags `$ECHO "X$deplibs" | $Xsed -e '\''s/ -lc$//'\''` -link -dll~linknames='
- # The linker will automatically build a .lib file if we build a DLL.
- old_archive_from_new_cmds='true'
- # FIXME: Should let the user specify the lib program.
- old_archive_cmds='lib -OUT:$oldlib$oldobjs$old_deplibs'
- fix_srcfile_path='`cygpath -w "$srcfile"`'
- enable_shared_with_static_runtimes=yes
- ;;
-
- darwin* | rhapsody*)
- case $host_os in
- rhapsody* | darwin1.[012])
- allow_undefined_flag='${wl}-undefined ${wl}suppress'
- ;;
- *) # Darwin 1.3 on
- case ${MACOSX_DEPLOYMENT_TARGET-10.0} in
- 10.[012])
- allow_undefined_flag='${wl}-flat_namespace ${wl}-undefined ${wl}suppress'
- ;;
- 10.*)
- allow_undefined_flag='${wl}-undefined ${wl}dynamic_lookup'
- ;;
- esac
- ;;
- esac
- archive_cmds_need_lc=no
- hardcode_direct=no
- hardcode_automatic=yes
- hardcode_shlibpath_var=unsupported
- whole_archive_flag_spec=''
- link_all_deplibs=yes
- if test "$GCC" = yes ; then
- if test "${lt_cv_apple_cc_single_mod+set}" = set; then
- echo $ECHO_N "(cached) $ECHO_C" >&6
-else
- lt_cv_apple_cc_single_mod=no
- if test -z "${LT_MULTI_MODULE}"; then
- # By default we will add the -single_module flag. You can override
- # by either setting the environment variable LT_MULTI_MODULE
- # non-empty at configure time, or by adding -multi-module to the
- # link flags.
- echo "int foo(void){return 1;}" > conftest.c
- $LTCC $LTCFLAGS $LDFLAGS -o libconftest.dylib \
- -dynamiclib ${wl}-single_module conftest.c
- if test -f libconftest.dylib; then
- lt_cv_apple_cc_single_mod=yes
- rm libconftest.dylib
- fi
- rm conftest.$ac_ext
- fi
-fi
-
- output_verbose_link_cmd=echo
- if test "X$lt_cv_apple_cc_single_mod" = Xyes ; then
- archive_cmds='$CC -dynamiclib $single_module $allow_undefined_flag -o $lib $libobjs $deplibs $compiler_flags -install_name $rpath/$soname $verstring'
- archive_expsym_cmds='sed "s,^,_," < $export_symbols > $output_objdir/${libname}-symbols.expsym~$CC $single_module -dynamiclib $allow_undefined_flag -o $lib $libobjs $deplibs $compiler_flags -install_name $rpath/$soname $verstring~nmedit -s $output_objdir/${libname}-symbols.expsym ${lib}'
- else
- archive_cmds='$CC -dynamiclib $allow_undefined_flag -o $lib $libobjs $deplibs $compiler_flags -install_name $rpath/$soname $verstring'
- archive_expsym_cmds='sed "s,^,_," < $export_symbols > $output_objdir/${libname}-symbols.expsym~$CC -dynamiclib $allow_undefined_flag -o $lib $libobjs $deplibs $compiler_flags -install_name $rpath/$soname $verstring~nmedit -s $output_objdir/${libname}-symbols.expsym ${lib}'
- fi
- module_cmds='$CC $allow_undefined_flag -o $lib -bundle $libobjs $deplibs$compiler_flags'
- module_expsym_cmds='sed -e "s,^,_," < $export_symbols > $output_objdir/${libname}-symbols.expsym~$CC $allow_undefined_flag -o $lib -bundle $libobjs $deplibs$compiler_flags~nmedit -s $output_objdir/${libname}-symbols.expsym ${lib}'
- else
- case $cc_basename in
- xlc*)
- output_verbose_link_cmd=echo
- archive_cmds='$CC -qmkshrobj $allow_undefined_flag -o $lib $libobjs $deplibs $compiler_flags ${wl}-install_name ${wl}`$ECHO $rpath/$soname` $verstring'
- module_cmds='$CC $allow_undefined_flag -o $lib -bundle $libobjs $deplibs$compiler_flags'
- # Don't fix this by using the ld -exported_symbols_list flag, it doesn't exist in older darwin lds
- archive_expsym_cmds='sed "s,^,_," < $export_symbols > $output_objdir/${libname}-symbols.expsym~$CC -qmkshrobj $allow_undefined_flag -o $lib $libobjs $deplibs $compiler_flags ${wl}-install_name ${wl}$rpath/$soname $verstring~nmedit -s $output_objdir/${libname}-symbols.expsym ${lib}'
- module_expsym_cmds='sed "s,^,_," < $export_symbols > $output_objdir/${libname}-symbols.expsym~$CC $allow_undefined_flag -o $lib -bundle $libobjs $deplibs$compiler_flags~nmedit -s $output_objdir/${libname}-symbols.expsym ${lib}'
- ;;
- *)
- ld_shlibs=no
- ;;
- esac
- fi
- ;;
-
- dgux*)
- archive_cmds='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
- hardcode_libdir_flag_spec='-L$libdir'
- hardcode_shlibpath_var=no
- ;;
-
- freebsd1*)
- ld_shlibs=no
- ;;
-
- # FreeBSD 2.2.[012] allows us to include c++rt0.o to get C++ constructor
- # support. Future versions do this automatically, but an explicit c++rt0.o
- # does not break anything, and helps significantly (at the cost of a little
- # extra space).
- freebsd2.2*)
- archive_cmds='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags /usr/lib/c++rt0.o'
- hardcode_libdir_flag_spec='-R$libdir'
- hardcode_direct=yes
- hardcode_shlibpath_var=no
- ;;
-
- # Unfortunately, older versions of FreeBSD 2 do not have this feature.
- freebsd2*)
- archive_cmds='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags'
- hardcode_direct=yes
- hardcode_minus_L=yes
- hardcode_shlibpath_var=no
- ;;
-
- # FreeBSD 3 and greater uses gcc -shared to do shared libraries.
- freebsd* | dragonfly*)
- archive_cmds='$CC -shared -o $lib $libobjs $deplibs $compiler_flags'
- hardcode_libdir_flag_spec='-R$libdir'
- hardcode_direct=yes
- hardcode_shlibpath_var=no
- ;;
-
- hpux9*)
- if test "$GCC" = yes; then
- archive_cmds='$RM $output_objdir/$soname~$CC -shared -fPIC ${wl}+b ${wl}$install_libdir -o $output_objdir/$soname $libobjs $deplibs $compiler_flags~test $output_objdir/$soname = $lib || mv $output_objdir/$soname $lib'
- else
- archive_cmds='$RM $output_objdir/$soname~$LD -b +b $install_libdir -o $output_objdir/$soname $libobjs $deplibs $linker_flags~test $output_objdir/$soname = $lib || mv $output_objdir/$soname $lib'
- fi
- hardcode_libdir_flag_spec='${wl}+b ${wl}$libdir'
- hardcode_libdir_separator=:
- hardcode_direct=yes
-
- # hardcode_minus_L: Not really in the search PATH,
- # but as the default location of the library.
- hardcode_minus_L=yes
- export_dynamic_flag_spec='${wl}-E'
- ;;
-
- hpux10*)
- if test "$GCC" = yes -a "$with_gnu_ld" = no; then
- archive_cmds='$CC -shared -fPIC ${wl}+h ${wl}$soname ${wl}+b ${wl}$install_libdir -o $lib $libobjs $deplibs $compiler_flags'
- else
- archive_cmds='$LD -b +h $soname +b $install_libdir -o $lib $libobjs $deplibs $linker_flags'
- fi
- if test "$with_gnu_ld" = no; then
- hardcode_libdir_flag_spec='${wl}+b ${wl}$libdir'
- hardcode_libdir_flag_spec_ld='+b $libdir'
- hardcode_libdir_separator=:
- hardcode_direct=yes
- hardcode_direct_absolute=yes
- export_dynamic_flag_spec='${wl}-E'
- # hardcode_minus_L: Not really in the search PATH,
- # but as the default location of the library.
- hardcode_minus_L=yes
- fi
- ;;
-
- hpux11*)
- if test "$GCC" = yes -a "$with_gnu_ld" = no; then
- case $host_cpu in
- hppa*64*)
- archive_cmds='$CC -shared ${wl}+h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags'
- ;;
- ia64*)
- archive_cmds='$CC -shared ${wl}+h ${wl}$soname ${wl}+nodefaultrpath -o $lib $libobjs $deplibs $compiler_flags'
- ;;
- *)
- archive_cmds='$CC -shared -fPIC ${wl}+h ${wl}$soname ${wl}+b ${wl}$install_libdir -o $lib $libobjs $deplibs $compiler_flags'
- ;;
- esac
- else
- case $host_cpu in
- hppa*64*)
- archive_cmds='$CC -b ${wl}+h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags'
- ;;
- ia64*)
- archive_cmds='$CC -b ${wl}+h ${wl}$soname ${wl}+nodefaultrpath -o $lib $libobjs $deplibs $compiler_flags'
- ;;
- *)
- archive_cmds='$CC -b ${wl}+h ${wl}$soname ${wl}+b ${wl}$install_libdir -o $lib $libobjs $deplibs $compiler_flags'
- ;;
- esac
- fi
- if test "$with_gnu_ld" = no; then
- hardcode_libdir_flag_spec='${wl}+b ${wl}$libdir'
- hardcode_libdir_separator=:
-
- case $host_cpu in
- hppa*64*|ia64*)
- hardcode_direct=no
- hardcode_shlibpath_var=no
- ;;
- *)
- hardcode_direct=yes
- hardcode_direct_absolute=yes
- export_dynamic_flag_spec='${wl}-E'
-
- # hardcode_minus_L: Not really in the search PATH,
- # but as the default location of the library.
- hardcode_minus_L=yes
- ;;
- esac
- fi
- ;;
-
- irix5* | irix6* | nonstopux*)
- if test "$GCC" = yes; then
- archive_cmds='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname ${wl}$soname `test -n "$verstring" && $ECHO "X${wl}-set_version ${wl}$verstring" | $Xsed` ${wl}-update_registry ${wl}${output_objdir}/so_locations -o $lib'
- # Try to use the -exported_symbol ld option, if it does not
- # work, assume that -exports_file does not work either and
- # implicitly export all symbols.
- save_LDFLAGS="$LDFLAGS"
- LDFLAGS="$LDFLAGS -shared ${wl}-exported_symbol ${wl}foo ${wl}-update_registry ${wl}/dev/null"
- cat >conftest.$ac_ext <<_ACEOF
-int foo(void) {}
-_ACEOF
-rm -f conftest.$ac_objext conftest$ac_exeext
-if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
- (eval $ac_link) 2>conftest.er1
- ac_status=$?
- grep -v '^ *+' conftest.er1 >conftest.err
- rm -f conftest.er1
- cat conftest.err >&5
- echo "$as_me:$LINENO: \$? = $ac_status" >&5
- (exit $ac_status); } &&
- { ac_try='test -z "$ac_c_werror_flag"
- || test ! -s conftest.err'
- { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
- (eval $ac_try) 2>&5
- ac_status=$?
- echo "$as_me:$LINENO: \$? = $ac_status" >&5
- (exit $ac_status); }; } &&
- { ac_try='test -s conftest$ac_exeext'
- { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
- (eval $ac_try) 2>&5
- ac_status=$?
- echo "$as_me:$LINENO: \$? = $ac_status" >&5
- (exit $ac_status); }; }; then
- archive_expsym_cmds='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname ${wl}$soname `test -n "$verstring" && $ECHO "X${wl}-set_version ${wl}$verstring" | $Xsed` ${wl}-update_registry ${wl}${output_objdir}/so_locations ${wl}-exports_file ${wl}$export_symbols -o $lib'
-
-else
- echo "$as_me: failed program was:" >&5
-sed 's/^/| /' conftest.$ac_ext >&5
-
-fi
-rm -f conftest.err conftest.$ac_objext \
- conftest$ac_exeext conftest.$ac_ext
- LDFLAGS="$save_LDFLAGS"
- else
- archive_cmds='$CC -shared $libobjs $deplibs $compiler_flags -soname $soname `test -n "$verstring" && $ECHO "X-set_version $verstring" | $Xsed` -update_registry ${output_objdir}/so_locations -o $lib'
- archive_expsym_cmds='$CC -shared $libobjs $deplibs $compiler_flags -soname $soname `test -n "$verstring" && $ECHO "X-set_version $verstring" | $Xsed` -update_registry ${output_objdir}/so_locations -exports_file $export_symbols -o $lib'
- fi
- archive_cmds_need_lc='no'
- hardcode_libdir_flag_spec='${wl}-rpath ${wl}$libdir'
- hardcode_libdir_separator=:
- inherit_rpath=yes
- link_all_deplibs=yes
- ;;
-
- netbsd*)
- if echo __ELF__ | $CC -E - | $GREP __ELF__ >/dev/null; then
- archive_cmds='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags' # a.out
- else
- archive_cmds='$LD -shared -o $lib $libobjs $deplibs $linker_flags' # ELF
- fi
- hardcode_libdir_flag_spec='-R$libdir'
- hardcode_direct=yes
- hardcode_shlibpath_var=no
- ;;
-
- newsos6)
- archive_cmds='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
- hardcode_direct=yes
- hardcode_libdir_flag_spec='${wl}-rpath ${wl}$libdir'
- hardcode_libdir_separator=:
- hardcode_shlibpath_var=no
- ;;
-
- *nto* | *qnx*)
- ;;
-
- openbsd*)
- hardcode_direct=yes
- hardcode_shlibpath_var=no
- hardcode_direct_absolute=yes
- if test -z "`echo __ELF__ | $CC -E - | $GREP __ELF__`" || test "$host_os-$host_cpu" = "openbsd2.8-powerpc"; then
- archive_cmds='$CC -shared $pic_flag -o $lib $libobjs $deplibs $compiler_flags'
- archive_expsym_cmds='$CC -shared $pic_flag -o $lib $libobjs $deplibs $compiler_flags ${wl}-retain-symbols-file,$export_symbols'
- hardcode_libdir_flag_spec='${wl}-rpath,$libdir'
- export_dynamic_flag_spec='${wl}-E'
- else
- case $host_os in
- openbsd[01].* | openbsd2.[0-7] | openbsd2.[0-7].*)
- archive_cmds='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags'
- hardcode_libdir_flag_spec='-R$libdir'
- ;;
- *)
- archive_cmds='$CC -shared $pic_flag -o $lib $libobjs $deplibs $compiler_flags'
- hardcode_libdir_flag_spec='${wl}-rpath,$libdir'
- ;;
- esac
- fi
- ;;
-
- os2*)
- hardcode_libdir_flag_spec='-L$libdir'
- hardcode_minus_L=yes
- allow_undefined_flag=unsupported
- archive_cmds='$ECHO "LIBRARY $libname INITINSTANCE" > $output_objdir/$libname.def~$ECHO "DESCRIPTION \"$libname\"" >> $output_objdir/$libname.def~$ECHO DATA >> $output_objdir/$libname.def~$ECHO " SINGLE NONSHARED" >> $output_objdir/$libname.def~$ECHO EXPORTS >> $output_objdir/$libname.def~emxexp $libobjs >> $output_objdir/$libname.def~$CC -Zdll -Zcrtdll -o $lib $libobjs $deplibs $compiler_flags $output_objdir/$libname.def'
- old_archive_from_new_cmds='emximp -o $output_objdir/$libname.a $output_objdir/$libname.def'
- ;;
-
- osf3*)
- if test "$GCC" = yes; then
- allow_undefined_flag=' ${wl}-expect_unresolved ${wl}\*'
- archive_cmds='$CC -shared${allow_undefined_flag} $libobjs $deplibs $compiler_flags ${wl}-soname ${wl}$soname `test -n "$verstring" && $ECHO "X${wl}-set_version ${wl}$verstring" | $Xsed` ${wl}-update_registry ${wl}${output_objdir}/so_locations -o $lib'
- else
- allow_undefined_flag=' -expect_unresolved \*'
- archive_cmds='$CC -shared${allow_undefined_flag} $libobjs $deplibs $compiler_flags -soname $soname `test -n "$verstring" && $ECHO "X-set_version $verstring" | $Xsed` -update_registry ${output_objdir}/so_locations -o $lib'
- fi
- archive_cmds_need_lc='no'
- hardcode_libdir_flag_spec='${wl}-rpath ${wl}$libdir'
- hardcode_libdir_separator=:
- ;;
-
- osf4* | osf5*) # as osf3* with the addition of -msym flag
- if test "$GCC" = yes; then
- allow_undefined_flag=' ${wl}-expect_unresolved ${wl}\*'
- archive_cmds='$CC -shared${allow_undefined_flag} $libobjs $deplibs $compiler_flags ${wl}-msym ${wl}-soname ${wl}$soname `test -n "$verstring" && $ECHO "X${wl}-set_version ${wl}$verstring" | $Xsed` ${wl}-update_registry ${wl}${output_objdir}/so_locations -o $lib'
- hardcode_libdir_flag_spec='${wl}-rpath ${wl}$libdir'
- else
- allow_undefined_flag=' -expect_unresolved \*'
- archive_cmds='$CC -shared${allow_undefined_flag} $libobjs $deplibs $compiler_flags -msym -soname $soname `test -n "$verstring" && $ECHO "X-set_version $verstring" | $Xsed` -update_registry ${output_objdir}/so_locations -o $lib'
- archive_expsym_cmds='for i in `cat $export_symbols`; do printf "%s %s\\n" -exported_symbol "\$i" >> $lib.exp; done; printf "%s\\n" "-hidden">> $lib.exp~
- $CC -shared${allow_undefined_flag} ${wl}-input ${wl}$lib.exp $compiler_flags $libobjs $deplibs -soname $soname `test -n "$verstring" && $ECHO "X-set_version $verstring" | $Xsed` -update_registry ${output_objdir}/so_locations -o $lib~$RM $lib.exp'
-
- # Both c and cxx compiler support -rpath directly
- hardcode_libdir_flag_spec='-rpath $libdir'
- fi
- archive_cmds_need_lc='no'
- hardcode_libdir_separator=:
- ;;
-
- solaris*)
- no_undefined_flag=' -z defs'
- if test "$GCC" = yes; then
- wlarc='${wl}'
- archive_cmds='$CC -shared ${wl}-z ${wl}text ${wl}-h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags'
- archive_expsym_cmds='echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~echo "local: *; };" >> $lib.exp~
- $CC -shared ${wl}-z ${wl}text ${wl}-M ${wl}$lib.exp ${wl}-h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags~$RM $lib.exp'
- else
- case `$CC -V 2>&1` in
- *"Compilers 5.0"*)
- wlarc=''
- archive_cmds='$LD -G${allow_undefined_flag} -h $soname -o $lib $libobjs $deplibs $linker_flags'
- archive_expsym_cmds='echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~echo "local: *; };" >> $lib.exp~
- $LD -G${allow_undefined_flag} -M $lib.exp -h $soname -o $lib $libobjs $deplibs $linker_flags~$RM $lib.exp'
- ;;
- *)
- wlarc='${wl}'
- archive_cmds='$CC -G${allow_undefined_flag} -h $soname -o $lib $libobjs $deplibs $compiler_flags'
- archive_expsym_cmds='echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~echo "local: *; };" >> $lib.exp~
- $CC -G${allow_undefined_flag} -M $lib.exp -h $soname -o $lib $libobjs $deplibs $compiler_flags~$RM $lib.exp'
- ;;
- esac
- fi
- hardcode_libdir_flag_spec='-R$libdir'
- hardcode_shlibpath_var=no
- case $host_os in
- solaris2.[0-5] | solaris2.[0-5].*) ;;
- *)
- # The compiler driver will combine and reorder linker options,
- # but understands `-z linker_flag'. GCC discards it without `$wl',
- # but is careful enough not to reorder.
- # Supported since Solaris 2.6 (maybe 2.5.1?)
- if test "$GCC" = yes; then
- whole_archive_flag_spec='${wl}-z ${wl}allextract$convenience ${wl}-z ${wl}defaultextract'
- else
- whole_archive_flag_spec='-z allextract$convenience -z defaultextract'
- fi
- ;;
- esac
- link_all_deplibs=yes
- ;;
-
- sunos4*)
- if test "x$host_vendor" = xsequent; then
- # Use $CC to link under sequent, because it throws in some extra .o
- # files that make .init and .fini sections work.
- archive_cmds='$CC -G ${wl}-h $soname -o $lib $libobjs $deplibs $compiler_flags'
- else
- archive_cmds='$LD -assert pure-text -Bstatic -o $lib $libobjs $deplibs $linker_flags'
- fi
- hardcode_libdir_flag_spec='-L$libdir'
- hardcode_direct=yes
- hardcode_minus_L=yes
- hardcode_shlibpath_var=no
- ;;
-
- sysv4)
- case $host_vendor in
- sni)
- archive_cmds='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
- hardcode_direct=yes # is this really true???
- ;;
- siemens)
- ## LD is ld it makes a PLAMLIB
- ## CC just makes a GrossModule.
- archive_cmds='$LD -G -o $lib $libobjs $deplibs $linker_flags'
- reload_cmds='$CC -r -o $output$reload_objs'
- hardcode_direct=no
- ;;
- motorola)
- archive_cmds='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
- hardcode_direct=no #Motorola manual says yes, but my tests say they lie
- ;;
- esac
- runpath_var='LD_RUN_PATH'
- hardcode_shlibpath_var=no
- ;;
-
- sysv4.3*)
- archive_cmds='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
- hardcode_shlibpath_var=no
- export_dynamic_flag_spec='-Bexport'
- ;;
-
- sysv4*MP*)
- if test -d /usr/nec; then
- archive_cmds='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
- hardcode_shlibpath_var=no
- runpath_var=LD_RUN_PATH
- hardcode_runpath_var=yes
- ld_shlibs=yes
- fi
- ;;
-
- sysv4*uw2* | sysv5OpenUNIX* | sysv5UnixWare7.[01].[10]* | unixware7* | sco3.2v5.0.[024]*)
- no_undefined_flag='${wl}-z,text'
- archive_cmds_need_lc=no
- hardcode_shlibpath_var=no
- runpath_var='LD_RUN_PATH'
-
- if test "$GCC" = yes; then
- archive_cmds='$CC -shared ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
- archive_expsym_cmds='$CC -shared ${wl}-Bexport:$export_symbols ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
- else
- archive_cmds='$CC -G ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
- archive_expsym_cmds='$CC -G ${wl}-Bexport:$export_symbols ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
- fi
- ;;
-
- sysv5* | sco3.2v5* | sco5v6*)
- # Note: We can NOT use -z defs as we might desire, because we do not
- # link with -lc, and that would cause any symbols used from libc to
- # always be unresolved, which means just about no library would
- # ever link correctly. If we're not using GNU ld we use -z text
- # though, which does catch some bad symbols but isn't as heavy-handed
- # as -z defs.
- no_undefined_flag='${wl}-z,text'
- allow_undefined_flag='${wl}-z,nodefs'
- archive_cmds_need_lc=no
- hardcode_shlibpath_var=no
- hardcode_libdir_flag_spec='${wl}-R,$libdir'
- hardcode_libdir_separator=':'
- link_all_deplibs=yes
- export_dynamic_flag_spec='${wl}-Bexport'
- runpath_var='LD_RUN_PATH'
-
- if test "$GCC" = yes; then
- archive_cmds='$CC -shared ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
- archive_expsym_cmds='$CC -shared ${wl}-Bexport:$export_symbols ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
- else
- archive_cmds='$CC -G ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
- archive_expsym_cmds='$CC -G ${wl}-Bexport:$export_symbols ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
- fi
- ;;
-
- uts4*)
- archive_cmds='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
- hardcode_libdir_flag_spec='-L$libdir'
- hardcode_shlibpath_var=no
- ;;
-
- *)
- ld_shlibs=no
- ;;
- esac
-
- if test x$host_vendor = xsni; then
- case $host in
- sysv4 | sysv4.2uw2* | sysv4.3* | sysv5*)
- export_dynamic_flag_spec='${wl}-Blargedynsym'
- ;;
- esac
- fi
- fi
-
-echo "$as_me:$LINENO: result: $ld_shlibs" >&5
-echo "${ECHO_T}$ld_shlibs" >&6
-test "$ld_shlibs" = no && can_build_shared=no
-
-with_gnu_ld=$with_gnu_ld
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-#
-# Do we need to explicitly link libc?
-#
-case "x$archive_cmds_need_lc" in
-x|xyes)
- # Assume -lc should be added
- archive_cmds_need_lc=yes
-
- if test "$enable_shared" = yes && test "$GCC" = yes; then
- case $archive_cmds in
- *'~'*)
- # FIXME: we may have to deal with multi-command sequences.
- ;;
- '$CC '*)
- # Test whether the compiler implicitly links with -lc since on some
- # systems, -lgcc has to come before -lc. If gcc already passes -lc
- # to ld, don't add -lc before -lgcc.
- echo "$as_me:$LINENO: checking whether -lc should be explicitly linked in" >&5
-echo $ECHO_N "checking whether -lc should be explicitly linked in... $ECHO_C" >&6
- $RM conftest*
- echo "$lt_simple_compile_test_code" > conftest.$ac_ext
-
- if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
- (eval $ac_compile) 2>&5
- ac_status=$?
- echo "$as_me:$LINENO: \$? = $ac_status" >&5
- (exit $ac_status); } 2>conftest.err; then
- soname=conftest
- lib=conftest
- libobjs=conftest.$ac_objext
- deplibs=
- wl=$lt_prog_compiler_wl
- pic_flag=$lt_prog_compiler_pic
- compiler_flags=-v
- linker_flags=-v
- verstring=
- output_objdir=.
- libname=conftest
- lt_save_allow_undefined_flag=$allow_undefined_flag
- allow_undefined_flag=
- if { (eval echo "$as_me:$LINENO: \"$archive_cmds 2\>\&1 \| $GREP \" -lc \" \>/dev/null 2\>\&1\"") >&5
- (eval $archive_cmds 2\>\&1 \| $GREP \" -lc \" \>/dev/null 2\>\&1) 2>&5
- ac_status=$?
- echo "$as_me:$LINENO: \$? = $ac_status" >&5
- (exit $ac_status); }
- then
- archive_cmds_need_lc=no
- else
- archive_cmds_need_lc=yes
- fi
- allow_undefined_flag=$lt_save_allow_undefined_flag
- else
- cat conftest.err 1>&5
- fi
- $RM conftest*
- echo "$as_me:$LINENO: result: $archive_cmds_need_lc" >&5
-echo "${ECHO_T}$archive_cmds_need_lc" >&6
- ;;
- esac
- fi
- ;;
-esac
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
- echo "$as_me:$LINENO: checking dynamic linker characteristics" >&5
-echo $ECHO_N "checking dynamic linker characteristics... $ECHO_C" >&6
-withGCC=$GCC
-if test "$withGCC" = yes; then
- case $host_os in
- darwin*) lt_awk_arg="/^libraries:/,/LR/" ;;
- *) lt_awk_arg="/^libraries:/" ;;
- esac
- lt_search_path_spec=`$CC -print-search-dirs | awk $lt_awk_arg | $SED -e "s/^libraries://" -e "s,=/,/,g"`
- if $ECHO "$lt_search_path_spec" | $GREP ';' >/dev/null ; then
- # if the path contains ";" then we assume it to be the separator
- # otherwise default to the standard path separator (i.e. ":") - it is
- # assumed that no part of a normal pathname contains ";" but that should
- # okay in the real world where ";" in dirpaths is itself problematic.
- lt_search_path_spec=`$ECHO "$lt_search_path_spec" | $SED -e 's/;/ /g'`
- else
- lt_search_path_spec=`$ECHO "$lt_search_path_spec" | $SED -e "s/$PATH_SEPARATOR/ /g"`
- fi
- # Ok, now we have the path, separated by spaces, we can step through it
- # and add multilib dir if necessary.
- lt_tmp_lt_search_path_spec=
- lt_multi_os_dir=`$CC $CPPFLAGS $CFLAGS $LDFLAGS -print-multi-os-directory 2>/dev/null`
- for lt_sys_path in $lt_search_path_spec; do
- if test -d "$lt_sys_path/$lt_multi_os_dir"; then
- lt_tmp_lt_search_path_spec="$lt_tmp_lt_search_path_spec $lt_sys_path/$lt_multi_os_dir"
- else
- test -d "$lt_sys_path" && \
- lt_tmp_lt_search_path_spec="$lt_tmp_lt_search_path_spec $lt_sys_path"
- fi
- done
- lt_search_path_spec=`$ECHO $lt_tmp_lt_search_path_spec | awk '
-BEGIN {RS=" "; FS="/|\n";} {
- lt_foo="";
- lt_count=0;
- for (lt_i = NF; lt_i > 0; lt_i--) {
- if ($lt_i != "" && $lt_i != ".") {
- if ($lt_i == "..") {
- lt_count++;
- } else {
- if (lt_count == 0) {
- lt_foo="/" $lt_i lt_foo;
- } else {
- lt_count--;
- }
- }
- }
- }
- if (lt_foo != "") { lt_freq[lt_foo]++; }
- if (lt_freq[lt_foo] == 1) { print lt_foo; }
-}'`
- sys_lib_search_path_spec=`$ECHO $lt_search_path_spec`
-else
- sys_lib_search_path_spec="/lib /usr/lib /usr/local/lib"
-fi
-library_names_spec=
-libname_spec='lib$name'
-soname_spec=
-shrext_cmds=".so"
-postinstall_cmds=
-postuninstall_cmds=
-finish_cmds=
-finish_eval=
-shlibpath_var=
-shlibpath_overrides_runpath=unknown
-version_type=none
-dynamic_linker="$host_os ld.so"
-sys_lib_dlsearch_path_spec="/lib /usr/lib"
-need_lib_prefix=unknown
-hardcode_into_libs=no
-
-# when you set need_version to no, make sure it does not cause -set_version
-# flags to be left without arguments
-need_version=unknown
-
-case $host_os in
-aix3*)
- version_type=linux
- library_names_spec='${libname}${release}${shared_ext}$versuffix $libname.a'
- shlibpath_var=LIBPATH
-
- # AIX 3 has no versioning support, so we append a major version to the name.
- soname_spec='${libname}${release}${shared_ext}$major'
- ;;
-
-aix4* | aix5*)
- version_type=linux
- need_lib_prefix=no
- need_version=no
- hardcode_into_libs=yes
- if test "$host_cpu" = ia64; then
- # AIX 5 supports IA64
- library_names_spec='${libname}${release}${shared_ext}$major ${libname}${release}${shared_ext}$versuffix $libname${shared_ext}'
- shlibpath_var=LD_LIBRARY_PATH
- else
- # With GCC up to 2.95.x, collect2 would create an import file
- # for dependence libraries. The import file would start with
- # the line `#! .'. This would cause the generated library to
- # depend on `.', always an invalid library. This was fixed in
- # development snapshots of GCC prior to 3.0.
- case $host_os in
- aix4 | aix4.[01] | aix4.[01].*)
- if { echo '#if __GNUC__ > 2 || (__GNUC__ == 2 && __GNUC_MINOR__ >= 97)'
- echo ' yes '
- echo '#endif'; } | ${CC} -E - | $GREP yes > /dev/null; then
- :
- else
- can_build_shared=no
- fi
- ;;
- esac
- # AIX (on Power*) has no versioning support, so currently we can not hardcode correct
- # soname into executable. Probably we can add versioning support to
- # collect2, so additional links can be useful in future.
- if test "$aix_use_runtimelinking" = yes; then
- # If using run time linking (on AIX 4.2 or later) use lib<name>.so
- # instead of lib<name>.a to let people know that these are not
- # typical AIX shared libraries.
- library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
- else
- # We preserve .a as extension for shared libraries through AIX4.2
- # and later when we are not doing run time linking.
- library_names_spec='${libname}${release}.a $libname.a'
- soname_spec='${libname}${release}${shared_ext}$major'
- fi
- shlibpath_var=LIBPATH
- fi
- ;;
-
-amigaos*)
- if test "$host_cpu" = m68k; then
- library_names_spec='$libname.ixlibrary $libname.a'
- # Create ${libname}_ixlibrary.a entries in /sys/libs.
- finish_eval='for lib in `ls $libdir/*.ixlibrary 2>/dev/null`; do libname=`$ECHO "X$lib" | $Xsed -e '\''s%^.*/\([^/]*\)\.ixlibrary$%\1%'\''`; test $RM /sys/libs/${libname}_ixlibrary.a; $show "cd /sys/libs && $LN_S $lib ${libname}_ixlibrary.a"; cd /sys/libs && $LN_S $lib ${libname}_ixlibrary.a || exit 1; done'
- else
- dynamic_linker=no
- fi
- ;;
-
-beos*)
- library_names_spec='${libname}${shared_ext}'
- dynamic_linker="$host_os ld.so"
- shlibpath_var=LIBRARY_PATH
- ;;
-
-bsdi[45]*)
- version_type=linux
- need_version=no
- library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
- soname_spec='${libname}${release}${shared_ext}$major'
- finish_cmds='PATH="\$PATH:/sbin" ldconfig $libdir'
- shlibpath_var=LD_LIBRARY_PATH
- sys_lib_search_path_spec="/shlib /usr/lib /usr/X11/lib /usr/contrib/lib /lib /usr/local/lib"
- sys_lib_dlsearch_path_spec="/shlib /usr/lib /usr/local/lib"
- # the default ld.so.conf also contains /usr/contrib/lib and
- # /usr/X11R6/lib (/usr/X11 is a link to /usr/X11R6), but let us allow
- # libtool to hard-code these into programs
- ;;
-
-cygwin* | mingw* | pw32*)
- version_type=windows
- shrext_cmds=".dll"
- need_version=no
- need_lib_prefix=no
-
- case $withGCC,$host_os in
- yes,cygwin* | yes,mingw* | yes,pw32*)
- library_names_spec='$libname.dll.a'
- # DLL is installed to $(libdir)/../bin by postinstall_cmds
- postinstall_cmds='base_file=`basename \${file}`~
- dlpath=`$SHELL 2>&1 -c '\''. $dir/'\''\${base_file}'\''i; echo \$dlname'\''`~
- dldir=$destdir/`dirname \$dlpath`~
- test -d \$dldir || mkdir -p \$dldir~
- $install_prog $dir/$dlname \$dldir/$dlname~
- chmod a+x \$dldir/$dlname~
- if test -n '\''$stripme'\'' && test -n '\''$striplib'\''; then
- eval '\''$striplib \$dldir/$dlname'\'' || exit \$?;
- fi'
- postuninstall_cmds='dldll=`$SHELL 2>&1 -c '\''. $file; echo \$dlname'\''`~
- dlpath=$dir/\$dldll~
- $RM \$dlpath'
- shlibpath_overrides_runpath=yes
-
- case $host_os in
- cygwin*)
- # Cygwin DLLs use 'cyg' prefix rather than 'lib'
- soname_spec='`echo ${libname} | sed -e 's/^lib/cyg/'``echo ${release} | $SED -e 's/[.]/-/g'`${versuffix}${shared_ext}'
- sys_lib_search_path_spec="/usr/lib /lib/w32api /lib /usr/local/lib"
- ;;
- mingw*)
- # MinGW DLLs use traditional 'lib' prefix
- soname_spec='${libname}`echo ${release} | $SED -e 's/[.]/-/g'`${versuffix}${shared_ext}'
- sys_lib_search_path_spec=`$CC -print-search-dirs | $GREP "^libraries:" | $SED -e "s/^libraries://" -e "s,=/,/,g"`
- if $ECHO "$sys_lib_search_path_spec" | $GREP ';[c-zC-Z]:/' >/dev/null; then
- # It is most probably a Windows format PATH printed by
- # mingw gcc, but we are running on Cygwin. Gcc prints its search
- # path with ; separators, and with drive letters. We can handle the
- # drive letters (cygwin fileutils understands them), so leave them,
- # especially as we might pass files found there to a mingw objdump,
- # which wouldn't understand a cygwinified path. Ahh.
- sys_lib_search_path_spec=`$ECHO "$sys_lib_search_path_spec" | $SED -e 's/;/ /g'`
- else
- sys_lib_search_path_spec=`$ECHO "$sys_lib_search_path_spec" | $SED -e "s/$PATH_SEPARATOR/ /g"`
- fi
- ;;
- pw32*)
- # pw32 DLLs use 'pw' prefix rather than 'lib'
- library_names_spec='`echo ${libname} | sed -e 's/^lib/pw/'``echo ${release} | $SED -e 's/[.]/-/g'`${versuffix}${shared_ext}'
- ;;
- esac
- ;;
-
- *)
- library_names_spec='${libname}`echo ${release} | $SED -e 's/[.]/-/g'`${versuffix}${shared_ext} $libname.lib'
- ;;
- esac
- dynamic_linker='Win32 ld.exe'
- # FIXME: first we should search . and the directory the executable is in
- shlibpath_var=PATH
- ;;
-
-darwin* | rhapsody*)
- dynamic_linker="$host_os dyld"
- version_type=darwin
- need_lib_prefix=no
- need_version=no
- library_names_spec='${libname}${release}${major}$shared_ext ${libname}$shared_ext'
- soname_spec='${libname}${release}${major}$shared_ext'
- shlibpath_overrides_runpath=yes
- shlibpath_var=DYLD_LIBRARY_PATH
- shrext_cmds='`test .$module = .yes && echo .so || echo .dylib`'
-
- sys_lib_search_path_spec="$sys_lib_search_path_spec /usr/local/lib"
- sys_lib_dlsearch_path_spec='/usr/local/lib /lib /usr/lib'
- ;;
-
-dgux*)
- version_type=linux
- need_lib_prefix=no
- need_version=no
- library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname$shared_ext'
- soname_spec='${libname}${release}${shared_ext}$major'
- shlibpath_var=LD_LIBRARY_PATH
- ;;
-
-freebsd1*)
- dynamic_linker=no
- ;;
-
-freebsd* | dragonfly*)
- # DragonFly does not have aout. When/if they implement a new
- # versioning mechanism, adjust this.
- if test -x /usr/bin/objformat; then
- objformat=`/usr/bin/objformat`
- else
- case $host_os in
- freebsd[123]*) objformat=aout ;;
- *) objformat=elf ;;
- esac
- fi
- version_type=freebsd-$objformat
- case $version_type in
- freebsd-elf*)
- library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext} $libname${shared_ext}'
- need_version=no
- need_lib_prefix=no
- ;;
- freebsd-*)
- library_names_spec='${libname}${release}${shared_ext}$versuffix $libname${shared_ext}$versuffix'
- need_version=yes
- ;;
- esac
- shlibpath_var=LD_LIBRARY_PATH
- case $host_os in
- freebsd2*)
- shlibpath_overrides_runpath=yes
- ;;
- freebsd3.[01]* | freebsdelf3.[01]*)
- shlibpath_overrides_runpath=yes
- hardcode_into_libs=yes
- ;;
- freebsd3.[2-9]* | freebsdelf3.[2-9]* | \
- freebsd4.[0-5] | freebsdelf4.[0-5] | freebsd4.1.1 | freebsdelf4.1.1)
- shlibpath_overrides_runpath=no
- hardcode_into_libs=yes
- ;;
- *) # from 4.6 on, and DragonFly
- shlibpath_overrides_runpath=yes
- hardcode_into_libs=yes
- ;;
- esac
- ;;
-
-gnu*)
- version_type=linux
- need_lib_prefix=no
- need_version=no
- library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}${major} ${libname}${shared_ext}'
- soname_spec='${libname}${release}${shared_ext}$major'
- shlibpath_var=LD_LIBRARY_PATH
- hardcode_into_libs=yes
- ;;
-
-hpux9* | hpux10* | hpux11*)
- # Give a soname corresponding to the major version so that dld.sl refuses to
- # link against other versions.
- version_type=sunos
- need_lib_prefix=no
- need_version=no
- case $host_cpu in
- ia64*)
- shrext_cmds='.so'
- hardcode_into_libs=yes
- dynamic_linker="$host_os dld.so"
- shlibpath_var=LD_LIBRARY_PATH
- shlibpath_overrides_runpath=yes # Unless +noenvvar is specified.
- library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
- soname_spec='${libname}${release}${shared_ext}$major'
- if test "X$HPUX_IA64_MODE" = X32; then
- sys_lib_search_path_spec="/usr/lib/hpux32 /usr/local/lib/hpux32 /usr/local/lib"
- else
- sys_lib_search_path_spec="/usr/lib/hpux64 /usr/local/lib/hpux64"
- fi
- sys_lib_dlsearch_path_spec=$sys_lib_search_path_spec
- ;;
- hppa*64*)
- shrext_cmds='.sl'
- hardcode_into_libs=yes
- dynamic_linker="$host_os dld.sl"
- shlibpath_var=LD_LIBRARY_PATH # How should we handle SHLIB_PATH
- shlibpath_overrides_runpath=yes # Unless +noenvvar is specified.
- library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
- soname_spec='${libname}${release}${shared_ext}$major'
- sys_lib_search_path_spec="/usr/lib/pa20_64 /usr/ccs/lib/pa20_64"
- sys_lib_dlsearch_path_spec=$sys_lib_search_path_spec
- ;;
- *)
- shrext_cmds='.sl'
- dynamic_linker="$host_os dld.sl"
- shlibpath_var=SHLIB_PATH
- shlibpath_overrides_runpath=no # +s is required to enable SHLIB_PATH
- library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
- soname_spec='${libname}${release}${shared_ext}$major'
- ;;
- esac
- # HP-UX runs *really* slowly unless shared libraries are mode 555.
- postinstall_cmds='chmod 555 $lib'
- ;;
-
-interix[3-9]*)
- version_type=linux
- need_lib_prefix=no
- need_version=no
- library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major ${libname}${shared_ext}'
- soname_spec='${libname}${release}${shared_ext}$major'
- dynamic_linker='Interix 3.x ld.so.1 (PE, like ELF)'
- shlibpath_var=LD_LIBRARY_PATH
- shlibpath_overrides_runpath=no
- hardcode_into_libs=yes
- ;;
-
-irix5* | irix6* | nonstopux*)
- case $host_os in
- nonstopux*) version_type=nonstopux ;;
- *)
- if test "$lt_cv_prog_gnu_ld" = yes; then
- version_type=linux
- else
- version_type=irix
- fi ;;
- esac
- need_lib_prefix=no
- need_version=no
- soname_spec='${libname}${release}${shared_ext}$major'
- library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major ${libname}${release}${shared_ext} $libname${shared_ext}'
- case $host_os in
- irix5* | nonstopux*)
- libsuff= shlibsuff=
- ;;
- *)
- case $LD in # libtool.m4 will add one of these switches to LD
- *-32|*"-32 "|*-melf32bsmip|*"-melf32bsmip ")
- libsuff= shlibsuff= libmagic=32-bit;;
- *-n32|*"-n32 "|*-melf32bmipn32|*"-melf32bmipn32 ")
- libsuff=32 shlibsuff=N32 libmagic=N32;;
- *-64|*"-64 "|*-melf64bmip|*"-melf64bmip ")
- libsuff=64 shlibsuff=64 libmagic=64-bit;;
- *) libsuff= shlibsuff= libmagic=never-match;;
- esac
- ;;
- esac
- shlibpath_var=LD_LIBRARY${shlibsuff}_PATH
- shlibpath_overrides_runpath=no
- sys_lib_search_path_spec="/usr/lib${libsuff} /lib${libsuff} /usr/local/lib${libsuff}"
- sys_lib_dlsearch_path_spec="/usr/lib${libsuff} /lib${libsuff}"
- hardcode_into_libs=yes
- ;;
-
-# No shared lib support for Linux oldld, aout, or coff.
-linux*oldld* | linux*aout* | linux*coff*)
- dynamic_linker=no
- ;;
-
-# This must be Linux ELF.
-linux* | k*bsd*-gnu)
- version_type=linux
- need_lib_prefix=no
- need_version=no
- library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
- soname_spec='${libname}${release}${shared_ext}$major'
- finish_cmds='PATH="\$PATH:/sbin" ldconfig -n $libdir'
- shlibpath_var=LD_LIBRARY_PATH
- shlibpath_overrides_runpath=no
- # Some binutils ld are patched to set DT_RUNPATH
- save_LDFLAGS=$LDFLAGS
- save_libdir=$libdir
- eval "libdir=/foo; wl=\"$lt_prog_compiler_wl\"; \
- LDFLAGS=\"\$LDFLAGS $hardcode_libdir_flag_spec\""
- cat >conftest.$ac_ext <<_ACEOF
-/* confdefs.h. */
-_ACEOF
-cat confdefs.h >>conftest.$ac_ext
-cat >>conftest.$ac_ext <<_ACEOF
-/* end confdefs.h. */
-
-int
-main ()
-{
-
- ;
- return 0;
-}
-_ACEOF
-rm -f conftest.$ac_objext conftest$ac_exeext
-if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
- (eval $ac_link) 2>conftest.er1
- ac_status=$?
- grep -v '^ *+' conftest.er1 >conftest.err
- rm -f conftest.er1
- cat conftest.err >&5
- echo "$as_me:$LINENO: \$? = $ac_status" >&5
- (exit $ac_status); } &&
- { ac_try='test -z "$ac_c_werror_flag"
- || test ! -s conftest.err'
- { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
- (eval $ac_try) 2>&5
- ac_status=$?
- echo "$as_me:$LINENO: \$? = $ac_status" >&5
- (exit $ac_status); }; } &&
- { ac_try='test -s conftest$ac_exeext'
- { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
- (eval $ac_try) 2>&5
- ac_status=$?
- echo "$as_me:$LINENO: \$? = $ac_status" >&5
- (exit $ac_status); }; }; then
- if ($OBJDUMP -p conftest$ac_exeext) 2>/dev/null | grep "RUNPATH.*$libdir"; then
- shlibpath_overrides_runpath=yes
-fi
-
-else
- echo "$as_me: failed program was:" >&5
-sed 's/^/| /' conftest.$ac_ext >&5
-
-fi
-rm -f conftest.err conftest.$ac_objext \
- conftest$ac_exeext conftest.$ac_ext
- LDFLAGS=$save_LDFLAGS
- libdir=$save_libdir
-
- # This implies no fast_install, which is unacceptable.
- # Some rework will be needed to allow for fast_install
- # before this can be enabled.
- hardcode_into_libs=yes
-
- # Append ld.so.conf contents to the search path
- if test -f /etc/ld.so.conf; then
- lt_ld_extra=`awk '/^include / { system(sprintf("cd /etc; cat %s 2>/dev/null", \$2)); skip = 1; } { if (!skip) print \$0; skip = 0; }' < /etc/ld.so.conf | $SED -e 's/#.*//;s/[:, ]/ /g;s/=[^=]*$//;s/=[^= ]* / /g;/^$/d' | tr '\n' ' '`
- sys_lib_dlsearch_path_spec="/lib /usr/lib $lt_ld_extra"
- fi
-
- # We used to test for /lib/ld.so.1 and disable shared libraries on
- # powerpc, because MkLinux only supported shared libraries with the
- # GNU dynamic linker. Since this was broken with cross compilers,
- # most powerpc-linux boxes support dynamic linking these days and
- # people can always --disable-shared, the test was removed, and we
- # assume the GNU/Linux dynamic linker is in use.
- dynamic_linker='GNU/Linux ld.so'
- ;;
-
-netbsd*)
- version_type=sunos
- need_lib_prefix=no
- need_version=no
- if echo __ELF__ | $CC -E - | $GREP __ELF__ >/dev/null; then
- library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${shared_ext}$versuffix'
- finish_cmds='PATH="\$PATH:/sbin" ldconfig -m $libdir'
- dynamic_linker='NetBSD (a.out) ld.so'
- else
- library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major ${libname}${shared_ext}'
- soname_spec='${libname}${release}${shared_ext}$major'
- dynamic_linker='NetBSD ld.elf_so'
- fi
- shlibpath_var=LD_LIBRARY_PATH
- shlibpath_overrides_runpath=yes
- hardcode_into_libs=yes
- ;;
-
-newsos6)
- version_type=linux
- library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
- shlibpath_var=LD_LIBRARY_PATH
- shlibpath_overrides_runpath=yes
- ;;
-
-*nto* | *qnx*)
- version_type=qnx
- need_lib_prefix=no
- need_version=no
- library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
- soname_spec='${libname}${release}${shared_ext}$major'
- shlibpath_var=LD_LIBRARY_PATH
- shlibpath_overrides_runpath=no
- hardcode_into_libs=yes
- dynamic_linker='ldqnx.so'
- ;;
-
-openbsd*)
- version_type=sunos
- sys_lib_dlsearch_path_spec="/usr/lib"
- need_lib_prefix=no
- # Some older versions of OpenBSD (3.3 at least) *do* need versioned libs.
- case $host_os in
- openbsd3.3 | openbsd3.3.*) need_version=yes ;;
- *) need_version=no ;;
- esac
- library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${shared_ext}$versuffix'
- finish_cmds='PATH="\$PATH:/sbin" ldconfig -m $libdir'
- shlibpath_var=LD_LIBRARY_PATH
- if test -z "`echo __ELF__ | $CC -E - | $GREP __ELF__`" || test "$host_os-$host_cpu" = "openbsd2.8-powerpc"; then
- case $host_os in
- openbsd2.[89] | openbsd2.[89].*)
- shlibpath_overrides_runpath=no
- ;;
- *)
- shlibpath_overrides_runpath=yes
- ;;
- esac
- else
- shlibpath_overrides_runpath=yes
- fi
- ;;
-
-os2*)
- libname_spec='$name'
- shrext_cmds=".dll"
- need_lib_prefix=no
- library_names_spec='$libname${shared_ext} $libname.a'
- dynamic_linker='OS/2 ld.exe'
- shlibpath_var=LIBPATH
- ;;
-
-osf3* | osf4* | osf5*)
- version_type=osf
- need_lib_prefix=no
- need_version=no
- soname_spec='${libname}${release}${shared_ext}$major'
- library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
- shlibpath_var=LD_LIBRARY_PATH
- sys_lib_search_path_spec="/usr/shlib /usr/ccs/lib /usr/lib/cmplrs/cc /usr/lib /usr/local/lib /var/shlib"
- sys_lib_dlsearch_path_spec="$sys_lib_search_path_spec"
- ;;
-
-rdos*)
- dynamic_linker=no
- ;;
-
-solaris*)
- version_type=linux
- need_lib_prefix=no
- need_version=no
- library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
- soname_spec='${libname}${release}${shared_ext}$major'
- shlibpath_var=LD_LIBRARY_PATH
- shlibpath_overrides_runpath=yes
- hardcode_into_libs=yes
- # ldd complains unless libraries are executable
- postinstall_cmds='chmod +x $lib'
- ;;
-
-sunos4*)
- version_type=sunos
- library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${shared_ext}$versuffix'
- finish_cmds='PATH="\$PATH:/usr/etc" ldconfig $libdir'
- shlibpath_var=LD_LIBRARY_PATH
- shlibpath_overrides_runpath=yes
- if test "$with_gnu_ld" = yes; then
- need_lib_prefix=no
- fi
- need_version=yes
- ;;
-
-sysv4 | sysv4.3*)
- version_type=linux
- library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
- soname_spec='${libname}${release}${shared_ext}$major'
- shlibpath_var=LD_LIBRARY_PATH
- case $host_vendor in
- sni)
- shlibpath_overrides_runpath=no
- need_lib_prefix=no
- runpath_var=LD_RUN_PATH
- ;;
- siemens)
- need_lib_prefix=no
- ;;
- motorola)
- need_lib_prefix=no
- need_version=no
- shlibpath_overrides_runpath=no
- sys_lib_search_path_spec='/lib /usr/lib /usr/ccs/lib'
- ;;
- esac
- ;;
-
-sysv4*MP*)
- if test -d /usr/nec ;then
- version_type=linux
- library_names_spec='$libname${shared_ext}.$versuffix $libname${shared_ext}.$major $libname${shared_ext}'
- soname_spec='$libname${shared_ext}.$major'
- shlibpath_var=LD_LIBRARY_PATH
- fi
- ;;
-
-sysv5* | sco3.2v5* | sco5v6* | unixware* | OpenUNIX* | sysv4*uw2*)
- version_type=freebsd-elf
- need_lib_prefix=no
- need_version=no
- library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext} $libname${shared_ext}'
- soname_spec='${libname}${release}${shared_ext}$major'
- shlibpath_var=LD_LIBRARY_PATH
- shlibpath_overrides_runpath=yes
- hardcode_into_libs=yes
- if test "$with_gnu_ld" = yes; then
- sys_lib_search_path_spec='/usr/local/lib /usr/gnu/lib /usr/ccs/lib /usr/lib /lib'
- else
- sys_lib_search_path_spec='/usr/ccs/lib /usr/lib'
- case $host_os in
- sco3.2v5*)
- sys_lib_search_path_spec="$sys_lib_search_path_spec /lib"
- ;;
- esac
- fi
- sys_lib_dlsearch_path_spec='/usr/lib'
- ;;
-
-tpf*)
- # TPF is a cross-target only. Preferred cross-host = GNU/Linux.
- version_type=linux
- need_lib_prefix=no
- need_version=no
- library_name_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
- shlibpath_var=LD_LIBRARY_PATH
- shlibpath_overrides_runpath=no
- hardcode_into_libs=yes
- ;;
-
-uts4*)
- version_type=linux
- library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
- soname_spec='${libname}${release}${shared_ext}$major'
- shlibpath_var=LD_LIBRARY_PATH
- ;;
-
-*)
- dynamic_linker=no
- ;;
-esac
-echo "$as_me:$LINENO: result: $dynamic_linker" >&5
-echo "${ECHO_T}$dynamic_linker" >&6
-test "$dynamic_linker" = no && can_build_shared=no
-
-variables_saved_for_relink="PATH $shlibpath_var $runpath_var"
-if test "$GCC" = yes; then
- variables_saved_for_relink="$variables_saved_for_relink GCC_EXEC_PREFIX COMPILER_PATH LIBRARY_PATH"
-fi
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
- echo "$as_me:$LINENO: checking how to hardcode library paths into programs" >&5
-echo $ECHO_N "checking how to hardcode library paths into programs... $ECHO_C" >&6
-hardcode_action=
-if test -n "$hardcode_libdir_flag_spec" ||
- test -n "$runpath_var" ||
- test "X$hardcode_automatic" = "Xyes" ; then
-
- # We can hardcode non-existent directories.
- if test "$hardcode_direct" != no &&
- # If the only mechanism to avoid hardcoding is shlibpath_var, we
- # have to relink, otherwise we might link with an installed library
- # when we should be linking with a yet-to-be-installed one
- ## test "$_LT_TAGVAR(hardcode_shlibpath_var, )" != no &&
- test "$hardcode_minus_L" != no; then
- # Linking always hardcodes the temporary library directory.
- hardcode_action=relink
- else
- # We can link without hardcoding, and we can hardcode nonexisting dirs.
- hardcode_action=immediate
- fi
-else
- # We cannot hardcode anything, or else we can only hardcode existing
- # directories.
- hardcode_action=unsupported
-fi
-echo "$as_me:$LINENO: result: $hardcode_action" >&5
-echo "${ECHO_T}$hardcode_action" >&6
-
-if test "$hardcode_action" = relink ||
- test "$inherit_rpath" = yes; then
- # Fast installation is not supported
- enable_fast_install=no
-elif test "$shlibpath_overrides_runpath" = yes ||
- test "$enable_shared" = no; then
- # Fast installation is not necessary
- enable_fast_install=needless
-fi
-
-
-
-
-
-
- if test "x$enable_dlopen" != xyes; then
- enable_dlopen=unknown
- enable_dlopen_self=unknown
- enable_dlopen_self_static=unknown
-else
- lt_cv_dlopen=no
- lt_cv_dlopen_libs=
-
- case $host_os in
- beos*)
- lt_cv_dlopen="load_add_on"
- lt_cv_dlopen_libs=
- lt_cv_dlopen_self=yes
- ;;
-
- mingw* | pw32*)
- lt_cv_dlopen="LoadLibrary"
- lt_cv_dlopen_libs=
- ;;
-
- cygwin*)
- lt_cv_dlopen="dlopen"
- lt_cv_dlopen_libs=
- ;;
-
- darwin*)
- # if libdl is installed we need to link against it
- echo "$as_me:$LINENO: checking for dlopen in -ldl" >&5
-echo $ECHO_N "checking for dlopen in -ldl... $ECHO_C" >&6
-if test "${ac_cv_lib_dl_dlopen+set}" = set; then
- echo $ECHO_N "(cached) $ECHO_C" >&6
-else
- ac_check_lib_save_LIBS=$LIBS
-LIBS="-ldl $LIBS"
-cat >conftest.$ac_ext <<_ACEOF
-/* confdefs.h. */
-_ACEOF
-cat confdefs.h >>conftest.$ac_ext
-cat >>conftest.$ac_ext <<_ACEOF
-/* end confdefs.h. */
-
-/* Override any gcc2 internal prototype to avoid an error. */
-#ifdef __cplusplus
-extern "C"
-#endif
-/* We use char because int might match the return type of a gcc2
- builtin and then its argument prototype would still apply. */
-char dlopen ();
-int
-main ()
-{
-dlopen ();
- ;
- return 0;
-}
-_ACEOF
-rm -f conftest.$ac_objext conftest$ac_exeext
-if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
- (eval $ac_link) 2>conftest.er1
- ac_status=$?
- grep -v '^ *+' conftest.er1 >conftest.err
- rm -f conftest.er1
- cat conftest.err >&5
- echo "$as_me:$LINENO: \$? = $ac_status" >&5
- (exit $ac_status); } &&
- { ac_try='test -z "$ac_c_werror_flag"
- || test ! -s conftest.err'
- { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
- (eval $ac_try) 2>&5
- ac_status=$?
- echo "$as_me:$LINENO: \$? = $ac_status" >&5
- (exit $ac_status); }; } &&
- { ac_try='test -s conftest$ac_exeext'
- { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
- (eval $ac_try) 2>&5
- ac_status=$?
- echo "$as_me:$LINENO: \$? = $ac_status" >&5
- (exit $ac_status); }; }; then
- ac_cv_lib_dl_dlopen=yes
-else
- echo "$as_me: failed program was:" >&5
-sed 's/^/| /' conftest.$ac_ext >&5
-
-ac_cv_lib_dl_dlopen=no
-fi
-rm -f conftest.err conftest.$ac_objext \
- conftest$ac_exeext conftest.$ac_ext
-LIBS=$ac_check_lib_save_LIBS
-fi
-echo "$as_me:$LINENO: result: $ac_cv_lib_dl_dlopen" >&5
-echo "${ECHO_T}$ac_cv_lib_dl_dlopen" >&6
-if test $ac_cv_lib_dl_dlopen = yes; then
- lt_cv_dlopen="dlopen" lt_cv_dlopen_libs="-ldl"
-else
-
- lt_cv_dlopen="dyld"
- lt_cv_dlopen_libs=
- lt_cv_dlopen_self=yes
-
-fi
-
- ;;
-
- *)
- echo "$as_me:$LINENO: checking for shl_load" >&5
-echo $ECHO_N "checking for shl_load... $ECHO_C" >&6
-if test "${ac_cv_func_shl_load+set}" = set; then
- echo $ECHO_N "(cached) $ECHO_C" >&6
-else
- cat >conftest.$ac_ext <<_ACEOF
-/* confdefs.h. */
-_ACEOF
-cat confdefs.h >>conftest.$ac_ext
-cat >>conftest.$ac_ext <<_ACEOF
-/* end confdefs.h. */
-/* Define shl_load to an innocuous variant, in case <limits.h> declares shl_load.
- For example, HP-UX 11i <limits.h> declares gettimeofday. */
-#define shl_load innocuous_shl_load
-
-/* System header to define __stub macros and hopefully few prototypes,
- which can conflict with char shl_load (); below.
- Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
- <limits.h> exists even on freestanding compilers. */
-
-#ifdef __STDC__
-# include <limits.h>
-#else
-# include <assert.h>
-#endif
-
-#undef shl_load
-
-/* Override any gcc2 internal prototype to avoid an error. */
-#ifdef __cplusplus
-extern "C"
-{
-#endif
-/* We use char because int might match the return type of a gcc2
- builtin and then its argument prototype would still apply. */
-char shl_load ();
-/* The GNU C library defines this for functions which it implements
- to always fail with ENOSYS. Some functions are actually named
- something starting with __ and the normal name is an alias. */
-#if defined (__stub_shl_load) || defined (__stub___shl_load)
-choke me
-#else
-char (*f) () = shl_load;
-#endif
-#ifdef __cplusplus
-}
-#endif
-
-int
-main ()
-{
-return f != shl_load;
- ;
- return 0;
-}
-_ACEOF
-rm -f conftest.$ac_objext conftest$ac_exeext
-if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
- (eval $ac_link) 2>conftest.er1
- ac_status=$?
- grep -v '^ *+' conftest.er1 >conftest.err
- rm -f conftest.er1
- cat conftest.err >&5
- echo "$as_me:$LINENO: \$? = $ac_status" >&5
- (exit $ac_status); } &&
- { ac_try='test -z "$ac_c_werror_flag"
- || test ! -s conftest.err'
- { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
- (eval $ac_try) 2>&5
- ac_status=$?
- echo "$as_me:$LINENO: \$? = $ac_status" >&5
- (exit $ac_status); }; } &&
- { ac_try='test -s conftest$ac_exeext'
- { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
- (eval $ac_try) 2>&5
- ac_status=$?
- echo "$as_me:$LINENO: \$? = $ac_status" >&5
- (exit $ac_status); }; }; then
- ac_cv_func_shl_load=yes
-else
- echo "$as_me: failed program was:" >&5
-sed 's/^/| /' conftest.$ac_ext >&5
-
-ac_cv_func_shl_load=no
-fi
-rm -f conftest.err conftest.$ac_objext \
- conftest$ac_exeext conftest.$ac_ext
-fi
-echo "$as_me:$LINENO: result: $ac_cv_func_shl_load" >&5
-echo "${ECHO_T}$ac_cv_func_shl_load" >&6
-if test $ac_cv_func_shl_load = yes; then
- lt_cv_dlopen="shl_load"
-else
- echo "$as_me:$LINENO: checking for shl_load in -ldld" >&5
-echo $ECHO_N "checking for shl_load in -ldld... $ECHO_C" >&6
-if test "${ac_cv_lib_dld_shl_load+set}" = set; then
- echo $ECHO_N "(cached) $ECHO_C" >&6
-else
- ac_check_lib_save_LIBS=$LIBS
-LIBS="-ldld $LIBS"
-cat >conftest.$ac_ext <<_ACEOF
-/* confdefs.h. */
-_ACEOF
-cat confdefs.h >>conftest.$ac_ext
-cat >>conftest.$ac_ext <<_ACEOF
-/* end confdefs.h. */
-
-/* Override any gcc2 internal prototype to avoid an error. */
-#ifdef __cplusplus
-extern "C"
-#endif
-/* We use char because int might match the return type of a gcc2
- builtin and then its argument prototype would still apply. */
-char shl_load ();
-int
-main ()
-{
-shl_load ();
- ;
- return 0;
-}
-_ACEOF
-rm -f conftest.$ac_objext conftest$ac_exeext
-if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
- (eval $ac_link) 2>conftest.er1
- ac_status=$?
- grep -v '^ *+' conftest.er1 >conftest.err
- rm -f conftest.er1
- cat conftest.err >&5
- echo "$as_me:$LINENO: \$? = $ac_status" >&5
- (exit $ac_status); } &&
- { ac_try='test -z "$ac_c_werror_flag"
- || test ! -s conftest.err'
- { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
- (eval $ac_try) 2>&5
- ac_status=$?
- echo "$as_me:$LINENO: \$? = $ac_status" >&5
- (exit $ac_status); }; } &&
- { ac_try='test -s conftest$ac_exeext'
- { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
- (eval $ac_try) 2>&5
- ac_status=$?
- echo "$as_me:$LINENO: \$? = $ac_status" >&5
- (exit $ac_status); }; }; then
- ac_cv_lib_dld_shl_load=yes
-else
- echo "$as_me: failed program was:" >&5
-sed 's/^/| /' conftest.$ac_ext >&5
-
-ac_cv_lib_dld_shl_load=no
-fi
-rm -f conftest.err conftest.$ac_objext \
- conftest$ac_exeext conftest.$ac_ext
-LIBS=$ac_check_lib_save_LIBS
-fi
-echo "$as_me:$LINENO: result: $ac_cv_lib_dld_shl_load" >&5
-echo "${ECHO_T}$ac_cv_lib_dld_shl_load" >&6
-if test $ac_cv_lib_dld_shl_load = yes; then
- lt_cv_dlopen="shl_load" lt_cv_dlopen_libs="-dld"
-else
- echo "$as_me:$LINENO: checking for dlopen" >&5
-echo $ECHO_N "checking for dlopen... $ECHO_C" >&6
-if test "${ac_cv_func_dlopen+set}" = set; then
- echo $ECHO_N "(cached) $ECHO_C" >&6
-else
- cat >conftest.$ac_ext <<_ACEOF
-/* confdefs.h. */
-_ACEOF
-cat confdefs.h >>conftest.$ac_ext
-cat >>conftest.$ac_ext <<_ACEOF
-/* end confdefs.h. */
-/* Define dlopen to an innocuous variant, in case <limits.h> declares dlopen.
- For example, HP-UX 11i <limits.h> declares gettimeofday. */
-#define dlopen innocuous_dlopen
-
-/* System header to define __stub macros and hopefully few prototypes,
- which can conflict with char dlopen (); below.
- Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
- <limits.h> exists even on freestanding compilers. */
-
-#ifdef __STDC__
-# include <limits.h>
-#else
-# include <assert.h>
-#endif
-
-#undef dlopen
-
-/* Override any gcc2 internal prototype to avoid an error. */
-#ifdef __cplusplus
-extern "C"
-{
-#endif
-/* We use char because int might match the return type of a gcc2
- builtin and then its argument prototype would still apply. */
-char dlopen ();
-/* The GNU C library defines this for functions which it implements
- to always fail with ENOSYS. Some functions are actually named
- something starting with __ and the normal name is an alias. */
-#if defined (__stub_dlopen) || defined (__stub___dlopen)
-choke me
-#else
-char (*f) () = dlopen;
-#endif
-#ifdef __cplusplus
-}
-#endif
-
-int
-main ()
-{
-return f != dlopen;
- ;
- return 0;
-}
-_ACEOF
-rm -f conftest.$ac_objext conftest$ac_exeext
-if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
- (eval $ac_link) 2>conftest.er1
- ac_status=$?
- grep -v '^ *+' conftest.er1 >conftest.err
- rm -f conftest.er1
- cat conftest.err >&5
- echo "$as_me:$LINENO: \$? = $ac_status" >&5
- (exit $ac_status); } &&
- { ac_try='test -z "$ac_c_werror_flag"
- || test ! -s conftest.err'
- { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
- (eval $ac_try) 2>&5
- ac_status=$?
- echo "$as_me:$LINENO: \$? = $ac_status" >&5
- (exit $ac_status); }; } &&
- { ac_try='test -s conftest$ac_exeext'
- { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
- (eval $ac_try) 2>&5
- ac_status=$?
- echo "$as_me:$LINENO: \$? = $ac_status" >&5
- (exit $ac_status); }; }; then
- ac_cv_func_dlopen=yes
-else
- echo "$as_me: failed program was:" >&5
-sed 's/^/| /' conftest.$ac_ext >&5
-
-ac_cv_func_dlopen=no
-fi
-rm -f conftest.err conftest.$ac_objext \
- conftest$ac_exeext conftest.$ac_ext
-fi
-echo "$as_me:$LINENO: result: $ac_cv_func_dlopen" >&5
-echo "${ECHO_T}$ac_cv_func_dlopen" >&6
-if test $ac_cv_func_dlopen = yes; then
- lt_cv_dlopen="dlopen"
-else
- echo "$as_me:$LINENO: checking for dlopen in -ldl" >&5
-echo $ECHO_N "checking for dlopen in -ldl... $ECHO_C" >&6
-if test "${ac_cv_lib_dl_dlopen+set}" = set; then
- echo $ECHO_N "(cached) $ECHO_C" >&6
-else
- ac_check_lib_save_LIBS=$LIBS
-LIBS="-ldl $LIBS"
-cat >conftest.$ac_ext <<_ACEOF
-/* confdefs.h. */
-_ACEOF
-cat confdefs.h >>conftest.$ac_ext
-cat >>conftest.$ac_ext <<_ACEOF
-/* end confdefs.h. */
-
-/* Override any gcc2 internal prototype to avoid an error. */
-#ifdef __cplusplus
-extern "C"
-#endif
-/* We use char because int might match the return type of a gcc2
- builtin and then its argument prototype would still apply. */
-char dlopen ();
-int
-main ()
-{
-dlopen ();
- ;
- return 0;
-}
-_ACEOF
-rm -f conftest.$ac_objext conftest$ac_exeext
-if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
- (eval $ac_link) 2>conftest.er1
- ac_status=$?
- grep -v '^ *+' conftest.er1 >conftest.err
- rm -f conftest.er1
- cat conftest.err >&5
- echo "$as_me:$LINENO: \$? = $ac_status" >&5
- (exit $ac_status); } &&
- { ac_try='test -z "$ac_c_werror_flag"
- || test ! -s conftest.err'
- { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
- (eval $ac_try) 2>&5
- ac_status=$?
- echo "$as_me:$LINENO: \$? = $ac_status" >&5
- (exit $ac_status); }; } &&
- { ac_try='test -s conftest$ac_exeext'
- { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
- (eval $ac_try) 2>&5
- ac_status=$?
- echo "$as_me:$LINENO: \$? = $ac_status" >&5
- (exit $ac_status); }; }; then
- ac_cv_lib_dl_dlopen=yes
-else
- echo "$as_me: failed program was:" >&5
-sed 's/^/| /' conftest.$ac_ext >&5
-
-ac_cv_lib_dl_dlopen=no
-fi
-rm -f conftest.err conftest.$ac_objext \
- conftest$ac_exeext conftest.$ac_ext
-LIBS=$ac_check_lib_save_LIBS
-fi
-echo "$as_me:$LINENO: result: $ac_cv_lib_dl_dlopen" >&5
-echo "${ECHO_T}$ac_cv_lib_dl_dlopen" >&6
-if test $ac_cv_lib_dl_dlopen = yes; then
- lt_cv_dlopen="dlopen" lt_cv_dlopen_libs="-ldl"
-else
- echo "$as_me:$LINENO: checking for dlopen in -lsvld" >&5
-echo $ECHO_N "checking for dlopen in -lsvld... $ECHO_C" >&6
-if test "${ac_cv_lib_svld_dlopen+set}" = set; then
- echo $ECHO_N "(cached) $ECHO_C" >&6
-else
- ac_check_lib_save_LIBS=$LIBS
-LIBS="-lsvld $LIBS"
-cat >conftest.$ac_ext <<_ACEOF
-/* confdefs.h. */
-_ACEOF
-cat confdefs.h >>conftest.$ac_ext
-cat >>conftest.$ac_ext <<_ACEOF
-/* end confdefs.h. */
-
-/* Override any gcc2 internal prototype to avoid an error. */
-#ifdef __cplusplus
-extern "C"
-#endif
-/* We use char because int might match the return type of a gcc2
- builtin and then its argument prototype would still apply. */
-char dlopen ();
-int
-main ()
-{
-dlopen ();
- ;
- return 0;
-}
-_ACEOF
-rm -f conftest.$ac_objext conftest$ac_exeext
-if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
- (eval $ac_link) 2>conftest.er1
- ac_status=$?
- grep -v '^ *+' conftest.er1 >conftest.err
- rm -f conftest.er1
- cat conftest.err >&5
- echo "$as_me:$LINENO: \$? = $ac_status" >&5
- (exit $ac_status); } &&
- { ac_try='test -z "$ac_c_werror_flag"
- || test ! -s conftest.err'
- { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
- (eval $ac_try) 2>&5
- ac_status=$?
- echo "$as_me:$LINENO: \$? = $ac_status" >&5
- (exit $ac_status); }; } &&
- { ac_try='test -s conftest$ac_exeext'
- { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
- (eval $ac_try) 2>&5
- ac_status=$?
- echo "$as_me:$LINENO: \$? = $ac_status" >&5
- (exit $ac_status); }; }; then
- ac_cv_lib_svld_dlopen=yes
-else
- echo "$as_me: failed program was:" >&5
-sed 's/^/| /' conftest.$ac_ext >&5
-
-ac_cv_lib_svld_dlopen=no
-fi
-rm -f conftest.err conftest.$ac_objext \
- conftest$ac_exeext conftest.$ac_ext
-LIBS=$ac_check_lib_save_LIBS
-fi
-echo "$as_me:$LINENO: result: $ac_cv_lib_svld_dlopen" >&5
-echo "${ECHO_T}$ac_cv_lib_svld_dlopen" >&6
-if test $ac_cv_lib_svld_dlopen = yes; then
- lt_cv_dlopen="dlopen" lt_cv_dlopen_libs="-lsvld"
-else
- echo "$as_me:$LINENO: checking for dld_link in -ldld" >&5
-echo $ECHO_N "checking for dld_link in -ldld... $ECHO_C" >&6
-if test "${ac_cv_lib_dld_dld_link+set}" = set; then
- echo $ECHO_N "(cached) $ECHO_C" >&6
-else
- ac_check_lib_save_LIBS=$LIBS
-LIBS="-ldld $LIBS"
-cat >conftest.$ac_ext <<_ACEOF
-/* confdefs.h. */
-_ACEOF
-cat confdefs.h >>conftest.$ac_ext
-cat >>conftest.$ac_ext <<_ACEOF
-/* end confdefs.h. */
-
-/* Override any gcc2 internal prototype to avoid an error. */
-#ifdef __cplusplus
-extern "C"
-#endif
-/* We use char because int might match the return type of a gcc2
- builtin and then its argument prototype would still apply. */
-char dld_link ();
-int
-main ()
-{
-dld_link ();
- ;
- return 0;
-}
-_ACEOF
-rm -f conftest.$ac_objext conftest$ac_exeext
-if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
- (eval $ac_link) 2>conftest.er1
- ac_status=$?
- grep -v '^ *+' conftest.er1 >conftest.err
- rm -f conftest.er1
- cat conftest.err >&5
- echo "$as_me:$LINENO: \$? = $ac_status" >&5
- (exit $ac_status); } &&
- { ac_try='test -z "$ac_c_werror_flag"
- || test ! -s conftest.err'
- { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
- (eval $ac_try) 2>&5
- ac_status=$?
- echo "$as_me:$LINENO: \$? = $ac_status" >&5
- (exit $ac_status); }; } &&
- { ac_try='test -s conftest$ac_exeext'
- { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
- (eval $ac_try) 2>&5
- ac_status=$?
- echo "$as_me:$LINENO: \$? = $ac_status" >&5
- (exit $ac_status); }; }; then
- ac_cv_lib_dld_dld_link=yes
-else
- echo "$as_me: failed program was:" >&5
-sed 's/^/| /' conftest.$ac_ext >&5
-
-ac_cv_lib_dld_dld_link=no
-fi
-rm -f conftest.err conftest.$ac_objext \
- conftest$ac_exeext conftest.$ac_ext
-LIBS=$ac_check_lib_save_LIBS
-fi
-echo "$as_me:$LINENO: result: $ac_cv_lib_dld_dld_link" >&5
-echo "${ECHO_T}$ac_cv_lib_dld_dld_link" >&6
-if test $ac_cv_lib_dld_dld_link = yes; then
- lt_cv_dlopen="dld_link" lt_cv_dlopen_libs="-dld"
-fi
-
-
-fi
-
-
-fi
-
-
-fi
-
-
-fi
-
-
-fi
-
- ;;
- esac
-
- if test "x$lt_cv_dlopen" != xno; then
- enable_dlopen=yes
- else
- enable_dlopen=no
- fi
-
- case $lt_cv_dlopen in
- dlopen)
- save_CPPFLAGS="$CPPFLAGS"
- test "x$ac_cv_header_dlfcn_h" = xyes && CPPFLAGS="$CPPFLAGS -DHAVE_DLFCN_H"
-
- save_LDFLAGS="$LDFLAGS"
- wl=$lt_prog_compiler_wl eval LDFLAGS=\"\$LDFLAGS $export_dynamic_flag_spec\"
-
- save_LIBS="$LIBS"
- LIBS="$lt_cv_dlopen_libs $LIBS"
-
- echo "$as_me:$LINENO: checking whether a program can dlopen itself" >&5
-echo $ECHO_N "checking whether a program can dlopen itself... $ECHO_C" >&6
-if test "${lt_cv_dlopen_self+set}" = set; then
- echo $ECHO_N "(cached) $ECHO_C" >&6
-else
- if test "$cross_compiling" = yes; then :
- lt_cv_dlopen_self=cross
-else
- lt_dlunknown=0; lt_dlno_uscore=1; lt_dlneed_uscore=2
- lt_status=$lt_dlunknown
- cat > conftest.$ac_ext <<_LT_EOF
-#line 9202 "configure"
-#include "confdefs.h"
-
-#if HAVE_DLFCN_H
-#include <dlfcn.h>
-#endif
-
-#include <stdio.h>
-
-#ifdef RTLD_GLOBAL
-# define LT_DLGLOBAL RTLD_GLOBAL
-#else
-# ifdef DL_GLOBAL
-# define LT_DLGLOBAL DL_GLOBAL
-# else
-# define LT_DLGLOBAL 0
-# endif
-#endif
-
-/* We may have to define LT_DLLAZY_OR_NOW in the command line if we
- find out it does not work in some platform. */
-#ifndef LT_DLLAZY_OR_NOW
-# ifdef RTLD_LAZY
-# define LT_DLLAZY_OR_NOW RTLD_LAZY
-# else
-# ifdef DL_LAZY
-# define LT_DLLAZY_OR_NOW DL_LAZY
-# else
-# ifdef RTLD_NOW
-# define LT_DLLAZY_OR_NOW RTLD_NOW
-# else
-# ifdef DL_NOW
-# define LT_DLLAZY_OR_NOW DL_NOW
-# else
-# define LT_DLLAZY_OR_NOW 0
-# endif
-# endif
-# endif
-# endif
-#endif
-
-#ifdef __cplusplus
-extern "C" void exit (int);
-#endif
-
-void fnord() { int i=42;}
-int main ()
-{
- void *self = dlopen (0, LT_DLGLOBAL|LT_DLLAZY_OR_NOW);
- int status = $lt_dlunknown;
-
- if (self)
- {
- if (dlsym (self,"fnord")) status = $lt_dlno_uscore;
- else if (dlsym( self,"_fnord")) status = $lt_dlneed_uscore;
- /* dlclose (self); */
- }
- else
- puts (dlerror ());
-
- exit (status);
-}
-_LT_EOF
- if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
- (eval $ac_link) 2>&5
- ac_status=$?
- echo "$as_me:$LINENO: \$? = $ac_status" >&5
- (exit $ac_status); } && test -s conftest${ac_exeext} 2>/dev/null; then
- (./conftest; exit; ) >&5 2>/dev/null
- lt_status=$?
- case x$lt_status in
- x$lt_dlno_uscore) lt_cv_dlopen_self=yes ;;
- x$lt_dlneed_uscore) lt_cv_dlopen_self=yes ;;
- x$lt_dlunknown|x*) lt_cv_dlopen_self=no ;;
- esac
- else :
- # compilation failed
- lt_cv_dlopen_self=no
- fi
-fi
-rm -fr conftest*
-
-
-fi
-echo "$as_me:$LINENO: result: $lt_cv_dlopen_self" >&5
-echo "${ECHO_T}$lt_cv_dlopen_self" >&6
-
- if test "x$lt_cv_dlopen_self" = xyes; then
- wl=$lt_prog_compiler_wl eval LDFLAGS=\"\$LDFLAGS $lt_prog_compiler_static\"
- echo "$as_me:$LINENO: checking whether a statically linked program can dlopen itself" >&5
-echo $ECHO_N "checking whether a statically linked program can dlopen itself... $ECHO_C" >&6
-if test "${lt_cv_dlopen_self_static+set}" = set; then
- echo $ECHO_N "(cached) $ECHO_C" >&6
-else
- if test "$cross_compiling" = yes; then :
- lt_cv_dlopen_self_static=cross
-else
- lt_dlunknown=0; lt_dlno_uscore=1; lt_dlneed_uscore=2
- lt_status=$lt_dlunknown
- cat > conftest.$ac_ext <<_LT_EOF
-#line 9302 "configure"
-#include "confdefs.h"
-
-#if HAVE_DLFCN_H
-#include <dlfcn.h>
-#endif
-
-#include <stdio.h>
-
-#ifdef RTLD_GLOBAL
-# define LT_DLGLOBAL RTLD_GLOBAL
-#else
-# ifdef DL_GLOBAL
-# define LT_DLGLOBAL DL_GLOBAL
-# else
-# define LT_DLGLOBAL 0
-# endif
-#endif
-
-/* We may have to define LT_DLLAZY_OR_NOW in the command line if we
- find out it does not work in some platform. */
-#ifndef LT_DLLAZY_OR_NOW
-# ifdef RTLD_LAZY
-# define LT_DLLAZY_OR_NOW RTLD_LAZY
-# else
-# ifdef DL_LAZY
-# define LT_DLLAZY_OR_NOW DL_LAZY
-# else
-# ifdef RTLD_NOW
-# define LT_DLLAZY_OR_NOW RTLD_NOW
-# else
-# ifdef DL_NOW
-# define LT_DLLAZY_OR_NOW DL_NOW
-# else
-# define LT_DLLAZY_OR_NOW 0
-# endif
-# endif
-# endif
-# endif
-#endif
-
-#ifdef __cplusplus
-extern "C" void exit (int);
-#endif
-
-void fnord() { int i=42;}
-int main ()
-{
- void *self = dlopen (0, LT_DLGLOBAL|LT_DLLAZY_OR_NOW);
- int status = $lt_dlunknown;
-
- if (self)
- {
- if (dlsym (self,"fnord")) status = $lt_dlno_uscore;
- else if (dlsym( self,"_fnord")) status = $lt_dlneed_uscore;
- /* dlclose (self); */
- }
- else
- puts (dlerror ());
-
- exit (status);
-}
-_LT_EOF
- if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
- (eval $ac_link) 2>&5
- ac_status=$?
- echo "$as_me:$LINENO: \$? = $ac_status" >&5
- (exit $ac_status); } && test -s conftest${ac_exeext} 2>/dev/null; then
- (./conftest; exit; ) >&5 2>/dev/null
- lt_status=$?
- case x$lt_status in
- x$lt_dlno_uscore) lt_cv_dlopen_self_static=yes ;;
- x$lt_dlneed_uscore) lt_cv_dlopen_self_static=yes ;;
- x$lt_dlunknown|x*) lt_cv_dlopen_self_static=no ;;
- esac
- else :
- # compilation failed
- lt_cv_dlopen_self_static=no
- fi
-fi
-rm -fr conftest*
-
-
-fi
-echo "$as_me:$LINENO: result: $lt_cv_dlopen_self_static" >&5
-echo "${ECHO_T}$lt_cv_dlopen_self_static" >&6
- fi
-
- CPPFLAGS="$save_CPPFLAGS"
- LDFLAGS="$save_LDFLAGS"
- LIBS="$save_LIBS"
- ;;
- esac
-
- case $lt_cv_dlopen_self in
- yes|no) enable_dlopen_self=$lt_cv_dlopen_self ;;
- *) enable_dlopen_self=unknown ;;
- esac
-
- case $lt_cv_dlopen_self_static in
- yes|no) enable_dlopen_self_static=$lt_cv_dlopen_self_static ;;
- *) enable_dlopen_self_static=unknown ;;
- esac
-fi
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-striplib=
-old_striplib=
-echo "$as_me:$LINENO: checking whether stripping libraries is possible" >&5
-echo $ECHO_N "checking whether stripping libraries is possible... $ECHO_C" >&6
-if test -n "$STRIP" && $STRIP -V 2>&1 | $GREP "GNU strip" >/dev/null; then
- test -z "$old_striplib" && old_striplib="$STRIP --strip-debug"
- test -z "$striplib" && striplib="$STRIP --strip-unneeded"
- echo "$as_me:$LINENO: result: yes" >&5
-echo "${ECHO_T}yes" >&6
-else
-# FIXME - insert some real tests, host_os isn't really good enough
- case $host_os in
- darwin*)
- if test -n "$STRIP" ; then
- striplib="$STRIP -x"
- old_striplib="$STRIP -S"
- echo "$as_me:$LINENO: result: yes" >&5
-echo "${ECHO_T}yes" >&6
- else
- echo "$as_me:$LINENO: result: no" >&5
-echo "${ECHO_T}no" >&6
- fi
- ;;
- *)
- echo "$as_me:$LINENO: result: no" >&5
-echo "${ECHO_T}no" >&6
- ;;
- esac
-fi
-
-
-
-
-
-
-
-
-
-
-
-
- # Report which library types will actually be built
- echo "$as_me:$LINENO: checking if libtool supports shared libraries" >&5
-echo $ECHO_N "checking if libtool supports shared libraries... $ECHO_C" >&6
- echo "$as_me:$LINENO: result: $can_build_shared" >&5
-echo "${ECHO_T}$can_build_shared" >&6
-
- echo "$as_me:$LINENO: checking whether to build shared libraries" >&5
-echo $ECHO_N "checking whether to build shared libraries... $ECHO_C" >&6
- test "$can_build_shared" = "no" && enable_shared=no
-
- # On AIX, shared libraries and static libraries use the same namespace, and
- # are all built from PIC.
- case $host_os in
- aix3*)
- test "$enable_shared" = yes && enable_static=no
- if test -n "$RANLIB"; then
- archive_cmds="$archive_cmds~\$RANLIB \$lib"
- postinstall_cmds='$RANLIB $lib'
- fi
- ;;
-
- aix4* | aix5*)
- if test "$host_cpu" != ia64 && test "$aix_use_runtimelinking" = no ; then
- test "$enable_shared" = yes && enable_static=no
- fi
- ;;
- esac
- echo "$as_me:$LINENO: result: $enable_shared" >&5
-echo "${ECHO_T}$enable_shared" >&6
-
- echo "$as_me:$LINENO: checking whether to build static libraries" >&5
-echo $ECHO_N "checking whether to build static libraries... $ECHO_C" >&6
- # Make sure either enable_shared or enable_static is yes.
- test "$enable_shared" = yes || enable_static=yes
- echo "$as_me:$LINENO: result: $enable_static" >&5
-echo "${ECHO_T}$enable_static" >&6
-
-
-
-
-fi
-ac_ext=c
-ac_cpp='$CPP $CPPFLAGS'
-ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
-ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
-ac_compiler_gnu=$ac_cv_c_compiler_gnu
-
-CC="$lt_save_CC"
-
-
-
-
-
-
-
-
-
-
-
-
-
- ac_config_commands="$ac_config_commands libtool"
-
-
-
-
-# Only expand once:
-
-
-
-
-# Check whether --with-lib-path or --without-lib-path was given.
-if test "${with_lib_path+set}" = set; then
- withval="$with_lib_path"
- LIB_PATH=$withval
-fi;
-# Check whether --enable-targets or --disable-targets was given.
-if test "${enable_targets+set}" = set; then
- enableval="$enable_targets"
- case "${enableval}" in
- yes | "") { { echo "$as_me:$LINENO: error: enable-targets option must specify target names or 'all'" >&5
-echo "$as_me: error: enable-targets option must specify target names or 'all'" >&2;}
- { (exit 1); exit 1; }; }
- ;;
- no) enable_targets= ;;
- *) enable_targets=$enableval ;;
-esac
-fi; # Check whether --enable-64-bit-bfd or --disable-64-bit-bfd was given.
-if test "${enable_64_bit_bfd+set}" = set; then
- enableval="$enable_64_bit_bfd"
- case "${enableval}" in
- yes) want64=true ;;
- no) want64=false ;;
- *) { { echo "$as_me:$LINENO: error: bad value ${enableval} for 64-bit-bfd option" >&5
-echo "$as_me: error: bad value ${enableval} for 64-bit-bfd option" >&2;}
- { (exit 1); exit 1; }; } ;;
-esac
-else
- 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$prefix" = xNONE; then
- test_prefix=/usr/local
- else
- test_prefix=$prefix
- fi
- if test "x$exec_prefix" = xNONE; then
- test_exec_prefix=$test_prefix
- else
- test_exec_prefix=$exec_prefix
- fi
- case ${TARGET_SYSTEM_ROOT} in
- "${test_prefix}"|"${test_prefix}/"*|\
- "${test_exec_prefix}"|"${test_exec_prefix}/"*|\
- '${prefix}'|'${prefix}/'*|\
- '${exec_prefix}'|'${exec_prefix}/'*)
- t="$TARGET_SYSTEM_ROOT_DEFINE -DTARGET_SYSTEM_ROOT_RELOCATABLE"
- TARGET_SYSTEM_ROOT_DEFINE="$t"
- ;;
- esac
-
-else
-
- use_sysroot=no
- TARGET_SYSTEM_ROOT=
- TARGET_SYSTEM_ROOT_DEFINE='-DTARGET_SYSTEM_ROOT=\"\"'
-
-fi;
-
-
-
-
-
-GCC_WARN_CFLAGS="-W -Wall -Wstrict-prototypes -Wmissing-prototypes"
-
-# Check whether --enable-werror or --disable-werror was given.
-if test "${enable_werror+set}" = set; then
- enableval="$enable_werror"
- case "${enableval}" in
- yes | y) ERROR_ON_WARNING="yes" ;;
- no | n) ERROR_ON_WARNING="no" ;;
- *) { { echo "$as_me:$LINENO: error: bad value ${enableval} for --enable-werror" >&5
-echo "$as_me: error: bad value ${enableval} for --enable-werror" >&2;}
- { (exit 1); exit 1; }; } ;;
- esac
-fi;
-
-# Enable -Werror by default when using gcc
-if test "${GCC}" = yes -a -z "${ERROR_ON_WARNING}" ; then
- ERROR_ON_WARNING=yes
-fi
-
-NO_WERROR=
-if test "${ERROR_ON_WARNING}" = yes ; then
- GCC_WARN_CFLAGS="$GCC_WARN_CFLAGS -Werror"
- NO_WERROR="-Wno-error"
-fi
-
-if test "${GCC}" = yes ; then
- WARN_CFLAGS="${GCC_WARN_CFLAGS}"
-fi
-
-# Check whether --enable-build-warnings or --disable-build-warnings was given.
-if test "${enable_build_warnings+set}" = set; then
- enableval="$enable_build_warnings"
- case "${enableval}" in
- yes) WARN_CFLAGS="${GCC_WARN_CFLAGS}";;
- no) if test "${GCC}" = yes ; then
- WARN_CFLAGS="-w"
- fi;;
- ,*) t=`echo "${enableval}" | sed -e "s/,/ /g"`
- WARN_CFLAGS="${GCC_WARN_CFLAGS} ${t}";;
- *,) t=`echo "${enableval}" | sed -e "s/,/ /g"`
- WARN_CFLAGS="${t} ${GCC_WARN_CFLAGS}";;
- *) WARN_CFLAGS=`echo "${enableval}" | sed -e "s/,/ /g"`;;
-esac
-fi;
-
-if test x"$silent" != x"yes" && test x"$WARN_CFLAGS" != x""; then
- echo "Setting warning flags = $WARN_CFLAGS" 6>&1
-fi
-
-
-
-
-
- ac_config_headers="$ac_config_headers config.h:config.in"
-
-
-if test -z "$target" ; then
- { { echo "$as_me:$LINENO: error: Unrecognized target system type; please check config.sub." >&5
-echo "$as_me: error: Unrecognized target system type; please check config.sub." >&2;}
- { (exit 1); exit 1; }; }
-fi
-if test -z "$host" ; then
- { { echo "$as_me:$LINENO: error: Unrecognized host system type; please check config.sub." >&5
-echo "$as_me: error: Unrecognized host system type; please check config.sub." >&2;}
- { (exit 1); exit 1; }; }
-fi
-
-# host-specific stuff:
-
-ac_ext=c
-ac_cpp='$CPP $CPPFLAGS'
-ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
-ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
-ac_compiler_gnu=$ac_cv_c_compiler_gnu
-if test -n "$ac_tool_prefix"; then
- # Extract the first word of "${ac_tool_prefix}gcc", so it can be a program name with args.
-set dummy ${ac_tool_prefix}gcc; ac_word=$2
-echo "$as_me:$LINENO: checking for $ac_word" >&5
-echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
-if test "${ac_cv_prog_CC+set}" = set; then
- echo $ECHO_N "(cached) $ECHO_C" >&6
-else
- if test -n "$CC"; then
- ac_cv_prog_CC="$CC" # Let the user override the test.
-else
-as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
-for as_dir in $PATH
-do
- IFS=$as_save_IFS
- test -z "$as_dir" && as_dir=.
- for ac_exec_ext in '' $ac_executable_extensions; do
- if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
- ac_cv_prog_CC="${ac_tool_prefix}gcc"
- echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
- break 2
- fi
-done
-done
-
-fi
-fi
-CC=$ac_cv_prog_CC
-if test -n "$CC"; then
- echo "$as_me:$LINENO: result: $CC" >&5
-echo "${ECHO_T}$CC" >&6
-else
- echo "$as_me:$LINENO: result: no" >&5
-echo "${ECHO_T}no" >&6
-fi
-
-fi
-if test -z "$ac_cv_prog_CC"; then
- ac_ct_CC=$CC
- # Extract the first word of "gcc", so it can be a program name with args.
-set dummy gcc; ac_word=$2
-echo "$as_me:$LINENO: checking for $ac_word" >&5
-echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
-if test "${ac_cv_prog_ac_ct_CC+set}" = set; then
- echo $ECHO_N "(cached) $ECHO_C" >&6
-else
- if test -n "$ac_ct_CC"; then
- ac_cv_prog_ac_ct_CC="$ac_ct_CC" # Let the user override the test.
-else
-as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
-for as_dir in $PATH
-do
- IFS=$as_save_IFS
- test -z "$as_dir" && as_dir=.
- for ac_exec_ext in '' $ac_executable_extensions; do
- if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
- ac_cv_prog_ac_ct_CC="gcc"
- echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
- break 2
- fi
-done
-done
-
-fi
-fi
-ac_ct_CC=$ac_cv_prog_ac_ct_CC
-if test -n "$ac_ct_CC"; then
- echo "$as_me:$LINENO: result: $ac_ct_CC" >&5
-echo "${ECHO_T}$ac_ct_CC" >&6
-else
- echo "$as_me:$LINENO: result: no" >&5
-echo "${ECHO_T}no" >&6
-fi
-
- CC=$ac_ct_CC
-else
- CC="$ac_cv_prog_CC"
-fi
-
-if test -z "$CC"; then
- if test -n "$ac_tool_prefix"; then
- # Extract the first word of "${ac_tool_prefix}cc", so it can be a program name with args.
-set dummy ${ac_tool_prefix}cc; ac_word=$2
-echo "$as_me:$LINENO: checking for $ac_word" >&5
-echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
-if test "${ac_cv_prog_CC+set}" = set; then
- echo $ECHO_N "(cached) $ECHO_C" >&6
-else
- if test -n "$CC"; then
- ac_cv_prog_CC="$CC" # Let the user override the test.
-else
-as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
-for as_dir in $PATH
-do
- IFS=$as_save_IFS
- test -z "$as_dir" && as_dir=.
- for ac_exec_ext in '' $ac_executable_extensions; do
- if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
- ac_cv_prog_CC="${ac_tool_prefix}cc"
- echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
- break 2
- fi
-done
-done
-
-fi
-fi
-CC=$ac_cv_prog_CC
-if test -n "$CC"; then
- echo "$as_me:$LINENO: result: $CC" >&5
-echo "${ECHO_T}$CC" >&6
-else
- echo "$as_me:$LINENO: result: no" >&5
-echo "${ECHO_T}no" >&6
-fi
-
-fi
-if test -z "$ac_cv_prog_CC"; then
- ac_ct_CC=$CC
- # Extract the first word of "cc", so it can be a program name with args.
-set dummy cc; ac_word=$2
-echo "$as_me:$LINENO: checking for $ac_word" >&5
-echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
-if test "${ac_cv_prog_ac_ct_CC+set}" = set; then
- echo $ECHO_N "(cached) $ECHO_C" >&6
-else
- if test -n "$ac_ct_CC"; then
- ac_cv_prog_ac_ct_CC="$ac_ct_CC" # Let the user override the test.
-else
-as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
-for as_dir in $PATH
-do
- IFS=$as_save_IFS
- test -z "$as_dir" && as_dir=.
- for ac_exec_ext in '' $ac_executable_extensions; do
- if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
- ac_cv_prog_ac_ct_CC="cc"
- echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
- break 2
- fi
-done
-done
-
-fi
-fi
-ac_ct_CC=$ac_cv_prog_ac_ct_CC
-if test -n "$ac_ct_CC"; then
- echo "$as_me:$LINENO: result: $ac_ct_CC" >&5
-echo "${ECHO_T}$ac_ct_CC" >&6
-else
- echo "$as_me:$LINENO: result: no" >&5
-echo "${ECHO_T}no" >&6
-fi
-
- CC=$ac_ct_CC
-else
- CC="$ac_cv_prog_CC"
-fi
-
-fi
-if test -z "$CC"; then
- # Extract the first word of "cc", so it can be a program name with args.
-set dummy cc; ac_word=$2
-echo "$as_me:$LINENO: checking for $ac_word" >&5
-echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
-if test "${ac_cv_prog_CC+set}" = set; then
- echo $ECHO_N "(cached) $ECHO_C" >&6
-else
- if test -n "$CC"; then
- ac_cv_prog_CC="$CC" # Let the user override the test.
-else
- ac_prog_rejected=no
-as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
-for as_dir in $PATH
-do
- IFS=$as_save_IFS
- test -z "$as_dir" && as_dir=.
- for ac_exec_ext in '' $ac_executable_extensions; do
- if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
- if test "$as_dir/$ac_word$ac_exec_ext" = "/usr/ucb/cc"; then
- ac_prog_rejected=yes
- continue
- fi
- ac_cv_prog_CC="cc"
- echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
- break 2
- fi
-done
-done
-
-if test $ac_prog_rejected = yes; then
- # We found a bogon in the path, so make sure we never use it.
- set dummy $ac_cv_prog_CC
- shift
- if test $# != 0; then
- # We chose a different compiler from the bogus one.
- # However, it has the same basename, so the bogon will be chosen
- # first if we set CC to just the basename; use the full file name.
- shift
- ac_cv_prog_CC="$as_dir/$ac_word${1+' '}$@"
- fi
-fi
-fi
-fi
-CC=$ac_cv_prog_CC
-if test -n "$CC"; then
- echo "$as_me:$LINENO: result: $CC" >&5
-echo "${ECHO_T}$CC" >&6
-else
- echo "$as_me:$LINENO: result: no" >&5
-echo "${ECHO_T}no" >&6
-fi
-
-fi
-if test -z "$CC"; then
- if test -n "$ac_tool_prefix"; then
- for ac_prog in cl
- do
- # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
-set dummy $ac_tool_prefix$ac_prog; ac_word=$2
-echo "$as_me:$LINENO: checking for $ac_word" >&5
-echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
-if test "${ac_cv_prog_CC+set}" = set; then
- echo $ECHO_N "(cached) $ECHO_C" >&6
-else
- if test -n "$CC"; then
- ac_cv_prog_CC="$CC" # Let the user override the test.
-else
-as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
-for as_dir in $PATH
-do
- IFS=$as_save_IFS
- test -z "$as_dir" && as_dir=.
- for ac_exec_ext in '' $ac_executable_extensions; do
- if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
- ac_cv_prog_CC="$ac_tool_prefix$ac_prog"
- echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
- break 2
- fi
-done
-done
-
-fi
-fi
-CC=$ac_cv_prog_CC
-if test -n "$CC"; then
- echo "$as_me:$LINENO: result: $CC" >&5
-echo "${ECHO_T}$CC" >&6
-else
- echo "$as_me:$LINENO: result: no" >&5
-echo "${ECHO_T}no" >&6
-fi
-
- test -n "$CC" && break
- done
-fi
-if test -z "$CC"; then
- ac_ct_CC=$CC
- for ac_prog in cl
-do
- # Extract the first word of "$ac_prog", so it can be a program name with args.
-set dummy $ac_prog; ac_word=$2
-echo "$as_me:$LINENO: checking for $ac_word" >&5
-echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
-if test "${ac_cv_prog_ac_ct_CC+set}" = set; then
- echo $ECHO_N "(cached) $ECHO_C" >&6
-else
- if test -n "$ac_ct_CC"; then
- ac_cv_prog_ac_ct_CC="$ac_ct_CC" # Let the user override the test.
-else
-as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
-for as_dir in $PATH
-do
- IFS=$as_save_IFS
- test -z "$as_dir" && as_dir=.
- for ac_exec_ext in '' $ac_executable_extensions; do
- if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
- ac_cv_prog_ac_ct_CC="$ac_prog"
- echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
- break 2
- fi
-done
-done
-
-fi
-fi
-ac_ct_CC=$ac_cv_prog_ac_ct_CC
-if test -n "$ac_ct_CC"; then
- echo "$as_me:$LINENO: result: $ac_ct_CC" >&5
-echo "${ECHO_T}$ac_ct_CC" >&6
-else
- echo "$as_me:$LINENO: result: no" >&5
-echo "${ECHO_T}no" >&6
-fi
-
- test -n "$ac_ct_CC" && break
-done
-
- CC=$ac_ct_CC
-fi
-
-fi
-
-
-test -z "$CC" && { { echo "$as_me:$LINENO: error: no acceptable C compiler found in \$PATH
-See \`config.log' for more details." >&5
-echo "$as_me: error: no acceptable C compiler found in \$PATH
-See \`config.log' for more details." >&2;}
- { (exit 1); exit 1; }; }
-
-# Provide some information about the compiler.
-echo "$as_me:$LINENO:" \
- "checking for C compiler version" >&5
-ac_compiler=`set X $ac_compile; echo $2`
-{ (eval echo "$as_me:$LINENO: \"$ac_compiler --version </dev/null >&5\"") >&5
- (eval $ac_compiler --version </dev/null >&5) 2>&5
- ac_status=$?
- echo "$as_me:$LINENO: \$? = $ac_status" >&5
- (exit $ac_status); }
-{ (eval echo "$as_me:$LINENO: \"$ac_compiler -v </dev/null >&5\"") >&5
- (eval $ac_compiler -v </dev/null >&5) 2>&5
- ac_status=$?
- echo "$as_me:$LINENO: \$? = $ac_status" >&5
- (exit $ac_status); }
-{ (eval echo "$as_me:$LINENO: \"$ac_compiler -V </dev/null >&5\"") >&5
- (eval $ac_compiler -V </dev/null >&5) 2>&5
- ac_status=$?
- echo "$as_me:$LINENO: \$? = $ac_status" >&5
- (exit $ac_status); }
-
-echo "$as_me:$LINENO: checking whether we are using the GNU C compiler" >&5
-echo $ECHO_N "checking whether we are using the GNU C compiler... $ECHO_C" >&6
-if test "${ac_cv_c_compiler_gnu+set}" = set; then
- echo $ECHO_N "(cached) $ECHO_C" >&6
-else
- cat >conftest.$ac_ext <<_ACEOF
-/* confdefs.h. */
-_ACEOF
-cat confdefs.h >>conftest.$ac_ext
-cat >>conftest.$ac_ext <<_ACEOF
-/* end confdefs.h. */
-
-int
-main ()
-{
-#ifndef __GNUC__
- choke me
-#endif
-
- ;
- return 0;
-}
-_ACEOF
-rm -f conftest.$ac_objext
-if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
- (eval $ac_compile) 2>conftest.er1
- ac_status=$?
- grep -v '^ *+' conftest.er1 >conftest.err
- rm -f conftest.er1
- cat conftest.err >&5
- echo "$as_me:$LINENO: \$? = $ac_status" >&5
- (exit $ac_status); } &&
- { ac_try='test -z "$ac_c_werror_flag"
- || test ! -s conftest.err'
- { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
- (eval $ac_try) 2>&5
- ac_status=$?
- echo "$as_me:$LINENO: \$? = $ac_status" >&5
- (exit $ac_status); }; } &&
- { ac_try='test -s conftest.$ac_objext'
- { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
- (eval $ac_try) 2>&5
- ac_status=$?
- echo "$as_me:$LINENO: \$? = $ac_status" >&5
- (exit $ac_status); }; }; then
- ac_compiler_gnu=yes
-else
- echo "$as_me: failed program was:" >&5
-sed 's/^/| /' conftest.$ac_ext >&5
-
-ac_compiler_gnu=no
-fi
-rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
-ac_cv_c_compiler_gnu=$ac_compiler_gnu
-
-fi
-echo "$as_me:$LINENO: result: $ac_cv_c_compiler_gnu" >&5
-echo "${ECHO_T}$ac_cv_c_compiler_gnu" >&6
-GCC=`test $ac_compiler_gnu = yes && echo yes`
-ac_test_CFLAGS=${CFLAGS+set}
-ac_save_CFLAGS=$CFLAGS
-CFLAGS="-g"
-echo "$as_me:$LINENO: checking whether $CC accepts -g" >&5
-echo $ECHO_N "checking whether $CC accepts -g... $ECHO_C" >&6
-if test "${ac_cv_prog_cc_g+set}" = set; then
- echo $ECHO_N "(cached) $ECHO_C" >&6
-else
- cat >conftest.$ac_ext <<_ACEOF
-/* confdefs.h. */
-_ACEOF
-cat confdefs.h >>conftest.$ac_ext
-cat >>conftest.$ac_ext <<_ACEOF
-/* end confdefs.h. */
-
-int
-main ()
-{
-
- ;
- return 0;
-}
-_ACEOF
-rm -f conftest.$ac_objext
-if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
- (eval $ac_compile) 2>conftest.er1
- ac_status=$?
- grep -v '^ *+' conftest.er1 >conftest.err
- rm -f conftest.er1
- cat conftest.err >&5
- echo "$as_me:$LINENO: \$? = $ac_status" >&5
- (exit $ac_status); } &&
- { ac_try='test -z "$ac_c_werror_flag"
- || test ! -s conftest.err'
- { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
- (eval $ac_try) 2>&5
- ac_status=$?
- echo "$as_me:$LINENO: \$? = $ac_status" >&5
- (exit $ac_status); }; } &&
- { ac_try='test -s conftest.$ac_objext'
- { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
- (eval $ac_try) 2>&5
- ac_status=$?
- echo "$as_me:$LINENO: \$? = $ac_status" >&5
- (exit $ac_status); }; }; then
- ac_cv_prog_cc_g=yes
-else
- echo "$as_me: failed program was:" >&5
-sed 's/^/| /' conftest.$ac_ext >&5
-
-ac_cv_prog_cc_g=no
-fi
-rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
-fi
-echo "$as_me:$LINENO: result: $ac_cv_prog_cc_g" >&5
-echo "${ECHO_T}$ac_cv_prog_cc_g" >&6
-if test "$ac_test_CFLAGS" = set; then
- CFLAGS=$ac_save_CFLAGS
-elif test $ac_cv_prog_cc_g = yes; then
- if test "$GCC" = yes; then
- CFLAGS="-g -O2"
- else
- CFLAGS="-g"
- fi
-else
- if test "$GCC" = yes; then
- CFLAGS="-O2"
- else
- CFLAGS=
- fi
-fi
-echo "$as_me:$LINENO: checking for $CC option to accept ANSI C" >&5
-echo $ECHO_N "checking for $CC option to accept ANSI C... $ECHO_C" >&6
-if test "${ac_cv_prog_cc_stdc+set}" = set; then
- echo $ECHO_N "(cached) $ECHO_C" >&6
-else
- ac_cv_prog_cc_stdc=no
-ac_save_CC=$CC
-cat >conftest.$ac_ext <<_ACEOF
-/* confdefs.h. */
-_ACEOF
-cat confdefs.h >>conftest.$ac_ext
-cat >>conftest.$ac_ext <<_ACEOF
-/* end confdefs.h. */
-#include <stdarg.h>
-#include <stdio.h>
-#include <sys/types.h>
-#include <sys/stat.h>
-/* Most of the following tests are stolen from RCS 5.7's src/conf.sh. */
-struct buf { int x; };
-FILE * (*rcsopen) (struct buf *, struct stat *, int);
-static char *e (p, i)
- char **p;
- int i;
-{
- return p[i];
-}
-static char *f (char * (*g) (char **, int), char **p, ...)
-{
- char *s;
- va_list v;
- va_start (v,p);
- s = g (p, va_arg (v,int));
- va_end (v);
- return s;
-}
-
-/* OSF 4.0 Compaq cc is some sort of almost-ANSI by default. It has
- function prototypes and stuff, but not '\xHH' hex character constants.
- These don't provoke an error unfortunately, instead are silently treated
- as 'x'. The following induces an error, until -std1 is added to get
- proper ANSI mode. Curiously '\x00'!='x' always comes out true, for an
- array size at least. It's necessary to write '\x00'==0 to get something
- that's true only with -std1. */
-int osf4_cc_array ['\x00' == 0 ? 1 : -1];
-
-int test (int i, double x);
-struct s1 {int (*f) (int a);};
-struct s2 {int (*f) (double a);};
-int pairnames (int, char **, FILE *(*)(struct buf *, struct stat *, int), int, int);
-int argc;
-char **argv;
-int
-main ()
-{
-return f (e, argv, 0) != argv[0] || f (e, argv, 1) != argv[1];
- ;
- return 0;
-}
-_ACEOF
-# Don't try gcc -ansi; that turns off useful extensions and
-# breaks some systems' header files.
-# AIX -qlanglvl=ansi
-# Ultrix and OSF/1 -std1
-# HP-UX 10.20 and later -Ae
-# HP-UX older versions -Aa -D_HPUX_SOURCE
-# SVR4 -Xc -D__EXTENSIONS__
-for ac_arg in "" -qlanglvl=ansi -std1 -Ae "-Aa -D_HPUX_SOURCE" "-Xc -D__EXTENSIONS__"
-do
- CC="$ac_save_CC $ac_arg"
- rm -f conftest.$ac_objext
-if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
- (eval $ac_compile) 2>conftest.er1
- ac_status=$?
- grep -v '^ *+' conftest.er1 >conftest.err
- rm -f conftest.er1
- cat conftest.err >&5
- echo "$as_me:$LINENO: \$? = $ac_status" >&5
- (exit $ac_status); } &&
- { ac_try='test -z "$ac_c_werror_flag"
- || test ! -s conftest.err'
- { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
- (eval $ac_try) 2>&5
- ac_status=$?
- echo "$as_me:$LINENO: \$? = $ac_status" >&5
- (exit $ac_status); }; } &&
- { ac_try='test -s conftest.$ac_objext'
- { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
- (eval $ac_try) 2>&5
- ac_status=$?
- echo "$as_me:$LINENO: \$? = $ac_status" >&5
- (exit $ac_status); }; }; then
- ac_cv_prog_cc_stdc=$ac_arg
-break
-else
- echo "$as_me: failed program was:" >&5
-sed 's/^/| /' conftest.$ac_ext >&5
-
-fi
-rm -f conftest.err conftest.$ac_objext
-done
-rm -f conftest.$ac_ext conftest.$ac_objext
-CC=$ac_save_CC
-
-fi
-
-case "x$ac_cv_prog_cc_stdc" in
- x|xno)
- echo "$as_me:$LINENO: result: none needed" >&5
-echo "${ECHO_T}none needed" >&6 ;;
- *)
- echo "$as_me:$LINENO: result: $ac_cv_prog_cc_stdc" >&5
-echo "${ECHO_T}$ac_cv_prog_cc_stdc" >&6
- CC="$CC $ac_cv_prog_cc_stdc" ;;
-esac
-
-# Some people use a C++ compiler to compile C. Since we use `exit',
-# in C++ we need to declare it. In case someone uses the same compiler
-# for both compiling C and C++ we need to have the C++ compiler decide
-# the declaration of exit, since it's the most demanding environment.
-cat >conftest.$ac_ext <<_ACEOF
-#ifndef __cplusplus
- choke me
-#endif
-_ACEOF
-rm -f conftest.$ac_objext
-if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
- (eval $ac_compile) 2>conftest.er1
- ac_status=$?
- grep -v '^ *+' conftest.er1 >conftest.err
- rm -f conftest.er1
- cat conftest.err >&5
- echo "$as_me:$LINENO: \$? = $ac_status" >&5
- (exit $ac_status); } &&
- { ac_try='test -z "$ac_c_werror_flag"
- || test ! -s conftest.err'
- { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
- (eval $ac_try) 2>&5
- ac_status=$?
- echo "$as_me:$LINENO: \$? = $ac_status" >&5
- (exit $ac_status); }; } &&
- { ac_try='test -s conftest.$ac_objext'
- { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
- (eval $ac_try) 2>&5
- ac_status=$?
- echo "$as_me:$LINENO: \$? = $ac_status" >&5
- (exit $ac_status); }; }; then
- for ac_declaration in \
- '' \
- 'extern "C" void std::exit (int) throw (); using std::exit;' \
- 'extern "C" void std::exit (int); using std::exit;' \
- 'extern "C" void exit (int) throw ();' \
- 'extern "C" void exit (int);' \
- 'void exit (int);'
-do
- cat >conftest.$ac_ext <<_ACEOF
-/* confdefs.h. */
-_ACEOF
-cat confdefs.h >>conftest.$ac_ext
-cat >>conftest.$ac_ext <<_ACEOF
-/* end confdefs.h. */
-$ac_declaration
-#include <stdlib.h>
-int
-main ()
-{
-exit (42);
- ;
- return 0;
-}
-_ACEOF
-rm -f conftest.$ac_objext
-if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
- (eval $ac_compile) 2>conftest.er1
- ac_status=$?
- grep -v '^ *+' conftest.er1 >conftest.err
- rm -f conftest.er1
- cat conftest.err >&5
- echo "$as_me:$LINENO: \$? = $ac_status" >&5
- (exit $ac_status); } &&
- { ac_try='test -z "$ac_c_werror_flag"
- || test ! -s conftest.err'
- { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
- (eval $ac_try) 2>&5
- ac_status=$?
- echo "$as_me:$LINENO: \$? = $ac_status" >&5
- (exit $ac_status); }; } &&
- { ac_try='test -s conftest.$ac_objext'
- { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
- (eval $ac_try) 2>&5
- ac_status=$?
- echo "$as_me:$LINENO: \$? = $ac_status" >&5
- (exit $ac_status); }; }; then
- :
-else
- echo "$as_me: failed program was:" >&5
-sed 's/^/| /' conftest.$ac_ext >&5
-
-continue
-fi
-rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
- cat >conftest.$ac_ext <<_ACEOF
-/* confdefs.h. */
-_ACEOF
-cat confdefs.h >>conftest.$ac_ext
-cat >>conftest.$ac_ext <<_ACEOF
-/* end confdefs.h. */
-$ac_declaration
-int
-main ()
-{
-exit (42);
- ;
- return 0;
-}
-_ACEOF
-rm -f conftest.$ac_objext
-if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
- (eval $ac_compile) 2>conftest.er1
- ac_status=$?
- grep -v '^ *+' conftest.er1 >conftest.err
- rm -f conftest.er1
- cat conftest.err >&5
- echo "$as_me:$LINENO: \$? = $ac_status" >&5
- (exit $ac_status); } &&
- { ac_try='test -z "$ac_c_werror_flag"
- || test ! -s conftest.err'
- { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
- (eval $ac_try) 2>&5
- ac_status=$?
- echo "$as_me:$LINENO: \$? = $ac_status" >&5
- (exit $ac_status); }; } &&
- { ac_try='test -s conftest.$ac_objext'
- { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
- (eval $ac_try) 2>&5
- ac_status=$?
- echo "$as_me:$LINENO: \$? = $ac_status" >&5
- (exit $ac_status); }; }; then
- break
-else
- echo "$as_me: failed program was:" >&5
-sed 's/^/| /' conftest.$ac_ext >&5
-
-fi
-rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
-done
-rm -f conftest*
-if test -n "$ac_declaration"; then
- echo '#ifdef __cplusplus' >>confdefs.h
- echo $ac_declaration >>confdefs.h
- echo '#endif' >>confdefs.h
-fi
-
-else
- echo "$as_me: failed program was:" >&5
-sed 's/^/| /' conftest.$ac_ext >&5
-
-fi
-rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
-ac_ext=c
-ac_cpp='$CPP $CPPFLAGS'
-ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
-ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
-ac_compiler_gnu=$ac_cv_c_compiler_gnu
-
-# Find a good install program. We prefer a C program (faster),
-# so one script is as good as another. But avoid the broken or
-# incompatible versions:
-# SysV /etc/install, /usr/sbin/install
-# SunOS /usr/etc/install
-# IRIX /sbin/install
-# AIX /bin/install
-# AmigaOS /C/install, which installs bootblocks on floppy discs
-# AIX 4 /usr/bin/installbsd, which doesn't work without a -g flag
-# AFS /usr/afsws/bin/install, which mishandles nonexistent args
-# SVR4 /usr/ucb/install, which tries to use the nonexistent group "staff"
-# OS/2's system install, which has a completely different semantic
-# ./install, which can be erroneously created by make from ./install.sh.
-echo "$as_me:$LINENO: checking for a BSD-compatible install" >&5
-echo $ECHO_N "checking for a BSD-compatible install... $ECHO_C" >&6
-if test -z "$INSTALL"; then
-if test "${ac_cv_path_install+set}" = set; then
- echo $ECHO_N "(cached) $ECHO_C" >&6
-else
- as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
-for as_dir in $PATH
-do
- IFS=$as_save_IFS
- test -z "$as_dir" && as_dir=.
- # Account for people who put trailing slashes in PATH elements.
-case $as_dir/ in
- ./ | .// | /cC/* | \
- /etc/* | /usr/sbin/* | /usr/etc/* | /sbin/* | /usr/afsws/bin/* | \
- ?:\\/os2\\/install\\/* | ?:\\/OS2\\/INSTALL\\/* | \
- /usr/ucb/* ) ;;
- *)
- # OSF1 and SCO ODT 3.0 have their own names for install.
- # Don't use installbsd from OSF since it installs stuff as root
- # by default.
- for ac_prog in ginstall scoinst install; do
- for ac_exec_ext in '' $ac_executable_extensions; do
- if $as_executable_p "$as_dir/$ac_prog$ac_exec_ext"; then
- if test $ac_prog = install &&
- grep dspmsg "$as_dir/$ac_prog$ac_exec_ext" >/dev/null 2>&1; then
- # AIX install. It has an incompatible calling convention.
- :
- elif test $ac_prog = install &&
- grep pwplus "$as_dir/$ac_prog$ac_exec_ext" >/dev/null 2>&1; then
- # program-specific install script used by HP pwplus--don't use.
- :
- else
- ac_cv_path_install="$as_dir/$ac_prog$ac_exec_ext -c"
- break 3
- fi
- fi
- done
- done
- ;;
-esac
-done
-
-
-fi
- if test "${ac_cv_path_install+set}" = set; then
- INSTALL=$ac_cv_path_install
- else
- # As a last resort, use the slow shell script. We don't cache a
- # path for INSTALL within a source directory, because that will
- # break other packages using the cache if that directory is
- # removed, or if the path is relative.
- INSTALL=$ac_install_sh
- fi
-fi
-echo "$as_me:$LINENO: result: $INSTALL" >&5
-echo "${ECHO_T}$INSTALL" >&6
-
-# Use test -z because SunOS4 sh mishandles braces in ${var-val}.
-# It thinks the first close brace ends the variable substitution.
-test -z "$INSTALL_PROGRAM" && INSTALL_PROGRAM='${INSTALL}'
-
-test -z "$INSTALL_SCRIPT" && INSTALL_SCRIPT='${INSTALL}'
-
-test -z "$INSTALL_DATA" && INSTALL_DATA='${INSTALL} -m 644'
-
-
-ALL_LINGUAS="fr sv tr es da vi zh_CN zh_TW ga"
-# If we haven't got the data from the intl directory,
-# assume NLS is disabled.
-USE_NLS=no
-LIBINTL=
-LIBINTL_DEP=
-INCINTL=
-XGETTEXT=
-GMSGFMT=
-POSUB=
-
-if test -f ../intl/config.intl; then
- . ../intl/config.intl
-fi
-echo "$as_me:$LINENO: checking whether NLS is requested" >&5
-echo $ECHO_N "checking whether NLS is requested... $ECHO_C" >&6
-if test x"$USE_NLS" != xyes; then
- echo "$as_me:$LINENO: result: no" >&5
-echo "${ECHO_T}no" >&6
-else
- echo "$as_me:$LINENO: result: yes" >&5
-echo "${ECHO_T}yes" >&6
-
-cat >>confdefs.h <<\_ACEOF
-#define ENABLE_NLS 1
-_ACEOF
-
-
- echo "$as_me:$LINENO: checking for catalogs to be installed" >&5
-echo $ECHO_N "checking for catalogs to be installed... $ECHO_C" >&6
- # Look for .po and .gmo files in the source directory.
- CATALOGS=
- XLINGUAS=
- for cat in $srcdir/po/*.gmo $srcdir/po/*.po; do
- # If there aren't any .gmo files the shell will give us the
- # literal string "../path/to/srcdir/po/*.gmo" which has to be
- # weeded out.
- case "$cat" in *\**)
- continue;;
- esac
- # The quadruple backslash is collapsed to a double backslash
- # by the backticks, then collapsed again by the double quotes,
- # leaving us with one backslash in the sed expression (right
- # before the dot that mustn't act as a wildcard).
- cat=`echo $cat | sed -e "s!$srcdir/po/!!" -e "s!\\\\.po!.gmo!"`
- lang=`echo $cat | sed -e "s!\\\\.gmo!!"`
- # The user is allowed to set LINGUAS to a list of languages to
- # install catalogs for. If it's empty that means "all of them."
- if test "x$LINGUAS" = x; then
- CATALOGS="$CATALOGS $cat"
- XLINGUAS="$XLINGUAS $lang"
- else
- case "$LINGUAS" in *$lang*)
- CATALOGS="$CATALOGS $cat"
- XLINGUAS="$XLINGUAS $lang"
- ;;
- esac
- fi
- done
- LINGUAS="$XLINGUAS"
- echo "$as_me:$LINENO: result: $LINGUAS" >&5
-echo "${ECHO_T}$LINGUAS" >&6
-
-
- DATADIRNAME=share
-
- INSTOBJEXT=.mo
-
- GENCAT=gencat
-
- CATOBJEXT=.gmo
-
-fi
-
- MKINSTALLDIRS=
- if test -n "$ac_aux_dir"; then
- case "$ac_aux_dir" in
- /*) MKINSTALLDIRS="$ac_aux_dir/mkinstalldirs" ;;
- *) MKINSTALLDIRS="\$(top_builddir)/$ac_aux_dir/mkinstalldirs" ;;
- esac
- fi
- if test -z "$MKINSTALLDIRS"; then
- MKINSTALLDIRS="\$(top_srcdir)/mkinstalldirs"
- fi
-
-
-
- echo "$as_me:$LINENO: checking whether NLS is requested" >&5
-echo $ECHO_N "checking whether NLS is requested... $ECHO_C" >&6
- # Check whether --enable-nls or --disable-nls was given.
-if test "${enable_nls+set}" = set; then
- enableval="$enable_nls"
- USE_NLS=$enableval
-else
- USE_NLS=yes
-fi;
- echo "$as_me:$LINENO: result: $USE_NLS" >&5
-echo "${ECHO_T}$USE_NLS" >&6
-
-
-
-
-
-
-# Prepare PATH_SEPARATOR.
-# The user is always right.
-if test "${PATH_SEPARATOR+set}" != set; then
- echo "#! /bin/sh" >conf$$.sh
- echo "exit 0" >>conf$$.sh
- chmod +x conf$$.sh
- if (PATH="/nonexistent;."; conf$$.sh) >/dev/null 2>&1; then
- PATH_SEPARATOR=';'
- else
- PATH_SEPARATOR=:
- fi
- rm -f conf$$.sh
-fi
-
-# Find out how to test for executable files. Don't use a zero-byte file,
-# as systems may use methods other than mode bits to determine executability.
-cat >conf$$.file <<_ASEOF
-#! /bin/sh
-exit 0
-_ASEOF
-chmod +x conf$$.file
-if test -x conf$$.file >/dev/null 2>&1; then
- ac_executable_p="test -x"
-else
- ac_executable_p="test -f"
-fi
-rm -f conf$$.file
-
-# Extract the first word of "msgfmt", so it can be a program name with args.
-set dummy msgfmt; ac_word=$2
-echo "$as_me:$LINENO: checking for $ac_word" >&5
-echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
-if test "${ac_cv_path_MSGFMT+set}" = set; then
- echo $ECHO_N "(cached) $ECHO_C" >&6
-else
- case "$MSGFMT" in
- [\\/]* | ?:[\\/]*)
- ac_cv_path_MSGFMT="$MSGFMT" # Let the user override the test with a path.
- ;;
- *)
- ac_save_IFS="$IFS"; IFS=$PATH_SEPARATOR
- for ac_dir in $PATH; do
- IFS="$ac_save_IFS"
- test -z "$ac_dir" && ac_dir=.
- for ac_exec_ext in '' $ac_executable_extensions; do
- if $ac_executable_p "$ac_dir/$ac_word$ac_exec_ext"; then
- if $ac_dir/$ac_word --statistics /dev/null >/dev/null 2>&1 &&
- (if $ac_dir/$ac_word --statistics /dev/null 2>&1 >/dev/null | grep usage >/dev/null; then exit 1; else exit 0; fi); then
- ac_cv_path_MSGFMT="$ac_dir/$ac_word$ac_exec_ext"
- break 2
- fi
- fi
- done
- done
- IFS="$ac_save_IFS"
- test -z "$ac_cv_path_MSGFMT" && ac_cv_path_MSGFMT=":"
- ;;
-esac
-fi
-MSGFMT="$ac_cv_path_MSGFMT"
-if test "$MSGFMT" != ":"; then
- echo "$as_me:$LINENO: result: $MSGFMT" >&5
-echo "${ECHO_T}$MSGFMT" >&6
-else
- echo "$as_me:$LINENO: result: no" >&5
-echo "${ECHO_T}no" >&6
-fi
-
- # Extract the first word of "gmsgfmt", so it can be a program name with args.
-set dummy gmsgfmt; ac_word=$2
-echo "$as_me:$LINENO: checking for $ac_word" >&5
-echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
-if test "${ac_cv_path_GMSGFMT+set}" = set; then
- echo $ECHO_N "(cached) $ECHO_C" >&6
-else
- case $GMSGFMT in
- [\\/]* | ?:[\\/]*)
- ac_cv_path_GMSGFMT="$GMSGFMT" # Let the user override the test with a path.
- ;;
- *)
- as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
-for as_dir in $PATH
-do
- IFS=$as_save_IFS
- test -z "$as_dir" && as_dir=.
- for ac_exec_ext in '' $ac_executable_extensions; do
- if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
- ac_cv_path_GMSGFMT="$as_dir/$ac_word$ac_exec_ext"
- echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
- break 2
- fi
-done
-done
-
- test -z "$ac_cv_path_GMSGFMT" && ac_cv_path_GMSGFMT="$MSGFMT"
- ;;
-esac
-fi
-GMSGFMT=$ac_cv_path_GMSGFMT
-
-if test -n "$GMSGFMT"; then
- echo "$as_me:$LINENO: result: $GMSGFMT" >&5
-echo "${ECHO_T}$GMSGFMT" >&6
-else
- echo "$as_me:$LINENO: result: no" >&5
-echo "${ECHO_T}no" >&6
-fi
-
-
-
-# Prepare PATH_SEPARATOR.
-# The user is always right.
-if test "${PATH_SEPARATOR+set}" != set; then
- echo "#! /bin/sh" >conf$$.sh
- echo "exit 0" >>conf$$.sh
- chmod +x conf$$.sh
- if (PATH="/nonexistent;."; conf$$.sh) >/dev/null 2>&1; then
- PATH_SEPARATOR=';'
- else
- PATH_SEPARATOR=:
- fi
- rm -f conf$$.sh
-fi
-
-# Find out how to test for executable files. Don't use a zero-byte file,
-# as systems may use methods other than mode bits to determine executability.
-cat >conf$$.file <<_ASEOF
-#! /bin/sh
-exit 0
-_ASEOF
-chmod +x conf$$.file
-if test -x conf$$.file >/dev/null 2>&1; then
- ac_executable_p="test -x"
-else
- ac_executable_p="test -f"
-fi
-rm -f conf$$.file
-
-# Extract the first word of "xgettext", so it can be a program name with args.
-set dummy xgettext; ac_word=$2
-echo "$as_me:$LINENO: checking for $ac_word" >&5
-echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
-if test "${ac_cv_path_XGETTEXT+set}" = set; then
- echo $ECHO_N "(cached) $ECHO_C" >&6
-else
- case "$XGETTEXT" in
- [\\/]* | ?:[\\/]*)
- ac_cv_path_XGETTEXT="$XGETTEXT" # Let the user override the test with a path.
- ;;
- *)
- ac_save_IFS="$IFS"; IFS=$PATH_SEPARATOR
- for ac_dir in $PATH; do
- IFS="$ac_save_IFS"
- test -z "$ac_dir" && ac_dir=.
- for ac_exec_ext in '' $ac_executable_extensions; do
- if $ac_executable_p "$ac_dir/$ac_word$ac_exec_ext"; then
- if $ac_dir/$ac_word --omit-header --copyright-holder= --msgid-bugs-address= /dev/null >/dev/null 2>&1 &&
- (if $ac_dir/$ac_word --omit-header --copyright-holder= --msgid-bugs-address= /dev/null 2>&1 >/dev/null | grep usage >/dev/null; then exit 1; else exit 0; fi); then
- ac_cv_path_XGETTEXT="$ac_dir/$ac_word$ac_exec_ext"
- break 2
- fi
- fi
- done
- done
- IFS="$ac_save_IFS"
- test -z "$ac_cv_path_XGETTEXT" && ac_cv_path_XGETTEXT=":"
- ;;
-esac
-fi
-XGETTEXT="$ac_cv_path_XGETTEXT"
-if test "$XGETTEXT" != ":"; then
- echo "$as_me:$LINENO: result: $XGETTEXT" >&5
-echo "${ECHO_T}$XGETTEXT" >&6
-else
- echo "$as_me:$LINENO: result: no" >&5
-echo "${ECHO_T}no" >&6
-fi
-
- rm -f messages.po
-
-
-# Prepare PATH_SEPARATOR.
-# The user is always right.
-if test "${PATH_SEPARATOR+set}" != set; then
- echo "#! /bin/sh" >conf$$.sh
- echo "exit 0" >>conf$$.sh
- chmod +x conf$$.sh
- if (PATH="/nonexistent;."; conf$$.sh) >/dev/null 2>&1; then
- PATH_SEPARATOR=';'
- else
- PATH_SEPARATOR=:
- fi
- rm -f conf$$.sh
-fi
-
-# Find out how to test for executable files. Don't use a zero-byte file,
-# as systems may use methods other than mode bits to determine executability.
-cat >conf$$.file <<_ASEOF
-#! /bin/sh
-exit 0
-_ASEOF
-chmod +x conf$$.file
-if test -x conf$$.file >/dev/null 2>&1; then
- ac_executable_p="test -x"
-else
- ac_executable_p="test -f"
-fi
-rm -f conf$$.file
-
-# Extract the first word of "msgmerge", so it can be a program name with args.
-set dummy msgmerge; ac_word=$2
-echo "$as_me:$LINENO: checking for $ac_word" >&5
-echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
-if test "${ac_cv_path_MSGMERGE+set}" = set; then
- echo $ECHO_N "(cached) $ECHO_C" >&6
-else
- case "$MSGMERGE" in
- [\\/]* | ?:[\\/]*)
- ac_cv_path_MSGMERGE="$MSGMERGE" # Let the user override the test with a path.
- ;;
- *)
- ac_save_IFS="$IFS"; IFS=$PATH_SEPARATOR
- for ac_dir in $PATH; do
- IFS="$ac_save_IFS"
- test -z "$ac_dir" && ac_dir=.
- for ac_exec_ext in '' $ac_executable_extensions; do
- if $ac_executable_p "$ac_dir/$ac_word$ac_exec_ext"; then
- if $ac_dir/$ac_word --update -q /dev/null /dev/null >/dev/null 2>&1; then
- ac_cv_path_MSGMERGE="$ac_dir/$ac_word$ac_exec_ext"
- break 2
- fi
- fi
- done
- done
- IFS="$ac_save_IFS"
- test -z "$ac_cv_path_MSGMERGE" && ac_cv_path_MSGMERGE=":"
- ;;
-esac
-fi
-MSGMERGE="$ac_cv_path_MSGMERGE"
-if test "$MSGMERGE" != ":"; then
- echo "$as_me:$LINENO: result: $MSGMERGE" >&5
-echo "${ECHO_T}$MSGMERGE" >&6
-else
- echo "$as_me:$LINENO: result: no" >&5
-echo "${ECHO_T}no" >&6
-fi
-
-
- if test "$GMSGFMT" != ":"; then
- if $GMSGFMT --statistics /dev/null >/dev/null 2>&1 &&
- (if $GMSGFMT --statistics /dev/null 2>&1 >/dev/null | grep usage >/dev/null; then exit 1; else exit 0; fi); then
- : ;
- else
- GMSGFMT=`echo "$GMSGFMT" | sed -e 's,^.*/,,'`
- echo "$as_me:$LINENO: result: found $GMSGFMT program is not GNU msgfmt; ignore it" >&5
-echo "${ECHO_T}found $GMSGFMT program is not GNU msgfmt; ignore it" >&6
- GMSGFMT=":"
- fi
- fi
-
- if test "$XGETTEXT" != ":"; then
- if $XGETTEXT --omit-header --copyright-holder= --msgid-bugs-address= /dev/null >/dev/null 2>&1 &&
- (if $XGETTEXT --omit-header --copyright-holder= --msgid-bugs-address= /dev/null 2>&1 >/dev/null | grep usage >/dev/null; then exit 1; else exit 0; fi); then
- : ;
- else
- echo "$as_me:$LINENO: result: found xgettext program is not GNU xgettext; ignore it" >&5
-echo "${ECHO_T}found xgettext program is not GNU xgettext; ignore it" >&6
- XGETTEXT=":"
- fi
- rm -f messages.po
- fi
-
- ac_config_commands="$ac_config_commands default-1"
-
-
-
-
-
-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 "$as_me:$LINENO: checking for $ac_word" >&5
-echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
-if test "${ac_cv_prog_YACC+set}" = set; then
- echo $ECHO_N "(cached) $ECHO_C" >&6
-else
- if test -n "$YACC"; then
- ac_cv_prog_YACC="$YACC" # Let the user override the test.
-else
-as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
-for as_dir in $PATH
-do
- IFS=$as_save_IFS
- test -z "$as_dir" && as_dir=.
- for ac_exec_ext in '' $ac_executable_extensions; do
- if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
- ac_cv_prog_YACC="$ac_prog"
- echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
- break 2
- fi
-done
-done
-
-fi
-fi
-YACC=$ac_cv_prog_YACC
-if test -n "$YACC"; then
- echo "$as_me:$LINENO: result: $YACC" >&5
-echo "${ECHO_T}$YACC" >&6
-else
- echo "$as_me:$LINENO: result: no" >&5
-echo "${ECHO_T}no" >&6
-fi
-
- test -n "$YACC" && break
-done
-test -n "$YACC" || YACC="yacc"
-
-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 "$as_me:$LINENO: checking for $ac_word" >&5
-echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
-if test "${ac_cv_prog_LEX+set}" = set; then
- echo $ECHO_N "(cached) $ECHO_C" >&6
-else
- if test -n "$LEX"; then
- ac_cv_prog_LEX="$LEX" # Let the user override the test.
-else
-as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
-for as_dir in $PATH
-do
- IFS=$as_save_IFS
- test -z "$as_dir" && as_dir=.
- for ac_exec_ext in '' $ac_executable_extensions; do
- if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
- ac_cv_prog_LEX="$ac_prog"
- echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
- break 2
- fi
-done
-done
-
-fi
-fi
-LEX=$ac_cv_prog_LEX
-if test -n "$LEX"; then
- echo "$as_me:$LINENO: result: $LEX" >&5
-echo "${ECHO_T}$LEX" >&6
-else
- echo "$as_me:$LINENO: result: no" >&5
-echo "${ECHO_T}no" >&6
-fi
-
- test -n "$LEX" && break
-done
-test -n "$LEX" || LEX=":"
-
-if test -z "$LEXLIB"
-then
- echo "$as_me:$LINENO: checking for yywrap in -lfl" >&5
-echo $ECHO_N "checking for yywrap in -lfl... $ECHO_C" >&6
-if test "${ac_cv_lib_fl_yywrap+set}" = set; then
- echo $ECHO_N "(cached) $ECHO_C" >&6
-else
- ac_check_lib_save_LIBS=$LIBS
-LIBS="-lfl $LIBS"
-cat >conftest.$ac_ext <<_ACEOF
-/* confdefs.h. */
-_ACEOF
-cat confdefs.h >>conftest.$ac_ext
-cat >>conftest.$ac_ext <<_ACEOF
-/* end confdefs.h. */
-
-/* Override any gcc2 internal prototype to avoid an error. */
-#ifdef __cplusplus
-extern "C"
-#endif
-/* We use char because int might match the return type of a gcc2
- builtin and then its argument prototype would still apply. */
-char yywrap ();
-int
-main ()
-{
-yywrap ();
- ;
- return 0;
-}
-_ACEOF
-rm -f conftest.$ac_objext conftest$ac_exeext
-if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
- (eval $ac_link) 2>conftest.er1
- ac_status=$?
- grep -v '^ *+' conftest.er1 >conftest.err
- rm -f conftest.er1
- cat conftest.err >&5
- echo "$as_me:$LINENO: \$? = $ac_status" >&5
- (exit $ac_status); } &&
- { ac_try='test -z "$ac_c_werror_flag"
- || test ! -s conftest.err'
- { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
- (eval $ac_try) 2>&5
- ac_status=$?
- echo "$as_me:$LINENO: \$? = $ac_status" >&5
- (exit $ac_status); }; } &&
- { ac_try='test -s conftest$ac_exeext'
- { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
- (eval $ac_try) 2>&5
- ac_status=$?
- echo "$as_me:$LINENO: \$? = $ac_status" >&5
- (exit $ac_status); }; }; then
- ac_cv_lib_fl_yywrap=yes
-else
- echo "$as_me: failed program was:" >&5
-sed 's/^/| /' conftest.$ac_ext >&5
-
-ac_cv_lib_fl_yywrap=no
-fi
-rm -f conftest.err conftest.$ac_objext \
- conftest$ac_exeext conftest.$ac_ext
-LIBS=$ac_check_lib_save_LIBS
-fi
-echo "$as_me:$LINENO: result: $ac_cv_lib_fl_yywrap" >&5
-echo "${ECHO_T}$ac_cv_lib_fl_yywrap" >&6
-if test $ac_cv_lib_fl_yywrap = yes; then
- LEXLIB="-lfl"
-else
- echo "$as_me:$LINENO: checking for yywrap in -ll" >&5
-echo $ECHO_N "checking for yywrap in -ll... $ECHO_C" >&6
-if test "${ac_cv_lib_l_yywrap+set}" = set; then
- echo $ECHO_N "(cached) $ECHO_C" >&6
-else
- ac_check_lib_save_LIBS=$LIBS
-LIBS="-ll $LIBS"
-cat >conftest.$ac_ext <<_ACEOF
-/* confdefs.h. */
-_ACEOF
-cat confdefs.h >>conftest.$ac_ext
-cat >>conftest.$ac_ext <<_ACEOF
-/* end confdefs.h. */
-
-/* Override any gcc2 internal prototype to avoid an error. */
-#ifdef __cplusplus
-extern "C"
-#endif
-/* We use char because int might match the return type of a gcc2
- builtin and then its argument prototype would still apply. */
-char yywrap ();
-int
-main ()
-{
-yywrap ();
- ;
- return 0;
-}
-_ACEOF
-rm -f conftest.$ac_objext conftest$ac_exeext
-if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
- (eval $ac_link) 2>conftest.er1
- ac_status=$?
- grep -v '^ *+' conftest.er1 >conftest.err
- rm -f conftest.er1
- cat conftest.err >&5
- echo "$as_me:$LINENO: \$? = $ac_status" >&5
- (exit $ac_status); } &&
- { ac_try='test -z "$ac_c_werror_flag"
- || test ! -s conftest.err'
- { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
- (eval $ac_try) 2>&5
- ac_status=$?
- echo "$as_me:$LINENO: \$? = $ac_status" >&5
- (exit $ac_status); }; } &&
- { ac_try='test -s conftest$ac_exeext'
- { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
- (eval $ac_try) 2>&5
- ac_status=$?
- echo "$as_me:$LINENO: \$? = $ac_status" >&5
- (exit $ac_status); }; }; then
- ac_cv_lib_l_yywrap=yes
-else
- echo "$as_me: failed program was:" >&5
-sed 's/^/| /' conftest.$ac_ext >&5
-
-ac_cv_lib_l_yywrap=no
-fi
-rm -f conftest.err conftest.$ac_objext \
- conftest$ac_exeext conftest.$ac_ext
-LIBS=$ac_check_lib_save_LIBS
-fi
-echo "$as_me:$LINENO: result: $ac_cv_lib_l_yywrap" >&5
-echo "${ECHO_T}$ac_cv_lib_l_yywrap" >&6
-if test $ac_cv_lib_l_yywrap = yes; then
- LEXLIB="-ll"
-fi
-
-fi
-
-fi
-
-if test "x$LEX" != "x:"; then
- echo "$as_me:$LINENO: checking lex output file root" >&5
-echo $ECHO_N "checking lex output file root... $ECHO_C" >&6
-if test "${ac_cv_prog_lex_root+set}" = set; then
- echo $ECHO_N "(cached) $ECHO_C" >&6
-else
- # The minimal lex program is just a single line: %%. But some broken lexes
-# (Solaris, I think it was) want two %% lines, so accommodate them.
-cat >conftest.l <<_ACEOF
-%%
-%%
-_ACEOF
-{ (eval echo "$as_me:$LINENO: \"$LEX conftest.l\"") >&5
- (eval $LEX conftest.l) 2>&5
- ac_status=$?
- echo "$as_me:$LINENO: \$? = $ac_status" >&5
- (exit $ac_status); }
-if test -f lex.yy.c; then
- ac_cv_prog_lex_root=lex.yy
-elif test -f lexyy.c; then
- ac_cv_prog_lex_root=lexyy
-else
- { { echo "$as_me:$LINENO: error: cannot find output from $LEX; giving up" >&5
-echo "$as_me: error: cannot find output from $LEX; giving up" >&2;}
- { (exit 1); exit 1; }; }
-fi
-fi
-echo "$as_me:$LINENO: result: $ac_cv_prog_lex_root" >&5
-echo "${ECHO_T}$ac_cv_prog_lex_root" >&6
-rm -f conftest.l
-LEX_OUTPUT_ROOT=$ac_cv_prog_lex_root
-
-echo "$as_me:$LINENO: checking whether yytext is a pointer" >&5
-echo $ECHO_N "checking whether yytext is a pointer... $ECHO_C" >&6
-if test "${ac_cv_prog_lex_yytext_pointer+set}" = set; then
- echo $ECHO_N "(cached) $ECHO_C" >&6
-else
- # POSIX says lex can declare yytext either as a pointer or an array; the
-# default is implementation-dependent. Figure out which it is, since
-# not all implementations provide the %pointer and %array declarations.
-ac_cv_prog_lex_yytext_pointer=no
-echo 'extern char *yytext;' >>$LEX_OUTPUT_ROOT.c
-ac_save_LIBS=$LIBS
-LIBS="$LIBS $LEXLIB"
-cat >conftest.$ac_ext <<_ACEOF
-`cat $LEX_OUTPUT_ROOT.c`
-_ACEOF
-rm -f conftest.$ac_objext conftest$ac_exeext
-if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
- (eval $ac_link) 2>conftest.er1
- ac_status=$?
- grep -v '^ *+' conftest.er1 >conftest.err
- rm -f conftest.er1
- cat conftest.err >&5
- echo "$as_me:$LINENO: \$? = $ac_status" >&5
- (exit $ac_status); } &&
- { ac_try='test -z "$ac_c_werror_flag"
- || test ! -s conftest.err'
- { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
- (eval $ac_try) 2>&5
- ac_status=$?
- echo "$as_me:$LINENO: \$? = $ac_status" >&5
- (exit $ac_status); }; } &&
- { ac_try='test -s conftest$ac_exeext'
- { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
- (eval $ac_try) 2>&5
- ac_status=$?
- echo "$as_me:$LINENO: \$? = $ac_status" >&5
- (exit $ac_status); }; }; then
- ac_cv_prog_lex_yytext_pointer=yes
-else
- echo "$as_me: failed program was:" >&5
-sed 's/^/| /' conftest.$ac_ext >&5
-
-fi
-rm -f conftest.err conftest.$ac_objext \
- conftest$ac_exeext conftest.$ac_ext
-LIBS=$ac_save_LIBS
-rm -f "${LEX_OUTPUT_ROOT}.c"
-
-fi
-echo "$as_me:$LINENO: result: $ac_cv_prog_lex_yytext_pointer" >&5
-echo "${ECHO_T}$ac_cv_prog_lex_yytext_pointer" >&6
-if test $ac_cv_prog_lex_yytext_pointer = yes; then
-
-cat >>confdefs.h <<\_ACEOF
-#define YYTEXT_POINTER 1
-_ACEOF
-
-fi
-
-fi
-if test "$LEX" = :; then
- LEX=${am_missing_run}flex
-fi
-
-echo "$as_me:$LINENO: checking whether to enable maintainer-specific portions of Makefiles" >&5
-echo $ECHO_N "checking whether to enable maintainer-specific portions of Makefiles... $ECHO_C" >&6
- # Check whether --enable-maintainer-mode or --disable-maintainer-mode was given.
-if test "${enable_maintainer_mode+set}" = set; then
- enableval="$enable_maintainer_mode"
- USE_MAINTAINER_MODE=$enableval
-else
- USE_MAINTAINER_MODE=no
-fi;
- echo "$as_me:$LINENO: result: $USE_MAINTAINER_MODE" >&5
-echo "${ECHO_T}$USE_MAINTAINER_MODE" >&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
-
-
-
-
-if false; then
- GENINSRC_NEVER_TRUE=
- GENINSRC_NEVER_FALSE='#'
-else
- GENINSRC_NEVER_TRUE='#'
- GENINSRC_NEVER_FALSE=
-fi
-
-
-. ${srcdir}/configure.host
-
-
-
-
-
-
-
-
-
-
-
-
-
-for ac_header in string.h strings.h stdlib.h unistd.h elf-hints.h limits.h sys/param.h
-do
-as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
-if eval "test \"\${$as_ac_Header+set}\" = set"; then
- echo "$as_me:$LINENO: checking for $ac_header" >&5
-echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
-if eval "test \"\${$as_ac_Header+set}\" = set"; then
- echo $ECHO_N "(cached) $ECHO_C" >&6
-fi
-echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5
-echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
-else
- # Is the header compilable?
-echo "$as_me:$LINENO: checking $ac_header usability" >&5
-echo $ECHO_N "checking $ac_header usability... $ECHO_C" >&6
-cat >conftest.$ac_ext <<_ACEOF
-/* confdefs.h. */
-_ACEOF
-cat confdefs.h >>conftest.$ac_ext
-cat >>conftest.$ac_ext <<_ACEOF
-/* end confdefs.h. */
-$ac_includes_default
-#include <$ac_header>
-_ACEOF
-rm -f conftest.$ac_objext
-if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
- (eval $ac_compile) 2>conftest.er1
- ac_status=$?
- grep -v '^ *+' conftest.er1 >conftest.err
- rm -f conftest.er1
- cat conftest.err >&5
- echo "$as_me:$LINENO: \$? = $ac_status" >&5
- (exit $ac_status); } &&
- { ac_try='test -z "$ac_c_werror_flag"
- || test ! -s conftest.err'
- { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
- (eval $ac_try) 2>&5
- ac_status=$?
- echo "$as_me:$LINENO: \$? = $ac_status" >&5
- (exit $ac_status); }; } &&
- { ac_try='test -s conftest.$ac_objext'
- { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
- (eval $ac_try) 2>&5
- ac_status=$?
- echo "$as_me:$LINENO: \$? = $ac_status" >&5
- (exit $ac_status); }; }; then
- ac_header_compiler=yes
-else
- echo "$as_me: failed program was:" >&5
-sed 's/^/| /' conftest.$ac_ext >&5
-
-ac_header_compiler=no
-fi
-rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
-echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
-echo "${ECHO_T}$ac_header_compiler" >&6
-
-# Is the header present?
-echo "$as_me:$LINENO: checking $ac_header presence" >&5
-echo $ECHO_N "checking $ac_header presence... $ECHO_C" >&6
-cat >conftest.$ac_ext <<_ACEOF
-/* confdefs.h. */
-_ACEOF
-cat confdefs.h >>conftest.$ac_ext
-cat >>conftest.$ac_ext <<_ACEOF
-/* end confdefs.h. */
-#include <$ac_header>
-_ACEOF
-if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5
- (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
- ac_status=$?
- grep -v '^ *+' conftest.er1 >conftest.err
- rm -f conftest.er1
- cat conftest.err >&5
- echo "$as_me:$LINENO: \$? = $ac_status" >&5
- (exit $ac_status); } >/dev/null; then
- if test -s conftest.err; then
- ac_cpp_err=$ac_c_preproc_warn_flag
- ac_cpp_err=$ac_cpp_err$ac_c_werror_flag
- else
- ac_cpp_err=
- fi
-else
- ac_cpp_err=yes
-fi
-if test -z "$ac_cpp_err"; then
- ac_header_preproc=yes
-else
- echo "$as_me: failed program was:" >&5
-sed 's/^/| /' conftest.$ac_ext >&5
-
- ac_header_preproc=no
-fi
-rm -f conftest.err conftest.$ac_ext
-echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
-echo "${ECHO_T}$ac_header_preproc" >&6
-
-# So? What about this header?
-case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in
- yes:no: )
- { echo "$as_me:$LINENO: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&5
-echo "$as_me: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&2;}
- { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the compiler's result" >&5
-echo "$as_me: WARNING: $ac_header: proceeding with the compiler's result" >&2;}
- ac_header_preproc=yes
- ;;
- no:yes:* )
- { echo "$as_me:$LINENO: WARNING: $ac_header: present but cannot be compiled" >&5
-echo "$as_me: WARNING: $ac_header: present but cannot be compiled" >&2;}
- { echo "$as_me:$LINENO: WARNING: $ac_header: check for missing prerequisite headers?" >&5
-echo "$as_me: WARNING: $ac_header: check for missing prerequisite headers?" >&2;}
- { echo "$as_me:$LINENO: WARNING: $ac_header: see the Autoconf documentation" >&5
-echo "$as_me: WARNING: $ac_header: see the Autoconf documentation" >&2;}
- { echo "$as_me:$LINENO: WARNING: $ac_header: section \"Present But Cannot Be Compiled\"" >&5
-echo "$as_me: WARNING: $ac_header: section \"Present But Cannot Be Compiled\"" >&2;}
- { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the preprocessor's result" >&5
-echo "$as_me: WARNING: $ac_header: proceeding with the preprocessor's result" >&2;}
- { echo "$as_me:$LINENO: WARNING: $ac_header: in the future, the compiler will take precedence" >&5
-echo "$as_me: WARNING: $ac_header: in the future, the compiler will take precedence" >&2;}
- (
- cat <<\_ASBOX
-## ------------------------------------------ ##
-## Report this to the AC_PACKAGE_NAME lists. ##
-## ------------------------------------------ ##
-_ASBOX
- ) |
- sed "s/^/$as_me: WARNING: /" >&2
- ;;
-esac
-echo "$as_me:$LINENO: checking for $ac_header" >&5
-echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
-if eval "test \"\${$as_ac_Header+set}\" = set"; then
- echo $ECHO_N "(cached) $ECHO_C" >&6
-else
- eval "$as_ac_Header=\$ac_header_preproc"
-fi
-echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5
-echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
-
-fi
-if test `eval echo '${'$as_ac_Header'}'` = yes; then
- cat >>confdefs.h <<_ACEOF
-#define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
-_ACEOF
-
-fi
-
-done
-
-
-
-
-
-
-for ac_func in glob mkstemp realpath sbrk waitpid
-do
-as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
-echo "$as_me:$LINENO: checking for $ac_func" >&5
-echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6
-if eval "test \"\${$as_ac_var+set}\" = set"; then
- echo $ECHO_N "(cached) $ECHO_C" >&6
-else
- cat >conftest.$ac_ext <<_ACEOF
-/* confdefs.h. */
-_ACEOF
-cat confdefs.h >>conftest.$ac_ext
-cat >>conftest.$ac_ext <<_ACEOF
-/* end confdefs.h. */
-/* Define $ac_func to an innocuous variant, in case <limits.h> declares $ac_func.
- For example, HP-UX 11i <limits.h> declares gettimeofday. */
-#define $ac_func innocuous_$ac_func
-
-/* System header to define __stub macros and hopefully few prototypes,
- which can conflict with char $ac_func (); below.
- Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
- <limits.h> exists even on freestanding compilers. */
-
-#ifdef __STDC__
-# include <limits.h>
-#else
-# include <assert.h>
-#endif
-
-#undef $ac_func
-
-/* Override any gcc2 internal prototype to avoid an error. */
-#ifdef __cplusplus
-extern "C"
-{
-#endif
-/* We use char because int might match the return type of a gcc2
- builtin and then its argument prototype would still apply. */
-char $ac_func ();
-/* The GNU C library defines this for functions which it implements
- to always fail with ENOSYS. Some functions are actually named
- something starting with __ and the normal name is an alias. */
-#if defined (__stub_$ac_func) || defined (__stub___$ac_func)
-choke me
-#else
-char (*f) () = $ac_func;
-#endif
-#ifdef __cplusplus
-}
-#endif
-
-int
-main ()
-{
-return f != $ac_func;
- ;
- return 0;
-}
-_ACEOF
-rm -f conftest.$ac_objext conftest$ac_exeext
-if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
- (eval $ac_link) 2>conftest.er1
- ac_status=$?
- grep -v '^ *+' conftest.er1 >conftest.err
- rm -f conftest.er1
- cat conftest.err >&5
- echo "$as_me:$LINENO: \$? = $ac_status" >&5
- (exit $ac_status); } &&
- { ac_try='test -z "$ac_c_werror_flag"
- || test ! -s conftest.err'
- { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
- (eval $ac_try) 2>&5
- ac_status=$?
- echo "$as_me:$LINENO: \$? = $ac_status" >&5
- (exit $ac_status); }; } &&
- { ac_try='test -s conftest$ac_exeext'
- { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
- (eval $ac_try) 2>&5
- ac_status=$?
- echo "$as_me:$LINENO: \$? = $ac_status" >&5
- (exit $ac_status); }; }; then
- eval "$as_ac_var=yes"
-else
- echo "$as_me: failed program was:" >&5
-sed 's/^/| /' conftest.$ac_ext >&5
-
-eval "$as_ac_var=no"
-fi
-rm -f conftest.err conftest.$ac_objext \
- conftest$ac_exeext conftest.$ac_ext
-fi
-echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_var'}'`" >&5
-echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6
-if test `eval echo '${'$as_ac_var'}'` = yes; then
- cat >>confdefs.h <<_ACEOF
-#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
-_ACEOF
-
-fi
-done
-
-
-
-
-
-
-ac_header_dirent=no
-for ac_hdr in dirent.h sys/ndir.h sys/dir.h ndir.h; do
- as_ac_Header=`echo "ac_cv_header_dirent_$ac_hdr" | $as_tr_sh`
-echo "$as_me:$LINENO: checking for $ac_hdr that defines DIR" >&5
-echo $ECHO_N "checking for $ac_hdr that defines DIR... $ECHO_C" >&6
-if eval "test \"\${$as_ac_Header+set}\" = set"; then
- echo $ECHO_N "(cached) $ECHO_C" >&6
-else
- cat >conftest.$ac_ext <<_ACEOF
-/* confdefs.h. */
-_ACEOF
-cat confdefs.h >>conftest.$ac_ext
-cat >>conftest.$ac_ext <<_ACEOF
-/* end confdefs.h. */
-#include <sys/types.h>
-#include <$ac_hdr>
-
-int
-main ()
-{
-if ((DIR *) 0)
-return 0;
- ;
- return 0;
-}
-_ACEOF
-rm -f conftest.$ac_objext
-if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
- (eval $ac_compile) 2>conftest.er1
- ac_status=$?
- grep -v '^ *+' conftest.er1 >conftest.err
- rm -f conftest.er1
- cat conftest.err >&5
- echo "$as_me:$LINENO: \$? = $ac_status" >&5
- (exit $ac_status); } &&
- { ac_try='test -z "$ac_c_werror_flag"
- || test ! -s conftest.err'
- { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
- (eval $ac_try) 2>&5
- ac_status=$?
- echo "$as_me:$LINENO: \$? = $ac_status" >&5
- (exit $ac_status); }; } &&
- { ac_try='test -s conftest.$ac_objext'
- { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
- (eval $ac_try) 2>&5
- ac_status=$?
- echo "$as_me:$LINENO: \$? = $ac_status" >&5
- (exit $ac_status); }; }; then
- eval "$as_ac_Header=yes"
-else
- echo "$as_me: failed program was:" >&5
-sed 's/^/| /' conftest.$ac_ext >&5
-
-eval "$as_ac_Header=no"
-fi
-rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
-fi
-echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5
-echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
-if test `eval echo '${'$as_ac_Header'}'` = yes; then
- cat >>confdefs.h <<_ACEOF
-#define `echo "HAVE_$ac_hdr" | $as_tr_cpp` 1
-_ACEOF
-
-ac_header_dirent=$ac_hdr; break
-fi
-
-done
-# Two versions of opendir et al. are in -ldir and -lx on SCO Xenix.
-if test $ac_header_dirent = dirent.h; then
- echo "$as_me:$LINENO: checking for library containing opendir" >&5
-echo $ECHO_N "checking for library containing opendir... $ECHO_C" >&6
-if test "${ac_cv_search_opendir+set}" = set; then
- echo $ECHO_N "(cached) $ECHO_C" >&6
-else
- ac_func_search_save_LIBS=$LIBS
-ac_cv_search_opendir=no
-cat >conftest.$ac_ext <<_ACEOF
-/* confdefs.h. */
-_ACEOF
-cat confdefs.h >>conftest.$ac_ext
-cat >>conftest.$ac_ext <<_ACEOF
-/* end confdefs.h. */
-
-/* Override any gcc2 internal prototype to avoid an error. */
-#ifdef __cplusplus
-extern "C"
-#endif
-/* We use char because int might match the return type of a gcc2
- builtin and then its argument prototype would still apply. */
-char opendir ();
-int
-main ()
-{
-opendir ();
- ;
- return 0;
-}
-_ACEOF
-rm -f conftest.$ac_objext conftest$ac_exeext
-if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
- (eval $ac_link) 2>conftest.er1
- ac_status=$?
- grep -v '^ *+' conftest.er1 >conftest.err
- rm -f conftest.er1
- cat conftest.err >&5
- echo "$as_me:$LINENO: \$? = $ac_status" >&5
- (exit $ac_status); } &&
- { ac_try='test -z "$ac_c_werror_flag"
- || test ! -s conftest.err'
- { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
- (eval $ac_try) 2>&5
- ac_status=$?
- echo "$as_me:$LINENO: \$? = $ac_status" >&5
- (exit $ac_status); }; } &&
- { ac_try='test -s conftest$ac_exeext'
- { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
- (eval $ac_try) 2>&5
- ac_status=$?
- echo "$as_me:$LINENO: \$? = $ac_status" >&5
- (exit $ac_status); }; }; then
- ac_cv_search_opendir="none required"
-else
- echo "$as_me: failed program was:" >&5
-sed 's/^/| /' conftest.$ac_ext >&5
-
-fi
-rm -f conftest.err conftest.$ac_objext \
- conftest$ac_exeext conftest.$ac_ext
-if test "$ac_cv_search_opendir" = no; then
- for ac_lib in dir; do
- LIBS="-l$ac_lib $ac_func_search_save_LIBS"
- cat >conftest.$ac_ext <<_ACEOF
-/* confdefs.h. */
-_ACEOF
-cat confdefs.h >>conftest.$ac_ext
-cat >>conftest.$ac_ext <<_ACEOF
-/* end confdefs.h. */
-
-/* Override any gcc2 internal prototype to avoid an error. */
-#ifdef __cplusplus
-extern "C"
-#endif
-/* We use char because int might match the return type of a gcc2
- builtin and then its argument prototype would still apply. */
-char opendir ();
-int
-main ()
-{
-opendir ();
- ;
- return 0;
-}
-_ACEOF
-rm -f conftest.$ac_objext conftest$ac_exeext
-if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
- (eval $ac_link) 2>conftest.er1
- ac_status=$?
- grep -v '^ *+' conftest.er1 >conftest.err
- rm -f conftest.er1
- cat conftest.err >&5
- echo "$as_me:$LINENO: \$? = $ac_status" >&5
- (exit $ac_status); } &&
- { ac_try='test -z "$ac_c_werror_flag"
- || test ! -s conftest.err'
- { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
- (eval $ac_try) 2>&5
- ac_status=$?
- echo "$as_me:$LINENO: \$? = $ac_status" >&5
- (exit $ac_status); }; } &&
- { ac_try='test -s conftest$ac_exeext'
- { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
- (eval $ac_try) 2>&5
- ac_status=$?
- echo "$as_me:$LINENO: \$? = $ac_status" >&5
- (exit $ac_status); }; }; then
- ac_cv_search_opendir="-l$ac_lib"
-break
-else
- echo "$as_me: failed program was:" >&5
-sed 's/^/| /' conftest.$ac_ext >&5
-
-fi
-rm -f conftest.err conftest.$ac_objext \
- conftest$ac_exeext conftest.$ac_ext
- done
-fi
-LIBS=$ac_func_search_save_LIBS
-fi
-echo "$as_me:$LINENO: result: $ac_cv_search_opendir" >&5
-echo "${ECHO_T}$ac_cv_search_opendir" >&6
-if test "$ac_cv_search_opendir" != no; then
- test "$ac_cv_search_opendir" = "none required" || LIBS="$ac_cv_search_opendir $LIBS"
-
-fi
-
-else
- echo "$as_me:$LINENO: checking for library containing opendir" >&5
-echo $ECHO_N "checking for library containing opendir... $ECHO_C" >&6
-if test "${ac_cv_search_opendir+set}" = set; then
- echo $ECHO_N "(cached) $ECHO_C" >&6
-else
- ac_func_search_save_LIBS=$LIBS
-ac_cv_search_opendir=no
-cat >conftest.$ac_ext <<_ACEOF
-/* confdefs.h. */
-_ACEOF
-cat confdefs.h >>conftest.$ac_ext
-cat >>conftest.$ac_ext <<_ACEOF
-/* end confdefs.h. */
-
-/* Override any gcc2 internal prototype to avoid an error. */
-#ifdef __cplusplus
-extern "C"
-#endif
-/* We use char because int might match the return type of a gcc2
- builtin and then its argument prototype would still apply. */
-char opendir ();
-int
-main ()
-{
-opendir ();
- ;
- return 0;
-}
-_ACEOF
-rm -f conftest.$ac_objext conftest$ac_exeext
-if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
- (eval $ac_link) 2>conftest.er1
- ac_status=$?
- grep -v '^ *+' conftest.er1 >conftest.err
- rm -f conftest.er1
- cat conftest.err >&5
- echo "$as_me:$LINENO: \$? = $ac_status" >&5
- (exit $ac_status); } &&
- { ac_try='test -z "$ac_c_werror_flag"
- || test ! -s conftest.err'
- { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
- (eval $ac_try) 2>&5
- ac_status=$?
- echo "$as_me:$LINENO: \$? = $ac_status" >&5
- (exit $ac_status); }; } &&
- { ac_try='test -s conftest$ac_exeext'
- { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
- (eval $ac_try) 2>&5
- ac_status=$?
- echo "$as_me:$LINENO: \$? = $ac_status" >&5
- (exit $ac_status); }; }; then
- ac_cv_search_opendir="none required"
-else
- echo "$as_me: failed program was:" >&5
-sed 's/^/| /' conftest.$ac_ext >&5
-
-fi
-rm -f conftest.err conftest.$ac_objext \
- conftest$ac_exeext conftest.$ac_ext
-if test "$ac_cv_search_opendir" = no; then
- for ac_lib in x; do
- LIBS="-l$ac_lib $ac_func_search_save_LIBS"
- cat >conftest.$ac_ext <<_ACEOF
-/* confdefs.h. */
-_ACEOF
-cat confdefs.h >>conftest.$ac_ext
-cat >>conftest.$ac_ext <<_ACEOF
-/* end confdefs.h. */
-
-/* Override any gcc2 internal prototype to avoid an error. */
-#ifdef __cplusplus
-extern "C"
-#endif
-/* We use char because int might match the return type of a gcc2
- builtin and then its argument prototype would still apply. */
-char opendir ();
-int
-main ()
-{
-opendir ();
- ;
- return 0;
-}
-_ACEOF
-rm -f conftest.$ac_objext conftest$ac_exeext
-if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
- (eval $ac_link) 2>conftest.er1
- ac_status=$?
- grep -v '^ *+' conftest.er1 >conftest.err
- rm -f conftest.er1
- cat conftest.err >&5
- echo "$as_me:$LINENO: \$? = $ac_status" >&5
- (exit $ac_status); } &&
- { ac_try='test -z "$ac_c_werror_flag"
- || test ! -s conftest.err'
- { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
- (eval $ac_try) 2>&5
- ac_status=$?
- echo "$as_me:$LINENO: \$? = $ac_status" >&5
- (exit $ac_status); }; } &&
- { ac_try='test -s conftest$ac_exeext'
- { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
- (eval $ac_try) 2>&5
- ac_status=$?
- echo "$as_me:$LINENO: \$? = $ac_status" >&5
- (exit $ac_status); }; }; then
- ac_cv_search_opendir="-l$ac_lib"
-break
-else
- echo "$as_me: failed program was:" >&5
-sed 's/^/| /' conftest.$ac_ext >&5
-
-fi
-rm -f conftest.err conftest.$ac_objext \
- conftest$ac_exeext conftest.$ac_ext
- done
-fi
-LIBS=$ac_func_search_save_LIBS
-fi
-echo "$as_me:$LINENO: result: $ac_cv_search_opendir" >&5
-echo "${ECHO_T}$ac_cv_search_opendir" >&6
-if test "$ac_cv_search_opendir" != no; then
- test "$ac_cv_search_opendir" = "none required" || LIBS="$ac_cv_search_opendir $LIBS"
-
-fi
-
-fi
-
-
-echo "$as_me:$LINENO: checking for a known getopt prototype in unistd.h" >&5
-echo $ECHO_N "checking for a known getopt prototype in unistd.h... $ECHO_C" >&6
-if test "${ld_cv_decl_getopt_unistd_h+set}" = set; then
- echo $ECHO_N "(cached) $ECHO_C" >&6
-else
- cat >conftest.$ac_ext <<_ACEOF
-/* confdefs.h. */
-_ACEOF
-cat confdefs.h >>conftest.$ac_ext
-cat >>conftest.$ac_ext <<_ACEOF
-/* end confdefs.h. */
-#include <unistd.h>
-int
-main ()
-{
-extern int getopt (int, char *const*, const char *);
- ;
- return 0;
-}
-_ACEOF
-rm -f conftest.$ac_objext
-if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
- (eval $ac_compile) 2>conftest.er1
- ac_status=$?
- grep -v '^ *+' conftest.er1 >conftest.err
- rm -f conftest.er1
- cat conftest.err >&5
- echo "$as_me:$LINENO: \$? = $ac_status" >&5
- (exit $ac_status); } &&
- { ac_try='test -z "$ac_c_werror_flag"
- || test ! -s conftest.err'
- { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
- (eval $ac_try) 2>&5
- ac_status=$?
- echo "$as_me:$LINENO: \$? = $ac_status" >&5
- (exit $ac_status); }; } &&
- { ac_try='test -s conftest.$ac_objext'
- { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
- (eval $ac_try) 2>&5
- ac_status=$?
- echo "$as_me:$LINENO: \$? = $ac_status" >&5
- (exit $ac_status); }; }; then
- ld_cv_decl_getopt_unistd_h=yes
-else
- echo "$as_me: failed program was:" >&5
-sed 's/^/| /' conftest.$ac_ext >&5
-
-ld_cv_decl_getopt_unistd_h=no
-fi
-rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
-fi
-
-echo "$as_me:$LINENO: result: $ld_cv_decl_getopt_unistd_h" >&5
-echo "${ECHO_T}$ld_cv_decl_getopt_unistd_h" >&6
-if test $ld_cv_decl_getopt_unistd_h = yes; then
-
-cat >>confdefs.h <<\_ACEOF
-#define HAVE_DECL_GETOPT 1
-_ACEOF
-
-fi
-
-
-case "${host}" in
-*-*-msdos* | *-*-go32* | *-*-mingw32* | *-*-cygwin* | *-*-windows*)
-
-cat >>confdefs.h <<\_ACEOF
-#define USE_BINARY_FOPEN 1
-_ACEOF
- ;;
-esac
-
-echo "$as_me:$LINENO: checking whether strstr is declared" >&5
-echo $ECHO_N "checking whether strstr is declared... $ECHO_C" >&6
-if test "${ac_cv_have_decl_strstr+set}" = set; then
- echo $ECHO_N "(cached) $ECHO_C" >&6
-else
- cat >conftest.$ac_ext <<_ACEOF
-/* confdefs.h. */
-_ACEOF
-cat confdefs.h >>conftest.$ac_ext
-cat >>conftest.$ac_ext <<_ACEOF
-/* end confdefs.h. */
-$ac_includes_default
-int
-main ()
-{
-#ifndef strstr
- char *p = (char *) strstr;
-#endif
-
- ;
- return 0;
-}
-_ACEOF
-rm -f conftest.$ac_objext
-if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
- (eval $ac_compile) 2>conftest.er1
- ac_status=$?
- grep -v '^ *+' conftest.er1 >conftest.err
- rm -f conftest.er1
- cat conftest.err >&5
- echo "$as_me:$LINENO: \$? = $ac_status" >&5
- (exit $ac_status); } &&
- { ac_try='test -z "$ac_c_werror_flag"
- || test ! -s conftest.err'
- { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
- (eval $ac_try) 2>&5
- ac_status=$?
- echo "$as_me:$LINENO: \$? = $ac_status" >&5
- (exit $ac_status); }; } &&
- { ac_try='test -s conftest.$ac_objext'
- { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
- (eval $ac_try) 2>&5
- ac_status=$?
- echo "$as_me:$LINENO: \$? = $ac_status" >&5
- (exit $ac_status); }; }; then
- ac_cv_have_decl_strstr=yes
-else
- echo "$as_me: failed program was:" >&5
-sed 's/^/| /' conftest.$ac_ext >&5
-
-ac_cv_have_decl_strstr=no
-fi
-rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
-fi
-echo "$as_me:$LINENO: result: $ac_cv_have_decl_strstr" >&5
-echo "${ECHO_T}$ac_cv_have_decl_strstr" >&6
-if test $ac_cv_have_decl_strstr = yes; then
-
-cat >>confdefs.h <<_ACEOF
-#define HAVE_DECL_STRSTR 1
-_ACEOF
-
-
-else
- cat >>confdefs.h <<_ACEOF
-#define HAVE_DECL_STRSTR 0
-_ACEOF
-
-
-fi
-echo "$as_me:$LINENO: checking whether free is declared" >&5
-echo $ECHO_N "checking whether free is declared... $ECHO_C" >&6
-if test "${ac_cv_have_decl_free+set}" = set; then
- echo $ECHO_N "(cached) $ECHO_C" >&6
-else
- cat >conftest.$ac_ext <<_ACEOF
-/* confdefs.h. */
-_ACEOF
-cat confdefs.h >>conftest.$ac_ext
-cat >>conftest.$ac_ext <<_ACEOF
-/* end confdefs.h. */
-$ac_includes_default
-int
-main ()
-{
-#ifndef free
- char *p = (char *) free;
-#endif
-
- ;
- return 0;
-}
-_ACEOF
-rm -f conftest.$ac_objext
-if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
- (eval $ac_compile) 2>conftest.er1
- ac_status=$?
- grep -v '^ *+' conftest.er1 >conftest.err
- rm -f conftest.er1
- cat conftest.err >&5
- echo "$as_me:$LINENO: \$? = $ac_status" >&5
- (exit $ac_status); } &&
- { ac_try='test -z "$ac_c_werror_flag"
- || test ! -s conftest.err'
- { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
- (eval $ac_try) 2>&5
- ac_status=$?
- echo "$as_me:$LINENO: \$? = $ac_status" >&5
- (exit $ac_status); }; } &&
- { ac_try='test -s conftest.$ac_objext'
- { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
- (eval $ac_try) 2>&5
- ac_status=$?
- echo "$as_me:$LINENO: \$? = $ac_status" >&5
- (exit $ac_status); }; }; then
- ac_cv_have_decl_free=yes
-else
- echo "$as_me: failed program was:" >&5
-sed 's/^/| /' conftest.$ac_ext >&5
-
-ac_cv_have_decl_free=no
-fi
-rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
-fi
-echo "$as_me:$LINENO: result: $ac_cv_have_decl_free" >&5
-echo "${ECHO_T}$ac_cv_have_decl_free" >&6
-if test $ac_cv_have_decl_free = yes; then
-
-cat >>confdefs.h <<_ACEOF
-#define HAVE_DECL_FREE 1
-_ACEOF
-
-
-else
- cat >>confdefs.h <<_ACEOF
-#define HAVE_DECL_FREE 0
-_ACEOF
-
-
-fi
-echo "$as_me:$LINENO: checking whether sbrk is declared" >&5
-echo $ECHO_N "checking whether sbrk is declared... $ECHO_C" >&6
-if test "${ac_cv_have_decl_sbrk+set}" = set; then
- echo $ECHO_N "(cached) $ECHO_C" >&6
-else
- cat >conftest.$ac_ext <<_ACEOF
-/* confdefs.h. */
-_ACEOF
-cat confdefs.h >>conftest.$ac_ext
-cat >>conftest.$ac_ext <<_ACEOF
-/* end confdefs.h. */
-$ac_includes_default
-int
-main ()
-{
-#ifndef sbrk
- char *p = (char *) sbrk;
-#endif
-
- ;
- return 0;
-}
-_ACEOF
-rm -f conftest.$ac_objext
-if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
- (eval $ac_compile) 2>conftest.er1
- ac_status=$?
- grep -v '^ *+' conftest.er1 >conftest.err
- rm -f conftest.er1
- cat conftest.err >&5
- echo "$as_me:$LINENO: \$? = $ac_status" >&5
- (exit $ac_status); } &&
- { ac_try='test -z "$ac_c_werror_flag"
- || test ! -s conftest.err'
- { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
- (eval $ac_try) 2>&5
- ac_status=$?
- echo "$as_me:$LINENO: \$? = $ac_status" >&5
- (exit $ac_status); }; } &&
- { ac_try='test -s conftest.$ac_objext'
- { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
- (eval $ac_try) 2>&5
- ac_status=$?
- echo "$as_me:$LINENO: \$? = $ac_status" >&5
- (exit $ac_status); }; }; then
- ac_cv_have_decl_sbrk=yes
-else
- echo "$as_me: failed program was:" >&5
-sed 's/^/| /' conftest.$ac_ext >&5
-
-ac_cv_have_decl_sbrk=no
-fi
-rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
-fi
-echo "$as_me:$LINENO: result: $ac_cv_have_decl_sbrk" >&5
-echo "${ECHO_T}$ac_cv_have_decl_sbrk" >&6
-if test $ac_cv_have_decl_sbrk = yes; then
-
-cat >>confdefs.h <<_ACEOF
-#define HAVE_DECL_SBRK 1
-_ACEOF
-
-
-else
- cat >>confdefs.h <<_ACEOF
-#define HAVE_DECL_SBRK 0
-_ACEOF
-
-
-fi
-echo "$as_me:$LINENO: checking whether getenv is declared" >&5
-echo $ECHO_N "checking whether getenv is declared... $ECHO_C" >&6
-if test "${ac_cv_have_decl_getenv+set}" = set; then
- echo $ECHO_N "(cached) $ECHO_C" >&6
-else
- cat >conftest.$ac_ext <<_ACEOF
-/* confdefs.h. */
-_ACEOF
-cat confdefs.h >>conftest.$ac_ext
-cat >>conftest.$ac_ext <<_ACEOF
-/* end confdefs.h. */
-$ac_includes_default
-int
-main ()
-{
-#ifndef getenv
- char *p = (char *) getenv;
-#endif
-
- ;
- return 0;
-}
-_ACEOF
-rm -f conftest.$ac_objext
-if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
- (eval $ac_compile) 2>conftest.er1
- ac_status=$?
- grep -v '^ *+' conftest.er1 >conftest.err
- rm -f conftest.er1
- cat conftest.err >&5
- echo "$as_me:$LINENO: \$? = $ac_status" >&5
- (exit $ac_status); } &&
- { ac_try='test -z "$ac_c_werror_flag"
- || test ! -s conftest.err'
- { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
- (eval $ac_try) 2>&5
- ac_status=$?
- echo "$as_me:$LINENO: \$? = $ac_status" >&5
- (exit $ac_status); }; } &&
- { ac_try='test -s conftest.$ac_objext'
- { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
- (eval $ac_try) 2>&5
- ac_status=$?
- echo "$as_me:$LINENO: \$? = $ac_status" >&5
- (exit $ac_status); }; }; then
- ac_cv_have_decl_getenv=yes
-else
- echo "$as_me: failed program was:" >&5
-sed 's/^/| /' conftest.$ac_ext >&5
-
-ac_cv_have_decl_getenv=no
-fi
-rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
-fi
-echo "$as_me:$LINENO: result: $ac_cv_have_decl_getenv" >&5
-echo "${ECHO_T}$ac_cv_have_decl_getenv" >&6
-if test $ac_cv_have_decl_getenv = yes; then
-
-cat >>confdefs.h <<_ACEOF
-#define HAVE_DECL_GETENV 1
-_ACEOF
-
-
-else
- cat >>confdefs.h <<_ACEOF
-#define HAVE_DECL_GETENV 0
-_ACEOF
-
-
-fi
-echo "$as_me:$LINENO: checking whether environ is declared" >&5
-echo $ECHO_N "checking whether environ is declared... $ECHO_C" >&6
-if test "${ac_cv_have_decl_environ+set}" = set; then
- echo $ECHO_N "(cached) $ECHO_C" >&6
-else
- cat >conftest.$ac_ext <<_ACEOF
-/* confdefs.h. */
-_ACEOF
-cat confdefs.h >>conftest.$ac_ext
-cat >>conftest.$ac_ext <<_ACEOF
-/* end confdefs.h. */
-$ac_includes_default
-int
-main ()
-{
-#ifndef environ
- char *p = (char *) environ;
-#endif
-
- ;
- return 0;
-}
-_ACEOF
-rm -f conftest.$ac_objext
-if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
- (eval $ac_compile) 2>conftest.er1
- ac_status=$?
- grep -v '^ *+' conftest.er1 >conftest.err
- rm -f conftest.er1
- cat conftest.err >&5
- echo "$as_me:$LINENO: \$? = $ac_status" >&5
- (exit $ac_status); } &&
- { ac_try='test -z "$ac_c_werror_flag"
- || test ! -s conftest.err'
- { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
- (eval $ac_try) 2>&5
- ac_status=$?
- echo "$as_me:$LINENO: \$? = $ac_status" >&5
- (exit $ac_status); }; } &&
- { ac_try='test -s conftest.$ac_objext'
- { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
- (eval $ac_try) 2>&5
- ac_status=$?
- echo "$as_me:$LINENO: \$? = $ac_status" >&5
- (exit $ac_status); }; }; then
- ac_cv_have_decl_environ=yes
-else
- echo "$as_me: failed program was:" >&5
-sed 's/^/| /' conftest.$ac_ext >&5
-
-ac_cv_have_decl_environ=no
-fi
-rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
-fi
-echo "$as_me:$LINENO: result: $ac_cv_have_decl_environ" >&5
-echo "${ECHO_T}$ac_cv_have_decl_environ" >&6
-if test $ac_cv_have_decl_environ = yes; then
-
-cat >>confdefs.h <<_ACEOF
-#define HAVE_DECL_ENVIRON 1
-_ACEOF
-
-
-else
- cat >>confdefs.h <<_ACEOF
-#define HAVE_DECL_ENVIRON 0
-_ACEOF
-
-
-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 "$as_me:$LINENO: checking whether ANSI C string concatenation works" >&5
-echo $ECHO_N "checking whether ANSI C string concatenation works... $ECHO_C" >&6
-if test "${ld_cv_string_concatenation+set}" = set; then
- echo $ECHO_N "(cached) $ECHO_C" >&6
-else
- cat >conftest.$ac_ext <<_ACEOF
-/* confdefs.h. */
-_ACEOF
-cat confdefs.h >>conftest.$ac_ext
-cat >>conftest.$ac_ext <<_ACEOF
-/* end confdefs.h. */
-
-int
-main ()
-{
-char *a = "a" "a";
- ;
- return 0;
-}
-_ACEOF
-rm -f conftest.$ac_objext
-if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
- (eval $ac_compile) 2>conftest.er1
- ac_status=$?
- grep -v '^ *+' conftest.er1 >conftest.err
- rm -f conftest.er1
- cat conftest.err >&5
- echo "$as_me:$LINENO: \$? = $ac_status" >&5
- (exit $ac_status); } &&
- { ac_try='test -z "$ac_c_werror_flag"
- || test ! -s conftest.err'
- { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
- (eval $ac_try) 2>&5
- ac_status=$?
- echo "$as_me:$LINENO: \$? = $ac_status" >&5
- (exit $ac_status); }; } &&
- { ac_try='test -s conftest.$ac_objext'
- { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
- (eval $ac_try) 2>&5
- ac_status=$?
- echo "$as_me:$LINENO: \$? = $ac_status" >&5
- (exit $ac_status); }; }; then
- ld_cv_string_concatenation=yes
-else
- echo "$as_me: failed program was:" >&5
-sed 's/^/| /' conftest.$ac_ext >&5
-
-ld_cv_string_concatenation=no
-fi
-rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
-fi
-
-echo "$as_me:$LINENO: result: $ld_cv_string_concatenation" >&5
-echo "${ECHO_T}$ld_cv_string_concatenation" >&6
-if test "$ld_cv_string_concatenation" = "yes"; then
- STRINGIFY=astring.sed
-else
- 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
-
- if test x${want64} = xfalse; then
- . ${srcdir}/../bfd/config.bfd
- fi
-
- if test x${want64} = xtrue; then
- targ_extra_emuls="$targ_extra_emuls $targ64_extra_emuls"
- targ_extra_libpath="$targ_extra_libpath $targ64_extra_libpath"
- fi
-
- for i in $targ_emul $targ_extra_emuls $targ_extra_libpath; do
- case " $all_emuls " in
- *" e${i}.o "*) ;;
- *)
- 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} = xfalse; then
- echo "$as_me:$LINENO: checking for long" >&5
-echo $ECHO_N "checking for long... $ECHO_C" >&6
-if test "${ac_cv_type_long+set}" = set; then
- echo $ECHO_N "(cached) $ECHO_C" >&6
-else
- cat >conftest.$ac_ext <<_ACEOF
-/* confdefs.h. */
-_ACEOF
-cat confdefs.h >>conftest.$ac_ext
-cat >>conftest.$ac_ext <<_ACEOF
-/* end confdefs.h. */
-$ac_includes_default
-int
-main ()
-{
-if ((long *) 0)
- return 0;
-if (sizeof (long))
- return 0;
- ;
- return 0;
-}
-_ACEOF
-rm -f conftest.$ac_objext
-if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
- (eval $ac_compile) 2>conftest.er1
- ac_status=$?
- grep -v '^ *+' conftest.er1 >conftest.err
- rm -f conftest.er1
- cat conftest.err >&5
- echo "$as_me:$LINENO: \$? = $ac_status" >&5
- (exit $ac_status); } &&
- { ac_try='test -z "$ac_c_werror_flag"
- || test ! -s conftest.err'
- { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
- (eval $ac_try) 2>&5
- ac_status=$?
- echo "$as_me:$LINENO: \$? = $ac_status" >&5
- (exit $ac_status); }; } &&
- { ac_try='test -s conftest.$ac_objext'
- { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
- (eval $ac_try) 2>&5
- ac_status=$?
- echo "$as_me:$LINENO: \$? = $ac_status" >&5
- (exit $ac_status); }; }; then
- ac_cv_type_long=yes
-else
- echo "$as_me: failed program was:" >&5
-sed 's/^/| /' conftest.$ac_ext >&5
-
-ac_cv_type_long=no
-fi
-rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
-fi
-echo "$as_me:$LINENO: result: $ac_cv_type_long" >&5
-echo "${ECHO_T}$ac_cv_type_long" >&6
-
-echo "$as_me:$LINENO: checking size of long" >&5
-echo $ECHO_N "checking size of long... $ECHO_C" >&6
-if test "${ac_cv_sizeof_long+set}" = set; then
- echo $ECHO_N "(cached) $ECHO_C" >&6
-else
- if test "$ac_cv_type_long" = yes; then
- # The cast to unsigned long works around a bug in the HP C Compiler
- # version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
- # declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
- # This bug is HP SR number 8606223364.
- if test "$cross_compiling" = yes; then
- # Depending upon the size, compute the lo and hi bounds.
-cat >conftest.$ac_ext <<_ACEOF
-/* confdefs.h. */
-_ACEOF
-cat confdefs.h >>conftest.$ac_ext
-cat >>conftest.$ac_ext <<_ACEOF
-/* end confdefs.h. */
-$ac_includes_default
-int
-main ()
-{
-static int test_array [1 - 2 * !(((long) (sizeof (long))) >= 0)];
-test_array [0] = 0
-
- ;
- return 0;
-}
-_ACEOF
-rm -f conftest.$ac_objext
-if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
- (eval $ac_compile) 2>conftest.er1
- ac_status=$?
- grep -v '^ *+' conftest.er1 >conftest.err
- rm -f conftest.er1
- cat conftest.err >&5
- echo "$as_me:$LINENO: \$? = $ac_status" >&5
- (exit $ac_status); } &&
- { ac_try='test -z "$ac_c_werror_flag"
- || test ! -s conftest.err'
- { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
- (eval $ac_try) 2>&5
- ac_status=$?
- echo "$as_me:$LINENO: \$? = $ac_status" >&5
- (exit $ac_status); }; } &&
- { ac_try='test -s conftest.$ac_objext'
- { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
- (eval $ac_try) 2>&5
- ac_status=$?
- echo "$as_me:$LINENO: \$? = $ac_status" >&5
- (exit $ac_status); }; }; then
- ac_lo=0 ac_mid=0
- while :; do
- cat >conftest.$ac_ext <<_ACEOF
-/* confdefs.h. */
-_ACEOF
-cat confdefs.h >>conftest.$ac_ext
-cat >>conftest.$ac_ext <<_ACEOF
-/* end confdefs.h. */
-$ac_includes_default
-int
-main ()
-{
-static int test_array [1 - 2 * !(((long) (sizeof (long))) <= $ac_mid)];
-test_array [0] = 0
-
- ;
- return 0;
-}
-_ACEOF
-rm -f conftest.$ac_objext
-if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
- (eval $ac_compile) 2>conftest.er1
- ac_status=$?
- grep -v '^ *+' conftest.er1 >conftest.err
- rm -f conftest.er1
- cat conftest.err >&5
- echo "$as_me:$LINENO: \$? = $ac_status" >&5
- (exit $ac_status); } &&
- { ac_try='test -z "$ac_c_werror_flag"
- || test ! -s conftest.err'
- { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
- (eval $ac_try) 2>&5
- ac_status=$?
- echo "$as_me:$LINENO: \$? = $ac_status" >&5
- (exit $ac_status); }; } &&
- { ac_try='test -s conftest.$ac_objext'
- { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
- (eval $ac_try) 2>&5
- ac_status=$?
- echo "$as_me:$LINENO: \$? = $ac_status" >&5
- (exit $ac_status); }; }; then
- ac_hi=$ac_mid; break
-else
- echo "$as_me: failed program was:" >&5
-sed 's/^/| /' conftest.$ac_ext >&5
-
-ac_lo=`expr $ac_mid + 1`
- if test $ac_lo -le $ac_mid; then
- ac_lo= ac_hi=
- break
- fi
- ac_mid=`expr 2 '*' $ac_mid + 1`
-fi
-rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
- done
-else
- echo "$as_me: failed program was:" >&5
-sed 's/^/| /' conftest.$ac_ext >&5
-
-cat >conftest.$ac_ext <<_ACEOF
-/* confdefs.h. */
-_ACEOF
-cat confdefs.h >>conftest.$ac_ext
-cat >>conftest.$ac_ext <<_ACEOF
-/* end confdefs.h. */
-$ac_includes_default
-int
-main ()
-{
-static int test_array [1 - 2 * !(((long) (sizeof (long))) < 0)];
-test_array [0] = 0
-
- ;
- return 0;
-}
-_ACEOF
-rm -f conftest.$ac_objext
-if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
- (eval $ac_compile) 2>conftest.er1
- ac_status=$?
- grep -v '^ *+' conftest.er1 >conftest.err
- rm -f conftest.er1
- cat conftest.err >&5
- echo "$as_me:$LINENO: \$? = $ac_status" >&5
- (exit $ac_status); } &&
- { ac_try='test -z "$ac_c_werror_flag"
- || test ! -s conftest.err'
- { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
- (eval $ac_try) 2>&5
- ac_status=$?
- echo "$as_me:$LINENO: \$? = $ac_status" >&5
- (exit $ac_status); }; } &&
- { ac_try='test -s conftest.$ac_objext'
- { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
- (eval $ac_try) 2>&5
- ac_status=$?
- echo "$as_me:$LINENO: \$? = $ac_status" >&5
- (exit $ac_status); }; }; then
- ac_hi=-1 ac_mid=-1
- while :; do
- cat >conftest.$ac_ext <<_ACEOF
-/* confdefs.h. */
-_ACEOF
-cat confdefs.h >>conftest.$ac_ext
-cat >>conftest.$ac_ext <<_ACEOF
-/* end confdefs.h. */
-$ac_includes_default
-int
-main ()
-{
-static int test_array [1 - 2 * !(((long) (sizeof (long))) >= $ac_mid)];
-test_array [0] = 0
-
- ;
- return 0;
-}
-_ACEOF
-rm -f conftest.$ac_objext
-if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
- (eval $ac_compile) 2>conftest.er1
- ac_status=$?
- grep -v '^ *+' conftest.er1 >conftest.err
- rm -f conftest.er1
- cat conftest.err >&5
- echo "$as_me:$LINENO: \$? = $ac_status" >&5
- (exit $ac_status); } &&
- { ac_try='test -z "$ac_c_werror_flag"
- || test ! -s conftest.err'
- { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
- (eval $ac_try) 2>&5
- ac_status=$?
- echo "$as_me:$LINENO: \$? = $ac_status" >&5
- (exit $ac_status); }; } &&
- { ac_try='test -s conftest.$ac_objext'
- { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
- (eval $ac_try) 2>&5
- ac_status=$?
- echo "$as_me:$LINENO: \$? = $ac_status" >&5
- (exit $ac_status); }; }; then
- ac_lo=$ac_mid; break
-else
- echo "$as_me: failed program was:" >&5
-sed 's/^/| /' conftest.$ac_ext >&5
-
-ac_hi=`expr '(' $ac_mid ')' - 1`
- if test $ac_mid -le $ac_hi; then
- ac_lo= ac_hi=
- break
- fi
- ac_mid=`expr 2 '*' $ac_mid`
-fi
-rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
- done
-else
- echo "$as_me: failed program was:" >&5
-sed 's/^/| /' conftest.$ac_ext >&5
-
-ac_lo= ac_hi=
-fi
-rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
-fi
-rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
-# Binary search between lo and hi bounds.
-while test "x$ac_lo" != "x$ac_hi"; do
- ac_mid=`expr '(' $ac_hi - $ac_lo ')' / 2 + $ac_lo`
- cat >conftest.$ac_ext <<_ACEOF
-/* confdefs.h. */
-_ACEOF
-cat confdefs.h >>conftest.$ac_ext
-cat >>conftest.$ac_ext <<_ACEOF
-/* end confdefs.h. */
-$ac_includes_default
-int
-main ()
-{
-static int test_array [1 - 2 * !(((long) (sizeof (long))) <= $ac_mid)];
-test_array [0] = 0
-
- ;
- return 0;
-}
-_ACEOF
-rm -f conftest.$ac_objext
-if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
- (eval $ac_compile) 2>conftest.er1
- ac_status=$?
- grep -v '^ *+' conftest.er1 >conftest.err
- rm -f conftest.er1
- cat conftest.err >&5
- echo "$as_me:$LINENO: \$? = $ac_status" >&5
- (exit $ac_status); } &&
- { ac_try='test -z "$ac_c_werror_flag"
- || test ! -s conftest.err'
- { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
- (eval $ac_try) 2>&5
- ac_status=$?
- echo "$as_me:$LINENO: \$? = $ac_status" >&5
- (exit $ac_status); }; } &&
- { ac_try='test -s conftest.$ac_objext'
- { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
- (eval $ac_try) 2>&5
- ac_status=$?
- echo "$as_me:$LINENO: \$? = $ac_status" >&5
- (exit $ac_status); }; }; then
- ac_hi=$ac_mid
-else
- echo "$as_me: failed program was:" >&5
-sed 's/^/| /' conftest.$ac_ext >&5
-
-ac_lo=`expr '(' $ac_mid ')' + 1`
-fi
-rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
-done
-case $ac_lo in
-?*) ac_cv_sizeof_long=$ac_lo;;
-'') { { echo "$as_me:$LINENO: error: cannot compute sizeof (long), 77
-See \`config.log' for more details." >&5
-echo "$as_me: error: cannot compute sizeof (long), 77
-See \`config.log' for more details." >&2;}
- { (exit 1); exit 1; }; } ;;
-esac
-else
- if test "$cross_compiling" = yes; then
- { { echo "$as_me:$LINENO: error: cannot run test program while cross compiling
-See \`config.log' for more details." >&5
-echo "$as_me: error: cannot run test program while cross compiling
-See \`config.log' for more details." >&2;}
- { (exit 1); exit 1; }; }
-else
- cat >conftest.$ac_ext <<_ACEOF
-/* confdefs.h. */
-_ACEOF
-cat confdefs.h >>conftest.$ac_ext
-cat >>conftest.$ac_ext <<_ACEOF
-/* end confdefs.h. */
-$ac_includes_default
-long longval () { return (long) (sizeof (long)); }
-unsigned long ulongval () { return (long) (sizeof (long)); }
-#include <stdio.h>
-#include <stdlib.h>
-int
-main ()
-{
-
- FILE *f = fopen ("conftest.val", "w");
- if (! f)
- exit (1);
- if (((long) (sizeof (long))) < 0)
- {
- long i = longval ();
- if (i != ((long) (sizeof (long))))
- exit (1);
- fprintf (f, "%ld\n", i);
- }
- else
- {
- unsigned long i = ulongval ();
- if (i != ((long) (sizeof (long))))
- exit (1);
- fprintf (f, "%lu\n", i);
- }
- exit (ferror (f) || fclose (f) != 0);
-
- ;
- return 0;
-}
-_ACEOF
-rm -f conftest$ac_exeext
-if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
- (eval $ac_link) 2>&5
- ac_status=$?
- echo "$as_me:$LINENO: \$? = $ac_status" >&5
- (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
- { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
- (eval $ac_try) 2>&5
- ac_status=$?
- echo "$as_me:$LINENO: \$? = $ac_status" >&5
- (exit $ac_status); }; }; then
- ac_cv_sizeof_long=`cat conftest.val`
-else
- echo "$as_me: program exited with status $ac_status" >&5
-echo "$as_me: failed program was:" >&5
-sed 's/^/| /' conftest.$ac_ext >&5
-
-( exit $ac_status )
-{ { echo "$as_me:$LINENO: error: cannot compute sizeof (long), 77
-See \`config.log' for more details." >&5
-echo "$as_me: error: cannot compute sizeof (long), 77
-See \`config.log' for more details." >&2;}
- { (exit 1); exit 1; }; }
-fi
-rm -f core *.core gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
-fi
-fi
-rm -f conftest.val
-else
- ac_cv_sizeof_long=0
-fi
-fi
-echo "$as_me:$LINENO: result: $ac_cv_sizeof_long" >&5
-echo "${ECHO_T}$ac_cv_sizeof_long" >&6
-cat >>confdefs.h <<_ACEOF
-#define SIZEOF_LONG $ac_cv_sizeof_long
-_ACEOF
-
-
- if test "x${ac_cv_sizeof_long}" = "x8"; then
- want64=true
- fi
- fi
- if test x${want64} = xtrue; then
- EMULATION_OFILES='$(ALL_EMULATIONS) $(ALL_64_EMULATIONS)'
- else
- 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
-
-case "$target_os" in
- lynxos) EXTRA_SHLIB_EXTENSION=".a" ;;
-esac
-
-if test x${EXTRA_SHLIB_EXTENSION} != x ; then
-
-cat >>confdefs.h <<_ACEOF
-#define EXTRA_SHLIB_EXTENSION "$EXTRA_SHLIB_EXTENSION"
-_ACEOF
-
-fi
-
-
-
-
-
- ac_config_files="$ac_config_files Makefile po/Makefile.in:po/Make-in"
-cat >confcache <<\_ACEOF
-# This file is a shell script that caches the results of configure
-# tests run on this system so they can be shared between configure
-# scripts and configure runs, see configure's option --config-cache.
-# It is not useful on other systems. If it contains results you don't
-# want to keep, you may remove or edit it.
-#
-# config.status only pays attention to the cache file if you give it
-# the --recheck option to rerun configure.
-#
-# `ac_cv_env_foo' variables (set or unset) will be overridden when
-# loading this file, other *unset* `ac_cv_foo' will be assigned the
-# following values.
-
-_ACEOF
-
-# The following way of writing the cache mishandles newlines in values,
-# but we know of no workaround that is simple, portable, and efficient.
-# So, don't put newlines in cache variables' values.
-# Ultrix sh set writes to stderr and can't be redirected directly,
-# and sets the high bit in the cache file unless we assign to the vars.
-{
- (set) 2>&1 |
- case `(ac_space=' '; set | grep ac_space) 2>&1` in
- *ac_space=\ *)
- # `set' does not quote correctly, so add quotes (double-quote
- # substitution turns \\\\ into \\, and sed turns \\ into \).
- sed -n \
- "s/'/'\\\\''/g;
- s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1='\\2'/p"
- ;;
- *)
- # `set' quotes correctly as required by POSIX, so do not add quotes.
- sed -n \
- "s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1=\\2/p"
- ;;
- esac;
-} |
- sed '
- t clear
- : clear
- s/^\([^=]*\)=\(.*[{}].*\)$/test "${\1+set}" = set || &/
- t end
- /^ac_cv_env/!s/^\([^=]*\)=\(.*\)$/\1=${\1=\2}/
- : end' >>confcache
-if diff $cache_file confcache >/dev/null 2>&1; then :; else
- if test -w $cache_file; then
- test "x$cache_file" != "x/dev/null" && echo "updating cache $cache_file"
- cat confcache >$cache_file
- else
- echo "not updating unwritable cache $cache_file"
- fi
-fi
-rm -f confcache
-
-test "x$prefix" = xNONE && prefix=$ac_default_prefix
-# Let make expand exec_prefix.
-test "x$exec_prefix" = xNONE && exec_prefix='${prefix}'
-
-# VPATH may cause trouble with some makes, so we remove $(srcdir),
-# ${srcdir} and @srcdir@ from VPATH if srcdir is ".", strip leading and
-# trailing colons and then remove the whole line if VPATH becomes empty
-# (actually we leave an empty line to preserve line numbers).
-if test "x$srcdir" = x.; then
- ac_vpsub='/^[ ]*VPATH[ ]*=/{
-s/:*\$(srcdir):*/:/;
-s/:*\${srcdir}:*/:/;
-s/:*@srcdir@:*/:/;
-s/^\([^=]*=[ ]*\):*/\1/;
-s/:*$//;
-s/^[^=]*=[ ]*$//;
-}'
-fi
-
-DEFS=-DHAVE_CONFIG_H
-
-ac_libobjs=
-ac_ltlibobjs=
-for ac_i in : $LIBOBJS; do test "x$ac_i" = x: && continue
- # 1. Remove the extension, and $U if already installed.
- ac_i=`echo "$ac_i" |
- sed 's/\$U\././;s/\.o$//;s/\.obj$//'`
- # 2. Add them.
- ac_libobjs="$ac_libobjs $ac_i\$U.$ac_objext"
- ac_ltlibobjs="$ac_ltlibobjs $ac_i"'$U.lo'
-done
-LIBOBJS=$ac_libobjs
-
-LTLIBOBJS=$ac_ltlibobjs
-
-
-if test -z "${AMDEP_TRUE}" && test -z "${AMDEP_FALSE}"; then
- { { echo "$as_me:$LINENO: error: conditional \"AMDEP\" was never defined.
-Usually this means the macro was only invoked conditionally." >&5
-echo "$as_me: error: conditional \"AMDEP\" was never defined.
-Usually this means the macro was only invoked conditionally." >&2;}
- { (exit 1); exit 1; }; }
-fi
-if test -z "${am__fastdepCC_TRUE}" && test -z "${am__fastdepCC_FALSE}"; then
- { { echo "$as_me:$LINENO: error: conditional \"am__fastdepCC\" was never defined.
-Usually this means the macro was only invoked conditionally." >&5
-echo "$as_me: error: conditional \"am__fastdepCC\" was never defined.
-Usually this means the macro was only invoked conditionally." >&2;}
- { (exit 1); exit 1; }; }
-fi
-if test -z "${MAINTAINER_MODE_TRUE}" && test -z "${MAINTAINER_MODE_FALSE}"; then
- { { echo "$as_me:$LINENO: error: conditional \"MAINTAINER_MODE\" was never defined.
-Usually this means the macro was only invoked conditionally." >&5
-echo "$as_me: error: conditional \"MAINTAINER_MODE\" was never defined.
-Usually this means the macro was only invoked conditionally." >&2;}
- { (exit 1); exit 1; }; }
-fi
-if test -z "${GENINSRC_NEVER_TRUE}" && test -z "${GENINSRC_NEVER_FALSE}"; then
- { { echo "$as_me:$LINENO: error: conditional \"GENINSRC_NEVER\" was never defined.
-Usually this means the macro was only invoked conditionally." >&5
-echo "$as_me: error: conditional \"GENINSRC_NEVER\" was never defined.
-Usually this means the macro was only invoked conditionally." >&2;}
- { (exit 1); exit 1; }; }
-fi
-
-: ${CONFIG_STATUS=./config.status}
-ac_clean_files_save=$ac_clean_files
-ac_clean_files="$ac_clean_files $CONFIG_STATUS"
-{ echo "$as_me:$LINENO: creating $CONFIG_STATUS" >&5
-echo "$as_me: creating $CONFIG_STATUS" >&6;}
-cat >$CONFIG_STATUS <<_ACEOF
-#! $SHELL
-# Generated by $as_me.
-# Run this file to recreate the current configuration.
-# Compiler output produced by configure, useful for debugging
-# configure, is in config.log if it exists.
-
-debug=false
-ac_cs_recheck=false
-ac_cs_silent=false
-SHELL=\${CONFIG_SHELL-$SHELL}
-_ACEOF
-
-cat >>$CONFIG_STATUS <<\_ACEOF
-## --------------------- ##
-## M4sh Initialization. ##
-## --------------------- ##
-
-# Be Bourne compatible
-if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then
- emulate sh
- NULLCMD=:
- # Zsh 3.x and 4.x performs word splitting on ${1+"$@"}, which
- # is contrary to our usage. Disable this feature.
- alias -g '${1+"$@"}'='"$@"'
-elif test -n "${BASH_VERSION+set}" && (set -o posix) >/dev/null 2>&1; then
- set -o posix
-fi
-DUALCASE=1; export DUALCASE # for MKS sh
-
-# Support unset when possible.
-if ( (MAIL=60; unset MAIL) || exit) >/dev/null 2>&1; then
- as_unset=unset
-else
- as_unset=false
-fi
-
-
-# Work around bugs in pre-3.0 UWIN ksh.
-$as_unset ENV MAIL MAILPATH
-PS1='$ '
-PS2='> '
-PS4='+ '
-
-# NLS nuisances.
-for as_var in \
- LANG LANGUAGE LC_ADDRESS LC_ALL LC_COLLATE LC_CTYPE LC_IDENTIFICATION \
- LC_MEASUREMENT LC_MESSAGES LC_MONETARY LC_NAME LC_NUMERIC LC_PAPER \
- LC_TELEPHONE LC_TIME
-do
- if (set +x; test -z "`(eval $as_var=C; export $as_var) 2>&1`"); then
- eval $as_var=C; export $as_var
- else
- $as_unset $as_var
- fi
-done
-
-# Required to use basename.
-if expr a : '\(a\)' >/dev/null 2>&1; then
- as_expr=expr
-else
- as_expr=false
-fi
-
-if (basename /) >/dev/null 2>&1 && test "X`basename / 2>&1`" = "X/"; then
- as_basename=basename
-else
- as_basename=false
-fi
-
-
-# Name of the executable.
-as_me=`$as_basename "$0" ||
-$as_expr X/"$0" : '.*/\([^/][^/]*\)/*$' \| \
- X"$0" : 'X\(//\)$' \| \
- X"$0" : 'X\(/\)$' \| \
- . : '\(.\)' 2>/dev/null ||
-echo X/"$0" |
- sed '/^.*\/\([^/][^/]*\)\/*$/{ s//\1/; q; }
- /^X\/\(\/\/\)$/{ s//\1/; q; }
- /^X\/\(\/\).*/{ s//\1/; q; }
- s/.*/./; q'`
-
-
-# PATH needs CR, and LINENO needs CR and PATH.
-# Avoid depending upon Character Ranges.
-as_cr_letters='abcdefghijklmnopqrstuvwxyz'
-as_cr_LETTERS='ABCDEFGHIJKLMNOPQRSTUVWXYZ'
-as_cr_Letters=$as_cr_letters$as_cr_LETTERS
-as_cr_digits='0123456789'
-as_cr_alnum=$as_cr_Letters$as_cr_digits
-
-# The user is always right.
-if test "${PATH_SEPARATOR+set}" != set; then
- echo "#! /bin/sh" >conf$$.sh
- echo "exit 0" >>conf$$.sh
- chmod +x conf$$.sh
- if (PATH="/nonexistent;."; conf$$.sh) >/dev/null 2>&1; then
- PATH_SEPARATOR=';'
- else
- PATH_SEPARATOR=:
- fi
- rm -f conf$$.sh
-fi
-
-
- as_lineno_1=$LINENO
- as_lineno_2=$LINENO
- as_lineno_3=`(expr $as_lineno_1 + 1) 2>/dev/null`
- test "x$as_lineno_1" != "x$as_lineno_2" &&
- test "x$as_lineno_3" = "x$as_lineno_2" || {
- # Find who we are. Look in the path if we contain no path at all
- # relative or not.
- case $0 in
- *[\\/]* ) as_myself=$0 ;;
- *) as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
-for as_dir in $PATH
-do
- IFS=$as_save_IFS
- test -z "$as_dir" && as_dir=.
- test -r "$as_dir/$0" && as_myself=$as_dir/$0 && break
-done
-
- ;;
- esac
- # We did not find ourselves, most probably we were run as `sh COMMAND'
- # in which case we are not to be found in the path.
- if test "x$as_myself" = x; then
- as_myself=$0
- fi
- if test ! -f "$as_myself"; then
- { { echo "$as_me:$LINENO: error: cannot find myself; rerun with an absolute path" >&5
-echo "$as_me: error: cannot find myself; rerun with an absolute path" >&2;}
- { (exit 1); exit 1; }; }
- fi
- case $CONFIG_SHELL in
- '')
- as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
-for as_dir in /bin$PATH_SEPARATOR/usr/bin$PATH_SEPARATOR$PATH
-do
- IFS=$as_save_IFS
- test -z "$as_dir" && as_dir=.
- for as_base in sh bash ksh sh5; do
- case $as_dir in
- /*)
- if ("$as_dir/$as_base" -c '
- as_lineno_1=$LINENO
- as_lineno_2=$LINENO
- as_lineno_3=`(expr $as_lineno_1 + 1) 2>/dev/null`
- test "x$as_lineno_1" != "x$as_lineno_2" &&
- test "x$as_lineno_3" = "x$as_lineno_2" ') 2>/dev/null; then
- $as_unset BASH_ENV || test "${BASH_ENV+set}" != set || { BASH_ENV=; export BASH_ENV; }
- $as_unset ENV || test "${ENV+set}" != set || { ENV=; export ENV; }
- CONFIG_SHELL=$as_dir/$as_base
- export CONFIG_SHELL
- exec "$CONFIG_SHELL" "$0" ${1+"$@"}
- fi;;
- esac
- done
-done
-;;
- esac
-
- # Create $as_me.lineno as a copy of $as_myself, but with $LINENO
- # uniformly replaced by the line number. The first 'sed' inserts a
- # line-number line before each line; the second 'sed' does the real
- # work. The second script uses 'N' to pair each line-number line
- # with the numbered line, and appends trailing '-' during
- # substitution so that $LINENO is not a special case at line end.
- # (Raja R Harinath suggested sed '=', and Paul Eggert wrote the
- # second 'sed' script. Blame Lee E. McMahon for sed's syntax. :-)
- sed '=' <$as_myself |
- sed '
- N
- s,$,-,
- : loop
- s,^\(['$as_cr_digits']*\)\(.*\)[$]LINENO\([^'$as_cr_alnum'_]\),\1\2\1\3,
- t loop
- s,-$,,
- s,^['$as_cr_digits']*\n,,
- ' >$as_me.lineno &&
- chmod +x $as_me.lineno ||
- { { echo "$as_me:$LINENO: error: cannot create $as_me.lineno; rerun with a POSIX shell" >&5
-echo "$as_me: error: cannot create $as_me.lineno; rerun with a POSIX shell" >&2;}
- { (exit 1); exit 1; }; }
-
- # Don't try to exec as it changes $[0], causing all sort of problems
- # (the dirname of $[0] is not the place where we might find the
- # original and so on. Autoconf is especially sensible to this).
- . ./$as_me.lineno
- # Exit status is that of the last command.
- exit
-}
-
-
-case `echo "testing\c"; echo 1,2,3`,`echo -n testing; echo 1,2,3` in
- *c*,-n*) ECHO_N= ECHO_C='
-' ECHO_T=' ' ;;
- *c*,* ) ECHO_N=-n ECHO_C= ECHO_T= ;;
- *) ECHO_N= ECHO_C='\c' ECHO_T= ;;
-esac
-
-if expr a : '\(a\)' >/dev/null 2>&1; then
- as_expr=expr
-else
- as_expr=false
-fi
-
-rm -f conf$$ conf$$.exe conf$$.file
-echo >conf$$.file
-if ln -s conf$$.file conf$$ 2>/dev/null; then
- # We could just check for DJGPP; but this test a) works b) is more generic
- # and c) will remain valid once DJGPP supports symlinks (DJGPP 2.04).
- if test -f conf$$.exe; then
- # Don't use ln at all; we don't have any links
- as_ln_s='cp -p'
- else
- as_ln_s='ln -s'
- fi
-elif ln conf$$.file conf$$ 2>/dev/null; then
- as_ln_s=ln
-else
- as_ln_s='cp -p'
-fi
-rm -f conf$$ conf$$.exe conf$$.file
-
-if mkdir -p . 2>/dev/null; then
- as_mkdir_p=:
-else
- test -d ./-p && rmdir ./-p
- as_mkdir_p=false
-fi
-
-as_executable_p="test -f"
-
-# Sed expression to map a string onto a valid CPP name.
-as_tr_cpp="eval sed 'y%*$as_cr_letters%P$as_cr_LETTERS%;s%[^_$as_cr_alnum]%_%g'"
-
-# Sed expression to map a string onto a valid variable name.
-as_tr_sh="eval sed 'y%*+%pp%;s%[^_$as_cr_alnum]%_%g'"
-
-
-# IFS
-# We need space, tab and new line, in precisely that order.
-as_nl='
-'
-IFS=" $as_nl"
-
-# CDPATH.
-$as_unset CDPATH
-
-exec 6>&1
-
-# Open the log real soon, to keep \$[0] and so on meaningful, and to
-# report actual input values of CONFIG_FILES etc. instead of their
-# values after options handling. Logging --version etc. is OK.
-exec 5>>config.log
-{
- echo
- sed 'h;s/./-/g;s/^.../## /;s/...$/ ##/;p;x;p;x' <<_ASBOX
-## Running $as_me. ##
-_ASBOX
-} >&5
-cat >&5 <<_CSEOF
-
-This file was extended by $as_me, which was
-generated by GNU Autoconf 2.59. Invocation command line was
-
- CONFIG_FILES = $CONFIG_FILES
- CONFIG_HEADERS = $CONFIG_HEADERS
- CONFIG_LINKS = $CONFIG_LINKS
- CONFIG_COMMANDS = $CONFIG_COMMANDS
- $ $0 $@
-
-_CSEOF
-echo "on `(hostname || uname -n) 2>/dev/null | sed 1q`" >&5
-echo >&5
-_ACEOF
-
-# Files that config.status was made for.
-if test -n "$ac_config_files"; then
- echo "config_files=\"$ac_config_files\"" >>$CONFIG_STATUS
-fi
-
-if test -n "$ac_config_headers"; then
- echo "config_headers=\"$ac_config_headers\"" >>$CONFIG_STATUS
-fi
-
-if test -n "$ac_config_links"; then
- echo "config_links=\"$ac_config_links\"" >>$CONFIG_STATUS
-fi
-
-if test -n "$ac_config_commands"; then
- echo "config_commands=\"$ac_config_commands\"" >>$CONFIG_STATUS
-fi
-
-cat >>$CONFIG_STATUS <<\_ACEOF
-
-ac_cs_usage="\
-\`$as_me' instantiates files from templates according to the
-current configuration.
-
-Usage: $0 [OPTIONS] [FILE]...
-
- -h, --help print this help, then exit
- -V, --version print version number, then exit
- -q, --quiet do not print progress messages
- -d, --debug don't remove temporary files
- --recheck update $as_me by reconfiguring in the same conditions
- --file=FILE[:TEMPLATE]
- instantiate the configuration file FILE
- --header=FILE[:TEMPLATE]
- instantiate the configuration header FILE
-
-Configuration files:
-$config_files
-
-Configuration headers:
-$config_headers
-
-Configuration commands:
-$config_commands
-
-Report bugs to <bug-autoconf@gnu.org>."
-_ACEOF
-
-cat >>$CONFIG_STATUS <<_ACEOF
-ac_cs_version="\\
-config.status
-configured by $0, generated by GNU Autoconf 2.59,
- with options \\"`echo "$ac_configure_args" | sed 's/[\\""\`\$]/\\\\&/g'`\\"
-
-Copyright (C) 2003 Free Software Foundation, Inc.
-This config.status script is free software; the Free Software Foundation
-gives unlimited permission to copy, distribute and modify it."
-srcdir=$srcdir
-INSTALL="$INSTALL"
-_ACEOF
-
-cat >>$CONFIG_STATUS <<\_ACEOF
-# If no file are specified by the user, then we need to provide default
-# value. By we need to know if files were specified by the user.
-ac_need_defaults=:
-while test $# != 0
-do
- case $1 in
- --*=*)
- ac_option=`expr "x$1" : 'x\([^=]*\)='`
- ac_optarg=`expr "x$1" : 'x[^=]*=\(.*\)'`
- ac_shift=:
- ;;
- -*)
- ac_option=$1
- ac_optarg=$2
- ac_shift=shift
- ;;
- *) # This is not an option, so the user has probably given explicit
- # arguments.
- ac_option=$1
- ac_need_defaults=false;;
- esac
-
- case $ac_option in
- # Handling of the options.
-_ACEOF
-cat >>$CONFIG_STATUS <<\_ACEOF
- -recheck | --recheck | --rechec | --reche | --rech | --rec | --re | --r)
- ac_cs_recheck=: ;;
- --version | --vers* | -V )
- echo "$ac_cs_version"; exit 0 ;;
- --he | --h)
- # Conflict between --help and --header
- { { echo "$as_me:$LINENO: error: ambiguous option: $1
-Try \`$0 --help' for more information." >&5
-echo "$as_me: error: ambiguous option: $1
-Try \`$0 --help' for more information." >&2;}
- { (exit 1); exit 1; }; };;
- --help | --hel | -h )
- echo "$ac_cs_usage"; exit 0 ;;
- --debug | --d* | -d )
- debug=: ;;
- --file | --fil | --fi | --f )
- $ac_shift
- CONFIG_FILES="$CONFIG_FILES $ac_optarg"
- ac_need_defaults=false;;
- --header | --heade | --head | --hea )
- $ac_shift
- CONFIG_HEADERS="$CONFIG_HEADERS $ac_optarg"
- ac_need_defaults=false;;
- -q | -quiet | --quiet | --quie | --qui | --qu | --q \
- | -silent | --silent | --silen | --sile | --sil | --si | --s)
- ac_cs_silent=: ;;
-
- # This is an error.
- -*) { { echo "$as_me:$LINENO: error: unrecognized option: $1
-Try \`$0 --help' for more information." >&5
-echo "$as_me: error: unrecognized option: $1
-Try \`$0 --help' for more information." >&2;}
- { (exit 1); exit 1; }; } ;;
-
- *) ac_config_targets="$ac_config_targets $1" ;;
-
- esac
- shift
-done
-
-ac_configure_extra_args=
-
-if $ac_cs_silent; then
- exec 6>/dev/null
- ac_configure_extra_args="$ac_configure_extra_args --silent"
-fi
-
-_ACEOF
-cat >>$CONFIG_STATUS <<_ACEOF
-if \$ac_cs_recheck; then
- echo "running $SHELL $0 " $ac_configure_args \$ac_configure_extra_args " --no-create --no-recursion" >&6
- exec $SHELL $0 $ac_configure_args \$ac_configure_extra_args --no-create --no-recursion
-fi
-
-_ACEOF
-
-cat >>$CONFIG_STATUS <<_ACEOF
-#
-# INIT-COMMANDS section.
-#
-
-AMDEP_TRUE="$AMDEP_TRUE" ac_aux_dir="$ac_aux_dir"
-
-
-# The HP-UX ksh and POSIX shell print the target directory to stdout
-# if CDPATH is set.
-(unset CDPATH) >/dev/null 2>&1 && unset CDPATH
-
-sed_quote_subst='$sed_quote_subst'
-double_quote_subst='$double_quote_subst'
-delay_variable_subst='$delay_variable_subst'
-macro_version='`$ECHO "X$macro_version" | $Xsed -e "$delay_single_quote_subst"`'
-macro_revision='`$ECHO "X$macro_revision" | $Xsed -e "$delay_single_quote_subst"`'
-enable_shared='`$ECHO "X$enable_shared" | $Xsed -e "$delay_single_quote_subst"`'
-enable_static='`$ECHO "X$enable_static" | $Xsed -e "$delay_single_quote_subst"`'
-pic_mode='`$ECHO "X$pic_mode" | $Xsed -e "$delay_single_quote_subst"`'
-enable_fast_install='`$ECHO "X$enable_fast_install" | $Xsed -e "$delay_single_quote_subst"`'
-host_alias='`$ECHO "X$host_alias" | $Xsed -e "$delay_single_quote_subst"`'
-host='`$ECHO "X$host" | $Xsed -e "$delay_single_quote_subst"`'
-host_os='`$ECHO "X$host_os" | $Xsed -e "$delay_single_quote_subst"`'
-build_alias='`$ECHO "X$build_alias" | $Xsed -e "$delay_single_quote_subst"`'
-build='`$ECHO "X$build" | $Xsed -e "$delay_single_quote_subst"`'
-build_os='`$ECHO "X$build_os" | $Xsed -e "$delay_single_quote_subst"`'
-SED='`$ECHO "X$SED" | $Xsed -e "$delay_single_quote_subst"`'
-Xsed='`$ECHO "X$Xsed" | $Xsed -e "$delay_single_quote_subst"`'
-GREP='`$ECHO "X$GREP" | $Xsed -e "$delay_single_quote_subst"`'
-EGREP='`$ECHO "X$EGREP" | $Xsed -e "$delay_single_quote_subst"`'
-FGREP='`$ECHO "X$FGREP" | $Xsed -e "$delay_single_quote_subst"`'
-LD='`$ECHO "X$LD" | $Xsed -e "$delay_single_quote_subst"`'
-NM='`$ECHO "X$NM" | $Xsed -e "$delay_single_quote_subst"`'
-LN_S='`$ECHO "X$LN_S" | $Xsed -e "$delay_single_quote_subst"`'
-max_cmd_len='`$ECHO "X$max_cmd_len" | $Xsed -e "$delay_single_quote_subst"`'
-ac_objext='`$ECHO "X$ac_objext" | $Xsed -e "$delay_single_quote_subst"`'
-exeext='`$ECHO "X$exeext" | $Xsed -e "$delay_single_quote_subst"`'
-lt_unset='`$ECHO "X$lt_unset" | $Xsed -e "$delay_single_quote_subst"`'
-lt_SP2NL='`$ECHO "X$lt_SP2NL" | $Xsed -e "$delay_single_quote_subst"`'
-lt_NL2SP='`$ECHO "X$lt_NL2SP" | $Xsed -e "$delay_single_quote_subst"`'
-reload_flag='`$ECHO "X$reload_flag" | $Xsed -e "$delay_single_quote_subst"`'
-reload_cmds='`$ECHO "X$reload_cmds" | $Xsed -e "$delay_single_quote_subst"`'
-deplibs_check_method='`$ECHO "X$deplibs_check_method" | $Xsed -e "$delay_single_quote_subst"`'
-file_magic_cmd='`$ECHO "X$file_magic_cmd" | $Xsed -e "$delay_single_quote_subst"`'
-AR='`$ECHO "X$AR" | $Xsed -e "$delay_single_quote_subst"`'
-AR_FLAGS='`$ECHO "X$AR_FLAGS" | $Xsed -e "$delay_single_quote_subst"`'
-STRIP='`$ECHO "X$STRIP" | $Xsed -e "$delay_single_quote_subst"`'
-RANLIB='`$ECHO "X$RANLIB" | $Xsed -e "$delay_single_quote_subst"`'
-old_postinstall_cmds='`$ECHO "X$old_postinstall_cmds" | $Xsed -e "$delay_single_quote_subst"`'
-old_postuninstall_cmds='`$ECHO "X$old_postuninstall_cmds" | $Xsed -e "$delay_single_quote_subst"`'
-old_archive_cmds='`$ECHO "X$old_archive_cmds" | $Xsed -e "$delay_single_quote_subst"`'
-CC='`$ECHO "X$CC" | $Xsed -e "$delay_single_quote_subst"`'
-CFLAGS='`$ECHO "X$CFLAGS" | $Xsed -e "$delay_single_quote_subst"`'
-compiler='`$ECHO "X$compiler" | $Xsed -e "$delay_single_quote_subst"`'
-GCC='`$ECHO "X$GCC" | $Xsed -e "$delay_single_quote_subst"`'
-lt_cv_sys_global_symbol_pipe='`$ECHO "X$lt_cv_sys_global_symbol_pipe" | $Xsed -e "$delay_single_quote_subst"`'
-lt_cv_sys_global_symbol_to_cdecl='`$ECHO "X$lt_cv_sys_global_symbol_to_cdecl" | $Xsed -e "$delay_single_quote_subst"`'
-lt_cv_sys_global_symbol_to_c_name_address='`$ECHO "X$lt_cv_sys_global_symbol_to_c_name_address" | $Xsed -e "$delay_single_quote_subst"`'
-objdir='`$ECHO "X$objdir" | $Xsed -e "$delay_single_quote_subst"`'
-SHELL='`$ECHO "X$SHELL" | $Xsed -e "$delay_single_quote_subst"`'
-ECHO='`$ECHO "X$ECHO" | $Xsed -e "$delay_single_quote_subst"`'
-MAGIC_CMD='`$ECHO "X$MAGIC_CMD" | $Xsed -e "$delay_single_quote_subst"`'
-lt_prog_compiler_no_builtin_flag='`$ECHO "X$lt_prog_compiler_no_builtin_flag" | $Xsed -e "$delay_single_quote_subst"`'
-lt_prog_compiler_wl='`$ECHO "X$lt_prog_compiler_wl" | $Xsed -e "$delay_single_quote_subst"`'
-lt_prog_compiler_pic='`$ECHO "X$lt_prog_compiler_pic" | $Xsed -e "$delay_single_quote_subst"`'
-lt_prog_compiler_static='`$ECHO "X$lt_prog_compiler_static" | $Xsed -e "$delay_single_quote_subst"`'
-lt_cv_prog_compiler_c_o='`$ECHO "X$lt_cv_prog_compiler_c_o" | $Xsed -e "$delay_single_quote_subst"`'
-need_locks='`$ECHO "X$need_locks" | $Xsed -e "$delay_single_quote_subst"`'
-libext='`$ECHO "X$libext" | $Xsed -e "$delay_single_quote_subst"`'
-shrext_cmds='`$ECHO "X$shrext_cmds" | $Xsed -e "$delay_single_quote_subst"`'
-extract_expsyms_cmds='`$ECHO "X$extract_expsyms_cmds" | $Xsed -e "$delay_single_quote_subst"`'
-archive_cmds_need_lc='`$ECHO "X$archive_cmds_need_lc" | $Xsed -e "$delay_single_quote_subst"`'
-enable_shared_with_static_runtimes='`$ECHO "X$enable_shared_with_static_runtimes" | $Xsed -e "$delay_single_quote_subst"`'
-export_dynamic_flag_spec='`$ECHO "X$export_dynamic_flag_spec" | $Xsed -e "$delay_single_quote_subst"`'
-whole_archive_flag_spec='`$ECHO "X$whole_archive_flag_spec" | $Xsed -e "$delay_single_quote_subst"`'
-compiler_needs_object='`$ECHO "X$compiler_needs_object" | $Xsed -e "$delay_single_quote_subst"`'
-old_archive_from_new_cmds='`$ECHO "X$old_archive_from_new_cmds" | $Xsed -e "$delay_single_quote_subst"`'
-old_archive_from_expsyms_cmds='`$ECHO "X$old_archive_from_expsyms_cmds" | $Xsed -e "$delay_single_quote_subst"`'
-archive_cmds='`$ECHO "X$archive_cmds" | $Xsed -e "$delay_single_quote_subst"`'
-archive_expsym_cmds='`$ECHO "X$archive_expsym_cmds" | $Xsed -e "$delay_single_quote_subst"`'
-module_cmds='`$ECHO "X$module_cmds" | $Xsed -e "$delay_single_quote_subst"`'
-module_expsym_cmds='`$ECHO "X$module_expsym_cmds" | $Xsed -e "$delay_single_quote_subst"`'
-with_gnu_ld='`$ECHO "X$with_gnu_ld" | $Xsed -e "$delay_single_quote_subst"`'
-allow_undefined_flag='`$ECHO "X$allow_undefined_flag" | $Xsed -e "$delay_single_quote_subst"`'
-no_undefined_flag='`$ECHO "X$no_undefined_flag" | $Xsed -e "$delay_single_quote_subst"`'
-hardcode_libdir_flag_spec='`$ECHO "X$hardcode_libdir_flag_spec" | $Xsed -e "$delay_single_quote_subst"`'
-hardcode_libdir_flag_spec_ld='`$ECHO "X$hardcode_libdir_flag_spec_ld" | $Xsed -e "$delay_single_quote_subst"`'
-hardcode_libdir_separator='`$ECHO "X$hardcode_libdir_separator" | $Xsed -e "$delay_single_quote_subst"`'
-hardcode_direct='`$ECHO "X$hardcode_direct" | $Xsed -e "$delay_single_quote_subst"`'
-hardcode_direct_absolute='`$ECHO "X$hardcode_direct_absolute" | $Xsed -e "$delay_single_quote_subst"`'
-hardcode_minus_L='`$ECHO "X$hardcode_minus_L" | $Xsed -e "$delay_single_quote_subst"`'
-hardcode_shlibpath_var='`$ECHO "X$hardcode_shlibpath_var" | $Xsed -e "$delay_single_quote_subst"`'
-hardcode_automatic='`$ECHO "X$hardcode_automatic" | $Xsed -e "$delay_single_quote_subst"`'
-inherit_rpath='`$ECHO "X$inherit_rpath" | $Xsed -e "$delay_single_quote_subst"`'
-link_all_deplibs='`$ECHO "X$link_all_deplibs" | $Xsed -e "$delay_single_quote_subst"`'
-fix_srcfile_path='`$ECHO "X$fix_srcfile_path" | $Xsed -e "$delay_single_quote_subst"`'
-always_export_symbols='`$ECHO "X$always_export_symbols" | $Xsed -e "$delay_single_quote_subst"`'
-export_symbols_cmds='`$ECHO "X$export_symbols_cmds" | $Xsed -e "$delay_single_quote_subst"`'
-exclude_expsyms='`$ECHO "X$exclude_expsyms" | $Xsed -e "$delay_single_quote_subst"`'
-include_expsyms='`$ECHO "X$include_expsyms" | $Xsed -e "$delay_single_quote_subst"`'
-prelink_cmds='`$ECHO "X$prelink_cmds" | $Xsed -e "$delay_single_quote_subst"`'
-file_list_spec='`$ECHO "X$file_list_spec" | $Xsed -e "$delay_single_quote_subst"`'
-variables_saved_for_relink='`$ECHO "X$variables_saved_for_relink" | $Xsed -e "$delay_single_quote_subst"`'
-need_lib_prefix='`$ECHO "X$need_lib_prefix" | $Xsed -e "$delay_single_quote_subst"`'
-need_version='`$ECHO "X$need_version" | $Xsed -e "$delay_single_quote_subst"`'
-version_type='`$ECHO "X$version_type" | $Xsed -e "$delay_single_quote_subst"`'
-runpath_var='`$ECHO "X$runpath_var" | $Xsed -e "$delay_single_quote_subst"`'
-shlibpath_var='`$ECHO "X$shlibpath_var" | $Xsed -e "$delay_single_quote_subst"`'
-shlibpath_overrides_runpath='`$ECHO "X$shlibpath_overrides_runpath" | $Xsed -e "$delay_single_quote_subst"`'
-libname_spec='`$ECHO "X$libname_spec" | $Xsed -e "$delay_single_quote_subst"`'
-library_names_spec='`$ECHO "X$library_names_spec" | $Xsed -e "$delay_single_quote_subst"`'
-soname_spec='`$ECHO "X$soname_spec" | $Xsed -e "$delay_single_quote_subst"`'
-postinstall_cmds='`$ECHO "X$postinstall_cmds" | $Xsed -e "$delay_single_quote_subst"`'
-postuninstall_cmds='`$ECHO "X$postuninstall_cmds" | $Xsed -e "$delay_single_quote_subst"`'
-finish_cmds='`$ECHO "X$finish_cmds" | $Xsed -e "$delay_single_quote_subst"`'
-finish_eval='`$ECHO "X$finish_eval" | $Xsed -e "$delay_single_quote_subst"`'
-hardcode_into_libs='`$ECHO "X$hardcode_into_libs" | $Xsed -e "$delay_single_quote_subst"`'
-sys_lib_search_path_spec='`$ECHO "X$sys_lib_search_path_spec" | $Xsed -e "$delay_single_quote_subst"`'
-sys_lib_dlsearch_path_spec='`$ECHO "X$sys_lib_dlsearch_path_spec" | $Xsed -e "$delay_single_quote_subst"`'
-hardcode_action='`$ECHO "X$hardcode_action" | $Xsed -e "$delay_single_quote_subst"`'
-enable_dlopen='`$ECHO "X$enable_dlopen" | $Xsed -e "$delay_single_quote_subst"`'
-enable_dlopen_self='`$ECHO "X$enable_dlopen_self" | $Xsed -e "$delay_single_quote_subst"`'
-enable_dlopen_self_static='`$ECHO "X$enable_dlopen_self_static" | $Xsed -e "$delay_single_quote_subst"`'
-old_striplib='`$ECHO "X$old_striplib" | $Xsed -e "$delay_single_quote_subst"`'
-striplib='`$ECHO "X$striplib" | $Xsed -e "$delay_single_quote_subst"`'
-
-LTCC='$LTCC'
-LTCFLAGS='$LTCFLAGS'
-compiler='$compiler_DEFAULT'
-
-# Quote evaled strings.
-for var in SED \
-GREP \
-EGREP \
-FGREP \
-LD \
-NM \
-LN_S \
-lt_SP2NL \
-lt_NL2SP \
-reload_flag \
-deplibs_check_method \
-file_magic_cmd \
-AR \
-AR_FLAGS \
-STRIP \
-RANLIB \
-CC \
-CFLAGS \
-compiler \
-lt_cv_sys_global_symbol_pipe \
-lt_cv_sys_global_symbol_to_cdecl \
-lt_cv_sys_global_symbol_to_c_name_address \
-SHELL \
-ECHO \
-lt_prog_compiler_no_builtin_flag \
-lt_prog_compiler_wl \
-lt_prog_compiler_pic \
-lt_prog_compiler_static \
-lt_cv_prog_compiler_c_o \
-need_locks \
-shrext_cmds \
-export_dynamic_flag_spec \
-whole_archive_flag_spec \
-compiler_needs_object \
-with_gnu_ld \
-allow_undefined_flag \
-no_undefined_flag \
-hardcode_libdir_flag_spec \
-hardcode_libdir_flag_spec_ld \
-hardcode_libdir_separator \
-fix_srcfile_path \
-exclude_expsyms \
-include_expsyms \
-file_list_spec \
-variables_saved_for_relink \
-libname_spec \
-library_names_spec \
-soname_spec \
-finish_eval \
-old_striplib \
-striplib; do
- case \`eval \\\\\$ECHO "X\\\\\$\$var"\` in
- *[\\\\\\\`\\"\\\$]*)
- eval "lt_\$var=\\\\\\"\\\`\\\$ECHO \\"X\\\$\$var\\" | \\\$Xsed -e \\"\\\$sed_quote_subst\\"\\\`\\\\\\""
- ;;
- *)
- eval "lt_\$var=\\\\\\"\\\$\$var\\\\\\""
- ;;
- esac
-done
-
-# Double-quote double-evaled strings.
-for var in reload_cmds \
-old_postinstall_cmds \
-old_postuninstall_cmds \
-old_archive_cmds \
-extract_expsyms_cmds \
-old_archive_from_new_cmds \
-old_archive_from_expsyms_cmds \
-archive_cmds \
-archive_expsym_cmds \
-module_cmds \
-module_expsym_cmds \
-export_symbols_cmds \
-prelink_cmds \
-postinstall_cmds \
-postuninstall_cmds \
-finish_cmds \
-sys_lib_search_path_spec \
-sys_lib_dlsearch_path_spec; do
- case \`eval \\\\\$ECHO "X\\\\\$\$var"\` in
- *[\\\\\\\`\\"\\\$]*)
- eval "lt_\$var=\\\\\\"\\\`\\\$ECHO \\"X\\\$\$var\\" | \\\$Xsed -e \\"\\\$double_quote_subst\\" -e \\"\\\$sed_quote_subst\\" -e \\"\\\$delay_variable_subst\\"\\\`\\\\\\""
- ;;
- *)
- eval "lt_\$var=\\\\\\"\\\$\$var\\\\\\""
- ;;
- esac
-done
-
-# Fix-up fallback echo if it was mangled by the above quoting rules.
-case \$lt_ECHO in
-*'\\\$0 --fallback-echo"') lt_ECHO=\`\$ECHO "X\$lt_ECHO" | \$Xsed -e 's/\\\\\\\\\\\\\\\$0 --fallback-echo"\$/\$0 --fallback-echo"/'\`
- ;;
-esac
-
-ac_aux_dir='$ac_aux_dir'
-xsi_shell='$xsi_shell'
-lt_shell_append='$lt_shell_append'
-
-# See if we are running on zsh, and set the options which allow our
-# commands through without removal of \ escapes INIT.
-if test -n "\${ZSH_VERSION+set}" ; then
- setopt NO_GLOB_SUBST
-fi
-
-
- PACKAGE='$PACKAGE'
- VERSION='$VERSION'
- TIMESTAMP='$TIMESTAMP'
- RM='$RM'
- ofile='$ofile'
-
-
-
-# Capture the value of obsolete ALL_LINGUAS because we need it to compute
- # POFILES, GMOFILES, UPDATEPOFILES, DUMMYPOFILES, CATALOGS. But hide it
- # from automake.
- eval 'OBSOLETE_ALL_LINGUAS''="$ALL_LINGUAS"'
- # Capture the value of LINGUAS because we need it to compute CATALOGS.
- LINGUAS="${LINGUAS-%UNSET%}"
-
-
-_ACEOF
-
-
-
-cat >>$CONFIG_STATUS <<\_ACEOF
-for ac_config_target in $ac_config_targets
-do
- case "$ac_config_target" in
- # Handling of arguments.
- "Makefile" ) CONFIG_FILES="$CONFIG_FILES Makefile" ;;
- "po/Makefile.in" ) CONFIG_FILES="$CONFIG_FILES po/Makefile.in:po/Make-in" ;;
- "depfiles" ) CONFIG_COMMANDS="$CONFIG_COMMANDS depfiles" ;;
- "libtool" ) CONFIG_COMMANDS="$CONFIG_COMMANDS libtool" ;;
- "default-1" ) CONFIG_COMMANDS="$CONFIG_COMMANDS default-1" ;;
- "config.h" ) CONFIG_HEADERS="$CONFIG_HEADERS config.h:config.in" ;;
- *) { { echo "$as_me:$LINENO: error: invalid argument: $ac_config_target" >&5
-echo "$as_me: error: invalid argument: $ac_config_target" >&2;}
- { (exit 1); exit 1; }; };;
- esac
-done
-
-# If the user did not use the arguments to specify the items to instantiate,
-# then the envvar interface is used. Set only those that are not.
-# We use the long form for the default assignment because of an extremely
-# bizarre bug on SunOS 4.1.3.
-if $ac_need_defaults; then
- test "${CONFIG_FILES+set}" = set || CONFIG_FILES=$config_files
- test "${CONFIG_HEADERS+set}" = set || CONFIG_HEADERS=$config_headers
- test "${CONFIG_COMMANDS+set}" = set || CONFIG_COMMANDS=$config_commands
-fi
-
-# Have a temporary directory for convenience. Make it in the build tree
-# simply because there is no reason to put it here, and in addition,
-# creating and moving files from /tmp can sometimes cause problems.
-# Create a temporary directory, and hook for its removal unless debugging.
-$debug ||
-{
- trap 'exit_status=$?; rm -rf $tmp && exit $exit_status' 0
- trap '{ (exit 1); exit 1; }' 1 2 13 15
-}
-
-# Create a (secure) tmp directory for tmp files.
-
-{
- tmp=`(umask 077 && mktemp -d -q "./confstatXXXXXX") 2>/dev/null` &&
- test -n "$tmp" && test -d "$tmp"
-} ||
-{
- tmp=./confstat$$-$RANDOM
- (umask 077 && mkdir $tmp)
-} ||
-{
- echo "$me: cannot create a temporary directory in ." >&2
- { (exit 1); exit 1; }
-}
-
-_ACEOF
-
-cat >>$CONFIG_STATUS <<_ACEOF
-
-#
-# CONFIG_FILES section.
-#
-
-# No need to generate the scripts if there are no CONFIG_FILES.
-# This happens for instance when ./config.status config.h
-if test -n "\$CONFIG_FILES"; then
- # Protect against being on the right side of a sed subst in config.status.
- sed 's/,@/@@/; s/@,/@@/; s/,;t t\$/@;t t/; /@;t t\$/s/[\\\\&,]/\\\\&/g;
- s/@@/,@/; s/@@/@,/; s/@;t t\$/,;t t/' >\$tmp/subs.sed <<\\CEOF
-s,@SHELL@,$SHELL,;t t
-s,@PATH_SEPARATOR@,$PATH_SEPARATOR,;t t
-s,@PACKAGE_NAME@,$PACKAGE_NAME,;t t
-s,@PACKAGE_TARNAME@,$PACKAGE_TARNAME,;t t
-s,@PACKAGE_VERSION@,$PACKAGE_VERSION,;t t
-s,@PACKAGE_STRING@,$PACKAGE_STRING,;t t
-s,@PACKAGE_BUGREPORT@,$PACKAGE_BUGREPORT,;t t
-s,@exec_prefix@,$exec_prefix,;t t
-s,@prefix@,$prefix,;t t
-s,@program_transform_name@,$program_transform_name,;t t
-s,@bindir@,$bindir,;t t
-s,@sbindir@,$sbindir,;t t
-s,@libexecdir@,$libexecdir,;t t
-s,@datadir@,$datadir,;t t
-s,@sysconfdir@,$sysconfdir,;t t
-s,@sharedstatedir@,$sharedstatedir,;t t
-s,@localstatedir@,$localstatedir,;t t
-s,@libdir@,$libdir,;t t
-s,@includedir@,$includedir,;t t
-s,@oldincludedir@,$oldincludedir,;t t
-s,@infodir@,$infodir,;t t
-s,@mandir@,$mandir,;t t
-s,@build_alias@,$build_alias,;t t
-s,@host_alias@,$host_alias,;t t
-s,@target_alias@,$target_alias,;t t
-s,@DEFS@,$DEFS,;t t
-s,@ECHO_C@,$ECHO_C,;t t
-s,@ECHO_N@,$ECHO_N,;t t
-s,@ECHO_T@,$ECHO_T,;t t
-s,@LIBS@,$LIBS,;t t
-s,@build@,$build,;t t
-s,@build_cpu@,$build_cpu,;t t
-s,@build_vendor@,$build_vendor,;t t
-s,@build_os@,$build_os,;t t
-s,@host@,$host,;t t
-s,@host_cpu@,$host_cpu,;t t
-s,@host_vendor@,$host_vendor,;t t
-s,@host_os@,$host_os,;t t
-s,@target@,$target,;t t
-s,@target_cpu@,$target_cpu,;t t
-s,@target_vendor@,$target_vendor,;t t
-s,@target_os@,$target_os,;t t
-s,@CC@,$CC,;t t
-s,@CFLAGS@,$CFLAGS,;t t
-s,@LDFLAGS@,$LDFLAGS,;t t
-s,@CPPFLAGS@,$CPPFLAGS,;t t
-s,@ac_ct_CC@,$ac_ct_CC,;t t
-s,@EXEEXT@,$EXEEXT,;t t
-s,@OBJEXT@,$OBJEXT,;t t
-s,@INSTALL_PROGRAM@,$INSTALL_PROGRAM,;t t
-s,@INSTALL_SCRIPT@,$INSTALL_SCRIPT,;t t
-s,@INSTALL_DATA@,$INSTALL_DATA,;t t
-s,@CYGPATH_W@,$CYGPATH_W,;t t
-s,@PACKAGE@,$PACKAGE,;t t
-s,@VERSION@,$VERSION,;t t
-s,@ACLOCAL@,$ACLOCAL,;t t
-s,@AUTOCONF@,$AUTOCONF,;t t
-s,@AUTOMAKE@,$AUTOMAKE,;t t
-s,@AUTOHEADER@,$AUTOHEADER,;t t
-s,@MAKEINFO@,$MAKEINFO,;t t
-s,@install_sh@,$install_sh,;t t
-s,@STRIP@,$STRIP,;t t
-s,@ac_ct_STRIP@,$ac_ct_STRIP,;t t
-s,@INSTALL_STRIP_PROGRAM@,$INSTALL_STRIP_PROGRAM,;t t
-s,@mkdir_p@,$mkdir_p,;t t
-s,@AWK@,$AWK,;t t
-s,@SET_MAKE@,$SET_MAKE,;t t
-s,@am__leading_dot@,$am__leading_dot,;t t
-s,@AMTAR@,$AMTAR,;t t
-s,@am__tar@,$am__tar,;t t
-s,@am__untar@,$am__untar,;t t
-s,@DEPDIR@,$DEPDIR,;t t
-s,@am__include@,$am__include,;t t
-s,@am__quote@,$am__quote,;t t
-s,@AMDEP_TRUE@,$AMDEP_TRUE,;t t
-s,@AMDEP_FALSE@,$AMDEP_FALSE,;t t
-s,@AMDEPBACKSLASH@,$AMDEPBACKSLASH,;t t
-s,@CCDEPMODE@,$CCDEPMODE,;t t
-s,@am__fastdepCC_TRUE@,$am__fastdepCC_TRUE,;t t
-s,@am__fastdepCC_FALSE@,$am__fastdepCC_FALSE,;t t
-s,@LIBTOOL@,$LIBTOOL,;t t
-s,@SED@,$SED,;t t
-s,@EGREP@,$EGREP,;t t
-s,@FGREP@,$FGREP,;t t
-s,@GREP@,$GREP,;t t
-s,@LD@,$LD,;t t
-s,@DUMPBIN@,$DUMPBIN,;t t
-s,@ac_ct_DUMPBIN@,$ac_ct_DUMPBIN,;t t
-s,@NM@,$NM,;t t
-s,@LN_S@,$LN_S,;t t
-s,@AR@,$AR,;t t
-s,@ac_ct_AR@,$ac_ct_AR,;t t
-s,@RANLIB@,$RANLIB,;t t
-s,@ac_ct_RANLIB@,$ac_ct_RANLIB,;t t
-s,@lt_ECHO@,$lt_ECHO,;t t
-s,@CPP@,$CPP,;t t
-s,@use_sysroot@,$use_sysroot,;t t
-s,@TARGET_SYSTEM_ROOT@,$TARGET_SYSTEM_ROOT,;t t
-s,@TARGET_SYSTEM_ROOT_DEFINE@,$TARGET_SYSTEM_ROOT_DEFINE,;t t
-s,@WARN_CFLAGS@,$WARN_CFLAGS,;t t
-s,@NO_WERROR@,$NO_WERROR,;t t
-s,@USE_NLS@,$USE_NLS,;t t
-s,@LIBINTL@,$LIBINTL,;t t
-s,@LIBINTL_DEP@,$LIBINTL_DEP,;t t
-s,@INCINTL@,$INCINTL,;t t
-s,@XGETTEXT@,$XGETTEXT,;t t
-s,@GMSGFMT@,$GMSGFMT,;t t
-s,@POSUB@,$POSUB,;t t
-s,@CATALOGS@,$CATALOGS,;t t
-s,@DATADIRNAME@,$DATADIRNAME,;t t
-s,@INSTOBJEXT@,$INSTOBJEXT,;t t
-s,@GENCAT@,$GENCAT,;t t
-s,@CATOBJEXT@,$CATOBJEXT,;t t
-s,@MKINSTALLDIRS@,$MKINSTALLDIRS,;t t
-s,@MSGFMT@,$MSGFMT,;t t
-s,@MSGMERGE@,$MSGMERGE,;t t
-s,@YACC@,$YACC,;t t
-s,@LEX@,$LEX,;t t
-s,@LEXLIB@,$LEXLIB,;t t
-s,@LEX_OUTPUT_ROOT@,$LEX_OUTPUT_ROOT,;t t
-s,@MAINTAINER_MODE_TRUE@,$MAINTAINER_MODE_TRUE,;t t
-s,@MAINTAINER_MODE_FALSE@,$MAINTAINER_MODE_FALSE,;t t
-s,@MAINT@,$MAINT,;t t
-s,@GENINSRC_NEVER_TRUE@,$GENINSRC_NEVER_TRUE,;t t
-s,@GENINSRC_NEVER_FALSE@,$GENINSRC_NEVER_FALSE,;t t
-s,@HDEFINES@,$HDEFINES,;t t
-s,@HOSTING_CRT0@,$HOSTING_CRT0,;t t
-s,@HOSTING_LIBS@,$HOSTING_LIBS,;t t
-s,@NATIVE_LIB_DIRS@,$NATIVE_LIB_DIRS,;t t
-s,@STRINGIFY@,$STRINGIFY,;t t
-s,@EMUL@,$EMUL,;t t
-s,@EMULATION_OFILES@,$EMULATION_OFILES,;t t
-s,@EMUL_EXTRA_OFILES@,$EMUL_EXTRA_OFILES,;t t
-s,@LIB_PATH@,$LIB_PATH,;t t
-s,@EMULATION_LIBPATH@,$EMULATION_LIBPATH,;t t
-s,@TESTBFDLIB@,$TESTBFDLIB,;t t
-s,@datarootdir@,$datarootdir,;t t
-s,@docdir@,$docdir,;t t
-s,@htmldir@,$htmldir,;t t
-s,@LIBOBJS@,$LIBOBJS,;t t
-s,@LTLIBOBJS@,$LTLIBOBJS,;t t
-/@TDIRS@/r $TDIRS
-s,@TDIRS@,,;t t
-CEOF
-
-_ACEOF
-
- cat >>$CONFIG_STATUS <<\_ACEOF
- # Split the substitutions into bite-sized pieces for seds with
- # small command number limits, like on Digital OSF/1 and HP-UX.
- ac_max_sed_lines=48
- ac_sed_frag=1 # Number of current file.
- ac_beg=1 # First line for current file.
- ac_end=$ac_max_sed_lines # Line after last line for current file.
- ac_more_lines=:
- ac_sed_cmds=
- while $ac_more_lines; do
- if test $ac_beg -gt 1; then
- sed "1,${ac_beg}d; ${ac_end}q" $tmp/subs.sed >$tmp/subs.frag
- else
- sed "${ac_end}q" $tmp/subs.sed >$tmp/subs.frag
- fi
- if test ! -s $tmp/subs.frag; then
- ac_more_lines=false
- else
- # The purpose of the label and of the branching condition is to
- # speed up the sed processing (if there are no `@' at all, there
- # is no need to browse any of the substitutions).
- # These are the two extra sed commands mentioned above.
- (echo ':t
- /@[a-zA-Z_][a-zA-Z_0-9]*@/!b' && cat $tmp/subs.frag) >$tmp/subs-$ac_sed_frag.sed
- if test -z "$ac_sed_cmds"; then
- ac_sed_cmds="sed -f $tmp/subs-$ac_sed_frag.sed"
- else
- ac_sed_cmds="$ac_sed_cmds | sed -f $tmp/subs-$ac_sed_frag.sed"
- fi
- ac_sed_frag=`expr $ac_sed_frag + 1`
- ac_beg=$ac_end
- ac_end=`expr $ac_end + $ac_max_sed_lines`
- fi
- done
- if test -z "$ac_sed_cmds"; then
- ac_sed_cmds=cat
- fi
-fi # test -n "$CONFIG_FILES"
-
-_ACEOF
-cat >>$CONFIG_STATUS <<\_ACEOF
-for ac_file in : $CONFIG_FILES; do test "x$ac_file" = x: && continue
- # Support "outfile[:infile[:infile...]]", defaulting infile="outfile.in".
- case $ac_file in
- - | *:- | *:-:* ) # input from stdin
- cat >$tmp/stdin
- ac_file_in=`echo "$ac_file" | sed 's,[^:]*:,,'`
- ac_file=`echo "$ac_file" | sed 's,:.*,,'` ;;
- *:* ) ac_file_in=`echo "$ac_file" | sed 's,[^:]*:,,'`
- ac_file=`echo "$ac_file" | sed 's,:.*,,'` ;;
- * ) ac_file_in=$ac_file.in ;;
- esac
-
- # Compute @srcdir@, @top_srcdir@, and @INSTALL@ for subdirectories.
- ac_dir=`(dirname "$ac_file") 2>/dev/null ||
-$as_expr X"$ac_file" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
- X"$ac_file" : 'X\(//\)[^/]' \| \
- X"$ac_file" : 'X\(//\)$' \| \
- X"$ac_file" : 'X\(/\)' \| \
- . : '\(.\)' 2>/dev/null ||
-echo X"$ac_file" |
- sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ s//\1/; q; }
- /^X\(\/\/\)[^/].*/{ s//\1/; q; }
- /^X\(\/\/\)$/{ s//\1/; q; }
- /^X\(\/\).*/{ s//\1/; q; }
- s/.*/./; q'`
- { if $as_mkdir_p; then
- mkdir -p "$ac_dir"
- else
- as_dir="$ac_dir"
- as_dirs=
- while test ! -d "$as_dir"; do
- as_dirs="$as_dir $as_dirs"
- as_dir=`(dirname "$as_dir") 2>/dev/null ||
-$as_expr X"$as_dir" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
- X"$as_dir" : 'X\(//\)[^/]' \| \
- X"$as_dir" : 'X\(//\)$' \| \
- X"$as_dir" : 'X\(/\)' \| \
- . : '\(.\)' 2>/dev/null ||
-echo X"$as_dir" |
- sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ s//\1/; q; }
- /^X\(\/\/\)[^/].*/{ s//\1/; q; }
- /^X\(\/\/\)$/{ s//\1/; q; }
- /^X\(\/\).*/{ s//\1/; q; }
- s/.*/./; q'`
- done
- test ! -n "$as_dirs" || mkdir $as_dirs
- fi || { { echo "$as_me:$LINENO: error: cannot create directory \"$ac_dir\"" >&5
-echo "$as_me: error: cannot create directory \"$ac_dir\"" >&2;}
- { (exit 1); exit 1; }; }; }
-
- ac_builddir=.
-
-if test "$ac_dir" != .; then
- ac_dir_suffix=/`echo "$ac_dir" | sed 's,^\.[\\/],,'`
- # A "../" for each directory in $ac_dir_suffix.
- ac_top_builddir=`echo "$ac_dir_suffix" | sed 's,/[^\\/]*,../,g'`
-else
- ac_dir_suffix= ac_top_builddir=
-fi
-
-case $srcdir in
- .) # No --srcdir option. We are building in place.
- ac_srcdir=.
- if test -z "$ac_top_builddir"; then
- ac_top_srcdir=.
- else
- ac_top_srcdir=`echo $ac_top_builddir | sed 's,/$,,'`
- fi ;;
- [\\/]* | ?:[\\/]* ) # Absolute path.
- ac_srcdir=$srcdir$ac_dir_suffix;
- ac_top_srcdir=$srcdir ;;
- *) # Relative path.
- ac_srcdir=$ac_top_builddir$srcdir$ac_dir_suffix
- ac_top_srcdir=$ac_top_builddir$srcdir ;;
-esac
-
-# Do not use `cd foo && pwd` to compute absolute paths, because
-# the directories may not exist.
-case `pwd` in
-.) ac_abs_builddir="$ac_dir";;
-*)
- case "$ac_dir" in
- .) ac_abs_builddir=`pwd`;;
- [\\/]* | ?:[\\/]* ) ac_abs_builddir="$ac_dir";;
- *) ac_abs_builddir=`pwd`/"$ac_dir";;
- esac;;
-esac
-case $ac_abs_builddir in
-.) ac_abs_top_builddir=${ac_top_builddir}.;;
-*)
- case ${ac_top_builddir}. in
- .) ac_abs_top_builddir=$ac_abs_builddir;;
- [\\/]* | ?:[\\/]* ) ac_abs_top_builddir=${ac_top_builddir}.;;
- *) ac_abs_top_builddir=$ac_abs_builddir/${ac_top_builddir}.;;
- esac;;
-esac
-case $ac_abs_builddir in
-.) ac_abs_srcdir=$ac_srcdir;;
-*)
- case $ac_srcdir in
- .) ac_abs_srcdir=$ac_abs_builddir;;
- [\\/]* | ?:[\\/]* ) ac_abs_srcdir=$ac_srcdir;;
- *) ac_abs_srcdir=$ac_abs_builddir/$ac_srcdir;;
- esac;;
-esac
-case $ac_abs_builddir in
-.) ac_abs_top_srcdir=$ac_top_srcdir;;
-*)
- case $ac_top_srcdir in
- .) ac_abs_top_srcdir=$ac_abs_builddir;;
- [\\/]* | ?:[\\/]* ) ac_abs_top_srcdir=$ac_top_srcdir;;
- *) ac_abs_top_srcdir=$ac_abs_builddir/$ac_top_srcdir;;
- esac;;
-esac
-
-
- case $INSTALL in
- [\\/$]* | ?:[\\/]* ) ac_INSTALL=$INSTALL ;;
- *) ac_INSTALL=$ac_top_builddir$INSTALL ;;
- esac
-
- if test x"$ac_file" != x-; then
- { echo "$as_me:$LINENO: creating $ac_file" >&5
-echo "$as_me: creating $ac_file" >&6;}
- rm -f "$ac_file"
- fi
- # Let's still pretend it is `configure' which instantiates (i.e., don't
- # use $as_me), people would be surprised to read:
- # /* config.h. Generated by config.status. */
- if test x"$ac_file" = x-; then
- configure_input=
- else
- configure_input="$ac_file. "
- fi
- configure_input=$configure_input"Generated from `echo $ac_file_in |
- sed 's,.*/,,'` by configure."
-
- # First look for the input files in the build tree, otherwise in the
- # src tree.
- ac_file_inputs=`IFS=:
- for f in $ac_file_in; do
- case $f in
- -) echo $tmp/stdin ;;
- [\\/$]*)
- # Absolute (can't be DOS-style, as IFS=:)
- test -f "$f" || { { echo "$as_me:$LINENO: error: cannot find input file: $f" >&5
-echo "$as_me: error: cannot find input file: $f" >&2;}
- { (exit 1); exit 1; }; }
- echo "$f";;
- *) # Relative
- if test -f "$f"; then
- # Build tree
- echo "$f"
- elif test -f "$srcdir/$f"; then
- # Source tree
- echo "$srcdir/$f"
- else
- # /dev/null tree
- { { echo "$as_me:$LINENO: error: cannot find input file: $f" >&5
-echo "$as_me: error: cannot find input file: $f" >&2;}
- { (exit 1); exit 1; }; }
- fi;;
- esac
- done` || { (exit 1); exit 1; }
-_ACEOF
-cat >>$CONFIG_STATUS <<_ACEOF
- sed "$ac_vpsub
-$extrasub
-_ACEOF
-cat >>$CONFIG_STATUS <<\_ACEOF
-:t
-/@[a-zA-Z_][a-zA-Z_0-9]*@/!b
-s,@configure_input@,$configure_input,;t t
-s,@srcdir@,$ac_srcdir,;t t
-s,@abs_srcdir@,$ac_abs_srcdir,;t t
-s,@top_srcdir@,$ac_top_srcdir,;t t
-s,@abs_top_srcdir@,$ac_abs_top_srcdir,;t t
-s,@builddir@,$ac_builddir,;t t
-s,@abs_builddir@,$ac_abs_builddir,;t t
-s,@top_builddir@,$ac_top_builddir,;t t
-s,@abs_top_builddir@,$ac_abs_top_builddir,;t t
-s,@INSTALL@,$ac_INSTALL,;t t
-" $ac_file_inputs | (eval "$ac_sed_cmds") >$tmp/out
- rm -f $tmp/stdin
- if test x"$ac_file" != x-; then
- mv $tmp/out $ac_file
- else
- cat $tmp/out
- rm -f $tmp/out
- fi
-
-done
-_ACEOF
-cat >>$CONFIG_STATUS <<\_ACEOF
-
-#
-# CONFIG_HEADER section.
-#
-
-# These sed commands are passed to sed as "A NAME B NAME C VALUE D", where
-# NAME is the cpp macro being defined and VALUE is the value it is being given.
-#
-# ac_d sets the value in "#define NAME VALUE" lines.
-ac_dA='s,^\([ ]*\)#\([ ]*define[ ][ ]*\)'
-ac_dB='[ ].*$,\1#\2'
-ac_dC=' '
-ac_dD=',;t'
-# ac_u turns "#undef NAME" without trailing blanks into "#define NAME VALUE".
-ac_uA='s,^\([ ]*\)#\([ ]*\)undef\([ ][ ]*\)'
-ac_uB='$,\1#\2define\3'
-ac_uC=' '
-ac_uD=',;t'
-
-for ac_file in : $CONFIG_HEADERS; do test "x$ac_file" = x: && continue
- # Support "outfile[:infile[:infile...]]", defaulting infile="outfile.in".
- case $ac_file in
- - | *:- | *:-:* ) # input from stdin
- cat >$tmp/stdin
- ac_file_in=`echo "$ac_file" | sed 's,[^:]*:,,'`
- ac_file=`echo "$ac_file" | sed 's,:.*,,'` ;;
- *:* ) ac_file_in=`echo "$ac_file" | sed 's,[^:]*:,,'`
- ac_file=`echo "$ac_file" | sed 's,:.*,,'` ;;
- * ) ac_file_in=$ac_file.in ;;
- esac
-
- test x"$ac_file" != x- && { echo "$as_me:$LINENO: creating $ac_file" >&5
-echo "$as_me: creating $ac_file" >&6;}
-
- # First look for the input files in the build tree, otherwise in the
- # src tree.
- ac_file_inputs=`IFS=:
- for f in $ac_file_in; do
- case $f in
- -) echo $tmp/stdin ;;
- [\\/$]*)
- # Absolute (can't be DOS-style, as IFS=:)
- test -f "$f" || { { echo "$as_me:$LINENO: error: cannot find input file: $f" >&5
-echo "$as_me: error: cannot find input file: $f" >&2;}
- { (exit 1); exit 1; }; }
- # Do quote $f, to prevent DOS paths from being IFS'd.
- echo "$f";;
- *) # Relative
- if test -f "$f"; then
- # Build tree
- echo "$f"
- elif test -f "$srcdir/$f"; then
- # Source tree
- echo "$srcdir/$f"
- else
- # /dev/null tree
- { { echo "$as_me:$LINENO: error: cannot find input file: $f" >&5
-echo "$as_me: error: cannot find input file: $f" >&2;}
- { (exit 1); exit 1; }; }
- fi;;
- esac
- done` || { (exit 1); exit 1; }
- # Remove the trailing spaces.
- sed 's/[ ]*$//' $ac_file_inputs >$tmp/in
-
-_ACEOF
-
-# Transform confdefs.h into two sed scripts, `conftest.defines' and
-# `conftest.undefs', that substitutes the proper values into
-# config.h.in to produce config.h. The first handles `#define'
-# templates, and the second `#undef' templates.
-# And first: Protect against being on the right side of a sed subst in
-# config.status. Protect against being in an unquoted here document
-# in config.status.
-rm -f conftest.defines conftest.undefs
-# Using a here document instead of a string reduces the quoting nightmare.
-# Putting comments in sed scripts is not portable.
-#
-# `end' is used to avoid that the second main sed command (meant for
-# 0-ary CPP macros) applies to n-ary macro definitions.
-# See the Autoconf documentation for `clear'.
-cat >confdef2sed.sed <<\_ACEOF
-s/[\\&,]/\\&/g
-s,[\\$`],\\&,g
-t clear
-: clear
-s,^[ ]*#[ ]*define[ ][ ]*\([^ (][^ (]*\)\(([^)]*)\)[ ]*\(.*\)$,${ac_dA}\1${ac_dB}\1\2${ac_dC}\3${ac_dD},gp
-t end
-s,^[ ]*#[ ]*define[ ][ ]*\([^ ][^ ]*\)[ ]*\(.*\)$,${ac_dA}\1${ac_dB}\1${ac_dC}\2${ac_dD},gp
-: end
-_ACEOF
-# If some macros were called several times there might be several times
-# the same #defines, which is useless. Nevertheless, we may not want to
-# sort them, since we want the *last* AC-DEFINE to be honored.
-uniq confdefs.h | sed -n -f confdef2sed.sed >conftest.defines
-sed 's/ac_d/ac_u/g' conftest.defines >conftest.undefs
-rm -f confdef2sed.sed
-
-# This sed command replaces #undef with comments. This is necessary, for
-# example, in the case of _POSIX_SOURCE, which is predefined and required
-# on some systems where configure will not decide to define it.
-cat >>conftest.undefs <<\_ACEOF
-s,^[ ]*#[ ]*undef[ ][ ]*[a-zA-Z_][a-zA-Z_0-9]*,/* & */,
-_ACEOF
-
-# Break up conftest.defines because some shells have a limit on the size
-# of here documents, and old seds have small limits too (100 cmds).
-echo ' # Handle all the #define templates only if necessary.' >>$CONFIG_STATUS
-echo ' if grep "^[ ]*#[ ]*define" $tmp/in >/dev/null; then' >>$CONFIG_STATUS
-echo ' # If there are no defines, we may have an empty if/fi' >>$CONFIG_STATUS
-echo ' :' >>$CONFIG_STATUS
-rm -f conftest.tail
-while grep . conftest.defines >/dev/null
-do
- # Write a limited-size here document to $tmp/defines.sed.
- echo ' cat >$tmp/defines.sed <<CEOF' >>$CONFIG_STATUS
- # Speed up: don't consider the non `#define' lines.
- echo '/^[ ]*#[ ]*define/!b' >>$CONFIG_STATUS
- # Work around the forget-to-reset-the-flag bug.
- echo 't clr' >>$CONFIG_STATUS
- echo ': clr' >>$CONFIG_STATUS
- sed ${ac_max_here_lines}q conftest.defines >>$CONFIG_STATUS
- echo 'CEOF
- sed -f $tmp/defines.sed $tmp/in >$tmp/out
- rm -f $tmp/in
- mv $tmp/out $tmp/in
-' >>$CONFIG_STATUS
- sed 1,${ac_max_here_lines}d conftest.defines >conftest.tail
- rm -f conftest.defines
- mv conftest.tail conftest.defines
-done
-rm -f conftest.defines
-echo ' fi # grep' >>$CONFIG_STATUS
-echo >>$CONFIG_STATUS
-
-# Break up conftest.undefs because some shells have a limit on the size
-# of here documents, and old seds have small limits too (100 cmds).
-echo ' # Handle all the #undef templates' >>$CONFIG_STATUS
-rm -f conftest.tail
-while grep . conftest.undefs >/dev/null
-do
- # Write a limited-size here document to $tmp/undefs.sed.
- echo ' cat >$tmp/undefs.sed <<CEOF' >>$CONFIG_STATUS
- # Speed up: don't consider the non `#undef'
- echo '/^[ ]*#[ ]*undef/!b' >>$CONFIG_STATUS
- # Work around the forget-to-reset-the-flag bug.
- echo 't clr' >>$CONFIG_STATUS
- echo ': clr' >>$CONFIG_STATUS
- sed ${ac_max_here_lines}q conftest.undefs >>$CONFIG_STATUS
- echo 'CEOF
- sed -f $tmp/undefs.sed $tmp/in >$tmp/out
- rm -f $tmp/in
- mv $tmp/out $tmp/in
-' >>$CONFIG_STATUS
- sed 1,${ac_max_here_lines}d conftest.undefs >conftest.tail
- rm -f conftest.undefs
- mv conftest.tail conftest.undefs
-done
-rm -f conftest.undefs
-
-cat >>$CONFIG_STATUS <<\_ACEOF
- # Let's still pretend it is `configure' which instantiates (i.e., don't
- # use $as_me), people would be surprised to read:
- # /* config.h. Generated by config.status. */
- if test x"$ac_file" = x-; then
- echo "/* Generated by configure. */" >$tmp/config.h
- else
- echo "/* $ac_file. Generated by configure. */" >$tmp/config.h
- fi
- cat $tmp/in >>$tmp/config.h
- rm -f $tmp/in
- if test x"$ac_file" != x-; then
- if diff $ac_file $tmp/config.h >/dev/null 2>&1; then
- { echo "$as_me:$LINENO: $ac_file is unchanged" >&5
-echo "$as_me: $ac_file is unchanged" >&6;}
- else
- ac_dir=`(dirname "$ac_file") 2>/dev/null ||
-$as_expr X"$ac_file" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
- X"$ac_file" : 'X\(//\)[^/]' \| \
- X"$ac_file" : 'X\(//\)$' \| \
- X"$ac_file" : 'X\(/\)' \| \
- . : '\(.\)' 2>/dev/null ||
-echo X"$ac_file" |
- sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ s//\1/; q; }
- /^X\(\/\/\)[^/].*/{ s//\1/; q; }
- /^X\(\/\/\)$/{ s//\1/; q; }
- /^X\(\/\).*/{ s//\1/; q; }
- s/.*/./; q'`
- { if $as_mkdir_p; then
- mkdir -p "$ac_dir"
- else
- as_dir="$ac_dir"
- as_dirs=
- while test ! -d "$as_dir"; do
- as_dirs="$as_dir $as_dirs"
- as_dir=`(dirname "$as_dir") 2>/dev/null ||
-$as_expr X"$as_dir" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
- X"$as_dir" : 'X\(//\)[^/]' \| \
- X"$as_dir" : 'X\(//\)$' \| \
- X"$as_dir" : 'X\(/\)' \| \
- . : '\(.\)' 2>/dev/null ||
-echo X"$as_dir" |
- sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ s//\1/; q; }
- /^X\(\/\/\)[^/].*/{ s//\1/; q; }
- /^X\(\/\/\)$/{ s//\1/; q; }
- /^X\(\/\).*/{ s//\1/; q; }
- s/.*/./; q'`
- done
- test ! -n "$as_dirs" || mkdir $as_dirs
- fi || { { echo "$as_me:$LINENO: error: cannot create directory \"$ac_dir\"" >&5
-echo "$as_me: error: cannot create directory \"$ac_dir\"" >&2;}
- { (exit 1); exit 1; }; }; }
-
- rm -f $ac_file
- mv $tmp/config.h $ac_file
- fi
- else
- cat $tmp/config.h
- rm -f $tmp/config.h
- fi
-# Compute $ac_file's index in $config_headers.
-_am_stamp_count=1
-for _am_header in $config_headers :; do
- case $_am_header in
- $ac_file | $ac_file:* )
- break ;;
- * )
- _am_stamp_count=`expr $_am_stamp_count + 1` ;;
- esac
-done
-echo "timestamp for $ac_file" >`(dirname $ac_file) 2>/dev/null ||
-$as_expr X$ac_file : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
- X$ac_file : 'X\(//\)[^/]' \| \
- X$ac_file : 'X\(//\)$' \| \
- X$ac_file : 'X\(/\)' \| \
- . : '\(.\)' 2>/dev/null ||
-echo X$ac_file |
- sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ s//\1/; q; }
- /^X\(\/\/\)[^/].*/{ s//\1/; q; }
- /^X\(\/\/\)$/{ s//\1/; q; }
- /^X\(\/\).*/{ s//\1/; q; }
- s/.*/./; q'`/stamp-h$_am_stamp_count
-done
-_ACEOF
-cat >>$CONFIG_STATUS <<\_ACEOF
-
-#
-# CONFIG_COMMANDS section.
-#
-for ac_file in : $CONFIG_COMMANDS; do test "x$ac_file" = x: && continue
- ac_dest=`echo "$ac_file" | sed 's,:.*,,'`
- ac_source=`echo "$ac_file" | sed 's,[^:]*:,,'`
- ac_dir=`(dirname "$ac_dest") 2>/dev/null ||
-$as_expr X"$ac_dest" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
- X"$ac_dest" : 'X\(//\)[^/]' \| \
- X"$ac_dest" : 'X\(//\)$' \| \
- X"$ac_dest" : 'X\(/\)' \| \
- . : '\(.\)' 2>/dev/null ||
-echo X"$ac_dest" |
- sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ s//\1/; q; }
- /^X\(\/\/\)[^/].*/{ s//\1/; q; }
- /^X\(\/\/\)$/{ s//\1/; q; }
- /^X\(\/\).*/{ s//\1/; q; }
- s/.*/./; q'`
- { if $as_mkdir_p; then
- mkdir -p "$ac_dir"
- else
- as_dir="$ac_dir"
- as_dirs=
- while test ! -d "$as_dir"; do
- as_dirs="$as_dir $as_dirs"
- as_dir=`(dirname "$as_dir") 2>/dev/null ||
-$as_expr X"$as_dir" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
- X"$as_dir" : 'X\(//\)[^/]' \| \
- X"$as_dir" : 'X\(//\)$' \| \
- X"$as_dir" : 'X\(/\)' \| \
- . : '\(.\)' 2>/dev/null ||
-echo X"$as_dir" |
- sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ s//\1/; q; }
- /^X\(\/\/\)[^/].*/{ s//\1/; q; }
- /^X\(\/\/\)$/{ s//\1/; q; }
- /^X\(\/\).*/{ s//\1/; q; }
- s/.*/./; q'`
- done
- test ! -n "$as_dirs" || mkdir $as_dirs
- fi || { { echo "$as_me:$LINENO: error: cannot create directory \"$ac_dir\"" >&5
-echo "$as_me: error: cannot create directory \"$ac_dir\"" >&2;}
- { (exit 1); exit 1; }; }; }
-
- ac_builddir=.
-
-if test "$ac_dir" != .; then
- ac_dir_suffix=/`echo "$ac_dir" | sed 's,^\.[\\/],,'`
- # A "../" for each directory in $ac_dir_suffix.
- ac_top_builddir=`echo "$ac_dir_suffix" | sed 's,/[^\\/]*,../,g'`
-else
- ac_dir_suffix= ac_top_builddir=
-fi
-
-case $srcdir in
- .) # No --srcdir option. We are building in place.
- ac_srcdir=.
- if test -z "$ac_top_builddir"; then
- ac_top_srcdir=.
- else
- ac_top_srcdir=`echo $ac_top_builddir | sed 's,/$,,'`
- fi ;;
- [\\/]* | ?:[\\/]* ) # Absolute path.
- ac_srcdir=$srcdir$ac_dir_suffix;
- ac_top_srcdir=$srcdir ;;
- *) # Relative path.
- ac_srcdir=$ac_top_builddir$srcdir$ac_dir_suffix
- ac_top_srcdir=$ac_top_builddir$srcdir ;;
-esac
-
-# Do not use `cd foo && pwd` to compute absolute paths, because
-# the directories may not exist.
-case `pwd` in
-.) ac_abs_builddir="$ac_dir";;
-*)
- case "$ac_dir" in
- .) ac_abs_builddir=`pwd`;;
- [\\/]* | ?:[\\/]* ) ac_abs_builddir="$ac_dir";;
- *) ac_abs_builddir=`pwd`/"$ac_dir";;
- esac;;
-esac
-case $ac_abs_builddir in
-.) ac_abs_top_builddir=${ac_top_builddir}.;;
-*)
- case ${ac_top_builddir}. in
- .) ac_abs_top_builddir=$ac_abs_builddir;;
- [\\/]* | ?:[\\/]* ) ac_abs_top_builddir=${ac_top_builddir}.;;
- *) ac_abs_top_builddir=$ac_abs_builddir/${ac_top_builddir}.;;
- esac;;
-esac
-case $ac_abs_builddir in
-.) ac_abs_srcdir=$ac_srcdir;;
-*)
- case $ac_srcdir in
- .) ac_abs_srcdir=$ac_abs_builddir;;
- [\\/]* | ?:[\\/]* ) ac_abs_srcdir=$ac_srcdir;;
- *) ac_abs_srcdir=$ac_abs_builddir/$ac_srcdir;;
- esac;;
-esac
-case $ac_abs_builddir in
-.) ac_abs_top_srcdir=$ac_top_srcdir;;
-*)
- case $ac_top_srcdir in
- .) ac_abs_top_srcdir=$ac_abs_builddir;;
- [\\/]* | ?:[\\/]* ) ac_abs_top_srcdir=$ac_top_srcdir;;
- *) ac_abs_top_srcdir=$ac_abs_builddir/$ac_top_srcdir;;
- esac;;
-esac
-
-
- { echo "$as_me:$LINENO: executing $ac_dest commands" >&5
-echo "$as_me: executing $ac_dest commands" >&6;}
- case $ac_dest in
- depfiles ) test x"$AMDEP_TRUE" != x"" || for mf in $CONFIG_FILES; do
- # Strip MF so we end up with the name of the file.
- mf=`echo "$mf" | sed -e 's/:.*$//'`
- # Check whether this is an Automake generated Makefile or not.
- # We used to match only the files named `Makefile.in', but
- # some people rename them; so instead we look at the file content.
- # Grep'ing the first line is not enough: some people post-process
- # each Makefile.in and add a new line on top of each file to say so.
- # So let's grep whole file.
- if grep '^#.*generated by automake' $mf > /dev/null 2>&1; then
- dirpart=`(dirname "$mf") 2>/dev/null ||
-$as_expr X"$mf" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
- X"$mf" : 'X\(//\)[^/]' \| \
- X"$mf" : 'X\(//\)$' \| \
- X"$mf" : 'X\(/\)' \| \
- . : '\(.\)' 2>/dev/null ||
-echo X"$mf" |
- sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ s//\1/; q; }
- /^X\(\/\/\)[^/].*/{ s//\1/; q; }
- /^X\(\/\/\)$/{ s//\1/; q; }
- /^X\(\/\).*/{ s//\1/; q; }
- s/.*/./; q'`
- else
- continue
- fi
- # Extract the definition of DEPDIR, am__include, and am__quote
- # from the Makefile without running `make'.
- DEPDIR=`sed -n 's/^DEPDIR = //p' < "$mf"`
- test -z "$DEPDIR" && continue
- am__include=`sed -n 's/^am__include = //p' < "$mf"`
- test -z "am__include" && continue
- am__quote=`sed -n 's/^am__quote = //p' < "$mf"`
- # When using ansi2knr, U may be empty or an underscore; expand it
- U=`sed -n 's/^U = //p' < "$mf"`
- # Find all dependency output files, they are included files with
- # $(DEPDIR) in their names. We invoke sed twice because it is the
- # simplest approach to changing $(DEPDIR) to its actual value in the
- # expansion.
- for file in `sed -n "
- s/^$am__include $am__quote\(.*(DEPDIR).*\)$am__quote"'$/\1/p' <"$mf" | \
- sed -e 's/\$(DEPDIR)/'"$DEPDIR"'/g' -e 's/\$U/'"$U"'/g'`; do
- # Make sure the directory exists.
- test -f "$dirpart/$file" && continue
- fdir=`(dirname "$file") 2>/dev/null ||
-$as_expr X"$file" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
- X"$file" : 'X\(//\)[^/]' \| \
- X"$file" : 'X\(//\)$' \| \
- X"$file" : 'X\(/\)' \| \
- . : '\(.\)' 2>/dev/null ||
-echo X"$file" |
- sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ s//\1/; q; }
- /^X\(\/\/\)[^/].*/{ s//\1/; q; }
- /^X\(\/\/\)$/{ s//\1/; q; }
- /^X\(\/\).*/{ s//\1/; q; }
- s/.*/./; q'`
- { if $as_mkdir_p; then
- mkdir -p $dirpart/$fdir
- else
- as_dir=$dirpart/$fdir
- as_dirs=
- while test ! -d "$as_dir"; do
- as_dirs="$as_dir $as_dirs"
- as_dir=`(dirname "$as_dir") 2>/dev/null ||
-$as_expr X"$as_dir" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
- X"$as_dir" : 'X\(//\)[^/]' \| \
- X"$as_dir" : 'X\(//\)$' \| \
- X"$as_dir" : 'X\(/\)' \| \
- . : '\(.\)' 2>/dev/null ||
-echo X"$as_dir" |
- sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ s//\1/; q; }
- /^X\(\/\/\)[^/].*/{ s//\1/; q; }
- /^X\(\/\/\)$/{ s//\1/; q; }
- /^X\(\/\).*/{ s//\1/; q; }
- s/.*/./; q'`
- done
- test ! -n "$as_dirs" || mkdir $as_dirs
- fi || { { echo "$as_me:$LINENO: error: cannot create directory $dirpart/$fdir" >&5
-echo "$as_me: error: cannot create directory $dirpart/$fdir" >&2;}
- { (exit 1); exit 1; }; }; }
-
- # echo "creating $dirpart/$file"
- echo '# dummy' > "$dirpart/$file"
- done
-done
- ;;
- libtool )
-
- # See if we are running on zsh, and set the options which allow our
- # commands through without removal of \ escapes.
- if test -n "${ZSH_VERSION+set}" ; then
- setopt NO_GLOB_SUBST
- fi
-
- cfgfile="${ofile}T"
- trap "$RM \"$cfgfile\"; exit 1" 1 2 15
- $RM "$cfgfile"
-
- cat <<_LT_EOF >> "$cfgfile"
-#! $SHELL
-
-# `$ECHO "$ofile" | sed 's%^.*/%%'` - Provide generalized library-building support services.
-# Generated automatically by $as_me (GNU $PACKAGE$TIMESTAMP) $VERSION
-# Libtool was configured on host `(hostname || uname -n) 2>/dev/null | sed 1q`:
-# NOTE: Changes made to this file will be lost: look at ltmain.sh.
-#
-# Copyright (C) 1996, 1997, 1998, 1999, 2000, 2001, 2003, 2004, 2005,
-# 2006, 2007 Free Software Foundation, Inc.
-#
-# This file is part of GNU Libtool:
-# Originally by Gordon Matzigkeit <gord@gnu.ai.mit.edu>, 1996
-#
-# This program is free software; you can redistribute it and/or modify
-# it under the terms of the GNU General Public License as published by
-# the Free Software Foundation; either version 2 of the License, or
-# (at your option) any later version.
-#
-# This program is distributed in the hope that it will be useful, but
-# WITHOUT ANY WARRANTY; without even the implied warranty of
-# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
-# General Public License for more details.
-#
-# You should have received a copy of the GNU General Public License
-# along with this program; if not, a copy can be downloaded from
-# http://www.gnu.org/copyleft/gpl.html, or by writing to the Free
-# Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston,
-# MA 02110-1301, USA.
-#
-# As a special exception to the GNU General Public License, if you
-# distribute this file as part of a program that contains a
-# configuration script generated by Autoconf, you may include it under
-# the same distribution terms that you use for the rest of that program.
-
-
-# The names of the tagged configurations supported by this script.
-available_tags=""
-
-# ### BEGIN LIBTOOL CONFIG
-
-# Which release of libtool.m4 was used?
-macro_version=$macro_version
-macro_revision=$macro_revision
-
-# Whether or not to build shared libraries.
-build_libtool_libs=$enable_shared
-
-# Whether or not to build static libraries.
-build_old_libs=$enable_static
-
-# What type of objects to build.
-pic_mode=$pic_mode
-
-# Whether or not to optimize for fast installation.
-fast_install=$enable_fast_install
-
-# The host system.
-host_alias=$host_alias
-host=$host
-host_os=$host_os
-
-# The build system.
-build_alias=$build_alias
-build=$build
-build_os=$build_os
-
-# A sed program that does not truncate output.
-SED=$lt_SED
-
-# Sed that helps us avoid accidentally triggering echo(1) options like -n.
-Xsed="\$SED -e 1s/^X//"
-
-# A grep program that handles long lines.
-GREP=$lt_GREP
-
-# An ERE matcher.
-EGREP=$lt_EGREP
-
-# A literal string matcher.
-FGREP=$lt_FGREP
-
-# A BSD- or MS-compatible name lister.
-NM=$lt_NM
-
-# Whether we need soft or hard links.
-LN_S=$lt_LN_S
-
-# What is the maximum length of a command?
-max_cmd_len=$max_cmd_len
-
-# Object file suffix (normally "o").
-objext=$ac_objext
-
-# Executable file suffix (normally "").
-exeext=$exeext
-
-# whether the shell understands "unset".
-lt_unset=$lt_unset
-
-# turn spaces into newlines.
-SP2NL=$lt_lt_SP2NL
-
-# turn newlines into spaces.
-NL2SP=$lt_lt_NL2SP
-
-# How to create reloadable object files.
-reload_flag=$lt_reload_flag
-reload_cmds=$lt_reload_cmds
-
-# Method to check whether dependent libraries are shared objects.
-deplibs_check_method=$lt_deplibs_check_method
-
-# Command to use when deplibs_check_method == "file_magic".
-file_magic_cmd=$lt_file_magic_cmd
-
-# The archiver.
-AR=$lt_AR
-AR_FLAGS=$lt_AR_FLAGS
-
-# A symbol stripping program.
-STRIP=$lt_STRIP
-
-# Commands used to install an old-style archive.
-RANLIB=$lt_RANLIB
-old_postinstall_cmds=$lt_old_postinstall_cmds
-old_postuninstall_cmds=$lt_old_postuninstall_cmds
-
-# A C compiler.
-LTCC=$lt_CC
-
-# LTCC compiler flags.
-LTCFLAGS=$lt_CFLAGS
-
-# Take the output of nm and produce a listing of raw symbols and C names.
-global_symbol_pipe=$lt_lt_cv_sys_global_symbol_pipe
-
-# Transform the output of nm in a proper C declaration.
-global_symbol_to_cdecl=$lt_lt_cv_sys_global_symbol_to_cdecl
-
-# Transform the output of nm in a C name address pair.
-global_symbol_to_c_name_address=$lt_lt_cv_sys_global_symbol_to_c_name_address
-
-# The name of the directory that contains temporary libtool files.
-objdir=$objdir
-
-# Shell to use when invoking shell scripts.
-SHELL=$lt_SHELL
-
-# An echo program that does not interpret backslashes.
-ECHO=$lt_ECHO
-
-# Used to examine libraries when file_magic_cmd begins with "file".
-MAGIC_CMD=$MAGIC_CMD
-
-# Must we lock files when doing compilation?
-need_locks=$lt_need_locks
-
-# Old archive suffix (normally "a").
-libext=$libext
-
-# Shared library suffix (normally ".so").
-shrext_cmds=$lt_shrext_cmds
-
-# The commands to extract the exported symbol list from a shared archive.
-extract_expsyms_cmds=$lt_extract_expsyms_cmds
-
-# Variables whose values should be saved in libtool wrapper scripts and
-# restored at link time.
-variables_saved_for_relink=$lt_variables_saved_for_relink
-
-# Do we need the "lib" prefix for modules?
-need_lib_prefix=$need_lib_prefix
-
-# Do we need a version for libraries?
-need_version=$need_version
-
-# Library versioning type.
-version_type=$version_type
-
-# Shared library runtime path variable.
-runpath_var=$runpath_var
-
-# Shared library path variable.
-shlibpath_var=$shlibpath_var
-
-# Is shlibpath searched before the hard-coded library search path?
-shlibpath_overrides_runpath=$shlibpath_overrides_runpath
-
-# Format of library name prefix.
-libname_spec=$lt_libname_spec
-
-# List of archive names. First name is the real one, the rest are links.
-# The last name is the one that the linker finds with -lNAME
-library_names_spec=$lt_library_names_spec
-
-# The coded name of the library, if different from the real name.
-soname_spec=$lt_soname_spec
-
-# Command to use after installation of a shared archive.
-postinstall_cmds=$lt_postinstall_cmds
-
-# Command to use after uninstallation of a shared archive.
-postuninstall_cmds=$lt_postuninstall_cmds
-
-# Commands used to finish a libtool library installation in a directory.
-finish_cmds=$lt_finish_cmds
-
-# As "finish_cmds", except a single script fragment to be evaled but
-# not shown.
-finish_eval=$lt_finish_eval
-
-# Whether we should hardcode library paths into libraries.
-hardcode_into_libs=$hardcode_into_libs
-
-# Compile-time system search path for libraries.
-sys_lib_search_path_spec=$lt_sys_lib_search_path_spec
-
-# Run-time system search path for libraries.
-sys_lib_dlsearch_path_spec=$lt_sys_lib_dlsearch_path_spec
-
-# Whether dlopen is supported.
-dlopen_support=$enable_dlopen
-
-# Whether dlopen of programs is supported.
-dlopen_self=$enable_dlopen_self
-
-# Whether dlopen of statically linked programs is supported.
-dlopen_self_static=$enable_dlopen_self_static
-
-# Commands to strip libraries.
-old_striplib=$lt_old_striplib
-striplib=$lt_striplib
-
-
-# The linker used to build libraries.
-LD=$lt_LD
-
-# Commands used to build an old-style archive.
-old_archive_cmds=$lt_old_archive_cmds
-
-# A language specific compiler.
-CC=$lt_compiler
-
-# Is the compiler the GNU compiler?
-with_gcc=$GCC
-
-# Compiler flag to turn off builtin functions.
-no_builtin_flag=$lt_lt_prog_compiler_no_builtin_flag
-
-# How to pass a linker flag through the compiler.
-wl=$lt_lt_prog_compiler_wl
-
-# Additional compiler flags for building library objects.
-pic_flag=$lt_lt_prog_compiler_pic
-
-# Compiler flag to prevent dynamic linking.
-link_static_flag=$lt_lt_prog_compiler_static
-
-# Does compiler simultaneously support -c and -o options?
-compiler_c_o=$lt_lt_cv_prog_compiler_c_o
-
-# Whether or not to add -lc for building shared libraries.
-build_libtool_need_lc=$archive_cmds_need_lc
-
-# Whether or not to disallow shared libs when runtime libs are static.
-allow_libtool_libs_with_static_runtimes=$enable_shared_with_static_runtimes
-
-# Compiler flag to allow reflexive dlopens.
-export_dynamic_flag_spec=$lt_export_dynamic_flag_spec
-
-# Compiler flag to generate shared objects directly from archives.
-whole_archive_flag_spec=$lt_whole_archive_flag_spec
-
-# Whether the compiler copes with passing no objects directly.
-compiler_needs_object=$lt_compiler_needs_object
-
-# Create an old-style archive from a shared archive.
-old_archive_from_new_cmds=$lt_old_archive_from_new_cmds
-
-# Create a temporary old-style archive to link instead of a shared archive.
-old_archive_from_expsyms_cmds=$lt_old_archive_from_expsyms_cmds
-
-# Commands used to build a shared archive.
-archive_cmds=$lt_archive_cmds
-archive_expsym_cmds=$lt_archive_expsym_cmds
-
-# Commands used to build a loadable module if different from building
-# a shared archive.
-module_cmds=$lt_module_cmds
-module_expsym_cmds=$lt_module_expsym_cmds
-
-# Whether we are building with GNU ld or not.
-with_gnu_ld=$lt_with_gnu_ld
-
-# Flag that allows shared libraries with undefined symbols to be built.
-allow_undefined_flag=$lt_allow_undefined_flag
-
-# Flag that enforces no undefined symbols.
-no_undefined_flag=$lt_no_undefined_flag
-
-# Flag to hardcode \$libdir into a binary during linking.
-# This must work even if \$libdir does not exist
-hardcode_libdir_flag_spec=$lt_hardcode_libdir_flag_spec
-
-# If ld is used when linking, flag to hardcode \$libdir into a binary
-# during linking. This must work even if \$libdir does not exist.
-hardcode_libdir_flag_spec_ld=$lt_hardcode_libdir_flag_spec_ld
-
-# Whether we need a single "-rpath" flag with a separated argument.
-hardcode_libdir_separator=$lt_hardcode_libdir_separator
-
-# Set to "yes" if using DIR/libNAME\${shared_ext} during linking hardcodes
-# DIR into the resulting binary.
-hardcode_direct=$hardcode_direct
-
-# Set to "yes" if using DIR/libNAME\${shared_ext} during linking hardcodes
-# DIR into the resulting binary and the resulting library dependency is
-# "absolute",i.e impossible to change by setting \${shlibpath_var} if the
-# library is relocated.
-hardcode_direct_absolute=$hardcode_direct_absolute
-
-# Set to "yes" if using the -LDIR flag during linking hardcodes DIR
-# into the resulting binary.
-hardcode_minus_L=$hardcode_minus_L
-
-# Set to "yes" if using SHLIBPATH_VAR=DIR during linking hardcodes DIR
-# into the resulting binary.
-hardcode_shlibpath_var=$hardcode_shlibpath_var
-
-# Set to "yes" if building a shared library automatically hardcodes DIR
-# into the library and all subsequent libraries and executables linked
-# against it.
-hardcode_automatic=$hardcode_automatic
-
-# Set to yes if linker adds runtime paths of dependent libraries
-# to runtime path list.
-inherit_rpath=$inherit_rpath
-
-# Whether libtool must link a program against all its dependency libraries.
-link_all_deplibs=$link_all_deplibs
-
-# Fix the shell variable \$srcfile for the compiler.
-fix_srcfile_path=$lt_fix_srcfile_path
-
-# Set to "yes" if exported symbols are required.
-always_export_symbols=$always_export_symbols
-
-# The commands to list exported symbols.
-export_symbols_cmds=$lt_export_symbols_cmds
-
-# Symbols that should not be listed in the preloaded symbols.
-exclude_expsyms=$lt_exclude_expsyms
-
-# Symbols that must always be exported.
-include_expsyms=$lt_include_expsyms
-
-# Commands necessary for linking programs (against libraries) with templates.
-prelink_cmds=$lt_prelink_cmds
-
-# Specify filename containing input files.
-file_list_spec=$lt_file_list_spec
-
-# How to hardcode a shared library path into an executable.
-hardcode_action=$hardcode_action
-
-# ### END LIBTOOL CONFIG
-
-_LT_EOF
-
- case $host_os in
- aix3*)
- cat <<\_LT_EOF >> "$cfgfile"
-# AIX sometimes has problems with the GCC collect2 program. For some
-# reason, if we set the COLLECT_NAMES environment variable, the problems
-# vanish in a puff of smoke.
-if test "X${COLLECT_NAMES+set}" != Xset; then
- COLLECT_NAMES=
- export COLLECT_NAMES
-fi
-_LT_EOF
- ;;
- esac
-
-
-ltmain="$ac_aux_dir/ltmain.sh"
-
-
- # We use sed instead of cat because bash on DJGPP gets confused if
- # if finds mixed CR/LF and LF-only lines. Since sed operates in
- # text mode, it properly converts lines to CR/LF. This bash problem
- # is reportedly fixed, but why not run on old versions too?
- sed '/^# Generated shell functions inserted here/q' "$ltmain" >> "$cfgfile" \
- || (rm -f "$cfgfile"; exit 1)
-
- case $xsi_shell in
- yes)
- cat << \_LT_EOF >> "$cfgfile"
-# func_dirname file append nondir_replacement
-# Compute the dirname of FILE. If nonempty, add APPEND to the result,
-# otherwise set result to NONDIR_REPLACEMENT.
-func_dirname ()
-{
- case ${1} in
- */*) func_dirname_result="${1%/*}${2}" ;;
- * ) func_dirname_result="${3}" ;;
- esac
-}
-
-# func_basename file
-func_basename ()
-{
- func_basename_result="${1##*/}"
-}
-
-# func_stripname prefix suffix name
-# strip PREFIX and SUFFIX off of NAME.
-# PREFIX and SUFFIX must not contain globbing or regex special
-# characters, hashes, percent signs, but SUFFIX may contain a leading
-# dot (in which case that matches only a dot).
-func_stripname ()
-{
- # pdksh 5.2.14 does not do ${X%$Y} correctly if both X and Y are
- # positional parameters, so assign one to ordinary parameter first.
- func_stripname_result=${3}
- func_stripname_result=${func_stripname_result#"${1}"}
- func_stripname_result=${func_stripname_result%"${2}"}
-}
-
-# func_opt_split
-func_opt_split ()
-{
- func_opt_split_opt=${1%%=*}
- func_opt_split_arg=${1#*=}
-}
-
-# func_lo2o object
-func_lo2o ()
-{
- case ${1} in
- *.lo) func_lo2o_result=${1%.lo}.${objext} ;;
- *) func_lo2o_result=${1} ;;
- esac
-}
-_LT_EOF
- ;;
- *) # Bourne compatible functions.
- cat << \_LT_EOF >> "$cfgfile"
-# func_dirname file append nondir_replacement
-# Compute the dirname of FILE. If nonempty, add APPEND to the result,
-# otherwise set result to NONDIR_REPLACEMENT.
-func_dirname ()
-{
- # Extract subdirectory from the argument.
- func_dirname_result=`$ECHO "X${1}" | $Xsed -e "$dirname"`
- if test "X$func_dirname_result" = "X${1}"; then
- func_dirname_result="${3}"
- else
- func_dirname_result="$func_dirname_result${2}"
- fi
-}
-
-# func_basename file
-func_basename ()
-{
- func_basename_result=`$ECHO "X${1}" | $Xsed -e "$basename"`
-}
-
-# func_stripname prefix suffix name
-# strip PREFIX and SUFFIX off of NAME.
-# PREFIX and SUFFIX must not contain globbing or regex special
-# characters, hashes, percent signs, but SUFFIX may contain a leading
-# dot (in which case that matches only a dot).
-# func_strip_suffix prefix name
-func_stripname ()
-{
- case ${2} in
- .*) func_stripname_result=`$ECHO "X${3}" \
- | $Xsed -e "s%^${1}%%" -e "s%\\\\${2}\$%%"`;;
- *) func_stripname_result=`$ECHO "X${3}" \
- | $Xsed -e "s%^${1}%%" -e "s%${2}\$%%"`;;
- esac
-}
-
-# sed scripts:
-my_sed_long_opt='1s/^\(-[^=]*\)=.*/\1/;q'
-my_sed_long_arg='1s/^-[^=]*=//'
-
-# func_opt_split
-func_opt_split ()
-{
- func_opt_split_opt=`$ECHO "X${1}" | $Xsed -e "$my_sed_long_opt"`
- func_opt_split_arg=`$ECHO "X${1}" | $Xsed -e "$my_sed_long_arg"`
-}
-
-# func_lo2o object
-func_lo2o ()
-{
- func_lo2o_result=`$ECHO "X${1}" | $Xsed -e "$lo2o"`
-}
-_LT_EOF
-esac
-
-case $lt_shell_append in
- yes)
- cat << \_LT_EOF >> "$cfgfile"
-
-# func_append var value
-# Append VALUE to the end of shell variable VAR.
-func_append ()
-{
- eval "$1+=\$2"
-}
-_LT_EOF
- ;;
- *)
- cat << \_LT_EOF >> "$cfgfile"
-
-# func_append var value
-# Append VALUE to the end of shell variable VAR.
-func_append ()
-{
- eval "$1=\$$1\$2"
-}
-_LT_EOF
- ;;
- esac
-
-
- sed -n '/^# Generated shell functions inserted here/,$p' "$ltmain" >> "$cfgfile" \
- || (rm -f "$cfgfile"; exit 1)
-
- mv -f "$cfgfile" "$ofile" ||
- (rm -f "$ofile" && cp "$cfgfile" "$ofile" && rm -f "$cfgfile")
- chmod +x "$ofile"
-
- ;;
- default-1 )
- for ac_file in $CONFIG_FILES; do
- # Support "outfile[:infile[:infile...]]"
- case "$ac_file" in
- *:*) ac_file=`echo "$ac_file"|sed 's%:.*%%'` ;;
- esac
- # PO directories have a Makefile.in generated from Makefile.in.in.
- case "$ac_file" in */Makefile.in)
- # Adjust a relative srcdir.
- ac_dir=`echo "$ac_file"|sed 's%/[^/][^/]*$%%'`
- ac_dir_suffix="/`echo "$ac_dir"|sed 's%^\./%%'`"
- ac_dots=`echo "$ac_dir_suffix"|sed 's%/[^/]*%../%g'`
- # In autoconf-2.13 it is called $ac_given_srcdir.
- # In autoconf-2.50 it is called $srcdir.
- test -n "$ac_given_srcdir" || ac_given_srcdir="$srcdir"
- case "$ac_given_srcdir" in
- .) top_srcdir=`echo $ac_dots|sed 's%/$%%'` ;;
- /*) top_srcdir="$ac_given_srcdir" ;;
- *) top_srcdir="$ac_dots$ac_given_srcdir" ;;
- esac
- if test -f "$ac_given_srcdir/$ac_dir/POTFILES.in"; then
- rm -f "$ac_dir/POTFILES"
- test -n "$as_me" && echo "$as_me: creating $ac_dir/POTFILES" || echo "creating $ac_dir/POTFILES"
- cat "$ac_given_srcdir/$ac_dir/POTFILES.in" | sed -e "/^#/d" -e "/^[ ]*\$/d" -e "s,.*, $top_srcdir/& \\\\," | sed -e "\$s/\(.*\) \\\\/\1/" > "$ac_dir/POTFILES"
- POMAKEFILEDEPS="POTFILES.in"
- # ALL_LINGUAS, POFILES, GMOFILES, UPDATEPOFILES, DUMMYPOFILES depend
- # on $ac_dir but don't depend on user-specified configuration
- # parameters.
- if test -f "$ac_given_srcdir/$ac_dir/LINGUAS"; then
- # The LINGUAS file contains the set of available languages.
- if test -n "$OBSOLETE_ALL_LINGUAS"; then
- test -n "$as_me" && echo "$as_me: setting ALL_LINGUAS in configure.in is obsolete" || echo "setting ALL_LINGUAS in configure.in is obsolete"
- fi
- ALL_LINGUAS_=`sed -e "/^#/d" "$ac_given_srcdir/$ac_dir/LINGUAS"`
- # Hide the ALL_LINGUAS assigment from automake.
- eval 'ALL_LINGUAS''=$ALL_LINGUAS_'
- POMAKEFILEDEPS="$POMAKEFILEDEPS LINGUAS"
- else
- # The set of available languages was given in configure.in.
- eval 'ALL_LINGUAS''=$OBSOLETE_ALL_LINGUAS'
- fi
- case "$ac_given_srcdir" in
- .) srcdirpre= ;;
- *) srcdirpre='$(srcdir)/' ;;
- esac
- POFILES=
- GMOFILES=
- UPDATEPOFILES=
- DUMMYPOFILES=
- for lang in $ALL_LINGUAS; do
- POFILES="$POFILES $srcdirpre$lang.po"
- GMOFILES="$GMOFILES $srcdirpre$lang.gmo"
- UPDATEPOFILES="$UPDATEPOFILES $lang.po-update"
- DUMMYPOFILES="$DUMMYPOFILES $lang.nop"
- done
- # CATALOGS depends on both $ac_dir and the user's LINGUAS
- # environment variable.
- INST_LINGUAS=
- if test -n "$ALL_LINGUAS"; then
- for presentlang in $ALL_LINGUAS; do
- useit=no
- if test "%UNSET%" != "$LINGUAS"; then
- desiredlanguages="$LINGUAS"
- else
- desiredlanguages="$ALL_LINGUAS"
- fi
- for desiredlang in $desiredlanguages; do
- # Use the presentlang catalog if desiredlang is
- # a. equal to presentlang, or
- # b. a variant of presentlang (because in this case,
- # presentlang can be used as a fallback for messages
- # which are not translated in the desiredlang catalog).
- case "$desiredlang" in
- "$presentlang"*) useit=yes;;
- esac
- done
- if test $useit = yes; then
- INST_LINGUAS="$INST_LINGUAS $presentlang"
- fi
- done
- fi
- CATALOGS=
- if test -n "$INST_LINGUAS"; then
- for lang in $INST_LINGUAS; do
- CATALOGS="$CATALOGS $lang.gmo"
- done
- fi
- test -n "$as_me" && echo "$as_me: creating $ac_dir/Makefile" || echo "creating $ac_dir/Makefile"
- sed -e "/^POTFILES =/r $ac_dir/POTFILES" -e "/^# Makevars/r $ac_given_srcdir/$ac_dir/Makevars" -e "s|@POFILES@|$POFILES|g" -e "s|@GMOFILES@|$GMOFILES|g" -e "s|@UPDATEPOFILES@|$UPDATEPOFILES|g" -e "s|@DUMMYPOFILES@|$DUMMYPOFILES|g" -e "s|@CATALOGS@|$CATALOGS|g" -e "s|@POMAKEFILEDEPS@|$POMAKEFILEDEPS|g" "$ac_dir/Makefile.in" > "$ac_dir/Makefile"
- for f in "$ac_given_srcdir/$ac_dir"/Rules-*; do
- if test -f "$f"; then
- case "$f" in
- *.orig | *.bak | *~) ;;
- *) cat "$f" >> "$ac_dir/Makefile" ;;
- esac
- fi
- done
- fi
- ;;
- esac
- done ;;
- esac
-done
-_ACEOF
-
-cat >>$CONFIG_STATUS <<\_ACEOF
-
-{ (exit 0); exit 0; }
-_ACEOF
-chmod +x $CONFIG_STATUS
-ac_clean_files=$ac_clean_files_save
-
-
-# configure is writing to config.log, and then calls config.status.
-# config.status does its own redirection, appending to config.log.
-# Unfortunately, on DOS this fails, as config.log is still kept open
-# by configure, so config.status won't be able to write to it; its
-# output is simply discarded. So we exec the FD to /dev/null,
-# effectively closing config.log, so it can be properly (re)opened and
-# appended to by config.status. When coming back to configure, we
-# need to make the FD available again.
-if test "$no_create" != yes; then
- ac_cs_success=:
- ac_config_status_args=
- test "$silent" = yes &&
- ac_config_status_args="$ac_config_status_args --quiet"
- exec 5>/dev/null
- $SHELL $CONFIG_STATUS $ac_config_status_args || ac_cs_success=false
- exec 5>>config.log
- # Use ||, not &&, to avoid exiting from the if with $? = 1, which
- # would make configure fail if this is the last instruction.
- $ac_cs_success || { (exit 1); exit 1; }
-fi
-
diff --git a/contrib/binutils/ld/configure.host b/contrib/binutils/ld/configure.host
deleted file mode 100644
index be343eb7e48c..000000000000
--- a/contrib/binutils/ld/configure.host
+++ /dev/null
@@ -1,252 +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; if [ -f ../gcc/libunwind.a ]; then libgcc="$libgcc ../gcc/libunwind.a"; else libunwind=\`${CC} -print-file-name=libunwind.a\`; if [ x"$libunwind" != xlibunwind.a ]; then libgcc="$libgcc $libunwind"; fi; fi; echo --start-group $libgcc -lc --end-group`'
-
-#
-# Generic configurations:
-#
-
-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 `${CC} --help --verbose 2>&1 | egrep "ld[^ ]*\.so" | sed -e "s,.*-dynamic-linker[ ][ ]*\(.*/ld[^ ]*\.so..\).*,\1,"` `${CC} --print-file-name=crt1.o` `${CC} --print-file-name=crti.o` `if [ -f ../gcc/crtbegin.o ]; then echo ../gcc/crtbegin.o; else ${CC} --print-file-name=crtbegin.o; fi`'
- HOSTING_LIBS='-L`dirname \`${CC} --print-file-name=libc.so\`` '"$HOSTING_LIBS"' `if [ -f ../gcc/crtend.o ]; then echo ../gcc/crtend.o; else ${CC} --print-file-name=crtend.o; fi` `${CC} --print-file-name=crtn.o`'
- ;;
-
-*-*-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
- ;;
-
-*-*-openbsd*)
- HOSTING_CRT0="-dynamic-linker /usr/libexec/ld.so /usr/lib/crt0.o"
- HOSTING_CRT0="$HOSTING_CRT0 /usr/lib/crtbegin.o"
- HOSTING_LIBS="$HOSTING_LIBS /usr/lib/crtend.o"
- ;;
-
-esac
-
-#
-# 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-*)
- 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-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`'
- ;;
-
-i[3-7]86-*-mingw*)
- #We only support msvcrt.dll, crtid == 2.
- HOSTING_CRT0='/mingw/lib/crt2.o'
- HOSTING_LIBS='-L/mingw/lib -lmingw32 -lmoldname -lmingwex -lmsvcrt -luser32 -lkernel32 -ladvapi32 -lshell32 -lmingw32 -lmoldname -lmingwex -lmsvcrt `if [ -f ../gcc/libgcc.a ] ; then echo ../gcc/libgcc.a ; else ${CC} -print-libgcc-file-name; fi`'
- ;;
-
-ia64-*-linux-*)
- HOSTING_CRT0=`echo "$HOSTING_CRT0" | sed -e "s,ld\[^ \]*\*,ld-linux-ia64,g"`
- ;;
-
-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-*)
- HOSTING_CRT0=`echo "$HOSTING_CRT0" | sed -e "s,\\\`specs.*\"\\\`,/lib/ld.so.1,"`
- ;;
-
-m68*-*-linux-*)
- HOSTING_CRT0=`echo "$HOSTING_CRT0" | sed -e "s,\\\`specs.*\"\\\`,/lib/ld.so.1,"`
- ;;
-
-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-*)
- HOSTING_CRT0=`echo "$HOSTING_CRT0" | sed -e "s,\\\`specs.*\"\\\`,/lib64/ld64.so.1,"`
- ;;
-
-powerpc*-*-linux-*)
- HOSTING_CRT0=`echo "$HOSTING_CRT0" | sed -e "s,\\\`specs.*\"\\\`,/lib/ld.so.1,"`
- ;;
-
-s390x-*-linux-*)
- HOSTING_CRT0=`echo "$HOSTING_CRT0" | sed -e "s,\\\`specs.*\"\\\`,/lib/ld64.so.1,"`
- ;;
-
-s390-*-linux-*)
- HOSTING_CRT0=`echo "$HOSTING_CRT0" | sed -e "s,\\\`specs.*\"\\\`,/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`'
- ;;
-
-sparc64-*-solaris2* | sparcv9-*-solaris2*)
- HOSTING_CRT0='`if [ -f ../gcc/crt1.o ]; then echo ../gcc/crt1.o; else ${CC} -print-file-name=crt1.o; fi` `if [ -f ../gcc/crti.o ]; then echo ../gcc/crti.o; else ${CC} -print-file-name=crti.o; fi` /usr/ccs/lib/sparcv9/values-Xa.o `if [ -f ../gcc/crtbegin.o ]; then echo ../gcc/crtbegin.o; else ${CC} -print-file-name=crtbegin.o; fi`'
- HOSTING_LIBS="$HOSTING_LIBS"' `if [ -f ../gcc/crtend.o ]; then echo ../gcc/crtend.o; else ${CC} -print-file-name=crtend.o; fi` `if [ -f ../gcc/crtn.o ]; then echo ../gcc/crtn.o; else ${CC} -print-file-name=crtn.o; fi`'
- ;;
-
-sparc-*-linux-*)
- HOSTING_CRT0=`echo "$HOSTING_CRT0" | sed -e "s,\\\`specs.*\"\\\`,/lib/ld-linux.so.2,"`
- ;;
-
-sparc64-*-linux-*)
- HOSTING_CRT0=`echo "$HOSTING_CRT0" | sed -e "s,\\\`specs.*\"\\\`,/lib64/ld-linux.so.2,"`
- ;;
-
-x86_64-*-linux-*)
- HOSTING_CRT0=`echo "$HOSTING_CRT0" | sed -e "s,\\\`specs.*\"\\\`,/lib64/ld-linux-x86-64.so.2,"`
- ;;
-
-*-*-freebsd* | *-*-kfreebsd*-gnu)
- ;;
-
-*-*-linux*)
- ;;
-
-*-*-netbsd*)
- ;;
-
-*-*-openbsd*)
- ;;
-
-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 0589578a74a6..000000000000
--- a/contrib/binutils/ld/configure.in
+++ /dev/null
@@ -1,278 +0,0 @@
-dnl Process this file with autoconf to produce a configure script
-dnl
-AC_PREREQ(2.57)
-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$prefix" = xNONE; then
- test_prefix=/usr/local
- else
- test_prefix=$prefix
- fi
- if test "x$exec_prefix" = xNONE; then
- test_exec_prefix=$test_prefix
- else
- test_exec_prefix=$exec_prefix
- fi
- case ${TARGET_SYSTEM_ROOT} in
- "${test_prefix}"|"${test_prefix}/"*|\
- "${test_exec_prefix}"|"${test_exec_prefix}/"*|\
- '${prefix}'|'${prefix}/'*|\
- '${exec_prefix}'|'${exec_prefix}/'*)
- t="$TARGET_SYSTEM_ROOT_DEFINE -DTARGET_SYSTEM_ROOT_RELOCATABLE"
- TARGET_SYSTEM_ROOT_DEFINE="$t"
- ;;
- esac
-], [
- 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)
-
-AM_BINUTILS_WARNINGS
-
-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 vi zh_CN zh_TW ga"
-ZW_GNU_GETTEXT_SISTER_DIR
-AM_PO_SUBDIRS
-
-AC_EXEEXT
-
-AC_PROG_YACC
-AM_PROG_LEX
-
-AM_MAINTAINER_MODE
-AM_CONDITIONAL(GENINSRC_NEVER, false)
-
-. ${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 elf-hints.h limits.h sys/param.h)
-AC_CHECK_FUNCS(glob mkstemp realpath sbrk waitpid)
-AC_HEADER_DIRENT
-
-AC_MSG_CHECKING(for a known getopt prototype in unistd.h)
-AC_CACHE_VAL(ld_cv_decl_getopt_unistd_h,
-[AC_TRY_COMPILE([#include <unistd.h>], [extern int getopt (int, char *const*, const char *);],
-ld_cv_decl_getopt_unistd_h=yes, ld_cv_decl_getopt_unistd_h=no)])
-AC_MSG_RESULT($ld_cv_decl_getopt_unistd_h)
-if test $ld_cv_decl_getopt_unistd_h = yes; then
- AC_DEFINE([HAVE_DECL_GETOPT], 1,
- [Is the prototype for getopt in <unistd.h> in the expected format?])
-fi
-
-BFD_BINARY_FOPEN
-
-AC_CHECK_DECLS([strstr, free, sbrk, getenv, environ])
-
-# When converting linker scripts into strings for use in emulation
-# files, use astring.sed if the compiler supports ANSI string
-# 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
-
- if test x${want64} = xfalse; then
- . ${srcdir}/../bfd/config.bfd
- fi
-
- if test x${want64} = xtrue; then
- targ_extra_emuls="$targ_extra_emuls $targ64_extra_emuls"
- targ_extra_libpath="$targ_extra_libpath $targ64_extra_libpath"
- fi
-
- for i in $targ_emul $targ_extra_emuls $targ_extra_libpath; do
- case " $all_emuls " in
- *" e${i}.o "*) ;;
- *)
- 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)
-
-if test x${all_targets} = xtrue; then
- if test x${want64} = xfalse; then
- AC_CHECK_SIZEOF(long)
- if test "x${ac_cv_sizeof_long}" = "x8"; then
- want64=true
- fi
- fi
- if test x${want64} = xtrue; then
- EMULATION_OFILES='$(ALL_EMULATIONS) $(ALL_64_EMULATIONS)'
- else
- 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
-
-case "$target_os" in
- lynxos) EXTRA_SHLIB_EXTENSION=".a" ;;
-esac
-
-if test x${EXTRA_SHLIB_EXTENSION} != x ; then
- AC_DEFINE_UNQUOTED(EXTRA_SHLIB_EXTENSION, "$EXTRA_SHLIB_EXTENSION",
- [Additional extension a shared object might have.])
-fi
-
-dnl Required by html and install-html
-AC_SUBST(datarootdir)
-AC_SUBST(docdir)
-AC_SUBST(htmldir)
-
-AC_OUTPUT(Makefile po/Makefile.in:po/Make-in)
diff --git a/contrib/binutils/ld/configure.tgt b/contrib/binutils/ld/configure.tgt
deleted file mode 100644
index 1b37bda6b48c..000000000000
--- a/contrib/binutils/ld/configure.tgt
+++ /dev/null
@@ -1,698 +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
-# targ64_extra_emuls additional linker emulations to provide if
-# --enable-64-bit-bfd is given or if host is 64 bit.
-# targ64_extra_libpath additional linker emulations using LIB_PATH if
-# --enable-64-bit-bfd is given or if host is 64 bit.
-# NATIVE_LIB_DIRS library directories to search on this host
-# (if we are a native or sysrooted linker)
-
-targ_extra_emuls=
-targ_extra_libpath=
-targ_extra_ofiles=
-targ64_extra_emuls=
-targ64_extra_libpath=
-
-# Please try to keep this table in alphabetic order - it makes it
-# much easier to lookup a specific archictecture. Naturally any
-# architecture variants should be kept together even if their names
-# break the alpha sorting.
-case "${targ}" in
-alpha*-*-freebsd* | alpha*-*-kfreebsd*-gnu)
- targ_emul=elf64alpha_fbsd
- targ_extra_emuls="elf64alpha alpha"
- tdir_alpha=`echo ${targ_alias} | sed -e 's/freebsd/freebsdecoff/'` ;;
-alpha*-*-linuxecoff*) targ_emul=alpha targ_extra_emuls=elf64alpha
- tdir_elf64alpha=`echo ${targ_alias} | sed -e 's/ecoff//'` ;;
-alpha*-*-linux-*) targ_emul=elf64alpha targ_extra_emuls=alpha
- tdir_alpha=`echo ${targ_alias} | sed -e 's/linux/linuxecoff/'` ;;
-alpha*-*-osf*) targ_emul=alpha ;;
-alpha*-*-gnu*) targ_emul=elf64alpha ;;
-alpha*-*-netware*) targ_emul=alpha ;;
-alpha*-*-netbsd*) targ_emul=elf64alpha_nbsd ;;
-alpha*-*-openbsd*) targ_emul=elf64alpha
- ;;
-arc-*-elf*) targ_emul=arcelf
- ;;
-arm-epoc-pe) targ_emul=arm_epoc_pe ; targ_extra_ofiles="deffilep.o pe-dll.o" ;;
-arm-wince-pe | arm-*-wince) targ_emul=arm_wince_pe ; targ_extra_ofiles="deffilep.o pe-dll.o" ;;
-arm-*-pe) targ_emul=armpe ; targ_extra_ofiles="deffilep.o pe-dll.o" ;;
-arm-*-aout | armel-*-aout) targ_emul=armaoutl ;;
-armeb-*-aout) targ_emul=armaoutb ;;
-arm-*-coff) targ_emul=armcoff ;;
-arm-*-freebsd* | arm-*-kfreebsd*-gnu)
- targ_emul=armelf_fbsd
- targ_extra_emuls="armelf" ;;
-armeb-*-netbsdelf*) targ_emul=armelfb_nbsd;
- targ_extra_emuls="armelf_nbsd armelf armnbsd" ;;
-arm-*-netbsdelf*) targ_emul=armelf_nbsd;
- targ_extra_emuls="armelfb_nbsd armelf armnbsd" ;;
-arm-*-netbsd*) targ_emul=armnbsd;
- targ_extra_emuls="armelf armelf_nbsd armelfb_nbsd" ;;
-arm-*-nto*) targ_emul=armnto ;;
-arm-*-openbsd*) targ_emul=armnbsd ;;
-arm-*-rtems*) targ_emul=armelf ;;
-armeb-*-elf) targ_emul=armelfb ;;
-arm-*-elf | arm*-*-eabi*)
- targ_emul=armelf ;;
-arm*-*-symbianelf*) targ_emul=armsymbian;;
-arm-*-kaos*) targ_emul=armelf ;;
-arm9e-*-elf) targ_emul=armelf ;;
-arm*b-*-linux-*eabi) targ_emul=armelfb_linux_eabi
- targ_extra_emuls=armelf_linux_eabi
- targ_extra_libpath=$targ_extra_emuls
- ;;
-arm*b-*-linux-*) targ_emul=armelfb_linux
- targ_extra_emuls="armelfb armelf armelf_linux"
- targ_extra_libpath="armelf_linux"
- ;;
-arm*-*-linux-*eabi) targ_emul=armelf_linux_eabi
- targ_extra_emuls=armelfb_linux_eabi
- targ_extra_libpath=$targ_extra_emuls
- ;;
-arm*-*-linux-*) targ_emul=armelf_linux
- targ_extra_emuls="armelf armelfb armelfb_linux"
- targ_extra_libpath="armelfb_linux"
- ;;
-arm*-*-uclinux*eabi) targ_emul=armelf_linux_eabi
- targ_extra_emuls=armelfb_linux_eabi
- targ_extra_libpath=$targ_extra_emuls
- ;;
-arm*-*-uclinux*) targ_emul=armelf_linux
- targ_extra_emuls="armelf armelfb armelfb_linux"
- targ_extra_libpath="armelfb_linux"
- ;;
-arm-*-vxworks) targ_emul=armelf_vxworks ;;
-arm*-*-conix*) targ_emul=armelf ;;
-thumb-*-linux-* | thumb-*-uclinux*) targ_emul=armelf_linux; targ_extra_emuls=armelf ;;
-strongarm-*-coff) targ_emul=armcoff ;;
-strongarm-*-elf) targ_emul=armelf ;;
-strongarm-*-kaos*) targ_emul=armelf ;;
-thumb-*-coff) targ_emul=armcoff ;;
-thumb-*-elf) targ_emul=armelf ;;
-thumb-epoc-pe) targ_emul=arm_epoc_pe ;
- targ_extra_ofiles="deffilep.o pe-dll.o" ;;
-thumb-*-pe) targ_emul=armpe ;
- targ_extra_ofiles="deffilep.o pe-dll.o" ;;
-xscale-*-coff) targ_emul=armcoff ;;
-xscale-*-elf) targ_emul=armelf
- ;;
-avr-*-*) targ_emul=avr2
- targ_extra_emuls="avr1 avr3 avr4 avr5 avr6"
- ;;
-bfin-*-elf) targ_emul=elf32bfin;
- targ_extra_emuls="elf32bfinfd"
- targ_extra_libpath=$targ_extra_emuls
- ;;
-bfin-*-uclinux*) targ_emul=elf32bfin;
- targ_extra_emuls="elf32bfinfd"
- targ_extra_libpath=$targ_extra_emuls
- ;;
-bfin-*-linux-uclibc*) targ_emul=elf32bfin;
- targ_extra_emuls="elf32bfinfd"
- targ_extra_libpath=$targ_extra_emuls
- ;;
-cr16-*-elf*) targ_emul=elf32cr16 ;;
-cr16c-*-elf*) targ_emul=elf32cr16c
- ;;
-cris-*-*aout*) targ_emul=crisaout
- targ_extra_emuls="criself crislinux"
- targ_extra_libpath=$targ_extra_emuls ;;
-cris-*-linux-* | crisv32-*-linux-*)
- targ_emul=crislinux ;;
-cris-*-* | crisv32-*-*) targ_emul=criself
- targ_extra_emuls="crisaout crislinux"
- targ_extra_libpath=$targ_extra_emuls
- ;;
-crx-*-elf*) targ_emul=elf32crx
- ;;
-d10v-*-*) targ_emul=d10velf ;;
-d30v-*-*ext*) targ_emul=d30v_e; targ_extra_emuls="d30velf d30v_o" ;;
-d30v-*-*onchip*) targ_emul=d30v_o; targ_extra_emuls="d30velf d30v_e" ;;
-d30v-*-*) targ_emul=d30velf; targ_extra_emuls="d30v_e d30v_o"
- ;;
-dlx-*-elf*) targ_emul=elf32_dlx
- ;;
-fido*-*-elf*) targ_emul=m68kelf ;;
-fr30-*-*) targ_emul=elf32fr30
- ;;
-frv-*-*linux*) targ_emul=elf32frvfd ;;
-frv-*-*) targ_emul=elf32frv ; targ_extra_emuls="elf32frvfd"
- ;;
-h8300-*-hms* | h8300-*-coff* | h8300-*-rtemscoff*)
- targ_emul=h8300; targ_extra_emuls="h8300h h8300s h8300hn h8300sn h8300sx h8300sxn" ;;
-h8300-*-elf* | h8300-*-rtems*)
- targ_emul=h8300elf;
- targ_extra_emuls="h8300helf h8300self h8300hnelf h8300snelf h8300sxelf h8300sxnelf" ;;
-h8500-*-hms* | h8500-*-coff* | h8500-*-rtems*)
- targ_emul=h8500
- targ_extra_emuls="h8500s h8500b h8500m h8500c"
- ;;
-hppa*64*-*-linux-*) targ_emul=hppa64linux ;;
-hppa*64*-*) targ_emul=elf64hppa ;;
-hppa*-*-linux-*) targ_emul=hppalinux ;;
-hppa*-*-*elf*) targ_emul=hppaelf ;;
-hppa*-*-lites*) targ_emul=hppaelf ;;
-hppa*-*-netbsd*) targ_emul=hppanbsd ;;
-hppa*-*-openbsd*) targ_emul=hppaobsd
- ;;
-i370-*-elf* | i370-*-linux-*) 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) 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-*-rtems*) targ_emul=elf_i386 ;;
-i[3-7]86-*-aros*) targ_emul=elf_i386 ;;
-i[3-7]86-*-rdos*) targ_emul=elf_i386 ;;
-i[3-7]86-*-bsd) targ_emul=i386bsd ;;
-i[3-7]86-*-bsd386) targ_emul=i386bsd ;;
-i[3-7]86-*-bsdi*) targ_emul=i386bsd ;;
-i[3-7]86-*-aout) targ_emul=i386aout ;;
-i[3-7]86-*-linux*aout*) targ_emul=i386linux
- targ_extra_emuls=elf_i386
- tdir_elf_i386=`echo ${targ_alias} | sed -e 's/aout//'` ;;
-i[3-7]86-*-linux*oldld) targ_emul=i386linux; targ_extra_emuls=elf_i386 ;;
-i[3-7]86-*-linux-*) targ_emul=elf_i386
- targ_extra_emuls=i386linux
- targ64_extra_emuls=elf_x86_64
- targ64_extra_libpath=elf_x86_64
- tdir_i386linux=${targ_alias}aout ;;
-x86_64-*-linux-*) targ_emul=elf_x86_64
- targ_extra_emuls="elf_i386 i386linux"
- targ_extra_libpath=elf_i386
- tdir_i386linux=`echo ${targ_alias}aout | sed -e 's/x86_64/i386/'`
- tdir_elf_i386=`echo ${targ_alias} | sed -e 's/x86_64/i386/'` ;;
-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 elf_x86_64"
- targ_extra_libpath=$targ_extra_emuls
- ;;
-i[3-7]86-*-unixware) targ_emul=elf_i386 ;;
-i[3-7]86-*-solaris*) targ_emul=elf_i386_ldso
- targ_extra_emuls="elf_i386"
- targ_extra_libpath=$targ_extra_emuls
- ;;
-i[3-7]86-*-netbsdelf* | \
-i[3-7]86-*-netbsd*-gnu* | \
-i[3-7]86-*-knetbsd*-gnu)
- targ_emul=elf_i386
- targ_extra_emuls=i386nbsd ;;
-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 ;;
-x86_64-*-elf*) targ_emul=elf_x86_64
- targ_extra_emuls=elf_i386
- ;;
-i[3-7]86-*-kaos*) targ_emul=elf_i386 ;;
-i[3-7]86-*-freebsdaout* | i[3-7]86-*-freebsd[12].* | i[3-7]86-*-freebsd[12])
- targ_emul=i386bsd ;;
-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"
- targ_extra_libpath="elf_i386_fbsd"
- tdir_elf_i386_fbsd=`echo ${targ_alias} \
- | sed -e 's/x86_64/i386/'`
- tdir_elf_i386=`echo ${targ_alias} \
- | sed -e 's/x86_64/i386/'` ;;
-i[3-7]86-*-sysv*) targ_emul=i386coff ;;
-i[3-7]86-*-ptx*) targ_emul=i386coff ;;
-i[3-7]86-*-mach*) targ_emul=i386mach ;;
-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" ;;
-x86_64-*-mingw*) targ_emul=i386pep ;
- targ_extra_ofiles="deffilep.o pep-dll.o" ;;
-i[3-7]86-*-interix*) targ_emul=i386pe_posix;
- targ_extra_ofiles="deffilep.o pe-dll.o" ;;
-i[3-7]86-*-beospe*) targ_emul=i386beos ;;
-i[3-7]86-*-beos*) targ_emul=elf_i386_be ;;
-i[3-7]86-*-vxworks*) targ_emul=elf_i386_vxworks ;;
-i[3-7]86-*-chaos) targ_emul=elf_i386_chaos
- ;;
-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
- ;;
-ip2k-*-elf) targ_emul=elf32ip2k
- ;;
-iq2000-*-elf) targ_emul=elf32iq2000 ; targ_extra_emuls="elf32iq10"
- ;;
-m32c-*-elf) targ_emul=elf32m32c
- ;;
-m32r*le-*-elf*) targ_emul=m32rlelf ;;
-m32r*-*-elf*) targ_emul=m32relf ;;
-m32r*le-*-linux-*) targ_emul=m32rlelf_linux ;;
-m32r*-*-linux-*) targ_emul=m32relf_linux
- ;;
-m68hc11-*-*|m6811-*-*) targ_emul=m68hc11elf
- targ_extra_emuls="m68hc11elfb m68hc12elf m68hc12elfb" ;;
-m68hc12-*-*|m6812-*-*) targ_emul=m68hc12elf
- targ_extra_emuls="m68hc12elfb m68hc11elf m68hc11elfb" ;;
-m68*-sun-sunos[34]*) targ_emul=sun3 ;;
-m68*-wrs-vxworks*) targ_emul=sun3 ;;
-m68*-ericsson-ose) targ_emul=sun3 ;;
-m68*-apple-aux*) targ_emul=m68kaux ;;
-m68k-sony-*) targ_emul=news ;;
-m68k-hp-bsd*) targ_emul=hp300bsd ;;
-m68*-motorola-sysv*) targ_emul=delta68 ;;
-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-*) 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*-*-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
- ;;
-m8*-*-*) targ_emul=m88kbcs
- ;;
-maxq-*-coff) targ_emul=maxqcoff
- ;;
-mcore-*-pe) targ_emul=mcorepe ;
- targ_extra_ofiles="deffilep.o pe-dll.o" ;;
-mcore-*-elf) targ_emul=elf32mcore
- ;;
-mep-*-elf) targ_emul=elf32mep ;;
-mips*-*-pe) targ_emul=mipspe ;
- targ_extra_ofiles="deffilep.o pe-dll.o" ;;
-mips*-dec-ultrix*) targ_emul=mipslit ;;
-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=elf32ltsmip
- targ_extra_emuls="elf32btsmip elf64ltsmip elf64btsmip"
- ;;
-mips*-*-netbsd*) targ_emul=elf32btsmip
- targ_extra_emuls="elf32ltsmip elf64btsmip elf64ltsmip"
- ;;
-mips*-*-bsd*) targ_emul=mipsbig ;;
-mips*vr4300el-*-elf*) targ_emul=elf32l4300 ;;
-mips*vr4300-*-elf*) targ_emul=elf32b4300 ;;
-mips*vr4100el-*-elf*) targ_emul=elf32l4300 ;;
-mips*vr4100-*-elf*) targ_emul=elf32b4300 ;;
-mips*vr5000el-*-elf*) targ_emul=elf32l4300 ;;
-mips*vr5000-*-elf*) targ_emul=elf32b4300 ;;
-mips*el-sde-elf*) targ_emul=elf32ltsmip
- targ_extra_emuls="elf32btsmip elf32ltsmipn32 elf64ltsmip elf32btsmipn32 elf64btsmip" ;;
-mips*-sde-elf*) targ_emul=elf32btsmip
- targ_extra_emuls="elf32ltsmip elf32btsmipn32 elf64btsmip elf32ltsmipn32 elf64ltsmip" ;;
-mips*el-*-elf*) targ_emul=elf32elmip ;;
-mips*-*-elf*) targ_emul=elf32ebmip ;;
-mips*-*-rtems*) targ_emul=elf32ebmip ;;
-mips*el-*-vxworks*) targ_emul=elf32elmipvxworks
- targ_extra_emuls="elf32ebmipvxworks" ;;
-mips*-*-vxworks*) targ_emul=elf32ebmipvxworks
- targ_extra_emuls="elf32elmipvxworks" ;;
-mips*-*-windiss) targ_emul=elf32mipswindiss ;;
-mips64*el-*-linux-*) targ_emul=elf32ltsmipn32
- targ_extra_emuls="elf32btsmipn32 elf32ltsmip elf32btsmip elf64ltsmip elf64btsmip"
- targ_extra_libpath=$targ_extra_emuls ;;
-mips64*-*-linux-*) targ_emul=elf32btsmipn32
- targ_extra_emuls="elf32ltsmipn32 elf32btsmip elf32ltsmip elf64btsmip elf64ltsmip"
- targ_extra_libpath=$targ_extra_emuls ;;
-mips*el-*-linux-*) targ_emul=elf32ltsmip
- targ_extra_emuls="elf32btsmip elf32ltsmipn32 elf64ltsmip elf32btsmipn32 elf64btsmip"
- targ_extra_libpath=$targ_extra_emuls ;;
-mips*-*-linux-*) targ_emul=elf32btsmip
- targ_extra_emuls="elf32ltsmip elf32btsmipn32 elf64btsmip elf32ltsmipn32 elf64ltsmip"
- targ_extra_libpath=$targ_extra_emuls ;;
-mips*-*-lnews*) targ_emul=mipslnews ;;
-mips*-*-sysv4*) targ_emul=elf32btsmip
- ;;
-mmix-*-*) targ_emul=mmo
- targ_extra_emuls=elf64mmix
- ;;
-am33_2.0-*-linux*) targ_emul=elf32am33lin ;;
-mn10200-*-*) targ_emul=mn10200 ;;
-mn10300-*-*) targ_emul=mn10300
- ;;
-mt-*elf) targ_emul=elf32mt
- ;;
-msp430-*-*) targ_emul=msp430x110
- targ_extra_emuls="msp430x112 msp430x1101 msp430x1111 msp430x1121 msp430x1122 msp430x1132 msp430x122 msp430x123 msp430x1222 msp430x1232 msp430x133 msp430x135 msp430x1331 msp430x1351 msp430x147 msp430x148 msp430x149 msp430x155 msp430x156 msp430x157 msp430x167 msp430x168 msp430x169 msp430x1610 msp430x1611 msp430x1612 msp430x2101 msp430x2111 msp430x2121 msp430x2131 msp430x311 msp430x312 msp430x313 msp430x314 msp430x315 msp430x323 msp430x325 msp430x336 msp430x337 msp430x412 msp430x413 msp430x415 msp430x417 msp430xE423 msp430xE425 msp430xE427 msp430xW423 msp430xW425 msp430xW427 msp430xG437 msp430xG438 msp430xG439 msp430x435 msp430x436 msp430x437 msp430x447 msp430x448 msp430x449"
- ;;
-ns32k-pc532-mach* | ns32k-pc532-ux*) targ_emul=pc532macha ;;
-ns32k-*-netbsd* | ns32k-pc532-lites*) targ_emul=ns32knbsd
- ;;
-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
- targ64_extra_emuls=elf64ppc
- targ64_extra_libpath=elf64ppc
- ;;
- esac ;;
-powerpc*le-*-elf* | powerpc*le-*-eabi* | powerpc*le-*-solaris* \
- | powerpc*le-*-sysv* | powerpc*le-*-vxworks*)
- case "${targ}" in
- *64*) targ_emul=elf64lppc
- targ_extra_emuls="elf32lppc elf32lppcsim"
- tdir_elf32lppc=`echo "${targ_alias}" | sed -e 's/64//'`
- tdir_elf32lppcsim=$tdir_elf32lppc
- ;;
- *) targ_emul=elf32lppc
- targ_extra_emuls="elf32ppcsim" ;;
- esac ;;
-powerpc*-*-elf* | powerpc*-*-eabi* | powerpc*-*-sysv* \
- | powerpc*-*-netbsd* | powerpc-*-openbsd* | powerpc*-*-kaos*)
- case "${targ}" in
- *64*) targ_emul=elf64ppc
- targ_extra_emuls="elf32ppc elf32ppclinux elf32ppcsim"
- tdir_elf32ppc=`echo "${targ_alias}" | sed -e 's/64//'`
- tdir_elf32ppclinux=$tdir_elf32ppc
- tdir_elf32ppcsim=$tdir_elf32ppc
- ;;
- *) targ_emul=elf32ppc
- targ_extra_emuls="elf32ppclinux elf32ppcsim" ;;
- esac ;;
-powerpc-*-vxworks*)
- targ_emul=elf32ppcvxworks
- targ_extra_emuls="elf32ppc elf32ppclinux elf32ppcsim" ;;
-powerpc-*-nto*) targ_emul=elf32ppcnto ;;
-powerpcle-*-nto*) targ_emul=elf32lppcnto ;;
-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 ;;
-powerpc-*-lynxos*) targ_emul=ppclynx ;;
-rs6000-*-aix5*) targ_emul=aix5rs6 ;;
-rs6000-*-aix*) targ_emul=aixrs6
- ;;
-s390x-*-freebsd*) targ_emul=elf64_s390
- targ_extra_emuls=elf_s390
- targ_extra_libpath=$targ_extra_emuls
- tdir_elf_s390=`echo ${targ_alias} | sed -e 's/s390x/s390/'` ;;
-s390x-*-linux*) targ_emul=elf64_s390
- targ_extra_emuls=elf_s390
- targ_extra_libpath=$targ_extra_emuls
- tdir_elf_s390=`echo ${targ_alias} | sed -e 's/s390x/s390/'` ;;
-s390x-*-tpf*) targ_emul=elf64_s390
- tdir_elf_s390=`echo ${targ_alias} | sed -e 's/s390x/s390/'` ;;
-s390-*-freebsd*) targ_emul=elf_s390
- targ64_extra_emuls=elf64_s390
- targ64_extra_libpath=elf64_s390
- tdir_elf64_s390=`echo ${targ_alias} | sed -e 's/s390/s390x/'`
- ;;
-s390-*-linux*) targ_emul=elf_s390
- targ64_extra_emuls=elf64_s390
- targ64_extra_libpath=elf64_s390
- tdir_elf64_s390=`echo ${targ_alias} | sed -e 's/s390/s390x/'`
- ;;
-score-*-elf) targ_emul=scoreelf ;;
-sh-*-linux*) targ_emul=shlelf_linux
- targ_extra_emuls=shelf_linux
- targ_extra_libpath=shelf_linux ;;
-sh64eb-*-linux*) targ_emul=shelf32_linux
- targ_extra_emuls="shlelf32_linux" ;;
-sh64-*-linux*) targ_emul=shlelf32_linux
- targ_extra_emuls="shelf32_linux"
- targ_extra_libpath=shelf32_linux ;;
-sh*eb-*-linux*) targ_emul=shelf_linux ;;
-sh*-*-linux*) targ_emul=shlelf_linux ;;
-sh5le-*-netbsd*) targ_emul=shlelf32_nbsd
- targ_extra_emuls="shelf32_nbsd shelf64_nbsd shlelf64_nbsd shelf_nbsd shlelf_nbsd" ;;
-sh5-*-netbsd*) targ_emul=shelf32_nbsd
- targ_extra_emuls="shlelf32_nbsd shelf64_nbsd shlelf64_nbsd shelf_nbsd shlelf_nbsd" ;;
-sh64le-*-netbsd*) targ_emul=shlelf64_nbsd
- targ_extra_emuls="shelf64_nbsd shelf32_nbsd shlelf32_nbsd shelf_nbsd shlelf_nbsd" ;;
-sh64-*-netbsd*) targ_emul=shelf64_nbsd
- targ_extra_emuls="shlelf64_nbsd shelf32_nbsd shlelf32_nbsd shelf_nbsd shlelf_nbsd" ;;
-sh*l*-*-netbsdelf*) targ_emul=shlelf_nbsd
- targ_extra_emuls=shelf_nbsd ;;
-sh*-*-netbsdelf*) targ_emul=shelf_nbsd
- targ_extra_emuls=shlelf_nbsd ;;
-sh*-*-symbianelf*) targ_emul=shlsymbian ;;
-shle*-*-elf* | sh[1234]*le*-*-elf | shle*-*-kaos*)
- targ_emul=shlelf
- targ_extra_emuls="shelf shl sh" ;;
-sh-*-rtemscoff*) targ_emul=sh; targ_extra_emuls=shl ;;
-sh-*-elf* | sh[1234]*-*-elf | sh-*-rtems* | sh-*-kaos*)
- targ_emul=shelf
- targ_extra_emuls="shlelf sh shl" ;;
-sh-*-uclinux* | sh[12]-*-uclinux*)
- targ_emul=shelf_uclinux
- targ_extra_emuls="shelf shlelf sh shl" ;;
-sh-*-vxworks) targ_emul=shelf_vxworks
- targ_extra_emuls=shlelf_vxworks ;;
-sh-*-nto*) targ_emul=shelf_nto
- targ_extra_emuls=shlelf_nto ;;
-sh-*-pe) targ_emul=shpe ;
- targ_extra_ofiles="deffilep.o pe-dll.o" ;;
-sh-*-*) targ_emul=sh; targ_extra_emuls=shl ;;
-sh64le-*-elf*) targ_emul=shlelf
- targ_extra_emuls="shelf shlelf32 shelf32 shlelf64 shelf64"
- targ_extra_libpath=$targ_extra_emuls ;;
-sh64-*-elf*) targ_emul=shelf
- targ_extra_emuls="shlelf shelf32 shlelf32 shelf64 shlelf64"
- targ_extra_libpath=$targ_extra_emuls ;;
-sparc64-*-aout*) targ_emul=sparcaout ;;
-sparc64-*-elf*) targ_emul=elf64_sparc ;;
-sparc-sun-sunos4*) targ_emul=sun4 ;;
-sparclite*-*-elf) targ_emul=elf32_sparc ;;
-sparclite*-*-coff) targ_emul=coff_sparc ;;
-sparclite*-fujitsu-*) targ_emul=sparcaout ;;
-sparc*-*-aout) targ_emul=sparcaout ;;
-sparc*-*-coff) targ_emul=coff_sparc ;;
-sparc*-*-elf) targ_emul=elf32_sparc ;;
-sparc*-*-sysv4*) targ_emul=elf32_sparc ;;
-sparc*-*-vxworks*) targ_emul=elf32_sparc_vxworks ;;
-sparc64-*-freebsd* | sparcv9-*-freebsd* | sparc64-*-kfreebsd*-gnu | sparcv9-*-kfreebsd*-gnu)
- targ_emul=elf64_sparc_fbsd
- targ_extra_emuls="elf64_sparc elf32_sparc"
- targ_extra_libpath=$targ_extra_emuls
- tdir_elf32_sparc=`echo ${targ_alias} | sed -e 's/64//'` ;;
-sparc*-*-linux*aout*) targ_emul=sparclinux
- targ_extra_emuls="elf32_sparc sun4"
- tdir_elf32_sparc=`echo ${targ_alias} | sed -e 's/aout//'`
- tdir_sun4=sparc-sun-sunos4 ;;
-sparc64-*-linux-*) targ_emul=elf64_sparc
- targ_extra_emuls="elf32_sparc sparclinux sun4"
- targ_extra_libpath=elf32_sparc
- tdir_elf32_sparc=`echo ${targ_alias} | sed -e 's/64//'`
- tdir_sparclinux=${tdir_elf32_sparc}aout
- tdir_sun4=sparc-sun-sunos4 ;;
-sparc*-*-linux-*) targ_emul=elf32_sparc
- targ_extra_emuls="sparclinux elf64_sparc sun4"
- targ_extra_libpath=elf64_sparc
- tdir_sparclinux=${targ_alias}aout
- tdir_elf64_sparc=`echo ${targ_alias} | sed -e 's/32//'`
- tdir_sun4=sparc-sun-sunos4 ;;
-sparc64-*-netbsd* | sparc64-*-openbsd*)
- targ_emul=elf64_sparc
- targ_extra_emuls="elf32_sparc" ;;
-sparc*-*-netbsd*elf*) targ_emul=elf32_sparc ;;
-sparc*-*-netbsd*) targ_emul=sparcnbsd ;;
-sparc-*-solaris2.[0-6] | sparc-*-solaris2.[0-6].*)
- targ_emul=elf32_sparc ;;
-sparc-*-solaris2*) targ_emul=elf32_sparc
- targ_extra_emuls="elf64_sparc"
- targ_extra_libpath=$targ_extra_emuls
- tdir_elf64_sparc=`echo ${targ_alias} | sed -e 's/32//'` ;;
-sparcv9-*-solaris2* | sparc64-*-solaris2*)
- targ_emul=elf64_sparc
- targ_extra_emuls="elf32_sparc"
- targ_extra_libpath=$targ_extra_emuls
- tdir_elf32_sparc=`echo ${targ_alias} | sed -e 's/64//'` ;;
-sparc*-*-solaris2*) targ_emul=elf32_sparc ;;
-sparc*-wrs-vxworks*) targ_emul=sparcaout ;;
-sparc*-*-rtems*) targ_emul=elf32_sparc
- ;;
-spu-*-elf*) targ_emul=elf32_spu ;;
-tic30-*-*aout*) targ_emul=tic30aout ;;
-tic30-*-*coff*) targ_emul=tic30coff ;;
-tic4x-*-* | c4x-*-*) targ_emul=tic4xcoff ; targ_extra_emuls="tic3xcoff tic3xcoff_onchip" ;;
-tic54x-*-* | c54x*-*-*) targ_emul=tic54xcoff ;;
-tic80-*-*) targ_emul=tic80coff
- ;;
-v850-*-*) targ_emul=v850 ;;
-v850e-*-*) targ_emul=v850 ;;
-v850ea-*-*) targ_emul=v850
- ;;
-vax-dec-ultrix* | vax-dec-bsd*) targ_emul=vax ;;
-vax-*-netbsdelf*) targ_emul=elf32vax
- targ_extra_emuls=vaxnbsd ;;
-vax-*-netbsdaout* | vax-*-netbsd*)
- targ_emul=vaxnbsd
- targ_extra_emuls=elf32vax ;;
-vax-*-linux-*) targ_emul=elf32vax
- ;;
-w65-*-*) targ_emul=w65
- ;;
-xc16x-*-elf) targ_emul=elf32xc16x
- targ_extra_emuls="elf32xc16xl elf32xc16xs"
- ;;
-xstormy16-*-*) targ_emul=elf32xstormy16
- ;;
-xtensa-*-*) targ_emul=elf32xtensa
- ;;
-z80-*-coff) targ_emul=z80
- ;;
-z8k-*-coff) targ_emul=z8002; targ_extra_emuls=z8001
- ;;
-*-*-ieee*) targ_emul=vanilla
- ;;
-*-tandem-none) targ_emul=st2000
- ;;
-*)
- echo 2>&1 "*** ld does not support target ${targ}"
- echo 2>&1 "*** see ld/configure.tgt for supported targets"
- 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'
- ;;
-
-spu-*-elf*)
- # This allows to build a pair of PPU/SPU toolchains with common sysroot.
- NATIVE_LIB_DIRS='/usr/spu/lib'
- ;;
-
-i[03-9x]86-*-cygwin*)
- NATIVE_LIB_DIRS='/usr/lib /usr/lib/w32api'
- ;;
-
-*-*-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 6db8bf79d035..000000000000
--- 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, 51 Franklin Street - Fifth Floor, Boston, MA
- 02110-1301, 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, flag_forward;
-} 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 80efb789f02a..000000000000
--- a/contrib/binutils/ld/deffilep.y
+++ /dev/null
@@ -1,1076 +0,0 @@
-%{ /* deffilep.y - parser for .def files */
-
-/* Copyright 1995, 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2005, 2007
- 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., 51 Franklin Street - Fifth Floor, Boston, MA 02110-1301, USA. */
-
-#include "sysdep.h"
-#include "libiberty.h"
-#include "safe-ctype.h"
-#include "bfd.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_image_name (const char *, int, int);
-static void def_section (const char *, int);
-static void def_section_alt (const char *, const char *);
-static void def_stacksize (int, int);
-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_image_name ($2, $3, 0); }
- | LIBRARY opt_name opt_base { def_image_name ($2, $3, 1); }
- | DESCRIPTION ID { def_description ($2);}
- | STACKSIZE NUMBER opt_number { def_stacksize ($2, $3);}
- | HEAPSIZE NUMBER opt_number { def_heapsize ($2, $3);}
- | 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_image_name (const char *name, int base, int is_dll)
-{
- /* If a LIBRARY or NAME statement is specified without a name, there is nothing
- to do here. We retain the output filename specified on command line. */
- if (*name)
- {
- const char* image_name = lbasename (name);
- if (image_name != name)
- einfo ("%s:%d: Warning: path components stripped from %s, '%s'\n",
- def_filename, linenumber, is_dll ? "LIBRARY" : "NAME",
- name);
- if (def->name)
- free (def->name);
- /* Append the default suffix, if none specified. */
- if (strchr (image_name, '.') == 0)
- {
- const char * suffix = is_dll ? ".dll" : ".exe";
-
- def->name = xmalloc (strlen (image_name) + strlen (suffix) + 1);
- sprintf (def->name, "%s%s", image_name, suffix);
- }
- else
- def->name = xstrdup (image_name);
- }
-
- /* Honor a BASE address statement, even if LIBRARY string is empty. */
- def->base_address = base;
- def->is_dll = is_dll;
-}
-
-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 0bf6ffe39505..000000000000
--- a/contrib/binutils/ld/dep-in.sed
+++ /dev/null
@@ -1,21 +0,0 @@
-:loop
-/\\$/N
-/\\$/b loop
-
-s! \./! !g
-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 b3d6d26c4e0e..000000000000
--- 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 141923f71708..000000000000
--- 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 6c524c9a762a..000000000000
--- a/contrib/binutils/ld/emulparams/arcelf.sh
+++ /dev/null
@@ -1,12 +0,0 @@
-SCRIPT_NAME=elf
-TEMPLATE_NAME=generic
-EXTRA_EM_FILE=genelf
-OUTPUT_FORMAT="elf32-littlearc"
-LITTLE_OUTPUT_FORMAT="elf32-littlearc"
-BIG_OUTPUT_FORMAT="elf32-bigarc"
-TEXT_START_ADDR=0x0
-MAXPAGESIZE="CONSTANT (MAXPAGESIZE)"
-NONPAGED_TEXT_START_ADDR=0x0
-ARCH=arc
-MACHINE=
-ENTRY=start
diff --git a/contrib/binutils/ld/emulparams/arm_wince_pe.sh b/contrib/binutils/ld/emulparams/arm_wince_pe.sh
deleted file mode 100644
index 2d0019fc47af..000000000000
--- a/contrib/binutils/ld/emulparams/arm_wince_pe.sh
+++ /dev/null
@@ -1,14 +0,0 @@
-ARCH=arm
-SCRIPT_NAME=pe
-
-OUTPUT_FORMAT="pei-arm-wince-little"
-LITTLE_OUTPUT_FORMAT="pei-arm-wince-little"
-BIG_OUTPUT_FORMAT="pei-arm-wince-big"
-
-RELOCATEABLE_OUTPUT_FORMAT="pe-arm-wince-little"
-
-TEMPLATE_NAME=pe
-ENTRY="WinMainCRTStartup"
-SUBSYSTEM=PE_DEF_SUBSYSTEM
-INITIAL_SYMBOL_CHAR=\"\"
-TARGET_PAGE_SIZE=0x1000
diff --git a/contrib/binutils/ld/emulparams/armaoutb.sh b/contrib/binutils/ld/emulparams/armaoutb.sh
deleted file mode 100644
index 59ab6f14f607..000000000000
--- 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 9501f33ec2a2..000000000000
--- 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 91df7d3c41d4..000000000000
--- 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 ba9fdbe3ff4a..000000000000
--- a/contrib/binutils/ld/emulparams/armelf.sh
+++ /dev/null
@@ -1,35 +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) *(.vfp11_veneer)'
-OTHER_BSS_SYMBOLS='__bss_start__ = .;'
-OTHER_BSS_END_SYMBOLS='_bss_end__ = . ; __bss_end__ = . ;'
-OTHER_END_SYMBOLS='__end__ = . ;'
-OTHER_SECTIONS='.note.gnu.arm.ident 0 : { KEEP (*(.note.gnu.arm.ident)) }'
-ATTRS_SECTIONS='.ARM.attributes 0 : { KEEP (*(.ARM.attributes)) KEEP (*(.gnu.attributes)) }'
-OTHER_READONLY_SECTIONS="
- .ARM.extab ${RELOCATING-0} : { *(.ARM.extab${RELOCATING+* .gnu.linkonce.armextab.*}) }
- ${RELOCATING+ __exidx_start = .; }
- .ARM.exidx ${RELOCATING-0} : { *(.ARM.exidx${RELOCATING+* .gnu.linkonce.armexidx.*}) }
- ${RELOCATING+ __exidx_end = .; }"
-
-DATA_START_SYMBOLS='__data_start = . ;';
-
-GENERATE_SHLIB_SCRIPT=yes
-
-ARCH=arm
-MACHINE=
-MAXPAGESIZE="CONSTANT (MAXPAGESIZE)"
-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 ee9520dc4a90..000000000000
--- a/contrib/binutils/ld/emulparams/armelf_fbsd.sh
+++ /dev/null
@@ -1,3 +0,0 @@
-. ${srcdir}/emulparams/armelf.sh
-. ${srcdir}/emulparams/elf_fbsd.sh
-TARGET2_TYPE=got-rel
diff --git a/contrib/binutils/ld/emulparams/armelf_linux.sh b/contrib/binutils/ld/emulparams/armelf_linux.sh
deleted file mode 100644
index e7f301fd37ca..000000000000
--- a/contrib/binutils/ld/emulparams/armelf_linux.sh
+++ /dev/null
@@ -1,24 +0,0 @@
-ARCH=arm
-SCRIPT_NAME=elf
-OUTPUT_FORMAT="elf32-littlearm"
-BIG_OUTPUT_FORMAT="elf32-bigarm"
-LITTLE_OUTPUT_FORMAT="elf32-littlearm"
-MAXPAGESIZE="CONSTANT (MAXPAGESIZE)"
-COMMONPAGESIZE="CONSTANT (COMMONPAGESIZE)"
-TEMPLATE_NAME=elf32
-EXTRA_EM_FILE=armelf
-GENERATE_SHLIB_SCRIPT=yes
-GENERATE_PIE_SCRIPT=yes
-
-DATA_START_SYMBOLS='__data_start = . ;';
-OTHER_TEXT_SECTIONS='*(.glue_7t) *(.glue_7) *(.vfp11_veneer)'
-OTHER_BSS_SYMBOLS='__bss_start__ = .;'
-OTHER_BSS_END_SYMBOLS='_bss_end__ = . ; __bss_end__ = . ;'
-OTHER_END_SYMBOLS='__end__ = . ;'
-OTHER_SECTIONS='.note.gnu.arm.ident 0 : { KEEP (*(.note.gnu.arm.ident)) }'
-
-TEXT_START_ADDR=0x00008000
-TARGET2_TYPE=got-rel
-
-# ARM does not support .s* sections.
-NO_SMALL_DATA=yes
diff --git a/contrib/binutils/ld/emulparams/armelf_nbsd.sh b/contrib/binutils/ld/emulparams/armelf_nbsd.sh
deleted file mode 100644
index 517cd626594c..000000000000
--- a/contrib/binutils/ld/emulparams/armelf_nbsd.sh
+++ /dev/null
@@ -1,7 +0,0 @@
-. ${srcdir}/emulparams/armelf.sh
-MAXPAGESIZE="CONSTANT (MAXPAGESIZE)"
-TEXT_START_ADDR=0x00008000
-TARGET2_TYPE=got-rel
-
-unset STACK_ADDR
-unset EMBEDDED
diff --git a/contrib/binutils/ld/emulparams/armelfb_nbsd.sh b/contrib/binutils/ld/emulparams/armelfb_nbsd.sh
deleted file mode 100644
index 7ab6ce06a51e..000000000000
--- 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 fc2779164a0e..000000000000
--- 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 5db5faf3468d..000000000000
--- a/contrib/binutils/ld/emulparams/armpe.sh
+++ /dev/null
@@ -1,15 +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=\"_\"
-
-TARGET_PAGE_SIZE=0x1000
diff --git a/contrib/binutils/ld/emulparams/avr6.sh b/contrib/binutils/ld/emulparams/avr6.sh
deleted file mode 100644
index 5326488ec474..000000000000
--- a/contrib/binutils/ld/emulparams/avr6.sh
+++ /dev/null
@@ -1,11 +0,0 @@
-ARCH=avr:6
-MACHINE=
-SCRIPT_NAME=avr
-OUTPUT_FORMAT="elf32-avr"
-MAXPAGESIZE=1
-EMBEDDED=yes
-TEMPLATE_NAME=elf32
-
-TEXT_LENGTH=1024K
-DATA_LENGTH=0xffa0
-EXTRA_EM_FILE=avrelf
diff --git a/contrib/binutils/ld/emulparams/coff_sparc.sh b/contrib/binutils/ld/emulparams/coff_sparc.sh
deleted file mode 100644
index 0cf852a7b215..000000000000
--- 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 d09d9dc7edb9..000000000000
--- a/contrib/binutils/ld/emulparams/elf32_sparc.sh
+++ /dev/null
@@ -1,17 +0,0 @@
-# If you change this file, please also look at files which source this one:
-# elf32_sparc_vxworks.sh
-
-SCRIPT_NAME=elf
-OUTPUT_FORMAT="elf32-sparc"
-TEXT_START_ADDR=0x10000
-MAXPAGESIZE="CONSTANT (MAXPAGESIZE)"
-COMMONPAGESIZE="CONSTANT (COMMONPAGESIZE)"
-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/elf32_spu.sh b/contrib/binutils/ld/emulparams/elf32_spu.sh
deleted file mode 100644
index 4af608cb2e17..000000000000
--- a/contrib/binutils/ld/emulparams/elf32_spu.sh
+++ /dev/null
@@ -1,20 +0,0 @@
-SCRIPT_NAME=elf
-TEMPLATE_NAME=elf32
-EXTRA_EM_FILE=spuelf
-OUTPUT_FORMAT="elf32-spu"
-ARCH=spu
-MACHINE=
-ALIGNMENT=16
-TEXT_START_ADDR=0
-INITIAL_READONLY_SECTIONS='.interrupt : { KEEP(*(.interrupt)) }'
-if test -z "${CREATE_SHLIB}"; then
- INITIAL_READONLY_SECTIONS="${INITIAL_READONLY_SECTIONS}
- .interp ${RELOCATING-0} : { *(.interp) }"
-fi
-OTHER_END_SYMBOLS='PROVIDE (__stack = 0x3fff0);'
-NO_SMALL_DATA=true
-EMBEDDED=true
-MAXPAGESIZE=0x80
-DATA_ADDR="ALIGN(${MAXPAGESIZE})"
-OTHER_BSS_SECTIONS=".toe ALIGN(128) : { *(.toe) } = 0"
-OTHER_SECTIONS=".note.spu_name 0 : { KEEP(*(.note.spu_name)) }"
diff --git a/contrib/binutils/ld/emulparams/elf32b4300.sh b/contrib/binutils/ld/emulparams/elf32b4300.sh
deleted file mode 100644
index d3e43547dd36..000000000000
--- 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 ce33674cf93c..000000000000
--- a/contrib/binutils/ld/emulparams/elf32bmip.sh
+++ /dev/null
@@ -1,63 +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
-# elf32ebmipvxworks.sh elf32elmipvxworks.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="CONSTANT (MAXPAGESIZE)"
-COMMONPAGESIZE="CONSTANT (COMMONPAGESIZE)"
-NONPAGED_TEXT_START_ADDR=0x0400000
-SHLIB_TEXT_START_ADDR=0x5ffe0000
-TEXT_DYNAMIC=
-INITIAL_READONLY_SECTIONS=
-if test -z "${CREATE_SHLIB}"; then
- INITIAL_READONLY_SECTIONS=".interp ${RELOCATING-0} : { *(.interp) }"
-fi
-INITIAL_READONLY_SECTIONS="${INITIAL_READONLY_SECTIONS}
- .reginfo ${RELOCATING-0} : { *(.reginfo) }
-"
-OTHER_TEXT_SECTIONS='*(.mips16.fn.*) *(.mips16.call.*)'
-# Unlike most targets, the MIPS backend puts all dynamic relocations
-# in a single dynobj section, which it also calls ".rel.dyn". It does
-# this so that it can easily sort all dynamic relocations before the
-# output section has been populated.
-OTHER_GOT_RELOC_SECTIONS="
- .rel.dyn ${RELOCATING-0} : { *(.rel.dyn) }
-"
-# If the output has a GOT section, there must be exactly 0x7ff0 bytes
-# between .got and _gp. The ". = ." below stops the orphan code from
-# inserting other sections between the assignment to _gp and the start
-# of .got.
-OTHER_GOT_SYMBOLS='
- . = .;
- _gp = ALIGN(16) + 0x7ff0;
-'
-OTHER_SDATA_SECTIONS="
- .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) }
- .mdebug.abi32 : { KEEP(*(.mdebug.abi32)) }
- .mdebug.abiN32 : { KEEP(*(.mdebug.abiN32)) }
- .mdebug.abi64 : { KEEP(*(.mdebug.abi64)) }
- .mdebug.abiO64 : { KEEP(*(.mdebug.abiO64)) }
- .mdebug.eabi32 : { KEEP(*(.mdebug.eabi32)) }
- .mdebug.eabi64 : { KEEP(*(.mdebug.eabi64)) }
- .gcc_compiled_long32 : { KEEP(*(.gcc_compiled_long32)) }
- .gcc_compiled_long64 : { KEEP(*(.gcc_compiled_long64)) }
-'
-ARCH=mips
-MACHINE=
-TEMPLATE_NAME=elf32
-EXTRA_EM_FILE=mipself
-GENERATE_SHLIB_SCRIPT=yes
-GENERATE_PIE_SCRIPT=yes
diff --git a/contrib/binutils/ld/emulparams/elf32bmip_fbsd.sh b/contrib/binutils/ld/emulparams/elf32bmip_fbsd.sh
deleted file mode 100755
index a1281021039d..000000000000
--- a/contrib/binutils/ld/emulparams/elf32bmip_fbsd.sh
+++ /dev/null
@@ -1,3 +0,0 @@
-. ${srcdir}/emulparams/elf32bmip.sh
-. ${srcdir}/emulparams/elf_fbsd.sh
-GENERATE_PIE_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 49d2f8545da5..000000000000
--- a/contrib/binutils/ld/emulparams/elf32bmipn32-defs.sh
+++ /dev/null
@@ -1,77 +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
-EXTRA_EM_FILE=mipself
-
-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
-GENERATE_PIE_SCRIPT=yes
-
-TEXT_START_ADDR=0x10000000
-MAXPAGESIZE="CONSTANT (MAXPAGESIZE)"
-ENTRY=__start
-
-# Unlike most targets, the MIPS backend puts all dynamic relocations
-# in a single dynobj section, which it also calls ".rel.dyn". It does
-# this so that it can easily sort all dynamic relocations before the
-# output section has been populated.
-OTHER_GOT_RELOC_SECTIONS="
- .rel.dyn ${RELOCATING-0} : { *(.rel.dyn) }
-"
-# GOT-related settings.
-# If the output has a GOT section, there must be exactly 0x7ff0 bytes
-# between .got and _gp. The ". = ." below stops the orphan code from
-# inserting other sections between the assignment to _gp and the start
-# of .got.
-OTHER_GOT_SYMBOLS='
- . = .;
- _gp = ALIGN(16) + 0x7ff0;
-'
-OTHER_SDATA_SECTIONS="
- .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=
-if test -z "${CREATE_SHLIB}"; then
- INITIAL_READONLY_SECTIONS=".interp ${RELOCATING-0} : { *(.interp) }"
-fi
-INITIAL_READONLY_SECTIONS="${INITIAL_READONLY_SECTIONS}
- .reginfo ${RELOCATING-0} : { *(.reginfo) }"
-# Discard any .MIPS.content* or .MIPS.events* sections. The linker
-# doesn't know how to adjust them.
-OTHER_SECTIONS="/DISCARD/ : { *(.MIPS.content*) *(.MIPS.events*) }"
-
-TEXT_DYNAMIC=
diff --git a/contrib/binutils/ld/emulparams/elf32bmipn32.sh b/contrib/binutils/ld/emulparams/elf32bmipn32.sh
deleted file mode 100755
index c26b6b3dcb2e..000000000000
--- 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="CONSTANT (COMMONPAGESIZE)"
-
-# 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 dfe0fe06af14..000000000000
--- 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 e29e045daa74..000000000000
--- a/contrib/binutils/ld/emulparams/elf32btsmip.sh
+++ /dev/null
@@ -1,10 +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"
-unset DATA_ADDR
-SHLIB_TEXT_START_ADDR=0
-ENTRY=__start
diff --git a/contrib/binutils/ld/emulparams/elf32btsmipn32.sh b/contrib/binutils/ld/emulparams/elf32btsmipn32.sh
deleted file mode 100644
index 10c5565cc432..000000000000
--- 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="CONSTANT (COMMONPAGESIZE)"
-
-# 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/elf32cr16.sh b/contrib/binutils/ld/emulparams/elf32cr16.sh
deleted file mode 100644
index 756d02bf568c..000000000000
--- a/contrib/binutils/ld/emulparams/elf32cr16.sh
+++ /dev/null
@@ -1,6 +0,0 @@
-SCRIPT_NAME=elf32cr16
-TEMPLATE_NAME=elf32
-OUTPUT_FORMAT="elf32-cr16"
-ARCH=cr16
-ENTRY=_start
-EXTRA_EM_FILE=cr16elf
diff --git a/contrib/binutils/ld/emulparams/elf32ebmip.sh b/contrib/binutils/ld/emulparams/elf32ebmip.sh
deleted file mode 100644
index 704b43ed5756..000000000000
--- 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 c94e503d6041..000000000000
--- 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 865792af83ad..000000000000
--- 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 14d4ded7f9c5..000000000000
--- 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 18cce4898eeb..000000000000
--- 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 e74385294316..000000000000
--- 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 62e4f98dcf02..000000000000
--- 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 4a660f093ec1..000000000000
--- 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 276477d2cc64..000000000000
--- 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/elf32mep.sh b/contrib/binutils/ld/emulparams/elf32mep.sh
deleted file mode 100755
index 886ca4728515..000000000000
--- a/contrib/binutils/ld/emulparams/elf32mep.sh
+++ /dev/null
@@ -1,55 +0,0 @@
-MACHINE=
-SCRIPT_NAME=mep
-OUTPUT_FORMAT="elf32-mep"
-TEXT_START_ADDR=0x1000
-ARCH=mep
-MAXPAGESIZE=256
-ENTRY=_start
-EMBEDDED=yes
-TEMPLATE_NAME=elf32
-DATA_START_SYMBOLS='__data_start = . ;'
-OTHER_GOT_SYMBOLS='
- . = ALIGN(4);
- __sdabase = . + 0x8000;
- .srodata : { *(.srodata) *(.srodata.*) *(.gnu.linkonce.srd.*) }
-'
-OTHER_SDATA_SECTIONS='
- PROVIDE (__sdabase = .);
- __assert_tiny_size = ASSERT ((. < __sdabase) || ((. - __sdabase) <= 0x8000),
- "tiny section overflow");
-'
-OTHER_READONLY_SECTIONS='
- __stack = 0x001ffff0;
- __stack_size = 0x100000;
- __stack0 = (__stack - (0 * (__stack_size / 1)) + 15) / 16 * 16;
-
- .rostacktab :
- {
- /* Emit a table describing the location of the different stacks.
- Only 1 processor in the default configuration. */
- . = ALIGN(4);
- __stack_table = .;
- LONG (__stack0);
- }
-'
-OTHER_END_SYMBOLS='
- PROVIDE (__heap = _end);
- PROVIDE (__heap_end = 0);
-'
-OTHER_TEXT_SECTIONS='
- *(.ftext) *(.ftext.*) *(.gnu.linkonce.ft.*)
- . = ALIGN(8);
- *(.vftext) *(.vftext.*) *(.gnu.linkonce.vf.*)
- *(.frodata) *(.frodata.*) *(.gnu.linkonce.frd.*)
-'
-OTHER_READWRITE_SECTIONS='
- . = ALIGN(4);
- __tpbase = .;
- .based : { *(.based) *(.based.*) *(.gnu.linkonce.based.*) }
- __assert_based_size = ASSERT ((. - __tpbase) <= 0x80, "based section overflow");
- .far : { *(.far) *(.far.*) *(.gnu.linkonce.far.*) }
-'
-OTHER_BSS_SECTIONS='
- __assert_near_size = ASSERT (. <= 0x1000000, "near section overflow");
- .farbss : { PROVIDE (__farbss_start = .); *(.farbss) *(.farbss.*) PROVIDE (__farbss_end = .); }
-'
diff --git a/contrib/binutils/ld/emulparams/elf32mipswindiss.sh b/contrib/binutils/ld/emulparams/elf32mipswindiss.sh
deleted file mode 100644
index 4f1148b95188..000000000000
--- 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 68962d7325d7..000000000000
--- a/contrib/binutils/ld/emulparams/elf32ppc.sh
+++ /dev/null
@@ -1,16 +0,0 @@
-# If you change this file, please also look at files which source this one:
-# elf32lppcnto.sh elf32lppc.sh elf32ppclinux.sh elf32ppcnto.sh
-# elf32ppcsim.sh
-
-. ${srcdir}/emulparams/elf32ppccommon.sh
-# Yes, we want duplicate .got and .plt sections. The linker chooses the
-# appropriate one magically in ppc_after_open
-DATA_GOT=
-SDATA_GOT=
-SEPARATE_GOTPLT=0
-BSS_PLT=
-GOT=".got ${RELOCATING-0} : SPECIAL { *(.got) }"
-PLT=".plt ${RELOCATING-0} : SPECIAL { *(.plt) }"
-GOTPLT="${PLT}"
-OTHER_TEXT_SECTIONS="*(.glink)"
-EXTRA_EM_FILE=ppc32elf
diff --git a/contrib/binutils/ld/emulparams/elf32ppc_fbsd.sh b/contrib/binutils/ld/emulparams/elf32ppc_fbsd.sh
deleted file mode 100644
index 2f8b72e63829..000000000000
--- a/contrib/binutils/ld/emulparams/elf32ppc_fbsd.sh
+++ /dev/null
@@ -1,4 +0,0 @@
-. ${srcdir}/emulparams/elf32ppc.sh
-. ${srcdir}/emulparams/elf_fbsd.sh
-
-OUTPUT_FORMAT="elf32-powerpc-freebsd"
diff --git a/contrib/binutils/ld/emulparams/elf32ppccommon.sh b/contrib/binutils/ld/emulparams/elf32ppccommon.sh
deleted file mode 100644
index 1a12890b0639..000000000000
--- a/contrib/binutils/ld/emulparams/elf32ppccommon.sh
+++ /dev/null
@@ -1,49 +0,0 @@
-# The PLT-agnostic parts of a generic 32-bit ELF PowerPC target. Included by:
-# elf32ppc.sh elf32ppcvxworks.sh
-TEMPLATE_NAME=elf32
-GENERATE_SHLIB_SCRIPT=yes
-GENERATE_PIE_SCRIPT=yes
-SCRIPT_NAME=elf
-OUTPUT_FORMAT="elf32-powerpc"
-TEXT_START_ADDR=0x01800000
-MAXPAGESIZE="CONSTANT (MAXPAGESIZE)"
-COMMONPAGESIZE="CONSTANT (COMMONPAGESIZE)"
-ARCH=powerpc:common
-MACHINE=
-EXECUTABLE_SYMBOLS='PROVIDE (__stack = 0); PROVIDE (___stack = 0);'
-if test -z "${CREATE_SHLIB}"; then
- SDATA_START_SYMBOLS="PROVIDE (_SDA_BASE_ = 32768);"
- SDATA2_START_SYMBOLS="PROVIDE (_SDA2_BASE_ = 32768);"
- SBSS_START_SYMBOLS="PROVIDE (__sbss_start = .); PROVIDE (___sbss_start = .);"
- SBSS_END_SYMBOLS="PROVIDE (__sbss_end = .); PROVIDE (___sbss_end = .);"
-else
- unset SDATA_START_SYMBOLS
- unset SDATA2_START_SYMBOLS
- unset SBSS_START_SYMBOLS
- unset SBSS_END_SYMBOLS
-fi
-OTHER_END_SYMBOLS="__end = .;"
-OTHER_RELRO_SECTIONS="
- .fixup ${RELOCATING-0} : { *(.fixup) }
- .got1 ${RELOCATING-0} : { *(.got1) }
- .got2 ${RELOCATING-0} : { *(.got2) }
-"
-OTHER_GOT_RELOC_SECTIONS="
- .rela.got1 ${RELOCATING-0} : { *(.rela.got1) }
- .rela.got2 ${RELOCATING-0} : { *(.rela.got2) }
-"
-
-# Treat a host that matches the target with the possible exception of "64"
-# in the name as if it were native.
-if test `echo "$host" | sed -e s/64//` = `echo "$target" | sed -e s/64//`; then
- case " $EMULATION_LIBPATH " in
- *" ${EMULATION_NAME} "*)
- NATIVE=yes
- ;;
- esac
-fi
-
-# Look for 64 bit target libraries in /lib64, /usr/lib64 etc., first.
-case "$EMULATION_NAME" in
- *64*) LIBPATH_SUFFIX=64 ;;
-esac
diff --git a/contrib/binutils/ld/emulparams/elf32ppclinux.sh b/contrib/binutils/ld/emulparams/elf32ppclinux.sh
deleted file mode 100644
index 262731ab32e6..000000000000
--- 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_END_SYMBOLS
-test -z "${RELOCATING}" || OTHER_SECTIONS="/DISCARD/ : { *(.fixup) }"
-OTHER_RELRO_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 c3466cfaf17c..000000000000
--- 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 7e5e54d391ed..000000000000
--- a/contrib/binutils/ld/emulparams/elf64_ia64.sh
+++ /dev/null
@@ -1,39 +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="CONSTANT (MAXPAGESIZE)"
-# FIXME: It interferes with linker relaxation. Disable it until it is
-# fixed.
-if test "0" = "1" -a -n "$CREATE_SHLIB"; then
- # Optimize shared libraries for 16K page size
- COMMONPAGESIZE="CONSTANT (COMMONPAGESIZE)"
-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.*}) }"
-# Intel C++ compiler, prior to 9.0, puts small data in .ctors and
-# .dtors. They have to be next to .sbss/.sbss2/.sdata/.sdata2.
-SMALL_DATA_CTOR=" "
-SMALL_DATA_DTOR=" "
diff --git a/contrib/binutils/ld/emulparams/elf64_ia64_fbsd.sh b/contrib/binutils/ld/emulparams/elf64_ia64_fbsd.sh
deleted file mode 100644
index a7e2675e920d..000000000000
--- a/contrib/binutils/ld/emulparams/elf64_ia64_fbsd.sh
+++ /dev/null
@@ -1,7 +0,0 @@
-. ${srcdir}/emulparams/elf64_ia64.sh
-TEXT_START_ADDR="0x2000000000000000"
-unset DATA_ADDR
-unset SMALL_DATA_CTOR
-unset SMALL_DATA_DTOR
-. ${srcdir}/emulparams/elf_fbsd.sh
-OUTPUT_FORMAT="elf64-ia64-freebsd"
diff --git a/contrib/binutils/ld/emulparams/elf64_s390.sh b/contrib/binutils/ld/emulparams/elf64_s390.sh
deleted file mode 100644
index a26bbb63e0de..000000000000
--- a/contrib/binutils/ld/emulparams/elf64_s390.sh
+++ /dev/null
@@ -1,35 +0,0 @@
-SCRIPT_NAME=elf
-ELFSIZE=64
-OUTPUT_FORMAT="elf64-s390"
-TEXT_START_ADDR=0x80000000
-MAXPAGESIZE="CONSTANT (MAXPAGESIZE)"
-COMMONPAGESIZE="CONSTANT (COMMONPAGESIZE)"
-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_s390_fbsd.sh b/contrib/binutils/ld/emulparams/elf64_s390_fbsd.sh
deleted file mode 100755
index c0191ebc9eba..000000000000
--- a/contrib/binutils/ld/emulparams/elf64_s390_fbsd.sh
+++ /dev/null
@@ -1,2 +0,0 @@
-. ${srcdir}/emulparams/elf64_s390.sh
-. ${srcdir}/emulparams/elf_fbsd.sh
diff --git a/contrib/binutils/ld/emulparams/elf64_sparc.sh b/contrib/binutils/ld/emulparams/elf64_sparc.sh
deleted file mode 100644
index cef4bff96e1b..000000000000
--- 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="CONSTANT (MAXPAGESIZE)"
-COMMONPAGESIZE="CONSTANT (COMMONPAGESIZE)"
-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 21d13ab49853..000000000000
--- a/contrib/binutils/ld/emulparams/elf64_sparc_fbsd.sh
+++ /dev/null
@@ -1,4 +0,0 @@
-. ${srcdir}/emulparams/elf64_sparc.sh
-. ${srcdir}/emulparams/elf_fbsd.sh
-
-OUTPUT_FORMAT="elf64-sparc-freebsd"
diff --git a/contrib/binutils/ld/emulparams/elf64alpha.sh b/contrib/binutils/ld/emulparams/elf64alpha.sh
deleted file mode 100644
index 2c3b7d4dd2b6..000000000000
--- a/contrib/binutils/ld/emulparams/elf64alpha.sh
+++ /dev/null
@@ -1,27 +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="CONSTANT (MAXPAGESIZE)"
-COMMONPAGESIZE="CONSTANT (COMMONPAGESIZE)"
-NONPAGED_TEXT_START_ADDR="0x120000000"
-ARCH=alpha
-MACHINE=
-GENERATE_SHLIB_SCRIPT=yes
-GENERATE_PIE_SCRIPT=yes
-
-# Yes, we want duplicate .plt sections. The linker chooses the
-# appropriate one magically in alpha_after_open.
-PLT=".plt ${RELOCATING-0} : SPECIAL { *(.plt) }"
-DATA_PLT=yes
-TEXT_PLT=yes
-
-# Note that the number is always big-endian, thus we have to
-# reverse the digit string.
-NOP=0x0000fe2f1f04ff47 # unop; nop
-
-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 fd4a0a41eb4a..000000000000
--- 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 8116f48b7cc1..000000000000
--- 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-defs.sh b/contrib/binutils/ld/emulparams/elf64bmip-defs.sh
deleted file mode 100644
index 73094be08593..000000000000
--- a/contrib/binutils/ld/emulparams/elf64bmip-defs.sh
+++ /dev/null
@@ -1,11 +0,0 @@
-. ${srcdir}/emulparams/elf32bmipn32-defs.sh
-COMMONPAGESIZE="CONSTANT (COMMONPAGESIZE)"
-
-# elf32bmipn32-defs.sh use .reginfo, n64 ABI should use .MIPS.options,
-# override INITIAL_READONLY_SECTIONS to do this.
-INITIAL_READONLY_SECTIONS=
-if test -z "${CREATE_SHLIB}"; then
- INITIAL_READONLY_SECTIONS=".interp ${RELOCATING-0} : { *(.interp) }"
-fi
-INITIAL_READONLY_SECTIONS="${INITIAL_READONLY_SECTIONS}
- .MIPS.options ${RELOCATING-0} : { *(.MIPS.options) }"
diff --git a/contrib/binutils/ld/emulparams/elf64bmip.sh b/contrib/binutils/ld/emulparams/elf64bmip.sh
deleted file mode 100755
index 0df65285f5d1..000000000000
--- a/contrib/binutils/ld/emulparams/elf64bmip.sh
+++ /dev/null
@@ -1,23 +0,0 @@
-. ${srcdir}/emulparams/elf64bmip-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 b9e80bb17b3f..000000000000
--- 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/elf64bmip-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 1c474935eb42..000000000000
--- 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 efd6b7d8d6e8..000000000000
--- 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 2fecba8c3ebe..000000000000
--- a/contrib/binutils/ld/emulparams/elf64ppc.sh
+++ /dev/null
@@ -1,50 +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="CONSTANT (MAXPAGESIZE)"
-COMMONPAGESIZE="CONSTANT (COMMONPAGESIZE)"
-ARCH=powerpc:common64
-MACHINE=
-NOP=0x60000000
-OTHER_TEXT_SECTIONS="*(.sfpr .glink)"
-BSS_PLT=
-OTHER_BSS_SYMBOLS="
- .tocbss ${RELOCATING-0} :${RELOCATING+ ALIGN(8)} { *(.tocbss)}"
-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)) }
- .branch_lt ${RELOCATING-0} :${RELOCATING+ ALIGN(8)} { *(.branch_lt) }"
-
-# Treat a host that matches the target with the possible exception of "64"
-# in the name as if it were native.
-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/elf64ppc_fbsd.sh b/contrib/binutils/ld/emulparams/elf64ppc_fbsd.sh
deleted file mode 100644
index 3f73ed9a429a..000000000000
--- a/contrib/binutils/ld/emulparams/elf64ppc_fbsd.sh
+++ /dev/null
@@ -1,4 +0,0 @@
-. ${srcdir}/emulparams/elf64ppc.sh
-. ${srcdir}/emulparams/elf_fbsd.sh
-
-OUTPUT_FORMAT="elf64-powerpc-freebsd"
diff --git a/contrib/binutils/ld/emulparams/elf_fbsd.sh b/contrib/binutils/ld/emulparams/elf_fbsd.sh
deleted file mode 100644
index 2ea646e95301..000000000000
--- 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 b8994443325d..000000000000
--- a/contrib/binutils/ld/emulparams/elf_i386.sh
+++ /dev/null
@@ -1,14 +0,0 @@
-SCRIPT_NAME=elf
-OUTPUT_FORMAT="elf32-i386"
-TEXT_START_ADDR=0x08048000
-MAXPAGESIZE="CONSTANT (MAXPAGESIZE)"
-COMMONPAGESIZE="CONSTANT (COMMONPAGESIZE)"
-NONPAGED_TEXT_START_ADDR=0x08048000
-ARCH=i386
-MACHINE=
-NOP=0xCCCCCCCC
-TEMPLATE_NAME=elf32
-GENERATE_SHLIB_SCRIPT=yes
-GENERATE_PIE_SCRIPT=yes
-NO_SMALL_DATA=yes
-SEPARATE_GOTPLT=12
diff --git a/contrib/binutils/ld/emulparams/elf_i386_chaos.sh b/contrib/binutils/ld/emulparams/elf_i386_chaos.sh
deleted file mode 100644
index a652913f86e5..000000000000
--- 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="CONSTANT (MAXPAGESIZE)"
-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 23785983ff84..000000000000
--- 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 d62184fc9c29..000000000000
--- 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="CONSTANT (MAXPAGESIZE)"
-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 d958504a8345..000000000000
--- a/contrib/binutils/ld/emulparams/elf_s390.sh
+++ /dev/null
@@ -1,13 +0,0 @@
-SCRIPT_NAME=elf
-OUTPUT_FORMAT="elf32-s390"
-TEXT_START_ADDR=0x00400000
-MAXPAGESIZE="CONSTANT (MAXPAGESIZE)"
-COMMONPAGESIZE="CONSTANT (COMMONPAGESIZE)"
-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_s390_fbsd.sh b/contrib/binutils/ld/emulparams/elf_s390_fbsd.sh
deleted file mode 100755
index 89662a0c7515..000000000000
--- a/contrib/binutils/ld/emulparams/elf_s390_fbsd.sh
+++ /dev/null
@@ -1,2 +0,0 @@
-. ${srcdir}/emulparams/elf_s390.sh
-. ${srcdir}/emulparams/elf_fbsd.sh
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 08ad51446037..000000000000
--- a/contrib/binutils/ld/emulparams/elf_x86_64.sh
+++ /dev/null
@@ -1,37 +0,0 @@
-SCRIPT_NAME=elf
-ELFSIZE=64
-OUTPUT_FORMAT="elf64-x86-64"
-TEXT_START_ADDR=0x400000
-MAXPAGESIZE="CONSTANT (MAXPAGESIZE)"
-COMMONPAGESIZE="CONSTANT (COMMONPAGESIZE)"
-NONPAGED_TEXT_START_ADDR=0x400000
-ARCH="i386:x86-64"
-MACHINE=
-NOP=0xCCCCCCCC
-TEMPLATE_NAME=elf32
-GENERATE_SHLIB_SCRIPT=yes
-GENERATE_PIE_SCRIPT=yes
-NO_SMALL_DATA=yes
-LARGE_SECTIONS=yes
-SEPARATE_GOTPLT=24
-
-if [ "x${host}" = "x${target}" ]; then
- case " $EMULATION_LIBPATH " in
- *" ${EMULATION_NAME} "*)
- NATIVE=yes
- esac
-fi
-
-# Linux/Solaris modify the default library search path to first include
-# a 64-bit specific directory.
-case "$target" in
- x86_64*-linux*|i[3-7]86-*-linux-*)
- case "$EMULATION_NAME" in
- *64*) LIBPATH_SUFFIX=64 ;;
- esac
- ;;
- *-*-solaris2*)
- LIBPATH_SUFFIX=/amd64
- ELF_INTERPRETER_NAME=\"/lib/amd64/ld.so.1\"
- ;;
-esac
diff --git a/contrib/binutils/ld/emulparams/elf_x86_64_fbsd.sh b/contrib/binutils/ld/emulparams/elf_x86_64_fbsd.sh
deleted file mode 100644
index 35b6a626cd3d..000000000000
--- a/contrib/binutils/ld/emulparams/elf_x86_64_fbsd.sh
+++ /dev/null
@@ -1,3 +0,0 @@
-. ${srcdir}/emulparams/elf_x86_64.sh
-. ${srcdir}/emulparams/elf_fbsd.sh
-OUTPUT_FORMAT="elf64-x86-64-freebsd"
diff --git a/contrib/binutils/ld/emulparams/i386aout.sh b/contrib/binutils/ld/emulparams/i386aout.sh
deleted file mode 100644
index dc9e5546145a..000000000000
--- 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 e0c0e2fab6cc..000000000000
--- 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 3417b7d3e992..000000000000
--- 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 a416422d92f0..000000000000
--- 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 659c7f2c9d55..000000000000
--- 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="CONSTANT (MAXPAGESIZE)"
-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 a9e6a38303d4..000000000000
--- 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 256d4c8d1418..000000000000
--- 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="CONSTANT (MAXPAGESIZE)"
-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 dd5558cf0008..000000000000
--- 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="CONSTANT (MAXPAGESIZE)"
-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 879379f9c5df..000000000000
--- a/contrib/binutils/ld/emulparams/i386pe.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="_mainCRTStartup"
-SUBSYSTEM=PE_DEF_SUBSYSTEM
-INITIAL_SYMBOL_CHAR=\"_\"
-TARGET_PAGE_SIZE=0x1000
diff --git a/contrib/binutils/ld/emulparams/i386pe_posix.sh b/contrib/binutils/ld/emulparams/i386pe_posix.sh
deleted file mode 100644
index afa00de0cdf2..000000000000
--- a/contrib/binutils/ld/emulparams/i386pe_posix.sh
+++ /dev/null
@@ -1,10 +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=\"_\"
-TARGET_PAGE_SIZE=0x1000
diff --git a/contrib/binutils/ld/emulparams/i386pep.sh b/contrib/binutils/ld/emulparams/i386pep.sh
deleted file mode 100644
index d20f3aba5f05..000000000000
--- a/contrib/binutils/ld/emulparams/i386pep.sh
+++ /dev/null
@@ -1,9 +0,0 @@
-ARCH="i386:x86-64"
-SCRIPT_NAME=pep
-OUTPUT_FORMAT="pei-x86-64"
-RELOCATEABLE_OUTPUT_FORMAT="pe-x86-64"
-TEMPLATE_NAME=pep
-ENTRY="_mainCRTStartup"
-SUBSYSTEM=PE_DEF_SUBSYSTEM
-INITIAL_SYMBOL_CHAR=\"_\"
-TARGET_PAGE_SIZE=0x1000
diff --git a/contrib/binutils/ld/emulparams/mipsbig.sh b/contrib/binutils/ld/emulparams/mipsbig.sh
deleted file mode 100644
index 9fe29538f452..000000000000
--- 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 e8fb35beca68..000000000000
--- 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 f381267679e0..000000000000
--- a/contrib/binutils/ld/emulparams/mipsidt.sh
+++ /dev/null
@@ -1,12 +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=generic
-EXTRA_EM_FILE=mipsecoff
-EMBEDDED=yes
diff --git a/contrib/binutils/ld/emulparams/mipsidtl.sh b/contrib/binutils/ld/emulparams/mipsidtl.sh
deleted file mode 100644
index 52447ff09fda..000000000000
--- a/contrib/binutils/ld/emulparams/mipsidtl.sh
+++ /dev/null
@@ -1,12 +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=generic
-EXTRA_EM_FILE=mipsecoff
-EMBEDDED=yes
diff --git a/contrib/binutils/ld/emulparams/mipslit.sh b/contrib/binutils/ld/emulparams/mipslit.sh
deleted file mode 100644
index acb234464be4..000000000000
--- 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 d0bb91c1dc2e..000000000000
--- 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 a5cfc2ef60e4..000000000000
--- a/contrib/binutils/ld/emulparams/mipspe.sh
+++ /dev/null
@@ -1,10 +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"
-TARGET_PAGE_SIZE=0x1000
diff --git a/contrib/binutils/ld/emulparams/ppcmacos.sh b/contrib/binutils/ld/emulparams/ppcmacos.sh
deleted file mode 100644
index 9f02af404f0c..000000000000
--- 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 14b2745caad0..000000000000
--- 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="CONSTANT (MAXPAGESIZE)"
-NONPAGED_TEXT_START_ADDR=0x0400000
-ARCH=powerpc
diff --git a/contrib/binutils/ld/emulparams/ppcpe.sh b/contrib/binutils/ld/emulparams/ppcpe.sh
deleted file mode 100644
index 2e1e10207c88..000000000000
--- a/contrib/binutils/ld/emulparams/ppcpe.sh
+++ /dev/null
@@ -1,8 +0,0 @@
-ARCH=powerpc
-SCRIPT_NAME=ppcpe
-OUTPUT_FORMAT="pei-powerpcle"
-TEMPLATE_NAME=pe
-ENTRY="_mainCRTStartup"
-SUBSYSTEM=PE_DEF_SUBSYSTEM
-INITIAL_SYMBOL_CHAR=\"_\"
-TARGET_PAGE_SIZE=0x1000
diff --git a/contrib/binutils/ld/emulparams/scoreelf.sh b/contrib/binutils/ld/emulparams/scoreelf.sh
deleted file mode 100644
index e138de2b30e4..000000000000
--- a/contrib/binutils/ld/emulparams/scoreelf.sh
+++ /dev/null
@@ -1,31 +0,0 @@
-MACHINE=
-SCRIPT_NAME=elf
-TEMPLATE_NAME=elf32
-OUTPUT_FORMAT="elf32-bigscore"
-BIG_OUTPUT_FORMAT="elf32-bigscore"
-LITTLE_OUTPUT_FORMAT="elf32-littlescore"
-GROUP="-lm -lc -lglsim -lgcc -lstdc++"
-
-TEXT_START_ADDR=0x00000000
-MAXPAGESIZE=256
-NONPAGED_TEXT_START_ADDR=0x0400000
-SHLIB_TEXT_START_ADDR=0x5ffe0000
-OTHER_GOT_SYMBOLS='
- _gp = ALIGN(16) + 0x3ff0;
-'
-
-OTHER_BSS_START_SYMBOLS='_bss_start__ = . + ALIGN(4);'
-OTHER_BSS_END_SYMBOLS='_bss_end__ = . ; __bss_end__ = . ; __end__ = . ;'
-DATA_START_SYMBOLS='_fdata = . ;'
-SDATA_START_SYMBOLS='_sdata_begin = . ;'
-OTHER_BSS_SYMBOLS='
- _bss_start = ALIGN(4) ;
-'
-# This sets the stack to the top of the simulator memory (2^19 bytes).
-STACK_ADDR=0x8000000
-
-ARCH=score
-MACHINE=
-ENTRY=_start
-EMBEDDED=yes
-GENERATE_SHLIB_SCRIPT=yes
diff --git a/contrib/binutils/ld/emulparams/sh.sh b/contrib/binutils/ld/emulparams/sh.sh
deleted file mode 100644
index 52d144356096..000000000000
--- 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/shelf_uclinux.sh b/contrib/binutils/ld/emulparams/shelf_uclinux.sh
deleted file mode 100644
index 2af5da44b8f7..000000000000
--- a/contrib/binutils/ld/emulparams/shelf_uclinux.sh
+++ /dev/null
@@ -1,4 +0,0 @@
-. ${srcdir}/emulparams/shelf.sh
-
-# We do not want a .stack section
-OTHER_SECTIONS=""
diff --git a/contrib/binutils/ld/emulparams/shelf_vxworks.sh b/contrib/binutils/ld/emulparams/shelf_vxworks.sh
deleted file mode 100644
index a87d52947628..000000000000
--- a/contrib/binutils/ld/emulparams/shelf_vxworks.sh
+++ /dev/null
@@ -1,19 +0,0 @@
-# If you change this file, please also look at files which source this one:
-# shlelf_vxworks.sh
-
-SCRIPT_NAME=elf
-BIG_OUTPUT_FORMAT="elf32-sh-vxworks"
-LITTLE_OUTPUT_FORMAT="elf32-shl-vxworks"
-OUTPUT_FORMAT="$BIG_OUTPUT_FORMAT"
-TEXT_START_ADDR=0x1000
-MAXPAGESIZE='CONSTANT (MAXPAGESIZE)'
-ARCH=sh
-MACHINE=
-TEMPLATE_NAME=elf32
-GENERATE_SHLIB_SCRIPT=yes
-ENTRY=__start
-SYMPREFIX=_
-GOT=".got ${RELOCATING-0} : {
- PROVIDE(__GLOBAL_OFFSET_TABLE_ = .);
- *(.got.plt) *(.got) }"
-. ${srcdir}/emulparams/vxworks.sh
diff --git a/contrib/binutils/ld/emulparams/shl.sh b/contrib/binutils/ld/emulparams/shl.sh
deleted file mode 100644
index 5fbb165c2bcd..000000000000
--- 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 e19678bc710d..000000000000
--- 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/shlelf_vxworks.sh b/contrib/binutils/ld/emulparams/shlelf_vxworks.sh
deleted file mode 100644
index 0a055b1bf53c..000000000000
--- a/contrib/binutils/ld/emulparams/shlelf_vxworks.sh
+++ /dev/null
@@ -1,2 +0,0 @@
-. ${srcdir}/emulparams/shelf_vxworks.sh
-OUTPUT_FORMAT="$LITTLE_OUTPUT_FORMAT"
diff --git a/contrib/binutils/ld/emulparams/sparcaout.sh b/contrib/binutils/ld/emulparams/sparcaout.sh
deleted file mode 100644
index 429b925c18c6..000000000000
--- 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 7ccb0bec90c7..000000000000
--- 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 f27daf3c3420..000000000000
--- 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 bd42775331b9..000000000000
--- 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 eabb7cddd32a..000000000000
--- 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 cc6249bea438..000000000000
--- 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 30ec0abf379d..000000000000
--- 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 62eca180769a..000000000000
--- a/contrib/binutils/ld/emultempl/alphaelf.em
+++ /dev/null
@@ -1,153 +0,0 @@
-# This shell script emits a C file. -*- C -*-
-# Copyright 2003, 2004, 2005 Free Software Foundation, Inc.
-#
-# This file is part of GLD, the Gnu Linker.
-#
-# This program is free software; you can redistribute it and/or modify
-# it under the terms of the GNU General Public License as published by
-# the Free Software Foundation; either version 2 of the License, or
-# (at your option) any later version.
-#
-# This program is distributed in the hope that it will be useful,
-# but WITHOUT ANY WARRANTY; without even the implied warranty of
-# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
-# GNU General Public License for more details.
-#
-# You should have received a copy of the GNU General Public License
-# along with this program; if not, write to the Free Software
-# Foundation, Inc., 51 Franklin Street - Fifth Floor, Boston, MA 02110-1301, USA.
-#
-
-# This file is sourced from elf32.em, and defines extra alpha
-# specific routines.
-#
-cat >>e${EMULATION_NAME}.c <<EOF
-
-#include "elf/internal.h"
-#include "elf/alpha.h"
-#include "elf-bfd.h"
-
-static bfd_boolean limit_32bit;
-static bfd_boolean disable_relaxation;
-
-extern bfd_boolean elf64_alpha_use_secureplt;
-extern const bfd_target bfd_elf64_alpha_vec;
-extern const bfd_target bfd_elf64_alpha_freebsd_vec;
-
-
-/* Set the start address as in the Tru64 ld. */
-#define ALPHA_TEXT_START_32BIT 0x12000000
-
-static void
-alpha_after_open (void)
-{
- if (link_info.hash->creator == &bfd_elf64_alpha_vec
- || link_info.hash->creator == &bfd_elf64_alpha_freebsd_vec)
- {
- unsigned int num_plt;
- lang_output_section_statement_type *os;
- lang_output_section_statement_type *plt_os[2];
-
- num_plt = 0;
- for (os = &lang_output_section_statement.head->output_section_statement;
- os != NULL;
- os = os->next)
- {
- if (os->constraint == SPECIAL && strcmp (os->name, ".plt") == 0)
- {
- if (num_plt < 2)
- plt_os[num_plt] = os;
- ++num_plt;
- }
- }
-
- if (num_plt == 2)
- {
- plt_os[0]->constraint = elf64_alpha_use_secureplt ? 0 : -1;
- plt_os[1]->constraint = elf64_alpha_use_secureplt ? -1 : 0;
- }
- }
-
- gld${EMULATION_NAME}_after_open ();
-}
-
-static void
-alpha_after_parse (void)
-{
- if (limit_32bit && !link_info.shared && !link_info.relocatable)
- lang_section_start (".interp",
- exp_binop ('+',
- exp_intop (ALPHA_TEXT_START_32BIT),
- exp_nameop (SIZEOF_HEADERS, NULL)),
- NULL);
-}
-
-static void
-alpha_before_allocation (void)
-{
- /* Call main function; we're just extending it. */
- gld${EMULATION_NAME}_before_allocation ();
-
- /* Add -relax if -O, not -r, and not explicitly disabled. */
- if (link_info.optimize && !link_info.relocatable && !disable_relaxation)
- command_line.relax = TRUE;
-}
-
-static void
-alpha_finish (void)
-{
- if (limit_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
-#define OPTION_NO_RELAX (OPTION_TASO + 1)
-#define OPTION_SECUREPLT (OPTION_NO_RELAX + 1)
-#define OPTION_NO_SECUREPLT (OPTION_SECUREPLT + 1)
-'
-
-PARSE_AND_LIST_LONGOPTS='
- { "taso", no_argument, NULL, OPTION_TASO },
- { "no-relax", no_argument, NULL, OPTION_NO_RELAX },
- { "secureplt", no_argument, NULL, OPTION_SECUREPLT },
- { "no-secureplt", no_argument, NULL, OPTION_NO_SECUREPLT },
-'
-
-PARSE_AND_LIST_OPTIONS='
- fprintf (file, _("\
- --taso Load executable in the lower 31-bit addressable\n\
- virtual address range.\n\
- --no-relax Do not relax call and gp sequences.\n\
- --secureplt Force PLT in text segment.\n\
- --no-secureplt Force PLT in data segment.\n\
-"));
-'
-
-PARSE_AND_LIST_ARGS_CASES='
- case OPTION_TASO:
- limit_32bit = 1;
- break;
- case OPTION_NO_RELAX:
- disable_relaxation = TRUE;
- break;
- case OPTION_SECUREPLT:
- elf64_alpha_use_secureplt = TRUE;
- break;
- case OPTION_NO_SECUREPLT:
- elf64_alpha_use_secureplt = FALSE;
- break;
-'
-
-# Put these extra alpha routines in ld_${EMULATION_NAME}_emulation
-#
-LDEMUL_AFTER_OPEN=alpha_after_open
-LDEMUL_AFTER_PARSE=alpha_after_parse
-LDEMUL_BEFORE_ALLOCATION=alpha_before_allocation
-LDEMUL_FINISH=alpha_finish
diff --git a/contrib/binutils/ld/emultempl/armcoff.em b/contrib/binutils/ld/emultempl/armcoff.em
deleted file mode 100644
index a2e2c6c2d07a..000000000000
--- a/contrib/binutils/ld/emultempl/armcoff.em
+++ /dev/null
@@ -1,282 +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, 2005, 2007 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., 51 Franklin Street - Fifth Floor, Boston, MA 02110-1301, USA. */
-
-#define TARGET_IS_${EMULATION_NAME}
-
-#include "sysdep.h"
-#include "bfd.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);
-
- before_allocation_default ();
-}
-
-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)
-{
- if (thumb_entry_symbol != NULL)
- {
- struct bfd_link_hash_entry * h;
-
- h = bfd_link_hash_lookup (link_info.hash, thumb_entry_symbol,
- FALSE, FALSE, TRUE);
-
- if (h != (struct bfd_link_hash_entry *) NULL
- && (h->type == bfd_link_hash_defined
- || h->type == bfd_link_hash_defweak)
- && h->u.def.section->output_section != NULL)
- {
- static char buffer[32];
- bfd_vma val;
-
- /* Special procesing is required for a Thumb entry symbol. The
- bottom bit of its address must be set. */
- val = (h->u.def.value
- + bfd_get_section_vma (output_bfd,
- h->u.def.section->output_section)
- + h->u.def.section->output_offset);
-
- val |= 1;
-
- /* Now convert this value into a string and store it in entry_symbol
- where the lang_finish() function will pick it up. */
- buffer[0] = '0';
- buffer[1] = 'x';
-
- sprintf_vma (buffer + 2, val);
-
- if (entry_symbol.name != NULL && entry_from_cmdline)
- einfo (_("%P: warning: '--thumb-entry %s' is overriding '-e %s'\n"),
- thumb_entry_symbol, entry_symbol.name);
- entry_symbol.name = buffer;
- }
- else
- einfo (_("%P: warning: connot find thumb start symbol %s\n"),
- thumb_entry_symbol);
- }
-
- finish_default ();
-}
-
-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 e9f663f494a5..000000000000
--- a/contrib/binutils/ld/emultempl/armelf.em
+++ /dev/null
@@ -1,360 +0,0 @@
-# This shell script emits a C file. -*- C -*-
-# Copyright 1991, 1993, 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003,
-# 2004, 2005
-# Free Software Foundation, Inc.
-#
-# This file is part of GLD, the Gnu Linker.
-#
-# This program is free software; you can redistribute it and/or modify
-# it under the terms of the GNU General Public License as published by
-# the Free Software Foundation; either version 2 of the License, or
-# (at your option) any later version.
-#
-# This program is distributed in the hope that it will be useful,
-# but WITHOUT ANY WARRANTY; without even the implied warranty of
-# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
-# GNU General Public License for more details.
-#
-# You should have received a copy of the GNU General Public License
-# along with this program; if not, write to the Free Software
-# Foundation, Inc., 51 Franklin Street - Fifth Floor, Boston, MA 02110-1301, USA.
-#
-
-# This file is sourced from elf32.em, and defines extra arm-elf
-# specific routines.
-#
-test -z "$TARGET2_TYPE" && TARGET2_TYPE="rel"
-cat >>e${EMULATION_NAME}.c <<EOF
-
-#include "elf/arm.h"
-
-static char *thumb_entry_symbol = NULL;
-static bfd *bfd_for_interwork;
-static int byteswap_code = 0;
-static int target1_is_rel = 0${TARGET1_IS_REL};
-static char *target2_type = "${TARGET2_TYPE}";
-static int fix_v4bx = 0;
-static int use_blx = 0;
-static bfd_arm_vfp11_fix vfp11_denorm_fix = BFD_ARM_VFP11_FIX_DEFAULT;
-static int no_enum_size_warning = 0;
-static int pic_veneer = 0;
-
-static void
-gld${EMULATION_NAME}_before_parse (void)
-{
-#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)
- {
- asection *i = statement->input_section.section;
-
- if (!((lang_input_statement_type *) i->owner->usrdata)->just_syms_flag
- && (i->flags & SEC_EXCLUDE) == 0)
- {
- asection *output_section = i->output_section;
-
- ASSERT (output_section->owner == output_bfd);
-
- /* Don't attach the interworking stubs to a dynamic object, to
- an empty section, etc. */
- if ((output_section->flags & SEC_HAS_CONTENTS) != 0
- && (i->flags & SEC_NEVER_LOAD) == 0
- && ! (i->owner->flags & DYNAMIC)
- && ! i->owner->output_has_begun)
- {
- bfd_for_interwork = i->owner;
- bfd_for_interwork->output_has_begun = TRUE;
- }
- }
- }
-}
-
-static void
-arm_elf_before_allocation (void)
-{
- bfd *tem;
-
- 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);
- }
-
- bfd_elf32_arm_set_byteswap_code (&link_info, byteswap_code);
-
- /* Choose type of VFP11 erratum fix, or warn if specified fix is unnecessary
- due to architecture version. */
- bfd_elf32_arm_set_vfp11_fix (output_bfd, &link_info);
-
- /* We should be able to set the size of the interworking stub section. We
- can't do it until later if we have dynamic sections, though. */
- if (! elf_hash_table (&link_info)->dynamic_sections_created)
- {
- /* Here we rummage through the found bfds to collect glue information. */
- LANG_FOR_EACH_INPUT_STATEMENT (is)
- {
- /* Initialise mapping tables for code/data. */
- bfd_elf32_arm_init_maps (is->the_bfd);
-
- if (!bfd_elf32_arm_process_before_allocation (is->the_bfd,
- &link_info)
- || !bfd_elf32_arm_vfp11_erratum_scan (is->the_bfd, &link_info))
- /* xgettext:c-format */
- einfo (_("Errors encountered processing file %s"), is->filename);
- }
- }
-
- /* Call the standard elf routine. */
- gld${EMULATION_NAME}_before_allocation ();
-
- /* We have seen it all. Allocate it, and carry on. */
- bfd_elf32_arm_allocate_interworking_sections (& link_info);
-}
-
-static void
-arm_elf_after_allocation (void)
-{
- /* Call the standard elf routine. */
- after_allocation_default ();
-
- {
- LANG_FOR_EACH_INPUT_STATEMENT (is)
- {
- /* Figure out where VFP11 erratum veneers (and the labels returning
- from same) have been placed. */
- bfd_elf32_arm_vfp11_fix_veneer_locations (is->the_bfd, &link_info);
- }
- }
-}
-
-static void
-arm_elf_finish (void)
-{
- struct bfd_link_hash_entry * h;
-
- /* Call the elf32.em routine. */
- gld${EMULATION_NAME}_finish ();
-
- if (thumb_entry_symbol)
- {
- h = bfd_link_hash_lookup (link_info.hash, thumb_entry_symbol,
- FALSE, FALSE, TRUE);
- }
- else
- {
- struct elf_link_hash_entry * eh;
-
- if (!entry_symbol.name)
- return;
-
- h = bfd_link_hash_lookup (link_info.hash, entry_symbol.name,
- FALSE, FALSE, TRUE);
- eh = (struct elf_link_hash_entry *)h;
- if (!h || ELF_ST_TYPE(eh->type) != STT_ARM_TFUNC)
- return;
- }
-
-
- 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 (thumb_entry_symbol != NULL && entry_symbol.name != NULL
- && entry_from_cmdline)
- einfo (_("%P: warning: '--thumb-entry %s' is overriding '-e %s'\n"),
- thumb_entry_symbol, entry_symbol.name);
- entry_symbol.name = buffer;
- }
- else
- einfo (_("%P: warning: connot find thumb start symbol %s\n"),
- thumb_entry_symbol);
-}
-
-/* This is a convenient point to tell BFD about target specific flags.
- After the output has been created, but before inputs are read. */
-static void
-arm_elf_create_output_section_statements (void)
-{
- bfd_elf32_arm_set_target_relocs (output_bfd, &link_info, target1_is_rel,
- target2_type, fix_v4bx, use_blx,
- vfp11_denorm_fix, no_enum_size_warning,
- pic_veneer);
-}
-
-EOF
-
-# Define some shell vars to insert bits of code into the standard elf
-# parse_args and list_options functions.
-#
-PARSE_AND_LIST_PROLOGUE='
-#define OPTION_THUMB_ENTRY 301
-#define OPTION_BE8 302
-#define OPTION_TARGET1_REL 303
-#define OPTION_TARGET1_ABS 304
-#define OPTION_TARGET2 305
-#define OPTION_FIX_V4BX 306
-#define OPTION_USE_BLX 307
-#define OPTION_VFP11_DENORM_FIX 308
-#define OPTION_NO_ENUM_SIZE_WARNING 309
-#define OPTION_PIC_VENEER 310
-'
-
-PARSE_AND_LIST_SHORTOPTS=p
-
-PARSE_AND_LIST_LONGOPTS='
- { "no-pipeline-knowledge", no_argument, NULL, '\'p\''},
- { "thumb-entry", required_argument, NULL, OPTION_THUMB_ENTRY},
- { "be8", no_argument, NULL, OPTION_BE8},
- { "target1-rel", no_argument, NULL, OPTION_TARGET1_REL},
- { "target1-abs", no_argument, NULL, OPTION_TARGET1_ABS},
- { "target2", required_argument, NULL, OPTION_TARGET2},
- { "fix-v4bx", no_argument, NULL, OPTION_FIX_V4BX},
- { "use-blx", no_argument, NULL, OPTION_USE_BLX},
- { "vfp11-denorm-fix", required_argument, NULL, OPTION_VFP11_DENORM_FIX},
- { "no-enum-size-warning", no_argument, NULL, OPTION_NO_ENUM_SIZE_WARNING},
- { "pic-veneer", no_argument, NULL, OPTION_PIC_VENEER},
-'
-
-PARSE_AND_LIST_OPTIONS='
- fprintf (file, _(" --thumb-entry=<sym> Set the entry point to be Thumb symbol <sym>\n"));
- fprintf (file, _(" --be8 Oputput BE8 format image\n"));
- fprintf (file, _(" --target1=rel Interpret R_ARM_TARGET1 as R_ARM_REL32\n"));
- fprintf (file, _(" --target1=abs Interpret R_ARM_TARGET1 as R_ARM_ABS32\n"));
- fprintf (file, _(" --target2=<type> Specify definition of R_ARM_TARGET2\n"));
- fprintf (file, _(" --fix-v4bx Rewrite BX rn as MOV pc, rn for ARMv4\n"));
- fprintf (file, _(" --use-blx Enable use of BLX instructions\n"));
- fprintf (file, _(" --vfp11-denorm-fix Specify how to fix VFP11 denorm erratum\n"));
- fprintf (file, _(" --no-enum-size-warning Don'\''t warn about objects with incompatible enum sizes\n"));
- fprintf (file, _(" --pic-veneer Always generate PIC interworking veneers\n"));
-'
-
-PARSE_AND_LIST_ARGS_CASES='
- case '\'p\'':
- /* Only here for backwards compatibility. */
- break;
-
- case OPTION_THUMB_ENTRY:
- thumb_entry_symbol = optarg;
- break;
-
- case OPTION_BE8:
- byteswap_code = 1;
- break;
-
- case OPTION_TARGET1_REL:
- target1_is_rel = 1;
- break;
-
- case OPTION_TARGET1_ABS:
- target1_is_rel = 0;
- break;
-
- case OPTION_TARGET2:
- target2_type = optarg;
- break;
-
- case OPTION_FIX_V4BX:
- fix_v4bx = 1;
- break;
-
- case OPTION_USE_BLX:
- use_blx = 1;
- break;
-
- case OPTION_VFP11_DENORM_FIX:
- if (strcmp (optarg, "none") == 0)
- vfp11_denorm_fix = BFD_ARM_VFP11_FIX_NONE;
- else if (strcmp (optarg, "scalar") == 0)
- vfp11_denorm_fix = BFD_ARM_VFP11_FIX_SCALAR;
- else if (strcmp (optarg, "vector") == 0)
- vfp11_denorm_fix = BFD_ARM_VFP11_FIX_VECTOR;
- else
- einfo (_("Unrecognized VFP11 fix type '\''%s'\''.\n"), optarg);
- break;
-
- case OPTION_NO_ENUM_SIZE_WARNING:
- no_enum_size_warning = 1;
- break;
-
- case OPTION_PIC_VENEER:
- pic_veneer = 1;
- break;
-'
-
-# We have our own after_open and before_allocation functions, but they call
-# the standard routines, so give them a different name.
-LDEMUL_AFTER_OPEN=arm_elf_after_open
-LDEMUL_BEFORE_ALLOCATION=arm_elf_before_allocation
-LDEMUL_AFTER_ALLOCATION=arm_elf_after_allocation
-LDEMUL_CREATE_OUTPUT_SECTION_STATEMENTS=arm_elf_create_output_section_statements
-
-# Replace the elf before_parse function with our own.
-LDEMUL_BEFORE_PARSE=gld"${EMULATION_NAME}"_before_parse
-
-# Call the extra arm-elf function
-LDEMUL_FINISH=arm_elf_finish
diff --git a/contrib/binutils/ld/emultempl/astring.sed b/contrib/binutils/ld/emultempl/astring.sed
deleted file mode 100644
index 08bd8a642002..000000000000
--- 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/avrelf.em b/contrib/binutils/ld/emultempl/avrelf.em
deleted file mode 100644
index 1f5ab5cf507f..000000000000
--- a/contrib/binutils/ld/emultempl/avrelf.em
+++ /dev/null
@@ -1,269 +0,0 @@
-# This shell script emits a C file. -*- C -*-
-# Copyright 2006
-# Free Software Foundation, Inc.
-#
-# This file is part of GLD, the Gnu Linker.
-#
-# This program is free software; you can redistribute it and/or modify
-# it under the terms of the GNU General Public License as published by
-# the Free Software Foundation; either version 2 of the License, or
-# (at your option) any later version.
-#
-# This program is distributed in the hope that it will be useful,
-# but WITHOUT ANY WARRANTY; without even the implied warranty of
-# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
-# GNU General Public License for more details.
-#
-# You should have received a copy of the GNU General Public License
-# along with this program; if not, write to the Free Software
-# Foundation, Inc., 51 Franklin Street - Fifth Floor, Boston,
-# MA 02110-1301 USA.
-
-# This file is sourced from elf32.em, and defines extra avr-elf
-# specific routines. It is used to generate the trampolines for the avr6
-# family devices where one needs to address the issue that it is not possible
-# to reach the whole program memory by using 16 bit pointers.
-
-cat >>e${EMULATION_NAME}.c <<EOF
-
-#include "elf32-avr.h"
-#include "ldctor.h"
-
-/* The fake file and it's corresponding section meant to hold
- the linker stubs if needed. */
-
-static lang_input_statement_type *stub_file;
-static asection *avr_stub_section;
-
-/* Variables set by the command-line parameters and transfered
- to the bfd without use of global shared variables. */
-
-static bfd_boolean avr_no_stubs = FALSE;
-static bfd_boolean avr_debug_relax = FALSE;
-static bfd_boolean avr_debug_stubs = FALSE;
-static bfd_boolean avr_replace_call_ret_sequences = TRUE;
-static bfd_vma avr_pc_wrap_around = 0x10000000;
-
-/* Transfers information to the bfd frontend. */
-
-static void
-avr_elf_set_global_bfd_parameters (void)
-{
- elf32_avr_setup_params (& link_info,
- stub_file->the_bfd,
- avr_stub_section,
- avr_no_stubs,
- avr_debug_stubs,
- avr_debug_relax,
- avr_pc_wrap_around,
- avr_replace_call_ret_sequences);
-}
-
-
-/* Makes a conservative estimate of the trampoline section size that could
- be corrected later on. */
-
-static void
-avr_elf_${EMULATION_NAME}_before_allocation (void)
-{
- int ret;
-
- gld${EMULATION_NAME}_before_allocation ();
-
- /* We only need stubs for the avr6 family. */
- if (strcmp ("${EMULATION_NAME}","avr6"))
- avr_no_stubs = TRUE;
-
- avr_elf_set_global_bfd_parameters ();
-
- /* If generating a relocatable output file, then
- we don't have to generate the trampolines. */
- if (link_info.relocatable)
- avr_no_stubs = TRUE;
-
- if (avr_no_stubs)
- return;
-
- ret = elf32_avr_setup_section_lists (output_bfd, &link_info);
-
- if (ret < 0)
- einfo ("%X%P: can not setup the input section list: %E\n");
-
- if (ret <= 0)
- return;
-
- /* Call into the BFD backend to do the real "stub"-work. */
- if (! elf32_avr_size_stubs (output_bfd, &link_info, TRUE))
- einfo ("%X%P: can not size stub section: %E\n");
-}
-
-/* This is called before the input files are opened. We create a new
- fake input file to hold the stub section and generate the section itself. */
-
-static void
-avr_elf_create_output_section_statements (void)
-{
- flagword flags;
-
- stub_file = lang_add_input_file ("linker stubs",
- lang_input_file_is_fake_enum,
- NULL);
-
- stub_file->the_bfd = bfd_create ("linker stubs", output_bfd);
- if (stub_file->the_bfd == NULL
- || !bfd_set_arch_mach (stub_file->the_bfd,
- bfd_get_arch (output_bfd),
- bfd_get_mach (output_bfd)))
- {
- einfo ("%X%P: can not create stub BFD %E\n");
- return;
- }
-
- /* Now we add the stub section. */
-
- avr_stub_section = bfd_make_section_anyway (stub_file->the_bfd,
- ".trampolines");
- if (avr_stub_section == NULL)
- goto err_ret;
-
- flags = (SEC_ALLOC | SEC_LOAD | SEC_READONLY | SEC_CODE
- | SEC_HAS_CONTENTS | SEC_RELOC | SEC_IN_MEMORY | SEC_KEEP);
- if (!bfd_set_section_flags (stub_file->the_bfd, avr_stub_section, flags))
- goto err_ret;
-
- avr_stub_section->alignment_power = 1;
-
- ldlang_add_file (stub_file);
-
- return;
-
- err_ret:
- einfo ("%X%P: can not make stub section: %E\n");
- return;
-}
-
-/* Re-calculates the size of the stubs so that we won't waste space. */
-
-static void
-avr_elf_finish (void)
-{
- if (!avr_no_stubs)
- {
- /* Now build the linker stubs. */
- if (stub_file->the_bfd->sections != NULL)
- {
- /* Call again the trampoline analyzer to initialize the trampoline
- stubs with the correct symbol addresses. Since there could have
- been relaxation, the symbol addresses that were found during
- first call may no longer be correct. */
- if (!elf32_avr_size_stubs (output_bfd, &link_info, FALSE))
- {
- einfo ("%X%P: can not size stub section: %E\n");
- return;
- }
-
- if (!elf32_avr_build_stubs (&link_info))
- einfo ("%X%P: can not build stubs: %E\n");
- }
- }
-
- gld${EMULATION_NAME}_finish ();
-}
-
-
-EOF
-
-
-PARSE_AND_LIST_PROLOGUE='
-
-#define OPTION_NO_CALL_RET_REPLACEMENT 301
-#define OPTION_PMEM_WRAP_AROUND 302
-#define OPTION_NO_STUBS 303
-#define OPTION_DEBUG_STUBS 304
-#define OPTION_DEBUG_RELAX 305
-'
-
-PARSE_AND_LIST_LONGOPTS='
- { "no-call-ret-replacement", no_argument,
- NULL, OPTION_NO_CALL_RET_REPLACEMENT},
- { "pmem-wrap-around", required_argument,
- NULL, OPTION_PMEM_WRAP_AROUND},
- { "no-stubs", no_argument,
- NULL, OPTION_NO_STUBS},
- { "debug-stubs", no_argument,
- NULL, OPTION_DEBUG_STUBS},
- { "debug-relax", no_argument,
- NULL, OPTION_DEBUG_RELAX},
-'
-
-PARSE_AND_LIST_OPTIONS='
- fprintf (file, _(" --pmem-wrap-around=<val> "
- "Make the linker relaxation machine assume that a\n"
- " "
- "program counter wrap-around occures at address\n"
- " "
- "<val>. Supported values are 8k, 16k, 32k and 64k.\n"));
- fprintf (file, _(" --no-call-ret-replacement "
- "The relaxation machine normally will\n"
- " "
- "substitute two immediately following call/ret\n"
- " "
- "instructions by a single jump instruction.\n"
- " "
- "This option disables this optimization.\n"));
- fprintf (file, _(" --no-stubs "
- "If the linker detects to attempt to access\n"
- " "
- "an instruction beyond 128k by a reloc that\n"
- " "
- "is limited to 128k max, it inserts a jump\n"
- " "
- "stub. You can de-active this with this switch.\n"));
- fprintf (file, _(" --debug-stubs Used for debugging avr-ld.\n"));
- fprintf (file, _(" --debug-relax Used for debugging avr-ld.\n"));
-'
-
-PARSE_AND_LIST_ARGS_CASES='
-
- case OPTION_PMEM_WRAP_AROUND:
- {
- /* This variable is defined in the bfd library. */
- if ((!strcmp (optarg,"32k")) || (!strcmp (optarg,"32K")))
- avr_pc_wrap_around = 32768;
- else if ((!strcmp (optarg,"8k")) || (!strcmp (optarg,"8K")))
- avr_pc_wrap_around = 8192;
- else if ((!strcmp (optarg,"16k")) || (!strcmp (optarg,"16K")))
- avr_pc_wrap_around = 16384;
- else if ((!strcmp (optarg,"64k")) || (!strcmp (optarg,"64K")))
- avr_pc_wrap_around = 0x10000;
- else
- return FALSE;
- }
- break;
-
- case OPTION_DEBUG_STUBS:
- avr_debug_stubs = TRUE;
- break;
-
- case OPTION_DEBUG_RELAX:
- avr_debug_relax = TRUE;
- break;
-
- case OPTION_NO_STUBS:
- avr_no_stubs = TRUE;
- break;
-
- case OPTION_NO_CALL_RET_REPLACEMENT:
- {
- /* This variable is defined in the bfd library. */
- avr_replace_call_ret_sequences = FALSE;
- }
- break;
-'
-
-#
-# Put these extra avr-elf routines in ld_${EMULATION_NAME}_emulation
-#
-LDEMUL_BEFORE_ALLOCATION=avr_elf_${EMULATION_NAME}_before_allocation
-LDEMUL_FINISH=avr_elf_finish
-LDEMUL_CREATE_OUTPUT_SECTION_STATEMENTS=avr_elf_create_output_section_statements
diff --git a/contrib/binutils/ld/emultempl/cr16elf.em b/contrib/binutils/ld/emultempl/cr16elf.em
deleted file mode 100644
index 0881634bb018..000000000000
--- a/contrib/binutils/ld/emultempl/cr16elf.em
+++ /dev/null
@@ -1,92 +0,0 @@
-# This shell script emits a C file. -*- C -*-
-# Copyright 2007 Free Software Foundation, Inc.
-# Contributed by M R Swami Reddy <MR.Swami.Reddy@nsc.com>
-#
-# This file is part of GLD, the Gnu Linker.
-#
-# This program is free software; you can redistribute it and/or modify
-# it under the terms of the GNU General Public License as published by
-# the Free Software Foundation; either version 2 of the License, or
-# (at your option) any later version.
-#
-# This program is distributed in the hope that it will be useful,
-# but WITHOUT ANY WARRANTY; without even the implied warranty of
-# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
-# GNU General Public License for more details.
-#
-# You should have received a copy of the GNU General Public License
-# along with this program; if not, write to the Free Software
-# Foundation, Inc., 51 Franklin Street - Fifth Floor, Boston, MA 02110-1301, USA.
-#
-
-# This file is sourced from elf32.em, and defines extra cr16-elf
-# specific routines.
-#
-cat >>e${EMULATION_NAME}.c <<EOF
-
-#include "ldctor.h"
-
-/* Flag for the emulation-specific "--no-relax" option. */
-static bfd_boolean disable_relaxation = FALSE;
-
-static void
-cr16elf_after_parse (void)
-{
- /* Always behave as if called with --sort-common command line
- option.
- This is to emulate the CRTools' method of keeping variables
- of different alignment in separate sections. */
- config.sort_common = TRUE;
-
- /* Don't create a demand-paged executable, since this feature isn't
- meaninful in CR16 embedded systems. Moreover, when magic_demand_paged
- is true the link sometimes fails. */
- config.magic_demand_paged = FALSE;
-}
-
-/* This is called after the sections have been attached to output
- sections, but before any sizes or addresses have been set. */
-
-static void
-cr16elf_before_allocation (void)
-{
- /* Call the default first. */
- gld${EMULATION_NAME}_before_allocation ();
-
- /* Enable relaxation by default if the "--no-relax" option was not
- specified. This is done here instead of in the before_parse hook
- because there is a check in main() to prohibit use of --relax and
- -r together. */
-
- if (!disable_relaxation)
- command_line.relax = TRUE;
-}
-
-EOF
-
-# Define some shell vars to insert bits of code into the standard elf
-# parse_args and list_options functions.
-#
-PARSE_AND_LIST_PROLOGUE='
-#define OPTION_NO_RELAX 301
-'
-
-PARSE_AND_LIST_LONGOPTS='
- { "no-relax", no_argument, NULL, OPTION_NO_RELAX},
-'
-
-PARSE_AND_LIST_OPTIONS='
- fprintf (file, _(" --no-relax Do not relax branches\n"));
-'
-
-PARSE_AND_LIST_ARGS_CASES='
- case OPTION_NO_RELAX:
- disable_relaxation = TRUE;
- break;
-'
-
-# Put these extra cr16-elf routines in ld_${EMULATION_NAME}_emulation
-#
-LDEMUL_AFTER_PARSE=cr16elf_after_parse
-LDEMUL_BEFORE_ALLOCATION=cr16elf_before_allocation
-
diff --git a/contrib/binutils/ld/emultempl/elf-generic.em b/contrib/binutils/ld/emultempl/elf-generic.em
deleted file mode 100644
index 7edee8b68e20..000000000000
--- a/contrib/binutils/ld/emultempl/elf-generic.em
+++ /dev/null
@@ -1,81 +0,0 @@
-# This shell script emits a C file. -*- C -*-
-# Copyright 2006 Free Software Foundation, Inc.
-#
-# This file is part of GLD, the Gnu Linker.
-#
-# This program is free software; you can redistribute it and/or modify
-# it under the terms of the GNU General Public License as published by
-# the Free Software Foundation; either version 2 of the License, or
-# (at your option) any later version.
-#
-# This program is distributed in the hope that it will be useful,
-# but WITHOUT ANY WARRANTY; without even the implied warranty of
-# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
-# GNU General Public License for more details.
-#
-# You should have received a copy of the GNU General Public License
-# along with this program; if not, write to the Free Software Foundation, Inc.,
-# 51 Franklin Street - Fifth Floor, Boston, MA 02110-1301, USA.
-#
-
-# This file is sourced from elf32.em and from ELF targets that use
-# generic.em.
-#
-cat >>e${EMULATION_NAME}.c <<EOF
-
-static void
-gld${EMULATION_NAME}_map_segments (bfd_boolean need_layout)
-{
- int tries = 10;
-
- do
- {
- if (need_layout)
- {
- lang_reset_memory_regions ();
-
- /* Resize the sections. */
- lang_size_sections (NULL, TRUE);
-
- /* Redo special stuff. */
- ldemul_after_allocation ();
-
- /* Do the assignments again. */
- lang_do_assignments ();
-
- need_layout = FALSE;
- }
-
- if (output_bfd->xvec->flavour == bfd_target_elf_flavour
- && !link_info.relocatable)
- {
- bfd_size_type phdr_size;
-
- phdr_size = elf_tdata (output_bfd)->program_header_size;
- /* If we don't have user supplied phdrs, throw away any
- previous linker generated program headers. */
- if (lang_phdr_list == NULL)
- elf_tdata (output_bfd)->segment_map = NULL;
- if (!_bfd_elf_map_sections_to_segments (output_bfd, &link_info))
- einfo ("%F%P: map sections to segments failed: %E\n");
-
- if (phdr_size != elf_tdata (output_bfd)->program_header_size)
- {
- if (tries > 6)
- /* The first few times we allow any change to
- phdr_size . */
- need_layout = TRUE;
- else if (phdr_size < elf_tdata (output_bfd)->program_header_size)
- /* After that we only allow the size to grow. */
- need_layout = TRUE;
- else
- elf_tdata (output_bfd)->program_header_size = phdr_size;
- }
- }
- }
- while (need_layout && --tries);
-
- if (tries == 0)
- einfo (_("%P%F: looping in map_segments"));
-}
-EOF
diff --git a/contrib/binutils/ld/emultempl/elf32.em b/contrib/binutils/ld/emultempl/elf32.em
deleted file mode 100644
index 4f707ff30a6b..000000000000
--- a/contrib/binutils/ld/emultempl/elf32.em
+++ /dev/null
@@ -1,2070 +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, 2005, 2006, 2007 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., 51 Franklin Street - Fifth Floor, Boston, MA 02110-1301, USA. */
-
-#define TARGET_IS_${EMULATION_NAME}
-
-#include "sysdep.h"
-#include "bfd.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"
-#include "elf-bfd.h"
-
-/* Declare functions used by various EXTRA_EM_FILEs. */
-static void gld${EMULATION_NAME}_before_parse (void);
-static void gld${EMULATION_NAME}_after_open (void);
-static void gld${EMULATION_NAME}_before_allocation (void);
-static bfd_boolean gld${EMULATION_NAME}_place_orphan (asection *s);
-static void gld${EMULATION_NAME}_finish (void);
-
-EOF
-
-if [ "x${USE_LIBPATH}" = xyes ] ; then
- case ${target} in
- *-*-linux-* | *-*-k*bsd*-*)
- cat >>e${EMULATION_NAME}.c <<EOF
-#ifdef HAVE_GLOB
-#include <glob.h>
-#endif
-EOF
- ;;
- esac
-fi
-
-# Import any needed special functions and/or overrides.
-#
-. ${srcdir}/emultempl/elf-generic.em
-if test -n "$EXTRA_EM_FILE" ; then
-. ${srcdir}/emultempl/${EXTRA_EM_FILE}.em
-fi
-
-# 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)
-{
- int class = 0;
-
- /* Tell the ELF linker that we don't want the output file to have a
- DT_NEEDED entry for this file, unless it is used to resolve
- references in a regular object. */
- if (entry->as_needed)
- class = DYN_AS_NEEDED;
-
- /* Tell the ELF linker that we don't want the output file to have a
- DT_NEEDED entry for any dynamic library in DT_NEEDED tags from
- this file at all. */
- if (!entry->add_needed)
- class |= DYN_NO_ADD_NEEDED;
-
- if (entry->just_syms_flag
- && (bfd_get_file_flags (entry->the_bfd) & DYNAMIC) != 0)
- einfo (_("%P%F: --just-symbols may not be used on DSO: %B\n"),
- entry->the_bfd);
-
- if (!class
- || (bfd_get_file_flags (entry->the_bfd) & DYNAMIC) == 0)
- return FALSE;
-
- bfd_elf_set_dyn_lib_class (entry->the_bfd, class);
-
- /* Continue on with normal load_symbols processing. */
- return FALSE;
-}
-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 lang_input_statement_type *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 != NULL)
- return;
- if (s->the_bfd == NULL)
- return;
-
- /* If this input file was an as-needed entry, and wasn't found to be
- needed at the stage it was linked, then don't say we have loaded it. */
- if ((bfd_elf_get_dyn_lib_class (s->the_bfd) & DYN_AS_NEEDED) != 0)
- return;
-
- if (bfd_stat (s->the_bfd, &st) != 0)
- {
- einfo ("%P:%B: bfd_stat failed: %E\n", s->the_bfd);
- return;
- }
-
- /* Some operating systems, e.g. Windows, do not provide a meaningful
- st_ino; they always set it to zero. (Windows does provide a
- meaningful st_dev.) Do not indicate a duplicate library in that
- case. While there is no guarantee that a system that provides
- meaningful inode numbers will never set st_ino to zero, this is
- merely an optimization, so we do not need to worry about false
- negatives. */
- if (st.st_dev == global_stat.st_dev
- && st.st_ino == global_stat.st_ino
- && st.st_ino != 0)
- {
- global_found = s;
- 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);
-}
-
-struct dt_needed
-{
- bfd *by;
- const char *name;
-};
-
-/* This function is called for each possible name for a dynamic object
- named by a DT_NEEDED entry. The FORCE parameter indicates whether
- to skip the check for a conflicting version. */
-
-static bfd_boolean
-gld${EMULATION_NAME}_try_needed (struct dt_needed *needed,
- int force)
-{
- bfd *abfd;
- const char *name = needed->name;
- const char *soname;
- int class;
-
- abfd = bfd_openr (name, bfd_get_target (output_bfd));
- if (abfd == NULL)
- 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-* | *-*-k*bsd*-*)
- cat >>e${EMULATION_NAME}.c <<EOF
- {
- struct bfd_link_needed_list *l;
-
- for (l = needed; l != NULL; l = l->next)
- if (CONST_STRNEQ (l->name, "libc.so"))
- 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 = NULL;
- lang_for_each_input_file (gld${EMULATION_NAME}_stat_needed);
- if (global_found != NULL)
- {
- /* 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. */
- class = DYN_DT_NEEDED;
-
- /* Tell the ELF linker that we don't want the output file to have a
- DT_NEEDED entry for this file at all if the entry is from a file
- with DYN_NO_ADD_NEEDED. */
- if (needed->by != NULL
- && (bfd_elf_get_dyn_lib_class (needed->by) & DYN_NO_ADD_NEEDED) != 0)
- class |= DYN_NO_NEEDED | DYN_NO_ADD_NEEDED;
-
- bfd_elf_set_dyn_lib_class (abfd, class);
-
- /* Add this file into the symbol table. */
- if (! bfd_link_add_symbols (abfd, &link_info))
- 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,
- struct dt_needed *n, int force)
-{
- const char *s;
- const char *name = n->name;
- size_t len;
- struct dt_needed needed;
-
- if (name[0] == '/')
- return gld${EMULATION_NAME}_try_needed (n, force);
-
- if (path == NULL || *path == '\0')
- return FALSE;
-
- needed.by = n->by;
- needed.name = n->name;
-
- len = strlen (name);
- while (1)
- {
- char *filename, *sset;
-
- s = strchr (path, config.rpath_separator);
- 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);
-
- needed.name = filename;
- if (gld${EMULATION_NAME}_try_needed (&needed, 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 path separated by
- config.rpath_separator. */
-
-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++] == config.rpath_separator)
- 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] == config.rpath_separator)
- {
- *p++ = path[i++];
- strcpy (p, ld_sysroot);
- p = p + strlen (p);
- }
- else
- *p++ = path[i++];
-
- *p = 0;
- return ret;
-}
-
-EOF
- case ${target} in
- *-*-freebsd* | *-*-dragonfly*)
- cat >>e${EMULATION_NAME}.c <<EOF
-/* Read the system search path the FreeBSD way rather than the Linux way. */
-#ifdef HAVE_ELF_HINTS_H
-#include <elf-hints.h>
-#else
-#include "elf-hints-local.h"
-#endif
-
-static bfd_boolean
-gld${EMULATION_NAME}_check_ld_elf_hints (const struct bfd_link_needed_list *l,
- int force)
-{
- static bfd_boolean initialized;
- static char *ld_elf_hints;
- struct dt_needed needed;
-
- if (!initialized)
- {
- FILE *f;
- char *tmppath;
-
- tmppath = concat (ld_sysroot, _PATH_ELF_HINTS, NULL);
- f = fopen (tmppath, FOPEN_RB);
- free (tmppath);
- if (f != NULL)
- {
- struct elfhints_hdr hdr;
-
- if (fread (&hdr, 1, sizeof (hdr), f) == sizeof (hdr)
- && hdr.magic == ELFHINTS_MAGIC
- && hdr.version == 1)
- {
- if (fseek (f, hdr.strtab + hdr.dirlist, SEEK_SET) != -1)
- {
- char *b;
-
- b = xmalloc (hdr.dirlistlen + 1);
- if (fread (b, 1, hdr.dirlistlen + 1, f) ==
- hdr.dirlistlen + 1)
- ld_elf_hints = gld${EMULATION_NAME}_add_sysroot (b);
-
- free (b);
- }
- }
- fclose (f);
- }
-
- initialized = TRUE;
- }
-
- if (ld_elf_hints == NULL)
- return FALSE;
-
- needed.by = l->by;
- needed.name = l->name;
- return gld${EMULATION_NAME}_search_needed (ld_elf_hints, &needed, force);
-}
-EOF
- # FreeBSD
- ;;
-
- *-*-linux-* | *-*-k*bsd*-*)
- cat >>e${EMULATION_NAME}.c <<EOF
-/* For a native linker, check the file /etc/ld.so.conf for directories
- in which we may find shared libraries. /etc/ld.so.conf is really
- only meaningful on Linux. */
-
-struct gld${EMULATION_NAME}_ld_so_conf
-{
- char *path;
- size_t len, alloc;
-};
-
-static bfd_boolean
-gld${EMULATION_NAME}_parse_ld_so_conf
- (struct gld${EMULATION_NAME}_ld_so_conf *info, const char *filename);
-
-static void
-gld${EMULATION_NAME}_parse_ld_so_conf_include
- (struct gld${EMULATION_NAME}_ld_so_conf *info, const char *filename,
- const char *pattern)
-{
- char *newp = NULL;
-#ifdef HAVE_GLOB
- glob_t gl;
-#endif
-
- if (pattern[0] != '/')
- {
- char *p = strrchr (filename, '/');
- size_t patlen = strlen (pattern) + 1;
-
- newp = xmalloc (p - filename + 1 + patlen);
- memcpy (newp, filename, p - filename + 1);
- memcpy (newp + (p - filename + 1), pattern, patlen);
- pattern = newp;
- }
-
-#ifdef HAVE_GLOB
- if (glob (pattern, 0, NULL, &gl) == 0)
- {
- size_t i;
-
- for (i = 0; i < gl.gl_pathc; ++i)
- gld${EMULATION_NAME}_parse_ld_so_conf (info, gl.gl_pathv[i]);
- globfree (&gl);
- }
-#else
- /* If we do not have glob, treat the pattern as a literal filename. */
- gld${EMULATION_NAME}_parse_ld_so_conf (info, pattern);
-#endif
-
- if (newp)
- free (newp);
-}
-
-static bfd_boolean
-gld${EMULATION_NAME}_parse_ld_so_conf
- (struct gld${EMULATION_NAME}_ld_so_conf *info, const char *filename)
-{
- FILE *f = fopen (filename, FOPEN_RT);
- char *line;
- size_t linelen;
-
- if (f == NULL)
- return FALSE;
-
- linelen = 256;
- line = xmalloc (linelen);
- do
- {
- char *p = line, *q;
-
- /* Normally this would use getline(3), but we need to be portable. */
- while ((q = fgets (p, linelen - (p - line), f)) != NULL
- && strlen (q) == linelen - (p - line) - 1
- && line[linelen - 2] != '\n')
- {
- line = xrealloc (line, 2 * linelen);
- p = line + linelen - 1;
- linelen += linelen;
- }
-
- if (q == NULL && p == line)
- break;
-
- p = strchr (line, '\n');
- if (p)
- *p = '\0';
-
- /* Because the file format does not know any form of quoting we
- can search forward for the next '#' character and if found
- make it terminating the line. */
- p = strchr (line, '#');
- if (p)
- *p = '\0';
-
- /* Remove leading whitespace. NUL is no whitespace character. */
- p = line;
- while (*p == ' ' || *p == '\f' || *p == '\r' || *p == '\t' || *p == '\v')
- ++p;
-
- /* If the line is blank it is ignored. */
- if (p[0] == '\0')
- continue;
-
- if (CONST_STRNEQ (p, "include") && (p[7] == ' ' || p[7] == '\t'))
- {
- char *dir, c;
- p += 8;
- do
- {
- while (*p == ' ' || *p == '\t')
- ++p;
-
- if (*p == '\0')
- break;
-
- dir = p;
-
- while (*p != ' ' && *p != '\t' && *p)
- ++p;
-
- c = *p;
- *p++ = '\0';
- if (dir[0] != '\0')
- gld${EMULATION_NAME}_parse_ld_so_conf_include (info, filename,
- dir);
- }
- while (c != '\0');
- }
- else
- {
- char *dir = p;
- while (*p && *p != '=' && *p != ' ' && *p != '\t' && *p != '\f'
- && *p != '\r' && *p != '\v')
- ++p;
-
- while (p != dir && p[-1] == '/')
- --p;
- if (info->path == NULL)
- {
- info->alloc = p - dir + 1 + 256;
- info->path = xmalloc (info->alloc);
- info->len = 0;
- }
- else
- {
- if (info->len + 1 + (p - dir) >= info->alloc)
- {
- info->alloc += p - dir + 256;
- info->path = xrealloc (info->path, info->alloc);
- }
- info->path[info->len++] = config.rpath_separator;
- }
- memcpy (info->path + info->len, dir, p - dir);
- info->len += p - dir;
- info->path[info->len] = '\0';
- }
- }
- while (! feof (f));
- free (line);
- fclose (f);
- return TRUE;
-}
-
-static bfd_boolean
-gld${EMULATION_NAME}_check_ld_so_conf (const struct bfd_link_needed_list *l,
- int force)
-{
- static bfd_boolean initialized;
- static char *ld_so_conf;
- struct dt_needed needed;
-
- if (! initialized)
- {
- char *tmppath;
- struct gld${EMULATION_NAME}_ld_so_conf info;
-
- info.path = NULL;
- info.len = info.alloc = 0;
- tmppath = concat (ld_sysroot, "${prefix}/etc/ld.so.conf", NULL);
- if (!gld${EMULATION_NAME}_parse_ld_so_conf (&info, tmppath))
- {
- free (tmppath);
- tmppath = concat (ld_sysroot, "/etc/ld.so.conf", NULL);
- gld${EMULATION_NAME}_parse_ld_so_conf (&info, tmppath);
- }
- free (tmppath);
-
- if (info.path)
- {
- char *d = gld${EMULATION_NAME}_add_sysroot (info.path);
- free (info.path);
- ld_so_conf = d;
- }
- initialized = TRUE;
- }
-
- if (ld_so_conf == NULL)
- return FALSE;
-
-
- needed.by = l->by;
- needed.name = l->name;
- return gld${EMULATION_NAME}_search_needed (ld_so_conf, &needed, 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)
-{
- const char *soname;
-
- /* Stop looking if we've found a loaded lib. */
- if (global_found != NULL
- && (bfd_elf_get_dyn_lib_class (global_found->the_bfd)
- & DYN_AS_NEEDED) == 0)
- return;
-
- if (s->filename == NULL || s->the_bfd == NULL)
- return;
-
- /* Don't look for a second non-loaded as-needed lib. */
- if (global_found != NULL
- && (bfd_elf_get_dyn_lib_class (s->the_bfd) & DYN_AS_NEEDED) != 0)
- return;
-
- if (strcmp (s->filename, global_needed->name) == 0)
- {
- global_found = s;
- return;
- }
-
- if (s->search_dirs_flag)
- {
- const char *f = strrchr (s->filename, '/');
- if (f != NULL
- && strcmp (f + 1, global_needed->name) == 0)
- {
- global_found = s;
- return;
- }
- }
-
- soname = bfd_elf_get_dt_soname (s->the_bfd);
- if (soname != NULL
- && strcmp (soname, global_needed->name) == 0)
- {
- global_found = s;
- return;
- }
-}
-
-EOF
-
-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;
-
- if (link_info.eh_frame_hdr
- && ! link_info.traditional_format
- && ! link_info.relocatable)
- {
- struct elf_link_hash_table *htab;
-
- htab = elf_hash_table (&link_info);
- if (is_elf_hash_table (htab))
- {
- bfd *abfd;
- asection *s;
-
- for (abfd = link_info.input_bfds; abfd; abfd = abfd->link_next)
- {
- s = bfd_get_section_by_name (abfd, ".eh_frame");
- if (s && s->size > 8 && !bfd_is_abs_section (s->output_section))
- break;
- }
- if (abfd)
- {
- const struct elf_backend_data *bed;
-
- bed = get_elf_backend_data (abfd);
- s = bfd_make_section_with_flags (abfd, ".eh_frame_hdr",
- bed->dynamic_sec_flags
- | SEC_READONLY);
- if (s != NULL
- && bfd_set_section_alignment (abfd, s, 2))
- htab->eh_info.hdr_sec = s;
- else
- einfo ("%P: warning: Cannot create .eh_frame_hdr section,"
- " --eh-frame-hdr ignored.\n");
- }
- }
- }
-
- /* We only need to worry about this when doing a final link. */
- if (link_info.relocatable || !link_info.executable)
- return;
-
- /* 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;
- struct dt_needed n, nn;
- int force;
-
- /* If the lib that needs this one was --as-needed and wasn't
- found to be needed, then this lib isn't needed either. */
- if (l->by != NULL
- && (bfd_elf_get_dyn_lib_class (l->by) & DYN_AS_NEEDED) != 0)
- continue;
-
- /* If we've already seen this file, skip it. */
- for (ll = needed; ll != l; ll = ll->next)
- if ((ll->by == NULL
- || (bfd_elf_get_dyn_lib_class (ll->by) & DYN_AS_NEEDED) == 0)
- && strcmp (ll->name, l->name) == 0)
- break;
- if (ll != l)
- continue;
-
- /* See if this file was included in the link explicitly. */
- global_needed = l;
- global_found = NULL;
- lang_for_each_input_file (gld${EMULATION_NAME}_check_needed);
- if (global_found != NULL
- && (bfd_elf_get_dyn_lib_class (global_found->the_bfd)
- & DYN_AS_NEEDED) == 0)
- continue;
-
- n.by = l->by;
- n.name = l->name;
- nn.by = l->by;
- if (trace_file_tries)
- info_msg (_("%s needed by %B\n"), l->name, l->by);
-
- /* As-needed libs specified on the command line (or linker script)
- take priority over libs found in search dirs. */
- if (global_found != NULL)
- {
- nn.name = global_found->filename;
- if (gld${EMULATION_NAME}_try_needed (&nn, TRUE))
- continue;
- }
-
- /* We need to find this file and include the symbol table. We
- want to search for the file in the same way that the dynamic
- linker will search. That means that we want to use
- 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${NATIVE}" = xyes ] ; then
-cat >>e${EMULATION_NAME}.c <<EOF
- const char *lib_path;
-EOF
-fi
-if [ "x${USE_LIBPATH}" = xyes ] ; then
-cat >>e${EMULATION_NAME}.c <<EOF
- struct bfd_link_needed_list *rp;
- int found;
-EOF
-fi
-cat >>e${EMULATION_NAME}.c <<EOF
-
- if (gld${EMULATION_NAME}_search_needed (command_line.rpath_link,
- &n, force))
- break;
-EOF
-if [ "x${USE_LIBPATH}" = xyes ] ; then
-cat >>e${EMULATION_NAME}.c <<EOF
- if (gld${EMULATION_NAME}_search_needed (command_line.rpath,
- &n, 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, &n,
- force))
- break;
- }
- lib_path = (const char *) getenv ("LD_LIBRARY_PATH");
- if (gld${EMULATION_NAME}_search_needed (lib_path, &n, 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,
- &n,
- force));
- free (tmpname);
- }
- if (found)
- break;
-
-EOF
-fi
-if [ "x${USE_LIBPATH}" = xyes ] ; then
- case ${target} in
- *-*-freebsd* | *-*-dragonfly*)
- cat >>e${EMULATION_NAME}.c <<EOF
- if (gld${EMULATION_NAME}_check_ld_elf_hints (l, force))
- break;
-EOF
- # FreeBSD
- ;;
-
- *-*-linux-* | *-*-k*bsd*-*)
- # Linux
- cat >>e${EMULATION_NAME}.c <<EOF
- if (gld${EMULATION_NAME}_check_ld_so_conf (l, force))
- break;
-
-EOF
- ;;
- esac
-fi
-cat >>e${EMULATION_NAME}.c <<EOF
- len = strlen (l->name);
- for (search = search_head; search != NULL; search = search->next)
- {
- char *filename;
-
- if (search->cmdline)
- continue;
- filename = (char *) xmalloc (strlen (search->name) + len + 2);
- sprintf (filename, "%s/%s", search->name, l->name);
- nn.name = filename;
- if (gld${EMULATION_NAME}_try_needed (&nn, force))
- break;
- free (filename);
- }
- if (search != NULL)
- break;
-EOF
-cat >>e${EMULATION_NAME}.c <<EOF
- }
-
- if (force < 2)
- 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)
-{
- bfd_boolean provide = FALSE;
-
- switch (exp->type.node_class)
- {
- case etree_provide:
- provide = TRUE;
- /* Fall thru */
- case etree_assign:
- /* We call record_link_assignment even if the symbol is defined.
- This is because if it is defined by a dynamic object, we
- actually want to use the value defined by the linker script,
- 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. */
- if (strcmp (exp->assign.dst, ".") != 0)
- {
- if (!bfd_elf_record_link_assignment (output_bfd, &link_info,
- exp->assign.dst, provide,
- exp->assign.hidden))
- einfo ("%P%F: failed to record assignment to %s: %E\n",
- exp->assign.dst);
- }
- 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 = (unsigned char *) ${ELF_INTERPRETER_NAME};
- sinterp->size = strlen ((char *) 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->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;
- char *msg;
- bfd_boolean ret;
-
- if (is->just_syms_flag)
- continue;
-
- s = bfd_get_section_by_name (is->the_bfd, ".gnu.warning");
- if (s == NULL)
- continue;
-
- sz = s->size;
- msg = xmalloc ((size_t) (sz + 1));
- if (! bfd_get_section_contents (is->the_bfd, s, msg,
- (file_ptr) 0, sz))
- einfo ("%F%B: Can't read contents of section .gnu.warning: %E\n",
- is->the_bfd);
- msg[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 space
- copying the warning into the output file. If we've already
- sized the output section, adjust its size. The adjustment
- is on rawsize because targets that size sections early will
- have called lang_reset_memory_regions after sizing. */
- if (s->output_section != NULL
- && s->output_section->rawsize >= s->size)
- s->output_section->rawsize -= s->size;
-
- s->size = 0;
-
- /* Also set SEC_EXCLUDE, so that local symbols defined in the
- warning section don't get copied to the output. */
- s->flags |= SEC_EXCLUDE | SEC_KEEP;
- }
- }
-
- before_allocation_default ();
-
- if (!bfd_elf_size_dynsym_hash_dynstr (output_bfd, &link_info))
- einfo ("%P%F: failed to set dynamic section sizes: %E\n");
-}
-
-EOF
-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_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 (lookup = &lang_output_section_statement.head->output_section_statement;
- lookup != NULL;
- lookup = lookup->next)
- {
- if (lookup->constraint != -1
- && CONST_STRNEQ (lookup->name, ".rel"))
- {
- 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;
-}
-
-/* Place an orphan section. We use this to put random SHF_ALLOC
- sections in the right segment. */
-
-static bfd_boolean
-gld${EMULATION_NAME}_place_orphan (asection *s)
-{
- static struct orphan_save hold[] =
- {
- { ".text",
- SEC_HAS_CONTENTS | SEC_ALLOC | SEC_LOAD | SEC_READONLY | SEC_CODE,
- 0, 0, 0, 0 },
- { ".rodata",
- SEC_HAS_CONTENTS | SEC_ALLOC | SEC_LOAD | SEC_READONLY | SEC_DATA,
- 0, 0, 0, 0 },
- { ".data",
- SEC_HAS_CONTENTS | SEC_ALLOC | SEC_LOAD | SEC_DATA,
- 0, 0, 0, 0 },
- { ".bss",
- SEC_ALLOC,
- 0, 0, 0, 0 },
- { 0,
- SEC_HAS_CONTENTS | SEC_ALLOC | SEC_LOAD | SEC_READONLY | SEC_DATA,
- 0, 0, 0, 0 },
- { ".interp",
- SEC_HAS_CONTENTS | SEC_ALLOC | SEC_LOAD | SEC_READONLY | SEC_DATA,
- 0, 0, 0, 0 },
- { ".sdata",
- SEC_HAS_CONTENTS | SEC_ALLOC | SEC_LOAD | SEC_DATA | SEC_SMALL_DATA,
- 0, 0, 0, 0 }
- };
- enum orphan_save_index
- {
- orphan_text = 0,
- orphan_rodata,
- orphan_data,
- orphan_bss,
- orphan_rel,
- orphan_interp,
- orphan_sdata
- };
- static int orphan_init_done = 0;
- struct orphan_save *place;
- const char *secname;
- lang_output_section_statement_type *after;
- lang_output_section_statement_type *os;
- int isdyn = 0;
- int iself = s->owner->xvec->flavour == bfd_target_elf_flavour;
- unsigned int sh_type = iself ? elf_section_type (s) : SHT_NULL;
-
- secname = bfd_get_section_name (s->owner, s);
-
- if (! link_info.relocatable
- && link_info.combreloc
- && (s->flags & SEC_ALLOC))
- {
- if (iself)
- switch (sh_type)
- {
- case SHT_RELA:
- secname = ".rela.dyn";
- isdyn = 1;
- break;
- case SHT_REL:
- secname = ".rel.dyn";
- isdyn = 1;
- break;
- default:
- break;
- }
- else if (CONST_STRNEQ (secname, ".rel"))
- {
- secname = secname[4] == 'a' ? ".rela.dyn" : ".rel.dyn";
- isdyn = 1;
- }
- }
-
- if (isdyn || (!config.unique_orphan_sections && !unique_section_p (s)))
- {
- /* Look through the script to see where to place this section. */
- os = lang_output_section_find (secname);
-
- if (os != NULL
- && (os->bfd_section == NULL
- || os->bfd_section->flags == 0
- || (_bfd_elf_match_sections_by_type (output_bfd,
- os->bfd_section,
- s->owner, s)
- && ((s->flags ^ os->bfd_section->flags)
- & (SEC_LOAD | SEC_ALLOC)) == 0)))
- {
- /* We already have an output section statement with this
- name, and its bfd section, if any, has compatible flags.
- If the section already exists but does not have any flags
- set, then it has been created by the linker, probably as a
- result of a --section-start command line switch. */
- lang_add_section (&os->children, s, os);
- return TRUE;
- }
- }
-
- if (!orphan_init_done)
- {
- struct orphan_save *ho;
- for (ho = hold; ho < hold + sizeof (hold) / sizeof (hold[0]); ++ho)
- if (ho->name != NULL)
- {
- ho->os = lang_output_section_find (ho->name);
- if (ho->os != NULL && ho->os->flags == 0)
- ho->os->flags = ho->flags;
- }
- orphan_init_done = 1;
- }
-
- /* If this is a final link, then always put .gnu.warning.SYMBOL
- sections into the .text section to get them out of the way. */
- if (link_info.executable
- && ! link_info.relocatable
- && CONST_STRNEQ (secname, ".gnu.warning.")
- && hold[orphan_text].os != NULL)
- {
- lang_add_section (&hold[orphan_text].os->children, s,
- hold[orphan_text].os);
- 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. */
-
- place = NULL;
- if ((s->flags & SEC_ALLOC) == 0)
- ;
- else if ((s->flags & SEC_LOAD) != 0
- && ((iself && sh_type == SHT_NOTE)
- || (!iself && CONST_STRNEQ (secname, ".note"))))
- place = &hold[orphan_interp];
- else if ((s->flags & (SEC_LOAD | SEC_HAS_CONTENTS)) == 0)
- place = &hold[orphan_bss];
- else if ((s->flags & SEC_SMALL_DATA) != 0)
- place = &hold[orphan_sdata];
- else if ((s->flags & SEC_READONLY) == 0)
- place = &hold[orphan_data];
- else if (((iself && (sh_type == SHT_RELA || sh_type == SHT_REL))
- || (!iself && CONST_STRNEQ (secname, ".rel")))
- && (s->flags & SEC_LOAD) != 0)
- place = &hold[orphan_rel];
- else if ((s->flags & SEC_CODE) == 0)
- place = &hold[orphan_rodata];
- else
- place = &hold[orphan_text];
-
- after = NULL;
- if (place != NULL)
- {
- if (place->os == NULL)
- {
- if (place->name != NULL)
- place->os = lang_output_section_find (place->name);
- else
- place->os = output_rel_find (s, isdyn);
- }
- after = place->os;
- if (after == NULL)
- after = lang_output_section_find_by_flags
- (s, &place->os, _bfd_elf_match_sections_by_type);
- if (after == NULL)
- /* *ABS* is always the first output section statement. */
- after = &lang_output_section_statement.head->output_section_statement;
- }
-
- /* Choose a unique name for the section. This will be needed if the
- same section name appears in the input file with different
- loadable or allocatable characteristics. */
- if (bfd_get_section_by_name (output_bfd, secname) != NULL)
- {
- static int count = 1;
- secname = bfd_get_unique_section_name (output_bfd, secname, &count);
- if (secname == NULL)
- einfo ("%F%P: place_orphan failed: %E\n");
- }
-
- lang_insert_orphan (s, secname, after, place, NULL, NULL);
-
- 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)
-{
- bfd_boolean need_layout = bfd_elf_discard_info (output_bfd, &link_info);
-
- gld${EMULATION_NAME}_map_segments (need_layout);
- finish_default ();
-}
-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' >> e${EMULATION_NAME}.c
-echo ' && link_info.relro' >> e${EMULATION_NAME}.c
-echo ' && (link_info.flags & DT_BIND_NOW)) return' >> e${EMULATION_NAME}.c
-sed $sc ldscripts/${EMULATION_NAME}.xdw >> e${EMULATION_NAME}.c
-echo ' ; else if (link_info.pie && link_info.combreloc) return' >> e${EMULATION_NAME}.c
-sed $sc ldscripts/${EMULATION_NAME}.xdc >> e${EMULATION_NAME}.c
-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' >> e${EMULATION_NAME}.c
-echo ' && link_info.relro' >> e${EMULATION_NAME}.c
-echo ' && (link_info.flags & DT_BIND_NOW)) return' >> e${EMULATION_NAME}.c
-sed $sc ldscripts/${EMULATION_NAME}.xsw >> e${EMULATION_NAME}.c
-echo ' ; else if (link_info.shared && link_info.combreloc) return' >> e${EMULATION_NAME}.c
-sed $sc ldscripts/${EMULATION_NAME}.xsc >> e${EMULATION_NAME}.c
-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 && link_info.relro' >> e${EMULATION_NAME}.c
-echo ' && (link_info.flags & DT_BIND_NOW)) return' >> e${EMULATION_NAME}.c
-sed $sc ldscripts/${EMULATION_NAME}.xw >> e${EMULATION_NAME}.c
-echo ' ; else if (link_info.combreloc) return' >> e${EMULATION_NAME}.c
-sed $sc ldscripts/${EMULATION_NAME}.xc >> e${EMULATION_NAME}.c
-fi
-echo ' ; else return' >> e${EMULATION_NAME}.c
-sed $sc ldscripts/${EMULATION_NAME}.x >> e${EMULATION_NAME}.c
-echo '; }' >> e${EMULATION_NAME}.c
-
-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
- && link_info.relro && (link_info.flags & DT_BIND_NOW))
- return "ldscripts/${EMULATION_NAME}.xdw";
- else if (link_info.pie && link_info.combreloc)
- return "ldscripts/${EMULATION_NAME}.xdc";
-EOF
-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
- && link_info.relro && (link_info.flags & DT_BIND_NOW))
- return "ldscripts/${EMULATION_NAME}.xsw";
- else if (link_info.shared && link_info.combreloc)
- return "ldscripts/${EMULATION_NAME}.xsc";
-EOF
-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 && link_info.relro
- && (link_info.flags & DT_BIND_NOW))
- return "ldscripts/${EMULATION_NAME}.xw";
- else if (link_info.combreloc)
- return "ldscripts/${EMULATION_NAME}.xc";
-EOF
-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)
-#define OPTION_EXCLUDE_LIBS (OPTION_EH_FRAME_HDR + 1)
-#define OPTION_HASH_STYLE (OPTION_EXCLUDE_LIBS + 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},
- {"exclude-libs", required_argument, NULL, OPTION_EXCLUDE_LIBS},
- {"hash-style", required_argument, NULL, OPTION_HASH_STYLE},
- {"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 OPTION_EXCLUDE_LIBS:
- add_excluded_libs (optarg);
- break;
-
- case OPTION_HASH_STYLE:
- link_info.emit_hash = FALSE;
- link_info.emit_gnu_hash = FALSE;
- if (strcmp (optarg, "sysv") == 0)
- link_info.emit_hash = TRUE;
- else if (strcmp (optarg, "gnu") == 0)
- link_info.emit_gnu_hash = TRUE;
- else if (strcmp (optarg, "both") == 0)
- {
- link_info.emit_hash = TRUE;
- link_info.emit_gnu_hash = TRUE;
- }
- else
- einfo (_("%P%F: invalid hash style \`%s'\n"), optarg);
- break;
-
- case 'z':
- if (strcmp (optarg, "initfirst") == 0)
- link_info.flags_1 |= (bfd_vma) DF_1_INITFIRST;
- 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, "lazy") == 0)
- {
- link_info.flags &= ~(bfd_vma) DF_BIND_NOW;
- link_info.flags_1 &= ~(bfd_vma) DF_1_NOW;
- }
- else if (strcmp (optarg, "origin") == 0)
- {
- link_info.flags |= (bfd_vma) DF_ORIGIN;
- 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;
- }
-EOF
-
- if test -n "$COMMONPAGESIZE"; then
-cat >>e${EMULATION_NAME}.c <<EOF
- else if (strcmp (optarg, "relro") == 0)
- link_info.relro = TRUE;
- else if (strcmp (optarg, "norelro") == 0)
- link_info.relro = FALSE;
-EOF
- fi
-
-cat >>e${EMULATION_NAME}.c <<EOF
- else if (CONST_STRNEQ (optarg, "max-page-size="))
- {
- char *end;
-
- config.maxpagesize = strtoul (optarg + 14, &end, 0);
- if (*end || (config.maxpagesize & (config.maxpagesize - 1)) != 0)
- einfo (_("%P%F: invalid maxium page size \`%s'\n"),
- optarg + 14);
- ASSERT (default_target != NULL);
- bfd_emul_set_maxpagesize (default_target, config.maxpagesize);
- }
- else if (CONST_STRNEQ (optarg, "common-page-size="))
- {
- char *end;
- config.commonpagesize = strtoul (optarg + 17, &end, 0);
- if (*end
- || (config.commonpagesize & (config.commonpagesize - 1)) != 0)
- einfo (_("%P%F: invalid common page size \`%s'\n"),
- optarg + 17);
- ASSERT (default_target != NULL);
- bfd_emul_set_commonpagesize (default_target,
- config.commonpagesize);
- }
- /* What about the other Solaris -z options? FIXME. */
- break;
-EOF
-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, _(" --hash-style=STYLE\tSet hash style to sysv, gnu or both\n"));
- fprintf (file, _(" -z combreloc\t\tMerge dynamic relocs into one section and sort\n"));
- fprintf (file, _(" -z defs\t\tReport unresolved symbols in object files.\n"));
- fprintf (file, _(" -z execstack\t\tMark executable as requiring executable stack\n"));
- fprintf (file, _(" -z initfirst\t\tMark DSO to be initialized first at runtime\n"));
- fprintf (file, _(" -z interpose\t\tMark object to interpose all DSOs but executable\n"));
- fprintf (file, _(" -z lazy\t\tMark object lazy runtime binding (default)\n"));
- fprintf (file, _(" -z loadfltr\t\tMark object requiring immediate process\n"));
- fprintf (file, _(" -z muldefs\t\tAllow multiple definitions\n"));
- fprintf (file, _(" -z nocombreloc\tDon't merge dynamic relocs into one section\n"));
- 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"));
-EOF
-
- if test -n "$COMMONPAGESIZE"; then
-cat >>e${EMULATION_NAME}.c <<EOF
- fprintf (file, _(" -z norelro\t\tDon't create RELRO program header\n"));
-EOF
- fi
-
-cat >>e${EMULATION_NAME}.c <<EOF
- fprintf (file, _(" -z now\t\tMark object non-lazy runtime binding\n"));
- fprintf (file, _(" -z origin\t\tMark object requiring immediate \$ORIGIN processing\n\t\t\t at runtime\n"));
-EOF
-
- if test -n "$COMMONPAGESIZE"; then
-cat >>e${EMULATION_NAME}.c <<EOF
- fprintf (file, _(" -z relro\t\tCreate RELRO program header\n"));
-EOF
- fi
-
-cat >>e${EMULATION_NAME}.c <<EOF
- fprintf (file, _(" -z max-page-size=SIZE\tSet maximum page size to SIZE\n"));
- fprintf (file, _(" -z common-page-size=SIZE\n\t\t\tSet common page size to SIZE\n"));
- fprintf (file, _(" -z KEYWORD\t\tIgnored for Solaris compatibility\n"));
-EOF
-fi
-
-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/genelf.em b/contrib/binutils/ld/emultempl/genelf.em
deleted file mode 100644
index dae75a16ebe7..000000000000
--- a/contrib/binutils/ld/emultempl/genelf.em
+++ /dev/null
@@ -1,39 +0,0 @@
-# This shell script emits a C file. -*- C -*-
-# Copyright 2006 Free Software Foundation, Inc.
-#
-# This file is part of GLD, the Gnu Linker.
-#
-# This program is free software; you can redistribute it and/or modify
-# it under the terms of the GNU General Public License as published by
-# the Free Software Foundation; either version 2 of the License, or
-# (at your option) any later version.
-#
-# This program is distributed in the hope that it will be useful,
-# but WITHOUT ANY WARRANTY; without even the implied warranty of
-# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
-# GNU General Public License for more details.
-#
-# You should have received a copy of the GNU General Public License
-# along with this program; if not, write to the Free Software
-# Foundation, Inc., 51 Franklin Street - Fifth Floor, Boston, MA 02110-1301, USA.
-#
-
-# This file is sourced from generic.em
-#
-cat >>e${EMULATION_NAME}.c <<EOF
-#include "elf-bfd.h"
-
-EOF
-. ${srcdir}/emultempl/elf-generic.em
-cat >>e${EMULATION_NAME}.c <<EOF
-
-static void
-gld${EMULATION_NAME}_finish (void)
-{
- gld${EMULATION_NAME}_map_segments (FALSE);
- finish_default ();
-}
-EOF
-# Put these extra routines in ld_${EMULATION_NAME}_emulation
-#
-LDEMUL_FINISH=gld${EMULATION_NAME}_finish
diff --git a/contrib/binutils/ld/emultempl/generic.em b/contrib/binutils/ld/emultempl/generic.em
deleted file mode 100644
index 9ea6d02ed7e0..000000000000
--- 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, 1999, 2000, 2001, 2002, 2003, 2004,
- 2007 Free Software Foundation, Inc.
- Written by Steve Chamberlain steve@cygnus.com
-
-This file is part of GLD, the Gnu Linker.
-
-This program is free software; you can redistribute it and/or modify
-it under the terms of the GNU General Public License as published by
-the Free Software Foundation; either version 2 of the License, or
-(at your option) any later version.
-
-This program is distributed in the hope that it will be useful,
-but WITHOUT ANY WARRANTY; without even the implied warranty of
-MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
-GNU General Public License for more details.
-
-You should have received a copy of the GNU General Public License
-along with this program; if not, write to the Free Software
-Foundation, Inc., 51 Franklin Street - Fifth Floor, Boston, MA 02110-1301, USA. */
-
-#define TARGET_IS_${EMULATION_NAME}
-
-#include "sysdep.h"
-#include "bfd.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-finish_default},
- ${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 ddc5370bfd99..000000000000
--- 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., 51 Franklin Street - Fifth Floor, Boston, MA 02110-1301, 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.relax_pass = 2;
- 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 48ac046884d3..000000000000
--- a/contrib/binutils/ld/emultempl/linux.em
+++ /dev/null
@@ -1,209 +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, 2001, 2002,
- 2003, 2004, 2005, 2007 Free Software Foundation, Inc.
- Written by Steve Chamberlain <sac@cygnus.com>
- Linux support by Eric Youngdale <ericy@cais.cais.com>
-
-This file is part of GLD, the Gnu Linker.
-
-This program is free software; you can redistribute it and/or modify
-it under the terms of the GNU General Public License as published by
-the Free Software Foundation; either version 2 of the License, or
-(at your option) any later version.
-
-This program is distributed in the hope that it will be useful,
-but WITHOUT ANY WARRANTY; without even the implied warranty of
-MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
-GNU General Public License for more details.
-
-You should have received a copy of the GNU General Public License
-along with this program; if not, write to the Free Software
-Foundation, Inc., 51 Franklin Street - Fifth Floor, Boston, MA 02110-1301, USA. */
-
-#define TARGET_IS_${EMULATION_NAME}
-
-#include "sysdep.h"
-#include "bfd.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");
-
- before_allocation_default ();
-}
-
-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}",
- finish_default,
- 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 780cc60ceb00..000000000000
--- a/contrib/binutils/ld/emultempl/mipsecoff.em
+++ /dev/null
@@ -1,37 +0,0 @@
-# This shell script emits a C file. -*- C -*-
-# Copyright 1994, 1995, 1997, 1999, 2000, 2001, 2002, 2003, 2004
-# Free Software Foundation, Inc.
-#
-# This file is part of GLD, the Gnu Linker.
-#
-# This program is free software; you can redistribute it and/or modify
-# it under the terms of the GNU General Public License as published by
-# the Free Software Foundation; either version 2 of the License, or
-# (at your option) any later version.
-#
-# This program is distributed in the hope that it will be useful,
-# but WITHOUT ANY WARRANTY; without even the implied warranty of
-# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
-# GNU General Public License for more details.
-#
-# You should have received a copy of the GNU General Public License
-# along with this program; if not, write to the Free Software
-# Foundation, Inc., 51 Franklin Street - Fifth Floor, Boston, MA 02110-1301, USA.
-#
-
-if [ -z "$MACHINE" ]; then
- OUTPUT_ARCH=${ARCH}
-else
- OUTPUT_ARCH=${ARCH}:${MACHINE}
-fi
-cat >>e${EMULATION_NAME}.c <<EOF
-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_ */
-}
-EOF
-
-LDEMUL_BEFORE_PARSE=gld${EMULATION_NAME}_before_parse
diff --git a/contrib/binutils/ld/emultempl/mipself.em b/contrib/binutils/ld/emultempl/mipself.em
deleted file mode 100644
index 846cdc51dbb0..000000000000
--- a/contrib/binutils/ld/emultempl/mipself.em
+++ /dev/null
@@ -1,37 +0,0 @@
-# This shell script emits a C file. -*- C -*-
-# Copyright 2006 Free Software Foundation, Inc.
-#
-# This file is part of GLD, the Gnu Linker.
-#
-# This program is free software; you can redistribute it and/or modify
-# it under the terms of the GNU General Public License as published by
-# the Free Software Foundation; either version 2 of the License, or
-# (at your option) any later version.
-#
-# This program is distributed in the hope that it will be useful,
-# but WITHOUT ANY WARRANTY; without even the implied warranty of
-# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
-# GNU General Public License for more details.
-#
-# You should have received a copy of the GNU General Public License
-# along with this program; if not, write to the Free Software Foundation,
-# Inc., 51 Franklin Street - Fifth Floor, Boston, MA 02110-1301, USA.
-
-cat >>e${EMULATION_NAME}.c <<EOF
-static void
-mips_after_parse (void)
-{
- /* .gnu.hash and the MIPS ABI require .dynsym to be sorted in different
- ways. .gnu.hash needs symbols to be grouped by hash code whereas the
- MIPS ABI requires a mapping between the GOT and the symbol table. */
- if (link_info.emit_gnu_hash)
- {
- einfo ("%X%P: .gnu.hash is incompatible with the MIPS ABI\n");
- link_info.emit_hash = TRUE;
- link_info.emit_gnu_hash = FALSE;
- }
- after_parse_default ();
-}
-EOF
-
-LDEMUL_AFTER_PARSE=mips_after_parse
diff --git a/contrib/binutils/ld/emultempl/needrelax.em b/contrib/binutils/ld/emultempl/needrelax.em
deleted file mode 100644
index aaa85d0b5b57..000000000000
--- 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., 51 Franklin Street - Fifth Floor, Boston, MA 02110-1301, 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 43715e404621..000000000000
--- 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 a526d3ffc4c5..000000000000
--- 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 e9b316aaeb91..000000000000
--- a/contrib/binutils/ld/emultempl/pe.em
+++ /dev/null
@@ -1,1909 +0,0 @@
-# This shell script emits a C file. -*- C -*-
-# It does some substitutions.
-test -z "${ENTRY}" && ENTRY="_mainCRTStartup"
-if [ -z "$MACHINE" ]; then
- OUTPUT_ARCH=${ARCH}
-else
- OUTPUT_ARCH=${ARCH}:${MACHINE}
-fi
-rm -f e${EMULATION_NAME}.c
-(echo;echo;echo;echo;echo)>e${EMULATION_NAME}.c # there, now line numbers match ;-)
-cat >>e${EMULATION_NAME}.c <<EOF
-/* This file is part of GLD, the Gnu Linker.
- Copyright 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004,
- 2005, 2006, 2007 Free Software Foundation, Inc.
-
- This program is free software; you can redistribute it and/or modify
- it under the terms of the GNU General Public License as published by
- the Free Software Foundation; either version 2 of the License, or
- (at your option) any later version.
-
- This program is distributed in the hope that it will be useful,
- but WITHOUT ANY WARRANTY; without even the implied warranty of
- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- GNU General Public License for more details.
-
- You should have received a copy of the GNU General Public License
- along with this program; if not, write to the Free Software
- Foundation, Inc., 51 Franklin Street - Fifth Floor, Boston, MA 02110-1301, USA. */
-
-/* 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. */
-
-#if defined(TARGET_IS_armpe) \
- || defined(TARGET_IS_arm_epoc_pe) \
- || defined(TARGET_IS_arm_wince_pe)
-#define bfd_arm_allocate_interworking_sections \
- bfd_${EMULATION_NAME}_allocate_interworking_sections
-#define bfd_arm_get_bfd_for_interworking \
- bfd_${EMULATION_NAME}_get_bfd_for_interworking
-#define bfd_arm_process_before_allocation \
- bfd_${EMULATION_NAME}_process_before_allocation
-#endif
-
-#include "sysdep.h"
-#include "bfd.h"
-#include "bfdlink.h"
-#include "getopt.h"
-#include "libiberty.h"
-#include "ld.h"
-#include "ldmain.h"
-#include "ldexp.h"
-#include "ldlang.h"
-#include "ldfile.h"
-#include "ldemul.h"
-#include <ldgram.h>
-#include "ldlex.h"
-#include "ldmisc.h"
-#include "ldctor.h"
-#include "coff/internal.h"
-
-/* FIXME: See bfd/peXXigen.c for why we include an architecture specific
- header in generic PE code. */
-#include "coff/i386.h"
-#include "coff/pe.h"
-
-/* FIXME: This is a BFD internal header file, and we should not be
- using it here. */
-#include "../bfd/libcoff.h"
-
-#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) \
- || defined(TARGET_IS_shpe) \
- || defined(TARGET_IS_mipspe) \
- || defined(TARGET_IS_armpe) \
- || defined(TARGET_IS_arm_epoc_pe) \
- || defined(TARGET_IS_arm_wince_pe)
-#define DLL_SUPPORT
-#endif
-
-#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
-
-#if defined(TARGET_IS_armpe) || defined(TARGET_IS_arm_wince_pe)
-#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
-
-#define U(S) ${INITIAL_SYMBOL_CHAR} S
-
-static struct internal_extra_pe_aouthdr pe;
-static int dll;
-static flagword real_flags = 0;
-static int support_old_code = 0;
-static char * thumb_entry_symbol = NULL;
-static lang_assignment_statement_type *image_base_statement = 0;
-
-#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 = -1;
-
-#if (PE_DEF_SUBSYSTEM == 9) || (PE_DEF_SUBSYSTEM == 2)
-#if defined TARGET_IS_mipspe || defined TARGET_IS_armpe || defined TARGET_IS_arm_wince_pe
- lang_default_entry ("WinMainCRTStartup");
-#else
- lang_default_entry ("_WinMainCRTStartup");
-#endif
-#else
- lang_default_entry ("${ENTRY}");
-#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)
-#define OPTION_LARGE_ADDRESS_AWARE \
- (OPTION_DLL_DISABLE_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
- {"large-address-aware", no_argument, NULL, OPTION_LARGE_ADDRESS_AWARE},
- {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),
-#if defined(TARGET_IS_armpe) || defined(TARGET_IS_arm_wince_pe)
- D(MajorSubsystemVersion,"__major_subsystem_version__", 3),
-#else
- D(MajorSubsystemVersion,"__major_subsystem_version__", 4),
-#endif
- 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
- fprintf (file, _(" --large-address-aware Executable supports virtual addresses\n\
- greater than 2 gigabytes\n"));
-}
-
-
-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;
- const char *entry;
- const char *initial_symbol_char;
- char *end;
- int len;
- int i;
- int subsystem;
- unsigned long temp_subsystem;
- static const struct
- {
- const char *name;
- const int value;
- const char *entry;
- }
- v[] =
- {
- { "native", 1, "NtProcessStartup" },
- { "windows", 2, "WinMainCRTStartup" },
- { "console", 3, "mainCRTStartup" },
- { "posix", 7, "__PosixProcessStartup"},
- { "wince", 9, "WinMainCRTStartup" },
- { "xbox", 14, "mainCRTStartup" },
- { NULL, 0, NULL }
- };
- /* Entry point name for arbitrary subsystem numbers. */
- static const char default_entry[] = "mainCRTStartup";
-
- /* Check for the presence of a version number. */
- sver = strchr (optarg, ':');
- if (sver == NULL)
- len = strlen (optarg);
- else
- {
- len = sver - optarg;
- set_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"));
- }
-
- /* Check for numeric subsystem. */
- temp_subsystem = strtoul (optarg, & end, 0);
- if ((*end == ':' || *end == '\0') && (temp_subsystem < 65536))
- {
- /* Search list for a numeric match to use its entry point. */
- for (i = 0; v[i].name; i++)
- if (v[i].value == (int) temp_subsystem)
- break;
-
- /* If no match, use the default. */
- if (v[i].name != NULL)
- entry = v[i].entry;
- else
- entry = default_entry;
-
- /* Use this subsystem. */
- subsystem = (int) temp_subsystem;
- }
- else
- {
- /* Search for subsystem by name. */
- for (i = 0; v[i].name; i++)
- if (strncmp (optarg, v[i].name, len) == 0
- && v[i].name[len] == '\0')
- break;
-
- if (v[i].name == NULL)
- {
- einfo (_("%P%F: invalid subsystem type %s\n"), optarg);
- return;
- }
-
- entry = v[i].entry;
- subsystem = v[i].value;
- }
-
- set_pe_name ("__subsystem__", subsystem);
-
- initial_symbol_char = ${INITIAL_SYMBOL_CHAR};
- if (*initial_symbol_char != '\0')
- {
- char *alc_entry;
-
- /* lang_default_entry expects its argument to be permanently
- allocated, so we don't free this string. */
- alc_entry = xmalloc (strlen (initial_symbol_char)
- + strlen (entry)
- + 1);
- strcpy (alc_entry, initial_symbol_char);
- strcat (alc_entry, entry);
- entry = alc_entry;
- }
-
- lang_default_entry (entry);
-
- return;
-}
-
-
-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
- case OPTION_LARGE_ADDRESS_AWARE:
- real_flags |= IMAGE_FILE_LARGE_ADDRESS_AWARE;
- break;
- }
- return TRUE;
-}
-
-
-#ifdef DLL_SUPPORT
-static unsigned long
-strhash (const char *str)
-{
- const unsigned char *s;
- unsigned long hash;
- unsigned int c;
- unsigned int len;
-
- hash = 0;
- len = 0;
- s = (const unsigned char *) str;
- while ((c = *s++) != '\0')
- {
- hash += c + (c << 17);
- hash ^= hash >> 2;
- ++len;
- }
- hash += len + (len << 17);
- hash ^= hash >> 2;
-
- return hash;
-}
-
-/* Use the output file to create a image base for relocatable DLLs. */
-
-static unsigned long
-compute_dll_image_base (const char *ofile)
-{
- unsigned long hash = strhash (ofile);
- return 0x61300000 + ((hash << 16) & 0x0FFC0000);
-}
-#endif
-
-/* Assign values to the special symbols before the linker script is
- read. */
-
-static void
-gld_${EMULATION_NAME}_set_symbols (void)
-{
- /* Run through and invent symbols for all the
- names and insert the defaults. */
- int j;
- lang_statement_list_type *save;
-
- if (!init[IMAGEBASEOFF].inited)
- {
- if (link_info.relocatable)
- init[IMAGEBASEOFF].value = 0;
- else if (init[DLLOFF].value || (link_info.shared && !link_info.pie))
-#ifdef DLL_SUPPORT
- init[IMAGEBASEOFF].value = (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->u.undef.next)
- if (undef->type == bfd_link_hash_undefined)
- {
- char* at = strchr (undef->root.string, '@');
- int lead_at = (*undef->root.string == '@');
- /* For now, don't try to fixup fastcall symbols. */
-
- if (at && !lead_at)
- {
- /* The symbol is a stdcall symbol, so let's look for a
- cdecl symbol with the same name and resolve to that. */
- char *cname = xstrdup (undef->root.string /* + lead_at */);
- at = strchr (cname, '@');
- *at = 0;
- sym = bfd_link_hash_lookup (link_info.hash, cname, 0, 0, 1);
-
- if (sym && sym->type == bfd_link_hash_defined)
- {
- undef->type = bfd_link_hash_defined;
- undef->u.def.value = sym->u.def.value;
- undef->u.def.section = sym->u.def.section;
-
- if (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;
- char addend[4];
-
- if (pe_dll_extra_pe_debug)
- printf ("arelent: %s@%#lx: add=%li\n", sym->name,
- (long) rel->address, (long) rel->addend);
-
- if (! bfd_get_section_contents (s->owner, s, addend, rel->address, sizeof (addend)))
- einfo (_("%C: Cannot get section contents - auto-import exception\n"),
- s->owner, s, rel->address);
-
- pe_create_import_fixup (rel, s, bfd_get_32 (s->owner, 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->u.undef.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 (! CONST_STRNEQ (symbols[i]->name, U ("_head_")))
- continue;
-
- if (pe_dll_extra_pe_debug)
- printf ("->%s\n", symbols[i]->name);
-
- pe_data_import_dll = (char*) (symbols[i]->name +
- sizeof (U ("_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->u.undef.next)
- printf ("-%s\n", sym->root.string);
- bfd_hash_traverse (&link_info.hash->table, pr_sym, NULL);
-
- for (a = link_info.input_bfds; a; a = a->link_next)
- printf ("*%s\n",a->filename);
- }
-#endif
-
- /* Pass the wacky PE command line options into the output bfd.
- FIXME: This should be done via a function, rather than by
- including an internal BFD header. */
-
- if (coff_data (output_bfd) == NULL || coff_data (output_bfd)->pe == 0)
- einfo (_("%F%P: cannot perform PE operations on non PE output file '%B'.\n"), output_bfd);
-
- pe_data (output_bfd)->pe_opthdr = pe;
- pe_data (output_bfd)->dll = init[DLLOFF].value;
- pe_data (output_bfd)->real_flags |= real_flags;
-
-#ifdef DLL_SUPPORT
- if (pe_enable_stdcall_fixup) /* -1=warn or 1=disable */
- pe_fixup_stdcalls ();
-
- pe_process_import_defs (output_bfd, & link_info);
-
- pe_find_data_imports ();
-
-#if defined (TARGET_IS_i386pe) \
- || defined (TARGET_IS_armpe) \
- || defined (TARGET_IS_arm_epoc_pe) \
- || defined (TARGET_IS_arm_wince_pe)
- if (!link_info.relocatable)
- pe_dll_build_sections (output_bfd, &link_info);
- else
- pe_exe_build_sections (output_bfd, &link_info);
-#else
- if (link_info.shared)
- pe_dll_build_sections (output_bfd, &link_info);
-#endif
-#endif /* DLL_SUPPORT */
-
-#if defined(TARGET_IS_armpe) || defined(TARGET_IS_arm_epoc_pe) || defined(TARGET_IS_arm_wince_pe)
- if (strstr (bfd_get_target (output_bfd), "arm") == NULL)
- {
- /* The arm backend needs special fields in the output hash structure.
- 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_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 (CONST_STRNEQ (sec->name, ".idata\$"))
- is_imp = 1;
- reloc_count += sec->reloc_count;
- }
-
- if (is_imp && !idata2 && reloc_count)
- {
- /* It is, look for the reference to head and see if it's
- from our own library. */
- for (sec = is->the_bfd->sections; sec; sec = sec->next)
- {
- int i;
- long symsize;
- long relsize;
- asymbol **symbols;
- arelent **relocs;
- int nrelocs;
-
- symsize = bfd_get_symtab_upper_bound (is->the_bfd);
- if (symsize < 1)
- break;
- relsize = bfd_get_reloc_upper_bound (is->the_bfd, sec);
- if (relsize < 1)
- break;
-
- symbols = (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;
- char *other_bfd_filename;
- char *n;
-
- s = (relocs[i]->sym_ptr_ptr)[0];
-
- if (s->flags & BSF_LOCAL)
- continue;
-
- /* Thunk section with reloc to another bfd. */
- blhe = bfd_link_hash_lookup (link_info.hash,
- s->name,
- FALSE, FALSE, TRUE);
-
- if (blhe == NULL
- || blhe->type != bfd_link_hash_defined)
- continue;
-
- other_bfd_filename
- = blhe->u.def.section->owner->my_archive
- ? bfd_get_filename (blhe->u.def.section->owner->my_archive)
- : bfd_get_filename (blhe->u.def.section->owner);
-
- if (strcmp (bfd_get_filename (is->the_bfd->my_archive),
- other_bfd_filename) == 0)
- continue;
-
- /* Rename this implib to match the other one. */
- n = xmalloc (strlen (other_bfd_filename) + 1);
- strcpy (n, other_bfd_filename);
- is->the_bfd->my_archive->filename = n;
- }
-
- free (relocs);
- /* Note - we do not free the symbols,
- they are now cached in the BFD. */
- }
- }
- }
- }
- }
-
- {
- int is_ms_arch = 0;
- bfd *cur_arch = 0;
- lang_input_statement_type *is2;
- lang_input_statement_type *is3;
-
- /* Careful - this is a shell script. Watch those dollar signs! */
- /* Microsoft import libraries have every member named the same,
- and not in the right order for us to link them correctly. We
- must detect these and rename the members so that they'll link
- correctly. There are three types of objects: the head, the
- thunks, and the sentinel(s). The head is easy; it's the one
- with idata2. We assume that the sentinels won't have relocs,
- and the thunks will. It's easier than checking the symbol
- table for external references. */
- LANG_FOR_EACH_INPUT_STATEMENT (is)
- {
- if (is->the_bfd->my_archive)
- {
- char *pnt;
- bfd *arch = is->the_bfd->my_archive;
-
- if (cur_arch != arch)
- {
- cur_arch = arch;
- is_ms_arch = 1;
-
- for (is3 = is;
- is3 && is3->the_bfd->my_archive == arch;
- is3 = (lang_input_statement_type *) is3->next)
- {
- /* A MS dynamic import library can also contain static
- members, so look for the first element with a .dll
- extension, and use that for the remainder of the
- comparisons. */
- pnt = strrchr (is3->the_bfd->filename, '.');
- if (pnt != NULL && strcmp (pnt, ".dll") == 0)
- break;
- }
-
- if (is3 == NULL)
- is_ms_arch = 0;
- else
- {
- /* OK, found one. Now look to see if the remaining
- (dynamic import) members use the same name. */
- for (is2 = is;
- is2 && is2->the_bfd->my_archive == arch;
- is2 = (lang_input_statement_type *) is2->next)
- {
- /* Skip static members, ie anything with a .obj
- extension. */
- pnt = strrchr (is2->the_bfd->filename, '.');
- if (pnt != NULL && strcmp (pnt, ".obj") == 0)
- continue;
-
- if (strcmp (is3->the_bfd->filename,
- is2->the_bfd->filename))
- {
- is_ms_arch = 0;
- break;
- }
- }
- }
- }
-
- /* This fragment might have come from an .obj file in a Microsoft
- import, and not an actual import record. If this is the case,
- then leave the filename alone. */
- pnt = strrchr (is->the_bfd->filename, '.');
-
- if (is_ms_arch && (strcmp (pnt, ".dll") == 0))
- {
- int idata2 = 0, reloc_count=0;
- asection *sec;
- char *new_name, seq;
-
- for (sec = is->the_bfd->sections; sec; sec = sec->next)
- {
- if (strcmp (sec->name, ".idata\$2") == 0)
- idata2 = 1;
- reloc_count += sec->reloc_count;
- }
-
- if (idata2) /* .idata2 is the TOC */
- seq = 'a';
- else if (reloc_count > 0) /* thunks */
- seq = 'b';
- else /* sentinel */
- seq = 'c';
-
- new_name = xmalloc (strlen (is->the_bfd->filename) + 3);
- sprintf (new_name, "%s.%c", is->the_bfd->filename, seq);
- is->the_bfd->filename = new_name;
-
- new_name = xmalloc (strlen (is->filename) + 3);
- sprintf (new_name, "%s.%c", is->filename, seq);
- is->filename = new_name;
- }
- }
- }
- }
-
- {
- /* The following chunk of code tries to identify jump stubs in
- import libraries which are dead code and eliminates them
- from the final link. For each exported symbol <sym>, there
- is a object file in the import library with a .text section
- and several .idata$* sections. The .text section contains the
- symbol definition for <sym> which is a jump stub of the form
- jmp *__imp_<sym>. The .idata$5 contains the symbol definition
- for __imp_<sym> which is the address of the slot for <sym> in
- the import address table. When a symbol is imported explicitly
- using __declspec(dllimport) declaration, the compiler generates
- a reference to __imp_<sym> which directly resolves to the
- symbol in .idata$5, in which case the jump stub code is not
- needed. The following code tries to identify jump stub sections
- in import libraries which are not referred to by anyone and
- marks them for exclusion from the final link. */
- LANG_FOR_EACH_INPUT_STATEMENT (is)
- {
- if (is->the_bfd->my_archive)
- {
- int is_imp = 0;
- asection *sec, *stub_sec = NULL;
-
- /* See if this is an import library thunk. */
- for (sec = is->the_bfd->sections; sec; sec = sec->next)
- {
- if (strncmp (sec->name, ".idata\$", 7) == 0)
- is_imp = 1;
- /* The section containing the jmp stub has code
- and has a reloc. */
- if ((sec->flags & SEC_CODE) && sec->reloc_count)
- stub_sec = sec;
- }
-
- if (is_imp && stub_sec)
- {
- long symsize;
- asymbol **symbols;
- long src_count;
- struct bfd_link_hash_entry * blhe;
-
- symsize = bfd_get_symtab_upper_bound (is->the_bfd);
- symbols = xmalloc (symsize);
- symsize = bfd_canonicalize_symtab (is->the_bfd, symbols);
-
- for (src_count = 0; src_count < symsize; src_count++)
- {
- if (symbols[src_count]->section->id == stub_sec->id)
- {
- /* This symbol belongs to the section containing
- the stub. */
- blhe = bfd_link_hash_lookup (link_info.hash,
- symbols[src_count]->name,
- FALSE, FALSE, TRUE);
- /* If the symbol in the stub section has no other
- undefined references, exclude the stub section
- from the final link. */
- if (blhe && (blhe->type == bfd_link_hash_defined)
- && (blhe->u.undef.next == NULL))
- stub_sec->flags |= SEC_EXCLUDE;
- }
- }
- free (symbols);
- }
- }
- }
- }
-}
-
-static void
-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) || defined(TARGET_IS_arm_wince_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_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_allocate_interworking_sections (& link_info);
-#endif /* TARGET_IS_armpe || TARGET_IS_arm_epoc_pe || TARGET_IS_arm_wince_pe */
-
- before_allocation_default ();
-}
-
-#ifdef DLL_SUPPORT
-/* 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)
- {
- pe_def_file = 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%s", U (""), pe_def_file->exports[i].internal_name);
-
- h = bfd_link_hash_lookup (link_info.hash, buf, TRUE, TRUE, TRUE);
- if (h == (struct bfd_link_hash_entry *) NULL)
- 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 (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
-#ifdef TARGET_IS_arm_epoc_pe
- pe_dll_id_target ("epoc-pei-arm-little");
-#endif
-#ifdef TARGET_IS_arm_wince_pe
- pe_dll_id_target ("pei-arm-wince-little");
-#endif
- if (pe_bfd_is_dll (entry->the_bfd))
- return pe_implied_import_dll (entry->filename);
-#endif
- return FALSE;
-}
-
-static void
-gld_${EMULATION_NAME}_finish (void)
-{
-#if defined(TARGET_IS_armpe) || defined(TARGET_IS_arm_epoc_pe) || defined(TARGET_IS_arm_wince_pe)
- struct bfd_link_hash_entry * h;
-
- if (thumb_entry_symbol != NULL)
- {
- 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) || defined(TARGET_IS_arm_wince_pe) */
-
- finish_default ();
-
-#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;
- }
- }
-}
-
-
-/* Place an orphan section.
-
- We use this to put sections in a reasonable place in the file, and
- to ensure that they are aligned as required.
-
- We handle grouped sections here as well. A section named .foo$nn
- goes into the output section .foo. All grouped sections are sorted
- by name.
-
- Grouped sections for the default sections are handled by the
- default linker script using wildcards, and are sorted by
- sort_sections. */
-
-static bfd_boolean
-gld_${EMULATION_NAME}_place_orphan (asection *s)
-{
- const char *secname;
- const char *orig_secname;
- char *dollar = NULL;
- lang_output_section_statement_type *os;
- lang_statement_list_type add_child;
- lang_statement_union_type **pl;
-
- secname = bfd_get_section_name (s->owner, s);
-
- /* Look through the script to see where to place this section. */
- orig_secname = secname;
- if (!link_info.relocatable
- && (dollar = strchr (secname, '$')) != NULL)
- {
- size_t len = dollar - orig_secname;
- char *newname = xmalloc (len + 1);
- memcpy (newname, orig_secname, len);
- newname[len] = '\0';
- secname = newname;
- }
-
- os = lang_output_section_find (secname);
-
- lang_list_init (&add_child);
-
- if (os != NULL
- && (os->bfd_section == NULL
- || os->bfd_section->flags == 0
- || ((s->flags ^ os->bfd_section->flags)
- & (SEC_LOAD | SEC_ALLOC)) == 0))
- {
- /* We already have an output section statement with this
- name, and its bfd section, if any, has compatible flags.
- If the section already exists but does not have any flags set,
- then it has been created by the linker, probably as a result of
- a --section-start command line switch. */
- lang_add_section (&add_child, s, os);
- }
- else
- {
- static struct orphan_save hold[] =
- {
- { ".text",
- SEC_HAS_CONTENTS | SEC_ALLOC | SEC_LOAD | SEC_READONLY | SEC_CODE,
- 0, 0, 0, 0 },
- { ".rdata",
- SEC_HAS_CONTENTS | SEC_ALLOC | SEC_LOAD | SEC_READONLY | SEC_DATA,
- 0, 0, 0, 0 },
- { ".data",
- SEC_HAS_CONTENTS | SEC_ALLOC | SEC_LOAD | SEC_DATA,
- 0, 0, 0, 0 },
- { ".bss",
- SEC_ALLOC,
- 0, 0, 0, 0 }
- };
- enum orphan_save_index
- {
- orphan_text = 0,
- orphan_rodata,
- orphan_data,
- orphan_bss
- };
- static int orphan_init_done = 0;
- struct orphan_save *place;
- lang_output_section_statement_type *after;
- etree_type *address;
-
- if (!orphan_init_done)
- {
- struct orphan_save *ho;
- for (ho = hold; ho < hold + sizeof (hold) / sizeof (hold[0]); ++ho)
- if (ho->name != NULL)
- {
- ho->os = lang_output_section_find (ho->name);
- if (ho->os != NULL && ho->os->flags == 0)
- ho->os->flags = ho->flags;
- }
- orphan_init_done = 1;
- }
-
- /* Try to put the new output section in a reasonable place based
- on the section name and section flags. */
-
- place = NULL;
- if ((s->flags & SEC_ALLOC) == 0)
- ;
- else if ((s->flags & (SEC_LOAD | SEC_HAS_CONTENTS)) == 0)
- place = &hold[orphan_bss];
- else if ((s->flags & SEC_READONLY) == 0)
- place = &hold[orphan_data];
- else if ((s->flags & SEC_CODE) == 0)
- place = &hold[orphan_rodata];
- else
- place = &hold[orphan_text];
-
- after = NULL;
- if (place != NULL)
- {
- if (place->os == NULL)
- place->os = lang_output_section_find (place->name);
- after = place->os;
- if (after == NULL)
- after = lang_output_section_find_by_flags (s, &place->os, NULL);
- if (after == NULL)
- /* *ABS* is always the first output section statement. */
- after = (&lang_output_section_statement.head
- ->output_section_statement);
- }
-
- /* Choose a unique name for the section. This will be needed if the
- same section name appears in the input file with different
- loadable or allocatable characteristics. */
- if (bfd_get_section_by_name (output_bfd, secname) != NULL)
- {
- static int count = 1;
- secname = bfd_get_unique_section_name (output_bfd, secname, &count);
- if (secname == NULL)
- einfo ("%F%P: place_orphan failed: %E\n");
- }
-
- /* All sections in an executable must be aligned to a page boundary. */
- address = exp_unop (ALIGN_K, exp_nameop (NAME, "__section_alignment__"));
- os = lang_insert_orphan (s, secname, after, place, address, &add_child);
- }
-
- /* If the section name has a '\$', sort it with the other '\$'
- sections. */
- for (pl = &os->children.head; *pl != NULL; pl = &(*pl)->header.next)
- {
- lang_input_section_type *ls;
- const char *lname;
-
- if ((*pl)->header.type != lang_input_section_enum)
- continue;
-
- ls = &(*pl)->input_section;
-
- lname = bfd_get_section_name (ls->section->owner, ls->section);
- if (strchr (lname, '\$') != NULL
- && (dollar == NULL || strcmp (orig_secname, lname) < 0))
- break;
- }
-
- if (add_child.head != NULL)
- {
- *add_child.tail = *pl;
- *pl = add_child.head;
- }
-
- return TRUE;
-}
-
-static bfd_boolean
-gld_${EMULATION_NAME}_open_dynamic_archive
- (const char *arch ATTRIBUTE_UNUSED, search_dirs_type *search,
- lang_input_statement_type *entry)
-{
- static const struct
- {
- const char * format;
- bfd_boolean use_prefix;
- }
- libname_fmt [] =
- {
- /* Preferred explicit import library for dll's. */
- { "lib%s.dll.a", FALSE },
- /* Alternate explicit import library for dll's. */
- { "%s.dll.a", FALSE },
- /* "libfoo.a" could be either an import lib or a static lib.
- For backwards compatibility, libfoo.a needs to precede
- libfoo.dll and foo.dll in the search. */
- { "lib%s.a", FALSE },
- /* The 'native' spelling of an import lib name is "foo.lib". */
- { "%s.lib", FALSE },
-#ifdef DLL_SUPPORT
- /* Try "<prefix>foo.dll" (preferred dll name, if specified). */
- { "%s%s.dll", TRUE },
-#endif
- /* Try "libfoo.dll" (default preferred dll name). */
- { "lib%s.dll", FALSE },
- /* Finally try 'native' dll name "foo.dll". */
- { "%s.dll", FALSE },
- /* Note: If adding more formats to this table, make sure to check to
- see if their length is longer than libname_fmt[0].format, and if
- so, update the call to xmalloc() below. */
- { NULL, FALSE }
- };
- static unsigned int format_max_len = 0;
- const char * filename;
- char * full_string;
- char * base_string;
- unsigned int i;
-
-
- if (! entry->is_archive)
- return FALSE;
-
- filename = entry->filename;
-
- if (format_max_len == 0)
- /* We need to allow space in the memory that we are going to allocate
- for the characters in the format string. Since the format array is
- static we only need to calculate this information once. In theory
- this value could also be computed statically, but this introduces
- the possibility for a discrepancy and hence a possible memory
- corruption. The lengths we compute here will be too long because
- they will include any formating characters (%s) in the strings, but
- this will not matter. */
- for (i = 0; libname_fmt[i].format; i++)
- if (format_max_len < strlen (libname_fmt[i].format))
- format_max_len = strlen (libname_fmt[i].format);
-
- full_string = xmalloc (strlen (search->name)
- + strlen (filename)
- + format_max_len
-#ifdef DLL_SUPPORT
- + (pe_dll_search_prefix
- ? strlen (pe_dll_search_prefix) : 0)
-#endif
- /* Allow for the terminating NUL and for the path
- separator character that is inserted between
- search->name and the start of the format string. */
- + 2);
-
- sprintf (full_string, "%s/", search->name);
- base_string = full_string + strlen (full_string);
-
- for (i = 0; libname_fmt[i].format; i++)
- {
-#ifdef DLL_SUPPORT
- if (libname_fmt[i].use_prefix)
- {
- if (!pe_dll_search_prefix)
- continue;
- sprintf (base_string, libname_fmt[i].format, pe_dll_search_prefix, filename);
- }
- else
-#endif
- sprintf (base_string, libname_fmt[i].format, filename);
-
- if (ldfile_try_open_bfd (full_string, entry))
- break;
- }
-
- if (!libname_fmt[i].format)
- {
- free (full_string);
- return FALSE;
- }
-
- entry->filename = full_string;
-
- return TRUE;
-}
-
-static int
-gld_${EMULATION_NAME}_find_potential_libraries
- (char *name, lang_input_statement_type *entry)
-{
- return ldfile_open_file_search (name, entry, "", ".lib");
-}
-
-static char *
-gld_${EMULATION_NAME}_get_script (int *isfile)
-EOF
-# Scripts compiled in.
-# sed commands to quote an ld script as a C string.
-sc="-f stringify.sed"
-
-cat >>e${EMULATION_NAME}.c <<EOF
-{
- *isfile = 0;
-
- if (link_info.relocatable && config.build_constructors)
- return
-EOF
-sed $sc ldscripts/${EMULATION_NAME}.xu >> e${EMULATION_NAME}.c
-echo ' ; else if (link_info.relocatable) return' >> e${EMULATION_NAME}.c
-sed $sc ldscripts/${EMULATION_NAME}.xr >> e${EMULATION_NAME}.c
-echo ' ; else if (!config.text_read_only) return' >> e${EMULATION_NAME}.c
-sed $sc ldscripts/${EMULATION_NAME}.xbn >> e${EMULATION_NAME}.c
-echo ' ; else if (!config.magic_demand_paged) return' >> e${EMULATION_NAME}.c
-sed $sc ldscripts/${EMULATION_NAME}.xn >> e${EMULATION_NAME}.c
-echo ' ; else return' >> e${EMULATION_NAME}.c
-sed $sc ldscripts/${EMULATION_NAME}.x >> e${EMULATION_NAME}.c
-echo '; }' >> e${EMULATION_NAME}.c
-
-cat >>e${EMULATION_NAME}.c <<EOF
-
-
-struct ld_emulation_xfer_struct ld_${EMULATION_NAME}_emulation =
-{
- gld_${EMULATION_NAME}_before_parse,
- syslib_default,
- hll_default,
- gld_${EMULATION_NAME}_after_parse,
- gld_${EMULATION_NAME}_after_open,
- after_allocation_default,
- set_output_arch_default,
- ldemul_default_target,
- gld_${EMULATION_NAME}_before_allocation,
- gld_${EMULATION_NAME}_get_script,
- "${EMULATION_NAME}",
- "${OUTPUT_FORMAT}",
- gld_${EMULATION_NAME}_finish,
- NULL, /* Create output section statements. */
- gld_${EMULATION_NAME}_open_dynamic_archive,
- gld_${EMULATION_NAME}_place_orphan,
- gld_${EMULATION_NAME}_set_symbols,
- NULL, /* parse_args */
- gld${EMULATION_NAME}_add_options,
- gld${EMULATION_NAME}_handle_option,
- gld_${EMULATION_NAME}_unrecognized_file,
- gld_${EMULATION_NAME}_list_options,
- gld_${EMULATION_NAME}_recognized_file,
- gld_${EMULATION_NAME}_find_potential_libraries,
- NULL /* new_vers_pattern. */
-};
-EOF
diff --git a/contrib/binutils/ld/emultempl/pep.em b/contrib/binutils/ld/emultempl/pep.em
deleted file mode 100644
index f44471b6a287..000000000000
--- a/contrib/binutils/ld/emultempl/pep.em
+++ /dev/null
@@ -1,1706 +0,0 @@
-# This shell script emits a C file. -*- C -*-
-# It does some substitutions.
-test -z "${ENTRY}" && ENTRY="_mainCRTStartup"
-if [ -z "$MACHINE" ]; then
- OUTPUT_ARCH=${ARCH}
-else
- OUTPUT_ARCH=${ARCH}:${MACHINE}
-fi
-rm -f e${EMULATION_NAME}.c
-(echo;echo;echo;echo;echo)>e${EMULATION_NAME}.c # there, now line numbers match ;-)
-cat >>e${EMULATION_NAME}.c <<EOF
-/* This file is part of GLD, the Gnu Linker.
- Copyright 2006, 2007 Free Software Foundation, Inc.
-
- This program is free software; you can redistribute it and/or modify
- it under the terms of the GNU General Public License as published by
- the Free Software Foundation; either version 2 of the License, or
- (at your option) any later version.
-
- This program is distributed in the hope that it will be useful,
- but WITHOUT ANY WARRANTY; without even the implied warranty of
- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- GNU General Public License for more details.
-
- You should have received a copy of the GNU General Public License
- along with this program; if not, write to the Free Software
- Foundation, Inc., 51 Franklin Street - Fifth Floor, Boston, MA 02110-1301, USA.
-
- Written by Kai Tietz, OneVision Software GmbH&CoKg. */
-
-/* For WINDOWS_XP64 and higher */
-/* Based on pe.em, but modified for 64 bit support. */
-
-#define TARGET_IS_${EMULATION_NAME}
-
-#define COFF_IMAGE_WITH_PE
-#define COFF_WITH_PE
-#define COFF_WITH_pex64
-
-#include "sysdep.h"
-#include "bfd.h"
-#include "bfdlink.h"
-#include "getopt.h"
-#include "libiberty.h"
-#include "ld.h"
-#include "ldmain.h"
-#include "ldexp.h"
-#include "ldlang.h"
-#include "ldfile.h"
-#include "ldemul.h"
-#include <ldgram.h>
-#include "ldlex.h"
-#include "ldmisc.h"
-#include "ldctor.h"
-#include "coff/internal.h"
-
-/* FIXME: See bfd/peXXigen.c for why we include an architecture specific
- header in generic PE code. */
-#include "coff/x86_64.h"
-#include "coff/pe.h"
-
-/* FIXME: This is a BFD internal header file, and we should not be
- using it here. */
-#include "../bfd/libcoff.h"
-
-#undef AOUTSZ
-#define AOUTSZ PEPAOUTSZ
-#define PEAOUTHDR PEPAOUTHDR
-
-#include "deffile.h"
-#include "pep-dll.h"
-#include "safe-ctype.h"
-
-/* Permit the emulation parameters to override the default section
- alignment by setting OVERRIDE_SECTION_ALIGNMENT. FIXME: This makes
- it seem that include/coff/internal.h should not define
- PE_DEF_SECTION_ALIGNMENT. */
-#if PE_DEF_SECTION_ALIGNMENT != ${OVERRIDE_SECTION_ALIGNMENT:-PE_DEF_SECTION_ALIGNMENT}
-#undef PE_DEF_SECTION_ALIGNMENT
-#define PE_DEF_SECTION_ALIGNMENT ${OVERRIDE_SECTION_ALIGNMENT}
-#endif
-
-#ifdef TARGET_IS_i386pep
-#define DLL_SUPPORT
-#endif
-
-#if defined(TARGET_IS_i386pep) || ! defined(DLL_SUPPORT)
-#define PE_DEF_SUBSYSTEM 3
-#else
-#undef NT_EXE_IMAGE_BASE
-#define NT_EXE_IMAGE_BASE 0x00010000
-#undef PE_DEF_SECTION_ALIGNMENT
-#define PE_DEF_SUBSYSTEM 2
-#undef PE_DEF_FILE_ALIGNMENT
-#define PE_DEF_FILE_ALIGNMENT 0x00000200
-#define PE_DEF_SECTION_ALIGNMENT 0x00000400
-#endif
-
-
-static struct internal_extra_pe_aouthdr pep;
-static int dll;
-static flagword real_flags = IMAGE_FILE_LARGE_ADDRESS_AWARE;
-static int support_old_code = 0;
-static lang_assignment_statement_type *image_base_statement = 0;
-
-#ifdef DLL_SUPPORT
-static int pep_enable_stdcall_fixup = -1; /* 0=disable 1=enable. */
-static char * pep_out_def_filename = NULL;
-static char * pep_implib_filename = NULL;
-static int pep_enable_auto_image_base = 0;
-static char * pep_dll_search_prefix = NULL;
-#endif
-
-extern const char *output_filename;
-
-static void
-gld_${EMULATION_NAME}_before_parse (void)
-{
- ldfile_set_output_arch ("${OUTPUT_ARCH}", bfd_arch_`echo ${ARCH} | sed -e 's/:.*//'`);
- output_filename = "${EXECUTABLE_NAME:-a.exe}";
-#ifdef DLL_SUPPORT
- config.dynamic_link = TRUE;
- config.has_shared = 1;
- link_info.pei386_auto_import = -1;
- link_info.pei386_runtime_pseudo_reloc = -1;
-
-#if (PE_DEF_SUBSYSTEM == 9) || (PE_DEF_SUBSYSTEM == 2)
- lang_default_entry ("_WinMainCRTStartup");
-#else
- lang_default_entry ("${ENTRY}");
-#endif
-#endif
-}
-
-/* PE format extra command line options. */
-
-/* Used for setting flags in the PE header. */
-enum options
-{
- OPTION_BASE_FILE = 300 + 1,
- OPTION_DLL,
- OPTION_FILE_ALIGNMENT,
- OPTION_IMAGE_BASE,
- OPTION_MAJOR_IMAGE_VERSION,
- OPTION_MAJOR_OS_VERSION,
- OPTION_MAJOR_SUBSYSTEM_VERSION,
- OPTION_MINOR_IMAGE_VERSION,
- OPTION_MINOR_OS_VERSION,
- OPTION_MINOR_SUBSYSTEM_VERSION,
- OPTION_SECTION_ALIGNMENT,
- OPTION_STACK,
- OPTION_SUBSYSTEM,
- OPTION_HEAP,
- OPTION_SUPPORT_OLD_CODE,
- OPTION_OUT_DEF,
- OPTION_EXPORT_ALL,
- OPTION_EXCLUDE_SYMBOLS,
- OPTION_KILL_ATS,
- OPTION_STDCALL_ALIASES,
- OPTION_ENABLE_STDCALL_FIXUP,
- OPTION_DISABLE_STDCALL_FIXUP,
- OPTION_IMPLIB_FILENAME,
- OPTION_WARN_DUPLICATE_EXPORTS,
- OPTION_IMP_COMPAT,
- OPTION_ENABLE_AUTO_IMAGE_BASE,
- OPTION_DISABLE_AUTO_IMAGE_BASE,
- OPTION_DLL_SEARCH_PREFIX,
- OPTION_NO_DEFAULT_EXCLUDES,
- OPTION_DLL_ENABLE_AUTO_IMPORT,
- OPTION_DLL_DISABLE_AUTO_IMPORT,
- OPTION_ENABLE_EXTRA_PE_DEBUG,
- OPTION_EXCLUDE_LIBS,
- OPTION_DLL_ENABLE_RUNTIME_PSEUDO_RELOC,
- OPTION_DLL_DISABLE_RUNTIME_PSEUDO_RELOC
-};
-
-static void
-gld${EMULATION_NAME}_add_options
- (int ns ATTRIBUTE_UNUSED,
- char **shortopts ATTRIBUTE_UNUSED,
- int nl,
- struct option **longopts,
- int nrl ATTRIBUTE_UNUSED,
- struct option **really_longopts ATTRIBUTE_UNUSED)
-{
- static const struct option xtra_long[] =
- {
- /* PE options */
- {"base-file", required_argument, NULL, OPTION_BASE_FILE},
- {"dll", no_argument, NULL, OPTION_DLL},
- {"file-alignment", required_argument, NULL, OPTION_FILE_ALIGNMENT},
- {"heap", required_argument, NULL, OPTION_HEAP},
- {"image-base", required_argument, NULL, OPTION_IMAGE_BASE},
- {"major-image-version", required_argument, NULL, OPTION_MAJOR_IMAGE_VERSION},
- {"major-os-version", required_argument, NULL, OPTION_MAJOR_OS_VERSION},
- {"major-subsystem-version", required_argument, NULL, OPTION_MAJOR_SUBSYSTEM_VERSION},
- {"minor-image-version", required_argument, NULL, OPTION_MINOR_IMAGE_VERSION},
- {"minor-os-version", required_argument, NULL, OPTION_MINOR_OS_VERSION},
- {"minor-subsystem-version", required_argument, NULL, OPTION_MINOR_SUBSYSTEM_VERSION},
- {"section-alignment", required_argument, NULL, OPTION_SECTION_ALIGNMENT},
- {"stack", required_argument, NULL, OPTION_STACK},
- {"subsystem", required_argument, NULL, OPTION_SUBSYSTEM},
- {"support-old-code", no_argument, NULL, OPTION_SUPPORT_OLD_CODE},
-#ifdef DLL_SUPPORT
- /* getopt allows abbreviations, so we do this to stop it
- from treating -o as an abbreviation for this option. */
- {"output-def", required_argument, NULL, OPTION_OUT_DEF},
- {"output-def", required_argument, NULL, OPTION_OUT_DEF},
- {"export-all-symbols", no_argument, NULL, OPTION_EXPORT_ALL},
- {"exclude-symbols", required_argument, NULL, OPTION_EXCLUDE_SYMBOLS},
- {"exclude-libs", required_argument, NULL, OPTION_EXCLUDE_LIBS},
- {"kill-at", no_argument, NULL, OPTION_KILL_ATS},
- {"add-stdcall-alias", no_argument, NULL, OPTION_STDCALL_ALIASES},
- {"enable-stdcall-fixup", no_argument, NULL, OPTION_ENABLE_STDCALL_FIXUP},
- {"disable-stdcall-fixup", no_argument, NULL, OPTION_DISABLE_STDCALL_FIXUP},
- {"out-implib", required_argument, NULL, OPTION_IMPLIB_FILENAME},
- {"warn-duplicate-exports", no_argument, NULL, OPTION_WARN_DUPLICATE_EXPORTS},
- /* getopt() allows abbreviations, so we do this to stop it from
- treating -c as an abbreviation for these --compat-implib. */
- {"compat-implib", no_argument, NULL, OPTION_IMP_COMPAT},
- {"compat-implib", no_argument, NULL, OPTION_IMP_COMPAT},
- {"enable-auto-image-base", no_argument, NULL, OPTION_ENABLE_AUTO_IMAGE_BASE},
- {"disable-auto-image-base", no_argument, NULL, OPTION_DISABLE_AUTO_IMAGE_BASE},
- {"dll-search-prefix", required_argument, NULL, OPTION_DLL_SEARCH_PREFIX},
- {"no-default-excludes", no_argument, NULL, OPTION_NO_DEFAULT_EXCLUDES},
- {"enable-auto-import", no_argument, NULL, OPTION_DLL_ENABLE_AUTO_IMPORT},
- {"disable-auto-import", no_argument, NULL, OPTION_DLL_DISABLE_AUTO_IMPORT},
- {"enable-extra-pep-debug", no_argument, NULL, OPTION_ENABLE_EXTRA_PE_DEBUG},
- {"enable-runtime-pseudo-reloc", no_argument, NULL, OPTION_DLL_ENABLE_RUNTIME_PSEUDO_RELOC},
- {"disable-runtime-pseudo-reloc", no_argument, NULL, OPTION_DLL_DISABLE_RUNTIME_PSEUDO_RELOC},
-#endif
- {NULL, no_argument, NULL, 0}
- };
-
- *longopts = xrealloc (*longopts, nl * sizeof (struct option) + sizeof (xtra_long));
- memcpy (*longopts + nl, &xtra_long, sizeof (xtra_long));
-}
-
-/* PE/WIN32; added routines to get the subsystem type, heap and/or stack
- parameters which may be input from the command line. */
-
-typedef struct
-{
- void *ptr;
- int size;
- int value;
- char *symbol;
- int inited;
-} definfo;
-
-#define D(field,symbol,def) {&pep.field,sizeof(pep.field), def, symbol,0}
-
-static definfo init[] =
-{
- /* imagebase must be first */
-#define IMAGEBASEOFF 0
- D(ImageBase,"__image_base__", NT_EXE_IMAGE_BASE),
-#define DLLOFF 1
- {&dll, sizeof(dll), 0, "__dll__", 0},
-#define MSIMAGEBASEOFF 2
- D(ImageBase,"__ImageBase", NT_EXE_IMAGE_BASE),
- D(SectionAlignment,"__section_alignment__", PE_DEF_SECTION_ALIGNMENT),
- D(FileAlignment,"__file_alignment__", PE_DEF_FILE_ALIGNMENT),
- D(MajorOperatingSystemVersion,"__major_os_version__", 4),
- D(MinorOperatingSystemVersion,"__minor_os_version__", 0),
- D(MajorImageVersion,"__major_image_version__", 0),
- D(MinorImageVersion,"__minor_image_version__", 0),
- D(MajorSubsystemVersion,"__major_subsystem_version__", 5),
- D(MinorSubsystemVersion,"__minor_subsystem_version__", 2),
- D(Subsystem,"__subsystem__", ${SUBSYSTEM}),
- D(SizeOfStackReserve,"__size_of_stack_reserve__", 0x200000),
- D(SizeOfStackCommit,"__size_of_stack_commit__", 0x1000),
- D(SizeOfHeapReserve,"__size_of_heap_reserve__", 0x100000),
- D(SizeOfHeapCommit,"__size_of_heap_commit__", 0x1000),
- D(LoaderFlags,"__loader_flags__", 0x0),
- { NULL, 0, 0, NULL, 0 }
-};
-
-
-static void
-gld_${EMULATION_NAME}_list_options (FILE *file)
-{
- fprintf (file, _(" --base_file <basefile> Generate a base file for relocatable DLLs\n"));
- fprintf (file, _(" --dll Set image base to the default for DLLs\n"));
- fprintf (file, _(" --file-alignment <size> Set file alignment\n"));
- fprintf (file, _(" --heap <size> Set initial size of the heap\n"));
- fprintf (file, _(" --image-base <address> Set start address of the executable\n"));
- fprintf (file, _(" --major-image-version <number> Set version number of the executable\n"));
- fprintf (file, _(" --major-os-version <number> Set minimum required OS version\n"));
- fprintf (file, _(" --major-subsystem-version <number> Set minimum required OS subsystem version\n"));
- fprintf (file, _(" --minor-image-version <number> Set revision number of the executable\n"));
- fprintf (file, _(" --minor-os-version <number> Set minimum required OS revision\n"));
- fprintf (file, _(" --minor-subsystem-version <number> Set minimum required OS subsystem revision\n"));
- fprintf (file, _(" --section-alignment <size> Set section alignment\n"));
- fprintf (file, _(" --stack <size> Set size of the initial stack\n"));
- fprintf (file, _(" --subsystem <name>[:<version>] Set required OS subsystem [& version]\n"));
- fprintf (file, _(" --support-old-code Support interworking with old code\n"));
-#ifdef DLL_SUPPORT
- fprintf (file, _(" --add-stdcall-alias Export symbols with and without @nn\n"));
- fprintf (file, _(" --disable-stdcall-fixup Don't link _sym to _sym@nn\n"));
- fprintf (file, _(" --enable-stdcall-fixup Link _sym to _sym@nn without warnings\n"));
- fprintf (file, _(" --exclude-symbols sym,sym,... Exclude symbols from automatic export\n"));
- fprintf (file, _(" --exclude-libs lib,lib,... Exclude libraries from automatic export\n"));
- fprintf (file, _(" --export-all-symbols Automatically export all globals to DLL\n"));
- fprintf (file, _(" --kill-at Remove @nn from exported symbols\n"));
- fprintf (file, _(" --out-implib <file> Generate import library\n"));
- fprintf (file, _(" --output-def <file> Generate a .DEF file for the built DLL\n"));
- fprintf (file, _(" --warn-duplicate-exports Warn about duplicate exports.\n"));
- fprintf (file, _(" --compat-implib Create backward compatible import libs;\n\
- create __imp_<SYMBOL> as well.\n"));
- fprintf (file, _(" --enable-auto-image-base Automatically choose image base for DLLs\n\
- unless user specifies one\n"));
- fprintf (file, _(" --disable-auto-image-base Do not auto-choose image base. (default)\n"));
- fprintf (file, _(" --dll-search-prefix=<string> When linking dynamically to a dll without\n\
- an importlib, use <string><basename>.dll\n\
- in preference to lib<basename>.dll \n"));
- fprintf (file, _(" --enable-auto-import Do sophistcated linking of _sym to\n\
- __imp_sym for DATA references\n"));
- fprintf (file, _(" --disable-auto-import Do not auto-import DATA items from DLLs\n"));
- fprintf (file, _(" --enable-runtime-pseudo-reloc Work around auto-import limitations by\n\
- adding pseudo-relocations resolved at\n\
- runtime.\n"));
- fprintf (file, _(" --disable-runtime-pseudo-reloc Do not add runtime pseudo-relocations for\n\
- auto-imported DATA.\n"));
- fprintf (file, _(" --enable-extra-pep-debug Enable verbose debug output when building\n\
- or linking to DLLs (esp. auto-import)\n"));
-#endif
-}
-
-
-static void
-set_pep_name (char *name, long val)
-{
- int i;
-
- /* Find the name and set it. */
- for (i = 0; init[i].ptr; i++)
- {
- if (strcmp (name, init[i].symbol) == 0)
- {
- init[i].value = val;
- init[i].inited = 1;
- if (strcmp (name,"__image_base__") == 0)
- set_pep_name ("__ImageBase", val);
- return;
- }
- }
- abort ();
-}
-
-
-static void
-set_pep_subsystem (void)
-{
- const char *sver;
- const char *entry;
- const char *initial_symbol_char;
- char *end;
- int len;
- int i;
- int subsystem;
- unsigned long temp_subsystem;
- static const struct
- {
- const char *name;
- const int value;
- const char *entry;
- }
- v[] =
- {
- { "native", 1, "NtProcessStartup" },
- { "windows", 2, "WinMainCRTStartup" },
- { "console", 3, "mainCRTStartup" },
- { "posix", 7, "__PosixProcessStartup"},
- { "wince", 9, "_WinMainCRTStartup" },
- { "xbox", 14, "mainCRTStartup" },
- { NULL, 0, NULL }
- };
- /* Entry point name for arbitrary subsystem numbers. */
- static const char default_entry[] = "mainCRTStartup";
-
- /* Check for the presence of a version number. */
- sver = strchr (optarg, ':');
- if (sver == NULL)
- len = strlen (optarg);
- else
- {
- len = sver - optarg;
- set_pep_name ("__major_subsystem_version__",
- strtoul (sver + 1, &end, 0));
- if (*end == '.')
- set_pep_name ("__minor_subsystem_version__",
- strtoul (end + 1, &end, 0));
- if (*end != '\0')
- einfo (_("%P: warning: bad version number in -subsystem option\n"));
- }
-
- /* Check for numeric subsystem. */
- temp_subsystem = strtoul (optarg, & end, 0);
- if ((*end == ':' || *end == '\0') && (temp_subsystem < 65536))
- {
- /* Search list for a numeric match to use its entry point. */
- for (i = 0; v[i].name; i++)
- if (v[i].value == (int) temp_subsystem)
- break;
-
- /* If no match, use the default. */
- if (v[i].name != NULL)
- entry = v[i].entry;
- else
- entry = default_entry;
-
- /* Use this subsystem. */
- subsystem = (int) temp_subsystem;
- }
- else
- {
- /* Search for subsystem by name. */
- for (i = 0; v[i].name; i++)
- if (strncmp (optarg, v[i].name, len) == 0
- && v[i].name[len] == '\0')
- break;
-
- if (v[i].name == NULL)
- {
- einfo (_("%P%F: invalid subsystem type %s\n"), optarg);
- return;
- }
-
- entry = v[i].entry;
- subsystem = v[i].value;
- }
-
- set_pep_name ("__subsystem__", subsystem);
-
- initial_symbol_char = ${INITIAL_SYMBOL_CHAR};
- if (*initial_symbol_char != '\0')
- {
- char *alc_entry;
-
- /* lang_default_entry expects its argument to be permanently
- allocated, so we don't free this string. */
- alc_entry = xmalloc (strlen (initial_symbol_char)
- + strlen (entry)
- + 1);
- strcpy (alc_entry, initial_symbol_char);
- strcat (alc_entry, entry);
- entry = alc_entry;
- }
-
- lang_default_entry (entry);
-
- return;
-}
-
-
-static void
-set_pep_value (char *name)
-{
- char *end;
-
- set_pep_name (name, strtoul (optarg, &end, 0));
-
- if (end == optarg)
- einfo (_("%P%F: invalid hex number for PE parameter '%s'\n"), optarg);
-
- optarg = end;
-}
-
-
-static void
-set_pep_stack_heap (char *resname, char *comname)
-{
- set_pep_value (resname);
-
- if (*optarg == ',')
- {
- optarg++;
- set_pep_value (comname);
- }
- else if (*optarg)
- einfo (_("%P%F: strange hex info for PE parameter '%s'\n"), optarg);
-}
-
-
-static bfd_boolean
-gld${EMULATION_NAME}_handle_option (int optc)
-{
- switch (optc)
- {
- default:
- return FALSE;
-
- case OPTION_BASE_FILE:
- link_info.base_file = fopen (optarg, FOPEN_WB);
- if (link_info.base_file == NULL)
- {
- /* xgettext:c-format */
- fprintf (stderr, _("%s: Can't open base file %s\n"),
- program_name, optarg);
- xexit (1);
- }
- break;
-
- /* PE options. */
- case OPTION_HEAP:
- set_pep_stack_heap ("__size_of_heap_reserve__", "__size_of_heap_commit__");
- break;
- case OPTION_STACK:
- set_pep_stack_heap ("__size_of_stack_reserve__", "__size_of_stack_commit__");
- break;
- case OPTION_SUBSYSTEM:
- set_pep_subsystem ();
- break;
- case OPTION_MAJOR_OS_VERSION:
- set_pep_value ("__major_os_version__");
- break;
- case OPTION_MINOR_OS_VERSION:
- set_pep_value ("__minor_os_version__");
- break;
- case OPTION_MAJOR_SUBSYSTEM_VERSION:
- set_pep_value ("__major_subsystem_version__");
- break;
- case OPTION_MINOR_SUBSYSTEM_VERSION:
- set_pep_value ("__minor_subsystem_version__");
- break;
- case OPTION_MAJOR_IMAGE_VERSION:
- set_pep_value ("__major_image_version__");
- break;
- case OPTION_MINOR_IMAGE_VERSION:
- set_pep_value ("__minor_image_version__");
- break;
- case OPTION_FILE_ALIGNMENT:
- set_pep_value ("__file_alignment__");
- break;
- case OPTION_SECTION_ALIGNMENT:
- set_pep_value ("__section_alignment__");
- break;
- case OPTION_DLL:
- set_pep_name ("__dll__", 1);
- break;
- case OPTION_IMAGE_BASE:
- set_pep_value ("__image_base__");
- break;
- case OPTION_SUPPORT_OLD_CODE:
- support_old_code = 1;
- break;
-#ifdef DLL_SUPPORT
- case OPTION_OUT_DEF:
- pep_out_def_filename = xstrdup (optarg);
- break;
- case OPTION_EXPORT_ALL:
- pep_dll_export_everything = 1;
- break;
- case OPTION_EXCLUDE_SYMBOLS:
- pep_dll_add_excludes (optarg, 0);
- break;
- case OPTION_EXCLUDE_LIBS:
- pep_dll_add_excludes (optarg, 1);
- break;
- case OPTION_KILL_ATS:
- pep_dll_kill_ats = 1;
- break;
- case OPTION_STDCALL_ALIASES:
- pep_dll_stdcall_aliases = 1;
- break;
- case OPTION_ENABLE_STDCALL_FIXUP:
- pep_enable_stdcall_fixup = 1;
- break;
- case OPTION_DISABLE_STDCALL_FIXUP:
- pep_enable_stdcall_fixup = 0;
- break;
- case OPTION_IMPLIB_FILENAME:
- pep_implib_filename = xstrdup (optarg);
- break;
- case OPTION_WARN_DUPLICATE_EXPORTS:
- pep_dll_warn_dup_exports = 1;
- break;
- case OPTION_IMP_COMPAT:
- pep_dll_compat_implib = 1;
- break;
- case OPTION_ENABLE_AUTO_IMAGE_BASE:
- pep_enable_auto_image_base = 1;
- break;
- case OPTION_DISABLE_AUTO_IMAGE_BASE:
- pep_enable_auto_image_base = 0;
- break;
- case OPTION_DLL_SEARCH_PREFIX:
- pep_dll_search_prefix = xstrdup (optarg);
- break;
- case OPTION_NO_DEFAULT_EXCLUDES:
- pep_dll_do_default_excludes = 0;
- break;
- case OPTION_DLL_ENABLE_AUTO_IMPORT:
- link_info.pei386_auto_import = 1;
- break;
- case OPTION_DLL_DISABLE_AUTO_IMPORT:
- link_info.pei386_auto_import = 0;
- break;
- case OPTION_DLL_ENABLE_RUNTIME_PSEUDO_RELOC:
- link_info.pei386_runtime_pseudo_reloc = 1;
- break;
- case OPTION_DLL_DISABLE_RUNTIME_PSEUDO_RELOC:
- link_info.pei386_runtime_pseudo_reloc = 0;
- break;
- case OPTION_ENABLE_EXTRA_PE_DEBUG:
- pep_dll_extra_pe_debug = 1;
- break;
-#endif
- }
- return TRUE;
-}
-
-
-#ifdef DLL_SUPPORT
-static unsigned long
-strhash (const char *str)
-{
- const unsigned char *s;
- unsigned long hash;
- unsigned int c;
- unsigned int len;
-
- hash = 0;
- len = 0;
- s = (const unsigned char *) str;
- while ((c = *s++) != '\0')
- {
- hash += c + (c << 17);
- hash ^= hash >> 2;
- ++len;
- }
- hash += len + (len << 17);
- hash ^= hash >> 2;
-
- return hash;
-}
-
-/* Use the output file to create a image base for relocatable DLLs. */
-
-static unsigned long
-compute_dll_image_base (const char *ofile)
-{
- unsigned long hash = strhash (ofile);
- return 0x61300000 + ((hash << 16) & 0x0FFC0000);
-}
-#endif
-
-/* Assign values to the special symbols before the linker script is
- read. */
-
-static void
-gld_${EMULATION_NAME}_set_symbols (void)
-{
- /* Run through and invent symbols for all the
- names and insert the defaults. */
- int j;
- lang_statement_list_type *save;
-
- if (!init[IMAGEBASEOFF].inited)
- {
- if (link_info.relocatable)
- init[IMAGEBASEOFF].value = 0;
- else if (init[DLLOFF].value || (link_info.shared && !link_info.pie))
-#ifdef DLL_SUPPORT
- init[IMAGEBASEOFF].value = (pep_enable_auto_image_base) ?
- compute_dll_image_base (output_filename) : NT_DLL_IMAGE_BASE;
-#else
- init[IMAGEBASEOFF].value = NT_DLL_IMAGE_BASE;
-#endif
- else
- init[IMAGEBASEOFF].value = NT_EXE_IMAGE_BASE;
- init[MSIMAGEBASEOFF].value = init[IMAGEBASEOFF].value;
- }
-
- /* Don't do any symbol assignments if this is a relocatable link. */
- if (link_info.relocatable)
- return;
-
- /* Glue the assignments into the abs section. */
- save = stat_ptr;
-
- stat_ptr = &(abs_output_section->children);
-
- for (j = 0; init[j].ptr; j++)
- {
- long val = init[j].value;
- lang_assignment_statement_type *rv;
- rv = lang_add_assignment (exp_assop ('=', init[j].symbol,
- exp_intop (val)));
- if (init[j].size == sizeof (short))
- *(short *) init[j].ptr = val;
- else if (init[j].size == sizeof (int))
- *(int *) init[j].ptr = val;
- else if (init[j].size == sizeof (long))
- *(long *) init[j].ptr = val;
- /* This might be a long long or other special type. */
- else if (init[j].size == sizeof (bfd_vma))
- *(bfd_vma *) init[j].ptr = val;
- else abort ();
- if (j == IMAGEBASEOFF)
- image_base_statement = rv;
- }
- /* Restore the pointer. */
- stat_ptr = save;
-
- if (pep.FileAlignment > pep.SectionAlignment)
- {
- einfo (_("%P: warning, file alignment > section alignment.\n"));
- }
-}
-
-/* This is called after the linker script and the command line options
- have been read. */
-
-static void
-gld_${EMULATION_NAME}_after_parse (void)
-{
- /* The Windows libraries are designed for the linker to treat the
- entry point as an undefined symbol. Otherwise, the .obj that
- defines mainCRTStartup is brought in because it is the first
- encountered in libc.lib and it has other symbols in it which will
- be pulled in by the link process. To avoid this, we act as
- though the user specified -u with the entry point symbol.
-
- This function is called after the linker script and command line
- options have been read, so at this point we know the right entry
- point. This function is called before the input files are
- opened, so registering the symbol as undefined will make a
- difference. */
-
- if (! link_info.relocatable && entry_symbol.name != NULL)
- ldlang_add_undef (entry_symbol.name);
-}
-
-/* pep-dll.c directly accesses pep_data_import_dll,
- so it must be defined outside of #ifdef DLL_SUPPORT.
- Note - this variable is deliberately not initialised.
- This allows it to be treated as a common varaible, and only
- exist in one incarnation in a multiple target enabled linker. */
-char * pep_data_import_dll;
-
-#ifdef DLL_SUPPORT
-static struct bfd_link_hash_entry *pep_undef_found_sym;
-
-static bfd_boolean
-pep_undef_cdecl_match (struct bfd_link_hash_entry *h, void *inf)
-{
- int sl;
- char *string = inf;
-
- sl = strlen (string);
- if (h->type == bfd_link_hash_defined
- && strncmp (h->root.string, string, sl) == 0
- && h->root.string[sl] == '@')
- {
- pep_undef_found_sym = h;
- return FALSE;
- }
- return TRUE;
-}
-
-static void
-pep_fixup_stdcalls (void)
-{
- static int gave_warning_message = 0;
- struct bfd_link_hash_entry *undef, *sym;
-
- if (pep_dll_extra_pe_debug)
- printf ("%s\n", __FUNCTION__);
-
- for (undef = link_info.hash->undefs; undef; undef=undef->u.undef.next)
- if (undef->type == bfd_link_hash_undefined)
- {
- char* at = strchr (undef->root.string, '@');
- int lead_at = (*undef->root.string == '@');
- /* For now, don't try to fixup fastcall symbols. */
-
- if (at && !lead_at)
- {
- /* The symbol is a stdcall symbol, so let's look for a
- cdecl symbol with the same name and resolve to that. */
- char *cname = xstrdup (undef->root.string /* + lead_at */);
- at = strchr (cname, '@');
- *at = 0;
- sym = bfd_link_hash_lookup (link_info.hash, cname, 0, 0, 1);
-
- if (sym && sym->type == bfd_link_hash_defined)
- {
- undef->type = bfd_link_hash_defined;
- undef->u.def.value = sym->u.def.value;
- undef->u.def.section = sym->u.def.section;
-
- if (pep_enable_stdcall_fixup == -1)
- {
- einfo (_("Warning: resolving %s by linking to %s\n"),
- undef->root.string, cname);
- if (! gave_warning_message)
- {
- gave_warning_message = 1;
- einfo (_("Use --enable-stdcall-fixup to disable these warnings\n"));
- einfo (_("Use --disable-stdcall-fixup to disable these fixups\n"));
- }
- }
- }
- }
- else
- {
- /* The symbol is a cdecl symbol, so we look for stdcall
- symbols - which means scanning the whole symbol table. */
- pep_undef_found_sym = 0;
- bfd_link_hash_traverse (link_info.hash, pep_undef_cdecl_match,
- (char *) undef->root.string);
- sym = pep_undef_found_sym;
- if (sym)
- {
- undef->type = bfd_link_hash_defined;
- undef->u.def.value = sym->u.def.value;
- undef->u.def.section = sym->u.def.section;
-
- if (pep_enable_stdcall_fixup == -1)
- {
- einfo (_("Warning: resolving %s by linking to %s\n"),
- undef->root.string, sym->root.string);
- if (! gave_warning_message)
- {
- gave_warning_message = 1;
- einfo (_("Use --enable-stdcall-fixup to disable these warnings\n"));
- einfo (_("Use --disable-stdcall-fixup to disable these fixups\n"));
- }
- }
- }
- }
- }
-}
-
-static int
-make_import_fixup (arelent *rel, asection *s)
-{
- struct bfd_symbol *sym = *rel->sym_ptr_ptr;
- char addend[4];
-
- if (pep_dll_extra_pe_debug)
- printf ("arelent: %s@%#lx: add=%li\n", sym->name,
- (long) rel->address, (long) rel->addend);
-
- if (! bfd_get_section_contents (s->owner, s, addend, rel->address, sizeof (addend)))
- einfo (_("%C: Cannot get section contents - auto-import exception\n"),
- s->owner, s, rel->address);
-
- pep_create_import_fixup (rel, s, bfd_get_32 (s->owner, addend));
-
- return 1;
-}
-
-static void
-pep_find_data_imports (void)
-{
- struct bfd_link_hash_entry *undef, *sym;
-
- if (link_info.pei386_auto_import == 0)
- return;
-
- for (undef = link_info.hash->undefs; undef; undef=undef->u.undef.next)
- {
- if (undef->type == bfd_link_hash_undefined)
- {
- /* C++ symbols are *long*. */
- char buf[4096];
-
- if (pep_dll_extra_pe_debug)
- printf ("%s:%s\n", __FUNCTION__, undef->root.string);
-
- sprintf (buf, "__imp_%s", undef->root.string);
-
- sym = bfd_link_hash_lookup (link_info.hash, buf, 0, 0, 1);
-
- if (sym && sym->type == bfd_link_hash_defined)
- {
- bfd *b = sym->u.def.section->owner;
- asymbol **symbols;
- int nsyms, symsize, i;
-
- if (link_info.pei386_auto_import == -1)
- info_msg (_("Info: resolving %s by linking to %s (auto-import)\n"),
- undef->root.string, buf);
-
- symsize = bfd_get_symtab_upper_bound (b);
- symbols = xmalloc (symsize);
- nsyms = bfd_canonicalize_symtab (b, symbols);
-
- for (i = 0; i < nsyms; i++)
- {
- if (! CONST_STRNEQ (symbols[i]->name, "__head_"))
- continue;
-
- if (pep_dll_extra_pe_debug)
- printf ("->%s\n", symbols[i]->name);
-
- pep_data_import_dll = (char*) (symbols[i]->name +
- sizeof ("__head_") - 1);
- break;
- }
-
- pep_walk_relocs_of_symbol (&link_info, undef->root.string,
- make_import_fixup);
-
- /* Let's differentiate it somehow from defined. */
- undef->type = bfd_link_hash_defweak;
- /* We replace original name with __imp_ prefixed, this
- 1) may trash memory 2) leads to duplicate symbol generation.
- Still, IMHO it's better than having name poluted. */
- undef->root.string = sym->root.string;
- undef->u.def.value = sym->u.def.value;
- undef->u.def.section = sym->u.def.section;
- }
- }
- }
-}
-
-static bfd_boolean
-pr_sym (struct bfd_hash_entry *h, void *inf ATTRIBUTE_UNUSED)
-{
- if (pep_dll_extra_pe_debug)
- printf ("+%s\n", h->string);
-
- return TRUE;
-}
-#endif /* DLL_SUPPORT */
-
-
-static void
-gld_${EMULATION_NAME}_after_open (void)
-{
-#ifdef DLL_SUPPORT
- if (pep_dll_extra_pe_debug)
- {
- bfd *a;
- struct bfd_link_hash_entry *sym;
-
- printf ("%s()\n", __FUNCTION__);
-
- for (sym = link_info.hash->undefs; sym; sym=sym->u.undef.next)
- printf ("-%s\n", sym->root.string);
- bfd_hash_traverse (&link_info.hash->table, pr_sym, NULL);
-
- for (a = link_info.input_bfds; a; a = a->link_next)
- printf ("*%s\n",a->filename);
- }
-#endif
-
- /* Pass the wacky PE command line options into the output bfd.
- FIXME: This should be done via a function, rather than by
- including an internal BFD header. */
-
- if (coff_data (output_bfd) == NULL || coff_data (output_bfd)->pe == 0)
- einfo (_("%F%P: cannot perform PE operations on non PE output file '%B'.\n"), output_bfd);
-
- pe_data (output_bfd)->pe_opthdr = pep;
- pe_data (output_bfd)->dll = init[DLLOFF].value;
- pe_data (output_bfd)->real_flags |= real_flags;
-
-#ifdef DLL_SUPPORT
- if (pep_enable_stdcall_fixup) /* -1=warn or 1=disable */
- pep_fixup_stdcalls ();
-
- pep_process_import_defs (output_bfd, & link_info);
-
- pep_find_data_imports ();
-
-#ifndef TARGET_IS_i386pep
- if (link_info.shared)
-#else
- if (!link_info.relocatable)
-#endif
- pep_dll_build_sections (output_bfd, &link_info);
-
-#ifndef TARGET_IS_i386pep
- else
- pep_exe_build_sections (output_bfd, &link_info);
-#endif
-#endif /* DLL_SUPPORT */
-
- {
- /* This next chunk of code tries to detect the case where you have
- two import libraries for the same DLL (specifically,
- symbolically linking libm.a and libc.a in cygwin to
- libcygwin.a). In those cases, it's possible for function
- thunks from the second implib to be used but without the
- head/tail objects, causing an improper import table. We detect
- those cases and rename the "other" import libraries to match
- the one the head/tail come from, so that the linker will sort
- things nicely and produce a valid import table. */
-
- LANG_FOR_EACH_INPUT_STATEMENT (is)
- {
- if (is->the_bfd->my_archive)
- {
- int idata2 = 0, reloc_count=0, is_imp = 0;
- asection *sec;
-
- /* See if this is an import library thunk. */
- for (sec = is->the_bfd->sections; sec; sec = sec->next)
- {
- if (strcmp (sec->name, ".idata\$2") == 0)
- idata2 = 1;
- if (CONST_STRNEQ (sec->name, ".idata\$"))
- is_imp = 1;
- reloc_count += sec->reloc_count;
- }
-
- if (is_imp && !idata2 && reloc_count)
- {
- /* It is, look for the reference to head and see if it's
- from our own library. */
- for (sec = is->the_bfd->sections; sec; sec = sec->next)
- {
- int i;
- long symsize;
- long relsize;
- asymbol **symbols;
- arelent **relocs;
- int nrelocs;
-
- symsize = bfd_get_symtab_upper_bound (is->the_bfd);
- if (symsize < 1)
- break;
- relsize = bfd_get_reloc_upper_bound (is->the_bfd, sec);
- if (relsize < 1)
- break;
-
- symbols = xmalloc (symsize);
- symsize = bfd_canonicalize_symtab (is->the_bfd, symbols);
- if (symsize < 0)
- {
- einfo ("%X%P: unable to process symbols: %E");
- return;
- }
-
- relocs = xmalloc ((size_t) relsize);
- nrelocs = bfd_canonicalize_reloc (is->the_bfd, sec,
- relocs, symbols);
- if (nrelocs < 0)
- {
- free (relocs);
- einfo ("%X%P: unable to process relocs: %E");
- return;
- }
-
- for (i = 0; i < nrelocs; i++)
- {
- struct bfd_symbol *s;
- struct bfd_link_hash_entry * blhe;
- char *other_bfd_filename;
- char *n;
-
- s = (relocs[i]->sym_ptr_ptr)[0];
-
- if (s->flags & BSF_LOCAL)
- continue;
-
- /* Thunk section with reloc to another bfd. */
- blhe = bfd_link_hash_lookup (link_info.hash,
- s->name,
- FALSE, FALSE, TRUE);
-
- if (blhe == NULL
- || blhe->type != bfd_link_hash_defined)
- continue;
-
- other_bfd_filename
- = blhe->u.def.section->owner->my_archive
- ? bfd_get_filename (blhe->u.def.section->owner->my_archive)
- : bfd_get_filename (blhe->u.def.section->owner);
-
- if (strcmp (bfd_get_filename (is->the_bfd->my_archive),
- other_bfd_filename) == 0)
- continue;
-
- /* Rename this implib to match the other one. */
- n = xmalloc (strlen (other_bfd_filename) + 1);
- strcpy (n, other_bfd_filename);
- is->the_bfd->my_archive->filename = n;
- }
-
- free (relocs);
- /* Note - we do not free the symbols,
- they are now cached in the BFD. */
- }
- }
- }
- }
- }
-
- {
- int is_ms_arch = 0;
- bfd *cur_arch = 0;
- lang_input_statement_type *is2;
- lang_input_statement_type *is3;
-
- /* Careful - this is a shell script. Watch those dollar signs! */
- /* Microsoft import libraries have every member named the same,
- and not in the right order for us to link them correctly. We
- must detect these and rename the members so that they'll link
- correctly. There are three types of objects: the head, the
- thunks, and the sentinel(s). The head is easy; it's the one
- with idata2. We assume that the sentinels won't have relocs,
- and the thunks will. It's easier than checking the symbol
- table for external references. */
- LANG_FOR_EACH_INPUT_STATEMENT (is)
- {
- if (is->the_bfd->my_archive)
- {
- char *pnt;
- bfd *arch = is->the_bfd->my_archive;
-
- if (cur_arch != arch)
- {
- cur_arch = arch;
- is_ms_arch = 1;
-
- for (is3 = is;
- is3 && is3->the_bfd->my_archive == arch;
- is3 = (lang_input_statement_type *) is3->next)
- {
- /* A MS dynamic import library can also contain static
- members, so look for the first element with a .dll
- extension, and use that for the remainder of the
- comparisons. */
- pnt = strrchr (is3->the_bfd->filename, '.');
- if (pnt != NULL && strcmp (pnt, ".dll") == 0)
- break;
- }
-
- if (is3 == NULL)
- is_ms_arch = 0;
- else
- {
- /* OK, found one. Now look to see if the remaining
- (dynamic import) members use the same name. */
- for (is2 = is;
- is2 && is2->the_bfd->my_archive == arch;
- is2 = (lang_input_statement_type *) is2->next)
- {
- /* Skip static members, ie anything with a .obj
- extension. */
- pnt = strrchr (is2->the_bfd->filename, '.');
- if (pnt != NULL && strcmp (pnt, ".obj") == 0)
- continue;
-
- if (strcmp (is3->the_bfd->filename,
- is2->the_bfd->filename))
- {
- is_ms_arch = 0;
- break;
- }
- }
- }
- }
-
- /* This fragment might have come from an .obj file in a Microsoft
- import, and not an actual import record. If this is the case,
- then leave the filename alone. */
- pnt = strrchr (is->the_bfd->filename, '.');
-
- if (is_ms_arch && (strcmp (pnt, ".dll") == 0))
- {
- int idata2 = 0, reloc_count=0;
- asection *sec;
- char *new_name, seq;
-
- for (sec = is->the_bfd->sections; sec; sec = sec->next)
- {
- if (strcmp (sec->name, ".idata\$2") == 0)
- idata2 = 1;
- reloc_count += sec->reloc_count;
- }
-
- if (idata2) /* .idata2 is the TOC */
- seq = 'a';
- else if (reloc_count > 0) /* thunks */
- seq = 'b';
- else /* sentinel */
- seq = 'c';
-
- new_name = xmalloc (strlen (is->the_bfd->filename) + 3);
- sprintf (new_name, "%s.%c", is->the_bfd->filename, seq);
- is->the_bfd->filename = new_name;
-
- new_name = xmalloc (strlen (is->filename) + 3);
- sprintf (new_name, "%s.%c", is->filename, seq);
- is->filename = new_name;
- }
- }
- }
- }
-}
-
-static void
-gld_${EMULATION_NAME}_before_allocation (void)
-{
- before_allocation_default ();
-}
-
-#ifdef DLL_SUPPORT
-/* This is called when an input file isn't recognized as a BFD. We
- check here for .DEF files and pull them in automatically. */
-
-static int
-saw_option (char *option)
-{
- int i;
-
- for (i = 0; init[i].ptr; i++)
- if (strcmp (init[i].symbol, option) == 0)
- return init[i].inited;
- return 0;
-}
-#endif /* DLL_SUPPORT */
-
-static bfd_boolean
-gld_${EMULATION_NAME}_unrecognized_file (lang_input_statement_type *entry ATTRIBUTE_UNUSED)
-{
-#ifdef DLL_SUPPORT
- const char *ext = entry->filename + strlen (entry->filename) - 4;
-
- if (strcmp (ext, ".def") == 0 || strcmp (ext, ".DEF") == 0)
- {
- pep_def_file = def_file_parse (entry->filename, pep_def_file);
-
- if (pep_def_file)
- {
- int i, buflen=0, len;
- char *buf;
-
- for (i = 0; i < pep_def_file->num_exports; i++)
- {
- len = strlen (pep_def_file->exports[i].internal_name);
- if (buflen < len + 2)
- buflen = len + 2;
- }
-
- buf = xmalloc (buflen);
-
- for (i = 0; i < pep_def_file->num_exports; i++)
- {
- struct bfd_link_hash_entry *h;
-
- sprintf (buf, "_%s", pep_def_file->exports[i].internal_name);
-
- h = bfd_link_hash_lookup (link_info.hash, buf, TRUE, TRUE, TRUE);
- if (h == (struct bfd_link_hash_entry *) NULL)
- einfo (_("%P%F: bfd_link_hash_lookup failed: %E\n"));
- if (h->type == bfd_link_hash_new)
- {
- h->type = bfd_link_hash_undefined;
- h->u.undef.abfd = NULL;
- bfd_link_add_undef (link_info.hash, h);
- }
- }
- free (buf);
-
- /* def_file_print (stdout, pep_def_file); */
- if (pep_def_file->is_dll == 1)
- link_info.shared = 1;
-
- if (pep_def_file->base_address != (bfd_vma)(-1))
- {
- pep.ImageBase =
- pe_data (output_bfd)->pe_opthdr.ImageBase =
- init[IMAGEBASEOFF].value = pep_def_file->base_address;
- init[IMAGEBASEOFF].inited = 1;
- if (image_base_statement)
- image_base_statement->exp =
- exp_assop ('=', "__image_base__", exp_intop (pep.ImageBase));
- }
-
- if (pep_def_file->stack_reserve != -1
- && ! saw_option ("__size_of_stack_reserve__"))
- {
- pep.SizeOfStackReserve = pep_def_file->stack_reserve;
- if (pep_def_file->stack_commit != -1)
- pep.SizeOfStackCommit = pep_def_file->stack_commit;
- }
- if (pep_def_file->heap_reserve != -1
- && ! saw_option ("__size_of_heap_reserve__"))
- {
- pep.SizeOfHeapReserve = pep_def_file->heap_reserve;
- if (pep_def_file->heap_commit != -1)
- pep.SizeOfHeapCommit = pep_def_file->heap_commit;
- }
- return TRUE;
- }
- }
-#endif
- return FALSE;
-}
-
-static bfd_boolean
-gld_${EMULATION_NAME}_recognized_file (lang_input_statement_type *entry ATTRIBUTE_UNUSED)
-{
-#ifdef DLL_SUPPORT
-#ifdef TARGET_IS_i386pep
- pep_dll_id_target ("pei-x86-64");
-#endif
- if (bfd_get_format (entry->the_bfd) == bfd_object)
- {
- char fbuf[LD_PATHMAX + 1];
- const char *ext;
-
- if (REALPATH (entry->filename, fbuf) == NULL)
- strncpy (fbuf, entry->filename, sizeof (fbuf));
-
- ext = fbuf + strlen (fbuf) - 4;
-
- if (strcmp (ext, ".dll") == 0 || strcmp (ext, ".DLL") == 0)
- return pep_implied_import_dll (fbuf);
- }
-#endif
- return FALSE;
-}
-
-static void
-gld_${EMULATION_NAME}_finish (void)
-{
- finish_default ();
-
-#ifdef DLL_SUPPORT
- if (link_info.shared
- || (!link_info.relocatable && pep_def_file->num_exports != 0))
- {
- pep_dll_fill_sections (output_bfd, &link_info);
- if (pep_implib_filename)
- pep_dll_generate_implib (pep_def_file, pep_implib_filename);
- }
-
- if (pep_out_def_filename)
- pep_dll_generate_def_file (pep_out_def_filename);
-#endif /* DLL_SUPPORT */
-
- /* I don't know where .idata gets set as code, but it shouldn't be. */
- {
- asection *asec = bfd_get_section_by_name (output_bfd, ".idata");
-
- if (asec)
- {
- asec->flags &= ~SEC_CODE;
- asec->flags |= SEC_DATA;
- }
- }
-}
-
-
-/* Place an orphan section.
-
- We use this to put sections in a reasonable place in the file, and
- to ensure that they are aligned as required.
-
- We handle grouped sections here as well. A section named .foo$nn
- goes into the output section .foo. All grouped sections are sorted
- by name.
-
- Grouped sections for the default sections are handled by the
- default linker script using wildcards, and are sorted by
- sort_sections. */
-
-static bfd_boolean
-gld_${EMULATION_NAME}_place_orphan (asection *s)
-{
- const char *secname;
- const char *orig_secname;
- char *dollar = NULL;
- lang_output_section_statement_type *os;
- lang_statement_list_type add_child;
-
- secname = bfd_get_section_name (s->owner, s);
-
- /* Look through the script to see where to place this section. */
- orig_secname = secname;
- if (!link_info.relocatable
- && (dollar = strchr (secname, '$')) != NULL)
- {
- size_t len = dollar - orig_secname;
- char *newname = xmalloc (len + 1);
- memcpy (newname, orig_secname, len);
- newname[len] = '\0';
- secname = newname;
- }
-
- os = lang_output_section_find (secname);
-
- lang_list_init (&add_child);
-
- if (os != NULL
- && (os->bfd_section == NULL
- || os->bfd_section->flags == 0
- || ((s->flags ^ os->bfd_section->flags)
- & (SEC_LOAD | SEC_ALLOC)) == 0))
- {
- /* We already have an output section statement with this
- name, and its bfd section, if any, has compatible flags.
- If the section already exists but does not have any flags set,
- then it has been created by the linker, probably as a result of
- a --section-start command line switch. */
- lang_add_section (&add_child, s, os);
- }
- else
- {
- static struct orphan_save hold[] =
- {
- { ".text",
- SEC_HAS_CONTENTS | SEC_ALLOC | SEC_LOAD | SEC_READONLY | SEC_CODE,
- 0, 0, 0, 0 },
- { ".rdata",
- SEC_HAS_CONTENTS | SEC_ALLOC | SEC_LOAD | SEC_READONLY | SEC_DATA,
- 0, 0, 0, 0 },
- { ".data",
- SEC_HAS_CONTENTS | SEC_ALLOC | SEC_LOAD | SEC_DATA,
- 0, 0, 0, 0 },
- { ".bss",
- SEC_ALLOC,
- 0, 0, 0, 0 }
- };
- enum orphan_save_index
- {
- orphan_text = 0,
- orphan_rodata,
- orphan_data,
- orphan_bss
- };
- static int orphan_init_done = 0;
- struct orphan_save *place;
- lang_output_section_statement_type *after;
- etree_type *address;
-
- if (!orphan_init_done)
- {
- struct orphan_save *ho;
- for (ho = hold; ho < hold + sizeof (hold) / sizeof (hold[0]); ++ho)
- if (ho->name != NULL)
- {
- ho->os = lang_output_section_find (ho->name);
- if (ho->os != NULL && ho->os->flags == 0)
- ho->os->flags = ho->flags;
- }
- orphan_init_done = 1;
- }
-
- /* Try to put the new output section in a reasonable place based
- on the section name and section flags. */
-
- place = NULL;
- if ((s->flags & SEC_ALLOC) == 0)
- ;
- else if ((s->flags & (SEC_LOAD | SEC_HAS_CONTENTS)) == 0)
- place = &hold[orphan_bss];
- else if ((s->flags & SEC_READONLY) == 0)
- place = &hold[orphan_data];
- else if ((s->flags & SEC_CODE) == 0)
- place = &hold[orphan_rodata];
- else
- place = &hold[orphan_text];
-
- after = NULL;
- if (place != NULL)
- {
- if (place->os == NULL)
- place->os = lang_output_section_find (place->name);
- after = place->os;
- if (after == NULL)
- after = lang_output_section_find_by_flags (s, &place->os, NULL);
- if (after == NULL)
- /* *ABS* is always the first output section statement. */
- after = (&lang_output_section_statement.head
- ->output_section_statement);
- }
-
- /* Choose a unique name for the section. This will be needed if the
- same section name appears in the input file with different
- loadable or allocatable characteristics. */
- if (bfd_get_section_by_name (output_bfd, secname) != NULL)
- {
- static int count = 1;
- secname = bfd_get_unique_section_name (output_bfd, secname, &count);
- if (secname == NULL)
- einfo ("%F%P: place_orphan failed: %E\n");
- }
-
- /* All sections in an executable must be aligned to a page boundary. */
- address = exp_unop (ALIGN_K, exp_nameop (NAME, "__section_alignment__"));
- os = lang_insert_orphan (s, secname, after, place, address, &add_child);
- }
-
- {
- lang_statement_union_type **pl = &os->children.head;
-
- if (dollar != NULL)
- {
- bfd_boolean found_dollar;
-
- /* The section name has a '$'. Sort it with the other '$'
- sections. */
- found_dollar = FALSE;
- for ( ; *pl != NULL; pl = &(*pl)->header.next)
- {
- lang_input_section_type *ls;
- const char *lname;
-
- if ((*pl)->header.type != lang_input_section_enum)
- continue;
-
- ls = &(*pl)->input_section;
-
- lname = bfd_get_section_name (ls->section->owner, ls->section);
- if (strchr (lname, '$') == NULL)
- {
- if (found_dollar)
- break;
- }
- else
- {
- found_dollar = TRUE;
- if (strcmp (orig_secname, lname) < 0)
- break;
- }
- }
- }
-
- if (add_child.head != NULL)
- {
- add_child.head->header.next = *pl;
- *pl = add_child.head;
- }
- }
-
- return TRUE;
-}
-
-static bfd_boolean
-gld_${EMULATION_NAME}_open_dynamic_archive
- (const char *arch ATTRIBUTE_UNUSED,
- search_dirs_type *search,
- lang_input_statement_type *entry)
-{
- static const struct
- {
- const char * format;
- bfd_boolean use_prefix;
- }
- libname_fmt [] =
- {
- /* Preferred explicit import library for dll's. */
- { "lib%s.dll.a", FALSE },
- /* Alternate explicit import library for dll's. */
- { "%s.dll.a", FALSE },
- /* "libfoo.a" could be either an import lib or a static lib.
- For backwards compatibility, libfoo.a needs to precede
- libfoo.dll and foo.dll in the search. */
- { "lib%s.a", FALSE },
- /* The 'native' spelling of an import lib name is "foo.lib". */
- { "%s.lib", FALSE },
-#ifdef DLL_SUPPORT
- /* Try "<prefix>foo.dll" (preferred dll name, if specified). */
- { "%s%s.dll", TRUE },
-#endif
- /* Try "libfoo.dll" (default preferred dll name). */
- { "lib%s.dll", FALSE },
- /* Finally try 'native' dll name "foo.dll". */
- { "%s.dll", FALSE },
- /* Note: If adding more formats to this table, make sure to check to
- see if their length is longer than libname_fmt[0].format, and if
- so, update the call to xmalloc() below. */
- { NULL, FALSE }
- };
- static unsigned int format_max_len = 0;
- const char * filename;
- char * full_string;
- char * base_string;
- unsigned int i;
-
-
- if (! entry->is_archive)
- return FALSE;
-
- filename = entry->filename;
-
- if (format_max_len == 0)
- /* We need to allow space in the memory that we are going to allocate
- for the characters in the format string. Since the format array is
- static we only need to calculate this information once. In theory
- this value could also be computed statically, but this introduces
- the possibility for a discrepancy and hence a possible memory
- corruption. The lengths we compute here will be too long because
- they will include any formating characters (%s) in the strings, but
- this will not matter. */
- for (i = 0; libname_fmt[i].format; i++)
- if (format_max_len < strlen (libname_fmt[i].format))
- format_max_len = strlen (libname_fmt[i].format);
-
- full_string = xmalloc (strlen (search->name)
- + strlen (filename)
- + format_max_len
-#ifdef DLL_SUPPORT
- + (pep_dll_search_prefix
- ? strlen (pep_dll_search_prefix) : 0)
-#endif
- /* Allow for the terminating NUL and for the path
- separator character that is inserted between
- search->name and the start of the format string. */
- + 2);
-
- sprintf (full_string, "%s/", search->name);
- base_string = full_string + strlen (full_string);
-
- for (i = 0; libname_fmt[i].format; i++)
- {
-#ifdef DLL_SUPPORT
- if (libname_fmt[i].use_prefix)
- {
- if (!pep_dll_search_prefix)
- continue;
- sprintf (base_string, libname_fmt[i].format, pep_dll_search_prefix, filename);
- }
- else
-#endif
- sprintf (base_string, libname_fmt[i].format, filename);
-
- if (ldfile_try_open_bfd (full_string, entry))
- break;
- }
-
- if (!libname_fmt[i].format)
- {
- free (full_string);
- return FALSE;
- }
-
- entry->filename = full_string;
-
- return TRUE;
-}
-
-static int
-gld_${EMULATION_NAME}_find_potential_libraries
- (char *name, lang_input_statement_type *entry)
-{
- return ldfile_open_file_search (name, entry, "", ".lib");
-}
-
-static char *
-gld_${EMULATION_NAME}_get_script (int *isfile)
-EOF
-# Scripts compiled in.
-# sed commands to quote an ld script as a C string.
-sc="-f stringify.sed"
-
-cat >>e${EMULATION_NAME}.c <<EOF
-{
- *isfile = 0;
-
- if (link_info.relocatable && config.build_constructors)
- return
-EOF
-sed $sc ldscripts/${EMULATION_NAME}.xu >> e${EMULATION_NAME}.c
-echo ' ; else if (link_info.relocatable) return' >> e${EMULATION_NAME}.c
-sed $sc ldscripts/${EMULATION_NAME}.xr >> e${EMULATION_NAME}.c
-echo ' ; else if (!config.text_read_only) return' >> e${EMULATION_NAME}.c
-sed $sc ldscripts/${EMULATION_NAME}.xbn >> e${EMULATION_NAME}.c
-echo ' ; else if (!config.magic_demand_paged) return' >> e${EMULATION_NAME}.c
-sed $sc ldscripts/${EMULATION_NAME}.xn >> e${EMULATION_NAME}.c
-echo ' ; else return' >> e${EMULATION_NAME}.c
-sed $sc ldscripts/${EMULATION_NAME}.x >> e${EMULATION_NAME}.c
-echo '; }' >> e${EMULATION_NAME}.c
-
-cat >>e${EMULATION_NAME}.c <<EOF
-
-
-struct ld_emulation_xfer_struct ld_${EMULATION_NAME}_emulation =
-{
- gld_${EMULATION_NAME}_before_parse,
- syslib_default,
- hll_default,
- gld_${EMULATION_NAME}_after_parse,
- gld_${EMULATION_NAME}_after_open,
- after_allocation_default,
- set_output_arch_default,
- ldemul_default_target,
- gld_${EMULATION_NAME}_before_allocation,
- gld_${EMULATION_NAME}_get_script,
- "${EMULATION_NAME}",
- "${OUTPUT_FORMAT}",
- gld_${EMULATION_NAME}_finish,
- NULL, /* Create output section statements. */
- gld_${EMULATION_NAME}_open_dynamic_archive,
- gld_${EMULATION_NAME}_place_orphan,
- gld_${EMULATION_NAME}_set_symbols,
- NULL, /* parse_args */
- gld${EMULATION_NAME}_add_options,
- gld${EMULATION_NAME}_handle_option,
- gld_${EMULATION_NAME}_unrecognized_file,
- gld_${EMULATION_NAME}_list_options,
- gld_${EMULATION_NAME}_recognized_file,
- gld_${EMULATION_NAME}_find_potential_libraries,
- NULL /* new_vers_pattern. */
-};
-EOF
diff --git a/contrib/binutils/ld/emultempl/ppc32elf.em b/contrib/binutils/ld/emultempl/ppc32elf.em
deleted file mode 100644
index 49a8eff58a82..000000000000
--- a/contrib/binutils/ld/emultempl/ppc32elf.em
+++ /dev/null
@@ -1,233 +0,0 @@
-# This shell script emits a C file. -*- C -*-
-# Copyright 2003, 2005, 2007 Free Software Foundation, Inc.
-#
-# This file is part of GLD, the Gnu Linker.
-#
-# This program is free software; you can redistribute it and/or modify
-# it under the terms of the GNU General Public License as published by
-# the Free Software Foundation; either version 2 of the License, or
-# (at your option) any later version.
-#
-# This program is distributed in the hope that it will be useful,
-# but WITHOUT ANY WARRANTY; without even the implied warranty of
-# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
-# GNU General Public License for more details.
-#
-# You should have received a copy of the GNU General Public License
-# along with this program; if not, write to the Free Software
-# Foundation, Inc., 51 Franklin Street - Fifth Floor, Boston, MA 02110-1301, USA.
-#
-
-# This file is sourced from elf32.em, and defines extra powerpc32-elf
-# specific routines.
-#
-cat >>e${EMULATION_NAME}.c <<EOF
-
-#include "libbfd.h"
-#include "elf32-ppc.h"
-
-extern const bfd_target bfd_elf32_powerpc_vec;
-extern const bfd_target bfd_elf32_powerpcle_vec;
-extern const bfd_target bfd_elf32_powerpc_vxworks_vec;
-
-static inline int
-is_ppc_elf32_vec(const bfd_target * vec)
-{
- return (vec == &bfd_elf32_powerpc_vec
- || vec == &bfd_elf32_powerpc_vxworks_vec
- || vec == &bfd_elf32_powerpcle_vec);
-}
-
-/* Whether to run tls optimization. */
-static int notlsopt = 0;
-
-/* Whether to emit symbols for stubs. */
-static int emit_stub_syms = 0;
-
-/* Chooses the correct place for .plt and .got. */
-static enum ppc_elf_plt_type plt_style = PLT_UNSET;
-static int old_got = 0;
-
-static void
-ppc_after_open (void)
-{
- if (is_ppc_elf32_vec (link_info.hash->creator))
- {
- int new_plt;
- int keep_new;
- unsigned int num_plt;
- unsigned int num_got;
- lang_output_section_statement_type *os;
- lang_output_section_statement_type *plt_os[2];
- lang_output_section_statement_type *got_os[2];
-
- emit_stub_syms |= link_info.emitrelocations;
- new_plt = ppc_elf_select_plt_layout (output_bfd, &link_info, plt_style,
- emit_stub_syms);
- if (new_plt < 0)
- einfo ("%X%P: select_plt_layout problem %E\n");
-
- num_got = 0;
- num_plt = 0;
- for (os = &lang_output_section_statement.head->output_section_statement;
- os != NULL;
- os = os->next)
- {
- if (os->constraint == SPECIAL && strcmp (os->name, ".plt") == 0)
- {
- if (num_plt < 2)
- plt_os[num_plt] = os;
- ++num_plt;
- }
- if (os->constraint == SPECIAL && strcmp (os->name, ".got") == 0)
- {
- if (num_got < 2)
- got_os[num_got] = os;
- ++num_got;
- }
- }
-
- keep_new = new_plt == 1 ? 0 : -1;
- if (num_plt == 2)
- {
- plt_os[0]->constraint = keep_new;
- plt_os[1]->constraint = ~keep_new;
- }
- if (num_got == 2)
- {
- if (old_got)
- keep_new = -1;
- got_os[0]->constraint = keep_new;
- got_os[1]->constraint = ~keep_new;
- }
- }
-
- gld${EMULATION_NAME}_after_open ();
-}
-
-static void
-ppc_before_allocation (void)
-{
- if (is_ppc_elf32_vec (link_info.hash->creator))
- {
- if (ppc_elf_tls_setup (output_bfd, &link_info) && !notlsopt)
- {
- if (!ppc_elf_tls_optimize (output_bfd, &link_info))
- {
- einfo ("%X%P: TLS problem %E\n");
- return;
- }
- }
- }
-
- gld${EMULATION_NAME}_before_allocation ();
-
- /* Turn on relaxation if executable sections have addresses that
- might make branches overflow. */
- if (!command_line.relax)
- {
- bfd_vma low = (bfd_vma) -1;
- bfd_vma high = 0;
- asection *o;
-
- /* Run lang_size_sections (if not already done). */
- if (expld.phase != lang_mark_phase_enum)
- {
- expld.phase = lang_mark_phase_enum;
- expld.dataseg.phase = exp_dataseg_none;
- one_lang_size_sections_pass (NULL, FALSE);
- lang_reset_memory_regions ();
- }
-
- for (o = output_bfd->sections; o != NULL; o = o->next)
- {
- if ((o->flags & (SEC_ALLOC | SEC_CODE)) != (SEC_ALLOC | SEC_CODE))
- continue;
- if (o->rawsize == 0)
- continue;
- if (low > o->vma)
- low = o->vma;
- if (high < o->vma + o->rawsize - 1)
- high = o->vma + o->rawsize - 1;
- }
- if (high > low && high - low > (1 << 25) - 1)
- command_line.relax = TRUE;
- }
-}
-
-EOF
-
-if grep -q 'ld_elf32_spu_emulation' ldemul-list.h; then
- cat >>e${EMULATION_NAME}.c <<EOF
-/* Special handling for embedded SPU executables. */
-extern bfd_boolean embedded_spu_file (lang_input_statement_type *, const char *);
-static bfd_boolean gld${EMULATION_NAME}_load_symbols (lang_input_statement_type *);
-
-static bfd_boolean
-ppc_recognized_file (lang_input_statement_type *entry)
-{
- if (embedded_spu_file (entry, "-m32"))
- return TRUE;
-
- return gld${EMULATION_NAME}_load_symbols (entry);
-}
-
-EOF
-LDEMUL_RECOGNIZED_FILE=ppc_recognized_file
-fi
-
-# Define some shell vars to insert bits of code into the standard elf
-# parse_args and list_options functions.
-#
-PARSE_AND_LIST_PROLOGUE='
-#define OPTION_NO_TLS_OPT 301
-#define OPTION_NEW_PLT 302
-#define OPTION_OLD_PLT 303
-#define OPTION_OLD_GOT 304
-#define OPTION_STUBSYMS 305
-'
-
-PARSE_AND_LIST_LONGOPTS='
- { "emit-stub-syms", no_argument, NULL, OPTION_STUBSYMS },
- { "no-tls-optimize", no_argument, NULL, OPTION_NO_TLS_OPT },
- { "secure-plt", no_argument, NULL, OPTION_NEW_PLT },
- { "bss-plt", no_argument, NULL, OPTION_OLD_PLT },
- { "sdata-got", no_argument, NULL, OPTION_OLD_GOT },
-'
-
-PARSE_AND_LIST_OPTIONS='
- fprintf (file, _("\
- --emit-stub-syms Label linker stubs with a symbol.\n\
- --no-tls-optimize Don'\''t try to optimize TLS accesses.\n\
- --secure-plt Use new-style PLT if possible.\n\
- --bss-plt Force old-style BSS PLT.\n\
- --sdata-got Force GOT location just before .sdata.\n"
- ));
-'
-
-PARSE_AND_LIST_ARGS_CASES='
- case OPTION_STUBSYMS:
- emit_stub_syms = 1;
- break;
-
- case OPTION_NO_TLS_OPT:
- notlsopt = 1;
- break;
-
- case OPTION_NEW_PLT:
- plt_style = PLT_NEW;
- break;
-
- case OPTION_OLD_PLT:
- plt_style = PLT_OLD;
- break;
-
- case OPTION_OLD_GOT:
- old_got = 1;
- break;
-'
-
-# Put these extra ppc32elf routines in ld_${EMULATION_NAME}_emulation
-#
-LDEMUL_AFTER_OPEN=ppc_after_open
-LDEMUL_BEFORE_ALLOCATION=ppc_before_allocation
diff --git a/contrib/binutils/ld/emultempl/ppc64elf.em b/contrib/binutils/ld/emultempl/ppc64elf.em
deleted file mode 100644
index 3ba2ba69084f..000000000000
--- a/contrib/binutils/ld/emultempl/ppc64elf.em
+++ /dev/null
@@ -1,604 +0,0 @@
-# This shell script emits a C file. -*- C -*-
-# Copyright 2002, 2003, 2004, 2005 Free Software Foundation, Inc.
-#
-# This file is part of GLD, the Gnu Linker.
-#
-# This program is free software; you can redistribute it and/or modify
-# it under the terms of the GNU General Public License as published by
-# the Free Software Foundation; either version 2 of the License, or
-# (at your option) any later version.
-#
-# This program is distributed in the hope that it will be useful,
-# but WITHOUT ANY WARRANTY; without even the implied warranty of
-# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
-# GNU General Public License for more details.
-#
-# You should have received a copy of the GNU General Public License
-# along with this program; if not, write to the Free Software
-# Foundation, Inc., 51 Franklin Street - Fifth Floor, Boston, MA 02110-1301, USA.
-#
-
-# This file is sourced from elf32.em, and defines extra 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 no_tls_opt = 0;
-
-/* Whether to run opd optimization. */
-static int no_opd_opt = 0;
-
-/* Whether to run toc optimization. */
-static int no_toc_opt = 0;
-
-/* Whether to allow multiple toc sections. */
-static int no_multi_toc = 0;
-
-/* Whether to emit symbols for stubs. */
-static int emit_stub_syms = 0;
-
-static asection *toc_section = 0;
-
-/* Whether to canonicalize .opd so that there are no overlapping
- .opd entries. */
-static int non_overlapping_opd = 0;
-
-/* This is called before the input files are opened. We create a new
- fake input file to hold the stub sections. */
-
-static void
-ppc_create_output_section_statements (void)
-{
- extern const bfd_target bfd_elf64_powerpc_vec;
- extern const bfd_target bfd_elf64_powerpcle_vec;
- asection *sect;
-
- 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 ("%F%P: can not create BFD %E\n");
- return;
- }
-
- if (bfd_get_section_by_name (stub_file->the_bfd, ".note.GNU-stack") == NULL)
- sect = bfd_make_section (stub_file->the_bfd, ".note.GNU-stack");
- stub_file->the_bfd->flags |= BFD_LINKER_CREATED;
- ldlang_add_file (stub_file);
- ppc64_elf_init_stub_bfd (stub_file->the_bfd, &link_info);
-}
-
-static void
-ppc_before_allocation (void)
-{
- if (stub_file != NULL)
- {
- if (!ppc64_elf_edit_opd (output_bfd, &link_info, no_opd_opt,
- non_overlapping_opd))
- einfo ("%X%P: can not edit %s %E\n", "opd");
-
- if (ppc64_elf_tls_setup (output_bfd, &link_info) && !no_tls_opt)
- {
- /* Size the sections. This is premature, but we want to know the
- TLS segment layout so that certain optimizations can be done. */
- expld.phase = lang_mark_phase_enum;
- expld.dataseg.phase = exp_dataseg_none;
- one_lang_size_sections_pass (NULL, TRUE);
-
- if (!ppc64_elf_tls_optimize (output_bfd, &link_info))
- einfo ("%X%P: TLS problem %E\n");
-
- /* We must not cache anything from the preliminary sizing. */
- lang_reset_memory_regions ();
- }
-
- if (!no_toc_opt
- && !link_info.relocatable
- && !ppc64_elf_edit_toc (output_bfd, &link_info))
- einfo ("%X%P: can not edit %s %E\n", "toc");
- }
-
- gld${EMULATION_NAME}_before_allocation ();
-}
-
-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_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);
-
- 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. */
- gld${EMULATION_NAME}_map_segments (TRUE);
- need_laying_out = -1;
-}
-
-
-/* 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)
- {
- asection *i = statement->input_section.section;
-
- if (!((lang_input_statement_type *) i->owner->usrdata)->just_syms_flag
- && (i->flags & SEC_EXCLUDE) == 0
- && i->output_section == toc_section)
- ppc64_elf_next_toc_section (&link_info, i);
- }
-}
-
-
-static void
-build_section_lists (lang_statement_union_type *statement)
-{
- if (statement->header.type == lang_input_section_enum)
- {
- asection *i = statement->input_section.section;
-
- if (!((lang_input_statement_type *) i->owner->usrdata)->just_syms_flag
- && (i->flags & SEC_EXCLUDE) == 0
- && i->output_section != NULL
- && i->output_section->owner == output_bfd)
- {
- if (!ppc64_elf_next_input_section (&link_info, i))
- einfo ("%X%P: can not size stub section: %E\n");
- }
- }
-}
-
-
-/* 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,
- no_multi_toc);
- if (ret < 0)
- einfo ("%X%P: can not size stub section: %E\n");
- else if (ret > 0)
- {
- 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");
- }
- }
-
- if (need_laying_out != -1)
- gld${EMULATION_NAME}_map_segments (need_laying_out);
-
- if (link_info.relocatable)
- {
- asection *toc = bfd_get_section_by_name (output_bfd, ".toc");
- if (toc != NULL
- && bfd_section_size (output_bfd, toc) > 0x10000)
- einfo ("%X%P: TOC section size exceeds 64k\n");
- }
-
- if (stub_added)
- {
- char *msg = NULL;
- char *line, *endline;
-
- emit_stub_syms |= link_info.emitrelocations;
- if (!ppc64_elf_build_stubs (emit_stub_syms, &link_info,
- config.stats ? &msg : NULL))
- einfo ("%X%P: can not build stubs: %E\n");
-
- 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);
- }
-
- ppc64_elf_restore_symbols (&link_info);
- finish_default ();
-}
-
-
-/* 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 != NULL
- && (entry->pattern[0] == '*' || entry->pattern[0] == '.')))
- return entry;
-
- dot_entry = xmalloc (sizeof *dot_entry);
- *dot_entry = *entry;
- dot_entry->next = entry;
- if (entry->pattern != NULL)
- {
- len = strlen (entry->pattern) + 2;
- dot_pat = xmalloc (len);
- dot_pat[0] = '.';
- memcpy (dot_pat + 1, entry->pattern, len - 1);
- dot_entry->pattern = dot_pat;
- }
- if (entry->symbol != NULL)
- {
- len = strlen (entry->symbol) + 2;
- dot_pat = xmalloc (len);
- dot_pat[0] = '.';
- memcpy (dot_pat + 1, entry->symbol, len - 1);
- dot_entry->symbol = dot_pat;
- }
- return dot_entry;
-}
-
-
-/* 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
-
-if grep -q 'ld_elf32_spu_emulation' ldemul-list.h; then
- cat >>e${EMULATION_NAME}.c <<EOF
-/* Special handling for embedded SPU executables. */
-extern bfd_boolean embedded_spu_file (lang_input_statement_type *, const char *);
-static bfd_boolean gld${EMULATION_NAME}_load_symbols (lang_input_statement_type *);
-
-static bfd_boolean
-ppc64_recognized_file (lang_input_statement_type *entry)
-{
- if (embedded_spu_file (entry, "-m64"))
- return TRUE;
-
- return gld${EMULATION_NAME}_load_symbols (entry);
-}
-EOF
-LDEMUL_RECOGNIZED_FILE=ppc64_recognized_file
-fi
-
-# Define some shell vars to insert bits of code into the standard elf
-# parse_args and list_options functions.
-#
-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)
-#define OPTION_NO_OPD_OPT (OPTION_NO_TLS_OPT + 1)
-#define OPTION_NO_TOC_OPT (OPTION_NO_OPD_OPT + 1)
-#define OPTION_NO_MULTI_TOC (OPTION_NO_TOC_OPT + 1)
-#define OPTION_NON_OVERLAPPING_OPD (OPTION_NO_MULTI_TOC + 1)
-'
-
-PARSE_AND_LIST_LONGOPTS='
- { "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 },
- { "no-opd-optimize", no_argument, NULL, OPTION_NO_OPD_OPT },
- { "no-toc-optimize", no_argument, NULL, OPTION_NO_TOC_OPT },
- { "no-multi-toc", no_argument, NULL, OPTION_NO_MULTI_TOC },
- { "non-overlapping-opd", no_argument, NULL, OPTION_NON_OVERLAPPING_OPD },
-'
-
-PARSE_AND_LIST_OPTIONS='
- 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"
- ));
- fprintf (file, _("\
- --no-opd-optimize Don'\''t optimize the OPD section.\n"
- ));
- fprintf (file, _("\
- --no-toc-optimize Don'\''t optimize the TOC section.\n"
- ));
- fprintf (file, _("\
- --no-multi-toc Disallow automatic multiple toc sections.\n"
- ));
- fprintf (file, _("\
- --non-overlapping-opd Canonicalize .opd, so that there are no overlapping\n\
- .opd entries.\n"
- ));
-'
-
-PARSE_AND_LIST_ARGS_CASES='
- 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:
- no_tls_opt = 1;
- break;
-
- case OPTION_NO_OPD_OPT:
- no_opd_opt = 1;
- break;
-
- case OPTION_NO_TOC_OPT:
- no_toc_opt = 1;
- break;
-
- case OPTION_NO_MULTI_TOC:
- no_multi_toc = 1;
- break;
-
- case OPTION_NON_OVERLAPPING_OPD:
- non_overlapping_opd = 1;
- break;
-'
-
-# Put these extra ppc64elf routines in ld_${EMULATION_NAME}_emulation
-#
-LDEMUL_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/scoreelf.em b/contrib/binutils/ld/emultempl/scoreelf.em
deleted file mode 100644
index a529a1b704dd..000000000000
--- a/contrib/binutils/ld/emultempl/scoreelf.em
+++ /dev/null
@@ -1,74 +0,0 @@
-# This shell script emits a C file. -*- C -*-
-# Copyright 2006 Free Software Foundation, Inc.
-# Contributed by:
-# Mei Ligang (ligang@sunnorth.com.cn)
-# Pei-Lin Tsai (pltsai@sunplus.com)
-
-# This file is part of GLD, the Gnu Linker.
-#
-# This program is free software; you can redistribute it and/or modify
-# it under the terms of the GNU General Public License as published by
-# the Free Software Foundation; either version 2 of the License, or
-# (at your option) any later version.
-#
-# This program is distributed in the hope that it will be useful,
-# but WITHOUT ANY WARRANTY; without even the implied warranty of
-# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
-# GNU General Public License for more details.
-#
-# You should have received a copy of the GNU General Public License
-# along with this program; if not, write to the Free Software
-# Foundation, Inc., 51 Franklin Street - Fifth Floor, Boston, MA
-# 02110-1301, USA.
-#
-
-# This file is sourced from elf32.em, and defines extra score-elf
-# specific routines.
-#
-cat >>e${EMULATION_NAME}.c <<EOF
-
-static void
-gld${EMULATION_NAME}_before_parse ()
-{
-#ifndef TARGET_ /* I.e., if not generic. */
- ldfile_set_output_arch ("`echo ${ARCH}`");
-#endif /* not TARGET_ */
- config.dynamic_link = ${DYNAMIC_LINK-true};
- config.has_shared = `if test -n "$GENERATE_SHLIB_SCRIPT" ; then echo true ; else echo false ; fi`;
-}
-
-static void
-score_elf_after_open (void)
-{
- if (strstr (bfd_get_target (output_bfd), "score") == NULL)
- {
- /* The score backend needs special fields in the output hash structure.
- These will only be created if the output format is an score format,
- hence we do not support linking and changing output formats at the
- same time. Use a link followed by objcopy to change output formats. */
- einfo ("%F%X%P: error: cannot change output format whilst linking S+core binaries\n");
- return;
- }
-
- /* Call the standard elf routine. */
- gld${EMULATION_NAME}_after_open ();
-}
-
-EOF
-
-# Define some shell vars to insert bits of code into the standard elf
-# parse_args and list_options functions.
-#
-PARSE_AND_LIST_PROLOGUE=''
-PARSE_AND_LIST_SHORTOPTS=
-PARSE_AND_LIST_LONGOPTS=''
-PARSE_AND_LIST_OPTIONS=''
-PARSE_AND_LIST_ARGS_CASES=''
-
-# We have our own after_open and before_allocation functions, but they call
-# the standard routines, so give them a different name.
-LDEMUL_AFTER_OPEN=score_elf_after_open
-
-# Replace the elf before_parse function with our own.
-LDEMUL_BEFORE_PARSE=gld"${EMULATION_NAME}"_before_parse
-
diff --git a/contrib/binutils/ld/emultempl/spu_ovl.S b/contrib/binutils/ld/emultempl/spu_ovl.S
deleted file mode 100644
index adc6ab22a776..000000000000
--- a/contrib/binutils/ld/emultempl/spu_ovl.S
+++ /dev/null
@@ -1,294 +0,0 @@
-/* Overlay manager for SPU.
-
- Copyright 2006, 2007 Free Software Foundation, Inc.
-
- This file is part of GLD, the Gnu Linker.
-
- GLD is free software; you can redistribute it and/or modify
- it under the terms of the GNU General Public License as published by
- the Free Software Foundation; either version 2, or (at your option)
- any later version.
-
- GLD is distributed in the hope that it will be useful,
- but WITHOUT ANY WARRANTY; without even the implied warranty of
- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- GNU General Public License for more details.
-
- You should have received a copy of the GNU General Public License
- along with GLD; see the file COPYING. If not, write to the Free
- Software Foundation, 51 Franklin Street - Fifth Floor, Boston, MA
- 02110-1301, USA. */
-
-/**
- * MFC DMA defn's.
- */
-#define MFC_GET_CMD 0x40
-#define MFC_MAX_DMA_SIZE 0x4000
-#define MFC_TAG_UPDATE_ALL 2
-#define MFC_TAG_ID 0
-
-
-/**
- * Temporary register allocations.
- * These are saved/restored here.
- */
-#define tab $75
-#define cgbits $75
-#define add64 $75
-#define ealo $75
-#define newmask $75
-#define tagstat $75
-#define bchn $75
-#define rv1 $75
-
-#define off $76
-#define off64 $76
-#define maxsize $76
-#define oldmask $76
-#define sz $76
-#define lnkr $76
-#define rv2 $76
-
-#define cur $77
-#define cmp $77
-#define buf $77
-#define genwi $77
-#define tagid $77
-#define cmd $77
-#define rv3 $77
-
-#define cgshuf $78
-
-#define vma $6
-
-#define map $7
-#define osize $7
-#define cmp2 $7
-
-#define ea64 $8
-#define retval $8
-
-#ifdef OVLY_IRQ_SAVE
-#define irqtmp $8
-#define irq_stat $9
-#endif
-
- .extern _ovly_table
- .extern _ovly_buf_table
-
- .text
- .align 4
- .type __rv_pattern, @object
- .size __rv_pattern, 16
-__rv_pattern:
- .word 0x00010203, 0x1c1d1e1f, 0x00010203, 0x10111213
- .type __cg_pattern, @object
- .size __cg_pattern, 16
-__cg_pattern:
- .word 0x04050607, 0x80808080, 0x80808080, 0x80808080
-
-/**
- * __ovly_return - stub for returning from overlay functions.
- *
- * inputs:
- * $lr link register
- *
- * outputs:
- * $78 old partition number, to be reloaded
- * $79 return address in old partion number
- */
- .global __ovly_return
- .type __ovly_return, @function
-
- .word 0
-__ovly_return:
- shlqbyi $78, $lr, 4
- shlqbyi $79, $lr, 8
- biz $78, $79
- .size __ovly_return, . - __ovly_return
-
-/**
- * __ovly_load - copy an overlay partion to local store.
- *
- * inputs:
- * $78 partition number to be loaded.
- * $79 branch target in new partition.
- * $lr link register, containing return addr.
- *
- * outputs:
- * $lr new link register, returning through __ovly_return.
- *
- * Copy a new overlay partition into local store, or return
- * immediately if the partition is already resident.
- */
- .global __ovly_load
- .type __ovly_load, @function
-
-__ovly_load:
-/* Save temporary registers to stack. */
- stqd $6, -16($sp)
- stqd $7, -32($sp)
- stqd $8, -48($sp)
-
-#ifdef OVLY_IRQ_SAVE
-/* Save irq state, then disable interrupts. */
- stqd $9, -64($sp)
- ila irqtmp, __ovly_irq_save
- rdch irq_stat, $SPU_RdMachStat
- bid irqtmp
-__ovly_irq_save:
-#endif
-
-/* Set branch hint to overlay target. */
- hbr __ovly_load_ret, $79
-
-/* Get caller's overlay index by back chaining through stack frames.
- * Loop until end of stack (back chain all-zeros) or
- * encountered a link register we set here. */
- lqd bchn, 0($sp)
- ila retval, __ovly_return
-
-__ovly_backchain_loop:
- lqd lnkr, 16(bchn)
- lqd bchn, 0(bchn)
- ceq cmp, lnkr, retval
- ceqi cmp2, bchn, 0
- or cmp, cmp, cmp2
- brz cmp, __ovly_backchain_loop
-
-/* If we reached the zero back-chain, then lnkr is bogus. Clear the
- * part of lnkr that we use later (slot 3). */
- rotqbyi cmp2, cmp2, 4
- andc lnkr, lnkr, cmp2
-
-/* Set lr = {__ovly_return, prev ovl ndx, caller return adr, callee ovl ndx}. */
- lqd rv1, (__rv_pattern-__ovly_return+4)(retval)
- shufb rv2, retval, lnkr, rv1
- shufb rv3, $lr, $78, rv1
- fsmbi rv1, 0xff
- selb rv2, rv2, rv3, rv1
-/* If we have a tail call from one overlay function to another overlay,
- then lr is already set up. Don't change it. */
- ceq rv1, $lr, retval
- fsmb rv1, rv1
- selb $lr, rv2, $lr, rv1
-
-/* Branch to $79 if non-overlay */
- brz $78, __ovly_load_restore
-
-/* Load values from _ovly_table[$78].
- * extern struct {
- * u32 vma;
- * u32 size;
- * u32 file_offset;
- * u32 buf;
- * } _ovly_table[];
- */
- shli off, $78, 4
- ila tab, _ovly_table - 16
- lqx vma, tab, off
- rotqbyi buf, vma, 12
-
-/* Load values from _ovly_buf_table[buf].
- * extern struct {
- * u32 mapped;
- * } _ovly_buf_table[];
- */
- ila tab, _ovly_buf_table
- ai off, buf, -1
- shli off, off, 2
- lqx map, tab, off
- rotqby cur, map, off
-
-/* Branch to $79 now if overlay is already mapped. */
- ceq cmp, $78, cur
- brnz cmp, __ovly_load_restore
-
-/* Marker for profiling code. If we get here, we are about to load
- * a new overlay.
- */
- .global __ovly_load_event
- .type __ovly_load_event, @function
-__ovly_load_event:
-
-/* Set _ovly_buf_table[buf].mapped = $78. */
- cwx genwi, tab, off
- shufb map, $78, map, genwi
- stqx map, tab, off
-
-/* A new partition needs to be loaded. Prepare for DMA loop.
- * _EAR_ is the 64b base EA, filled in at run time by the
- * loader, and indicating the value for SPU executable image start.
- */
- lqd cgshuf, (__cg_pattern-__ovly_return+4)(retval)
- rotqbyi osize, vma, 4
- rotqbyi sz, vma, 8
- lqa ea64, _EAR_
-
-__ovly_xfer_loop:
-/* 64b add to compute next ea64. */
- rotqmbyi off64, sz, -4
- cg cgbits, ea64, off64
- shufb add64, cgbits, cgbits, cgshuf
- addx add64, ea64, off64
- ori ea64, add64, 0
-
-/* Setup DMA parameters, then issue DMA request. */
- rotqbyi ealo, add64, 4
- ila maxsize, MFC_MAX_DMA_SIZE
- cgt cmp, osize, maxsize
- selb sz, osize, maxsize, cmp
- ila tagid, MFC_TAG_ID
- wrch $MFC_LSA, vma
- wrch $MFC_EAH, ea64
- wrch $MFC_EAL, ealo
- wrch $MFC_Size, sz
- wrch $MFC_TagId, tagid
- ila cmd, MFC_GET_CMD
- wrch $MFC_Cmd, cmd
-
-/* Increment vma, decrement size, branch back as needed. */
- a vma, vma, sz
- sf osize, sz, osize
- brnz osize, __ovly_xfer_loop
-
-/* Save app's tagmask, wait for DMA complete, restore mask. */
- rdch oldmask, $MFC_RdTagMask
-#if MFC_TAG_ID < 16
- ilh newmask, 1 << MFC_TAG_ID
-#else
- ilhu newmask, 1 << (MFC_TAG_ID - 16)
-#endif
- wrch $MFC_WrTagMask, newmask
- ila tagstat, MFC_TAG_UPDATE_ALL
- wrch $MFC_WrTagUpdate, tagstat
- rdch tagstat, $MFC_RdTagStat
- sync
- wrch $MFC_WrTagMask, oldmask
-
- .global _ovly_debug_event
- .type _ovly_debug_event, @function
-_ovly_debug_event:
-/* GDB inserts debugger trap here. */
- nop
-
-__ovly_load_restore:
-#ifdef OVLY_IRQ_SAVE
-/* Conditionally re-enable interrupts. */
- andi irq_stat, irq_stat, 1
- ila irqtmp, __ovly_irq_restore
- binze irq_stat, irqtmp
-__ovly_irq_restore:
- lqd $9, -64($sp)
-#endif
-
-/* Restore saved registers. */
- lqd $8, -48($sp)
- lqd $7, -32($sp)
- lqd $6, -16($sp)
-
-__ovly_load_ret:
-/* Branch to target address. */
- bi $79
-
- .size __ovly_load, . - __ovly_load
diff --git a/contrib/binutils/ld/emultempl/spu_ovl.o b/contrib/binutils/ld/emultempl/spu_ovl.o
deleted file mode 100644
index a68eea3970aa..000000000000
--- a/contrib/binutils/ld/emultempl/spu_ovl.o
+++ /dev/null
Binary files differ
diff --git a/contrib/binutils/ld/emultempl/spuelf.em b/contrib/binutils/ld/emultempl/spuelf.em
deleted file mode 100644
index 05adeb8582c6..000000000000
--- a/contrib/binutils/ld/emultempl/spuelf.em
+++ /dev/null
@@ -1,504 +0,0 @@
-# This shell script emits a C file. -*- C -*-
-# Copyright 2006, 2007 Free Software Foundation, Inc.
-#
-# This file is part of GLD, the Gnu Linker.
-#
-# This program is free software; you can redistribute it and/or modify
-# it under the terms of the GNU General Public License as published by
-# the Free Software Foundation; either version 2 of the License, or
-# (at your option) any later version.
-#
-# This program is distributed in the hope that it will be useful,
-# but WITHOUT ANY WARRANTY; without even the implied warranty of
-# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
-# GNU General Public License for more details.
-#
-# You should have received a copy of the GNU General Public License along
-# with this program; if not, write to the Free Software Foundation, Inc.,
-# 51 Franklin Street - Fifth Floor, Boston, MA 02110-1301, USA.
-#
-
-# This file is sourced from elf32.em, and defines extra spu specific
-# features.
-#
-cat >>e${EMULATION_NAME}.c <<EOF
-#include "ldctor.h"
-#include "elf32-spu.h"
-
-/* Non-zero if no overlay processing should be done. */
-static int no_overlays = 0;
-
-/* Non-zero if we want stubs on all calls out of overlay regions. */
-static int non_overlay_stubs = 0;
-
-/* Whether to emit symbols for stubs. */
-static int emit_stub_syms = 0;
-
-/* Non-zero to perform stack space analysis. */
-static int stack_analysis = 0;
-
-/* Whether to emit symbols with stack requirements for each function. */
-static int emit_stack_syms = 0;
-
-/* Range of valid addresses for loadable sections. */
-static bfd_vma local_store_lo = 0;
-static bfd_vma local_store_hi = 0x3ffff;
-
-static const char ovl_mgr[] = {
-EOF
-
-../binutils/bin2c < ${srcdir}/emultempl/spu_ovl.o >> e${EMULATION_NAME}.c
-
-cat >>e${EMULATION_NAME}.c <<EOF
-};
-
-static const struct _ovl_stream ovl_mgr_stream = {
- ovl_mgr,
- ovl_mgr + sizeof (ovl_mgr)
-};
-
-static asection *toe = NULL;
-
-
-static int
-is_spu_target (void)
-{
- extern const bfd_target bfd_elf32_spu_vec;
-
- return link_info.hash->creator == &bfd_elf32_spu_vec;
-}
-
-/* Create our note section. */
-
-static void
-spu_after_open (void)
-{
- if (is_spu_target ()
- && !link_info.relocatable
- && link_info.input_bfds != NULL
- && !spu_elf_create_sections (output_bfd, &link_info,
- stack_analysis, emit_stack_syms))
- einfo ("%X%P: can not create note section: %E\n");
-
- gld${EMULATION_NAME}_after_open ();
-}
-
-/* Add section S at the end of output section OUTPUT_NAME.
-
- Really, we should be duplicating ldlang.c map_input_to_output_sections
- logic here, ie. using the linker script to find where the section
- goes. That's rather a lot of code, and we don't want to run
- map_input_to_output_sections again because most sections are already
- mapped. So cheat, and put the section in a fixed place, ignoring any
- attempt via a linker script to put .stub, .ovtab, and built-in
- overlay manager code somewhere else. */
-
-static void
-spu_place_special_section (asection *s, const char *output_name)
-{
- lang_output_section_statement_type *os;
-
- os = lang_output_section_find (output_name);
- if (os == NULL)
- {
- const char *save = s->name;
- s->name = output_name;
- gld${EMULATION_NAME}_place_orphan (s);
- s->name = save;
- }
- else
- lang_add_section (&os->children, s, os);
-
- s->output_section->size += s->size;
-}
-
-/* Load built-in overlay manager, and tweak overlay section alignment. */
-
-static void
-spu_elf_load_ovl_mgr (void)
-{
- lang_output_section_statement_type *os;
- struct elf_link_hash_entry *h;
-
- h = elf_link_hash_lookup (elf_hash_table (&link_info),
- "__ovly_load", FALSE, FALSE, FALSE);
-
- if (h != NULL
- && (h->root.type == bfd_link_hash_defined
- || h->root.type == bfd_link_hash_defweak)
- && h->def_regular)
- {
- /* User supplied __ovly_load. */
- }
- else if (ovl_mgr_stream.start == ovl_mgr_stream.end)
- einfo ("%F%P: no built-in overlay manager\n");
- else
- {
- lang_input_statement_type *ovl_is;
-
- ovl_is = lang_add_input_file ("builtin ovl_mgr",
- lang_input_file_is_file_enum,
- NULL);
-
- if (!spu_elf_open_builtin_lib (&ovl_is->the_bfd, &ovl_mgr_stream))
- einfo ("%X%P: can not open built-in overlay manager: %E\n");
- else
- {
- asection *in;
-
- if (!load_symbols (ovl_is, NULL))
- einfo ("%X%P: can not load built-in overlay manager: %E\n");
-
- /* Map overlay manager sections to output sections. */
- for (in = ovl_is->the_bfd->sections; in != NULL; in = in->next)
- if ((in->flags & (SEC_ALLOC | SEC_LOAD))
- == (SEC_ALLOC | SEC_LOAD))
- spu_place_special_section (in, ".text");
- }
- }
-
- /* Ensure alignment of overlay sections is sufficient. */
- for (os = &lang_output_section_statement.head->output_section_statement;
- os != NULL;
- os = os->next)
- if (os->bfd_section != NULL
- && spu_elf_section_data (os->bfd_section) != NULL
- && spu_elf_section_data (os->bfd_section)->ovl_index != 0)
- {
- if (os->bfd_section->alignment_power < 4)
- os->bfd_section->alignment_power = 4;
-
- /* Also ensure size rounds up. */
- os->block_value = 16;
- }
-}
-
-/* Go find if we need to do anything special for overlays. */
-
-static void
-spu_before_allocation (void)
-{
- if (is_spu_target ()
- && !link_info.relocatable
- && !no_overlays)
- {
- /* Size the sections. This is premature, but we need to know the
- rough layout so that overlays can be found. */
- expld.phase = lang_mark_phase_enum;
- expld.dataseg.phase = exp_dataseg_none;
- one_lang_size_sections_pass (NULL, TRUE);
-
- /* Find overlays by inspecting section vmas. */
- if (spu_elf_find_overlays (output_bfd, &link_info))
- {
- asection *stub, *ovtab;
-
- if (!spu_elf_size_stubs (output_bfd, &link_info, non_overlay_stubs,
- stack_analysis, &stub, &ovtab, &toe))
- einfo ("%X%P: can not size overlay stubs: %E\n");
-
- if (stub != NULL)
- {
- spu_place_special_section (stub, ".text");
- spu_place_special_section (ovtab, ".data");
- spu_place_special_section (toe, ".toe");
-
- spu_elf_load_ovl_mgr ();
- }
- }
-
- /* We must not cache anything from the preliminary sizing. */
- lang_reset_memory_regions ();
- }
-
- gld${EMULATION_NAME}_before_allocation ();
-}
-
-/* Final emulation specific call. */
-
-static void
-gld${EMULATION_NAME}_finish (void)
-{
- int need_laying_out;
-
- need_laying_out = bfd_elf_discard_info (output_bfd, &link_info);
-
- gld${EMULATION_NAME}_map_segments (need_laying_out);
-
- if (is_spu_target () && local_store_lo < local_store_hi)
- {
- asection *s;
-
- s = spu_elf_check_vma (output_bfd, local_store_lo, local_store_hi);
- if (s != NULL)
- einfo ("%X%P: %A exceeds local store range\n", s);
- }
-
- if (toe != NULL
- && !spu_elf_build_stubs (&link_info,
- emit_stub_syms || link_info.emitrelocations,
- toe))
- einfo ("%X%P: can not build overlay stubs: %E\n");
-
- finish_default ();
-}
-
-EOF
-
-if grep -q 'ld_elf.*ppc.*_emulation' ldemul-list.h; then
- cat >>e${EMULATION_NAME}.c <<EOF
-#include "filenames.h"
-#include <fcntl.h>
-#include <sys/wait.h>
-
-struct tflist {
- struct tflist *next;
- char name[9];
-};
-
-static struct tflist *tmp_file_list;
-
-static void clean_tmp (void)
-{
- for (; tmp_file_list != NULL; tmp_file_list = tmp_file_list->next)
- unlink (tmp_file_list->name);
-}
-
-static const char *
-base_name (const char *path)
-{
- const char *file = strrchr (path, '/');
-#ifdef HAVE_DOS_BASED_FILE_SYSTEM
- {
- char *bslash = strrchr (path, '\\\\');
-
- if (file == NULL || (bslash != NULL && bslash > file))
- file = bslash;
- if (file == NULL
- && path[0] != '\0'
- && path[1] == ':')
- file = path + 1;
- }
-#endif
- if (file == NULL)
- file = path;
- else
- ++file;
- return file;
-}
-
-/* This function is called when building a ppc32 or ppc64 executable
- to handle embedded spu images. */
-extern bfd_boolean embedded_spu_file (lang_input_statement_type *, const char *);
-
-bfd_boolean
-embedded_spu_file (lang_input_statement_type *entry, const char *flags)
-{
- const char *cmd[6];
- const char *sym;
- char *handle, *p;
- struct tflist *tf;
- char *oname;
- int fd;
- pid_t pid;
- int status;
- union lang_statement_union **old_stat_tail;
- union lang_statement_union **old_file_tail;
- union lang_statement_union *new_ent;
- lang_input_statement_type *search;
-
- if (entry->the_bfd->format != bfd_object
- || strcmp (entry->the_bfd->xvec->name, "elf32-spu") != 0
- || (entry->the_bfd->tdata.elf_obj_data->elf_header->e_type != ET_EXEC
- && entry->the_bfd->tdata.elf_obj_data->elf_header->e_type != ET_DYN))
- return FALSE;
-
- /* Use the filename as the symbol marking the program handle struct. */
- sym = base_name (entry->the_bfd->filename);
-
- handle = xstrdup (sym);
- for (p = handle; *p; ++p)
- if (!(ISALNUM (*p) || *p == '$' || *p == '.'))
- *p = '_';
-
- if (tmp_file_list == NULL)
- atexit (clean_tmp);
- tf = xmalloc (sizeof (*tf));
- tf->next = tmp_file_list;
- tmp_file_list = tf;
- oname = tf->name;
- memcpy (tf->name, "ldXXXXXX", sizeof (tf->name));
-
-#ifdef HAVE_MKSTEMP
- fd = mkstemp (oname);
-#else
- oname = mktemp (oname);
- if (oname == NULL)
- return FALSE;
- fd = open (oname, O_RDWR | O_CREAT | O_EXCL, 0600);
-#endif
- if (fd == -1)
- return FALSE;
- close (fd);
-
- for (search = (lang_input_statement_type *) input_file_chain.head;
- search != NULL;
- search = (lang_input_statement_type *) search->next_real_file)
- {
- const char *infile = base_name (search->filename);
-
- if (infile != NULL
- && strncmp (infile, "crtbegin", 8) == 0)
- {
- if (infile[8] == 'S')
- flags = concat (flags, " -fPIC", NULL);
- else if (infile[8] == 'T')
- flags = concat (flags, " -fpie", NULL);
- break;
- }
- }
-
- /* Use fork() and exec() rather than system() so that we don't
- need to worry about quoting args. */
- cmd[0] = EMBEDSPU;
- cmd[1] = flags;
- cmd[2] = handle;
- cmd[3] = entry->the_bfd->filename;
- cmd[4] = oname;
- cmd[5] = NULL;
- if (trace_file_tries)
- {
- info_msg (_("running: %s \"%s\" \"%s\" \"%s\" \"%s\"\n"),
- cmd[0], cmd[1], cmd[2], cmd[3], cmd[4]);
- fflush (stdout);
- }
-
- pid = fork ();
- if (pid == -1)
- return FALSE;
- if (pid == 0)
- {
- execvp (cmd[0], (char *const *) cmd);
- if (strcmp ("embedspu", EMBEDSPU) != 0)
- {
- cmd[0] = "embedspu";
- execvp (cmd[0], (char *const *) cmd);
- }
- perror (cmd[0]);
- _exit (127);
- }
-#ifdef HAVE_WAITPID
-#define WAITFOR(PID, STAT) waitpid (PID, STAT, 0)
-#else
-#define WAITFOR(PID, STAT) wait (STAT)
-#endif
- if (WAITFOR (pid, &status) != pid
- || !WIFEXITED (status)
- || WEXITSTATUS (status) != 0)
- return FALSE;
-#undef WAITFOR
-
- old_stat_tail = stat_ptr->tail;
- old_file_tail = input_file_chain.tail;
- if (lang_add_input_file (oname, lang_input_file_is_file_enum, NULL) == NULL)
- return FALSE;
-
- /* lang_add_input_file put the new list entry at the end of the statement
- and input file lists. Move it to just after the current entry. */
- new_ent = *old_stat_tail;
- *old_stat_tail = NULL;
- stat_ptr->tail = old_stat_tail;
- *old_file_tail = NULL;
- input_file_chain.tail = old_file_tail;
- new_ent->header.next = entry->header.next;
- entry->header.next = new_ent;
- new_ent->input_statement.next_real_file = entry->next_real_file;
- entry->next_real_file = new_ent;
-
- /* Ensure bfd sections are excluded from the output. */
- bfd_section_list_clear (entry->the_bfd);
- entry->loaded = TRUE;
- return TRUE;
-}
-
-EOF
-fi
-
-# Define some shell vars to insert bits of code into the standard elf
-# parse_args and list_options functions.
-#
-PARSE_AND_LIST_PROLOGUE='
-#define OPTION_SPU_PLUGIN 301
-#define OPTION_SPU_NO_OVERLAYS (OPTION_SPU_PLUGIN + 1)
-#define OPTION_SPU_STUB_SYMS (OPTION_SPU_NO_OVERLAYS + 1)
-#define OPTION_SPU_NON_OVERLAY_STUBS (OPTION_SPU_STUB_SYMS + 1)
-#define OPTION_SPU_LOCAL_STORE (OPTION_SPU_NON_OVERLAY_STUBS + 1)
-#define OPTION_SPU_STACK_ANALYSIS (OPTION_SPU_LOCAL_STORE + 1)
-#define OPTION_SPU_STACK_SYMS (OPTION_SPU_STACK_ANALYSIS + 1)
-'
-
-PARSE_AND_LIST_LONGOPTS='
- { "plugin", no_argument, NULL, OPTION_SPU_PLUGIN },
- { "no-overlays", no_argument, NULL, OPTION_SPU_NO_OVERLAYS },
- { "emit-stub-syms", no_argument, NULL, OPTION_SPU_STUB_SYMS },
- { "extra-overlay-stubs", no_argument, NULL, OPTION_SPU_NON_OVERLAY_STUBS },
- { "local-store", required_argument, NULL, OPTION_SPU_LOCAL_STORE },
- { "stack-analysis", no_argument, NULL, OPTION_SPU_STACK_ANALYSIS },
- { "emit-stack-syms", no_argument, NULL, OPTION_SPU_STACK_SYMS },
-'
-
-PARSE_AND_LIST_OPTIONS='
- fprintf (file, _("\
- --plugin Make SPU plugin.\n\
- --no-overlays No overlay handling.\n\
- --emit-stub-syms Add symbols on overlay call stubs.\n\
- --extra-overlay-stubs Add stubs on all calls out of overlay regions.\n\
- --local-store=lo:hi Valid address range.\n\
- --stack-analysis Estimate maximum stack requirement.\n\
- --emit-stack-syms Add __stack_func giving stack needed for each func.\n"
- ));
-'
-
-PARSE_AND_LIST_ARGS_CASES='
- case OPTION_SPU_PLUGIN:
- spu_elf_plugin (1);
- break;
-
- case OPTION_SPU_NO_OVERLAYS:
- no_overlays = 1;
- break;
-
- case OPTION_SPU_STUB_SYMS:
- emit_stub_syms = 1;
- break;
-
- case OPTION_SPU_NON_OVERLAY_STUBS:
- non_overlay_stubs = 1;
- break;
-
- case OPTION_SPU_LOCAL_STORE:
- {
- char *end;
- local_store_lo = strtoul (optarg, &end, 0);
- if (*end == '\'':'\'')
- {
- local_store_hi = strtoul (end + 1, &end, 0);
- if (*end == 0)
- break;
- }
- einfo (_("%P%F: invalid --local-store address range `%s'\''\n"), optarg);
- }
- break;
-
- case OPTION_SPU_STACK_ANALYSIS:
- stack_analysis = 1;
- break;
-
- case OPTION_SPU_STACK_SYMS:
- emit_stack_syms = 1;
- break;
-'
-
-LDEMUL_AFTER_OPEN=spu_after_open
-LDEMUL_BEFORE_ALLOCATION=spu_before_allocation
-LDEMUL_FINISH=gld${EMULATION_NAME}_finish
diff --git a/contrib/binutils/ld/emultempl/sunos.em b/contrib/binutils/ld/emultempl/sunos.em
deleted file mode 100644
index 53a572a909d4..000000000000
--- a/contrib/binutils/ld/emultempl/sunos.em
+++ /dev/null
@@ -1,1033 +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, 2001,
- 2002, 2003, 2004, 2005, 2006, 2007 Free Software Foundation, Inc.
- Written by Steve Chamberlain <sac@cygnus.com>
- SunOS shared library support by Ian Lance Taylor <ian@cygnus.com>
-
-This file is part of GLD, the Gnu Linker.
-
-This program is free software; you can redistribute it and/or modify
-it under the terms of the GNU General Public License as published by
-the Free Software Foundation; either version 2 of the License, or
-(at your option) any later version.
-
-This program is distributed in the hope that it will be useful,
-but WITHOUT ANY WARRANTY; without even the implied warranty of
-MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
-GNU General Public License for more details.
-
-You should have received a copy of the GNU General Public License
-along with this program; if not, write to the Free Software
-Foundation, Inc., 51 Franklin Street - Fifth Floor, Boston, MA 02110-1301, USA. */
-
-#define TARGET_IS_${EMULATION_NAME}
-
-#include "sysdep.h"
-#include "bfd.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 (CONST_STRNEQ (inp->local_sym_name, "-l"));
-
- 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 (! CONST_STRNEQ (entry->d_name, "lib")
- || 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 (! CONST_STRNEQ (entry->d_name + 3 + len, ".so"))
- 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 (! CONST_STRNEQ (lname, "-l"))
- {
- 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 (! CONST_STRNEQ (global_needed->name, "-l"))
- {
- 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 (! CONST_STRNEQ (sname, "lib"))
- 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->u.undef.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->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->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->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;
- }
-
- before_allocation_default ();
-}
-
-/* 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 ((char *) 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 ((char *) 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 ((char *) 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}",
- finish_default,
- 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 113c2b42d7d0..000000000000
--- a/contrib/binutils/ld/emultempl/ticoff.em
+++ /dev/null
@@ -1,183 +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, 2007
- Free Software Foundation, Inc.
-
-This program is free software; you can redistribute it and/or modify
-it under the terms of the GNU General Public License as published by
-the Free Software Foundation; either version 2 of the License, or
-(at your option) any later version.
-
-This program is distributed in the hope that it will be useful,
-but WITHOUT ANY WARRANTY; without even the implied warranty of
-MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
-GNU General Public License for more details.
-
-You should have received a copy of the GNU General Public License
-along with this program; if not, write to the Free Software
-Foundation, Inc., 51 Franklin Street - Fifth Floor, Boston, MA 02110-1301, USA. */
-
-/* For TI COFF */
-/* Need to determine load and run pages for output sections */
-
-#define TARGET_IS_${EMULATION_NAME}
-
-#include "sysdep.h"
-#include "bfd.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}",
- finish_default,
- 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 ece005e8b6e4..000000000000
--- a/contrib/binutils/ld/emultempl/vanilla.em
+++ /dev/null
@@ -1,84 +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, 2007
- 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., 51 Franklin Street - Fifth Floor, Boston, MA 02110-1301, USA. */
-
-#include "sysdep.h"
-#include "bfd.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",
- finish_default,
- 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 cc3cd011e962..000000000000
--- 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, 2003 Free Software Foundation, Inc.
-51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
-
-Everyone is permitted to copy and distribute verbatim copies
-of this license document, but changing it is not allowed.
-@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 03ab5583bdab..000000000000
--- a/contrib/binutils/ld/gen-doc.texi
+++ /dev/null
@@ -1,25 +0,0 @@
-@c ------------------------------ CONFIGURATION VARS:
-@c 1. Inclusiveness of this manual
-@set GENERIC
-
-@c 2. Specific target machines
-@set ARM
-@set H8300
-@set HPPA
-@set I960
-@set M68HC11
-@set MMIX
-@set MSP430
-@set POWERPC
-@set POWERPC64
-@set Renesas
-@set SPU
-@set TICOFF
-@set WIN32
-@set XTENSA
-
-@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 81b78a2cf35e..000000000000
--- a/contrib/binutils/ld/genscripts.sh
+++ /dev/null
@@ -1,379 +0,0 @@
-#!/bin/sh
-# genscripts.sh - generate the ld-emulation-target specific files
-#
-# Usage: genscripts_extra.sh \
-# srcdir \
-# libdir \
-# prefix \
-# 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 \
-# /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
-prefix=$3
-exec_prefix=$4
-host=$5
-target=$6
-target_alias=$7
-EMULATION_LIBPATH=$8
-NATIVE_LIB_DIRS=$9
-shift 9
-use_sysroot=$1
-EMULATION_NAME=$2
-TOOL_LIB=$3
-CUSTOMIZER_SCRIPT=$4
-
-# Can't use ${TOOL_LIB:-$target_alias} here due to an Ultrix shell bug.
-if [ "x${TOOL_LIB}" = "x" ] ; then
- 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
- # For multilib targets, search both $tool_lib dirs
- if [ "x${LIBPATH_SUFFIX}" != "x" ] ; then
- case :${LIB_PATH}: in
- ::: | *:${tool_lib}${LIBPATH_SUFFIX}:*) ;;
- ::) LIB_PATH=${tool_lib}${LIBPATH_SUFFIX} ;;
- *) LIB_PATH=${tool_lib}${LIBPATH_SUFFIX}:${LIB_PATH} ;;
- esac
- fi
-fi
-
-LIB_SEARCH_DIRS=`echo ${LIB_PATH} | sed -e 's/:/ /g' -e 's/\([^ ][^ ]*\)/SEARCH_DIR(\\"\1\\");/g'`
-
-# We need it for testsuite.
-set $EMULATION_LIBPATH
-if [ "x$1" = "x$EMULATION_NAME" ]; then
- test -d tmpdir || mkdir tmpdir
- rm -f tmpdir/libpath.exp
- echo "set libpath \"${LIB_PATH}\"" | sed -e 's/:/ /g' > tmpdir/libpath.exp
-fi
-
-# Generate 5 or 6 script files from a master script template in
-# ${srcdir}/scripttempl/${SCRIPT_NAME}.sh. Which one of the 5 or 6
-# 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}
- LD_FLAG=w
- RELRO_NOW=" "
- COMBRELOC=ldscripts/${EMULATION_NAME}.xw.tmp
- ( echo "/* Script for -z combreloc -z now -z relro: combine and sort reloc sections */"
- . ${CUSTOMIZER_SCRIPT} ${EMULATION_NAME}
- . ${srcdir}/scripttempl/${SCRIPT_NAME}.sc
- ) | sed -e '/^ *$/d;s/[ ]*$//' > ldscripts/${EMULATION_NAME}.xw
- rm -f ${COMBRELOC}
- COMBRELOC=
- unset RELRO_NOW
-fi
-
-if test -n "$GENERATE_SHLIB_SCRIPT"; then
- 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}.xsc.tmp
- ( echo "/* Script for --shared -z combreloc: shared library, combine & sort relocs */"
- . ${CUSTOMIZER_SCRIPT} ${EMULATION_NAME}
- . ${srcdir}/scripttempl/${SCRIPT_NAME}.sc
- ) | sed -e '/^ *$/d;s/[ ]*$//' > ldscripts/${EMULATION_NAME}.xsc
- rm -f ${COMBRELOC}
- LD_FLAG=wshared
- RELRO_NOW=" "
- COMBRELOC=ldscripts/${EMULATION_NAME}.xsw.tmp
- ( echo "/* Script for --shared -z combreloc -z now -z relro: shared library, combine & sort relocs */"
- . ${CUSTOMIZER_SCRIPT} ${EMULATION_NAME}
- . ${srcdir}/scripttempl/${SCRIPT_NAME}.sc
- ) | sed -e '/^ *$/d;s/[ ]*$//' > ldscripts/${EMULATION_NAME}.xsw
- rm -f ${COMBRELOC}
- COMBRELOC=
- unset RELRO_NOW
- fi
- unset CREATE_SHLIB
-fi
-
-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}.xdc.tmp
- ( echo "/* Script for -pie -z combreloc: position independent executable, combine & sort relocs */"
- . ${CUSTOMIZER_SCRIPT} ${EMULATION_NAME}
- . ${srcdir}/scripttempl/${SCRIPT_NAME}.sc
- ) | sed -e '/^ *$/d;s/[ ]*$//' > ldscripts/${EMULATION_NAME}.xdc
- rm -f ${COMBRELOC}
- LD_FLAG=wpie
- RELRO_NOW=" "
- COMBRELOC=ldscripts/${EMULATION_NAME}.xdw.tmp
- ( echo "/* Script for -pie -z combreloc -z now -z relro: position independent executable, combine & sort relocs */"
- . ${CUSTOMIZER_SCRIPT} ${EMULATION_NAME}
- . ${srcdir}/scripttempl/${SCRIPT_NAME}.sc
- ) | sed -e '/^ *$/d;s/[ ]*$//' > ldscripts/${EMULATION_NAME}.xdw
- rm -f ${COMBRELOC}
- COMBRELOC=
- unset RELRO_NOW
- fi
- unset CREATE_PIE
-fi
-
-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 bbb1fd9483ca..000000000000
--- 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.7 b/contrib/binutils/ld/ld.7
deleted file mode 100644
index 8ac5573b75c2..000000000000
--- a/contrib/binutils/ld/ld.7
+++ /dev/null
@@ -1,7819 +0,0 @@
-.Dd 2015-03-02
-.Dt LD 7
-.Os
-.Sh NAME
-.Nm ld
-.Nd The GNU Linker
-.Sh LD
-This file documents the GNU linker ld version "2.17.50 [FreeBSD] 2007-07-03".
-.Pp
-This document is distributed under the terms of the GNU Free Documentation
-License. A copy of the license is included in the section entitled \(lqGNU Free
-Documentation License\(rq.
-.Pp
-.Sh Overview
-.Xr 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
-.Xr ld .
-.Pp
-.Xr 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.
-.Pp
-This version of
-.Xr ld
-uses the general purpose BFD libraries to operate on object files. This allows
-.Xr ld
-to read, combine, and write object files in many different formats---for example,
-COFF or
-.Li a.out .
-Different formats may be linked together to produce any available kind of
-object file.See Section
-.Dq BFD ,
-for more information.
-.Pp
-Aside from its flexibility, the GNU linker is more helpful than other linkers
-in providing diagnostic information. Many linkers abandon execution immediately
-upon encountering an error; whenever possible,
-.Xr ld
-continues executing, allowing you to identify other errors (or, in some cases,
-to get an output file in spite of the error).
-.Pp
-.Sh Invocation
-The GNU linker
-.Xr 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.
-.Pp
-.Ss Command Line 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
-.Xr ld
-is to link standard Unix object files on a standard, supported Unix system.
-On such a system, to link a file
-.Li hello.o :
-.Pp
-.Bd -literal -offset indent
-ld -o output /lib/crt0.o hello.o -lc
-.Ed
-.Pp
-This tells
-.Xr ld
-to produce a file called
-.Va output
-as the result of linking the file
-.Li /lib/crt0.o
-with
-.Li hello.o
-and the library
-.Li libc.a ,
-which will come from the standard search directories. (See the discussion
-of the
-.Li -l
-option below.)
-.Pp
-Some of the command-line options to
-.Xr ld
-may be specified at any point in the command line. However, options which
-refer to files, such as
-.Li -l
-or
-.Li -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.
-.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
-.Li -l ,
-.Li -R ,
-and the script command language. If
-.Em no
-binary input files at all are specified, the linker does not produce any output,
-and issues the message
-.Li No input files .
-.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
-.Li -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
-.Li INPUT
-or
-.Li GROUP
-to load other objects. Note that specifying a script in this way merely augments
-the main linker script; use the
-.Li -T
-option to replace the default linker script entirely.See Section
-.Dq Scripts .
-.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,
-.Li -trace-symbol
-and
-.Li --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 preceded by two dashes.
-This is to reduce confusion with the
-.Li -o
-option. So for example
-.Li -omagic
-sets the output file name to
-.Li magic
-whereas
-.Li --omagic
-sets the NMAGIC 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,
-.Li --trace-symbol foo
-and
-.Li --trace-symbol=foo
-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.
-.Li gcc )
-then all the linker command line options should be prefixed by
-.Li -Wl,
-(or whatever is appropriate for the particular compiler driver) like this:
-.Pp
-.Bd -literal -offset indent
- gcc -Wl,--startgroup foo.o bar.o -Wl,--endgroup
-.Ed
-.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 GNU linker:
-.Pp
-.Bl -tag -width Ds
-.It @ Va file
-Read command-line options from
-.Va file .
-The options read are inserted in place of the original @
-.Va file
-option. If
-.Va file
-does not exist, or cannot be read, then the option will be treated literally,
-and not removed.
-.Pp
-Options in
-.Va file
-are separated by whitespace. A whitespace character may be included in an
-option by surrounding the entire option in either single or double quotes.
-Any character (including a backslash) may be included by prefixing the character
-to be included with a backslash. The
-.Va file
-may itself contain additional @
-.Va file
-options; any such options will be processed recursively.
-.Pp
-.It -a Va keyword
-This option is supported for HP/UX compatibility. The
-.Va keyword
-argument must be one of the strings
-.Li archive ,
-.Li shared ,
-or
-.Li default .
-.Li -aarchive
-is functionally equivalent to
-.Li -Bstatic ,
-and the other two keywords are functionally equivalent to
-.Li -Bdynamic .
-This option may be used any number of times.
-.Pp
-.It -A Va architecture
-.It --architecture= Va architecture
-In the current release of
-.Xr ld ,
-this option is useful only for the Intel 960 family of architectures. In that
-.Xr ld
-configuration, the
-.Va architecture
-argument identifies the particular architecture in the 960 family, enabling
-some safeguards and modifying the archive-library search path.See Section
-.Dq i960 ,
-for details.
-.Pp
-Future releases of
-.Xr ld
-may support similar functionality for other architecture families.
-.Pp
-.It -b Va input-format
-.It --format= Va input-format
-.Xr ld
-may be configured to support more than one kind of object file. If your
-.Xr ld
-is configured this way, you can use the
-.Li -b
-option to specify the binary format for input object files that follow this
-option on the command line. Even when
-.Xr ld
-is configured to support alternative object formats, you don't usually need
-to specify this, as
-.Xr ld
-should be configured to expect as a default input format the most usual format
-on each machine.
-.Va 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
-.Li objdump -i . )
-See Section.Dq BFD .
-.Pp
-You may want to use this option if you are linking files with an unusual binary
-format. You can also use
-.Li -b
-to switch formats explicitly (when linking object files of different formats),
-by including
-.Li -b Va input-format
-before each group of object files in a particular format.
-.Pp
-The default format is taken from the environment variable
-.Li GNUTARGET .
-See Section.Dq Environment .
-You can also define the input format from a script, using the command
-.Li TARGET ;
-see Format Commands.
-.Pp
-.It -c Va MRI-commandfile
-.It --mri-script= Va MRI-commandfile
-For compatibility with linkers produced by MRI,
-.Xr ld
-accepts script files written in an alternate, restricted command language,
-described in MRI,,MRI Compatible Script Files. Introduce MRI script files
-with the option
-.Li -c ;
-use the
-.Li -T
-option to run linker scripts written in the general-purpose
-.Xr ld
-scripting language. If
-.Va MRI-cmdfile
-does not exist,
-.Xr ld
-looks for it in the directories specified by any
-.Li -L
-options.
-.Pp
-.It -d
-.It -dc
-.It -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
-.Li -r ) .
-The script command
-.Li FORCE_COMMON_ALLOCATION
-has the same effect.See Section
-.Dq Miscellaneous Commands .
-.Pp
-.It -e Va entry
-.It --entry= Va entry
-Use
-.Va entry
-as the explicit symbol for beginning execution of your program, rather than
-the default entry point. If there is no symbol named
-.Va entry ,
-the linker will try to parse
-.Va entry
-as a number, and use that as the entry address (the number will be interpreted
-in base 10; you may use a leading
-.Li 0x
-for base 16, or a leading
-.Li 0
-for base 8).See Section
-.Dq Entry Point ,
-for a discussion of defaults and other ways of specifying the entry point.
-.Pp
-.It --exclude-libs Va lib, Va 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
-.Li --exclude-libs ALL
-excludes symbols in all archive libraries from automatic export. This option
-is available only for the i386 PE targeted port of the linker and for ELF
-targeted ports. For i386 PE, symbols explicitly listed in a .def file are
-still exported, regardless of this option. For ELF targeted ports, symbols
-affected by this option will be treated as hidden.
-.Pp
-.It -E
-.It --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.
-.Pp
-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.
-.Pp
-If you use
-.Li 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.
-.Pp
-You can also use the dynamic list to control what symbols should be added
-to the dynamic symbol table if the output format supports it. See the description
-of
-.Li --dynamic-list .
-.Pp
-.It -EB
-Link big-endian objects. This affects the default output format.
-.Pp
-.It -EL
-Link little-endian objects. This affects the default output format.
-.Pp
-.It -f
-.It --auxiliary Va 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
-.Va name .
-.Pp
-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
-.Va name .
-If there is one, it will be used instead of the definition in the filter object.
-The shared object
-.Va name
-need not exist. Thus the shared object
-.Va name
-may be used to provide an alternative implementation of certain functions,
-perhaps for debugging or for machine specific performance.
-.Pp
-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.
-.Pp
-.It -F Va name
-.It --filter Va 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
-.Va name .
-.Pp
-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
-.Va name .
-Thus the filter object can be used to select a subset of the symbols provided
-by the object
-.Va name .
-.Pp
-Some older linkers used the
-.Op -F
-option throughout a compilation toolchain for specifying object-file format
-for both input and output object files. The GNU linker uses other mechanisms
-for this purpose: the
-.Op -b ,
-.Op --format ,
-.Op --oformat
-options, the
-.Li TARGET
-command in linker scripts, and the
-.Li GNUTARGET
-environment variable. The GNU linker will ignore the
-.Op -F
-option when not creating an ELF shared object.
-.Pp
-.It -fini Va 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
-.Li _fini
-as the function to call.
-.Pp
-.It -g
-Ignored. Provided for compatibility with other tools.
-.Pp
-.It -G Va value
-.It --gpsize= Va value
-Set the maximum size of objects to be optimized using the GP register to
-.Va 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.
-.Pp
-.It -h Va name
-.It -soname= Va 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.
-.Pp
-.It -i
-Perform an incremental link (same as option
-.Li -r ) .
-.Pp
-.It -init Va 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
-.Li _init
-as the function to call.
-.Pp
-.It -l Va namespec
-.It --library= Va namespec
-Add the archive or object file specified by
-.Va namespec
-to the list of files to link. This option may be used any number of times.
-If
-.Va namespec
-is of the form
-.Pa : Va filename ,
-.Xr ld
-will search the library path for a file called
-.Va filename ,
-otherise it will search the library path for a file called
-.Pa lib Va namespec.a .
-.Pp
-On systems which support shared libraries,
-.Xr ld
-may also search for files other than
-.Pa lib Va namespec.a .
-Specifically, on ELF and SunOS systems,
-.Xr ld
-will search a directory for a library called
-.Pa lib Va namespec.so
-before searching for one called
-.Pa lib Va namespec.a .
-(By convention, a
-.Li .so
-extension indicates a shared library.) Note that this behavior does not apply
-to
-.Pa : Va filename ,
-which always specifies a file called
-.Va filename .
-.Pp
-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.
-.Pp
-See the
-.Op -(
-option for a way to force the linker to search archives multiple times.
-.Pp
-You may list the same archive multiple times on the command line.
-.Pp
-This type of archive searching is standard for Unix linkers. However, if you
-are using
-.Xr ld
-on AIX, note that it is different from the behaviour of the AIX linker.
-.Pp
-.It -L Va searchdir
-.It --library-path= Va searchdir
-Add path
-.Va searchdir
-to the list of paths that
-.Xr ld
-will search for archive libraries and
-.Xr 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
-.Op -L
-options apply to all
-.Op -l
-options, regardless of the order in which the options appear.
-.Pp
-If
-.Va searchdir
-begins with
-.Li = ,
-then the
-.Li =
-will be replaced by the
-.Em sysroot prefix ,
-a path specified when the linker is configured.
-.Pp
-The default set of paths searched (without being specified with
-.Li -L )
-depends on which emulation mode
-.Xr ld
-is using, and in some cases also on how it was configured.See Section
-.Dq Environment .
-.Pp
-The paths can also be specified in a link script with the
-.Li SEARCH_DIR
-command. Directories specified this way are searched at the point in which
-the linker script appears in the command line.
-.Pp
-.It -m Va emulation
-Emulate the
-.Va emulation
-linker. You can list the available emulations with the
-.Li --verbose
-or
-.Li -V
-options.
-.Pp
-If the
-.Li -m
-option is not used, the emulation is taken from the
-.Li LDEMULATION
-environment variable, if that is defined.
-.Pp
-Otherwise, the default emulation depends upon how the linker was configured.
-.Pp
-.It -M
-.It --print-map
-Print a link map to the standard output. A link map provides information about
-the link, including the following:
-.Pp
-.Bl -bullet
-.It
-Where object files are mapped into memory.
-.It
-How common symbols are allocated.
-.It
-All archive members included in the link, with a mention of the symbol which
-caused the archive member to be brought in.
-.It
-The values assigned to symbols.
-.Pp
-Note - symbols whose values are computed by an expression which involves a
-reference to a previous value of the same symbol may not have correct result
-displayed in the link map. This is because the linker discards intermediate
-results and only retains the final value of an expression. Under such circumstances
-the linker will display the final value enclosed by square brackets. Thus
-for example a linker script containing:
-.Pp
-.Bd -literal -offset indent
- foo = 1
- foo = foo * 4
- foo = foo + 8
-.Ed
-.Pp
-will produce the following output in the link map if the
-.Op -M
-option is used:
-.Pp
-.Bd -literal -offset indent
- 0x00000001 foo = 0x1
- [0x0000000c] foo = (foo * 0x4)
- [0x0000000c] foo = (foo + 0x8)
-.Ed
-.Pp
-See Expressions for more information about expressions in linker scripts.
-.El
-.Pp
-.It -n
-.It --nmagic
-Turn off page alignment of sections, and mark the output as
-.Li NMAGIC
-if possible.
-.Pp
-.It -N
-.It --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
-.Li OMAGIC .
-Note: Although a writable text section is allowed for PE-COFF targets, it
-does not conform to the format specification published by Microsoft.
-.Pp
-.It --no-omagic
-This option negates most of the effects of the
-.Op -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
-.Op -Bdynamic
-for this.
-.Pp
-.It -o Va output
-.It --output= Va output
-Use
-.Va output
-as the name for the program produced by
-.Xr ld ;
-if this option is not specified, the name
-.Pa a.out
-is used by default. The script command
-.Li OUTPUT
-can also specify the output file name.
-.Pp
-.It -O Va level
-If
-.Va level
-is a numeric values greater than zero
-.Xr ld
-optimizes the output. This might take significantly longer and therefore probably
-should only be enabled for the final binary.
-.Pp
-.It -q
-.It --emit-relocs
-Leave relocation sections and contents in fully linked executables. Post link
-analysis and optimization tools may need this information in order to perform
-correct modifications of executables. This results in larger executables.
-.Pp
-This option is currently only supported on ELF platforms.
-.Pp
-.It --force-dynamic
-Force the output file to have dynamic sections. This option is specific to
-VxWorks targets.
-.Pp
-.It -r
-.It --relocatable
-Generate relocatable output---i.e., generate an output file that can in turn
-serve as input to
-.Xr ld .
-This is often called
-.Em 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
-.Li OMAGIC .
-If this option is not specified, an absolute file is produced. When linking
-C++ programs, this option
-.Em will not
-resolve references to constructors; to do that, use
-.Li -Ur .
-.Pp
-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
-.Li a.out
--based formats do not support partial linking with input files in other formats
-at all.
-.Pp
-This option does the same thing as
-.Li -i .
-.Pp
-.It -R Va filename
-.It --just-symbols= Va filename
-Read symbol names and their addresses from
-.Va 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.
-.Pp
-For compatibility with other ELF linkers, if the
-.Op -R
-option is followed by a directory name, rather than a file name, it is treated
-as the
-.Op -rpath
-option.
-.Pp
-.It -s
-.It --strip-all
-Omit all symbol information from the output file.
-.Pp
-.It -S
-.It --strip-debug
-Omit debugger symbol information (but not all symbols) from the output file.
-.Pp
-.It -t
-.It --trace
-Print the names of the input files as
-.Xr ld
-processes them.
-.Pp
-.It -T Va scriptfile
-.It --script= Va scriptfile
-Use
-.Va scriptfile
-as the linker script. This script replaces
-.Xr ld
-\&'s default linker script (rather than adding to it), so
-.Va commandfile
-must specify everything necessary to describe the output file.See Section
-.Dq Scripts .
-If
-.Va scriptfile
-does not exist in the current directory,
-.Li ld
-looks for it in the directories specified by any preceding
-.Li -L
-options. Multiple
-.Li -T
-options accumulate.
-.Pp
-.It -dT Va scriptfile
-.It --default-script= Va scriptfile
-Use
-.Va scriptfile
-as the default linker script.See Section
-.Dq Scripts .
-.Pp
-This option is similar to the
-.Op --script
-option except that processing of the script is delayed until after the rest
-of the command line has been processed. This allows options placed after the
-.Op --default-script
-option on the command line to affect the behaviour of the linker script, which
-can be important when the linker command line cannot be directly controlled
-by the user. (eg because the command line is being constructed by another
-tool, such as
-.Li gcc ) .
-.Pp
-.It -u Va symbol
-.It --undefined= Va symbol
-Force
-.Va 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.
-.Li -u
-may be repeated with different option arguments to enter additional undefined
-symbols. This option is equivalent to the
-.Li EXTERN
-linker script command.
-.Pp
-.It -Ur
-For anything other than C++ programs, this option is equivalent to
-.Li -r :
-it generates relocatable output---i.e., an output file that can in turn serve
-as input to
-.Xr ld .
-When linking C++ programs,
-.Li -Ur
-.Em does
-resolve references to constructors, unlike
-.Li -r .
-It does not work to use
-.Li -Ur
-on files that were themselves linked with
-.Li -Ur ;
-once the constructor table has been built, it cannot be added to. Use
-.Li -Ur
-only for the last partial link, and
-.Li -r
-for the others.
-.Pp
-.It --unique[= Va SECTION]
-Creates a separate output section for every input section matching
-.Va SECTION ,
-or if the optional wildcard
-.Va 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.
-.Pp
-.It -v
-.It --version
-.It -V
-Display the version number for
-.Xr ld .
-The
-.Op -V
-option also lists the supported emulations.
-.Pp
-.It -x
-.It --discard-all
-Delete all local symbols.
-.Pp
-.It -X
-.It --discard-locals
-Delete all temporary local symbols. (These symbols start with system-specific
-local label prefixes, typically
-.Li .L
-for ELF systems or
-.Li L
-for traditional a.out systems.)
-.Pp
-.It -y Va symbol
-.It --trace-symbol= Va symbol
-Print the name of each linked file in which
-.Va symbol
-appears. This option may be given any number of times. On many systems it
-is necessary to prepend an underscore.
-.Pp
-This option is useful when you have an undefined symbol in your link but don't
-know where the reference is coming from.
-.Pp
-.It -Y Va path
-Add
-.Va path
-to the default library search path. This option exists for Solaris compatibility.
-.Pp
-.It -z Va keyword
-The recognized keywords are:
-.Bl -tag -width Ds
-.It combreloc
-Combines multiple reloc sections and sorts them to make dynamic symbol lookup
-caching possible.
-.Pp
-.It defs
-Disallows undefined symbols in object files. Undefined symbols in shared libraries
-are still allowed.
-.Pp
-.It execstack
-Marks the object as requiring executable stack.
-.Pp
-.It 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.
-.Pp
-.It interpose
-Marks the object that its symbol table interposes before all symbols but the
-primary executable.
-.Pp
-.It lazy
-When generating an executable or shared library, mark it to tell the dynamic
-linker to defer function call resolution to the point when the function is
-called (lazy binding), rather than at load time. Lazy binding is the default.
-.Pp
-.It loadfltr
-Marks the object that its filters be processed immediately at runtime.
-.Pp
-.It muldefs
-Allows multiple definitions.
-.Pp
-.It nocombreloc
-Disables multiple reloc sections combining.
-.Pp
-.It nocopyreloc
-Disables production of copy relocs.
-.Pp
-.It nodefaultlib
-Marks the object that the search for dependencies of this object will ignore
-any default library search paths.
-.Pp
-.It nodelete
-Marks the object shouldn't be unloaded at runtime.
-.Pp
-.It nodlopen
-Marks the object not available to
-.Li dlopen .
-.Pp
-.It nodump
-Marks the object can not be dumped by
-.Li dldump .
-.Pp
-.It noexecstack
-Marks the object as not requiring executable stack.
-.Pp
-.It norelro
-Don't create an ELF
-.Li PT_GNU_RELRO
-segment header in the object.
-.Pp
-.It 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.
-.Pp
-.It origin
-Marks the object may contain $ORIGIN.
-.Pp
-.It relro
-Create an ELF
-.Li PT_GNU_RELRO
-segment header in the object.
-.Pp
-.It max-page-size= Va value
-Set the emulation maximum page size to
-.Va value .
-.Pp
-.It common-page-size= Va value
-Set the emulation common page size to
-.Va value .
-.Pp
-.El
-Other keywords are ignored for Solaris compatibility.
-.Pp
-.It -( Va archives -)
-.It --start-group Va archives --end-group
-The
-.Va archives
-should be a list of archive files. They may be either explicit file names,
-or
-.Li -l
-options.
-.Pp
-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.
-.Pp
-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.
-.Pp
-.It --accept-unknown-input-arch
-.It --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
-.Li --accept-unknown-input-arch
-option has been added to restore the old behaviour.
-.Pp
-.It --as-needed
-.It --no-as-needed
-This option affects ELF DT_NEEDED tags for dynamic libraries mentioned on
-the command line after the
-.Op --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.
-.Op --as-needed
-causes DT_NEEDED tags to only be emitted for libraries that satisfy some symbol
-reference from regular objects which is undefined at the point that the library
-was linked.
-.Op --no-as-needed
-restores the default behaviour.
-.Pp
-.It --add-needed
-.It --no-add-needed
-This option affects the treatment of dynamic libraries from ELF DT_NEEDED
-tags in dynamic libraries mentioned on the command line after the
-.Op --no-add-needed
-option. Normally, the linker will add a DT_NEEDED tag for each dynamic library
-from DT_NEEDED tags.
-.Op --no-add-needed
-causes DT_NEEDED tags will never be emitted for those libraries from DT_NEEDED
-tags.
-.Op --add-needed
-restores the default behaviour.
-.Pp
-.It -assert Va keyword
-This option is ignored for SunOS compatibility.
-.Pp
-.It -Bdynamic
-.It -dy
-.It -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
-.Op -l
-options which follow it.
-.Pp
-.It -Bgroup
-Set the
-.Li DF_1_GROUP
-flag in the
-.Li 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.
-.Op --unresolved-symbols=report-all
-is implied. This option is only meaningful on ELF platforms which support
-shared libraries.
-.Pp
-.It -Bstatic
-.It -dn
-.It -non_shared
-.It -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
-.Op -l
-options which follow it. This option also implies
-.Op --unresolved-symbols=report-all .
-This option can be used with
-.Op -shared .
-Doing so means that a shared library is being created but that all of the
-library's external references must be resolved by pulling in entries from
-static libraries.
-.Pp
-.It -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.
-.Pp
-.It -Bsymbolic-functions
-When creating a shared library, bind references to global function symbols
-to the definition within the shared library, if any. This option is only meaningful
-on ELF platforms which support shared libraries.
-.Pp
-.It --dynamic-list= Va dynamic-list-file
-Specify the name of a dynamic list file to the linker. This is typically used
-when creating shared libraries to specify a list of global symbols whose references
-shouldn't be bound to the definition within the shared library, or creating
-dynamically linked executables to specify a list of symbols which should be
-added to the symbol table in the executable. This option is only meaningful
-on ELF platforms which support shared libraries.
-.Pp
-The format of the dynamic list is the same as the version node without scope
-and node name. See VERSION for more information.
-.Pp
-.It --dynamic-list-data
-Include all global data symbols to the dynamic list.
-.Pp
-.It --dynamic-list-cpp-new
-Provide the builtin dynamic list for C++ operator new and delete. It is mainly
-useful for building shared libstdc++.
-.Pp
-.It --dynamic-list-cpp-typeinfo
-Provide the builtin dynamic list for C++ runtime type identification.
-.Pp
-.It --check-sections
-.It --no-check-sections
-Asks the linker
-.Em not
-to check section addresses after they have been assigned to see if there are
-any overlaps. Normally the linker will perform this check, and if it finds
-any overlaps it will produce suitable error messages. The linker does know
-about, and does make allowances for sections in overlays. The default behaviour
-can be restored by using the command line switch
-.Op --check-sections .
-.Pp
-.It --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.
-.Pp
-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.
-.Pp
-.It --no-define-common
-This option inhibits the assignment of addresses to common symbols. The script
-command
-.Li INHIBIT_COMMON_ALLOCATION
-has the same effect.See Section
-.Dq Miscellaneous Commands .
-.Pp
-The
-.Li --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
-.Li --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.
-.Pp
-.It --defsym Va symbol= Va expression
-Create a global symbol in the output file, containing the absolute address
-given by
-.Va 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
-.Va expression
-in this context: you may give a hexadecimal constant or the name of an existing
-symbol, or use
-.Li +
-and
-.Li -
-to add or subtract hexadecimal constants or symbols. If you need more elaborate
-expressions, consider using the linker command language from a script (see Section
-.Dq Assignments ) .
-.Em Note:
-there should be no white space between
-.Va symbol ,
-the equals sign (\(lq=\(rq), and
-.Va expression .
-.Pp
-.It --demangle[= Va style]
-.It --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
-.Li COLLECT_NO_DEMANGLE
-is set. These options may be used to override the default.
-.Pp
-.It --dynamic-linker Va 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.
-.Pp
-.It --fatal-warnings
-Treat all warnings as errors.
-.Pp
-.It --force-exe-suffix
-Make sure that an output file has a .exe suffix.
-.Pp
-If a successfully built fully linked output file does not have a
-.Li .exe
-or
-.Li .dll
-suffix, this option forces the linker to copy the output file to one of the
-same name with a
-.Li .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
-.Li .exe
-suffix.
-.Pp
-.It --gc-sections
-.It --no-gc-sections
-Enable garbage collection of unused input sections. It is ignored on targets
-that do not support this option. This option is not compatible with
-.Li -r
-or
-.Li --emit-relocs .
-The default behaviour (of not performing this garbage collection) can be restored
-by specifying
-.Li --no-gc-sections
-on the command line.
-.Pp
-.It --print-gc-sections
-.It --no-print-gc-sections
-List all sections removed by garbage collection. The listing is printed on
-stderr. This option is only effective if garbage collection has been enabled
-via the
-.Li --gc-sections )
-option. The default behaviour (of not listing the sections that are removed)
-can be restored by specifying
-.Li --no-print-gc-sections
-on the command line.
-.Pp
-.It --help
-Print a summary of the command-line options on the standard output and exit.
-.Pp
-.It --target-help
-Print a summary of all target specific options on the standard output and
-exit.
-.Pp
-.It -Map Va mapfile
-Print a link map to the file
-.Va mapfile .
-See the description of the
-.Op -M
-option, above.
-.Pp
-.It --no-keep-memory
-.Xr ld
-normally optimizes for speed over memory usage by caching the symbol tables
-of input files in memory. This option tells
-.Xr ld
-to instead optimize for memory usage, by rereading the symbol tables as necessary.
-This may be required if
-.Xr ld
-runs out of memory space while linking a large executable.
-.Pp
-.It --no-undefined
-.It -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
-.Op --[no-]allow-shlib-undefined
-controls the behaviour for reporting unresolved references found in shared
-libraries being linked in.
-.Pp
-.It --allow-multiple-definition
-.It -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.
-.Pp
-.It --allow-shlib-undefined
-.It --no-allow-shlib-undefined
-Allows (the default) or disallows undefined symbols in shared libraries. This
-switch is similar to
-.Op --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.
-.Pp
-The reason that
-.Op --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.
-.Pp
-.It --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.
-.Pp
-.It --default-symver
-Create and use a default symbol version (the soname) for unversioned exported
-symbols.
-.Pp
-.It --default-imported-symver
-Create and use a default symbol version (the soname) for unversioned imported
-symbols.
-.Pp
-.It --no-warn-mismatch
-Normally
-.Xr 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
-.Xr 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.
-.Pp
-.It --no-warn-search-mismatch
-Normally
-.Xr ld
-will give a warning if it finds an incompatible library during a library search.
-This option silences the warning.
-.Pp
-.It --no-whole-archive
-Turn off the effect of the
-.Op --whole-archive
-option for subsequent archive files.
-.Pp
-.It --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.
-.Pp
-.It -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.
-.Pp
-.It --oformat Va output-format
-.Xr ld
-may be configured to support more than one kind of object file. If your
-.Xr ld
-is configured this way, you can use the
-.Li --oformat
-option to specify the binary format for the output object file. Even when
-.Xr ld
-is configured to support alternative object formats, you don't usually need
-to specify this, as
-.Xr ld
-should be configured to produce as a default output format the most usual
-format on each machine.
-.Va 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
-.Li objdump -i . )
-The script command
-.Li OUTPUT_FORMAT
-can also specify the output format, but this option overrides it.See Section
-.Dq BFD .
-.Pp
-.It -pie
-.It --pic-executable
-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.
-.Pp
-.It -qmagic
-This option is ignored for Linux compatibility.
-.Pp
-.It -Qy
-This option is ignored for SVR4 compatibility.
-.Pp
-.It --relax
-An option with machine dependent effects. This option is only supported on
-a few targets.See Section
-.Dq H8/300 .
-See Section.Dq i960 .
-See Section.Dq Xtensa .
-See Section.Dq M68HC11/68HC12 .
-See Section.Dq PowerPC ELF32 .
-.Pp
-On some platforms, the
-.Li --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.
-.Pp
-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 MN10200 and MN10300 family of processors.
-.Pp
-On platforms where this is not supported,
-.Li --relax
-is accepted, but ignored.
-.Pp
-.It --retain-symbols-file Va filename
-Retain
-.Em only
-the symbols listed in the file
-.Va filename ,
-discarding all others.
-.Va filename
-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.
-.Pp
-.Li --retain-symbols-file
-does
-.Em not
-discard undefined symbols, or symbols needed for relocations.
-.Pp
-You may only specify
-.Li --retain-symbols-file
-once in the command line. It overrides
-.Li -s
-and
-.Li -S .
-.Pp
-.It -rpath Va dir
-Add a directory to the runtime library search path. This is used when linking
-an ELF executable with shared objects. All
-.Op -rpath
-arguments are concatenated and passed to the runtime linker, which uses them
-to locate shared objects at runtime. The
-.Op -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
-.Op -rpath-link
-option. If
-.Op -rpath
-is not used when linking an ELF executable, the contents of the environment
-variable
-.Li LD_RUN_PATH
-will be used if it is defined.
-.Pp
-The
-.Op -rpath
-option may also be used on SunOS. By default, on SunOS, the linker will form
-a runtime search patch out of all the
-.Op -L
-options it is given. If a
-.Op -rpath
-option is used, the runtime search path will be formed exclusively using the
-.Op -rpath
-options, ignoring the
-.Op -L
-options. This can be useful when using gcc, which adds many
-.Op -L
-options which may be on NFS mounted file systems.
-.Pp
-For compatibility with other ELF linkers, if the
-.Op -R
-option is followed by a directory name, rather than a file name, it is treated
-as the
-.Op -rpath
-option.
-.Pp
-.It -rpath-link Va DIR
-When using ELF or SunOS, one shared library may require another. This happens
-when an
-.Li ld -shared
-link includes a shared library as one of the input files.
-.Pp
-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
-.Op -rpath-link
-option specifies the first set of directories to search. The
-.Op -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.
-.Pp
-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.
-.Pp
-The linker uses the following search paths to locate required shared libraries:
-.Bl -enum
-.It
-Any directories specified by
-.Op -rpath-link
-options.
-.It
-Any directories specified by
-.Op -rpath
-options. The difference between
-.Op -rpath
-and
-.Op -rpath-link
-is that directories specified by
-.Op -rpath
-options are included in the executable and used at runtime, whereas the
-.Op -rpath-link
-option is only effective at link time. Searching
-.Op -rpath
-in this way is only supported by native linkers and cross linkers which have
-been configured with the
-.Op --with-sysroot
-option.
-.It
-On an ELF system, if the
-.Op -rpath
-and
-.Li rpath-link
-options were not used, search the contents of the environment variable
-.Li LD_RUN_PATH .
-It is for the native linker only.
-.It
-On SunOS, if the
-.Op -rpath
-option was not used, search any directories specified using
-.Op -L
-options.
-.It
-For a native linker, the contents of the environment variable
-.Li LD_LIBRARY_PATH .
-.It
-For a native ELF linker, the directories in
-.Li DT_RUNPATH
-or
-.Li DT_RPATH
-of a shared library are searched for shared libraries needed by it. The
-.Li DT_RPATH
-entries are ignored if
-.Li DT_RUNPATH
-entries exist.
-.It
-The default directories, normally
-.Pa /lib
-and
-.Pa /usr/lib .
-.It
-For a native linker on an ELF system, if the file
-.Pa /etc/ld.so.conf
-exists, the list of directories found in that file.
-.El
-.Pp
-If the required shared library is not found, the linker will issue a warning
-and continue with the link.
-.Pp
-.It -shared
-.It -Bshareable
-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
-.Op -e
-option is not used and there are undefined symbols in the link.
-.Pp
-.It --sort-common
-This option tells
-.Xr 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.
-.Pp
-.It --sort-section name
-This option will apply
-.Li SORT_BY_NAME
-to all wildcard section patterns in the linker script.
-.Pp
-.It --sort-section alignment
-This option will apply
-.Li SORT_BY_ALIGNMENT
-to all wildcard section patterns in the linker script.
-.Pp
-.It --split-by-file [ Va size]
-Similar to
-.Op --split-by-reloc
-but creates a new output section for each input file when
-.Va size
-is reached.
-.Va size
-defaults to a size of 1 if not given.
-.Pp
-.It --split-by-reloc [ Va count]
-Tries to creates extra sections in the output file so that no single output
-section in the file contains more than
-.Va 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
-.Va count
-relocations one output section will contain that many relocations.
-.Va count
-defaults to a value of 32768.
-.Pp
-.It --stats
-Compute and display statistics about the operation of the linker, such as
-execution time and memory usage.
-.Pp
-.It --sysroot= Va directory
-Use
-.Va directory
-as the location of the sysroot, overriding the configure-time default. This
-option is only supported by linkers that were configured using
-.Op --with-sysroot .
-.Pp
-.It --traditional-format
-For some targets, the output of
-.Xr ld
-is different in some ways from the output of some existing linker. This switch
-requests
-.Xr ld
-to use the traditional format instead.
-.Pp
-For example, on SunOS,
-.Xr 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
-.Li dbx
-program can not read the resulting program (
-.Li gdb
-has no trouble). The
-.Li --traditional-format
-switch tells
-.Xr ld
-to not combine duplicate entries.
-.Pp
-.It --section-start Va sectionname= Va org
-Locate a section in the output file at the absolute address given by
-.Va org .
-You may use this option as many times as necessary to locate multiple sections
-in the command line.
-.Va org
-must be a single hexadecimal integer; for compatibility with other linkers,
-you may omit the leading
-.Li 0x
-usually associated with hexadecimal values.
-.Em Note:
-there should be no white space between
-.Va sectionname ,
-the equals sign (\(lq=\(rq), and
-.Va org .
-.Pp
-.It -Tbss Va org
-.It -Tdata Va org
-.It -Ttext Va org
-Same as --section-start, with
-.Li .bss ,
-.Li .data
-or
-.Li .text
-as the
-.Va sectionname .
-.Pp
-.It --unresolved-symbols= Va method
-Determine how to handle unresolved symbols. There are four possible values
-for
-.Li method :
-.Pp
-.Bl -tag -width Ds
-.It ignore-all
-Do not report any unresolved symbols.
-.Pp
-.It report-all
-Report all unresolved symbols. This is the default.
-.Pp
-.It ignore-in-object-files
-Report unresolved symbols that are contained in shared libraries, but ignore
-them if they come from regular object files.
-.Pp
-.It 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.
-.El
-.Pp
-The behaviour for shared libraries on their own can also be controlled by
-the
-.Op --[no-]allow-shlib-undefined
-option.
-.Pp
-Normally the linker will generate an error message for each reported unresolved
-symbol but the option
-.Op --warn-unresolved-symbols
-can change this to a warning.
-.Pp
-.It --dll-verbose
-.It --verbose
-Display the version number for
-.Xr 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.
-.Pp
-.It --version-script= Va 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.See Section
-.Dq VERSION .
-.Pp
-.It --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.
-.Pp
-There are three kinds of global symbols, illustrated here by C examples:
-.Pp
-.Bl -tag -width Ds
-.It int i = 1;
-A definition, which goes in the initialized data section of the output file.
-.Pp
-.It 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.
-.Pp
-.It 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.
-.El
-.Pp
-The
-.Li --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.
-.Pp
-.Bl -enum
-.It
-Turning a common symbol into a reference, because there is already a definition
-for the symbol.
-.Bd -literal -offset indent
-file(section): warning: common of `symbol'
- overridden by definition
-file(section): warning: defined here
-.Ed
-.Pp
-.It
-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.
-.Bd -literal -offset indent
-file(section): warning: definition of `symbol'
- overriding common
-file(section): warning: common is here
-.Ed
-.Pp
-.It
-Merging a common symbol with a previous same-sized common symbol.
-.Bd -literal -offset indent
-file(section): warning: multiple common
- of `symbol'
-file(section): warning: previous common is here
-.Ed
-.Pp
-.It
-Merging a common symbol with a previous larger common symbol.
-.Bd -literal -offset indent
-file(section): warning: common of `symbol'
- overridden by larger common
-file(section): warning: larger common is here
-.Ed
-.Pp
-.It
-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.
-.Bd -literal -offset indent
-file(section): warning: common of `symbol'
- overriding smaller common
-file(section): warning: smaller common is here
-.Ed
-.El
-.Pp
-.It --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.
-.Pp
-.It --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.
-.Pp
-.It --warn-once
-Only warn once for each undefined symbol, rather than once per module which
-refers to it.
-.Pp
-.It --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
-.Li SECTIONS
-command does not specify a start address for the section (see Section
-.Dq SECTIONS ) .
-.Pp
-.It --warn-shared-textrel
-Warn if the linker adds a DT_TEXTREL to a shared object.
-.Pp
-.It --warn-unresolved-symbols
-If the linker is going to report an unresolved symbol (see the option
-.Op --unresolved-symbols )
-it will normally generate an error. This option makes it generate a warning
-instead.
-.Pp
-.It --error-unresolved-symbols
-This restores the linker's default behaviour of generating errors when it
-is reporting unresolved symbols.
-.Pp
-.It --whole-archive
-For each archive mentioned on the command line after the
-.Op --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.
-.Pp
-Two notes when using this option from gcc: First, gcc doesn't know about this
-option, so you have to use
-.Op -Wl,-whole-archive .
-Second, don't forget to use
-.Op -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.
-.Pp
-.It --wrap Va symbol
-Use a wrapper function for
-.Va symbol .
-Any undefined reference to
-.Va symbol
-will be resolved to
-.Li __wrap_ Va symbol .
-Any undefined reference to
-.Li __real_ Va symbol
-will be resolved to
-.Va symbol .
-.Pp
-This can be used to provide a wrapper for a system function. The wrapper function
-should be called
-.Li __wrap_ Va symbol .
-If it wishes to call the system function, it should call
-.Li __real_ Va symbol .
-.Pp
-Here is a trivial example:
-.Pp
-.Bd -literal -offset indent
-void *
-__wrap_malloc (size_t c)
-{
- printf ("malloc called with %zu\en", c);
- return __real_malloc (c);
-}
-.Ed
-.Pp
-If you link other code with this file using
-.Op --wrap malloc ,
-then all calls to
-.Li malloc
-will call the function
-.Li __wrap_malloc
-instead. The call to
-.Li __real_malloc
-in
-.Li __wrap_malloc
-will call the real
-.Li malloc
-function.
-.Pp
-You may wish to provide a
-.Li __real_malloc
-function as well, so that links without the
-.Op --wrap
-option will succeed. If you do this, you should not put the definition of
-.Li __real_malloc
-in the same file as
-.Li __wrap_malloc ;
-if you do, the assembler may resolve the call before the linker has a chance
-to wrap it to
-.Li malloc .
-.Pp
-.It --eh-frame-hdr
-Request creation of
-.Li .eh_frame_hdr
-section and ELF
-.Li PT_GNU_EH_FRAME
-segment header.
-.Pp
-.It --enable-new-dtags
-.It --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
-.Op --enable-new-dtags ,
-the dynamic tags will be created as needed. If you specify
-.Op --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.
-.Pp
-.It --hash-size= Va number
-Set the default size of the linker's hash tables to a prime number close to
-.Va number .
-Increasing this value can reduce the length of time it takes the linker to
-perform its tasks, at the expense of increasing the linker's memory requirements.
-Similarly reducing this value can reduce the memory requirements at the expense
-of speed.
-.Pp
-.It --hash-style= Va style
-Set the type of linker's hash table(s).
-.Va style
-can be either
-.Li sysv
-for classic ELF
-.Li .hash
-section,
-.Li GNU
-for new style GNU
-.Li .GNU.hash
-section or
-.Li both
-for both the classic ELF
-.Li .hash
-and new style GNU
-.Li .GNU.hash
-hash tables. The default is
-.Li sysv .
-.Pp
-.It --reduce-memory-overheads
-This option reduces memory requirements at ld runtime, at the expense of linking
-speed. This was introduced to select the old O(n^2) algorithm for link map
-file generation, rather than the new O(n) algorithm which uses about 40% more
-memory for symbol storage.
-.Pp
-Another effect of the switch is to set the default hash table size to 1021,
-which again saves memory at the cost of lengthening the linker's run time.
-This is not done however if the
-.Op --hash-size
-switch has been used.
-.Pp
-The
-.Op --reduce-memory-overheads
-switch may be also be used to enable other tradeoffs in future versions of
-the linker.
-.Pp
-.El
-.Em Options Specific to i386 PE Targets
-.Pp
-The i386 PE linker supports the
-.Op -shared
-option, which causes the output to be a dynamically linked library (DLL) instead
-of a normal executable. You should name the output
-.Li *.dll
-when you use this option. In addition, the linker fully supports the standard
-.Li *.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).
-.Pp
-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.
-.Pp
-.Bl -tag -width Ds
-.It --add-stdcall-alias
-If given, symbols with a stdcall suffix (@
-.Va 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]
-.Pp
-.It --base-file Va file
-Use
-.Va file
-as the name of a file in which to save the base addresses of all the relocations
-needed for generating DLLs with
-.Pa dlltool .
-[This is an i386 PE specific option]
-.Pp
-.It --dll
-Create a DLL instead of a regular executable. You may also use
-.Op -shared
-or specify a
-.Li LIBRARY
-in a given
-.Li .def
-file. [This option is specific to the i386 PE targeted port of the linker]
-.Pp
-.It --enable-stdcall-fixup
-.It --disable-stdcall-fixup
-If the link finds a symbol that it cannot resolve, it will attempt to do \(lqfuzzy
-linking\(rq 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
-.Li _foo
-might be linked to the function
-.Li _foo@12 ,
-or the undefined symbol
-.Li _bar@16
-might be linked to the function
-.Li _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
-.Op --enable-stdcall-fixup ,
-this feature is fully enabled and warnings are not printed. If you specify
-.Op --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]
-.Pp
-.It --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
-.Li DllMain@12 ,
-.Li DllEntryPoint@0 ,
-.Li DllMainCRTStartup@12 ,
-and
-.Li 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
-.Li _head_
-or ending with
-.Li _iname .
-In addition, no symbols from
-.Li libgcc ,
-.Li libstd++ ,
-.Li libmingw32 ,
-or
-.Li crtX.o
-will be exported. Symbols whose names begin with
-.Li __rtti_
-or
-.Li __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:
-.Li _cygwin_dll_entry@12 ,
-.Li _cygwin_crt0_common@8 ,
-.Li _cygwin_noncygwin_dll_entry@12 ,
-.Li _fmode ,
-.Li _impure_ptr ,
-.Li cygwin_attach_dll ,
-.Li cygwin_premain0 ,
-.Li cygwin_premain1 ,
-.Li cygwin_premain2 ,
-.Li cygwin_premain3 ,
-and
-.Li environ .
-[This option is specific to the i386 PE targeted port of the linker]
-.Pp
-.It --exclude-symbols Va symbol, Va 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]
-.Pp
-.It --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]
-.Pp
-.It --heap Va reserve
-.It --heap Va reserve, Va 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]
-.Pp
-.It --image-base Va value
-Use
-.Va 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]
-.Pp
-.It --kill-at
-If given, the stdcall suffixes (@
-.Va nn )
-will be stripped from symbols before they are exported. [This option is specific
-to the i386 PE targeted port of the linker]
-.Pp
-.It --large-address-aware
-If given, the appropriate bit in the \(lqCharacteristics\(rq field of the COFF header
-is set to indicate that this executable supports virtual addresses greater
-than 2 gigabytes. This should be used in conjunction with the /3GB or /USERVA=
-.Va value
-megabytes switch in the \(lq[operating systems]\(rq section of the BOOT.INI. Otherwise,
-this bit has no effect. [This option is specific to PE targeted ports of the
-linker]
-.Pp
-.It --major-image-version Va value
-Sets the major number of the \(lqimage version\(rq. Defaults to 1. [This option is
-specific to the i386 PE targeted port of the linker]
-.Pp
-.It --major-os-version Va value
-Sets the major number of the \(lqos version\(rq. Defaults to 4. [This option is specific
-to the i386 PE targeted port of the linker]
-.Pp
-.It --major-subsystem-version Va value
-Sets the major number of the \(lqsubsystem version\(rq. Defaults to 4. [This option
-is specific to the i386 PE targeted port of the linker]
-.Pp
-.It --minor-image-version Va value
-Sets the minor number of the \(lqimage version\(rq. Defaults to 0. [This option is
-specific to the i386 PE targeted port of the linker]
-.Pp
-.It --minor-os-version Va value
-Sets the minor number of the \(lqos version\(rq. Defaults to 0. [This option is specific
-to the i386 PE targeted port of the linker]
-.Pp
-.It --minor-subsystem-version Va value
-Sets the minor number of the \(lqsubsystem version\(rq. Defaults to 0. [This option
-is specific to the i386 PE targeted port of the linker]
-.Pp
-.It --output-def Va file
-The linker will create the file
-.Va file
-which will contain a DEF file corresponding to the DLL the linker is generating.
-This DEF file (which should be called
-.Li *.def )
-may be used to create an import library with
-.Li 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]
-.Pp
-.It --out-implib Va file
-The linker will create the file
-.Va file
-which will contain an import lib corresponding to the DLL the linker is generating.
-This import lib (which should be called
-.Li *.dll.a
-or
-.Li *.a
-may be used to link clients against the generated DLL; this behaviour makes
-it possible to skip a separate
-.Li dlltool
-import library creation step. [This option is specific to the i386 PE targeted
-port of the linker]
-.Pp
-.It --enable-auto-image-base
-Automatically choose the image base for DLLs, unless one is specified using
-the
-.Li --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]
-.Pp
-.It --disable-auto-image-base
-Do not automatically generate a unique image base. If there is no user-specified
-image base (
-.Li --image-base )
-then use the platform default. [This option is specific to the i386 PE targeted
-port of the linker]
-.Pp
-.It --dll-search-prefix Va string
-When linking dynamically to a dll without an import library, search for
-.Li <string><basename>.dll
-in preference to
-.Li 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
-.Li --dll-search-prefix=cyg .
-[This option is specific to the i386 PE targeted port of the linker]
-.Pp
-.It --enable-auto-import
-Do sophisticated linking of
-.Li _symbol
-to
-.Li __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.
-.Pp
-Using 'auto-import' generally will 'just work' -- but sometimes you may see
-this message:
-.Pp
-"variable '<var>' can't be auto-imported. Please read the documentation for
-ld's
-.Li --enable-auto-import
-for details."
-.Pp
-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.
-.Pp
-There are several ways to address this difficulty, regardless of the data
-type of the exported variable:
-.Pp
-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.
-.Pp
-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:
-.Pp
-.Bd -literal -offset indent
-extern type extern_array[];
-extern_array[1] -->
- { volatile type *t=extern_array; t[1] }
-.Ed
-.Pp
-or
-.Pp
-.Bd -literal -offset indent
-extern type extern_array[];
-extern_array[1] -->
- { volatile int t=1; extern_array[t] }
-.Ed
-.Pp
-For structs (and most other multiword data types) the only option is to make
-the struct itself (or the long long, or the ...) variable:
-.Pp
-.Bd -literal -offset indent
-extern struct s extern_struct;
-extern_struct.field -->
- { volatile struct s *t=&extern_struct; t->field }
-.Ed
-.Pp
-or
-.Pp
-.Bd -literal -offset indent
-extern long long extern_ll;
-extern_ll -->
- { volatile long long * local_ll=&extern_ll; *local_ll }
-.Ed
-.Pp
-A third method of dealing with this difficulty is to abandon 'auto-import'
-for the offending symbol and mark it with
-.Li __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:
-.Pp
-Original:
-.Bd -literal -offset indent
---foo.h
-extern int arr[];
---foo.c
-#include "foo.h"
-void main(int argc, char **argv){
- printf("%d\en",arr[1]);
-}
-.Ed
-.Pp
-Solution 1:
-.Bd -literal -offset indent
---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]);
-}
-.Ed
-.Pp
-Solution 2:
-.Bd -literal -offset indent
---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]);
-}
-.Ed
-.Pp
-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]
-.Pp
-.It --disable-auto-import
-Do not attempt to do sophisticated linking of
-.Li _symbol
-to
-.Li __imp__symbol
-for DATA imports from DLLs. [This option is specific to the i386 PE targeted
-port of the linker]
-.Pp
-.It --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]
-.Pp
-.It --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]
-.Pp
-.It --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]
-.Pp
-.It --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]
-.Pp
-.It --stack Va reserve
-.It --stack Va reserve, Va 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]
-.Pp
-.It --subsystem Va which
-.It --subsystem Va which: Va major
-.It --subsystem Va which: Va major. Va minor
-Specifies the subsystem under which your program will execute. The legal values
-for
-.Va which
-are
-.Li native ,
-.Li windows ,
-.Li console ,
-.Li posix ,
-and
-.Li xbox .
-You may optionally set the subsystem version also. Numeric values are also
-accepted for
-.Va which .
-[This option is specific to the i386 PE targeted port of the linker]
-.Pp
-.El
-.Em Options specific to Motorola 68HC11 and 68HC12 targets
-.Pp
-The 68HC11 and 68HC12 linkers support specific options to control the memory
-bank switching mapping and trampoline code generation.
-.Pp
-.Bl -tag -width Ds
-.It --no-trampoline
-This option disables the generation of trampoline. By default a trampoline
-is generated for each far function which is called using a
-.Li jsr
-instruction (this happens when a pointer to a far function is taken).
-.Pp
-.It --bank-window Va name
-This option indicates to the linker the name of the memory region in the
-.Li MEMORY
-specification that describes the memory bank window. The definition of such
-region is then used by the linker to compute paging and addresses within the
-memory window.
-.Pp
-.El
-.Ss Environment Variables
-You can change the behaviour of
-.Xr ld
-with the environment variables
-.Li GNUTARGET ,
-.Li LDEMULATION
-and
-.Li COLLECT_NO_DEMANGLE .
-.Pp
-.Li GNUTARGET
-determines the input-file object format if you don't use
-.Li -b
-(or its synonym
-.Li --format ) .
-Its value should be one of the BFD names for an input format (see Section
-.Dq BFD ) .
-If there is no
-.Li GNUTARGET
-in the environment,
-.Xr ld
-uses the natural format of the target. If
-.Li GNUTARGET
-is set to
-.Li 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.
-.Pp
-.Li LDEMULATION
-determines the default emulation if you don't use the
-.Li -m
-option. The emulation can affect various aspects of linker behaviour, particularly
-the default linker script. You can list the available emulations with the
-.Li --verbose
-or
-.Li -V
-options. If the
-.Li -m
-option is not used, and the
-.Li LDEMULATION
-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
-.Li 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
-.Li gcc
-linker wrapper program. The default may be overridden by the
-.Li --demangle
-and
-.Li --no-demangle
-options.
-.Pp
-.Sh Linker Scripts
-Every link is controlled by a
-.Em linker script .
-This script is written in the linker command language.
-.Pp
-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.
-.Pp
-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
-.Li --verbose
-command line option to display the default linker script. Certain command
-line options, such as
-.Li -r
-or
-.Li -N ,
-will affect the default linker script.
-.Pp
-You may supply your own linker script by using the
-.Li -T
-command line option. When you do this, your linker script will replace the
-default linker script.
-.Pp
-You may also use linker scripts implicitly by naming them as input files to
-the linker, as though they were files to be linked.See Section
-.Dq Implicit Linker Scripts .
-.Pp
-.Ss Basic Linker Script Concepts
-We need to define some basic concepts and vocabulary in order to describe
-the linker script language.
-.Pp
-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
-.Em object file format .
-Each file is called an
-.Em object file .
-The output file is often called an
-.Em executable ,
-but for our purposes we will also call it an object file. Each object file
-has, among other things, a list of
-.Em sections .
-We sometimes refer to a section in an input file as an
-.Em input section ;
-similarly, a section in the output file is an
-.Em output section .
-.Pp
-Each section in an object file has a name and a size. Most sections also have
-an associated block of data, known as the
-.Em section contents .
-A section may be marked as
-.Em loadable ,
-which mean that the contents should be loaded into memory when the output
-file is run. A section with no contents may be
-.Em 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.
-.Pp
-Every loadable or allocatable output section has two addresses. The first
-is the
-.Em VMA ,
-or virtual memory address. This is the address the section will have when
-the output file is run. The second is the
-.Em 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.
-.Pp
-You can see the sections in an object file by using the
-.Li objdump
-program with the
-.Li -h
-option.
-.Pp
-Every object file also has a list of
-.Em symbols ,
-known as the
-.Em 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.
-.Pp
-You can see the symbols in an object file by using the
-.Li nm
-program, or by using the
-.Li objdump
-program with the
-.Li -t
-option.
-.Pp
-.Ss Linker Script Format
-Linker scripts are text files.
-.Pp
-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.
-.Pp
-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.
-.Pp
-You may include comments in linker scripts just as in C, delimited by
-.Li /*
-and
-.Li */ .
-As in C, comments are syntactically equivalent to whitespace.
-.Pp
-.Ss Simple Linker Script Example
-Many linker scripts are fairly simple.
-.Pp
-The simplest possible linker script has just one command:
-.Li SECTIONS .
-You use the
-.Li SECTIONS
-command to describe the memory layout of the output file.
-.Pp
-The
-.Li 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
-.Li .text ,
-.Li .data ,
-and
-.Li .bss
-sections, respectively. Let's assume further that these are the only sections
-which appear in your input files.
-.Pp
-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:
-.Bd -literal -offset indent
-SECTIONS
-{
- . = 0x10000;
- .text : { *(.text) }
- . = 0x8000000;
- .data : { *(.data) }
- .bss : { *(.bss) }
-}
-.Ed
-.Pp
-You write the
-.Li SECTIONS
-command as the keyword
-.Li SECTIONS ,
-followed by a series of symbol assignments and output section descriptions
-enclosed in curly braces.
-.Pp
-The first line inside the
-.Li SECTIONS
-command of the above example sets the value of the special symbol
-.Li . ,
-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
-.Li SECTIONS
-command, the location counter has the value
-.Li 0 .
-.Pp
-The second line defines an output section,
-.Li .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
-.Li *
-is a wildcard which matches any file name. The expression
-.Li *(.text)
-means all
-.Li .text
-input sections in all input files.
-.Pp
-Since the location counter is
-.Li 0x10000
-when the output section
-.Li .text
-is defined, the linker will set the address of the
-.Li .text
-section in the output file to be
-.Li 0x10000 .
-.Pp
-The remaining lines define the
-.Li .data
-and
-.Li .bss
-sections in the output file. The linker will place the
-.Li .data
-output section at address
-.Li 0x8000000 .
-After the linker places the
-.Li .data
-output section, the value of the location counter will be
-.Li 0x8000000
-plus the size of the
-.Li .data
-output section. The effect is that the linker will place the
-.Li .bss
-output section immediately after the
-.Li .data
-output section in memory.
-.Pp
-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
-.Li .text
-and
-.Li .data
-sections will probably satisfy any alignment constraints, but the linker may
-have to create a small gap between the
-.Li .data
-and
-.Li .bss
-sections.
-.Pp
-That's it! That's a simple and complete linker script.
-.Pp
-.Ss Simple Linker Script Commands
-In this section we describe the simple linker script commands.
-.Pp
-.Em Setting the Entry Point
-.Pp
-The first instruction to execute in a program is called the
-.Em entry point .
-You can use the
-.Li ENTRY
-linker script command to set the entry point. The argument is a symbol name:
-.Bd -literal -offset indent
-ENTRY(symbol)
-.Ed
-.Pp
-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:
-.Bl -bullet
-.It
-the
-.Li -e
-.Va entry
-command-line option;
-.It
-the
-.Li ENTRY( Va symbol)
-command in a linker script;
-.It
-the value of the symbol
-.Li start ,
-if defined;
-.It
-the address of the first byte of the
-.Li .text
-section, if present;
-.It
-The address
-.Li 0 .
-.El
-.Pp
-.Em Commands Dealing with Files
-.Pp
-Several linker script commands deal with files.
-.Pp
-.Bl -tag -width Ds
-.It INCLUDE Va filename
-Include the linker script
-.Va filename
-at this point. The file will be searched for in the current directory, and
-in any directory specified with the
-.Op -L
-option. You can nest calls to
-.Li INCLUDE
-up to 10 levels deep.
-.Pp
-.It INPUT( Va file, Va file, ...)
-.It INPUT( Va file Va file ...)
-The
-.Li INPUT
-command directs the linker to include the named files in the link, as though
-they were named on the command line.
-.Pp
-For example, if you always want to include
-.Pa 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
-.Li INPUT (subr.o)
-in your linker script.
-.Pp
-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
-.Li -T
-option.
-.Pp
-In case a
-.Em sysroot prefix
-is configured, and the filename starts with the
-.Li /
-character, and the script being processed was located inside the
-.Em sysroot prefix ,
-the filename will be looked for in the
-.Em 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
-.Li -L
-in Options,,Command Line Options.
-.Pp
-If you use
-.Li INPUT (-l Va file) ,
-.Xr ld
-will transform the name to
-.Li lib Va file.a ,
-as with the command line argument
-.Li -l .
-.Pp
-When you use the
-.Li 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.
-.Pp
-.It GROUP( Va file, Va file, ...)
-.It GROUP( Va file Va file ...)
-The
-.Li GROUP
-command is like
-.Li 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
-.Li -(
-in Options,,Command Line Options.
-.Pp
-.It AS_NEEDED( Va file, Va file, ...)
-.It AS_NEEDED( Va file Va file ...)
-This construct can appear only inside of the
-.Li INPUT
-or
-.Li GROUP
-commands, among other filenames. The files listed will be handled as if they
-appear directly in the
-.Li INPUT
-or
-.Li GROUP
-commands, with the exception of ELF shared libraries, that will be added only
-when they are actually needed. This construct essentially enables
-.Op --as-needed
-option for all the files listed inside of it and restores previous
-.Op --as-needed
-resp.
-.Op --no-as-needed
-setting afterwards.
-.Pp
-.It OUTPUT( Va filename)
-The
-.Li OUTPUT
-command names the output file. Using
-.Li OUTPUT( Va filename)
-in the linker script is exactly like using
-.Li -o Va filename
-on the command line (see Section
-.Dq Options ) .
-If both are used, the command line option takes precedence.
-.Pp
-You can use the
-.Li OUTPUT
-command to define a default name for the output file other than the usual
-default of
-.Pa a.out .
-.Pp
-.It SEARCH_DIR( Va path)
-The
-.Li SEARCH_DIR
-command adds
-.Va path
-to the list of paths where
-.Xr ld
-looks for archive libraries. Using
-.Li SEARCH_DIR( Va path)
-is exactly like using
-.Li -L Va path
-on the command line (see Section
-.Dq Options ) .
-If both are used, then the linker will search both paths. Paths specified
-using the command line option are searched first.
-.Pp
-.It STARTUP( Va filename)
-The
-.Li STARTUP
-command is just like the
-.Li INPUT
-command, except that
-.Va 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.
-.El
-.Pp
-.Em Commands Dealing with Object File Formats
-.Pp
-A couple of linker script commands deal with object file formats.
-.Pp
-.Bl -tag -width Ds
-.It OUTPUT_FORMAT( Va bfdname)
-.It OUTPUT_FORMAT( Va default, Va big, Va little)
-The
-.Li OUTPUT_FORMAT
-command names the BFD format to use for the output file (see Section
-.Dq BFD ) .
-Using
-.Li OUTPUT_FORMAT( Va bfdname)
-is exactly like using
-.Li --oformat Va bfdname
-on the command line (see Section
-.Dq Options ) .
-If both are used, the command line option takes precedence.
-.Pp
-You can use
-.Li OUTPUT_FORMAT
-with three arguments to use different formats based on the
-.Li -EB
-and
-.Li -EL
-command line options. This permits the linker script to set the output format
-based on the desired endianness.
-.Pp
-If neither
-.Li -EB
-nor
-.Li -EL
-are used, then the output format will be the first argument,
-.Va default .
-If
-.Li -EB
-is used, the output format will be the second argument,
-.Va big .
-If
-.Li -EL
-is used, the output format will be the third argument,
-.Va little .
-.Pp
-For example, the default linker script for the MIPS ELF target uses this command:
-.Bd -literal -offset indent
-OUTPUT_FORMAT(elf32-bigmips, elf32-bigmips, elf32-littlemips)
-.Ed
-This says that the default format for the output file is
-.Li elf32-bigmips ,
-but if the user uses the
-.Li -EL
-command line option, the output file will be created in the
-.Li elf32-littlemips
-format.
-.Pp
-.It TARGET( Va bfdname)
-The
-.Li TARGET
-command names the BFD format to use when reading input files. It affects subsequent
-.Li INPUT
-and
-.Li GROUP
-commands. This command is like using
-.Li -b Va bfdname
-on the command line (see Section
-.Dq Options ) .
-If the
-.Li TARGET
-command is used but
-.Li OUTPUT_FORMAT
-is not, then the last
-.Li TARGET
-command is also used to set the format for the output file.See Section
-.Dq BFD .
-.El
-.Pp
-.Em Other Linker Script Commands
-.Pp
-There are a few other linker scripts commands.
-.Pp
-.Bl -tag -width Ds
-.It ASSERT( Va exp, Va message)
-Ensure that
-.Va exp
-is non-zero. If it is zero, then exit the linker with an error code, and print
-.Va message .
-.Pp
-.It EXTERN( Va symbol Va symbol ...)
-Force
-.Va 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
-.Va symbol
-s for each
-.Li EXTERN ,
-and you may use
-.Li EXTERN
-multiple times. This command has the same effect as the
-.Li -u
-command-line option.
-.Pp
-.It FORCE_COMMON_ALLOCATION
-This command has the same effect as the
-.Li -d
-command-line option: to make
-.Xr ld
-assign space to common symbols even if a relocatable output file is specified
-(
-.Li -r ) .
-.Pp
-.It INHIBIT_COMMON_ALLOCATION
-This command has the same effect as the
-.Li --no-define-common
-command-line option: to make
-.Li ld
-omit the assignment of addresses to common symbols even for a non-relocatable
-output file.
-.Pp
-.It NOCROSSREFS( Va section Va section ...)
-This command may be used to tell
-.Xr ld
-to issue an error about any references among certain output sections.
-.Pp
-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.
-.Pp
-The
-.Li NOCROSSREFS
-command takes a list of output section names. If
-.Xr ld
-detects any cross references between the sections, it reports an error and
-returns a non-zero exit status. Note that the
-.Li NOCROSSREFS
-command uses output section names, not input section names.
-.Pp
-.It OUTPUT_ARCH( Va bfdarch)
-Specify a particular output machine architecture. The argument is one of the
-names used by the BFD library (see Section
-.Dq BFD ) .
-You can see the architecture of an object file by using the
-.Li objdump
-program with the
-.Li -f
-option.
-.El
-.Pp
-.Ss Assigning Values to Symbols
-You may assign a value to a symbol in a linker script. This will define the
-symbol and place it into the symbol table with a global scope.
-.Pp
-.Em Simple Assignments
-.Pp
-You may assign to a symbol using any of the C assignment operators:
-.Pp
-.Bl -tag -width Ds
-.It Va symbol = Va expression ;
-.It Va symbol += Va expression ;
-.It Va symbol -= Va expression ;
-.It Va symbol *= Va expression ;
-.It Va symbol /= Va expression ;
-.It Va symbol <<= Va expression ;
-.It Va symbol >>= Va expression ;
-.It Va symbol &= Va expression ;
-.It Va symbol |= Va expression ;
-.El
-.Pp
-The first case will define
-.Va symbol
-to the value of
-.Va expression .
-In the other cases,
-.Va symbol
-must already be defined, and the value will be adjusted accordingly.
-.Pp
-The special symbol name
-.Li .
-indicates the location counter. You may only use this within a
-.Li SECTIONS
-command.See Section
-.Dq Location Counter .
-.Pp
-The semicolon after
-.Va expression
-is required.
-.Pp
-Expressions are defined below; see Expressions.
-.Pp
-You may write symbol assignments as commands in their own right, or as statements
-within a
-.Li SECTIONS
-command, or as part of an output section description in a
-.Li SECTIONS
-command.
-.Pp
-The section of the symbol will be set from the section of the expression;
-for more information, see Expression Section.
-.Pp
-Here is an example showing the three different places that symbol assignments
-may be used:
-.Pp
-.Bd -literal -offset indent
-floating_point = 0;
-SECTIONS
-{
- .text :
- {
- *(.text)
- _etext = .;
- }
- _bdata = (. + 3) & ~ 3;
- .data : { *(.data) }
-}
-.Ed
-In this example, the symbol
-.Li floating_point
-will be defined as zero. The symbol
-.Li _etext
-will be defined as the address following the last
-.Li .text
-input section. The symbol
-.Li _bdata
-will be defined as the address following the
-.Li .text
-output section aligned upward to a 4 byte boundary.
-.Pp
-.Em PROVIDE
-.Pp
-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
-.Li etext .
-However, ANSI C requires that the user be able to use
-.Li etext
-as a function name without encountering an error. The
-.Li PROVIDE
-keyword may be used to define a symbol, such as
-.Li etext ,
-only if it is referenced but not defined. The syntax is
-.Li PROVIDE( Va symbol = Va expression) .
-.Pp
-Here is an example of using
-.Li PROVIDE
-to define
-.Li etext :
-.Bd -literal -offset indent
-SECTIONS
-{
- .text :
- {
- *(.text)
- _etext = .;
- PROVIDE(etext = .);
- }
-}
-.Ed
-.Pp
-In this example, if the program defines
-.Li _etext
-(with a leading underscore), the linker will give a multiple definition error.
-If, on the other hand, the program defines
-.Li etext
-(with no leading underscore), the linker will silently use the definition
-in the program. If the program references
-.Li etext
-but does not define it, the linker will use the definition in the linker script.
-.Pp
-.Em PROVIDE_HIDDEN
-.Pp
-Similar to
-.Li PROVIDE .
-For ELF targeted ports, the symbol will be hidden and won't be exported.
-.Pp
-.Em Source Code Reference
-.Pp
-Accessing a linker script defined variable from source code is not intuitive.
-In particular a linker script symbol is not equivalent to a variable declaration
-in a high level language, it is instead a symbol that does not have a value.
-.Pp
-Before going further, it is important to note that compilers often transform
-names in the source code into different names when they are stored in the
-symbol table. For example, Fortran compilers commonly prepend or append an
-underscore, and C++ performs extensive
-.Li name mangling .
-Therefore there might be a discrepancy between the name of a variable as it
-is used in source code and the name of the same variable as it is defined
-in a linker script. For example in C a linker script variable might be referred
-to as:
-.Pp
-.Bd -literal -offset indent
- extern int foo;
-.Ed
-.Pp
-But in the linker script it might be defined as:
-.Pp
-.Bd -literal -offset indent
- _foo = 1000;
-.Ed
-.Pp
-In the remaining examples however it is assumed that no name transformation
-has taken place.
-.Pp
-When a symbol is declared in a high level language such as C, two things happen.
-The first is that the compiler reserves enough space in the program's memory
-to hold the
-.Em value
-of the symbol. The second is that the compiler creates an entry in the program's
-symbol table which holds the symbol's
-.Em address .
-ie the symbol table contains the address of the block of memory holding the
-symbol's value. So for example the following C declaration, at file scope:
-.Pp
-.Bd -literal -offset indent
- int foo = 1000;
-.Ed
-.Pp
-creates a entry called
-.Li foo
-in the symbol table. This entry holds the address of an
-.Li int
-sized block of memory where the number 1000 is initially stored.
-.Pp
-When a program references a symbol the compiler generates code that first
-accesses the symbol table to find the address of the symbol's memory block
-and then code to read the value from that memory block. So:
-.Pp
-.Bd -literal -offset indent
- foo = 1;
-.Ed
-.Pp
-looks up the symbol
-.Li foo
-in the symbol table, gets the address associated with this symbol and then
-writes the value 1 into that address. Whereas:
-.Pp
-.Bd -literal -offset indent
- int * a = & foo;
-.Ed
-.Pp
-looks up the symbol
-.Li foo
-in the symbol table, gets it address and then copies this address into the
-block of memory associated with the variable
-.Li a .
-.Pp
-Linker scripts symbol declarations, by contrast, create an entry in the symbol
-table but do not assign any memory to them. Thus they are an address without
-a value. So for example the linker script definition:
-.Pp
-.Bd -literal -offset indent
- foo = 1000;
-.Ed
-.Pp
-creates an entry in the symbol table called
-.Li foo
-which holds the address of memory location 1000, but nothing special is stored
-at address 1000. This means that you cannot access the
-.Em value
-of a linker script defined symbol - it has no value - all you can do is access
-the
-.Em address
-of a linker script defined symbol.
-.Pp
-Hence when you are using a linker script defined symbol in source code you
-should always take the address of the symbol, and never attempt to use its
-value. For example suppose you want to copy the contents of a section of memory
-called .ROM into a section called .FLASH and the linker script contains these
-declarations:
-.Pp
-.Bd -literal -offset indent
-
- start_of_ROM = .ROM;
- end_of_ROM = .ROM + sizeof (.ROM) - 1;
- start_of_FLASH = .FLASH;
-
-.Ed
-.Pp
-Then the C source code to perform the copy would be:
-.Pp
-.Bd -literal -offset indent
-
- extern char start_of_ROM, end_of_ROM, start_of_FLASH;
-
- memcpy (& start_of_FLASH, & start_of_ROM, & end_of_ROM - & start_of_ROM);
-
-.Ed
-.Pp
-Note the use of the
-.Li &
-operators. These are correct.
-.Pp
-.Ss SECTIONS Command
-The
-.Li SECTIONS
-command tells the linker how to map input sections into output sections, and
-how to place the output sections in memory.
-.Pp
-The format of the
-.Li SECTIONS
-command is:
-.Bd -literal -offset indent
-SECTIONS
-{
- sections-command
- sections-command
- ...
-}
-.Ed
-.Pp
-Each
-.Va sections-command
-may of be one of the following:
-.Pp
-.Bl -bullet
-.It
-an
-.Li ENTRY
-command (see Section
-.Dq Entry Point )
-.It
-a symbol assignment (see Section
-.Dq Assignments )
-.It
-an output section description
-.It
-an overlay description
-.El
-.Pp
-The
-.Li ENTRY
-command and symbol assignments are permitted inside the
-.Li 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.
-.Pp
-Output section descriptions and overlay descriptions are described below.
-.Pp
-If you do not use a
-.Li 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.
-.Pp
-.Em Output Section Description
-.Pp
-The full description of an output section looks like this:
-.Bd -literal -offset indent
-
-section [address] [(type)] :
- [AT(lma)] [ALIGN(section_align)] [SUBALIGN(subsection_align)]
- {
- output-section-command
- output-section-command
- ...
- } [>region] [AT>lma_region] [:phdr :phdr ...] [=fillexp]
-
-.Ed
-.Pp
-Most output sections do not use most of the optional section attributes.
-.Pp
-The whitespace around
-.Va 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.
-.Pp
-Each
-.Va output-section-command
-may be one of the following:
-.Pp
-.Bl -bullet
-.It
-a symbol assignment (see Section
-.Dq Assignments )
-.It
-an input section description (see Section
-.Dq Input Section )
-.It
-data values to include directly (see Section
-.Dq Output Section Data )
-.It
-a special output section keyword (see Section
-.Dq Output Section Keywords )
-.El
-.Pp
-.Em Output Section Name
-.Pp
-The name of the output section is
-.Va section .
-.Va section
-must meet the constraints of your output format. In formats which only support
-a limited number of sections, such as
-.Li a.out ,
-the name must be one of the names supported by the format (
-.Li a.out ,
-for example, allows only
-.Li .text ,
-.Li .data
-or
-.Li .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.
-.Pp
-The output section name
-.Li /DISCARD/
-is special; Output Section Discarding.
-.Pp
-.Em Output Section Address
-.Pp
-The
-.Va address
-is an expression for the VMA (the virtual memory address) of the output section.
-If you do not provide
-.Va address ,
-the linker will set it based on
-.Va region
-if present, or otherwise based on the current value of the location counter.
-.Pp
-If you provide
-.Va address ,
-the address of the output section will be set to precisely that. If you provide
-neither
-.Va address
-nor
-.Va 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.
-.Pp
-For example,
-.Bd -literal -offset indent
-\&.text . : { *(.text) }
-.Ed
-and
-.Bd -literal -offset indent
-\&.text : { *(.text) }
-.Ed
-are subtly different. The first will set the address of the
-.Li .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
-.Li .text
-input section.
-.Pp
-The
-.Va address
-may be an arbitrary expression; 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:
-.Bd -literal -offset indent
-\&.text ALIGN(0x10) : { *(.text) }
-.Ed
-This works because
-.Li ALIGN
-returns the current location counter aligned upward to the specified value.
-.Pp
-Specifying
-.Va address
-for a section will change the value of the location counter.
-.Pp
-.Em Input Section Description
-.Pp
-The most common output section command is an input section description.
-.Pp
-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.
-.Pp
-.No Input Section Basics
-.Pp
-An input section description consists of a file name optionally followed by
-a list of section names in parentheses.
-.Pp
-The file name and the section name may be wildcard patterns, which we describe
-further below (see Section
-.Dq Input Section Wildcards ) .
-.Pp
-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
-.Li .text
-sections, you would write:
-.Bd -literal -offset indent
-*(.text)
-.Ed
-Here the
-.Li *
-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:
-.Bd -literal -offset indent
-(*(EXCLUDE_FILE (*crtend.o *otherfile.o) .ctors))
-.Ed
-will cause all .ctors sections from all files except
-.Pa crtend.o
-and
-.Pa otherfile.o
-to be included.
-.Pp
-There are two ways to include more than one section:
-.Bd -literal -offset indent
-*(.text .rdata)
-*(.text) *(.rdata)
-.Ed
-The difference between these is the order in which the
-.Li .text
-and
-.Li .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
-.Li .text
-input sections will appear first, followed by all
-.Li .rdata
-input sections.
-.Pp
-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:
-.Bd -literal -offset indent
-data.o(.data)
-.Ed
-.Pp
-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:
-.Bd -literal -offset indent
-data.o
-.Ed
-.Pp
-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
-.Li 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
-.Li INPUT
-command, because the linker will not search for the file in the archive search
-path.
-.Pp
-.No Input Section Wildcard Patterns
-.Pp
-In an input section description, either the file name or the section name
-or both may be wildcard patterns.
-.Pp
-The file name of
-.Li *
-seen in many examples is a simple wildcard pattern for the file name.
-.Pp
-The wildcard patterns are like those used by the Unix shell.
-.Pp
-.Bl -tag -width Ds
-.It *
-matches any number of characters
-.It ?
-matches any single character
-.It [ Va chars]
-matches a single instance of any of the
-.Va chars ;
-the
-.Li -
-character may be used to specify a range of characters, as in
-.Li [a-z]
-to match any lower case letter
-.It \e
-quotes the following character
-.El
-.Pp
-When a file name is matched with a wildcard, the wildcard characters will
-not match a
-.Li /
-character (used to separate directory names on Unix). A pattern consisting
-of a single
-.Li *
-character is an exception; it will always match any file name, whether it
-contains a
-.Li /
-or not. In a section name, the wildcard characters will match a
-.Li /
-character.
-.Pp
-File name wildcard patterns only match files which are explicitly specified
-on the command line or in an
-.Li INPUT
-command. The linker does not search directories to expand wildcards.
-.Pp
-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
-.Pa data.o
-rule will not be used:
-.Bd -literal -offset indent
-\&.data : { *(.data) }
-\&.data1 : { data.o(.data) }
-.Ed
-.Pp
-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
-.Li SORT_BY_NAME
-keyword, which appears before a wildcard pattern in parentheses (e.g.,
-.Li SORT_BY_NAME(.text*) ) .
-When the
-.Li SORT_BY_NAME
-keyword is used, the linker will sort the files or sections into ascending
-order by name before placing them in the output file.
-.Pp
-.Li SORT_BY_ALIGNMENT
-is very similar to
-.Li SORT_BY_NAME .
-The difference is
-.Li SORT_BY_ALIGNMENT
-will sort sections into ascending order by alignment before placing them in
-the output file.
-.Pp
-.Li SORT
-is an alias for
-.Li SORT_BY_NAME .
-.Pp
-When there are nested section sorting commands in linker script, there can
-be at most 1 level of nesting for section sorting commands.
-.Pp
-.Bl -enum
-.It
-.Li SORT_BY_NAME
-(
-.Li SORT_BY_ALIGNMENT
-(wildcard section pattern)). It will sort the input sections by name first,
-then by alignment if 2 sections have the same name.
-.It
-.Li SORT_BY_ALIGNMENT
-(
-.Li SORT_BY_NAME
-(wildcard section pattern)). It will sort the input sections by alignment
-first, then by name if 2 sections have the same alignment.
-.It
-.Li SORT_BY_NAME
-(
-.Li SORT_BY_NAME
-(wildcard section pattern)) is treated the same as
-.Li SORT_BY_NAME
-(wildcard section pattern).
-.It
-.Li SORT_BY_ALIGNMENT
-(
-.Li SORT_BY_ALIGNMENT
-(wildcard section pattern)) is treated the same as
-.Li SORT_BY_ALIGNMENT
-(wildcard section pattern).
-.It
-All other nested section sorting commands are invalid.
-.El
-.Pp
-When both command line section sorting option and linker script section sorting
-command are used, section sorting command always takes precedence over the
-command line option.
-.Pp
-If the section sorting command in linker script isn't nested, the command
-line option will make the section sorting command to be treated as nested
-sorting command.
-.Pp
-.Bl -enum
-.It
-.Li SORT_BY_NAME
-(wildcard section pattern ) with
-.Op --sort-sections alignment
-is equivalent to
-.Li SORT_BY_NAME
-(
-.Li SORT_BY_ALIGNMENT
-(wildcard section pattern)).
-.It
-.Li SORT_BY_ALIGNMENT
-(wildcard section pattern) with
-.Op --sort-section name
-is equivalent to
-.Li SORT_BY_ALIGNMENT
-(
-.Li SORT_BY_NAME
-(wildcard section pattern)).
-.El
-.Pp
-If the section sorting command in linker script is nested, the command line
-option will be ignored.
-.Pp
-If you ever get confused about where input sections are going, use the
-.Li -M
-linker option to generate a map file. The map file shows precisely how input
-sections are mapped to output sections.
-.Pp
-This example shows how wildcard patterns might be used to partition files.
-This linker script directs the linker to place all
-.Li .text
-sections in
-.Li .text
-and all
-.Li .bss
-sections in
-.Li .bss .
-The linker will place the
-.Li .data
-section from all files beginning with an upper case character in
-.Li .DATA ;
-for all other files, the linker will place the
-.Li .data
-section in
-.Li .data .
-.Bd -literal -offset indent
-
-SECTIONS {
- .text : { *(.text) }
- .DATA : { [A-Z]*(.data) }
- .data : { *(.data) }
- .bss : { *(.bss) }
-}
-
-.Ed
-.Pp
-.No Input Section for Common Symbols
-.Pp
-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
-.Li COMMON .
-.Pp
-You may use file names with the
-.Li 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.
-.Pp
-In most cases, common symbols in input files will be placed in the
-.Li .bss
-section in the output file. For example:
-.Bd -literal -offset indent
-\&.bss { *(.bss) *(COMMON) }
-.Ed
-.Pp
-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
-.Li COMMON
-for standard common symbols and
-.Li .scommon
-for small common symbols. This permits you to map the different types of common
-symbols into memory at different locations.
-.Pp
-You will sometimes see
-.Li [COMMON]
-in old linker scripts. This notation is now considered obsolete. It is equivalent
-to
-.Li *(COMMON) .
-.Pp
-.No Input Section and Garbage Collection
-.Pp
-When link-time garbage collection is in use (
-.Li --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
-.Li KEEP() ,
-as in
-.Li KEEP(*(.init))
-or
-.Li KEEP(SORT_BY_NAME(*)(.ctors)) .
-.Pp
-.No Input Section Example
-.Pp
-The following example is a complete linker script. It tells the linker to
-read all of the sections from file
-.Pa all.o
-and place them at the start of output section
-.Li outputa
-which starts at location
-.Li 0x10000 .
-All of section
-.Li .input1
-from file
-.Pa foo.o
-follows immediately, in the same output section. All of section
-.Li .input2
-from
-.Pa foo.o
-goes into output section
-.Li outputb ,
-followed by section
-.Li .input1
-from
-.Pa foo1.o .
-All of the remaining
-.Li .input1
-and
-.Li .input2
-sections from any files are written to output section
-.Li outputc .
-.Pp
-.Bd -literal -offset indent
-
-SECTIONS {
- outputa 0x10000 :
- {
- all.o
- foo.o (.input1)
- }
-
-
- outputb :
- {
- foo.o (.input2)
- foo1.o (.input1)
- }
-
-
- outputc :
- {
- *(.input1)
- *(.input2)
- }
-}
-
-.Ed
-.Pp
-.Em Output Section Data
-.Pp
-You can include explicit bytes of data in an output section by using
-.Li BYTE ,
-.Li SHORT ,
-.Li LONG ,
-.Li QUAD ,
-or
-.Li SQUAD
-as an output section command. Each keyword is followed by an expression in
-parentheses providing the value to store (see Section
-.Dq Expressions ) .
-The value of the expression is stored at the current value of the location
-counter.
-.Pp
-The
-.Li BYTE ,
-.Li SHORT ,
-.Li LONG ,
-and
-.Li 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.
-.Pp
-For example, this will store the byte 1 followed by the four byte value of
-the symbol
-.Li addr :
-.Bd -literal -offset indent
-BYTE(1)
-LONG(addr)
-.Ed
-.Pp
-When using a 64 bit host or target,
-.Li QUAD
-and
-.Li 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
-.Li QUAD
-stores a 32 bit value zero extended to 64 bits, and
-.Li SQUAD
-stores a 32 bit value sign extended to 64 bits.
-.Pp
-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.
-.Pp
-Note---these commands only work inside a section description and not between
-them, so the following will produce an error from the linker:
-.Bd -literal -offset indent
-SECTIONS { .text : { *(.text) } LONG(1) .data : { *(.data) } }
-.Ed
-whereas this will work:
-.Bd -literal -offset indent
-SECTIONS { .text : { *(.text) ; LONG(1) } .data : { *(.data) } }
-.Ed
-.Pp
-You may use the
-.Li 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
-.Li FILL
-statement covers memory locations after the point at which it occurs in the
-section definition; by including more than one
-.Li FILL
-statement, you can have different fill patterns in different parts of an output
-section.
-.Pp
-This example shows how to fill unspecified regions of memory with the value
-.Li 0x90 :
-.Bd -literal -offset indent
-FILL(0x90909090)
-.Ed
-.Pp
-The
-.Li FILL
-command is similar to the
-.Li = Va fillexp
-output section attribute, but it only affects the part of the section following
-the
-.Li FILL
-command, rather than the entire section. If both are used, the
-.Li FILL
-command takes precedence.See Section
-.Dq Output Section Fill ,
-for details on the fill expression.
-.Pp
-.Em Output Section Keywords
-.Pp
-There are a couple of keywords which can appear as output section commands.
-.Pp
-.Bl -tag -width Ds
-.It 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
-.Li CREATE_OBJECT_SYMBOLS
-command appears.
-.Pp
-This is conventional for the a.out object file format. It is not normally
-used for any other object file format.
-.Pp
-.It 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
-.Li CONSTRUCTORS
-command tells the linker to place constructor information in the output section
-where the
-.Li CONSTRUCTORS
-command appears. The
-.Li CONSTRUCTORS
-command is ignored for other object file formats.
-.Pp
-The symbol
-.Li __CTOR_LIST__
-marks the start of the global constructors, and the symbol
-.Li __CTOR_END__
-marks the end. Similarly,
-.Li __DTOR_LIST__
-and
-.Li __DTOR_END__
-mark the start and end of the global destructors. The first word in the list
-is the number of entries, followed by the address of each constructor or destructor,
-followed by a zero word. The compiler must arrange to actually run the code.
-For these object file formats GNU C++ normally calls constructors from a subroutine
-.Li __main ;
-a call to
-.Li __main
-is automatically inserted into the startup code for
-.Li main .
-GNU C++ normally runs destructors either by using
-.Li atexit ,
-or directly from the function
-.Li exit .
-.Pp
-For object file formats such as
-.Li COFF
-or
-.Li ELF
-which support arbitrary section names, GNU C++ will normally arrange to put
-the addresses of global constructors and destructors into the
-.Li .ctors
-and
-.Li .dtors
-sections. Placing the following sequence into your linker script will build
-the sort of table which the GNU C++ runtime code expects to see.
-.Pp
-.Bd -literal -offset indent
- __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__ = .;
-.Ed
-.Pp
-If you are using the 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
-.Li CONSTRUCTORS
-command, use
-.Li SORT_BY_NAME(CONSTRUCTORS)
-instead. When using the
-.Li .ctors
-and
-.Li .dtors
-sections, use
-.Li *(SORT_BY_NAME(.ctors))
-and
-.Li *(SORT_BY_NAME(.dtors))
-instead of just
-.Li *(.ctors)
-and
-.Li *(.dtors) .
-.Pp
-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.
-.Pp
-.El
-.Em Output Section Discarding
-.Pp
-The linker will not create output sections with no contents. This is for convenience
-when referring to input sections that may or may not be present in any of
-the input files. For example:
-.Bd -literal -offset indent
-\&.foo : { *(.foo) }
-.Ed
-will only create a
-.Li .foo
-section in the output file if there is a
-.Li .foo
-section in at least one input file, and if the input sections are not all
-empty. Other link script directives that allocate space in an output section
-will also create the output section.
-.Pp
-The linker will ignore address assignments (see Section
-.Dq Output Section Address )
-on discarded output sections, except when the linker script defines symbols
-in the output section. In that case the linker will obey the address assignments,
-possibly advancing dot even though the section is discarded.
-.Pp
-The special output section name
-.Li /DISCARD/
-may be used to discard input sections. Any input sections which are assigned
-to an output section named
-.Li /DISCARD/
-are not included in the output file.
-.Pp
-.Em Output Section Attributes
-.Pp
-We showed above that the full description of an output section looked like
-this:
-.Bd -literal -offset indent
-
-section [address] [(type)] :
- [AT(lma)] [ALIGN(section_align)] [SUBALIGN(subsection_align)]
- {
- output-section-command
- output-section-command
- ...
- } [>region] [AT>lma_region] [:phdr :phdr ...] [=fillexp]
-
-.Ed
-We've already described
-.Va section ,
-.Va address ,
-and
-.Va output-section-command .
-In this section we will describe the remaining section attributes.
-.Pp
-.No Output Section Type
-.Pp
-Each output section may have a type. The type is a keyword in parentheses.
-The following types are defined:
-.Pp
-.Bl -tag -width Ds
-.It NOLOAD
-The section should be marked as not loadable, so that it will not be loaded
-into memory when the program is run.
-.It DSECT
-.It COPY
-.It INFO
-.It 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.
-.El
-.Pp
-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
-.Li ROM
-section is addressed at memory location
-.Li 0
-and does not need to be loaded when the program is run. The contents of the
-.Li ROM
-section will appear in the linker output file as usual.
-.Bd -literal -offset indent
-
-SECTIONS {
- ROM 0 (NOLOAD) : { ... }
- ...
-}
-
-.Ed
-.Pp
-.No Output Section LMA
-.Pp
-Every section has a virtual address (VMA) and a load address (LMA); see Basic
-Script Concepts. The address expression which may appear in an output section
-description sets the VMA (see Section
-.Dq Output Section Address ) .
-.Pp
-The expression
-.Va lma
-that follows the
-.Li AT
-keyword specifies the load address of the section.
-.Pp
-Alternatively, with
-.Li AT> Va lma_region
-expression, you may specify a memory region for the section's load address.See Section
-.Dq MEMORY .
-Note that if the section has not had a VMA assigned to it then the linker
-will use the
-.Va lma_region
-as the VMA region as well.
-.Pp
-If neither
-.Li AT
-nor
-.Li AT>
-is specified for an allocatable section, the linker will set the LMA such
-that the difference between VMA and LMA for the section is the same as the
-preceding output section in the same region. If there is no preceding output
-section or the section is not allocatable, the linker will set the LMA equal
-to the VMA.See Section
-.Dq Output Section Region .
-.Pp
-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
-.Li .text ,
-which starts at
-.Li 0x1000 ,
-one called
-.Li .mdata ,
-which is loaded at the end of the
-.Li .text
-section even though its VMA is
-.Li 0x2000 ,
-and one called
-.Li .bss
-to hold uninitialized data at address
-.Li 0x3000 .
-The symbol
-.Li _data
-is defined with the value
-.Li 0x2000 ,
-which shows that the location counter holds the VMA value, not the LMA value.
-.Pp
-.Bd -literal -offset indent
-
-SECTIONS
- {
- .text 0x1000 : { *(.text) _etext = . ; }
- .mdata 0x2000 :
- AT ( ADDR (.text) + SIZEOF (.text) )
- { _data = . ; *(.data); _edata = . ; }
- .bss 0x3000 :
- { _bstart = . ; *(.bss) *(COMMON) ; _bend = . ;}
-}
-
-.Ed
-.Pp
-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.
-.Pp
-.Bd -literal -offset indent
-
-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;
-
-.Ed
-.Pp
-.No Forced Output Alignment
-.Pp
-You can increase an output section's alignment by using ALIGN.
-.Pp
-.No Forced Input Alignment
-.Pp
-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.
-.Pp
-.No Output Section Region
-.Pp
-You can assign a section to a previously defined region of memory by using
-.Li > Va region .
-See Section.Dq MEMORY .
-.Pp
-Here is a simple example:
-.Bd -literal -offset indent
-
-MEMORY { rom : ORIGIN = 0x1000, LENGTH = 0x1000 }
-SECTIONS { ROM : { *(.text) } >rom }
-
-.Ed
-.Pp
-.No Output Section Phdr
-.Pp
-You can assign a section to a previously defined program segment by using
-.Li : Va phdr .
-See Section.Dq 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
-.Li : Va phdr
-modifier. You can use
-.Li :NONE
-to tell the linker to not put the section in any segment at all.
-.Pp
-Here is a simple example:
-.Bd -literal -offset indent
-
-PHDRS { text PT_LOAD ; }
-SECTIONS { .text : { *(.text) } :text }
-
-.Ed
-.Pp
-.No Output Section Fill
-.Pp
-You can set the fill pattern for an entire section by using
-.Li = Va fillexp .
-.Va fillexp
-is an expression (see Section
-.Dq 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
-.Li 0x
-and without a trailing
-.Li k
-or
-.Li 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
-.Li + ,
-the fill pattern is the four least significant bytes of the value of the expression.
-In all cases, the number is big-endian.
-.Pp
-You can also change the fill value with a
-.Li FILL
-command in the output section commands; (see Section
-.Dq Output Section Data ) .
-.Pp
-Here is a simple example:
-.Bd -literal -offset indent
-
-SECTIONS { .text : { *(.text) } =0x90909090 }
-
-.Ed
-.Pp
-.Em Overlay Description
-.Pp
-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.
-.Pp
-Overlays are described using the
-.Li OVERLAY
-command. The
-.Li OVERLAY
-command is used within a
-.Li SECTIONS
-command, like an output section description. The full syntax of the
-.Li OVERLAY
-command is as follows:
-.Bd -literal -offset indent
-
-OVERLAY [start] : [NOCROSSREFS] [AT ( ldaddr )]
- {
- secname1
- {
- output-section-command
- output-section-command
- ...
- } [:phdr...] [=fill]
- secname2
- {
- output-section-command
- output-section-command
- ...
- } [:phdr...] [=fill]
- ...
- } [>region] [:phdr...] [=fill]
-
-.Ed
-.Pp
-Everything is optional except
-.Li OVERLAY
-(a keyword), and each section must have a name (
-.Va secname1
-and
-.Va secname2
-above). The section definitions within the
-.Li OVERLAY
-construct are identical to those within the general
-.Li SECTIONS
-contruct (see Section
-.Dq SECTIONS ) ,
-except that no addresses and no memory regions may be defined for sections
-within an
-.Li OVERLAY .
-.Pp
-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
-.Li 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).
-.Pp
-If the
-.Li 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.See Section
-.Dq Miscellaneous Commands .
-.Pp
-For each section within the
-.Li OVERLAY ,
-the linker automatically provides two symbols. The symbol
-.Li __load_start_ Va secname
-is defined as the starting load address of the section. The symbol
-.Li __load_stop_ Va secname
-is defined as the final load address of the section. Any characters within
-.Va 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.
-.Pp
-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.
-.Pp
-Here is an example. Remember that this would appear inside a
-.Li SECTIONS
-construct.
-.Bd -literal -offset indent
-
- OVERLAY 0x1000 : AT (0x4000)
- {
- .text0 { o1/*.o(.text) }
- .text1 { o2/*.o(.text) }
- }
-
-.Ed
-This will define both
-.Li .text0
-and
-.Li .text1
-to start at address 0x1000.
-.Li .text0
-will be loaded at address 0x4000, and
-.Li .text1
-will be loaded immediately after
-.Li .text0 .
-The following symbols will be defined if referenced:
-.Li __load_start_text0 ,
-.Li __load_stop_text0 ,
-.Li __load_start_text1 ,
-.Li __load_stop_text1 .
-.Pp
-C code to copy overlay
-.Li .text1
-into the overlay area might look like the following.
-.Pp
-.Bd -literal -offset indent
-
- extern char __load_start_text1, __load_stop_text1;
- memcpy ((char *) 0x1000, &__load_start_text1,
- &__load_stop_text1 - &__load_start_text1);
-
-.Ed
-.Pp
-Note that the
-.Li 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.
-.Pp
-.Bd -literal -offset indent
-
- .text0 0x1000 : AT (0x4000) { o1/*.o(.text) }
- PROVIDE (__load_start_text0 = LOADADDR (.text0));
- PROVIDE (__load_stop_text0 = LOADADDR (.text0) + SIZEOF (.text0));
- .text1 0x1000 : AT (0x4000 + SIZEOF (.text0)) { o2/*.o(.text) }
- PROVIDE (__load_start_text1 = LOADADDR (.text1));
- PROVIDE (__load_stop_text1 = LOADADDR (.text1) + SIZEOF (.text1));
- . = 0x1000 + MAX (SIZEOF (.text0), SIZEOF (.text1));
-
-.Ed
-.Pp
-.Ss MEMORY Command
-The linker's default configuration permits allocation of all available memory.
-You can override this by using the
-.Li MEMORY
-command.
-.Pp
-The
-.Li 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.
-.Pp
-A linker script may contain at most one use of the
-.Li MEMORY
-command. However, you can define as many blocks of memory within it as you
-wish. The syntax is:
-.Bd -literal -offset indent
-
-MEMORY
- {
- name [(attr)] : ORIGIN = origin, LENGTH = len
- ...
- }
-
-.Ed
-.Pp
-The
-.Va 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.
-.Pp
-The
-.Va 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 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.
-.Pp
-The
-.Va attr
-string must consist only of the following characters:
-.Bl -tag -width Ds
-.It R
-Read-only section
-.It W
-Read/write section
-.It X
-Executable section
-.It A
-Allocatable section
-.It I
-Initialized section
-.It L
-Same as
-.Li I
-.It !
-Invert the sense of any of the preceding attributes
-.El
-.Pp
-If a unmapped section matches any of the listed attributes other than
-.Li ! ,
-it will be placed in the memory region. The
-.Li !
-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.
-.Pp
-The
-.Va origin
-is an numerical expression for the start address of the memory region. The
-expression must evaluate to a constant and it cannot involve any symbols.
-The keyword
-.Li ORIGIN
-may be abbreviated to
-.Li org
-or
-.Li o
-(but not, for example,
-.Li ORG ) .
-.Pp
-The
-.Va len
-is an expression for the size in bytes of the memory region. As with the
-.Va origin
-expression, the expression must be numerical only and must evaluate to a constant.
-The keyword
-.Li LENGTH
-may be abbreviated to
-.Li len
-or
-.Li l .
-.Pp
-In the following example, we specify that there are two memory regions available
-for allocation: one starting at
-.Li 0
-for 256 kilobytes, and the other starting at
-.Li 0x40000000
-for four megabytes. The linker will place into the
-.Li 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
-.Li ram
-memory region.
-.Pp
-.Bd -literal -offset indent
-
-MEMORY
- {
- rom (rx) : ORIGIN = 0, LENGTH = 256K
- ram (!rx) : org = 0x40000000, l = 4M
- }
-
-.Ed
-.Pp
-Once you define a memory region, you can direct the linker to place specific
-output sections into that memory region by using the
-.Li > Va region
-output section attribute. For example, if you have a memory region named
-.Li mem ,
-you would use
-.Li >mem
-in the output section definition.See Section
-.Dq 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.
-.Pp
-It is possible to access the origin and length of a memory in an expression
-via the
-.Li ORIGIN( Va memory)
-and
-.Li LENGTH( Va memory)
-functions:
-.Pp
-.Bd -literal -offset indent
-
- _fstack = ORIGIN(ram) + LENGTH(ram) - 4;
-
-.Ed
-.Pp
-.Ss PHDRS Command
-The ELF object file format uses
-.Em program headers ,
-also knows as
-.Em segments .
-The program headers describe how the program should be loaded into memory.
-You can print them out by using the
-.Li objdump
-program with the
-.Li -p
-option.
-.Pp
-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.
-.Pp
-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
-.Li PHDRS
-command for this purpose. When the linker sees the
-.Li PHDRS
-command in the linker script, it will not create any program headers other
-than the ones specified.
-.Pp
-The linker only pays attention to the
-.Li PHDRS
-command when generating an ELF output file. In other cases, the linker will
-simply ignore
-.Li PHDRS .
-.Pp
-This is the syntax of the
-.Li PHDRS
-command. The words
-.Li PHDRS ,
-.Li FILEHDR ,
-.Li AT ,
-and
-.Li FLAGS
-are keywords.
-.Pp
-.Bd -literal -offset indent
-
-PHDRS
-{
- name type [ FILEHDR ] [ PHDRS ] [ AT ( address ) ]
- [ FLAGS ( flags ) ] ;
-}
-
-.Ed
-.Pp
-The
-.Va name
-is used only for reference in the
-.Li 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.
-.Pp
-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
-.Li : Va phdr
-output section attribute to place a section in a particular segment.See Section
-.Dq Output Section Phdr .
-.Pp
-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
-.Li : Va phdr ,
-using it once for each segment which should contain the section.
-.Pp
-If you place a section in one or more segments using
-.Li : Va phdr ,
-then the linker will place all subsequent allocatable sections which do not
-specify
-.Li : Va 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
-.Li :NONE
-to override the default segment and tell the linker to not put the section
-in any segment at all.
-.Pp
-You may use the
-.Li FILEHDR
-and
-.Li PHDRS
-keywords appear after the program header type to further describe the contents
-of the segment. The
-.Li FILEHDR
-keyword means that the segment should include the ELF file header. The
-.Li PHDRS
-keyword means that the segment should include the ELF program headers themselves.
-.Pp
-The
-.Va type
-may be one of the following. The numbers indicate the value of the keyword.
-.Pp
-.Bl -tag -width Ds
-.It Li PT_NULL (0)
-Indicates an unused program header.
-.Pp
-.It Li PT_LOAD (1)
-Indicates that this program header describes a segment to be loaded from the
-file.
-.Pp
-.It Li PT_DYNAMIC (2)
-Indicates a segment where dynamic linking information can be found.
-.Pp
-.It Li PT_INTERP (3)
-Indicates a segment where the name of the program interpreter may be found.
-.Pp
-.It Li PT_NOTE (4)
-Indicates a segment holding note information.
-.Pp
-.It Li PT_SHLIB (5)
-A reserved program header type, defined but not specified by the ELF ABI.
-.Pp
-.It Li PT_PHDR (6)
-Indicates a segment where the program headers may be found.
-.Pp
-.It Va expression
-An expression giving the numeric type of the program header. This may be used
-for types not defined above.
-.El
-.Pp
-You can specify that a segment should be loaded at a particular address in
-memory by using an
-.Li AT
-expression. This is identical to the
-.Li AT
-command used as an output section attribute (see Section
-.Dq Output Section LMA ) .
-The
-.Li AT
-command for a program header overrides the output section attribute.
-.Pp
-The linker will normally set the segment flags based on the sections which
-comprise the segment. You may use the
-.Li FLAGS
-keyword to explicitly specify the segment flags. The value of
-.Va flags
-must be an integer. It is used to set the
-.Li p_flags
-field of the program header.
-.Pp
-Here is an example of
-.Li PHDRS .
-This shows a typical set of program headers used on a native ELF system.
-.Pp
-.Bd -literal -offset indent
-
-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 */
- ...
- . = . + 0x1000; /* move to a new page in memory */
- .data : { *(.data) } :data
- .dynamic : { *(.dynamic) } :data :dynamic
- ...
-}
-
-.Ed
-.Pp
-.Ss VERSION Command
-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.
-.Pp
-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
-.Li --version-script
-linker option.
-.Pp
-The syntax of the
-.Li VERSION
-command is simply
-.Bd -literal -offset indent
-VERSION { version-script-commands }
-.Ed
-.Pp
-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.
-.Pp
-The easiest way to demonstrate the version script language is with a few examples.
-.Pp
-.Bd -literal -offset indent
-VERS_1.1 {
- global:
- foo1;
- local:
- old*;
- original*;
- new*;
-};
-
-VERS_1.2 {
- foo2;
-} VERS_1.1;
-
-VERS_2.0 {
- bar1; bar2;
- extern "C++" {
- ns::*;
- "int f(int, double)";
- }
-} VERS_1.2;
-.Ed
-.Pp
-This example version script defines three version nodes. The first version
-node defined is
-.Li VERS_1.1 ;
-it has no other dependencies. The script binds the symbol
-.Li foo1
-to
-.Li 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
-.Li old ,
-.Li original ,
-or
-.Li new
-is matched. The wildcard patterns available are the same as those used in
-the shell when matching filenames (also known as \(lqglobbing\(rq). However, if you
-specify the symbol name inside double quotes, then the name is treated as
-literal, rather than as a glob pattern.
-.Pp
-Next, the version script defines node
-.Li VERS_1.2 .
-This node depends upon
-.Li VERS_1.1 .
-The script binds the symbol
-.Li foo2
-to the version node
-.Li VERS_1.2 .
-.Pp
-Finally, the version script defines node
-.Li VERS_2.0 .
-This node depends upon
-.Li VERS_1.2 .
-The scripts binds the symbols
-.Li bar1
-and
-.Li bar2
-are bound to the version node
-.Li VERS_2.0 .
-.Pp
-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
-.Li global: *;
-somewhere in the version script.
-.Pp
-The names of the version nodes have no specific meaning other than what they
-might suggest to the person reading them. The
-.Li 2.0
-version could just as well have appeared in between
-.Li 1.1
-and
-.Li 1.2 .
-However, this would be a confusing way to write a version script.
-.Pp
-Node name can be omitted, provided it is the only version node in the version
-script. Such version script doesn't assign any versions to symbols, only selects
-which symbols will be globally visible out and which won't.
-.Pp
-.Bd -literal -offset indent
-{ global: foo; bar; local: *; };
-.Ed
-.Pp
-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.
-.Pp
-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.
-.Pp
-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:
-.Bd -literal -offset indent
-__asm__(".symver original_foo,foo@VERS_1.1");
-.Ed
-in the C source file. This renames the function
-.Li original_foo
-to be an alias for
-.Li foo
-bound to the version node
-.Li VERS_1.1 .
-The
-.Li local:
-directive can be used to prevent the symbol
-.Li original_foo
-from being exported. A
-.Li .symver
-directive takes precedence over a version script.
-.Pp
-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.
-.Pp
-To do this, you must use multiple
-.Li .symver
-directives in the source file. Here is an example:
-.Pp
-.Bd -literal -offset indent
-__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");
-.Ed
-.Pp
-In this example,
-.Li foo@
-represents the symbol
-.Li foo
-bound to the unspecified base version of the symbol. The source file that
-contains this example would define 4 C functions:
-.Li original_foo ,
-.Li old_foo ,
-.Li old_foo1 ,
-and
-.Li new_foo .
-.Pp
-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
-.Li foo@@VERS_2.0
-type of
-.Li .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.
-.Pp
-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.,
-.Li old_foo ) ,
-or you can use the
-.Li .symver
-directive to specifically bind to an external version of the function in question.
-.Pp
-You can also specify the language in the version script:
-.Pp
-.Bd -literal -offset indent
-VERSION extern "lang" { version-script-commands }
-.Ed
-.Pp
-The supported
-.Li lang
-s are
-.Li C ,
-.Li C++ ,
-and
-.Li Java .
-The linker will iterate over the list of symbols at the link time and demangle
-them according to
-.Li lang
-before matching them to the patterns specified in
-.Li version-script-commands .
-.Pp
-Demangled names may contains spaces and other special characters. As described
-above, you can use a glob pattern to match demangled names, or you can use
-a double-quoted string to match the string exactly. In the latter case, be
-aware that minor differences (such as differing whitespace) between the version
-script and the demangler output will cause a mismatch. As the exact string
-generated by the demangler might change in the future, even if the mangled
-name does not, you should check that all of your version directives are behaving
-as you expect when you upgrade.
-.Pp
-.Ss Expressions in Linker Scripts
-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.
-.Pp
-You can use and set symbol values in expressions.
-.Pp
-The linker defines several special purpose builtin functions for use in expressions.
-.Pp
-.Em Constants
-.Pp
-All constants are integers.
-.Pp
-As in C, the linker considers an integer beginning with
-.Li 0
-to be octal, and an integer beginning with
-.Li 0x
-or
-.Li 0X
-to be hexadecimal. The linker considers other integers to be decimal.
-.Pp
-In addition, you can use the suffixes
-.Li K
-and
-.Li M
-to scale a constant by
-.Li 1024
-or
-.Li 1024*1024
-respectively. For example, the following all refer to the same quantity:
-.Bd -literal -offset indent
-_fourk_1 = 4K;
-_fourk_2 = 4096;
-_fourk_3 = 0x1000;
-.Ed
-.Pp
-.Em Symbol Names
-.Pp
-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:
-.Bd -literal -offset indent
-"SECTION" = 9;
-"with a space" = "also with a space" + 10;
-.Ed
-.Pp
-Since symbols can contain many non-alphabetic characters, it is safest to
-delimit symbols with spaces. For example,
-.Li A-B
-is one symbol, whereas
-.Li A - B
-is an expression involving subtraction.
-.Pp
-.Em Orphan Sections
-.Pp
-Orphan sections are sections present in the input files which are not explicitly
-placed into the output file by the linker script. The linker will still copy
-these sections into the output file, but it has to guess as to where they
-should be placed. The linker uses a simple heuristic to do this. It attempts
-to place orphan sections after non-orphan sections of the same attribute,
-such as code vs data, loadable vs non-loadable, etc. If there is not enough
-room to do this then it places at the end of the file.
-.Pp
-For ELF targets, the attribute of the section includes section type as well
-as section flag.
-.Pp
-.Em The Location Counter
-.Pp
-The special linker variable
-.Em dot
-.Li .
-always contains the current output location counter. Since the
-.Li .
-always refers to a location in an output section, it may only appear in an
-expression within a
-.Li SECTIONS
-command. The
-.Li .
-symbol may appear anywhere that an ordinary symbol is allowed in an expression.
-.Pp
-Assigning a value to
-.Li .
-will cause the location counter to be moved. This may be used to create holes
-in the output section. The location counter may not be moved backwards inside
-an output section, and may not be moved backwards outside of an output section
-if so doing creates areas with overlapping LMAs.
-.Pp
-.Bd -literal -offset indent
-SECTIONS
-{
- output :
- {
- file1(.text)
- . = . + 1000;
- file2(.text)
- . += 1000;
- file3(.text)
- } = 0x12345678;
-}
-.Ed
-In the previous example, the
-.Li .text
-section from
-.Pa file1
-is located at the beginning of the output section
-.Li output .
-It is followed by a 1000 byte gap. Then the
-.Li .text
-section from
-.Pa file2
-appears, also with a 1000 byte gap following before the
-.Li .text
-section from
-.Pa file3 .
-The notation
-.Li = 0x12345678
-specifies what data to write in the gaps (see Section
-.Dq Output Section Fill ) .
-.Pp
-Note:
-.Li .
-actually refers to the byte offset from the start of the current containing
-object. Normally this is the
-.Li SECTIONS
-statement, whose start address is 0, hence
-.Li .
-can be used as an absolute address. If
-.Li .
-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:
-.Pp
-.Bd -literal -offset indent
-SECTIONS
-{
- . = 0x100
- .text: {
- *(.text)
- . = 0x200
- }
- . = 0x500
- .data: {
- *(.data)
- . += 0x600
- }
-}
-.Ed
-.Pp
-The
-.Li .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
-.Li .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
-.Li .
-backwards). The
-.Li .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
-.Li .data
-input sections and before the end of the
-.Li .data
-output section itself.
-.Pp
-Setting symbols to the value of the location counter outside of an output
-section statement can result in unexpected values if the linker needs to place
-orphan sections. For example, given the following:
-.Pp
-.Bd -literal -offset indent
-SECTIONS
-{
- start_of_text = . ;
- .text: { *(.text) }
- end_of_text = . ;
-
- start_of_data = . ;
- .data: { *(.data) }
- end_of_data = . ;
-}
-.Ed
-.Pp
-If the linker needs to place some input section, e.g.
-.Li .rodata ,
-not mentioned in the script, it might choose to place that section between
-.Li .text
-and
-.Li .data .
-You might think the linker should place
-.Li .rodata
-on the blank line in the above script, but blank lines are of no particular
-significance to the linker. As well, the linker doesn't associate the above
-symbol names with their sections. Instead, it assumes that all assignments
-or other statements belong to the previous output section, except for the
-special case of an assignment to
-.Li . .
-I.e., the linker will place the orphan
-.Li .rodata
-section as if the script was written as follows:
-.Pp
-.Bd -literal -offset indent
-SECTIONS
-{
- start_of_text = . ;
- .text: { *(.text) }
- end_of_text = . ;
-
- start_of_data = . ;
- .rodata: { *(.rodata) }
- .data: { *(.data) }
- end_of_data = . ;
-}
-.Ed
-.Pp
-This may or may not be the script author's intention for the value of
-.Li start_of_data .
-One way to influence the orphan section placement is to assign the location
-counter to itself, as the linker assumes that an assignment to
-.Li .
-is setting the start address of a following output section and thus should
-be grouped with that section. So you could write:
-.Pp
-.Bd -literal -offset indent
-SECTIONS
-{
- start_of_text = . ;
- .text: { *(.text) }
- end_of_text = . ;
-
- . = . ;
- start_of_data = . ;
- .data: { *(.data) }
- end_of_data = . ;
-}
-.Ed
-.Pp
-Now, the orphan
-.Li .rodata
-section will be placed between
-.Li end_of_text
-and
-.Li start_of_data .
-.Pp
-.Em Operators
-.Pp
-The linker recognizes the standard C set of arithmetic operators, with the
-standard bindings and precedence levels:
-.Bd -literal -offset indent
-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)
-.Ed
-Notes: (1) Prefix operators (2)See Section
-.Dq Assignments .
-.Pp
-.Em Evaluation
-.Pp
-The linker evaluates expressions lazily. It only computes the value of an
-expression when absolutely necessary.
-.Pp
-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.
-.Pp
-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.
-.Pp
-The sizes of sections cannot be known until after allocation, so assignments
-dependent upon these are not performed until after allocation.
-.Pp
-Some expressions, such as those depending upon the location counter
-.Li . ,
-must be evaluated during section allocation.
-.Pp
-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
-.Bd -literal -offset indent
-
-SECTIONS
- {
- .text 9+this_isnt_constant :
- { *(.text) }
- }
-
-.Ed
-will cause the error message
-.Li non constant expression for initial address .
-.Pp
-.Em The Section of an Expression
-.Pp
-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.
-.Pp
-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.
-.Pp
-A symbol set to a relative expression will be relocatable if you request relocatable
-output using the
-.Li -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.
-.Pp
-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.
-.Pp
-You can use the builtin function
-.Li 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
-.Li .data :
-.Bd -literal -offset indent
-SECTIONS
- {
- .data : { *(.data) _edata = ABSOLUTE(.); }
- }
-.Ed
-If
-.Li ABSOLUTE
-were not used,
-.Li _edata
-would be relative to the
-.Li .data
-section.
-.Pp
-.Em Builtin Functions
-.Pp
-The linker script language includes a number of builtin functions for use
-in linker script expressions.
-.Pp
-.Bl -tag -width Ds
-.It ABSOLUTE( Va exp)
-Return the absolute (non-relocatable, as opposed to non-negative) value of
-the expression
-.Va exp .
-Primarily useful to assign an absolute value to a symbol within a section
-definition, where symbol values are normally section relative.See Section
-.Dq Expression Section .
-.Pp
-.It ADDR( Va section)
-Return the absolute address (the VMA) of the named
-.Va section .
-Your script must previously have defined the location of that section. In
-the following example,
-.Li symbol_1
-and
-.Li symbol_2
-are assigned identical values:
-.Bd -literal -offset indent
-
-SECTIONS { ...
- .output1 :
- {
- start_of_output_1 = ABSOLUTE(.);
- ...
- }
- .output :
- {
- symbol_1 = ADDR(.output1);
- symbol_2 = start_of_output_1;
- }
-\&... }
-
-.Ed
-.Pp
-.It ALIGN( Va align)
-.It ALIGN( Va exp, Va align)
-Return the location counter (
-.Li . )
-or arbitrary expression aligned to the next
-.Va align
-boundary. The single operand
-.Li ALIGN
-doesn't change the value of the location counter---it just does arithmetic
-on it. The two operand
-.Li ALIGN
-allows an arbitrary expression to be aligned upwards (
-.Li ALIGN( Va align)
-is equivalent to
-.Li ALIGN(., Va align) ) .
-.Pp
-Here is an example which aligns the output
-.Li .data
-section to the next
-.Li 0x2000
-byte boundary after the preceding section and sets a variable within the section
-to the next
-.Li 0x8000
-boundary after the input sections:
-.Bd -literal -offset indent
-
-SECTIONS { ...
- .data ALIGN(0x2000): {
- *(.data)
- variable = ALIGN(0x8000);
- }
-\&... }
-
-.Ed
-The first use of
-.Li ALIGN
-in this example specifies the location of a section because it is used as
-the optional
-.Va address
-attribute of a section definition (see Section
-.Dq Output Section Address ) .
-The second use of
-.Li ALIGN
-is used to defines the value of a symbol.
-.Pp
-The builtin function
-.Li NEXT
-is closely related to
-.Li ALIGN .
-.Pp
-.It ALIGNOF( Va section)
-Return the alignment in bytes of the named
-.Va section ,
-if that section has been allocated. If the section has not been allocated
-when this is evaluated, the linker will report an error. In the following
-example, the alignment of the
-.Li .output
-section is stored as the first value in that section.
-.Bd -literal -offset indent
-
-SECTIONS{ ...
- .output {
- LONG (ALIGNOF (.output))
- ...
- }
-\&... }
-
-.Ed
-.Pp
-.It BLOCK( Va exp)
-This is a synonym for
-.Li ALIGN ,
-for compatibility with older linker scripts. It is most often seen when setting
-the address of an output section.
-.Pp
-.It DATA_SEGMENT_ALIGN( Va maxpagesize, Va commonpagesize)
-This is equivalent to either
-.Bd -literal -offset indent
-(ALIGN(maxpagesize) + (. & (maxpagesize - 1)))
-.Ed
-or
-.Bd -literal -offset indent
-(ALIGN(maxpagesize) + (. & (maxpagesize - commonpagesize)))
-.Ed
-depending on whether the latter uses fewer
-.Va commonpagesize
-sized pages for the data segment (area between the result of this expression
-and
-.Li DATA_SEGMENT_END )
-than the former or not. If the latter form is used, it means
-.Va commonpagesize
-bytes of runtime memory will be saved at the expense of up to
-.Va commonpagesize
-wasted bytes in the on-disk file.
-.Pp
-This expression can only be used directly in
-.Li SECTIONS
-commands, not in any output section descriptions and only once in the linker
-script.
-.Va commonpagesize
-should be less or equal to
-.Va maxpagesize
-and should be the system page size the object wants to be optimized for (while
-still working on system page sizes up to
-.Va maxpagesize ) .
-.Pp
-Example:
-.Bd -literal -offset indent
- . = DATA_SEGMENT_ALIGN(0x10000, 0x2000);
-.Ed
-.Pp
-.It DATA_SEGMENT_END( Va exp)
-This defines the end of data segment for
-.Li DATA_SEGMENT_ALIGN
-evaluation purposes.
-.Pp
-.Bd -literal -offset indent
- . = DATA_SEGMENT_END(.);
-.Ed
-.Pp
-.It DATA_SEGMENT_RELRO_END( Va offset, Va exp)
-This defines the end of the
-.Li PT_GNU_RELRO
-segment when
-.Li -z relro
-option is used. Second argument is returned. When
-.Li -z relro
-option is not present,
-.Li DATA_SEGMENT_RELRO_END
-does nothing, otherwise
-.Li DATA_SEGMENT_ALIGN
-is padded so that
-.Va exp
-+
-.Va offset
-is aligned to the most commonly used page boundary for particular target.
-If present in the linker script, it must always come in between
-.Li DATA_SEGMENT_ALIGN
-and
-.Li DATA_SEGMENT_END .
-.Pp
-.Bd -literal -offset indent
- . = DATA_SEGMENT_RELRO_END(24, .);
-.Ed
-.Pp
-.It DEFINED( Va symbol)
-Return 1 if
-.Va 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
-.Li begin
-to the first location in the
-.Li .text
-section---but if a symbol called
-.Li begin
-already existed, its value is preserved:
-.Pp
-.Bd -literal -offset indent
-
-SECTIONS { ...
- .text : {
- begin = DEFINED(begin) ? begin : . ;
- ...
- }
- ...
-}
-
-.Ed
-.Pp
-.It LENGTH( Va memory)
-Return the length of the memory region named
-.Va memory .
-.Pp
-.It LOADADDR( Va section)
-Return the absolute LMA of the named
-.Va section .
-This is normally the same as
-.Li ADDR ,
-but it may be different if the
-.Li AT
-attribute is used in the output section definition (see Section
-.Dq Output Section LMA ) .
-.Pp
-.It MAX( Va exp1, Va exp2)
-Returns the maximum of
-.Va exp1
-and
-.Va exp2 .
-.Pp
-.It MIN( Va exp1, Va exp2)
-Returns the minimum of
-.Va exp1
-and
-.Va exp2 .
-.Pp
-.It NEXT( Va exp)
-Return the next unallocated address that is a multiple of
-.Va exp .
-This function is closely related to
-.Li ALIGN( Va exp) ;
-unless you use the
-.Li MEMORY
-command to define discontinuous memory for the output file, the two functions
-are equivalent.
-.Pp
-.It ORIGIN( Va memory)
-Return the origin of the memory region named
-.Va memory .
-.Pp
-.It SEGMENT_START( Va segment, Va default)
-Return the base address of the named
-.Va segment .
-If an explicit value has been given for this segment (with a command-line
-.Li -T
-option) that value will be returned; otherwise the value will be
-.Va default .
-At present, the
-.Li -T
-command-line option can only be used to set the base address for the \(lqtext\(rq,
-\(lqdata\(rq, and \(lqbss\(rq sections, but you use
-.Li SEGMENT_START
-with any segment name.
-.Pp
-.It SIZEOF( Va section)
-Return the size in bytes of the named
-.Va 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,
-.Li symbol_1
-and
-.Li symbol_2
-are assigned identical values:
-.Bd -literal -offset indent
-
-SECTIONS{ ...
- .output {
- .start = . ;
- ...
- .end = . ;
- }
- symbol_1 = .end - .start ;
- symbol_2 = SIZEOF(.output);
-\&... }
-
-.Ed
-.Pp
-.It SIZEOF_HEADERS
-.It sizeof_headers
-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.
-.Pp
-When producing an ELF output file, if the linker script uses the
-.Li 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
-.Li not enough room for program headers .
-To avoid this error, you must avoid using the
-.Li 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
-.Li PHDRS
-command (see Section
-.Dq PHDRS ) .
-.El
-.Pp
-.Ss 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.
-.Pp
-An implicit linker script will not replace the default linker script.
-.Pp
-Typically an implicit linker script would contain only symbol assignments,
-or the
-.Li INPUT ,
-.Li GROUP ,
-or
-.Li VERSION
-commands.
-.Pp
-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.
-.Pp
-.Sh Machine Dependent Features
-.Xr ld
-has additional features on some platforms; the following sections describe
-them. Machines where
-.Xr ld
-has no additional functionality are not listed.
-.Pp
-.Ss Xr ld and the H8/300
-For the H8/300,
-.Xr ld
-can perform these global optimizations when you specify the
-.Li --relax
-command-line option.
-.Pp
-.Bl -tag -width Ds
-.It relaxing address modes
-.Xr ld
-finds all
-.Li jsr
-and
-.Li jmp
-instructions whose targets are within eight bits, and turns them into eight-bit
-program-counter relative
-.Li bsr
-and
-.Li bra
-instructions, respectively.
-.Pp
-.It synthesizing instructions
-.Xr ld
-finds all
-.Li 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
-.Li mov.b Li @ Va aa:16
-into
-.Li mov.b Li @ Va aa:8
-whenever the address
-.Va aa
-is in the top page of memory).
-.Pp
-.It bit manipulation instructions
-.Xr ld
-finds all bit manipulation instructions like
-.Li band, bclr, biand, bild, bior, bist, bixor, bld, bnot, bor, bset, bst, btst, bxor
-which use 32 bit and 16 bit absolute address form, but refer to the top page
-of memory, and changes them to use the 8 bit address form. (That is: the linker
-turns
-.Li bset #xx:3, Li @ Va aa:32
-into
-.Li bset #xx:3, Li @ Va aa:8
-whenever the address
-.Va aa
-is in the top page of memory).
-.Pp
-.It system control instructions
-.Xr ld
-finds all
-.Li ldc.w, stc.w
-instructions which use the 32 bit absolute address form, but refer to the
-top page of memory, and changes them to use 16 bit address form. (That is:
-the linker turns
-.Li ldc.w Li @ Va aa:32,ccr
-into
-.Li ldc.w Li @ Va aa:16,ccr
-whenever the address
-.Va aa
-is in the top page of memory).
-.El
-.Pp
-.Ss Xr ld and the Intel 960 Family
-You can use the
-.Li -A Va 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.
-.Pp
-For example, if your
-.Xr ld
-command line included
-.Li -ACA
-as well as
-.Li -ltry
-, the linker would look (in its built-in search paths, and in any paths you
-specify with
-.Li -L )
-for a library with the names
-.Pp
-.Bd -literal -offset indent
-
-try
-libtry.a
-tryca
-libtryca.a
-
-.Ed
-.Pp
-The first two possibilities would be considered in any event; the last two
-are due to the use of
-.Li -ACA
-\&.
-.Pp
-You can meaningfully use
-.Li -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
-.Li -l
-specifies a library.
-.Pp
-.Xr ld
-supports the
-.Li --relax
-option for the i960 family. If you specify
-.Li --relax ,
-.Xr ld
-finds all
-.Li balx
-and
-.Li calx
-instructions whose targets are within 24 bits, and turns them into 24-bit
-program-counter relative
-.Li bal
-and
-.Li cal
-instructions, respectively.
-.Xr ld
-also turns
-.Li cal
-instructions into
-.Li bal
-instructions when it determines that the target subroutine is a leaf routine
-(that is, the target subroutine does not itself call any subroutines).
-.Pp
-.Ss Xr ld and the Motorola 68HC11 and 68HC12 families
-.Em Linker Relaxation
-.Pp
-For the Motorola 68HC11,
-.Xr ld
-can perform these global optimizations when you specify the
-.Li --relax
-command-line option.
-.Pp
-.Bl -tag -width Ds
-.It relaxing address modes
-.Xr ld
-finds all
-.Li jsr
-and
-.Li jmp
-instructions whose targets are within eight bits, and turns them into eight-bit
-program-counter relative
-.Li bsr
-and
-.Li bra
-instructions, respectively.
-.Pp
-.Xr ld
-also looks at all 16-bit extended addressing modes and transforms them in
-a direct addressing mode when the address is in page 0 (between 0 and 0x0ff).
-.Pp
-.It relaxing gcc instruction group
-When
-.Xr gcc
-is called with
-.Op -mrelax ,
-it can emit group of instructions that the linker can optimize to use a 68HC11
-direct addressing mode. These instructions consists of
-.Li bclr
-or
-.Li bset
-instructions.
-.Pp
-.El
-.Em Trampoline Generation
-.Pp
-For 68HC11 and 68HC12,
-.Xr ld
-can generate trampoline code to call a far function using a normal
-.Li jsr
-instruction. The linker will also change the relocation to some far function
-to use the trampoline address instead of the function address. This is typically
-the case when a pointer to a function is taken. The pointer will in fact point
-to the function trampoline.
-.Pp
-The
-.Li --pic-veneer
-switch makes the linker use PIC sequences for ARM/Thumb interworking veneers,
-even if the rest of the binary is not PIC. This avoids problems on uClinux
-targets where
-.Li --emit-relocs
-is used to generate relocatable binaries.
-.Pp
-.Ss Xr ld and the ARM family
-For the ARM,
-.Xr ld
-will generate code stubs to allow functions calls between ARM and Thumb code.
-These stubs only work with code that has been compiled and assembled with
-the
-.Li -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
-.Li --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.
-.Pp
-The
-.Li --thumb-entry
-switch is a duplicate of the generic
-.Li --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.
-.Pp
-The
-.Li --be8
-switch instructs
-.Xr ld
-to generate BE8 format executables. This option is only valid when linking
-big-endian objects. The resulting image will contain big-endian data and little-endian
-code.
-.Pp
-The
-.Li R_ARM_TARGET1
-relocation is typically used for entries in the
-.Li .init_array
-section. It is interpreted as either
-.Li R_ARM_REL32
-or
-.Li R_ARM_ABS32 ,
-depending on the target. The
-.Li --target1-rel
-and
-.Li --target1-abs
-switches override the default.
-.Pp
-The
-.Li --target2=type
-switch overrides the default definition of the
-.Li R_ARM_TARGET2
-relocation. Valid values for
-.Li type ,
-their meanings, and target defaults are as follows:
-.Bl -tag -width Ds
-.It rel
-.Li R_ARM_REL32
-(arm*-*-elf, arm*-*-eabi)
-.It abs
-.Li R_ARM_ABS32
-(arm*-*-symbianelf)
-.It got-rel
-.Li R_ARM_GOT_PREL
-(arm*-*-linux, arm*-*-*bsd)
-.El
-.Pp
-The
-.Li R_ARM_V4BX
-relocation (defined by the ARM AAELF specification) enables objects compiled
-for the ARMv4 architecture to be interworking-safe when linked with other
-objects compiled for ARMv4t, but also allows pure ARMv4 binaries to be built
-from the same ARMv4 objects.
-.Pp
-In the latter case, the switch
-.Op --fix-v4bx
-must be passed to the linker, which causes v4t
-.Li BX rM
-instructions to be rewritten as
-.Li MOV PC,rM ,
-since v4 processors do not have a
-.Li BX
-instruction.
-.Pp
-In the former case, the switch should not be used, and
-.Li R_ARM_V4BX
-relocations are ignored.
-.Pp
-The
-.Li --use-blx
-switch enables the linker to use ARM/Thumb BLX instructions (available on
-ARMv5t and above) in various situations. Currently it is used to perform calls
-via the PLT from Thumb code using BLX rather than using BX and a mode-switching
-stub before each PLT entry. This should lead to such calls executing slightly
-faster.
-.Pp
-This option is enabled implicitly for SymbianOS, so there is no need to specify
-it if you are using that target.
-.Pp
-The
-.Li --vfp11-denorm-fix
-switch enables a link-time workaround for a bug in certain VFP11 coprocessor
-hardware, which sometimes allows instructions with denorm operands (which
-must be handled by support code) to have those operands overwritten by subsequent
-instructions before the support code can read the intended values.
-.Pp
-The bug may be avoided in scalar mode if you allow at least one intervening
-instruction between a VFP11 instruction which uses a register and another
-instruction which writes to the same register, or at least two intervening
-instructions if vector mode is in use. The bug only affects full-compliance
-floating-point mode: you do not need this workaround if you are using "runfast"
-mode. Please contact ARM for further details.
-.Pp
-If you know you are using buggy VFP11 hardware, you can enable this workaround
-by specifying the linker option
-.Li --vfp-denorm-fix=scalar
-if you are using the VFP11 scalar mode only, or
-.Li --vfp-denorm-fix=vector
-if you are using vector mode (the latter also works for scalar code). The
-default is
-.Li --vfp-denorm-fix=none .
-.Pp
-If the workaround is enabled, instructions are scanned for potentially-troublesome
-sequences, and a veneer is created for each such sequence which may trigger
-the erratum. The veneer consists of the first instruction of the sequence
-and a branch back to the subsequent instruction. The original instruction
-is then replaced with a branch to the veneer. The extra cycles required to
-call and return from the veneer are sufficient to avoid the erratum in both
-the scalar and vector cases.
-.Pp
-The
-.Li --no-enum-size-warning
-switch prevents the linker from warning when linking object files that specify
-incompatible EABI enumeration size attributes. For example, with this switch
-enabled, linking of an object file using 32-bit enumeration values with another
-using enumeration values fitted into the smallest possible space will not
-be diagnosed.
-.Pp
-.Ss Xr ld and HPPA 32-bit ELF Support
-When generating a shared library,
-.Xr ld
-will by default generate import stubs suitable for use with a single sub-space
-application. The
-.Li --multi-subspace
-switch causes
-.Xr ld
-to generate export stubs, and different (larger) import stubs suitable for
-use with multiple sub-spaces.
-.Pp
-Long branch stubs and import/export stubs are placed by
-.Xr ld
-in stub sections located between groups of input sections.
-.Li --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
-.Li N
-chooses this scheme, ensuring that branches to stubs always use a negative
-offset. Two special values of
-.Li N
-are recognized,
-.Li 1
-and
-.Li -1 .
-These both instruct
-.Xr 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
-.Li N
-respectively.
-.Pp
-Note that
-.Li --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.
-.Pp
-.Ss Li ld and MMIX
-For MMIX, there is a choice of generating
-.Li ELF
-object files or
-.Li mmo
-object files when linking. The simulator
-.Li mmix
-understands the
-.Li mmo
-format. The binutils
-.Li objcopy
-utility can translate between the two formats.
-.Pp
-There is one special section, the
-.Li .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
-.Li .MMIX.reg_contents
-section corresponds to the first allocated global register multiplied by 8.
-Register
-.Li $255
-is not included in this section; it is always set to the program entry, which
-is at the symbol
-.Li Main
-for
-.Li mmo
-files.
-.Pp
-Symbols with the prefix
-.Li __.MMIX.start. ,
-for example
-.Li __.MMIX.start..text
-and
-.Li __.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.
-.Pp
-Initial and trailing multiples of zero-valued 32-bit words in a section, are
-left out from an mmo file.
-.Pp
-.Ss Li ld and MSP430
-For the MSP430 it is possible to select the MPU architecture. The flag
-.Li -m [mpu type]
-will select an appropriate linker script for selected MPU type. (To get a
-list of known MPUs just pass
-.Li -m help
-option to the linker).
-.Pp
-The linker will recognize some extra sections which are MSP430 specific:
-.Pp
-.Bl -tag -width Ds
-.It Li .vectors
-Defines a portion of ROM where interrupt vectors located.
-.Pp
-.It Li .bootloader
-Defines the bootloader portion of the ROM (if applicable). Any code in this
-section will be uploaded to the MPU.
-.Pp
-.It Li .infomem
-Defines an information memory section (if applicable). Any code in this section
-will be uploaded to the MPU.
-.Pp
-.It Li .infomemnobits
-This is the same as the
-.Li .infomem
-section except that any code in this section will not be uploaded to the MPU.
-.Pp
-.It Li .noinit
-Denotes a portion of RAM located above
-.Li .bss
-section.
-.Pp
-The last two sections are used by gcc.
-.El
-.Pp
-.Ss Xr ld and PowerPC 32-bit ELF Support
-Branches on PowerPC processors are limited to a signed 26-bit displacement,
-which may result in
-.Xr ld
-giving
-.Li relocation truncated to fit
-errors with very large programs.
-.Li --relax
-enables the generation of trampolines that can access the entire 32-bit address
-space. These trampolines are inserted at section boundaries, so may not themselves
-be reachable if an input section exceeds 33M in size.
-.Pp
-.Bl -tag -width Ds
-.It --bss-plt
-Current PowerPC GCC accepts a
-.Li -msecure-plt
-option that generates code capable of using a newer PLT and GOT layout that
-has the security advantage of no executable section ever needing to be writable
-and no writable section ever being executable. PowerPC
-.Xr ld
-will generate this layout, including stubs to access the PLT, if all input
-files (including startup and static libraries) were compiled with
-.Li -msecure-plt .
-.Li --bss-plt
-forces the old BSS PLT (and GOT layout) which can give slightly better performance.
-.Pp
-.It --secure-plt
-.Xr ld
-will use the new PLT and GOT layout if it is linking new
-.Li -fpic
-or
-.Li -fPIC
-code, but does not do so automatically when linking non-PIC code. This option
-requests the new PLT and GOT layout. A warning will be given if some object
-file requires the old style BSS PLT.
-.Pp
-.It --sdata-got
-The new secure PLT and GOT are placed differently relative to other sections
-compared to older BSS PLT and GOT placement. The location of
-.Li .plt
-must change because the new secure PLT is an initialized section while the
-old PLT is uninitialized. The reason for the
-.Li .got
-change is more subtle: The new placement allows
-.Li .got
-to be read-only in applications linked with
-.Li -z relro -z now .
-However, this placement means that
-.Li .sdata
-cannot always be used in shared libraries, because the PowerPC ABI accesses
-.Li .sdata
-in shared libraries from the GOT pointer.
-.Li --sdata-got
-forces the old GOT placement. PowerPC GCC doesn't use
-.Li .sdata
-in shared libraries, so this option is really only useful for other compilers
-that may do so.
-.Pp
-.It --emit-stub-syms
-This option causes
-.Xr ld
-to label linker stubs with a local symbol that encodes the stub type and destination.
-.Pp
-.It --no-tls-optimize
-PowerPC
-.Xr ld
-normally performs some optimization of code sequences used to access Thread-Local
-Storage. Use this option to disable the optimization.
-.El
-.Pp
-.Ss Xr ld and PowerPC64 64-bit ELF Support
-.Bl -tag -width Ds
-.It --stub-group-size
-Long branch stubs, PLT call stubs and TOC adjusting stubs are placed by
-.Xr ld
-in stub sections located between groups of input sections.
-.Li --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
-.Li N
-chooses this scheme, ensuring that branches to stubs always use a negative
-offset. Two special values of
-.Li N
-are recognized,
-.Li 1
-and
-.Li -1 .
-These both instruct
-.Xr 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
-.Li N
-respectively.
-.Pp
-Note that
-.Li --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.
-.Pp
-.It --emit-stub-syms
-This option causes
-.Xr ld
-to label linker stubs with a local symbol that encodes the stub type and destination.
-.Pp
-.It --dotsyms, --no-dotsyms
-These two options control how
-.Xr ld
-interprets version patterns in a version script. Older PowerPC64 compilers
-emitted both a function descriptor symbol with the same name as the function,
-and a code entry symbol with the name prefixed by a dot (
-.Li . ) .
-To properly version a function
-.Li foo ,
-the version script thus needs to control both
-.Li foo
-and
-.Li .foo .
-The option
-.Li --dotsyms ,
-on by default, automatically adds the required dot-prefixed patterns. Use
-.Li --no-dotsyms
-to disable this feature.
-.Pp
-.It --no-tls-optimize
-PowerPC64
-.Xr ld
-normally performs some optimization of code sequences used to access Thread-Local
-Storage. Use this option to disable the optimization.
-.Pp
-.It --no-opd-optimize
-PowerPC64
-.Xr ld
-normally removes
-.Li .opd
-section entries corresponding to deleted link-once functions, or functions
-removed by the action of
-.Li --gc-sections
-or linker scrip
-.Li /DISCARD/ .
-Use this option to disable
-.Li .opd
-optimization.
-.Pp
-.It --non-overlapping-opd
-Some PowerPC64 compilers have an option to generate compressed
-.Li .opd
-entries spaced 16 bytes apart, overlapping the third word, the static chain
-pointer (unused in C) with the first word of the next entry. This option expands
-such entries to the full 24 bytes.
-.Pp
-.It --no-toc-optimize
-PowerPC64
-.Xr ld
-normally removes unused
-.Li .toc
-section entries. Such entries are detected by examining relocations that reference
-the TOC in code sections. A reloc in a deleted code section marks a TOC word
-as unneeded, while a reloc in a kept code section marks a TOC word as needed.
-Since the TOC may reference itself, TOC relocs are also examined. TOC words
-marked as both needed and unneeded will of course be kept. TOC words without
-any referencing reloc are assumed to be part of a multi-word entry, and are
-kept or discarded as per the nearest marked preceding word. This works reliably
-for compiler generated code, but may be incorrect if assembly code is used
-to insert TOC entries. Use this option to disable the optimization.
-.Pp
-.It --no-multi-toc
-By default, PowerPC64 GCC generates code for a TOC model where TOC entries
-are accessed with a 16-bit offset from r2. This limits the total TOC size
-to 64K. PowerPC64
-.Xr ld
-extends this limit by grouping code sections such that each group uses less
-than 64K for its TOC entries, then inserts r2 adjusting stubs between inter-group
-calls.
-.Xr ld
-does not split apart input sections, so cannot help if a single input file
-has a
-.Li .toc
-section that exceeds 64K, most likely from linking multiple files with
-.Xr ld -r .
-Use this option to turn off this feature.
-.El
-.Pp
-.Ss Xr ld and SPU ELF Support
-.Bl -tag -width Ds
-.It --plugin
-This option marks an executable as a PIC plugin module.
-.Pp
-.It --no-overlays
-Normally,
-.Xr ld
-recognizes calls to functions within overlay regions, and redirects such calls
-to an overlay manager via a stub.
-.Xr ld
-also provides a built-in overlay manager. This option turns off all this special
-overlay handling.
-.Pp
-.It --emit-stub-syms
-This option causes
-.Xr ld
-to label overlay stubs with a local symbol that encodes the stub type and
-destination.
-.Pp
-.It --extra-overlay-stubs
-This option causes
-.Xr ld
-to add overlay call stubs on all function calls out of overlay regions. Normally
-stubs are not added on calls to non-overlay regions.
-.Pp
-.It --local-store=lo:hi
-.Xr ld
-usually checks that a final executable for SPU fits in the address range 0
-to 256k. This option may be used to change the range. Disable the check entirely
-with
-.Op --local-store=0:0 .
-.Pp
-.It --stack-analysis
-SPU local store space is limited. Over-allocation of stack space unnecessarily
-limits space available for code and data, while under-allocation results in
-runtime failures. If given this option,
-.Xr ld
-will provide an estimate of maximum stack usage.
-.Xr ld
-does this by examining symbols in code sections to determine the extents of
-functions, and looking at function prologues for stack adjusting instructions.
-A call-graph is created by looking for relocations on branch instructions.
-The graph is then searched for the maximum stack usage path. Note that this
-analysis does not find calls made via function pointers, and does not handle
-recursion and other cycles in the call graph. Stack usage may be under-estimated
-if your code makes such calls. Also, stack usage for dynamic allocation, e.g.
-alloca, will not be detected. If a link map is requested, detailed information
-about each function's stack usage and calls will be given.
-.Pp
-.It --emit-stack-syms
-This option, if given along with
-.Op --stack-analysis
-will result in
-.Xr ld
-emitting stack sizing symbols for each function. These take the form
-.Li __stack_<function_name>
-for global functions, and
-.Li __stack_<number>_<function_name>
-for static functions.
-.Li <number>
-is the section id in hex. The value of such symbols is the stack requirement
-for the corresponding function. The symbol size will be zero, type
-.Li STT_NOTYPE ,
-binding
-.Li STB_LOCAL ,
-and section
-.Li SHN_ABS .
-.El
-.Pp
-.Ss Xr ld's Support for Various TI COFF Versions
-The
-.Li --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;
-.Xr ld
-will read any version or byte order, but the output header format depends
-on the default specified by the specific target.
-.Pp
-.Ss Xr ld and WIN32 (cygwin/mingw)
-This section describes some of the win32 specific
-.Xr ld
-issues. See Options,,Command Line Options for detailed description of the
-command line options mentioned here.
-.Pp
-.Bl -tag -width Ds
-.It 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
-.Xr ld
-have specific support for creating such libraries provided with the
-.Li --out-implib
-command line option.
-.Pp
-.It exporting DLL symbols
-The cygwin/mingw
-.Xr ld
-has several ways to export symbols for dll's.
-.Pp
-.Bl -tag -width Ds
-.It using auto-export functionality
-By default
-.Xr ld
-exports symbols with the auto-export functionality, which is controlled by
-the following command line options:
-.Pp
-.Bl -bullet
-.It
---export-all-symbols [This is the default]
-.It
---exclude-symbols
-.It
---exclude-libs
-.El
-.Pp
-If, however,
-.Li --export-all-symbols
-is not given explicitly on the command line, then the default auto-export
-behavior will be
-.Em disabled
-if either of the following are true:
-.Pp
-.Bl -bullet
-.It
-A DEF file is used.
-.It
-Any symbol in any object file was marked with the __declspec(dllexport) attribute.
-.El
-.Pp
-.It 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
-.Li <dll name>.def
-and is added as any other object file to the linker's command line. The file's
-name must end in
-.Li .def
-or
-.Li .DEF .
-.Pp
-.Bd -literal -offset indent
-gcc -o <output> <objectfiles> <dll name>.def
-.Ed
-.Pp
-Using a DEF file turns off the normal auto-export behavior, unless the
-.Li --export-all-symbols
-option is also used.
-.Pp
-Here is an example of a DEF file for a shared library called
-.Li xyz.dll :
-.Pp
-.Bd -literal -offset indent
-LIBRARY "xyz.dll" BASE=0x20000000
-
-EXPORTS
-foo
-bar
-_bar = bar
-another_foo = abc.dll.afoo
-var1 DATA
-.Ed
-.Pp
-This example defines a DLL with a non-default base address and five symbols
-in the export table. The third exported symbol
-.Li _bar
-is an alias for the second. The fourth symbol,
-.Li another_foo
-is resolved by "forwarding" to another module and treating it as an alias
-for
-.Li afoo
-exported from the DLL
-.Li abc.dll .
-The final symbol
-.Li var1
-is declared to be a data object.
-.Pp
-The optional
-.Li LIBRARY <name>
-command indicates the
-.Em internal
-name of the output DLL. If
-.Li <name>
-does not include a suffix, the default library suffix,
-.Li .DLL
-is appended.
-.Pp
-When the .DEF file is used to build an application, rather than a library,
-the
-.Li NAME <name>
-command should be used instead of
-.Li LIBRARY .
-If
-.Li <name>
-does not include a suffix, the default executable suffix,
-.Li .EXE
-is appended.
-.Pp
-With either
-.Li LIBRARY <name>
-or
-.Li NAME <name>
-the optional specification
-.Li BASE = <number>
-may be used to specify a non-default base address for the image.
-.Pp
-If neither
-.Li LIBRARY <name>
-nor
-.Li NAME <name>
-is specified, or they specify an empty string, the internal name is the same
-as the filename specified on the command line.
-.Pp
-The complete specification of an export symbol is:
-.Pp
-.Bd -literal -offset indent
-EXPORTS
- ( ( ( <name1> [ = <name2> ] )
- | ( <name1> = <module-name> . <external-name>))
- [ @ <integer> ] [NONAME] [DATA] [CONSTANT] [PRIVATE] ) *
-.Ed
-.Pp
-Declares
-.Li <name1>
-as an exported symbol from the DLL, or declares
-.Li <name1>
-as an exported alias for
-.Li <name2> ;
-or declares
-.Li <name1>
-as a "forward" alias for the symbol
-.Li <external-name>
-in the DLL
-.Li <module-name> .
-Optionally, the symbol may be exported by the specified ordinal
-.Li <integer>
-alias.
-.Pp
-The optional keywords that follow the declaration indicate:
-.Pp
-.Li NONAME :
-Do not put the symbol name in the DLL's export table. It will still be exported
-by its ordinal alias (either the value specified by the .def specification
-or, otherwise, the value assigned by the linker). The symbol name, however,
-does remain visible in the import library (if any), unless
-.Li PRIVATE
-is also specified.
-.Pp
-.Li DATA :
-The symbol is a variable or object, rather than a function. The import lib
-will export only an indirect reference to
-.Li foo
-as the symbol
-.Li _imp__foo
-(ie,
-.Li foo
-must be resolved as
-.Li *_imp__foo ) .
-.Pp
-.Li CONSTANT :
-Like
-.Li DATA ,
-but put the undecorated
-.Li foo
-as well as
-.Li _imp__foo
-into the import library. Both refer to the read-only import address table's
-pointer to the variable, not to the variable itself. This can be dangerous.
-If the user code fails to add the
-.Li dllimport
-attribute and also fails to explicitly add the extra indirection that the
-use of the attribute enforces, the application will behave unexpectedly.
-.Pp
-.Li PRIVATE :
-Put the symbol in the DLL's export table, but do not put it into the static
-import library used to resolve imports at link time. The symbol can still
-be imported using the
-.Li LoadLibrary/GetProcAddress
-API at runtime or by by using the GNU ld extension of linking directly to
-the DLL without an import library. See ld/deffilep.y in the binutils sources
-for the full specification of other DEF file statements
-.Pp
-While linking a shared dll,
-.Xr ld
-is able to create a DEF file with the
-.Li --output-def <file>
-command line option.
-.Pp
-.It 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:
-.Pp
-.Bd -literal -offset indent
-__declspec(dllexport) int a_variable
-__declspec(dllexport) void a_function(int with_args)
-.Ed
-.Pp
-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
-.Li --export-all-symbols
-option is also used.
-.Pp
-Note that object files that wish to access these symbols must
-.Em not
-decorate them with dllexport. Instead, they should use dllimport, instead:
-.Pp
-.Bd -literal -offset indent
-__declspec(dllimport) int a_variable
-__declspec(dllimport) void a_function(int with_args)
-.Ed
-.Pp
-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
-.Li --enable-auto-import
-and
-.Li automatic data imports
-for more information.
-.El
-.Pp
-.It 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 achieve a behavior that conforms to that on POSIX/Un*x platforms. This
-feature is enabled with the
-.Li --enable-auto-import
-command-line option, although it is enabled by default on cygwin/mingw. The
-.Li --enable-auto-import
-option itself now serves mainly to suppress any warnings that are ordinarily
-emitted when linked objects trigger the feature's use.
-.Pp
-auto-import of variables does not always work flawlessly without additional
-assistance. Sometimes, you will see this message
-.Pp
-"variable '<var>' can't be auto-imported. Please read the documentation for
-ld's
-.Li --enable-auto-import
-for details."
-.Pp
-The
-.Li --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
-.Em runtime pseudo-relocs
-feature, described below.
-.Pp
-For complex variables imported from DLLs (such as structs or classes), object
-files typically contain a base address for the variable and an offset (
-.Em 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.
-.Pp
-The
-.Li --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.
-.Pp
-.Li --enable-runtime-pseudo-relocs
-is not the default; it must be explicitly enabled as needed.
-.Pp
-.It direct linking to a dll
-The cygwin/mingw ports of
-.Xr 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, especially when linking large
-libraries or applications. When
-.Xr 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.
-.Pp
-Linking directly to a dll uses no extra command-line switches other than
-.Li -L
-and
-.Li -l ,
-because
-.Xr 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.
-.Pp
-For instance, when ld is called with the argument
-.Li -lxxx
-it will attempt to find, in the first directory of its search path,
-.Pp
-.Bd -literal -offset indent
-libxxx.dll.a
-xxx.dll.a
-libxxx.a
-xxx.lib
-cygxxx.dll (*)
-libxxx.dll
-xxx.dll
-.Ed
-.Pp
-before moving on to the next directory in the search path.
-.Pp
-(*) Actually, this is not
-.Li cygxxx.dll
-but in fact is
-.Li <prefix>xxx.dll ,
-where
-.Li <prefix>
-is set by the
-.Xr ld
-option
-.Li --dll-search-prefix=<prefix> .
-In the case of cygwin, the standard gcc spec file includes
-.Li --dll-search-prefix=cyg ,
-so in effect we actually search for
-.Li cygxxx.dll .
-.Pp
-Other win32-based unix environments, such as mingw or pw32, may use other
-.Li <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.
-.Pp
-The generic cygwin/mingw path layout uses a
-.Li bin
-directory for applications and dll's and a
-.Li lib
-directory for the import libraries (using cygwin nomenclature):
-.Pp
-.Bd -literal -offset indent
-bin/
- cygxxx.dll
-lib/
- libxxx.dll.a (in case of dll's)
- libxxx.a (in case of static archive)
-.Ed
-.Pp
-Linking directly to a dll without using the import library can be done two
-ways:
-.Pp
-1. Use the dll directly by adding the
-.Li bin
-path to the link line
-.Bd -literal -offset indent
-gcc -Wl,-verbose -o a.exe -L../bin/ -lxxx
-.Ed
-.Pp
-However, as the dll's often have version numbers appended to their names (
-.Li cygncurses-5.dll )
-this will often fail, unless one specifies
-.Li -L../bin -lncurses-5
-to include the version. Import libs are generally not versioned, and do not
-have this difficulty.
-.Pp
-2. Create a symbolic link from the dll to a file in the
-.Li 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.
-.Pp
-.Bd -literal -offset indent
-ln -s bin/cygxxx.dll lib/[cyg|lib|]xxx.dll[.a]
-.Ed
-.Pp
-Then you can link without any make environment changes.
-.Pp
-.Bd -literal -offset indent
-gcc -Wl,-verbose -o a.exe -L../lib/ -lxxx
-.Ed
-.Pp
-This technique also avoids the version number problems, because the following
-is perfectly legal
-.Pp
-.Bd -literal -offset indent
-bin/
- cygxxx-5.dll
-lib/
- libxxx.dll.a -> ../bin/cygxxx-5.dll
-.Ed
-.Pp
-Linking directly to a dll without using an import lib will work even when
-auto-import features are exercised, and even when
-.Li --enable-runtime-pseudo-relocs
-is used.
-.Pp
-Given the improvements in speed and memory usage, one might justifiably wonder
-why import libraries are used at all. There are three reasons:
-.Pp
-1. Until recently, the link-directly-to-dll functionality did
-.Em not
-work with auto-imported data.
-.Pp
-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.
-.Pp
-3. Symbol aliases can only be resolved using an import lib. This is critical
-when linking against OS-supplied dll's (eg, the win32 API) in which symbols
-are usually exported as undecorated aliases of their stdcall-decorated assembly
-names.
-.Pp
-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 many cases, is
-a useful addition to the suite of tools binutils makes available to the win32
-developer. Given the massive improvements in memory requirements during linking,
-storage requirements, and linking speed, we expect that many developers will
-soon begin to use this feature whenever possible.
-.Pp
-.It symbol aliasing
-.Bl -tag -width Ds
-.It adding additional names
-Sometimes, it is useful to export symbols with additional names. A symbol
-.Li foo
-will be exported as
-.Li foo ,
-but it can also be exported as
-.Li _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:
-.Pp
-.Bd -literal -offset indent
-LIBRARY "xyz.dll" BASE=0x61000000
-
-EXPORTS
-foo
-_foo = foo
-.Ed
-.Pp
-The line
-.Li _foo = foo
-maps the symbol
-.Li foo
-to
-.Li _foo .
-.Pp
-Another method for creating a symbol alias is to create it in the source code
-using the "weak" attribute:
-.Pp
-.Bd -literal -offset indent
-void foo () { /* Do something. */; }
-void _foo () __attribute__ ((weak, alias ("foo")));
-.Ed
-.Pp
-See the gcc manual for more information about attributes and weak symbols.
-.Pp
-.It renaming symbols
-Sometimes it is useful to rename exports. For instance, the cygwin kernel
-does this regularly. A symbol
-.Li _foo
-can be exported as
-.Li foo
-but not as
-.Li _foo
-by using special directives in the DEF file. (This will also affect the import
-library, if it is created). In the following example:
-.Pp
-.Bd -literal -offset indent
-LIBRARY "xyz.dll" BASE=0x61000000
-
-EXPORTS
-_foo = foo
-.Ed
-.Pp
-The line
-.Li _foo = foo
-maps the exported symbol
-.Li foo
-to
-.Li _foo .
-.El
-.Pp
-Note: using a DEF file disables the default auto-export behavior, unless the
-.Li --export-all-symbols
-command line option is used. If, however, you are trying to rename symbols,
-then you should list
-.Em all
-desired exports in the DEF file, including the symbols that are not being
-renamed, and do
-.Em not
-use the
-.Li --export-all-symbols
-option. If you list only the renamed symbols in the DEF file, and use
-.Li --export-all-symbols
-to handle the other symbols, then the both the new names
-.Em 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.
-.Pp
-.It weak externals
-The Windows object format, PE, specifies a form of weak symbols called weak
-externals. When a weak symbol is linked and the symbol is not defined, the
-weak symbol becomes an alias for some other symbol. There are three variants
-of weak externals:
-.Bl -bullet
-.It
-Definition is searched for in objects and libraries, historically
-called lazy externals.
-.It
-Definition is searched for only in other objects, not in libraries.
-This form is not presently implemented.
-.It
-No search; the symbol is an alias. This form is not presently
-implemented.
-.El
-As a GNU extension, weak symbols that do not specify an alternate symbol are
-supported. If the symbol is undefined when linking, the symbol uses a default
-value.
-.El
-.Pp
-.Ss Li ld and Xtensa Processors
-The default
-.Xr ld
-behavior for Xtensa processors is to interpret
-.Li 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:
-.Pp
-.Bd -literal -offset indent
-SECTIONS
-{
- .text : {
- *(.literal .text)
- }
-}
-.Ed
-.Pp
-.Xr ld
-may interleave some of the
-.Li .literal
-and
-.Li .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
-.Li .literal
-sections from an initial group of files followed by the
-.Li .text
-sections of that group of files. Then, the
-.Li .literal
-sections from the rest of the files and the
-.Li .text
-sections from the rest of the files would follow.
-.Pp
-Relaxation is enabled by default for the Xtensa version of
-.Xr ld
-and provides two important link-time optimizations. The first optimization
-is to combine identical literal values to reduce code size. A redundant literal
-will be removed and all the
-.Li L32R
-instructions that use it will be changed to reference an identical literal,
-as long as the location of the replacement literal is within the offset range
-of all the
-.Li L32R
-instructions. The second optimization is to remove unnecessary overhead from
-assembler-generated \(lqlongcall\(rq sequences of
-.Li L32R
-/
-.Li CALLX Va n
-when the target functions are within range of direct
-.Li CALL Va n
-instructions.
-.Pp
-For each of these cases where an indirect call sequence can be optimized to
-a direct call, the linker will change the
-.Li CALLX Va n
-instruction to a
-.Li CALL Va n
-instruction, remove the
-.Li L32R
-instruction, and remove the literal referenced by the
-.Li L32R
-instruction if it is not used for anything else. Removing the
-.Li L32R
-instruction always reduces code size but can potentially hurt performance
-by changing the alignment of subsequent branch targets. By default, the linker
-will always preserve alignments, either by switching some instructions between
-24-bit encodings and the equivalent density instructions or by inserting a
-no-op in place of the
-.Li L32R
-instruction that was removed. If code size is more important than performance,
-the
-.Op --size-opt
-option can be used to prevent the linker from widening density instructions
-or inserting no-ops, except in a few cases where no-ops are required for correctness.
-.Pp
-The following Xtensa-specific command-line options can be used to control
-the linker:
-.Pp
-.Bl -tag -width Ds
-.It --no-relax
-Since the Xtensa version of
-.Li ld
-enables the
-.Op --relax
-option by default, the
-.Op --no-relax
-option is provided to disable relaxation.
-.Pp
-.It --size-opt
-When optimizing indirect calls to direct calls, optimize for code size more
-than performance. With this option, the linker will not insert no-ops or widen
-density instructions to preserve branch target alignment. There may still
-be some cases where no-ops are required to preserve the correctness of the
-code.
-.El
-.Pp
-.Sh BFD
-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
-.Li objdump -i
-(see Section
-.Dq objdump )
-to list all the formats available for your configuration.
-.Pp
-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.
-.Pp
-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.See Section
-.Dq BFD information loss .
-.Pp
-.Ss How It Works: An Outline of BFD
-When an object file is opened, BFD subroutines automatically determine the
-format of the input object file. They then build a descriptor in memory with
-pointers to routines that will be used to access elements of the object file's
-data structures.
-.Pp
-As different information from the object files is required, BFD reads from
-different sections of the file and processes them. For example, a very common
-operation for the linker is processing symbol tables. Each BFD back end provides
-a routine for converting between the object file's representation of symbols
-and an internal canonical format. When the linker asks for the symbol table
-of an object file, it calls through a memory pointer to the routine from the
-relevant BFD back end which reads and converts the table into a canonical
-form. The linker then operates upon the canonical form. When the link is finished
-and the linker writes the output file's symbol table, another BFD back end
-routine is called to take the newly created symbol table and convert it into
-the chosen output format.
-.Pp
-.Em Information Loss
-.Pp
-.Em Information can be lost during output.
-The output formats supported by BFD do not provide identical facilities, and
-information which can be described in one form has nowhere to go in another
-format. One example of this is alignment information in
-.Li b.out .
-There is nowhere in an
-.Li a.out
-format file to store alignment information on the contained data, so when
-a file is linked from
-.Li b.out
-and an
-.Li a.out
-image is produced, alignment information will not propagate to the output
-file. (The linker will still use the alignment information internally, so
-the link is performed correctly).
-.Pp
-Another example is COFF section names. COFF files may contain an unlimited
-number of sections, each one with a textual section name. If the target of
-the link is a format which does not have many sections (e.g.,
-.Li a.out )
-or has sections without names (e.g., the Oasys format), the link cannot be
-done simply. You can circumvent this problem by describing the desired input-to-output
-section mapping with the linker command language.
-.Pp
-.Em Information can be lost during canonicalization.
-The BFD internal canonical form of the external formats is not exhaustive;
-there are structures in input formats for which there is no direct representation
-internally. This means that the BFD back ends cannot maintain all possible
-data richness through the transformation between external to internal and
-back to external formats.
-.Pp
-This limitation is only a problem when an application reads one format and
-writes another. Each BFD back end is responsible for maintaining as much data
-as possible, and the internal BFD canonical form has structures which are
-opaque to the BFD core, and exported only to the back ends. When a file is
-read in one format, the canonical form is generated for BFD and the application.
-At the same time, the back end saves away any information which may otherwise
-be lost. If the data is then written back in the same format, the back end
-routine will be able to use the canonical form provided by the BFD core as
-well as the information it prepared earlier. Since there is a great deal of
-commonality between back ends, there is no information lost when linking or
-copying big endian COFF to little endian COFF, or
-.Li a.out
-to
-.Li b.out .
-When a mixture of formats is linked, the information is only lost from the
-files whose format differs from the destination.
-.Pp
-.Em The BFD canonical object-file format
-.Pp
-The greatest potential for loss of information occurs when there is the least
-overlap between the information provided by the source format, that stored
-by the canonical format, and that needed by the destination format. A brief
-description of the canonical form may help you understand which kinds of data
-you can count on preserving across conversions.
-.Pp
-.Bl -tag -width Ds
-.It files
-Information stored on a per-file basis includes target machine architecture,
-particular implementation format type, a demand pageable bit, and a write
-protected bit. Information like Unix magic numbers is not stored here---only
-the magic numbers' meaning, so a
-.Li ZMAGIC
-file would have both the demand pageable bit and the write protected text
-bit set. The byte order of the target is stored on a per-file basis, so that
-big- and little-endian object files may be used with one another.
-.Pp
-.It sections
-Each section in the input file contains the name of the section, the section's
-original address in the object file, size and alignment information, various
-flags, and pointers into other BFD data structures.
-.Pp
-.It symbols
-Each symbol contains a pointer to the information for the object file which
-originally defined it, its name, its value, and various flag bits. When a
-BFD back end reads in a symbol table, it relocates all symbols to make them
-relative to the base of the section where they were defined. Doing this ensures
-that each symbol points to its containing section. Each symbol also has a
-varying amount of hidden private data for the BFD back end. Since the symbol
-points to the original file, the private data format for that symbol is accessible.
-.Li ld
-can operate on a collection of symbols of wildly different formats without
-problems.
-.Pp
-Normal global and simple local symbols are maintained on output, so an output
-file (no matter its format) will retain symbols pointing to functions and
-to global, static, and common variables. Some symbol information is not worth
-retaining; in
-.Li a.out ,
-type information is stored in the symbol table as long symbol names. This
-information would be useless to most COFF debuggers; the linker has command
-line switches to allow users to throw it away.
-.Pp
-There is one word of type information within the symbol, so if the format
-supports symbol type information within symbols (for example, COFF, IEEE,
-Oasys) and the type is simple enough to fit within one word (nearly everything
-but aggregates), the information will be preserved.
-.Pp
-.It relocation level
-Each canonical BFD relocation record contains a pointer to the symbol to relocate
-to, the offset of the data to relocate, the section the data is in, and a
-pointer to a relocation type descriptor. Relocation is performed by passing
-messages through the relocation type descriptor and the symbol pointer. Therefore,
-relocations can be performed on output data using a relocation method that
-is only available in one of the input formats. For instance, Oasys provides
-a byte relocation format. A relocation record requesting this relocation type
-would point indirectly to a routine to perform this, so the relocation may
-be performed on a byte being written to a 68k COFF file, even though 68k COFF
-has no such relocation type.
-.Pp
-.It line numbers
-Object formats can contain, for debugging purposes, some form of mapping between
-symbols, source line numbers, and addresses in the output file. These addresses
-have to be relocated along with the symbol information. Each symbol with an
-associated list of line number records points to the first record of the list.
-The head of a line number list consists of a pointer to the symbol, which
-allows finding out the address of the function whose line number is being
-described. The rest of the list is made up of pairs: offsets into the section
-and line numbers. Any format which can simply derive this information can
-pass it successfully between formats (COFF, IEEE and Oasys).
-.El
-.Pp
-.Sh Reporting Bugs
-Your bug reports play an essential role in making
-.Xr ld
-reliable.
-.Pp
-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
-.Xr ld
-work better. Bug reports are your contribution to the maintenance of
-.Xr ld .
-.Pp
-In order for a bug report to serve its purpose, you must include the information
-that enables us to fix the bug.
-.Pp
-.Ss Have You Found a Bug?
-If you are not sure whether you have found a bug, here are some guidelines:
-.Pp
-.Bl -bullet
-.It
-If the linker gets a fatal signal, for any input whatever, that is a
-.Xr ld
-bug. Reliable linkers never crash.
-.Pp
-.It
-If
-.Xr ld
-produces an error message for valid input, that is a bug.
-.Pp
-.It
-If
-.Xr 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.
-.Pp
-.It
-If you are an experienced user of linkers, your suggestions for improvement
-of
-.Xr ld
-are welcome in any case.
-.El
-.Pp
-.Ss How to Report Bugs
-A number of companies and individuals offer support for GNU products. If you
-obtained
-.Xr ld
-from a support organization, we recommend you contact that organization first.
-.Pp
-You can find contact information for many support companies and individuals
-in the file
-.Pa etc/SERVICE
-in the GNU Emacs distribution.
-.Pp
-The fundamental principle of reporting bugs usefully is this:
-.Sy report all the facts .
-If you are not sure whether to state a fact or leave it out, state it!
-.Pp
-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.
-.Pp
-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.
-.Pp
-Sometimes people give a few sketchy facts and ask, \(lqDoes this ring a bell?\(rq
-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.
-.Pp
-To enable us to fix the bug, you should include all these things:
-.Pp
-.Bl -bullet
-.It
-The version of
-.Xr ld .
-.Xr ld
-announces it if you start it with the
-.Li --version
-argument.
-.Pp
-Without this, we will not know whether there is any point in looking for the
-bug in the current version of
-.Xr ld .
-.Pp
-.It
-Any patches you may have applied to the
-.Xr ld
-source, including any patches made to the
-.Li BFD
-library.
-.Pp
-.It
-The type of machine you are using, and the operating system name and version
-number.
-.Pp
-.It
-What compiler (and its version) was used to compile
-.Xr ld
----e.g. \(lq
-.Li gcc-2.7
-\(rq\&.
-.Pp
-.It
-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.
-.Pp
-If we were to try to guess the arguments, we would probably guess wrong and
-then we might not encounter the bug.
-.Pp
-.It
-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.
-.Pp
-If the source files were assembled using
-.Li gas
-or compiled using
-.Li 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
-.Li gas
-or
-.Li gcc
-was used to produce the object files. Also say how
-.Li gas
-or
-.Li gcc
-were configured.
-.Pp
-.It
-A description of what behavior you observe that you believe is incorrect.
-For example, \(lqIt gets a fatal signal.\(rq
-.Pp
-Of course, if the bug is that
-.Xr 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.
-.Pp
-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
-.Xr ld
-is out of sync, or you have encountered a bug in the C library on your system.
-(This has happened!) Your copy might crash and ours would not. If you told
-us to expect a crash, then when ours fails to crash, we would know that the
-bug was not happening for us. If you had not told us to expect a crash, then
-we would not be able to draw any conclusion from our observations.
-.Pp
-.It
-If you wish to suggest changes to the
-.Xr ld
-source, send us context diffs, as generated by
-.Li diff
-with the
-.Li -u ,
-.Li -c ,
-or
-.Li -p
-option. Always send diffs from the old file to the new file. If you even discuss
-something in the
-.Xr ld
-source, refer to it by context, not by line number.
-.Pp
-The line numbers in our development sources will not match those in your sources.
-Your line numbers would convey no useful information to us.
-.El
-.Pp
-Here are some things that are not necessary:
-.Pp
-.Bl -bullet
-.It
-A description of the envelope of the bug.
-.Pp
-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.
-.Pp
-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.
-.Pp
-Of course, if you can find a simpler example to report
-.Em 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.
-.Pp
-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.
-.Pp
-.It
-A patch for the bug.
-.Pp
-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.
-.Pp
-Sometimes with a program as complicated as
-.Xr 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.
-.Pp
-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.
-.Pp
-.It
-A guess about what the bug is or what it depends on.
-.Pp
-Such guesses are usually wrong. Even we cannot guess right about such things
-without first using the debugger to find the facts.
-.El
-.Pp
-.Sh MRI Compatible Script Files
-To aid users making the transition to GNU
-.Xr ld
-from the MRI linker,
-.Xr ld
-can use MRI compatible linker scripts as an alternative to the more general-purpose
-linker scripting language described in Scripts. MRI compatible linker scripts
-have a much simpler command set than the scripting language otherwise used
-with
-.Xr ld .
-GNU
-.Xr ld
-supports the most commonly used MRI linker commands; these commands are described
-here.
-.Pp
-In general, MRI scripts aren't of much use with the
-.Li a.out
-object file format, since it only has three sections and MRI scripts lack
-some features to make use of them.
-.Pp
-You can specify a file containing an MRI-compatible script using the
-.Li -c
-command-line option.
-.Pp
-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,
-.Xr ld
-issues a warning message, but continues processing the script.
-.Pp
-Lines beginning with
-.Li *
-are comments.
-.Pp
-You can write these commands using all upper-case letters, or all lower case;
-for example,
-.Li chip
-is the same as
-.Li CHIP .
-The following list shows only the upper-case form of each command.
-.Pp
-.Bl -tag -width Ds
-.It ABSOLUTE Va secname
-.It ABSOLUTE Va secname, Va secname, ... Va secname
-Normally,
-.Xr ld
-includes in the output file all sections from all the input files. However,
-in an MRI-compatible script, you can use the
-.Li ABSOLUTE
-command to restrict the sections that will be present in your output program.
-If the
-.Li ABSOLUTE
-command is used at all in a script, then only the sections named explicitly
-in
-.Li ABSOLUTE
-commands will appear in the linker output. You can still use other input sections
-(whatever you select on the command line, or using
-.Li LOAD )
-to resolve addresses in the output file.
-.Pp
-.It ALIAS Va out-secname, Va in-secname
-Use this command to place the data from input section
-.Va in-secname
-in a section called
-.Va out-secname
-in the linker output file.
-.Pp
-.Va in-secname
-may be an integer.
-.Pp
-.It ALIGN Va secname = Va expression
-Align the section called
-.Va secname
-to
-.Va expression .
-The
-.Va expression
-should be a power of two.
-.Pp
-.It BASE Va expression
-Use the value of
-.Va expression
-as the lowest address (other than absolute addresses) in the output file.
-.Pp
-.It CHIP Va expression
-.It CHIP Va expression, Va expression
-This command does nothing; it is accepted only for compatibility.
-.Pp
-.It END
-This command does nothing whatever; it's only accepted for compatibility.
-.Pp
-.It FORMAT Va output-format
-Similar to the
-.Li OUTPUT_FORMAT
-command in the more general linker language, but restricted to one of these
-output formats:
-.Pp
-.Bl -enum
-.It
-S-records, if
-.Va output-format
-is
-.Li S
-.Pp
-.It
-IEEE, if
-.Va output-format
-is
-.Li IEEE
-.Pp
-.It
-COFF (the
-.Li coff-m68k
-variant in BFD), if
-.Va output-format
-is
-.Li COFF
-.El
-.Pp
-.It LIST Va anything...
-Print (to the standard output file) a link map, as produced by the
-.Xr ld
-command-line option
-.Li -M .
-.Pp
-The keyword
-.Li LIST
-may be followed by anything on the same line, with no change in its effect.
-.Pp
-.It LOAD Va filename
-.It LOAD Va filename, Va filename, ... Va filename
-Include one or more object file
-.Va filename
-in the link; this has the same effect as specifying
-.Va filename
-directly on the
-.Xr ld
-command line.
-.Pp
-.It NAME Va output-name
-.Va output-name
-is the name for the program produced by
-.Xr ld ;
-the MRI-compatible command
-.Li NAME
-is equivalent to the command-line option
-.Li -o
-or the general script language command
-.Li OUTPUT .
-.Pp
-.It ORDER Va secname, Va secname, ... Va secname
-.It ORDER Va secname Va secname Va secname
-Normally,
-.Xr 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
-.Li ORDER
-command. The sections you list with
-.Li ORDER
-will appear first in your output file, in the order specified.
-.Pp
-.It PUBLIC Va name= Va expression
-.It PUBLIC Va name, Va expression
-.It PUBLIC Va name Va expression
-Supply a value (
-.Va expression )
-for external symbol
-.Va name
-used in the linker input files.
-.Pp
-.It SECT Va secname, Va expression
-.It SECT Va secname= Va expression
-.It SECT Va secname Va expression
-You can use any of these three forms of the
-.Li SECT
-command to specify the start address (
-.Va expression )
-for section
-.Va secname .
-If you have more than one
-.Li SECT
-statement for the same
-.Va secname ,
-only the
-.Em first
-sets the start address.
-.El
-.Pp
-.Sh GNU Free Documentation License
-.Bd -filled -offset indent
-Copyright (C) 2000, 2003 Free Software Foundation, Inc. 51 Franklin Street,
-Fifth Floor, Boston, MA 02110-1301 USA
-.Pp
-Everyone is permitted to copy and distribute verbatim copies of this license
-document, but changing it is not allowed.
-.Ed
-.Pp
-.Bl -enum
-.It
-PREAMBLE
-.Pp
-The purpose of this License is to make a manual, textbook, or other written
-document \(lqfree\(rq 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.
-.Pp
-This License is a kind of \(lqcopyleft\(rq, 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.
-.Pp
-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.
-.Pp
-.It
-APPLICABILITY AND DEFINITIONS
-.Pp
-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 \(lqDocument\(rq, below, refers to any such manual or work. Any member
-of the public is a licensee, and is addressed as \(lqyou.\(rq
-.Pp
-A \(lqModified Version\(rq 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.
-.Pp
-A \(lqSecondary Section\(rq 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.
-.Pp
-The \(lqInvariant Sections\(rq 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.
-.Pp
-The \(lqCover Texts\(rq 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.
-.Pp
-A \(lqTransparent\(rq 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
-\(lqTransparent\(rq is called \(lqOpaque.\(rq
-.Pp
-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.
-.Pp
-The \(lqTitle Page\(rq 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, \(lqTitle Page\(rq means the text near the most prominent
-appearance of the work's title, preceding the beginning of the body of the
-text.
-.Pp
-.It
-VERBATIM COPYING
-.Pp
-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.
-.Pp
-You may also lend copies, under the same conditions stated above, and you
-may publicly display copies.
-.Pp
-.It
-COPYING IN QUANTITY
-.Pp
-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.
-.Pp
-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.
-.Pp
-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.
-.Pp
-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.
-.Pp
-.It
-MODIFICATIONS
-.Pp
-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:
-.Pp
-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 \(lqHistory\(rq,
-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 \(lqHistory\(rq 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 \(lqHistory\(rq 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 \(lqAcknowledgements\(rq or \(lqDedications\(rq, 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 \(lqEndorsements.\(rq Such a section
-may not be included in the Modified Version. N. Do not retitle any existing
-section as \(lqEndorsements\(rq or to conflict in title with any Invariant Section.
-.Pp
-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.
-.Pp
-You may add a section entitled \(lqEndorsements\(rq, 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.
-.Pp
-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.
-.Pp
-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.
-.Pp
-.It
-COMBINING DOCUMENTS
-.Pp
-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.
-.Pp
-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.
-.Pp
-In the combination, you must combine any sections entitled \(lqHistory\(rq in the
-various original documents, forming one section entitled \(lqHistory\(rq; likewise
-combine any sections entitled \(lqAcknowledgements\(rq, and any sections entitled
-\(lqDedications.\(rq You must delete all sections entitled \(lqEndorsements.\(rq
-.Pp
-.It
-COLLECTIONS OF DOCUMENTS
-.Pp
-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.
-.Pp
-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.
-.Pp
-.It
-AGGREGATION WITH INDEPENDENT WORKS
-.Pp
-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 \(lqaggregate\(rq, 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.
-.Pp
-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.
-.Pp
-.It
-TRANSLATION
-.Pp
-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.
-.Pp
-.It
-TERMINATION
-.Pp
-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.
-.Pp
-.It
-FUTURE REVISIONS OF THIS LICENSE
-.Pp
-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/.
-.Pp
-Each version of the License is given a distinguishing version number. If the
-Document specifies that a particular numbered version of this License \(lqor any
-later version\(rq 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.
-.Pp
-.El
-.Ss 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:
-.Pp
-.Bd -literal -offset indent
-
-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."
-
-.Ed
-.Pp
-If you have no Invariant Sections, write \(lqwith no Invariant Sections\(rq instead
-of saying which ones are invariant. If you have no Front-Cover Texts, write
-\(lqno Front-Cover Texts\(rq instead of \(lqFront-Cover Texts being
-.Va list
-\(rq; likewise for Back-Cover Texts.
-.Pp
-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.
-.Pp
-.Sh LD Index
diff --git a/contrib/binutils/ld/ld.h b/contrib/binutils/ld/ld.h
deleted file mode 100644
index fd7301bad461..000000000000
--- a/contrib/binutils/ld/ld.h
+++ /dev/null
@@ -1,326 +0,0 @@
-/* ld.h -- general linker header file
- Copyright 1991, 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999, 2000,
- 2001, 2002, 2003, 2004, 2005, 2006, 2007
- Free Software Foundation, Inc.
-
- This file is part of GLD, the Gnu Linker.
-
- GLD is free software; you can redistribute it and/or modify
- it under the terms of the GNU General Public License as published by
- the Free Software Foundation; either version 2, or (at your option)
- any later version.
-
- GLD is distributed in the hope that it will be useful,
- but WITHOUT ANY WARRANTY; without even the implied warranty of
- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- GNU General Public License for more details.
-
- You should have received a copy of the GNU General Public License
- along with GLD; see the file COPYING. If not, write to the Free
- Software Foundation, 51 Franklin Street - Fifth Floor, Boston, MA
- 02110-1301, USA. */
-
-#ifndef LD_H
-#define LD_H
-
-#ifdef HAVE_LOCALE_H
-#endif
-#ifndef SEEK_CUR
-#define SEEK_CUR 1
-#endif
-#ifndef SEEK_END
-#define SEEK_END 2
-#endif
-
-#if defined(__GNUC__) && !defined(C_ALLOCA)
-# undef alloca
-# define alloca __builtin_alloca
-#else
-# if defined(HAVE_ALLOCA_H) && !defined(C_ALLOCA)
-# include <alloca.h>
-# else
-# ifndef alloca /* predefined by HP cc +Olibcalls */
-# if !defined (__STDC__) && !defined (__hpux)
-char *alloca ();
-# else
-void *alloca ();
-# endif /* __STDC__, __hpux */
-# endif /* alloca */
-# endif /* HAVE_ALLOCA_H */
-#endif
-
-
-#ifdef HAVE_LOCALE_H
-# ifndef ENABLE_NLS
- /* The Solaris version of locale.h always includes libintl.h. If we have
- been configured with --disable-nls then ENABLE_NLS will not be defined
- and the dummy definitions of bindtextdomain (et al) below will conflict
- with the defintions in libintl.h. So we define these values to prevent
- the bogus inclusion of libintl.h. */
-# define _LIBINTL_H
-# define _LIBGETTEXT_H
-# endif
-# include <locale.h>
-#endif
-
-#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
-
-/* 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. */
-
-typedef enum {
- none, by_name, by_alignment, by_name_alignment, by_alignment_name
-} sort_type;
-
-extern sort_type sort_section;
-
-struct wildcard_spec {
- const char *name;
- struct name_list *exclude_name_list;
- sort_type sorted;
-};
-
-struct wildcard_list {
- struct wildcard_list *next;
- struct wildcard_spec spec;
-};
-
-struct map_symbol_def {
- struct bfd_link_hash_entry *entry;
- struct map_symbol_def *next;
-};
-
-/* The initial part of fat_user_section_struct has to be idential with
- lean_user_section_struct. */
-typedef struct fat_user_section_struct {
- /* For input sections, when writing a map file: head / tail of a linked
- list of hash table entries for symbols defined in this section. */
- struct map_symbol_def *map_symbol_def_head;
- struct map_symbol_def **map_symbol_def_tail;
-} fat_section_userdata_type;
-
-#define get_userdata(x) ((x)->userdata)
-
-#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;
-
- /* 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;
-
- /* Warn on attempting to open an incompatible library during a library
- search. */
- bfd_boolean warn_search_mismatch;
-
-
- /* If TRUE (the default) check section addresses, once compute,
- fpor overlaps. */
- bfd_boolean check_section_addresses;
-
- /* If TRUE allow the linking of input files in an unknown architecture
- assuming that the user knows what they are doing. This was the old
- behaviour of the linker. The new default behaviour is to reject such
- input files. */
- bfd_boolean accept_unknown_input_arch;
-
- /* Big or little endian as set on command line. */
- enum { ENDIAN_UNSET = 0, ENDIAN_BIG, ENDIAN_LITTLE } endian;
-
- /* -Bsymbolic and -Bsymbolic-functions, as set on command line. */
- enum
- {
- symbolic_unset = 0,
- symbolic,
- symbolic_functions,
- } symbolic;
-
- /* --dynamic-list, --dynamic-list-cpp-new, --dynamic-list-cpp-typeinfo
- and --dynamic-list FILE, as set on command line. */
- enum
- {
- dynamic_list_unset = 0,
- dynamic_list_data,
- dynamic_list
- } dynamic_list;
-
- /* Name of runtime interpreter to invoke. */
- char *interpreter;
-
- /* Name to give runtime libary from the -soname argument. */
- char *soname;
-
- /* Runtime library search path from the -rpath argument. */
- char *rpath;
-
- /* Link time runtime library search path from the -rpath-link
- argument. */
- char *rpath_link;
-
- /* Name of shared object whose symbol table should be filtered with
- this shared object. From the --filter option. */
- 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;
-
- /* Default linker script. */
- char *default_script;
-} args_type;
-
-extern args_type command_line;
-
-typedef int token_code_type;
-
-typedef struct {
- 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;
-
- bfd_boolean stats;
-
- /* If set, orphan input sections will be mapped to separate output
- sections. */
- bfd_boolean unique_orphan_sections;
-
- /* If set, only search library directories explicitly selected
- on the command line. */
- bfd_boolean only_cmd_line_lib_dirs;
-
- /* The rpath separation character. Usually ':'. */
- char rpath_separator;
-
- char *map_filename;
- FILE *map_file;
-
- unsigned int split_by_reloc;
- bfd_size_type split_by_file;
-
- bfd_size_type specified_data_size;
-
- /* The size of the hash table to use. */
- bfd_size_type hash_table_size;
-
- /* The maximum page size for ELF. */
- bfd_vma maxpagesize;
-
- /* The common page size for ELF. */
- bfd_vma commonpagesize;
-} ld_config_type;
-
-extern ld_config_type config;
-
-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 bfd_boolean handle_asneeded_cref (bfd *, enum notice_asneeded_action);
-extern void output_cref (FILE *);
-extern void check_nocrossrefs (void);
-extern void ld_abort (const char *, int, const char *) ATTRIBUTE_NORETURN;
-
-/* 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 a5b29524f5fe..000000000000
--- a/contrib/binutils/ld/ld.texinfo
+++ /dev/null
@@ -1,6908 +0,0 @@
-\input texinfo
-@setfilename ld.info
-@c Copyright 1991, 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999, 2000,
-@c 2001, 2002, 2003, 2004, 2005, 2006, 2007 Free Software Foundation, Inc.
-@syncodeindex ky cp
-@c man begin INCLUDE
-@include configdoc.texi
-@c (configdoc.texi is generated by the Makefile)
-@include bfdver.texi
-@c man end
-
-@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 ARM
-@set H8300
-@set HPPA
-@set I960
-@set M68HC11
-@set MMIX
-@set MSP430
-@set POWERPC
-@set POWERPC64
-@set Renesas
-@set SPU
-@set TICOFF
-@set WIN32
-@set XTENSA
-@end ifset
-@c man end
-
-@ifinfo
-@format
-START-INFO-DIR-ENTRY
-* Ld: (ld). The GNU linker.
-END-INFO-DIR-ENTRY
-@end format
-@end ifinfo
-
-@copying
-This file documents the @sc{gnu} linker LD
-@ifset VERSION_PACKAGE
-@value{VERSION_PACKAGE}
-@end ifset
-version @value{VERSION}.
-
-Copyright @copyright{} 1991, 92, 93, 94, 95, 96, 97, 98, 99, 2000,
-2001, 2002, 2003, 2004, 2005, 2006, 2007 Free Software Foundation, Inc.
-
-Permission is granted to copy, distribute and/or modify this document
-under the terms of the GNU Free Documentation License, Version 1.1
-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 copying
-@iftex
-@finalout
-@setchapternewpage odd
-@settitle The GNU linker
-@titlepage
-@title The GNU linker
-@sp 1
-@subtitle @code{ld}
-@ifset VERSION_PACKAGE
-@subtitle @value{VERSION_PACKAGE}
-@end ifset
-@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 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, 2005, 2006, 2007 Free Software Foundation, Inc.
-
-Permission is granted to copy, distribute and/or modify this document
-under the terms of the GNU Free Documentation License, Version 1.1
-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
-@contents
-@c FIXME: Talk about importance of *order* of args, cmds to linker!
-
-@ifnottex
-@node Top
-@top LD
-This file documents the @sc{gnu} linker ld
-@ifset VERSION_PACKAGE
-@value{VERSION_PACKAGE}
-@end ifset
-version @value{VERSION}.
-
-This document is distributed under the terms of the GNU Free
-Documentation License. A copy of the license is included in the
-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 M68HC11
-* M68HC11/68HC12:: ld and the Motorola 68HC11 and 68HC12 families
-@end ifset
-@ifset POWERPC
-* PowerPC ELF32:: ld and PowerPC 32-bit ELF Support
-@end ifset
-@ifset POWERPC64
-* PowerPC64 ELF64:: ld and PowerPC64 64-bit ELF Support
-@end ifset
-@ifset SPU
-* SPU ELF:: ld and SPU ELF Support
-@end ifset
-@ifset TICOFF
-* TI COFF:: ld and the TI COFF
-@end ifset
-@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
-* LD Index:: LD 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} 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 preceded by two dashes. This is to reduce confusion with the
-@samp{-o} option. So for example @samp{-omagic} sets the output file
-name to @samp{magic} whereas @samp{--omagic} sets the NMAGIC flag on the
-output.
-
-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
-@include at-file.texi
-
-@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.
-
-@kindex --exclude-libs
-@item --exclude-libs @var{lib},@var{lib},...
-Specifies a list of archive libraries from which symbols should not be automatically
-exported. The library names may be delimited by commas or colons. Specifying
-@code{--exclude-libs ALL} excludes symbols in all archive libraries from
-automatic export. This option is available only for the i386 PE targeted
-port of the linker and for ELF targeted ports. For i386 PE, symbols
-explicitly listed in a .def file are still exported, regardless of this
-option. For ELF targeted ports, symbols affected by this option will
-be treated as hidden.
-
-@cindex dynamic symbol table
-@kindex -E
-@kindex --export-dynamic
-@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 dynamic list to control what symbols should
-be added to the dynamic symbol table if the output format supports it.
-See the description of @samp{--dynamic-list}.
-
-@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{namespec}
-@kindex --library=@var{namespec}
-@item -l@var{namespec}
-@itemx --library=@var{namespec}
-Add the archive or object file specified by @var{namespec} to the
-list of files to link. This option may be used any number of times.
-If @var{namespec} is of the form @file{:@var{filename}}, @command{ld}
-will search the library path for a file called @var{filename}, otherise it
-will search the library path for a file called @file{lib@var{namespec}.a}.
-
-On systems which support shared libraries, @command{ld} may also search for
-files other than @file{lib@var{namespec}.a}. Specifically, on ELF
-and SunOS systems, @command{ld} will search a directory for a library
-called @file{lib@var{namespec}.so} before searching for one called
-@file{lib@var{namespec}.a}. (By convention, a @code{.so} extension
-indicates a shared library.) Note that this behavior does not apply
-to @file{:@var{filename}}, which always specifies a file called
-@var{filename}.
-
-The linker will search an archive only once, at the location where it is
-specified on the command line. If the archive defines a symbol which
-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 are mapped into memory.
-@item
-How common symbols are allocated.
-@item
-All archive members included in the link, with a mention of the symbol
-which caused the archive member to be brought in.
-@item
-The values assigned to symbols.
-
-Note - symbols whose values are computed by an expression which
-involves a reference to a previous value of the same symbol may not
-have correct result displayed in the link map. This is because the
-linker discards intermediate results and only retains the final value
-of an expression. Under such circumstances the linker will display
-the final value enclosed by square brackets. Thus for example a
-linker script containing:
-
-@smallexample
- foo = 1
- foo = foo * 4
- foo = foo + 8
-@end smallexample
-
-will produce the following output in the link map if the @option{-M}
-option is used:
-
-@smallexample
- 0x00000001 foo = 0x1
- [0x0000000c] foo = (foo * 0x4)
- [0x0000000c] foo = (foo + 0x8)
-@end smallexample
-
-See @ref{Expressions} for more information about expressions in linker
-scripts.
-@end itemize
-
-@kindex -n
-@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 executables.
-Post link analysis and optimization tools may need this information in
-order to perform correct modifications of executables. This results
-in larger executables.
-
-This option is currently only supported on ELF platforms.
-
-@kindex --force-dynamic
-@cindex forcing the creation of dynamic sections
-@item --force-dynamic
-Force the output file to have dynamic sections. This option is specific
-to VxWorks targets.
-
-@cindex partial link
-@cindex relocatable output
-@kindex -r
-@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 -dT @var{script}
-@kindex --default-script=@var{script}
-@cindex script files
-@item -dT @var{scriptfile}
-@itemx --default-script=@var{scriptfile}
-Use @var{scriptfile} as the default linker script. @xref{Scripts}.
-
-This option is similar to the @option{--script} option except that
-processing of the script is delayed until after the rest of the
-command line has been processed. This allows options placed after the
-@option{--default-script} option on the command line to affect the
-behaviour of the linker script, which can be important when the linker
-command line cannot be directly controlled by the user. (eg because
-the command line is being constructed by another tool, such as
-@samp{gcc}).
-
-@kindex -u @var{symbol}
-@kindex --undefined=@var{symbol}
-@cindex undefined symbol
-@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
-@item -X
-@itemx --discard-locals
-Delete all temporary local symbols. (These symbols start with
-system-specific local label prefixes, typically @samp{.L} for ELF systems
-or @samp{L} for traditional a.out systems.)
-
-@kindex -y @var{symbol}
-@kindex --trace-symbol=@var{symbol}
-@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 execstack
-Marks the object as requiring executable stack.
-
-@item initfirst
-This option is only meaningful when building a shared object.
-It marks the object so that its runtime initialization will occur
-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 lazy
-When generating an executable or shared library, mark it to tell the
-dynamic linker to defer function call resolution to the point when
-the function is called (lazy binding), rather than at load time.
-Lazy binding is the default.
-
-@item loadfltr
-Marks the object that its filters be processed immediately at
-runtime.
-
-@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 noexecstack
-Marks the object as not requiring executable stack.
-
-@item norelro
-Don't create an ELF @code{PT_GNU_RELRO} segment header in the object.
-
-@item now
-When generating an executable or shared library, mark it to tell the
-dynamic linker to resolve all symbols when the program is started, or
-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.
-
-@item relro
-Create an ELF @code{PT_GNU_RELRO} segment header in the object.
-
-@item max-page-size=@var{value}
-Set the emulation maximum page size to @var{value}.
-
-@item common-page-size=@var{value}
-Set the emulation common page size to @var{value}.
-
-@end table
-
-Other keywords are ignored for Solaris compatibility.
-
-@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 symbol reference from regular objects
-which is undefined at the point that the library was linked.
-@option{--no-as-needed} restores the default behaviour.
-
-@kindex --add-needed
-@kindex --no-add-needed
-@item --add-needed
-@itemx --no-add-needed
-This option affects the treatment of dynamic libraries from ELF
-DT_NEEDED tags in dynamic libraries mentioned on the command line after
-the @option{--no-add-needed} option. Normally, the linker will add
-a DT_NEEDED tag for each dynamic library from DT_NEEDED tags.
-@option{--no-add-needed} causes DT_NEEDED tags will never be emitted
-for those libraries from DT_NEEDED tags. @option{--add-needed} restores
-the default behaviour.
-
-@kindex -assert @var{keyword}
-@item -assert @var{keyword}
-This option is ignored for SunOS compatibility.
-
-@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}. This
-option can be used with @option{-shared}. Doing so means that a
-shared library is being created but that all of the library's external
-references must be resolved by pulling in entries from static
-libraries.
-
-@kindex -Bsymbolic
-@item -Bsymbolic
-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 -Bsymbolic-functions
-@item -Bsymbolic-functions
-When creating a shared library, bind references to global function
-symbols to the definition within the shared library, if any.
-This option is only meaningful on ELF platforms which support shared
-libraries.
-
-@kindex --dynamic-list=@var{dynamic-list-file}
-@item --dynamic-list=@var{dynamic-list-file}
-Specify the name of a dynamic list file to the linker. This is
-typically used when creating shared libraries to specify a list of
-global symbols whose references shouldn't be bound to the definition
-within the shared library, or creating dynamically linked executables
-to specify a list of symbols which should be added to the symbol table
-in the executable. This option is only meaningful on ELF platforms
-which support shared libraries.
-
-The format of the dynamic list is the same as the version node without
-scope and node name. See @ref{VERSION} for more information.
-
-@kindex --dynamic-list-data
-@item --dynamic-list-data
-Include all global data symbols to the dynamic list.
-
-@kindex --dynamic-list-cpp-new
-@item --dynamic-list-cpp-new
-Provide the builtin dynamic list for C++ operator new and delete. It
-is mainly useful for building shared libstdc++.
-
-@kindex --dynamic-list-cpp-typeinfo
-@item --dynamic-list-cpp-typeinfo
-Provide the builtin dynamic list for C++ runtime type identification.
-
-@kindex --check-sections
-@kindex --no-check-sections
-@item --check-sections
-@itemx --no-check-sections
-Asks the linker @emph{not} to check section addresses after they have
-been assigned to see if there are any overlaps. Normally the linker will
-perform this check, and if it finds any overlaps it will produce
-suitable error messages. The linker does know about, and does make
-allowances for sections in overlays. The default behaviour can be
-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.
-
-
-@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 --gc-sections
-@itemx --no-gc-sections
-Enable garbage collection of unused input sections. It is ignored on
-targets that do not support this option. This option is not compatible
-with @samp{-r} or @samp{--emit-relocs}. The default behaviour (of not
-performing this garbage collection) can be restored by specifying
-@samp{--no-gc-sections} on the command line.
-
-@kindex --print-gc-sections
-@kindex --no-print-gc-sections
-@cindex garbage collection
-@item --print-gc-sections
-@itemx --no-print-gc-sections
-List all sections removed by garbage collection. The listing is
-printed on stderr. This option is only effective if garbage
-collection has been enabled via the @samp{--gc-sections}) option. The
-default behaviour (of not listing the sections that are removed) can
-be restored by specifying @samp{--no-print-gc-sections} on the command
-line.
-
-@cindex help
-@cindex usage
-@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 --default-symver
-@item --default-symver
-Create and use a default symbol version (the soname) for unversioned
-exported symbols.
-
-@kindex --default-imported-symver
-@item --default-imported-symver
-Create and use a default symbol version (the soname) for unversioned
-imported symbols.
-
-@kindex --no-warn-mismatch
-@item --no-warn-mismatch
-Normally @command{ld} will give an error if you try to link together input
-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-warn-search-mismatch
-@item --no-warn-search-mismatch
-Normally @command{ld} will give a warning if it finds an incompatible
-library during a library search. This option silences the warning.
-
-@kindex --no-whole-archive
-@item --no-whole-archive
-Turn off the effect of the @option{--whole-archive} option for subsequent
-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
-@ifset M68HC11
-@xref{M68HC11/68HC12,,@command{ld} and the 68HC11 and 68HC12}.
-@end ifset
-@ifset POWERPC
-@xref{PowerPC ELF32,,@command{ld} and PowerPC 32-bit ELF Support}.
-@end ifset
-
-On some platforms, the @samp{--relax} option performs global
-optimizations that become possible when the linker resolves addressing
-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
-file systems.
-
-For compatibility with other ELF linkers, if the @option{-R} option is
-followed by a directory name, rather than a file name, it is treated as
-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. Searching @option{-rpath} in this way is only supported
-by native linkers and cross linkers which have been configured with
-the @option{--with-sysroot} option.
-@item
-On an ELF system, if the @option{-rpath} and @code{rpath-link} options
-were not used, search the contents of the environment variable
-@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 --sort-section name
-@item --sort-section name
-This option will apply @code{SORT_BY_NAME} to all wildcard section
-patterns in the linker script.
-
-@kindex --sort-section alignment
-@item --sort-section alignment
-This option will apply @code{SORT_BY_ALIGNMENT} to all wildcard section
-patterns in the linker script.
-
-@kindex --split-by-file
-@item --split-by-file [@var{size}]
-Similar to @option{--split-by-reloc} but creates a new output section for
-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 --sysroot
-@item --sysroot=@var{directory}
-Use @var{directory} as the location of the sysroot, overriding the
-configure-time default. This option is only supported by linkers
-that were configured using @option{--with-sysroot}.
-
-@kindex --traditional-format
-@cindex traditional format
-@item --traditional-format
-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
-@item --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-shared-textrel
-@item --warn-shared-textrel
-Warn if the linker adds a DT_TEXTREL to a shared object.
-
-@kindex --warn-unresolved-symbols
-@item --warn-unresolved-symbols
-If the linker is going to report an unresolved symbol (see the option
-@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 --eh-frame-hdr
-@item --eh-frame-hdr
-Request creation of @code{.eh_frame_hdr} section and ELF
-@code{PT_GNU_EH_FRAME} segment header.
-
-@kindex --enable-new-dtags
-@kindex --disable-new-dtags
-@item --enable-new-dtags
-@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.
-
-@kindex --hash-size=@var{number}
-@item --hash-size=@var{number}
-Set the default size of the linker's hash tables to a prime number
-close to @var{number}. Increasing this value can reduce the length of
-time it takes the linker to perform its tasks, at the expense of
-increasing the linker's memory requirements. Similarly reducing this
-value can reduce the memory requirements at the expense of speed.
-
-@kindex --hash-style=@var{style}
-@item --hash-style=@var{style}
-Set the type of linker's hash table(s). @var{style} can be either
-@code{sysv} for classic ELF @code{.hash} section, @code{gnu} for
-new style GNU @code{.gnu.hash} section or @code{both} for both
-the classic ELF @code{.hash} and new style GNU @code{.gnu.hash}
-hash tables. The default is @code{sysv}.
-
-@kindex --reduce-memory-overheads
-@item --reduce-memory-overheads
-This option reduces memory requirements at ld runtime, at the expense of
-linking speed. This was introduced to select the old O(n^2) algorithm
-for link map file generation, rather than the new O(n) algorithm which uses
-about 40% more memory for symbol storage.
-
-Another effect of the switch is to set the default hash table size to
-1021, which again saves memory at the cost of lengthening the linker's
-run time. This is not done however if the @option{--hash-size} switch
-has been used.
-
-The @option{--reduce-memory-overheads} switch may be also be used to
-enable other tradeoffs in future versions of the linker.
-
-@end table
-
-@c man end
-
-@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 --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 --large-address-aware
-@item --large-address-aware
-If given, the appropriate bit in the ``Characteristics'' field of the COFF
-header is set to indicate that this executable supports virtual addresses
-greater than 2 gigabytes. This should be used in conjunction with the /3GB
-or /USERVA=@var{value} megabytes switch in the ``[operating systems]''
-section of the BOOT.INI. Otherwise, this bit has no effect.
-[This option is specific to PE targeted ports of the linker]
-
-@kindex --major-image-version
-@item --major-image-version @var{value}
-Sets the major number of the ``image version''. Defaults to 1.
-[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}, @code{posix}, and @code{xbox}. You may optionally set
-the subsystem version also. Numeric values are also accepted for
-@var{which}.
-[This option is specific to the i386 PE targeted port of the linker]
-
-@end table
-
-@c man end
-
-@ifset M68HC11
-@subsection Options specific to Motorola 68HC11 and 68HC12 targets
-
-@c man begin OPTIONS
-
-The 68HC11 and 68HC12 linkers support specific options to control the
-memory bank switching mapping and trampoline code generation.
-
-@table @gcctabopt
-
-@kindex --no-trampoline
-@item --no-trampoline
-This option disables the generation of trampoline. By default a trampoline
-is generated for each far function which is called using a @code{jsr}
-instruction (this happens when a pointer to a far function is taken).
-
-@kindex --bank-window
-@item --bank-window @var{name}
-This option indicates to the linker the name of the memory region in
-the @samp{MEMORY} specification that describes the memory bank window.
-The definition of such region is then used by the linker to compute
-paging and addresses within the memory window.
-
-@end table
-
-@c man end
-@end ifset
-
-@ifset UsesEnvVars
-@node Environment
-@section Environment Variables
-
-@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 AS_NEEDED(@var{file}, @var{file}, @dots{})
-@itemx AS_NEEDED(@var{file} @var{file} @dots{})
-@kindex AS_NEEDED(@var{files})
-This construct can appear only inside of the @code{INPUT} or @code{GROUP}
-commands, among other filenames. The files listed will be handled
-as if they appear directly in the @code{INPUT} or @code{GROUP} commands,
-with the exception of ELF shared libraries, that will be added only
-when they are actually needed. This construct essentially enables
-@option{--as-needed} option for all the files listed inside of it
-and restores previous @option{--as-needed} resp. @option{--no-as-needed}
-setting afterwards.
-
-@item OUTPUT(@var{filename})
-@kindex OUTPUT(@var{filename})
-@cindex output file name in linker script
-The @code{OUTPUT} command names the output file. Using
-@code{OUTPUT(@var{filename})} in the linker script is exactly like using
-@samp{-o @var{filename}} on the command line (@pxref{Options,,Command
-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 and place it into the symbol table with a global scope.
-
-@menu
-* Simple Assignments:: Simple Assignments
-* PROVIDE:: PROVIDE
-* PROVIDE_HIDDEN:: PROVIDE_HIDDEN
-* Source Code Reference:: How to use a linker script defined symbol in source code
-@end menu
-
-@node Simple Assignments
-@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. @xref{Location Counter}.
-
-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 PROVIDE_HIDDEN
-@subsection PROVIDE_HIDDEN
-@cindex PROVIDE_HIDDEN
-Similar to @code{PROVIDE}. For ELF targeted ports, the symbol will be
-hidden and won't be exported.
-
-@node Source Code Reference
-@subsection Source Code Reference
-
-Accessing a linker script defined variable from source code is not
-intuitive. In particular a linker script symbol is not equivalent to
-a variable declaration in a high level language, it is instead a
-symbol that does not have a value.
-
-Before going further, it is important to note that compilers often
-transform names in the source code into different names when they are
-stored in the symbol table. For example, Fortran compilers commonly
-prepend or append an underscore, and C++ performs extensive @samp{name
-mangling}. Therefore there might be a discrepancy between the name
-of a variable as it is used in source code and the name of the same
-variable as it is defined in a linker script. For example in C a
-linker script variable might be referred to as:
-
-@smallexample
- extern int foo;
-@end smallexample
-
-But in the linker script it might be defined as:
-
-@smallexample
- _foo = 1000;
-@end smallexample
-
-In the remaining examples however it is assumed that no name
-transformation has taken place.
-
-When a symbol is declared in a high level language such as C, two
-things happen. The first is that the compiler reserves enough space
-in the program's memory to hold the @emph{value} of the symbol. The
-second is that the compiler creates an entry in the program's symbol
-table which holds the symbol's @emph{address}. ie the symbol table
-contains the address of the block of memory holding the symbol's
-value. So for example the following C declaration, at file scope:
-
-@smallexample
- int foo = 1000;
-@end smallexample
-
-creates a entry called @samp{foo} in the symbol table. This entry
-holds the address of an @samp{int} sized block of memory where the
-number 1000 is initially stored.
-
-When a program references a symbol the compiler generates code that
-first accesses the symbol table to find the address of the symbol's
-memory block and then code to read the value from that memory block.
-So:
-
-@smallexample
- foo = 1;
-@end smallexample
-
-looks up the symbol @samp{foo} in the symbol table, gets the address
-associated with this symbol and then writes the value 1 into that
-address. Whereas:
-
-@smallexample
- int * a = & foo;
-@end smallexample
-
-looks up the symbol @samp{foo} in the symbol table, gets it address
-and then copies this address into the block of memory associated with
-the variable @samp{a}.
-
-Linker scripts symbol declarations, by contrast, create an entry in
-the symbol table but do not assign any memory to them. Thus they are
-an address without a value. So for example the linker script definition:
-
-@smallexample
- foo = 1000;
-@end smallexample
-
-creates an entry in the symbol table called @samp{foo} which holds
-the address of memory location 1000, but nothing special is stored at
-address 1000. This means that you cannot access the @emph{value} of a
-linker script defined symbol - it has no value - all you can do is
-access the @emph{address} of a linker script defined symbol.
-
-Hence when you are using a linker script defined symbol in source code
-you should always take the address of the symbol, and never attempt to
-use its value. For example suppose you want to copy the contents of a
-section of memory called .ROM into a section called .FLASH and the
-linker script contains these declarations:
-
-@smallexample
-@group
- start_of_ROM = .ROM;
- end_of_ROM = .ROM + sizeof (.ROM) - 1;
- start_of_FLASH = .FLASH;
-@end group
-@end smallexample
-
-Then the C source code to perform the copy would be:
-
-@smallexample
-@group
- extern char start_of_ROM, end_of_ROM, start_of_FLASH;
-
- memcpy (& start_of_FLASH, & start_of_ROM, & end_of_ROM - & start_of_ROM);
-@end group
-@end smallexample
-
-Note the use of the @samp{&} operators. These are correct.
-
-@node SECTIONS
-@section SECTIONS Command
-@kindex SECTIONS
-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})] [ALIGN(@var{section_align})] [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 Address
-@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_BY_NAME
-Normally, the linker will place files and sections matched by wildcards
-in the order in which they are seen during the link. You can change
-this by using the @code{SORT_BY_NAME} keyword, which appears before a wildcard
-pattern in parentheses (e.g., @code{SORT_BY_NAME(.text*)}). When the
-@code{SORT_BY_NAME} keyword is used, the linker will sort the files or sections
-into ascending order by name before placing them in the output file.
-
-@cindex SORT_BY_ALIGNMENT
-@code{SORT_BY_ALIGNMENT} is very similar to @code{SORT_BY_NAME}. The
-difference is @code{SORT_BY_ALIGNMENT} will sort sections into
-ascending order by alignment before placing them in the output file.
-
-@cindex SORT
-@code{SORT} is an alias for @code{SORT_BY_NAME}.
-
-When there are nested section sorting commands in linker script, there
-can be at most 1 level of nesting for section sorting commands.
-
-@enumerate
-@item
-@code{SORT_BY_NAME} (@code{SORT_BY_ALIGNMENT} (wildcard section pattern)).
-It will sort the input sections by name first, then by alignment if 2
-sections have the same name.
-@item
-@code{SORT_BY_ALIGNMENT} (@code{SORT_BY_NAME} (wildcard section pattern)).
-It will sort the input sections by alignment first, then by name if 2
-sections have the same alignment.
-@item
-@code{SORT_BY_NAME} (@code{SORT_BY_NAME} (wildcard section pattern)) is
-treated the same as @code{SORT_BY_NAME} (wildcard section pattern).
-@item
-@code{SORT_BY_ALIGNMENT} (@code{SORT_BY_ALIGNMENT} (wildcard section pattern))
-is treated the same as @code{SORT_BY_ALIGNMENT} (wildcard section pattern).
-@item
-All other nested section sorting commands are invalid.
-@end enumerate
-
-When both command line section sorting option and linker script
-section sorting command are used, section sorting command always
-takes precedence over the command line option.
-
-If the section sorting command in linker script isn't nested, the
-command line option will make the section sorting command to be
-treated as nested sorting command.
-
-@enumerate
-@item
-@code{SORT_BY_NAME} (wildcard section pattern ) with
-@option{--sort-sections alignment} is equivalent to
-@code{SORT_BY_NAME} (@code{SORT_BY_ALIGNMENT} (wildcard section pattern)).
-@item
-@code{SORT_BY_ALIGNMENT} (wildcard section pattern) with
-@option{--sort-section name} is equivalent to
-@code{SORT_BY_ALIGNMENT} (@code{SORT_BY_NAME} (wildcard section pattern)).
-@end enumerate
-
-If the section sorting command in linker script is nested, the
-command line option will be ignored.
-
-If you ever get confused about where input sections are going, use the
-@samp{-M} linker option to generate a map file. The map file shows
-precisely how input sections are mapped to output sections.
-
-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_BY_NAME(*)(.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{__CTOR_END__}} marks the end.
-Similarly, @w{@code{__DTOR_LIST__}} and @w{@code{__DTOR_END__}} mark
-the start and end of the global destructors. The
-first word in the list is the number of entries, followed by the address
-of each constructor or destructor, followed by a zero word. The
-compiler must arrange to actually run the code. For these object file
-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_BY_NAME(CONSTRUCTORS)} instead. When using the
-@code{.ctors} and @code{.dtors} sections, use @samp{*(SORT_BY_NAME(.ctors))} and
-@samp{*(SORT_BY_NAME(.dtors))} instead of just @samp{*(.ctors)} and
-@samp{*(.dtors)}.
-
-Normally the compiler and linker will handle these issues automatically,
-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 sections with no contents. This is
-for convenience when referring to input sections that may or may not
-be present in any of the input files. For example:
-@smallexample
-.foo : @{ *(.foo) @}
-@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, and if the input
-sections are not all empty. Other link script directives that allocate
-space in an output section will also create the output section.
-
-The linker will ignore address assignments (@pxref{Output Section Address})
-on discarded output sections, except when the linker script defines
-symbols in the output section. In that case the linker will obey
-the address assignments, possibly advancing dot even though the
-section is discarded.
-
-@cindex /DISCARD/
-The special output section name @samp{/DISCARD/} may be used to discard
-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})] [ALIGN(@var{section_align})] [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 Output Alignment:: Forced Output Alignment
-* 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 expression @var{lma} that follows the @code{AT} keyword specifies
-the load address of the section.
-
-Alternatively, with @samp{AT>@var{lma_region}} expression, you may
-specify a memory region for the section's load address. @xref{MEMORY}.
-Note that if the section has not had a VMA assigned to it then the
-linker will use the @var{lma_region} as the VMA region as well.
-
-If neither @code{AT} nor @code{AT>} is specified for an allocatable
-section, the linker will set the LMA such that the difference between
-VMA and LMA for the section is the same as the preceding output
-section in the same region. If there is no preceding output section
-or the section is not allocatable, the linker will set the LMA equal
-to the VMA.
-@xref{Output Section Region}.
-
-@cindex ROM initialized data
-@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 Output Alignment
-@subsubsection Forced Output Alignment
-@kindex ALIGN(@var{section_align})
-@cindex forcing output section alignment
-@cindex output section alignment
-You can increase an output section's alignment by using ALIGN.
-
-@node Forced Input Alignment
-@subsubsection Forced Input Alignment
-@kindex SUBALIGN(@var{subsection_align})
-@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
-provides two symbols. The symbol @code{__load_start_@var{secname}} is
-defined as the starting load address of the section. The symbol
-@code{__load_stop_@var{secname}} is defined as the final load address of
-the section. Any characters within @var{secname} which are not legal
-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 if referenced: @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) @}
- PROVIDE (__load_start_text0 = LOADADDR (.text0));
- PROVIDE (__load_stop_text0 = LOADADDR (.text0) + SIZEOF (.text0));
- .text1 0x1000 : AT (0x4000 + SIZEOF (.text0)) @{ o2/*.o(.text) @}
- PROVIDE (__load_start_text1 = LOADADDR (.text1));
- PROVIDE (__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 numerical expression for the start address of
-the memory region. The expression must evaluate to a constant and it
-cannot involve any symbols. The keyword @code{ORIGIN} may be
-abbreviated to @code{org} or @code{o} (but not, for example,
-@code{ORG}).
-
-@kindex LENGTH =
-@kindex len =
-@kindex l =
-The @var{len} is an expression for the size in bytes of the memory
-region. As with the @var{origin} expression, the expression must
-be numerical only and must evaluate to a constant. The keyword
-@code{LENGTH} may be abbreviated to @code{len} or @code{l}.
-
-In the following example, we specify that there are two memory regions
-available for allocation: one starting at @samp{0} for 256 kilobytes,
-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.
-
-It is possible to access the origin and length of a memory in an
-expression via the @code{ORIGIN(@var{memory})} and
-@code{LENGTH(@var{memory})} functions:
-
-@smallexample
-@group
- _fstack = ORIGIN(ram) + LENGTH(ram) - 4;
-@end group
-@end smallexample
-
-@node PHDRS
-@section PHDRS Command
-@kindex PHDRS
-@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;
- extern "C++" @{
- ns::*;
- "int f(int, double)";
- @}
-@} 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'').
-However, if you specify the symbol name inside double quotes, then the
-name is treated as literal, rather than as a glob pattern.
-
-Next, the version script defines node @samp{VERS_1.2}. This node
-depends upon @samp{VERS_1.1}. The script binds the symbol @samp{foo2}
-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 omitted, provided it is the only version node
-in the version script. Such version script doesn't assign any versions to
-symbols, only selects which symbols will be globally visible out and which
-won't.
-
-@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}.
-
-Demangled names may contains spaces and other special characters. As
-described above, you can use a glob pattern to match demangled names,
-or you can use a double-quoted string to match the string exactly. In
-the latter case, be aware that minor differences (such as differing
-whitespace) between the version script and the demangler output will
-cause a mismatch. As the exact string generated by the demangler
-might change in the future, even if the mangled name does not, you
-should check that all of your version directives are behaving as you
-expect when you upgrade.
-
-@node Expressions
-@section Expressions in Linker Scripts
-@cindex expressions
-@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
-* Orphan Sections:: Orphan Sections
-* 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 Orphan Sections
-@subsection Orphan Sections
-@cindex orphan
-Orphan sections are sections present in the input files which
-are not explicitly placed into the output file by the linker
-script. The linker will still copy these sections into the
-output file, but it has to guess as to where they should be
-placed. The linker uses a simple heuristic to do this. It
-attempts to place orphan sections after non-orphan sections of the
-same attribute, such as code vs data, loadable vs non-loadable, etc.
-If there is not enough room to do this then it places
-at the end of the file.
-
-For ELF targets, the attribute of the section includes section type as
-well as section flag.
-
-@node Location Counter
-@subsection The Location Counter
-@kindex .
-@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 not be moved backwards inside an output section,
-and may not be moved backwards outside of an output section if so
-doing creates areas with overlapping LMAs.
-
-@smallexample
-SECTIONS
-@{
- 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.
-
-@cindex dot outside sections
-Setting symbols to the value of the location counter outside of an
-output section statement can result in unexpected values if the linker
-needs to place orphan sections. For example, given the following:
-
-@smallexample
-SECTIONS
-@{
- start_of_text = . ;
- .text: @{ *(.text) @}
- end_of_text = . ;
-
- start_of_data = . ;
- .data: @{ *(.data) @}
- end_of_data = . ;
-@}
-@end smallexample
-
-If the linker needs to place some input section, e.g. @code{.rodata},
-not mentioned in the script, it might choose to place that section
-between @code{.text} and @code{.data}. You might think the linker
-should place @code{.rodata} on the blank line in the above script, but
-blank lines are of no particular significance to the linker. As well,
-the linker doesn't associate the above symbol names with their
-sections. Instead, it assumes that all assignments or other
-statements belong to the previous output section, except for the
-special case of an assignment to @code{.}. I.e., the linker will
-place the orphan @code{.rodata} section as if the script was written
-as follows:
-
-@smallexample
-SECTIONS
-@{
- start_of_text = . ;
- .text: @{ *(.text) @}
- end_of_text = . ;
-
- start_of_data = . ;
- .rodata: @{ *(.rodata) @}
- .data: @{ *(.data) @}
- end_of_data = . ;
-@}
-@end smallexample
-
-This may or may not be the script author's intention for the value of
-@code{start_of_data}. One way to influence the orphan section
-placement is to assign the location counter to itself, as the linker
-assumes that an assignment to @code{.} is setting the start address of
-a following output section and thus should be grouped with that
-section. So you could write:
-
-@smallexample
-SECTIONS
-@{
- start_of_text = . ;
- .text: @{ *(.text) @}
- end_of_text = . ;
-
- . = . ;
- start_of_data = . ;
- .data: @{ *(.data) @}
- end_of_data = . ;
-@}
-@end smallexample
-
-Now, the orphan @code{.rodata} section will be placed between
-@code{end_of_text} and @code{start_of_data}.
-
-@need 2000
-@node Operators
-@subsection Operators
-@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 ALIGNOF(@var{section})
-@kindex ALIGNOF(@var{section})
-@cindex section alignment
-Return the alignment in bytes of the named @var{section}, if that section has
-been allocated. If the section has not been allocated when this is
-evaluated, the linker will report an error. In the following example,
-the alignment of the @code{.output} section is stored as the first
-value in that section.
-@smallexample
-@group
-SECTIONS@{ @dots{}
- .output @{
- LONG (ALIGNOF (.output))
- @dots{}
- @}
-@dots{} @}
-@end group
-@end smallexample
-
-@item BLOCK(@var{exp})
-@kindex BLOCK(@var{exp})
-This is a synonym for @code{ALIGN}, for compatibility with older linker
-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 DATA_SEGMENT_RELRO_END(@var{offset}, @var{exp})
-@kindex DATA_SEGMENT_RELRO_END(@var{offset}, @var{exp})
-This defines the end of the @code{PT_GNU_RELRO} segment when
-@samp{-z relro} option is used. Second argument is returned.
-When @samp{-z relro} option is not present, @code{DATA_SEGMENT_RELRO_END}
-does nothing, otherwise @code{DATA_SEGMENT_ALIGN} is padded so that
-@var{exp} + @var{offset} is aligned to the most commonly used page
-boundary for particular target. If present in the linker script,
-it must always come in between @code{DATA_SEGMENT_ALIGN} and
-@code{DATA_SEGMENT_END}.
-
-@smallexample
- . = DATA_SEGMENT_RELRO_END(24, .);
-@end smallexample
-
-@item DEFINED(@var{symbol})
-@kindex DEFINED(@var{symbol})
-@cindex symbol defaults
-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 LENGTH(@var{memory})
-@kindex LENGTH(@var{memory})
-Return the length of the memory region named @var{memory}.
-
-@item LOADADDR(@var{section})
-@kindex LOADADDR(@var{section})
-@cindex section load address in expression
-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 ORIGIN(@var{memory})
-@kindex ORIGIN(@var{memory})
-Return the origin of the memory region named @var{memory}.
-
-@item SEGMENT_START(@var{segment}, @var{default})
-@kindex SEGMENT_START(@var{segment}, @var{default})
-Return the base address of the named @var{segment}. If an explicit
-value has been given for this segment (with a command-line @samp{-T}
-option) that value will be returned; otherwise the value will be
-@var{default}. At present, the @samp{-T} command-line option can only
-be used to set the base address for the ``text'', ``data'', and
-``bss'' sections, but you use @code{SEGMENT_START} with any segment
-name.
-
-@item SIZEOF(@var{section})
-@kindex SIZEOF(@var{section})
-@cindex section size
-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 M68HC11
-* M68HC11/68HC12:: @code{ld} and the Motorola 68HC11 and 68HC12 families
-@end ifset
-@ifset POWERPC
-* PowerPC ELF32:: @command{ld} and PowerPC 32-bit ELF Support
-@end ifset
-@ifset POWERPC64
-* PowerPC64 ELF64:: @command{ld} and PowerPC64 64-bit ELF Support
-@end ifset
-@ifset SPU
-* SPU ELF:: @command{ld} and SPU ELF Support
-@end ifset
-@ifset TICOFF
-* TI COFF:: @command{ld} and TI COFF
-@end ifset
-@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).
-
-@item bit manipulation instructions
-@command{ld} finds all bit manipulation instructions like @code{band, bclr,
-biand, bild, bior, bist, bixor, bld, bnot, bor, bset, bst, btst, bxor}
-which use 32 bit and 16 bit absolute address form, but refer to the top
-page of memory, and changes them to use the 8 bit address form.
-(That is: the linker turns @samp{bset #xx:3,@code{@@}@var{aa}:32} into
-@samp{bset #xx:3,@code{@@}@var{aa}:8} whenever the address @var{aa} is in
-the top page of memory).
-
-@item system control instructions
-@command{ld} finds all @code{ldc.w, stc.w} instructions which use the
-32 bit absolute address form, but refer to the top page of memory, and
-changes them to use 16 bit address form.
-(That is: the linker turns @samp{ldc.w @code{@@}@var{aa}:32,ccr} into
-@samp{ldc.w @code{@@}@var{aa}:16,ccr} whenever the address @var{aa} is in
-the top page of memory).
-@end table
-
-@ifclear GENERIC
-@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
-
-@ifset M68HC11
-@ifclear GENERIC
-@raisesections
-@end ifclear
-
-@node M68HC11/68HC12
-@section @command{ld} and the Motorola 68HC11 and 68HC12 families
-
-@cindex M68HC11 and 68HC12 support
-
-@subsection Linker Relaxation
-
-For the Motorola 68HC11, @command{ld} can perform these global
-optimizations when you specify the @samp{--relax} command-line option.
-
-@table @emph
-@cindex relaxing on M68HC11
-@item relaxing address modes
-@command{ld} finds all @code{jsr} and @code{jmp} instructions whose
-targets are within eight bits, and turns them into eight-bit
-program-counter relative @code{bsr} and @code{bra} instructions,
-respectively.
-
-@command{ld} also looks at all 16-bit extended addressing modes and
-transforms them in a direct addressing mode when the address is in
-page 0 (between 0 and 0x0ff).
-
-@item relaxing gcc instruction group
-When @command{gcc} is called with @option{-mrelax}, it can emit group
-of instructions that the linker can optimize to use a 68HC11 direct
-addressing mode. These instructions consists of @code{bclr} or
-@code{bset} instructions.
-
-@end table
-
-@subsection Trampoline Generation
-
-@cindex trampoline generation on M68HC11
-@cindex trampoline generation on M68HC12
-For 68HC11 and 68HC12, @command{ld} can generate trampoline code to
-call a far function using a normal @code{jsr} instruction. The linker
-will also change the relocation to some far function to use the
-trampoline address instead of the function address. This is typically the
-case when a pointer to a function is taken. The pointer will in fact
-point to the function trampoline.
-
-@cindex PIC_VENEER
-@kindex --pic-veneer
-The @samp{--pic-veneer} switch makes the linker use PIC sequences for
-ARM/Thumb interworking veneers, even if the rest of the binary
-is not PIC. This avoids problems on uClinux targets where
-@samp{--emit-relocs} is used to generate relocatable binaries.
-
-@ifclear GENERIC
-@lowersections
-@end ifclear
-@end ifset
-
-@node ARM
-@section @command{ld} and the ARM family
-
-@cindex ARM interworking support
-@kindex --support-old-code
-For the ARM, @command{ld} will generate code stubs to allow functions calls
-between ARM and Thumb code. These stubs only work with code that has
-been compiled and assembled with the @samp{-mthumb-interwork} command
-line option. If it is necessary to link with old ARM object files or
-libraries, which have not been compiled with the -mthumb-interwork
-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.
-
-@cindex BE8
-@kindex --be8
-The @samp{--be8} switch instructs @command{ld} to generate BE8 format
-executables. This option is only valid when linking big-endian objects.
-The resulting image will contain big-endian data and little-endian code.
-
-@cindex TARGET1
-@kindex --target1-rel
-@kindex --target1-abs
-The @samp{R_ARM_TARGET1} relocation is typically used for entries in the
-@samp{.init_array} section. It is interpreted as either @samp{R_ARM_REL32}
-or @samp{R_ARM_ABS32}, depending on the target. The @samp{--target1-rel}
-and @samp{--target1-abs} switches override the default.
-
-@cindex TARGET2
-@kindex --target2=@var{type}
-The @samp{--target2=type} switch overrides the default definition of the
-@samp{R_ARM_TARGET2} relocation. Valid values for @samp{type}, their
-meanings, and target defaults are as follows:
-@table @samp
-@item rel
-@samp{R_ARM_REL32} (arm*-*-elf, arm*-*-eabi)
-@item abs
-@samp{R_ARM_ABS32} (arm*-*-symbianelf)
-@item got-rel
-@samp{R_ARM_GOT_PREL} (arm*-*-linux, arm*-*-*bsd)
-@end table
-
-@cindex FIX_V4BX
-@kindex --fix-v4bx
-The @samp{R_ARM_V4BX} relocation (defined by the ARM AAELF
-specification) enables objects compiled for the ARMv4 architecture to be
-interworking-safe when linked with other objects compiled for ARMv4t, but
-also allows pure ARMv4 binaries to be built from the same ARMv4 objects.
-
-In the latter case, the switch @option{--fix-v4bx} must be passed to the
-linker, which causes v4t @code{BX rM} instructions to be rewritten as
-@code{MOV PC,rM}, since v4 processors do not have a @code{BX} instruction.
-
-In the former case, the switch should not be used, and @samp{R_ARM_V4BX}
-relocations are ignored.
-
-@cindex USE_BLX
-@kindex --use-blx
-The @samp{--use-blx} switch enables the linker to use ARM/Thumb
-BLX instructions (available on ARMv5t and above) in various
-situations. Currently it is used to perform calls via the PLT from Thumb
-code using BLX rather than using BX and a mode-switching stub before
-each PLT entry. This should lead to such calls executing slightly faster.
-
-This option is enabled implicitly for SymbianOS, so there is no need to
-specify it if you are using that target.
-
-@cindex VFP11_DENORM_FIX
-@kindex --vfp11-denorm-fix
-The @samp{--vfp11-denorm-fix} switch enables a link-time workaround for a
-bug in certain VFP11 coprocessor hardware, which sometimes allows
-instructions with denorm operands (which must be handled by support code)
-to have those operands overwritten by subsequent instructions before
-the support code can read the intended values.
-
-The bug may be avoided in scalar mode if you allow at least one
-intervening instruction between a VFP11 instruction which uses a register
-and another instruction which writes to the same register, or at least two
-intervening instructions if vector mode is in use. The bug only affects
-full-compliance floating-point mode: you do not need this workaround if
-you are using "runfast" mode. Please contact ARM for further details.
-
-If you know you are using buggy VFP11 hardware, you can
-enable this workaround by specifying the linker option
-@samp{--vfp-denorm-fix=scalar} if you are using the VFP11 scalar
-mode only, or @samp{--vfp-denorm-fix=vector} if you are using
-vector mode (the latter also works for scalar code). The default is
-@samp{--vfp-denorm-fix=none}.
-
-If the workaround is enabled, instructions are scanned for
-potentially-troublesome sequences, and a veneer is created for each
-such sequence which may trigger the erratum. The veneer consists of the
-first instruction of the sequence and a branch back to the subsequent
-instruction. The original instruction is then replaced with a branch to
-the veneer. The extra cycles required to call and return from the veneer
-are sufficient to avoid the erratum in both the scalar and vector cases.
-
-@cindex NO_ENUM_SIZE_WARNING
-@kindex --no-enum-size-warning
-The @samp{--no-enum-size-warning} switch prevents the linker from
-warning when linking object files that specify incompatible EABI
-enumeration size attributes. For example, with this switch enabled,
-linking of an object file using 32-bit enumeration values with another
-using enumeration values fitted into the smallest possible space will
-not be diagnosed.
-
-@ifclear GENERIC
-@lowersections
-@end ifclear
-@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 POWERPC
-@ifclear GENERIC
-@raisesections
-@end ifclear
-
-@node PowerPC ELF32
-@section @command{ld} and PowerPC 32-bit ELF Support
-@cindex PowerPC long branches
-@kindex --relax on PowerPC
-Branches on PowerPC processors are limited to a signed 26-bit
-displacement, which may result in @command{ld} giving
-@samp{relocation truncated to fit} errors with very large programs.
-@samp{--relax} enables the generation of trampolines that can access
-the entire 32-bit address space. These trampolines are inserted at
-section boundaries, so may not themselves be reachable if an input
-section exceeds 33M in size.
-
-@cindex PowerPC ELF32 options
-@table @option
-@cindex PowerPC PLT
-@kindex --bss-plt
-@item --bss-plt
-Current PowerPC GCC accepts a @samp{-msecure-plt} option that
-generates code capable of using a newer PLT and GOT layout that has
-the security advantage of no executable section ever needing to be
-writable and no writable section ever being executable. PowerPC
-@command{ld} will generate this layout, including stubs to access the
-PLT, if all input files (including startup and static libraries) were
-compiled with @samp{-msecure-plt}. @samp{--bss-plt} forces the old
-BSS PLT (and GOT layout) which can give slightly better performance.
-
-@kindex --secure-plt
-@item --secure-plt
-@command{ld} will use the new PLT and GOT layout if it is linking new
-@samp{-fpic} or @samp{-fPIC} code, but does not do so automatically
-when linking non-PIC code. This option requests the new PLT and GOT
-layout. A warning will be given if some object file requires the old
-style BSS PLT.
-
-@cindex PowerPC GOT
-@kindex --sdata-got
-@item --sdata-got
-The new secure PLT and GOT are placed differently relative to other
-sections compared to older BSS PLT and GOT placement. The location of
-@code{.plt} must change because the new secure PLT is an initialized
-section while the old PLT is uninitialized. The reason for the
-@code{.got} change is more subtle: The new placement allows
-@code{.got} to be read-only in applications linked with
-@samp{-z relro -z now}. However, this placement means that
-@code{.sdata} cannot always be used in shared libraries, because the
-PowerPC ABI accesses @code{.sdata} in shared libraries from the GOT
-pointer. @samp{--sdata-got} forces the old GOT placement. PowerPC
-GCC doesn't use @code{.sdata} in shared libraries, so this option is
-really only useful for other compilers that may do so.
-
-@cindex PowerPC stub symbols
-@kindex --emit-stub-syms
-@item --emit-stub-syms
-This option causes @command{ld} to label linker stubs with a local
-symbol that encodes the stub type and destination.
-
-@cindex PowerPC TLS optimization
-@kindex --no-tls-optimize
-@item --no-tls-optimize
-PowerPC @command{ld} normally performs some optimization of code
-sequences used to access Thread-Local Storage. Use this option to
-disable the optimization.
-@end table
-
-@ifclear GENERIC
-@lowersections
-@end ifclear
-@end ifset
-
-@ifset POWERPC64
-@ifclear GENERIC
-@raisesections
-@end ifclear
-
-@node PowerPC64 ELF64
-@section @command{ld} and PowerPC64 64-bit ELF Support
-
-@cindex PowerPC64 ELF64 options
-@table @option
-@cindex PowerPC64 stub grouping
-@kindex --stub-group-size
-@item --stub-group-size
-Long branch stubs, PLT call stubs and TOC adjusting stubs are placed
-by @command{ld} in stub sections located between groups of input sections.
-@samp{--stub-group-size} specifies the maximum size of a group of input
-sections handled by one stub section. Since branch offsets are signed,
-a stub section may serve two groups of input sections, one group before
-the stub section, and one group after it. However, when using
-conditional branches that require stubs, it may be better (for branch
-prediction) that stub sections only serve one group of input sections.
-A negative value for @samp{N} chooses this scheme, ensuring that
-branches to stubs always use a negative offset. Two special values of
-@samp{N} are recognized, @samp{1} and @samp{-1}. These both instruct
-@command{ld} to automatically size input section groups for the branch types
-detected, with the same behaviour regarding stub placement as other
-positive or negative values of @samp{N} respectively.
-
-Note that @samp{--stub-group-size} does not split input sections. A
-single input section larger than the group size specified will of course
-create a larger group (of one section). If input sections are too
-large, it may not be possible for a branch to reach its stub.
-
-@cindex PowerPC64 stub symbols
-@kindex --emit-stub-syms
-@item --emit-stub-syms
-This option causes @command{ld} to label linker stubs with a local
-symbol that encodes the stub type and destination.
-
-@cindex PowerPC64 dot symbols
-@kindex --dotsyms
-@kindex --no-dotsyms
-@item --dotsyms, --no-dotsyms
-These two options control how @command{ld} interprets version patterns
-in a version script. Older PowerPC64 compilers emitted both a
-function descriptor symbol with the same name as the function, and a
-code entry symbol with the name prefixed by a dot (@samp{.}). To
-properly version a function @samp{foo}, the version script thus needs
-to control both @samp{foo} and @samp{.foo}. The option
-@samp{--dotsyms}, on by default, automatically adds the required
-dot-prefixed patterns. Use @samp{--no-dotsyms} to disable this
-feature.
-
-@cindex PowerPC64 TLS optimization
-@kindex --no-tls-optimize
-@item --no-tls-optimize
-PowerPC64 @command{ld} normally performs some optimization of code
-sequences used to access Thread-Local Storage. Use this option to
-disable the optimization.
-
-@cindex PowerPC64 OPD optimization
-@kindex --no-opd-optimize
-@item --no-opd-optimize
-PowerPC64 @command{ld} normally removes @code{.opd} section entries
-corresponding to deleted link-once functions, or functions removed by
-the action of @samp{--gc-sections} or linker scrip @code{/DISCARD/}.
-Use this option to disable @code{.opd} optimization.
-
-@cindex PowerPC64 OPD spacing
-@kindex --non-overlapping-opd
-@item --non-overlapping-opd
-Some PowerPC64 compilers have an option to generate compressed
-@code{.opd} entries spaced 16 bytes apart, overlapping the third word,
-the static chain pointer (unused in C) with the first word of the next
-entry. This option expands such entries to the full 24 bytes.
-
-@cindex PowerPC64 TOC optimization
-@kindex --no-toc-optimize
-@item --no-toc-optimize
-PowerPC64 @command{ld} normally removes unused @code{.toc} section
-entries. Such entries are detected by examining relocations that
-reference the TOC in code sections. A reloc in a deleted code section
-marks a TOC word as unneeded, while a reloc in a kept code section
-marks a TOC word as needed. Since the TOC may reference itself, TOC
-relocs are also examined. TOC words marked as both needed and
-unneeded will of course be kept. TOC words without any referencing
-reloc are assumed to be part of a multi-word entry, and are kept or
-discarded as per the nearest marked preceding word. This works
-reliably for compiler generated code, but may be incorrect if assembly
-code is used to insert TOC entries. Use this option to disable the
-optimization.
-
-@cindex PowerPC64 multi-TOC
-@kindex --no-multi-toc
-@item --no-multi-toc
-By default, PowerPC64 GCC generates code for a TOC model where TOC
-entries are accessed with a 16-bit offset from r2. This limits the
-total TOC size to 64K. PowerPC64 @command{ld} extends this limit by
-grouping code sections such that each group uses less than 64K for its
-TOC entries, then inserts r2 adjusting stubs between inter-group
-calls. @command{ld} does not split apart input sections, so cannot
-help if a single input file has a @code{.toc} section that exceeds
-64K, most likely from linking multiple files with @command{ld -r}.
-Use this option to turn off this feature.
-@end table
-
-@ifclear GENERIC
-@lowersections
-@end ifclear
-@end ifset
-
-@ifset SPU
-@ifclear GENERIC
-@raisesections
-@end ifclear
-
-@node SPU ELF
-@section @command{ld} and SPU ELF Support
-
-@cindex SPU ELF options
-@table @option
-
-@cindex SPU plugins
-@kindex --plugin
-@item --plugin
-This option marks an executable as a PIC plugin module.
-
-@cindex SPU overlays
-@kindex --no-overlays
-@item --no-overlays
-Normally, @command{ld} recognizes calls to functions within overlay
-regions, and redirects such calls to an overlay manager via a stub.
-@command{ld} also provides a built-in overlay manager. This option
-turns off all this special overlay handling.
-
-@cindex SPU overlay stub symbols
-@kindex --emit-stub-syms
-@item --emit-stub-syms
-This option causes @command{ld} to label overlay stubs with a local
-symbol that encodes the stub type and destination.
-
-@cindex SPU extra overlay stubs
-@kindex --extra-overlay-stubs
-@item --extra-overlay-stubs
-This option causes @command{ld} to add overlay call stubs on all
-function calls out of overlay regions. Normally stubs are not added
-on calls to non-overlay regions.
-
-@cindex SPU local store size
-@kindex --local-store=lo:hi
-@item --local-store=lo:hi
-@command{ld} usually checks that a final executable for SPU fits in
-the address range 0 to 256k. This option may be used to change the
-range. Disable the check entirely with @option{--local-store=0:0}.
-
-@cindex SPU
-@kindex --stack-analysis
-@item --stack-analysis
-SPU local store space is limited. Over-allocation of stack space
-unnecessarily limits space available for code and data, while
-under-allocation results in runtime failures. If given this option,
-@command{ld} will provide an estimate of maximum stack usage.
-@command{ld} does this by examining symbols in code sections to
-determine the extents of functions, and looking at function prologues
-for stack adjusting instructions. A call-graph is created by looking
-for relocations on branch instructions. The graph is then searched
-for the maximum stack usage path. Note that this analysis does not
-find calls made via function pointers, and does not handle recursion
-and other cycles in the call graph. Stack usage may be
-under-estimated if your code makes such calls. Also, stack usage for
-dynamic allocation, e.g. alloca, will not be detected. If a link map
-is requested, detailed information about each function's stack usage
-and calls will be given.
-
-@cindex SPU
-@kindex --emit-stack-syms
-@item --emit-stack-syms
-This option, if given along with @option{--stack-analysis} will result
-in @command{ld} emitting stack sizing symbols for each function.
-These take the form @code{__stack_<function_name>} for global
-functions, and @code{__stack_<number>_<function_name>} for static
-functions. @code{<number>} is the section id in hex. The value of
-such symbols is the stack requirement for the corresponding function.
-The symbol size will be zero, type @code{STT_NOTYPE}, binding
-@code{STB_LOCAL}, and section @code{SHN_ABS}.
-@end table
-
-@ifclear GENERIC
-@lowersections
-@end ifclear
-@end ifset
-
-@ifset TICOFF
-@ifclear GENERIC
-@raisesections
-@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 description 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=0x20000000
-
-EXPORTS
-foo
-bar
-_bar = bar
-another_foo = abc.dll.afoo
-var1 DATA
-@end example
-
-This example defines a DLL with a non-default base address and five
-symbols in the export table. The third exported symbol @code{_bar} is an
-alias for the second. The fourth symbol, @code{another_foo} is resolved
-by "forwarding" to another module and treating it as an alias for
-@code{afoo} exported from the DLL @samp{abc.dll}. The final symbol
-@code{var1} is declared to be a data object.
-
-The optional @code{LIBRARY <name>} command indicates the @emph{internal}
-name of the output DLL. If @samp{<name>} does not include a suffix,
-the default library suffix, @samp{.DLL} is appended.
-
-When the .DEF file is used to build an application, rather than a
-library, the @code{NAME <name>} command should be used instead of
-@code{LIBRARY}. If @samp{<name>} does not include a suffix, the default
-executable suffix, @samp{.EXE} is appended.
-
-With either @code{LIBRARY <name>} or @code{NAME <name>} the optional
-specification @code{BASE = <number>} may be used to specify a
-non-default base address for the image.
-
-If neither @code{LIBRARY <name>} nor @code{NAME <name>} is specified,
-or they specify an empty string, the internal name is the same as the
-filename specified on the command line.
-
-The complete specification of an export symbol is:
-
-@example
-EXPORTS
- ( ( ( <name1> [ = <name2> ] )
- | ( <name1> = <module-name> . <external-name>))
- [ @@ <integer> ] [NONAME] [DATA] [CONSTANT] [PRIVATE] ) *
-@end example
-
-Declares @samp{<name1>} as an exported symbol from the DLL, or declares
-@samp{<name1>} as an exported alias for @samp{<name2>}; or declares
-@samp{<name1>} as a "forward" alias for the symbol
-@samp{<external-name>} in the DLL @samp{<module-name>}.
-Optionally, the symbol may be exported by the specified ordinal
-@samp{<integer>} alias.
-
-The optional keywords that follow the declaration indicate:
-
-@code{NONAME}: Do not put the symbol name in the DLL's export table. It
-will still be exported by its ordinal alias (either the value specified
-by the .def specification or, otherwise, the value assigned by the
-linker). The symbol name, however, does remain visible in the import
-library (if any), unless @code{PRIVATE} is also specified.
-
-@code{DATA}: The symbol is a variable or object, rather than a function.
-The import lib will export only an indirect reference to @code{foo} as
-the symbol @code{_imp__foo} (ie, @code{foo} must be resolved as
-@code{*_imp__foo}).
-
-@code{CONSTANT}: Like @code{DATA}, but put the undecorated @code{foo} as
-well as @code{_imp__foo} into the import library. Both refer to the
-read-only import address table's pointer to the variable, not to the
-variable itself. This can be dangerous. If the user code fails to add
-the @code{dllimport} attribute and also fails to explicitly add the
-extra indirection that the use of the attribute enforces, the
-application will behave unexpectedly.
-
-@code{PRIVATE}: Put the symbol in the DLL's export table, but do not put
-it into the static import library used to resolve imports at link time. The
-symbol can still be imported using the @code{LoadLibrary/GetProcAddress}
-API at runtime or by by using the GNU ld extension of linking directly to
-the DLL without an import library.
-
-See ld/deffilep.y in the binutils sources for the full specification of
-other DEF file statements
-
-@cindex creating a DEF file
-While linking a shared dll, @command{ld} is able to create a DEF file
-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
-information.
-@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 achieve a behavior that conforms to that on POSIX/Un*x
-platforms. This feature is enabled with the @samp{--enable-auto-import}
-command-line option, although it is enabled by default on cygwin/mingw.
-The @samp{--enable-auto-import} option itself now serves mainly to
-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, especially when linking large
-libraries or applications. When @command{ld} creates an import lib, each
-function or variable exported from the dll is stored in its own bfd, even
-though a single bfd could contain many exports. The overhead involved in
-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
-xxx.lib
-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 three 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.
-
-3. Symbol aliases can only be resolved using an import lib. This is
-critical when linking against OS-supplied dll's (eg, the win32 API)
-in which symbols are usually exported as undecorated aliases of their
-stdcall-decorated assembly names.
-
-So, import libs are not going away. But the ability to replace
-true import libs with a simple symbolic link to (or a copy of)
-a dll, in many cases, is a useful addition to the suite of tools
-binutils makes available to the win32 developer. Given the
-massive improvements in memory requirements during linking, storage
-requirements, and linking speed, we expect that many developers
-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.
-
-@cindex weak externals
-@item weak externals
-The Windows object format, PE, specifies a form of weak symbols called
-weak externals. When a weak symbol is linked and the symbol is not
-defined, the weak symbol becomes an alias for some other symbol. There
-are three variants of weak externals:
-@itemize
-@item Definition is searched for in objects and libraries, historically
-called lazy externals.
-@item Definition is searched for only in other objects, not in libraries.
-This form is not presently implemented.
-@item No search; the symbol is an alias. This form is not presently
-implemented.
-@end itemize
-As a GNU extension, weak symbols that do not specify an alternate symbol
-are supported. If the symbol is undefined when linking, the symbol
-uses a default value.
-@end table
-
-@ifclear GENERIC
-@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.
-
-@cindex @option{--relax} on Xtensa
-@cindex relaxing on Xtensa
-Relaxation is enabled by default for the Xtensa version of @command{ld} and
-provides two important link-time optimizations. The first optimization
-is to combine identical literal values to reduce code size. A redundant
-literal will be removed and all the @code{L32R} instructions that use it
-will be changed to reference an identical literal, as long as the
-location of the replacement literal is within the offset range of all
-the @code{L32R} instructions. The second optimization is to remove
-unnecessary overhead from assembler-generated ``longcall'' sequences of
-@code{L32R}/@code{CALLX@var{n}} when the target functions are within
-range of direct @code{CALL@var{n}} instructions.
-
-For each of these cases where an indirect call sequence can be optimized
-to a direct call, the linker will change the @code{CALLX@var{n}}
-instruction to a @code{CALL@var{n}} instruction, remove the @code{L32R}
-instruction, and remove the literal referenced by the @code{L32R}
-instruction if it is not used for anything else. Removing the
-@code{L32R} instruction always reduces code size but can potentially
-hurt performance by changing the alignment of subsequent branch targets.
-By default, the linker will always preserve alignments, either by
-switching some instructions between 24-bit encodings and the equivalent
-density instructions or by inserting a no-op in place of the @code{L32R}
-instruction that was removed. If code size is more important than
-performance, the @option{--size-opt} option can be used to prevent the
-linker from widening density instructions or inserting no-ops, except in
-a few cases where no-ops are required for correctness.
-
-The following Xtensa-specific command-line options can be used to
-control the linker:
-
-@cindex Xtensa options
-@table @option
-@kindex --no-relax
-@item --no-relax
-Since the Xtensa version of @code{ld} enables the @option{--relax} option
-by default, the @option{--no-relax} option is provided to disable
-relaxation.
-
-@item --size-opt
-When optimizing indirect calls to direct calls, optimize for code size
-more than performance. With this option, the linker will not insert
-no-ops or widen density instructions to preserve branch target
-alignment. There may still be some cases where no-ops are required to
-preserve the correctness of the code.
-@end table
-
-@ifclear GENERIC
-@lowersections
-@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.
-
-@ifset BUGURL
-Otherwise, send bug reports for @command{ld} to
-@value{BUGURL}.
-@end ifset
-
-The fundamental principle of reporting bugs usefully is this:
-@strong{report all the facts}. If you are not sure whether to state a
-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 sync, or you have encountered a bug in the
-C library on your system. (This has happened!) Your copy might crash
-and ours would not. If you told us to expect a crash, then when ours
-fails to crash, we would know that the bug was not happening for us. If
-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 LD Index
-@unnumbered LD 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
-
-@bye
diff --git a/contrib/binutils/ld/ldcref.c b/contrib/binutils/ld/ldcref.c
deleted file mode 100644
index 4fa29de080a1..000000000000
--- a/contrib/binutils/ld/ldcref.c
+++ /dev/null
@@ -1,734 +0,0 @@
-/* ldcref.c -- output a cross reference table
- Copyright 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004, 2006,
- 2007 Free Software Foundation, Inc.
- Written by Ian Lance Taylor <ian@cygnus.com>
-
-This file is part of GLD, the Gnu Linker.
-
-This program is free software; you can redistribute it and/or modify
-it under the terms of the GNU General Public License as published by
-the Free Software Foundation; either version 2 of the License, or
-(at your option) any later version.
-
-This program is distributed in the hope that it will be useful,
-but WITHOUT ANY WARRANTY; without even the implied warranty of
-MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
-GNU General Public License for more details.
-
-You should have received a copy of the GNU General Public License
-along with this program; if not, write to the Free Software
-Foundation, Inc., 51 Franklin Street - Fifth Floor, Boston, MA 02110-1301, USA. */
-
-/* This file 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 "sysdep.h"
-#include "bfd.h"
-#include "bfdlink.h"
-#include "libiberty.h"
-#include "demangle.h"
-#include "objalloc.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. */
- const 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_local_sym_xref (lang_input_statement_type *);
-static bfd_boolean check_nocrossref (struct cref_hash_entry *, void *);
-static void check_refs (const char *, bfd_boolean, 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;
-
-/* Used to take a snapshot of the cref hash table when starting to
- add syms from an as-needed library. */
-static struct bfd_hash_entry **old_table;
-static unsigned int old_size;
-static unsigned int old_count;
-static void *old_tab;
-static void *alloc_mark;
-static size_t tabsize, entsize, refsize;
-static size_t old_symcount;
-
-/* Create an entry in a cref hash table. */
-
-static struct bfd_hash_entry *
-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
- global 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,
- sizeof (struct cref_hash_entry)))
- 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 = bfd_hash_allocate (&cref_table.root, sizeof *r);
- if (r == NULL)
- einfo (_("%X%P: cref alloc failed: %E\n"));
- r->next = h->refs;
- h->refs = r;
- r->abfd = abfd;
- 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;
-}
-
-/* Called before loading an as-needed library to take a snapshot of
- the cref hash table, and after we have loaded or found that the
- library was not needed. */
-
-bfd_boolean
-handle_asneeded_cref (bfd *abfd ATTRIBUTE_UNUSED,
- enum notice_asneeded_action act)
-{
- unsigned int i;
-
- if (!cref_initialized)
- return TRUE;
-
- if (act == notice_as_needed)
- {
- char *old_ent, *old_ref;
-
- for (i = 0; i < cref_table.root.size; i++)
- {
- struct bfd_hash_entry *p;
- struct cref_hash_entry *c;
- struct cref_ref *r;
-
- for (p = cref_table.root.table[i]; p != NULL; p = p->next)
- {
- entsize += cref_table.root.entsize;
- c = (struct cref_hash_entry *) p;
- for (r = c->refs; r != NULL; r = r->next)
- refsize += sizeof (struct cref_hash_entry);
- }
- }
-
- tabsize = cref_table.root.size * sizeof (struct bfd_hash_entry *);
- old_tab = xmalloc (tabsize + entsize + refsize);
-
- alloc_mark = bfd_hash_allocate (&cref_table.root, 1);
- if (alloc_mark == NULL)
- return FALSE;
-
- memcpy (old_tab, cref_table.root.table, tabsize);
- old_ent = (char *) old_tab + tabsize;
- old_ref = (char *) old_ent + entsize;
- old_table = cref_table.root.table;
- old_size = cref_table.root.size;
- old_count = cref_table.root.count;
- old_symcount = cref_symcount;
-
- for (i = 0; i < cref_table.root.size; i++)
- {
- struct bfd_hash_entry *p;
- struct cref_hash_entry *c;
- struct cref_ref *r;
-
- for (p = cref_table.root.table[i]; p != NULL; p = p->next)
- {
- memcpy (old_ent, p, cref_table.root.entsize);
- old_ent = (char *) old_ent + cref_table.root.entsize;
- c = (struct cref_hash_entry *) p;
- for (r = c->refs; r != NULL; r = r->next)
- {
- memcpy (old_ref, r, sizeof (struct cref_hash_entry));
- old_ref = (char *) old_ref + sizeof (struct cref_hash_entry);
- }
- }
- }
- return TRUE;
- }
-
- if (act == notice_not_needed)
- {
- char *old_ent, *old_ref;
-
- if (old_tab == NULL)
- {
- /* The only way old_tab can be NULL is if the cref hash table
- had not been initialised when notice_as_needed. */
- bfd_hash_table_free (&cref_table.root);
- cref_initialized = FALSE;
- return TRUE;
- }
-
- old_ent = (char *) old_tab + tabsize;
- old_ref = (char *) old_ent + entsize;
- cref_table.root.table = old_table;
- cref_table.root.size = old_size;
- cref_table.root.count = old_count;
- memcpy (cref_table.root.table, old_tab, tabsize);
- cref_symcount = old_symcount;
-
- for (i = 0; i < cref_table.root.size; i++)
- {
- struct bfd_hash_entry *p;
- struct cref_hash_entry *c;
- struct cref_ref *r;
-
- for (p = cref_table.root.table[i]; p != NULL; p = p->next)
- {
- memcpy (p, old_ent, cref_table.root.entsize);
- old_ent = (char *) old_ent + cref_table.root.entsize;
- c = (struct cref_hash_entry *) p;
- for (r = c->refs; r != NULL; r = r->next)
- {
- memcpy (r, old_ref, sizeof (struct cref_hash_entry));
- old_ref = (char *) old_ref + sizeof (struct cref_hash_entry);
- }
- }
- }
-
- objalloc_free_block ((struct objalloc *) cref_table.root.memory,
- alloc_mark);
- }
- else if (act != notice_needed)
- return FALSE;
-
- free (old_tab);
- old_tab = NULL;
- return TRUE;
-}
-
-/* Copy the addresses of the hash table entries into an array. This
- is called via cref_hash_traverse. We also fill in the demangled
- name. */
-
-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 = bfd_demangle (output_bfd, h->root.string,
- DMGL_ANSI | DMGL_PARAMS);
- if (h->demangled == NULL)
- h->demangled = 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_local_sym_xref);
-}
-
-/* Check for prohibited cross references to local and section symbols. */
-
-static void
-check_local_sym_xref (lang_input_statement_type *statement)
-{
- bfd *abfd;
- lang_input_statement_type *li;
- asymbol **asymbols, **syms;
-
- abfd = statement->the_bfd;
- if (abfd == NULL)
- return;
-
- 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;
- }
- }
-
- for (syms = asymbols; *syms; ++syms)
- {
- asymbol *sym = *syms;
- if (sym->flags & (BSF_GLOBAL | BSF_WARNING | BSF_INDIRECT | BSF_FILE))
- continue;
- if ((sym->flags & (BSF_LOCAL | BSF_SECTION_SYM)) != 0
- && sym->section->output_section != NULL)
- {
- const char *outsecname, *symname;
- struct lang_nocrossrefs *ncrs;
- struct lang_nocrossref *ncr;
-
- outsecname = sym->section->output_section->name;
- symname = NULL;
- if ((sym->flags & BSF_SECTION_SYM) == 0)
- symname = sym->name;
- for (ncrs = nocrossref_list; ncrs != NULL; ncrs = ncrs->next)
- for (ncr = ncrs->list; ncr != NULL; ncr = ncr->next)
- if (strcmp (ncr->name, outsecname) == 0)
- check_refs (symname, FALSE, sym->section, abfd, ncrs);
- }
- }
-
- if (li == NULL)
- free (asymbols);
-}
-
-/* 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, TRUE, 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;
- bfd_boolean global;
-};
-
-/* 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,
- bfd_boolean global,
- 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.global = global;
- 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;
- bfd_boolean global;
- 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. If INFO->GLOBAL is TRUE, the
- definition is global, check for relocations against the global
- symbols. Otherwise check for relocations against the local and
- section symbols. */
-
- symname = info->sym_name;
- global = info->global;
-
- relsize = bfd_get_reloc_upper_bound (abfd, sec);
- if (relsize < 0)
- 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
- && ((global
- && (bfd_is_und_section (bfd_get_section (*q->sym_ptr_ptr))
- || bfd_is_com_section (bfd_get_section (*q->sym_ptr_ptr))
- || ((*q->sym_ptr_ptr)->flags & (BSF_GLOBAL
- | BSF_WEAK)) != 0))
- || (!global
- && ((*q->sym_ptr_ptr)->flags & (BSF_LOCAL
- | BSF_SECTION_SYM)) != 0
- && bfd_get_section (*q->sym_ptr_ptr) == info->defsec))
- && (symname != NULL
- ? strcmp (bfd_asymbol_name (*q->sym_ptr_ptr), symname) == 0
- : ((*q->sym_ptr_ptr)->flags & BSF_SECTION_SYM) != 0))
- {
- /* 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 ab881ad54b66..000000000000
--- 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, 2004, 2006, 2007 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, 51 Franklin Street - Fifth Floor, Boston, MA
-02110-1301, USA. */
-
-#include "sysdep.h"
-#include "bfd.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_build_sets
- 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 (! CONST_STRNEQ (name, "GLOBAL_"))
- 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 5608ff7cbe97..000000000000
--- 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, 51 Franklin Street - Fifth Floor, Boston, MA
-02110-1301, 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 d4ed3d101695..000000000000
--- a/contrib/binutils/ld/ldemul.c
+++ /dev/null
@@ -1,322 +0,0 @@
-/* ldemul.c -- clearing house for ld emulation states
- Copyright 1991, 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999, 2000,
- 2001, 2002, 2003, 2005, 2007
- Free Software Foundation, Inc.
-
-This file is part of GLD, the Gnu Linker.
-
-GLD is free software; you can redistribute it and/or modify
-it under the terms of the GNU General Public License as published by
-the Free Software Foundation; either version 2, or (at your option)
-any later version.
-
-GLD is distributed in the hope that it will be useful,
-but WITHOUT ANY WARRANTY; without even the implied warranty of
-MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
-GNU General Public License for more details.
-
-You should have received a copy of the GNU General Public License
-along with GLD; see the file COPYING. If not, write to the Free
-Software Foundation, 51 Franklin Street - Fifth Floor, Boston, MA
-02110-1301, USA. */
-
-#include "sysdep.h"
-#include "bfd.h"
-#include "getopt.h"
-#include "bfdlink.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"
-
-static 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)
-{
- ld_emulation->before_allocation ();
-}
-
-void
-ldemul_set_output_arch (void)
-{
- ld_emulation->set_output_arch ();
-}
-
-void
-ldemul_finish (void)
-{
- 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 (asection *s)
-{
- if (ld_emulation->place_orphan)
- return (*ld_emulation->place_orphan) (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)
-{
- if (!link_info.relocatable)
- strip_excluded_output_sections ();
-}
-
-void
-finish_default (void)
-{
- if (!link_info.relocatable)
- _bfd_fix_excluded_sec_syms (output_bfd, &link_info);
-}
-
-void
-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 1b9b79b0676c..000000000000
--- a/contrib/binutils/ld/ldemul.h
+++ /dev/null
@@ -1,204 +0,0 @@
-/* ld-emul.h - Linker emulation header file
- Copyright 1991, 1992, 1993, 1994, 1995, 1996, 1997, 1998, 2000, 2001,
- 2002, 2003, 2004, 2005
- Free Software Foundation, Inc.
-
- This file is part of GLD, the Gnu Linker.
-
- 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
-
-/* Forward declaration for ldemul_add_options() and others. */
-struct option;
-
-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
- (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 finish_default
- (void);
-extern void finish_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)
- (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 809b9581eed4..000000000000
--- a/contrib/binutils/ld/ldexp.c
+++ /dev/null
@@ -1,1152 +0,0 @@
-/* This module handles expression trees.
- Copyright 1991, 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999, 2000,
- 2001, 2002, 2003, 2004, 2005, 2006, 2007
- Free Software Foundation, Inc.
- Written by Steve Chamberlain of Cygnus Support <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, 51 Franklin Street - Fifth Floor, Boston, MA
- 02110-1301, 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 "sysdep.h"
-#include "bfd.h"
-#include "bfdlink.h"
-
-#include "ld.h"
-#include "ldmain.h"
-#include "ldmisc.h"
-#include "ldexp.h"
-#include "ldlex.h"
-#include <ldgram.h>
-#include "ldlang.h"
-#include "libiberty.h"
-#include "safe-ctype.h"
-
-static void exp_fold_tree_1 (etree_type *);
-static void exp_fold_tree_no_dot (etree_type *);
-static bfd_vma align_n (bfd_vma, bfd_vma);
-
-segment_type *segments;
-
-struct ldexp_control expld;
-
-/* 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" },
- { ALIGNOF, "ALIGNOF" },
- { SIZEOF, "SIZEOF" },
- { ADDR, "ADDR" },
- { LOADADDR, "LOADADDR" },
- { CONSTANT, "CONSTANT" },
- { MAX_K, "MAX_K" },
- { REL, "relocatable" },
- { DATA_SEGMENT_ALIGN, "DATA_SEGMENT_ALIGN" },
- { DATA_SEGMENT_RELRO_END, "DATA_SEGMENT_RELRO_END" },
- { DATA_SEGMENT_END, "DATA_SEGMENT_END" },
- { ORIGIN, "ORIGIN" },
- { LENGTH, "LENGTH" },
- { SEGMENT_START, "SEGMENT_START" }
- };
- unsigned int idx;
-
- 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 (void)
-{
- expld.result.value += expld.result.section->vma;
- expld.result.section = bfd_abs_section_ptr;
-}
-
-static void
-new_abs (bfd_vma value)
-{
- expld.result.valid_p = TRUE;
- expld.result.section = bfd_abs_section_ptr;
- expld.result.value = value;
- expld.result.str = NULL;
-}
-
-etree_type *
-exp_intop (bfd_vma value)
-{
- etree_type *new = stat_alloc (sizeof (new->value));
- new->type.node_code = INT;
- new->type.lineno = lineno;
- new->value.value = value;
- new->value.str = NULL;
- new->type.node_class = etree_value;
- 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->type.lineno = lineno;
- 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.lineno = lineno;
- new->type.node_class = etree_rel;
- new->rel.section = section;
- new->rel.value = value;
- return new;
-}
-
-static void
-new_rel (bfd_vma value, char *str, asection *section)
-{
- expld.result.valid_p = TRUE;
- expld.result.value = value;
- expld.result.str = str;
- expld.result.section = section;
-}
-
-static void
-new_rel_from_abs (bfd_vma value)
-{
- expld.result.valid_p = TRUE;
- expld.result.value = value - expld.section->vma;
- expld.result.str = NULL;
- expld.result.section = expld.section;
-}
-
-static void
-fold_unary (etree_type *tree)
-{
- exp_fold_tree_1 (tree->unary.child);
- if (expld.result.valid_p)
- {
- switch (tree->type.node_code)
- {
- case ALIGN_K:
- if (expld.phase != lang_first_phase_enum)
- new_rel_from_abs (align_n (expld.dot, expld.result.value));
- else
- expld.result.valid_p = FALSE;
- break;
-
- case ABSOLUTE:
- make_abs ();
- break;
-
- case '~':
- make_abs ();
- expld.result.value = ~expld.result.value;
- break;
-
- case '!':
- make_abs ();
- expld.result.value = !expld.result.value;
- break;
-
- case '-':
- make_abs ();
- expld.result.value = -expld.result.value;
- break;
-
- case NEXT:
- /* Return next place aligned to value. */
- if (expld.phase != lang_first_phase_enum)
- {
- make_abs ();
- expld.result.value = align_n (expld.dot, expld.result.value);
- }
- else
- expld.result.valid_p = FALSE;
- break;
-
- case DATA_SEGMENT_END:
- if (expld.phase != lang_first_phase_enum
- && expld.section == bfd_abs_section_ptr
- && (expld.dataseg.phase == exp_dataseg_align_seen
- || expld.dataseg.phase == exp_dataseg_relro_seen
- || expld.dataseg.phase == exp_dataseg_adjust
- || expld.dataseg.phase == exp_dataseg_relro_adjust
- || expld.phase == lang_final_phase_enum))
- {
- if (expld.dataseg.phase == exp_dataseg_align_seen
- || expld.dataseg.phase == exp_dataseg_relro_seen)
- {
- expld.dataseg.phase = exp_dataseg_end_seen;
- expld.dataseg.end = expld.result.value;
- }
- }
- else
- expld.result.valid_p = FALSE;
- break;
-
- default:
- FAIL ();
- break;
- }
- }
-}
-
-static void
-fold_binary (etree_type *tree)
-{
- exp_fold_tree_1 (tree->binary.lhs);
-
- /* The SEGMENT_START operator is special because its first
- operand is a string, not the name of a symbol. */
- if (expld.result.valid_p && tree->type.node_code == SEGMENT_START)
- {
- const char *segment_name;
- segment_type *seg;
- /* Check to see if the user has overridden the default
- value. */
- segment_name = tree->binary.rhs->name.name;
- for (seg = segments; seg; seg = seg->next)
- if (strcmp (seg->name, segment_name) == 0)
- {
- seg->used = TRUE;
- expld.result.value = seg->value;
- expld.result.str = NULL;
- expld.result.section = NULL;
- break;
- }
- }
- else if (expld.result.valid_p)
- {
- etree_value_type lhs = expld.result;
-
- exp_fold_tree_1 (tree->binary.rhs);
- if (expld.result.valid_p)
- {
- /* If the values are from different sections, or this is an
- absolute expression, make both the source arguments
- absolute. However, adding or subtracting an absolute
- value from a relative value is meaningful, and is an
- exception. */
- if (expld.section != bfd_abs_section_ptr
- && lhs.section == bfd_abs_section_ptr
- && tree->type.node_code == '+')
- {
- /* Keep the section of the rhs term. */
- expld.result.value = lhs.value + expld.result.value;
- return;
- }
- else if (expld.section != bfd_abs_section_ptr
- && expld.result.section == bfd_abs_section_ptr
- && (tree->type.node_code == '+'
- || tree->type.node_code == '-'))
- {
- /* Keep the section of the lhs term. */
- expld.result.section = lhs.section;
- }
- else if (expld.result.section != lhs.section
- || expld.section == bfd_abs_section_ptr)
- {
- make_abs ();
- lhs.value += lhs.section->vma;
- }
-
- switch (tree->type.node_code)
- {
- case '%':
- if (expld.result.value != 0)
- expld.result.value = ((bfd_signed_vma) lhs.value
- % (bfd_signed_vma) expld.result.value);
- else if (expld.phase != lang_mark_phase_enum)
- einfo (_("%F%S %% by zero\n"));
- break;
-
- case '/':
- if (expld.result.value != 0)
- expld.result.value = ((bfd_signed_vma) lhs.value
- / (bfd_signed_vma) expld.result.value);
- else if (expld.phase != lang_mark_phase_enum)
- einfo (_("%F%S / by zero\n"));
- break;
-
-#define BOP(x, y) \
- case x: \
- expld.result.value = lhs.value y expld.result.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 (lhs.value > expld.result.value)
- expld.result.value = lhs.value;
- break;
-
- case MIN_K:
- if (lhs.value < expld.result.value)
- expld.result.value = lhs.value;
- break;
-
- case ALIGN_K:
- expld.result.value = align_n (lhs.value, expld.result.value);
- break;
-
- case DATA_SEGMENT_ALIGN:
- if (expld.phase != lang_first_phase_enum
- && expld.section == bfd_abs_section_ptr
- && (expld.dataseg.phase == exp_dataseg_none
- || expld.dataseg.phase == exp_dataseg_adjust
- || expld.dataseg.phase == exp_dataseg_relro_adjust
- || expld.phase == lang_final_phase_enum))
- {
- bfd_vma maxpage = lhs.value;
- bfd_vma commonpage = expld.result.value;
-
- expld.result.value = align_n (expld.dot, maxpage);
- if (expld.dataseg.phase == exp_dataseg_relro_adjust)
- expld.result.value = expld.dataseg.base;
- else if (expld.dataseg.phase != exp_dataseg_adjust)
- {
- expld.result.value += expld.dot & (maxpage - 1);
- if (expld.phase == lang_allocating_phase_enum)
- {
- expld.dataseg.phase = exp_dataseg_align_seen;
- expld.dataseg.min_base = align_n (expld.dot, maxpage);
- expld.dataseg.base = expld.result.value;
- expld.dataseg.pagesize = commonpage;
- expld.dataseg.maxpagesize = maxpage;
- expld.dataseg.relro_end = 0;
- }
- }
- else if (commonpage < maxpage)
- expld.result.value += ((expld.dot + commonpage - 1)
- & (maxpage - commonpage));
- }
- else
- expld.result.valid_p = FALSE;
- break;
-
- case DATA_SEGMENT_RELRO_END:
- if (expld.phase != lang_first_phase_enum
- && (expld.dataseg.phase == exp_dataseg_align_seen
- || expld.dataseg.phase == exp_dataseg_adjust
- || expld.dataseg.phase == exp_dataseg_relro_adjust
- || expld.phase == lang_final_phase_enum))
- {
- if (expld.dataseg.phase == exp_dataseg_align_seen
- || expld.dataseg.phase == exp_dataseg_relro_adjust)
- expld.dataseg.relro_end = lhs.value + expld.result.value;
-
- if (expld.dataseg.phase == exp_dataseg_relro_adjust
- && (expld.dataseg.relro_end
- & (expld.dataseg.pagesize - 1)))
- {
- expld.dataseg.relro_end += expld.dataseg.pagesize - 1;
- expld.dataseg.relro_end &= ~(expld.dataseg.pagesize - 1);
- expld.result.value = (expld.dataseg.relro_end
- - expld.result.value);
- }
- else
- expld.result.value = lhs.value;
-
- if (expld.dataseg.phase == exp_dataseg_align_seen)
- expld.dataseg.phase = exp_dataseg_relro_seen;
- }
- else
- expld.result.valid_p = FALSE;
- break;
-
- default:
- FAIL ();
- }
- }
- else
- expld.result.valid_p = FALSE;
- }
-}
-
-static void
-fold_trinary (etree_type *tree)
-{
- exp_fold_tree_1 (tree->trinary.cond);
- if (expld.result.valid_p)
- exp_fold_tree_1 (expld.result.value
- ? tree->trinary.lhs
- : tree->trinary.rhs);
-}
-
-static void
-fold_name (etree_type *tree)
-{
- memset (&expld.result, 0, sizeof (expld.result));
-
- switch (tree->type.node_code)
- {
- case SIZEOF_HEADERS:
- if (expld.phase != lang_first_phase_enum)
- {
- bfd_vma hdr_size = 0;
- /* Don't find the real header size if only marking sections;
- The bfd function may cache incorrect data. */
- if (expld.phase != lang_mark_phase_enum)
- hdr_size = bfd_sizeof_headers (output_bfd, &link_info);
- new_abs (hdr_size);
- }
- break;
-
- case DEFINED:
- if (expld.phase == 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);
- expld.result.value = (h != NULL
- && (h->type == bfd_link_hash_defined
- || h->type == bfd_link_hash_defweak
- || h->type == bfd_link_hash_common)
- && (def_iteration == lang_statement_iteration
- || def_iteration == -1));
- expld.result.section = bfd_abs_section_ptr;
- expld.result.valid_p = TRUE;
- }
- break;
-
- case NAME:
- if (expld.phase == lang_first_phase_enum)
- ;
- else if (tree->name.name[0] == '.' && tree->name.name[1] == 0)
- new_rel_from_abs (expld.dot);
- else
- {
- struct bfd_link_hash_entry *h;
-
- 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))
- new_abs (h->u.def.value);
- else
- {
- asection *output_section;
-
- output_section = h->u.def.section->output_section;
- if (output_section == NULL)
- {
- if (expld.phase != lang_mark_phase_enum)
- einfo (_("%X%S: unresolvable symbol `%s'"
- " referenced in expression\n"),
- tree->name.name);
- }
- else
- new_rel (h->u.def.value + h->u.def.section->output_offset,
- NULL, output_section);
- }
- }
- else if (expld.phase == lang_final_phase_enum
- || expld.assigning_to_dot)
- einfo (_("%F%S: undefined symbol `%s' referenced in expression\n"),
- tree->name.name);
- else if (h->type == bfd_link_hash_new)
- {
- h->type = bfd_link_hash_undefined;
- h->u.undef.abfd = NULL;
- if (h->u.undef.next == NULL && h != link_info.hash->undefs_tail)
- bfd_link_add_undef (link_info.hash, h);
- }
- }
- break;
-
- case ADDR:
- if (expld.phase != lang_first_phase_enum)
- {
- lang_output_section_statement_type *os;
-
- os = lang_output_section_find (tree->name.name);
- if (os == NULL)
- {
- if (expld.phase == lang_final_phase_enum)
- einfo (_("%F%S: undefined section `%s' referenced in expression\n"),
- tree->name.name);
- }
- else if (os->processed_vma)
- new_rel (0, NULL, os->bfd_section);
- }
- break;
-
- case LOADADDR:
- if (expld.phase != lang_first_phase_enum)
- {
- lang_output_section_statement_type *os;
-
- os = lang_output_section_find (tree->name.name);
- if (os == NULL)
- {
- if (expld.phase == lang_final_phase_enum)
- einfo (_("%F%S: undefined section `%s' referenced in expression\n"),
- tree->name.name);
- }
- else if (os->processed_lma)
- {
- if (os->load_base == NULL)
- new_abs (os->bfd_section->lma);
- else
- {
- exp_fold_tree_1 (os->load_base);
- make_abs ();
- }
- }
- }
- break;
-
- case SIZEOF:
- case ALIGNOF:
- if (expld.phase != lang_first_phase_enum)
- {
- lang_output_section_statement_type *os;
-
- os = lang_output_section_find (tree->name.name);
- if (os == NULL)
- {
- if (expld.phase == lang_final_phase_enum)
- einfo (_("%F%S: undefined section `%s' referenced in expression\n"),
- tree->name.name);
- new_abs (0);
- }
- else if (os->processed_vma)
- {
- bfd_vma val;
-
- if (tree->type.node_code == SIZEOF)
- val = os->bfd_section->size / bfd_octets_per_byte (output_bfd);
- else
- val = (bfd_vma)1 << os->bfd_section->alignment_power;
-
- new_abs (val);
- }
- }
- break;
-
- case LENGTH:
- {
- lang_memory_region_type *mem;
-
- mem = lang_memory_region_lookup (tree->name.name, FALSE);
- if (mem != NULL)
- new_abs (mem->length);
- else
- einfo (_("%F%S: undefined MEMORY region `%s'"
- " referenced in expression\n"), tree->name.name);
- }
- break;
-
- case ORIGIN:
- {
- lang_memory_region_type *mem;
-
- mem = lang_memory_region_lookup (tree->name.name, FALSE);
- if (mem != NULL)
- new_abs (mem->origin);
- else
- einfo (_("%F%S: undefined MEMORY region `%s'"
- " referenced in expression\n"), tree->name.name);
- }
- break;
-
- case CONSTANT:
- if (strcmp (tree->name.name, "MAXPAGESIZE") == 0)
- new_abs (bfd_emul_get_maxpagesize (default_target));
- else if (strcmp (tree->name.name, "COMMONPAGESIZE") == 0)
- new_abs (bfd_emul_get_commonpagesize (default_target));
- else
- einfo (_("%F%S: unknown constant `%s' referenced in expression\n"),
- tree->name.name);
- break;
-
- default:
- FAIL ();
- break;
- }
-}
-
-static void
-exp_fold_tree_1 (etree_type *tree)
-{
- if (tree == NULL)
- {
- memset (&expld.result, 0, sizeof (expld.result));
- return;
- }
-
- switch (tree->type.node_class)
- {
- case etree_value:
- new_rel (tree->value.value, tree->value.str, expld.section);
- break;
-
- case etree_rel:
- if (expld.phase != lang_first_phase_enum)
- {
- asection *output_section = tree->rel.section->output_section;
- new_rel (tree->rel.value + tree->rel.section->output_offset,
- NULL, output_section);
- }
- else
- memset (&expld.result, 0, sizeof (expld.result));
- break;
-
- case etree_assert:
- exp_fold_tree_1 (tree->assert_s.child);
- if (expld.phase == lang_final_phase_enum && !expld.result.value)
- einfo ("%X%P: %s\n", tree->assert_s.message);
- break;
-
- case etree_unary:
- fold_unary (tree);
- break;
-
- case etree_binary:
- fold_binary (tree);
- break;
-
- case etree_trinary:
- fold_trinary (tree);
- 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 (expld.phase == lang_mark_phase_enum
- || expld.phase == lang_allocating_phase_enum
- || (expld.phase == lang_final_phase_enum
- && expld.section == bfd_abs_section_ptr))
- {
- /* Notify the folder that this is an assignment to dot. */
- expld.assigning_to_dot = TRUE;
- exp_fold_tree_1 (tree->assign.src);
- expld.assigning_to_dot = FALSE;
-
- if (!expld.result.valid_p)
- {
- if (expld.phase != lang_mark_phase_enum)
- einfo (_("%F%S invalid assignment to location counter\n"));
- }
- else if (expld.dotp == NULL)
- einfo (_("%F%S assignment to location counter"
- " invalid outside of SECTION\n"));
- else
- {
- bfd_vma nextdot;
-
- nextdot = expld.result.value + expld.section->vma;
- if (nextdot < expld.dot
- && expld.section != bfd_abs_section_ptr)
- einfo (_("%F%S cannot move location counter backwards"
- " (from %V to %V)\n"), expld.dot, nextdot);
- else
- {
- expld.dot = nextdot;
- *expld.dotp = nextdot;
- }
- }
- }
- else
- memset (&expld.result, 0, sizeof (expld.result));
- }
- else
- {
- struct bfd_link_hash_entry *h = NULL;
-
- if (tree->type.node_class == etree_provide)
- {
- h = bfd_link_hash_lookup (link_info.hash, tree->assign.dst,
- FALSE, FALSE, TRUE);
- if (h == NULL
- || (h->type != bfd_link_hash_new
- && h->type != bfd_link_hash_undefined
- && h->type != bfd_link_hash_common))
- {
- /* Do nothing. The symbol was never referenced, or was
- defined by some object. */
- break;
- }
- }
-
- exp_fold_tree_1 (tree->assign.src);
- if (expld.result.valid_p)
- {
- if (h == NULL)
- {
- h = bfd_link_hash_lookup (link_info.hash, tree->assign.dst,
- TRUE, FALSE, TRUE);
- if (h == NULL)
- einfo (_("%P%F:%s: hash creation failed\n"),
- tree->assign.dst);
- }
-
- /* FIXME: Should we worry if the symbol is already
- defined? */
- lang_update_definedness (tree->assign.dst, h);
- h->type = bfd_link_hash_defined;
- h->u.def.value = expld.result.value;
- h->u.def.section = expld.result.section;
- if (tree->type.node_class == etree_provide)
- tree->type.node_class = etree_provided;
- }
- }
- break;
-
- case etree_name:
- fold_name (tree);
- break;
-
- default:
- FAIL ();
- memset (&expld.result, 0, sizeof (expld.result));
- break;
- }
-}
-
-void
-exp_fold_tree (etree_type *tree, asection *current_section, bfd_vma *dotp)
-{
- expld.dot = *dotp;
- expld.dotp = dotp;
- expld.section = current_section;
- exp_fold_tree_1 (tree);
-}
-
-static void
-exp_fold_tree_no_dot (etree_type *tree)
-{
- expld.dot = 0;
- expld.dotp = NULL;
- expld.section = bfd_abs_section_ptr;
- exp_fold_tree_1 (tree);
-}
-
-etree_type *
-exp_binop (int code, etree_type *lhs, etree_type *rhs)
-{
- etree_type value, *new;
-
- value.type.node_code = code;
- value.type.lineno = lhs->type.lineno;
- value.binary.lhs = lhs;
- value.binary.rhs = rhs;
- value.type.node_class = etree_binary;
- exp_fold_tree_no_dot (&value);
- if (expld.result.valid_p)
- return exp_intop (expld.result.value);
-
- new = stat_alloc (sizeof (new->binary));
- memcpy (new, &value, sizeof (new->binary));
- return new;
-}
-
-etree_type *
-exp_trinop (int code, etree_type *cond, etree_type *lhs, etree_type *rhs)
-{
- etree_type value, *new;
-
- value.type.node_code = code;
- value.type.lineno = lhs->type.lineno;
- value.trinary.lhs = lhs;
- value.trinary.cond = cond;
- value.trinary.rhs = rhs;
- value.type.node_class = etree_trinary;
- exp_fold_tree_no_dot (&value);
- if (expld.result.valid_p)
- return exp_intop (expld.result.value);
-
- new = stat_alloc (sizeof (new->trinary));
- memcpy (new, &value, sizeof (new->trinary));
- return new;
-}
-
-etree_type *
-exp_unop (int code, etree_type *child)
-{
- etree_type value, *new;
-
- value.unary.type.node_code = code;
- value.unary.type.lineno = child->type.lineno;
- value.unary.child = child;
- value.unary.type.node_class = etree_unary;
- exp_fold_tree_no_dot (&value);
- if (expld.result.valid_p)
- return exp_intop (expld.result.value);
-
- new = stat_alloc (sizeof (new->unary));
- memcpy (new, &value, sizeof (new->unary));
- return new;
-}
-
-etree_type *
-exp_nameop (int code, const char *name)
-{
- etree_type value, *new;
-
- value.name.type.node_code = code;
- value.name.type.lineno = lineno;
- value.name.name = name;
- value.name.type.node_class = etree_name;
-
- exp_fold_tree_no_dot (&value);
- if (expld.result.valid_p)
- return exp_intop (expld.result.value);
-
- new = stat_alloc (sizeof (new->name));
- memcpy (new, &value, sizeof (new->name));
- return new;
-
-}
-
-etree_type *
-exp_assop (int code, const char *dst, etree_type *src)
-{
- etree_type *new;
-
- new = stat_alloc (sizeof (new->assign));
- new->type.node_code = code;
- new->type.lineno = src->type.lineno;
- new->type.node_class = etree_assign;
- new->assign.src = src;
- new->assign.dst = dst;
- return new;
-}
-
-/* Handle PROVIDE. */
-
-etree_type *
-exp_provide (const char *dst, etree_type *src, bfd_boolean hidden)
-{
- etree_type *n;
-
- n = stat_alloc (sizeof (n->assign));
- n->assign.type.node_code = '=';
- n->assign.type.lineno = src->type.lineno;
- n->assign.type.node_class = etree_provide;
- n->assign.src = src;
- n->assign.dst = dst;
- n->assign.hidden = hidden;
- return n;
-}
-
-/* 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.lineno = exp->type.lineno;
- 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:
- 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_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)
-{
- if (tree != NULL)
- {
- exp_fold_tree_no_dot (tree);
- if (expld.result.valid_p)
- return expld.result.value;
- else if (name != NULL && expld.phase != lang_mark_phase_enum)
- einfo (_("%F%S nonconstant expression for %s\n"), name);
- }
- return def;
-}
-
-int
-exp_get_value_int (etree_type *tree, int def, char *name)
-{
- return exp_get_vma (tree, def, name);
-}
-
-fill_type *
-exp_get_fill (etree_type *tree, fill_type *def, char *name)
-{
- fill_type *fill;
- size_t len;
- unsigned int val;
-
- if (tree == NULL)
- return def;
-
- exp_fold_tree_no_dot (tree);
- if (!expld.result.valid_p)
- {
- if (name != NULL && expld.phase != lang_mark_phase_enum)
- einfo (_("%F%S nonconstant expression for %s\n"), name);
- return def;
- }
-
- if (expld.result.str != NULL && (len = strlen (expld.result.str)) != 0)
- {
- unsigned char *dst;
- unsigned char *s;
- fill = xmalloc ((len + 1) / 2 + sizeof (*fill) - 1);
- fill->size = (len + 1) / 2;
- dst = fill->data;
- s = (unsigned char *) expld.result.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 = expld.result.value;
- fill->data[0] = (val >> 24) & 0xff;
- __PAST_END(fill->data, 1) = (val >> 16) & 0xff;
- __PAST_END(fill->data, 2) = (val >> 8) & 0xff;
- __PAST_END(fill->data, 3) = (val >> 0) & 0xff;
- fill->size = 4;
- }
- return fill;
-}
-
-bfd_vma
-exp_get_abs_int (etree_type *tree, int def, char *name)
-{
- if (tree != NULL)
- {
- exp_fold_tree_no_dot (tree);
-
- if (expld.result.valid_p)
- {
- expld.result.value += expld.result.section->vma;
- return expld.result.value;
- }
- else if (name != NULL && expld.phase != lang_mark_phase_enum)
- {
- lineno = tree->type.lineno;
- einfo (_("%F%S: nonconstant expression for %s\n"), name);
- }
- }
- return def;
-}
-
-static bfd_vma
-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 3534188993a4..000000000000
--- a/contrib/binutils/ld/ldexp.h
+++ /dev/null
@@ -1,184 +0,0 @@
-/* ldexp.h -
- Copyright 1991, 1992, 1993, 1994, 1995, 1998, 1999, 2000, 2001, 2002,
- 2003, 2004, 2005 Free Software Foundation, Inc.
-
- This file is part of GLD, the Gnu Linker.
-
- GLD is free software; you can redistribute it and/or modify
- it under the terms of the GNU General Public License as published by
- the Free Software Foundation; either version 2, or (at your option)
- any later version.
-
- GLD is distributed in the hope that it will be useful,
- but WITHOUT ANY WARRANTY; without even the implied warranty of
- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- GNU General Public License for more details.
-
- You should have received a copy of the GNU General Public License
- along with GLD; see the file COPYING. If not, write to the Free
- Software Foundation, 51 Franklin Street - Fifth Floor, Boston, MA
- 02110-1301, USA. */
-
-#ifndef LDEXP_H
-#define LDEXP_H
-
-/* The result of an expression tree */
-typedef struct {
- bfd_vma value;
- char *str;
- asection *section;
- bfd_boolean valid_p;
-} etree_value_type;
-
-typedef struct {
- int node_code;
- unsigned int lineno;
- enum {
- etree_binary,
- etree_trinary,
- etree_unary,
- etree_name,
- etree_assign,
- etree_provide,
- etree_provided,
- 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;
- bfd_boolean hidden;
- } 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;
-
-typedef enum {
- lang_first_phase_enum,
- lang_mark_phase_enum,
- lang_allocating_phase_enum,
- lang_final_phase_enum
-} lang_phase_type;
-
-struct ldexp_control {
- /* Modify expression evaluation depending on this. */
- lang_phase_type phase;
-
- /* Principally used for diagnostics. */
- bfd_boolean assigning_to_dot;
-
- /* Working results. */
- etree_value_type result;
- bfd_vma dot;
-
- /* Current dot and section passed to ldexp folder. */
- bfd_vma *dotp;
- asection *section;
-
- /* State machine and results for DATASEG. */
- struct {
- enum {
- exp_dataseg_none,
- exp_dataseg_align_seen,
- exp_dataseg_relro_seen,
- exp_dataseg_end_seen,
- exp_dataseg_relro_adjust,
- exp_dataseg_adjust
- } phase;
-
- bfd_vma base, min_base, relro_end, end, pagesize, maxpagesize;
- } dataseg;
-};
-
-extern struct ldexp_control expld;
-
-/* A maps from a segment name to a base address. */
-typedef struct segment_struct {
- /* The next segment in the linked list. */
- struct segment_struct *next;
- /* The name of the sgement. */
- const char *name;
- /* The base address for the segment. */
- bfd_vma value;
- /* True if a SEGMENT_START directive corresponding to this segment
- has been seen. */
- bfd_boolean used;
-} segment_type;
-
-/* The segments specified by the user on the command-line. */
-extern segment_type *segments;
-
-typedef struct _fill_type fill_type;
-
-etree_type *exp_intop
- (bfd_vma);
-etree_type *exp_bigintop
- (bfd_vma, char *);
-etree_type *exp_relop
- (asection *, bfd_vma);
-void exp_fold_tree
- (etree_type *, asection *, 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 *, bfd_boolean);
-etree_type *exp_assert
- (etree_type *, const char *);
-void exp_print_tree
- (etree_type *);
-bfd_vma exp_get_vma
- (etree_type *, bfd_vma, char *);
-int exp_get_value_int
- (etree_type *, int, char *);
-fill_type *exp_get_fill
- (etree_type *, fill_type *, char *);
-bfd_vma exp_get_abs_int
- (etree_type *, int, char *);
-
-#endif
diff --git a/contrib/binutils/ld/ldfile.c b/contrib/binutils/ld/ldfile.c
deleted file mode 100644
index 9781aac887e1..000000000000
--- a/contrib/binutils/ld/ldfile.c
+++ /dev/null
@@ -1,551 +0,0 @@
-/* Linker file opening and searching.
- Copyright 1991, 1992, 1993, 1994, 1995, 1998, 1999, 2000, 2001, 2002,
- 2003, 2004, 2005, 2007 Free Software Foundation, Inc.
-
- This file is part of GLD, the Gnu Linker.
-
- GLD is free software; you can redistribute it and/or modify
- it under the terms of the GNU General Public License as published by
- the Free Software Foundation; either version 2, or (at your option)
- any later version.
-
- GLD is distributed in the hope that it will be useful,
- but WITHOUT ANY WARRANTY; without even the implied warranty of
- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- GNU General Public License for more details.
-
- You should have received a copy of the GNU General Public License
- along with GLD; see the file COPYING. If not, write to the Free
- Software Foundation, 51 Franklin Street - Fifth Floor, Boston, MA
- 02110-1301, USA. */
-
-/* ldfile.c: look after all the file stuff. */
-
-#include "sysdep.h"
-#include "bfd.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;
-
-#ifdef VMS
-static char * slash = "";
-#else
-#if defined (_WIN32) && ! defined (__CYGWIN32__)
-static char * slash = "\\";
-#else
-static char * slash = "/";
-#endif
-#endif
-
-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 we are statically linking, ensure that we don't link
- a dynamic object. */
-
- if (entry->search_dirs_flag || !entry->dynamic)
- {
- 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
- && entry->search_dirs_flag
- && 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)
- {
- if (command_line.warn_search_mismatch)
- einfo (_("%P: skipping incompatible %s "
- "when searching for %s\n"),
- attempt, entry->local_sym_name);
- bfd_close (entry->the_bfd);
- entry->the_bfd = NULL;
- return FALSE;
- }
- }
- return TRUE;
- }
-
- if (!entry->dynamic && (entry->the_bfd->flags & DYNAMIC) != 0)
- {
- einfo (_("%F%P: attempted static link of dynamic object `%s'\n"),
- attempt);
- bfd_close (entry->the_bfd);
- entry->the_bfd = NULL;
- return FALSE;
- }
-
- if (entry->search_dirs_flag
- && !bfd_arch_get_compatible (check, output_bfd,
- command_line.accept_unknown_input_arch)
- /* XCOFF archives can have 32 and 64 bit objects. */
- && ! (bfd_get_flavour (check) == bfd_target_xcoff_flavour
- && bfd_get_flavour (output_bfd) == bfd_target_xcoff_flavour
- && bfd_check_format (entry->the_bfd, bfd_archive)))
- {
- if (command_line.warn_search_mismatch)
- einfo (_("%P: skipping incompatible %s "
- "when searching for %s\n"),
- attempt, entry->local_sym_name);
- bfd_close (entry->the_bfd);
- entry->the_bfd = NULL;
- return FALSE;
- }
- }
- }
-
- 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. */
-
-static 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;
-}
-
-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;
-
-}
-
-/* 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 b9ace6b74dfd..000000000000
--- a/contrib/binutils/ld/ldfile.h
+++ /dev/null
@@ -1,63 +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, 51 Franklin Street - Fifth Floor,
- Boston, MA 02110-1301, 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 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 c6f268b1d7cb..000000000000
--- a/contrib/binutils/ld/ldgram.y
+++ /dev/null
@@ -1,1339 +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, 2004, 2005, 2006, 2007 Free Software Foundation, Inc.
- Written by Steve Chamberlain of Cygnus Support (steve@cygnus.com).
-
- This file is part of GNU ld.
-
- This program is free software; you can redistribute it and/or modify
- it under the terms of the GNU General Public License as published by
- the Free Software Foundation; either version 2 of the License, or
- (at your option) any later version.
-
- This program is distributed in the hope that it will be useful,
- but WITHOUT ANY WARRANTY; without even the implied warranty of
- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- GNU General Public License for more details.
-
- You should have received a copy of the GNU General Public License
- along with this program; if not, write to the Free Software
- Foundation, Inc., 51 Franklin Street - Fifth Floor, Boston, MA 02110-1301, USA. */
-
-%{
-/*
-
- */
-
-#define DONTDECLARE_MALLOC
-
-#include "sysdep.h"
-#include "bfd.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;
-static lang_memory_region_type *region;
-
-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 opt_align
-%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 DATA_SEGMENT_ALIGN DATA_SEGMENT_RELRO_END DATA_SEGMENT_END
-%token SORT_BY_NAME SORT_BY_ALIGNMENT
-%token '{' '}'
-%token SIZEOF_HEADERS OUTPUT_FORMAT FORCE_COMMON_ALLOCATION OUTPUT_ARCH
-%token INHIBIT_COMMON_ALLOCATION
-%token SEGMENT_START
-%token INCLUDE
-%token MEMORY
-%token NOLOAD DSECT COPY INFO OVERLAY
-%token DEFINED TARGET_K SEARCH_DIR MAP ENTRY
-%token <integer> NEXT
-%token SIZEOF ALIGNOF ADDR LOADADDR MAX_K MIN_K
-%token STARTUP HLL SYSLIB FLOAT NOFLOAT NOCROSSREFS
-%token ORIGIN FILL
-%token LENGTH CREATE_OBJECT_SYMBOLS INPUT GROUP OUTPUT CONSTRUCTORS
-%token ALIGNMOD AT SUBALIGN PROVIDE PROVIDE_HIDDEN AS_NEEDED
-%type <token> assign_op atype attributes_opt sect_constraint
-%type <name> filename
-%token CHIP LIST SECT ABSOLUTE LOAD NEWLINE ENDWORD ORDER NAMEWORD ASSERT_K
-%token FORMAT PUBLIC DEFSYMEND BASE ALIAS TRUNCATE REL
-%token INPUT_SCRIPT INPUT_MRI_SCRIPT INPUT_DEFSYM CASE EXTERN START
-%token <name> VERS_TAG VERS_IDENTIFIER
-%token GLOBAL LOCAL VERSIONK INPUT_VERSION_SCRIPT
-%token KEEP ONLY_IF_RO ONLY_IF_RW SPECIAL
-%token EXCLUDE_FILE
-%token CONSTANT
-%type <versyms> vers_defns
-%type <versnode> vers_tag
-%type <deflist> verdep
-%token INPUT_DYNAMIC_LIST
-
-%%
-
-file:
- INPUT_SCRIPT script_file
- | INPUT_MRI_SCRIPT mri_script_file
- | INPUT_VERSION_SCRIPT version_script_file
- | INPUT_DYNAMIC_LIST dynamic_list_file
- | INPUT_DEFSYM defsym_expr
- ;
-
-
-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
- ;
-
-/* Parsed as expressions so that commas separate entries */
-extern_name_list:
- { ldlex_expression (); }
- extern_name_list_body
- { ldlex_popstate (); }
-
-extern_name_list_body:
- NAME
- { ldlang_add_undef ($1); }
- | extern_name_list_body NAME
- { ldlang_add_undef ($2); }
- | extern_name_list_body ',' 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); }
- | AS_NEEDED '('
- { $<integer>$ = as_needed; as_needed = TRUE; }
- input_list ')'
- { as_needed = $<integer>3; }
- | input_list ',' AS_NEEDED '('
- { $<integer>$ = as_needed; as_needed = TRUE; }
- input_list ')'
- { as_needed = $<integer>5; }
- | input_list AS_NEEDED '('
- { $<integer>$ = as_needed; as_needed = TRUE; }
- input_list ')'
- { as_needed = $<integer>4; }
- ;
-
-sections:
- 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 = none;
- $$.exclude_name_list = NULL;
- }
- | EXCLUDE_FILE '(' exclude_name_list ')' wildcard_name
- {
- $$.name = $5;
- $$.sorted = none;
- $$.exclude_name_list = $3;
- }
- | SORT_BY_NAME '(' wildcard_name ')'
- {
- $$.name = $3;
- $$.sorted = by_name;
- $$.exclude_name_list = NULL;
- }
- | SORT_BY_ALIGNMENT '(' wildcard_name ')'
- {
- $$.name = $3;
- $$.sorted = by_alignment;
- $$.exclude_name_list = NULL;
- }
- | SORT_BY_NAME '(' SORT_BY_ALIGNMENT '(' wildcard_name ')' ')'
- {
- $$.name = $5;
- $$.sorted = by_name_alignment;
- $$.exclude_name_list = NULL;
- }
- | SORT_BY_NAME '(' SORT_BY_NAME '(' wildcard_name ')' ')'
- {
- $$.name = $5;
- $$.sorted = by_name;
- $$.exclude_name_list = NULL;
- }
- | SORT_BY_ALIGNMENT '(' SORT_BY_NAME '(' wildcard_name ')' ')'
- {
- $$.name = $5;
- $$.sorted = by_alignment_name;
- $$.exclude_name_list = NULL;
- }
- | SORT_BY_ALIGNMENT '(' SORT_BY_ALIGNMENT '(' wildcard_name ')' ')'
- {
- $$.name = $5;
- $$.sorted = by_alignment;
- $$.exclude_name_list = NULL;
- }
- | SORT_BY_NAME '(' EXCLUDE_FILE '(' exclude_name_list ')' wildcard_name ')'
- {
- $$.name = $7;
- $$.sorted = by_name;
- $$.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 = none;
- 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_BY_NAME '(' 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);
- }
- | ASSERT_K {ldlex_expression ();} '(' exp ',' NAME ')' end
- { ldlex_popstate ();
- lang_add_assignment (exp_assert ($4, $6)); }
- ;
-
-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");
- }
- ;
-
-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, FALSE));
- }
- | PROVIDE_HIDDEN '(' NAME '=' mustbe_exp ')'
- {
- lang_add_assignment (exp_provide ($3, $5, TRUE));
- }
- ;
-
-
-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->origin = exp_get_vma ($3, 0, "origin");
- region->current = region->origin;
- }
- ;
-
-length_spec:
- LENGTH '=' mustbe_exp
- {
- region->length = exp_get_vma ($3, -1, "length");
- }
- ;
-
-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); }
-
- | ALIGNOF '(' NAME ')'
- { $$ = exp_nameop (ALIGNOF,$3); }
- | SIZEOF '(' NAME ')'
- { $$ = exp_nameop (SIZEOF,$3); }
- | ADDR '(' NAME ')'
- { $$ = exp_nameop (ADDR,$3); }
- | LOADADDR '(' NAME ')'
- { $$ = exp_nameop (LOADADDR,$3); }
- | CONSTANT '(' NAME ')'
- { $$ = exp_nameop (CONSTANT,$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_RELRO_END '(' exp ',' exp ')'
- { $$ = exp_binop (DATA_SEGMENT_RELRO_END, $5, $3); }
- | DATA_SEGMENT_END '(' exp ')'
- { $$ = exp_unop (DATA_SEGMENT_END, $3); }
- | SEGMENT_START '(' NAME ',' exp ')'
- { /* The operands to the expression node are
- placed in the opposite order from the way
- in which they appear in the script as
- that allows us to reuse more code in
- fold_binary. */
- $$ = exp_binop (SEGMENT_START,
- $5,
- exp_nameop (NAME, $3)); }
- | BLOCK '(' exp ')'
- { $$ = exp_unop (ALIGN_K,$3); }
- | 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); }
- | ORIGIN '(' NAME ')'
- { $$ = exp_nameop (ORIGIN, $3); }
- | LENGTH '(' NAME ')'
- { $$ = exp_nameop (LENGTH, $3); }
- ;
-
-
-memspec_at_opt:
- AT '>' NAME { $$ = $3; }
- | { $$ = 0; }
- ;
-
-opt_at:
- AT '(' exp ')' { $$ = $3; }
- | { $$ = 0; }
- ;
-
-opt_align:
- ALIGN_K '(' exp ')' { $$ = $3; }
- | { $$ = 0; }
- ;
-
-opt_subalign:
- SUBALIGN '(' exp ')' { $$ = $3; }
- | { $$ = 0; }
- ;
-
-sect_constraint:
- ONLY_IF_RO { $$ = ONLY_IF_RO; }
- | ONLY_IF_RW { $$ = ONLY_IF_RW; }
- | SPECIAL { $$ = SPECIAL; }
- | { $$ = 0; }
- ;
-
-section: NAME { ldlex_expression(); }
- opt_exp_with_type
- opt_at
- opt_align
- opt_subalign { ldlex_popstate (); ldlex_script (); }
- sect_constraint
- '{'
- {
- lang_enter_output_section_statement($1, $3,
- sectype,
- $5, $6, $4, $8);
- }
- statement_list_opt
- '}' { ldlex_popstate (); ldlex_expression (); }
- memspec_opt memspec_at_opt phdr_opt fill_opt
- {
- ldlex_popstate ();
- lang_leave_output_section_statement ($17, $14, $16, $15);
- }
- 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 = noalloc_section; }
- | COPY { sectype = noalloc_section; }
- | INFO { sectype = noalloc_section; }
- | OVERLAY { sectype = noalloc_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;
- }
- ;
-
-dynamic_list_file:
- {
- ldlex_version_file ();
- PUSH_ERROR (_("dynamic list"));
- }
- dynamic_list_nodes
- {
- ldlex_popstate ();
- POP_ERROR ();
- }
- ;
-
-dynamic_list_nodes:
- dynamic_list_node
- | dynamic_list_nodes dynamic_list_node
- ;
-
-dynamic_list_node:
- '{' dynamic_list_tag '}' ';'
- ;
-
-dynamic_list_tag:
- vers_defns ';'
- {
- lang_append_dynamic_list ($1);
- }
- ;
-
-/* This syntax is used within an external version script file. */
-
-version_script_file:
- {
- 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, FALSE);
- }
- | NAME
- {
- $$ = lang_new_vers_pattern (NULL, $1, ldgram_vers_current_lang, TRUE);
- }
- | vers_defns ';' VERS_IDENTIFIER
- {
- $$ = lang_new_vers_pattern ($1, $3, ldgram_vers_current_lang, FALSE);
- }
- | vers_defns ';' NAME
- {
- $$ = lang_new_vers_pattern ($1, $3, ldgram_vers_current_lang, TRUE);
- }
- | vers_defns ';' EXTERN NAME '{'
- {
- $<name>$ = ldgram_vers_current_lang;
- ldgram_vers_current_lang = $4;
- }
- vers_defns opt_semicolon '}'
- {
- struct bfd_elf_version_expr *pat;
- for (pat = $7; pat->next != NULL; pat = pat->next);
- pat->next = $1;
- $$ = $7;
- ldgram_vers_current_lang = $<name>6;
- }
- | EXTERN NAME '{'
- {
- $<name>$ = ldgram_vers_current_lang;
- ldgram_vers_current_lang = $2;
- }
- vers_defns opt_semicolon '}'
- {
- $$ = $5;
- ldgram_vers_current_lang = $<name>4;
- }
- | GLOBAL
- {
- $$ = lang_new_vers_pattern (NULL, "global", ldgram_vers_current_lang, FALSE);
- }
- | vers_defns ';' GLOBAL
- {
- $$ = lang_new_vers_pattern ($1, "global", ldgram_vers_current_lang, FALSE);
- }
- | LOCAL
- {
- $$ = lang_new_vers_pattern (NULL, "local", ldgram_vers_current_lang, FALSE);
- }
- | vers_defns ';' LOCAL
- {
- $$ = lang_new_vers_pattern ($1, "local", ldgram_vers_current_lang, FALSE);
- }
- | EXTERN
- {
- $$ = lang_new_vers_pattern (NULL, "extern", ldgram_vers_current_lang, FALSE);
- }
- | vers_defns ';' EXTERN
- {
- $$ = lang_new_vers_pattern ($1, "extern", ldgram_vers_current_lang, FALSE);
- }
- ;
-
-opt_semicolon:
- /* 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.7 b/contrib/binutils/ld/ldint.7
deleted file mode 100644
index 6c17af41d8a0..000000000000
--- a/contrib/binutils/ld/ldint.7
+++ /dev/null
@@ -1,1277 +0,0 @@
-.Dd 2015-03-02
-.Dt LDINT 7
-.Os
-.Sh NAME
-.Nm ldint
-.Nd GNU Linker Internals
-.Sh
-This file documents the internals of the GNU linker
-.Li 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
-.Li ld
-as you discover it (or as you design changes to
-.Li ld ) .
-.Pp
-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".
-.Pp
-.Sh The Pa README File
-Check the
-.Pa README
-file; it often has useful information that does not appear anywhere else in
-the directory.
-.Pp
-.Sh How linker emulations are generated
-Each linker target has an
-.Em emulation .
-The emulation includes the default linker script, and certain emulations also
-modify certain types of linker behaviour.
-.Pp
-Emulations are created during the build process by the shell script
-.Pa genscripts.sh .
-.Pp
-The
-.Pa genscripts.sh
-script starts by reading a file in the
-.Pa emulparams
-directory. This is a shell script which sets various shell variables used
-by
-.Pa genscripts.sh
-and the other shell scripts it invokes.
-.Pp
-The
-.Pa genscripts.sh
-script will invoke a shell script in the
-.Pa scripttempl
-directory in order to create default linker scripts written in the linker
-command language. The
-.Pa 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.
-.Pp
-After creating the scripts,
-.Pa genscripts.sh
-will invoke yet another shell script, this time in the
-.Pa 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
-.Pa emultempl/generic.em .
-.Pp
-To summarize,
-.Pa genscripts.sh
-reads three shell scripts: an emulation parameters script in the
-.Pa emulparams
-directory, a linker script generation script in the
-.Pa scripttempl
-directory, and an emulation source file generation script in the
-.Pa emultempl
-directory.
-.Pp
-For example, the Sun 4 linker sets up variables in
-.Pa emulparams/sun4.sh ,
-creates linker scripts using
-.Pa scripttempl/aout.sc ,
-and creates the emulation code using
-.Pa emultempl/sunos.em .
-.Pp
-Note that the linker can support several emulations simultaneously, depending
-upon how it is configured. An emulation can be selected with the
-.Li -m
-option. The
-.Li -V
-option will list all supported emulations.
-.Pp
-.Ss Pa emulparams scripts
-Each target selects a particular file in the
-.Pa emulparams
-directory by setting the shell variable
-.Li targ_emul
-in
-.Pa configure.tgt .
-This shell variable is used by the
-.Pa configure
-script to control building an emulation source file.
-.Pp
-Certain conventions are enforced. Suppose the
-.Li targ_emul
-variable is set to
-.Va emul
-in
-.Pa configure.tgt .
-The name of the emulation shell script will be
-.Pa emulparams/ Va emul.sh .
-The
-.Pa Makefile
-must have a target named
-.Pa e Va emul.c ;
-this target must depend upon
-.Pa emulparams/ Va emul.sh ,
-as well as the appropriate scripts in the
-.Pa scripttempl
-and
-.Pa emultempl
-directories. The
-.Pa Makefile
-target must invoke
-.Li GENSCRIPTS
-with two arguments:
-.Va emul ,
-and the value of the make variable
-.Li tdir_ Va emul .
-The value of the latter variable will be set by the
-.Pa configure
-script, and is used to set the default target directory to search.
-.Pp
-By convention, the
-.Pa emulparams/ Va emul.sh
-shell script should only set shell variables. It may set shell variables which
-are to be interpreted by the
-.Pa scripttempl
-and the
-.Pa emultempl
-scripts. Certain shell variables are interpreted directly by the
-.Pa genscripts.sh
-script.
-.Pp
-Here is a list of shell variables interpreted by
-.Pa genscripts.sh ,
-as well as some conventional shell variables interpreted by the
-.Pa scripttempl
-and
-.Pa emultempl
-scripts.
-.Pp
-.Bl -tag -width Ds
-.It SCRIPT_NAME
-This is the name of the
-.Pa scripttempl
-script to use. If
-.Li SCRIPT_NAME
-is set to
-.Va script ,
-.Pa genscripts.sh
-will use the script
-.Pa scripttempl/ Va script.sc .
-.Pp
-.It TEMPLATE_NAME
-This is the name of the
-.Pa emultempl
-script to use. If
-.Li TEMPLATE_NAME
-is set to
-.Va template ,
-.Pa genscripts.sh
-will use the script
-.Pa emultempl/ Va template.em .
-If this variable is not set, the default value is
-.Li generic .
-.Pp
-.It GENERATE_SHLIB_SCRIPT
-If this is set to a nonempty string,
-.Pa genscripts.sh
-will invoke the
-.Pa scripttempl
-script an extra time to create a shared library script. linker scripts.
-.Pp
-.It OUTPUT_FORMAT
-This is normally set to indicate the BFD output format use (e.g.,
-.Li "a.out-sunos-big" .
-The
-.Pa scripttempl
-script will normally use it in an
-.Li OUTPUT_FORMAT
-expression in the linker script.
-.Pp
-.It ARCH
-This is normally set to indicate the architecture to use (e.g.,
-.Li sparc ) .
-The
-.Pa scripttempl
-script will normally use it in an
-.Li OUTPUT_ARCH
-expression in the linker script.
-.Pp
-.It ENTRY
-Some
-.Pa scripttempl
-scripts use this to set the entry address, in an
-.Li ENTRY
-expression in the linker script.
-.Pp
-.It TEXT_START_ADDR
-Some
-.Pa scripttempl
-scripts use this to set the start address of the
-.Li .text
-section.
-.Pp
-.It NONPAGED_TEXT_START_ADDR
-If this is defined, the
-.Pa genscripts.sh
-script sets
-.Li TEXT_START_ADDR
-to its value before running the
-.Pa scripttempl
-script for the
-.Li -n
-and
-.Li -N
-options (see Section
-.Dq linker scripts ) .
-.Pp
-.It SEGMENT_SIZE
-The
-.Pa genscripts.sh
-script uses this to set the default value of
-.Li DATA_ALIGNMENT
-when running the
-.Pa scripttempl
-script.
-.Pp
-.It TARGET_PAGE_SIZE
-If
-.Li SEGMENT_SIZE
-is not defined, the
-.Pa genscripts.sh
-script uses this to define it.
-.Pp
-.It ALIGNMENT
-Some
-.Pa scripttempl
-scripts set this to a number to pass to
-.Li ALIGN
-to set the required alignment for the
-.Li end
-symbol.
-.El
-.Pp
-.Ss Pa scripttempl scripts
-Each linker target uses a
-.Pa scripttempl
-script to generate the default linker scripts. The name of the
-.Pa scripttempl
-script is set by the
-.Li SCRIPT_NAME
-variable in the
-.Pa emulparams
-script. If
-.Li SCRIPT_NAME
-is set to
-.Va script ,
-.Li genscripts.sh
-will invoke
-.Pa scripttempl/ Va script.sc .
-.Pp
-The
-.Pa genscripts.sh
-script will invoke the
-.Pa scripttempl
-script 5 to 8 times. Each time it will set the shell variable
-.Li 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
-.Li get_script
-emulation entry point; this describes the conventional behaviour).
-.Pp
-The
-.Pa 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
-.Pa emulparams
-file without the
-.Pa .sc
-extension--is
-.Va emul ,
-then the output will be directed to
-.Pa ldscripts/ Va emul. Va extension
-in the build directory, where
-.Va extension
-changes each time the
-.Pa scripttempl
-script is invoked.
-.Pp
-Here is the list of values assigned to
-.Li LD_FLAG .
-.Pp
-.Bl -tag -width Ds
-.It (empty)
-The script generated is used by default (when none of the following cases
-apply). The output has an extension of
-.Pa .x .
-.It n
-The script generated is used when the linker is invoked with the
-.Li -n
-option. The output has an extension of
-.Pa .xn .
-.It N
-The script generated is used when the linker is invoked with the
-.Li -N
-option. The output has an extension of
-.Pa .xbn .
-.It r
-The script generated is used when the linker is invoked with the
-.Li -r
-option. The output has an extension of
-.Pa .xr .
-.It u
-The script generated is used when the linker is invoked with the
-.Li -Ur
-option. The output has an extension of
-.Pa .xu .
-.It shared
-The
-.Pa scripttempl
-script is only invoked with
-.Li LD_FLAG
-set to this value if
-.Li GENERATE_SHLIB_SCRIPT
-is defined in the
-.Pa emulparams
-file. The
-.Pa emultempl
-script must arrange to use this script at the appropriate time, normally when
-the linker is invoked with the
-.Li -shared
-option. The output has an extension of
-.Pa .xs .
-.It c
-The
-.Pa scripttempl
-script is only invoked with
-.Li LD_FLAG
-set to this value if
-.Li GENERATE_COMBRELOC_SCRIPT
-is defined in the
-.Pa emulparams
-file or if
-.Li SCRIPT_NAME
-is
-.Li elf .
-The
-.Pa emultempl
-script must arrange to use this script at the appropriate time, normally when
-the linker is invoked with the
-.Li -z combreloc
-option. The output has an extension of
-.Pa .xc .
-.It cshared
-The
-.Pa scripttempl
-script is only invoked with
-.Li LD_FLAG
-set to this value if
-.Li GENERATE_COMBRELOC_SCRIPT
-is defined in the
-.Pa emulparams
-file or if
-.Li SCRIPT_NAME
-is
-.Li elf
-and
-.Li GENERATE_SHLIB_SCRIPT
-is defined in the
-.Pa emulparams
-file. The
-.Pa emultempl
-script must arrange to use this script at the appropriate time, normally when
-the linker is invoked with the
-.Li -shared -z combreloc
-option. The output has an extension of
-.Pa .xsc .
-.El
-.Pp
-Besides the shell variables set by the
-.Pa emulparams
-script, and the
-.Li LD_FLAG
-variable, the
-.Pa genscripts.sh
-script will set certain variables for each run of the
-.Pa scripttempl
-script.
-.Pp
-.Bl -tag -width Ds
-.It RELOCATING
-This will be set to a non-empty string when the linker is doing a final relocation
-(e.g., all scripts other than
-.Li -r
-and
-.Li -Ur ) .
-.Pp
-.It 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
-.Li -r ) .
-.Pp
-.It DATA_ALIGNMENT
-This will be set to an
-.Li ALIGN
-expression when the output should be page aligned, or to
-.Li .
-when generating the
-.Li -N
-script.
-.Pp
-.It CREATE_SHLIB
-This will be set to a non-empty string when generating a
-.Li -shared
-script.
-.Pp
-.It COMBRELOC
-This will be set to a non-empty string when generating
-.Li -z combreloc
-scripts to a temporary file name which can be used during script generation.
-.El
-.Pp
-The conventional way to write a
-.Pa scripttempl
-script is to first set a few shell variables, and then write out a linker
-script using
-.Li cat
-with a here document. The linker script will use variable substitutions, based
-on the above variables and those set in the
-.Pa emulparams
-script, to control its behaviour.
-.Pp
-When there are parts of the
-.Pa scripttempl
-script which should only be run when doing a final relocation, they should
-be enclosed within a variable substitution based on
-.Li RELOCATING .
-For example, on many targets special symbols such as
-.Li _end
-should be defined when doing a final link. Naturally, those symbols should
-not be defined when doing a relocatable link using
-.Li -r .
-The
-.Pa scripttempl
-script could use a construct like this to define those symbols:
-.Bd -literal -offset indent
- ${RELOCATING+ _end = .;}
-.Ed
-This will do the symbol assignment only if the
-.Li RELOCATING
-variable is defined.
-.Pp
-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.
-.Pp
-For example, on most MIPS platforms, the linker is responsible for defining
-the special symbol
-.Li _gp ,
-used to initialize the
-.Li $gp
-register. It must be set to the start of the small data section plus
-.Li 0x8000 .
-Naturally, it should only be defined when doing a final relocation. This will
-typically be done like this:
-.Bd -literal -offset indent
- ${RELOCATING+ _gp = ALIGN(16) + 0x8000;}
-.Ed
-This line would appear just before the sections which compose the small data
-section (
-.Li .sdata ,
-.Li .sbss ) .
-All those sections would be contiguous in memory.
-.Pp
-Many COFF systems build constructor tables in the linker script. The compiler
-will arrange to output the address of each global constructor in a
-.Li .ctor
-section, and the address of each global destructor in a
-.Li .dtor
-section (this is done by defining
-.Li ASM_OUTPUT_CONSTRUCTOR
-and
-.Li ASM_OUTPUT_DESTRUCTOR
-in the
-.Li gcc
-configuration files). The
-.Li gcc
-runtime support routines expect the constructor table to be named
-.Li __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
-.Li 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
-.Pa scripttempl
-file.
-.Bd -literal -offset indent
- ${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__ = .;}
-.Ed
-The use of
-.Li 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.
-.Pp
-Embedded systems often need to set a stack address. This is normally best
-done by using the
-.Li PROVIDE
-construct with a default stack address. This permits the user to easily override
-the stack address using the
-.Li --defsym
-option. Here is an example:
-.Bd -literal -offset indent
- ${RELOCATING+ PROVIDE (__stack = 0x80000000);}
-.Ed
-The value of the symbol
-.Li __stack
-would then be used in the startup code to initialize the stack pointer.
-.Pp
-.Ss Pa emultempl scripts
-Each linker target uses an
-.Pa emultempl
-script to generate the emulation code. The name of the
-.Pa emultempl
-script is set by the
-.Li TEMPLATE_NAME
-variable in the
-.Pa emulparams
-script. If the
-.Li TEMPLATE_NAME
-variable is not set, the default is
-.Li generic .
-If the value of
-.Li TEMPLATE_NAME
-is
-.Va template ,
-.Pa genscripts.sh
-will use
-.Pa emultempl/ Va template.em .
-.Pp
-Most targets use the generic
-.Pa emultempl
-script,
-.Pa emultempl/generic.em .
-A different
-.Pa emultempl
-script is only needed if the linker must support unusual actions, such as
-linking against shared libraries.
-.Pp
-The
-.Pa emultempl
-script is normally written as a simple invocation of
-.Li cat
-with a here document. The document will use a few variable substitutions.
-Typically each function names uses a substitution involving
-.Li EMULATION_NAME ,
-for ease of debugging when the linker supports multiple emulations.
-.Pp
-Every function and variable in the emitted file should be static. The only
-globally visible object must be named
-.Li ld_ Va EMULATION_NAME_emulation ,
-where
-.Va EMULATION_NAME
-is the name of the emulation set in
-.Pa configure.tgt
-(this is also the name of the
-.Pa emulparams
-file without the
-.Pa .sh
-extension). The
-.Pa genscripts.sh
-script will set the shell variable
-.Li EMULATION_NAME
-before invoking the
-.Pa emultempl
-script.
-.Pp
-The
-.Li ld_ Va EMULATION_NAME_emulation
-variable must be a
-.Li struct ld_emulation_xfer_struct ,
-as defined in
-.Pa 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
-.Li EMULATION_NAME
-and the default BFD target name (normally set from the shell variable
-.Li OUTPUT_FORMAT
-which is normally set by the
-.Pa emulparams
-file).
-.Pp
-The
-.Pa genscripts.sh
-script will set the shell variable
-.Li COMPILE_IN
-when it invokes the
-.Pa emultempl
-script for the default emulation. In this case, the
-.Pa emultempl
-script should include the linker scripts directly, and return them from the
-.Li get_scripts
-entry point. When the emulation is not the default, the
-.Li get_scripts
-entry point should just return a file name. See
-.Pa emultempl/generic.em
-for an example of how this is done.
-.Pp
-At some point, the linker emulation entry points should be documented.
-.Pp
-.Sh 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.
-.Pp
-The starting point for the linker is in
-.Pa ldmain.c
-where
-.Li main
-is defined. The bulk of the code that's emulation specific will initially
-be in
-.Li emultempl/ Va emulation.em
-but will end up in
-.Li e Va emulation.c
-when the build is done. Most of the work to select and interface with emulations
-is in
-.Li ldemul.h
-and
-.Li ldemul.c .
-Specifically,
-.Li ldemul.h
-defines the
-.Li ld_emulation_xfer_struct
-structure your emulation exports.
-.Pp
-Your emulation file exports a symbol
-.Li ld_ Va EMULATION_NAME_emulation .
-If your emulation is selected (it usually is, since usually there's only one),
-.Li ldemul.c
-sets the variable
-.Va ld_emulation
-to point to it.
-.Li ldemul.c
-also defines a number of API functions that interface to your emulation, like
-.Li ldemul_after_parse
-which simply calls your
-.Li ld_ Va 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.
-.Pp
-We will also skip or gloss over parts of the link process that don't relate
-to emulations, like setting up internationalization.
-.Pp
-After initialization,
-.Li main
-selects an emulation by pre-scanning the command line arguments. It calls
-.Li ldemul_choose_target
-to choose a target. If you set
-.Li choose_target
-to
-.Li ldemul_default_target ,
-it picks your
-.Li target_name
-by default.
-.Pp
-.Li main
-calls
-.Li ldemul_before_parse ,
-then
-.Li parse_args .
-.Li parse_args
-calls
-.Li ldemul_parse_args
-for each arg, which must update the
-.Li getopt
-globals if it recognizes the argument. If the emulation doesn't recognize
-it, then parse_args checks to see if it recognizes it.
-.Pp
-Now that the emulation has had access to all its command-line options,
-.Li main
-calls
-.Li 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.
-.Pp
-.Li main
-now calls
-.Li ldemul_get_script
-to get the emulation script to use (based on arguments, no doubt,see Section
-.Dq Emulations )
-and runs it. While parsing,
-.Li ldgram.y
-may call
-.Li ldemul_hll
-or
-.Li ldemul_syslib
-to handle the
-.Li HLL
-or
-.Li SYSLIB
-commands. It may call
-.Li ldemul_unrecognized_file
-if you asked the linker to link a file it doesn't recognize. It will call
-.Li 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
-.Li ldemul_open_dynamic_archive )
-and symbols and stuff. After it's done reading the script,
-.Li main
-calls
-.Li 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.
-.Pp
-.Li main
-next calls
-.Li lang_process
-in
-.Li 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
-.Li ldemul_set_output_arch ,
-and calls
-.Li 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.
-.Pp
-(*) 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.
-.Pp
-Next, the objects to be linked are opened and BFDs created for them, and
-.Li 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.
-.Pp
-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,
-.Li ldemul_place_orphan
-will get called to figure out where it goes. Next it figures out the offsets
-for each section, calling
-.Li ldemul_before_allocation
-before and
-.Li ldemul_after_allocation
-after deciding where each input section ends up in the output sections.
-.Pp
-The last part of
-.Li lang_process
-is to figure out all the symbols' values. After assigning final values to
-the symbols,
-.Li ldemul_finish
-is called, and after that, any undefined symbols are turned into fatal errors.
-.Pp
-OK, back to
-.Li main ,
-which calls
-.Li ldwrite
-in
-.Pa ldwrite.c .
-.Li ldwrite
-calls BFD's final_link, which does all the relocation fixups and writes the
-output bfd to disk, and we're done.
-.Pp
-In summary,
-.Pp
-.Bl -bullet
-.It
-.Li main()
-in
-.Pa ldmain.c
-.It
-.Pa emultempl/ Va EMULATION.em
-has your code
-.It
-.Li ldemul_choose_target
-(defaults to your
-.Li target_name )
-.It
-.Li ldemul_before_parse
-.It
-Parse argv, calls
-.Li ldemul_parse_args
-for each
-.It
-.Li ldemul_set_symbols
-.It
-.Li ldemul_get_script
-.It
-parse script
-.Pp
-.Bl -bullet
-.It
-may call
-.Li ldemul_hll
-or
-.Li ldemul_syslib
-.It
-may call
-.Li ldemul_open_dynamic_archive
-.El
-.Pp
-.It
-.Li ldemul_after_parse
-.It
-.Li lang_process()
-in
-.Pa ldlang.c
-.Pp
-.Bl -bullet
-.It
-create
-.Li output_bfd
-.It
-.Li ldemul_set_output_arch
-.It
-.Li ldemul_create_output_section_statements
-.It
-read objects, create input bfds - all symbols exist, but have no values
-.It
-may call
-.Li ldemul_unrecognized_file
-.It
-will call
-.Li ldemul_recognized_file
-.It
-.Li ldemul_after_open
-.It
-map input sections to output sections
-.It
-may call
-.Li ldemul_place_orphan
-for remaining sections
-.It
-.Li ldemul_before_allocation
-.It
-gives input sections offsets into output sections, places output sections
-.It
-.Li ldemul_after_allocation
-- section addresses valid
-.It
-assigns values to symbols
-.It
-.Li ldemul_finish
-- symbol values valid
-.El
-.Pp
-.It
-output bfd is written to disk
-.Pp
-.El
-.Sh Some Architecture Specific Notes
-This is the place for notes on the behavior of
-.Li ld
-on specific platforms. Currently, only Intel x86 is documented (and of that,
-only the auto-import behavior for DLLs).
-.Pp
-.Ss Intel x86
-.Bl -tag -width Ds
-.Li 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.
-.Pp
-.It auto-import from DLLs
-.Bl -enum
-.It
-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
-.Li --enable-auto-import
-flag, or disabled via the
-.Li --disable-auto-import
-flag. Auto-import is disabled by default.
-.Pp
-.It
-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.
-.Pp
-.It
-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.
-.Pp
-.It
-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.
-.El
-.Pp
-Motivation
-.Pp
-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 something
-like
-.Pp
-.Li mov dll_var,%eax,
-.Pp
-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.
-.Pp
-Implementation
-.Pp
-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.
-.Pp
-.El
-.Sh GNU Free Documentation License
-GNU Free Documentation License Version 1.1, March 2000
-.Pp
-Copyright (C) 2000 Free Software Foundation, Inc. 51 Franklin Street, Fifth
-Floor, Boston, MA 02110-1301 USA Everyone is permitted to copy and distribute
-verbatim copies of this license document, but changing it is not allowed.
-.Pp
-0. PREAMBLE
-.Pp
-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.
-.Pp
-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.
-.Pp
-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.
-.Pp
-1. APPLICABILITY AND DEFINITIONS
-.Pp
-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".
-.Pp
-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.
-.Pp
-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.
-.Pp
-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.
-.Pp
-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.
-.Pp
-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".
-.Pp
-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.
-.Pp
-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.
-.Pp
-2. VERBATIM COPYING
-.Pp
-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.
-.Pp
-You may also lend copies, under the same conditions stated above, and you
-may publicly display copies.
-.Pp
-3. COPYING IN QUANTITY
-.Pp
-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.
-.Pp
-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.
-.Pp
-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.
-.Pp
-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.
-.Pp
-4. MODIFICATIONS
-.Pp
-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:
-.Pp
-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.
-.Pp
-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.
-.Pp
-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.
-.Pp
-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.
-.Pp
-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.
-.Pp
-5. COMBINING DOCUMENTS
-.Pp
-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.
-.Pp
-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.
-.Pp
-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."
-.Pp
-6. COLLECTIONS OF DOCUMENTS
-.Pp
-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.
-.Pp
-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.
-.Pp
-7. AGGREGATION WITH INDEPENDENT WORKS
-.Pp
-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.
-.Pp
-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.
-.Pp
-8. TRANSLATION
-.Pp
-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.
-.Pp
-9. TERMINATION
-.Pp
-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.
-.Pp
-10. FUTURE REVISIONS OF THIS LICENSE
-.Pp
-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/.
-.Pp
-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.
-.Pp
-ADDENDUM: How to use this License for your documents
-.Pp
-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:
-.Pp
-.Bd -literal -offset indent
- 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".
-.Ed
-.Pp
-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.
-.Pp
-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.
-.Pp
diff --git a/contrib/binutils/ld/ldint.texinfo b/contrib/binutils/ld/ldint.texinfo
deleted file mode 100644
index 85d736b088ca..000000000000
--- a/contrib/binutils/ld/ldint.texinfo
+++ /dev/null
@@ -1,1062 +0,0 @@
-\input texinfo
-@setfilename ldint.info
-@c Copyright 1992, 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001,
-@c 2003, 2007
-@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
-
-@copying
-This file documents the internals of the GNU linker ld.
-
-Copyright @copyright{} 1992, 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2007
-Free Software Foundation, Inc.
-Contributed by Cygnus Support.
-
-Permission is granted to copy, distribute and/or modify this document
-under the terms of the GNU Free Documentation License, Version 1.1 or
-any later version published by the Free Software Foundation; with the
-Invariant Sections being ``GNU General Public License'' and ``Funding
-Free Software'', the Front-Cover texts being (a) (see below), and with
-the Back-Cover Texts being (b) (see below). A copy of the license is
-included in the section entitled ``GNU Free Documentation License''.
-
-(a) The FSF's Front-Cover Text is:
-
- A GNU Manual
-
-(b) The FSF's Back-Cover Text is:
-
- You have freedom to copy and modify this GNU Manual, like GNU
- software. Copies published by the Free Software Foundation raise
- funds for GNU development.
-@end copying
-
-@iftex
-@finalout
-@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{scripttempl/@var{script}.sc}.
-
-@item TEMPLATE_NAME
-This is the name of the @file{emultempl} script to use. If
-@code{TEMPLATE_NAME} is set to @var{template}, @file{genscripts.sh} will
-use the script @file{emultempl/@var{template}.em}. If this variable is
-not set, the default value is @samp{generic}.
-
-@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{emulparams} file.
-The @file{emultempl} script must arrange to use this script at the
-appropriate time, normally when the linker is invoked with the @code{-shared
--z combreloc} option. The output has an extension of @file{.xsc}.
-@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 something 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
-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.
-
-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.
- 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
-
- Everyone is permitted to copy and distribute verbatim copies
- of this license document, but changing it is not allowed.
-
-
-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 191936f344ad..000000000000
--- a/contrib/binutils/ld/ldlang.c
+++ /dev/null
@@ -1,7095 +0,0 @@
-/* Linker command language support.
- Copyright 1991, 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999, 2000,
- 2001, 2002, 2003, 2004, 2005, 2006, 2007
- Free Software Foundation, Inc.
-
- This file is part of GLD, the Gnu Linker.
-
- GLD is free software; you can redistribute it and/or modify
- it under the terms of the GNU General Public License as published by
- the Free Software Foundation; either version 2, or (at your option)
- any later version.
-
- GLD is distributed in the hope that it will be useful,
- but WITHOUT ANY WARRANTY; without even the implied warranty of
- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- GNU General Public License for more details.
-
- You should have received a copy of the GNU General Public License
- along with GLD; see the file COPYING. If not, write to the Free
- Software Foundation, 51 Franklin Street - Fifth Floor, Boston, MA
- 02110-1301, USA. */
-
-#include "sysdep.h"
-#include "bfd.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;
-static struct obstack map_obstack;
-
-#define obstack_chunk_alloc xmalloc
-#define obstack_chunk_free free
-static const char *startup_file;
-static bfd_boolean placed_commons = FALSE;
-static bfd_boolean stripped_excluded_sections = FALSE;
-static lang_output_section_statement_type *default_common_section;
-static bfd_boolean map_option_f;
-static bfd_vma print_dot;
-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 bfd_hash_table lang_definedness_table;
-
-/* Forward declarations. */
-static void exp_init_os (etree_type *);
-static void init_map_userdata (bfd *, asection *, void *);
-static lang_input_statement_type *lookup_name (const char *);
-static struct bfd_hash_entry *lang_definedness_newfunc
- (struct bfd_hash_entry *, struct bfd_hash_table *, const char *);
-static void insert_undefined (const char *);
-static bfd_boolean sort_def_symbol (struct bfd_link_hash_entry *, void *);
-static void print_statement (lang_statement_union_type *,
- lang_output_section_statement_type *);
-static void print_statement_list (lang_statement_union_type *,
- lang_output_section_statement_type *);
-static void print_statements (void);
-static void print_input_section (asection *);
-static bfd_boolean lang_one_common (struct bfd_link_hash_entry *, void *);
-static void lang_record_phdrs (void);
-static void lang_do_version_exports_section (void);
-static void lang_finalize_version_expr_head
- (struct bfd_elf_version_expr_head *);
-
-/* Exported variables. */
-lang_output_section_statement_type *abs_output_section;
-lang_statement_list_type lang_output_section_statement;
-lang_statement_list_type *stat_ptr = &statement_list;
-lang_statement_list_type file_chain = { NULL, NULL };
-lang_statement_list_type input_file_chain;
-struct bfd_sym_chain entry_symbol = { NULL, NULL };
-static const char *entry_symbol_default = "start";
-const char *entry_section = ".text";
-bfd_boolean entry_from_cmdline;
-bfd_boolean lang_has_input_file = FALSE;
-bfd_boolean had_output_filename = FALSE;
-bfd_boolean lang_float_flag = FALSE;
-bfd_boolean delete_output_file_on_failure = FALSE;
-struct lang_phdr *lang_phdr_list;
-struct lang_nocrossrefs *nocrossref_list;
-static struct unique_sections *unique_section_list;
-static bfd_boolean ldlang_sysrooted_script = FALSE;
-
- /* Functions that traverse the linker script and might evaluate
- DEFINED() need to increment this. */
-int lang_statement_iteration = 0;
-
-etree_type *base; /* Relocation base - or null */
-
-/* Return TRUE if the PATTERN argument is a wildcard pattern.
- Although backslashes are treated specially if a pattern contains
- wildcards, we do not consider the mere presence of a backslash to
- be enough to cause the pattern to be treated as a wildcard.
- That lets us handle DOS filenames more naturally. */
-#define wildcardp(pattern) (strpbrk ((pattern), "?*[") != NULL)
-
-#define new_stat(x, y) \
- (x##_type *) new_statement (x##_enum, sizeof (x##_type), y)
-
-#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 asection *sec)
-{
- struct unique_sections *unam;
- const char *secnam;
-
- if (link_info.relocatable
- && sec->owner != NULL
- && bfd_is_group_section (sec->owner, sec))
- return TRUE;
-
- secnam = sec->name;
- for (unam = unique_section_list; unam; unam = unam->next)
- if (wildcardp (unam->name)
- ? fnmatch (unam->name, secnam, 0) == 0
- : strcmp (unam->name, secnam) == 0)
- {
- return TRUE;
- }
-
- return FALSE;
-}
-
-/* Generic traversal routines for finding matching sections. */
-
-/* Try processing a section against a wildcard. This just calls
- the callback unless the filename exclusion list is present
- and excludes the file. It's hardly ever present so this
- function is very fast. */
-
-static void
-walk_wild_consider_section (lang_wild_statement_type *ptr,
- lang_input_statement_type *file,
- asection *s,
- struct wildcard_list *sec,
- callback_t callback,
- void *data)
-{
- bfd_boolean skip = FALSE;
- struct name_list *list_tmp;
-
- /* Don't process sections from files which were
- excluded. */
- for (list_tmp = sec->spec.exclude_name_list;
- list_tmp;
- list_tmp = list_tmp->next)
- {
- bfd_boolean is_wildcard = wildcardp (list_tmp->name);
- if (is_wildcard)
- skip = fnmatch (list_tmp->name, file->filename, 0) == 0;
- else
- skip = strcmp (list_tmp->name, file->filename) == 0;
-
- /* If this file is part of an archive, and the archive is
- excluded, exclude this file. */
- if (! skip && file->the_bfd != NULL
- && file->the_bfd->my_archive != NULL
- && file->the_bfd->my_archive->filename != NULL)
- {
- if (is_wildcard)
- skip = fnmatch (list_tmp->name,
- file->the_bfd->my_archive->filename,
- 0) == 0;
- else
- skip = strcmp (list_tmp->name,
- file->the_bfd->my_archive->filename) == 0;
- }
-
- if (skip)
- break;
- }
-
- if (!skip)
- (*callback) (ptr, sec, s, file, data);
-}
-
-/* Lowest common denominator routine that can handle everything correctly,
- but slowly. */
-
-static void
-walk_wild_section_general (lang_wild_statement_type *ptr,
- lang_input_statement_type *file,
- callback_t callback,
- void *data)
-{
- asection *s;
- struct wildcard_list *sec;
-
- for (s = file->the_bfd->sections; s != NULL; s = s->next)
- {
- sec = ptr->section_list;
- if (sec == NULL)
- (*callback) (ptr, sec, s, file, data);
-
- while (sec != NULL)
- {
- bfd_boolean skip = FALSE;
-
- if (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)
- walk_wild_consider_section (ptr, file, s, sec, callback, data);
-
- sec = sec->next;
- }
- }
-}
-
-/* Routines to find a single section given its name. If there's more
- than one section with that name, we report that. */
-
-typedef struct
-{
- asection *found_section;
- bfd_boolean multiple_sections_found;
-} section_iterator_callback_data;
-
-static bfd_boolean
-section_iterator_callback (bfd *bfd ATTRIBUTE_UNUSED, asection *s, void *data)
-{
- section_iterator_callback_data *d = data;
-
- if (d->found_section != NULL)
- {
- d->multiple_sections_found = TRUE;
- return TRUE;
- }
-
- d->found_section = s;
- return FALSE;
-}
-
-static asection *
-find_section (lang_input_statement_type *file,
- struct wildcard_list *sec,
- bfd_boolean *multiple_sections_found)
-{
- section_iterator_callback_data cb_data = { NULL, FALSE };
-
- bfd_get_section_by_name_if (file->the_bfd, sec->spec.name,
- section_iterator_callback, &cb_data);
- *multiple_sections_found = cb_data.multiple_sections_found;
- return cb_data.found_section;
-}
-
-/* Code for handling simple wildcards without going through fnmatch,
- which can be expensive because of charset translations etc. */
-
-/* A simple wild is a literal string followed by a single '*',
- where the literal part is at least 4 characters long. */
-
-static bfd_boolean
-is_simple_wild (const char *name)
-{
- size_t len = strcspn (name, "*?[");
- return len >= 4 && name[len] == '*' && name[len + 1] == '\0';
-}
-
-static bfd_boolean
-match_simple_wild (const char *pattern, const char *name)
-{
- /* The first four characters of the pattern are guaranteed valid
- non-wildcard characters. So we can go faster. */
- if (pattern[0] != name[0] || pattern[1] != name[1]
- || pattern[2] != name[2] || pattern[3] != name[3])
- return FALSE;
-
- pattern += 4;
- name += 4;
- while (*pattern != '*')
- if (*name++ != *pattern++)
- return FALSE;
-
- return TRUE;
-}
-
-/* Compare sections ASEC and BSEC according to SORT. */
-
-static int
-compare_section (sort_type sort, asection *asec, asection *bsec)
-{
- int ret;
-
- switch (sort)
- {
- default:
- abort ();
-
- case by_alignment_name:
- ret = (bfd_section_alignment (bsec->owner, bsec)
- - bfd_section_alignment (asec->owner, asec));
- if (ret)
- break;
- /* Fall through. */
-
- case by_name:
- ret = strcmp (bfd_get_section_name (asec->owner, asec),
- bfd_get_section_name (bsec->owner, bsec));
- break;
-
- case by_name_alignment:
- ret = strcmp (bfd_get_section_name (asec->owner, asec),
- bfd_get_section_name (bsec->owner, bsec));
- if (ret)
- break;
- /* Fall through. */
-
- case by_alignment:
- ret = (bfd_section_alignment (bsec->owner, bsec)
- - bfd_section_alignment (asec->owner, asec));
- break;
- }
-
- return ret;
-}
-
-/* Build a Binary Search Tree to sort sections, unlike insertion sort
- used in wild_sort(). BST is considerably faster if the number of
- of sections are large. */
-
-static lang_section_bst_type **
-wild_sort_fast (lang_wild_statement_type *wild,
- struct wildcard_list *sec,
- lang_input_statement_type *file ATTRIBUTE_UNUSED,
- asection *section)
-{
- lang_section_bst_type **tree;
-
- tree = &wild->tree;
- if (!wild->filenames_sorted
- && (sec == NULL || sec->spec.sorted == none))
- {
- /* Append at the right end of tree. */
- while (*tree)
- tree = &((*tree)->right);
- return tree;
- }
-
- while (*tree)
- {
- /* Find the correct node to append this section. */
- if (compare_section (sec->spec.sorted, section, (*tree)->section) < 0)
- tree = &((*tree)->left);
- else
- tree = &((*tree)->right);
- }
-
- return tree;
-}
-
-/* Use wild_sort_fast to build a BST to sort sections. */
-
-static void
-output_section_callback_fast (lang_wild_statement_type *ptr,
- struct wildcard_list *sec,
- asection *section,
- lang_input_statement_type *file,
- void *output ATTRIBUTE_UNUSED)
-{
- lang_section_bst_type *node;
- lang_section_bst_type **tree;
-
- if (unique_section_p (section))
- return;
-
- node = xmalloc (sizeof (lang_section_bst_type));
- node->left = 0;
- node->right = 0;
- node->section = section;
-
- tree = wild_sort_fast (ptr, sec, file, section);
- if (tree != NULL)
- *tree = node;
-}
-
-/* Convert a sorted sections' BST back to list form. */
-
-static void
-output_section_callback_tree_to_list (lang_wild_statement_type *ptr,
- lang_section_bst_type *tree,
- void *output)
-{
- if (tree->left)
- output_section_callback_tree_to_list (ptr, tree->left, output);
-
- lang_add_section (&ptr->children, tree->section,
- (lang_output_section_statement_type *) output);
-
- if (tree->right)
- output_section_callback_tree_to_list (ptr, tree->right, output);
-
- free (tree);
-}
-
-/* Specialized, optimized routines for handling different kinds of
- wildcards */
-
-static void
-walk_wild_section_specs1_wild0 (lang_wild_statement_type *ptr,
- lang_input_statement_type *file,
- callback_t callback,
- void *data)
-{
- /* We can just do a hash lookup for the section with the right name.
- But if that lookup discovers more than one section with the name
- (should be rare), we fall back to the general algorithm because
- we would otherwise have to sort the sections to make sure they
- get processed in the bfd's order. */
- bfd_boolean multiple_sections_found;
- struct wildcard_list *sec0 = ptr->handler_data[0];
- asection *s0 = find_section (file, sec0, &multiple_sections_found);
-
- if (multiple_sections_found)
- walk_wild_section_general (ptr, file, callback, data);
- else if (s0)
- walk_wild_consider_section (ptr, file, s0, sec0, callback, data);
-}
-
-static void
-walk_wild_section_specs1_wild1 (lang_wild_statement_type *ptr,
- lang_input_statement_type *file,
- callback_t callback,
- void *data)
-{
- asection *s;
- struct wildcard_list *wildsec0 = ptr->handler_data[0];
-
- for (s = file->the_bfd->sections; s != NULL; s = s->next)
- {
- const char *sname = bfd_get_section_name (file->the_bfd, s);
- bfd_boolean skip = !match_simple_wild (wildsec0->spec.name, sname);
-
- if (!skip)
- walk_wild_consider_section (ptr, file, s, wildsec0, callback, data);
- }
-}
-
-static void
-walk_wild_section_specs2_wild1 (lang_wild_statement_type *ptr,
- lang_input_statement_type *file,
- callback_t callback,
- void *data)
-{
- asection *s;
- struct wildcard_list *sec0 = ptr->handler_data[0];
- struct wildcard_list *wildsec1 = ptr->handler_data[1];
- bfd_boolean multiple_sections_found;
- asection *s0 = find_section (file, sec0, &multiple_sections_found);
-
- if (multiple_sections_found)
- {
- walk_wild_section_general (ptr, file, callback, data);
- return;
- }
-
- /* Note that if the section was not found, s0 is NULL and
- we'll simply never succeed the s == s0 test below. */
- for (s = file->the_bfd->sections; s != NULL; s = s->next)
- {
- /* Recall that in this code path, a section cannot satisfy more
- than one spec, so if s == s0 then it cannot match
- wildspec1. */
- if (s == s0)
- walk_wild_consider_section (ptr, file, s, sec0, callback, data);
- else
- {
- const char *sname = bfd_get_section_name (file->the_bfd, s);
- bfd_boolean skip = !match_simple_wild (wildsec1->spec.name, sname);
-
- if (!skip)
- walk_wild_consider_section (ptr, file, s, wildsec1, callback,
- data);
- }
- }
-}
-
-static void
-walk_wild_section_specs3_wild2 (lang_wild_statement_type *ptr,
- lang_input_statement_type *file,
- callback_t callback,
- void *data)
-{
- asection *s;
- struct wildcard_list *sec0 = ptr->handler_data[0];
- struct wildcard_list *wildsec1 = ptr->handler_data[1];
- struct wildcard_list *wildsec2 = ptr->handler_data[2];
- bfd_boolean multiple_sections_found;
- asection *s0 = find_section (file, sec0, &multiple_sections_found);
-
- if (multiple_sections_found)
- {
- walk_wild_section_general (ptr, file, callback, data);
- return;
- }
-
- for (s = file->the_bfd->sections; s != NULL; s = s->next)
- {
- if (s == s0)
- walk_wild_consider_section (ptr, file, s, sec0, callback, data);
- else
- {
- const char *sname = bfd_get_section_name (file->the_bfd, s);
- bfd_boolean skip = !match_simple_wild (wildsec1->spec.name, sname);
-
- if (!skip)
- walk_wild_consider_section (ptr, file, s, wildsec1, callback, data);
- else
- {
- skip = !match_simple_wild (wildsec2->spec.name, sname);
- if (!skip)
- walk_wild_consider_section (ptr, file, s, wildsec2, callback,
- data);
- }
- }
- }
-}
-
-static void
-walk_wild_section_specs4_wild2 (lang_wild_statement_type *ptr,
- lang_input_statement_type *file,
- callback_t callback,
- void *data)
-{
- asection *s;
- struct wildcard_list *sec0 = ptr->handler_data[0];
- struct wildcard_list *sec1 = ptr->handler_data[1];
- struct wildcard_list *wildsec2 = ptr->handler_data[2];
- struct wildcard_list *wildsec3 = ptr->handler_data[3];
- bfd_boolean multiple_sections_found;
- asection *s0 = find_section (file, sec0, &multiple_sections_found), *s1;
-
- if (multiple_sections_found)
- {
- walk_wild_section_general (ptr, file, callback, data);
- return;
- }
-
- s1 = find_section (file, sec1, &multiple_sections_found);
- if (multiple_sections_found)
- {
- walk_wild_section_general (ptr, file, callback, data);
- return;
- }
-
- for (s = file->the_bfd->sections; s != NULL; s = s->next)
- {
- if (s == s0)
- walk_wild_consider_section (ptr, file, s, sec0, callback, data);
- else
- if (s == s1)
- walk_wild_consider_section (ptr, file, s, sec1, callback, data);
- else
- {
- const char *sname = bfd_get_section_name (file->the_bfd, s);
- bfd_boolean skip = !match_simple_wild (wildsec2->spec.name,
- sname);
-
- if (!skip)
- walk_wild_consider_section (ptr, file, s, wildsec2, callback,
- data);
- else
- {
- skip = !match_simple_wild (wildsec3->spec.name, sname);
- if (!skip)
- walk_wild_consider_section (ptr, file, s, wildsec3,
- callback, data);
- }
- }
- }
-}
-
-static void
-walk_wild_section (lang_wild_statement_type *ptr,
- lang_input_statement_type *file,
- callback_t callback,
- void *data)
-{
- if (file->just_syms_flag)
- return;
-
- (*ptr->walk_wild_section_handler) (ptr, file, callback, data);
-}
-
-/* Returns TRUE when name1 is a wildcard spec that might match
- something name2 can match. We're conservative: we return FALSE
- only if the prefixes of name1 and name2 are different up to the
- first wildcard character. */
-
-static bfd_boolean
-wild_spec_can_overlap (const char *name1, const char *name2)
-{
- size_t prefix1_len = strcspn (name1, "?*[");
- size_t prefix2_len = strcspn (name2, "?*[");
- size_t min_prefix_len;
-
- /* Note that if there is no wildcard character, then we treat the
- terminating 0 as part of the prefix. Thus ".text" won't match
- ".text." or ".text.*", for example. */
- if (name1[prefix1_len] == '\0')
- prefix1_len++;
- if (name2[prefix2_len] == '\0')
- prefix2_len++;
-
- min_prefix_len = prefix1_len < prefix2_len ? prefix1_len : prefix2_len;
-
- return memcmp (name1, name2, min_prefix_len) == 0;
-}
-
-/* Select specialized code to handle various kinds of wildcard
- statements. */
-
-static void
-analyze_walk_wild_section_handler (lang_wild_statement_type *ptr)
-{
- int sec_count = 0;
- int wild_name_count = 0;
- struct wildcard_list *sec;
- int signature;
- int data_counter;
-
- ptr->walk_wild_section_handler = walk_wild_section_general;
- ptr->handler_data[0] = NULL;
- ptr->handler_data[1] = NULL;
- ptr->handler_data[2] = NULL;
- ptr->handler_data[3] = NULL;
- ptr->tree = NULL;
-
- /* Count how many wildcard_specs there are, and how many of those
- actually use wildcards in the name. Also, bail out if any of the
- wildcard names are NULL. (Can this actually happen?
- walk_wild_section used to test for it.) And bail out if any
- of the wildcards are more complex than a simple string
- ending in a single '*'. */
- for (sec = ptr->section_list; sec != NULL; sec = sec->next)
- {
- ++sec_count;
- if (sec->spec.name == NULL)
- return;
- if (wildcardp (sec->spec.name))
- {
- ++wild_name_count;
- if (!is_simple_wild (sec->spec.name))
- return;
- }
- }
-
- /* The zero-spec case would be easy to optimize but it doesn't
- happen in practice. Likewise, more than 4 specs doesn't
- happen in practice. */
- if (sec_count == 0 || sec_count > 4)
- return;
-
- /* Check that no two specs can match the same section. */
- for (sec = ptr->section_list; sec != NULL; sec = sec->next)
- {
- struct wildcard_list *sec2;
- for (sec2 = sec->next; sec2 != NULL; sec2 = sec2->next)
- {
- if (wild_spec_can_overlap (sec->spec.name, sec2->spec.name))
- return;
- }
- }
-
- signature = (sec_count << 8) + wild_name_count;
- switch (signature)
- {
- case 0x0100:
- ptr->walk_wild_section_handler = walk_wild_section_specs1_wild0;
- break;
- case 0x0101:
- ptr->walk_wild_section_handler = walk_wild_section_specs1_wild1;
- break;
- case 0x0201:
- ptr->walk_wild_section_handler = walk_wild_section_specs2_wild1;
- break;
- case 0x0302:
- ptr->walk_wild_section_handler = walk_wild_section_specs3_wild2;
- break;
- case 0x0402:
- ptr->walk_wild_section_handler = walk_wild_section_specs4_wild2;
- break;
- default:
- return;
- }
-
- /* Now fill the data array with pointers to the specs, first the
- specs with non-wildcard names, then the specs with wildcard
- names. It's OK to process the specs in different order from the
- given order, because we've already determined that no section
- will match more than one spec. */
- data_counter = 0;
- for (sec = ptr->section_list; sec != NULL; sec = sec->next)
- if (!wildcardp (sec->spec.name))
- ptr->handler_data[data_counter++] = sec;
- for (sec = ptr->section_list; sec != NULL; sec = sec->next)
- if (wildcardp (sec->spec.name))
- ptr->handler_data[data_counter++] = sec;
-}
-
-/* Handle a wild statement for a single file F. */
-
-static void
-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, 0) == 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.type = lang_input_statement_enum;
- p->header.next = NULL;
- }
-
- lang_has_input_file = TRUE;
- p->target = target;
- p->sysrooted = FALSE;
-
- if (file_type == lang_input_file_is_l_enum
- && name[0] == ':' && name[1] != '\0')
- {
- file_type = lang_input_file_is_search_file_enum;
- name = name + 1;
- }
-
- switch (file_type)
- {
- case lang_input_file_is_symbols_only_enum:
- 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->add_needed = add_needed;
- 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)
-{
- return new_afile (name, file_type, target, TRUE);
-}
-
-struct out_section_hash_entry
-{
- struct bfd_hash_entry root;
- lang_statement_union_type s;
-};
-
-/* The hash table. */
-
-static struct bfd_hash_table output_section_statement_table;
-
-/* Support routines for the hash table used by lang_output_section_find,
- initialize the table, fill in an entry and remove the table. */
-
-static struct bfd_hash_entry *
-output_section_statement_newfunc (struct bfd_hash_entry *entry,
- struct bfd_hash_table *table,
- const char *string)
-{
- lang_output_section_statement_type **nextp;
- struct out_section_hash_entry *ret;
-
- if (entry == NULL)
- {
- entry = bfd_hash_allocate (table, sizeof (*ret));
- if (entry == NULL)
- return entry;
- }
-
- entry = bfd_hash_newfunc (entry, table, string);
- if (entry == NULL)
- return entry;
-
- ret = (struct out_section_hash_entry *) entry;
- memset (&ret->s, 0, sizeof (ret->s));
- ret->s.header.type = lang_output_section_statement_enum;
- ret->s.output_section_statement.subsection_alignment = -1;
- ret->s.output_section_statement.section_alignment = -1;
- ret->s.output_section_statement.block_value = 1;
- lang_list_init (&ret->s.output_section_statement.children);
- lang_statement_append (stat_ptr, &ret->s, &ret->s.header.next);
-
- /* For every output section statement added to the list, except the
- first one, lang_output_section_statement.tail points to the "next"
- field of the last element of the list. */
- if (lang_output_section_statement.head != NULL)
- ret->s.output_section_statement.prev
- = ((lang_output_section_statement_type *)
- ((char *) lang_output_section_statement.tail
- - offsetof (lang_output_section_statement_type, next)));
-
- /* GCC's strict aliasing rules prevent us from just casting the
- address, so we store the pointer in a variable and cast that
- instead. */
- nextp = &ret->s.output_section_statement.next;
- lang_statement_append (&lang_output_section_statement,
- &ret->s,
- (lang_statement_union_type **) nextp);
- return &ret->root;
-}
-
-static void
-output_section_statement_table_init (void)
-{
- if (!bfd_hash_table_init_n (&output_section_statement_table,
- output_section_statement_newfunc,
- sizeof (struct out_section_hash_entry),
- 61))
- einfo (_("%P%F: can not create hash table: %E\n"));
-}
-
-static void
-output_section_statement_table_free (void)
-{
- bfd_hash_table_free (&output_section_statement_table);
-}
-
-/* Build enough state so that the parser can build its tree. */
-
-void
-lang_init (void)
-{
- obstack_begin (&stat_obstack, 1000);
-
- stat_ptr = &statement_list;
-
- output_section_statement_table_init ();
-
- 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,
- sizeof (struct lang_definedness_hash_entry),
- 3))
- einfo (_("%P%F: can not create hash table: %E\n"));
-}
-
-void
-lang_finish (void)
-{
- output_section_statement_table_free ();
-}
-
-/*----------------------------------------------------------------------
- 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 (!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;
- new->origin = 0;
- new->length = ~(bfd_size_type) 0;
- new->current = 0;
- new->last_os = NULL;
- new->flags = 0;
- new->not_flags = 0;
- new->had_full_message = FALSE;
-
- *lang_memory_region_list_tail = new;
- lang_memory_region_list_tail = &new->next;
-
- return new;
-}
-
-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)
-{
- struct out_section_hash_entry *entry;
- unsigned long hash;
-
- entry = ((struct out_section_hash_entry *)
- bfd_hash_lookup (&output_section_statement_table, name,
- FALSE, FALSE));
- if (entry == NULL)
- return NULL;
-
- hash = entry->root.hash;
- do
- {
- if (entry->s.output_section_statement.constraint != -1)
- return &entry->s.output_section_statement;
- entry = (struct out_section_hash_entry *) entry->root.next;
- }
- while (entry != NULL
- && entry->root.hash == hash
- && strcmp (name, entry->s.output_section_statement.name) == 0);
-
- return NULL;
-}
-
-static lang_output_section_statement_type *
-lang_output_section_statement_lookup_1 (const char *const name, int constraint)
-{
- struct out_section_hash_entry *entry;
- struct out_section_hash_entry *last_ent;
- unsigned long hash;
-
- entry = ((struct out_section_hash_entry *)
- bfd_hash_lookup (&output_section_statement_table, name,
- TRUE, FALSE));
- if (entry == NULL)
- {
- einfo (_("%P%F: failed creating section `%s': %E\n"), name);
- return NULL;
- }
-
- if (entry->s.output_section_statement.name != NULL)
- {
- /* We have a section of this name, but it might not have the correct
- constraint. */
- hash = entry->root.hash;
- do
- {
- if (entry->s.output_section_statement.constraint != -1
- && (constraint == 0
- || (constraint == entry->s.output_section_statement.constraint
- && constraint != SPECIAL)))
- return &entry->s.output_section_statement;
- last_ent = entry;
- entry = (struct out_section_hash_entry *) entry->root.next;
- }
- while (entry != NULL
- && entry->root.hash == hash
- && strcmp (name, entry->s.output_section_statement.name) == 0);
-
- entry
- = ((struct out_section_hash_entry *)
- output_section_statement_newfunc (NULL,
- &output_section_statement_table,
- name));
- if (entry == NULL)
- {
- einfo (_("%P%F: failed creating section `%s': %E\n"), name);
- return NULL;
- }
- entry->root = last_ent->root;
- last_ent->root.next = &entry->root;
- }
-
- entry->s.output_section_statement.name = name;
- entry->s.output_section_statement.constraint = constraint;
- return &entry->s.output_section_statement;
-}
-
-lang_output_section_statement_type *
-lang_output_section_statement_lookup (const char *const name)
-{
- return lang_output_section_statement_lookup_1 (name, 0);
-}
-
-/* A variant of lang_output_section_find used by place_orphan.
- Returns the output statement that should precede a new output
- statement for SEC. If an exact match is found on certain flags,
- sets *EXACT too. */
-
-lang_output_section_statement_type *
-lang_output_section_find_by_flags (const asection *sec,
- lang_output_section_statement_type **exact,
- lang_match_sec_type_func match_type)
-{
- lang_output_section_statement_type *first, *look, *found;
- flagword flags;
-
- /* We know the first statement on this list is *ABS*. May as well
- skip it. */
- first = &lang_output_section_statement.head->output_section_statement;
- first = first->next;
-
- /* First try for an exact match. */
- found = NULL;
- for (look = first; look; look = look->next)
- {
- flags = look->flags;
- if (look->bfd_section != NULL)
- {
- flags = look->bfd_section->flags;
- if (match_type && !match_type (output_bfd, look->bfd_section,
- sec->owner, sec))
- continue;
- }
- flags ^= sec->flags;
- if (!(flags & (SEC_HAS_CONTENTS | SEC_ALLOC | SEC_LOAD | SEC_READONLY
- | SEC_CODE | SEC_SMALL_DATA | SEC_THREAD_LOCAL)))
- found = look;
- }
- if (found != NULL)
- {
- if (exact != NULL)
- *exact = found;
- return found;
- }
-
- if (sec->flags & SEC_CODE)
- {
- /* Try for a rw code section. */
- for (look = first; look; look = look->next)
- {
- flags = look->flags;
- if (look->bfd_section != NULL)
- {
- flags = look->bfd_section->flags;
- if (match_type && !match_type (output_bfd, look->bfd_section,
- sec->owner, sec))
- continue;
- }
- flags ^= sec->flags;
- if (!(flags & (SEC_HAS_CONTENTS | SEC_ALLOC | SEC_LOAD
- | SEC_CODE | SEC_SMALL_DATA | SEC_THREAD_LOCAL)))
- found = look;
- }
- }
- else if (sec->flags & (SEC_READONLY | SEC_THREAD_LOCAL))
- {
- /* .rodata can go after .text, .sdata2 after .rodata. */
- for (look = first; look; look = look->next)
- {
- flags = look->flags;
- if (look->bfd_section != NULL)
- {
- flags = look->bfd_section->flags;
- if (match_type && !match_type (output_bfd, look->bfd_section,
- sec->owner, sec))
- continue;
- }
- flags ^= sec->flags;
- if (!(flags & (SEC_HAS_CONTENTS | SEC_ALLOC | SEC_LOAD
- | SEC_READONLY))
- && !(look->flags & (SEC_SMALL_DATA | SEC_THREAD_LOCAL)))
- found = look;
- }
- }
- else if (sec->flags & SEC_SMALL_DATA)
- {
- /* .sdata goes after .data, .sbss after .sdata. */
- for (look = first; look; look = look->next)
- {
- flags = look->flags;
- if (look->bfd_section != NULL)
- {
- flags = look->bfd_section->flags;
- if (match_type && !match_type (output_bfd, look->bfd_section,
- sec->owner, sec))
- continue;
- }
- flags ^= sec->flags;
- if (!(flags & (SEC_HAS_CONTENTS | SEC_ALLOC | SEC_LOAD
- | SEC_THREAD_LOCAL))
- || ((look->flags & SEC_SMALL_DATA)
- && !(sec->flags & SEC_HAS_CONTENTS)))
- found = look;
- }
- }
- else if (sec->flags & SEC_HAS_CONTENTS)
- {
- /* .data goes after .rodata. */
- for (look = first; look; look = look->next)
- {
- flags = look->flags;
- if (look->bfd_section != NULL)
- {
- flags = look->bfd_section->flags;
- if (match_type && !match_type (output_bfd, look->bfd_section,
- sec->owner, sec))
- continue;
- }
- flags ^= sec->flags;
- if (!(flags & (SEC_HAS_CONTENTS | SEC_ALLOC | SEC_LOAD
- | SEC_SMALL_DATA | SEC_THREAD_LOCAL)))
- found = look;
- }
- }
- else
- {
- /* .bss goes last. */
- for (look = first; look; look = look->next)
- {
- flags = look->flags;
- if (look->bfd_section != NULL)
- {
- flags = look->bfd_section->flags;
- if (match_type && !match_type (output_bfd, look->bfd_section,
- sec->owner, sec))
- continue;
- }
- flags ^= sec->flags;
- if (!(flags & SEC_ALLOC))
- found = look;
- }
- }
-
- if (found || !match_type)
- return found;
-
- return lang_output_section_find_by_flags (sec, NULL, NULL);
-}
-
-/* Find the last output section before given output statement.
- Used by place_orphan. */
-
-static asection *
-output_prev_sec_find (lang_output_section_statement_type *os)
-{
- lang_output_section_statement_type *lookup;
-
- for (lookup = os->prev; lookup != NULL; lookup = lookup->prev)
- {
- if (lookup->constraint == -1)
- continue;
-
- if (lookup->bfd_section != NULL && lookup->bfd_section->owner != NULL)
- return lookup->bfd_section;
- }
-
- return NULL;
-}
-
-lang_output_section_statement_type *
-lang_insert_orphan (asection *s,
- const char *secname,
- lang_output_section_statement_type *after,
- struct orphan_save *place,
- etree_type *address,
- lang_statement_list_type *add_child)
-{
- lang_statement_list_type *old;
- lang_statement_list_type add;
- const char *ps;
- lang_output_section_statement_type *os;
- lang_output_section_statement_type **os_tail;
-
- /* Start building a list of statements for this section.
- First save the current statement pointer. */
- old = stat_ptr;
-
- /* If we have found an appropriate place for the output section
- statements for this orphan, add them to our own private list,
- inserting them later into the global statement list. */
- if (after != NULL)
- {
- stat_ptr = &add;
- lang_list_init (stat_ptr);
- }
-
- if (link_info.relocatable || (s->flags & (SEC_LOAD | SEC_ALLOC)) == 0)
- address = exp_intop (0);
-
- os_tail = ((lang_output_section_statement_type **)
- lang_output_section_statement.tail);
- os = lang_enter_output_section_statement (secname, address, 0, NULL, NULL,
- NULL, 0);
-
- ps = NULL;
- if (config.build_constructors && *os_tail == os)
- {
- /* If the name of the section is representable in C, then create
- symbols to mark the start and the end of the section. */
- for (ps = secname; *ps != '\0'; ps++)
- if (! ISALNUM ((unsigned char) *ps) && *ps != '_')
- break;
- if (*ps == '\0')
- {
- char *symname;
- etree_type *e_align;
-
- symname = (char *) xmalloc (ps - secname + sizeof "__start_" + 1);
- symname[0] = bfd_get_symbol_leading_char (output_bfd);
- sprintf (symname + (symname[0] != 0), "__start_%s", secname);
- e_align = exp_unop (ALIGN_K,
- exp_intop ((bfd_vma) 1 << s->alignment_power));
- lang_add_assignment (exp_assop ('=', ".", e_align));
- lang_add_assignment (exp_provide (symname,
- exp_unop (ABSOLUTE,
- exp_nameop (NAME, ".")),
- FALSE));
- }
- }
-
- if (add_child == NULL)
- add_child = &os->children;
- lang_add_section (add_child, s, os);
-
- lang_leave_output_section_statement (0, "*default*", NULL, NULL);
-
- if (ps != NULL && *ps == '\0')
- {
- char *symname;
-
- /* lang_leave_ouput_section_statement resets stat_ptr.
- Put stat_ptr back where we want it. */
- if (after != NULL)
- stat_ptr = &add;
-
- symname = (char *) xmalloc (ps - secname + sizeof "__stop_" + 1);
- symname[0] = bfd_get_symbol_leading_char (output_bfd);
- sprintf (symname + (symname[0] != 0), "__stop_%s", secname);
- lang_add_assignment (exp_provide (symname,
- exp_nameop (NAME, "."),
- FALSE));
- }
-
- /* Restore the global list pointer. */
- if (after != NULL)
- stat_ptr = old;
-
- if (after != NULL && os->bfd_section != NULL)
- {
- asection *snew, *as;
-
- snew = os->bfd_section;
-
- /* Shuffle the bfd section list to make the output file look
- neater. This is really only cosmetic. */
- if (place->section == NULL
- && after != (&lang_output_section_statement.head
- ->output_section_statement))
- {
- asection *bfd_section = after->bfd_section;
-
- /* If the output statement hasn't been used to place any input
- sections (and thus doesn't have an output bfd_section),
- look for the closest prior output statement having an
- output section. */
- if (bfd_section == NULL)
- bfd_section = output_prev_sec_find (after);
-
- if (bfd_section != NULL && bfd_section != snew)
- place->section = &bfd_section->next;
- }
-
- if (place->section == NULL)
- place->section = &output_bfd->sections;
-
- as = *place->section;
-
- if (!as)
- {
- /* Put the section at the end of the list. */
-
- /* Unlink the section. */
- bfd_section_list_remove (output_bfd, snew);
-
- /* Now tack it back on in the right place. */
- bfd_section_list_append (output_bfd, snew);
- }
- else if (as != snew && as->prev != snew)
- {
- /* Unlink the section. */
- bfd_section_list_remove (output_bfd, snew);
-
- /* Now tack it back on in the right place. */
- bfd_section_list_insert_before (output_bfd, as, snew);
- }
-
- /* Save the end of this list. Further ophans of this type will
- follow the one we've just added. */
- place->section = &snew->next;
-
- /* The following is non-cosmetic. We try to put the output
- statements in some sort of reasonable order here, because they
- determine the final load addresses of the orphan sections.
- In addition, placing output statements in the wrong order may
- require extra segments. For instance, given a typical
- situation of all read-only sections placed in one segment and
- following that a segment containing all the read-write
- sections, we wouldn't want to place an orphan read/write
- section before or amongst the read-only ones. */
- if (add.head != NULL)
- {
- lang_output_section_statement_type *newly_added_os;
-
- if (place->stmt == NULL)
- {
- lang_statement_union_type **where;
- lang_statement_union_type **assign = NULL;
- bfd_boolean ignore_first;
-
- /* Look for a suitable place for the new statement list.
- The idea is to skip over anything that might be inside
- a SECTIONS {} statement in a script, before we find
- another output_section_statement. Assignments to "dot"
- before an output section statement are assumed to
- belong to it. An exception to this rule is made for
- the first assignment to dot, otherwise we might put an
- orphan before . = . + SIZEOF_HEADERS or similar
- assignments that set the initial address. */
-
- ignore_first = after == (&lang_output_section_statement.head
- ->output_section_statement);
- for (where = &after->header.next;
- *where != NULL;
- where = &(*where)->header.next)
- {
- switch ((*where)->header.type)
- {
- case lang_assignment_statement_enum:
- if (assign == NULL)
- {
- lang_assignment_statement_type *ass;
- ass = &(*where)->assignment_statement;
- if (ass->exp->type.node_class != etree_assert
- && ass->exp->assign.dst[0] == '.'
- && ass->exp->assign.dst[1] == 0
- && !ignore_first)
- assign = where;
- }
- ignore_first = FALSE;
- continue;
- case lang_wild_statement_enum:
- case lang_input_section_enum:
- case lang_object_symbols_statement_enum:
- case lang_fill_statement_enum:
- case lang_data_statement_enum:
- case lang_reloc_statement_enum:
- case lang_padding_statement_enum:
- case lang_constructors_statement_enum:
- assign = NULL;
- continue;
- case lang_output_section_statement_enum:
- if (assign != NULL)
- where = assign;
- case lang_input_statement_enum:
- case lang_address_statement_enum:
- case lang_target_statement_enum:
- case lang_output_statement_enum:
- case lang_group_statement_enum:
- case lang_afile_asection_pair_statement_enum:
- break;
- }
- break;
- }
-
- *add.tail = *where;
- *where = add.head;
-
- place->os_tail = &after->next;
- }
- else
- {
- /* Put it after the last orphan statement we added. */
- *add.tail = *place->stmt;
- *place->stmt = add.head;
- }
-
- /* Fix the global list pointer if we happened to tack our
- new list at the tail. */
- if (*old->tail == add.head)
- old->tail = add.tail;
-
- /* Save the end of this list. */
- place->stmt = add.tail;
-
- /* Do the same for the list of output section statements. */
- newly_added_os = *os_tail;
- *os_tail = NULL;
- newly_added_os->prev = (lang_output_section_statement_type *)
- ((char *) place->os_tail
- - offsetof (lang_output_section_statement_type, next));
- newly_added_os->next = *place->os_tail;
- if (newly_added_os->next != NULL)
- newly_added_os->next->prev = newly_added_os;
- *place->os_tail = newly_added_os;
- place->os_tail = &newly_added_os->next;
-
- /* Fixing the global list pointer here is a little different.
- We added to the list in lang_enter_output_section_statement,
- trimmed off the new output_section_statment above when
- assigning *os_tail = NULL, but possibly added it back in
- the same place when assigning *place->os_tail. */
- if (*os_tail == NULL)
- lang_output_section_statement.tail
- = (lang_statement_union_type **) os_tail;
- }
- }
- return os;
-}
-
-static void
-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;
- bfd_boolean dis_header_printed = FALSE;
- bfd *p;
-
- LANG_FOR_EACH_INPUT_STATEMENT (file)
- {
- asection *s;
-
- if ((file->the_bfd->flags & (BFD_LINKER_CREATED | DYNAMIC)) != 0
- || file->just_syms_flag)
- continue;
-
- for (s = file->the_bfd->sections; s != NULL; s = s->next)
- if ((s->output_section == NULL
- || s->output_section->owner != output_bfd)
- && (s->flags & (SEC_LINKER_CREATED | SEC_KEEP)) == 0)
- {
- if (! dis_header_printed)
- {
- fprintf (config.map_file, _("\nDiscarded input sections\n\n"));
- dis_header_printed = TRUE;
- }
-
- print_input_section (s);
- }
- }
-
- minfo (_("\nMemory Configuration\n\n"));
- fprintf (config.map_file, "%-16s %-18s %-18s %s\n",
- _("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"));
-
- if (! link_info.reduce_memory_overheads)
- {
- obstack_begin (&map_obstack, 1000);
- for (p = link_info.input_bfds; p != (bfd *) NULL; p = p->link_next)
- bfd_map_over_sections (p, init_map_userdata, 0);
- bfd_link_hash_traverse (link_info.hash, sort_def_symbol, 0);
- }
- print_statements ();
-}
-
-static void
-init_map_userdata (abfd, sec, data)
- bfd *abfd ATTRIBUTE_UNUSED;
- asection *sec;
- void *data ATTRIBUTE_UNUSED;
-{
- fat_section_userdata_type *new_data
- = ((fat_section_userdata_type *) (stat_alloc
- (sizeof (fat_section_userdata_type))));
-
- ASSERT (get_userdata (sec) == NULL);
- get_userdata (sec) = new_data;
- new_data->map_symbol_def_tail = &new_data->map_symbol_def_head;
-}
-
-static bfd_boolean
-sort_def_symbol (hash_entry, info)
- struct bfd_link_hash_entry *hash_entry;
- void *info ATTRIBUTE_UNUSED;
-{
- if (hash_entry->type == bfd_link_hash_defined
- || hash_entry->type == bfd_link_hash_defweak)
- {
- struct fat_user_section_struct *ud;
- struct map_symbol_def *def;
-
- ud = get_userdata (hash_entry->u.def.section);
- if (! ud)
- {
- /* ??? What do we have to do to initialize this beforehand? */
- /* The first time we get here is bfd_abs_section... */
- init_map_userdata (0, hash_entry->u.def.section, 0);
- ud = get_userdata (hash_entry->u.def.section);
- }
- else if (!ud->map_symbol_def_tail)
- ud->map_symbol_def_tail = &ud->map_symbol_def_head;
-
- def = obstack_alloc (&map_obstack, sizeof *def);
- def->entry = hash_entry;
- *(ud->map_symbol_def_tail) = def;
- ud->map_symbol_def_tail = &def->next;
- }
- return TRUE;
-}
-
-/* Initialize an output section. */
-
-static void
-init_os (lang_output_section_statement_type *s, asection *isec,
- flagword flags)
-{
- 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);
-
- s->bfd_section = bfd_get_section_by_name (output_bfd, s->name);
- if (s->bfd_section == NULL)
- s->bfd_section = bfd_make_section_with_flags (output_bfd, s->name,
- flags);
- if (s->bfd_section == NULL)
- {
- einfo (_("%P%F: output format %s cannot represent section called %s\n"),
- output_bfd->xvec->name, s->name);
- }
- s->bfd_section->output_section = s->bfd_section;
- s->bfd_section->output_offset = 0;
-
- if (!link_info.reduce_memory_overheads)
- {
- fat_section_userdata_type *new
- = stat_alloc (sizeof (fat_section_userdata_type));
- memset (new, 0, sizeof (fat_section_userdata_type));
- get_userdata (s->bfd_section) = new;
- }
-
- /* If there is a base address, make sure that any sections it might
- mention are initialized. */
- if (s->addr_tree != NULL)
- exp_init_os (s->addr_tree);
-
- if (s->load_base != NULL)
- exp_init_os (s->load_base);
-
- /* If supplied an alignment, set it. */
- if (s->section_alignment != -1)
- s->bfd_section->alignment_power = s->section_alignment;
-
- if (isec)
- bfd_init_private_section_data (isec->owner, isec,
- output_bfd, s->bfd_section,
- &link_info);
-}
-
-/* Make sure that all output sections mentioned in an expression are
- initialized. */
-
-static void
-exp_init_os (etree_type *exp)
-{
- switch (exp->type.node_class)
- {
- case etree_assign:
- case etree_provide:
- 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, NULL, 0);
- }
- }
- break;
-
- default:
- break;
- }
-}
-
-static void
-section_already_linked (bfd *abfd, asection *sec, void *data)
-{
- lang_input_statement_type *entry = data;
-
- /* 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 (abfd, sec, &link_info);
- return;
- }
-
- if (!(abfd->flags & DYNAMIC))
- bfd_section_already_linked (abfd, sec, &link_info);
-}
-
-/* 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). */
-
-/* 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)
-{
- flagword flags = section->flags;
- bfd_boolean discard;
-
- /* Discard sections marked with SEC_EXCLUDE. */
- discard = (flags & SEC_EXCLUDE) != 0;
-
- /* 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;
-
- 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;
-
- switch (output->sectype)
- {
- case normal_section:
- case overlay_section:
- break;
- case noalloc_section:
- flags &= ~SEC_ALLOC;
- break;
- case noload_section:
- flags &= ~SEC_LOAD;
- flags |= SEC_NEVER_LOAD;
- break;
- }
-
- if (output->bfd_section == NULL)
- init_os (output, section, flags);
-
- first = ! output->bfd_section->linker_has_input;
- output->bfd_section->linker_has_input = 1;
-
- if (!link_info.relocatable
- && !stripped_excluded_sections)
- {
- asection *s = output->bfd_section->map_tail.s;
- output->bfd_section->map_tail.s = section;
- section->map_head.s = NULL;
- section->map_tail.s = s;
- if (s != NULL)
- s->map_head.s = section;
- else
- output->bfd_section->map_head.s = section;
- }
-
- /* Add a section reference to the list. */
- new = new_stat (lang_input_section, ptr);
-
- new->section = section;
- section->output_section = output->bfd_section;
-
- /* If final link, don't copy the SEC_LINK_ONCE flags, they've
- already been processed. One reason to do this is that on pe
- format targets, .text$foo sections go into .text and it's odd
- 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 && (output->bfd_section->flags & SEC_READONLY) == 0)
- flags &= ~ SEC_READONLY;
-
- /* Keep SEC_MERGE and SEC_STRINGS only if they are the same. */
- if (! first
- && ((output->bfd_section->flags & (SEC_MERGE | SEC_STRINGS))
- != (flags & (SEC_MERGE | SEC_STRINGS))
- || ((flags & SEC_MERGE)
- && output->bfd_section->entsize != section->entsize)))
- {
- output->bfd_section->flags &= ~ (SEC_MERGE | SEC_STRINGS);
- flags &= ~ (SEC_MERGE | SEC_STRINGS);
- }
-
- output->bfd_section->flags |= flags;
-
- if (flags & SEC_MERGE)
- output->bfd_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)
- output->bfd_section->flags &= ~SEC_READONLY;
-
- /* Copy over SEC_SMALL_DATA. */
- if (section->flags & SEC_SMALL_DATA)
- output->bfd_section->flags |= SEC_SMALL_DATA;
-
- if (section->alignment_power > output->bfd_section->alignment_power)
- output->bfd_section->alignment_power = section->alignment_power;
-
- if (bfd_get_arch (section->owner) == bfd_arch_tic54x
- && (section->flags & SEC_TIC54X_BLOCK) != 0)
- {
- output->bfd_section->flags |= SEC_TIC54X_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 == none))
- 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 (bfd_my_archive (ls->section->owner) != NULL)
- {
- ln = bfd_get_filename (bfd_my_archive (ls->section->owner));
- la = TRUE;
- }
- else
- {
- ln = ls->section->owner->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->section->owner->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 != none)
- if (compare_section (sec->spec.sorted, section, 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 (section))
- return;
-
- 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);
- 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);
-
- /* 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;
- }
- }
-}
-
-/* Check if all sections in a wild statement for a particular FILE
- are readonly. */
-
-static void
-check_section_callback (lang_wild_statement_type *ptr ATTRIBUTE_UNUSED,
- struct wildcard_list *sec ATTRIBUTE_UNUSED,
- asection *section,
- lang_input_statement_type *file ATTRIBUTE_UNUSED,
- void *data)
-{
- /* Exclude sections that match UNIQUE_SECTION_LIST. */
- if (unique_section_p (section))
- return;
-
- if (section->output_section == NULL && (section->flags & SEC_READONLY) == 0)
- ((lang_output_section_statement_type *) data)->all_input_readonly = FALSE;
-}
-
-/* This is passed a file name which must have been seen already and
- added to the statement tree. We will see if it has been opened
- already and had its symbols read. If not then we'll read it. */
-
-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
- && 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
- don't add this file. */
- if (search->loaded || !search->real)
- return search;
-
- if (! load_symbols (search, NULL))
- return NULL;
-
- return search;
-}
-
-/* Save LIST as a list of libraries whose symbols should not be exported. */
-
-struct excluded_lib
-{
- char *name;
- struct excluded_lib *next;
-};
-static struct excluded_lib *excluded_libs;
-
-void
-add_excluded_libs (const char *list)
-{
- const char *p = list, *end;
-
- while (*p != '\0')
- {
- struct excluded_lib *entry;
- end = strpbrk (p, ",:");
- if (end == NULL)
- end = p + strlen (p);
- entry = xmalloc (sizeof (*entry));
- entry->next = excluded_libs;
- entry->name = xmalloc (end - p + 1);
- memcpy (entry->name, p, end - p);
- entry->name[end - p] = '\0';
- excluded_libs = entry;
- if (*end == '\0')
- break;
- p = end + 1;
- }
-}
-
-static void
-check_excluded_libs (bfd *abfd)
-{
- struct excluded_lib *lib = excluded_libs;
-
- while (lib)
- {
- int len = strlen (lib->name);
- const char *filename = lbasename (abfd->filename);
-
- if (strcmp (lib->name, "ALL") == 0)
- {
- abfd->no_export = TRUE;
- return;
- }
-
- if (strncmp (lib->name, filename, len) == 0
- && (filename[len] == '\0'
- || (filename[len] == '.' && filename[len + 1] == 'a'
- && filename[len + 2] == '\0')))
- {
- abfd->no_export = TRUE;
- return;
- }
-
- lib = lib->next;
- }
-}
-
-/* Get the symbols for an input file. */
-
-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;
- bfd_boolean save_as_needed, save_add_needed;
-
- 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;
- save_as_needed = as_needed;
- as_needed = entry->as_needed;
- save_add_needed = add_needed;
- add_needed = entry->add_needed;
-
- ldfile_assumed_script = TRUE;
- parser_input = input_script;
- /* We want to use the same -Bdynamic/-Bstatic as the one for
- ENTRY. */
- config.dynamic_link = entry->dynamic;
- yyparse ();
- ldfile_assumed_script = FALSE;
-
- ldlang_sysrooted_script = save_ldlang_sysrooted_script;
- as_needed = save_as_needed;
- add_needed = save_add_needed;
- stat_ptr = hold;
-
- return ! bad_load;
- }
-
- 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:
- check_excluded_libs (entry->the_bfd);
-
- 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;
-
- if (s->handler_data[0]
- && s->handler_data[0]->spec.sorted == by_name
- && !s->filenames_sorted)
- {
- lang_section_bst_type *tree;
-
- walk_wild (s, output_section_callback_fast, output);
-
- tree = s->tree;
- if (tree)
- {
- output_section_callback_tree_to_list (s, tree, output);
- s->tree = NULL;
- }
- }
- else
- walk_wild (s, output_section_callback, output);
-
- if (default_common_section == NULL)
- for (sec = s->section_list; sec != NULL; sec = sec->next)
- if (sec->spec.name != NULL && strcmp (sec->spec.name, "COMMON") == 0)
- {
- /* Remember the section that common is going to in case we
- later get something which doesn't know where to put it. */
- default_common_section = output;
- break;
- }
-}
-
-/* Return TRUE iff target is the sought target. */
-
-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 (! 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 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;
- }
- }
-}
-
-/* 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);
-}
-
-/* Check for all readonly or some readwrite sections. */
-
-static void
-check_input_sections
- (lang_statement_union_type *s,
- lang_output_section_statement_type *output_section_statement)
-{
- for (; s != (lang_statement_union_type *) NULL; s = s->header.next)
- {
- switch (s->header.type)
- {
- case lang_wild_statement_enum:
- walk_wild (&s->wild_statement, check_section_callback,
- output_section_statement);
- if (! output_section_statement->all_input_readonly)
- return;
- break;
- case lang_constructors_statement_enum:
- check_input_sections (constructor_list.head,
- output_section_statement);
- if (! output_section_statement->all_input_readonly)
- return;
- break;
- case lang_group_statement_enum:
- check_input_sections (s->group_statement.children.head,
- output_section_statement);
- if (! output_section_statement->all_input_readonly)
- return;
- break;
- default:
- break;
- }
- }
-}
-
-/* Update wildcard statements if needed. */
-
-static void
-update_wild_statements (lang_statement_union_type *s)
-{
- struct wildcard_list *sec;
-
- switch (sort_section)
- {
- default:
- FAIL ();
-
- case none:
- break;
-
- case by_name:
- case by_alignment:
- for (; s != NULL; s = s->header.next)
- {
- switch (s->header.type)
- {
- default:
- break;
-
- case lang_wild_statement_enum:
- sec = s->wild_statement.section_list;
- for (sec = s->wild_statement.section_list; sec != NULL;
- sec = sec->next)
- {
- switch (sec->spec.sorted)
- {
- case none:
- sec->spec.sorted = sort_section;
- break;
- case by_name:
- if (sort_section == by_alignment)
- sec->spec.sorted = by_name_alignment;
- break;
- case by_alignment:
- if (sort_section == by_name)
- sec->spec.sorted = by_alignment_name;
- break;
- default:
- break;
- }
- }
- break;
-
- case lang_constructors_statement_enum:
- update_wild_statements (constructor_list.head);
- break;
-
- case lang_output_section_statement_enum:
- update_wild_statements
- (s->output_section_statement.children.head);
- break;
-
- case lang_group_statement_enum:
- update_wild_statements (s->group_statement.children.head);
- break;
- }
- }
- break;
- }
-}
-
-/* Open input files and attach to output sections. */
-
-static void
-map_input_to_output_sections
- (lang_statement_union_type *s, const char *target,
- lang_output_section_statement_type *os)
-{
- flagword flags;
-
- for (; s != NULL; s = s->header.next)
- {
- switch (s->header.type)
- {
- case lang_wild_statement_enum:
- wild (&s->wild_statement, target, os);
- break;
- case lang_constructors_statement_enum:
- map_input_to_output_sections (constructor_list.head,
- target,
- os);
- break;
- case lang_output_section_statement_enum:
- if (s->output_section_statement.constraint)
- {
- if (s->output_section_statement.constraint != ONLY_IF_RW
- && s->output_section_statement.constraint != ONLY_IF_RO)
- break;
- s->output_section_statement.all_input_readonly = TRUE;
- check_input_sections (s->output_section_statement.children.head,
- &s->output_section_statement);
- if ((s->output_section_statement.all_input_readonly
- && s->output_section_statement.constraint == ONLY_IF_RW)
- || (!s->output_section_statement.all_input_readonly
- && s->output_section_statement.constraint == ONLY_IF_RO))
- {
- s->output_section_statement.constraint = -1;
- break;
- }
- }
-
- map_input_to_output_sections (s->output_section_statement.children.head,
- target,
- &s->output_section_statement);
- 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,
- os);
- break;
- case lang_data_statement_enum:
- /* Make sure that any sections mentioned in the expression
- are initialized. */
- exp_init_os (s->data_statement.exp);
- flags = SEC_HAS_CONTENTS;
- /* The output section gets contents, and then we inspect for
- any flags set in the input script which override any ALLOC. */
- if (!(os->flags & SEC_NEVER_LOAD))
- flags |= SEC_ALLOC | SEC_LOAD;
- if (os->bfd_section == NULL)
- init_os (os, NULL, flags);
- else
- os->bfd_section->flags |= flags;
- break;
- case lang_input_section_enum:
- break;
- case lang_fill_statement_enum:
- case lang_object_symbols_statement_enum:
- case lang_reloc_statement_enum:
- case lang_padding_statement_enum:
- case lang_input_statement_enum:
- if (os != NULL && os->bfd_section == NULL)
- init_os (os, NULL, 0);
- break;
- case lang_assignment_statement_enum:
- if (os != NULL && os->bfd_section == NULL)
- init_os (os, NULL, 0);
-
- /* 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.
-
- If this section was actually a segment marker, then the
- directive is ignored if the linker script explicitly
- processed the segment marker. Originally, the linker
- treated segment directives (like -Ttext on the
- command-line) as section directives. We honor the
- section directive semantics for backwards compatibilty;
- linker scripts that do not specifically check for
- SEGMENT_START automatically get the old semantics. */
- if (!s->address_statement.segment
- || !s->address_statement.segment->used)
- {
- lang_output_section_statement_type *aos
- = (lang_output_section_statement_lookup
- (s->address_statement.section_name));
-
- if (aos->bfd_section == NULL)
- init_os (aos, NULL, 0);
- aos->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. */
-
-void
-strip_excluded_output_sections (void)
-{
- lang_output_section_statement_type *os;
-
- /* Run lang_size_sections (if not already done). */
- if (expld.phase != lang_mark_phase_enum)
- {
- expld.phase = lang_mark_phase_enum;
- expld.dataseg.phase = exp_dataseg_none;
- one_lang_size_sections_pass (NULL, FALSE);
- lang_reset_memory_regions ();
- }
-
- for (os = &lang_output_section_statement.head->output_section_statement;
- os != NULL;
- os = os->next)
- {
- asection *output_section;
- bfd_boolean exclude;
-
- if (os->constraint == -1)
- continue;
-
- output_section = os->bfd_section;
- if (output_section == NULL)
- continue;
-
- exclude = (output_section->rawsize == 0
- && (output_section->flags & SEC_KEEP) == 0
- && !bfd_section_removed_from_list (output_bfd,
- output_section));
-
- /* Some sections have not yet been sized, notably .gnu.version,
- .dynsym, .dynstr and .hash. These all have SEC_LINKER_CREATED
- input sections, so don't drop output sections that have such
- input sections unless they are also marked SEC_EXCLUDE. */
- if (exclude && output_section->map_head.s != NULL)
- {
- asection *s;
-
- for (s = output_section->map_head.s; s != NULL; s = s->map_head.s)
- if ((s->flags & SEC_LINKER_CREATED) != 0
- && (s->flags & SEC_EXCLUDE) == 0)
- {
- exclude = FALSE;
- break;
- }
- }
-
- /* TODO: Don't just junk map_head.s, turn them into link_orders. */
- output_section->map_head.link_order = NULL;
- output_section->map_tail.link_order = NULL;
-
- if (exclude)
- {
- /* We don't set bfd_section to NULL since bfd_section of the
- removed output section statement may still be used. */
- if (!os->section_relative_symbol)
- os->ignored = TRUE;
- output_section->flags |= SEC_EXCLUDE;
- bfd_section_list_remove (output_bfd, output_section);
- output_bfd->section_count--;
- }
- }
-
- /* Stop future calls to lang_add_section from messing with map_head
- and map_tail link_order fields. */
- stripped_excluded_sections = TRUE;
-}
-
-static void
-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->size);
-
- if (section->vma != section->lma)
- minfo (_(" load address 0x%V"), section->lma);
- }
-
- print_nl ();
- }
-
- print_statement_list (output_section_statement->children.head,
- output_section_statement);
-}
-
-/* Scan for the use of the destination in the right hand side
- of an expression. In such cases we will not compute the
- correct expression, since the value of DST that is used on
- the right hand side will be its final value, not its value
- just before this expression is evaluated. */
-
-static bfd_boolean
-scan_for_self_assignment (const char * dst, etree_type * rhs)
-{
- if (rhs == NULL || dst == NULL)
- return FALSE;
-
- switch (rhs->type.node_class)
- {
- case etree_binary:
- return scan_for_self_assignment (dst, rhs->binary.lhs)
- || scan_for_self_assignment (dst, rhs->binary.rhs);
-
- case etree_trinary:
- return scan_for_self_assignment (dst, rhs->trinary.lhs)
- || scan_for_self_assignment (dst, rhs->trinary.rhs);
-
- case etree_assign:
- case etree_provided:
- case etree_provide:
- if (strcmp (dst, rhs->assign.dst) == 0)
- return TRUE;
- return scan_for_self_assignment (dst, rhs->assign.src);
-
- case etree_unary:
- return scan_for_self_assignment (dst, rhs->unary.child);
-
- case etree_value:
- if (rhs->value.str)
- return strcmp (dst, rhs->value.str) == 0;
- return FALSE;
-
- case etree_name:
- if (rhs->name.name)
- return strcmp (dst, rhs->name.name) == 0;
- return FALSE;
-
- default:
- break;
- }
-
- return FALSE;
-}
-
-
-static void
-print_assignment (lang_assignment_statement_type *assignment,
- lang_output_section_statement_type *output_section)
-{
- unsigned int i;
- bfd_boolean is_dot;
- bfd_boolean computation_is_valid = TRUE;
- etree_type *tree;
-
- for (i = 0; i < SECTION_NAME_MAP_LENGTH; i++)
- print_space ();
-
- if (assignment->exp->type.node_class == etree_assert)
- {
- is_dot = FALSE;
- tree = assignment->exp->assert_s.child;
- computation_is_valid = TRUE;
- }
- else
- {
- const char *dst = assignment->exp->assign.dst;
-
- is_dot = (dst[0] == '.' && dst[1] == 0);
- tree = assignment->exp->assign.src;
- computation_is_valid = is_dot || (scan_for_self_assignment (dst, tree) == FALSE);
- }
-
- exp_fold_tree (tree, output_section->bfd_section, &print_dot);
- if (expld.result.valid_p)
- {
- bfd_vma value;
-
- if (computation_is_valid)
- {
- value = expld.result.value;
-
- if (expld.result.section)
- value += expld.result.section->vma;
-
- minfo ("0x%V", value);
- if (is_dot)
- print_dot = value;
- }
- else
- {
- struct bfd_link_hash_entry *h;
-
- h = bfd_link_hash_lookup (link_info.hash, assignment->exp->assign.dst,
- FALSE, FALSE, TRUE);
- if (h)
- {
- value = h->u.def.value;
-
- if (expld.result.section)
- value += expld.result.section->vma;
-
- minfo ("[0x%V]", value);
- }
- else
- minfo ("[unresolved]");
- }
- }
- 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, or by print_all_symbols. */
-
-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;
-}
-
-static void
-print_all_symbols (asection *sec)
-{
- struct fat_user_section_struct *ud = get_userdata (sec);
- struct map_symbol_def *def;
-
- if (!ud)
- return;
-
- *ud->map_symbol_def_tail = 0;
- for (def = ud->map_symbol_def_head; def; def = def->next)
- print_one_symbol (def->entry, sec);
-}
-
-/* Print information about an input section to the map file. */
-
-static void
-print_input_section (asection *i)
-{
- bfd_size_type size = i->size;
- int len;
- bfd_vma addr;
-
- init_opb ();
-
- print_space ();
- minfo ("%s", i->name);
-
- len = 1 + strlen (i->name);
- if (len >= SECTION_NAME_MAP_LENGTH - 1)
- {
- print_nl ();
- len = 0;
- }
- while (len < SECTION_NAME_MAP_LENGTH)
- {
- print_space ();
- ++len;
- }
-
- if (i->output_section != NULL && i->output_section->owner == output_bfd)
- addr = i->output_section->vma + i->output_offset;
- else
- {
- addr = print_dot;
- size = 0;
- }
-
- minfo ("0x%V %W %B\n", addr, TO_ADDR (size), i->owner);
-
- if (size != i->rawsize && i->rawsize != 0)
- {
- 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->rawsize);
- }
-
- if (i->output_section != NULL && i->output_section->owner == output_bfd)
- {
- if (link_info.reduce_memory_overheads)
- bfd_link_hash_traverse (link_info.hash, print_one_symbol, i);
- else
- print_all_symbols (i);
-
- print_dot = addr + 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_offset;
- 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_offset;
- 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, (bfd_vma) 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.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 = NULL;
-
- if (ptr != &statement_list.head)
- pad = ((lang_statement_union_type *)
- ((char *) ptr - offsetof (lang_statement_union_type, header.next)));
- if (pad != NULL
- && pad->header.type == lang_padding_statement_enum
- && pad->padding_statement.output_section == output_section)
- {
- /* Use the existing pad statement. */
- }
- else if ((pad = *ptr) != NULL
- && pad->header.type == lang_padding_statement_enum
- && pad->padding_statement.output_section == output_section)
- {
- /* Use the existing pad statement. */
- }
- else
- {
- /* 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->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 (!((lang_input_statement_type *) i->owner->usrdata)->just_syms_flag
- && (i->flags & SEC_EXCLUDE) == 0)
- {
- 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. */
- dot += TO_ADDR (i->size);
- o->size = TO_SIZE (dot - o->vma);
- }
- else
- {
- i->output_offset = i->vma - output_section_statement->bfd_section->vma;
- }
-
- return dot;
-}
-
-static int
-sort_sections_by_lma (const void *arg1, const void *arg2)
-{
- const asection *sec1 = *(const asection **) arg1;
- const asection *sec2 = *(const asection **) arg2;
-
- if (bfd_section_lma (sec1->owner, sec1)
- < bfd_section_lma (sec2->owner, sec2))
- return -1;
- else if (bfd_section_lma (sec1->owner, sec1)
- > bfd_section_lma (sec2->owner, sec2))
- return 1;
-
- return 0;
-}
-
-#define IGNORE_SECTION(s) \
- ((s->flags & SEC_NEVER_LOAD) != 0 \
- || (s->flags & SEC_ALLOC) == 0 \
- || ((s->flags & SEC_THREAD_LOCAL) != 0 \
- && (s->flags & SEC_LOAD) == 0))
-
-/* Check to see if any allocated sections overlap with other allocated
- sections. This can happen if a linker script specifies the output
- section addresses of the two sections. */
-
-static void
-lang_check_section_addresses (void)
-{
- asection *s, *os;
- asection **sections, **spp;
- unsigned int count;
- bfd_vma s_start;
- bfd_vma s_end;
- bfd_vma os_start;
- bfd_vma os_end;
- bfd_size_type amt;
-
- if (bfd_count_sections (output_bfd) <= 1)
- return;
-
- amt = bfd_count_sections (output_bfd) * sizeof (asection *);
- sections = xmalloc (amt);
-
- /* Scan all sections in the output list. */
- count = 0;
- for (s = output_bfd->sections; s != NULL; s = s->next)
- {
- /* Only consider loadable sections with real contents. */
- if (IGNORE_SECTION (s) || s->size == 0)
- continue;
-
- sections[count] = s;
- count++;
- }
-
- if (count <= 1)
- return;
-
- qsort (sections, (size_t) count, sizeof (asection *),
- sort_sections_by_lma);
-
- spp = sections;
- s = *spp++;
- s_start = bfd_section_lma (output_bfd, s);
- s_end = s_start + TO_ADDR (s->size) - 1;
- for (count--; count; count--)
- {
- /* We must check the sections' LMA addresses not their VMA
- addresses because overlay sections can have overlapping VMAs
- but they must have distinct LMAs. */
- os = s;
- os_start = s_start;
- os_end = s_end;
- s = *spp++;
- s_start = bfd_section_lma (output_bfd, s);
- s_end = s_start + TO_ADDR (s->size) - 1;
-
- /* Look for an overlap. */
- if (s_end >= os_start && s_start <= os_end)
- einfo (_("%X%P: section %s [%V -> %V] overlaps section %s [%V -> %V]\n"),
- s->name, s_start, s_end, os->name, os_start, os_end);
- }
-
- free (sections);
-}
-
-/* Make sure the new address is within the region. We explicitly permit the
- 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 newdot, after;
- lang_output_section_statement_type *os;
- lang_memory_region_type *r;
-
- os = &s->output_section_statement;
- if (os->addr_tree != NULL)
- {
- os->processed_vma = FALSE;
- exp_fold_tree (os->addr_tree, bfd_abs_section_ptr, &dot);
-
- if (!expld.result.valid_p
- && expld.phase != lang_mark_phase_enum)
- einfo (_("%F%S: non constant or forward reference"
- " address expression for section %s\n"),
- os->name);
-
- dot = expld.result.value + expld.result.section->vma;
- }
-
- if (os->bfd_section == NULL)
- /* This section was removed or never actually created. */
- break;
-
- /* If this is a COFF shared library section, use the size and
- address from the input section. FIXME: This is COFF
- specific; it would be cleaner if there were some other way
- to do this, but nothing simple comes to mind. */
- if ((bfd_get_flavour (output_bfd) == bfd_target_ecoff_flavour
- || bfd_get_flavour (output_bfd) == bfd_target_coff_flavour)
- && (os->bfd_section->flags & SEC_COFF_SHARED_LIBRARY) != 0)
- {
- asection *input;
-
- if (os->children.head == NULL
- || os->children.head->header.next != NULL
- || (os->children.head->header.type
- != lang_input_section_enum))
- einfo (_("%P%X: Internal error on COFF shared library"
- " section %s\n"), os->name);
-
- input = os->children.head->input_section.section;
- (void) bfd_set_section_vma (os->bfd_section->owner,
- os->bfd_section,
- bfd_section_vma (input->owner,
- input));
- os->bfd_section->size = input->size;
- break;
- }
-
- newdot = dot;
- if (bfd_is_abs_section (os->bfd_section))
- {
- /* No matter what happens, an abs section starts at zero. */
- ASSERT (os->bfd_section->vma == 0);
- }
- else
- {
- int align;
-
- if (os->addr_tree == NULL)
- {
- /* No address specified for this section, get one
- from the region specification. */
- if (os->region == NULL
- || ((os->bfd_section->flags & (SEC_ALLOC | SEC_LOAD))
- && 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 (!os->ignored
- && !IGNORE_SECTION (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)
- && expld.phase != lang_mark_phase_enum)
- {
- /* By default this is an error rather than just a
- warning because if we allocate the section to the
- default memory region we can end up creating an
- excessively large binary, or even seg faulting when
- attempting to perform a negative seek. See
- 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));
- }
-
- newdot = os->region->current;
- align = os->bfd_section->alignment_power;
- }
- else
- align = os->section_alignment;
-
- /* Align to what the section needs. */
- if (align > 0)
- {
- bfd_vma savedot = newdot;
- newdot = align_power (newdot, align);
-
- if (newdot != savedot
- && (config.warn_section_align
- || os->addr_tree != NULL)
- && expld.phase != lang_mark_phase_enum)
- einfo (_("%P: warning: changing start of section"
- " %s by %lu bytes\n"),
- os->name, (unsigned long) (newdot - savedot));
- }
-
- (void) bfd_set_section_vma (0, os->bfd_section, newdot);
-
- os->bfd_section->output_offset = 0;
- }
-
- lang_size_sections_1 (os->children.head, os, &os->children.head,
- os->fill, newdot, relax, check_regions);
-
- os->processed_vma = TRUE;
-
- if (bfd_is_abs_section (os->bfd_section) || os->ignored)
- /* Except for some special linker created sections,
- no output section should change from zero size
- after strip_excluded_output_sections. A non-zero
- size on an ignored section indicates that some
- input section was not sized early enough. */
- ASSERT (os->bfd_section->size == 0);
- else
- {
- dot = os->bfd_section->vma;
-
- /* Put the section within the requested block size, or
- align at the block boundary. */
- after = ((dot
- + TO_ADDR (os->bfd_section->size)
- + os->block_value - 1)
- & - (bfd_vma) os->block_value);
-
- os->bfd_section->size = TO_SIZE (after - os->bfd_section->vma);
- }
-
- /* Set section lma. */
- r = os->region;
- if (r == NULL)
- r = lang_memory_region_lookup (DEFAULT_MEMORY_REGION, FALSE);
-
- if (os->load_base)
- {
- bfd_vma lma = exp_get_abs_int (os->load_base, 0, "load base");
- os->bfd_section->lma = lma;
- }
- else if (os->region != NULL
- && os->lma_region != NULL
- && os->lma_region != os->region)
- {
- bfd_vma lma = os->lma_region->current;
-
- if (os->section_alignment != -1)
- lma = align_power (lma, os->section_alignment);
- os->bfd_section->lma = lma;
- }
- else if (r->last_os != NULL
- && (os->bfd_section->flags & SEC_ALLOC) != 0)
- {
- bfd_vma lma;
- asection *last;
-
- last = r->last_os->output_section_statement.bfd_section;
-
- /* A backwards move of dot should be accompanied by
- an explicit assignment to the section LMA (ie.
- os->load_base set) because backwards moves can
- create overlapping LMAs. */
- if (dot < last->vma
- && os->bfd_section->size != 0
- && dot + os->bfd_section->size <= last->vma)
- {
- /* If dot moved backwards then leave lma equal to
- vma. This is the old default lma, which might
- just happen to work when the backwards move is
- sufficiently large. Nag if this changes anything,
- so people can fix their linker scripts. */
-
- if (last->vma != last->lma)
- einfo (_("%P: warning: dot moved backwards before `%s'\n"),
- os->name);
- }
- else
- {
- /* If this is an overlay, set the current lma to that
- at the end of the previous section. */
- if (os->sectype == overlay_section)
- lma = last->lma + last->size;
-
- /* Otherwise, keep the same lma to vma relationship
- as the previous section. */
- else
- lma = dot + last->lma - last->vma;
-
- if (os->section_alignment != -1)
- lma = align_power (lma, os->section_alignment);
- os->bfd_section->lma = lma;
- }
- }
- os->processed_lma = TRUE;
-
- if (bfd_is_abs_section (os->bfd_section) || os->ignored)
- break;
-
- /* Keep track of normal sections using the default
- lma region. We use this to set the lma for
- following sections. Overlays or other linker
- script assignment to lma might mean that the
- default lma == vma is incorrect.
- To avoid warnings about dot moving backwards when using
- -Ttext, don't start tracking sections until we find one
- of non-zero size or with lma set differently to vma. */
- if (((os->bfd_section->flags & SEC_HAS_CONTENTS) != 0
- || (os->bfd_section->flags & SEC_THREAD_LOCAL) == 0)
- && (os->bfd_section->flags & SEC_ALLOC) != 0
- && (os->bfd_section->size != 0
- || (r->last_os == NULL
- && os->bfd_section->vma != os->bfd_section->lma)
- || (r->last_os != NULL
- && dot >= (r->last_os->output_section_statement
- .bfd_section->vma)))
- && os->lma_region == NULL
- && !link_info.relocatable)
- r->last_os = s;
-
- /* .tbss sections effectively have zero size. */
- if ((os->bfd_section->flags & SEC_HAS_CONTENTS) != 0
- || (os->bfd_section->flags & SEC_THREAD_LOCAL) == 0
- || link_info.relocatable)
- dot += TO_ADDR (os->bfd_section->size);
-
- if (os->update_dot_tree != 0)
- exp_fold_tree (os->update_dot_tree, bfd_abs_section_ptr, &dot);
-
- /* Update dot in the region ?
- We only do this if the section is going to be allocated,
- 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
- && ((os->bfd_section->flags & SEC_NEVER_LOAD) == 0
- || (os->bfd_section->flags & (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 (os->lma_region != NULL && os->lma_region != os->region)
- {
- os->lma_region->current
- = os->bfd_section->lma + TO_ADDR (os->bfd_section->size);
-
- if (check_regions)
- os_region_check (os, os->lma_region, NULL,
- os->bfd_section->lma);
- }
- }
- }
- 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_offset =
- dot - output_section_statement->bfd_section->vma;
- s->data_statement.output_section =
- output_section_statement->bfd_section;
-
- /* We might refer to provided symbols in the expression, and
- need to mark them as needed. */
- exp_fold_tree (s->data_statement.exp, bfd_abs_section_ptr, &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->size += size;
- }
- break;
-
- case lang_reloc_statement_enum:
- {
- int size;
-
- s->reloc_statement.output_offset =
- dot - output_section_statement->bfd_section->vma;
- s->reloc_statement.output_section =
- output_section_statement->bfd_section;
- size = bfd_get_reloc_size (s->reloc_statement.howto);
- dot += TO_ADDR (size);
- output_section_statement->bfd_section->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)
- {
- 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;
- etree_type *tree = s->assignment_statement.exp;
-
- exp_fold_tree (tree,
- output_section_statement->bfd_section,
- &newdot);
-
- /* This symbol is relative to this section. */
- if ((tree->type.node_class == etree_provided
- || tree->type.node_class == etree_assign)
- && (tree->assign.dst [0] != '.'
- || tree->assign.dst [1] != '\0'))
- output_section_statement->section_relative_symbol = 1;
-
- if (!output_section_statement->ignored)
- {
- if (output_section_statement == abs_output_section)
- {
- /* If we don't have an output section, then just adjust
- the default memory address. */
- lang_memory_region_lookup (DEFAULT_MEMORY_REGION,
- FALSE)->current = newdot;
- }
- else if (newdot != dot)
- {
- /* 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;
-}
-
-/* Callback routine that is used in _bfd_elf_map_sections_to_segments.
- The BFD library has set NEW_SEGMENT to TRUE iff it thinks that
- CURRENT_SECTION and PREVIOUS_SECTION ought to be placed into different
- segments. We are allowed an opportunity to override this decision. */
-
-bfd_boolean
-ldlang_override_segment_assignment (struct bfd_link_info * info ATTRIBUTE_UNUSED,
- bfd * abfd ATTRIBUTE_UNUSED,
- asection * current_section,
- asection * previous_section,
- bfd_boolean new_segment)
-{
- lang_output_section_statement_type * cur;
- lang_output_section_statement_type * prev;
-
- /* The checks below are only necessary when the BFD library has decided
- that the two sections ought to be placed into the same segment. */
- if (new_segment)
- return TRUE;
-
- /* Paranoia checks. */
- if (current_section == NULL || previous_section == NULL)
- return new_segment;
-
- /* Find the memory regions associated with the two sections.
- We call lang_output_section_find() here rather than scanning the list
- of output sections looking for a matching section pointer because if
- we have a large number of sections then a hash lookup is faster. */
- cur = lang_output_section_find (current_section->name);
- prev = lang_output_section_find (previous_section->name);
-
- /* More paranoia. */
- if (cur == NULL || prev == NULL)
- return new_segment;
-
- /* If the regions are different then force the sections to live in
- different segments. See the email thread starting at the following
- URL for the reasons why this is necessary:
- http://sourceware.org/ml/binutils/2007-02/msg00216.html */
- return cur->region != prev->region;
-}
-
-void
-one_lang_size_sections_pass (bfd_boolean *relax, bfd_boolean check_regions)
-{
- lang_statement_iteration++;
- lang_size_sections_1 (statement_list.head, abs_output_section,
- &statement_list.head, 0, 0, relax, check_regions);
-}
-
-void
-lang_size_sections (bfd_boolean *relax, bfd_boolean check_regions)
-{
- expld.phase = lang_allocating_phase_enum;
- expld.dataseg.phase = exp_dataseg_none;
-
- one_lang_size_sections_pass (relax, check_regions);
- if (expld.dataseg.phase == exp_dataseg_end_seen
- && link_info.relro && expld.dataseg.relro_end)
- {
- /* If DATA_SEGMENT_ALIGN DATA_SEGMENT_RELRO_END pair was seen, try
- to put expld.dataseg.relro on a (common) page boundary. */
- bfd_vma old_min_base, relro_end, maxpage;
-
- expld.dataseg.phase = exp_dataseg_relro_adjust;
- old_min_base = expld.dataseg.min_base;
- maxpage = expld.dataseg.maxpagesize;
- expld.dataseg.base += (-expld.dataseg.relro_end
- & (expld.dataseg.pagesize - 1));
- /* Compute the expected PT_GNU_RELRO segment end. */
- relro_end = (expld.dataseg.relro_end + expld.dataseg.pagesize - 1)
- & ~(expld.dataseg.pagesize - 1);
- if (old_min_base + maxpage < expld.dataseg.base)
- {
- expld.dataseg.base -= maxpage;
- relro_end -= maxpage;
- }
- lang_reset_memory_regions ();
- one_lang_size_sections_pass (relax, check_regions);
- if (expld.dataseg.relro_end > relro_end)
- {
- /* The alignment of sections between DATA_SEGMENT_ALIGN
- and DATA_SEGMENT_RELRO_END caused huge padding to be
- inserted at DATA_SEGMENT_RELRO_END. Try some other base. */
- asection *sec;
- unsigned int max_alignment_power = 0;
-
- /* Find maximum alignment power of sections between
- DATA_SEGMENT_ALIGN and DATA_SEGMENT_RELRO_END. */
- for (sec = output_bfd->sections; sec; sec = sec->next)
- if (sec->vma >= expld.dataseg.base
- && sec->vma < expld.dataseg.relro_end
- && sec->alignment_power > max_alignment_power)
- max_alignment_power = sec->alignment_power;
-
- if (((bfd_vma) 1 << max_alignment_power) < expld.dataseg.pagesize)
- {
- if (expld.dataseg.base - (1 << max_alignment_power)
- < old_min_base)
- expld.dataseg.base += expld.dataseg.pagesize;
- expld.dataseg.base -= (1 << max_alignment_power);
- lang_reset_memory_regions ();
- one_lang_size_sections_pass (relax, check_regions);
- }
- }
- link_info.relro_start = expld.dataseg.base;
- link_info.relro_end = expld.dataseg.relro_end;
- }
- else if (expld.dataseg.phase == exp_dataseg_end_seen)
- {
- /* If DATA_SEGMENT_ALIGN DATA_SEGMENT_END pair was seen, check whether
- a page could be saved in the data segment. */
- bfd_vma first, last;
-
- first = -expld.dataseg.base & (expld.dataseg.pagesize - 1);
- last = expld.dataseg.end & (expld.dataseg.pagesize - 1);
- if (first && last
- && ((expld.dataseg.base & ~(expld.dataseg.pagesize - 1))
- != (expld.dataseg.end & ~(expld.dataseg.pagesize - 1)))
- && first + last <= expld.dataseg.pagesize)
- {
- expld.dataseg.phase = exp_dataseg_adjust;
- lang_reset_memory_regions ();
- one_lang_size_sections_pass (relax, check_regions);
- }
- }
-
- expld.phase = lang_final_phase_enum;
-}
-
-/* Worker function for lang_do_assignments. Recursiveness goes here. */
-
-static bfd_vma
-lang_do_assignments_1 (lang_statement_union_type *s,
- lang_output_section_statement_type *current_os,
- 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,
- current_os, 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 && !os->ignored)
- {
- dot = os->bfd_section->vma;
-
- lang_do_assignments_1 (os->children.head, os, os->fill, dot);
-
- /* .tbss sections effectively have zero size. */
- if ((os->bfd_section->flags & SEC_HAS_CONTENTS) != 0
- || (os->bfd_section->flags & SEC_THREAD_LOCAL) == 0
- || link_info.relocatable)
- dot += TO_ADDR (os->bfd_section->size);
- }
- }
- break;
-
- case lang_wild_statement_enum:
-
- dot = lang_do_assignments_1 (s->wild_statement.children.head,
- current_os, fill, dot);
- break;
-
- case lang_object_symbols_statement_enum:
- case lang_output_statement_enum:
- case lang_target_statement_enum:
- break;
-
- case lang_data_statement_enum:
- exp_fold_tree (s->data_statement.exp, bfd_abs_section_ptr, &dot);
- if (expld.result.valid_p)
- s->data_statement.value = (expld.result.value
- + expld.result.section->vma);
- else
- einfo (_("%F%P: invalid data statement\n"));
- {
- unsigned int size;
- switch (s->data_statement.type)
- {
- 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:
- exp_fold_tree (s->reloc_statement.addend_exp,
- bfd_abs_section_ptr, &dot);
- if (expld.result.valid_p)
- s->reloc_statement.addend_value = expld.result.value;
- else
- einfo (_("%F%P: invalid reloc statement\n"));
- dot += TO_ADDR (bfd_get_reloc_size (s->reloc_statement.howto));
- break;
-
- case lang_input_section_enum:
- {
- asection *in = s->input_section.section;
-
- if ((in->flags & SEC_EXCLUDE) == 0)
- dot += TO_ADDR (in->size);
- }
- break;
-
- case lang_input_statement_enum:
- break;
-
- case lang_fill_statement_enum:
- fill = s->fill_statement.fill;
- break;
-
- case lang_assignment_statement_enum:
- exp_fold_tree (s->assignment_statement.exp,
- current_os->bfd_section,
- &dot);
- break;
-
- case lang_padding_statement_enum:
- dot += TO_ADDR (s->padding_statement.size);
- break;
-
- case lang_group_statement_enum:
- dot = lang_do_assignments_1 (s->group_statement.children.head,
- current_os, fill, dot);
- break;
-
- default:
- FAIL ();
- break;
-
- case lang_address_statement_enum:
- break;
- }
- }
- return dot;
-}
-
-void
-lang_do_assignments (void)
-{
- lang_statement_iteration++;
- lang_do_assignments_1 (statement_list.head, abs_output_section, NULL, 0);
-}
-
-/* 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;
- h->u.def.value = TO_ADDR (s->size);
- h->u.def.section = bfd_abs_section_ptr;
- }
-
- free (buf);
- }
-}
-
-static void
-lang_end (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 the default entry, but
- don't warn if we don't find it. */
- entry_symbol.name = entry_symbol_default;
- 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);
- }
- }
- }
-
- /* Don't bfd_hash_table_free (&lang_definedness_table);
- map file output may result in a call of lang_track_definedness. */
-}
-
-/* This is a small function used when we want to ignore errors from
- 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%X: %s architecture of input file `%B'"
- " is incompatible with %s output\n"),
- bfd_printable_name (input_bfd), input_bfd,
- bfd_printable_name (output_bfd));
- }
- 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->size += ((bfd_vma) 1 << (power_of_two + opb_shift)) - 1;
- section->size &= (- (bfd_vma) 1 << (power_of_two + opb_shift));
-
- /* Adjust the alignment if necessary. */
- if (power_of_two > section->alignment_power)
- 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->size;
-
- /* Increase the size of the section. */
- section->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 = bfd_demangle (output_bfd, h->root.string,
- DMGL_ANSI | DMGL_PARAMS);
- if (name == NULL)
- {
- minfo ("%s", h->root.string);
- len = strlen (h->root.string);
- }
- else
- {
- minfo ("%s", name);
- len = strlen (name);
- free (name);
- }
-
- if (len >= 19)
- {
- 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)
- bfd_link_just_syms (file->the_bfd, s, &link_info);
- else if ((s->flags & SEC_EXCLUDE) != 0)
- s->output_section = bfd_abs_section_ptr;
- else if (strcmp (s->name, "COMMON") == 0)
- {
- /* This is a lonely common section which must have
- 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)
- {
- default_common_section =
- lang_output_section_statement_lookup (".bss");
-
- }
- lang_add_section (&default_common_section->children, s,
- default_common_section);
- }
- }
- else if (ldemul_place_orphan (s))
- ;
- else
- {
- lang_output_section_statement_type *os;
-
- os = lang_output_section_statement_lookup (s->name);
- lang_add_section (&os->children, s, os);
- }
- }
- }
- }
-}
-
-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)
-{
- 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);
-
- *link_info.input_bfds_tail = entry->the_bfd;
- link_info.input_bfds_tail = &entry->the_bfd->link_next;
- entry->the_bfd->usrdata = entry;
- bfd_set_gp_size (entry->the_bfd, g_switch_value);
-
- /* 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,
- int constraint)
-{
- lang_output_section_statement_type *os;
-
- os = lang_output_section_statement_lookup_1 (output_section_statement_name,
- constraint);
- current_section = os;
-
- /* 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"));
- os->section_alignment =
- topower (exp_get_value_int (align, -1, "section alignment"));
-
- os->load_base = ebase;
- return os;
-}
-
-void
-lang_final (void)
-{
- lang_output_statement_type *new;
-
- 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;
- lang_output_section_statement_type *os;
-
- for (p = lang_memory_region_list; p != NULL; p = p->next)
- {
- p->current = p->origin;
- p->last_os = NULL;
- }
-
- for (os = &lang_output_section_statement.head->output_section_statement;
- os != NULL;
- os = os->next)
- {
- os->processed_vma = FALSE;
- os->processed_lma = FALSE;
- }
-
- for (o = output_bfd->sections; o != NULL; o = o->next)
- {
- /* Save the last size for possible use by bfd_relax_section. */
- o->rawsize = o->size;
- o->size = 0;
- }
-}
-
-/* Worker for lang_gc_sections_1. */
-
-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 the wild pattern was marked KEEP, the member sections
- should be as well. */
- if (ptr->keep_sections)
- section->flags |= SEC_KEEP;
-}
-
-/* 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:
- walk_wild (&s->wild_statement, gc_section_callback, NULL);
- 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;
- }
- }
-
- /* SEC_EXCLUDE is ignored when doing a relocatable link, except in
- the special case of debug info. (See bfd/stabs.c)
- Twiddle the flag here, to simplify later linker code. */
- if (link_info.relocatable)
- {
- LANG_FOR_EACH_INPUT_STATEMENT (f)
- {
- asection *sec;
- for (sec = f->the_bfd->sections; sec != NULL; sec = sec->next)
- if ((sec->flags & SEC_DEBUGGING) == 0)
- sec->flags &= ~SEC_EXCLUDE;
- }
- }
-
- if (link_info.gc_sections)
- bfd_gc_sections (output_bfd, &link_info);
-}
-
-/* Relax all sections until bfd_relax_section gives up. */
-
-static void
-relax_sections (void)
-{
- /* Keep relaxing until bfd_relax_section gives up. */
- bfd_boolean relax_again;
-
- link_info.relax_trip = -1;
- do
- {
- relax_again = FALSE;
- link_info.relax_trip++;
-
- /* Note: pe-dll.c does something like this also. If you find
- you need to change this code, you probably need to change
- pe-dll.c also. DJ */
-
- /* Do all the assignments with our current guesses as to
- section sizes. */
- lang_do_assignments ();
-
- /* We must do this after lang_do_assignments, because it uses
- size. */
- lang_reset_memory_regions ();
-
- /* Perform another relax pass - this time we know where the
- globals are, so can make a better guess. */
- lang_size_sections (&relax_again, FALSE);
- }
- while (relax_again);
-}
-
-void
-lang_process (void)
-{
- /* Finalize dynamic list. */
- if (link_info.dynamic_list)
- lang_finalize_version_expr_head (&link_info.dynamic_list->head);
-
- current_target = default_target;
-
- /* Open the output file. */
- 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 ();
-
- if (!bfd_section_already_linked_table_init ())
- einfo (_("%P%F: Failed to create hash table\n"));
-
- /* Create a bfd for each input file. */
- current_target = default_target;
- 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 ();
-
- bfd_section_already_linked_table_free ();
-
- /* Make sure that we're not mixing architectures. We call this
- after all the input files have been opened, but before we do any
- 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. */
- lang_gc_sections ();
-
- /* Size up the common data. */
- lang_common ();
-
- /* Update wild statements. */
- update_wild_statements (statement_list.head);
-
- /* Run through the contours of the script and attach input sections
- to the correct output sections. */
- map_input_to_output_sections (statement_list.head, NULL, NULL);
-
- /* Find any sections not attached explicitly and handle them. */
- lang_place_orphans ();
-
- if (! link_info.relocatable)
- {
- asection *found;
-
- /* Merge SEC_MERGE sections. This has to be done after GC of
- sections, so that GCed sections are not merged, but before
- assigning dynamic symbols, since removing whole input sections
- is hard then. */
- bfd_merge_sections (output_bfd, &link_info);
-
- /* Look for a text section and set the readonly attribute in it. */
- 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 ();
-
- /* 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 (NULL, !command_line.relax);
-
- /* Now run around and relax if we can. */
- if (command_line.relax)
- {
- /* We may need more than one relaxation pass. */
- int i = link_info.relax_pass;
-
- /* The backend can use it to determine the current pass. */
- link_info.relax_pass = 0;
-
- while (i--)
- {
- relax_sections ();
- link_info.relax_pass++;
- }
-
- /* Final extra sizing to report errors. */
- lang_do_assignments ();
- lang_reset_memory_regions ();
- lang_size_sections (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 ();
-
- ldemul_finish ();
-
- /* Make sure that the section addresses make sense. */
- if (! link_info.relocatable
- && command_line.check_section_addresses)
- lang_check_section_addresses ();
-
- lang_end ();
-}
-
-/* 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 == by_name;
- }
- new->section_list = section_list;
- new->keep_sections = keep_sections;
- lang_list_init (&new->children);
- analyze_walk_wild_section_handler (new);
-}
-
-void
-lang_section_start (const char *name, etree_type *address,
- const segment_type *segment)
-{
- lang_address_statement_type *ad;
-
- ad = new_stat (lang_address_statement, stat_ptr);
- ad->section_name = name;
- ad->address = address;
- ad->segment = segment;
-}
-
-/* Set the start symbol to NAME. CMDLINE is nonzero if this is called
- 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;
- }
-}
-
-/* Set the default start symbol to NAME. .em files should use this,
- not lang_add_entry, to override the use of "start" if neither the
- linker script nor the command line specifies an entry point. NAME
- must be permanently allocated. */
-void
-lang_default_entry (const char *name)
-{
- entry_symbol_default = name;
-}
-
-void
-lang_add_target (const char *name)
-{
- lang_target_statement_type *new;
-
- new = 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 = 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 = 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_offset = 0;
-}
-
-lang_assignment_statement_type *
-lang_add_assignment (etree_type *exp)
-{
- lang_assignment_statement_type *new;
-
- 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_header_type), stat_ptr);
-}
-
-void
-lang_startup (const char *name)
-{
- if (startup_file != NULL)
- {
- einfo (_("%P%F: multiple 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 (sec->size));
-
- 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");
- 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_output_section_statement_type *os;
-
- alc = 10;
- secs = xmalloc (alc * sizeof (asection *));
- last = NULL;
-
- for (l = lang_phdr_list; l != NULL; l = l->next)
- {
- unsigned int c;
- flagword flags;
- bfd_vma at;
-
- c = 0;
- for (os = &lang_output_section_statement.head->output_section_statement;
- os != NULL;
- os = os->next)
- {
- lang_output_section_phdr_list *pl;
-
- if (os->constraint == -1)
- continue;
-
- 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;
-
- if (last)
- pl = last;
- else
- {
- lang_output_section_statement_type * tmp_os;
-
- /* If we have not run across a section with a program
- header assigned to it yet, then scan forwards to find
- one. This prevents inconsistencies in the linker's
- behaviour when a script has specified just a single
- header and there are sections in that script which are
- not assigned to it, and which occur before the first
- use of that header. See here for more details:
- http://sourceware.org/ml/binutils/2007-02/msg00291.html */
- for (tmp_os = os; tmp_os; tmp_os = tmp_os->next)
- if (tmp_os->phdrs)
- break;
- pl = tmp_os->phdrs;
- }
- }
-
- if (os->bfd_section == NULL)
- 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");
-
- if (l->at == NULL)
- at = 0;
- else
- at = exp_get_vma (l->at, 0, "phdr load address");
-
- if (! bfd_record_phdr (output_bfd, l->type,
- l->flags != NULL, flags, l->at != NULL,
- 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 (os = &lang_output_section_statement.head->output_section_statement;
- os != NULL;
- os = os->next)
- {
- lang_output_section_phdr_list *pl;
-
- if (os->constraint == -1
- || os->bfd_section == NULL)
- continue;
-
- for (pl = os->phdrs;
- pl != NULL;
- pl = pl->next)
- if (! pl->used && strcmp (pl->name, "NONE") != 0)
- einfo (_("%X%P: section `%s' assigned to non-existent phdr `%s'\n"),
- os->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, overlay_section,
- 0, overlay_subalign, 0, 0);
-
- /* If this is the first section, then base the VMA of future
- sections on this one. This will work correctly even if `.' is
- 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_provide (buf,
- exp_nameop (LOADADDR, name),
- FALSE));
-
- buf = xmalloc (strlen (clean) + sizeof "__load_stop_");
- sprintf (buf, "__load_stop_%s", clean);
- lang_add_assignment (exp_provide (buf,
- exp_binop ('+',
- exp_nameop (LOADADDR, name),
- exp_nameop (SIZEOF, name)),
- FALSE));
-
- 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;
- l->os->sectype = normal_section;
- }
- 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;
- for (; expr; expr = expr->next)
- {
- const char *s;
-
- if (!expr->pattern)
- continue;
-
- 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;
- }
-
-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. NEW is
- the name of the symbol to match, or, if LITERAL_P is FALSE, a glob
- pattern to be matched against symbol names. */
-
-struct bfd_elf_version_expr *
-lang_new_vers_pattern (struct bfd_elf_version_expr *orig,
- const char *new,
- const char *lang,
- bfd_boolean literal_p)
-{
- struct bfd_elf_version_expr *ret;
-
- ret = xmalloc (sizeof *ret);
- ret->next = orig;
- ret->pattern = literal_p ? NULL : new;
- ret->symver = 0;
- ret->script = 0;
- ret->symbol = literal_p ? new : 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 = sec->size;
- contents = xmalloc (len);
- if (!bfd_get_section_contents (is->the_bfd, sec, contents, 0, len))
- einfo (_("%X%P: unable to read .exports section contents\n"), sec);
-
- p = contents;
- while (p < contents + len)
- {
- greg = lang_new_vers_pattern (greg, p, NULL, FALSE);
- p = strchr (p, '\0') + 1;
- }
-
- /* Do not free the contents, as we used them creating the regex. */
-
- /* Do not include this section in the link. */
- sec->flags |= SEC_EXCLUDE | SEC_KEEP;
- }
-
- lreg = lang_new_vers_pattern (NULL, "*", NULL, FALSE);
- 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;
-}
-
-/* Append the list of dynamic symbols to the existing one. */
-
-void
-lang_append_dynamic_list (struct bfd_elf_version_expr *dynamic)
-{
- if (link_info.dynamic_list)
- {
- struct bfd_elf_version_expr *tail;
- for (tail = dynamic; tail->next != NULL; tail = tail->next)
- ;
- tail->next = link_info.dynamic_list->head.list;
- link_info.dynamic_list->head.list = dynamic;
- }
- else
- {
- struct bfd_elf_dynamic_list *d;
-
- d = xcalloc (1, sizeof *d);
- d->head.list = dynamic;
- d->match = lang_vers_match;
- link_info.dynamic_list = d;
- }
-}
-
-/* Append the list of C++ typeinfo dynamic symbols to the existing
- one. */
-
-void
-lang_append_dynamic_list_cpp_typeinfo (void)
-{
- const char * symbols [] =
- {
- "typeinfo name for*",
- "typeinfo for*"
- };
- struct bfd_elf_version_expr *dynamic = NULL;
- unsigned int i;
-
- for (i = 0; i < ARRAY_SIZE (symbols); i++)
- dynamic = lang_new_vers_pattern (dynamic, symbols [i], "C++",
- FALSE);
-
- lang_append_dynamic_list (dynamic);
-}
-
-/* Append the list of C++ operator new and delete dynamic symbols to the
- existing one. */
-
-void
-lang_append_dynamic_list_cpp_new (void)
-{
- const char * symbols [] =
- {
- "operator new*",
- "operator delete*"
- };
- struct bfd_elf_version_expr *dynamic = NULL;
- unsigned int i;
-
- for (i = 0; i < ARRAY_SIZE (symbols); i++)
- dynamic = lang_new_vers_pattern (dynamic, symbols [i], "C++",
- FALSE);
-
- lang_append_dynamic_list (dynamic);
-}
diff --git a/contrib/binutils/ld/ldlang.h b/contrib/binutils/ld/ldlang.h
deleted file mode 100644
index f52f46ffbc69..000000000000
--- a/contrib/binutils/ld/ldlang.h
+++ /dev/null
@@ -1,632 +0,0 @@
-/* ldlang.h - linker command language support
- Copyright 1991, 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999, 2000,
- 2001, 2002, 2003, 2004, 2005, 2006
- Free Software Foundation, Inc.
-
- This file is part of GLD, the Gnu Linker.
-
- GLD is free software; you can redistribute it and/or modify
- it under the terms of the GNU General Public License as published by
- the Free Software Foundation; either version 2, or (at your option)
- any later version.
-
- GLD is distributed in the hope that it will be useful,
- but WITHOUT ANY WARRANTY; without even the implied warranty of
- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- GNU General Public License for more details.
-
- You should have received a copy of the GNU General Public License
- along with GLD; see the file COPYING. If not, write to the Free
- Software Foundation, 51 Franklin Street - Fifth Floor, Boston, MA
- 02110-1301, USA. */
-
-#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;
- union lang_statement_union *last_os;
- 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,
- overlay_section,
- noload_section,
- noalloc_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;
- lang_statement_list_type children;
- struct lang_output_section_statement_struct *next;
- struct lang_output_section_statement_struct *prev;
- const char *name;
- asection *bfd_section;
- lang_memory_region_type *region;
- lang_memory_region_type *lma_region;
- fill_type *fill;
- union etree_union *addr_tree;
- 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;
-
- unsigned int block_value;
- int subsection_alignment; /* Alignment of components. */
- int section_alignment; /* Alignment of start of section. */
- int constraint;
- flagword flags;
- enum section_type sectype;
- unsigned int processed_vma : 1;
- unsigned int processed_lma : 1;
- unsigned int all_input_readonly : 1;
- /* If this section should be ignored. */
- unsigned int ignored : 1;
- /* If there is a symbol relative to this section. */
- unsigned int section_relative_symbol : 1;
-} lang_output_section_statement_type;
-
-typedef struct
-{
- 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_offset;
-} 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;
-
- /* Offset within output section. */
- bfd_vma output_offset;
-} 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;
-
- 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;
-
- const char *target;
-
- unsigned int closed : 1;
- unsigned int is_archive : 1;
-
- /* 1 means search a set of directories for this file. */
- unsigned int search_dirs_flag : 1;
-
- /* 1 means this was found in a search directory marked as sysrooted,
- if search_dirs_flag is false, otherwise, that it should be
- searched in ld_sysroot before any other location, as long as it
- starts with a slash. */
- unsigned int sysrooted : 1;
-
- /* 1 means this is base file of incremental load.
- Do not load this file's text or data.
- Also default text_start to after this file's bss. */
- unsigned int just_syms_flag : 1;
-
- /* Whether to search for this entry as a dynamic archive. */
- unsigned int dynamic : 1;
-
- /* Whether DT_NEEDED tags should be added for dynamic libraries in
- DT_NEEDED tags from this entry. */
- unsigned int add_needed : 1;
-
- /* Whether this entry should cause a DT_NEEDED tag only when
- satisfying references from regular files, or always. */
- unsigned int as_needed : 1;
-
- /* Whether to include the entire contents of an archive. */
- unsigned int whole_archive : 1;
-
- unsigned int loaded : 1;
-
- unsigned int real : 1;
-} lang_input_statement_type;
-
-typedef struct
-{
- lang_statement_header_type header;
- asection *section;
-} 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_wild_statement_type;
-
-typedef void (*callback_t) (lang_wild_statement_type *, struct wildcard_list *,
- asection *, lang_input_statement_type *, void *);
-
-typedef void (*walk_wild_section_handler_t) (lang_wild_statement_type *,
- lang_input_statement_type *,
- callback_t callback,
- void *data);
-
-typedef bfd_boolean (*lang_match_sec_type_func) (bfd *, const asection *,
- bfd *, const asection *);
-
-/* Binary search tree structure to efficiently sort sections by
- name. */
-typedef struct lang_section_bst
-{
- asection *section;
- struct lang_section_bst *left;
- struct lang_section_bst *right;
-} lang_section_bst_type;
-
-struct lang_wild_statement_struct
-{
- lang_statement_header_type header;
- const char *filename;
- bfd_boolean filenames_sorted;
- struct wildcard_list *section_list;
- bfd_boolean keep_sections;
- lang_statement_list_type children;
-
- walk_wild_section_handler_t walk_wild_section_handler;
- struct wildcard_list *handler_data[4];
- lang_section_bst_type *tree;
-};
-
-typedef struct lang_address_statement_struct
-{
- lang_statement_header_type header;
- const char *section_name;
- union etree_union *address;
- const segment_type *segment;
-} lang_address_statement_type;
-
-typedef struct
-{
- 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;
-};
-
-extern struct lang_phdr *lang_phdr_list;
-
-/* 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;
-};
-
-/* Used by place_orphan to keep track of orphan sections and statements. */
-
-struct orphan_save {
- const char *name;
- flagword flags;
- lang_output_section_statement_type *os;
- asection **section;
- lang_statement_union_type **stmt;
- lang_output_section_statement_type **os_tail;
-};
-
-extern lang_output_section_statement_type *abs_output_section;
-extern lang_statement_list_type lang_output_section_statement;
-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 lang_statement_list_type input_file_chain;
-
-extern int lang_statement_iteration;
-
-extern void lang_init
- (void);
-extern void lang_finish
- (void);
-extern lang_memory_region_type *lang_memory_region_lookup
- (const char *const, bfd_boolean);
-extern lang_memory_region_type *lang_memory_region_default
- (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 *, int);
-extern void lang_final
- (void);
-extern void lang_process
- (void);
-extern void lang_section_start
- (const char *, union etree_union *, const segment_type *);
-extern void lang_add_entry
- (const char *, bfd_boolean);
-extern void lang_default_entry
- (const char *);
-extern void lang_add_target
- (const char *);
-extern void lang_add_wild
- (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
- (void);
-
-#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_output_section_statement_type *lang_output_section_find_by_flags
- (const asection *, lang_output_section_statement_type **,
- lang_match_sec_type_func);
-extern lang_output_section_statement_type *lang_insert_orphan
- (asection *, const char *, lang_output_section_statement_type *,
- struct orphan_save *, etree_type *, lang_statement_list_type *);
-extern lang_input_statement_type *lang_add_input_file
- (const char *, lang_input_file_enum_type, const char *);
-extern void lang_add_keepsyms_file
- (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 strip_excluded_output_sections
- (void);
-extern void dprint_statement
- (lang_statement_union_type *, int);
-extern void lang_size_sections
- (bfd_boolean *, bfd_boolean);
-extern void one_lang_size_sections_pass
- (bfd_boolean *, bfd_boolean);
-extern void lang_enter_group
- (void);
-extern void lang_leave_group
- (void);
-extern void lang_add_section
- (lang_statement_list_type *, asection *,
- lang_output_section_statement_type *);
-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 *, bfd_boolean);
-extern struct bfd_elf_version_tree *lang_new_vers_node
- (struct bfd_elf_version_expr *, struct bfd_elf_version_expr *);
-extern struct bfd_elf_version_deps *lang_add_vers_depend
- (struct bfd_elf_version_deps *, const char *);
-extern void lang_register_vers_node
- (const char *, struct bfd_elf_version_tree *, struct bfd_elf_version_deps *);
-extern void lang_append_dynamic_list (struct bfd_elf_version_expr *);
-extern void lang_append_dynamic_list_cpp_typeinfo (void);
-extern void lang_append_dynamic_list_cpp_new (void);
-bfd_boolean unique_section_p
- (const asection *);
-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 *);
-
-extern void add_excluded_libs (const char *);
-extern bfd_boolean load_symbols
- (lang_input_statement_type *, lang_statement_list_type *);
-
-extern bfd_boolean
-ldlang_override_segment_assignment
- (struct bfd_link_info *, bfd *, asection *, asection *, bfd_boolean);
-
-#endif
diff --git a/contrib/binutils/ld/ldlex.h b/contrib/binutils/ld/ldlex.h
deleted file mode 100644
index f274c6826dfa..000000000000
--- a/contrib/binutils/ld/ldlex.h
+++ /dev/null
@@ -1,64 +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, 51 Franklin Street - Fifth Floor, Boston, MA
- 02110-1301, 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_dynamic_list,
- 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 2f76c5af44cc..000000000000
--- a/contrib/binutils/ld/ldlex.l
+++ /dev/null
@@ -1,691 +0,0 @@
-%{
-
-/* Copyright 1991, 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999,
- 2000, 2001, 2002, 2003, 2004, 2005, 2007
- Free Software Foundation, Inc.
-
- This file is part of GLD, the Gnu Linker.
-
- GLD is free software; you can redistribute it and/or modify
- it under the terms of the GNU General Public License as published by
- the Free Software Foundation; either version 2, or (at your option)
- any later version.
-
- GLD is distributed in the hope that it will be useful,
- but WITHOUT ANY WARRANTY; without even the implied warranty of
- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- GNU General Public License for more details.
-
- You should have received a copy of the GNU General Public License
- along with GLD; see the file COPYING. If not, write to the Free
- Software Foundation, 51 Franklin Street - Fifth Floor, Boston, MA
- 02110-1301, USA. */
-
-/*
-This was written by steve chamberlain
- sac@cygnus.com
-*/
-
-#include "sysdep.h"
-#include "bfd.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 *, yy_size_t *, yy_size_t);
-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
-%}
-
-%option nounput
-
-%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_dynamic_list: return INPUT_DYNAMIC_LIST; 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,EXPRESSION>"ORIGIN" { RTOKEN(ORIGIN);}
-<BOTH,SCRIPT>"VERSION" { RTOKEN(VERSIONK);}
-<EXPRESSION,BOTH,SCRIPT>"BLOCK" { RTOKEN(BLOCK);}
-<EXPRESSION,BOTH,SCRIPT>"BIND" { RTOKEN(BIND);}
-<BOTH,SCRIPT,EXPRESSION>"LENGTH" { RTOKEN(LENGTH);}
-<EXPRESSION,BOTH,SCRIPT>"ALIGN" { RTOKEN(ALIGN_K);}
-<EXPRESSION,BOTH,SCRIPT>"DATA_SEGMENT_ALIGN" { RTOKEN(DATA_SEGMENT_ALIGN);}
-<EXPRESSION,BOTH,SCRIPT>"DATA_SEGMENT_RELRO_END" { RTOKEN(DATA_SEGMENT_RELRO_END);}
-<EXPRESSION,BOTH,SCRIPT>"DATA_SEGMENT_END" { RTOKEN(DATA_SEGMENT_END);}
-<EXPRESSION,BOTH,SCRIPT>"ADDR" { RTOKEN(ADDR);}
-<EXPRESSION,BOTH,SCRIPT>"LOADADDR" { RTOKEN(LOADADDR);}
-<EXPRESSION,BOTH,SCRIPT>"ALIGNOF" { RTOKEN(ALIGNOF); }
-<EXPRESSION,BOTH>"MAX" { RTOKEN(MAX_K); }
-<EXPRESSION,BOTH>"MIN" { RTOKEN(MIN_K); }
-<EXPRESSION,BOTH,SCRIPT>"ASSERT" { RTOKEN(ASSERT_K); }
-<BOTH,SCRIPT>"ENTRY" { RTOKEN(ENTRY);}
-<BOTH,SCRIPT,MRI>"EXTERN" { RTOKEN(EXTERN);}
-<EXPRESSION,BOTH,SCRIPT>"NEXT" { RTOKEN(NEXT);}
-<EXPRESSION,BOTH,SCRIPT>"sizeof_headers" { RTOKEN(SIZEOF_HEADERS);}
-<EXPRESSION,BOTH,SCRIPT>"SIZEOF_HEADERS" { RTOKEN(SIZEOF_HEADERS);}
-<EXPRESSION,BOTH,SCRIPT>"SEGMENT_START" { RTOKEN(SEGMENT_START);}
-<BOTH,SCRIPT>"MAP" { RTOKEN(MAP);}
-<EXPRESSION,BOTH,SCRIPT>"SIZEOF" { RTOKEN(SIZEOF);}
-<BOTH,SCRIPT>"TARGET" { RTOKEN(TARGET_K);}
-<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>"AS_NEEDED" { RTOKEN(AS_NEEDED);}
-<EXPRESSION,BOTH,SCRIPT>"DEFINED" { RTOKEN(DEFINED);}
-<BOTH,SCRIPT>"CREATE_OBJECT_SYMBOLS" { RTOKEN(CREATE_OBJECT_SYMBOLS);}
-<BOTH,SCRIPT>"CONSTRUCTORS" { RTOKEN( CONSTRUCTORS);}
-<BOTH,SCRIPT>"FORCE_COMMON_ALLOCATION" { RTOKEN(FORCE_COMMON_ALLOCATION);}
-<BOTH,SCRIPT>"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_BY_NAME" { RTOKEN(SORT_BY_NAME); }
-<BOTH,SCRIPT>"SORT_BY_ALIGNMENT" { RTOKEN(SORT_BY_ALIGNMENT); }
-<BOTH,SCRIPT>"SORT" { RTOKEN(SORT_BY_NAME); }
-<EXPRESSION,BOTH,SCRIPT>"NOLOAD" { RTOKEN(NOLOAD);}
-<EXPRESSION,BOTH,SCRIPT>"DSECT" { RTOKEN(DSECT);}
-<EXPRESSION,BOTH,SCRIPT>"COPY" { RTOKEN(COPY);}
-<EXPRESSION,BOTH,SCRIPT>"INFO" { RTOKEN(INFO);}
-<EXPRESSION,BOTH,SCRIPT>"OVERLAY" { RTOKEN(OVERLAY);}
-<EXPRESSION,BOTH,SCRIPT>"ONLY_IF_RO" { RTOKEN(ONLY_IF_RO); }
-<EXPRESSION,BOTH,SCRIPT>"ONLY_IF_RW" { RTOKEN(ONLY_IF_RW); }
-<EXPRESSION,BOTH,SCRIPT>"SPECIAL" { RTOKEN(SPECIAL); }
-<BOTH,SCRIPT>"o" { RTOKEN(ORIGIN);}
-<BOTH,SCRIPT>"org" { RTOKEN(ORIGIN);}
-<BOTH,SCRIPT>"l" { RTOKEN( LENGTH);}
-<BOTH,SCRIPT>"len" { RTOKEN( LENGTH);}
-<BOTH,SCRIPT>"INCLUDE" { RTOKEN(INCLUDE);}
-<BOTH,SCRIPT>"PHDRS" { RTOKEN (PHDRS); }
-<EXPRESSION,BOTH,SCRIPT>"AT" { RTOKEN(AT);}
-<EXPRESSION,BOTH,SCRIPT>"SUBALIGN" { RTOKEN(SUBALIGN);}
-<EXPRESSION,BOTH,SCRIPT>"PROVIDE" { RTOKEN(PROVIDE); }
-<EXPRESSION,BOTH,SCRIPT>"PROVIDE_HIDDEN" { RTOKEN(PROVIDE_HIDDEN); }
-<EXPRESSION,BOTH,SCRIPT>"KEEP" { RTOKEN(KEEP); }
-<EXPRESSION,BOTH,SCRIPT>"EXCLUDE_FILE" { RTOKEN(EXCLUDE_FILE); }
-<EXPRESSION,BOTH,SCRIPT>"CONSTANT" { RTOKEN(CONSTANT);}
-<MRI>"#".*\n? { ++ lineno; }
-<MRI>"\n" { ++ lineno; RTOKEN(NEWLINE); }
-<MRI>"*".* { /* Mri comment line */ }
-<MRI>";".* { /* Mri comment line */ }
-<MRI>"END" { RTOKEN(ENDWORD); }
-<MRI>"ALIGNMOD" { RTOKEN(ALIGNMOD);}
-<MRI>"ALIGN" { RTOKEN(ALIGN_K);}
-<MRI>"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>{FILENAMECHAR1}{FILENAMECHAR}* {
- yylval.name = xstrdup (yytext);
- return NAME;
- }
-<BOTH>"-l"{FILENAMECHAR}+ {
- yylval.name = xstrdup (yytext + 2);
- return LNAME;
- }
-<EXPRESSION>{FILENAMECHAR1}{NOCFILENAMECHAR}* {
- yylval.name = xstrdup (yytext);
- return NAME;
- }
-<EXPRESSION>"-l"{NOCFILENAMECHAR}+ {
- 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, yy_size_t *result, yy_size_t 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 a94b6ee9d78c..000000000000
--- a/contrib/binutils/ld/ldmain.c
+++ /dev/null
@@ -1,1535 +0,0 @@
-/* Main program of GNU linker.
- Copyright 1991, 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001,
- 2002, 2003, 2004, 2005, 2006, 2007
- Free Software Foundation, Inc.
- Written by Steve Chamberlain 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, 51 Franklin Street - Fifth Floor, Boston, MA
- 02110-1301, USA. */
-
-#include "sysdep.h"
-#include "bfd.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
-#if !HAVE_DECL_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. */
-const 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;
-
-/* Nonzero means never create DT_NEEDED entries for dynamic libraries
- in DT_NEEDED tags. */
-bfd_boolean add_needed = FALSE;
-
-/* TRUE if we should demangle symbol names. */
-bfd_boolean demangling;
-
-args_type command_line;
-
-ld_config_type config;
-
-sort_type sort_section;
-
-static const char *get_sysroot
- (int, char **);
-static char *get_emulation
- (int, char **);
-static void set_scripts_dir
- (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 *, struct bfd_link_hash_entry *, const char *,
- const char *, bfd_vma, bfd *, asection *, bfd_vma);
-static bfd_boolean reloc_dangerous
- (struct bfd_link_info *, const char *, bfd *, asection *, bfd_vma);
-static bfd_boolean unattached_reloc
- (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,
- einfo,
- info_msg,
- minfo,
- ldlang_override_segment_assignment
-};
-
-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_if_ordinary (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);
-
- expandargv (&argc, &argv);
-
- bfd_init ();
-
- bfd_set_error_program_name (program_name);
-
- xatexit (remove_output);
-
- /* Set up the sysroot directory. */
- ld_sysroot = get_sysroot (argc, argv);
- if (*ld_sysroot)
- {
- if (*TARGET_SYSTEM_ROOT == 0)
- {
- einfo ("%P%F: this linker was not configured to use sysroots\n");
- ld_sysroot = "";
- }
- else
- 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
-
- config.build_constructors = TRUE;
- config.rpath_separator = ':';
- config.split_by_reloc = (unsigned) -1;
- config.split_by_file = (bfd_size_type) -1;
- config.make_executable = TRUE;
- config.magic_demand_paged = TRUE;
- config.text_read_only = TRUE;
-
- command_line.warn_mismatch = TRUE;
- command_line.warn_search_mismatch = TRUE;
- command_line.check_section_addresses = TRUE;
-
- /* 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.allow_undefined_version = TRUE;
- link_info.keep_memory = TRUE;
- link_info.combreloc = TRUE;
- link_info.strip_discarded = TRUE;
- link_info.emit_hash = TRUE;
- link_info.callbacks = &link_callbacks;
- link_info.input_bfds_tail = &link_info.input_bfds;
- /* SVR4 linkers seem to set DT_INIT and DT_FINI based on magic _init
- and _fini symbols. We are compatible. */
- link_info.init_function = "_init";
- link_info.fini_function = "_fini";
- link_info.relax_pass = 1;
- link_info.pei386_auto_import = -1;
- link_info.spare_dynamic_tags = 5;
-
- ldfile_add_arch ("");
- 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);
-
- if (config.hash_table_size != 0)
- bfd_hash_set_default_size (config.hash_table_size);
-
- ldemul_set_symbols ();
-
- if (link_info.relocatable)
- {
- if (link_info.gc_sections)
- einfo ("%P%F: --gc-sections and -r may not be used together\n");
- else if (command_line.relax)
- einfo (_("%P%F: --relax and -r may not be used together\n"));
- if (link_info.shared)
- einfo (_("%P%F: -r and -shared may not be used together\n"));
- }
-
- /* We may have -Bsymbolic, -Bsymbolic-functions, --dynamic-list-data,
- --dynamic-list-cpp-new, --dynamic-list-cpp-typeinfo and
- --dynamic-list FILE. -Bsymbolic and -Bsymbolic-functions are
- for shared libraries. -Bsymbolic overrides all others and vice
- versa. */
- switch (command_line.symbolic)
- {
- case symbolic_unset:
- break;
- case symbolic:
- /* -Bsymbolic is for shared library only. */
- if (link_info.shared)
- {
- link_info.symbolic = TRUE;
- /* Should we free the unused memory? */
- link_info.dynamic_list = NULL;
- command_line.dynamic_list = dynamic_list_unset;
- }
- break;
- case symbolic_functions:
- /* -Bsymbolic-functions is for shared library only. */
- if (link_info.shared)
- command_line.dynamic_list = dynamic_list_data;
- break;
- }
-
- switch (command_line.dynamic_list)
- {
- case dynamic_list_unset:
- break;
- case dynamic_list_data:
- link_info.dynamic_data = TRUE;
- case dynamic_list:
- link_info.dynamic = TRUE;
- break;
- }
-
- if (! link_info.shared)
- {
- if (command_line.filter_shlib)
- 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,
- try the default script from command line first. */
- if (saved_script_handle == NULL
- && command_line.default_script != NULL)
- {
- ldfile_open_command_file (command_line.default_script);
- parser_input = input_script;
- yyparse ();
- }
-
- /* If we have not already opened and parsed a linker script
- read the emulation's appropriate default script. */
- if (saved_script_handle == NULL)
- {
- 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 ();
-
- lang_finish ();
-
- /* Even if we're producing relocatable output, some non-fatal errors should
- be reported in the exit status. (What non-fatal errors, if any, do we
- want to ignore for relocatable output?) */
- 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;
-}
-
-/* If the configured sysroot is relocatable, try relocating it based on
- default prefix FROM. Return the relocated directory if it exists,
- otherwise return null. */
-
-static char *
-get_relative_sysroot (const char *from ATTRIBUTE_UNUSED)
-{
-#ifdef TARGET_SYSTEM_ROOT_RELOCATABLE
- char *path;
- struct stat s;
-
- path = make_relative_prefix (program_name, from, TARGET_SYSTEM_ROOT);
- if (path)
- {
- if (stat (path, &s) == 0 && S_ISDIR (s.st_mode))
- return path;
- free (path);
- }
-#endif
- return 0;
-}
-
-/* Return the sysroot directory. Return "" if no sysroot is being used. */
-
-static const char *
-get_sysroot (int argc, char **argv)
-{
- int i;
- const char *path;
-
- for (i = 1; i < argc; i++)
- if (CONST_STRNEQ (argv[i], "--sysroot="))
- return argv[i] + strlen ("--sysroot=");
-
- path = get_relative_sysroot (BINDIR);
- if (path)
- return path;
-
- path = get_relative_sysroot (TOOLBINDIR);
- if (path)
- return path;
-
- return TARGET_SYSTEM_ROOT;
-}
-
-/* We need to find any explicitly given emulation in order to initialize the
- state that's needed by the lex&yacc argument parser (parse_args). */
-
-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 (CONST_STRNEQ (argv[i], "-m"))
- {
- 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,
- sizeof (struct bfd_hash_entry),
- 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,
- sizeof (struct bfd_hash_entry),
- 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,
- sizeof (struct bfd_hash_entry)))
- 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,
- 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 (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
- && (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%s\n", abfd, section, address, _("warning: "), warning);
- else if (abfd == NULL)
- einfo ("%P: %s%s\n", _("warning: "), warning);
- else if (symbol == NULL)
- einfo ("%B: %s%s\n", abfd, _("warning: "), 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%s\n", abfd, _("warning: "), 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%s\n", abfd, sec, q->address, _("warning: "),
- 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,
- sizeof (struct bfd_hash_entry)))
- 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,
- struct bfd_link_hash_entry *entry,
- const char *name,
- const char *reloc_name,
- bfd_vma addend,
- bfd *abfd,
- asection *section,
- bfd_vma address)
-{
- if (overflow_cutoff_limit == -1)
- return TRUE;
-
- 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;
- }
-
- if (entry)
- {
- while (entry->type == bfd_link_hash_indirect
- || entry->type == bfd_link_hash_warning)
- entry = entry->u.i.link;
- switch (entry->type)
- {
- case bfd_link_hash_undefined:
- case bfd_link_hash_undefweak:
- einfo (_(" relocation truncated to fit: %s against undefined symbol `%T'"),
- reloc_name, entry->root.string);
- break;
- case bfd_link_hash_defined:
- case bfd_link_hash_defweak:
- einfo (_(" relocation truncated to fit: %s against symbol `%T' defined in %A section in %B"),
- reloc_name, entry->root.string,
- entry->u.def.section,
- entry->u.def.section == bfd_abs_section_ptr
- ? output_bfd : entry->u.def.section->owner);
- break;
- default:
- abort ();
- break;
- }
- }
- else
- einfo (_(" relocation truncated to fit: %s against `%T'"),
- reloc_name, name);
- if (addend != 0)
- einfo ("+%v", addend);
- einfo ("\n");
- 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)
-{
- einfo (_("%X%C: dangerous relocation: %s\n"),
- abfd, section, address, 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)
-{
- einfo (_("%X%C: reloc refers to symbol `%T' which is not being output\n"),
- abfd, section, address, 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 (name == NULL)
- {
- if (command_line.cref || nocrossref_list != NULL)
- return handle_asneeded_cref (abfd, value);
- return TRUE;
- }
-
- if (! info->notice_all
- || (info->notice_hash != NULL
- && bfd_hash_lookup (info->notice_hash, name, FALSE, FALSE) != NULL))
- {
- 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 4f15d55b994b..000000000000
--- a/contrib/binutils/ld/ldmain.h
+++ /dev/null
@@ -1,47 +0,0 @@
-/* ldmain.h -
- Copyright 1991, 1992, 1993, 1994, 1995, 1996, 1999, 2002, 2003, 2004,
- 2005 Free Software Foundation, Inc.
-
- This file is part of GLD, the Gnu Linker.
-
- 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, 51 Franklin Street - Fifth Floor, Boston, MA
- 02110-1301, USA. */
-
-#ifndef LDMAIN_H
-#define LDMAIN_H
-
-extern char *program_name;
-extern const 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 add_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 292fc45ccdda..000000000000
--- a/contrib/binutils/ld/ldmisc.c
+++ /dev/null
@@ -1,528 +0,0 @@
-/* ldmisc.c
- Copyright 1991, 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999, 2000,
- 2001, 2002, 2003, 2004, 2005, 2006, 2007
- Free Software Foundation, Inc.
- Written by Steve Chamberlain of Cygnus Support.
-
- This file is part of GLD, the Gnu Linker.
-
- GLD is free software; you can redistribute it and/or modify
- it under the terms of the GNU General Public License as published by
- the Free Software Foundation; either version 2, or (at your option)
- any later version.
-
- GLD is distributed in the hope that it will be useful,
- but WITHOUT ANY WARRANTY; without even the implied warranty of
- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- GNU General Public License for more details.
-
- You should have received a copy of the GNU General Public License
- along with GLD; see the file COPYING. If not, write to the Free
- Software Foundation, 51 Franklin Street - Fifth Floor, Boston, MA
- 02110-1301, USA. */
-
-#include "sysdep.h"
-#include "bfd.h"
-#include "bfdlink.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"
-#include "elf-bfd.h"
-
-/*
- %% literal %
- %A section name from a section
- %B filename from a bfd
- %C clever filename:linenumber with function
- %D like %C, but no function name
- %E current bfd error or errno
- %F error is fatal
- %G like %D, but only function name
- %I filename from a lang_input_statement_type
- %P print program name
- %R info about a relent
- %S print script file and linenumber
- %T symbol name
- %V hex bfd_vma
- %W hex bfd_vma with 0x with no leading zeros taking up 8 spaces
- %X no object output, fail return
- %d integer, like printf
- %ld long, like printf
- %lu unsigned long, like printf
- %s arbitrary string, like printf
- %u integer, like printf
- %v hex bfd_vma, no leading zeros
-*/
-
-static void
-vfinfo (FILE *fp, const char *fmt, va_list arg, bfd_boolean is_warning)
-{
- bfd_boolean fatal = FALSE;
-
- while (*fmt != '\0')
- {
- while (*fmt != '%' && *fmt != '\0')
- {
- putc (*fmt, fp);
- fmt++;
- }
-
- if (*fmt == '%')
- {
- fmt++;
- switch (*fmt++)
- {
- 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"));
- break;
- }
- else if (demangling)
- {
- char *demangled;
-
- demangled = bfd_demangle (output_bfd, name,
- DMGL_ANSI | DMGL_PARAMS);
- if (demangled != NULL)
- {
- fprintf (fp, "%s", demangled);
- free (demangled);
- break;
- }
- }
- fprintf (fp, "%s", name);
- }
- break;
-
- case 'A':
- /* section name from a section */
- {
- asection *sec = va_arg (arg, asection *);
- bfd *abfd = sec->owner;
- const char *group = NULL;
- struct coff_comdat_info *ci;
-
- fprintf (fp, "%s", sec->name);
- if (abfd != NULL
- && bfd_get_flavour (abfd) == bfd_target_elf_flavour
- && elf_next_in_group (sec) != NULL
- && (sec->flags & SEC_GROUP) == 0)
- group = elf_group_name (sec);
- else if (abfd != NULL
- && bfd_get_flavour (abfd) == bfd_target_coff_flavour
- && (ci = bfd_coff_get_comdat_section (sec->owner,
- sec)) != NULL)
- group = ci->name;
- if (group != NULL)
- fprintf (fp, "[%s]", group);
- }
- break;
-
- case 'B':
- /* filename from a bfd */
- {
- bfd *abfd = va_arg (arg, bfd *);
-
- if (abfd == NULL)
- fprintf (fp, "%s generated", program_name);
- else if (abfd->my_archive)
- fprintf (fp, "%s(%s)", abfd->my_archive->filename,
- abfd->filename);
- else
- 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);
-
- if (abfd == NULL)
- {
- entry = NULL;
- asymbols = NULL;
- }
- else
- {
- 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 sym_count;
-
- symsize = bfd_get_symtab_upper_bound (abfd);
- if (symsize < 0)
- einfo (_("%B%F: could not read symbols\n"), abfd);
- asymbols = xmalloc (symsize);
- sym_count = bfd_canonicalize_symtab (abfd, asymbols);
- if (sym_count < 0)
- einfo (_("%B%F: could not read symbols\n"), abfd);
- if (entry != (lang_input_statement_type *) NULL)
- {
- entry->asymbols = asymbols;
- entry->symbol_count = sym_count;
- }
- }
- }
-
- /* The GNU Coding Standard requires that error messages
- be of the form:
-
- source-file-name:lineno: message
-
- We do not always have a line number available so if
- we cannot find them we print out the section name and
- offset instread. */
- discard_last = TRUE;
- if (abfd != NULL
- && bfd_find_nearest_line (abfd, section, asymbols, offset,
- &filename, &functionname,
- &linenumber))
- {
- if (functionname != NULL && fmt[-1] == 'C')
- {
- /* Detect the case where we are printing out a
- message for the same function as the last
- call to vinfo ("%C"). In this situation do
- not print out the ABFD filename or the
- function name again. Note - we do still
- print out the source filename, as this will
- allow programs that parse the linker's output
- (eg emacs) to correctly locate multiple
- errors in the same source file. */
- if (last_bfd == NULL
- || last_file == NULL
- || last_function == NULL
- || last_bfd != abfd
- || (filename != NULL
- && strcmp (last_file, filename) != 0)
- || strcmp (last_function, functionname) != 0)
- {
- lfinfo (fp, _("%B: In function `%T':\n"),
- abfd, functionname);
-
- 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;
- }
- else
- lfinfo (fp, "%B:", abfd);
-
- if (filename != NULL)
- fprintf (fp, "%s:", filename);
-
- if (functionname != NULL && fmt[-1] == 'G')
- lfinfo (fp, "%T", functionname);
- else if (filename != NULL && linenumber != 0)
- fprintf (fp, "%u", linenumber);
- else
- lfinfo (fp, "(%A+0x%v)", section, offset);
- }
- else
- lfinfo (fp, "%B:(%A+0x%v)", abfd, section, offset);
-
- if (asymbols != NULL && entry == NULL)
- free (asymbols);
-
- 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;
-
- case 'l':
- if (*fmt == 'd')
- {
- fprintf (fp, "%ld", va_arg (arg, long));
- ++fmt;
- break;
- }
- else if (*fmt == 'u')
- {
- fprintf (fp, "%lu", va_arg (arg, unsigned long));
- ++fmt;
- break;
- }
- /* Fall thru */
-
- default:
- fprintf (fp, "%%%c", fmt[-1]);
- break;
- }
- }
- }
-
- if (is_warning && config.fatal_warnings)
- config.make_executable = FALSE;
-
- if (fatal)
- xexit (1);
-}
-
-/* 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, FALSE);
- 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, TRUE);
- 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, ...)
-{
- if (config.map_file != NULL)
- {
- va_list arg;
-
- va_start (arg, fmt);
- vfinfo (config.map_file, fmt, arg, FALSE);
- va_end (arg);
- }
-}
-
-void
-lfinfo (FILE *file, const char *fmt, ...)
-{
- va_list arg;
-
- va_start (arg, fmt);
- vfinfo (file, fmt, arg, FALSE);
- 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);
-}
diff --git a/contrib/binutils/ld/ldmisc.h b/contrib/binutils/ld/ldmisc.h
deleted file mode 100644
index 92f4e2a65eea..000000000000
--- a/contrib/binutils/ld/ldmisc.h
+++ /dev/null
@@ -1,44 +0,0 @@
-/* ldmisc.h -
- Copyright 1991, 1992, 1993, 1994, 1996, 1997, 2001, 2003, 2004, 2007
- Free Software Foundation, Inc.
-
- This file is part of GLD, the Gnu Linker.
-
- GLD is free software; you can redistribute it and/or modify
- it under the terms of the GNU General Public License as published by
- the Free Software Foundation; either version 2, or (at your option)
- any later version.
-
- GLD is distributed in the hope that it will be useful,
- but WITHOUT ANY WARRANTY; without even the implied warranty of
- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- GNU General Public License for more details.
-
- You should have received a copy of the GNU General Public License
- along with GLD; see the file COPYING. If not, write to the Free
- Software Foundation, 51 Franklin Street - Fifth Floor, Boston,
- MA 02110-1301, USA. */
-
-#ifndef LDMISC_H
-#define LDMISC_H
-
-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);
-
-#endif
diff --git a/contrib/binutils/ld/ldver.c b/contrib/binutils/ld/ldver.c
deleted file mode 100644
index 776c722a197b..000000000000
--- a/contrib/binutils/ld/ldver.c
+++ /dev/null
@@ -1,58 +0,0 @@
-/* ldver.c -- Print linker version.
- Copyright 1991, 1992, 1993, 1994, 1995, 1996, 1997, 2000, 2001, 2002,
- 2003, 2007 Free Software Foundation, Inc.
-
- This file is part of GLD, the Gnu Linker.
-
- This program is free software; you can redistribute it and/or modify
- it under the terms of the GNU General Public License as published by
- the Free Software Foundation; either version 2 of the License, or
- (at your option) any later version.
-
- This program is distributed in the hope that it will be useful,
- but WITHOUT ANY WARRANTY; without even the implied warranty of
- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- GNU General Public License for more details.
-
- You should have received a copy of the GNU General Public License
- along with this program; if not, write to the Free Software
- Foundation, Inc., 51 Franklin Street - Fifth Floor, Boston, MA 02110-1301, USA. */
-
-#include "sysdep.h"
-#include "bfd.h"
-#include "bfdver.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 %s\n"), BFD_VERSION_STRING);
-
- if (noisy & 2)
- {
- printf (_("Copyright 2007 Free Software Foundation, Inc.\n"));
- printf (_("\
-This program is free software; you may redistribute it under the terms of\n\
-the GNU General Public License. This program has absolutely no warranty.\n"));
- }
-
- 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 96e74ce66c1f..000000000000
--- a/contrib/binutils/ld/ldver.h
+++ /dev/null
@@ -1,21 +0,0 @@
-/* ldver.h -- Header file for ldver.c.
- Copyright 1991, 1992, 1993, 1996, 2001, 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., 51 Franklin Street - Fifth Floor, Boston, MA 02110-1301, USA. */
-
-void ldversion (int);
diff --git a/contrib/binutils/ld/ldwrite.c b/contrib/binutils/ld/ldwrite.c
deleted file mode 100644
index 7c02ff65657e..000000000000
--- a/contrib/binutils/ld/ldwrite.c
+++ /dev/null
@@ -1,568 +0,0 @@
-/* ldwrite.c -- write out the linked file
- Copyright 1991, 1992, 1993, 1994, 1995, 1996, 1997, 1998, 2000, 2002,
- 2003, 2004, 2005, 2006, 2007 Free Software Foundation, Inc.
- Written by Steve Chamberlain sac@cygnus.com
-
-This file is part of GLD, the Gnu Linker.
-
-This program is free software; you can redistribute it and/or modify
-it under the terms of the GNU General Public License as published by
-the Free Software Foundation; either version 2 of the License, or
-(at your option) any later version.
-
-This program is distributed in the hope that it will be useful,
-but WITHOUT ANY WARRANTY; without even the implied warranty of
-MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
-GNU General Public License for more details.
-
-You should have received a copy of the GNU General Public License
-along with this program; if not, write to the Free Software
-Foundation, Inc., 51 Franklin Street - Fifth Floor, Boston, MA 02110-1301, USA. */
-
-#include "sysdep.h"
-#include "bfd.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_offset;
- 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_offset;
- 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 */
- asection *i = statement->input_section.section;
-
- if (!((lang_input_statement_type *) i->owner->usrdata)->just_syms_flag
- && (i->flags & SEC_EXCLUDE) == 0)
- {
- 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 = (unsigned char *) "";
- link_order->u.data.size = 1;
- }
- else
- {
- link_order->type = bfd_indirect_link_order;
- link_order->u.indirect.section = i;
- ASSERT (i->output_section == output_section);
- }
- link_order->size = i->size;
- link_order->offset = i->output_offset;
- }
- }
- }
- break;
-
- case lang_padding_statement_enum:
- /* 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 (CONST_STRNEQ (name, ".stab"))
- {
- /* 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 (CONST_STRNEQ (name, ".stab")
- || 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->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->map_head.link_order;
- printf ("vma %x size %x\n", s->vma, s->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->map_head.link_order; 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->map_head.link_order; 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;
-
- thissize = sec->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->map_head.link_order = p;
- n->map_tail.link_order = cursor->map_tail.link_order;
- cursor->map_tail.link_order = l;
- l->next = NULL;
- l = p;
-
- /* Change the size of the original section and
- update the vma of the new one. */
-
- dump ("before snip", cursor, n);
-
- shift_offset = p->offset;
- n->size = cursor->size - shift_offset;
- cursor->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 1851a8676e4a..000000000000
--- 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, 51 Franklin Street - Fifth Floor,
- Boston, MA 02110-1301, USA. */
-
-void ldwrite (void);
diff --git a/contrib/binutils/ld/lexsup.c b/contrib/binutils/ld/lexsup.c
deleted file mode 100644
index 2dfab983481d..000000000000
--- a/contrib/binutils/ld/lexsup.c
+++ /dev/null
@@ -1,1653 +0,0 @@
-/* Parse options for the GNU linker.
- Copyright 1991, 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999, 2000,
- 2001, 2002, 2003, 2004, 2005, 2006, 2007
- Free Software Foundation, Inc.
-
- This file is part of GLD, the Gnu Linker.
-
- GLD is free software; you can redistribute it and/or modify
- it under the terms of the GNU General Public License as published by
- the Free Software Foundation; either version 2, or (at your option)
- any later version.
-
- GLD is distributed in the hope that it will be useful,
- but WITHOUT ANY WARRANTY; without even the implied warranty of
- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- GNU General Public License for more details.
-
- You should have received a copy of the GNU General Public License
- along with GLD; see the file COPYING. If not, write to the Free
- Software Foundation, 51 Franklin Street - Fifth Floor, Boston, MA
- 02110-1301, USA. */
-
-#include "sysdep.h"
-#include "bfd.h"
-#include "bfdver.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 set_segment_start (const 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_SYSROOT,
- 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_NO_WARN_SEARCH_MISMATCH,
- OPTION_NO_WARN_FATAL,
- 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_SORT_SECTION,
- OPTION_STATS,
- OPTION_SYMBOLIC,
- OPTION_SYMBOLIC_FUNCTIONS,
- 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_DYNAMIC_LIST,
- OPTION_DYNAMIC_LIST_CPP_NEW,
- OPTION_DYNAMIC_LIST_CPP_TYPEINFO,
- OPTION_DYNAMIC_LIST_DATA,
- OPTION_WARN_COMMON,
- OPTION_WARN_CONSTRUCTORS,
- OPTION_WARN_FATAL,
- OPTION_WARN_MULTIPLE_GP,
- OPTION_WARN_ONCE,
- OPTION_WARN_SECTION_ALIGN,
- OPTION_SPLIT_BY_RELOC,
- OPTION_SPLIT_BY_FILE ,
- OPTION_WHOLE_ARCHIVE,
- OPTION_ADD_NEEDED,
- OPTION_NO_ADD_NEEDED,
- OPTION_AS_NEEDED,
- OPTION_NO_AS_NEEDED,
- OPTION_WRAP,
- OPTION_FORCE_EXE_SUFFIX,
- OPTION_GC_SECTIONS,
- OPTION_NO_GC_SECTIONS,
- OPTION_PRINT_GC_SECTIONS,
- OPTION_NO_PRINT_GC_SECTIONS,
- OPTION_HASH_SIZE,
- OPTION_CHECK_SECTIONS,
- OPTION_NO_CHECK_SECTIONS,
- OPTION_NO_UNDEFINED,
- 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_DEFAULT_SYMVER,
- OPTION_DEFAULT_IMPORTED_SYMVER,
- 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,
- OPTION_WARN_SHARED_TEXTREL,
- OPTION_REDUCE_MEMORY_OVERHEADS,
- OPTION_DEFAULT_SCRIPT
-};
-
-/* 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 },
- { {"sysroot=<DIRECTORY>", required_argument, NULL, OPTION_SYSROOT},
- '\0', NULL, N_("Override the default sysroot location"), TWO_DASHES },
- { {NULL, required_argument, NULL, '\0'},
- 'm', N_("EMULATION"), N_("Set emulation"), ONE_DASH },
- { {"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 },
- { {"default-script", required_argument, NULL, OPTION_DEFAULT_SCRIPT},
- '\0', N_("FILE"), N_("Read default linker script"), TWO_DASHES },
- { {"dT", required_argument, NULL, OPTION_DEFAULT_SCRIPT},
- '\0', NULL, NULL, ONE_DASH },
- { {"undefined", required_argument, NULL, 'u'},
- 'u', N_("SYMBOL"), N_("Start with undefined reference to SYMBOL"),
- TWO_DASHES },
- { {"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 },
- { {"add-needed", no_argument, NULL, OPTION_ADD_NEEDED},
- '\0', NULL, N_("Set DT_NEEDED tags for DT_NEEDED entries in\n"
- "\t\t\t\tfollowing dynamic libs"), TWO_DASHES },
- { {"no-add-needed", no_argument, NULL, OPTION_NO_ADD_NEEDED},
- '\0', NULL, N_("Do not set DT_NEEDED tags for DT_NEEDED entries\n"
- "\t\t\t\tin following dynamic libs"), TWO_DASHES },
- { {"as-needed", no_argument, NULL, OPTION_AS_NEEDED},
- '\0', NULL, N_("Only set DT_NEEDED for following dynamic libs if used"),
- TWO_DASHES },
- { {"no-as-needed", no_argument, NULL, OPTION_NO_AS_NEEDED},
- '\0', NULL, N_("Always set DT_NEEDED for following dynamic libs"),
- TWO_DASHES },
- { {"assert", required_argument, NULL, OPTION_ASSERT},
- '\0', N_("KEYWORD"), N_("Ignored for SunOS compatibility"), ONE_DASH },
- { {"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 },
- { {"Bsymbolic-functions", no_argument, NULL, OPTION_SYMBOLIC_FUNCTIONS},
- '\0', NULL, N_("Bind global function references locally"), ONE_DASH },
- { {"check-sections", no_argument, NULL, OPTION_CHECK_SECTIONS},
- '\0', NULL, N_("Check section addresses for overlaps (default)"),
- TWO_DASHES },
- { {"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},
- { {"fatal-warnings", no_argument, NULL, OPTION_WARN_FATAL},
- '\0', NULL, N_("Treat warnings as errors"),
- TWO_DASHES },
- { {"no-fatal-warnings", no_argument, NULL, OPTION_NO_WARN_FATAL},
- '\0', NULL, N_("Don't treat warnings as errors"),
- 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 },
- { {"print-gc-sections", no_argument, NULL, OPTION_PRINT_GC_SECTIONS},
- '\0', NULL, N_("List removed unused sections on stderr"),
- TWO_DASHES },
- { {"no-print-gc-sections", no_argument, NULL, OPTION_NO_PRINT_GC_SECTIONS},
- '\0', NULL, N_("Do not list removed unused sections"),
- TWO_DASHES },
- { {"hash-size=<NUMBER>", required_argument, NULL, OPTION_HASH_SIZE},
- '\0', NULL, N_("Set default hash table size close to <NUMBER>"),
- TWO_DASHES },
- { {"help", no_argument, NULL, OPTION_HELP},
- '\0', NULL, N_("Print option help"), TWO_DASHES },
- { {"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 },
- { {"default-symver", no_argument, NULL, OPTION_DEFAULT_SYMVER},
- '\0', NULL, N_("Create default symbol version"), TWO_DASHES },
- { {"default-imported-symver", no_argument, NULL,
- OPTION_DEFAULT_IMPORTED_SYMVER},
- '\0', NULL, N_("Create default symbol version for imported symbols"),
- TWO_DASHES },
- { {"no-warn-mismatch", no_argument, NULL, OPTION_NO_WARN_MISMATCH},
- '\0', NULL, N_("Don't warn about mismatched input files"), TWO_DASHES},
- { {"no-warn-search-mismatch", no_argument, NULL,
- OPTION_NO_WARN_SEARCH_MISMATCH},
- '\0', NULL, N_("Don't warn on finding an incompatible library"),
- TWO_DASHES},
- { {"no-whole-archive", no_argument, NULL, OPTION_NO_WHOLE_ARCHIVE},
- '\0', NULL, N_("Turn off --whole-archive"), TWO_DASHES },
- { {"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 },
- { {"reduce-memory-overheads", no_argument, NULL,
- OPTION_REDUCE_MEMORY_OVERHEADS},
- '\0', NULL, N_("Reduce memory overheads, possibly taking much longer"),
- TWO_DASHES },
- { {"relax", no_argument, NULL, OPTION_RELAX},
- '\0', NULL, N_("Relax branches on certain targets"), TWO_DASHES },
- { {"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 },
- { {"sort-section", required_argument, NULL, OPTION_SORT_SECTION},
- '\0', N_("name|alignment"),
- N_("Sort sections by name or maximum alignment"), TWO_DASHES },
- { {"spare-dynamic-tags", required_argument, NULL, OPTION_SPARE_DYNAMIC_TAGS},
- '\0', N_("COUNT"), N_("How many tags to reserve in .dynamic section"),
- TWO_DASHES },
- { {"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 },
- { {"dynamic-list-data", no_argument, NULL, OPTION_DYNAMIC_LIST_DATA},
- '\0', NULL, N_("Add data symbols to dynamic list"), TWO_DASHES },
- { {"dynamic-list-cpp-new", no_argument, NULL, OPTION_DYNAMIC_LIST_CPP_NEW},
- '\0', NULL, N_("Use C++ operator new/delete dynamic list"), TWO_DASHES },
- { {"dynamic-list-cpp-typeinfo", no_argument, NULL, OPTION_DYNAMIC_LIST_CPP_TYPEINFO},
- '\0', NULL, N_("Use C++ typeinfo dynamic list"), TWO_DASHES },
- { {"dynamic-list", required_argument, NULL, OPTION_DYNAMIC_LIST},
- '\0', N_("FILE"), N_("Read dynamic list"), TWO_DASHES },
- { {"warn-common", no_argument, NULL, OPTION_WARN_COMMON},
- '\0', NULL, N_("Warn about duplicate common symbols"), TWO_DASHES },
- { {"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-shared-textrel", no_argument, NULL, OPTION_WARN_SHARED_TEXTREL},
- '\0', NULL, N_("Warn if shared object has DT_TEXTREL"),
- TWO_DASHES },
- { {"warn-unresolved-symbols", no_argument, NULL,
- OPTION_WARN_UNRESOLVED_SYMBOLS},
- '\0', NULL, N_("Report unresolved symbols as warnings"), TWO_DASHES },
- { {"error-unresolved-symbols", no_argument, NULL,
- OPTION_ERROR_UNRESOLVED_SYMBOLS},
- '\0', NULL, N_("Report unresolved symbols as errors"), TWO_DASHES },
- { {"whole-archive", no_argument, NULL, OPTION_WHOLE_ARCHIVE},
- '\0', NULL, N_("Include all objects from following archives"),
- TWO_DASHES },
- { {"wrap", required_argument, NULL, OPTION_WRAP},
- '\0', N_("SYMBOL"), N_("Use wrapper functions for SYMBOL"), TWO_DASHES },
-};
-
-#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;
- int no_fatal_warnings = FALSE;
-
- 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]);
- /* Fall through. */
-
- 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_SYSROOT:
- /* Already handled in ldmain.c. */
- 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:
- link_info.gc_sections = TRUE;
- break;
- case OPTION_PRINT_GC_SECTIONS:
- link_info.print_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:
- link_info.gc_sections = FALSE;
- break;
- case OPTION_NO_PRINT_GC_SECTIONS:
- link_info.print_gc_sections = FALSE;
- break;
- case OPTION_NO_KEEP_MEMORY:
- link_info.keep_memory = FALSE;
- break;
- case OPTION_NO_UNDEFINED:
- link_info.unresolved_syms_in_objects
- = how_to_report_unresolved_symbols;
- 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_DEFAULT_SYMVER:
- link_info.create_default_symver = TRUE;
- break;
- case OPTION_DEFAULT_IMPORTED_SYMVER:
- link_info.default_imported_symver = TRUE;
- break;
- case OPTION_NO_WARN_MISMATCH:
- command_line.warn_mismatch = FALSE;
- break;
- case OPTION_NO_WARN_SEARCH_MISMATCH:
- command_line.warn_search_mismatch = FALSE;
- break;
- case OPTION_NOINHIBIT_EXEC:
- force_make_executable = TRUE;
- break;
- 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
- {
- if (strncmp (optarg, cp, optarg_len) == 0
- && (cp[optarg_len] == 0
- || cp[optarg_len] == config.rpath_separator))
- /* We found it. */
- break;
-
- /* Not yet found. */
- cp = strchr (cp, config.rpath_separator);
- if (cp != NULL)
- ++cp;
- }
- while (cp != NULL);
-
- if (cp == NULL)
- {
- buf = xmalloc (rpath_len + optarg_len + 2);
- sprintf (buf, "%s%c%s", command_line.rpath,
- config.rpath_separator, 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%c%s", command_line.rpath_link,
- config.rpath_separator, 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_SORT_SECTION:
- if (strcmp (optarg, N_("name")) == 0)
- sort_section = by_name;
- else if (strcmp (optarg, N_("alignment")) == 0)
- sort_section = by_alignment;
- else
- einfo (_("%P%F: invalid section sorting option: %s\n"),
- optarg);
- break;
- case OPTION_STATS:
- config.stats = TRUE;
- break;
- case OPTION_SYMBOLIC:
- command_line.symbolic = symbolic;
- break;
- case OPTION_SYMBOLIC_FUNCTIONS:
- command_line.symbolic = symbolic_functions;
- break;
- case 't':
- trace_files = TRUE;
- break;
- case 'T':
- ldfile_open_command_file (optarg);
- parser_input = input_script;
- yyparse ();
- break;
- case OPTION_DEFAULT_SCRIPT:
- command_line.default_script = optarg;
- 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_segment_start (".bss", optarg);
- break;
- case OPTION_TDATA:
- set_segment_start (".data", optarg);
- break;
- case OPTION_TTEXT:
- set_segment_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_DYNAMIC_LIST_DATA:
- command_line.dynamic_list = dynamic_list_data;
- if (command_line.symbolic == symbolic)
- command_line.symbolic = symbolic_unset;
- break;
- case OPTION_DYNAMIC_LIST_CPP_TYPEINFO:
- lang_append_dynamic_list_cpp_typeinfo ();
- if (command_line.dynamic_list != dynamic_list_data)
- command_line.dynamic_list = dynamic_list;
- if (command_line.symbolic == symbolic)
- command_line.symbolic = symbolic_unset;
- break;
- case OPTION_DYNAMIC_LIST_CPP_NEW:
- lang_append_dynamic_list_cpp_new ();
- if (command_line.dynamic_list != dynamic_list_data)
- command_line.dynamic_list = dynamic_list;
- if (command_line.symbolic == symbolic)
- command_line.symbolic = symbolic_unset;
- break;
- case OPTION_DYNAMIC_LIST:
- /* This option indicates a small script that only specifies
- a dynamic list. Read it, but don't assume that we've
- seen a linker script. */
- {
- FILE *hold_script_handle;
-
- hold_script_handle = saved_script_handle;
- ldfile_open_command_file (optarg);
- saved_script_handle = hold_script_handle;
- parser_input = input_dynamic_list;
- yyparse ();
- }
- if (command_line.dynamic_list != dynamic_list_data)
- command_line.dynamic_list = dynamic_list;
- if (command_line.symbolic == symbolic)
- command_line.symbolic = symbolic_unset;
- break;
- case OPTION_WARN_COMMON:
- config.warn_common = TRUE;
- break;
- case OPTION_WARN_CONSTRUCTORS:
- config.warn_constructors = TRUE;
- break;
- case OPTION_WARN_FATAL:
- config.fatal_warnings = TRUE;
- break;
- case OPTION_NO_WARN_FATAL:
- no_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_WARN_SHARED_TEXTREL:
- link_info.warn_shared_textrel = TRUE;
- break;
- case OPTION_WHOLE_ARCHIVE:
- whole_archive = TRUE;
- break;
- case OPTION_ADD_NEEDED:
- add_needed = TRUE;
- break;
- case OPTION_NO_ADD_NEEDED:
- add_needed = FALSE;
- break;
- case OPTION_AS_NEEDED:
-/* XXX: --as-needed is broken on powerpc64 */
-#ifndef __powerpc64__
- as_needed = TRUE;
- break;
-#endif
- 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 (CONST_STRNEQ (optarg, "P,"))
- 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;
-
- case OPTION_REDUCE_MEMORY_OVERHEADS:
- link_info.reduce_memory_overheads = TRUE;
- if (config.hash_table_size == 0)
- config.hash_table_size = 1021;
- break;
-
- case OPTION_HASH_SIZE:
- {
- bfd_size_type new_size;
-
- new_size = strtoul (optarg, NULL, 0);
- if (new_size)
- config.hash_table_size = new_size;
- else
- einfo (_("%P%X: --hash-size needs a numeric argument\n"));
- }
- break;
- }
- }
- if (no_fatal_warnings)
- config.fatal_warnings = FALSE;
-
- 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), NULL);
-}
-
-static void
-set_segment_start (const char *section, char *valstr)
-{
- const char *name;
- const char *end;
- segment_type *seg;
-
- bfd_vma val = bfd_scan_vma (valstr, &end, 16);
- if (*end)
- einfo (_("%P%F: invalid hex number `%s'\n"), valstr);
- /* If we already have an entry for this segment, update the existing
- value. */
- name = section + 1;
- for (seg = segments; seg; seg = seg->next)
- if (strcmp (seg->name, name) == 0)
- {
- seg->value = val;
- return;
- }
- /* There was no existing value so we must create a new segment
- entry. */
- seg = stat_alloc (sizeof (*seg));
- seg->name = name;
- seg->value = val;
- seg->used = FALSE;
- /* Add it to the linked list of segments. */
- seg->next = segments;
- segments = seg;
- /* Historically, -Ttext and friends set the base address of a
- particular section. For backwards compatibility, we still do
- that. If a SEGMENT_START directive is seen, the section address
- assignment will be disabled. */
- lang_section_start (section, exp_intop (val), seg);
-}
-
-
-/* Print help messages for the options. */
-
-static void
-help (void)
-{
- unsigned i;
- const char **targets, **pp;
- int len;
-
- 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;
- 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));
- }
- }
- printf (_(" @FILE"));
- for (len = strlen (" @FILE"); len < 30; len++)
- putchar (' ');
- printf (_("Read options from FILE\n"));
-
- /* Note: Various tools (such as libtool) depend upon the
- format of the listings below - do not change them. */
- /* 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");
-
- if (REPORT_BUGS_TO[0])
- printf (_("Report bugs to %s\n"), REPORT_BUGS_TO);
-}
diff --git a/contrib/binutils/ld/mri.c b/contrib/binutils/ld/mri.c
deleted file mode 100644
index 8fe016075344..000000000000
--- a/contrib/binutils/ld/mri.c
+++ /dev/null
@@ -1,316 +0,0 @@
-/* mri.c -- handle MRI style linker scripts
- Copyright 1991, 1992, 1993, 1994, 1996, 1997, 1998, 1999, 2000, 2001,
- 2002, 2003, 2004, 2005, 2007 Free Software Foundation, Inc.
-
-This file is part of GLD, the Gnu Linker.
-
-GLD is free software; you can redistribute it and/or modify
-it under the terms of the GNU General Public License as published by
-the Free Software Foundation; either version 2, or (at your option)
-any later version.
-
-GLD is distributed in the hope that it will be useful,
-but WITHOUT ANY WARRANTY; without even the implied warranty of
-MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
-GNU General Public License for more details.
-
-You should have received a copy of the GNU General Public License
-along with GLD; see the file COPYING. If not, write to the Free
-Software Foundation, 51 Franklin Street - Fifth Floor, Boston, MA
-02110-1301, USA.
-
- This bit does the tree decoration when MRI style link scripts
- are parsed.
-
- Contributed by Steve Chamberlain <sac@cygnus.com>. */
-
-#include "sysdep.h"
-#include "bfd.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;
-};
-
-static unsigned int symbol_truncate = 10000;
-static struct section_name_struct *order;
-static struct section_name_struct *only_load;
-static struct section_name_struct *address;
-static struct section_name_struct *alias;
-
-static struct section_name_struct *alignment;
-static struct section_name_struct *subalignment;
-
-static struct section_name_struct **
-lookup (const char *name, struct section_name_struct **list)
-{
- 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;
-
- /* 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, 0);
- base = 0;
- tmp = xmalloc (sizeof *tmp);
- tmp->next = NULL;
- tmp->spec.name = p->name;
- tmp->spec.exclude_name_list = NULL;
- tmp->spec.sorted = none;
- 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 = none;
- 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);
-}
-
-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 fcfba78b9407..000000000000
--- a/contrib/binutils/ld/mri.h
+++ /dev/null
@@ -1,37 +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., 51 Franklin Street - Fifth Floor, Boston, MA 02110-1301, USA. */
-
-#ifndef MRI_H
-#define MRI_H
-
-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 ab743eed7c91..000000000000
--- a/contrib/binutils/ld/pe-dll.c
+++ /dev/null
@@ -1,2864 +0,0 @@
-/* Routines to help build PEI-format DLLs (Win32 etc)
- Copyright 1998, 1999, 2000, 2001, 2002, 2003, 2004, 2005, 2006, 2007
- 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, 51 Franklin Street - Fifth Floor, Boston, MA
- 02110-1301, USA. */
-
-#include "sysdep.h"
-#include "bfd.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"
-
-#ifdef pe_use_x86_64
-
-#define PE_IDATA4_SIZE 8
-#define PE_IDATA5_SIZE 8
-#include "pep-dll.h"
-#undef AOUTSZ
-#define AOUTSZ PEPAOUTSZ
-#define PEAOUTHDR PEPAOUTHDR
-
-#else
-
-#include "pe-dll.h"
-
-#endif
-
-#ifndef PE_IDATA4_SIZE
-#define PE_IDATA4_SIZE 4
-#endif
-
-#ifndef PE_IDATA5_SIZE
-#define PE_IDATA5_SIZE 4
-#endif
-
-/* This file turns a regular Windows PE image into a DLL. Because of
- the complexity of this operation, it has been broken down into a
- number of separate modules which are all called by the main function
- 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 and ld/emultempl/pep.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$2 subsection. Each
- fixup entry contains pointer to symbol's address within .text section
- (marked with __fuN_<sym> symbol, where N is integer), pointer to DLL name
- (so, DLL name is referenced by multiple entries), and pointer to symbol
- name thunk. Symbol name thunk is singleton vector (__nm_th_<symbol>)
- pointing to IMAGE_IMPORT_BY_NAME structure (__nm_<symbol>) directly
- containing imported name. Here comes that "on the edge" problem mentioned
- above: PE specification rambles that name vector (OriginalFirstThunk)
- should run in parallel with addresses vector (FirstThunk), i.e. that they
- should have same number of elements and terminated with zero. We violate
- 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 and ld/emultempl/pep.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
-{
- const char *name;
- int len;
-}
-autofilter_entry_type;
-
-typedef struct
-{
- const char *target_name;
- const char *object_target;
- unsigned int imagebase_reloc;
- int pe_arch;
- int bfd_arch;
- bfd_boolean underscored;
- const autofilter_entry_type* autofilter_symbollist;
-}
-pe_details_type;
-
-static const autofilter_entry_type autofilter_symbollist_generic[] =
-{
- { STRING_COMMA_LEN (".text") },
- /* Entry point symbols. */
- { STRING_COMMA_LEN ("DllMain") },
- { STRING_COMMA_LEN ("DllMainCRTStartup") },
- { STRING_COMMA_LEN ("_DllMainCRTStartup") },
- /* Runtime pseudo-reloc. */
- { STRING_COMMA_LEN ("_pei386_runtime_relocator") },
- { STRING_COMMA_LEN ("do_pseudo_reloc") },
- { STRING_COMMA_LEN (NULL) }
-};
-
-static const autofilter_entry_type autofilter_symbollist_i386[] =
-{
- { STRING_COMMA_LEN (".text") },
- /* Entry point symbols, and entry hooks. */
- { STRING_COMMA_LEN ("cygwin_crt0") },
- { STRING_COMMA_LEN ("DllMain@12") },
- { STRING_COMMA_LEN ("DllEntryPoint@0") },
- { STRING_COMMA_LEN ("DllMainCRTStartup@12") },
- { STRING_COMMA_LEN ("_cygwin_dll_entry@12") },
- { STRING_COMMA_LEN ("_cygwin_crt0_common@8") },
- { STRING_COMMA_LEN ("_cygwin_noncygwin_dll_entry@12") },
- { STRING_COMMA_LEN ("cygwin_attach_dll") },
- { STRING_COMMA_LEN ("cygwin_premain0") },
- { STRING_COMMA_LEN ("cygwin_premain1") },
- { STRING_COMMA_LEN ("cygwin_premain2") },
- { STRING_COMMA_LEN ("cygwin_premain3") },
- /* Runtime pseudo-reloc. */
- { STRING_COMMA_LEN ("_pei386_runtime_relocator") },
- { STRING_COMMA_LEN ("do_pseudo_reloc") },
- /* Global vars that should not be exported. */
- { STRING_COMMA_LEN ("impure_ptr") },
- { STRING_COMMA_LEN ("_impure_ptr") },
- { STRING_COMMA_LEN ("_fmode") },
- { STRING_COMMA_LEN ("environ") },
- { STRING_COMMA_LEN (NULL) }
-};
-
-#define PE_ARCH_i386 1
-#define PE_ARCH_sh 2
-#define PE_ARCH_mips 3
-#define PE_ARCH_arm 4
-#define PE_ARCH_arm_epoc 5
-#define PE_ARCH_arm_wince 6
-
-static const pe_details_type pe_detail_list[] =
-{
- {
-#ifdef pe_use_x86_64
- "pei-x86-64",
- "pe-x86-64",
- 3 /* R_IMAGEBASE */,
-#else
- "pei-i386",
- "pe-i386",
- 7 /* R_IMAGEBASE */,
-#endif
- PE_ARCH_i386,
- bfd_arch_i386,
- TRUE,
- autofilter_symbollist_i386
- },
- {
- "pei-shl",
- "pe-shl",
- 16 /* R_SH_IMAGEBASE */,
- PE_ARCH_sh,
- bfd_arch_sh,
- TRUE,
- autofilter_symbollist_generic
- },
- {
- "pei-mips",
- "pe-mips",
- 34 /* MIPS_R_RVA */,
- PE_ARCH_mips,
- bfd_arch_mips,
- FALSE,
- autofilter_symbollist_generic
- },
- {
- "pei-arm-little",
- "pe-arm-little",
- 11 /* ARM_RVA32 */,
- PE_ARCH_arm,
- bfd_arch_arm,
- TRUE,
- autofilter_symbollist_generic
- },
- {
- "epoc-pei-arm-little",
- "epoc-pe-arm-little",
- 11 /* ARM_RVA32 */,
- PE_ARCH_arm_epoc,
- bfd_arch_arm,
- FALSE,
- autofilter_symbollist_generic
- },
- {
- "pei-arm-wince-little",
- "pe-arm-wince-little",
- 2, /* ARM_RVA32 on Windows CE, see bfd/coff-arm.c. */
- PE_ARCH_arm_wince,
- bfd_arch_arm,
- FALSE,
- autofilter_symbollist_generic
- },
- { NULL, NULL, 0, 0, 0, FALSE, NULL }
-};
-
-static const pe_details_type *pe_details;
-
-/* Do not specify library suffix explicitly, to allow for dllized versions. */
-static const autofilter_entry_type autofilter_liblist[] =
-{
- { STRING_COMMA_LEN ("libcegcc") },
- { STRING_COMMA_LEN ("libcygwin") },
- { STRING_COMMA_LEN ("libgcc") },
- { STRING_COMMA_LEN ("libstdc++") },
- { STRING_COMMA_LEN ("libmingw32") },
- { STRING_COMMA_LEN ("libmingwex") },
- { STRING_COMMA_LEN ("libg2c") },
- { STRING_COMMA_LEN ("libsupc++") },
- { STRING_COMMA_LEN ("libobjc") },
- { STRING_COMMA_LEN ("libgcj") },
- { STRING_COMMA_LEN (NULL) }
-};
-
-static const autofilter_entry_type autofilter_objlist[] =
-{
- { STRING_COMMA_LEN ("crt0.o") },
- { STRING_COMMA_LEN ("crt1.o") },
- { STRING_COMMA_LEN ("crt2.o") },
- { STRING_COMMA_LEN ("dllcrt1.o") },
- { STRING_COMMA_LEN ("dllcrt2.o") },
- { STRING_COMMA_LEN ("gcrt0.o") },
- { STRING_COMMA_LEN ("gcrt1.o") },
- { STRING_COMMA_LEN ("gcrt2.o") },
- { STRING_COMMA_LEN ("crtbegin.o") },
- { STRING_COMMA_LEN ("crtend.o") },
- { STRING_COMMA_LEN (NULL) }
-};
-
-static const autofilter_entry_type autofilter_symbolprefixlist[] =
-{
- /* _imp_ is treated specially, as it is always underscored. */
- /* { STRING_COMMA_LEN ("_imp_") }, */
- /* Don't export some c++ symbols. */
- { STRING_COMMA_LEN ("__rtti_") },
- { STRING_COMMA_LEN ("__builtin_") },
- /* Don't re-export auto-imported symbols. */
- { STRING_COMMA_LEN ("_nm_") },
- /* Don't export symbols specifying internal DLL layout. */
- { STRING_COMMA_LEN ("_head_") },
- { STRING_COMMA_LEN (NULL) }
-};
-
-static const autofilter_entry_type autofilter_symbolsuffixlist[] =
-{
- { STRING_COMMA_LEN ("_iname") },
- { STRING_COMMA_LEN (NULL) }
-};
-
-#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);
-}
-
-static bfd_boolean
-is_import (const char* n)
-{
- return (CONST_STRNEQ (n, "__imp_"));
-}
-
-/* abfd is a bfd containing n (or NULL)
- It can be used for contextual checks. */
-
-static int
-auto_export (bfd *abfd, def_file *d, const char *n)
-{
- int i;
- struct exclude_list_struct *ex;
- const autofilter_entry_type *afptr;
- const char * libname = 0;
- if (abfd && abfd->my_archive)
- libname = lbasename (abfd->my_archive->filename);
-
- 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. Instead we have
- a target specific list to use: */
- afptr = pe_details->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)
- {
- long size = s->size;
- 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->executable)
- 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;
- if (is_import (sn))
- continue;
-
- name = xmalloc (strlen ("__imp_") + strlen (sn) + 1);
- sprintf (name, "%s%s", "__imp_", sn);
-
- blhe = bfd_link_hash_lookup (info->hash, name,
- FALSE, FALSE, FALSE);
- free (name);
-
- if (blhe && blhe->type == bfd_link_hash_defined)
- continue;
- }
-
- if (pe_details->underscored && *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);
- char *tmp_at = strchr (tmp, '@');
-
- if (tmp_at)
- *tmp_at = 0;
- else
- einfo (_("%XCannot export %s: invalid export name\n"),
- pe_def_file->exports[i].name);
- pe_def_file->exports[i].name = tmp;
- }
- }
- }
-
- if (pe_dll_stdcall_aliases)
- {
- for (i = 0; i < NE; i++)
- {
- if (is_import (pe_def_file->exports[i].name))
- continue;
-
- if (strchr (pe_def_file->exports[i].name, '@'))
- {
- int lead_at = (*pe_def_file->exports[i].name == '@');
- 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;
-
- /* Check for forward exports */
- if (strchr (pe_def_file->exports[i].internal_name, '.'))
- {
- count_exported++;
- if (!pe_def_file->exports[i].flag_noname)
- count_exported_byname++;
-
- pe_def_file->exports[i].flag_forward = 1;
-
- if (pe_def_file->exports[i].ordinal != -1)
- {
- if (max_ordinal < pe_def_file->exports[i].ordinal)
- max_ordinal = pe_def_file->exports[i].ordinal;
- if (min_ordinal > pe_def_file->exports[i].ordinal)
- min_ordinal = pe_def_file->exports[i].ordinal;
- count_with_ordinals++;
- }
-
- continue;
- }
-
- name = xmalloc (strlen (pe_def_file->exports[i].internal_name) + 2);
- if (pe_details->underscored
- && (*pe_def_file->exports[i].internal_name != '@'))
- {
- *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] ||
- pe_def_file->exports[i].flag_forward)
- {
- 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;
- }
-
- /* Reserve space for the forward name. */
- if (pe_def_file->exports[i].flag_forward)
- {
- name_table_size += strlen (pe_def_file->exports[i].internal_name) + 1;
- }
- }
-
- next_ordinal = min_ordinal;
- for (i = 0; i < NE; i++)
- if ((exported_symbol_sections[i] ||
- pe_def_file->exports[i].flag_forward) &&
- pe_def_file->exports[i].ordinal == -1)
- {
- while (exported_symbols[next_ordinal - min_ordinal] != -1)
- next_ordinal++;
-
- exported_symbols[next_ordinal - min_ordinal] = i;
- pe_def_file->exports[i].ordinal = next_ordinal;
- }
-
- /* 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;
- 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 = (char *) 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 (pe_def_file->exports[s].ordinal != -1 &&
- (pe_def_file->exports[s].flag_forward || ssec != NULL))
- {
- int ord = pe_def_file->exports[s].ordinal;
-
- if (pe_def_file->exports[s].flag_forward)
- {
- bfd_put_32 (abfd, ERVA (enamestr),
- eaddresses + 4 * (ord - min_ordinal));
-
- strcpy (enamestr, pe_def_file->exports[s].internal_name);
- enamestr += strlen (pe_def_file->exports[s].internal_name) + 1;
- }
- else
- {
- unsigned long srva = (exported_symbol_offsets[s]
- + ssec->output_section->vma
- + ssec->output_offset);
-
- bfd_put_32 (abfd, srva - image_base,
- eaddresses + 4 * (ord - min_ordinal));
- }
-
- if (!pe_def_file->exports[s].flag_noname)
- {
- 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)
- {
-#ifdef pe_use_x86_64
- case BITS_AND_SHIFT (64, 0):
- reloc_data[total_relocs].type = 10;
- total_relocs++;
- break;
-#endif
- case BITS_AND_SHIFT (32, 0):
- reloc_data[total_relocs].type = 3;
- total_relocs++;
- 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! */
- }
- }
-
- /* 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->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, PE_IDATA5_SIZE);
- d5 = xmalloc (PE_IDATA5_SIZE);
- id5->contents = d5;
- memset (d5, 0, PE_IDATA5_SIZE);
-
- bfd_set_section_size (abfd, id4, PE_IDATA4_SIZE);
- d4 = xmalloc (PE_IDATA4_SIZE);
- id4->contents = d4;
- memset (d4, 0, PE_IDATA4_SIZE);
-
- bfd_set_symtab (abfd, symtab, symptr);
-
- bfd_set_section_contents (abfd, id2, d2, 0, 20);
- bfd_set_section_contents (abfd, id5, d5, 0, PE_IDATA5_SIZE);
- bfd_set_section_contents (abfd, id4, d4, 0, PE_IDATA4_SIZE);
-
- bfd_make_readable (abfd);
- return abfd;
-}
-
-/* .section .idata$4
- .long 0
- [.long 0] for PE+
- .section .idata$5
- .long 0
- [.long 0] for PE+
- .section idata$7
- .global __my_dll_iname
- __my_dll_iname:
- .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, PE_IDATA4_SIZE);
- d4 = xmalloc (PE_IDATA4_SIZE);
- id4->contents = d4;
- memset (d4, 0, PE_IDATA4_SIZE);
-
- bfd_set_section_size (abfd, id5, PE_IDATA5_SIZE);
- d5 = xmalloc (PE_IDATA5_SIZE);
- id5->contents = d5;
- memset (d5, 0, PE_IDATA5_SIZE);
-
- len = strlen (dll_filename) + 1;
- if (len & 1)
- len++;
- bfd_set_section_size (abfd, id7, len);
- d7 = xmalloc (len);
- id7->contents = d7;
- strcpy ((char *) d7, dll_filename);
- /* If len was odd, the above
- strcpy leaves behind an undefined byte. That is harmless,
- but we set it to 0 just so the binary dumps are pretty. */
- d7[len - 1] = 0;
-
- bfd_set_symtab (abfd, symtab, symptr);
-
- bfd_set_section_contents (abfd, id4, d4, 0, PE_IDATA4_SIZE);
- bfd_set_section_contents (abfd, id5, d5, 0, PE_IDATA5_SIZE);
- bfd_set_section_contents (abfd, id7, d7, 0, len);
-
- bfd_make_readable (abfd);
- 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 const 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 const 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 const unsigned char jmp_mips_bytes[] =
-{
- 0x00, 0x00, 0x08, 0x3c, 0x00, 0x00, 0x08, 0x8d,
- 0x08, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x00
-};
-
-static const unsigned char jmp_arm_bytes[] =
-{
- 0x00, 0xc0, 0x9f, 0xe5, /* ldr ip, [pc] */
- 0x00, 0xf0, 0x9c, 0xe5, /* ldr pc, [ip] */
- 0, 0, 0, 0
-};
-
-
-static bfd *
-make_one (def_file_export *exp, bfd *parent, bfd_boolean include_jmp_stub)
-{
- asection *tx, *id7, *id5, *id4, *id6;
- unsigned char *td = NULL, *d7, *d5, *d4, *d6 = NULL;
- int len;
- char *oname;
- bfd *abfd;
- const unsigned char *jmp_bytes = NULL;
- int jmp_byte_count = 0;
-
- /* Include the jump stub section only if it is needed. A jump
- stub is needed if the symbol being imported <sym> is a function
- symbol and there is at least one undefined reference to that
- symbol. In other words, if all the import references to <sym> are
- explicitly through _declspec(dllimport) then the jump stub is not
- needed. */
- if (include_jmp_stub)
- {
- switch (pe_details->pe_arch)
- {
- case PE_ARCH_i386:
- jmp_bytes = jmp_ix86_bytes;
- jmp_byte_count = sizeof (jmp_ix86_bytes);
- break;
- case PE_ARCH_sh:
- jmp_bytes = jmp_sh_bytes;
- jmp_byte_count = sizeof (jmp_sh_bytes);
- break;
- case PE_ARCH_mips:
- jmp_bytes = jmp_mips_bytes;
- jmp_byte_count = sizeof (jmp_mips_bytes);
- break;
- case PE_ARCH_arm:
- case PE_ARCH_arm_epoc:
- case PE_ARCH_arm_wince:
- jmp_bytes = jmp_arm_bytes;
- jmp_byte_count = sizeof (jmp_arm_bytes);
- break;
- default:
- abort ();
- }
- }
-
- oname = xmalloc (20);
- 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 (include_jmp_stub)
- quick_symbol (abfd, "", exp->internal_name, "", tx, BSF_GLOBAL, 0);
- quick_symbol (abfd, "__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 (include_jmp_stub)
- quick_symbol (abfd, U (""), exp->internal_name, "", tx,
- BSF_GLOBAL, 0);
- quick_symbol (abfd, "__imp_", U (""), exp->internal_name, id5,
- BSF_GLOBAL, 0);
- /* Symbol to reference ord/name of imported
- data symbol, used to implement auto-import. */
- if (exp->flag_data)
- quick_symbol (abfd, U ("_nm_"), U (""), exp->internal_name, id6,
- BSF_GLOBAL,0);
- }
- if (pe_dll_compat_implib)
- quick_symbol (abfd, U ("__imp_"), exp->internal_name, "", id5,
- BSF_GLOBAL, 0);
-
- if (include_jmp_stub)
- {
- 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:
-#ifdef pe_use_x86_64
- quick_reloc (abfd, 2, BFD_RELOC_32_PCREL, 2);
-#else
- quick_reloc (abfd, 2, BFD_RELOC_32, 2);
-#endif
- break;
- case PE_ARCH_sh:
- quick_reloc (abfd, 8, BFD_RELOC_32, 2);
- 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;
- case PE_ARCH_arm:
- case PE_ARCH_arm_epoc:
- case PE_ARCH_arm_wince:
- quick_reloc (abfd, 8, BFD_RELOC_32, 2);
- break;
- default:
- abort ();
- }
- save_relocs (tx);
- }
- else
- bfd_set_section_size (abfd, tx, 0);
-
- bfd_set_section_size (abfd, id7, 4);
- d7 = xmalloc (4);
- id7->contents = d7;
- memset (d7, 0, 4);
- quick_reloc (abfd, 0, BFD_RELOC_RVA, 5);
- save_relocs (id7);
-
- bfd_set_section_size (abfd, id5, PE_IDATA5_SIZE);
- d5 = xmalloc (PE_IDATA5_SIZE);
- id5->contents = d5;
- memset (d5, 0, PE_IDATA5_SIZE);
-
- if (exp->flag_noname)
- {
- d5[0] = exp->ordinal;
- d5[1] = exp->ordinal >> 8;
- d5[PE_IDATA5_SIZE - 1] = 0x80;
- }
- else
- {
- quick_reloc (abfd, 0, BFD_RELOC_RVA, 4);
- save_relocs (id5);
- }
-
- bfd_set_section_size (abfd, id4, PE_IDATA4_SIZE);
- d4 = xmalloc (PE_IDATA4_SIZE);
- id4->contents = d4;
- memset (d4, 0, PE_IDATA4_SIZE);
-
- if (exp->flag_noname)
- {
- d4[0] = exp->ordinal;
- d4[1] = exp->ordinal >> 8;
- d4[PE_IDATA4_SIZE - 1] = 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
- {
- /* { short, asciz } */
- len = 2 + strlen (exp->name) + 1;
- 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 ((char *) d6 + 2, exp->name);
- }
-
- bfd_set_symtab (abfd, symtab, symptr);
-
- if (include_jmp_stub)
- bfd_set_section_contents (abfd, tx, td, 0, jmp_byte_count);
- bfd_set_section_contents (abfd, id7, d7, 0, 4);
- bfd_set_section_contents (abfd, id5, d5, 0, PE_IDATA5_SIZE);
- bfd_set_section_contents (abfd, id4, d4, 0, PE_IDATA4_SIZE);
- if (!exp->flag_noname)
- bfd_set_section_contents (abfd, id6, d6, 0, len);
-
- 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);
-
- /* We need space for the real thunk and for the null terminator. */
- bfd_set_section_size (abfd, id4, PE_IDATA4_SIZE * 2);
- d4 = xmalloc (PE_IDATA4_SIZE * 2);
- id4->contents = d4;
- memset (d4, 0, PE_IDATA4_SIZE * 2);
- quick_reloc (abfd, 0, BFD_RELOC_RVA, 2);
- save_relocs (id4);
-
- bfd_set_symtab (abfd, symtab, symptr);
-
- bfd_set_section_contents (abfd, id4, d4, 0, PE_IDATA4_SIZE * 2);
-
- 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);
-
- return fixup_name;
-}
-
-/* .section .idata$2
- .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 *id2;
- unsigned char *d2;
- 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 *));
- id2 = quick_section (abfd, ".idata$2", SEC_HAS_CONTENTS, 2);
-
- 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, id2, 20);
- d2 = xmalloc (20);
- id2->contents = d2;
- memset (d2, 0, 20);
-
- quick_reloc (abfd, 0, BFD_RELOC_RVA, 1);
- quick_reloc (abfd, 12, BFD_RELOC_RVA, 2);
- quick_reloc (abfd, 16, BFD_RELOC_RVA, 3);
- save_relocs (id2);
-
- bfd_set_symtab (abfd, symtab, symptr);
-
- bfd_set_section_contents (abfd, id2, d2, 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, "", U ("_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_if_ordinary (impfilename);
-
- outarch = bfd_openw (impfilename, 0);
-
- if (!outarch)
- {
- /* xgettext:c-format */
- einfo (_("%XCan't open .lib file: %s\n"), impfilename);
- return;
- }
-
- /* xgettext:c-format */
- info_msg (_("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,
- ! (def->exports + i)->flag_data);
- n->archive_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->archive_next = head;
- ar_tail->archive_next = ar_head;
- head = ar_tail;
-
- if (! bfd_set_archive_head (outarch, head))
- einfo ("%Xbfd_set_archive_head: %E\n");
-
- if (! bfd_close (outarch))
- einfo ("%Xbfd_close %s: %E\n", impfilename);
-
- while (head != NULL)
- {
- bfd *n = head->archive_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: %E\n", name);
-}
-
-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);
- bfd_boolean include_jmp_stub = FALSE;
-
- if (lead_at)
- sprintf (name, "%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);
-
- /* Include the jump stub for <sym> only if the <sym>
- is undefined. */
- if (!blhe || (blhe && blhe->type != bfd_link_hash_undefined))
- {
- if (lead_at)
- sprintf (name, "%s%s", "__imp_",
- pe_def_file->imports[i].internal_name);
- else
- sprintf (name, "%s%s%s", "__imp_", U (""),
- pe_def_file->imports[i].internal_name);
-
- blhe = bfd_link_hash_lookup (link_info->hash, name,
- FALSE, FALSE, FALSE);
- }
- else
- include_jmp_stub = TRUE;
-
- free (name);
-
- if (blhe && blhe->type == bfd_link_hash_undefined)
- {
- 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, (! exp.flag_data) && include_jmp_stub);
- 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);
-}
-
-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;
- char *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: %E\n", filename);
- 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;
-#ifdef pe_use_x86_64
- num_entries = pe_get32 (dll, opthdr_ofs + 92 + 4 * 4); /* & NumberOfRvaAndSizes. */
-#else
- num_entries = pe_get32 (dll, opthdr_ofs + 92);
-#endif
-
- if (num_entries < 1) /* No exports. */
- return FALSE;
-
-#ifdef pe_use_x86_64
- export_rva = pe_get32 (dll, opthdr_ofs + 96 + 4 * 4);
- export_size = pe_get32 (dll, opthdr_ofs + 100 + 4 * 4);
-#else
- export_rva = pe_get32 (dll, opthdr_ofs + 96);
- export_size = pe_get32 (dll, opthdr_ofs + 100);
-#endif
-
- nsections = pe_get16 (dll, pe_header_offset + 4 + 2);
- secptr = (pe_header_offset + 4 + 20 +
- pe_get16 (dll, pe_header_offset + 4 + 16));
- 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 = (char *) 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 = erva + pe_as32 (expdata + 12);
-
- /* Check to see if the dll has already been added to
- the definition list and if so return without error.
- 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 (! CONST_STRNEQ (erva + name_rva, "_nm_"))
- {
- /* 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_reset_memory_regions ();
- lang_size_sections (NULL, TRUE);
-
- /* Redo special stuff. */
- ldemul_after_allocation ();
-
- /* Do the assignments again. */
- lang_do_assignments ();
- }
-
- fill_edata (abfd, info);
-
- if (info->shared && !info->pie)
- 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_reset_memory_regions ();
- lang_size_sections (NULL, TRUE);
-
- /* Redo special stuff. */
- ldemul_after_allocation ();
-
- /* Do the assignments again. */
- lang_do_assignments ();
- }
- reloc_s->contents = reloc_d;
-}
-
-bfd_boolean
-pe_bfd_is_dll (bfd *abfd)
-{
- return (bfd_get_format (abfd) == bfd_object
- && obj_pe (abfd)
- && pe_data (abfd)->dll);
-}
diff --git a/contrib/binutils/ld/pe-dll.h b/contrib/binutils/ld/pe-dll.h
deleted file mode 100644
index 03b755d9c619..000000000000
--- a/contrib/binutils/ld/pe-dll.h
+++ /dev/null
@@ -1,66 +0,0 @@
-/* pe-dll.h: Header file for routines used to build Windows DLLs.
- Copyright 1999, 2000, 2001, 2002, 2003, 2007
- Free Software Foundation, Inc.
-
- This file is part of GLD, the Gnu Linker.
-
- GLD is free software; you can redistribute it and/or modify
- it under the terms of the GNU General Public License as published by
- the Free Software Foundation; either version 2, or (at your option)
- any later version.
-
- GLD is distributed in the hope that it will be useful,
- but WITHOUT ANY WARRANTY; without even the implied warranty of
- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- GNU General Public License for more details.
-
- You should have received a copy of the GNU General Public License
- along with GLD; see the file COPYING. If not, write to the Free
- Software Foundation, 51 Franklin Street - Fifth Floor, Boston, MA
- 02110-1301, USA. */
-
-#ifndef PE_DLL_H
-#define PE_DLL_H
-
-#include "sysdep.h"
-#include "bfd.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);
-extern bfd_boolean pe_bfd_is_dll
- (bfd *);
-
-#endif /* PE_DLL_H */
diff --git a/contrib/binutils/ld/pep-dll.c b/contrib/binutils/ld/pep-dll.c
deleted file mode 100644
index e1826dbbcea4..000000000000
--- a/contrib/binutils/ld/pep-dll.c
+++ /dev/null
@@ -1,58 +0,0 @@
-/* Routines to help build PEPI-format DLLs (Win64 etc)
- Copyright 2006 Free Software Foundation, Inc.
-
- This file is part of BFD, the Binary File Descriptor library.
-
- This program is free software; you can redistribute it and/or modify
- it under the terms of the GNU General Public License as published by
- the Free Software Foundation; either version 2 of the License, or
- (at your option) any later version.
-
- This program is distributed in the hope that it will be useful,
- but WITHOUT ANY WARRANTY; without even the implied warranty of
- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- GNU General Public License for more details.
-
- You should have received a copy of the GNU General Public License
- along with this program; if not, write to the Free Software
- Foundation, Inc., 51 Franklin Street - Fifth Floor, Boston, MA 02110-1301, USA.
-
- Written by Kai Tietz, OneVision Software GmbH&CoKg. */
-
-#define COFF_IMAGE_WITH_PE
-#define COFF_WITH_PE
-#define COFF_WITH_pex64
-
-/* Local defined globals. */
-#define pe_def_file pep_def_file
-#define pe_details pep_details
-#define pe_dll_compat_implib pep_dll_compat_implib
-#define pe_dll_extra_pe_debug pep_dll_extra_pe_debug
-#define pe_dll_export_everything pep_dll_export_everything
-#define pe_dll_do_default_excludes pep_dll_do_default_excludes
-#define pe_dll_kill_ats pep_dll_kill_ats
-#define pe_dll_stdcall_aliases pep_dll_stdcall_aliases
-#define pe_dll_warn_dup_exports pep_dll_warn_dup_exports
-
-/* External globals. */
-#define pe_data_import_dll pep_data_import_dll
-
-/* Unique global name for functions to avoid double defined symbols. */
-#define pe_create_import_fixup pep_create_import_fixup
-#define pe_dll_generate_def_file pep_dll_generate_def_file
-#define pe_process_import_defs pep_process_import_defs
-#define pe_dll_id_target pep_dll_id_target
-#define pe_implied_import_dll pep_implied_import_dll
-#define pe_dll_build_sections pep_dll_build_sections
-#define pe_exe_build_sections pep_exe_build_sections
-#define pe_dll_fill_sections pep_dll_fill_sections
-#define pe_exe_fill_sections pep_exe_fill_sections
-#define pe_dll_generate_implib pep_dll_generate_implib
-#define pe_dll_add_excludes pep_dll_add_excludes
-#define pe_walk_relocs_of_symbol pep_walk_relocs_of_symbol
-#define pe_bfd_is_dll pep_bfd_is_dll
-
-/* Uses x86_64 PE+. */
-#define pe_use_x86_64
-
-#include "pe-dll.c"
diff --git a/contrib/binutils/ld/pep-dll.h b/contrib/binutils/ld/pep-dll.h
deleted file mode 100644
index ee8a44af682a..000000000000
--- a/contrib/binutils/ld/pep-dll.h
+++ /dev/null
@@ -1,54 +0,0 @@
-/* pep-dll.h: Header file for routines used to build Windows DLLs.
- Copyright 2006, 2007 Free Software Foundation, Inc.
-
- This file is part of BFD, the Binary File Descriptor library.
-
- This program is free software; you can redistribute it and/or modify
- it under the terms of the GNU General Public License as published by
- the Free Software Foundation; either version 2 of the License, or
- (at your option) any later version.
-
- This program is distributed in the hope that it will be useful,
- but WITHOUT ANY WARRANTY; without even the implied warranty of
- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- GNU General Public License for more details.
-
- You should have received a copy of the GNU General Public License
- along with this program; if not, write to the Free Software
- Foundation, Inc., 51 Franklin Street - Fifth Floor, Boston, MA 02110-1301, USA.
-
- Written by Kai Tietz, OneVision Software GmbH&CoKg. */
-
-#ifndef PEP_DLL_H
-#define PEP_DLL_H
-
-#include "sysdep.h"
-#include "bfd.h"
-#include "bfdlink.h"
-#include "deffile.h"
-
-extern def_file * pep_def_file;
-extern int pep_dll_export_everything;
-extern int pep_dll_do_default_excludes;
-extern int pep_dll_kill_ats;
-extern int pep_dll_stdcall_aliases;
-extern int pep_dll_warn_dup_exports;
-extern int pep_dll_compat_implib;
-extern int pep_dll_extra_pe_debug;
-
-extern void pep_dll_id_target (const char *);
-extern void pep_dll_add_excludes (const char *, const int);
-extern void pep_dll_generate_def_file (const char *);
-extern void pep_dll_generate_implib (def_file *, const char *);
-extern void pep_process_import_defs (bfd *, struct bfd_link_info *);
-extern bfd_boolean pep_implied_import_dll (const char *);
-extern void pep_dll_build_sections (bfd *, struct bfd_link_info *);
-extern void pep_exe_build_sections (bfd *, struct bfd_link_info *);
-extern void pep_dll_fill_sections (bfd *, struct bfd_link_info *);
-extern void pep_exe_fill_sections (bfd *, struct bfd_link_info *);
-extern void pep_walk_relocs_of_symbol
- (struct bfd_link_info *, const char *, int (*) (arelent *, asection *));
-extern void pep_create_import_fixup (arelent * rel, asection *, int);
-extern bfd_boolean pep_bfd_is_dll (bfd *);
-
-#endif /* PEP_DLL_H */
diff --git a/contrib/binutils/ld/po/Make-in b/contrib/binutils/ld/po/Make-in
deleted file mode 100644
index b4ffbb79430b..000000000000
--- a/contrib/binutils/ld/po/Make-in
+++ /dev/null
@@ -1,256 +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>
-# Copyright 2003, 2006 Free Software Foundation, Inc.
-#
-# This file may be copied and used freely without restrictions. It can
-# be used in projects which are not available under the GNU Public License
-# but which still want to provide support for the GNU gettext functionality.
-# Please note that the actual code is *not* freely available.
-
-PACKAGE = @PACKAGE@
-VERSION = @VERSION@
-
-SHELL = /bin/sh
-@SET_MAKE@
-
-srcdir = @srcdir@
-top_srcdir = @top_srcdir@
-VPATH = @srcdir@
-top_builddir = @top_builddir@
-
-prefix = @prefix@
-exec_prefix = @exec_prefix@
-datadir = $(prefix)/@DATADIRNAME@
-localedir = $(datadir)/locale
-gnulocaledir = $(prefix)/share/locale
-gettextsrcdir = $(prefix)/share/gettext/po
-subdir = po
-
-DESTDIR =
-
-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=`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-html:
-install-data: install-data-@USE_NLS@
-install-data-no: all
-install-data-yes: all
- if test -r $(MKINSTALLDIRS); then \
- $(MKINSTALLDIRS) $(DESTDIR)$(datadir); \
- else \
- $(top_srcdir)/mkinstalldirs $(DESTDIR)$(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)$$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) $(DESTDIR)$(gettextsrcdir); \
- else \
- $(top_srcdir)/mkinstalldirs $(DESTDIR)$(gettextsrcdir); \
- fi; \
- $(INSTALL_DATA) $(srcdir)/Makefile.in.in \
- $(DESTDIR)$(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 $(DESTDIR)$(localedir)/$$lang/LC_MESSAGES/$(PACKAGE)$(INSTOBJEXT); \
- rm -f $(DESTDIR)$(localedir)/$$lang/LC_MESSAGES/$(PACKAGE)$(INSTOBJEXT).m; \
- rm -f $(DESTDIR)$(gnulocaledir)/$$lang/LC_MESSAGES/$(PACKAGE)$(INSTOBJEXT); \
- rm -f $(DESTDIR)$(gnulocaledir)/$$lang/LC_MESSAGES/$(PACKAGE)$(INSTOBJEXT).m; \
- done
- rm -f $(DESTDIR)$(gettextsrcdir)/po-Makefile.in.in
-
-check: all
-
-cat-id-tbl.o: ../intl/libgettext.h
-
-html dvi pdf ps 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 3118cfa4b5f7..000000000000
--- a/contrib/binutils/ld/po/POTFILES.in
+++ /dev/null
@@ -1,32 +0,0 @@
-deffile.h
-elf-hints-local.h
-emultempl/armcoff.em
-emultempl/pe.em
-ldcref.c
-ldctor.c
-ldctor.h
-ldemul.c
-ldemul.h
-ldexp.c
-ldexp.h
-ldfile.c
-ldfile.h
-ld.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
-pep-dll.c
-pep-dll.h
diff --git a/contrib/binutils/ld/po/ld.pot b/contrib/binutils/ld/po/ld.pot
deleted file mode 100644
index 155f20e1c182..000000000000
--- a/contrib/binutils/ld/po/ld.pot
+++ /dev/null
@@ -1,1977 +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"
-"Report-Msgid-Bugs-To: \n"
-"POT-Creation-Date: 2007-06-27 16:44+0930\n"
-"PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n"
-"Last-Translator: FULL NAME <EMAIL@ADDRESS>\n"
-"Language-Team: LANGUAGE <LL@li.org>\n"
-"MIME-Version: 1.0\n"
-"Content-Type: text/plain; charset=CHARSET\n"
-"Content-Transfer-Encoding: 8bit\n"
-
-#: emultempl/armcoff.em:72
-#, c-format
-msgid " --support-old-code Support interworking with old code\n"
-msgstr ""
-
-#: emultempl/armcoff.em:73
-#, c-format
-msgid " --thumb-entry=<sym> Set the entry point to be Thumb symbol <sym>\n"
-msgstr ""
-
-#: emultempl/armcoff.em:121
-#, c-format
-msgid "Errors encountered processing file %s"
-msgstr ""
-
-#: emultempl/armcoff.em:189 emultempl/pe.em:1528
-msgid "%P: warning: '--thumb-entry %s' is overriding '-e %s'\n"
-msgstr ""
-
-#: emultempl/armcoff.em:194 emultempl/pe.em:1533
-msgid "%P: warning: connot find thumb start symbol %s\n"
-msgstr ""
-
-#: emultempl/pe.em:311
-#, c-format
-msgid ""
-" --base_file <basefile> Generate a base file for relocatable "
-"DLLs\n"
-msgstr ""
-
-#: emultempl/pe.em:312
-#, c-format
-msgid ""
-" --dll Set image base to the default for DLLs\n"
-msgstr ""
-
-#: emultempl/pe.em:313
-#, c-format
-msgid " --file-alignment <size> Set file alignment\n"
-msgstr ""
-
-#: emultempl/pe.em:314
-#, c-format
-msgid " --heap <size> Set initial size of the heap\n"
-msgstr ""
-
-#: emultempl/pe.em:315
-#, c-format
-msgid ""
-" --image-base <address> Set start address of the executable\n"
-msgstr ""
-
-#: emultempl/pe.em:316
-#, c-format
-msgid ""
-" --major-image-version <number> Set version number of the executable\n"
-msgstr ""
-
-#: emultempl/pe.em:317
-#, c-format
-msgid " --major-os-version <number> Set minimum required OS version\n"
-msgstr ""
-
-#: emultempl/pe.em:318
-#, c-format
-msgid ""
-" --major-subsystem-version <number> Set minimum required OS subsystem "
-"version\n"
-msgstr ""
-
-#: emultempl/pe.em:319
-#, c-format
-msgid ""
-" --minor-image-version <number> Set revision number of the executable\n"
-msgstr ""
-
-#: emultempl/pe.em:320
-#, c-format
-msgid " --minor-os-version <number> Set minimum required OS revision\n"
-msgstr ""
-
-#: emultempl/pe.em:321
-#, c-format
-msgid ""
-" --minor-subsystem-version <number> Set minimum required OS subsystem "
-"revision\n"
-msgstr ""
-
-#: emultempl/pe.em:322
-#, c-format
-msgid " --section-alignment <size> Set section alignment\n"
-msgstr ""
-
-#: emultempl/pe.em:323
-#, c-format
-msgid " --stack <size> Set size of the initial stack\n"
-msgstr ""
-
-#: emultempl/pe.em:324
-#, c-format
-msgid ""
-" --subsystem <name>[:<version>] Set required OS subsystem [& version]\n"
-msgstr ""
-
-#: emultempl/pe.em:325
-#, c-format
-msgid ""
-" --support-old-code Support interworking with old code\n"
-msgstr ""
-
-#: emultempl/pe.em:326
-#, c-format
-msgid ""
-" --thumb-entry=<symbol> Set the entry point to be Thumb "
-"<symbol>\n"
-msgstr ""
-
-#: emultempl/pe.em:328
-#, c-format
-msgid ""
-" --add-stdcall-alias Export symbols with and without @nn\n"
-msgstr ""
-
-#: emultempl/pe.em:329
-#, c-format
-msgid " --disable-stdcall-fixup Don't link _sym to _sym@nn\n"
-msgstr ""
-
-#: emultempl/pe.em:330
-#, c-format
-msgid ""
-" --enable-stdcall-fixup Link _sym to _sym@nn without warnings\n"
-msgstr ""
-
-#: emultempl/pe.em:331
-#, c-format
-msgid ""
-" --exclude-symbols sym,sym,... Exclude symbols from automatic export\n"
-msgstr ""
-
-#: emultempl/pe.em:332
-#, c-format
-msgid ""
-" --exclude-libs lib,lib,... Exclude libraries from automatic "
-"export\n"
-msgstr ""
-
-#: emultempl/pe.em:333
-#, c-format
-msgid ""
-" --export-all-symbols Automatically export all globals to "
-"DLL\n"
-msgstr ""
-
-#: emultempl/pe.em:334
-#, c-format
-msgid " --kill-at Remove @nn from exported symbols\n"
-msgstr ""
-
-#: emultempl/pe.em:335
-#, c-format
-msgid " --out-implib <file> Generate import library\n"
-msgstr ""
-
-#: emultempl/pe.em:336
-#, c-format
-msgid ""
-" --output-def <file> Generate a .DEF file for the built DLL\n"
-msgstr ""
-
-#: emultempl/pe.em:337
-#, c-format
-msgid " --warn-duplicate-exports Warn about duplicate exports.\n"
-msgstr ""
-
-#: emultempl/pe.em:338
-#, c-format
-msgid ""
-" --compat-implib Create backward compatible import "
-"libs;\n"
-" create __imp_<SYMBOL> as well.\n"
-msgstr ""
-
-#: emultempl/pe.em:340
-#, c-format
-msgid ""
-" --enable-auto-image-base Automatically choose image base for "
-"DLLs\n"
-" unless user specifies one\n"
-msgstr ""
-
-#: emultempl/pe.em:342
-#, c-format
-msgid ""
-" --disable-auto-image-base Do not auto-choose image base. "
-"(default)\n"
-msgstr ""
-
-#: emultempl/pe.em:343
-#, c-format
-msgid ""
-" --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"
-msgstr ""
-
-#: emultempl/pe.em:346
-#, c-format
-msgid ""
-" --enable-auto-import Do sophistcated linking of _sym to\n"
-" __imp_sym for DATA references\n"
-msgstr ""
-
-#: emultempl/pe.em:348
-#, c-format
-msgid ""
-" --disable-auto-import Do not auto-import DATA items from "
-"DLLs\n"
-msgstr ""
-
-#: emultempl/pe.em:349
-#, c-format
-msgid ""
-" --enable-runtime-pseudo-reloc Work around auto-import limitations by\n"
-" adding pseudo-relocations resolved "
-"at\n"
-" runtime.\n"
-msgstr ""
-
-#: emultempl/pe.em:352
-#, c-format
-msgid ""
-" --disable-runtime-pseudo-reloc Do not add runtime pseudo-relocations "
-"for\n"
-" auto-imported DATA.\n"
-msgstr ""
-
-#: emultempl/pe.em:354
-#, c-format
-msgid ""
-" --enable-extra-pe-debug Enable verbose debug output when "
-"building\n"
-" or linking to DLLs (esp. auto-"
-"import)\n"
-msgstr ""
-
-#: emultempl/pe.em:357
-#, c-format
-msgid ""
-" --large-address-aware Executable supports virtual addresses\n"
-" greater than 2 gigabytes\n"
-msgstr ""
-
-#: emultempl/pe.em:424
-msgid "%P: warning: bad version number in -subsystem option\n"
-msgstr ""
-
-#: emultempl/pe.em:455
-msgid "%P%F: invalid subsystem type %s\n"
-msgstr ""
-
-#: emultempl/pe.em:494
-msgid "%P%F: invalid hex number for PE parameter '%s'\n"
-msgstr ""
-
-#: emultempl/pe.em:511
-msgid "%P%F: strange hex info for PE parameter '%s'\n"
-msgstr ""
-
-#: emultempl/pe.em:528
-#, c-format
-msgid "%s: Can't open base file %s\n"
-msgstr ""
-
-#: emultempl/pe.em:744
-msgid "%P: warning, file alignment > section alignment.\n"
-msgstr ""
-
-#: emultempl/pe.em:831 emultempl/pe.em:858
-#, c-format
-msgid "Warning: resolving %s by linking to %s\n"
-msgstr ""
-
-#: emultempl/pe.em:836 emultempl/pe.em:863
-msgid "Use --enable-stdcall-fixup to disable these warnings\n"
-msgstr ""
-
-#: emultempl/pe.em:837 emultempl/pe.em:864
-msgid "Use --disable-stdcall-fixup to disable these fixups\n"
-msgstr ""
-
-#: emultempl/pe.em:883
-#, c-format
-msgid "%C: Cannot get section contents - auto-import exception\n"
-msgstr ""
-
-#: emultempl/pe.em:920
-#, c-format
-msgid "Info: resolving %s by linking to %s (auto-import)\n"
-msgstr ""
-
-#: emultempl/pe.em:992
-msgid "%F%P: cannot perform PE operations on non PE output file '%B'.\n"
-msgstr ""
-
-#: emultempl/pe.em:1334
-#, c-format
-msgid "Errors encountered processing file %s\n"
-msgstr ""
-
-#: emultempl/pe.em:1357
-#, c-format
-msgid "Errors encountered processing file %s for interworking"
-msgstr ""
-
-#: emultempl/pe.em:1418 ldexp.c:530 ldlang.c:3082 ldlang.c:6087 ldlang.c:6118
-#: ldmain.c:1167
-msgid "%P%F: bfd_link_hash_lookup failed: %E\n"
-msgstr ""
-
-#: ldcref.c:166
-msgid "%X%P: bfd_hash_table_init of cref table failed: %E\n"
-msgstr ""
-
-#: ldcref.c:172
-msgid "%X%P: cref_hash_lookup failed: %E\n"
-msgstr ""
-
-#: ldcref.c:182
-msgid "%X%P: cref alloc failed: %E\n"
-msgstr ""
-
-#: ldcref.c:362
-#, c-format
-msgid ""
-"\n"
-"Cross Reference Table\n"
-"\n"
-msgstr ""
-
-#: ldcref.c:363
-msgid "Symbol"
-msgstr ""
-
-#: ldcref.c:371
-#, c-format
-msgid "File\n"
-msgstr ""
-
-#: ldcref.c:375
-#, c-format
-msgid "No symbols\n"
-msgstr ""
-
-#: ldcref.c:496 ldcref.c:618
-msgid "%B%F: could not read symbols; %E\n"
-msgstr ""
-
-#: ldcref.c:500 ldcref.c:622 ldmain.c:1232 ldmain.c:1236
-msgid "%B%F: could not read symbols: %E\n"
-msgstr ""
-
-#: ldcref.c:551
-msgid "%P: symbol `%T' missing from main hash table\n"
-msgstr ""
-
-#: ldcref.c:693 ldcref.c:700 ldmain.c:1279 ldmain.c:1286
-msgid "%B%F: could not read relocs: %E\n"
-msgstr ""
-
-#. 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:727
-msgid "%X%C: prohibited cross reference from %s to `%T' in %s\n"
-msgstr ""
-
-#: ldctor.c:84
-msgid "%P%X: Different relocs used in set %s\n"
-msgstr ""
-
-#: ldctor.c:102
-msgid "%P%X: Different object file formats composing set %s\n"
-msgstr ""
-
-#: ldctor.c:281 ldctor.c:295
-msgid "%P%X: %s does not support reloc %s for set %s\n"
-msgstr ""
-
-#: ldctor.c:316
-msgid "%P%X: Unsupported size %d for set %s\n"
-msgstr ""
-
-#: ldctor.c:337
-msgid ""
-"\n"
-"Set Symbol\n"
-"\n"
-msgstr ""
-
-#: ldemul.c:235
-#, c-format
-msgid "%S SYSLIB ignored\n"
-msgstr ""
-
-#: ldemul.c:241
-#, c-format
-msgid "%S HLL ignored\n"
-msgstr ""
-
-#: ldemul.c:261
-msgid "%P: unrecognised emulation mode: %s\n"
-msgstr ""
-
-#: ldemul.c:262
-msgid "Supported emulations: "
-msgstr ""
-
-#: ldemul.c:304
-#, c-format
-msgid " no emulation specific options.\n"
-msgstr ""
-
-#: ldexp.c:344
-#, c-format
-msgid "%F%S %% by zero\n"
-msgstr ""
-
-#: ldexp.c:352
-#, c-format
-msgid "%F%S / by zero\n"
-msgstr ""
-
-#: ldexp.c:544
-#, c-format
-msgid "%X%S: unresolvable symbol `%s' referenced in expression\n"
-msgstr ""
-
-#: ldexp.c:555
-#, c-format
-msgid "%F%S: undefined symbol `%s' referenced in expression\n"
-msgstr ""
-
-#: ldexp.c:576 ldexp.c:593 ldexp.c:619
-#, c-format
-msgid "%F%S: undefined section `%s' referenced in expression\n"
-msgstr ""
-
-#: ldexp.c:645 ldexp.c:658
-#, c-format
-msgid "%F%S: undefined MEMORY region `%s' referenced in expression\n"
-msgstr ""
-
-#: ldexp.c:669
-#, c-format
-msgid "%F%S: unknown constant `%s' referenced in expression\n"
-msgstr ""
-
-#: ldexp.c:730
-#, c-format
-msgid "%F%S can not PROVIDE assignment to location counter\n"
-msgstr ""
-
-#: ldexp.c:744
-#, c-format
-msgid "%F%S invalid assignment to location counter\n"
-msgstr ""
-
-#: ldexp.c:747
-#, c-format
-msgid "%F%S assignment to location counter invalid outside of SECTION\n"
-msgstr ""
-
-#: ldexp.c:756
-msgid "%F%S cannot move location counter backwards (from %V to %V)\n"
-msgstr ""
-
-#: ldexp.c:795
-msgid "%P%F:%s: hash creation failed\n"
-msgstr ""
-
-#: ldexp.c:1054 ldexp.c:1079
-#, c-format
-msgid "%F%S nonconstant expression for %s\n"
-msgstr ""
-
-#: ldexp.c:1138
-#, c-format
-msgid "%F%S: nonconstant expression for %s\n"
-msgstr ""
-
-#: ldfile.c:139
-#, c-format
-msgid "attempt to open %s failed\n"
-msgstr ""
-
-#: ldfile.c:141
-#, c-format
-msgid "attempt to open %s succeeded\n"
-msgstr ""
-
-#: ldfile.c:147
-msgid "%F%P: invalid BFD target `%s'\n"
-msgstr ""
-
-#: ldfile.c:256 ldfile.c:285
-msgid "%P: skipping incompatible %s when searching for %s\n"
-msgstr ""
-
-#: ldfile.c:269
-msgid "%F%P: attempted static link of dynamic object `%s'\n"
-msgstr ""
-
-#: ldfile.c:388
-msgid "%F%P: %s (%s): No such file: %E\n"
-msgstr ""
-
-#: ldfile.c:391
-msgid "%F%P: %s: No such file: %E\n"
-msgstr ""
-
-#: ldfile.c:421
-msgid "%F%P: cannot find %s inside %s\n"
-msgstr ""
-
-#: ldfile.c:424
-msgid "%F%P: cannot find %s\n"
-msgstr ""
-
-#: ldfile.c:441 ldfile.c:457
-#, c-format
-msgid "cannot find script file %s\n"
-msgstr ""
-
-#: ldfile.c:443 ldfile.c:459
-#, c-format
-msgid "opened script file %s\n"
-msgstr ""
-
-#: ldfile.c:503
-msgid "%P%F: cannot open linker script file %s: %E\n"
-msgstr ""
-
-#: ldfile.c:550
-msgid "%P%F: cannot represent machine `%s'\n"
-msgstr ""
-
-#: ldlang.c:1069 ldlang.c:1111 ldlang.c:2831
-msgid "%P%F: can not create hash table: %E\n"
-msgstr ""
-
-#: ldlang.c:1154
-msgid "%P:%S: warning: redeclaration of memory region '%s'\n"
-msgstr ""
-
-#: ldlang.c:1160
-msgid "%P:%S: warning: memory region %s not declared\n"
-msgstr ""
-
-#: ldlang.c:1240 ldlang.c:1270
-msgid "%P%F: failed creating section `%s': %E\n"
-msgstr ""
-
-#: ldlang.c:1754
-#, c-format
-msgid ""
-"\n"
-"Discarded input sections\n"
-"\n"
-msgstr ""
-
-#: ldlang.c:1762
-msgid ""
-"\n"
-"Memory Configuration\n"
-"\n"
-msgstr ""
-
-#: ldlang.c:1764
-msgid "Name"
-msgstr ""
-
-#: ldlang.c:1764
-msgid "Origin"
-msgstr ""
-
-#: ldlang.c:1764
-msgid "Length"
-msgstr ""
-
-#: ldlang.c:1764
-msgid "Attributes"
-msgstr ""
-
-#: ldlang.c:1804
-#, c-format
-msgid ""
-"\n"
-"Linker script and memory map\n"
-"\n"
-msgstr ""
-
-#: ldlang.c:1871
-msgid "%P%F: Illegal use of `%s' section\n"
-msgstr ""
-
-#: ldlang.c:1879
-msgid "%P%F: output format %s cannot represent section called %s\n"
-msgstr ""
-
-#: ldlang.c:2429
-msgid "%B: file not recognized: %E\n"
-msgstr ""
-
-#: ldlang.c:2430
-msgid "%B: matching formats:"
-msgstr ""
-
-#: ldlang.c:2437
-msgid "%F%B: file not recognized: %E\n"
-msgstr ""
-
-#: ldlang.c:2507
-msgid "%F%B: member %B in archive is not an object\n"
-msgstr ""
-
-#: ldlang.c:2518 ldlang.c:2532
-msgid "%F%B: could not read symbols: %E\n"
-msgstr ""
-
-#: ldlang.c:2801
-msgid ""
-"%P: warning: could not find any targets that match endianness requirement\n"
-msgstr ""
-
-#: ldlang.c:2815
-msgid "%P%F: target %s not found\n"
-msgstr ""
-
-#: ldlang.c:2817
-msgid "%P%F: cannot open output file %s: %E\n"
-msgstr ""
-
-#: ldlang.c:2823
-msgid "%P%F:%s: can not make object file: %E\n"
-msgstr ""
-
-#: ldlang.c:2827
-msgid "%P%F:%s: can not set architecture: %E\n"
-msgstr ""
-
-#: ldlang.c:2975
-msgid "%P%F: bfd_hash_lookup failed creating symbol %s\n"
-msgstr ""
-
-#: ldlang.c:2993
-msgid "%P%F: bfd_hash_allocate failed creating symbol %s\n"
-msgstr ""
-
-#: ldlang.c:3426
-msgid " load address 0x%V"
-msgstr ""
-
-#: ldlang.c:3661
-msgid "%W (size before relaxing)\n"
-msgstr ""
-
-#: ldlang.c:3747
-#, c-format
-msgid "Address of section %s set to "
-msgstr ""
-
-#: ldlang.c:3900
-#, c-format
-msgid "Fail with %d\n"
-msgstr ""
-
-#: ldlang.c:4172
-msgid "%X%P: section %s [%V -> %V] overlaps section %s [%V -> %V]\n"
-msgstr ""
-
-#: ldlang.c:4197
-msgid "%X%P: address 0x%v of %B section %s is not within region %s\n"
-msgstr ""
-
-#: ldlang.c:4206
-msgid "%X%P: region %s is full (%B section %s)\n"
-msgstr ""
-
-#: ldlang.c:4247
-#, c-format
-msgid ""
-"%F%S: non constant or forward reference address expression for section %s\n"
-msgstr ""
-
-#: ldlang.c:4272
-msgid "%P%X: Internal error on COFF shared library section %s\n"
-msgstr ""
-
-#: ldlang.c:4331
-msgid "%P%F: error: no memory region specified for loadable section `%s'\n"
-msgstr ""
-
-#: ldlang.c:4336
-msgid "%P: warning: no memory region specified for loadable section `%s'\n"
-msgstr ""
-
-#: ldlang.c:4358
-msgid "%P: warning: changing start of section %s by %lu bytes\n"
-msgstr ""
-
-#: ldlang.c:4437
-msgid "%P: warning: dot moved backwards before `%s'\n"
-msgstr ""
-
-#: ldlang.c:4609
-msgid "%P%F: can't relax section: %E\n"
-msgstr ""
-
-#: ldlang.c:4898
-msgid "%F%P: invalid data statement\n"
-msgstr ""
-
-#: ldlang.c:4931
-msgid "%F%P: invalid reloc statement\n"
-msgstr ""
-
-#: ldlang.c:5063
-msgid "%P%F:%s: can't set start address\n"
-msgstr ""
-
-#: ldlang.c:5076 ldlang.c:5095
-msgid "%P%F: can't set start address\n"
-msgstr ""
-
-#: ldlang.c:5088
-msgid "%P: warning: cannot find entry symbol %s; defaulting to %V\n"
-msgstr ""
-
-#: ldlang.c:5100
-msgid "%P: warning: cannot find entry symbol %s; not setting start address\n"
-msgstr ""
-
-#: ldlang.c:5149
-msgid ""
-"%P%F: Relocatable linking with relocations from format %s (%B) to format %s "
-"(%B) is not supported\n"
-msgstr ""
-
-#: ldlang.c:5159
-msgid ""
-"%P%X: %s architecture of input file `%B' is incompatible with %s output\n"
-msgstr ""
-
-#: ldlang.c:5181
-msgid "%P%X: failed to merge target specific data of file %B\n"
-msgstr ""
-
-#: ldlang.c:5265
-msgid ""
-"\n"
-"Allocating common symbols\n"
-msgstr ""
-
-#: ldlang.c:5266
-msgid ""
-"Common symbol size file\n"
-"\n"
-msgstr ""
-
-#: ldlang.c:5401
-msgid "%P%F: invalid syntax in flags\n"
-msgstr ""
-
-#: ldlang.c:5714
-msgid "%P%F: Failed to create hash table\n"
-msgstr ""
-
-#: ldlang.c:6009
-msgid "%P%F: multiple STARTUP files\n"
-msgstr ""
-
-#: ldlang.c:6057
-msgid "%X%P:%S: section has both a load address and a load region\n"
-msgstr ""
-
-#: ldlang.c:6314
-msgid "%F%P: bfd_record_phdr failed: %E\n"
-msgstr ""
-
-#: ldlang.c:6334
-msgid "%X%P: section `%s' assigned to non-existent phdr `%s'\n"
-msgstr ""
-
-#: ldlang.c:6725
-msgid "%X%P: unknown language `%s' in version information\n"
-msgstr ""
-
-#: ldlang.c:6867
-msgid ""
-"%X%P: anonymous version tag cannot be combined with other version tags\n"
-msgstr ""
-
-#: ldlang.c:6876
-msgid "%X%P: duplicate version tag `%s'\n"
-msgstr ""
-
-#: ldlang.c:6896 ldlang.c:6905 ldlang.c:6922 ldlang.c:6932
-msgid "%X%P: duplicate expression `%s' in version information\n"
-msgstr ""
-
-#: ldlang.c:6972
-msgid "%X%P: unable to find version dependency `%s'\n"
-msgstr ""
-
-#: ldlang.c:6994
-msgid "%X%P: unable to read .exports section contents\n"
-msgstr ""
-
-#: ldmain.c:234
-msgid "%X%P: can't set BFD default target to `%s': %E\n"
-msgstr ""
-
-#: ldmain.c:298
-msgid "%P%F: --relax and -r may not be used together\n"
-msgstr ""
-
-#: ldmain.c:300
-msgid "%P%F: -r and -shared may not be used together\n"
-msgstr ""
-
-#: ldmain.c:343
-msgid "%P%F: -F may not be used without -shared\n"
-msgstr ""
-
-#: ldmain.c:345
-msgid "%P%F: -f may not be used without -shared\n"
-msgstr ""
-
-#: ldmain.c:397
-msgid "using external linker script:"
-msgstr ""
-
-#: ldmain.c:399
-msgid "using internal linker script:"
-msgstr ""
-
-#: ldmain.c:433
-msgid "%P%F: no input files\n"
-msgstr ""
-
-#: ldmain.c:437
-msgid "%P: mode %s\n"
-msgstr ""
-
-#: ldmain.c:453
-msgid "%P%F: cannot open map file %s: %E\n"
-msgstr ""
-
-#: ldmain.c:485
-msgid "%P: link errors found, deleting executable `%s'\n"
-msgstr ""
-
-#: ldmain.c:494
-msgid "%F%B: final close failed: %E\n"
-msgstr ""
-
-#: ldmain.c:520
-msgid "%X%P: unable to open for source of copy `%s'\n"
-msgstr ""
-
-#: ldmain.c:523
-msgid "%X%P: unable to open for destination of copy `%s'\n"
-msgstr ""
-
-#: ldmain.c:530
-msgid "%P: Error writing file `%s'\n"
-msgstr ""
-
-#: ldmain.c:535 pe-dll.c:1572
-#, c-format
-msgid "%P: Error closing file `%s'\n"
-msgstr ""
-
-#: ldmain.c:551
-#, c-format
-msgid "%s: total time in link: %ld.%06ld\n"
-msgstr ""
-
-#: ldmain.c:554
-#, c-format
-msgid "%s: data size %ld\n"
-msgstr ""
-
-#: ldmain.c:637
-msgid "%P%F: missing argument to -m\n"
-msgstr ""
-
-#: ldmain.c:784 ldmain.c:803 ldmain.c:834
-msgid "%P%F: bfd_hash_table_init failed: %E\n"
-msgstr ""
-
-#: ldmain.c:788 ldmain.c:807
-msgid "%P%F: bfd_hash_lookup failed: %E\n"
-msgstr ""
-
-#: ldmain.c:821
-msgid "%X%P: error: duplicate retain-symbols-file\n"
-msgstr ""
-
-#: ldmain.c:864
-msgid "%P%F: bfd_hash_lookup for insertion failed: %E\n"
-msgstr ""
-
-#: ldmain.c:869
-msgid "%P: `-retain-symbols-file' overrides `-s' and `-S'\n"
-msgstr ""
-
-#: ldmain.c:944
-#, c-format
-msgid ""
-"Archive member included because of file (symbol)\n"
-"\n"
-msgstr ""
-
-#: ldmain.c:1014
-msgid "%X%C: multiple definition of `%T'\n"
-msgstr ""
-
-#: ldmain.c:1017
-msgid "%D: first defined here\n"
-msgstr ""
-
-#: ldmain.c:1021
-msgid "%P: Disabling relaxation: it will not work with multiple definitions\n"
-msgstr ""
-
-#: ldmain.c:1051
-msgid "%B: warning: definition of `%T' overriding common\n"
-msgstr ""
-
-#: ldmain.c:1054
-msgid "%B: warning: common is here\n"
-msgstr ""
-
-#: ldmain.c:1061
-msgid "%B: warning: common of `%T' overridden by definition\n"
-msgstr ""
-
-#: ldmain.c:1064
-msgid "%B: warning: defined here\n"
-msgstr ""
-
-#: ldmain.c:1071
-msgid "%B: warning: common of `%T' overridden by larger common\n"
-msgstr ""
-
-#: ldmain.c:1074
-msgid "%B: warning: larger common is here\n"
-msgstr ""
-
-#: ldmain.c:1078
-msgid "%B: warning: common of `%T' overriding smaller common\n"
-msgstr ""
-
-#: ldmain.c:1081
-msgid "%B: warning: smaller common is here\n"
-msgstr ""
-
-#: ldmain.c:1085
-msgid "%B: warning: multiple common of `%T'\n"
-msgstr ""
-
-#: ldmain.c:1087
-msgid "%B: warning: previous common is here\n"
-msgstr ""
-
-#: ldmain.c:1107 ldmain.c:1145
-msgid "%P: warning: global constructor %s used\n"
-msgstr ""
-
-#: ldmain.c:1155
-msgid "%P%F: BFD backend error: BFD_RELOC_CTOR unsupported\n"
-msgstr ""
-
-#. We found a reloc for the symbol we are looking for.
-#: ldmain.c:1209 ldmain.c:1211 ldmain.c:1213 ldmain.c:1251 ldmain.c:1299
-msgid "warning: "
-msgstr ""
-
-#: ldmain.c:1334
-msgid "%F%P: bfd_hash_table_init failed: %E\n"
-msgstr ""
-
-#: ldmain.c:1341
-msgid "%F%P: bfd_hash_lookup failed: %E\n"
-msgstr ""
-
-#: ldmain.c:1362
-msgid "%X%C: undefined reference to `%T'\n"
-msgstr ""
-
-#: ldmain.c:1365
-msgid "%C: warning: undefined reference to `%T'\n"
-msgstr ""
-
-#: ldmain.c:1371
-msgid "%X%D: more undefined references to `%T' follow\n"
-msgstr ""
-
-#: ldmain.c:1374
-msgid "%D: warning: more undefined references to `%T' follow\n"
-msgstr ""
-
-#: ldmain.c:1385
-msgid "%X%B: undefined reference to `%T'\n"
-msgstr ""
-
-#: ldmain.c:1388
-msgid "%B: warning: undefined reference to `%T'\n"
-msgstr ""
-
-#: ldmain.c:1394
-msgid "%X%B: more undefined references to `%T' follow\n"
-msgstr ""
-
-#: ldmain.c:1397
-msgid "%B: warning: more undefined references to `%T' follow\n"
-msgstr ""
-
-#: ldmain.c:1436
-msgid " additional relocation overflows omitted from the output\n"
-msgstr ""
-
-#: ldmain.c:1449
-msgid " relocation truncated to fit: %s against undefined symbol `%T'"
-msgstr ""
-
-#: ldmain.c:1454
-msgid ""
-" relocation truncated to fit: %s against symbol `%T' defined in %A section "
-"in %B"
-msgstr ""
-
-#: ldmain.c:1466
-msgid " relocation truncated to fit: %s against `%T'"
-msgstr ""
-
-#: ldmain.c:1483
-#, c-format
-msgid "%X%C: dangerous relocation: %s\n"
-msgstr ""
-
-#: ldmain.c:1498
-msgid "%X%C: reloc refers to symbol `%T' which is not being output\n"
-msgstr ""
-
-#: ldmisc.c:148
-#, c-format
-msgid "no symbol"
-msgstr ""
-
-#: ldmisc.c:245
-#, c-format
-msgid "built in linker script:%u"
-msgstr ""
-
-#: ldmisc.c:301 ldmisc.c:305
-msgid "%B%F: could not read symbols\n"
-msgstr ""
-
-#: ldmisc.c:347
-msgid "%B: In function `%T':\n"
-msgstr ""
-
-#: ldmisc.c:472
-msgid "%F%P: internal error %s %d\n"
-msgstr ""
-
-#: ldmisc.c:521
-msgid "%P: internal error: aborting at %s line %d in %s\n"
-msgstr ""
-
-#: ldmisc.c:524
-msgid "%P: internal error: aborting at %s line %d\n"
-msgstr ""
-
-#: ldmisc.c:526
-msgid "%P%F: please report this bug\n"
-msgstr ""
-
-#. Output for noisy == 2 is intended to follow the GNU standards.
-#: ldver.c:37
-#, c-format
-msgid "GNU ld %s\n"
-msgstr ""
-
-#: ldver.c:41
-#, c-format
-msgid "Copyright 2007 Free Software Foundation, Inc.\n"
-msgstr ""
-
-#: ldver.c:42
-#, c-format
-msgid ""
-"This program is free software; you may redistribute it under the terms of\n"
-"the GNU General Public License. This program has absolutely no warranty.\n"
-msgstr ""
-
-#: ldver.c:51
-#, c-format
-msgid " Supported emulations:\n"
-msgstr ""
-
-#: ldwrite.c:55 ldwrite.c:191
-msgid "%P%F: bfd_new_link_order failed\n"
-msgstr ""
-
-#: ldwrite.c:344
-msgid "%F%P: cannot create split section name for %s\n"
-msgstr ""
-
-#: ldwrite.c:356
-msgid "%F%P: clone section failed: %E\n"
-msgstr ""
-
-#: ldwrite.c:394
-#, c-format
-msgid "%8x something else\n"
-msgstr ""
-
-#: ldwrite.c:564
-msgid "%F%P: final link failed: %E\n"
-msgstr ""
-
-#: lexsup.c:205 lexsup.c:341
-msgid "KEYWORD"
-msgstr ""
-
-#: lexsup.c:205
-msgid "Shared library control for HP/UX compatibility"
-msgstr ""
-
-#: lexsup.c:208
-msgid "ARCH"
-msgstr ""
-
-#: lexsup.c:208
-msgid "Set architecture"
-msgstr ""
-
-#: lexsup.c:210 lexsup.c:447
-msgid "TARGET"
-msgstr ""
-
-#: lexsup.c:210
-msgid "Specify target for following input files"
-msgstr ""
-
-#: lexsup.c:213 lexsup.c:262 lexsup.c:274 lexsup.c:287 lexsup.c:289
-#: lexsup.c:402 lexsup.c:459 lexsup.c:516 lexsup.c:528
-msgid "FILE"
-msgstr ""
-
-#: lexsup.c:213
-msgid "Read MRI format linker script"
-msgstr ""
-
-#: lexsup.c:215
-msgid "Force common symbols to be defined"
-msgstr ""
-
-#: lexsup.c:219 lexsup.c:501 lexsup.c:503 lexsup.c:505
-msgid "ADDRESS"
-msgstr ""
-
-#: lexsup.c:219
-msgid "Set start address"
-msgstr ""
-
-#: lexsup.c:221
-msgid "Export all dynamic symbols"
-msgstr ""
-
-#: lexsup.c:223
-msgid "Link big-endian objects"
-msgstr ""
-
-#: lexsup.c:225
-msgid "Link little-endian objects"
-msgstr ""
-
-#: lexsup.c:227 lexsup.c:230
-msgid "SHLIB"
-msgstr ""
-
-#: lexsup.c:227
-msgid "Auxiliary filter for shared object symbol table"
-msgstr ""
-
-#: lexsup.c:230
-msgid "Filter for shared object symbol table"
-msgstr ""
-
-#: lexsup.c:233
-msgid "Ignored"
-msgstr ""
-
-#: lexsup.c:235
-msgid "SIZE"
-msgstr ""
-
-#: lexsup.c:235
-msgid "Small data size (if no size, same as --shared)"
-msgstr ""
-
-#: lexsup.c:238
-msgid "FILENAME"
-msgstr ""
-
-#: lexsup.c:238
-msgid "Set internal name of shared library"
-msgstr ""
-
-#: lexsup.c:240
-msgid "PROGRAM"
-msgstr ""
-
-#: lexsup.c:240
-msgid "Set PROGRAM as the dynamic linker to use"
-msgstr ""
-
-#: lexsup.c:243
-msgid "LIBNAME"
-msgstr ""
-
-#: lexsup.c:243
-msgid "Search for library LIBNAME"
-msgstr ""
-
-#: lexsup.c:245
-msgid "DIRECTORY"
-msgstr ""
-
-#: lexsup.c:245
-msgid "Add DIRECTORY to library search path"
-msgstr ""
-
-#: lexsup.c:248
-msgid "Override the default sysroot location"
-msgstr ""
-
-#: lexsup.c:250
-msgid "EMULATION"
-msgstr ""
-
-#: lexsup.c:250
-msgid "Set emulation"
-msgstr ""
-
-#: lexsup.c:252
-msgid "Print map file on standard output"
-msgstr ""
-
-#: lexsup.c:254
-msgid "Do not page align data"
-msgstr ""
-
-#: lexsup.c:256
-msgid "Do not page align data, do not make text readonly"
-msgstr ""
-
-#: lexsup.c:259
-msgid "Page align data, make text readonly"
-msgstr ""
-
-#: lexsup.c:262
-msgid "Set output file name"
-msgstr ""
-
-#: lexsup.c:264
-msgid "Optimize output file"
-msgstr ""
-
-#: lexsup.c:266
-msgid "Ignored for SVR4 compatibility"
-msgstr ""
-
-#: lexsup.c:270
-msgid "Generate relocatable output"
-msgstr ""
-
-#: lexsup.c:274
-msgid "Just link symbols (if directory, same as --rpath)"
-msgstr ""
-
-#: lexsup.c:277
-msgid "Strip all symbols"
-msgstr ""
-
-#: lexsup.c:279
-msgid "Strip debugging symbols"
-msgstr ""
-
-#: lexsup.c:281
-msgid "Strip symbols in discarded sections"
-msgstr ""
-
-#: lexsup.c:283
-msgid "Do not strip symbols in discarded sections"
-msgstr ""
-
-#: lexsup.c:285
-msgid "Trace file opens"
-msgstr ""
-
-#: lexsup.c:287
-msgid "Read linker script"
-msgstr ""
-
-#: lexsup.c:289
-msgid "Read default linker script"
-msgstr ""
-
-#: lexsup.c:293 lexsup.c:311 lexsup.c:379 lexsup.c:400 lexsup.c:494
-#: lexsup.c:519 lexsup.c:554
-msgid "SYMBOL"
-msgstr ""
-
-#: lexsup.c:293
-msgid "Start with undefined reference to SYMBOL"
-msgstr ""
-
-#: lexsup.c:296
-msgid "[=SECTION]"
-msgstr ""
-
-#: lexsup.c:297
-msgid "Don't merge input [SECTION | orphan] sections"
-msgstr ""
-
-#: lexsup.c:299
-msgid "Build global constructor/destructor tables"
-msgstr ""
-
-#: lexsup.c:301
-msgid "Print version information"
-msgstr ""
-
-#: lexsup.c:303
-msgid "Print version and emulation information"
-msgstr ""
-
-#: lexsup.c:305
-msgid "Discard all local symbols"
-msgstr ""
-
-#: lexsup.c:307
-msgid "Discard temporary local symbols (default)"
-msgstr ""
-
-#: lexsup.c:309
-msgid "Don't discard any local symbols"
-msgstr ""
-
-#: lexsup.c:311
-msgid "Trace mentions of SYMBOL"
-msgstr ""
-
-#: lexsup.c:313 lexsup.c:461 lexsup.c:463
-msgid "PATH"
-msgstr ""
-
-#: lexsup.c:313
-msgid "Default search path for Solaris compatibility"
-msgstr ""
-
-#: lexsup.c:316
-msgid "Start a group"
-msgstr ""
-
-#: lexsup.c:318
-msgid "End a group"
-msgstr ""
-
-#: lexsup.c:322
-msgid "Accept input files whose architecture cannot be determined"
-msgstr ""
-
-#: lexsup.c:326
-msgid "Reject input files whose architecture is unknown"
-msgstr ""
-
-#: lexsup.c:329
-msgid ""
-"Set DT_NEEDED tags for DT_NEEDED entries in\n"
-"\t\t\t\tfollowing dynamic libs"
-msgstr ""
-
-#: lexsup.c:332
-msgid ""
-"Do not set DT_NEEDED tags for DT_NEEDED entries\n"
-"\t\t\t\tin following dynamic libs"
-msgstr ""
-
-#: lexsup.c:335
-msgid "Only set DT_NEEDED for following dynamic libs if used"
-msgstr ""
-
-#: lexsup.c:338
-msgid "Always set DT_NEEDED for following dynamic libs"
-msgstr ""
-
-#: lexsup.c:341
-msgid "Ignored for SunOS compatibility"
-msgstr ""
-
-#: lexsup.c:343
-msgid "Link against shared libraries"
-msgstr ""
-
-#: lexsup.c:349
-msgid "Do not link against shared libraries"
-msgstr ""
-
-#: lexsup.c:357
-msgid "Bind global references locally"
-msgstr ""
-
-#: lexsup.c:359
-msgid "Bind global function references locally"
-msgstr ""
-
-#: lexsup.c:361
-msgid "Check section addresses for overlaps (default)"
-msgstr ""
-
-#: lexsup.c:364
-msgid "Do not check section addresses for overlaps"
-msgstr ""
-
-#: lexsup.c:367
-msgid "Output cross reference table"
-msgstr ""
-
-#: lexsup.c:369
-msgid "SYMBOL=EXPRESSION"
-msgstr ""
-
-#: lexsup.c:369
-msgid "Define a symbol"
-msgstr ""
-
-#: lexsup.c:371
-msgid "[=STYLE]"
-msgstr ""
-
-#: lexsup.c:371
-msgid "Demangle symbol names [using STYLE]"
-msgstr ""
-
-#: lexsup.c:374
-msgid "Generate embedded relocs"
-msgstr ""
-
-#: lexsup.c:376
-msgid "Treat warnings as errors"
-msgstr ""
-
-#: lexsup.c:379
-msgid "Call SYMBOL at unload-time"
-msgstr ""
-
-#: lexsup.c:381
-msgid "Force generation of file with .exe suffix"
-msgstr ""
-
-#: lexsup.c:383
-msgid "Remove unused sections (on some targets)"
-msgstr ""
-
-#: lexsup.c:386
-msgid "Don't remove unused sections (default)"
-msgstr ""
-
-#: lexsup.c:389
-msgid "List removed unused sections on stderr"
-msgstr ""
-
-#: lexsup.c:392
-msgid "Do not list removed unused sections"
-msgstr ""
-
-#: lexsup.c:395
-msgid "Set default hash table size close to <NUMBER>"
-msgstr ""
-
-#: lexsup.c:398
-msgid "Print option help"
-msgstr ""
-
-#: lexsup.c:400
-msgid "Call SYMBOL at load-time"
-msgstr ""
-
-#: lexsup.c:402
-msgid "Write a map file"
-msgstr ""
-
-#: lexsup.c:404
-msgid "Do not define Common storage"
-msgstr ""
-
-#: lexsup.c:406
-msgid "Do not demangle symbol names"
-msgstr ""
-
-#: lexsup.c:408
-msgid "Use less memory and more disk I/O"
-msgstr ""
-
-#: lexsup.c:410
-msgid "Do not allow unresolved references in object files"
-msgstr ""
-
-#: lexsup.c:413
-msgid "Allow unresolved references in shared libaries"
-msgstr ""
-
-#: lexsup.c:417
-msgid "Do not allow unresolved references in shared libs"
-msgstr ""
-
-#: lexsup.c:421
-msgid "Allow multiple definitions"
-msgstr ""
-
-#: lexsup.c:423
-msgid "Disallow undefined version"
-msgstr ""
-
-#: lexsup.c:425
-msgid "Create default symbol version"
-msgstr ""
-
-#: lexsup.c:428
-msgid "Create default symbol version for imported symbols"
-msgstr ""
-
-#: lexsup.c:431
-msgid "Don't warn about mismatched input files"
-msgstr ""
-
-#: lexsup.c:434
-msgid "Don't warn on finding an incompatible library"
-msgstr ""
-
-#: lexsup.c:437
-msgid "Turn off --whole-archive"
-msgstr ""
-
-#: lexsup.c:439
-msgid "Create an output file even if errors occur"
-msgstr ""
-
-#: lexsup.c:444
-msgid ""
-"Only use library directories specified on\n"
-"\t\t\t\tthe command line"
-msgstr ""
-
-#: lexsup.c:447
-msgid "Specify target of output file"
-msgstr ""
-
-#: lexsup.c:450
-msgid "Ignored for Linux compatibility"
-msgstr ""
-
-#: lexsup.c:453
-msgid "Reduce memory overheads, possibly taking much longer"
-msgstr ""
-
-#: lexsup.c:456
-msgid "Relax branches on certain targets"
-msgstr ""
-
-#: lexsup.c:459
-msgid "Keep only symbols listed in FILE"
-msgstr ""
-
-#: lexsup.c:461
-msgid "Set runtime shared library search path"
-msgstr ""
-
-#: lexsup.c:463
-msgid "Set link time shared library search path"
-msgstr ""
-
-#: lexsup.c:466
-msgid "Create a shared library"
-msgstr ""
-
-#: lexsup.c:470
-msgid "Create a position independent executable"
-msgstr ""
-
-#: lexsup.c:474
-msgid "Sort common symbols by size"
-msgstr ""
-
-#: lexsup.c:478
-msgid "name|alignment"
-msgstr ""
-
-#: lexsup.c:479
-msgid "Sort sections by name or maximum alignment"
-msgstr ""
-
-#: lexsup.c:481
-msgid "COUNT"
-msgstr ""
-
-#: lexsup.c:481
-msgid "How many tags to reserve in .dynamic section"
-msgstr ""
-
-#: lexsup.c:484
-msgid "[=SIZE]"
-msgstr ""
-
-#: lexsup.c:484
-msgid "Split output sections every SIZE octets"
-msgstr ""
-
-#: lexsup.c:487
-msgid "[=COUNT]"
-msgstr ""
-
-#: lexsup.c:487
-msgid "Split output sections every COUNT relocs"
-msgstr ""
-
-#: lexsup.c:490
-msgid "Print memory usage statistics"
-msgstr ""
-
-#: lexsup.c:492
-msgid "Display target specific options"
-msgstr ""
-
-#: lexsup.c:494
-msgid "Do task level linking"
-msgstr ""
-
-#: lexsup.c:496
-msgid "Use same format as native linker"
-msgstr ""
-
-#: lexsup.c:498
-msgid "SECTION=ADDRESS"
-msgstr ""
-
-#: lexsup.c:498
-msgid "Set address of named section"
-msgstr ""
-
-#: lexsup.c:501
-msgid "Set address of .bss section"
-msgstr ""
-
-#: lexsup.c:503
-msgid "Set address of .data section"
-msgstr ""
-
-#: lexsup.c:505
-msgid "Set address of .text section"
-msgstr ""
-
-#: lexsup.c:508
-msgid ""
-"How to handle unresolved symbols. <method> is:\n"
-"\t\t\t\tignore-all, report-all, ignore-in-object-files,\n"
-"\t\t\t\tignore-in-shared-libs"
-msgstr ""
-
-#: lexsup.c:512
-msgid "Output lots of information during link"
-msgstr ""
-
-#: lexsup.c:516
-msgid "Read version information script"
-msgstr ""
-
-#: lexsup.c:519
-msgid ""
-"Take export symbols list from .exports, using\n"
-"\t\t\t\tSYMBOL as the version."
-msgstr ""
-
-#: lexsup.c:522
-msgid "Add data symbols to dynamic list"
-msgstr ""
-
-#: lexsup.c:524
-msgid "Use C++ operator new/delete dynamic list"
-msgstr ""
-
-#: lexsup.c:526
-msgid "Use C++ typeinfo dynamic list"
-msgstr ""
-
-#: lexsup.c:528
-msgid "Read dynamic list"
-msgstr ""
-
-#: lexsup.c:530
-msgid "Warn about duplicate common symbols"
-msgstr ""
-
-#: lexsup.c:532
-msgid "Warn if global constructors/destructors are seen"
-msgstr ""
-
-#: lexsup.c:535
-msgid "Warn if the multiple GP values are used"
-msgstr ""
-
-#: lexsup.c:537
-msgid "Warn only once per undefined symbol"
-msgstr ""
-
-#: lexsup.c:539
-msgid "Warn if start of section changes due to alignment"
-msgstr ""
-
-#: lexsup.c:542
-msgid "Warn if shared object has DT_TEXTREL"
-msgstr ""
-
-#: lexsup.c:546
-msgid "Report unresolved symbols as warnings"
-msgstr ""
-
-#: lexsup.c:549
-msgid "Report unresolved symbols as errors"
-msgstr ""
-
-#: lexsup.c:551
-msgid "Include all objects from following archives"
-msgstr ""
-
-#: lexsup.c:554
-msgid "Use wrapper functions for SYMBOL"
-msgstr ""
-
-#: lexsup.c:701
-msgid "%P: unrecognized option '%s'\n"
-msgstr ""
-
-#: lexsup.c:705
-msgid "%P%F: use the --help option for usage information\n"
-msgstr ""
-
-#: lexsup.c:723
-msgid "%P%F: unrecognized -a option `%s'\n"
-msgstr ""
-
-#: lexsup.c:736
-msgid "%P%F: unrecognized -assert option `%s'\n"
-msgstr ""
-
-#: lexsup.c:779
-msgid "%F%P: unknown demangling style `%s'"
-msgstr ""
-
-#: lexsup.c:841
-msgid "%P%F: invalid number `%s'\n"
-msgstr ""
-
-#: lexsup.c:939
-msgid "%P%F: bad --unresolved-symbols option: %s\n"
-msgstr ""
-
-#. This can happen if the user put "-rpath,a" on the command
-#. line. (Or something similar. The comma is important).
-#. Getopt becomes confused and thinks that this is a -r option
-#. 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:1013
-msgid "%P%F: bad -rpath option\n"
-msgstr ""
-
-#: lexsup.c:1124
-msgid "%P%F: -shared not supported\n"
-msgstr ""
-
-#: lexsup.c:1133
-msgid "%P%F: -pie not supported\n"
-msgstr ""
-
-#: lexsup.c:1143
-msgid "name"
-msgstr ""
-
-#: lexsup.c:1145
-msgid "alignment"
-msgstr ""
-
-#: lexsup.c:1148
-msgid "%P%F: invalid section sorting option: %s\n"
-msgstr ""
-
-#: lexsup.c:1180
-msgid "%P%F: invalid argument to option \"--section-start\"\n"
-msgstr ""
-
-#: lexsup.c:1187
-msgid "%P%F: missing argument(s) to option \"--section-start\"\n"
-msgstr ""
-
-#: lexsup.c:1398
-msgid "%P%F: may not nest groups (--help for usage)\n"
-msgstr ""
-
-#: lexsup.c:1405
-msgid "%P%F: group ended before it began (--help for usage)\n"
-msgstr ""
-
-#: lexsup.c:1433
-msgid "%P%X: --hash-size needs a numeric argument\n"
-msgstr ""
-
-#: lexsup.c:1484 lexsup.c:1497
-msgid "%P%F: invalid hex number `%s'\n"
-msgstr ""
-
-#: lexsup.c:1533
-#, c-format
-msgid "Usage: %s [options] file...\n"
-msgstr ""
-
-#: lexsup.c:1535
-#, c-format
-msgid "Options:\n"
-msgstr ""
-
-#: lexsup.c:1613
-#, c-format
-msgid " @FILE"
-msgstr ""
-
-#: lexsup.c:1616
-#, c-format
-msgid "Read options from FILE\n"
-msgstr ""
-
-#. Note: Various tools (such as libtool) depend upon the
-#. format of the listings below - do not change them.
-#: lexsup.c:1621
-#, c-format
-msgid "%s: supported targets:"
-msgstr ""
-
-#: lexsup.c:1629
-#, c-format
-msgid "%s: supported emulations: "
-msgstr ""
-
-#: lexsup.c:1634
-#, c-format
-msgid "%s: emulation specific options:\n"
-msgstr ""
-
-#: lexsup.c:1639
-#, c-format
-msgid "Report bugs to %s\n"
-msgstr ""
-
-#: mri.c:291
-msgid "%P%F: unknown format type %s\n"
-msgstr ""
-
-#: pe-dll.c:367
-#, c-format
-msgid "%XUnsupported PEI architecture: %s\n"
-msgstr ""
-
-#: pe-dll.c:673
-#, c-format
-msgid "%XCannot export %s: invalid export name\n"
-msgstr ""
-
-#: pe-dll.c:729
-#, c-format
-msgid "%XError, duplicate EXPORT with ordinals: %s (%d vs %d)\n"
-msgstr ""
-
-#: pe-dll.c:736
-#, c-format
-msgid "Warning, duplicate EXPORT: %s\n"
-msgstr ""
-
-#: pe-dll.c:823
-#, c-format
-msgid "%XCannot export %s: symbol not defined\n"
-msgstr ""
-
-#: pe-dll.c:829
-#, c-format
-msgid "%XCannot export %s: symbol wrong type (%d vs %d)\n"
-msgstr ""
-
-#: pe-dll.c:836
-#, c-format
-msgid "%XCannot export %s: symbol not found\n"
-msgstr ""
-
-#: pe-dll.c:949
-#, c-format
-msgid "%XError, ordinal used twice: %d (%s vs %s)\n"
-msgstr ""
-
-#: pe-dll.c:1297
-#, c-format
-msgid "%XError: %d-bit reloc in dll\n"
-msgstr ""
-
-#: pe-dll.c:1425
-#, c-format
-msgid "%s: Can't open output def file %s\n"
-msgstr ""
-
-#: pe-dll.c:1568
-#, c-format
-msgid "; no contents available\n"
-msgstr ""
-
-#: pe-dll.c:2364
-msgid ""
-"%C: variable '%T' can't be auto-imported. Please read the documentation for "
-"ld's --enable-auto-import for details.\n"
-msgstr ""
-
-#: pe-dll.c:2394
-#, c-format
-msgid "%XCan't open .lib file: %s\n"
-msgstr ""
-
-#: pe-dll.c:2399
-#, 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 26ad2e934e2e..000000000000
--- 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 44a10c469cd2..000000000000
--- 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 80dbb379633e..000000000000
--- 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 9bae887ddb43..000000000000
--- 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 781301c807da..000000000000
--- 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 6060c3e1502d..000000000000
--- a/contrib/binutils/ld/scripttempl/elf.sc
+++ /dev/null
@@ -1,523 +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.
-# SMALL_DATA_CTOR - .ctors contains small data.
-# SMALL_DATA_DTOR - .dtors contains small data.
-# DATA_ADDR - if end-of-text-plus-one-page isn't right for data start
-# INITIAL_READONLY_SECTIONS - at start of text segment
-# OTHER_READONLY_SECTIONS - other than .text .init .rodata ...
-# (e.g., .PARISC.milli)
-# OTHER_TEXT_SECTIONS - these get put in .text when relocating
-# OTHER_READWRITE_SECTIONS - other than .data .bss .ctors .sdata ...
-# (e.g., .PARISC.global)
-# OTHER_RELRO_SECTIONS - other than .data.rel.ro ...
-# (e.g. PPC32 .fixup, .got[12])
-# OTHER_BSS_SECTIONS - other than .bss .sbss ...
-# ATTRS_SECTIONS - at the end
-# OTHER_SECTIONS - at the end
-# EXECUTABLE_SYMBOLS - symbols that must be defined for an
-# executable (e.g., _DYNAMIC_LINK)
-# TEXT_START_ADDR - the first byte of the text segment, after any
-# headers.
-# TEXT_BASE_ADDRESS - the first byte of the text segment.
-# TEXT_START_SYMBOLS - symbols that appear at the start of the
-# .text section.
-# DATA_START_SYMBOLS - symbols that appear at the start of the
-# .data section.
-# DATA_END_SYMBOLS - symbols that appear at the end of the
-# writeable data sections.
-# OTHER_GOT_SYMBOLS - symbols defined just before .got.
-# OTHER_GOT_SECTIONS - sections just after .got.
-# OTHER_SDATA_SECTIONS - sections just after .sdata.
-# OTHER_BSS_SYMBOLS - symbols that appear at the start of the
-# .bss section besides __bss_start.
-# DATA_PLT - .plt should be in data segment, not text segment.
-# PLT_BEFORE_GOT - .plt just before .got when .plt is in data segement.
-# BSS_PLT - .plt should be in bss segment
-# TEXT_DYNAMIC - .dynamic in text segment, not data segment.
-# EMBEDDED - whether this is for an embedded system.
-# 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_SYMBOLS - symbols to place right at the end of the script.
-# ETEXT_NAME - name of a symbol for the end of the text section,
-# normally etext.
-# SEPARATE_GOTPLT - if set, .got.plt should be separate output section,
-# so that .got can be in the RELRO area. It should be set to
-# the number of bytes in the beginning of .got.plt which can be
-# in the RELRO area as well.
-# USER_LABEL_PREFIX - prefix to add to user-visible symbols.
-#
-# When adding sections, do note that the names of some sections are used
-# when specifying the start address of the next.
-#
-
-# 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
-# .lrodata .gnu.linkonce.lr.foo
-# .ldata .gnu.linkonce.l.foo
-# .lbss .gnu.linkonce.lb.foo
-#
-# Each of these can also have corresponding .rel.* and .rela.* sections.
-
-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 -z "${ETEXT_NAME}" && ETEXT_NAME=etext
-test -n "$CREATE_SHLIB$CREATE_PIE" && test -n "$SHLIB_DATA_ADDR" && COMMONPAGESIZE=""
-test -z "$CREATE_SHLIB$CREATE_PIE" && test -n "$DATA_ADDR" && COMMONPAGESIZE=""
-test -n "$RELRO_NOW" && unset SEPARATE_GOTPLT
-test -z "$ATTRS_SECTIONS" && ATTRS_SECTIONS=".gnu.attributes 0 : { KEEP (*(.gnu.attributes)) }"
-DATA_SEGMENT_ALIGN="ALIGN(${SEGMENT_SIZE}) + (. & (${MAXPAGESIZE} - 1))"
-DATA_SEGMENT_RELRO_END=""
-DATA_SEGMENT_END=""
-if test -n "${COMMONPAGESIZE}"; then
- DATA_SEGMENT_ALIGN="ALIGN (${SEGMENT_SIZE}) - ((${MAXPAGESIZE} - .) & (${MAXPAGESIZE} - 1)); . = DATA_SEGMENT_ALIGN (${MAXPAGESIZE}, ${COMMONPAGESIZE})"
- DATA_SEGMENT_END=". = DATA_SEGMENT_END (.);"
- DATA_SEGMENT_RELRO_END=". = DATA_SEGMENT_RELRO_END (${SEPARATE_GOTPLT-0}, .);"
-fi
-if test -z "${INITIAL_READONLY_SECTIONS}${CREATE_SHLIB}"; then
- INITIAL_READONLY_SECTIONS=".interp ${RELOCATING-0} : { *(.interp) }"
-fi
-if test -z "$PLT"; then
- PLT=".plt ${RELOCATING-0} : { *(.plt) }"
-fi
-test -n "${DATA_PLT-${BSS_PLT-text}}" && TEXT_PLT=yes
-if test -z "$GOT"; then
- if test -z "$SEPARATE_GOTPLT"; then
- GOT=".got ${RELOCATING-0} : { *(.got.plt) *(.got) }"
- else
- GOT=".got ${RELOCATING-0} : { *(.got) }"
- GOTPLT=".got.plt ${RELOCATING-0} : { *(.got.plt) }"
- fi
-fi
-DYNAMIC=".dynamic ${RELOCATING-0} : { *(.dynamic) }"
-RODATA=".rodata ${RELOCATING-0} : { *(.rodata${RELOCATING+ .rodata.* .gnu.linkonce.r.*}) }"
-DATARELRO=".data.rel.ro : { *(.data.rel.ro.local* .gnu.linkonce.d.rel.ro.local.*) *(.data.rel.ro* .gnu.linkonce.d.rel.ro.*) }"
-STACKNOTE="/DISCARD/ : { *(.note.GNU-stack) }"
-if test -z "${NO_SMALL_DATA}"; then
- SBSS=".sbss ${RELOCATING-0} :
- {
- ${RELOCATING+${SBSS_START_SYMBOLS}}
- ${CREATE_SHLIB+*(.sbss2 .sbss2.* .gnu.linkonce.sb2.*)}
- *(.dynsbss)
- *(.sbss${RELOCATING+ .sbss.* .gnu.linkonce.sb.*})
- *(.scommon)
- ${RELOCATING+${SBSS_END_SYMBOLS}}
- }"
- SBSS2=".sbss2 ${RELOCATING-0} : { *(.sbss2${RELOCATING+ .sbss2.* .gnu.linkonce.sb2.*}) }"
- SDATA="/* We want the small data sections together, so single-instruction offsets
- can access them all, and initialized data all before uninitialized, so
- we can shorten the on-disk segment size. */
- .sdata ${RELOCATING-0} :
- {
- ${RELOCATING+${SDATA_START_SYMBOLS}}
- ${CREATE_SHLIB+*(.sdata2 .sdata2.* .gnu.linkonce.s2.*)}
- *(.sdata${RELOCATING+ .sdata.* .gnu.linkonce.s.*})
- }"
- SDATA2=".sdata2 ${RELOCATING-0} :
- {
- ${RELOCATING+${SDATA2_START_SYMBOLS}}
- *(.sdata2${RELOCATING+ .sdata2.* .gnu.linkonce.s2.*})
- }"
- REL_SDATA=".rel.sdata ${RELOCATING-0} : { *(.rel.sdata${RELOCATING+ .rel.sdata.* .rel.gnu.linkonce.s.*}) }
- .rela.sdata ${RELOCATING-0} : { *(.rela.sdata${RELOCATING+ .rela.sdata.* .rela.gnu.linkonce.s.*}) }"
- REL_SBSS=".rel.sbss ${RELOCATING-0} : { *(.rel.sbss${RELOCATING+ .rel.sbss.* .rel.gnu.linkonce.sb.*}) }
- .rela.sbss ${RELOCATING-0} : { *(.rela.sbss${RELOCATING+ .rela.sbss.* .rela.gnu.linkonce.sb.*}) }"
- REL_SDATA2=".rel.sdata2 ${RELOCATING-0} : { *(.rel.sdata2${RELOCATING+ .rel.sdata2.* .rel.gnu.linkonce.s2.*}) }
- .rela.sdata2 ${RELOCATING-0} : { *(.rela.sdata2${RELOCATING+ .rela.sdata2.* .rela.gnu.linkonce.s2.*}) }"
- REL_SBSS2=".rel.sbss2 ${RELOCATING-0} : { *(.rel.sbss2${RELOCATING+ .rel.sbss2.* .rel.gnu.linkonce.sb2.*}) }
- .rela.sbss2 ${RELOCATING-0} : { *(.rela.sbss2${RELOCATING+ .rela.sbss2.* .rela.gnu.linkonce.sb2.*}) }"
-else
- NO_SMALL_DATA=" "
-fi
-if test -z "${DATA_GOT}"; then
- if test -n "${NO_SMALL_DATA}"; then
- DATA_GOT=" "
- fi
-fi
-if test -z "${SDATA_GOT}"; then
- if test -z "${NO_SMALL_DATA}"; then
- SDATA_GOT=" "
- fi
-fi
-test -n "$SEPARATE_GOTPLT" && SEPARATE_GOTPLT=" "
-test "${LARGE_SECTIONS}" = "yes" && REL_LARGE="
- .rel.ldata ${RELOCATING-0} : { *(.rel.ldata${RELOCATING+ .rel.ldata.* .rel.gnu.linkonce.l.*}) }
- .rela.ldata ${RELOCATING-0} : { *(.rela.ldata${RELOCATING+ .rela.ldata.* .rela.gnu.linkonce.l.*}) }
- .rel.lbss ${RELOCATING-0} : { *(.rel.lbss${RELOCATING+ .rel.lbss.* .rel.gnu.linkonce.lb.*}) }
- .rela.lbss ${RELOCATING-0} : { *(.rela.lbss${RELOCATING+ .rela.lbss.* .rela.gnu.linkonce.lb.*}) }
- .rel.lrodata ${RELOCATING-0} : { *(.rel.lrodata${RELOCATING+ .rel.lrodata.* .rel.gnu.linkonce.lr.*}) }
- .rela.lrodata ${RELOCATING-0} : { *(.rela.lrodata${RELOCATING+ .rela.lrodata.* .rela.gnu.linkonce.lr.*}) }"
-test "${LARGE_SECTIONS}" = "yes" && OTHER_BSS_SECTIONS="
- ${OTHER_BSS_SECTIONS}
- .lbss ${RELOCATING-0} :
- {
- *(.dynlbss)
- *(.lbss${RELOCATING+ .lbss.* .gnu.linkonce.lb.*})
- *(LARGE_COMMON)
- }"
-test "${LARGE_SECTIONS}" = "yes" && LARGE_SECTIONS="
- .lrodata ${RELOCATING-0} ${RELOCATING+ALIGN(${MAXPAGESIZE}) + (. & (${MAXPAGESIZE} - 1))} :
- {
- *(.lrodata${RELOCATING+ .lrodata.* .gnu.linkonce.lr.*})
- }
- .ldata ${RELOCATING-0} ${RELOCATING+ALIGN(${MAXPAGESIZE}) + (. & (${MAXPAGESIZE} - 1))} :
- {
- *(.ldata${RELOCATING+ .ldata.* .gnu.linkonce.l.*})
- ${RELOCATING+. = ALIGN(. != 0 ? ${ALIGNMENT} : 1);}
- }"
-CTOR=".ctors ${CONSTRUCTING-0} :
- {
- ${CONSTRUCTING+${CTOR_START}}
- /* 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))
- KEEP (*crtbegin?.o(.ctors))
-
- /* We don't want to include the .ctor section from
- the crtend.o file until after the sorted ctors.
- The .ctor section from the crtend file contains the
- end of ctors marker and it must be last */
-
- KEEP (*(EXCLUDE_FILE (*crtend.o *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 (*crtbegin?.o(.dtors))
- KEEP (*(EXCLUDE_FILE (*crtend.o *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+${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;}}
- ${INITIAL_READONLY_SECTIONS}
- ${TEXT_DYNAMIC+${DYNAMIC}}
- .hash ${RELOCATING-0} : { *(.hash) }
- .gnu.hash ${RELOCATING-0} : { *(.gnu.hash) }
- .dynsym ${RELOCATING-0} : { *(.dynsym) }
- .dynstr ${RELOCATING-0} : { *(.dynstr) }
- .gnu.version ${RELOCATING-0} : { *(.gnu.version) }
- .gnu.version_d ${RELOCATING-0}: { *(.gnu.version_d) }
- .gnu.version_r ${RELOCATING-0}: { *(.gnu.version_r) }
-
-EOF
-if [ "x$COMBRELOC" = x ]; then
- COMBRELOCCAT=cat
-else
- COMBRELOCCAT="cat > $COMBRELOC"
-fi
-eval $COMBRELOCCAT <<EOF
- .rel.init ${RELOCATING-0} : { *(.rel.init) }
- .rela.init ${RELOCATING-0} : { *(.rela.init) }
- .rel.text ${RELOCATING-0} : { *(.rel.text${RELOCATING+ .rel.text.* .rel.gnu.linkonce.t.*}) }
- .rela.text ${RELOCATING-0} : { *(.rela.text${RELOCATING+ .rela.text.* .rela.gnu.linkonce.t.*}) }
- .rel.fini ${RELOCATING-0} : { *(.rel.fini) }
- .rela.fini ${RELOCATING-0} : { *(.rela.fini) }
- .rel.rodata ${RELOCATING-0} : { *(.rel.rodata${RELOCATING+ .rel.rodata.* .rel.gnu.linkonce.r.*}) }
- .rela.rodata ${RELOCATING-0} : { *(.rela.rodata${RELOCATING+ .rela.rodata.* .rela.gnu.linkonce.r.*}) }
- ${OTHER_READONLY_RELOC_SECTIONS}
- .rel.data.rel.ro ${RELOCATING-0} : { *(.rel.data.rel.ro${RELOCATING+* .rel.gnu.linkonce.d.rel.ro.*}) }
- .rela.data.rel.ro ${RELOCATING-0} : { *(.rela.data.rel.ro${RELOCATING+* .rela.gnu.linkonce.d.rel.ro.*}) }
- .rel.data ${RELOCATING-0} : { *(.rel.data${RELOCATING+ .rel.data.* .rel.gnu.linkonce.d.*}) }
- .rela.data ${RELOCATING-0} : { *(.rela.data${RELOCATING+ .rela.data.* .rela.gnu.linkonce.d.*}) }
- .rel.tdata ${RELOCATING-0} : { *(.rel.tdata${RELOCATING+ .rel.tdata.* .rel.gnu.linkonce.td.*}) }
- .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.*}) }
- ${REL_LARGE}
-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}
-
- ${TEXT_PLT+${PLT}}
- ${TINY_READONLY_SECTION}
- .text ${RELOCATING-0} :
- {
- ${RELOCATING+${TEXT_START_SYMBOLS}}
- *(.text .stub${RELOCATING+ .text.* .gnu.linkonce.t.*})
- KEEP (*(.text.*personality*))
- /* .gnu.warning sections are handled specially by elf32.em. */
- *(.gnu.warning)
- ${RELOCATING+${OTHER_TEXT_SECTIONS}}
- } =${NOP-0}
- .fini ${RELOCATING-0} :
- {
- ${RELOCATING+${FINI_START}}
- KEEP (*(.fini))
- ${RELOCATING+${FINI_END}}
- } =${NOP-0}
- ${RELOCATING+PROVIDE (__${ETEXT_NAME} = .);}
- ${RELOCATING+PROVIDE (_${ETEXT_NAME} = .);}
- ${RELOCATING+PROVIDE (${ETEXT_NAME} = .);}
- ${WRITABLE_RODATA-${RODATA}}
- .rodata1 ${RELOCATING-0} : { *(.rodata1) }
- ${CREATE_SHLIB-${SDATA2}}
- ${CREATE_SHLIB-${SBSS2}}
- ${OTHER_READONLY_SECTIONS}
- .eh_frame_hdr : { *(.eh_frame_hdr) }
- .eh_frame ${RELOCATING-0} : ONLY_IF_RO { KEEP (*(.eh_frame)) }
- .gcc_except_table ${RELOCATING-0} : ONLY_IF_RO { *(.gcc_except_table .gcc_except_table.*) }
-
- /* Adjust the address for the data segment. We want to adjust up to
- the same address within the page on the next page up. */
- ${CREATE_SHLIB-${CREATE_PIE-${RELOCATING+. = ${DATA_ADDR-${DATA_SEGMENT_ALIGN}};}}}
- ${CREATE_SHLIB+${RELOCATING+. = ${SHLIB_DATA_ADDR-${DATA_SEGMENT_ALIGN}};}}
- ${CREATE_PIE+${RELOCATING+. = ${SHLIB_DATA_ADDR-${DATA_SEGMENT_ALIGN}};}}
-
- /* Exception handling */
- .eh_frame ${RELOCATING-0} : ONLY_IF_RW { KEEP (*(.eh_frame)) }
- .gcc_except_table ${RELOCATING-0} : ONLY_IF_RW { *(.gcc_except_table .gcc_except_table.*) }
-
- /* Thread Local Storage sections */
- .tdata ${RELOCATING-0} : { *(.tdata${RELOCATING+ .tdata.* .gnu.linkonce.td.*}) }
- .tbss ${RELOCATING-0} : { *(.tbss${RELOCATING+ .tbss.* .gnu.linkonce.tb.*})${RELOCATING+ *(.tcommon)} }
-
- .preinit_array ${RELOCATING-0} :
- {
- ${RELOCATING+${CREATE_SHLIB-PROVIDE_HIDDEN (${USER_LABEL_PREFIX}__preinit_array_start = .);}}
- KEEP (*(.preinit_array))
- ${RELOCATING+${CREATE_SHLIB-PROVIDE_HIDDEN (${USER_LABEL_PREFIX}__preinit_array_end = .);}}
- }
- .init_array ${RELOCATING-0} :
- {
- ${RELOCATING+${CREATE_SHLIB-PROVIDE_HIDDEN (${USER_LABEL_PREFIX}__init_array_start = .);}}
- KEEP (*(SORT(.init_array.*)))
- KEEP (*(.init_array))
- ${RELOCATING+${CREATE_SHLIB-PROVIDE_HIDDEN (${USER_LABEL_PREFIX}__init_array_end = .);}}
- }
- .fini_array ${RELOCATING-0} :
- {
- ${RELOCATING+${CREATE_SHLIB-PROVIDE_HIDDEN (${USER_LABEL_PREFIX}__fini_array_start = .);}}
- KEEP (*(SORT(.fini_array.*)))
- KEEP (*(.fini_array))
- ${RELOCATING+${CREATE_SHLIB-PROVIDE_HIDDEN (${USER_LABEL_PREFIX}__fini_array_end = .);}}
- }
- ${SMALL_DATA_CTOR-${RELOCATING+${CTOR}}}
- ${SMALL_DATA_DTOR-${RELOCATING+${DTOR}}}
- .jcr ${RELOCATING-0} : { KEEP (*(.jcr)) }
-
- ${RELOCATING+${DATARELRO}}
- ${OTHER_RELRO_SECTIONS}
- ${TEXT_DYNAMIC-${DYNAMIC}}
- ${DATA_GOT+${RELRO_NOW+${GOT}}}
- ${DATA_GOT+${RELRO_NOW+${GOTPLT}}}
- ${DATA_GOT+${RELRO_NOW-${SEPARATE_GOTPLT+${GOT}}}}
- ${RELOCATING+${DATA_SEGMENT_RELRO_END}}
- ${DATA_GOT+${RELRO_NOW-${SEPARATE_GOTPLT-${GOT}}}}
- ${DATA_GOT+${RELRO_NOW-${GOTPLT}}}
-
- ${DATA_PLT+${PLT_BEFORE_GOT-${PLT}}}
-
- .data ${RELOCATING-0} :
- {
- ${RELOCATING+${DATA_START_SYMBOLS}}
- *(.data${RELOCATING+ .data.* .gnu.linkonce.d.*})
- ${RELOCATING+KEEP (*(.gnu.linkonce.d.*personality*))}
- ${CONSTRUCTING+SORT(CONSTRUCTORS)}
- }
- .data1 ${RELOCATING-0} : { *(.data1) }
- ${WRITABLE_RODATA+${RODATA}}
- ${OTHER_READWRITE_SECTIONS}
- ${SMALL_DATA_CTOR+${RELOCATING+${CTOR}}}
- ${SMALL_DATA_DTOR+${RELOCATING+${DTOR}}}
- ${DATA_PLT+${PLT_BEFORE_GOT+${PLT}}}
- ${SDATA_GOT+${RELOCATING+${OTHER_GOT_SYMBOLS}}}
- ${SDATA_GOT+${GOT}}
- ${SDATA_GOT+${OTHER_GOT_SECTIONS}}
- ${SDATA}
- ${OTHER_SDATA_SECTIONS}
- ${RELOCATING+${DATA_END_SYMBOLS-${USER_LABEL_PREFIX}_edata = .; PROVIDE (${USER_LABEL_PREFIX}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.
- FIXME: Why do we need it? When there is no .bss section, we don't
- pad the .data section. */
- ${RELOCATING+. = ALIGN(. != 0 ? ${ALIGNMENT} : 1);}
- }
- ${OTHER_BSS_SECTIONS}
- ${RELOCATING+${OTHER_BSS_END_SYMBOLS}}
- ${RELOCATING+. = ALIGN(${ALIGNMENT});}
- ${LARGE_SECTIONS}
- ${RELOCATING+. = ALIGN(${ALIGNMENT});}
- ${RELOCATING+${OTHER_END_SYMBOLS}}
- ${RELOCATING+${END_SYMBOLS-${USER_LABEL_PREFIX}_end = .; PROVIDE (${USER_LABEL_PREFIX}end = .);}}
- ${RELOCATING+${DATA_SEGMENT_END}}
-
- /* Stabs debugging sections. */
- .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${RELOCATING+ .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) }
-
- /* DWARF 3 */
- .debug_pubtypes 0 : { *(.debug_pubtypes) }
- .debug_ranges 0 : { *(.debug_ranges) }
-
- ${TINY_DATA_SECTION}
- ${TINY_BSS_SECTION}
-
- ${STACK_ADDR+${STACK}}
- ${ATTRS_SECTIONS}
- ${OTHER_SECTIONS}
- ${RELOCATING+${OTHER_SYMBOLS}}
- ${RELOCATING+${STACKNOTE}}
-}
-EOF
diff --git a/contrib/binutils/ld/scripttempl/elf32cr16.sc b/contrib/binutils/ld/scripttempl/elf32cr16.sc
deleted file mode 100644
index 2e62fa2f5c76..000000000000
--- a/contrib/binutils/ld/scripttempl/elf32cr16.sc
+++ /dev/null
@@ -1,175 +0,0 @@
-# Linker Script for National Semiconductor's CR16-ELF32.
-
-# The next line should be uncommented if it is desired to link
-# without libstart.o and directly enter main.
-
-# ENTRY=_main
-
-test -z "$ENTRY" && ENTRY=_start
-cat <<EOF
-
-/* Example Linker Script for linking NS CR16 elf32 files. */
-
-/* The next line forces the entry point (${ENTRY} in this script)
- to be entered in the output file as an undefined symbol.
- It is needed in case the entry point is not called explicitly
- (which is the usual case) AND is in an archive. */
-
-OUTPUT_FORMAT("${OUTPUT_FORMAT}")
-OUTPUT_ARCH(${ARCH})
-EXTERN(${ENTRY})
-ENTRY(${ENTRY})
-
-/* Define memory regions. */
-MEMORY
-{
- rom : ORIGIN = 0x2, LENGTH = 3M
- ram : ORIGIN = 4M, LENGTH = 10M
-}
-
-/* Many sections come in three flavours. There is the 'real' section,
- like ".data". Then there are the per-procedure or per-variable
- sections, generated by -ffunction-sections and -fdata-sections in GCC,
- and useful for --gc-sections, which for a variable "foo" might be
- ".data.foo". Then there are the linkonce sections, for which the linker
- eliminates duplicates, which are named like ".gnu.linkonce.d.foo".
- The exact correspondences are:
-
- Section Linkonce section
- .text .gnu.linkonce.t.foo
- .rdata .gnu.linkonce.r.foo
- .data .gnu.linkonce.d.foo
- .bss .gnu.linkonce.b.foo
- .debug_info .gnu.linkonce.wi.foo */
-
-SECTIONS
-{
- .init :
- {
- __INIT_START = .;
- KEEP (*(.init))
- __INIT_END = .;
- } > rom
-
- .fini :
- {
- __FINI_START = .;
- KEEP (*(.fini))
- __FINI_END = .;
- } > rom
-
- .jcr :
- {
- KEEP (*(.jcr))
- } > rom
-
- .text :
- {
- __TEXT_START = .;
- *(.text) *(.text.*) *(.gnu.linkonce.t.*)
- __TEXT_END = .;
- } > rom
-
- .rdata :
- {
- __RDATA_START = .;
- *(.rdata_4) *(.rdata_2) *(.rdata_1) *(.rdata.*) *(.gnu.linkonce.r.*) *(.rodata*)
- __RDATA_END = .;
- } > rom
-
- .ctor ALIGN(4) :
- {
- __CTOR_START = .;
- /* The compiler uses crtbegin.o to find the start
- of the constructors, so we make sure it is
- first. Because this is a wildcard, it
- doesn't matter if the user does not
- actually link against crtbegin.o; the
- linker won't look for a file to match a
- wildcard. The wildcard also means that it
- doesn't matter which directory crtbegin.o
- is in. */
-
- KEEP (*crtbegin*.o(.ctors))
-
- /* We don't want to include the .ctor section from
- the crtend.o file until after the sorted ctors.
- The .ctor section from the crtend file contains the
- end of ctors marker and it must be last */
-
- KEEP (*(EXCLUDE_FILE (*crtend*.o) .ctors))
- KEEP (*(SORT(.ctors.*)))
- KEEP (*(.ctors))
- __CTOR_END = .;
- } > rom
-
- .dtor ALIGN(4) :
- {
- __DTOR_START = .;
- KEEP (*crtbegin*.o(.dtors))
- KEEP (*(EXCLUDE_FILE (*crtend*.o) .dtors))
- KEEP (*(SORT(.dtors.*)))
- KEEP (*(.dtors))
- __DTOR_END = .;
- } > rom
-
- .data :
- {
- __DATA_START = .;
- *(.data_4) *(.data_2) *(.data_1) *(.data) *(.data.*) *(.gnu.linkonce.d.*)
- __DATA_END = .;
- } > ram AT > rom
-
- .bss (NOLOAD) :
- {
- __BSS_START = .;
- *(.bss_4) *(.bss_2) *(.bss_1) *(.bss) *(COMMON) *(.bss.*) *(.gnu.linkonce.b.*)
- __BSS_END = .;
- } > ram
-
-/* You may change the sizes of the following sections to fit the actual
- size your program requires.
-
- The heap and stack are aligned to the bus width, as a speed optimization
- for accessing data located there. */
-
- .heap :
- {
- . = ALIGN(4);
- __HEAP_START = .;
- . += 0x2000; __HEAP_MAX = .;
- } > ram
-
- .stack :
- {
- . = ALIGN(4);
- . += 0x6000;
- __STACK_START = .;
- } > ram
-
- .istack :
- {
- . = ALIGN(4);
- . += 0x100;
- __ISTACK_START = .;
- } > ram
-
- .comment 0 : { *(.comment) }
-
- /* DWARF debug sections.
- Symbols in the DWARF debugging sections are relative to the beginning
- of the section so we begin them at 0. */
-
- .debug_aranges 0 : { *(.debug_aranges) }
- .debug_pubnames 0 : { *(.debug_pubnames) }
- .debug_info 0 : { *(.debug_info .gnu.linkonce.wi.*) }
- .debug_abbrev 0 : { *(.debug_abbrev) }
- .debug_line 0 : { *(.debug_line) }
- .debug_frame 0 : { *(.debug_frame) }
- .debug_str 0 : { *(.debug_str) }
- .debug_loc 0 : { *(.debug_loc) }
- .debug_macinfo 0 : { *(.debug_macinfo) }
-}
-
-__DATA_IMAGE_START = LOADADDR(.data);
-EOF
diff --git a/contrib/binutils/ld/scripttempl/i386coff.sc b/contrib/binutils/ld/scripttempl/i386coff.sc
deleted file mode 100644
index fbb1b7918c76..000000000000
--- 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/mep.sc b/contrib/binutils/ld/scripttempl/mep.sc
deleted file mode 100644
index 0d459c65b0a8..000000000000
--- a/contrib/binutils/ld/scripttempl/mep.sc
+++ /dev/null
@@ -1,446 +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.
-# SMALL_DATA_CTOR - .ctors contains small data.
-# SMALL_DATA_DTOR - .dtors contains small data.
-# DATA_ADDR - if end-of-text-plus-one-page isn't right for data start
-# INITIAL_READONLY_SECTIONS - at start of text segment
-# OTHER_READONLY_SECTIONS - other than .text .init .rodata ...
-# (e.g., .PARISC.milli)
-# OTHER_TEXT_SECTIONS - these get put in .text when relocating
-# OTHER_READWRITE_SECTIONS - other than .data .bss .ctors .sdata ...
-# (e.g., .PARISC.global)
-# OTHER_RELRO_SECTIONS - other than .data.rel.ro ...
-# (e.g. PPC32 .fixup, .got[12])
-# OTHER_BSS_SECTIONS - other than .bss .sbss ...
-# OTHER_SECTIONS - at the end
-# EXECUTABLE_SYMBOLS - symbols that must be defined for an
-# executable (e.g., _DYNAMIC_LINK)
-# TEXT_START_ADDR - the first byte of the text segment, after any
-# headers.
-# TEXT_BASE_ADDRESS - the first byte of the text segment.
-# TEXT_START_SYMBOLS - symbols that appear at the start of the
-# .text section.
-# DATA_START_SYMBOLS - symbols that appear at the start of the
-# .data section.
-# OTHER_GOT_SYMBOLS - symbols defined just before .got.
-# OTHER_GOT_SECTIONS - sections just after .got.
-# OTHER_SDATA_SECTIONS - sections just after .sdata.
-# OTHER_BSS_SYMBOLS - symbols that appear at the start of the
-# .bss section besides __bss_start.
-# DATA_PLT - .plt should be in data segment, not text segment.
-# PLT_BEFORE_GOT - .plt just before .got when .plt is in data segement.
-# BSS_PLT - .plt should be in bss segment
-# TEXT_DYNAMIC - .dynamic in text segment, not data segment.
-# EMBEDDED - whether this is for an embedded system.
-# SHLIB_TEXT_START_ADDR - if set, add to SIZEOF_HEADERS to set
-# start address of shared library.
-# INPUT_FILES - INPUT command of files to always include
-# WRITABLE_RODATA - if set, the .rodata section should be writable
-# INIT_START, INIT_END - statements just before and just after
-# combination of .init sections.
-# FINI_START, FINI_END - statements just before and just after
-# combination of .fini sections.
-# STACK_ADDR - start of a .stack section.
-# OTHER_END_SYMBOLS - symbols to place right at the end of the script.
-# SEPARATE_GOTPLT - if set, .got.plt should be separate output section,
-# so that .got can be in the RELRO area. It should be set to
-# the number of bytes in the beginning of .got.plt which can be
-# in the RELRO area as well.
-#
-# When adding sections, do note that the names of some sections are used
-# when specifying the start address of the next.
-#
-
-# Many sections come in three flavours. There is the 'real' section,
-# like ".data". Then there are the per-procedure or per-variable
-# sections, generated by -ffunction-sections and -fdata-sections in GCC,
-# and useful for --gc-sections, which for a variable "foo" might be
-# ".data.foo". Then there are the linkonce sections, for which the linker
-# eliminates duplicates, which are named like ".gnu.linkonce.d.foo".
-# The exact correspondences are:
-#
-# Section Linkonce section
-# .text .gnu.linkonce.t.foo
-# .rodata .gnu.linkonce.r.foo
-# .data .gnu.linkonce.d.foo
-# .bss .gnu.linkonce.b.foo
-# .sdata .gnu.linkonce.s.foo
-# .sbss .gnu.linkonce.sb.foo
-# .sdata2 .gnu.linkonce.s2.foo
-# .sbss2 .gnu.linkonce.sb2.foo
-# .debug_info .gnu.linkonce.wi.foo
-# .tdata .gnu.linkonce.td.foo
-# .tbss .gnu.linkonce.tb.foo
-#
-# Each of these can also have corresponding .rel.* and .rela.* sections.
-
-test -z "$ENTRY" && ENTRY=_start
-test -z "${BIG_OUTPUT_FORMAT}" && BIG_OUTPUT_FORMAT=${OUTPUT_FORMAT}
-test -z "${LITTLE_OUTPUT_FORMAT}" && LITTLE_OUTPUT_FORMAT=${OUTPUT_FORMAT}
-if [ -z "$MACHINE" ]; then OUTPUT_ARCH=${ARCH}; else OUTPUT_ARCH=${ARCH}:${MACHINE}; fi
-test -z "${ELFSIZE}" && ELFSIZE=32
-test -z "${ALIGNMENT}" && ALIGNMENT="${ELFSIZE} / 8"
-test "$LD_FLAG" = "N" && DATA_ADDR=.
-test -n "$CREATE_SHLIB$CREATE_PIE" && test -n "$SHLIB_DATA_ADDR" && COMMONPAGESIZE=""
-test -z "$CREATE_SHLIB$CREATE_PIE" && test -n "$DATA_ADDR" && COMMONPAGESIZE=""
-test -n "$RELRO_NOW" && unset SEPARATE_GOTPLT
-DATA_SEGMENT_ALIGN="ALIGN(${SEGMENT_SIZE}) + (. & (${MAXPAGESIZE} - 1))"
-DATA_SEGMENT_RELRO_END=""
-DATA_SEGMENT_RELRO_GOTPLT_END=""
-DATA_SEGMENT_END=""
-if test -n "${COMMONPAGESIZE}"; then
- DATA_SEGMENT_ALIGN="ALIGN (${SEGMENT_SIZE}) - ((${MAXPAGESIZE} - .) & (${MAXPAGESIZE} - 1)); . = DATA_SEGMENT_ALIGN (${MAXPAGESIZE}, ${COMMONPAGESIZE})"
- DATA_SEGMENT_END=". = DATA_SEGMENT_END (.);"
- if test -n "${SEPARATE_GOTPLT}"; then
- DATA_SEGMENT_RELRO_GOTPLT_END=". = DATA_SEGMENT_RELRO_END (${SEPARATE_GOTPLT}, .);"
- else
- DATA_SEGMENT_RELRO_END=". = DATA_SEGMENT_RELRO_END (0, .);"
- fi
-fi
-INTERP=".interp ${RELOCATING-0} : { *(.interp) }"
-PLT=".plt ${RELOCATING-0} : { *(.plt) }"
-if test -z "$GOT"; then
- if test -z "$SEPARATE_GOTPLT"; then
- GOT=".got ${RELOCATING-0} : { *(.got.plt) *(.got) }"
- else
- GOT=".got ${RELOCATING-0} : { *(.got) }"
- GOTPLT="${RELOCATING+${DATA_SEGMENT_RELRO_GOTPLT_END}}
- .got.plt ${RELOCATING-0} : { *(.got.plt) }"
- fi
-fi
-DYNAMIC=".dynamic ${RELOCATING-0} : { *(.dynamic) }"
-RODATA=".rodata ${RELOCATING-0} : { *(.rodata${RELOCATING+ .rodata.* .gnu.linkonce.r.*}) }"
-DATARELRO=".data.rel.ro : { *(.data.rel.ro.local) *(.data.rel.ro*) }"
-STACKNOTE="/DISCARD/ : { *(.note.GNU-stack) }"
-if test -z "${NO_SMALL_DATA}"; then
- SBSS=".sbss ${RELOCATING-0} :
- {
- ${RELOCATING+PROVIDE (__sbss_start = .);}
- ${RELOCATING+PROVIDE (___sbss_start = .);}
- ${CREATE_SHLIB+*(.sbss2 .sbss2.* .gnu.linkonce.sb2.*)}
- *(.dynsbss)
- *(.sbss${RELOCATING+ .sbss.* .gnu.linkonce.sb.*})
- *(.scommon)
- ${RELOCATING+PROVIDE (__sbss_end = .);}
- ${RELOCATING+PROVIDE (___sbss_end = .);}
- }"
- SBSS2=".sbss2 ${RELOCATING-0} : { *(.sbss2${RELOCATING+ .sbss2.* .gnu.linkonce.sb2.*}) }"
- SDATA="/* We want the small data sections together, so single-instruction offsets
- can access them all, and initialized data all before uninitialized, so
- we can shorten the on-disk segment size. */
- .sdata ${RELOCATING-0} :
- {
- ${RELOCATING+${SDATA_START_SYMBOLS}}
- ${CREATE_SHLIB+*(.sdata2 .sdata2.* .gnu.linkonce.s2.*)}
- *(.sdata${RELOCATING+ .sdata.* .gnu.linkonce.s.*})
- }"
- SDATA2=".sdata2 ${RELOCATING-0} : { *(.sdata2${RELOCATING+ .sdata2.* .gnu.linkonce.s2.*}) }"
- REL_SDATA=".rel.sdata ${RELOCATING-0} : { *(.rel.sdata${RELOCATING+ .rel.sdata.* .rel.gnu.linkonce.s.*}) }
- .rela.sdata ${RELOCATING-0} : { *(.rela.sdata${RELOCATING+ .rela.sdata.* .rela.gnu.linkonce.s.*}) }"
- REL_SBSS=".rel.sbss ${RELOCATING-0} : { *(.rel.sbss${RELOCATING+ .rel.sbss.* .rel.gnu.linkonce.sb.*}) }
- .rela.sbss ${RELOCATING-0} : { *(.rela.sbss${RELOCATING+ .rela.sbss.* .rela.gnu.linkonce.sb.*}) }"
- REL_SDATA2=".rel.sdata2 ${RELOCATING-0} : { *(.rel.sdata2${RELOCATING+ .rel.sdata2.* .rel.gnu.linkonce.s2.*}) }
- .rela.sdata2 ${RELOCATING-0} : { *(.rela.sdata2${RELOCATING+ .rela.sdata2.* .rela.gnu.linkonce.s2.*}) }"
- REL_SBSS2=".rel.sbss2 ${RELOCATING-0} : { *(.rel.sbss2${RELOCATING+ .rel.sbss2.* .rel.gnu.linkonce.sb2.*}) }
- .rela.sbss2 ${RELOCATING-0} : { *(.rela.sbss2${RELOCATING+ .rela.sbss2.* .rela.gnu.linkonce.sb2.*}) }"
-else
- NO_SMALL_DATA=" "
-fi
-test -n "$SEPARATE_GOTPLT" && SEPARATE_GOTPLT=" "
-CTOR=".ctors ${CONSTRUCTING-0} :
- {
- ${CONSTRUCTING+${CTOR_START}}
- /* gcc uses crtbegin.o to find the start of
- the constructors, so we make sure it is
- first. Because this is a wildcard, it
- doesn't matter if the user does not
- actually link against crtbegin.o; the
- linker won't look for a file to match a
- wildcard. The wildcard also means that it
- doesn't matter which directory crtbegin.o
- is in. */
-
- KEEP (*crtbegin*.o(.ctors))
-
- /* We don't want to include the .ctor section from
- from the crtend.o file until after the sorted ctors.
- The .ctor section from the crtend file contains the
- end of ctors marker and it must be last */
-
- KEEP (*(EXCLUDE_FILE (*crtend*.o $OTHER_EXCLUDE_FILES) .ctors))
- KEEP (*(SORT(.ctors.*)))
- KEEP (*(.ctors))
- ${CONSTRUCTING+${CTOR_END}}
- }"
-DTOR=".dtors ${CONSTRUCTING-0} :
- {
- ${CONSTRUCTING+${DTOR_START}}
- KEEP (*crtbegin*.o(.dtors))
- KEEP (*(EXCLUDE_FILE (*crtend*.o $OTHER_EXCLUDE_FILES) .dtors))
- KEEP (*(SORT(.dtors.*)))
- KEEP (*(.dtors))
- ${CONSTRUCTING+${DTOR_END}}
- }"
-STACK=" .stack ${RELOCATING-0}${RELOCATING+${STACK_ADDR}} :
- {
- ${RELOCATING+_stack = .;}
- *(.stack)
- }"
-
-# if this is for an embedded system, don't add SIZEOF_HEADERS.
-if [ -z "$EMBEDDED" ]; then
- test -z "${TEXT_BASE_ADDRESS}" && TEXT_BASE_ADDRESS="${TEXT_START_ADDR} + SIZEOF_HEADERS"
-else
- test -z "${TEXT_BASE_ADDRESS}" && TEXT_BASE_ADDRESS="${TEXT_START_ADDR}"
-fi
-
-cat <<EOF
-OUTPUT_FORMAT("${OUTPUT_FORMAT}", "${BIG_OUTPUT_FORMAT}",
- "${LITTLE_OUTPUT_FORMAT}")
-OUTPUT_ARCH(${OUTPUT_ARCH})
-ENTRY(${ENTRY})
-
-${RELOCATING+${LIB_SEARCH_DIRS}}
-${RELOCATING+/* Do we need any of these for elf?
- __DYNAMIC = 0; ${STACKZERO+${STACKZERO}} ${SHLIB_PATH+${SHLIB_PATH}} */}
-${RELOCATING+${EXECUTABLE_SYMBOLS}}
-${RELOCATING+${INPUT_FILES}}
-${RELOCATING- /* For some reason, the Solaris linker makes bad executables
- if gld -r is used and the intermediate file has sections starting
- at non-zero addresses. Could be a Solaris ld bug, could be a GNU ld
- bug. But for now assigning the zero vmas works. */}
-
-SECTIONS
-{
- /* Read-only sections, merged into text segment: */
- ${CREATE_SHLIB-${CREATE_PIE-${RELOCATING+PROVIDE (__executable_start = ${TEXT_START_ADDR}); . = ${TEXT_BASE_ADDRESS};}}}
- ${CREATE_SHLIB+${RELOCATING+. = ${SHLIB_TEXT_START_ADDR:-0} + SIZEOF_HEADERS;}}
- ${CREATE_PIE+${RELOCATING+. = ${SHLIB_TEXT_START_ADDR:-0} + SIZEOF_HEADERS;}}
- ${CREATE_SHLIB-${INTERP}}
- ${INITIAL_READONLY_SECTIONS}
- ${TEXT_DYNAMIC+${DYNAMIC}}
- .hash ${RELOCATING-0} : { *(.hash) }
- .dynsym ${RELOCATING-0} : { *(.dynsym) }
- .dynstr ${RELOCATING-0} : { *(.dynstr) }
- .gnu.version ${RELOCATING-0} : { *(.gnu.version) }
- .gnu.version_d ${RELOCATING-0}: { *(.gnu.version_d) }
- .gnu.version_r ${RELOCATING-0}: { *(.gnu.version_r) }
-
-EOF
-if [ "x$COMBRELOC" = x ]; then
- COMBRELOCCAT=cat
-else
- COMBRELOCCAT="cat > $COMBRELOC"
-fi
-eval $COMBRELOCCAT <<EOF
- .rel.init ${RELOCATING-0} : { *(.rel.init) }
- .rela.init ${RELOCATING-0} : { *(.rela.init) }
- .rel.text ${RELOCATING-0} : { *(.rel.text${RELOCATING+ .rel.text.* .rel.gnu.linkonce.t.*}) }
- .rela.text ${RELOCATING-0} : { *(.rela.text${RELOCATING+ .rela.text.* .rela.gnu.linkonce.t.*}) }
- .rel.fini ${RELOCATING-0} : { *(.rel.fini) }
- .rela.fini ${RELOCATING-0} : { *(.rela.fini) }
- .rel.rodata ${RELOCATING-0} : { *(.rel.rodata${RELOCATING+ .rel.rodata.* .rel.gnu.linkonce.r.*}) }
- .rela.rodata ${RELOCATING-0} : { *(.rela.rodata${RELOCATING+ .rela.rodata.* .rela.gnu.linkonce.r.*}) }
- ${OTHER_READONLY_RELOC_SECTIONS}
- .rel.data.rel.ro ${RELOCATING-0} : { *(.rel.data.rel.ro${RELOCATING+*}) }
- .rela.data.rel.ro ${RELOCATING-0} : { *(.rel.data.rel.ro${RELOCATING+*}) }
- .rel.data ${RELOCATING-0} : { *(.rel.data${RELOCATING+ .rel.data.* .rel.gnu.linkonce.d.*}) }
- .rela.data ${RELOCATING-0} : { *(.rela.data${RELOCATING+ .rela.data.* .rela.gnu.linkonce.d.*}) }
- .rel.tdata ${RELOCATING-0} : { *(.rel.tdata${RELOCATING+ .rel.tdata.* .rel.gnu.linkonce.td.*}) }
- .rela.tdata ${RELOCATING-0} : { *(.rela.tdata${RELOCATING+ .rela.tdata.* .rela.gnu.linkonce.td.*}) }
- .rel.tbss ${RELOCATING-0} : { *(.rel.tbss${RELOCATING+ .rel.tbss.* .rel.gnu.linkonce.tb.*}) }
- .rela.tbss ${RELOCATING-0} : { *(.rela.tbss${RELOCATING+ .rela.tbss.* .rela.gnu.linkonce.tb.*}) }
- .rel.ctors ${RELOCATING-0} : { *(.rel.ctors) }
- .rela.ctors ${RELOCATING-0} : { *(.rela.ctors) }
- .rel.dtors ${RELOCATING-0} : { *(.rel.dtors) }
- .rela.dtors ${RELOCATING-0} : { *(.rela.dtors) }
- .rel.got ${RELOCATING-0} : { *(.rel.got) }
- .rela.got ${RELOCATING-0} : { *(.rela.got) }
- ${OTHER_GOT_RELOC_SECTIONS}
- ${REL_SDATA}
- ${REL_SBSS}
- ${REL_SDATA2}
- ${REL_SBSS2}
- .rel.bss ${RELOCATING-0} : { *(.rel.bss${RELOCATING+ .rel.bss.* .rel.gnu.linkonce.b.*}) }
- .rela.bss ${RELOCATING-0} : { *(.rela.bss${RELOCATING+ .rela.bss.* .rela.gnu.linkonce.b.*}) }
-EOF
-if [ -n "$COMBRELOC" ]; then
-cat <<EOF
- .rel.dyn ${RELOCATING-0} :
- {
-EOF
-sed -e '/^[ ]*[{}][ ]*$/d;/:[ ]*$/d;/\.rela\./d;s/^.*: { *\(.*\)}$/ \1/' $COMBRELOC
-cat <<EOF
- }
- .rela.dyn ${RELOCATING-0} :
- {
-EOF
-sed -e '/^[ ]*[{}][ ]*$/d;/:[ ]*$/d;/\.rel\./d;s/^.*: { *\(.*\)}/ \1/' $COMBRELOC
-cat <<EOF
- }
-EOF
-fi
-cat <<EOF
- .rel.plt ${RELOCATING-0} : { *(.rel.plt) }
- .rela.plt ${RELOCATING-0} : { *(.rela.plt) }
- ${OTHER_PLT_RELOC_SECTIONS}
-
- .init ${RELOCATING-0} :
- {
- ${RELOCATING+${INIT_START}}
- KEEP (*(.init))
- ${RELOCATING+${INIT_END}}
- } =${NOP-0}
-
- ${DATA_PLT-${BSS_PLT-${PLT}}}
- .text ${RELOCATING-0} :
- {
- ${RELOCATING+${TEXT_START_SYMBOLS}}
- *(.text .stub${RELOCATING+ .text.* .gnu.linkonce.t.*})
- KEEP (*(.text.*personality*))
- /* .gnu.warning sections are handled specially by elf32.em. */
- *(.gnu.warning)
- ${RELOCATING+${OTHER_TEXT_SECTIONS}}
- } =${NOP-0}
- .fini ${RELOCATING-0} :
- {
- ${RELOCATING+${FINI_START}}
- KEEP (*(.fini))
- ${RELOCATING+${FINI_END}}
- } =${NOP-0}
- ${RELOCATING+PROVIDE (__etext = .);}
- ${RELOCATING+PROVIDE (_etext = .);}
- ${RELOCATING+PROVIDE (etext = .);}
- ${WRITABLE_RODATA-${RODATA}}
- .rodata1 ${RELOCATING-0} : { *(.rodata1) }
- ${CREATE_SHLIB-${SDATA2}}
- ${CREATE_SHLIB-${SBSS2}}
- ${OTHER_READONLY_SECTIONS}
- .eh_frame_hdr : { *(.eh_frame_hdr) }
- .eh_frame ${RELOCATING-0} : ONLY_IF_RO { KEEP (*(.eh_frame)) }
- .gcc_except_table ${RELOCATING-0} : ONLY_IF_RO { KEEP (*(.gcc_except_table)) *(.gcc_except_table.*) }
-
- /* Adjust the address for the data segment. We want to adjust up to
- the same address within the page on the next page up. */
- ${CREATE_SHLIB-${CREATE_PIE-${RELOCATING+. = ${DATA_ADDR-${DATA_SEGMENT_ALIGN}};}}}
- ${CREATE_SHLIB+${RELOCATING+. = ${SHLIB_DATA_ADDR-${DATA_SEGMENT_ALIGN}};}}
- ${CREATE_PIE+${RELOCATING+. = ${SHLIB_DATA_ADDR-${DATA_SEGMENT_ALIGN}};}}
-
- /* Exception handling */
- .eh_frame ${RELOCATING-0} : ONLY_IF_RW { KEEP (*(.eh_frame)) }
- .gcc_except_table ${RELOCATING-0} : ONLY_IF_RW { KEEP (*(.gcc_except_table)) *(.gcc_except_table.*) }
-
- /* Thread Local Storage sections */
- .tdata ${RELOCATING-0} : { *(.tdata${RELOCATING+ .tdata.* .gnu.linkonce.td.*}) }
- .tbss ${RELOCATING-0} : { *(.tbss${RELOCATING+ .tbss.* .gnu.linkonce.tb.*})${RELOCATING+ *(.tcommon)} }
-
- .preinit_array ${RELOCATING-0} : { KEEP (*(.preinit_array)) }
- .init_array ${RELOCATING-0} : { KEEP (*(.init_array)) }
- .fini_array ${RELOCATING-0} : { KEEP (*(.fini_array)) }
-
- ${SMALL_DATA_CTOR-${RELOCATING+${CTOR}}}
- ${SMALL_DATA_DTOR-${RELOCATING+${DTOR}}}
- .jcr ${RELOCATING-0} : { KEEP (*(.jcr)) }
-
- ${RELOCATING+${DATARELRO}}
- ${OTHER_RELRO_SECTIONS}
- ${TEXT_DYNAMIC-${DYNAMIC}}
- ${NO_SMALL_DATA+${RELRO_NOW+${GOT}}}
- ${NO_SMALL_DATA+${RELRO_NOW-${SEPARATE_GOTPLT+${GOT}}}}
- ${NO_SMALL_DATA+${RELRO_NOW-${SEPARATE_GOTPLT+${GOTPLT}}}}
- ${RELOCATING+${DATA_SEGMENT_RELRO_END}}
- ${NO_SMALL_DATA+${RELRO_NOW-${SEPARATE_GOTPLT-${GOT}}}}
-
- ${DATA_PLT+${PLT_BEFORE_GOT-${PLT}}}
-
- .data ${RELOCATING-0} :
- {
- ${RELOCATING+${DATA_START_SYMBOLS}}
- *(.data${RELOCATING+ .data.* .gnu.linkonce.d.*})
- KEEP (*(.gnu.linkonce.d.*personality*))
- ${CONSTRUCTING+SORT(CONSTRUCTORS)}
- }
- .data1 ${RELOCATING-0} : { *(.data1) }
- ${WRITABLE_RODATA+${RODATA}}
- ${OTHER_READWRITE_SECTIONS}
- ${SMALL_DATA_CTOR+${RELOCATING+${CTOR}}}
- ${SMALL_DATA_DTOR+${RELOCATING+${DTOR}}}
- ${DATA_PLT+${PLT_BEFORE_GOT+${PLT}}}
- ${RELOCATING+${OTHER_GOT_SYMBOLS}}
- ${NO_SMALL_DATA-${GOT}}
- ${OTHER_GOT_SECTIONS}
- ${SDATA}
- ${OTHER_SDATA_SECTIONS}
- ${RELOCATING+_edata = .;}
- ${RELOCATING+PROVIDE (edata = .);}
- ${RELOCATING+__bss_start = .;}
- ${RELOCATING+${OTHER_BSS_SYMBOLS}}
- ${SBSS}
- ${BSS_PLT+${PLT}}
- .bss ${RELOCATING-0} :
- {
- *(.dynbss)
- *(.bss${RELOCATING+ .bss.* .gnu.linkonce.b.*})
- *(COMMON)
- /* Align here to ensure that the .bss section occupies space up to
- _end. Align after .bss to ensure correct alignment even if the
- .bss section disappears because there are no input sections. */
- ${RELOCATING+. = ALIGN(${ALIGNMENT});}
- }
- ${OTHER_BSS_SECTIONS}
- ${RELOCATING+. = ALIGN(${ALIGNMENT});}
- ${RELOCATING+_end = .;}
- ${RELOCATING+${OTHER_BSS_END_SYMBOLS}}
- ${RELOCATING+PROVIDE (end = .);}
- ${RELOCATING+${DATA_SEGMENT_END}}
-
- /* Stabs debugging sections. */
- .stab 0 : { *(.stab) }
- .stabstr 0 : { *(.stabstr) }
- .stab.excl 0 : { *(.stab.excl) }
- .stab.exclstr 0 : { *(.stab.exclstr) }
- .stab.index 0 : { *(.stab.index) }
- .stab.indexstr 0 : { *(.stab.indexstr) }
-
- .comment 0 : { *(.comment) }
-
- /* DWARF debug sections.
- Symbols in the DWARF debugging sections are relative to the beginning
- of the section so we begin them at 0. */
-
- /* DWARF 1 */
- .debug 0 : { *(.debug) }
- .line 0 : { *(.line) }
-
- /* GNU DWARF 1 extensions */
- .debug_srcinfo 0 : { *(.debug_srcinfo) }
- .debug_sfnames 0 : { *(.debug_sfnames) }
-
- /* DWARF 1.1 and DWARF 2 */
- .debug_aranges 0 : { *(.debug_aranges) }
- .debug_pubnames 0 : { *(.debug_pubnames) }
-
- /* DWARF 2 */
- .debug_info 0 : { *(.debug_info .gnu.linkonce.wi.*) }
- .debug_abbrev 0 : { *(.debug_abbrev) }
- .debug_line 0 : { *(.debug_line) }
- .debug_frame 0 : { *(.debug_frame) }
- .debug_str 0 : { *(.debug_str) }
- .debug_loc 0 : { *(.debug_loc) }
- .debug_macinfo 0 : { *(.debug_macinfo) }
-
- /* SGI/MIPS DWARF 2 extensions */
- .debug_weaknames 0 : { *(.debug_weaknames) }
- .debug_funcnames 0 : { *(.debug_funcnames) }
- .debug_typenames 0 : { *(.debug_typenames) }
- .debug_varnames 0 : { *(.debug_varnames) }
-
- ${STACK_ADDR+${STACK}}
- ${OTHER_SECTIONS}
- ${RELOCATING+${OTHER_END_SYMBOLS}}
- ${RELOCATING+${STACKNOTE}}
-}
-EOF
diff --git a/contrib/binutils/ld/scripttempl/mips.sc b/contrib/binutils/ld/scripttempl/mips.sc
deleted file mode 100644
index 972351f754b3..000000000000
--- a/contrib/binutils/ld/scripttempl/mips.sc
+++ /dev/null
@@ -1,69 +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)
- *(.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 b222b3356003..000000000000
--- 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 3fb9bce112de..000000000000
--- 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 c9931b51489c..000000000000
--- a/contrib/binutils/ld/scripttempl/pe.sc
+++ /dev/null
@@ -1,272 +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_XC='*(SORT(.CRT$XC*)) /* C initialization */'
- R_CRT_XI='*(SORT(.CRT$XI*)) /* C++ initialization */'
- R_CRT_XL='*(SORT(.CRT$XL*)) /* TLS callbacks */'
- R_CRT_XP='*(SORT(.CRT$XP*)) /* Pre-termination */'
- R_CRT_XT='*(SORT(.CRT$XT*)) /* Termination */'
- R_TLS='
- *(.tls)
- *(.tls$)
- *(SORT(.tls$*))'
- R_RSRC='*(SORT(.rsrc$*))'
-else
- R_TEXT=
- R_DATA=
- R_RDATA=
- R_IDATA=
- R_CRT=
- R_RSRC=
-fi
-
-cat <<EOF
-${RELOCATING+OUTPUT_FORMAT(${OUTPUT_FORMAT})}
-${RELOCATING-OUTPUT_FORMAT(${RELOCATEABLE_OUTPUT_FORMAT})}
-${OUTPUT_ARCH+OUTPUT_ARCH(${OUTPUT_ARCH})}
-
-${LIB_SEARCH_DIRS}
-
-SECTIONS
-{
- ${RELOCATING+/* Make the virtual address and file offset synced if the alignment is}
- ${RELOCATING+ lower than the target page size. */}
- ${RELOCATING+. = SIZEOF_HEADERS;}
- ${RELOCATING+. = ALIGN(__section_alignment__);}
- .text ${RELOCATING+ __image_base__ + ( __section_alignment__ < ${TARGET_PAGE_SIZE} ? . : __section_alignment__ )} :
- {
- ${RELOCATING+ *(.init)}
- *(.text)
- ${R_TEXT}
- *(.glue_7t)
- *(.glue_7)
- ${CONSTRUCTING+ ___CTOR_LIST__ = .; __CTOR_LIST__ = . ;
- LONG (-1);*(.ctors); *(.ctor); *(SORT(.ctors.*)); LONG (0); }
- ${CONSTRUCTING+ ___DTOR_LIST__ = .; __DTOR_LIST__ = . ;
- LONG (-1); *(.dtors); *(.dtor); *(SORT(.dtors.*)); LONG (0); }
- ${RELOCATING+ *(.fini)}
- /* ??? Why is .gcc_exc here? */
- ${RELOCATING+ *(.gcc_exc)}
- ${RELOCATING+PROVIDE (etext = .);}
- *(.gcc_except_table)
- }
-
- /* The Cygwin32 library uses a section to avoid copying certain data
- on fork. This used to be named ".data$nocopy". The linker used
- to include this between __data_start__ and __data_end__, but that
- breaks building the cygwin32 dll. Instead, we name the section
- ".data_cygwin_nocopy" and explictly include it after __data_end__. */
-
- .data ${RELOCATING+BLOCK(__section_alignment__)} :
- {
- ${RELOCATING+__data_start__ = . ;}
- *(.data)
- *(.data2)
- ${R_DATA}
- *(.jcr)
- ${RELOCATING+__data_end__ = . ;}
- ${RELOCATING+*(.data_cygwin_nocopy)}
- }
-
- .rdata ${RELOCATING+BLOCK(__section_alignment__)} :
- {
- *(.rdata)
- ${R_RDATA}
- *(.eh_frame)
- ${RELOCATING+___RUNTIME_PSEUDO_RELOC_LIST__ = .;}
- ${RELOCATING+__RUNTIME_PSEUDO_RELOC_LIST__ = .;}
- *(.rdata_runtime_pseudo_reloc)
- ${RELOCATING+___RUNTIME_PSEUDO_RELOC_LIST_END__ = .;}
- ${RELOCATING+__RUNTIME_PSEUDO_RELOC_LIST_END__ = .;}
- }
-
- .pdata ${RELOCATING+BLOCK(__section_alignment__)} :
- {
- *(.pdata)
- }
-
- .bss ${RELOCATING+BLOCK(__section_alignment__)} :
- {
- ${RELOCATING+__bss_start__ = . ;}
- *(.bss)
- *(COMMON)
- ${RELOCATING+__bss_end__ = . ;}
- }
-
- .edata ${RELOCATING+BLOCK(__section_alignment__)} :
- {
- *(.edata)
- }
-
- /DISCARD/ :
- {
- *(.debug\$S)
- *(.debug\$T)
- *(.debug\$F)
- *(.drectve)
- }
-
- .idata ${RELOCATING+BLOCK(__section_alignment__)} :
- {
- /* This cannot currently be handled with grouped sections.
- See pe.em:sort_sections. */
- ${R_IDATA}
- }
- .CRT ${RELOCATING+BLOCK(__section_alignment__)} :
- {
- ${RELOCATING+___crt_xc_start__ = . ;}
- ${R_CRT_XC}
- ${RELOCATING+___crt_xc_end__ = . ;}
- ${RELOCATING+___crt_xi_start__ = . ;}
- ${R_CRT_XI}
- ${RELOCATING+___crt_xi_end__ = . ;}
- ${RELOCATING+___crt_xl_start__ = . ;}
- ${R_CRT_XL}
- /* ___crt_xl_end__ is defined in the TLS Directory support code */
- ${RELOCATING+___crt_xp_start__ = . ;}
- ${R_CRT_XP}
- ${RELOCATING+___crt_xp_end__ = . ;}
- ${RELOCATING+___crt_xt_start__ = . ;}
- ${R_CRT_XT}
- ${RELOCATING+___crt_xt_end__ = . ;}
- }
-
- .tls ${RELOCATING+BLOCK(__section_alignment__)} :
- {
- ${RELOCATING+___tls_start__ = . ;}
- ${R_TLS}
- ${RELOCATING+___tls_end__ = . ;}
- }
-
- .endjunk ${RELOCATING+BLOCK(__section_alignment__)} :
- {
- /* end is deprecated, don't use it */
- ${RELOCATING+PROVIDE (end = .);}
- ${RELOCATING+PROVIDE ( _end = .);}
- ${RELOCATING+ __end__ = .;}
- }
-
- .rsrc ${RELOCATING+BLOCK(__section_alignment__)} :
- {
- *(.rsrc)
- ${R_RSRC}
- }
-
- .reloc ${RELOCATING+BLOCK(__section_alignment__)} :
- {
- *(.reloc)
- }
-
- .stab ${RELOCATING+BLOCK(__section_alignment__)} ${RELOCATING+(NOLOAD)} :
- {
- *(.stab)
- }
-
- .stabstr ${RELOCATING+BLOCK(__section_alignment__)} ${RELOCATING+(NOLOAD)} :
- {
- *(.stabstr)
- }
-
- /* DWARF debug sections.
- Symbols in the DWARF debugging sections are relative to the beginning
- of the section. Unlike other targets that fake this by putting the
- section VMA at 0, the PE format will not allow it. */
-
- /* DWARF 1.1 and DWARF 2. */
- .debug_aranges ${RELOCATING+BLOCK(__section_alignment__)} ${RELOCATING+(NOLOAD)} :
- {
- *(.debug_aranges)
- }
-
- .debug_pubnames ${RELOCATING+BLOCK(__section_alignment__)} ${RELOCATING+(NOLOAD)} :
- {
- *(.debug_pubnames)
- }
-
- /* DWARF 2. */
- .debug_info ${RELOCATING+BLOCK(__section_alignment__)} ${RELOCATING+(NOLOAD)} :
- {
- *(.debug_info) *(.gnu.linkonce.wi.*)
- }
-
- .debug_abbrev ${RELOCATING+BLOCK(__section_alignment__)} ${RELOCATING+(NOLOAD)} :
- {
- *(.debug_abbrev)
- }
-
- .debug_line ${RELOCATING+BLOCK(__section_alignment__)} ${RELOCATING+(NOLOAD)} :
- {
- *(.debug_line)
- }
-
- .debug_frame ${RELOCATING+BLOCK(__section_alignment__)} ${RELOCATING+(NOLOAD)} :
- {
- *(.debug_frame)
- }
-
- .debug_str ${RELOCATING+BLOCK(__section_alignment__)} ${RELOCATING+(NOLOAD)} :
- {
- *(.debug_str)
- }
-
- .debug_loc ${RELOCATING+BLOCK(__section_alignment__)} ${RELOCATING+(NOLOAD)} :
- {
- *(.debug_loc)
- }
-
- .debug_macinfo ${RELOCATING+BLOCK(__section_alignment__)} ${RELOCATING+(NOLOAD)} :
- {
- *(.debug_macinfo)
- }
-
- /* SGI/MIPS DWARF 2 extensions. */
- .debug_weaknames ${RELOCATING+BLOCK(__section_alignment__)} ${RELOCATING+(NOLOAD)} :
- {
- *(.debug_weaknames)
- }
-
- .debug_funcnames ${RELOCATING+BLOCK(__section_alignment__)} ${RELOCATING+(NOLOAD)} :
- {
- *(.debug_funcnames)
- }
-
- .debug_typenames ${RELOCATING+BLOCK(__section_alignment__)} ${RELOCATING+(NOLOAD)} :
- {
- *(.debug_typenames)
- }
-
- .debug_varnames ${RELOCATING+BLOCK(__section_alignment__)} ${RELOCATING+(NOLOAD)} :
- {
- *(.debug_varnames)
- }
-
- /* DWARF 3. */
- .debug_ranges ${RELOCATING+BLOCK(__section_alignment__)} ${RELOCATING+(NOLOAD)} :
- {
- *(.debug_ranges)
- }
-}
-EOF
diff --git a/contrib/binutils/ld/scripttempl/pep.sc b/contrib/binutils/ld/scripttempl/pep.sc
deleted file mode 100644
index edad5ee8ecc8..000000000000
--- a/contrib/binutils/ld/scripttempl/pep.sc
+++ /dev/null
@@ -1,272 +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_XC='*(SORT(.CRT$XC*)) /* C initialization */'
- R_CRT_XI='*(SORT(.CRT$XI*)) /* C++ initialization */'
- R_CRT_XL='*(SORT(.CRT$XL*)) /* TLS callbacks */'
- R_CRT_XP='*(SORT(.CRT$XP*)) /* Pre-termination */'
- R_CRT_XT='*(SORT(.CRT$XT*)) /* Termination */'
- R_TLS='
- *(.tls)
- *(.tls$)
- *(SORT(.tls$*))'
- R_RSRC='*(SORT(.rsrc$*))'
-else
- R_TEXT=
- R_DATA=
- R_RDATA=
- R_IDATA=
- R_CRT=
- R_RSRC=
-fi
-
-cat <<EOF
-${RELOCATING+OUTPUT_FORMAT(${OUTPUT_FORMAT})}
-${RELOCATING-OUTPUT_FORMAT(${RELOCATEABLE_OUTPUT_FORMAT})}
-${OUTPUT_ARCH+OUTPUT_ARCH(${OUTPUT_ARCH})}
-
-${LIB_SEARCH_DIRS}
-
-SECTIONS
-{
- ${RELOCATING+/* Make the virtual address and file offset synced if the alignment is}
- ${RELOCATING+ lower than the target page size. */}
- ${RELOCATING+. = SIZEOF_HEADERS;}
- ${RELOCATING+. = ALIGN(__section_alignment__);}
- .text ${RELOCATING+ __image_base__ + ( __section_alignment__ < ${TARGET_PAGE_SIZE} ? . : __section_alignment__ )} :
- {
- ${RELOCATING+ *(.init)}
- *(.text)
- ${R_TEXT}
- *(.glue_7t)
- *(.glue_7)
- ${CONSTRUCTING+ ___CTOR_LIST__ = .; __CTOR_LIST__ = . ;
- LONG (-1);*(.ctors); *(.ctor); *(SORT(.ctors.*)); LONG (0); }
- ${CONSTRUCTING+ ___DTOR_LIST__ = .; __DTOR_LIST__ = . ;
- LONG (-1); *(.dtors); *(.dtor); *(SORT(.dtors.*)); LONG (0); }
- ${RELOCATING+ *(.fini)}
- /* ??? Why is .gcc_exc here? */
- ${RELOCATING+ *(.gcc_exc)}
- ${RELOCATING+PROVIDE (etext = .);}
- *(.gcc_except_table)
- }
-
- /* The Cygwin32 library uses a section to avoid copying certain data
- on fork. This used to be named ".data$nocopy". The linker used
- to include this between __data_start__ and __data_end__, but that
- breaks building the cygwin32 dll. Instead, we name the section
- ".data_cygwin_nocopy" and explictly include it after __data_end__. */
-
- .data ${RELOCATING+BLOCK(__section_alignment__)} :
- {
- ${RELOCATING+__data_start__ = . ;}
- *(.data)
- *(.data2)
- ${R_DATA}
- *(.jcr)
- ${RELOCATING+__data_end__ = . ;}
- ${RELOCATING+*(.data_cygwin_nocopy)}
- }
-
- .rdata ${RELOCATING+BLOCK(__section_alignment__)} :
- {
- *(.rdata)
- ${R_RDATA}
- *(.eh_frame)
- ${RELOCATING+___RUNTIME_PSEUDO_RELOC_LIST__ = .;}
- ${RELOCATING+__RUNTIME_PSEUDO_RELOC_LIST__ = .;}
- *(.rdata_runtime_pseudo_reloc)
- ${RELOCATING+___RUNTIME_PSEUDO_RELOC_LIST_END__ = .;}
- ${RELOCATING+__RUNTIME_PSEUDO_RELOC_LIST_END__ = .;}
- }
-
- .pdata ${RELOCATING+BLOCK(__section_alignment__)} :
- {
- *(.pdata)
- }
-
- .bss ${RELOCATING+BLOCK(__section_alignment__)} :
- {
- ${RELOCATING+__bss_start__ = . ;}
- *(.bss)
- *(COMMON)
- ${RELOCATING+__bss_end__ = . ;}
- }
-
- .edata ${RELOCATING+BLOCK(__section_alignment__)} :
- {
- *(.edata)
- }
-
- /DISCARD/ :
- {
- *(.debug\$S)
- *(.debug\$T)
- *(.debug\$F)
- *(.drectve)
- }
-
- .idata ${RELOCATING+BLOCK(__section_alignment__)} :
- {
- /* This cannot currently be handled with grouped sections.
- See pep.em:sort_sections. */
- ${R_IDATA}
- }
- .CRT ${RELOCATING+BLOCK(__section_alignment__)} :
- {
- ${RELOCATING+___crt_xc_start__ = . ;}
- ${R_CRT_XC}
- ${RELOCATING+___crt_xc_end__ = . ;}
- ${RELOCATING+___crt_xi_start__ = . ;}
- ${R_CRT_XI}
- ${RELOCATING+___crt_xi_end__ = . ;}
- ${RELOCATING+___crt_xl_start__ = . ;}
- ${R_CRT_XL}
- /* ___crt_xl_end__ is defined in the TLS Directory support code */
- ${RELOCATING+___crt_xp_start__ = . ;}
- ${R_CRT_XP}
- ${RELOCATING+___crt_xp_end__ = . ;}
- ${RELOCATING+___crt_xt_start__ = . ;}
- ${R_CRT_XT}
- ${RELOCATING+___crt_xt_end__ = . ;}
- }
-
- .tls ${RELOCATING+BLOCK(__section_alignment__)} :
- {
- ${RELOCATING+___tls_start__ = . ;}
- ${R_TLS}
- ${RELOCATING+___tls_end__ = . ;}
- }
-
- .endjunk ${RELOCATING+BLOCK(__section_alignment__)} :
- {
- /* end is deprecated, don't use it */
- ${RELOCATING+PROVIDE (end = .);}
- ${RELOCATING+PROVIDE ( _end = .);}
- ${RELOCATING+ __end__ = .;}
- }
-
- .rsrc ${RELOCATING+BLOCK(__section_alignment__)} :
- {
- *(.rsrc)
- ${R_RSRC}
- }
-
- .reloc ${RELOCATING+BLOCK(__section_alignment__)} :
- {
- *(.reloc)
- }
-
- .stab ${RELOCATING+BLOCK(__section_alignment__)} ${RELOCATING+(NOLOAD)} :
- {
- *(.stab)
- }
-
- .stabstr ${RELOCATING+BLOCK(__section_alignment__)} ${RELOCATING+(NOLOAD)} :
- {
- *(.stabstr)
- }
-
- /* DWARF debug sections.
- Symbols in the DWARF debugging sections are relative to the beginning
- of the section. Unlike other targets that fake this by putting the
- section VMA at 0, the PE format will not allow it. */
-
- /* DWARF 1.1 and DWARF 2. */
- .debug_aranges ${RELOCATING+BLOCK(__section_alignment__)} ${RELOCATING+(NOLOAD)} :
- {
- *(.debug_aranges)
- }
-
- .debug_pubnames ${RELOCATING+BLOCK(__section_alignment__)} ${RELOCATING+(NOLOAD)} :
- {
- *(.debug_pubnames)
- }
-
- /* DWARF 2. */
- .debug_info ${RELOCATING+BLOCK(__section_alignment__)} ${RELOCATING+(NOLOAD)} :
- {
- *(.debug_info) *(.gnu.linkonce.wi.*)
- }
-
- .debug_abbrev ${RELOCATING+BLOCK(__section_alignment__)} ${RELOCATING+(NOLOAD)} :
- {
- *(.debug_abbrev)
- }
-
- .debug_line ${RELOCATING+BLOCK(__section_alignment__)} ${RELOCATING+(NOLOAD)} :
- {
- *(.debug_line)
- }
-
- .debug_frame ${RELOCATING+BLOCK(__section_alignment__)} ${RELOCATING+(NOLOAD)} :
- {
- *(.debug_frame)
- }
-
- .debug_str ${RELOCATING+BLOCK(__section_alignment__)} ${RELOCATING+(NOLOAD)} :
- {
- *(.debug_str)
- }
-
- .debug_loc ${RELOCATING+BLOCK(__section_alignment__)} ${RELOCATING+(NOLOAD)} :
- {
- *(.debug_loc)
- }
-
- .debug_macinfo ${RELOCATING+BLOCK(__section_alignment__)} ${RELOCATING+(NOLOAD)} :
- {
- *(.debug_macinfo)
- }
-
- /* SGI/MIPS DWARF 2 extensions. */
- .debug_weaknames ${RELOCATING+BLOCK(__section_alignment__)} ${RELOCATING+(NOLOAD)} :
- {
- *(.debug_weaknames)
- }
-
- .debug_funcnames ${RELOCATING+BLOCK(__section_alignment__)} ${RELOCATING+(NOLOAD)} :
- {
- *(.debug_funcnames)
- }
-
- .debug_typenames ${RELOCATING+BLOCK(__section_alignment__)} ${RELOCATING+(NOLOAD)} :
- {
- *(.debug_typenames)
- }
-
- .debug_varnames ${RELOCATING+BLOCK(__section_alignment__)} ${RELOCATING+(NOLOAD)} :
- {
- *(.debug_varnames)
- }
-
- /* DWARF 3. */
- .debug_ranges ${RELOCATING+BLOCK(__section_alignment__)} ${RELOCATING+(NOLOAD)} :
- {
- *(.debug_ranges)
- }
-}
-EOF
diff --git a/contrib/binutils/ld/scripttempl/ppcpe.sc b/contrib/binutils/ld/scripttempl/ppcpe.sc
deleted file mode 100644
index 40fbe33bb79e..000000000000
--- 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 e7f049fb0ec9..000000000000
--- 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 6bbb7ad6e903..000000000000
--- 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/vanilla.sc b/contrib/binutils/ld/scripttempl/vanilla.sc
deleted file mode 100644
index 1798480e69b0..000000000000
--- a/contrib/binutils/ld/scripttempl/vanilla.sc
+++ /dev/null
@@ -1 +0,0 @@
-# Nothing to do.
diff --git a/contrib/binutils/ld/stamp-h.in b/contrib/binutils/ld/stamp-h.in
deleted file mode 100644
index 9788f70238c9..000000000000
--- 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 2ee204742dc1..000000000000
--- a/contrib/binutils/ld/sysdep.h
+++ /dev/null
@@ -1,99 +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, 51 Franklin Street - Fifth Floor, Boston, MA
- 02110-1301, 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>
-#ifndef __PAST_END
-# define __PAST_END(array, offset) (((typeof(*(array)) *)(array))[offset])
-#endif
-#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
-
-#if !HAVE_DECL_STRSTR
-extern char *strstr ();
-#endif
-
-#if !HAVE_DECL_FREE
-extern void free ();
-#endif
-
-#if !HAVE_DECL_GETENV
-extern char *getenv ();
-#endif
-
-#if !HAVE_DECL_ENVIRON
-extern char **environ;
-#endif
-
-#endif /* ! defined (LD_SYSDEP_H) */