summaryrefslogtreecommitdiffstats
path: root/contrib/binutils/ld
diff options
context:
space:
mode:
authorobrien <obrien@FreeBSD.org>2002-10-11 06:01:20 +0000
committerobrien <obrien@FreeBSD.org>2002-10-11 06:01:20 +0000
commit4e4a0015415f50032b65069e57110238b86abe06 (patch)
treefb53ffec99928afa60e993b433b06ad4fa69eb68 /contrib/binutils/ld
parent164fbccb935c00198688d226ae3b613c00803709 (diff)
parentaae950e69caf1dc3f308b74fe6d066a645a7ed09 (diff)
downloadFreeBSD-src-4e4a0015415f50032b65069e57110238b86abe06.zip
FreeBSD-src-4e4a0015415f50032b65069e57110238b86abe06.tar.gz
This commit was generated by cvs2svn to compensate for changes in r104834,
which included commits to RCS files with non-trunk default branches.
Diffstat (limited to 'contrib/binutils/ld')
-rw-r--r--contrib/binutils/ld/ChangeLog963
-rw-r--r--contrib/binutils/ld/Makefile.am120
-rw-r--r--contrib/binutils/ld/NEWS12
-rw-r--r--contrib/binutils/ld/aclocal.m436
-rw-r--r--contrib/binutils/ld/config.in9
-rwxr-xr-xcontrib/binutils/ld/configure894
-rw-r--r--contrib/binutils/ld/configure.in2
-rw-r--r--contrib/binutils/ld/emulparams/armelfb_nbsd.sh2
-rw-r--r--contrib/binutils/ld/emulparams/elf32_sparc.sh1
-rw-r--r--contrib/binutils/ld/emulparams/elf32ppc.sh19
-rw-r--r--contrib/binutils/ld/emulparams/elf64_ia64.sh4
-rw-r--r--contrib/binutils/ld/emulparams/elf64_sparc.sh1
-rw-r--r--contrib/binutils/ld/emulparams/elf64alpha_fbsd.sh1
-rw-r--r--contrib/binutils/ld/emulparams/elf64ppc.sh28
-rw-r--r--contrib/binutils/ld/emulparams/elf_i386.sh1
-rw-r--r--contrib/binutils/ld/emulparams/elf_i386_chaos.sh2
-rw-r--r--contrib/binutils/ld/emulparams/elf_i386_fbsd.sh1
-rw-r--r--contrib/binutils/ld/emulparams/elf_x86_64.sh1
-rw-r--r--contrib/binutils/ld/emulparams/i386nto.sh12
-rw-r--r--contrib/binutils/ld/emulparams/ppcmacos.sh2
-rw-r--r--contrib/binutils/ld/emultempl/armcoff.em11
-rw-r--r--contrib/binutils/ld/emultempl/armelf.em65
-rw-r--r--contrib/binutils/ld/emultempl/armelf_oabi.em3
-rw-r--r--contrib/binutils/ld/emultempl/generic.em3
-rw-r--r--contrib/binutils/ld/emultempl/linux.em3
-rw-r--r--contrib/binutils/ld/emultempl/pe.em45
-rw-r--r--contrib/binutils/ld/emultempl/ppc64elf.em435
-rw-r--r--contrib/binutils/ld/emultempl/sunos.em3
-rw-r--r--contrib/binutils/ld/emultempl/ticoff.em3
-rw-r--r--contrib/binutils/ld/emultempl/vanilla.em3
-rwxr-xr-xcontrib/binutils/ld/genscripts.sh30
-rw-r--r--contrib/binutils/ld/ld.h12
-rw-r--r--contrib/binutils/ld/ld.texinfo125
-rw-r--r--contrib/binutils/ld/ldemul.c13
-rw-r--r--contrib/binutils/ld/ldemul.h7
-rw-r--r--contrib/binutils/ld/ldexp.c397
-rw-r--r--contrib/binutils/ld/ldexp.h29
-rw-r--r--contrib/binutils/ld/ldfile.c15
-rw-r--r--contrib/binutils/ld/ldfile.h6
-rw-r--r--contrib/binutils/ld/ldgram.y63
-rw-r--r--contrib/binutils/ld/ldlang.c498
-rw-r--r--contrib/binutils/ld/ldlang.h35
-rw-r--r--contrib/binutils/ld/ldlex.l40
-rw-r--r--contrib/binutils/ld/ldmain.c18
-rw-r--r--contrib/binutils/ld/ldmisc.c65
-rw-r--r--contrib/binutils/ld/ldwrite.c18
-rw-r--r--contrib/binutils/ld/lexsup.c24
-rw-r--r--contrib/binutils/ld/mri.c36
-rw-r--r--contrib/binutils/ld/pe-dll.c105
-rw-r--r--contrib/binutils/ld/pe-dll.h8
-rw-r--r--contrib/binutils/ld/po/ld.pot730
-rw-r--r--contrib/binutils/ld/scripttempl/elf.sc21
-rw-r--r--contrib/binutils/ld/scripttempl/sh.sc5
53 files changed, 3457 insertions, 1528 deletions
diff --git a/contrib/binutils/ld/ChangeLog b/contrib/binutils/ld/ChangeLog
index 21fbd4b..7b79459 100644
--- a/contrib/binutils/ld/ChangeLog
+++ b/contrib/binutils/ld/ChangeLog
@@ -1,17 +1,679 @@
-2002-07-07 Alan Modra <amodra@bigpond.net.au>
+2002-10-02 Alan Modra <amodra@bigpond.net.au>
+
+ * emulparams/elf64ppc.sh (MAXPAGESIZE): Set to 0x10000.
+
+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>
+
+ * 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-23 Daniel Jacobowitz <drow@mvista.com>
+
+ Merge from mainline:
+ 2002-09-22 Mark Elbrecht <snowball3@softhome.net>
+ * scripttempl/i386go32.sc: Handle bss unique sections.
+
+ 2002-09-11 Nick Clifton <nickc@redhat.com>
+ * po/tr.po: Updated Turkish translation.
+
+ 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-07 Nick Clifton <nickc@redhat.com>
+ * emultempl/armelf.em (arm_elf_before_allocation): Only search
+ for an interworking bfd if there are input bfds.
+
+ 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-06 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-07-04 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-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-23 Daniel Jacobowitz <drow@mvista.com>
+
+ Merge from mainline:
+ 2002-07-14 H.J. Lu <hjl@gnu.org>
+ * ld.texinfo: Document a .symver takes precedence over a
+ version script.
+
+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 Daniel Jacobowitz <drow@mvista.com>
+
+ * po/ld.pot: Regenerated.
+
+2002-07-23 Nick Clifton <nickc@redhat.com>
+
+ * po/ld.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 Nick Clifton <nickc@cambridge.redhat.com>
+
+ * NEWS: Add 'Changes in 2.13'.
+
+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>
- Merge from mainline.
- 2002-07-05 Alan Modra <amodra@bigpond.net.au>
* ldlang.c (print_wild_statement): Fix output formatting.
-2002-05-09 Alan Modra <amodra@bigpond.net.au>
+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}.
+
+Wed Jun 26 16:33:58 2002 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>
+
+ * ld/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.
+
+Thu Jun 13 20:18:38 2002 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>
+
+ * ld/ldmain.c (main): initialize link_info.pei386_auto_import
+ to -1 == implicit enable.
+ * ld/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>
- Merge from mainline.
- 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>
- 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.
@@ -19,20 +681,13 @@
* mpw-esh.c: Delete.
* mpw-idtmips.c: Delete.
-2002-04-27 Alan Modra <amodra@bigpond.net.au>
+Wed Apr 17 19:23:14 2002 J"orn Rennecke <joern.rennecke@superh.com>
- Merge from mainline
- 2002-04-08 Alan Modra <amodra@bigpond.net.au>
- * ldlang.c (lang_size_sections): Don't complain about
- SEC_NEVER_LOAD sections having no memory region specified.
- * ld.texinfo (Format Commands <OUTPUT_FORMAT>): Typo fix.
+ * emulparams/shelf32.sh (MACHINE): Now sh5.
- 2002-04-07 matthew green <mrg@redhat.com>
- * ld/configure.host (*-*-netbsd*): Add support for NetBSD/ELF.
+2002-04-17 Thiemo Seufer <seufer@csv.ica.uni-stuttgart.de>
- 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".
+ * ldgram.y: Fix syntax warning.
2002-04-11 Nick Clifton <nickc@cambridge.redhat.com>
@@ -40,6 +695,17 @@
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>
+
+ * ld/configure.host (*-*-netbsd*): Add support for NetBSD/ELF.
+
2002-04-04 Alan Modra <amodra@bigpond.net.au>
* dep-in.sed: Cope with absolute paths.
@@ -47,75 +713,142 @@
Run "make dep-am".
* Makefile.in: Regenerate.
- Merge from mainline.
- 2002-03-28 Alan Modra <amodra@bigpond.net.au>
+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-28 Alan Modra <amodra@bigpond.net.au>
+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>
- Merge from mainline.
- 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>
+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 Alan Modra <amodra@bigpond.net.au>
+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.
+
+Mon Mar 18 17:38:39 CET 2002 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>
+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 Alan Modra <amodra@bigpond.net.au>
+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-04 H.J. Lu <hjl@gnu.org>
+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>
+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>
+2002-03-01 David Mosberger <davidm@hpl.hp.com>
+
* scripttempl/elf.sc (SECTIONS): Add entries for .preinit_array,
.init_array, and .fini_array.
-2002-03-18 David O'Brien <obrien@FreeBSD.org>
+2002-02-20 Andreas Schwab <schwab@suse.de>
- * 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.
+ * emulparams/elf64_ia64.sh (OTHER_READONLY_SECTIONS): Don't fold
+ .IA64_unwind* in a relocatable link.
-Mon Mar 18 18:07:20 CET 2002 Jan Hubicka <jh@suse.cz>
- Andreas Jaeger <aj@suse.de>
- Andreas Schwab <schwab@suse.de>
+2002-02-20 Nick Clifton <nickc@cambridge.redhat.com>
- * 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.
+ * NEWS: Mark 2.12 branch.
-2002-03-07 Daniel Jacobowitz <drow@mvista.com>
+2002-02-19 Martin Schwidefsky <schwidefsky@de.ibm.com>
- * ld.texinfo: Wrap @menu in @ifnottex, not @ifinfo.
+ * emulparams/elf64_s390.sh (ARCH): Change to "s390:64-bit".
+ * emulparams/elf_s390.sh (ARCH): Change to "s390:31-bit".
-2002-03-07 Daniel Jacobowitz <drow@mvista.com>
+2002-02-18 Tom Rix <trix@redhat.com>
- * NEWS: Mark version 2.12.
+ * 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-20 Andreas Schwab <schwab@suse.de>
+2002-02-18 Alan Modra <amodra@bigpond.net.au>
- * emulparams/elf64_ia64.sh (OTHER_READONLY_SECTIONS): Don't fold
- .IA64_unwind* in a relocatable link.
+ * emulparams/elf64ppc.sh (OTHER_TEXT_SECTIONS): Define.
-2002-02-19 David O'Brien <obrien@FreeBSD.org>
+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,
@@ -135,34 +868,134 @@ Mon Mar 18 18:07:20 CET 2002 Jan Hubicka <jh@suse.cz>
* 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 little-endian definition.
+ * 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.
+ * 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-10 Daniel Jacobowitz <drow@mvista.com>
-
- * lexsup.c: Remove strtoul declaration.
+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>
- * 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".
+ * Makefile.in: Regenerate.
+
+2002-02-10 Daniel Jacobowitz <drow@mvista.com>
+
+ * lexsup.c: Remove strtoul declaration.
2002-02-10 Daniel Jacobowitz <drow@mvista.com>
@@ -171,6 +1004,14 @@ Mon Mar 18 18:07:20 CET 2002 Jan Hubicka <jh@suse.cz>
* 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,
@@ -356,7 +1197,7 @@ Mon Mar 18 18:07:20 CET 2002 Jan Hubicka <jh@suse.cz>
* po/ld.pot: Regenerate.
2002-01-29 Chris Demetriou <cgd@broadcom.com>
- Mitch Lichtenberg <mpl@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
@@ -2355,7 +3196,7 @@ Mon Mar 18 18:07:20 CET 2002 Jan Hubicka <jh@suse.cz>
* 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>
+2000-12-01 Joel Sherrill <joel@OARcorp.com>
* configure.tgt (arm-*-rtems*, a29k-*rtems*, h8300-*-rtems*):
New targets.
@@ -3773,7 +4614,7 @@ Mon Mar 18 18:07:20 CET 2002 Jan Hubicka <jh@suse.cz>
(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.
+ * 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>
diff --git a/contrib/binutils/ld/Makefile.am b/contrib/binutils/ld/Makefile.am
index 595228a..8247d25 100644
--- a/contrib/binutils/ld/Makefile.am
+++ b/contrib/binutils/ld/Makefile.am
@@ -120,6 +120,7 @@ ALL_EMULATIONS = \
earmelf_fbsd.o \
earmelf_linux.o \
earmelf_nbsd.o \
+ earmelfb_nbsd.o \
earmelf_oabi.o \
earmnbsd.o \
earmpe.o \
@@ -131,6 +132,11 @@ ALL_EMULATIONS = \
eavrmega103.o \
eavrmega161.o \
eavrmega603.o \
+ eavr1.o \
+ eavr2.o \
+ eavr3.o \
+ eavr4.o \
+ eavr5.o \
ecoff_sparc.o \
ecrisaout.o \
ecriself.o \
@@ -140,6 +146,7 @@ ALL_EMULATIONS = \
ed30v_o.o \
ed30velf.o \
edelta68.o \
+ eelf32_dlx.o \
eebmon29k.o \
eelf32_i960.o \
eelf32_i860.o \
@@ -152,6 +159,7 @@ ALL_EMULATIONS = \
eelf32ebmip.o \
eelf32elmip.o \
eelf32fr30.o \
+ eelf32frv.o \
eelf32i370.o \
eelf32l4300.o \
eelf32lmip.o \
@@ -163,6 +171,8 @@ ALL_EMULATIONS = \
eelf32ppc_fbsd.o \
eelf32ppclinux.o \
eelf32ppcsim.o \
+ eelf32ppcwindiss.o \
+ eelf32vax.o \
eelf32xstormy16.o \
eelf_i386.o \
eelf_i386_be.o \
@@ -188,6 +198,7 @@ ALL_EMULATIONS = \
ehppaelf.o \
ehppalinux.o \
ehppanbsd.o \
+ ehppaobsd.o \
ei386aout.o \
ei386beos.o \
ei386bsd.o \
@@ -199,6 +210,7 @@ ALL_EMULATIONS = \
ei386moss.o \
ei386msdos.o \
ei386nbsd.o \
+ ei386nto.o \
ei386nw.o \
ei386pe.o \
ei386pe_posix.o \
@@ -242,6 +254,8 @@ ALL_EMULATIONS = \
esh.o \
eshelf32.o \
eshlelf32.o \
+ eshelf32_nbsd.o \
+ eshlelf32_nbsd.o \
eshelf.o \
eshelf_linux.o \
eshlelf_linux.o \
@@ -263,6 +277,7 @@ ALL_EMULATIONS = \
etic80coff.o \
evanilla.o \
evax.o \
+ evaxnbsd.o \
evsta.o \
ew65.o \
ez8001.o \
@@ -274,6 +289,8 @@ ALL_64_EMULATIONS = \
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 \
@@ -353,6 +370,12 @@ GEN_DEPENDS = $(srcdir)/genscripts.sh stringify.sed
ea29k.c: $(srcdir)/emulparams/a29k.sh \
$(srcdir)/emultempl/generic.em $(srcdir)/scripttempl/a29k.sc ${GEN_DEPENDS}
${GENSCRIPTS} a29k "$(tdir_a29k)"
+eaix5ppc.c: $(srcdir)/emulparams/aix5ppc.sh \
+ $(srcdir)/emultempl/aix.em $(srcdir)/scripttempl/aix.sc ${GEN_DEPENDS}
+ ${GENSCRIPTS} aix5ppc "$(tdir_aixppc)"
+eaix5rs6.c: $(srcdir)/emulparams/aix5rs6.sh \
+ $(srcdir)/emultempl/aix.em $(srcdir)/scripttempl/aix.sc ${GEN_DEPENDS}
+ ${GENSCRIPTS} aix5rs6 "$(tdir_aixrs6)"
eaixppc.c: $(srcdir)/emulparams/aixppc.sh \
$(srcdir)/emultempl/aix.em $(srcdir)/scripttempl/aix.sc ${GEN_DEPENDS}
${GENSCRIPTS} aixppc "$(tdir_aixppc)"
@@ -386,6 +409,12 @@ earmelf_nbsd.c: $(srcdir)/emulparams/armelf_nbsd.sh \
$(srcdir)/emultempl/elf32.em $(srcdir)/emultempl/armelf.em \
$(srcdir)/scripttempl/elf.sc ${GEN_DEPENDS}
${GENSCRIPTS} armelf_nbsd "$(tdir_armelf_nbsd)"
+earmelfb_nbsd.c: $(srcdir)/emulparams/armelfb_nbsd.sh \
+ $(srcdir)/emulparams/armelf_nbsd.sh \
+ $(srcdir)/emulparams/armelf.sh \
+ $(srcdir)/emultempl/elf32.em $(srcdir)/emultempl/armelf.em \
+ $(srcdir)/scripttempl/elf.sc ${GEN_DEPENDS}
+ ${GENSCRIPTS} armelfb_nbsd "$(tdir_armelfb_nbsd)"
earmaoutb.c: $(srcdir)/emulparams/armaoutb.sh \
$(srcdir)/emultempl/generic.em $(srcdir)/scripttempl/armaout.sc ${GEN_DEPENDS}
${GENSCRIPTS} armaoutb "$(tdir_armaoutb)"
@@ -436,6 +465,26 @@ eavrmega161.c: $(srcdir)/emulparams/avrmega161.sh \
$(srcdir)/emultempl/generic.em $(srcdir)/scripttempl/elf32avr.sc \
${GEN_DEPENDS}
${GENSCRIPTS} avrmega161 "$(tdir_avr85xx)"
+eavr1.c: $(srcdir)/emulparams/avr1.sh \
+ $(srcdir)/emultempl/generic.em $(srcdir)/scripttempl/avr.sc \
+ ${GEN_DEPENDS}
+ ${GENSCRIPTS} avr1 "$(tdir_avr85xx)"
+eavr2.c: $(srcdir)/emulparams/avr2.sh \
+ $(srcdir)/emultempl/generic.em $(srcdir)/scripttempl/avr.sc \
+ ${GEN_DEPENDS}
+ ${GENSCRIPTS} avr2 "$(tdir_avr85xx)"
+eavr3.c: $(srcdir)/emulparams/avr3.sh \
+ $(srcdir)/emultempl/generic.em $(srcdir)/scripttempl/avr.sc \
+ ${GEN_DEPENDS}
+ ${GENSCRIPTS} avr3 "$(tdir_avr85xx)"
+eavr4.c: $(srcdir)/emulparams/avr4.sh \
+ $(srcdir)/emultempl/generic.em $(srcdir)/scripttempl/avr.sc \
+ ${GEN_DEPENDS}
+ ${GENSCRIPTS} avr4 "$(tdir_avr85xx)"
+eavr5.c: $(srcdir)/emulparams/avr5.sh \
+ $(srcdir)/emultempl/generic.em $(srcdir)/scripttempl/avr.sc \
+ ${GEN_DEPENDS}
+ ${GENSCRIPTS} avr5 "$(tdir_avr85xx)"
ecoff_sparc.c: $(srcdir)/emulparams/coff_sparc.sh \
$(srcdir)/emultempl/generic.em $(srcdir)/scripttempl/sparccoff.sc ${GEN_DEPENDS}
${GENSCRIPTS} coff_sparc "$(tdir_coff_sparc)"
@@ -463,6 +512,9 @@ ed30v_e.c: $(srcdir)/emulparams/d30v_e.sh \
edelta68.c: $(srcdir)/emulparams/delta68.sh \
$(srcdir)/emultempl/generic.em $(srcdir)/scripttempl/delta68.sc ${GEN_DEPENDS}
${GENSCRIPTS} delta68 "$(tdir_delta68)"
+eelf32_dlx.c: $(srcdir)/emulparams/elf32_dlx.sh \
+ $(srcdir)/emultempl/elf32.em $(srcdir)/scripttempl/dlx.sc ${GEN_DEPENDS}
+ ${GENSCRIPTS} elf32_dlx "$(tdir_elf32_dlx)"
eebmon29k.c: $(srcdir)/emulparams/ebmon29k.sh \
$(srcdir)/emultempl/generic.em $(srcdir)/scripttempl/ebmon29k.sc ${GEN_DEPENDS}
${GENSCRIPTS} ebmon29k "$(tdir_ebmon29k)"
@@ -470,9 +522,15 @@ eelf32xstormy16.c: $(srcdir)/emulparams/elf32xstormy16.sh \
$(srcdir)/emultempl/elf32.em $(srcdir)/emultempl/needrelax.em \
$(srcdir)/scripttempl/elf.sc ${GEN_DEPENDS}
${GENSCRIPTS} elf32xstormy16 "$(tdir_xstormy16)"
+eelf32vax.c: $(srcdir)/emulparams/elf32vax.sh \
+ $(srcdir)/emultempl/elf32.em $(srcdir)/scripttempl/elf.sc ${GEN_DEPENDS}
+ ${GENSCRIPTS} elf32vax "$(tdir_elf32vax)"
eelf32fr30.c: $(srcdir)/emulparams/elf32fr30.sh \
$(srcdir)/emultempl/elf32.em $(srcdir)/scripttempl/elf.sc ${GEN_DEPENDS}
${GENSCRIPTS} elf32fr30 "$(tdir_fr30)"
+eelf32frv.c: $(srcdir)/emulparams/elf32frv.sh \
+ $(srcdir)/emultempl/elf32.em $(srcdir)/scripttempl/elf.sc ${GEN_DEPENDS}
+ ${GENSCRIPTS} elf32frv "$(tdir_frv)"
eelf32mcore.c: $(srcdir)/emulparams/elf32mcore.sh \
$(srcdir)/emultempl/elf32.em $(srcdir)/scripttempl/elf.sc ${GEN_DEPENDS}
${GENSCRIPTS} elf32mcore "$(tdir_mcore)"
@@ -534,6 +592,8 @@ eelf32lppcsim.c: $(srcdir)/emulparams/elf32lppcsim.sh \
$(srcdir)/emulparams/elf32lppc.sh $(srcdir)/emulparams/elf32ppc.sh \
$(srcdir)/emultempl/elf32.em $(srcdir)/scripttempl/elf.sc ${GEN_DEPENDS}
${GENSCRIPTS} elf32lppcsim "$(tdir_elf32lppcsim)"
+eelf32ppcwindiss.c: $(srcdir)/emulparams/elf32ppcwindiss.sh ${GEN_DEPENDS}
+ ${GENSCRIPTS} elf32ppcwindiss "$(tdir_elf32ppcwindiss)"
eelf32lsmip.c: $(srcdir)/emulparams/elf32lsmip.sh \
$(srcdir)/emulparams/elf32lmip.sh $(srcdir)/emulparams/elf32bmip.sh \
$(srcdir)/emultempl/elf32.em $(srcdir)/scripttempl/elf.sc ${GEN_DEPENDS}
@@ -637,7 +697,7 @@ eelf_i386_be.c: $(srcdir)/emulparams/elf_i386_be.sh \
$(srcdir)/emultempl/elf32.em $(srcdir)/scripttempl/elf.sc ${GEN_DEPENDS}
${GENSCRIPTS} elf_i386_be "$(tdir_elf_i386_be)"
eelf_i386_chaos.c: $(srcdir)/emulparams/elf_i386_chaos.sh \
- $(srcdir)/emultempl/elf32.em $(srcdir)/scripttempl/elf.sc ${GEN_DEPENDS}
+ $(srcdir)/emultempl/elf32.em $(srcdir)/scripttempl/elf_chaos.sc ${GEN_DEPENDS}
${GENSCRIPTS} elf_i386_chaos "$(tdir_elf_i386_chaos)"
eelf_i386_fbsd.c: $(srcdir)/emulparams/elf_i386_fbsd.sh \
$(srcdir)/emulparams/elf_i386.sh \
@@ -709,6 +769,10 @@ ehppanbsd.c: $(srcdir)/emulparams/hppanbsd.sh \
$(srcdir)/emultempl/elf32.em $(srcdir)/emultempl/hppaelf.em \
$(srcdir)/scripttempl/elf.sc ${GEN_DEPENDS}
${GENSCRIPTS} hppanbsd "$(tdir_hppanbsd)"
+ehppaobsd.c: $(srcdir)/emulparams/hppaobsd.sh \
+ $(srcdir)/emultempl/elf32.em $(srcdir)/emultempl/hppaelf.em \
+ $(srcdir)/scripttempl/elf.sc ${GEN_DEPENDS}
+ ${GENSCRIPTS} hppaobsd "$(tdir_hppaobsd)"
ehppa64linux.c: $(srcdir)/emulparams/hppa64linux.sh \
$(srcdir)/emultempl/elf32.em $(srcdir)/scripttempl/elf.sc ${GEN_DEPENDS}
${GENSCRIPTS} hppa64linux "$(tdir_hppa64linux)"
@@ -745,6 +809,9 @@ ei386msdos.c: $(srcdir)/emulparams/i386msdos.sh \
ei386nbsd.c: $(srcdir)/emulparams/i386nbsd.sh \
$(srcdir)/emultempl/generic.em $(srcdir)/scripttempl/aout.sc ${GEN_DEPENDS}
${GENSCRIPTS} i386nbsd "$(tdir_i386nbsd)"
+ei386nto.c: $(srcdir)/emulparams/i386nto.sh \
+ $(srcdir)/emultempl/elf32.em $(srcdir)/scripttempl/elf.sc ${GEN_DEPENDS}
+ ${GENSCRIPTS} i386nto "$(tdir_i386nto)"
ei386nw.c: $(srcdir)/emulparams/i386nw.sh \
$(srcdir)/emultempl/elf32.em $(srcdir)/scripttempl/nw.sc ${GEN_DEPENDS}
${GENSCRIPTS} i386nw "$(tdir_i386nw)"
@@ -886,9 +953,19 @@ eshelf32.c: $(srcdir)/emulparams/shelf32.sh \
$(srcdir)/emultempl/sh64elf.em $(INCDIR)/elf/sh.h $(BFDDIR)/elf-bfd.h \
$(srcdir)/emultempl/elf32.em $(srcdir)/scripttempl/elf.sc ${GEN_DEPENDS}
${GENSCRIPTS} shelf32 "$(tdir_shelf32)"
+eshelf32_nbsd.c: $(srcdir)/emulparams/shelf32_nbsd.sh \
+ $(srcdir)/emulparams/shelf32.sh \
+ $(BFDDIR)/libbfd.h $(INCDIR)/libiberty.h \
+ $(srcdir)/emultempl/sh64elf.em $(INCDIR)/elf/sh.h $(BFDDIR)/elf-bfd.h \
+ $(srcdir)/emultempl/elf32.em $(srcdir)/scripttempl/elf.sc ${GEN_DEPENDS}
+ ${GENSCRIPTS} shelf32_nbsd "$(tdir_shelf32_nbsd)"
eshelf64.c: $(srcdir)/emulparams/shelf64.sh $(srcdir)/emulparams/shelf32.sh \
$(srcdir)/emultempl/elf32.em $(srcdir)/scripttempl/elf.sc ${GEN_DEPENDS}
${GENSCRIPTS} shelf64 "$(tdir_shelf64)"
+eshelf64_nbsd.c: $(srcdir)/emulparams/shelf64_nbsd.sh \
+ $(srcdir)/emulparams/shelf32_nbsd.sh $(srcdir)/emulparams/shelf32.sh \
+ $(srcdir)/emultempl/elf32.em $(srcdir)/scripttempl/elf.sc ${GEN_DEPENDS}
+ ${GENSCRIPTS} shelf64_nbsd "$(tdir_shelf64_nbsd)"
eshelf_linux.c: $(srcdir)/emulparams/shelf_linux.sh \
$(srcdir)/emulparams/shlelf_linux.sh \
$(srcdir)/emultempl/elf32.em $(srcdir)/scripttempl/elf.sc ${GEN_DEPENDS}
@@ -914,10 +991,21 @@ eshlelf32.c: $(srcdir)/emulparams/shlelf32.sh \
$(srcdir)/emultempl/sh64elf.em $(INCDIR)/elf/sh.h $(BFDDIR)/elf-bfd.h \
$(srcdir)/emultempl/elf32.em $(srcdir)/scripttempl/elf.sc ${GEN_DEPENDS}
${GENSCRIPTS} shlelf32 "$(tdir_shlelf32)"
+eshlelf32_nbsd.c: $(srcdir)/emulparams/shlelf32_nbsd.sh \
+ $(srcdir)/emulparams/shelf32_nbsd.sh $(srcdir)/emulparams/shelf32.sh \
+ $(BFDDIR)/libbfd.h $(INCDIR)/libiberty.h \
+ $(srcdir)/emultempl/sh64elf.em $(INCDIR)/elf/sh.h $(BFDDIR)/elf-bfd.h \
+ $(srcdir)/emultempl/elf32.em $(srcdir)/scripttempl/elf.sc ${GEN_DEPENDS}
+ ${GENSCRIPTS} shlelf32_nbsd "$(tdir_shlelf32_nbsd)"
eshlelf64.c: $(srcdir)/emulparams/shlelf64.sh \
$(srcdir)/emulparams/shelf64.sh $(srcdir)/emulparams/shelf32.sh \
$(srcdir)/emultempl/elf32.em $(srcdir)/scripttempl/elf.sc ${GEN_DEPENDS}
${GENSCRIPTS} shlelf64 "$(tdir_shlelf64)"
+eshlelf64_nbsd.c: $(srcdir)/emulparams/shlelf64_nbsd.sh \
+ $(srcdir)/emulparams/shelf64_nbsd.sh \
+ $(srcdir)/emulparams/shelf32_nbsd.sh $(srcdir)/emulparams/shelf32.sh \
+ $(srcdir)/emultempl/elf32.em $(srcdir)/scripttempl/elf.sc ${GEN_DEPENDS}
+ ${GENSCRIPTS} shlelf64_nbsd "$(tdir_shlelf64_nbsd)"
eshl.c: $(srcdir)/emulparams/shl.sh \
$(srcdir)/emulparams/sh.sh \
$(srcdir)/emultempl/generic.em $(srcdir)/scripttempl/sh.sc ${GEN_DEPENDS}
@@ -964,6 +1052,9 @@ evanilla.c: $(srcdir)/emulparams/vanilla.sh \
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)"
@@ -1118,24 +1209,24 @@ CLEANFILES = dep.sed DEP DEPA DEP1 DEP2
.PHONY: install-exec-local install-data-local
install-exec-local: ld-new$(EXEEXT)
- $(mkinstalldirs) $(bindir) $(tooldir)/bin
+ $(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 $(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 $(tooldir)/bin/ld$(EXEEXT); \
- ln $(bindir)/$$n$(EXEEXT) $(tooldir)/bin/ld$(EXEEXT) >/dev/null 2>/dev/null \
- || $(LIBTOOL) --mode=install $(INSTALL_PROGRAM) ld-new$(EXEEXT) $(tooldir)/bin/ld$(EXEEXT); \
+ 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) $(scriptdir)/ldscripts
+ $(mkinstalldirs) $(DESTDIR)$(scriptdir)/ldscripts
for f in ldscripts/*; do \
- $(INSTALL_DATA) $$f $(scriptdir)/$$f ; \
+ $(INSTALL_DATA) $$f $(DESTDIR)$(scriptdir)/$$f ; \
done
# We want install to imply install-info as per GNU standards, despite the
@@ -1234,7 +1325,8 @@ ldemul.o: ldemul.c ../bfd/bfd.h $(INCDIR)/ansidecl.h \
ldexp.o: ldexp.c ../bfd/bfd.h $(INCDIR)/ansidecl.h \
$(INCDIR)/symcat.h sysdep.h config.h $(INCDIR)/fopen-same.h \
$(INCDIR)/bfdlink.h ld.h $(INCDIR)/bin-bugs.h ldmain.h \
- ldmisc.h ldexp.h ldgram.h ldlang.h $(INCDIR)/libiberty.h
+ ldmisc.h ldexp.h ldgram.h ldlang.h $(INCDIR)/libiberty.h \
+ $(INCDIR)/safe-ctype.h
ldfile.o: ldfile.c ../bfd/bfd.h $(INCDIR)/ansidecl.h \
$(INCDIR)/symcat.h sysdep.h config.h $(INCDIR)/fopen-same.h \
$(INCDIR)/bfdlink.h $(INCDIR)/safe-ctype.h ld.h $(INCDIR)/bin-bugs.h \
@@ -1244,13 +1336,13 @@ ldlang.o: ldlang.c ../bfd/bfd.h $(INCDIR)/ansidecl.h \
$(INCDIR)/symcat.h sysdep.h config.h $(INCDIR)/fopen-same.h \
$(INCDIR)/libiberty.h $(INCDIR)/safe-ctype.h $(INCDIR)/obstack.h \
$(INCDIR)/bfdlink.h ld.h $(INCDIR)/bin-bugs.h ldmain.h \
- ldgram.h ldexp.h ldlang.h ldlex.h ldmisc.h ldctor.h \
+ ldexp.h ldlang.h ldgram.h ldlex.h ldmisc.h ldctor.h \
ldfile.h ldemul.h $(INCDIR)/fnmatch.h $(INCDIR)/demangle.h
ldmain.o: ldmain.c ../bfd/bfd.h $(INCDIR)/ansidecl.h \
$(INCDIR)/symcat.h sysdep.h config.h $(INCDIR)/fopen-same.h \
$(INCDIR)/safe-ctype.h $(INCDIR)/libiberty.h $(INCDIR)/progress.h \
$(INCDIR)/bfdlink.h $(INCDIR)/filenames.h ld.h $(INCDIR)/bin-bugs.h \
- ldmain.h ldmisc.h ldwrite.h ldgram.h ldexp.h ldlang.h \
+ ldmain.h ldmisc.h ldwrite.h ldexp.h ldlang.h ldgram.h \
ldlex.h ldfile.h ldemul.h ldctor.h
ldmisc.o: ldmisc.c ../bfd/bfd.h $(INCDIR)/ansidecl.h \
$(INCDIR)/symcat.h sysdep.h config.h $(INCDIR)/fopen-same.h \
@@ -1291,9 +1383,9 @@ ldgram.o: ldgram.c ../bfd/bfd.h $(INCDIR)/ansidecl.h \
mri.h ldctor.h ldlex.h
ldlex.o: ldlex.c $(INCDIR)/ansidecl.h ../bfd/bfd.h \
$(INCDIR)/symcat.h sysdep.h config.h $(INCDIR)/fopen-same.h \
- $(INCDIR)/safe-ctype.h ld.h $(INCDIR)/bin-bugs.h ldgram.h \
- ldmisc.h ldexp.h ldlang.h ldfile.h ldlex.h ldmain.h \
- $(INCDIR)/libiberty.h
+ $(INCDIR)/safe-ctype.h $(INCDIR)/bfdlink.h ld.h $(INCDIR)/bin-bugs.h \
+ ldmisc.h ldexp.h ldlang.h ldgram.h ldfile.h ldlex.h \
+ ldmain.h $(INCDIR)/libiberty.h
deffilep.o: deffilep.c $(INCDIR)/libiberty.h $(INCDIR)/ansidecl.h \
$(INCDIR)/safe-ctype.h ../bfd/bfd.h $(INCDIR)/symcat.h \
sysdep.h config.h $(INCDIR)/fopen-same.h ld.h $(INCDIR)/bin-bugs.h \
diff --git a/contrib/binutils/ld/NEWS b/contrib/binutils/ld/NEWS
index c9c3a86..383bd8c 100644
--- a/contrib/binutils/ld/NEWS
+++ b/contrib/binutils/ld/NEWS
@@ -1,6 +1,14 @@
-*- text -*-
+Changes in 2.13:
-Changes in 2.12:
+* 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.
@@ -16,7 +24,7 @@ Changes in 2.12:
* Support for ELF SHF_MERGE section merging, by Jakub Jelinek.
-Changes in 2.11:
+Changes in version 2.11:
* Support for AMD x86-64 architecture, by Jan Hubicka, SuSE Labs.
diff --git a/contrib/binutils/ld/aclocal.m4 b/contrib/binutils/ld/aclocal.m4
index e68badb..6111817 100644
--- a/contrib/binutils/ld/aclocal.m4
+++ b/contrib/binutils/ld/aclocal.m4
@@ -1,6 +1,6 @@
-dnl aclocal.m4 generated automatically by aclocal 1.4
+dnl aclocal.m4 generated automatically by aclocal 1.4-p5
-dnl Copyright (C) 1994, 1995-8, 1999 Free Software Foundation, Inc.
+dnl Copyright (C) 1994, 1995-8, 1999, 2001 Free Software Foundation, Inc.
dnl This file is free software; the Free Software Foundation
dnl gives unlimited permission to copy and/or distribute it,
dnl with or without modifications, as long as this notice is preserved.
@@ -27,24 +27,6 @@ AC_DEFUN([CY_WITH_NLS],)
AC_SUBST(INTLLIBS)
])
-#serial 1
-# This test replaces the one in autoconf.
-# Currently this macro should have the same name as the autoconf macro
-# because gettext's gettext.m4 (distributed in the automake package)
-# still uses it. Otherwise, the use in gettext.m4 makes autoheader
-# give these diagnostics:
-# configure.in:556: AC_TRY_COMPILE was called before AC_ISC_POSIX
-# configure.in:556: AC_TRY_RUN was called before AC_ISC_POSIX
-
-undefine([AC_ISC_POSIX])
-
-AC_DEFUN(AC_ISC_POSIX,
- [
- dnl This test replaces the obsolescent AC_ISC_POSIX kludge.
- AC_CHECK_LIB(cposix, strerror, [LIBS="$LIBS -lcposix"])
- ]
-)
-
# Do all the work for Automake. This macro actually does too much --
# some checks are only needed if your package does certain things.
# But this isn't really a big deal.
@@ -54,7 +36,7 @@ AC_DEFUN(AC_ISC_POSIX,
dnl Usage:
dnl AM_INIT_AUTOMAKE(package,version, [no-define])
-AC_DEFUN(AM_INIT_AUTOMAKE,
+AC_DEFUN([AM_INIT_AUTOMAKE],
[AC_REQUIRE([AC_PROG_INSTALL])
PACKAGE=[$1]
AC_SUBST(PACKAGE)
@@ -82,7 +64,7 @@ AC_REQUIRE([AC_PROG_MAKE_SET])])
# Check to make sure that the build environment is sane.
#
-AC_DEFUN(AM_SANITY_CHECK,
+AC_DEFUN([AM_SANITY_CHECK],
[AC_MSG_CHECKING([whether build environment is sane])
# Just in case
sleep 1
@@ -123,7 +105,7 @@ AC_MSG_RESULT(yes)])
dnl AM_MISSING_PROG(NAME, PROGRAM, DIRECTORY)
dnl The program must properly implement --version.
-AC_DEFUN(AM_MISSING_PROG,
+AC_DEFUN([AM_MISSING_PROG],
[AC_MSG_CHECKING(for working $2)
# Run test in a subshell; some versions of sh will print an error if
# an executable is not found, even if stderr is redirected.
@@ -139,7 +121,7 @@ AC_SUBST($1)])
# Like AC_CONFIG_HEADER, but automatically create stamp file.
-AC_DEFUN(AM_CONFIG_HEADER,
+AC_DEFUN([AM_CONFIG_HEADER],
[AC_PREREQ([2.12])
AC_CONFIG_HEADER([$1])
dnl When config.status generates a header, we must update the stamp-h file.
@@ -163,7 +145,7 @@ changequote([,]))])
dnl AM_PROG_LEX
dnl Look for flex, lex or missing, then run AC_PROG_LEX and AC_DECL_YYTEXT
-AC_DEFUN(AM_PROG_LEX,
+AC_DEFUN([AM_PROG_LEX],
[missing_dir=ifelse([$1],,`cd $ac_aux_dir && pwd`,$1)
AC_CHECK_PROGS(LEX, flex lex, "$missing_dir/missing flex")
AC_PROG_LEX
@@ -174,7 +156,7 @@ AC_DECL_YYTEXT])
# serial 1
-AC_DEFUN(AM_MAINTAINER_MODE,
+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,
@@ -191,7 +173,7 @@ AC_DEFUN(AM_MAINTAINER_MODE,
# Define a conditional.
-AC_DEFUN(AM_CONDITIONAL,
+AC_DEFUN([AM_CONDITIONAL],
[AC_SUBST($1_TRUE)
AC_SUBST($1_FALSE)
if $2; then
diff --git a/contrib/binutils/ld/config.in b/contrib/binutils/ld/config.in
index 87c5fe6..14e50d1 100644
--- a/contrib/binutils/ld/config.in
+++ b/contrib/binutils/ld/config.in
@@ -25,6 +25,9 @@
/* Define to `long' if <sys/types.h> doesn't define. */
#undef off_t
+/* Define if you need to in order for stat and other things to work. */
+#undef _POSIX_SOURCE
+
/* Define to `unsigned' if <sys/types.h> doesn't define. */
#undef size_t
@@ -124,6 +127,12 @@
/* Define if you have the <sys/param.h> header file. */
#undef HAVE_SYS_PARAM_H
+/* Define if you have the <sys/stat.h> header file. */
+#undef HAVE_SYS_STAT_H
+
+/* Define if you have the <sys/types.h> header file. */
+#undef HAVE_SYS_TYPES_H
+
/* Define if you have the <unistd.h> header file. */
#undef HAVE_UNISTD_H
diff --git a/contrib/binutils/ld/configure b/contrib/binutils/ld/configure
index c310a0d..e1c48d7 100755
--- a/contrib/binutils/ld/configure
+++ b/contrib/binutils/ld/configure
@@ -53,7 +53,6 @@ program_suffix=NONE
program_transform_name=s,x,x,
silent=
site=
-sitefile=
srcdir=
target=NONE
verbose=
@@ -168,7 +167,6 @@ Configuration:
--help print this message
--no-create do not create output files
--quiet, --silent do not print \`checking...' messages
- --site-file=FILE use FILE as the site file
--version print the version of autoconf that created configure
Directory and file names:
--prefix=PREFIX install architecture-independent files in PREFIX
@@ -339,11 +337,6 @@ EOF
-site=* | --site=* | --sit=*)
site="$ac_optarg" ;;
- -site-file | --site-file | --site-fil | --site-fi | --site-f)
- ac_prev=sitefile ;;
- -site-file=* | --site-file=* | --site-fil=* | --site-fi=* | --site-f=*)
- sitefile="$ac_optarg" ;;
-
-srcdir | --srcdir | --srcdi | --srcd | --src | --sr)
ac_prev=srcdir ;;
-srcdir=* | --srcdir=* | --srcdi=* | --srcd=* | --src=* | --sr=*)
@@ -509,16 +502,12 @@ fi
srcdir=`echo "${srcdir}" | sed 's%\([^/]\)/*$%\1%'`
# Prefer explicitly selected file to automatically selected ones.
-if test -z "$sitefile"; then
- if test -z "$CONFIG_SITE"; then
- if test "x$prefix" != xNONE; then
- CONFIG_SITE="$prefix/share/config.site $prefix/etc/config.site"
- else
- CONFIG_SITE="$ac_default_prefix/share/config.site $ac_default_prefix/etc/config.site"
- fi
+if test -z "$CONFIG_SITE"; then
+ if test "x$prefix" != xNONE; then
+ CONFIG_SITE="$prefix/share/config.site $prefix/etc/config.site"
+ else
+ CONFIG_SITE="$ac_default_prefix/share/config.site $ac_default_prefix/etc/config.site"
fi
-else
- CONFIG_SITE="$sitefile"
fi
for ac_site_file in $CONFIG_SITE; do
if test -r "$ac_site_file"; then
@@ -557,12 +546,12 @@ else
fi
echo $ac_n "checking for Cygwin environment""... $ac_c" 1>&6
-echo "configure:561: checking for Cygwin environment" >&5
+echo "configure:550: checking for Cygwin environment" >&5
if eval "test \"`echo '$''{'ac_cv_cygwin'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
cat > conftest.$ac_ext <<EOF
-#line 566 "configure"
+#line 555 "configure"
#include "confdefs.h"
int main() {
@@ -573,7 +562,7 @@ int main() {
return __CYGWIN__;
; return 0; }
EOF
-if { (eval echo configure:577: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
+if { (eval echo configure:566: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
rm -rf conftest*
ac_cv_cygwin=yes
else
@@ -590,19 +579,19 @@ echo "$ac_t""$ac_cv_cygwin" 1>&6
CYGWIN=
test "$ac_cv_cygwin" = yes && CYGWIN=yes
echo $ac_n "checking for mingw32 environment""... $ac_c" 1>&6
-echo "configure:594: checking for mingw32 environment" >&5
+echo "configure:583: checking for mingw32 environment" >&5
if eval "test \"`echo '$''{'ac_cv_mingw32'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
cat > conftest.$ac_ext <<EOF
-#line 599 "configure"
+#line 588 "configure"
#include "confdefs.h"
int main() {
return __MINGW32__;
; return 0; }
EOF
-if { (eval echo configure:606: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
+if { (eval echo configure:595: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
rm -rf conftest*
ac_cv_mingw32=yes
else
@@ -667,7 +656,7 @@ else { echo "configure: error: can not run $ac_config_sub" 1>&2; exit 1; }
fi
echo $ac_n "checking host system type""... $ac_c" 1>&6
-echo "configure:671: checking host system type" >&5
+echo "configure:660: checking host system type" >&5
host_alias=$host
case "$host_alias" in
@@ -688,7 +677,7 @@ host_os=`echo $host | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\3/'`
echo "$ac_t""$host" 1>&6
echo $ac_n "checking target system type""... $ac_c" 1>&6
-echo "configure:692: checking target system type" >&5
+echo "configure:681: checking target system type" >&5
target_alias=$target
case "$target_alias" in
@@ -706,7 +695,7 @@ target_os=`echo $target | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\3/'`
echo "$ac_t""$target" 1>&6
echo $ac_n "checking build system type""... $ac_c" 1>&6
-echo "configure:710: checking build system type" >&5
+echo "configure:699: checking build system type" >&5
build_alias=$build
case "$build_alias" in
@@ -728,49 +717,249 @@ test "$host_alias" != "$target_alias" &&
NONENONEs,x,x, &&
program_prefix=${target_alias}-
+# Extract the first word of "gcc", so it can be a program name with args.
+set dummy gcc; ac_word=$2
+echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
+echo "configure:724: checking for $ac_word" >&5
+if eval "test \"`echo '$''{'ac_cv_prog_CC'+set}'`\" = set"; then
+ echo $ac_n "(cached) $ac_c" 1>&6
+else
+ if test -n "$CC"; then
+ ac_cv_prog_CC="$CC" # Let the user override the test.
+else
+ IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":"
+ ac_dummy="$PATH"
+ for ac_dir in $ac_dummy; do
+ test -z "$ac_dir" && ac_dir=.
+ if test -f $ac_dir/$ac_word; then
+ ac_cv_prog_CC="gcc"
+ break
+ fi
+ done
+ IFS="$ac_save_ifs"
+fi
+fi
+CC="$ac_cv_prog_CC"
+if test -n "$CC"; then
+ echo "$ac_t""$CC" 1>&6
+else
+ echo "$ac_t""no" 1>&6
+fi
- echo $ac_n "checking for strerror in -lcposix""... $ac_c" 1>&6
-echo "configure:734: checking for strerror in -lcposix" >&5
-ac_lib_var=`echo cposix'_'strerror | sed 'y%./+-%__p_%'`
-if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
+if test -z "$CC"; then
+ # Extract the first word of "cc", so it can be a program name with args.
+set dummy cc; ac_word=$2
+echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
+echo "configure:754: checking for $ac_word" >&5
+if eval "test \"`echo '$''{'ac_cv_prog_CC'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
- ac_save_LIBS="$LIBS"
-LIBS="-lcposix $LIBS"
-cat > conftest.$ac_ext <<EOF
-#line 742 "configure"
+ if test -n "$CC"; then
+ ac_cv_prog_CC="$CC" # Let the user override the test.
+else
+ IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":"
+ ac_prog_rejected=no
+ ac_dummy="$PATH"
+ for ac_dir in $ac_dummy; do
+ test -z "$ac_dir" && ac_dir=.
+ if test -f $ac_dir/$ac_word; then
+ if test "$ac_dir/$ac_word" = "/usr/ucb/cc"; then
+ ac_prog_rejected=yes
+ continue
+ fi
+ ac_cv_prog_CC="cc"
+ break
+ fi
+ done
+ IFS="$ac_save_ifs"
+if test $ac_prog_rejected = yes; then
+ # We found a bogon in the path, so make sure we never use it.
+ set dummy $ac_cv_prog_CC
+ shift
+ if test $# -gt 0; then
+ # We chose a different compiler from the bogus one.
+ # However, it has the same basename, so the bogon will be chosen
+ # first if we set CC to just the basename; use the full file name.
+ shift
+ set dummy "$ac_dir/$ac_word" "$@"
+ shift
+ ac_cv_prog_CC="$@"
+ fi
+fi
+fi
+fi
+CC="$ac_cv_prog_CC"
+if test -n "$CC"; then
+ echo "$ac_t""$CC" 1>&6
+else
+ echo "$ac_t""no" 1>&6
+fi
+
+ if test -z "$CC"; then
+ case "`uname -s`" in
+ *win32* | *WIN32*)
+ # Extract the first word of "cl", so it can be a program name with args.
+set dummy cl; ac_word=$2
+echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
+echo "configure:805: checking for $ac_word" >&5
+if eval "test \"`echo '$''{'ac_cv_prog_CC'+set}'`\" = set"; then
+ echo $ac_n "(cached) $ac_c" 1>&6
+else
+ if test -n "$CC"; then
+ ac_cv_prog_CC="$CC" # Let the user override the test.
+else
+ IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":"
+ ac_dummy="$PATH"
+ for ac_dir in $ac_dummy; do
+ test -z "$ac_dir" && ac_dir=.
+ if test -f $ac_dir/$ac_word; then
+ ac_cv_prog_CC="cl"
+ break
+ fi
+ done
+ IFS="$ac_save_ifs"
+fi
+fi
+CC="$ac_cv_prog_CC"
+if test -n "$CC"; then
+ echo "$ac_t""$CC" 1>&6
+else
+ echo "$ac_t""no" 1>&6
+fi
+ ;;
+ esac
+ fi
+ test -z "$CC" && { echo "configure: error: no acceptable cc found in \$PATH" 1>&2; exit 1; }
+fi
+
+echo $ac_n "checking whether the C compiler ($CC $CFLAGS $LDFLAGS) works""... $ac_c" 1>&6
+echo "configure:837: checking whether the C compiler ($CC $CFLAGS $LDFLAGS) works" >&5
+
+ac_ext=c
+# CFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options.
+ac_cpp='$CPP $CPPFLAGS'
+ac_compile='${CC-cc} -c $CFLAGS $CPPFLAGS conftest.$ac_ext 1>&5'
+ac_link='${CC-cc} -o conftest${ac_exeext} $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5'
+cross_compiling=$ac_cv_prog_cc_cross
+
+cat > conftest.$ac_ext << EOF
+
+#line 848 "configure"
#include "confdefs.h"
-/* Override any gcc2 internal prototype to avoid an error. */
-/* We use char because int might match the return type of a gcc2
- builtin and then its argument prototype would still apply. */
-char strerror();
-int main() {
-strerror()
-; return 0; }
+main(){return(0);}
EOF
-if { (eval echo configure:753: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
- rm -rf conftest*
- eval "ac_cv_lib_$ac_lib_var=yes"
+if { (eval echo configure:853: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+ ac_cv_prog_cc_works=yes
+ # If we can't run a trivial program, we are probably using a cross compiler.
+ if (./conftest; exit) 2>/dev/null; then
+ ac_cv_prog_cc_cross=no
+ else
+ ac_cv_prog_cc_cross=yes
+ fi
else
echo "configure: failed program was:" >&5
cat conftest.$ac_ext >&5
- rm -rf conftest*
- eval "ac_cv_lib_$ac_lib_var=no"
+ ac_cv_prog_cc_works=no
+fi
+rm -fr conftest*
+ac_ext=c
+# CFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options.
+ac_cpp='$CPP $CPPFLAGS'
+ac_compile='${CC-cc} -c $CFLAGS $CPPFLAGS conftest.$ac_ext 1>&5'
+ac_link='${CC-cc} -o conftest${ac_exeext} $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5'
+cross_compiling=$ac_cv_prog_cc_cross
+
+echo "$ac_t""$ac_cv_prog_cc_works" 1>&6
+if test $ac_cv_prog_cc_works = no; then
+ { echo "configure: error: installation or configuration problem: C compiler cannot create executables." 1>&2; exit 1; }
+fi
+echo $ac_n "checking whether the C compiler ($CC $CFLAGS $LDFLAGS) is a cross-compiler""... $ac_c" 1>&6
+echo "configure:879: checking whether the C compiler ($CC $CFLAGS $LDFLAGS) is a cross-compiler" >&5
+echo "$ac_t""$ac_cv_prog_cc_cross" 1>&6
+cross_compiling=$ac_cv_prog_cc_cross
+
+echo $ac_n "checking whether we are using GNU C""... $ac_c" 1>&6
+echo "configure:884: checking whether we are using GNU C" >&5
+if eval "test \"`echo '$''{'ac_cv_prog_gcc'+set}'`\" = set"; then
+ echo $ac_n "(cached) $ac_c" 1>&6
+else
+ cat > conftest.c <<EOF
+#ifdef __GNUC__
+ yes;
+#endif
+EOF
+if { ac_try='${CC-cc} -E conftest.c'; { (eval echo configure:893: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }; } | egrep yes >/dev/null 2>&1; then
+ ac_cv_prog_gcc=yes
+else
+ ac_cv_prog_gcc=no
+fi
+fi
+
+echo "$ac_t""$ac_cv_prog_gcc" 1>&6
+
+if test $ac_cv_prog_gcc = yes; then
+ GCC=yes
+else
+ GCC=
+fi
+
+ac_test_CFLAGS="${CFLAGS+set}"
+ac_save_CFLAGS="$CFLAGS"
+CFLAGS=
+echo $ac_n "checking whether ${CC-cc} accepts -g""... $ac_c" 1>&6
+echo "configure:912: checking whether ${CC-cc} accepts -g" >&5
+if eval "test \"`echo '$''{'ac_cv_prog_cc_g'+set}'`\" = set"; then
+ echo $ac_n "(cached) $ac_c" 1>&6
+else
+ echo 'void f(){}' > conftest.c
+if test -z "`${CC-cc} -g -c conftest.c 2>&1`"; then
+ ac_cv_prog_cc_g=yes
+else
+ ac_cv_prog_cc_g=no
fi
rm -f conftest*
-LIBS="$ac_save_LIBS"
fi
-if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
+
+echo "$ac_t""$ac_cv_prog_cc_g" 1>&6
+if test "$ac_test_CFLAGS" = set; then
+ CFLAGS="$ac_save_CFLAGS"
+elif test $ac_cv_prog_cc_g = yes; then
+ if test "$GCC" = yes; then
+ CFLAGS="-g -O2"
+ else
+ CFLAGS="-g"
+ fi
+else
+ if test "$GCC" = yes; then
+ CFLAGS="-O2"
+ else
+ CFLAGS=
+ fi
+fi
+
+echo $ac_n "checking for POSIXized ISC""... $ac_c" 1>&6
+echo "configure:944: checking for POSIXized ISC" >&5
+if test -d /etc/conf/kconfig.d &&
+ grep _POSIX_VERSION /usr/include/sys/unistd.h >/dev/null 2>&1
+then
echo "$ac_t""yes" 1>&6
- LIBS="$LIBS -lcposix"
+ ISC=yes # If later tests want to check for ISC.
+ cat >> confdefs.h <<\EOF
+#define _POSIX_SOURCE 1
+EOF
+
+ if test "$GCC" = yes; then
+ CC="$CC -posix"
+ else
+ CC="$CC -Xp"
+ fi
else
echo "$ac_t""no" 1>&6
+ ISC=
fi
-
-
BFD_VERSION=`sed -n -e 's/^.._INIT_AUTOMAKE.*,[ ]*\([^ ]*\)[ ]*).*/\1/p' < ${srcdir}/../bfd/configure.in`
# Find a good install program. We prefer a C program (faster),
@@ -785,7 +974,7 @@ BFD_VERSION=`sed -n -e 's/^.._INIT_AUTOMAKE.*,[ ]*\([^ ]*\)[ ]*).*/\1/p' < ${
# SVR4 /usr/ucb/install, which tries to use the nonexistent group "staff"
# ./install, which can be erroneously created by make from ./install.sh.
echo $ac_n "checking for a BSD compatible install""... $ac_c" 1>&6
-echo "configure:789: checking for a BSD compatible install" >&5
+echo "configure:978: checking for a BSD compatible install" >&5
if test -z "$INSTALL"; then
if eval "test \"`echo '$''{'ac_cv_path_install'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
@@ -838,7 +1027,7 @@ test -z "$INSTALL_SCRIPT" && INSTALL_SCRIPT='${INSTALL_PROGRAM}'
test -z "$INSTALL_DATA" && INSTALL_DATA='${INSTALL} -m 644'
echo $ac_n "checking whether build environment is sane""... $ac_c" 1>&6
-echo "configure:842: checking whether build environment is sane" >&5
+echo "configure:1031: checking whether build environment is sane" >&5
# Just in case
sleep 1
echo timestamp > conftestfile
@@ -895,7 +1084,7 @@ test "$program_suffix" != NONE &&
test "$program_transform_name" = "" && program_transform_name="s,x,x,"
echo $ac_n "checking whether ${MAKE-make} sets \${MAKE}""... $ac_c" 1>&6
-echo "configure:899: checking whether ${MAKE-make} sets \${MAKE}" >&5
+echo "configure:1088: checking whether ${MAKE-make} sets \${MAKE}" >&5
set dummy ${MAKE-make}; ac_make=`echo "$2" | sed 'y%./+-%__p_%'`
if eval "test \"`echo '$''{'ac_cv_prog_make_${ac_make}_set'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
@@ -941,7 +1130,7 @@ EOF
missing_dir=`cd $ac_aux_dir && pwd`
echo $ac_n "checking for working aclocal""... $ac_c" 1>&6
-echo "configure:945: checking for working aclocal" >&5
+echo "configure:1134: checking for working aclocal" >&5
# Run test in a subshell; some versions of sh will print an error if
# an executable is not found, even if stderr is redirected.
# Redirect stdin to placate older versions of autoconf. Sigh.
@@ -954,7 +1143,7 @@ else
fi
echo $ac_n "checking for working autoconf""... $ac_c" 1>&6
-echo "configure:958: checking for working autoconf" >&5
+echo "configure:1147: checking for working autoconf" >&5
# Run test in a subshell; some versions of sh will print an error if
# an executable is not found, even if stderr is redirected.
# Redirect stdin to placate older versions of autoconf. Sigh.
@@ -967,7 +1156,7 @@ else
fi
echo $ac_n "checking for working automake""... $ac_c" 1>&6
-echo "configure:971: checking for working automake" >&5
+echo "configure:1160: checking for working automake" >&5
# Run test in a subshell; some versions of sh will print an error if
# an executable is not found, even if stderr is redirected.
# Redirect stdin to placate older versions of autoconf. Sigh.
@@ -980,7 +1169,7 @@ else
fi
echo $ac_n "checking for working autoheader""... $ac_c" 1>&6
-echo "configure:984: checking for working autoheader" >&5
+echo "configure:1173: checking for working autoheader" >&5
# Run test in a subshell; some versions of sh will print an error if
# an executable is not found, even if stderr is redirected.
# Redirect stdin to placate older versions of autoconf. Sigh.
@@ -993,7 +1182,7 @@ else
fi
echo $ac_n "checking for working makeinfo""... $ac_c" 1>&6
-echo "configure:997: checking for working makeinfo" >&5
+echo "configure:1186: checking for working makeinfo" >&5
# Run test in a subshell; some versions of sh will print an error if
# an executable is not found, even if stderr is redirected.
# Redirect stdin to placate older versions of autoconf. Sigh.
@@ -1076,228 +1265,6 @@ else
enable_fast_install=yes
fi
-# Extract the first word of "gcc", so it can be a program name with args.
-set dummy gcc; ac_word=$2
-echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
-echo "configure:1083: checking for $ac_word" >&5
-if eval "test \"`echo '$''{'ac_cv_prog_CC'+set}'`\" = set"; then
- echo $ac_n "(cached) $ac_c" 1>&6
-else
- if test -n "$CC"; then
- ac_cv_prog_CC="$CC" # Let the user override the test.
-else
- IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":"
- ac_dummy="$PATH"
- for ac_dir in $ac_dummy; do
- test -z "$ac_dir" && ac_dir=.
- if test -f $ac_dir/$ac_word; then
- ac_cv_prog_CC="gcc"
- break
- fi
- done
- IFS="$ac_save_ifs"
-fi
-fi
-CC="$ac_cv_prog_CC"
-if test -n "$CC"; then
- echo "$ac_t""$CC" 1>&6
-else
- echo "$ac_t""no" 1>&6
-fi
-
-if test -z "$CC"; then
- # Extract the first word of "cc", so it can be a program name with args.
-set dummy cc; ac_word=$2
-echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
-echo "configure:1113: checking for $ac_word" >&5
-if eval "test \"`echo '$''{'ac_cv_prog_CC'+set}'`\" = set"; then
- echo $ac_n "(cached) $ac_c" 1>&6
-else
- if test -n "$CC"; then
- ac_cv_prog_CC="$CC" # Let the user override the test.
-else
- IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":"
- ac_prog_rejected=no
- ac_dummy="$PATH"
- for ac_dir in $ac_dummy; do
- test -z "$ac_dir" && ac_dir=.
- if test -f $ac_dir/$ac_word; then
- if test "$ac_dir/$ac_word" = "/usr/ucb/cc"; then
- ac_prog_rejected=yes
- continue
- fi
- ac_cv_prog_CC="cc"
- break
- fi
- done
- IFS="$ac_save_ifs"
-if test $ac_prog_rejected = yes; then
- # We found a bogon in the path, so make sure we never use it.
- set dummy $ac_cv_prog_CC
- shift
- if test $# -gt 0; then
- # We chose a different compiler from the bogus one.
- # However, it has the same basename, so the bogon will be chosen
- # first if we set CC to just the basename; use the full file name.
- shift
- set dummy "$ac_dir/$ac_word" "$@"
- shift
- ac_cv_prog_CC="$@"
- fi
-fi
-fi
-fi
-CC="$ac_cv_prog_CC"
-if test -n "$CC"; then
- echo "$ac_t""$CC" 1>&6
-else
- echo "$ac_t""no" 1>&6
-fi
-
- if test -z "$CC"; then
- case "`uname -s`" in
- *win32* | *WIN32*)
- # Extract the first word of "cl", so it can be a program name with args.
-set dummy cl; ac_word=$2
-echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
-echo "configure:1164: checking for $ac_word" >&5
-if eval "test \"`echo '$''{'ac_cv_prog_CC'+set}'`\" = set"; then
- echo $ac_n "(cached) $ac_c" 1>&6
-else
- if test -n "$CC"; then
- ac_cv_prog_CC="$CC" # Let the user override the test.
-else
- IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":"
- ac_dummy="$PATH"
- for ac_dir in $ac_dummy; do
- test -z "$ac_dir" && ac_dir=.
- if test -f $ac_dir/$ac_word; then
- ac_cv_prog_CC="cl"
- break
- fi
- done
- IFS="$ac_save_ifs"
-fi
-fi
-CC="$ac_cv_prog_CC"
-if test -n "$CC"; then
- echo "$ac_t""$CC" 1>&6
-else
- echo "$ac_t""no" 1>&6
-fi
- ;;
- esac
- fi
- test -z "$CC" && { echo "configure: error: no acceptable cc found in \$PATH" 1>&2; exit 1; }
-fi
-
-echo $ac_n "checking whether the C compiler ($CC $CFLAGS $LDFLAGS) works""... $ac_c" 1>&6
-echo "configure:1196: checking whether the C compiler ($CC $CFLAGS $LDFLAGS) works" >&5
-
-ac_ext=c
-# CFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options.
-ac_cpp='$CPP $CPPFLAGS'
-ac_compile='${CC-cc} -c $CFLAGS $CPPFLAGS conftest.$ac_ext 1>&5'
-ac_link='${CC-cc} -o conftest${ac_exeext} $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5'
-cross_compiling=$ac_cv_prog_cc_cross
-
-cat > conftest.$ac_ext << EOF
-
-#line 1207 "configure"
-#include "confdefs.h"
-
-main(){return(0);}
-EOF
-if { (eval echo configure:1212: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
- ac_cv_prog_cc_works=yes
- # If we can't run a trivial program, we are probably using a cross compiler.
- if (./conftest; exit) 2>/dev/null; then
- ac_cv_prog_cc_cross=no
- else
- ac_cv_prog_cc_cross=yes
- fi
-else
- echo "configure: failed program was:" >&5
- cat conftest.$ac_ext >&5
- ac_cv_prog_cc_works=no
-fi
-rm -fr conftest*
-ac_ext=c
-# CFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options.
-ac_cpp='$CPP $CPPFLAGS'
-ac_compile='${CC-cc} -c $CFLAGS $CPPFLAGS conftest.$ac_ext 1>&5'
-ac_link='${CC-cc} -o conftest${ac_exeext} $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5'
-cross_compiling=$ac_cv_prog_cc_cross
-
-echo "$ac_t""$ac_cv_prog_cc_works" 1>&6
-if test $ac_cv_prog_cc_works = no; then
- { echo "configure: error: installation or configuration problem: C compiler cannot create executables." 1>&2; exit 1; }
-fi
-echo $ac_n "checking whether the C compiler ($CC $CFLAGS $LDFLAGS) is a cross-compiler""... $ac_c" 1>&6
-echo "configure:1238: checking whether the C compiler ($CC $CFLAGS $LDFLAGS) is a cross-compiler" >&5
-echo "$ac_t""$ac_cv_prog_cc_cross" 1>&6
-cross_compiling=$ac_cv_prog_cc_cross
-
-echo $ac_n "checking whether we are using GNU C""... $ac_c" 1>&6
-echo "configure:1243: checking whether we are using GNU C" >&5
-if eval "test \"`echo '$''{'ac_cv_prog_gcc'+set}'`\" = set"; then
- echo $ac_n "(cached) $ac_c" 1>&6
-else
- cat > conftest.c <<EOF
-#ifdef __GNUC__
- yes;
-#endif
-EOF
-if { ac_try='${CC-cc} -E conftest.c'; { (eval echo configure:1252: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }; } | egrep yes >/dev/null 2>&1; then
- ac_cv_prog_gcc=yes
-else
- ac_cv_prog_gcc=no
-fi
-fi
-
-echo "$ac_t""$ac_cv_prog_gcc" 1>&6
-
-if test $ac_cv_prog_gcc = yes; then
- GCC=yes
-else
- GCC=
-fi
-
-ac_test_CFLAGS="${CFLAGS+set}"
-ac_save_CFLAGS="$CFLAGS"
-CFLAGS=
-echo $ac_n "checking whether ${CC-cc} accepts -g""... $ac_c" 1>&6
-echo "configure:1271: checking whether ${CC-cc} accepts -g" >&5
-if eval "test \"`echo '$''{'ac_cv_prog_cc_g'+set}'`\" = set"; then
- echo $ac_n "(cached) $ac_c" 1>&6
-else
- echo 'void f(){}' > conftest.c
-if test -z "`${CC-cc} -g -c conftest.c 2>&1`"; then
- ac_cv_prog_cc_g=yes
-else
- ac_cv_prog_cc_g=no
-fi
-rm -f conftest*
-
-fi
-
-echo "$ac_t""$ac_cv_prog_cc_g" 1>&6
-if test "$ac_test_CFLAGS" = set; then
- CFLAGS="$ac_save_CFLAGS"
-elif test $ac_cv_prog_cc_g = yes; then
- if test "$GCC" = yes; then
- CFLAGS="-g -O2"
- else
- CFLAGS="-g"
- fi
-else
- if test "$GCC" = yes; then
- CFLAGS="-O2"
- else
- CFLAGS=
- fi
-fi
-
# Check whether --with-gnu-ld or --without-gnu-ld was given.
if test "${with_gnu_ld+set}" = set; then
withval="$with_gnu_ld"
@@ -1310,7 +1277,7 @@ ac_prog=ld
if test "$GCC" = yes; then
# Check if gcc -print-prog-name=ld gives a path.
echo $ac_n "checking for ld used by GCC""... $ac_c" 1>&6
-echo "configure:1314: checking for ld used by GCC" >&5
+echo "configure:1281: checking for ld used by GCC" >&5
case $host in
*-*-mingw*)
# gcc leaves a trailing carriage return which upsets mingw
@@ -1340,10 +1307,10 @@ echo "configure:1314: checking for ld used by GCC" >&5
esac
elif test "$with_gnu_ld" = yes; then
echo $ac_n "checking for GNU ld""... $ac_c" 1>&6
-echo "configure:1344: checking for GNU ld" >&5
+echo "configure:1311: checking for GNU ld" >&5
else
echo $ac_n "checking for non-GNU ld""... $ac_c" 1>&6
-echo "configure:1347: checking for non-GNU ld" >&5
+echo "configure:1314: checking for non-GNU ld" >&5
fi
if eval "test \"`echo '$''{'lt_cv_path_LD'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
@@ -1378,7 +1345,7 @@ else
fi
test -z "$LD" && { echo "configure: error: no acceptable ld found in \$PATH" 1>&2; exit 1; }
echo $ac_n "checking if the linker ($LD) is GNU ld""... $ac_c" 1>&6
-echo "configure:1382: checking if the linker ($LD) is GNU ld" >&5
+echo "configure:1349: checking if the linker ($LD) is GNU ld" >&5
if eval "test \"`echo '$''{'lt_cv_prog_gnu_ld'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
@@ -1395,7 +1362,7 @@ with_gnu_ld=$lt_cv_prog_gnu_ld
echo $ac_n "checking for $LD option to reload object files""... $ac_c" 1>&6
-echo "configure:1399: checking for $LD option to reload object files" >&5
+echo "configure:1366: checking for $LD option to reload object files" >&5
if eval "test \"`echo '$''{'lt_cv_ld_reload_flag'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
@@ -1407,7 +1374,7 @@ reload_flag=$lt_cv_ld_reload_flag
test -n "$reload_flag" && reload_flag=" $reload_flag"
echo $ac_n "checking for BSD-compatible nm""... $ac_c" 1>&6
-echo "configure:1411: checking for BSD-compatible nm" >&5
+echo "configure:1378: checking for BSD-compatible nm" >&5
if eval "test \"`echo '$''{'lt_cv_path_NM'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
@@ -1445,7 +1412,7 @@ NM="$lt_cv_path_NM"
echo "$ac_t""$NM" 1>&6
echo $ac_n "checking whether ln -s works""... $ac_c" 1>&6
-echo "configure:1449: checking whether ln -s works" >&5
+echo "configure:1416: checking whether ln -s works" >&5
if eval "test \"`echo '$''{'ac_cv_prog_LN_S'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
@@ -1466,7 +1433,7 @@ else
fi
echo $ac_n "checking how to recognise dependant libraries""... $ac_c" 1>&6
-echo "configure:1470: checking how to recognise dependant libraries" >&5
+echo "configure:1437: checking how to recognise dependant libraries" >&5
if eval "test \"`echo '$''{'lt_cv_deplibs_check_method'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
@@ -1639,13 +1606,13 @@ file_magic_cmd=$lt_cv_file_magic_cmd
deplibs_check_method=$lt_cv_deplibs_check_method
echo $ac_n "checking for object suffix""... $ac_c" 1>&6
-echo "configure:1643: checking for object suffix" >&5
+echo "configure:1610: checking for object suffix" >&5
if eval "test \"`echo '$''{'ac_cv_objext'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
rm -f conftest*
echo 'int i = 1;' > conftest.$ac_ext
-if { (eval echo configure:1649: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
+if { (eval echo configure:1616: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
for ac_file in conftest.*; do
case $ac_file in
*.c) ;;
@@ -1665,7 +1632,7 @@ ac_objext=$ac_cv_objext
echo $ac_n "checking for executable suffix""... $ac_c" 1>&6
-echo "configure:1669: checking for executable suffix" >&5
+echo "configure:1636: checking for executable suffix" >&5
if eval "test \"`echo '$''{'ac_cv_exeext'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
@@ -1675,10 +1642,10 @@ else
rm -f conftest*
echo 'int main () { return 0; }' > conftest.$ac_ext
ac_cv_exeext=
- if { (eval echo configure:1679: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; }; then
+ if { (eval echo configure:1646: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; }; then
for file in conftest.*; do
case $file in
- *.c | *.o | *.obj | *.ilk | *.pdb) ;;
+ *.c | *.o | *.obj) ;;
*) ac_cv_exeext=`echo $file | sed -e s/conftest//` ;;
esac
done
@@ -1708,7 +1675,7 @@ case $deplibs_check_method in
file_magic*)
if test "$file_magic_cmd" = '$MAGIC_CMD'; then
echo $ac_n "checking for ${ac_tool_prefix}file""... $ac_c" 1>&6
-echo "configure:1712: checking for ${ac_tool_prefix}file" >&5
+echo "configure:1679: checking for ${ac_tool_prefix}file" >&5
if eval "test \"`echo '$''{'lt_cv_path_MAGIC_CMD'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
@@ -1770,7 +1737,7 @@ fi
if test -z "$lt_cv_path_MAGIC_CMD"; then
if test -n "$ac_tool_prefix"; then
echo $ac_n "checking for file""... $ac_c" 1>&6
-echo "configure:1774: checking for file" >&5
+echo "configure:1741: checking for file" >&5
if eval "test \"`echo '$''{'lt_cv_path_MAGIC_CMD'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
@@ -1841,7 +1808,7 @@ esac
# Extract the first word of "${ac_tool_prefix}ranlib", so it can be a program name with args.
set dummy ${ac_tool_prefix}ranlib; ac_word=$2
echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
-echo "configure:1845: checking for $ac_word" >&5
+echo "configure:1812: checking for $ac_word" >&5
if eval "test \"`echo '$''{'ac_cv_prog_RANLIB'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
@@ -1873,7 +1840,7 @@ if test -n "$ac_tool_prefix"; then
# Extract the first word of "ranlib", so it can be a program name with args.
set dummy ranlib; ac_word=$2
echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
-echo "configure:1877: checking for $ac_word" >&5
+echo "configure:1844: checking for $ac_word" >&5
if eval "test \"`echo '$''{'ac_cv_prog_RANLIB'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
@@ -1908,7 +1875,7 @@ fi
# Extract the first word of "${ac_tool_prefix}strip", so it can be a program name with args.
set dummy ${ac_tool_prefix}strip; ac_word=$2
echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
-echo "configure:1912: checking for $ac_word" >&5
+echo "configure:1879: checking for $ac_word" >&5
if eval "test \"`echo '$''{'ac_cv_prog_STRIP'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
@@ -1940,7 +1907,7 @@ if test -n "$ac_tool_prefix"; then
# Extract the first word of "strip", so it can be a program name with args.
set dummy strip; ac_word=$2
echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
-echo "configure:1944: checking for $ac_word" >&5
+echo "configure:1911: checking for $ac_word" >&5
if eval "test \"`echo '$''{'ac_cv_prog_STRIP'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
@@ -2007,8 +1974,8 @@ test x"$pic_mode" = xno && libtool_flags="$libtool_flags --prefer-non-pic"
case $host in
*-*-irix6*)
# Find out which ABI we are using.
- echo '#line 2011 "configure"' > conftest.$ac_ext
- if { (eval echo configure:2012: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
+ echo '#line 1978 "configure"' > conftest.$ac_ext
+ if { (eval echo configure:1979: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
case `/usr/bin/file conftest.$ac_objext` in
*32-bit*)
LD="${LD-ld} -32"
@@ -2027,7 +1994,7 @@ case $host in
ia64-*-hpux*)
# Find out which ABI we are using.
echo 'int i;' > conftest.$ac_ext
- if { (eval echo configure:2031: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
+ if { (eval echo configure:1998: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
case "`/usr/bin/file conftest.o`" in
*ELF-32*)
HPUX_IA64_MODE="32"
@@ -2045,7 +2012,7 @@ ia64-*-hpux*)
SAVE_CFLAGS="$CFLAGS"
CFLAGS="$CFLAGS -belf"
echo $ac_n "checking whether the C compiler needs -belf""... $ac_c" 1>&6
-echo "configure:2049: checking whether the C compiler needs -belf" >&5
+echo "configure:2016: checking whether the C compiler needs -belf" >&5
if eval "test \"`echo '$''{'lt_cv_cc_needs_belf'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
@@ -2058,14 +2025,14 @@ ac_link='${CC-cc} -o conftest${ac_exeext} $CFLAGS $CPPFLAGS $LDFLAGS conftest.$a
cross_compiling=$ac_cv_prog_cc_cross
cat > conftest.$ac_ext <<EOF
-#line 2062 "configure"
+#line 2029 "configure"
#include "confdefs.h"
int main() {
; return 0; }
EOF
-if { (eval echo configure:2069: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:2036: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
rm -rf conftest*
lt_cv_cc_needs_belf=yes
else
@@ -2242,7 +2209,7 @@ fi
# Extract the first word of "gcc", so it can be a program name with args.
set dummy gcc; ac_word=$2
echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
-echo "configure:2246: checking for $ac_word" >&5
+echo "configure:2213: checking for $ac_word" >&5
if eval "test \"`echo '$''{'ac_cv_prog_CC'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
@@ -2272,7 +2239,7 @@ if test -z "$CC"; then
# Extract the first word of "cc", so it can be a program name with args.
set dummy cc; ac_word=$2
echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
-echo "configure:2276: checking for $ac_word" >&5
+echo "configure:2243: checking for $ac_word" >&5
if eval "test \"`echo '$''{'ac_cv_prog_CC'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
@@ -2323,7 +2290,7 @@ fi
# Extract the first word of "cl", so it can be a program name with args.
set dummy cl; ac_word=$2
echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
-echo "configure:2327: checking for $ac_word" >&5
+echo "configure:2294: checking for $ac_word" >&5
if eval "test \"`echo '$''{'ac_cv_prog_CC'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
@@ -2355,7 +2322,7 @@ fi
fi
echo $ac_n "checking whether the C compiler ($CC $CFLAGS $LDFLAGS) works""... $ac_c" 1>&6
-echo "configure:2359: checking whether the C compiler ($CC $CFLAGS $LDFLAGS) works" >&5
+echo "configure:2326: checking whether the C compiler ($CC $CFLAGS $LDFLAGS) works" >&5
ac_ext=c
# CFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options.
@@ -2366,12 +2333,12 @@ cross_compiling=$ac_cv_prog_cc_cross
cat > conftest.$ac_ext << EOF
-#line 2370 "configure"
+#line 2337 "configure"
#include "confdefs.h"
main(){return(0);}
EOF
-if { (eval echo configure:2375: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:2342: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
ac_cv_prog_cc_works=yes
# If we can't run a trivial program, we are probably using a cross compiler.
if (./conftest; exit) 2>/dev/null; then
@@ -2397,12 +2364,12 @@ if test $ac_cv_prog_cc_works = no; then
{ echo "configure: error: installation or configuration problem: C compiler cannot create executables." 1>&2; exit 1; }
fi
echo $ac_n "checking whether the C compiler ($CC $CFLAGS $LDFLAGS) is a cross-compiler""... $ac_c" 1>&6
-echo "configure:2401: checking whether the C compiler ($CC $CFLAGS $LDFLAGS) is a cross-compiler" >&5
+echo "configure:2368: checking whether the C compiler ($CC $CFLAGS $LDFLAGS) is a cross-compiler" >&5
echo "$ac_t""$ac_cv_prog_cc_cross" 1>&6
cross_compiling=$ac_cv_prog_cc_cross
echo $ac_n "checking whether we are using GNU C""... $ac_c" 1>&6
-echo "configure:2406: checking whether we are using GNU C" >&5
+echo "configure:2373: checking whether we are using GNU C" >&5
if eval "test \"`echo '$''{'ac_cv_prog_gcc'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
@@ -2411,7 +2378,7 @@ else
yes;
#endif
EOF
-if { ac_try='${CC-cc} -E conftest.c'; { (eval echo configure:2415: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }; } | egrep yes >/dev/null 2>&1; then
+if { ac_try='${CC-cc} -E conftest.c'; { (eval echo configure:2382: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }; } | egrep yes >/dev/null 2>&1; then
ac_cv_prog_gcc=yes
else
ac_cv_prog_gcc=no
@@ -2430,7 +2397,7 @@ ac_test_CFLAGS="${CFLAGS+set}"
ac_save_CFLAGS="$CFLAGS"
CFLAGS=
echo $ac_n "checking whether ${CC-cc} accepts -g""... $ac_c" 1>&6
-echo "configure:2434: checking whether ${CC-cc} accepts -g" >&5
+echo "configure:2401: checking whether ${CC-cc} accepts -g" >&5
if eval "test \"`echo '$''{'ac_cv_prog_cc_g'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
@@ -2473,7 +2440,7 @@ fi
# SVR4 /usr/ucb/install, which tries to use the nonexistent group "staff"
# ./install, which can be erroneously created by make from ./install.sh.
echo $ac_n "checking for a BSD compatible install""... $ac_c" 1>&6
-echo "configure:2477: checking for a BSD compatible install" >&5
+echo "configure:2444: checking for a BSD compatible install" >&5
if test -z "$INSTALL"; then
if eval "test \"`echo '$''{'ac_cv_path_install'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
@@ -2528,7 +2495,7 @@ test -z "$INSTALL_DATA" && INSTALL_DATA='${INSTALL} -m 644'
ALL_LINGUAS="fr sv tr es"
echo $ac_n "checking how to run the C preprocessor""... $ac_c" 1>&6
-echo "configure:2532: checking how to run the C preprocessor" >&5
+echo "configure:2499: checking how to run the C preprocessor" >&5
# On Suns, sometimes $CPP names a directory.
if test -n "$CPP" && test -d "$CPP"; then
CPP=
@@ -2543,13 +2510,13 @@ else
# On the NeXT, cc -E runs the code through the compiler's parser,
# not just through cpp.
cat > conftest.$ac_ext <<EOF
-#line 2547 "configure"
+#line 2514 "configure"
#include "confdefs.h"
#include <assert.h>
Syntax Error
EOF
ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
-{ (eval echo configure:2553: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
+{ (eval echo configure:2520: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
if test -z "$ac_err"; then
:
@@ -2560,13 +2527,13 @@ else
rm -rf conftest*
CPP="${CC-cc} -E -traditional-cpp"
cat > conftest.$ac_ext <<EOF
-#line 2564 "configure"
+#line 2531 "configure"
#include "confdefs.h"
#include <assert.h>
Syntax Error
EOF
ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
-{ (eval echo configure:2570: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
+{ (eval echo configure:2537: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
if test -z "$ac_err"; then
:
@@ -2577,13 +2544,13 @@ else
rm -rf conftest*
CPP="${CC-cc} -nologo -E"
cat > conftest.$ac_ext <<EOF
-#line 2581 "configure"
+#line 2548 "configure"
#include "confdefs.h"
#include <assert.h>
Syntax Error
EOF
ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
-{ (eval echo configure:2587: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
+{ (eval echo configure:2554: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
if test -z "$ac_err"; then
:
@@ -2610,7 +2577,7 @@ echo "$ac_t""$CPP" 1>&6
# Extract the first word of "ranlib", so it can be a program name with args.
set dummy ranlib; ac_word=$2
echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
-echo "configure:2614: checking for $ac_word" >&5
+echo "configure:2581: checking for $ac_word" >&5
if eval "test \"`echo '$''{'ac_cv_prog_RANLIB'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
@@ -2638,12 +2605,12 @@ else
fi
echo $ac_n "checking for ANSI C header files""... $ac_c" 1>&6
-echo "configure:2642: checking for ANSI C header files" >&5
+echo "configure:2609: checking for ANSI C header files" >&5
if eval "test \"`echo '$''{'ac_cv_header_stdc'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
cat > conftest.$ac_ext <<EOF
-#line 2647 "configure"
+#line 2614 "configure"
#include "confdefs.h"
#include <stdlib.h>
#include <stdarg.h>
@@ -2651,7 +2618,7 @@ else
#include <float.h>
EOF
ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
-{ (eval echo configure:2655: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
+{ (eval echo configure:2622: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
if test -z "$ac_err"; then
rm -rf conftest*
@@ -2668,7 +2635,7 @@ rm -f conftest*
if test $ac_cv_header_stdc = yes; then
# SunOS 4.x string.h does not declare mem*, contrary to ANSI.
cat > conftest.$ac_ext <<EOF
-#line 2672 "configure"
+#line 2639 "configure"
#include "confdefs.h"
#include <string.h>
EOF
@@ -2686,7 +2653,7 @@ fi
if test $ac_cv_header_stdc = yes; then
# ISC 2.0.2 stdlib.h does not declare free, contrary to ANSI.
cat > conftest.$ac_ext <<EOF
-#line 2690 "configure"
+#line 2657 "configure"
#include "confdefs.h"
#include <stdlib.h>
EOF
@@ -2707,7 +2674,7 @@ if test "$cross_compiling" = yes; then
:
else
cat > conftest.$ac_ext <<EOF
-#line 2711 "configure"
+#line 2678 "configure"
#include "confdefs.h"
#include <ctype.h>
#define ISLOWER(c) ('a' <= (c) && (c) <= 'z')
@@ -2718,7 +2685,7 @@ if (XOR (islower (i), ISLOWER (i)) || toupper (i) != TOUPPER (i)) exit(2);
exit (0); }
EOF
-if { (eval echo configure:2722: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
+if { (eval echo configure:2689: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
then
:
else
@@ -2742,12 +2709,12 @@ EOF
fi
echo $ac_n "checking for working const""... $ac_c" 1>&6
-echo "configure:2746: checking for working const" >&5
+echo "configure:2713: checking for working const" >&5
if eval "test \"`echo '$''{'ac_cv_c_const'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
cat > conftest.$ac_ext <<EOF
-#line 2751 "configure"
+#line 2718 "configure"
#include "confdefs.h"
int main() {
@@ -2796,7 +2763,7 @@ ccp = (char const *const *) p;
; return 0; }
EOF
-if { (eval echo configure:2800: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
+if { (eval echo configure:2767: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
rm -rf conftest*
ac_cv_c_const=yes
else
@@ -2817,21 +2784,21 @@ EOF
fi
echo $ac_n "checking for inline""... $ac_c" 1>&6
-echo "configure:2821: checking for inline" >&5
+echo "configure:2788: checking for inline" >&5
if eval "test \"`echo '$''{'ac_cv_c_inline'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
ac_cv_c_inline=no
for ac_kw in inline __inline__ __inline; do
cat > conftest.$ac_ext <<EOF
-#line 2828 "configure"
+#line 2795 "configure"
#include "confdefs.h"
int main() {
} $ac_kw foo() {
; return 0; }
EOF
-if { (eval echo configure:2835: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
+if { (eval echo configure:2802: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
rm -rf conftest*
ac_cv_c_inline=$ac_kw; break
else
@@ -2857,12 +2824,12 @@ EOF
esac
echo $ac_n "checking for off_t""... $ac_c" 1>&6
-echo "configure:2861: checking for off_t" >&5
+echo "configure:2828: checking for off_t" >&5
if eval "test \"`echo '$''{'ac_cv_type_off_t'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
cat > conftest.$ac_ext <<EOF
-#line 2866 "configure"
+#line 2833 "configure"
#include "confdefs.h"
#include <sys/types.h>
#if STDC_HEADERS
@@ -2890,12 +2857,12 @@ EOF
fi
echo $ac_n "checking for size_t""... $ac_c" 1>&6
-echo "configure:2894: checking for size_t" >&5
+echo "configure:2861: checking for size_t" >&5
if eval "test \"`echo '$''{'ac_cv_type_size_t'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
cat > conftest.$ac_ext <<EOF
-#line 2899 "configure"
+#line 2866 "configure"
#include "confdefs.h"
#include <sys/types.h>
#if STDC_HEADERS
@@ -2925,19 +2892,19 @@ fi
# The Ultrix 4.2 mips builtin alloca declared by alloca.h only works
# for constant arguments. Useless!
echo $ac_n "checking for working alloca.h""... $ac_c" 1>&6
-echo "configure:2929: checking for working alloca.h" >&5
+echo "configure:2896: checking for working alloca.h" >&5
if eval "test \"`echo '$''{'ac_cv_header_alloca_h'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
cat > conftest.$ac_ext <<EOF
-#line 2934 "configure"
+#line 2901 "configure"
#include "confdefs.h"
#include <alloca.h>
int main() {
char *p = alloca(2 * sizeof(int));
; return 0; }
EOF
-if { (eval echo configure:2941: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:2908: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
rm -rf conftest*
ac_cv_header_alloca_h=yes
else
@@ -2958,12 +2925,12 @@ EOF
fi
echo $ac_n "checking for alloca""... $ac_c" 1>&6
-echo "configure:2962: checking for alloca" >&5
+echo "configure:2929: checking for alloca" >&5
if eval "test \"`echo '$''{'ac_cv_func_alloca_works'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
cat > conftest.$ac_ext <<EOF
-#line 2967 "configure"
+#line 2934 "configure"
#include "confdefs.h"
#ifdef __GNUC__
@@ -2991,7 +2958,7 @@ int main() {
char *p = (char *) alloca(1);
; return 0; }
EOF
-if { (eval echo configure:2995: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:2962: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
rm -rf conftest*
ac_cv_func_alloca_works=yes
else
@@ -3023,12 +2990,12 @@ EOF
echo $ac_n "checking whether alloca needs Cray hooks""... $ac_c" 1>&6
-echo "configure:3027: checking whether alloca needs Cray hooks" >&5
+echo "configure:2994: checking whether alloca needs Cray hooks" >&5
if eval "test \"`echo '$''{'ac_cv_os_cray'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
cat > conftest.$ac_ext <<EOF
-#line 3032 "configure"
+#line 2999 "configure"
#include "confdefs.h"
#if defined(CRAY) && ! defined(CRAY2)
webecray
@@ -3053,12 +3020,12 @@ echo "$ac_t""$ac_cv_os_cray" 1>&6
if test $ac_cv_os_cray = yes; then
for ac_func in _getb67 GETB67 getb67; do
echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
-echo "configure:3057: checking for $ac_func" >&5
+echo "configure:3024: checking for $ac_func" >&5
if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
cat > conftest.$ac_ext <<EOF
-#line 3062 "configure"
+#line 3029 "configure"
#include "confdefs.h"
/* System header to define __stub macros and hopefully few prototypes,
which can conflict with char $ac_func(); below. */
@@ -3081,7 +3048,7 @@ $ac_func();
; return 0; }
EOF
-if { (eval echo configure:3085: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:3052: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
rm -rf conftest*
eval "ac_cv_func_$ac_func=yes"
else
@@ -3108,7 +3075,7 @@ done
fi
echo $ac_n "checking stack direction for C alloca""... $ac_c" 1>&6
-echo "configure:3112: checking stack direction for C alloca" >&5
+echo "configure:3079: checking stack direction for C alloca" >&5
if eval "test \"`echo '$''{'ac_cv_c_stack_direction'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
@@ -3116,7 +3083,7 @@ else
ac_cv_c_stack_direction=0
else
cat > conftest.$ac_ext <<EOF
-#line 3120 "configure"
+#line 3087 "configure"
#include "confdefs.h"
find_stack_direction ()
{
@@ -3135,7 +3102,7 @@ main ()
exit (find_stack_direction() < 0);
}
EOF
-if { (eval echo configure:3139: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
+if { (eval echo configure:3106: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
then
ac_cv_c_stack_direction=1
else
@@ -3156,21 +3123,21 @@ EOF
fi
-for ac_hdr in unistd.h
+for ac_hdr in stdlib.h unistd.h sys/stat.h sys/types.h
do
ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
-echo "configure:3164: checking for $ac_hdr" >&5
+echo "configure:3131: checking for $ac_hdr" >&5
if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
cat > conftest.$ac_ext <<EOF
-#line 3169 "configure"
+#line 3136 "configure"
#include "confdefs.h"
#include <$ac_hdr>
EOF
ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
-{ (eval echo configure:3174: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
+{ (eval echo configure:3141: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
if test -z "$ac_err"; then
rm -rf conftest*
@@ -3199,12 +3166,12 @@ done
for ac_func in getpagesize
do
echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
-echo "configure:3203: checking for $ac_func" >&5
+echo "configure:3170: checking for $ac_func" >&5
if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
cat > conftest.$ac_ext <<EOF
-#line 3208 "configure"
+#line 3175 "configure"
#include "confdefs.h"
/* System header to define __stub macros and hopefully few prototypes,
which can conflict with char $ac_func(); below. */
@@ -3227,7 +3194,7 @@ $ac_func();
; return 0; }
EOF
-if { (eval echo configure:3231: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:3198: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
rm -rf conftest*
eval "ac_cv_func_$ac_func=yes"
else
@@ -3252,7 +3219,7 @@ fi
done
echo $ac_n "checking for working mmap""... $ac_c" 1>&6
-echo "configure:3256: checking for working mmap" >&5
+echo "configure:3223: checking for working mmap" >&5
if eval "test \"`echo '$''{'ac_cv_func_mmap_fixed_mapped'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
@@ -3260,7 +3227,7 @@ else
ac_cv_func_mmap_fixed_mapped=no
else
cat > conftest.$ac_ext <<EOF
-#line 3264 "configure"
+#line 3231 "configure"
#include "confdefs.h"
/* Thanks to Mike Haertel and Jim Avera for this test.
@@ -3288,11 +3255,24 @@ else
#include <fcntl.h>
#include <sys/mman.h>
+#if HAVE_SYS_TYPES_H
+# include <sys/types.h>
+#endif
+
+#if HAVE_STDLIB_H
+# include <stdlib.h>
+#endif
+
+#if HAVE_SYS_STAT_H
+# include <sys/stat.h>
+#endif
+
+#if HAVE_UNISTD_H
+# include <unistd.h>
+#endif
+
/* This mess was copied from the GNU getpagesize.h. */
#ifndef HAVE_GETPAGESIZE
-# ifdef HAVE_UNISTD_H
-# include <unistd.h>
-# endif
/* Assume that all systems that can run configure have sys/param.h. */
# ifndef HAVE_SYS_PARAM_H
@@ -3400,7 +3380,7 @@ main()
}
EOF
-if { (eval echo configure:3404: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
+if { (eval echo configure:3384: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
then
ac_cv_func_mmap_fixed_mapped=yes
else
@@ -3428,17 +3408,17 @@ unistd.h values.h sys/param.h
do
ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
-echo "configure:3432: checking for $ac_hdr" >&5
+echo "configure:3412: checking for $ac_hdr" >&5
if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
cat > conftest.$ac_ext <<EOF
-#line 3437 "configure"
+#line 3417 "configure"
#include "confdefs.h"
#include <$ac_hdr>
EOF
ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
-{ (eval echo configure:3442: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
+{ (eval echo configure:3422: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
if test -z "$ac_err"; then
rm -rf conftest*
@@ -3468,12 +3448,12 @@ done
__argz_count __argz_stringify __argz_next
do
echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
-echo "configure:3472: checking for $ac_func" >&5
+echo "configure:3452: checking for $ac_func" >&5
if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
cat > conftest.$ac_ext <<EOF
-#line 3477 "configure"
+#line 3457 "configure"
#include "confdefs.h"
/* System header to define __stub macros and hopefully few prototypes,
which can conflict with char $ac_func(); below. */
@@ -3496,7 +3476,7 @@ $ac_func();
; return 0; }
EOF
-if { (eval echo configure:3500: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:3480: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
rm -rf conftest*
eval "ac_cv_func_$ac_func=yes"
else
@@ -3525,12 +3505,12 @@ done
for ac_func in stpcpy
do
echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
-echo "configure:3529: checking for $ac_func" >&5
+echo "configure:3509: checking for $ac_func" >&5
if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
cat > conftest.$ac_ext <<EOF
-#line 3534 "configure"
+#line 3514 "configure"
#include "confdefs.h"
/* System header to define __stub macros and hopefully few prototypes,
which can conflict with char $ac_func(); below. */
@@ -3553,7 +3533,7 @@ $ac_func();
; return 0; }
EOF
-if { (eval echo configure:3557: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:3537: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
rm -rf conftest*
eval "ac_cv_func_$ac_func=yes"
else
@@ -3587,19 +3567,19 @@ EOF
if test $ac_cv_header_locale_h = yes; then
echo $ac_n "checking for LC_MESSAGES""... $ac_c" 1>&6
-echo "configure:3591: checking for LC_MESSAGES" >&5
+echo "configure:3571: checking for LC_MESSAGES" >&5
if eval "test \"`echo '$''{'am_cv_val_LC_MESSAGES'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
cat > conftest.$ac_ext <<EOF
-#line 3596 "configure"
+#line 3576 "configure"
#include "confdefs.h"
#include <locale.h>
int main() {
return LC_MESSAGES
; return 0; }
EOF
-if { (eval echo configure:3603: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:3583: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
rm -rf conftest*
am_cv_val_LC_MESSAGES=yes
else
@@ -3620,7 +3600,7 @@ EOF
fi
fi
echo $ac_n "checking whether NLS is requested""... $ac_c" 1>&6
-echo "configure:3624: checking whether NLS is requested" >&5
+echo "configure:3604: checking whether NLS is requested" >&5
# Check whether --enable-nls or --disable-nls was given.
if test "${enable_nls+set}" = set; then
enableval="$enable_nls"
@@ -3640,7 +3620,7 @@ fi
EOF
echo $ac_n "checking whether included gettext is requested""... $ac_c" 1>&6
-echo "configure:3644: checking whether included gettext is requested" >&5
+echo "configure:3624: checking whether included gettext is requested" >&5
# Check whether --with-included-gettext or --without-included-gettext was given.
if test "${with_included_gettext+set}" = set; then
withval="$with_included_gettext"
@@ -3659,17 +3639,17 @@ fi
ac_safe=`echo "libintl.h" | sed 'y%./+-%__p_%'`
echo $ac_n "checking for libintl.h""... $ac_c" 1>&6
-echo "configure:3663: checking for libintl.h" >&5
+echo "configure:3643: checking for libintl.h" >&5
if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
cat > conftest.$ac_ext <<EOF
-#line 3668 "configure"
+#line 3648 "configure"
#include "confdefs.h"
#include <libintl.h>
EOF
ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
-{ (eval echo configure:3673: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
+{ (eval echo configure:3653: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
if test -z "$ac_err"; then
rm -rf conftest*
@@ -3686,19 +3666,19 @@ fi
if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
echo "$ac_t""yes" 1>&6
echo $ac_n "checking for gettext in libc""... $ac_c" 1>&6
-echo "configure:3690: checking for gettext in libc" >&5
+echo "configure:3670: checking for gettext in libc" >&5
if eval "test \"`echo '$''{'gt_cv_func_gettext_libc'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
cat > conftest.$ac_ext <<EOF
-#line 3695 "configure"
+#line 3675 "configure"
#include "confdefs.h"
#include <libintl.h>
int main() {
return (int) gettext ("")
; return 0; }
EOF
-if { (eval echo configure:3702: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:3682: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
rm -rf conftest*
gt_cv_func_gettext_libc=yes
else
@@ -3714,7 +3694,7 @@ echo "$ac_t""$gt_cv_func_gettext_libc" 1>&6
if test "$gt_cv_func_gettext_libc" != "yes"; then
echo $ac_n "checking for bindtextdomain in -lintl""... $ac_c" 1>&6
-echo "configure:3718: checking for bindtextdomain in -lintl" >&5
+echo "configure:3698: checking for bindtextdomain in -lintl" >&5
ac_lib_var=`echo intl'_'bindtextdomain | sed 'y%./+-%__p_%'`
if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
@@ -3722,7 +3702,7 @@ else
ac_save_LIBS="$LIBS"
LIBS="-lintl $LIBS"
cat > conftest.$ac_ext <<EOF
-#line 3726 "configure"
+#line 3706 "configure"
#include "confdefs.h"
/* Override any gcc2 internal prototype to avoid an error. */
/* We use char because int might match the return type of a gcc2
@@ -3733,7 +3713,7 @@ int main() {
bindtextdomain()
; return 0; }
EOF
-if { (eval echo configure:3737: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:3717: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
rm -rf conftest*
eval "ac_cv_lib_$ac_lib_var=yes"
else
@@ -3749,19 +3729,19 @@ fi
if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
echo "$ac_t""yes" 1>&6
echo $ac_n "checking for gettext in libintl""... $ac_c" 1>&6
-echo "configure:3753: checking for gettext in libintl" >&5
+echo "configure:3733: checking for gettext in libintl" >&5
if eval "test \"`echo '$''{'gt_cv_func_gettext_libintl'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
cat > conftest.$ac_ext <<EOF
-#line 3758 "configure"
+#line 3738 "configure"
#include "confdefs.h"
int main() {
return (int) gettext ("")
; return 0; }
EOF
-if { (eval echo configure:3765: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:3745: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
rm -rf conftest*
gt_cv_func_gettext_libintl=yes
else
@@ -3789,7 +3769,7 @@ EOF
# Extract the first word of "msgfmt", so it can be a program name with args.
set dummy msgfmt; ac_word=$2
echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
-echo "configure:3793: checking for $ac_word" >&5
+echo "configure:3773: checking for $ac_word" >&5
if eval "test \"`echo '$''{'ac_cv_path_MSGFMT'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
@@ -3823,12 +3803,12 @@ fi
for ac_func in dcgettext
do
echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
-echo "configure:3827: checking for $ac_func" >&5
+echo "configure:3807: checking for $ac_func" >&5
if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
cat > conftest.$ac_ext <<EOF
-#line 3832 "configure"
+#line 3812 "configure"
#include "confdefs.h"
/* System header to define __stub macros and hopefully few prototypes,
which can conflict with char $ac_func(); below. */
@@ -3851,7 +3831,7 @@ $ac_func();
; return 0; }
EOF
-if { (eval echo configure:3855: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:3835: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
rm -rf conftest*
eval "ac_cv_func_$ac_func=yes"
else
@@ -3878,7 +3858,7 @@ done
# Extract the first word of "gmsgfmt", so it can be a program name with args.
set dummy gmsgfmt; ac_word=$2
echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
-echo "configure:3882: checking for $ac_word" >&5
+echo "configure:3862: checking for $ac_word" >&5
if eval "test \"`echo '$''{'ac_cv_path_GMSGFMT'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
@@ -3914,7 +3894,7 @@ fi
# Extract the first word of "xgettext", so it can be a program name with args.
set dummy xgettext; ac_word=$2
echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
-echo "configure:3918: checking for $ac_word" >&5
+echo "configure:3898: checking for $ac_word" >&5
if eval "test \"`echo '$''{'ac_cv_path_XGETTEXT'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
@@ -3946,7 +3926,7 @@ else
fi
cat > conftest.$ac_ext <<EOF
-#line 3950 "configure"
+#line 3930 "configure"
#include "confdefs.h"
int main() {
@@ -3954,7 +3934,7 @@ extern int _nl_msg_cat_cntr;
return _nl_msg_cat_cntr
; return 0; }
EOF
-if { (eval echo configure:3958: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:3938: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
rm -rf conftest*
CATOBJEXT=.gmo
DATADIRNAME=share
@@ -3986,7 +3966,7 @@ fi
# Extract the first word of "msgfmt", so it can be a program name with args.
set dummy msgfmt; ac_word=$2
echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
-echo "configure:3990: checking for $ac_word" >&5
+echo "configure:3970: checking for $ac_word" >&5
if eval "test \"`echo '$''{'ac_cv_path_MSGFMT'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
@@ -4020,7 +4000,7 @@ fi
# Extract the first word of "gmsgfmt", so it can be a program name with args.
set dummy gmsgfmt; ac_word=$2
echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
-echo "configure:4024: checking for $ac_word" >&5
+echo "configure:4004: checking for $ac_word" >&5
if eval "test \"`echo '$''{'ac_cv_path_GMSGFMT'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
@@ -4056,7 +4036,7 @@ fi
# Extract the first word of "xgettext", so it can be a program name with args.
set dummy xgettext; ac_word=$2
echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
-echo "configure:4060: checking for $ac_word" >&5
+echo "configure:4040: checking for $ac_word" >&5
if eval "test \"`echo '$''{'ac_cv_path_XGETTEXT'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
@@ -4146,7 +4126,7 @@ fi
LINGUAS=
else
echo $ac_n "checking for catalogs to be installed""... $ac_c" 1>&6
-echo "configure:4150: checking for catalogs to be installed" >&5
+echo "configure:4130: checking for catalogs to be installed" >&5
NEW_LINGUAS=
for lang in ${LINGUAS=$ALL_LINGUAS}; do
case "$ALL_LINGUAS" in
@@ -4174,17 +4154,17 @@ echo "configure:4150: checking for catalogs to be installed" >&5
if test "$CATOBJEXT" = ".cat"; then
ac_safe=`echo "linux/version.h" | sed 'y%./+-%__p_%'`
echo $ac_n "checking for linux/version.h""... $ac_c" 1>&6
-echo "configure:4178: checking for linux/version.h" >&5
+echo "configure:4158: checking for linux/version.h" >&5
if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
cat > conftest.$ac_ext <<EOF
-#line 4183 "configure"
+#line 4163 "configure"
#include "confdefs.h"
#include <linux/version.h>
EOF
ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
-{ (eval echo configure:4188: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
+{ (eval echo configure:4168: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
if test -z "$ac_err"; then
rm -rf conftest*
@@ -4249,7 +4229,7 @@ fi
echo $ac_n "checking for executable suffix""... $ac_c" 1>&6
-echo "configure:4253: checking for executable suffix" >&5
+echo "configure:4233: checking for executable suffix" >&5
if eval "test \"`echo '$''{'ac_cv_exeext'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
@@ -4259,10 +4239,10 @@ else
rm -f conftest*
echo 'int main () { return 0; }' > conftest.$ac_ext
ac_cv_exeext=
- if { (eval echo configure:4263: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; }; then
+ if { (eval echo configure:4243: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; }; then
for file in conftest.*; do
case $file in
- *.c | *.o | *.obj | *.ilk | *.pdb) ;;
+ *.c | *.o | *.obj) ;;
*) ac_cv_exeext=`echo $file | sed -e s/conftest//` ;;
esac
done
@@ -4285,7 +4265,7 @@ do
# Extract the first word of "$ac_prog", so it can be a program name with args.
set dummy $ac_prog; ac_word=$2
echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
-echo "configure:4289: checking for $ac_word" >&5
+echo "configure:4269: checking for $ac_word" >&5
if eval "test \"`echo '$''{'ac_cv_prog_YACC'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
@@ -4321,7 +4301,7 @@ do
# Extract the first word of "$ac_prog", so it can be a program name with args.
set dummy $ac_prog; ac_word=$2
echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
-echo "configure:4325: checking for $ac_word" >&5
+echo "configure:4305: checking for $ac_word" >&5
if eval "test \"`echo '$''{'ac_cv_prog_LEX'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
@@ -4354,7 +4334,7 @@ test -n "$LEX" || LEX=""$missing_dir/missing flex""
# Extract the first word of "flex", so it can be a program name with args.
set dummy flex; ac_word=$2
echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
-echo "configure:4358: checking for $ac_word" >&5
+echo "configure:4338: checking for $ac_word" >&5
if eval "test \"`echo '$''{'ac_cv_prog_LEX'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
@@ -4388,7 +4368,7 @@ then
*) ac_lib=l ;;
esac
echo $ac_n "checking for yywrap in -l$ac_lib""... $ac_c" 1>&6
-echo "configure:4392: checking for yywrap in -l$ac_lib" >&5
+echo "configure:4372: checking for yywrap in -l$ac_lib" >&5
ac_lib_var=`echo $ac_lib'_'yywrap | sed 'y%./+-%__p_%'`
if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
@@ -4396,7 +4376,7 @@ else
ac_save_LIBS="$LIBS"
LIBS="-l$ac_lib $LIBS"
cat > conftest.$ac_ext <<EOF
-#line 4400 "configure"
+#line 4380 "configure"
#include "confdefs.h"
/* Override any gcc2 internal prototype to avoid an error. */
/* We use char because int might match the return type of a gcc2
@@ -4407,7 +4387,7 @@ int main() {
yywrap()
; return 0; }
EOF
-if { (eval echo configure:4411: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:4391: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
rm -rf conftest*
eval "ac_cv_lib_$ac_lib_var=yes"
else
@@ -4430,7 +4410,7 @@ fi
fi
echo $ac_n "checking lex output file root""... $ac_c" 1>&6
-echo "configure:4434: checking lex output file root" >&5
+echo "configure:4414: checking lex output file root" >&5
if eval "test \"`echo '$''{'ac_cv_prog_lex_root'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
@@ -4451,7 +4431,7 @@ echo "$ac_t""$ac_cv_prog_lex_root" 1>&6
LEX_OUTPUT_ROOT=$ac_cv_prog_lex_root
echo $ac_n "checking whether yytext is a pointer""... $ac_c" 1>&6
-echo "configure:4455: checking whether yytext is a pointer" >&5
+echo "configure:4435: checking whether yytext is a pointer" >&5
if eval "test \"`echo '$''{'ac_cv_prog_lex_yytext_pointer'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
@@ -4463,14 +4443,14 @@ echo 'extern char *yytext;' >>$LEX_OUTPUT_ROOT.c
ac_save_LIBS="$LIBS"
LIBS="$LIBS $LEXLIB"
cat > conftest.$ac_ext <<EOF
-#line 4467 "configure"
+#line 4447 "configure"
#include "confdefs.h"
`cat $LEX_OUTPUT_ROOT.c`
int main() {
; return 0; }
EOF
-if { (eval echo configure:4474: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:4454: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
rm -rf conftest*
ac_cv_prog_lex_yytext_pointer=yes
else
@@ -4493,7 +4473,7 @@ fi
echo $ac_n "checking whether to enable maintainer-specific portions of Makefiles""... $ac_c" 1>&6
-echo "configure:4497: checking whether to enable maintainer-specific portions of Makefiles" >&5
+echo "configure:4477: checking whether to enable maintainer-specific portions of Makefiles" >&5
# Check whether --enable-maintainer-mode or --disable-maintainer-mode was given.
if test "${enable_maintainer_mode+set}" = set; then
enableval="$enable_maintainer_mode"
@@ -4527,17 +4507,17 @@ for ac_hdr in string.h strings.h stdlib.h unistd.h
do
ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
-echo "configure:4531: checking for $ac_hdr" >&5
+echo "configure:4511: checking for $ac_hdr" >&5
if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
cat > conftest.$ac_ext <<EOF
-#line 4536 "configure"
+#line 4516 "configure"
#include "confdefs.h"
#include <$ac_hdr>
EOF
ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
-{ (eval echo configure:4541: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
+{ (eval echo configure:4521: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
if test -z "$ac_err"; then
rm -rf conftest*
@@ -4566,12 +4546,12 @@ done
for ac_func in sbrk
do
echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
-echo "configure:4570: checking for $ac_func" >&5
+echo "configure:4550: checking for $ac_func" >&5
if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
cat > conftest.$ac_ext <<EOF
-#line 4575 "configure"
+#line 4555 "configure"
#include "confdefs.h"
/* System header to define __stub macros and hopefully few prototypes,
which can conflict with char $ac_func(); below. */
@@ -4594,7 +4574,7 @@ $ac_func();
; return 0; }
EOF
-if { (eval echo configure:4598: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:4578: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
rm -rf conftest*
eval "ac_cv_func_$ac_func=yes"
else
@@ -4623,12 +4603,12 @@ for ac_hdr in dirent.h sys/ndir.h sys/dir.h ndir.h
do
ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
echo $ac_n "checking for $ac_hdr that defines DIR""... $ac_c" 1>&6
-echo "configure:4627: checking for $ac_hdr that defines DIR" >&5
+echo "configure:4607: checking for $ac_hdr that defines DIR" >&5
if eval "test \"`echo '$''{'ac_cv_header_dirent_$ac_safe'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
cat > conftest.$ac_ext <<EOF
-#line 4632 "configure"
+#line 4612 "configure"
#include "confdefs.h"
#include <sys/types.h>
#include <$ac_hdr>
@@ -4636,7 +4616,7 @@ int main() {
DIR *dirp = 0;
; return 0; }
EOF
-if { (eval echo configure:4640: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
+if { (eval echo configure:4620: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
rm -rf conftest*
eval "ac_cv_header_dirent_$ac_safe=yes"
else
@@ -4661,7 +4641,7 @@ done
# Two versions of opendir et al. are in -ldir and -lx on SCO Xenix.
if test $ac_header_dirent = dirent.h; then
echo $ac_n "checking for opendir in -ldir""... $ac_c" 1>&6
-echo "configure:4665: checking for opendir in -ldir" >&5
+echo "configure:4645: checking for opendir in -ldir" >&5
ac_lib_var=`echo dir'_'opendir | sed 'y%./+-%__p_%'`
if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
@@ -4669,7 +4649,7 @@ else
ac_save_LIBS="$LIBS"
LIBS="-ldir $LIBS"
cat > conftest.$ac_ext <<EOF
-#line 4673 "configure"
+#line 4653 "configure"
#include "confdefs.h"
/* Override any gcc2 internal prototype to avoid an error. */
/* We use char because int might match the return type of a gcc2
@@ -4680,7 +4660,7 @@ int main() {
opendir()
; return 0; }
EOF
-if { (eval echo configure:4684: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:4664: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
rm -rf conftest*
eval "ac_cv_lib_$ac_lib_var=yes"
else
@@ -4702,7 +4682,7 @@ fi
else
echo $ac_n "checking for opendir in -lx""... $ac_c" 1>&6
-echo "configure:4706: checking for opendir in -lx" >&5
+echo "configure:4686: checking for opendir in -lx" >&5
ac_lib_var=`echo x'_'opendir | sed 'y%./+-%__p_%'`
if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
@@ -4710,7 +4690,7 @@ else
ac_save_LIBS="$LIBS"
LIBS="-lx $LIBS"
cat > conftest.$ac_ext <<EOF
-#line 4714 "configure"
+#line 4694 "configure"
#include "confdefs.h"
/* Override any gcc2 internal prototype to avoid an error. */
/* We use char because int might match the return type of a gcc2
@@ -4721,7 +4701,7 @@ int main() {
opendir()
; return 0; }
EOF
-if { (eval echo configure:4725: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:4705: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
rm -rf conftest*
eval "ac_cv_lib_$ac_lib_var=yes"
else
@@ -4754,12 +4734,12 @@ EOF
esac
echo $ac_n "checking whether strstr must be declared""... $ac_c" 1>&6
-echo "configure:4758: checking whether strstr must be declared" >&5
+echo "configure:4738: checking whether strstr must be declared" >&5
if eval "test \"`echo '$''{'bfd_cv_decl_needed_strstr'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
cat > conftest.$ac_ext <<EOF
-#line 4763 "configure"
+#line 4743 "configure"
#include "confdefs.h"
#include <stdio.h>
@@ -4780,7 +4760,7 @@ int main() {
char *(*pfn) = (char *(*)) strstr
; return 0; }
EOF
-if { (eval echo configure:4784: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
+if { (eval echo configure:4764: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
rm -rf conftest*
bfd_cv_decl_needed_strstr=no
else
@@ -4801,12 +4781,12 @@ EOF
fi
echo $ac_n "checking whether free must be declared""... $ac_c" 1>&6
-echo "configure:4805: checking whether free must be declared" >&5
+echo "configure:4785: checking whether free must be declared" >&5
if eval "test \"`echo '$''{'bfd_cv_decl_needed_free'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
cat > conftest.$ac_ext <<EOF
-#line 4810 "configure"
+#line 4790 "configure"
#include "confdefs.h"
#include <stdio.h>
@@ -4827,7 +4807,7 @@ int main() {
char *(*pfn) = (char *(*)) free
; return 0; }
EOF
-if { (eval echo configure:4831: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
+if { (eval echo configure:4811: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
rm -rf conftest*
bfd_cv_decl_needed_free=no
else
@@ -4848,12 +4828,12 @@ EOF
fi
echo $ac_n "checking whether sbrk must be declared""... $ac_c" 1>&6
-echo "configure:4852: checking whether sbrk must be declared" >&5
+echo "configure:4832: checking whether sbrk must be declared" >&5
if eval "test \"`echo '$''{'bfd_cv_decl_needed_sbrk'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
cat > conftest.$ac_ext <<EOF
-#line 4857 "configure"
+#line 4837 "configure"
#include "confdefs.h"
#include <stdio.h>
@@ -4874,7 +4854,7 @@ int main() {
char *(*pfn) = (char *(*)) sbrk
; return 0; }
EOF
-if { (eval echo configure:4878: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
+if { (eval echo configure:4858: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
rm -rf conftest*
bfd_cv_decl_needed_sbrk=no
else
@@ -4895,12 +4875,12 @@ EOF
fi
echo $ac_n "checking whether getenv must be declared""... $ac_c" 1>&6
-echo "configure:4899: checking whether getenv must be declared" >&5
+echo "configure:4879: checking whether getenv must be declared" >&5
if eval "test \"`echo '$''{'bfd_cv_decl_needed_getenv'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
cat > conftest.$ac_ext <<EOF
-#line 4904 "configure"
+#line 4884 "configure"
#include "confdefs.h"
#include <stdio.h>
@@ -4921,7 +4901,7 @@ int main() {
char *(*pfn) = (char *(*)) getenv
; return 0; }
EOF
-if { (eval echo configure:4925: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
+if { (eval echo configure:4905: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
rm -rf conftest*
bfd_cv_decl_needed_getenv=no
else
@@ -4942,12 +4922,12 @@ EOF
fi
echo $ac_n "checking whether environ must be declared""... $ac_c" 1>&6
-echo "configure:4946: checking whether environ must be declared" >&5
+echo "configure:4926: checking whether environ must be declared" >&5
if eval "test \"`echo '$''{'bfd_cv_decl_needed_environ'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
cat > conftest.$ac_ext <<EOF
-#line 4951 "configure"
+#line 4931 "configure"
#include "confdefs.h"
#include <stdio.h>
@@ -4968,7 +4948,7 @@ int main() {
char *(*pfn) = (char *(*)) environ
; return 0; }
EOF
-if { (eval echo configure:4972: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
+if { (eval echo configure:4952: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
rm -rf conftest*
bfd_cv_decl_needed_environ=no
else
@@ -4996,19 +4976,19 @@ fi
# constants, while still supporting pre-ANSI compilers which do not
# support string concatenation.
echo $ac_n "checking whether ANSI C string concatenation works""... $ac_c" 1>&6
-echo "configure:5000: checking whether ANSI C string concatenation works" >&5
+echo "configure:4980: checking whether ANSI C string concatenation works" >&5
if eval "test \"`echo '$''{'ld_cv_string_concatenation'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
cat > conftest.$ac_ext <<EOF
-#line 5005 "configure"
+#line 4985 "configure"
#include "confdefs.h"
int main() {
char *a = "a" "a";
; return 0; }
EOF
-if { (eval echo configure:5012: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
+if { (eval echo configure:4992: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
rm -rf conftest*
ld_cv_string_concatenation=yes
else
@@ -5282,6 +5262,7 @@ s%@build_alias@%$build_alias%g
s%@build_cpu@%$build_cpu%g
s%@build_vendor@%$build_vendor%g
s%@build_os@%$build_os%g
+s%@CC@%$CC%g
s%@INSTALL_PROGRAM@%$INSTALL_PROGRAM%g
s%@INSTALL_SCRIPT@%$INSTALL_SCRIPT%g
s%@INSTALL_DATA@%$INSTALL_DATA%g
@@ -5293,7 +5274,6 @@ s%@AUTOMAKE@%$AUTOMAKE%g
s%@AUTOHEADER@%$AUTOHEADER%g
s%@MAKEINFO@%$MAKEINFO%g
s%@SET_MAKE@%$SET_MAKE%g
-s%@CC@%$CC%g
s%@LN_S@%$LN_S%g
s%@OBJEXT@%$OBJEXT%g
s%@EXEEXT@%$EXEEXT%g
diff --git a/contrib/binutils/ld/configure.in b/contrib/binutils/ld/configure.in
index 34a6ad2..b89c2a1 100644
--- a/contrib/binutils/ld/configure.in
+++ b/contrib/binutils/ld/configure.in
@@ -1,6 +1,6 @@
dnl Process this file with autoconf to produce a configure script
dnl
-AC_PREREG(2.13)
+AC_PREREQ(2.13)
AC_INIT(ldmain.c)
AC_CANONICAL_SYSTEM
diff --git a/contrib/binutils/ld/emulparams/armelfb_nbsd.sh b/contrib/binutils/ld/emulparams/armelfb_nbsd.sh
new file mode 100644
index 0000000..7ab6ce0
--- /dev/null
+++ b/contrib/binutils/ld/emulparams/armelfb_nbsd.sh
@@ -0,0 +1,2 @@
+. ${srcdir}/emulparams/armelf_nbsd.sh
+OUTPUT_FORMAT="elf32-bigarm"
diff --git a/contrib/binutils/ld/emulparams/elf32_sparc.sh b/contrib/binutils/ld/emulparams/elf32_sparc.sh
index d8b81e7..15a837d 100644
--- a/contrib/binutils/ld/emulparams/elf32_sparc.sh
+++ b/contrib/binutils/ld/emulparams/elf32_sparc.sh
@@ -2,6 +2,7 @@ SCRIPT_NAME=elf
OUTPUT_FORMAT="elf32-sparc"
TEXT_START_ADDR=0x10000
MAXPAGESIZE=0x10000
+COMMONPAGESIZE=0x2000
NONPAGED_TEXT_START_ADDR=0x10000
ALIGNMENT=8
ARCH=sparc
diff --git a/contrib/binutils/ld/emulparams/elf32ppc.sh b/contrib/binutils/ld/emulparams/elf32ppc.sh
index 261e4bf..f88198f 100644
--- a/contrib/binutils/ld/emulparams/elf32ppc.sh
+++ b/contrib/binutils/ld/emulparams/elf32ppc.sh
@@ -17,3 +17,22 @@ OTHER_READWRITE_SECTIONS="
.got1 ${RELOCATING-0} : { *(.got1) }
.got2 ${RELOCATING-0} : { *(.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} "*)
+ LIB_PATH=${libdir}
+ for lib in ${NATIVE_LIB_DIRS}; do
+ case :${LIB_PATH}: in
+ *:${lib}:*) ;;
+ *) LIB_PATH=${LIB_PATH}:${lib} ;;
+ esac
+ done
+ # Look for 64 bit target libraries in /lib64, /usr/lib64 etc., first.
+ case "$EMULATION_NAME" in
+ *64*) LIB_PATH=`echo ${LIB_PATH}: | sed -e s,:,64:,g`$LIB_PATH
+ esac
+ esac
+fi
diff --git a/contrib/binutils/ld/emulparams/elf64_ia64.sh b/contrib/binutils/ld/emulparams/elf64_ia64.sh
index b659a7c..76f35e4 100644
--- a/contrib/binutils/ld/emulparams/elf64_ia64.sh
+++ b/contrib/binutils/ld/emulparams/elf64_ia64.sh
@@ -7,6 +7,10 @@ OUTPUT_FORMAT="elf64-ia64-little"
ARCH=ia64
MACHINE=
MAXPAGESIZE=0x10000
+if test -n "$CREATE_SHLIB"; then
+ # Optimize shared libraries for 16K page size
+ COMMONPAGESIZE=0x4000
+fi
TEXT_START_ADDR="0x4000000000000000"
DATA_ADDR="0x6000000000000000 + (. & (${MAXPAGESIZE} - 1))"
GENERATE_SHLIB_SCRIPT=yes
diff --git a/contrib/binutils/ld/emulparams/elf64_sparc.sh b/contrib/binutils/ld/emulparams/elf64_sparc.sh
index dae3f21..a4706b5 100644
--- a/contrib/binutils/ld/emulparams/elf64_sparc.sh
+++ b/contrib/binutils/ld/emulparams/elf64_sparc.sh
@@ -3,6 +3,7 @@ ELFSIZE=64
TEMPLATE_NAME=elf32
OUTPUT_FORMAT="elf64-sparc"
MAXPAGESIZE=0x100000
+COMMONPAGESIZE=0x2000
ARCH="sparc:v9"
MACHINE=
DATA_PLT=
diff --git a/contrib/binutils/ld/emulparams/elf64alpha_fbsd.sh b/contrib/binutils/ld/emulparams/elf64alpha_fbsd.sh
index 37fbfa2..fd4a0a4 100644
--- a/contrib/binutils/ld/emulparams/elf64alpha_fbsd.sh
+++ b/contrib/binutils/ld/emulparams/elf64alpha_fbsd.sh
@@ -1,2 +1,3 @@
. ${srcdir}/emulparams/elf64alpha.sh
. ${srcdir}/emulparams/elf_fbsd.sh
+OUTPUT_FORMAT="elf64-alpha-freebsd"
diff --git a/contrib/binutils/ld/emulparams/elf64ppc.sh b/contrib/binutils/ld/emulparams/elf64ppc.sh
index 2169862..e3a8177 100644
--- a/contrib/binutils/ld/emulparams/elf64ppc.sh
+++ b/contrib/binutils/ld/emulparams/elf64ppc.sh
@@ -5,8 +5,10 @@ GENERATE_SHLIB_SCRIPT=yes
SCRIPT_NAME=elf
OUTPUT_FORMAT="elf64-powerpc"
TEXT_START_ADDR=0x10000000
-MAXPAGESIZE=0x40000
-ARCH=powerpc
+DATA_ADDR="ALIGN (0x10000000) + (. & (${MAXPAGESIZE} - 1))"
+MAXPAGESIZE=0x10000
+COMMONPAGESIZE=0x1000
+ARCH=powerpc:common64
MACHINE=
NOP=0x60000000
EXECUTABLE_SYMBOLS='PROVIDE (__stack = 0); PROVIDE (___stack = 0);'
@@ -15,6 +17,7 @@ CTOR_START='PROVIDE (__CTOR_LIST__ = .); PROVIDE (___CTOR_LIST__ = .);'
CTOR_END='PROVIDE (__CTOR_END__ = .); PROVIDE (___CTOR_END__ = .);'
DTOR_START='PROVIDE (__DTOR_LIST__ = .); PROVIDE (___DTOR_LIST__ = .);'
DTOR_END='PROVIDE (__DTOR_END__ = .); PROVIDE (___DTOR_END__ = .);'
+OTHER_TEXT_SECTIONS="*(.sfpr .glink)"
BSS_PLT=
OTHER_BSS_SYMBOLS="
.tocbss ${RELOCATING-0}${RELOCATING+ALIGN(8)} : { *(.tocbss)}"
@@ -26,4 +29,23 @@ 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)} : { *(.opd) }"
+ .opd ${RELOCATING-0}${RELOCATING+ALIGN(8)} : { KEEP (*(.opd)) }"
+
+# Treat a host that matches the target with the possible exception of "64"
+# in the name as if it were native.
+if test `echo "$host" | sed -e s/64//` = `echo "$target" | sed -e s/64//`; then
+ case " $EMULATION_LIBPATH " in
+ *" ${EMULATION_NAME} "*)
+ LIB_PATH=${libdir}
+ for lib in ${NATIVE_LIB_DIRS}; do
+ case :${LIB_PATH}: in
+ *:${lib}:*) ;;
+ *) LIB_PATH=${LIB_PATH}:${lib} ;;
+ esac
+ done
+ # Look for 64 bit target libraries in /lib64, /usr/lib64 etc., first.
+ case "$EMULATION_NAME" in
+ *64*) LIB_PATH=`echo ${LIB_PATH}: | sed -e s,:,64:,g`$LIB_PATH
+ esac
+ esac
+fi
diff --git a/contrib/binutils/ld/emulparams/elf_i386.sh b/contrib/binutils/ld/emulparams/elf_i386.sh
index 53dd54b..f1b8522 100644
--- a/contrib/binutils/ld/emulparams/elf_i386.sh
+++ b/contrib/binutils/ld/emulparams/elf_i386.sh
@@ -2,6 +2,7 @@ SCRIPT_NAME=elf
OUTPUT_FORMAT="elf32-i386"
TEXT_START_ADDR=0x08048000
MAXPAGESIZE=0x1000
+COMMONPAGESIZE=0x1000
NONPAGED_TEXT_START_ADDR=0x08048000
ARCH=i386
MACHINE=
diff --git a/contrib/binutils/ld/emulparams/elf_i386_chaos.sh b/contrib/binutils/ld/emulparams/elf_i386_chaos.sh
index f7ad3cf..e018231 100644
--- a/contrib/binutils/ld/emulparams/elf_i386_chaos.sh
+++ b/contrib/binutils/ld/emulparams/elf_i386_chaos.sh
@@ -1,4 +1,4 @@
-SCRIPT_NAME=elf
+SCRIPT_NAME=elf_chaos
OUTPUT_FORMAT="elf32-i386"
TEXT_START_ADDR=0x40000000
MAXPAGESIZE=0x1000
diff --git a/contrib/binutils/ld/emulparams/elf_i386_fbsd.sh b/contrib/binutils/ld/emulparams/elf_i386_fbsd.sh
index 237145a..2378598 100644
--- a/contrib/binutils/ld/emulparams/elf_i386_fbsd.sh
+++ b/contrib/binutils/ld/emulparams/elf_i386_fbsd.sh
@@ -1,2 +1,3 @@
. ${srcdir}/emulparams/elf_i386.sh
. ${srcdir}/emulparams/elf_fbsd.sh
+OUTPUT_FORMAT="elf32-i386-freebsd"
diff --git a/contrib/binutils/ld/emulparams/elf_x86_64.sh b/contrib/binutils/ld/emulparams/elf_x86_64.sh
index 4f7433e..1786e33 100644
--- a/contrib/binutils/ld/emulparams/elf_x86_64.sh
+++ b/contrib/binutils/ld/emulparams/elf_x86_64.sh
@@ -3,6 +3,7 @@ ELFSIZE=64
OUTPUT_FORMAT="elf64-x86-64"
TEXT_START_ADDR=0x400000
MAXPAGESIZE=0x100000
+COMMONPAGESIZE=0x1000
NONPAGED_TEXT_START_ADDR=0x400000
ARCH="i386:x86-64"
MACHINE=
diff --git a/contrib/binutils/ld/emulparams/i386nto.sh b/contrib/binutils/ld/emulparams/i386nto.sh
new file mode 100644
index 0000000..e4872ed
--- /dev/null
+++ b/contrib/binutils/ld/emulparams/i386nto.sh
@@ -0,0 +1,12 @@
+SCRIPT_NAME=elf
+OUTPUT_FORMAT="elf32-i386"
+TEXT_START_ADDR=0x08048000
+TEXT_START_SYMBOLS='_btext = .;'
+MAXPAGESIZE=0x1000
+NONPAGED_TEXT_START_ADDR=0x08048000
+#SHLIB_TEXT_START_ADDR=0xb0300000
+ARCH=i386
+MACHINE=
+NOP=0x9090
+TEMPLATE_NAME=elf32
+GENERATE_SHLIB_SCRIPT=yes
diff --git a/contrib/binutils/ld/emulparams/ppcmacos.sh b/contrib/binutils/ld/emulparams/ppcmacos.sh
index b6b800c..9f02af4 100644
--- a/contrib/binutils/ld/emulparams/ppcmacos.sh
+++ b/contrib/binutils/ld/emulparams/ppcmacos.sh
@@ -1,4 +1,6 @@
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/emultempl/armcoff.em b/contrib/binutils/ld/emultempl/armcoff.em
index 783efa9..0b5e7bc 100644
--- a/contrib/binutils/ld/emultempl/armcoff.em
+++ b/contrib/binutils/ld/emultempl/armcoff.em
@@ -4,7 +4,7 @@ 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
+ Copyright 1991, 1993, 1996, 1997, 1998, 1999, 2000, 2001, 2002
Free Software Foundation, Inc.
Written by Steve Chamberlain steve@cygnus.com
@@ -203,10 +203,10 @@ gld${EMULATION_NAME}_finish PARAMS((void))
sprintf_vma (buffer + 2, val);
- if (entry_symbol != NULL && entry_from_cmdline)
+ if (entry_symbol.name != NULL && entry_from_cmdline)
einfo (_("%P: warning: '--thumb-entry %s' is overriding '-e %s'\n"),
- thumb_entry_symbol, entry_symbol);
- entry_symbol = buffer;
+ thumb_entry_symbol, entry_symbol.name);
+ entry_symbol.name = buffer;
}
else
einfo (_("%P: warning: connot find thumb start symbol %s\n"), thumb_entry_symbol);
@@ -289,6 +289,7 @@ struct ld_emulation_xfer_struct ld_${EMULATION_NAME}_emulation =
NULL, /* unrecognised file */
gld${EMULATION_NAME}_list_options,
NULL, /* recognized file */
- NULL /* find_potential_libraries */
+ 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
index 78a0c35..0e65c04 100644
--- a/contrib/binutils/ld/emultempl/armelf.em
+++ b/contrib/binutils/ld/emultempl/armelf.em
@@ -1,5 +1,5 @@
# This shell script emits a C file. -*- C -*-
-# Copyright 1991, 1993, 1996, 1997, 1998, 1999, 2000
+# Copyright 1991, 1993, 1996, 1997, 1998, 1999, 2000, 2002
# Free Software Foundation, Inc.
#
# This file is part of GLD, the Gnu Linker.
@@ -26,6 +26,7 @@ cat >>e${EMULATION_NAME}.c <<EOF
static int no_pipeline_knowledge = 0;
static char *thumb_entry_symbol = NULL;
+static bfd *bfd_for_interwork;
static void
@@ -38,8 +39,7 @@ gld${EMULATION_NAME}_before_parse ()
config.has_shared = `if test -n "$GENERATE_SHLIB_SCRIPT" ; then echo true ; else echo false ; fi`;
}
-
-static void arm_elf_after_open PARAMS((void));
+static void arm_elf_after_open PARAMS ((void));
static void
arm_elf_after_open ()
@@ -57,9 +57,7 @@ arm_elf_after_open ()
{
LANG_FOR_EACH_INPUT_STATEMENT (is)
{
- /* The interworking bfd must be the last one to be processed */
- if (!is->next)
- bfd_elf32_arm_get_bfd_for_interworking (is->the_bfd, & link_info);
+ bfd_elf32_arm_add_glue_sections_to_bfd (is->the_bfd, & link_info);
}
}
@@ -67,19 +65,59 @@ arm_elf_after_open ()
gld${EMULATION_NAME}_after_open ();
}
+static void arm_elf_set_bfd_for_interworking
+ PARAMS ((lang_statement_union_type *));
+
+static void
+arm_elf_set_bfd_for_interworking (statement)
+ lang_statement_union_type *statement;
+{
+ if (statement->header.type == lang_input_section_enum
+ && statement->input_section.ifile->just_syms_flag == false)
+ {
+ asection *i = statement->input_section.section;
+ asection *output_section = i->output_section;
+
+ ASSERT (output_section->owner == output_bfd);
+
+ if ((output_section->flags & SEC_HAS_CONTENTS) != 0
+ && (i->flags & SEC_NEVER_LOAD) == 0
+ && ! i->owner->output_has_begun)
+ {
+ bfd_for_interwork = i->owner;
+ bfd_for_interwork->output_has_begun = true;
+ }
+ }
+}
static void arm_elf_before_allocation PARAMS ((void));
static void
arm_elf_before_allocation ()
{
+ bfd *tem;
+
/* Call the standard elf routine. */
gld${EMULATION_NAME}_before_allocation ();
- /* We should be able to set the size of the interworking stub section */
+ 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);
+ ASSERT (bfd_for_interwork != NULL);
+ for (tem = link_info.input_bfds; tem != NULL; tem = tem->link_next)
+ tem->output_has_begun = false;
- /* Here we rummage through the found bfds to collect glue information */
- /* FIXME: should this be based on a command line option? krk@cygnus.com */
+ bfd_elf32_arm_get_bfd_for_interworking (bfd_for_interwork, &link_info);
+ }
+ /* We should be able to set the size of the interworking stub section. */
+
+ /* Here we rummage through the found bfds to collect glue information. */
+ /* FIXME: should this be based on a command line option? krk@cygnus.com */
{
LANG_FOR_EACH_INPUT_STATEMENT (is)
{
@@ -92,11 +130,10 @@ arm_elf_before_allocation ()
}
}
- /* We have seen it all. Allocate it, and carry on */
+ /* We have seen it all. Allocate it, and carry on. */
bfd_elf32_arm_allocate_interworking_sections (& link_info);
}
-
static void arm_elf_finish PARAMS ((void));
static void
@@ -137,10 +174,10 @@ arm_elf_finish ()
sprintf_vma (buffer + 2, val);
- if (entry_symbol != NULL && entry_from_cmdline)
+ if (entry_symbol.name != NULL && entry_from_cmdline)
einfo (_("%P: warning: '--thumb-entry %s' is overriding '-e %s'\n"),
- thumb_entry_symbol, entry_symbol);
- entry_symbol = buffer;
+ thumb_entry_symbol, entry_symbol.name);
+ entry_symbol.name = buffer;
}
else
einfo (_("%P: warning: connot find thumb start symbol %s\n"),
diff --git a/contrib/binutils/ld/emultempl/armelf_oabi.em b/contrib/binutils/ld/emultempl/armelf_oabi.em
index b0c5669..aae7ea9 100644
--- a/contrib/binutils/ld/emultempl/armelf_oabi.em
+++ b/contrib/binutils/ld/emultempl/armelf_oabi.em
@@ -174,6 +174,7 @@ struct ld_emulation_xfer_struct ld_${EMULATION_NAME}_emulation =
NULL, /* unrecognized file */
NULL, /* list options */
NULL, /* recognized file */
- NULL /* find_potential_libraries */
+ NULL, /* find_potential_libraries */
+ NULL /* new_vers_pattern */
};
EOF
diff --git a/contrib/binutils/ld/emultempl/generic.em b/contrib/binutils/ld/emultempl/generic.em
index 382150f..397422c 100644
--- a/contrib/binutils/ld/emultempl/generic.em
+++ b/contrib/binutils/ld/emultempl/generic.em
@@ -144,6 +144,7 @@ struct ld_emulation_xfer_struct ld_${EMULATION_NAME}_emulation =
${LDEMUL_UNRECOGNIZED_FILE-NULL},
${LDEMUL_LIST_OPTIONS-NULL},
${LDEMUL_RECOGNIZED_FILE-NULL},
- ${LDEMUL_FIND_POTENTIAL_LIBRARIES-NULL}
+ ${LDEMUL_FIND_POTENTIAL_LIBRARIES-NULL},
+ ${LDEMUL_NEW_VERS_PATTERN-NULL}
};
EOF
diff --git a/contrib/binutils/ld/emultempl/linux.em b/contrib/binutils/ld/emultempl/linux.em
index 85ed138..fda490b 100644
--- a/contrib/binutils/ld/emultempl/linux.em
+++ b/contrib/binutils/ld/emultempl/linux.em
@@ -221,6 +221,7 @@ struct ld_emulation_xfer_struct ld_${EMULATION_NAME}_emulation =
NULL, /* unrecognized file */
NULL, /* list options */
NULL, /* recognized file */
- NULL /* find_potential_libraries */
+ NULL, /* find_potential_libraries */
+ NULL /* new_vers_pattern */
};
EOF
diff --git a/contrib/binutils/ld/emultempl/pe.em b/contrib/binutils/ld/emultempl/pe.em
index 2f00269..37146ab 100644
--- a/contrib/binutils/ld/emultempl/pe.em
+++ b/contrib/binutils/ld/emultempl/pe.em
@@ -9,7 +9,7 @@ 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
+ Copyright 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002
Free Software Foundation, Inc.
This program is free software; you can redistribute it and/or modify
@@ -52,11 +52,11 @@ Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */
#include "libiberty.h"
#include "ld.h"
#include "ldmain.h"
-#include "ldgram.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"
@@ -173,7 +173,7 @@ gld_${EMULATION_NAME}_before_parse()
#ifdef DLL_SUPPORT
config.dynamic_link = true;
config.has_shared = 1;
-/* link_info.pei386_auto_import = true; */
+ link_info.pei386_auto_import = -1;
#if (PE_DEF_SUBSYSTEM == 9) || (PE_DEF_SUBSYSTEM == 2)
#if defined TARGET_IS_mipspe || defined TARGET_IS_armpe
@@ -221,6 +221,7 @@ gld_${EMULATION_NAME}_before_parse()
#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)
static struct option longopts[] = {
/* PE options */
@@ -247,6 +248,7 @@ static struct option longopts[] = {
{"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},
@@ -333,6 +335,7 @@ gld_${EMULATION_NAME}_list_options (file)
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"));
@@ -448,7 +451,7 @@ set_pe_subsystem ()
entry = alc_entry;
}
- lang_add_entry (entry, 1);
+ lang_add_entry (entry, 0);
return;
}
@@ -586,7 +589,10 @@ gld_${EMULATION_NAME}_parse_args(argc, argv)
pe_dll_export_everything = 1;
break;
case OPTION_EXCLUDE_SYMBOLS:
- pe_dll_add_excludes (optarg);
+ 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;
@@ -622,10 +628,10 @@ gld_${EMULATION_NAME}_parse_args(argc, argv)
pe_dll_do_default_excludes = 0;
break;
case OPTION_DLL_ENABLE_AUTO_IMPORT:
- link_info.pei386_auto_import = true;
+ link_info.pei386_auto_import = 1;
break;
case OPTION_DLL_DISABLE_AUTO_IMPORT:
- link_info.pei386_auto_import = false;
+ link_info.pei386_auto_import = 0;
break;
case OPTION_ENABLE_EXTRA_PE_DEBUG:
pe_dll_extra_pe_debug = 1;
@@ -708,7 +714,8 @@ gld_${EMULATION_NAME}_set_symbols ()
{
long val = init[j].value;
lang_assignment_statement_type *rv;
- rv = lang_add_assignment (exp_assop ('=' ,init[j].symbol, exp_intop (val)));
+ 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))
@@ -751,8 +758,8 @@ gld_${EMULATION_NAME}_after_parse ()
opened, so registering the symbol as undefined will make a
difference. */
- if (! link_info.relocateable && entry_symbol != NULL)
- ldlang_add_undef (entry_symbol);
+ if (! link_info.relocateable && entry_symbol.name != NULL)
+ ldlang_add_undef (entry_symbol.name);
}
/* pe-dll.c directly accesses pe_data_import_dll,
@@ -905,8 +912,9 @@ pe_find_data_imports ()
sym = bfd_link_hash_lookup (link_info.hash, buf, 0, 0, 1);
if (sym && sym->type == bfd_link_hash_defined)
{
- einfo (_("Warning: resolving %s by linking to %s (auto-import)\n"),
- undef->root.string, buf);
+ if (link_info.pei386_auto_import == -1)
+ info_msg (_("Info: resolving %s by linking to %s (auto-import)\n"),
+ undef->root.string, buf);
{
bfd *b = sym->u.def.section->owner;
asymbol **symbols;
@@ -1410,10 +1418,10 @@ gld_${EMULATION_NAME}_finish ()
sprintf_vma (buffer + 2, val);
- if (entry_symbol != NULL && entry_from_cmdline)
+ if (entry_symbol.name != NULL && entry_from_cmdline)
einfo (_("%P: warning: '--thumb-entry %s' is overriding '-e %s'\n"),
- thumb_entry_symbol, entry_symbol);
- entry_symbol = buffer;
+ thumb_entry_symbol, entry_symbol.name);
+ entry_symbol.name = buffer;
}
else
einfo (_("%P: warning: connot find thumb start symbol %s\n"), thumb_entry_symbol);
@@ -1641,7 +1649,7 @@ gld_${EMULATION_NAME}_place_orphan (file, s)
lang_leave_output_section_statement
((bfd_vma) 0, "*default*",
- (struct lang_output_section_phdr_list *) NULL, "*default*");
+ (struct lang_output_section_phdr_list *) NULL, NULL);
if (config.build_constructors && *ps == '\0')
{
@@ -1660,7 +1668,7 @@ gld_${EMULATION_NAME}_place_orphan (file, s)
stat_ptr = old;
- if (place != NULL)
+ if (place != NULL && os->bfd_section != NULL)
{
asection *snew, **pps;
@@ -1936,6 +1944,7 @@ struct ld_emulation_xfer_struct ld_${EMULATION_NAME}_emulation =
gld_${EMULATION_NAME}_unrecognized_file,
gld_${EMULATION_NAME}_list_options,
gld_${EMULATION_NAME}_recognized_file,
- gld_${EMULATION_NAME}_find_potential_libraries
+ gld_${EMULATION_NAME}_find_potential_libraries,
+ NULL /* new_vers_pattern */
};
EOF
diff --git a/contrib/binutils/ld/emultempl/ppc64elf.em b/contrib/binutils/ld/emultempl/ppc64elf.em
index 2128fe7..cf6918e 100644
--- a/contrib/binutils/ld/emultempl/ppc64elf.em
+++ b/contrib/binutils/ld/emultempl/ppc64elf.em
@@ -23,13 +23,217 @@
#
cat >>e${EMULATION_NAME}.c <<EOF
+#include "ldctor.h"
#include "libbfd.h"
#include "elf64-ppc.h"
+/* Fake input file for stubs. */
+static lang_input_statement_type *stub_file;
+
+/* 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;
+
+static void ppc_create_output_section_statements PARAMS ((void));
+static void ppc_after_open PARAMS ((void));
+static asection *ppc_add_stub_section PARAMS ((const char *, asection *));
+static void ppc_layout_sections_again PARAMS ((void));
static void gld${EMULATION_NAME}_after_allocation PARAMS ((void));
-static void gld${EMULATION_NAME}_finish PARAMS ((void));
+static void build_section_lists PARAMS ((lang_statement_union_type *));
+static struct bfd_elf_version_expr *gld${EMULATION_NAME}_new_vers_pattern
+ PARAMS ((struct bfd_elf_version_expr *));
+
+/* 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 ()
+{
+ stub_file = lang_add_input_file ("linker stubs",
+ lang_input_file_is_fake_enum,
+ NULL);
+ stub_file->the_bfd = bfd_create ("linker stubs", output_bfd);
+ if (stub_file->the_bfd == NULL
+ || !bfd_set_arch_mach (stub_file->the_bfd,
+ bfd_get_arch (output_bfd),
+ bfd_get_mach (output_bfd)))
+ {
+ einfo ("%X%P: can not create BFD %E\n");
+ return;
+ }
+
+ ldlang_add_file (stub_file);
+}
+
+static void
+ppc_after_open ()
+{
+ if (!ppc64_elf_mark_entry_syms (&link_info))
+ {
+ einfo ("%X%P: can not mark entry symbols %E\n");
+ return;
+ }
+
+ gld${EMULATION_NAME}_after_open ();
+}
+
+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 boolean hook_in_stub
+ PARAMS ((struct hook_stub_info *, lang_statement_union_type **));
+
+static boolean
+hook_in_stub (info, lp)
+ struct hook_stub_info *info;
+ lang_statement_union_type **lp;
+{
+ lang_statement_union_type *l;
+ 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 (stub_sec_name, input_section)
+ const char *stub_sec_name;
+ asection *input_section;
+{
+ asection *stub_sec;
+ flagword flags;
+ asection *output_section;
+ const char *secname;
+ lang_output_section_statement_type *os;
+ struct hook_stub_info info;
+
+ stub_sec = bfd_make_section_anyway (stub_file->the_bfd, stub_sec_name);
+ if (stub_sec == NULL)
+ goto err_ret;
+
+ flags = (SEC_ALLOC | SEC_LOAD | SEC_READONLY | SEC_CODE
+ | SEC_HAS_CONTENTS | SEC_RELOC | SEC_IN_MEMORY | SEC_KEEP);
+ if (!bfd_set_section_flags (stub_file->the_bfd, stub_sec, flags))
+ goto err_ret;
+
+ output_section = input_section->output_section;
+ secname = bfd_get_section_name (output_section->owner, output_section);
+ os = lang_output_section_find (secname);
+
+ info.input_section = input_section;
+ lang_list_init (&info.add);
+ lang_add_section (&info.add, stub_sec, os, stub_file);
+
+ if (info.add.head == NULL)
+ goto err_ret;
+
+ 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 ()
+{
+ /* If we have changed sizes of the stub sections, then we need
+ to recalculate all the section offsets. This may mean we need to
+ add even more stubs. */
+ need_laying_out = 0;
+
+ lang_reset_memory_regions ();
+
+ /* Resize the sections. */
+ lang_size_sections (stat_ptr->head, abs_output_section,
+ &stat_ptr->head, 0, (bfd_vma) 0, NULL);
+
+ /* Recalculate TOC base. */
+ ldemul_after_allocation ();
+
+ /* Do the assignments again. */
+ lang_do_assignments (stat_ptr->head, abs_output_section,
+ (fill_type *) 0, (bfd_vma) 0);
+}
+
/* Call the back-end function to set TOC base after we have placed all
the sections. */
@@ -40,14 +244,29 @@ gld${EMULATION_NAME}_after_allocation ()
_bfd_set_gp_value (output_bfd, ppc64_elf_toc (output_bfd));
}
-/* Final emulation specific call. PowerPC64 has 24 byte .plt entries,
- and needs different call stubs for any entries that cross a 64k
- boundary relative to the TOC. That means we need to wait until all
- sections have been laid out to initialise the stubs. */
+
+static void
+build_section_lists (statement)
+ lang_statement_union_type *statement;
+{
+ if (statement->header.type == lang_input_section_enum
+ && !statement->input_section.ifile->just_syms_flag
+ && statement->input_section.section->output_section != NULL
+ && statement->input_section.section->output_section->owner == output_bfd)
+ {
+ ppc64_elf_next_input_section (&link_info,
+ statement->input_section.section);
+ }
+}
+
+
+/* Final emulation specific call. */
static void
gld${EMULATION_NAME}_finish ()
{
+ int ret;
+
/* 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. */
@@ -61,47 +280,213 @@ gld${EMULATION_NAME}_finish ()
/* bfd_elf64_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
- adjusting stub sizes. */
+ adding stubs. */
if (bfd_elf${ELFSIZE}_discard_info (output_bfd, &link_info))
need_laying_out = 1;
- while (1)
+ ret = ppc64_elf_setup_section_lists (output_bfd, &link_info);
+ if (ret != 0)
{
+ if (ret < 0)
+ {
+ einfo ("%X%P: can not size stub section: %E\n");
+ return;
+ }
+
+ 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, &need_laying_out))
+ if (!ppc64_elf_size_stubs (output_bfd,
+ stub_file->the_bfd,
+ &link_info,
+ group_size,
+ &ppc_add_stub_section,
+ &ppc_layout_sections_again))
{
einfo ("%X%P: can not size stub section: %E\n");
return;
}
+ }
- if (!need_laying_out)
- break;
+ if (need_laying_out)
+ ppc_layout_sections_again ();
+
+ if (stub_file->the_bfd->sections != NULL)
+ {
+ if (!ppc64_elf_build_stubs (&link_info))
+ einfo ("%X%P: can not build stubs: %E\n");
+ }
+}
- /* If we have changed the size of the stub section, then we need
- to recalculate all the section offsets. After this, we may
- need to adjust the stub size again. */
- need_laying_out = 0;
- lang_reset_memory_regions ();
+/* Add a pattern matching ".foo" for every "foo" in a version script.
- /* Resize the sections. */
- lang_size_sections (stat_ptr->head, abs_output_section,
- &stat_ptr->head, 0, (bfd_vma) 0, NULL);
+ 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.
- /* Recalculate TOC base. */
- ldemul_after_allocation ();
+ . 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. */
+
+struct bfd_elf_version_expr *
+gld${EMULATION_NAME}_new_vers_pattern (entry)
+ struct bfd_elf_version_expr *entry;
+{
+ struct bfd_elf_version_expr *dot_entry;
+ struct bfd_elf_version_expr *next;
+ unsigned int len;
+ char *dot_pat;
- /* Do the assignments again. */
- lang_do_assignments (stat_ptr->head, abs_output_section,
- (fill_type) 0, (bfd_vma) 0);
+ if (!dotsyms || entry->pattern[0] == '*')
+ return entry;
+
+ /* Is the script adding ".foo" explicitly? */
+ if (entry->pattern[0] == '.')
+ {
+ /* We may have added this pattern automatically. Don't add it
+ again. Quadratic behaviour here is acceptable as the list
+ may be traversed for each input bfd symbol. */
+ for (next = entry->next; next != NULL; next = next->next)
+ {
+ if (strcmp (next->pattern, entry->pattern) == 0
+ && next->match == entry->match)
+ {
+ next = entry->next;
+ free ((char *) entry->pattern);
+ free (entry);
+ return next;
+ }
+ }
+ return entry;
+ }
+
+ /* Don't add ".foo" if the script has already done so. */
+ for (next = entry->next; next != NULL; next = next->next)
+ {
+ if (next->pattern[0] == '.'
+ && strcmp (next->pattern + 1, entry->pattern) == 0
+ && next->match == entry->match)
+ return entry;
}
- if (! ppc64_elf_build_stubs (output_bfd, &link_info))
- einfo ("%X%P: can not build stubs: %E\n");
+ dot_entry = (struct bfd_elf_version_expr *) xmalloc (sizeof *dot_entry);
+ dot_entry->next = entry;
+ len = strlen (entry->pattern) + 2;
+ dot_pat = xmalloc (len);
+ dot_pat[0] = '.';
+ memcpy (dot_pat + 1, entry->pattern, len - 1);
+ dot_entry->pattern = dot_pat;
+ dot_entry->match = entry->match;
+ return dot_entry;
+}
+
+
+/* Avoid processing the fake stub_file in vercheck, stat_needed and
+ check_needed routines. */
+
+static void ppc_for_each_input_file_wrapper
+ PARAMS ((lang_input_statement_type *));
+static void ppc_lang_for_each_input_file
+ PARAMS ((void (*) (lang_input_statement_type *)));
+
+static void (*real_func) PARAMS ((lang_input_statement_type *));
+
+static void ppc_for_each_input_file_wrapper (l)
+ lang_input_statement_type *l;
+{
+ if (l != stub_file)
+ (*real_func) (l);
}
+
+static void
+ppc_lang_for_each_input_file (func)
+ void (*func) PARAMS ((lang_input_statement_type *));
+{
+ real_func = func;
+ lang_for_each_input_file (&ppc_for_each_input_file_wrapper);
+}
+
+#define lang_for_each_input_file ppc_lang_for_each_input_file
+
EOF
+# Define some shell vars to insert bits of code into the standard elf
+# parse_args and list_options functions.
+#
+PARSE_AND_LIST_PROLOGUE='
+#define OPTION_STUBGROUP_SIZE 301
+#define OPTION_DOTSYMS (OPTION_STUBGROUP_SIZE + 1)
+#define OPTION_NO_DOTSYMS (OPTION_DOTSYMS + 1)
+'
+
+# The options are repeated below so that no abbreviations are allowed.
+# Otherwise -s matches stub-group-size
+PARSE_AND_LIST_LONGOPTS='
+ { "stub-group-size", required_argument, NULL, OPTION_STUBGROUP_SIZE },
+ { "stub-group-size", required_argument, NULL, OPTION_STUBGROUP_SIZE },
+ { "dotsyms", no_argument, NULL, OPTION_DOTSYMS },
+ { "dotsyms", no_argument, NULL, OPTION_DOTSYMS },
+ { "no-dotsyms", no_argument, NULL, OPTION_NO_DOTSYMS },
+ { "no-dotsyms", no_argument, NULL, OPTION_NO_DOTSYMS },
+'
+
+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, _("\
+ --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"
+ ));
+'
+
+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_DOTSYMS:
+ {
+ dotsyms = 1;
+ }
+ break;
+
+ case OPTION_NO_DOTSYMS:
+ {
+ dotsyms = 0;
+ }
+ break;
+'
+
# Put these extra ppc64elf routines in ld_${EMULATION_NAME}_emulation
#
+LDEMUL_AFTER_OPEN=ppc_after_open
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/sunos.em b/contrib/binutils/ld/emultempl/sunos.em
index 17cd407..64e5ea5 100644
--- a/contrib/binutils/ld/emultempl/sunos.em
+++ b/contrib/binutils/ld/emultempl/sunos.em
@@ -1050,6 +1050,7 @@ struct ld_emulation_xfer_struct ld_${EMULATION_NAME}_emulation =
NULL, /* unrecognized file */
NULL, /* list options */
NULL, /* recognized file */
- NULL /* find_potential_libraries */
+ 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
index a2ab4db..eb10317 100644
--- a/contrib/binutils/ld/emultempl/ticoff.em
+++ b/contrib/binutils/ld/emultempl/ticoff.em
@@ -197,6 +197,7 @@ struct ld_emulation_xfer_struct ld_${EMULATION_NAME}_emulation =
NULL, /* unrecognized_file */
gld_${EMULATION_NAME}_list_options,
NULL, /* recognized file */
- NULL /* find_potential_libraries */
+ 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
index 96ee34c..4c38207 100644
--- a/contrib/binutils/ld/emultempl/vanilla.em
+++ b/contrib/binutils/ld/emultempl/vanilla.em
@@ -82,6 +82,7 @@ struct ld_emulation_xfer_struct ld_vanilla_emulation =
NULL, /* unrecognized file */
NULL, /* list options */
NULL, /* recognized file */
- NULL /* find_potential_libraries */
+ NULL, /* find_potential_libraries */
+ NULL /* new_vers_pattern */
};
EOF
diff --git a/contrib/binutils/ld/genscripts.sh b/contrib/binutils/ld/genscripts.sh
index fe1fa49..36e0a9d 100755
--- a/contrib/binutils/ld/genscripts.sh
+++ b/contrib/binutils/ld/genscripts.sh
@@ -45,31 +45,25 @@ fi
# To force a logically empty LIB_PATH, do LIBPATH=":".
if [ "x${LIB_PATH}" = "x" ] ; then
- # Cross, or native non-default emulation not requesting LIB_PATH.
- LIB_PATH=
-
if [ "x${host}" = "x${target}" ] ; then
case " $EMULATION_LIBPATH " in
*" ${EMULATION_NAME} "*)
# Native, and default or emulation requesting LIB_PATH.
- LIB_PATH=/lib:/usr/lib
- if [ -n "${NATIVE_LIB_DIRS}" ]; then
- LIB_PATH=${LIB_PATH}:${NATIVE_LIB_DIRS}
- fi
- if [ "${libdir}" != /usr/lib ]; then
- LIB_PATH=${LIB_PATH}:${libdir}
- fi
- if [ "${libdir}" != /usr/local/lib ] ; then
- LIB_PATH=${LIB_PATH}:/usr/local/lib
- fi
+ LIB_PATH=${libdir}
+ for lib in ${NATIVE_LIB_DIRS}; do
+ case :${LIB_PATH}: in
+ *:${lib}:*) ;;
+ *) LIB_PATH=${LIB_PATH}:${lib} ;;
+ esac
+ done
esac
fi
fi
# Always search $(tooldir)/lib, aka /usr/local/TARGET/lib.
-LIB_PATH=${LIB_PATH}:${tool_lib}
+LIB_PATH=${tool_lib}:${LIB_PATH}
-LIB_SEARCH_DIRS=`echo ${LIB_PATH} | tr ':' ' ' | sed -e 's/\([^ ][^ ]*\)/SEARCH_DIR(\\"\1\\");/g'`
+LIB_SEARCH_DIRS=`echo ${LIB_PATH} | sed -e 's/:/ /g' -e 's/\([^ ][^ ]*\)/SEARCH_DIR(\\"\1\\");/g'`
# Generate 5 or 6 script files from a master script template in
# ${srcdir}/scripttempl/${SCRIPT_NAME}.sh. Which one of the 5 or 6
@@ -181,9 +175,9 @@ if test -n "$GENERATE_SHLIB_SCRIPT"; then
fi
fi
-for i in $EMULATION_LIBPATH ; do
- test "$i" = "$EMULATION_NAME" && COMPILE_IN=true
-done
+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/ld.h b/contrib/binutils/ld/ld.h
index e629e66..438e00d 100644
--- a/contrib/binutils/ld/ld.h
+++ b/contrib/binutils/ld/ld.h
@@ -1,5 +1,5 @@
/* ld.h -- general linker header file
- Copyright 1991, 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999, 2000
+ Copyright 1991, 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2002
Free Software Foundation, Inc.
This file is part of GLD, the Gnu Linker.
@@ -91,19 +91,11 @@ typedef struct user_section_struct {
#define LONG_SIZE (4)
#define QUAD_SIZE (8)
-/* ALIGN macro changed to ALIGN_N to avoid */
-/* conflict in /usr/include/machine/machparam.h */
-/* WARNING: If THIS is a 64 bit address and BOUNDARY is a 32 bit int,
- you must coerce boundary to the same type as THIS.
- ??? Is there a portable way to avoid this. */
-#define ALIGN_N(this, boundary) \
- ((( (this) + ((boundary) -1)) & (~((boundary)-1))))
-
typedef struct {
/* 1 => assign space to common symbols even if `relocatable_output'. */
boolean force_common_definition;
- /* 1 => do not assign addresses to common symbols. */
+ /* 1 => do not assign addresses to common symbols. */
boolean inhibit_common_definition;
boolean relax;
diff --git a/contrib/binutils/ld/ld.texinfo b/contrib/binutils/ld/ld.texinfo
index dee9874..789e894 100644
--- a/contrib/binutils/ld/ld.texinfo
+++ b/contrib/binutils/ld/ld.texinfo
@@ -859,6 +859,7 @@ of this object will ignore any default library search paths.
@code{now} marks the object with the non-lazy runtime binding.
@code{origin} marks the object may contain $ORIGIN.
@code{defs} disallows undefined symbols.
+@code{muldefs} allows multiple definitions.
@code{combreloc} combines multiple reloc sections and sorts them
to make dynamic symbol lookup caching possible.
@code{nocombreloc} disables multiple reloc sections combining.
@@ -1080,6 +1081,14 @@ Normally when creating a non-symbolic shared library, undefined symbols
are allowed and left to be resolved by the runtime loader. These options
disallows such undefined symbols.
+@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
@item --allow-shlib-undefined
Allow undefined symbols in shared objects even when --no-undefined is
@@ -1093,6 +1102,12 @@ select which function is most appropriate for the current architecture.
I.E. dynamically select an appropriate memset function. Apparently it
is also normal for HPPA shared libraries to have undefined symbols.
+@kindex --no-undefined-version
+@item --no-undefined-version
+Normally when a symbol has an undefined version, the linker will ignore
+it. This option disallows symbols with undefined version and a fatal error
+will be issued instead.
+
@kindex --no-warn-mismatch
@item --no-warn-mismatch
Normally @command{ld} will give an error if you try to link together input
@@ -1656,6 +1671,14 @@ These cygwin-excludes are: @code{_cygwin_dll_entry@@12},
Specifies a list of symbols which should not be automatically
exported. The symbol names may be delimited by commas or colons.
+@kindex --exclude-libs
+@item --exclude-libs @var{lib},@var{lib},...
+Specifies a list of archive libraries from which symbols should not be automatically
+exported. The library names may be delimited by commas or colons. Specifying
+@code{--exclude-libs ALL} excludes symbols in all archive libraries from
+automatic export. Symbols explicitly listed in a .def file are still exported,
+regardless of this option.
+
@kindex --file-alignment
@item --file-alignment
Specify the file alignment. Sections in the file will always begin at
@@ -2930,7 +2953,7 @@ 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 four least significant bytes of the expression, repeated as
+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
@@ -2943,10 +2966,11 @@ FILL(0x90909090)
@end smallexample
The @code{FILL} command is similar to the @samp{=@var{fillexp}} output
-section attribute (@pxref{Output Section Fill}), but it only affects the
+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.
+precedence. @xref{Output Section Fill}, for details on the fill
+expression.
@node Output Section Keywords
@subsection Output section keywords
@@ -3225,11 +3249,17 @@ 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 four least
-significant bytes of the value, repeated as necessary.
+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; see @ref{Output Section Data}.
+output section commands; (@pxref{Output Section Data}).
Here is a simple example:
@smallexample
@@ -3738,7 +3768,8 @@ __asm__(".symver original_foo,foo@@VERS_1.1");
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.
+@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
@@ -4127,12 +4158,7 @@ SECTIONS @{ @dots{}
@cindex round up location counter
@cindex align location counter
Return the location counter (@code{.}) aligned to the next @var{exp}
-boundary. @var{exp} must be an expression whose value is a power of
-two. This is equivalent to
-@smallexample
-(. + @var{exp} - 1) & ~(@var{exp} - 1)
-@end smallexample
-
+boundary.
@code{ALIGN} doesn't change the value of the location counter---it just
does arithmetic on it. Here is an example which aligns the output
@code{.data} section to the next @code{0x2000} byte boundary after the
@@ -4162,6 +4188,45 @@ This is a synonym for @code{ALIGN}, for compatibility with older linker
scripts. It is most often seen when setting the address of an output
section.
+@item DATA_SEGMENT_ALIGN(@var{maxpagesize}, @var{commonpagesize})
+@kindex DATA_SEGMENT_ALIGN(@var{maxpagesize}, @var{commonpagesize})
+This is equivalent to either
+@smallexample
+(ALIGN(@var{maxpagesize}) + (. & (@var{maxpagesize} - 1)))
+@end smallexample
+or
+@smallexample
+(ALIGN(@var{maxpagesize}) + (. & (@var{maxpagesize} - @var{commonpagesize})))
+@end smallexample
+@noindent
+depending on whether the latter uses fewer @var{commonpagesize} sized pages
+for the data segment (area between the result of this expression and
+@code{DATA_SEGMENT_END}) than the former or not.
+If the latter form is used, it means @var{commonpagesize} bytes of runtime
+memory will be saved at the expense of up to @var{commonpagesize} wasted
+bytes in the on-disk file.
+
+This expression can only be used directly in @code{SECTIONS} commands, not in
+any output section descriptions and only once in the linker script.
+@var{commonpagesize} should be less or equal to @var{maxpagesize} and should
+be the system page size the object wants to be optimized for (while still
+working on system page sizes up to @var{maxpagesize}).
+
+@noindent
+Example:
+@smallexample
+ . = DATA_SEGMENT_ALIGN(0x10000, 0x2000);
+@end smallexample
+
+@item DATA_SEGMENT_END(@var{exp})
+@kindex DATA_SEGMENT_END(@var{exp})
+This defines the end of data segment for @code{DATA_SEGMENT_ALIGN}
+evaluation purposes.
+
+@smallexample
+ . = DATA_SEGMENT_END(.);
+@end smallexample
+
@item DEFINED(@var{symbol})
@kindex DEFINED(@var{symbol})
@cindex symbol defaults
@@ -4619,17 +4684,18 @@ 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.
+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?'' Those bug reports are useless, and we urge everyone to
@@ -4669,10 +4735,13 @@ 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,
-uuencoded if necessary to get them through the mail system. Making them
-available for anonymous FTP is not as good, but may be the only
-reasonable choice for large object files.
+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
diff --git a/contrib/binutils/ld/ldemul.c b/contrib/binutils/ld/ldemul.c
index 6b96204..c90673b 100644
--- a/contrib/binutils/ld/ldemul.c
+++ b/contrib/binutils/ld/ldemul.c
@@ -170,8 +170,8 @@ ldemul_recognized_file (entry)
char *
ldemul_choose_target (argc, argv)
- int argc;
- char **argv;
+ int argc;
+ char **argv;
{
return ld_emulation->choose_target (argc, argv);
}
@@ -308,3 +308,12 @@ ldemul_find_potential_libraries (name, entry)
return 0;
}
+
+struct bfd_elf_version_expr *
+ldemul_new_vers_pattern (entry)
+ 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
index c49961c..3e27500 100644
--- a/contrib/binutils/ld/ldemul.h
+++ b/contrib/binutils/ld/ldemul.h
@@ -53,6 +53,8 @@ extern void syslib_default PARAMS ((char*));
extern void hll_default PARAMS ((char*));
extern int ldemul_find_potential_libraries
PARAMS ((char *, struct lang_input_statement_struct *));
+extern struct bfd_elf_version_expr *ldemul_new_vers_pattern
+ PARAMS ((struct bfd_elf_version_expr *));
typedef struct ld_emulation_xfer_struct {
/* Run before parsing the command line and script file.
@@ -139,6 +141,11 @@ typedef struct ld_emulation_xfer_struct {
int (* find_potential_libraries)
PARAMS ((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)
+ PARAMS ((struct bfd_elf_version_expr *));
+
} ld_emulation_xfer_type;
typedef enum {
diff --git a/contrib/binutils/ld/ldexp.c b/contrib/binutils/ld/ldexp.c
index ec449fd8d..e45c470 100644
--- a/contrib/binutils/ld/ldexp.c
+++ b/contrib/binutils/ld/ldexp.c
@@ -1,6 +1,6 @@
/* This module handles expression trees.
Copyright 1991, 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999, 2000,
- 2001
+ 2001, 2002
Free Software Foundation, Inc.
Written by Steve Chamberlain of Cygnus Support <sac@cygnus.com>.
@@ -39,21 +39,32 @@ Software Foundation, 59 Temple Place - Suite 330, Boston, MA
#include "ldgram.h"
#include "ldlang.h"
#include "libiberty.h"
+#include "safe-ctype.h"
-static void exp_print_token PARAMS ((token_code_type code));
+static void exp_print_token PARAMS ((token_code_type code, int infix_p));
static void make_abs PARAMS ((etree_value_type *ptr));
static etree_value_type new_abs PARAMS ((bfd_vma value));
static void check PARAMS ((lang_output_section_statement_type *os,
const char *name, const char *op));
static etree_value_type new_rel
- PARAMS ((bfd_vma value, lang_output_section_statement_type *section));
+ PARAMS ((bfd_vma, char *, lang_output_section_statement_type *section));
static etree_value_type new_rel_from_section
PARAMS ((bfd_vma value, lang_output_section_statement_type *section));
+static etree_value_type fold_unary
+ PARAMS ((etree_type *tree,
+ lang_output_section_statement_type *current_section,
+ lang_phase_type allocation_done,
+ bfd_vma dot, bfd_vma *dotp));
static etree_value_type fold_binary
PARAMS ((etree_type *tree,
lang_output_section_statement_type *current_section,
lang_phase_type allocation_done,
bfd_vma dot, bfd_vma *dotp));
+static etree_value_type fold_trinary
+ PARAMS ((etree_type *tree,
+ lang_output_section_statement_type *current_section,
+ lang_phase_type allocation_done,
+ bfd_vma dot, bfd_vma *dotp));
static etree_value_type fold_name
PARAMS ((etree_type *tree,
lang_output_section_statement_type *current_section,
@@ -64,11 +75,17 @@ static etree_value_type exp_fold_tree_no_dot
lang_output_section_statement_type *current_section,
lang_phase_type allocation_done));
+struct exp_data_seg exp_data_seg;
+
+/* Print the string representation of the given token. Surround it
+ with spaces if INFIX_P is true. */
+
static void
-exp_print_token (code)
+exp_print_token (code, infix_p)
token_code_type code;
+ int infix_p;
{
- static CONST struct
+ static const struct
{
token_code_type code;
char * name;
@@ -114,23 +131,27 @@ exp_print_token (code)
{ LOADADDR, "LOADADDR" },
{ MAX_K, "MAX_K" },
{ REL, "relocateable" },
+ { DATA_SEGMENT_ALIGN, "DATA_SEGMENT_ALIGN" },
+ { DATA_SEGMENT_END, "DATA_SEGMENT_END" }
};
unsigned int idx;
- for (idx = ARRAY_SIZE (table); idx--;)
- {
- if (table[idx].code == code)
- {
- fprintf (config.map_file, " %s ", table[idx].name);
- return;
- }
- }
+ for (idx = 0; idx < ARRAY_SIZE (table); idx++)
+ if (table[idx].code == code)
+ break;
- /* Not in table, just print it alone. */
- if (code < 127)
- fprintf (config.map_file, " %c ", code);
+ 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);
+ fprintf (config.map_file, "<code %d>", code);
+
+ if (infix_p)
+ fputc (' ', config.map_file);
}
static void
@@ -172,9 +193,22 @@ exp_intop (value)
etree_type *new = (etree_type *) stat_alloc (sizeof (new->value));
new->type.node_code = INT;
new->value.value = value;
+ new->value.str = NULL;
new->type.node_class = etree_value;
return new;
+}
+etree_type *
+exp_bigintop (value, str)
+ bfd_vma value;
+ char *str;
+{
+ etree_type *new = (etree_type *) stat_alloc (sizeof (new->value));
+ new->type.node_code = INT;
+ new->value.value = value;
+ new->value.str = str;
+ new->type.node_class = etree_value;
+ return new;
}
/* Build an expression representing an unnamed relocateable value. */
@@ -193,13 +227,15 @@ exp_relop (section, value)
}
static etree_value_type
-new_rel (value, section)
+new_rel (value, str, section)
bfd_vma value;
+ char *str;
lang_output_section_statement_type *section;
{
etree_value_type new;
new.valid_p = true;
new.value = value;
+ new.str = str;
new.section = section;
return new;
}
@@ -212,6 +248,7 @@ new_rel_from_section (value, section)
etree_value_type new;
new.valid_p = true;
new.value = value;
+ new.str = NULL;
new.section = section;
new.value -= section->bfd_section->vma;
@@ -220,6 +257,93 @@ new_rel_from_section (value, section)
}
static etree_value_type
+fold_unary (tree, current_section, allocation_done, dot, dotp)
+ etree_type *tree;
+ lang_output_section_statement_type *current_section;
+ lang_phase_type allocation_done;
+ bfd_vma dot;
+ bfd_vma *dotp;
+{
+ etree_value_type result;
+
+ result = exp_fold_tree (tree->unary.child,
+ current_section,
+ allocation_done, dot, dotp);
+ if (result.valid_p)
+ {
+ switch (tree->type.node_code)
+ {
+ case ALIGN_K:
+ if (allocation_done != lang_first_phase_enum)
+ result = new_rel_from_section (align_n (dot, result.value),
+ current_section);
+ else
+ result.valid_p = false;
+ break;
+
+ case ABSOLUTE:
+ if (allocation_done != lang_first_phase_enum)
+ {
+ result.value += result.section->bfd_section->vma;
+ result.section = abs_output_section;
+ }
+ else
+ result.valid_p = false;
+ break;
+
+ case '~':
+ make_abs (&result);
+ result.value = ~result.value;
+ break;
+
+ case '!':
+ make_abs (&result);
+ result.value = !result.value;
+ break;
+
+ case '-':
+ make_abs (&result);
+ result.value = -result.value;
+ break;
+
+ case NEXT:
+ /* Return next place aligned to value. */
+ if (allocation_done == lang_allocating_phase_enum)
+ {
+ make_abs (&result);
+ result.value = align_n (dot, result.value);
+ }
+ else
+ result.valid_p = false;
+ break;
+
+ case DATA_SEGMENT_END:
+ if (allocation_done != lang_first_phase_enum
+ && current_section == abs_output_section
+ && (exp_data_seg.phase == exp_dataseg_align_seen
+ || exp_data_seg.phase == exp_dataseg_adjust
+ || allocation_done != lang_allocating_phase_enum))
+ {
+ if (exp_data_seg.phase == exp_dataseg_align_seen)
+ {
+ exp_data_seg.phase = exp_dataseg_end_seen;
+ exp_data_seg.end = result.value;
+ }
+ }
+ else
+ result.valid_p = false;
+ break;
+
+ default:
+ FAIL ();
+ break;
+ }
+ }
+
+ return result;
+}
+
+static etree_value_type
fold_binary (tree, current_section, allocation_done, dot, dotp)
etree_type *tree;
lang_output_section_statement_type *current_section;
@@ -252,15 +376,14 @@ fold_binary (tree, current_section, allocation_done, dot, dotp)
&& (tree->type.node_code == '+'
|| tree->type.node_code == '-'))
{
- etree_value_type hold;
-
- /* If there is only one absolute term, make sure it is the
- second one. */
if (other.section != abs_output_section)
{
- hold = result;
- result = other;
- other = hold;
+ /* Keep the section of the other term. */
+ if (tree->type.node_code == '+')
+ other.value = result.value + other.value;
+ else
+ other.value = result.value - other.value;
+ return other;
}
}
else if (result.section != other.section
@@ -314,6 +437,34 @@ fold_binary (tree, current_section, allocation_done, dot, dotp)
result = other;
break;
+ case DATA_SEGMENT_ALIGN:
+ if (allocation_done != lang_first_phase_enum
+ && current_section == abs_output_section
+ && (exp_data_seg.phase == exp_dataseg_none
+ || exp_data_seg.phase == exp_dataseg_adjust
+ || allocation_done != lang_allocating_phase_enum))
+ {
+ bfd_vma maxpage = result.value;
+
+ result.value = align_n (dot, maxpage);
+ if (exp_data_seg.phase != exp_dataseg_adjust)
+ {
+ result.value += dot & (maxpage - 1);
+ if (allocation_done == lang_allocating_phase_enum)
+ {
+ exp_data_seg.phase = exp_dataseg_align_seen;
+ exp_data_seg.base = result.value;
+ exp_data_seg.pagesize = other.value;
+ }
+ }
+ else if (other.value < maxpage)
+ result.value += (dot + other.value - 1)
+ & (maxpage - other.value);
+ }
+ else
+ result.valid_p = false;
+ break;
+
default:
FAIL ();
}
@@ -327,6 +478,28 @@ fold_binary (tree, current_section, allocation_done, dot, dotp)
return result;
}
+static etree_value_type
+fold_trinary (tree, current_section, allocation_done, dot, dotp)
+ etree_type *tree;
+ lang_output_section_statement_type *current_section;
+ lang_phase_type allocation_done;
+ bfd_vma dot;
+ bfd_vma *dotp;
+{
+ etree_value_type result;
+
+ result = exp_fold_tree (tree->trinary.cond, current_section,
+ allocation_done, dot, dotp);
+ if (result.valid_p)
+ result = exp_fold_tree ((result.value
+ ? tree->trinary.lhs
+ : tree->trinary.rhs),
+ current_section,
+ allocation_done, dot, dotp);
+
+ return result;
+}
+
etree_value_type
invalid ()
{
@@ -419,6 +592,7 @@ fold_name (tree, current_section, allocation_done, dot)
being linked with -R? */
result = new_rel ((h->u.def.value
+ h->u.def.section->output_offset),
+ NULL,
os);
}
}
@@ -436,7 +610,7 @@ fold_name (tree, current_section, allocation_done, dot)
os = lang_output_section_find (tree->name.name);
check (os, tree->name.name, "ADDR");
- result = new_rel (0, os);
+ result = new_rel (0, NULL, os);
}
else
result = invalid ();
@@ -450,7 +624,7 @@ fold_name (tree, current_section, allocation_done, dot)
os = lang_output_section_find (tree->name.name);
check (os, tree->name.name, "LOADADDR");
if (os->load_base == NULL)
- result = new_rel (0, os);
+ result = new_rel (0, NULL, os);
else
result = exp_fold_tree_no_dot (os->load_base,
abs_output_section,
@@ -501,7 +675,7 @@ exp_fold_tree (tree, current_section, allocation_done, dot, dotp)
switch (tree->type.node_class)
{
case etree_value:
- result = new_rel (tree->value.value, current_section);
+ result = new_rel (tree->value.value, tree->value.str, current_section);
break;
case etree_rel:
@@ -511,6 +685,7 @@ exp_fold_tree (tree, current_section, allocation_done, dot, dotp)
result = new_rel ((tree->rel.value
+ tree->rel.section->output_section->vma
+ tree->rel.section->output_offset),
+ NULL,
current_section);
break;
@@ -527,73 +702,8 @@ exp_fold_tree (tree, current_section, allocation_done, dot, dotp)
break;
case etree_unary:
- result = exp_fold_tree (tree->unary.child,
- current_section,
- allocation_done, dot, dotp);
- if (result.valid_p)
- {
- switch (tree->type.node_code)
- {
- case ALIGN_K:
- if (allocation_done != lang_first_phase_enum)
- result = new_rel_from_section (ALIGN_N (dot, result.value),
- current_section);
- else
- result.valid_p = false;
- break;
-
- case ABSOLUTE:
- if (allocation_done != lang_first_phase_enum && result.valid_p)
- {
- result.value += result.section->bfd_section->vma;
- result.section = abs_output_section;
- }
- else
- result.valid_p = false;
- break;
-
- case '~':
- make_abs (&result);
- result.value = ~result.value;
- break;
-
- case '!':
- make_abs (&result);
- result.value = !result.value;
- break;
-
- case '-':
- make_abs (&result);
- result.value = -result.value;
- break;
-
- case NEXT:
- /* Return next place aligned to value. */
- if (allocation_done == lang_allocating_phase_enum)
- {
- make_abs (&result);
- result.value = ALIGN_N (dot, result.value);
- }
- else
- result.valid_p = false;
- break;
-
- default:
- FAIL ();
- break;
- }
- }
- break;
-
- case etree_trinary:
- result = exp_fold_tree (tree->trinary.cond, current_section,
- allocation_done, dot, dotp);
- if (result.valid_p)
- result = exp_fold_tree ((result.value
- ? tree->trinary.lhs
- : tree->trinary.rhs),
- current_section,
- allocation_done, dot, dotp);
+ result = fold_unary (tree, current_section, allocation_done,
+ dot, dotp);
break;
case etree_binary:
@@ -601,6 +711,11 @@ exp_fold_tree (tree, current_section, allocation_done, dot, dotp)
dot, dotp);
break;
+ case etree_trinary:
+ result = fold_trinary (tree, current_section, allocation_done,
+ dot, dotp);
+ break;
+
case etree_assign:
case etree_provide:
case etree_provided:
@@ -615,7 +730,7 @@ exp_fold_tree (tree, current_section, allocation_done, dot, dotp)
{
result = exp_fold_tree (tree->assign.src,
current_section,
- lang_allocating_phase_enum, dot,
+ allocation_done, dot,
dotp);
if (! result.valid_p)
einfo (_("%F%S invalid assignment to location counter\n"));
@@ -778,7 +893,7 @@ exp_unop (code, child)
etree_type *
exp_nameop (code, name)
int code;
- CONST char *name;
+ const char *name;
{
etree_type value, *new;
etree_value_type r;
@@ -801,7 +916,7 @@ exp_nameop (code, name)
etree_type *
exp_assop (code, dst, src)
int code;
- CONST char *dst;
+ const char *dst;
etree_type *src;
{
etree_type value, *new;
@@ -861,13 +976,13 @@ exp_print_tree (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:
@@ -887,7 +1002,7 @@ exp_print_tree (tree)
fprintf (config.map_file, "%s (UNDEFINED)", tree->assign.dst->name);
#endif
fprintf (config.map_file, "%s", tree->assign.dst);
- exp_print_token (tree->type.node_code);
+ exp_print_token (tree->type.node_code, true);
exp_print_tree (tree->assign.src);
break;
case etree_provide:
@@ -899,7 +1014,7 @@ exp_print_tree (tree)
case etree_binary:
fprintf (config.map_file, "(");
exp_print_tree (tree->binary.lhs);
- exp_print_token (tree->type.node_code);
+ exp_print_token (tree->type.node_code, true);
exp_print_tree (tree->binary.rhs);
fprintf (config.map_file, ")");
break;
@@ -911,10 +1026,10 @@ exp_print_tree (tree)
exp_print_tree (tree->trinary.rhs);
break;
case etree_unary:
- exp_print_token (tree->unary.type.node_code);
+ exp_print_token (tree->unary.type.node_code, false);
if (tree->unary.child)
{
- fprintf (config.map_file, "(");
+ fprintf (config.map_file, " (");
exp_print_tree (tree->unary.child);
fprintf (config.map_file, ")");
}
@@ -936,9 +1051,9 @@ exp_print_tree (tree)
}
else
{
- exp_print_token (tree->type.node_code);
+ exp_print_token (tree->type.node_code, false);
if (tree->name.name)
- fprintf (config.map_file, "(%s)", tree->name.name);
+ fprintf (config.map_file, " (%s)", tree->name.name);
}
break;
default:
@@ -977,6 +1092,65 @@ exp_get_value_int (tree, def, name, allocation_done)
return (int) exp_get_vma (tree, (bfd_vma) def, name, allocation_done);
}
+fill_type *
+exp_get_fill (tree, def, name, allocation_done)
+ etree_type *tree;
+ fill_type *def;
+ char *name;
+ lang_phase_type allocation_done;
+{
+ fill_type *fill;
+ etree_value_type r;
+ size_t len;
+ unsigned int val;
+
+ if (tree == NULL)
+ return def;
+
+ r = exp_fold_tree_no_dot (tree, abs_output_section, allocation_done);
+ if (! r.valid_p && name != NULL)
+ einfo (_("%F%S nonconstant expression for %s\n"), name);
+
+ if (r.str != NULL && (len = strlen (r.str)) != 0)
+ {
+ unsigned char *dst;
+ unsigned char *s;
+ fill = (fill_type *) xmalloc ((len + 1) / 2 + sizeof (*fill) - 1);
+ fill->size = (len + 1) / 2;
+ dst = fill->data;
+ s = r.str;
+ val = 0;
+ do
+ {
+ unsigned int digit;
+
+ digit = *s++ - '0';
+ if (digit > 9)
+ digit = (digit - 'A' + '0' + 10) & 0xf;
+ val <<= 4;
+ val += digit;
+ --len;
+ if ((len & 1) == 0)
+ {
+ *dst++ = val;
+ val = 0;
+ }
+ }
+ while (len != 0);
+ }
+ else
+ {
+ fill = (fill_type *) xmalloc (4 + sizeof (*fill) - 1);
+ val = r.value;
+ fill->data[0] = (val >> 24) & 0xff;
+ fill->data[1] = (val >> 16) & 0xff;
+ fill->data[2] = (val >> 8) & 0xff;
+ fill->data[3] = (val >> 0) & 0xff;
+ fill->size = 4;
+ }
+ return fill;
+}
+
bfd_vma
exp_get_abs_int (tree, def, name, allocation_done)
etree_type *tree;
@@ -994,3 +1168,14 @@ exp_get_abs_int (tree, def, name, allocation_done)
return res.value;
}
+
+bfd_vma align_n (value, align)
+ 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
index 36f88f8..3f3508e 100644
--- a/contrib/binutils/ld/ldexp.h
+++ b/contrib/binutils/ld/ldexp.h
@@ -1,5 +1,5 @@
/* ldexp.h -
- Copyright 1991, 1992, 1993, 1994, 1995, 1998, 1999, 2000, 2001
+ Copyright 1991, 1992, 1993, 1994, 1995, 1998, 1999, 2000, 2001, 2002
Free Software Foundation, Inc.
This file is part of GLD, the Gnu Linker.
@@ -25,6 +25,7 @@
/* The result of an expression tree */
typedef struct {
bfd_vma value;
+ char *str;
struct lang_output_section_statement_struct *section;
boolean valid_p;
} etree_value_type;
@@ -60,21 +61,21 @@ typedef union etree_union {
} trinary;
struct {
node_type type;
- CONST char *dst;
+ const char *dst;
union etree_union *src;
} assign;
-
struct {
node_type type;
union etree_union *child;
} unary;
struct {
node_type type;
- CONST char *name;
+ const char *name;
} name;
struct {
node_type type;
bfd_vma value;
+ char *str;
} value;
struct {
node_type type;
@@ -88,7 +89,20 @@ typedef union etree_union {
} assert_s;
} etree_type;
+extern struct exp_data_seg {
+ enum {
+ exp_dataseg_none,
+ exp_dataseg_align_seen,
+ exp_dataseg_end_seen,
+ exp_dataseg_adjust
+ } phase;
+ bfd_vma base, end, pagesize;
+} exp_data_seg;
+
+typedef struct _fill_type fill_type;
+
etree_type *exp_intop PARAMS ((bfd_vma));
+etree_type *exp_bigintop PARAMS ((bfd_vma, char *));
etree_type *exp_relop PARAMS ((asection *, bfd_vma));
etree_value_type invalid PARAMS ((void));
etree_value_type exp_fold_tree PARAMS ((etree_type *, struct
@@ -98,13 +112,16 @@ etree_value_type exp_fold_tree PARAMS ((etree_type *, struct
etree_type *exp_binop PARAMS ((int, etree_type *, etree_type *));
etree_type *exp_trinop PARAMS ((int,etree_type *, etree_type *, etree_type *));
etree_type *exp_unop PARAMS ((int, etree_type *));
-etree_type *exp_nameop PARAMS ((int, CONST char *));
-etree_type *exp_assop PARAMS ((int, CONST char *, etree_type *));
+etree_type *exp_nameop PARAMS ((int, const char *));
+etree_type *exp_assop PARAMS ((int, const char *, etree_type *));
etree_type *exp_provide PARAMS ((const char *, etree_type *));
etree_type *exp_assert PARAMS ((etree_type *, const char *));
void exp_print_tree PARAMS ((etree_type *));
bfd_vma exp_get_vma PARAMS ((etree_type *, bfd_vma, char *, lang_phase_type));
int exp_get_value_int PARAMS ((etree_type *, int, char *, lang_phase_type));
+fill_type *exp_get_fill PARAMS ((etree_type *, fill_type *, char *,
+ lang_phase_type));
bfd_vma exp_get_abs_int PARAMS ((etree_type *, int, char *, lang_phase_type));
+bfd_vma align_n PARAMS ((bfd_vma, bfd_vma));
#endif
diff --git a/contrib/binutils/ld/ldfile.c b/contrib/binutils/ld/ldfile.c
index 655ee60..9fb2b2d 100644
--- a/contrib/binutils/ld/ldfile.c
+++ b/contrib/binutils/ld/ldfile.c
@@ -1,5 +1,5 @@
/* Linker file opening and searching.
- Copyright 1991, 1992, 1993, 1994, 1995, 1998, 1999, 2000, 2001
+ Copyright 1991, 1992, 1993, 1994, 1995, 1998, 1999, 2000, 2001, 2002
Free Software Foundation, Inc.
This file is part of GLD, the Gnu Linker.
@@ -132,7 +132,12 @@ ldfile_try_open_bfd (attempt, entry)
{
if (! bfd_check_format (check, bfd_object))
return true;
- if (bfd_arch_get_compatible (check, output_bfd) == NULL)
+
+ if ((bfd_arch_get_compatible (check, output_bfd) == NULL)
+ /* XCOFF archives can have 32 and 64 bit objects */
+ && ! (bfd_get_flavour (check) == bfd_target_xcoff_flavour
+ && bfd_get_flavour (output_bfd) == bfd_target_xcoff_flavour
+ && bfd_check_format (entry->the_bfd, bfd_archive)))
{
einfo (_("%P: skipping incompatible %s when searching for %s\n"),
attempt, entry->local_sym_name);
@@ -352,7 +357,7 @@ ldfile_open_command_file (name)
ldfile_input_filename = name;
lineno = 1;
-
+
saved_script_handle = ldlex_input_stack;
}
@@ -416,7 +421,7 @@ ldfile_add_arch (name)
void
ldfile_add_arch (in_name)
- CONST char *in_name;
+ const char *in_name;
{
char *name = xstrdup (in_name);
search_arch_type *new =
@@ -441,7 +446,7 @@ ldfile_add_arch (in_name)
void
ldfile_set_output_arch (string)
- CONST char *string;
+ const char *string;
{
const bfd_arch_info_type *arch = bfd_scan_arch (string);
diff --git a/contrib/binutils/ld/ldfile.h b/contrib/binutils/ld/ldfile.h
index ce822e7d..11a4232 100644
--- a/contrib/binutils/ld/ldfile.h
+++ b/contrib/binutils/ld/ldfile.h
@@ -1,5 +1,5 @@
/* ldfile.h -
- Copyright 1991, 1992, 1993, 1994, 1995, 2000
+ Copyright 1991, 1992, 1993, 1994, 1995, 2000, 2002
Free Software Foundation, Inc.
This file is part of GLD, the Gnu Linker.
@@ -41,7 +41,7 @@ typedef struct search_dirs {
extern search_dirs_type *search_head;
-extern void ldfile_add_arch PARAMS ((CONST char *));
+extern void ldfile_add_arch PARAMS ((const char *));
extern void ldfile_add_library_path PARAMS ((const char *, boolean cmdline));
extern void ldfile_open_command_file PARAMS ((const char *name));
extern void ldfile_open_file PARAMS ((struct lang_input_statement_struct *));
@@ -49,7 +49,7 @@ extern boolean ldfile_try_open_bfd
PARAMS ((const char *, struct lang_input_statement_struct *));
extern FILE *ldfile_find_command_file
PARAMS ((const char *name, const char *extend));
-extern void ldfile_set_output_arch PARAMS ((CONST char *));
+extern void ldfile_set_output_arch PARAMS ((const char *));
extern boolean ldfile_open_file_search
PARAMS ((const char *arch, struct lang_input_statement_struct *,
const char *lib, const char *suffix));
diff --git a/contrib/binutils/ld/ldgram.y b/contrib/binutils/ld/ldgram.y
index 22dc1a8..3de9326 100644
--- a/contrib/binutils/ld/ldgram.y
+++ b/contrib/binutils/ld/ldgram.y
@@ -1,6 +1,6 @@
/* 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 Free Software Foundation, Inc.
+ 2001, 2002 Free Software Foundation, Inc.
Written by Steve Chamberlain of Cygnus Support (steve@cygnus.com).
This file is part of GNU ld.
@@ -66,6 +66,12 @@ static int 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;
@@ -89,14 +95,14 @@ static int error_index;
%type <etree> exp opt_exp_with_type mustbe_exp opt_at phdr_type phdr_val
%type <etree> opt_exp_without_type
-%type <integer> fill_opt
+%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 <integer> INT
+%token <bigint> INT
%token <name> NAME LNAME
%type <integer> length
%type <phdr> phdr_qualifiers
@@ -122,7 +128,7 @@ static int error_index;
%token END
%left <token> '('
%token <token> ALIGN_K BLOCK BIND QUAD SQUAD LONG SHORT BYTE
-%token SECTIONS PHDRS SORT
+%token SECTIONS PHDRS SORT DATA_SEGMENT_ALIGN DATA_SEGMENT_END
%token '{' '}'
%token SIZEOF_HEADERS OUTPUT_FORMAT FORCE_COMMON_ALLOCATION OUTPUT_ARCH
%token INHIBIT_COMMON_ALLOCATION
@@ -170,6 +176,7 @@ defsym_expr:
ldlex_popstate();
lang_add_assignment(exp_assop($3,$2,$4));
}
+ ;
/* SYNTAX WITHIN AN MRI SCRIPT FILE */
mri_script_file:
@@ -230,11 +237,11 @@ mri_script_command:
| ALIAS NAME ',' NAME
{ mri_alias($2,$4,0);}
| ALIAS NAME ',' INT
- { mri_alias($2,0,(int) $4);}
+ { mri_alias ($2, 0, (int) $4.integer); }
| BASE exp
{ mri_base($2); }
- | TRUNCATE INT
- { mri_truncate((unsigned int) $2); }
+ | TRUNCATE INT
+ { mri_truncate ((unsigned int) $2.integer); }
| CASE casesymlist
| EXTERN extern_name_list
| INCLUDE filename
@@ -512,16 +519,12 @@ statement:
| input_section_spec
| length '(' mustbe_exp ')'
{
- lang_add_data((int) $1,$3);
+ lang_add_data ((int) $1, $3);
}
- | FILL '(' mustbe_exp ')'
+ | FILL '(' fill_exp ')'
{
- lang_add_fill
- (exp_get_value_int($3,
- 0,
- "fill value",
- lang_first_phase_enum));
+ lang_add_fill ($3);
}
;
@@ -548,18 +551,21 @@ length:
{ $$ = $1; }
;
-fill_opt:
- '=' mustbe_exp
+fill_exp:
+ mustbe_exp
{
- $$ = exp_get_value_int($2,
- 0,
- "fill value",
- lang_first_phase_enum);
+ $$ = exp_get_fill ($1,
+ 0,
+ "fill value",
+ lang_first_phase_enum);
}
- | { $$ = 0; }
;
-
+fill_opt:
+ '=' fill_exp
+ { $$ = $2; }
+ | { $$ = (fill_type *) 0; }
+ ;
assign_op:
PLUSEQ
@@ -781,7 +787,7 @@ exp :
| DEFINED '(' NAME ')'
{ $$ = exp_nameop(DEFINED, $3); }
| INT
- { $$ = exp_intop($1); }
+ { $$ = exp_bigintop ($1.integer, $1.str); }
| SIZEOF_HEADERS
{ $$ = exp_nameop(SIZEOF_HEADERS,0); }
@@ -795,6 +801,10 @@ exp :
{ $$ = exp_unop(ABSOLUTE, $3); }
| ALIGN_K '(' exp ')'
{ $$ = exp_unop(ALIGN_K,$3); }
+ | DATA_SEGMENT_ALIGN '(' exp ',' exp ')'
+ { $$ = exp_binop (DATA_SEGMENT_ALIGN, $3, $5); }
+ | DATA_SEGMENT_END '(' exp ')'
+ { $$ = exp_unop(DATA_SEGMENT_END, $3); }
| BLOCK '(' exp ')'
{ $$ = exp_unop(ALIGN_K,$3); }
| NAME
@@ -810,7 +820,7 @@ exp :
memspec_at_opt:
AT '>' NAME { $$ = $3; }
- | { $$ = "*default*"; }
+ | { $$ = 0; }
;
opt_at:
@@ -841,7 +851,7 @@ section: NAME { ldlex_expression(); }
{ ldlex_popstate (); ldlex_script (); }
'{'
{
- lang_enter_overlay ($3, $5, (int) $4);
+ lang_enter_overlay ($3);
}
overlay_section
'}'
@@ -849,7 +859,8 @@ section: NAME { ldlex_expression(); }
memspec_opt memspec_at_opt phdr_opt fill_opt
{
ldlex_popstate ();
- lang_leave_overlay ($15, $12, $14, $13);
+ lang_leave_overlay ($5, (int) $4,
+ $15, $12, $14, $13);
}
opt_comma
| /* The GROUP case is just enough to support the gcc
diff --git a/contrib/binutils/ld/ldlang.c b/contrib/binutils/ld/ldlang.c
index 9d33248..79de098 100644
--- a/contrib/binutils/ld/ldlang.c
+++ b/contrib/binutils/ld/ldlang.c
@@ -29,9 +29,9 @@ Software Foundation, 59 Temple Place - Suite 330, Boston, MA
#include "ld.h"
#include "ldmain.h"
-#include "ldgram.h"
#include "ldexp.h"
#include "ldlang.h"
+#include "ldgram.h"
#include "ldlex.h"
#include "ldmisc.h"
#include "ldctor.h"
@@ -97,6 +97,7 @@ static void lang_place_undefineds PARAMS ((void));
static void map_input_to_output_sections
PARAMS ((lang_statement_union_type *, const char *,
lang_output_section_statement_type *));
+static void strip_excluded_output_sections PARAMS ((void));
static void print_output_section_statement
PARAMS ((lang_output_section_statement_type *));
static void print_assignment
@@ -120,11 +121,11 @@ static void print_statement_list
PARAMS ((lang_statement_union_type *, lang_output_section_statement_type *));
static void print_statements PARAMS ((void));
static void insert_pad
- PARAMS ((lang_statement_union_type **, fill_type,
+ PARAMS ((lang_statement_union_type **, fill_type *,
unsigned int, asection *, bfd_vma));
static bfd_vma size_input_section
PARAMS ((lang_statement_union_type **, lang_output_section_statement_type *,
- fill_type, bfd_vma));
+ fill_type *, bfd_vma));
static void lang_finish PARAMS ((void));
static void ignore_bfd_errors PARAMS ((const char *, ...));
static void lang_check PARAMS ((void));
@@ -136,6 +137,9 @@ static void lang_set_startof PARAMS ((void));
static void gc_section_callback
PARAMS ((lang_wild_statement_type *, struct wildcard_list *, asection *,
lang_input_statement_type *, PTR));
+static void lang_get_regions PARAMS ((struct memory_region_struct **,
+ struct memory_region_struct **,
+ const char *, const char *, int));
static void lang_record_phdrs PARAMS ((void));
static void lang_gc_wild PARAMS ((lang_wild_statement_type *));
static void lang_gc_sections_1 PARAMS ((lang_statement_union_type *));
@@ -151,6 +155,9 @@ static void lang_check_section_addresses PARAMS ((void));
static void os_region_check
PARAMS ((lang_output_section_statement_type *,
struct memory_region_struct *, etree_type *, bfd_vma));
+static bfd_vma lang_size_sections_1
+ PARAMS ((lang_statement_union_type *, lang_output_section_statement_type *,
+ lang_statement_union_type **, fill_type *, bfd_vma, boolean *));
typedef void (*callback_t) PARAMS ((lang_wild_statement_type *,
struct wildcard_list *,
@@ -178,7 +185,7 @@ 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 };
-const char *entry_symbol = NULL;
+struct bfd_sym_chain entry_symbol = { NULL, NULL };
const char *entry_section = ".text";
boolean entry_from_cmdline;
boolean lang_has_input_file = false;
@@ -614,6 +621,10 @@ lang_memory_region_lookup (name)
{
lang_memory_region_type *p;
+ /* NAME is NULL for LMA memspecs if no region was specified. */
+ if (name == NULL)
+ return NULL;
+
for (p = lang_memory_region_list;
p != (lang_memory_region_type *) NULL;
p = p->next)
@@ -719,7 +730,7 @@ lang_output_section_statement_lookup (name)
new_stat (lang_output_section_statement, stat_ptr);
lookup->region = (lang_memory_region_type *) NULL;
lookup->lma_region = (lang_memory_region_type *) NULL;
- lookup->fill = 0;
+ lookup->fill = (fill_type *) 0;
lookup->block_value = 1;
lookup->name = name;
@@ -735,6 +746,7 @@ lang_output_section_statement_lookup (name)
lookup->subsection_alignment = -1;
lookup->section_alignment = -1;
lookup->load_base = (union etree_union *) NULL;
+ lookup->update_dot_tree = NULL;
lookup->phdrs = NULL;
lang_statement_append (&lang_output_section_statement,
@@ -951,8 +963,7 @@ section_already_linked (abfd, sec, data)
discard all sections. */
if (entry->just_syms_flag)
{
- sec->output_section = bfd_abs_section_ptr;
- sec->output_offset = sec->vma;
+ bfd_link_just_syms (sec, &link_info);
return;
}
@@ -975,7 +986,7 @@ section_already_linked (abfd, sec, data)
of having link once sections in the first place.
Also, not merging link once sections in a relocatable link
- causes trouble for MIPS ELF, which relies in link once semantics
+ causes trouble for MIPS ELF, which relies on link once semantics
to handle the .reginfo section correctly. */
name = bfd_get_section_name (abfd, sec);
@@ -1029,6 +1040,9 @@ section_already_linked (abfd, sec, data)
section. */
sec->output_section = bfd_abs_section_ptr;
+ if (flags & SEC_GROUP)
+ bfd_discard_group (abfd, sec);
+
return;
}
}
@@ -1203,6 +1217,10 @@ lang_add_section (ptr, section, output, file)
flags &= ~ (SEC_MERGE | SEC_STRINGS);
}
+ /* For now make .tbss normal section. */
+ if ((flags & SEC_THREAD_LOCAL) && ! link_info.relocateable)
+ flags |= SEC_LOAD;
+
section->output_section->flags |= flags;
if (flags & SEC_MERGE)
@@ -1471,7 +1489,7 @@ load_symbols (entry, place)
bfd_error_type err;
lang_statement_list_type *hold;
boolean bad_load = true;
-
+
err = bfd_get_error ();
/* See if the emulation has some special knowledge. */
@@ -1493,7 +1511,7 @@ load_symbols (entry, place)
einfo (_("%F%B: file not recognized: %E\n"), entry->the_bfd);
else
bad_load = false;
-
+
bfd_close (entry->the_bfd);
entry->the_bfd = NULL;
@@ -1534,7 +1552,7 @@ load_symbols (entry, place)
case bfd_archive:
if (entry->whole_archive)
{
- bfd * member = NULL;
+ bfd *member = NULL;
boolean loaded = true;
for (;;)
@@ -1543,7 +1561,7 @@ load_symbols (entry, place)
if (member == NULL)
break;
-
+
if (! bfd_check_format (member, bfd_object))
{
einfo (_("%F%B: member %B in archive is not an object\n"),
@@ -1599,7 +1617,7 @@ wild (s, target, output)
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. */
+ later get something which doesn't know where to put it. */
default_common_section = output;
}
}
@@ -2013,13 +2031,9 @@ lang_reasonable_defaults ()
on a list, then, once the output file has been opened, transfer the
name to the symbol table. */
-typedef struct ldlang_undef_chain_list
-{
- struct ldlang_undef_chain_list *next;
- char *name;
-} ldlang_undef_chain_list_type;
+typedef struct bfd_sym_chain ldlang_undef_chain_list_type;
-static ldlang_undef_chain_list_type *ldlang_undef_chain_list_head;
+#define ldlang_undef_chain_list_head entry_symbol.next
void
ldlang_add_undef (name)
@@ -2148,6 +2162,41 @@ map_input_to_output_sections (s, target, output_section_statement)
}
}
+/* An output section might have been removed after its statement was
+ added. For example, ldemul_before_allocation can remove dynamic
+ sections if they turn out to be not needed. Clean them up here. */
+
+static void
+strip_excluded_output_sections ()
+{
+ lang_statement_union_type *u;
+
+ for (u = lang_output_section_statement.head;
+ u != NULL;
+ u = u->output_section_statement.next)
+ {
+ lang_output_section_statement_type *os;
+ asection *s;
+
+ os = &u->output_section_statement;
+ s = os->bfd_section;
+ if (s != NULL && (s->flags & SEC_EXCLUDE) != 0)
+ {
+ asection **p;
+
+ os->bfd_section = NULL;
+
+ for (p = &output_bfd->sections; *p; p = &(*p)->next)
+ if (*p == s)
+ {
+ bfd_section_list_remove (output_bfd, p);
+ output_bfd->section_count--;
+ break;
+ }
+ }
+ }
+}
+
static void
print_output_section_statement (output_section_statement)
lang_output_section_statement_type *output_section_statement;
@@ -2208,7 +2257,17 @@ print_assignment (assignment, output_section)
result = exp_fold_tree (assignment->exp->assign.src, output_section,
lang_final_phase_enum, print_dot, &print_dot);
if (result.valid_p)
- minfo ("0x%V", result.value + result.section->bfd_section->vma);
+ {
+ const char *dst;
+ bfd_vma value;
+
+ value = result.value + result.section->bfd_section->vma;
+ dst = assignment->exp->assign.dst;
+
+ minfo ("0x%V", value);
+ if (dst[0] == '.' && dst[1] == 0)
+ print_dot = value;
+ }
else
{
minfo ("*undef* ");
@@ -2327,7 +2386,12 @@ static void
print_fill_statement (fill)
lang_fill_statement_type *fill;
{
- fprintf (config.map_file, " FILL mask 0x%x\n", fill->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
@@ -2456,10 +2520,15 @@ print_padding_statement (s)
addr = s->output_offset;
if (s->output_section != NULL)
addr += s->output_section->vma;
- minfo ("0x%V %W", addr, s->size);
+ minfo ("0x%V %W ", addr, s->size);
- if (s->fill != 0)
- minfo (" %u", s->fill);
+ 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 ();
@@ -2652,11 +2721,12 @@ dprint_statement (s, n)
static void
insert_pad (ptr, fill, alignment_needed, output_section, dot)
lang_statement_union_type **ptr;
- fill_type fill;
+ fill_type *fill;
unsigned int alignment_needed;
asection *output_section;
bfd_vma dot;
{
+ static fill_type zero_fill = { 1, { 0 } };
lang_statement_union_type *pad;
pad = ((lang_statement_union_type *)
@@ -2677,6 +2747,8 @@ insert_pad (ptr, fill, alignment_needed, output_section, dot)
*ptr = pad;
pad->header.type = lang_padding_statement_enum;
pad->padding_statement.output_section = output_section;
+ if (fill == (fill_type *) 0)
+ fill = &zero_fill;
pad->padding_statement.fill = fill;
}
pad->padding_statement.output_offset = dot - output_section->vma;
@@ -2690,7 +2762,7 @@ static bfd_vma
size_input_section (this_ptr, output_section_statement, fill, dot)
lang_statement_union_type **this_ptr;
lang_output_section_statement_type *output_section_statement;
- fill_type fill;
+ fill_type *fill;
bfd_vma dot;
{
lang_input_section_type *is = &((*this_ptr)->input_section);
@@ -2818,23 +2890,23 @@ os_region_check (os, region, tree, base)
if ((region->current < region->origin
|| (region->current - region->origin > region->length))
&& ((region->current != region->origin + region->length)
- || base == 0))
+ || base == 0))
{
if (tree != (etree_type *) 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);
- }
+ {
+ 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);
- }
+ {
+ 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;
}
@@ -2842,12 +2914,12 @@ os_region_check (os, region, tree, base)
/* Set the sizes for all the output sections. */
-bfd_vma
-lang_size_sections (s, output_section_statement, prev, fill, dot, relax)
+static bfd_vma
+lang_size_sections_1 (s, output_section_statement, prev, fill, dot, relax)
lang_statement_union_type *s;
lang_output_section_statement_type *output_section_statement;
lang_statement_union_type **prev;
- fill_type fill;
+ fill_type *fill;
bfd_vma dot;
boolean *relax;
{
@@ -2970,24 +3042,32 @@ lang_size_sections (s, output_section_statement, prev, fill, dot, relax)
os->bfd_section->output_offset = 0;
}
- lang_size_sections (os->children.head, os, &os->children.head,
- os->fill, dot, relax);
+ lang_size_sections_1 (os->children.head, os, &os->children.head,
+ os->fill, dot, relax);
/* Put the section within the requested block size, or
align at the block boundary. */
- after = ALIGN_N (os->bfd_section->vma
+ after = align_n (os->bfd_section->vma
+ os->bfd_section->_raw_size / opb,
- /* The coercion here is important, see ld.h. */
(bfd_vma) os->block_value);
if (bfd_is_abs_section (os->bfd_section))
ASSERT (after == os->bfd_section->vma);
+ else if ((os->bfd_section->flags & SEC_HAS_CONTENTS) == 0
+ && (os->bfd_section->flags & SEC_THREAD_LOCAL)
+ && ! link_info.relocateable)
+ os->bfd_section->_raw_size = 0;
else
os->bfd_section->_raw_size =
(after - os->bfd_section->vma) * opb;
+
dot = os->bfd_section->vma + os->bfd_section->_raw_size / opb;
os->processed = true;
+ if (os->update_dot_tree != 0)
+ exp_fold_tree (os->update_dot_tree, abs_output_section,
+ lang_allocating_phase_enum, dot, &dot);
+
/* Update dot in the region ?
We only do this if the section is going to be allocated,
since unallocated sections do not contribute to the region's
@@ -3013,36 +3093,24 @@ lang_size_sections (s, output_section_statement, prev, fill, dot, relax)
if (os->lma_region == NULL && os->load_base == NULL)
os->lma_region = os->region;
- if (os->lma_region != NULL)
+ if (os->lma_region != NULL && os->lma_region != os->region)
{
- if (os->load_base != NULL)
- {
- einfo (_("%X%P: use an absolute load address or a load memory region, not both\n"));
- }
- else
- {
- /* Don't allocate twice. */
- if (os->lma_region != os->region)
- {
- /* Set load_base, which will be handled later. */
- os->load_base =
- exp_intop (os->lma_region->current);
- os->lma_region->current +=
- os->bfd_section->_raw_size / opb;
- os_region_check (os, os->lma_region, NULL,
- os->bfd_section->lma);
- }
- }
+ /* Set load_base, which will be handled later. */
+ os->load_base = exp_intop (os->lma_region->current);
+ os->lma_region->current +=
+ os->bfd_section->_raw_size / opb;
+ os_region_check (os, os->lma_region, NULL,
+ os->bfd_section->lma);
}
}
}
break;
case lang_constructors_statement_enum:
- dot = lang_size_sections (constructor_list.head,
- output_section_statement,
- &s->wild_statement.children.head,
- fill, dot, relax);
+ dot = lang_size_sections_1 (constructor_list.head,
+ output_section_statement,
+ &s->wild_statement.children.head,
+ fill, dot, relax);
break;
case lang_data_statement_enum:
@@ -3103,10 +3171,10 @@ lang_size_sections (s, output_section_statement, prev, fill, dot, relax)
case lang_wild_statement_enum:
- dot = lang_size_sections (s->wild_statement.children.head,
- output_section_statement,
- &s->wild_statement.children.head,
- fill, dot, relax);
+ dot = lang_size_sections_1 (s->wild_statement.children.head,
+ output_section_statement,
+ &s->wild_statement.children.head,
+ fill, dot, relax);
break;
@@ -3201,10 +3269,10 @@ lang_size_sections (s, output_section_statement, prev, fill, dot, relax)
break;
case lang_group_statement_enum:
- dot = lang_size_sections (s->group_statement.children.head,
- output_section_statement,
- &s->group_statement.children.head,
- fill, dot, relax);
+ dot = lang_size_sections_1 (s->group_statement.children.head,
+ output_section_statement,
+ &s->group_statement.children.head,
+ fill, dot, relax);
break;
default:
@@ -3221,10 +3289,46 @@ lang_size_sections (s, output_section_statement, prev, fill, dot, relax)
}
bfd_vma
+lang_size_sections (s, output_section_statement, prev, fill, dot, relax)
+ lang_statement_union_type *s;
+ lang_output_section_statement_type *output_section_statement;
+ lang_statement_union_type **prev;
+ fill_type *fill;
+ bfd_vma dot;
+ boolean *relax;
+{
+ bfd_vma result;
+
+ exp_data_seg.phase = exp_dataseg_none;
+ result = lang_size_sections_1 (s, output_section_statement, prev, fill,
+ dot, relax);
+ if (exp_data_seg.phase == exp_dataseg_end_seen)
+ {
+ /* If DATA_SEGMENT_ALIGN DATA_SEGMENT_END pair was seen, check whether
+ a page could be saved in the data segment. */
+ bfd_vma first, last;
+
+ first = -exp_data_seg.base & (exp_data_seg.pagesize - 1);
+ last = exp_data_seg.end & (exp_data_seg.pagesize - 1);
+ if (first && last
+ && ((exp_data_seg.base & ~(exp_data_seg.pagesize - 1))
+ != (exp_data_seg.end & ~(exp_data_seg.pagesize - 1)))
+ && first + last <= exp_data_seg.pagesize)
+ {
+ exp_data_seg.phase = exp_dataseg_adjust;
+ result = lang_size_sections_1 (s, output_section_statement, prev,
+ fill, dot, relax);
+ }
+ }
+
+ return result;
+}
+
+bfd_vma
lang_do_assignments (s, output_section_statement, fill, dot)
lang_statement_union_type *s;
lang_output_section_statement_type *output_section_statement;
- fill_type fill;
+ fill_type *fill;
bfd_vma dot;
{
unsigned opb = bfd_arch_mach_octets_per_byte (ldfile_output_architecture,
@@ -3293,8 +3397,8 @@ lang_do_assignments (s, output_section_statement, fill, dot)
if (value.valid_p == false)
einfo (_("%F%P: invalid data statement\n"));
}
- {
- unsigned int size;
+ {
+ unsigned int size;
switch (s->data_statement.type)
{
default:
@@ -3418,9 +3522,9 @@ lang_set_startof ()
h = bfd_link_hash_lookup (link_info.hash, buf, false, false, true);
if (h != NULL && h->type == bfd_link_hash_undefined)
{
- unsigned opb;
+ unsigned opb;
- opb = bfd_arch_mach_octets_per_byte (ldfile_output_architecture,
+ opb = bfd_arch_mach_octets_per_byte (ldfile_output_architecture,
ldfile_output_machine);
h->type = bfd_link_hash_defined;
if (s->_cooked_size != 0)
@@ -3445,15 +3549,16 @@ lang_finish ()
else
warn = true;
- if (entry_symbol == (char *) NULL)
+ if (entry_symbol.name == (const char *) NULL)
{
/* No entry has been specified. Look for start, but don't warn
if we don't find it. */
- entry_symbol = "start";
+ entry_symbol.name = "start";
warn = false;
}
- h = bfd_link_hash_lookup (link_info.hash, entry_symbol, false, false, true);
+ h = bfd_link_hash_lookup (link_info.hash, entry_symbol.name,
+ false, false, true);
if (h != (struct bfd_link_hash_entry *) NULL
&& (h->type == bfd_link_hash_defined
|| h->type == bfd_link_hash_defweak)
@@ -3466,7 +3571,7 @@ lang_finish ()
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);
+ einfo (_("%P%F:%s: can't set start address\n"), entry_symbol.name);
}
else
{
@@ -3475,7 +3580,7 @@ lang_finish ()
/* We couldn't find the entry symbol. Try parsing it as a
number. */
- val = bfd_scan_vma (entry_symbol, &send, 0);
+ val = bfd_scan_vma (entry_symbol.name, &send, 0);
if (*send == '\0')
{
if (! bfd_set_start_address (output_bfd, val))
@@ -3492,7 +3597,8 @@ lang_finish ()
{
if (warn)
einfo (_("%P: warning: cannot find entry symbol %s; defaulting to %V\n"),
- entry_symbol, bfd_get_section_vma (output_bfd, ts));
+ entry_symbol.name,
+ bfd_get_section_vma (output_bfd, ts));
if (! bfd_set_start_address (output_bfd,
bfd_get_section_vma (output_bfd,
ts)))
@@ -3502,7 +3608,7 @@ lang_finish ()
{
if (warn)
einfo (_("%P: warning: cannot find entry symbol %s; not setting start address\n"),
- entry_symbol);
+ entry_symbol.name);
}
}
}
@@ -3567,7 +3673,7 @@ lang_check ()
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. */
+ private data of the output bfd. */
bfd_error_handler_type pfn = NULL;
@@ -3641,8 +3747,8 @@ lang_one_common (h, info)
section = h->u.c.p->section;
/* Increase the size of the section. */
- section->_cooked_size = ALIGN_N ((section->_cooked_size + opb - 1) / opb,
- (bfd_size_type) (1 << power_of_two)) * opb;
+ section->_cooked_size = align_n ((section->_cooked_size + opb - 1) / opb,
+ (bfd_vma) 1 << power_of_two) * opb;
/* Adjust the alignment if necessary. */
if (power_of_two > section->alignment_power)
@@ -3733,11 +3839,7 @@ lang_place_orphans ()
if (file->just_syms_flag)
{
- /* We are only retrieving symbol values from this
- file. We want the symbols to act as though the
- values in the file are absolute. */
- s->output_section = bfd_abs_section_ptr;
- s->output_offset = s->vma;
+ abort ();
}
else if (strcmp (s->name, "COMMON") == 0)
{
@@ -4072,25 +4174,16 @@ static void
lang_gc_sections ()
{
struct bfd_link_hash_entry *h;
- ldlang_undef_chain_list_type *ulist, fake_list_start;
+ 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.
- Handle the entry symbol at the same time. */
+ /* Keep all sections containing symbols undefined on the command-line,
+ and the section containing the entry symbol. */
- if (entry_symbol != NULL)
- {
- fake_list_start.next = ldlang_undef_chain_list_head;
- fake_list_start.name = (char *) entry_symbol;
- ulist = &fake_list_start;
- }
- else
- ulist = ldlang_undef_chain_list_head;
-
- for (; ulist; ulist = ulist->next)
+ for (ulist = link_info.gc_sym_list; ulist; ulist = ulist->next)
{
h = bfd_link_hash_lookup (link_info.hash, ulist->name,
false, false, false);
@@ -4127,6 +4220,10 @@ lang_process ()
current_target = default_target;
open_input_bfds (statement_list.head, false);
+ link_info.gc_sym_list = &entry_symbol;
+ if (entry_symbol.name == NULL)
+ link_info.gc_sym_list = ldlang_undef_chain_list_head;
+
ldemul_after_open ();
already_linked_table_free ();
@@ -4185,6 +4282,9 @@ lang_process ()
and other back-ends size dynamic sections. */
ldemul_before_allocation ();
+ if (!link_info.relocateable)
+ strip_excluded_output_sections ();
+
/* We must record the program headers before we try to fix the
section positions, since they will affect SIZEOF_HEADERS. */
lang_record_phdrs ();
@@ -4214,13 +4314,13 @@ lang_process ()
section sizes. */
lang_do_assignments (statement_list.head,
abs_output_section,
- (fill_type) 0, (bfd_vma) 0);
+ (fill_type *) 0, (bfd_vma) 0);
/* Perform another relax pass - this time we know where the
- globals are, so can make better guess. */
+ globals are, so can make a better guess. */
lang_size_sections (statement_list.head,
abs_output_section,
- &(statement_list.head), 0, (bfd_vma) 0,
+ &statement_list.head, 0, (bfd_vma) 0,
&relax_again);
}
while (relax_again);
@@ -4238,7 +4338,7 @@ lang_process ()
lang_do_assignments (statement_list.head,
abs_output_section,
- (fill_type) 0, (bfd_vma) 0);
+ (fill_type *) 0, (bfd_vma) 0);
/* Make sure that the section addresses make sense. */
if (! link_info.relocateable
@@ -4317,11 +4417,11 @@ lang_add_entry (name, cmdline)
const char *name;
boolean cmdline;
{
- if (entry_symbol == NULL
+ if (entry_symbol.name == NULL
|| cmdline
|| ! entry_from_cmdline)
{
- entry_symbol = name;
+ entry_symbol.name = name;
entry_from_cmdline = cmdline;
}
}
@@ -4354,13 +4454,13 @@ lang_add_map (name)
}
void
-lang_add_fill (exp)
- int exp;
+lang_add_fill (fill)
+ fill_type *fill;
{
lang_fill_statement_type *new = new_stat (lang_fill_statement,
stat_ptr);
- new->fill = exp;
+ new->fill = fill;
}
void
@@ -4445,23 +4545,48 @@ lang_float (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 "*default*" 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 (region, lma_region, memspec, lma_memspec, have_lma_p)
+ struct memory_region_struct **region, **lma_region;
+ const char *memspec, *lma_memspec;
+ int have_lma_p;
+{
+ *lma_region = lang_memory_region_lookup (lma_memspec);
+
+ /* If no runtime region has been given, but the load region has
+ been, use the load region. */
+ if (lma_memspec != 0 && strcmp (memspec, "*default*") == 0)
+ *region = *lma_region;
+ else
+ *region = lang_memory_region_lookup (memspec);
+
+ if (have_lma_p && 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, memspec, phdrs, lma_memspec)
- bfd_vma fill;
+ fill_type *fill;
const char *memspec;
struct 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 != 0);
current_section->fill = fill;
- current_section->region = lang_memory_region_lookup (memspec);
- if (strcmp (lma_memspec, "*default*") != 0)
- {
- current_section->lma_region = lang_memory_region_lookup (lma_memspec);
- /* If no runtime region has been given, but the load region has
- been, use the load region. */
- if (strcmp (memspec, "*default*") == 0)
- current_section->region = lang_memory_region_lookup (lma_memspec);
- }
current_section->phdrs = phdrs;
stat_ptr = &statement_list;
}
@@ -4743,12 +4868,6 @@ lang_add_nocrossref (l)
/* The overlay virtual address. */
static etree_type *overlay_vma;
-/* The overlay load address. */
-static etree_type *overlay_lma;
-
-/* Whether nocrossrefs is set for this overlay. */
-static int overlay_nocrossrefs;
-
/* An expression for the maximum section size seen so far. */
static etree_type *overlay_max;
@@ -4764,24 +4883,18 @@ static struct overlay_list *overlay_list;
/* Start handling an overlay. */
void
-lang_enter_overlay (vma_expr, lma_expr, nocrossrefs)
+lang_enter_overlay (vma_expr)
etree_type *vma_expr;
- etree_type *lma_expr;
- int nocrossrefs;
{
/* The grammar should prevent nested overlays from occurring. */
- ASSERT (overlay_vma == NULL
- && overlay_lma == NULL
- && overlay_list == NULL
- && overlay_max == NULL);
+ ASSERT (overlay_vma == NULL && overlay_max == NULL);
overlay_vma = vma_expr;
- overlay_lma = lma_expr;
- overlay_nocrossrefs = nocrossrefs;
}
/* Start a section in an overlay. We handle this by calling
- lang_enter_output_section_statement with the correct VMA and LMA. */
+ lang_enter_output_section_statement with the correct VMA.
+ lang_leave_overlay sets up the LMA and memory regions. */
void
lang_enter_overlay_section (name)
@@ -4791,16 +4904,13 @@ lang_enter_overlay_section (name)
etree_type *size;
lang_enter_output_section_statement (name, overlay_vma, normal_section,
- 0, 0, 0, overlay_lma);
+ 0, 0, 0, 0);
- /* If this is the first section, then base the VMA and LMA of future
+ /* 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);
- overlay_lma = exp_nameop (LOADADDR, name);
- }
+ overlay_vma = exp_nameop (ADDR, name);
/* Remember the section. */
n = (struct overlay_list *) xmalloc (sizeof *n);
@@ -4810,9 +4920,6 @@ lang_enter_overlay_section (name)
size = exp_nameop (SIZEOF, name);
- /* Adjust the LMA for the next section. */
- overlay_lma = exp_binop ('+', overlay_lma, size);
-
/* Arrange to work out the maximum section end address. */
if (overlay_max == NULL)
overlay_max = size;
@@ -4825,7 +4932,7 @@ lang_enter_overlay_section (name)
void
lang_leave_overlay_section (fill, phdrs)
- bfd_vma fill;
+ fill_type *fill;
struct lang_output_section_phdr_list *phdrs;
{
const char *name;
@@ -4835,8 +4942,10 @@ lang_leave_overlay_section (fill, phdrs)
name = current_section->name;
- lang_leave_output_section_statement (fill, "*default*",
- phdrs, "*default*");
+ /* For now, assume that "*default*" 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*", phdrs, 0);
/* Define the magic symbols. */
@@ -4866,62 +4975,57 @@ lang_leave_overlay_section (fill, phdrs)
looks through all the sections in the overlay and sets them. */
void
-lang_leave_overlay (fill, memspec, phdrs, lma_memspec)
- bfd_vma fill;
+lang_leave_overlay (lma_expr, nocrossrefs, fill, memspec, phdrs, lma_memspec)
+ etree_type *lma_expr;
+ int nocrossrefs;
+ fill_type *fill;
const char *memspec;
struct lang_output_section_phdr_list *phdrs;
const char *lma_memspec;
{
lang_memory_region_type *region;
- lang_memory_region_type * default_region;
lang_memory_region_type *lma_region;
struct overlay_list *l;
struct lang_nocrossref *nocrossref;
- default_region = lang_memory_region_lookup ("*default*");
-
- if (memspec == NULL)
- region = NULL;
- else
- region = lang_memory_region_lookup (memspec);
-
- if (lma_memspec == NULL)
- lma_region = NULL;
- else
- lma_region = lang_memory_region_lookup (lma_memspec);
+ lang_get_regions (&region, &lma_region,
+ memspec, lma_memspec,
+ lma_expr != 0);
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 != 0 && l->os->fill == 0)
+ if (fill != (fill_type *) 0 && l->os->fill == (fill_type *) 0)
l->os->fill = fill;
- /* Assign a region to the sections, if one has been specified.
- Override the assignment of the default section, but not
- other sections. */
- if (region != NULL &&
- (l->os->region == NULL ||
- l->os->region == default_region))
- l->os->region = region;
-
- /* We only set lma_region for the first overlay section, as
- subsequent overlay sections will have load_base set relative
- to the first section. Also, don't set lma_region if
- load_base is specified. FIXME: There should really be a test
- that `AT ( LDADDR )' doesn't conflict with `AT >LMA_REGION'
- rather than letting LDADDR simply override LMA_REGION. */
- if (lma_region != NULL && l->os->lma_region == NULL
- && l->next == NULL && l->os->load_base == NULL)
- l->os->lma_region = lma_region;
+ l->os->region = region;
+ l->os->lma_region = lma_region;
+
+ /* The first section has the load address specified in the
+ OVERLAY statement. The rest are worked out from that.
+ The base address is not needed (and should be null) if
+ an LMA region was specified. */
+ if (l->next == 0)
+ l->os->load_base = lma_expr;
+ else if (lma_region == 0)
+ l->os->load_base = exp_binop ('+',
+ exp_nameop (LOADADDR, l->next->os->name),
+ exp_nameop (SIZEOF, l->next->os->name));
if (phdrs != NULL && l->os->phdrs == NULL)
l->os->phdrs = phdrs;
- if (overlay_nocrossrefs)
+ if (nocrossrefs)
{
struct lang_nocrossref *nc;
@@ -4939,13 +5043,7 @@ lang_leave_overlay (fill, memspec, phdrs, lma_memspec)
if (nocrossref != NULL)
lang_add_nocrossref (nocrossref);
- /* Update . for the end of the overlay. */
- lang_add_assignment (exp_assop ('=', ".",
- exp_binop ('+', overlay_vma, overlay_max)));
-
overlay_vma = NULL;
- overlay_lma = NULL;
- overlay_nocrossrefs = 0;
overlay_list = NULL;
overlay_max = NULL;
}
@@ -5033,6 +5131,8 @@ lang_new_vers_pattern (orig, new, lang)
ret = (struct bfd_elf_version_expr *) xmalloc (sizeof *ret);
ret->next = orig;
ret->pattern = new;
+ ret->symver = 0;
+ ret->script = 0;
if (lang == NULL || strcasecmp (lang, "C") == 0)
ret->match = lang_vers_match_lang_c;
@@ -5047,7 +5147,7 @@ lang_new_vers_pattern (orig, new, lang)
ret->match = lang_vers_match_lang_c;
}
- return ret;
+ return ldemul_new_vers_pattern (ret);
}
/* This is called for each set of variable names and match
@@ -5186,7 +5286,7 @@ lang_do_version_exports_section ()
bfd_size_type len;
if (sec == NULL)
- continue;
+ continue;
len = bfd_section_size (is->the_bfd, sec);
contents = xmalloc (len);
diff --git a/contrib/binutils/ld/ldlang.h b/contrib/binutils/ld/ldlang.h
index 2089591..cb4b6d3 100644
--- a/contrib/binutils/ld/ldlang.h
+++ b/contrib/binutils/ld/ldlang.h
@@ -32,7 +32,10 @@ typedef enum {
lang_input_file_is_file_enum
} lang_input_file_enum_type;
-typedef unsigned int fill_type;
+struct _fill_type {
+ size_t size;
+ unsigned char data[1];
+};
typedef struct statement_list {
union lang_statement_union *head;
@@ -125,13 +128,19 @@ typedef struct lang_output_section_statement_struct {
struct memory_region_struct *region;
struct memory_region_struct *lma_region;
size_t block_value;
- fill_type fill;
+ fill_type *fill;
int subsection_alignment; /* alignment of components */
int section_alignment; /* alignment of start of section */
union etree_union *load_base;
+ /* If non-null, an expression to evaluate after setting the section's
+ size. The expression is evaluated inside REGION (above) with '.'
+ set to the end of the section. Used in the last overlay section
+ to move '.' past all the overlaid sections. */
+ union etree_union *update_dot_tree;
+
struct lang_output_section_phdr_list *phdrs;
} lang_output_section_statement_type;
@@ -145,7 +154,7 @@ typedef struct {
typedef struct {
lang_statement_header_type header;
- fill_type fill;
+ fill_type *fill;
int size;
asection *output_section;
} lang_fill_statement_type;
@@ -275,7 +284,7 @@ typedef struct {
bfd_vma output_offset;
size_t size;
asection *output_section;
- fill_type fill;
+ fill_type *fill;
} lang_padding_statement_type;
/* A group statement collects a set of libraries together. The
@@ -355,7 +364,7 @@ extern etree_type *base;
extern lang_statement_list_type *stat_ptr;
extern boolean delete_output_file_on_failure;
-extern const char *entry_symbol;
+extern struct bfd_sym_chain entry_symbol;
extern const char *entry_section;
extern boolean entry_from_cmdline;
extern lang_statement_list_type file_chain;
@@ -385,13 +394,13 @@ extern void lang_add_target PARAMS ((const char *));
extern void lang_add_wild
PARAMS ((struct wildcard_spec *, struct wildcard_list *, boolean));
extern void lang_add_map PARAMS ((const char *));
-extern void lang_add_fill PARAMS ((int));
+extern void lang_add_fill PARAMS ((fill_type *));
extern lang_assignment_statement_type * lang_add_assignment PARAMS ((union etree_union *));
extern void lang_add_attribute PARAMS ((enum statement_enum));
extern void lang_startup PARAMS ((const char *));
extern void lang_float PARAMS ((enum bfd_boolean));
extern void lang_leave_output_section_statement
- PARAMS ((bfd_vma, const char *, struct lang_output_section_phdr_list *,
+ PARAMS ((fill_type *, const char *, struct lang_output_section_phdr_list *,
const char *));
extern void lang_abs_symbol_at_end_of PARAMS ((const char *, const char *));
extern void lang_abs_symbol_at_beginning_of PARAMS ((const char *,
@@ -407,7 +416,7 @@ extern void lang_reset_memory_regions PARAMS ((void));
extern bfd_vma lang_do_assignments
PARAMS ((lang_statement_union_type * s,
lang_output_section_statement_type *output_section_statement,
- fill_type fill,
+ fill_type *fill,
bfd_vma dot));
#define LANG_FOR_EACH_INPUT_STATEMENT(statement) \
@@ -441,7 +450,7 @@ extern void dprint_statement PARAMS ((lang_statement_union_type *, int));
extern bfd_vma lang_size_sections
PARAMS ((lang_statement_union_type *s,
lang_output_section_statement_type *output_section_statement,
- lang_statement_union_type **prev, fill_type fill,
+ lang_statement_union_type **prev, fill_type *fill,
bfd_vma dot, boolean *relax));
extern void lang_enter_group PARAMS ((void));
extern void lang_leave_group PARAMS ((void));
@@ -453,13 +462,13 @@ extern void lang_new_phdr
PARAMS ((const char *, etree_type *, boolean, boolean, etree_type *,
etree_type *));
extern void lang_add_nocrossref PARAMS ((struct lang_nocrossref *));
-extern void lang_enter_overlay PARAMS ((etree_type *, etree_type *, int));
+extern void lang_enter_overlay PARAMS ((etree_type *));
extern void lang_enter_overlay_section PARAMS ((const char *));
extern void lang_leave_overlay_section
- PARAMS ((bfd_vma, struct lang_output_section_phdr_list *));
+ PARAMS ((fill_type *, struct lang_output_section_phdr_list *));
extern void lang_leave_overlay
- PARAMS ((bfd_vma, const char *, struct lang_output_section_phdr_list *,
- const char *));
+ PARAMS ((etree_type *, int, fill_type *, const char *,
+ struct lang_output_section_phdr_list *, const char *));
extern struct bfd_elf_version_tree *lang_elf_version_info;
diff --git a/contrib/binutils/ld/ldlex.l b/contrib/binutils/ld/ldlex.l
index 5b97f13..68ed7fc 100644
--- a/contrib/binutils/ld/ldlex.l
+++ b/contrib/binutils/ld/ldlex.l
@@ -26,7 +26,7 @@ This was written by steve chamberlain
*/
-#include <ansidecl.h>
+#include "ansidecl.h"
#include <stdio.h>
#ifdef MPW
@@ -37,11 +37,12 @@ This was written by steve chamberlain
#include "bfd.h"
#include "sysdep.h"
#include "safe-ctype.h"
+#include "bfdlink.h"
#include "ld.h"
-#include "ldgram.h"
#include "ldmisc.h"
#include "ldexp.h"
#include "ldlang.h"
+#include "ldgram.h"
#include "ldfile.h"
#include "ldlex.h"
#include "ldmain.h"
@@ -153,6 +154,7 @@ V_IDENTIFIER [*?.$_a-zA-Z\[\]\-\!\^]([*?.$_a-zA-Z0-9\[\]\-\!\^]|::)*
<MRI,EXPRESSION>"$"([0-9A-Fa-f])+ {
yylval.integer = bfd_scan_vma (yytext+1, 0,16);
+ yylval.bigint.str = (char *) 0;
return INT;
}
@@ -178,20 +180,36 @@ V_IDENTIFIER [*?.$_a-zA-Z\[\]\-\!\^]([*?.$_a-zA-Z0-9\[\]\-\!\^]|::)*
}
yylval.integer = bfd_scan_vma (yytext, 0,
ibase);
+ yylval.bigint.str = (char *) 0;
return INT;
}
-<SCRIPT,DEFSYMEXP,MRI,BOTH,EXPRESSION>((("$"|"0x")([0-9A-Fa-f])+)|(([0-9])+))(M|K|m|k)? {
+<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;
- yylval.integer = bfd_scan_vma (s, 0, 0);
+ {
+ ++s;
+ ibase = 16;
+ }
+ yylval.integer = bfd_scan_vma (s, 0, ibase);
+ yylval.bigint.str = (char *) 0;
if (yytext[yyleng-1] == 'M'
|| yytext[yyleng-1] == 'm')
- yylval.integer *= 1024 * 1024;
- if (yytext[yyleng-1] == 'K'
+ {
+ yylval.integer *= 1024 * 1024;
+ }
+ else if (yytext[yyleng-1] == 'K'
|| yytext[yyleng-1]=='k')
- yylval.integer *= 1024;
+ {
+ 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(']');}
@@ -239,6 +257,8 @@ V_IDENTIFIER [*?.$_a-zA-Z\[\]\-\!\^]([*?.$_a-zA-Z0-9\[\]\-\!\^]|::)*
<EXPRESSION,BOTH,SCRIPT>"BIND" { RTOKEN(BIND);}
<BOTH,SCRIPT>"LENGTH" { RTOKEN(LENGTH);}
<EXPRESSION,BOTH,SCRIPT>"ALIGN" { RTOKEN(ALIGN_K);}
+<EXPRESSION,BOTH,SCRIPT>"DATA_SEGMENT_ALIGN" { RTOKEN(DATA_SEGMENT_ALIGN);}
+<EXPRESSION,BOTH,SCRIPT>"DATA_SEGMENT_END" { RTOKEN(DATA_SEGMENT_END);}
<EXPRESSION,BOTH,SCRIPT>"ADDR" { RTOKEN(ADDR);}
<EXPRESSION,BOTH,SCRIPT>"LOADADDR" { RTOKEN(LOADADDR);}
<EXPRESSION,BOTH>"MAX" { RTOKEN(MAX_K); }
@@ -459,7 +479,7 @@ lex_push_file (file, name)
static YY_BUFFER_STATE
yy_create_string_buffer (string, size)
- CONST char *string;
+ const char *string;
size_t size;
{
YY_BUFFER_STATE b;
@@ -501,7 +521,7 @@ yy_create_string_buffer (string, size)
void
lex_redirect (string)
- CONST char *string;
+ const char *string;
{
YY_BUFFER_STATE tmp;
diff --git a/contrib/binutils/ld/ldmain.c b/contrib/binutils/ld/ldmain.c
index 5bda3d3..3a0828f 100644
--- a/contrib/binutils/ld/ldmain.c
+++ b/contrib/binutils/ld/ldmain.c
@@ -34,9 +34,9 @@ Software Foundation, 59 Temple Place - Suite 330, Boston, MA
#include "ldmain.h"
#include "ldmisc.h"
#include "ldwrite.h"
-#include "ldgram.h"
#include "ldexp.h"
#include "ldlang.h"
+#include "ldgram.h"
#include "ldlex.h"
#include "ldfile.h"
#include "ldemul.h"
@@ -239,11 +239,14 @@ main (argc, argv)
link_info.optimize = false;
link_info.no_undefined = false;
link_info.allow_shlib_undefined = false;
+ link_info.allow_multiple_definition = false;
+ link_info.allow_undefined_version = true;
link_info.strip = strip_none;
link_info.discard = discard_sec_merge;
link_info.keep_memory = true;
link_info.input_bfds = NULL;
link_info.create_object_symbols_section = NULL;
+ link_info.gc_sym_list = NULL;
link_info.hash = NULL;
link_info.keep_hash = NULL;
link_info.notice_all = false;
@@ -259,7 +262,8 @@ main (argc, argv)
link_info.flags = (bfd_vma) 0;
link_info.flags_1 = (bfd_vma) 0;
link_info.pei386_auto_import = false;
- link_info.combreloc = false;
+ link_info.pei386_auto_import = -1;
+ link_info.combreloc = true;
link_info.spare_dynamic_tags = 5;
ldfile_add_arch ("");
@@ -318,12 +322,12 @@ main (argc, argv)
if (saved_script_handle == NULL)
{
int isfile;
- char *s = ldemul_get_script (& isfile);
+ char *s = ldemul_get_script (&isfile);
if (isfile)
ldfile_open_command_file (s);
else
- {
+ {
lex_string = s;
lex_redirect (s);
}
@@ -349,7 +353,7 @@ main (argc, argv)
rewind (saved_script_handle);
while ((n = fread (buf, 1, ld_bufsz - 1, saved_script_handle)) > 0)
{
- buf [n] = 0;
+ buf[n] = 0;
info_msg (buf);
}
rewind (saved_script_handle);
@@ -359,9 +363,9 @@ main (argc, argv)
{
int isfile;
- info_msg (ldemul_get_script (& isfile));
+ info_msg (ldemul_get_script (&isfile));
}
-
+
info_msg ("\n==================================================\n");
}
diff --git a/contrib/binutils/ld/ldmisc.c b/contrib/binutils/ld/ldmisc.c
index 42adcee..2869ba9 100644
--- a/contrib/binutils/ld/ldmisc.c
+++ b/contrib/binutils/ld/ldmisc.c
@@ -65,28 +65,6 @@ static void vfinfo PARAMS ((FILE *, const char *, va_list));
%u integer, like printf
*/
-char *
-demangle (string)
- const char *string;
-{
- char *res;
- const char *p;
-
- if (output_bfd != NULL
- && bfd_get_symbol_leading_char (output_bfd) == string[0])
- ++string;
-
- /* This is a hack for better error reporting on XCOFF, PowerPC64-ELF
- or the MS PE format. These formats have a number of leading '.'s
- on at least some symbols, so we remove all dots. */
- p = string;
- while (*p == '.')
- ++p;
-
- res = cplus_demangle (p, DMGL_ANSI | DMGL_PARAMS);
- return res ? res : xstrdup (string);
-}
-
static void
vfinfo (fp, fmt, arg)
FILE *fp;
@@ -407,6 +385,49 @@ vfinfo (fp, fmt, arg)
xexit (1);
}
+/* Wrapper around cplus_demangle. Strips leading underscores and
+ other such chars that would otherwise confuse the demangler. */
+
+char *
+demangle (name)
+ const char *name;
+{
+ char *res;
+ const char *p;
+
+ if (output_bfd != NULL
+ && bfd_get_symbol_leading_char (output_bfd) == name[0])
+ ++name;
+
+ /* This is a hack for better error reporting on XCOFF, PowerPC64-ELF
+ or the MS PE format. These formats have a number of leading '.'s
+ on at least some symbols, so we remove all dots to avoid
+ confusing the demangler. */
+ p = name;
+ while (*p == '.')
+ ++p;
+
+ res = cplus_demangle (p, DMGL_ANSI | DMGL_PARAMS);
+ if (res)
+ {
+ size_t dots = p - name;
+
+ /* Now put back any stripped dots. */
+ if (dots != 0)
+ {
+ size_t len = strlen (res) + 1;
+ char *add_dots = xmalloc (len + dots);
+
+ memcpy (add_dots, name, dots);
+ memcpy (add_dots + dots, res, len);
+ free (res);
+ res = add_dots;
+ }
+ return res;
+ }
+ return xstrdup (name);
+}
+
/* Format info message and print on stdout. */
/* (You would think this should be called just "info", but then you
diff --git a/contrib/binutils/ld/ldwrite.c b/contrib/binutils/ld/ldwrite.c
index e559825..e5949c1 100644
--- a/contrib/binutils/ld/ldwrite.c
+++ b/contrib/binutils/ld/ldwrite.c
@@ -1,5 +1,5 @@
/* ldwrite.c -- write out the linked file
- Copyright 1991, 1992, 1993, 1994, 1995, 1996, 1997, 1998, 2000
+ Copyright 1991, 1992, 1993, 1994, 1995, 1996, 1997, 1998, 2000, 2002
Free Software Foundation, Inc.
Written by Steve Chamberlain sac@cygnus.com
@@ -233,7 +233,9 @@ build_link_order (statement)
ASSERT (output_section->owner == output_bfd);
- if ((output_section->flags & SEC_HAS_CONTENTS) != 0)
+ 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;
@@ -243,9 +245,10 @@ build_link_order (statement)
{
/* We've got a never load section inside one which
is going to be output, we'll change it into a
- fill link_order */
- link_order->type = bfd_fill_link_order;
- link_order->u.fill.value = 0;
+ fill. */
+ link_order->type = bfd_data_link_order;
+ link_order->u.data.contents = "";
+ link_order->u.data.size = 1;
}
else
{
@@ -274,10 +277,11 @@ build_link_order (statement)
if ((output_section->flags & SEC_HAS_CONTENTS) != 0)
{
link_order = bfd_new_link_order (output_bfd, output_section);
- link_order->type = bfd_fill_link_order;
+ 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.fill.value = statement->padding_statement.fill;
+ link_order->u.data.contents = statement->padding_statement.fill->data;
+ link_order->u.data.size = statement->padding_statement.fill->size;
}
}
break;
diff --git a/contrib/binutils/ld/lexsup.c b/contrib/binutils/ld/lexsup.c
index 230dd6b..4acb4fd 100644
--- a/contrib/binutils/ld/lexsup.c
+++ b/contrib/binutils/ld/lexsup.c
@@ -126,7 +126,9 @@ int parsing_defsym = 0;
#define OPTION_UNIQUE (OPTION_SECTION_START + 1)
#define OPTION_TARGET_HELP (OPTION_UNIQUE + 1)
#define OPTION_ALLOW_SHLIB_UNDEFINED (OPTION_TARGET_HELP + 1)
-#define OPTION_DISCARD_NONE (OPTION_ALLOW_SHLIB_UNDEFINED + 1)
+#define OPTION_ALLOW_MULTIPLE_DEFINITION (OPTION_ALLOW_SHLIB_UNDEFINED + 1)
+#define OPTION_NO_UNDEFINED_VERSION (OPTION_ALLOW_MULTIPLE_DEFINITION + 1)
+#define OPTION_DISCARD_NONE (OPTION_NO_UNDEFINED_VERSION + 1)
#define OPTION_SPARE_DYNAMIC_TAGS (OPTION_DISCARD_NONE + 1)
#define OPTION_NO_DEFINE_COMMON (OPTION_SPARE_DYNAMIC_TAGS + 1)
#define OPTION_NOSTDLIB (OPTION_NO_DEFINE_COMMON + 1)
@@ -319,6 +321,10 @@ static const struct ld_option ld_options[] =
'\0', NULL, N_("Allow no undefined symbols"), TWO_DASHES },
{ {"allow-shlib-undefined", no_argument, NULL, OPTION_ALLOW_SHLIB_UNDEFINED},
'\0', NULL, N_("Allow undefined symbols in shared objects"), TWO_DASHES },
+ { {"allow-multiple-definition", no_argument, NULL, OPTION_ALLOW_MULTIPLE_DEFINITION},
+ '\0', NULL, N_("Allow multiple definitions"), TWO_DASHES },
+ { {"no-undefined-version", no_argument, NULL, OPTION_NO_UNDEFINED_VERSION},
+ '\0', NULL, N_("Disallow undefined version"), TWO_DASHES },
{ {"no-warn-mismatch", no_argument, NULL, OPTION_NO_WARN_MISMATCH},
'\0', NULL, N_("Don't warn about mismatched input files"), TWO_DASHES},
{ {"no-whole-archive", no_argument, NULL, OPTION_NO_WHOLE_ARCHIVE},
@@ -761,6 +767,12 @@ parse_args (argc, argv)
case OPTION_ALLOW_SHLIB_UNDEFINED:
link_info.allow_shlib_undefined = true;
break;
+ case OPTION_ALLOW_MULTIPLE_DEFINITION:
+ link_info.allow_multiple_definition = true;
+ break;
+ case OPTION_NO_UNDEFINED_VERSION:
+ link_info.allow_undefined_version = false;
+ break;
case OPTION_NO_WARN_MISMATCH:
command_line.warn_mismatch = false;
break;
@@ -804,7 +816,7 @@ parse_args (argc, argv)
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.relocateable = true;
config.build_constructors = false;
config.magic_demand_paged = false;
@@ -954,8 +966,8 @@ parse_args (argc, argv)
break;
case OPTION_TARGET_HELP:
/* Mention any target specific options. */
- ldemul_list_emulation_options (stdout);
- exit (0);
+ ldemul_list_emulation_options (stdout);
+ exit (0);
case OPTION_TBSS:
set_section_start (".bss", optarg);
break;
@@ -1009,7 +1021,7 @@ parse_args (argc, argv)
version information. Read it, but don't assume that
we've seen a linker script. */
{
- FILE * hold_script_handle;
+ FILE *hold_script_handle;
hold_script_handle = saved_script_handle;
ldfile_open_command_file (optarg);
@@ -1225,7 +1237,7 @@ help ()
int two_dashes =
(ld_options[j].control == TWO_DASHES
|| ld_options[j].control == EXACTLY_TWO_DASHES);
-
+
printf ("%s-%s%s",
comma ? ", " : "",
two_dashes ? "-" : "",
diff --git a/contrib/binutils/ld/mri.c b/contrib/binutils/ld/mri.c
index 6ec0ab8..89514e9 100644
--- a/contrib/binutils/ld/mri.c
+++ b/contrib/binutils/ld/mri.c
@@ -1,5 +1,5 @@
/* mri.c -- handle MRI style linker scripts
- Copyright 1991, 1992, 1993, 1994, 1996, 1997, 1998, 1999, 2000
+ Copyright 1991, 1992, 1993, 1994, 1996, 1997, 1998, 1999, 2000, 2002
Free Software Foundation, Inc.
This file is part of GLD, the Gnu Linker.
@@ -36,8 +36,8 @@ Software Foundation, 59 Temple Place - Suite 330, Boston, MA
struct section_name_struct {
struct section_name_struct *next;
- CONST char *name;
- CONST char *alias;
+ const char *name;
+ const char *alias;
etree_type *vma;
etree_type *align;
etree_type *subalign;
@@ -62,7 +62,7 @@ static void mri_add_to_list PARAMS ((struct section_name_struct **list,
static struct section_name_struct **
lookup (name, list)
- CONST char *name;
+ const char *name;
struct section_name_struct **list;
{
struct section_name_struct **ptr = list;
@@ -84,9 +84,9 @@ lookup (name, list)
static void
mri_add_to_list (list, name, vma, zalias, align, subalign)
struct section_name_struct **list;
- CONST char *name;
+ const char *name;
etree_type *vma;
- CONST char *zalias;
+ const char *zalias;
etree_type *align;
etree_type *subalign;
{
@@ -103,7 +103,7 @@ mri_add_to_list (list, name, vma, zalias, align, subalign)
void
mri_output_section (name, vma)
- CONST char *name;
+ const char *name;
etree_type *vma;
{
mri_add_to_list (&address, name, vma, 0, 0, 0);
@@ -114,7 +114,7 @@ mri_output_section (name, vma)
void
mri_only_load (name)
- CONST char *name;
+ const char *name;
{
mri_add_to_list (&only_load, name, 0, 0, 0, 0);
}
@@ -260,7 +260,7 @@ mri_draw_tree ()
lang_leave_output_section_statement
(0, "*default*", (struct lang_output_section_phdr_list *) NULL,
- "*default*");
+ NULL);
p = p->next;
}
@@ -271,7 +271,7 @@ mri_draw_tree ()
void
mri_load (name)
- CONST char *name;
+ const char *name;
{
base = 0;
lang_add_input_file (name,
@@ -283,15 +283,15 @@ mri_load (name)
void
mri_order (name)
- CONST char *name;
+ const char *name;
{
mri_add_to_list (&order, name, 0, 0, 0, 0);
}
void
mri_alias (want, is, isn)
- CONST char *want;
- CONST char *is;
+ const char *want;
+ const char *is;
int isn;
{
if (!is)
@@ -312,14 +312,14 @@ mri_alias (want, is, isn)
void
mri_name (name)
- CONST char *name;
+ const char *name;
{
lang_add_output (name, 1);
}
void
mri_format (name)
- CONST char *name;
+ const char *name;
{
if (strcmp (name, "S") == 0)
lang_add_output_format ("srec", (char *) NULL, (char *) NULL, 1);
@@ -336,7 +336,7 @@ mri_format (name)
void
mri_public (name, exp)
- CONST char *name;
+ const char *name;
etree_type *exp;
{
lang_add_assignment (exp_assop ('=', name, exp));
@@ -344,7 +344,7 @@ mri_public (name, exp)
void
mri_align (name, exp)
- CONST char *name;
+ const char *name;
etree_type *exp;
{
mri_add_to_list (&alignment, name, 0, 0, exp, 0);
@@ -352,7 +352,7 @@ mri_align (name, exp)
void
mri_alignmod (name, exp)
- CONST char *name;
+ const char *name;
etree_type *exp;
{
mri_add_to_list (&subalignment, name, 0, 0, 0, exp);
diff --git a/contrib/binutils/ld/pe-dll.c b/contrib/binutils/ld/pe-dll.c
index 945564c..fd70c78 100644
--- a/contrib/binutils/ld/pe-dll.c
+++ b/contrib/binutils/ld/pe-dll.c
@@ -1,5 +1,5 @@
/* Routines to help build PEI-format DLLs (Win32 etc)
- Copyright 1998, 1999, 2000, 2001 Free Software Foundation, Inc.
+ Copyright 1998, 1999, 2000, 2001, 2002 Free Software Foundation, Inc.
Written by DJ Delorie <dj@cygnus.com>
This file is part of GLD, the Gnu Linker.
@@ -47,7 +47,7 @@
at the end of this file. This function is not re-entrant and is
normally only called once, so static variables are used to reduce
the number of parameters and return values required.
-
+
See also: ld/emultempl/pe.em. */
/* Auto-import feature by Paul Sokolovsky
@@ -231,6 +231,9 @@ static autofilter_entry_type autofilter_liblist[] =
{ "libgcc.", 7 },
{ "libstdc++.", 10 },
{ "libmingw32.", 11 },
+ { "libg2c.", 7 },
+ { "libsupc++.", 10 },
+ { "libobjc.", 8 },
{ NULL, 0 }
};
@@ -243,7 +246,9 @@ static autofilter_entry_type autofilter_objlist[] =
{ "dllcrt2.o", 9 },
{ "gcrt0.o", 7 },
{ "gcrt1.o", 7 },
- { "gcrt2.o", 7 },
+ { "gcrt2.o", 7 },
+ { "crtbegin.o", 10 },
+ { "crtend.o", 8 },
{ NULL, 0 }
};
@@ -317,7 +322,7 @@ pe_dll_id_target (target)
exit (1);
}
-/* Helper functions for qsort. Relocs must be sorted so that we can write
+/* Helper functions for qsort. Relocs must be sorted so that we can write
them out by pages. */
typedef struct
@@ -368,14 +373,16 @@ 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 (new_excludes)
+pe_dll_add_excludes (new_excludes, type)
const char *new_excludes;
+ const int type;
{
char *local_copy;
char *exclude_string;
@@ -391,6 +398,7 @@ pe_dll_add_excludes (new_excludes)
xmalloc (sizeof (struct exclude_list_struct)));
new_exclude->string = (char *) xmalloc (strlen (exclude_string) + 1);
strcpy (new_exclude->string, exclude_string);
+ new_exclude->type = type;
new_exclude->next = excludes;
excludes = new_exclude;
}
@@ -398,6 +406,7 @@ pe_dll_add_excludes (new_excludes)
free (local_copy);
}
+
/* abfd is a bfd containing n (or NULL)
It can be used for contextual checks. */
@@ -410,6 +419,9 @@ auto_export (abfd, d, n)
int i;
struct exclude_list_struct *ex;
autofilter_entry_type *afptr;
+ const char * libname = 0;
+ if (abfd && abfd->my_archive)
+ libname = lbasename (abfd->my_archive->filename);
/* We should not re-export imported stuff. */
if (strncmp (n, "_imp__", 6) == 0)
@@ -429,14 +441,14 @@ auto_export (abfd, d, n)
n, abfd, abfd->my_archive);
/* First of all, make context checks:
- Don't export anything from libgcc. */
- if (abfd && abfd->my_archive)
+ Don't export anything from standard libs. */
+ if (libname)
{
afptr = autofilter_liblist;
while (afptr->name)
{
- if (strstr (abfd->my_archive->filename, afptr->name))
+ if (strncmp (libname, afptr->name, afptr->len) == 0 )
return 0;
afptr++;
}
@@ -446,11 +458,11 @@ auto_export (abfd, d, n)
if (abfd && (p = lbasename (abfd->filename)))
{
- afptr = autofilter_objlist;
- while (afptr->name)
+ afptr = autofilter_objlist;
+ while (afptr->name)
{
- if ( strcmp (p, afptr->name) == 0 )
- return 0;
+ if (strcmp (p, afptr->name) == 0)
+ return 0;
afptr++;
}
}
@@ -466,7 +478,7 @@ auto_export (abfd, d, n)
if (strcmp (n, afptr->name) == 0)
return 0;
- afptr ++;
+ afptr++;
}
/* Next, exclude symbols starting with ... */
@@ -476,7 +488,7 @@ auto_export (abfd, d, n)
if (strncmp (n, afptr->name, afptr->len) == 0)
return 0;
- afptr ++;
+ afptr++;
}
/* Finally, exclude symbols ending with ... */
@@ -484,19 +496,28 @@ auto_export (abfd, d, n)
afptr = autofilter_symbolsuffixlist;
while (afptr->name)
{
- if ((len >= afptr->len) &&
+ if ((len >= afptr->len)
/* Add 1 to insure match with trailing '\0'. */
- strncmp (n + len - afptr->len, afptr->name,
- afptr->len + 1) == 0)
+ && strncmp (n + len - afptr->len, afptr->name,
+ afptr->len + 1) == 0)
return 0;
- afptr ++;
+ afptr++;
}
}
for (ex = excludes; ex; ex = ex->next)
- if (strcmp (n, ex->string) == 0)
- return 0;
+ {
+ 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;
}
@@ -560,10 +581,10 @@ process_def_file (abfd, info)
sprintf (name, "%s%s", U("_imp_"), sn);
blhe = bfd_link_hash_lookup (info->hash, name,
- false, false, false);
+ false, false, false);
free (name);
- if (blhe && blhe->type == bfd_link_hash_defined)
+ if (blhe && blhe->type == bfd_link_hash_defined)
continue;
}
@@ -863,7 +884,7 @@ generate_edata (abfd, info)
if (pe_def_file->exports[i].ordinal == -1)
{
while (exported_symbols[next_ordinal - min_ordinal] != -1)
- next_ordinal ++;
+ next_ordinal++;
exported_symbols[next_ordinal - min_ordinal] = i;
pe_def_file->exports[i].ordinal = next_ordinal;
@@ -1112,9 +1133,9 @@ generate_reloc (abfd, info)
for (i = 0; i < nrelocs; i++)
{
if (pe_dll_extra_pe_debug)
- {
+ {
struct symbol_cache_entry *sym = *relocs[i]->sym_ptr_ptr;
- printf("rel: %s\n",sym->name);
+ printf ("rel: %s\n", sym->name);
}
if (!relocs[i]->howto->pc_relative
&& relocs[i]->howto->type != pe_details->imagebase_reloc)
@@ -1193,7 +1214,7 @@ generate_reloc (abfd, info)
if (reloc_data[i].type == 4)
reloc_sz += 2;
}
-
+
reloc_sz = (reloc_sz + 3) & ~3; /* 4-byte align. */
reloc_d = (unsigned char *) xmalloc (reloc_sz);
sec_page = (unsigned long) (-1);
@@ -1551,11 +1572,11 @@ save_relocs (asection *sec)
.long 0
.rva __my_dll_iname
.rva fthunk
-
+
.section .idata$5
.long 0
fthunk:
-
+
.section .idata$4
.long 0
hname: */
@@ -1695,10 +1716,10 @@ make_tail (parent)
.global __imp__function
_function:
jmp *__imp__function:
-
+
.section idata$7
.long __head_my_dll
-
+
.section .idata$5
___imp_function:
__imp__function:
@@ -1949,9 +1970,9 @@ make_import_fixup_mark (rel)
static int counter;
static char *fixup_name = NULL;
static size_t buffer_len = 0;
-
+
struct symbol_cache_entry *sym = *rel->sym_ptr_ptr;
-
+
bfd *abfd = bfd_asymbol_bfd (sym);
struct coff_link_hash_entry *myh = NULL;
@@ -1962,7 +1983,7 @@ make_import_fixup_mark (rel)
}
if (strlen (sym->name) + 25 > buffer_len)
- /* Assume 25 chars for "__fu" + counter + "_". If counter is
+ /* Assume 25 chars for "__fu" + counter + "_". If counter is
bigger than 20 digits long, we've got worse problems than
overflowing this buffer... */
{
@@ -1972,17 +1993,17 @@ make_import_fixup_mark (rel)
buffer_len = ((strlen (sym->name) + 25) + 127) & ~127;
fixup_name = (char *) xmalloc (buffer_len);
}
-
+
sprintf (fixup_name, "__fu%d_%s", counter++, sym->name);
- bfd_coff_link_add_one_symbol (&link_info, abfd, fixup_name, BSF_GLOBAL,
+ bfd_coff_link_add_one_symbol (&link_info, abfd, fixup_name, BSF_GLOBAL,
current_sec, /* sym->section, */
rel->address, NULL, true, false,
(struct bfd_link_hash_entry **) &myh);
#if 0
- printf ("type:%d\n", myh->type);
- printf ("%s\n", myh->root.u.def.section->name);
+ printf ("type:%d\n", myh->type);
+ printf ("%s\n", myh->root.u.def.section->name);
#endif
return fixup_name;
}
@@ -1995,7 +2016,7 @@ make_import_fixup_mark (rel)
.rva __fuNN_SYM (pointer to reference (address) in text) */
static bfd *
-make_import_fixup_entry (name, fixup_name, dll_symname,parent)
+make_import_fixup_entry (name, fixup_name, dll_symname, parent)
const char *name;
const char *fixup_name;
const char *dll_symname;
@@ -2021,8 +2042,8 @@ make_import_fixup_entry (name, fixup_name, dll_symname,parent)
symtab = (asymbol **) xmalloc (6 * sizeof (asymbol *));
id3 = quick_section (abfd, ".idata$3", SEC_HAS_CONTENTS, 2);
-#if 0
- quick_symbol (abfd, U ("_head_"), dll_symname, "", id2, BSF_GLOBAL, 0);
+#if 0
+ quick_symbol (abfd, U ("_head_"), dll_symname, "", id2, BSF_GLOBAL, 0);
#endif
quick_symbol (abfd, U ("_nm_thnk_"), name, "", UNDSEC, BSF_GLOBAL, 0);
quick_symbol (abfd, U (""), dll_symname, "_iname", UNDSEC, BSF_GLOBAL, 0);
@@ -2437,7 +2458,7 @@ pe_dll_fill_sections (abfd, info)
/* Do the assignments again. */
lang_do_assignments (stat_ptr->head,
abs_output_section,
- (fill_type) 0, (bfd_vma) 0);
+ (fill_type *) 0, (bfd_vma) 0);
}
fill_edata (abfd, info);
@@ -2471,7 +2492,7 @@ pe_exe_fill_sections (abfd, info)
/* Do the assignments again. */
lang_do_assignments (stat_ptr->head,
abs_output_section,
- (fill_type) 0, (bfd_vma) 0);
+ (fill_type *) 0, (bfd_vma) 0);
}
reloc_s->contents = reloc_d;
}
diff --git a/contrib/binutils/ld/pe-dll.h b/contrib/binutils/ld/pe-dll.h
index f5e9324..b8fcdb9 100644
--- a/contrib/binutils/ld/pe-dll.h
+++ b/contrib/binutils/ld/pe-dll.h
@@ -1,5 +1,5 @@
/* pe-dll.h: Header file for routines used to build Windows DLLs.
- Copyright 1999, 2000 Free Software Foundation, Inc.
+ Copyright 1999, 2000, 2002 Free Software Foundation, Inc.
This file is part of GLD, the Gnu Linker.
@@ -36,7 +36,7 @@ extern int pe_dll_compat_implib;
extern int pe_dll_extra_pe_debug;
extern void pe_dll_id_target PARAMS ((const char *));
-extern void pe_dll_add_excludes PARAMS ((const char *));
+extern void pe_dll_add_excludes PARAMS ((const char *, const int));
extern void pe_dll_generate_def_file PARAMS ((const char *));
extern void pe_dll_generate_implib PARAMS ((def_file *, const char *));
extern void pe_process_import_defs PARAMS ((bfd *, struct bfd_link_info *));
@@ -47,8 +47,8 @@ extern void pe_dll_fill_sections PARAMS ((bfd *, struct bfd_link_info *));
extern void pe_exe_fill_sections PARAMS ((bfd *, struct bfd_link_info *));
extern void pe_walk_relocs_of_symbol PARAMS ((struct bfd_link_info * info,
- CONST char *name,
- int (*cb) (arelent *, asection *)));
+ const char *name,
+ int (*cb) (arelent *, asection *)));
extern void pe_create_import_fixup PARAMS ((arelent * rel));
#endif /* PE_DLL_H */
diff --git a/contrib/binutils/ld/po/ld.pot b/contrib/binutils/ld/po/ld.pot
index 4bb918d..131bef0 100644
--- a/contrib/binutils/ld/po/ld.pot
+++ b/contrib/binutils/ld/po/ld.pot
@@ -6,7 +6,7 @@
msgid ""
msgstr ""
"Project-Id-Version: PACKAGE VERSION\n"
-"POT-Creation-Date: 2002-02-08 04:11-0200\n"
+"POT-Creation-Date: 2002-07-23 15:58-0400\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"
@@ -27,155 +27,161 @@ msgstr ""
msgid "Errors encountered processing file %s"
msgstr ""
-#: emultempl/armcoff.em:207 emultempl/pe.em:1414
+#: emultempl/armcoff.em:207 emultempl/pe.em:1422
msgid "%P: warning: '--thumb-entry %s' is overriding '-e %s'\n"
msgstr ""
-#: emultempl/armcoff.em:212 emultempl/pe.em:1419
+#: emultempl/armcoff.em:212 emultempl/pe.em:1427
msgid "%P: warning: connot find thumb start symbol %s\n"
msgstr ""
-#: emultempl/pe.em:315
+#: emultempl/pe.em:317
msgid ""
" --base_file <basefile> Generate a base file for relocatable "
"DLLs\n"
msgstr ""
-#: emultempl/pe.em:316
+#: emultempl/pe.em:318
msgid ""
" --dll Set image base to the default for DLLs\n"
msgstr ""
-#: emultempl/pe.em:317
+#: emultempl/pe.em:319
msgid " --file-alignment <size> Set file alignment\n"
msgstr ""
-#: emultempl/pe.em:318
+#: emultempl/pe.em:320
msgid " --heap <size> Set initial size of the heap\n"
msgstr ""
-#: emultempl/pe.em:319
+#: emultempl/pe.em:321
msgid ""
" --image-base <address> Set start address of the executable\n"
msgstr ""
-#: emultempl/pe.em:320
+#: emultempl/pe.em:322
msgid ""
" --major-image-version <number> Set version number of the executable\n"
msgstr ""
-#: emultempl/pe.em:321
+#: emultempl/pe.em:323
msgid " --major-os-version <number> Set minimum required OS version\n"
msgstr ""
-#: emultempl/pe.em:322
+#: emultempl/pe.em:324
msgid ""
" --major-subsystem-version <number> Set minimum required OS subsystem "
"version\n"
msgstr ""
-#: emultempl/pe.em:323
+#: emultempl/pe.em:325
msgid ""
" --minor-image-version <number> Set revision number of the executable\n"
msgstr ""
-#: emultempl/pe.em:324
+#: emultempl/pe.em:326
msgid " --minor-os-version <number> Set minimum required OS revision\n"
msgstr ""
-#: emultempl/pe.em:325
+#: emultempl/pe.em:327
msgid ""
" --minor-subsystem-version <number> Set minimum required OS subsystem "
"revision\n"
msgstr ""
-#: emultempl/pe.em:326
+#: emultempl/pe.em:328
msgid " --section-alignment <size> Set section alignment\n"
msgstr ""
-#: emultempl/pe.em:327
+#: emultempl/pe.em:329
msgid " --stack <size> Set size of the initial stack\n"
msgstr ""
-#: emultempl/pe.em:328
+#: emultempl/pe.em:330
msgid ""
" --subsystem <name>[:<version>] Set required OS subsystem [& version]\n"
msgstr ""
-#: emultempl/pe.em:329
+#: emultempl/pe.em:331
msgid ""
" --support-old-code Support interworking with old code\n"
msgstr ""
-#: emultempl/pe.em:330
+#: emultempl/pe.em:332
msgid ""
" --thumb-entry=<symbol> Set the entry point to be Thumb "
"<symbol>\n"
msgstr ""
-#: emultempl/pe.em:332
+#: emultempl/pe.em:334
msgid ""
" --add-stdcall-alias Export symbols with and without @nn\n"
msgstr ""
-#: emultempl/pe.em:333
+#: emultempl/pe.em:335
msgid " --disable-stdcall-fixup Don't link _sym to _sym@nn\n"
msgstr ""
-#: emultempl/pe.em:334
+#: emultempl/pe.em:336
msgid ""
" --enable-stdcall-fixup Link _sym to _sym@nn without warnings\n"
msgstr ""
-#: emultempl/pe.em:335
+#: emultempl/pe.em:337
msgid ""
" --exclude-symbols sym,sym,... Exclude symbols from automatic export\n"
msgstr ""
-#: emultempl/pe.em:336
+#: emultempl/pe.em:338
+msgid ""
+" --exclude-libs lib,lib,... Exclude libraries from automatic "
+"export\n"
+msgstr ""
+
+#: emultempl/pe.em:339
msgid ""
" --export-all-symbols Automatically export all globals to "
"DLL\n"
msgstr ""
-#: emultempl/pe.em:337
+#: emultempl/pe.em:340
msgid " --kill-at Remove @nn from exported symbols\n"
msgstr ""
-#: emultempl/pe.em:338
+#: emultempl/pe.em:341
msgid " --out-implib <file> Generate import library\n"
msgstr ""
-#: emultempl/pe.em:339
+#: emultempl/pe.em:342
msgid ""
" --output-def <file> Generate a .DEF file for the built DLL\n"
msgstr ""
-#: emultempl/pe.em:340
+#: emultempl/pe.em:343
msgid " --warn-duplicate-exports Warn about duplicate exports.\n"
msgstr ""
-#: emultempl/pe.em:341
+#: emultempl/pe.em:344
msgid ""
" --compat-implib Create backward compatible import "
"libs;\n"
" create __imp_<SYMBOL> as well.\n"
msgstr ""
-#: emultempl/pe.em:343
+#: emultempl/pe.em:346
msgid ""
" --enable-auto-image-base Automatically choose image base for "
"DLLs\n"
" unless user specifies one\n"
msgstr ""
-#: emultempl/pe.em:345
+#: emultempl/pe.em:348
msgid ""
" --disable-auto-image-base Do not auto-choose image base. "
"(default)\n"
msgstr ""
-#: emultempl/pe.em:346
+#: emultempl/pe.em:349
msgid ""
" --dll-search-prefix=<string> When linking dynamically to a dll "
"without an\n"
@@ -184,19 +190,19 @@ msgid ""
" in preference to lib<basename>.dll \n"
msgstr ""
-#: emultempl/pe.em:349
+#: emultempl/pe.em:352
msgid ""
" --enable-auto-import Do sophistcated linking of _sym to \n"
" __imp_sym for DATA references\n"
msgstr ""
-#: emultempl/pe.em:351
+#: emultempl/pe.em:354
msgid ""
" --disable-auto-import Do not auto-import DATA items from "
"DLLs\n"
msgstr ""
-#: emultempl/pe.em:352
+#: emultempl/pe.em:355
msgid ""
" --enable-extra-pe-debug Enable verbose debug output when "
"building\n"
@@ -204,75 +210,75 @@ msgid ""
"import)\n"
msgstr ""
-#: emultempl/pe.em:421
+#: emultempl/pe.em:424
msgid "%P: warning: bad version number in -subsystem option\n"
msgstr ""
-#: emultempl/pe.em:457
+#: emultempl/pe.em:460
msgid "%P%F: invalid subsystem type %s\n"
msgstr ""
-#: emultempl/pe.em:472
+#: emultempl/pe.em:475
msgid "%P%F: invalid hex number for PE parameter '%s'\n"
msgstr ""
-#: emultempl/pe.em:490
+#: emultempl/pe.em:493
msgid "%P%F: strange hex info for PE parameter '%s'\n"
msgstr ""
-#: emultempl/pe.em:529
+#: emultempl/pe.em:532
#, c-format
msgid "%s: Can't open base file %s\n"
msgstr ""
-#: emultempl/pe.em:731
+#: emultempl/pe.em:738
msgid "%P: warning, file alignment > section alignment.\n"
msgstr ""
-#: emultempl/pe.em:815 emultempl/pe.em:841
+#: emultempl/pe.em:822 emultempl/pe.em:848
#, c-format
msgid "Warning: resolving %s by linking to %s\n"
msgstr ""
-#: emultempl/pe.em:820 emultempl/pe.em:846
+#: emultempl/pe.em:827 emultempl/pe.em:853
msgid "Use --enable-stdcall-fixup to disable these warnings\n"
msgstr ""
-#: emultempl/pe.em:821 emultempl/pe.em:847
+#: emultempl/pe.em:828 emultempl/pe.em:854
msgid "Use --disable-stdcall-fixup to disable these fixups\n"
msgstr ""
-#: emultempl/pe.em:872
+#: emultempl/pe.em:879
msgid "%C: Cannot get section contents - auto-import exception\n"
msgstr ""
-#: emultempl/pe.em:880
+#: emultempl/pe.em:887
msgid ""
"%C: variable '%T' can't be auto-imported. Please read the documentation for "
"ld's --enable-auto-import for details.\n"
msgstr ""
-#: emultempl/pe.em:908
+#: emultempl/pe.em:916
#, c-format
-msgid "Warning: resolving %s by linking to %s (auto-import)\n"
+msgid "Info: resolving %s by linking to %s (auto-import)\n"
msgstr ""
-#: emultempl/pe.em:989
+#: emultempl/pe.em:997
msgid "%F%P: PE operations on non PE file.\n"
msgstr ""
-#: emultempl/pe.em:1218
+#: emultempl/pe.em:1226
#, c-format
msgid "Errors encountered processing file %s\n"
msgstr ""
-#: emultempl/pe.em:1241
+#: emultempl/pe.em:1249
#, c-format
msgid "Errors encountered processing file %s for interworking"
msgstr ""
-#: emultempl/pe.em:1297 ldlang.c:2049 ldlang.c:4440 ldlang.c:4473
-#: ldmain.c:1069
+#: emultempl/pe.em:1305 ldlang.c:2065 ldlang.c:4608 ldlang.c:4641
+#: ldmain.c:1061
msgid "%P%F: bfd_link_hash_lookup failed: %E\n"
msgstr ""
@@ -311,11 +317,11 @@ msgstr ""
msgid "%B%F: could not read symbols; %E\n"
msgstr ""
-#: ldcref.c:469 ldmain.c:1135 ldmain.c:1139
+#: ldcref.c:469 ldmain.c:1127 ldmain.c:1131
msgid "%B%F: could not read symbols: %E\n"
msgstr ""
-#: ldcref.c:537 ldcref.c:544 ldmain.c:1185 ldmain.c:1192
+#: ldcref.c:537 ldcref.c:544 ldmain.c:1177 ldmain.c:1184
msgid "%B%F: could not read relocs: %E\n"
msgstr ""
@@ -370,55 +376,55 @@ msgstr ""
msgid " no emulation specific options.\n"
msgstr ""
-#: ldexp.c:163
+#: ldexp.c:174
msgid "%F%P: %s uses undefined section %s\n"
msgstr ""
-#: ldexp.c:165
+#: ldexp.c:176
msgid "%F%P: %s forward reference of section %s\n"
msgstr ""
-#: ldexp.c:277
+#: ldexp.c:304
msgid "%F%S %% by zero\n"
msgstr ""
-#: ldexp.c:284
+#: ldexp.c:311
msgid "%F%S / by zero\n"
msgstr ""
-#: ldexp.c:408
+#: ldexp.c:463
msgid "%X%S: unresolvable symbol `%s' referenced in expression\n"
msgstr ""
-#: ldexp.c:427
+#: ldexp.c:483
msgid "%F%S: undefined symbol `%s' referenced in expression\n"
msgstr ""
-#: ldexp.c:611
+#: ldexp.c:685
msgid "%F%S can not PROVIDE assignment to location counter\n"
msgstr ""
-#: ldexp.c:621
+#: ldexp.c:695
msgid "%F%S invalid assignment to location counter\n"
msgstr ""
-#: ldexp.c:625
+#: ldexp.c:699
msgid "%F%S assignment to location counter invalid outside of SECTION\n"
msgstr ""
-#: ldexp.c:634
+#: ldexp.c:708
msgid "%F%S cannot move location counter backwards (from %V to %V)\n"
msgstr ""
-#: ldexp.c:661
+#: ldexp.c:735
msgid "%P%F:%s: hash creation failed\n"
msgstr ""
-#: ldexp.c:963
+#: ldexp.c:1037 ldexp.c:1071
msgid "%F%S nonconstant expression for %s\n"
msgstr ""
-#: ldexp.c:993
+#: ldexp.c:1126
msgid "%F%S non constant expression for %s\n"
msgstr ""
@@ -436,248 +442,244 @@ msgstr ""
msgid "%F%P: invalid BFD target `%s'\n"
msgstr ""
-#: ldfile.c:137
+#: ldfile.c:142
msgid "%P: skipping incompatible %s when searching for %s\n"
msgstr ""
-#: ldfile.c:229
+#: ldfile.c:234
msgid "%F%P: cannot open %s for %s: %E\n"
msgstr ""
-#: ldfile.c:232
+#: ldfile.c:237
msgid "%F%P: cannot open %s: %E\n"
msgstr ""
-#: ldfile.c:262
+#: ldfile.c:267
msgid "%F%P: cannot find %s\n"
msgstr ""
-#: ldfile.c:281 ldfile.c:297
+#: ldfile.c:286 ldfile.c:302
#, c-format
msgid "cannot find script file %s\n"
msgstr ""
-#: ldfile.c:283 ldfile.c:299
+#: ldfile.c:288 ldfile.c:304
#, c-format
msgid "opened script file %s\n"
msgstr ""
-#: ldfile.c:348
+#: ldfile.c:353
msgid "%P%F: cannot open linker script file %s: %E\n"
msgstr ""
-#: ldfile.c:386
+#: ldfile.c:391
msgid "%P%F: unknown architecture: %s\n"
msgstr ""
-#: ldfile.c:402
+#: ldfile.c:407
msgid "%P%F: target architecture respecified\n"
msgstr ""
-#: ldfile.c:456
+#: ldfile.c:461
msgid "%P%F: cannot represent machine `%s'\n"
msgstr ""
-#: ldlang.c:770
+#: ldlang.c:784
msgid ""
"\n"
"Memory Configuration\n"
"\n"
msgstr ""
-#: ldlang.c:772
+#: ldlang.c:786
msgid "Name"
msgstr ""
-#: ldlang.c:772
+#: ldlang.c:786
msgid "Origin"
msgstr ""
-#: ldlang.c:772
+#: ldlang.c:786
msgid "Length"
msgstr ""
-#: ldlang.c:772
+#: ldlang.c:786
msgid "Attributes"
msgstr ""
-#: ldlang.c:814
+#: ldlang.c:828
msgid ""
"\n"
"Linker script and memory map\n"
"\n"
msgstr ""
-#: ldlang.c:831
+#: ldlang.c:845
msgid "%P%F: Illegal use of `%s' section\n"
msgstr ""
-#: ldlang.c:841
+#: ldlang.c:855
msgid "%P%F: output format %s cannot represent section called %s\n"
msgstr ""
-#: ldlang.c:1003
+#: ldlang.c:1016
msgid "%P: %B: warning: ignoring duplicate section `%s'\n"
msgstr ""
-#: ldlang.c:1006
+#: ldlang.c:1019
msgid "%P: %B: warning: ignoring duplicate `%s' section symbol `%s'\n"
msgstr ""
-#: ldlang.c:1020
+#: ldlang.c:1033
msgid "%P: %B: warning: duplicate section `%s' has different size\n"
msgstr ""
-#: ldlang.c:1068
+#: ldlang.c:1084
msgid "%P%F: Failed to create hash table\n"
msgstr ""
-#: ldlang.c:1483
+#: ldlang.c:1503
msgid "%B: file not recognized: %E\n"
msgstr ""
-#: ldlang.c:1484
+#: ldlang.c:1504
msgid "%B: matching formats:"
msgstr ""
-#: ldlang.c:1491
+#: ldlang.c:1511
msgid "%F%B: file not recognized: %E\n"
msgstr ""
-#: ldlang.c:1547
+#: ldlang.c:1567
msgid "%F%B: member %B in archive is not an object\n"
msgstr ""
-#: ldlang.c:1558 ldlang.c:1572
+#: ldlang.c:1578 ldlang.c:1592
msgid "%F%B: could not read symbols: %E\n"
msgstr ""
-#: ldlang.c:1833
+#: ldlang.c:1853
msgid ""
"%P: warning: could not find any targets that match endianness requirement\n"
msgstr ""
-#: ldlang.c:1846
+#: ldlang.c:1866
msgid "%P%F: target %s not found\n"
msgstr ""
-#: ldlang.c:1848
+#: ldlang.c:1868
msgid "%P%F: cannot open output file %s: %E\n"
msgstr ""
-#: ldlang.c:1858
+#: ldlang.c:1878
msgid "%P%F:%s: can not make object file: %E\n"
msgstr ""
-#: ldlang.c:1862
+#: ldlang.c:1882
msgid "%P%F:%s: can not set architecture: %E\n"
msgstr ""
-#: ldlang.c:1866
+#: ldlang.c:1886
msgid "%P%F: can not create link hash table: %E\n"
msgstr ""
-#: ldlang.c:2168
+#: ldlang.c:2235
msgid " load address 0x%V"
msgstr ""
-#: ldlang.c:2298
+#: ldlang.c:2375
msgid "%W (size before relaxing)\n"
msgstr ""
-#: ldlang.c:2380
+#: ldlang.c:2462
#, c-format
msgid "Address of section %s set to "
msgstr ""
-#: ldlang.c:2534
+#: ldlang.c:2623
#, c-format
msgid "Fail with %d\n"
msgstr ""
-#: ldlang.c:2776
+#: ldlang.c:2868
msgid "%X%P: section %s [%V -> %V] overlaps section %s [%V -> %V]\n"
msgstr ""
-#: ldlang.c:2805
+#: ldlang.c:2897
msgid "%X%P: address 0x%v of %B section %s is not within region %s\n"
msgstr ""
-#: ldlang.c:2813
+#: ldlang.c:2905
msgid "%X%P: region %s is full (%B section %s)\n"
msgstr ""
-#: ldlang.c:2863
+#: ldlang.c:2955
msgid "%P%X: Internal error on COFF shared library section %s\n"
msgstr ""
-#: ldlang.c:2905
+#: ldlang.c:2999
msgid "%P: warning: no memory region specified for section `%s'\n"
msgstr ""
-#: ldlang.c:2920
+#: ldlang.c:3014
msgid "%P: warning: changing start of section %s by %u bytes\n"
msgstr ""
-#: ldlang.c:2934
+#: ldlang.c:3028
msgid "%F%S: non constant address expression for section %s\n"
msgstr ""
-#: ldlang.c:2998
-msgid "%X%P: use an absolute load address or a load memory region, not both\n"
-msgstr ""
-
-#: ldlang.c:3113
+#: ldlang.c:3203
msgid "%P%F: can't relax section: %E\n"
msgstr ""
-#: ldlang.c:3272
+#: ldlang.c:3398
msgid "%F%P: invalid data statement\n"
msgstr ""
-#: ldlang.c:3309
+#: ldlang.c:3435
msgid "%F%P: invalid reloc statement\n"
msgstr ""
-#: ldlang.c:3447
+#: ldlang.c:3574
msgid "%P%F:%s: can't set start address\n"
msgstr ""
-#: ldlang.c:3460 ldlang.c:3477
+#: ldlang.c:3587 ldlang.c:3605
msgid "%P%F: can't set start address\n"
msgstr ""
-#: ldlang.c:3472
+#: ldlang.c:3599
msgid "%P: warning: cannot find entry symbol %s; defaulting to %V\n"
msgstr ""
-#: ldlang.c:3482
+#: ldlang.c:3610
msgid "%P: warning: cannot find entry symbol %s; not setting start address\n"
msgstr ""
-#: ldlang.c:3524
+#: ldlang.c:3660
msgid ""
-"%P: warning: %s architecture of input file `%B' is incompatible with %s "
-"output\n"
+"%P%F: Relocatable linking with relocations from format %s (%B) to format %s "
+"(%B) is not supported\n"
msgstr ""
-#: ldlang.c:3537
+#: ldlang.c:3669
msgid ""
-"%P%F: Relocatable linking with relocations from format %s (%B) to format %s "
-"(%B) is not supported\n"
+"%P: warning: %s architecture of input file `%B' is incompatible with %s "
+"output\n"
msgstr ""
-#: ldlang.c:3557
+#: ldlang.c:3690
msgid "%E%X: failed to merge target specific data of file %B\n"
msgstr ""
-#: ldlang.c:3646
+#: ldlang.c:3779
msgid ""
"\n"
"Allocating common symbols\n"
msgstr ""
-#: ldlang.c:3647
+#: ldlang.c:3780
msgid ""
"Common symbol size file\n"
"\n"
@@ -686,294 +688,298 @@ msgstr ""
#. This message happens when using the
#. svr3.ifile linker script, so I have
#. disabled it.
-#: ldlang.c:3729
+#: ldlang.c:3858
msgid "%P: no [COMMON] command, defaulting to .bss\n"
msgstr ""
-#: ldlang.c:3788
+#: ldlang.c:3917
msgid "%P%F: invalid syntax in flags\n"
msgstr ""
-#: ldlang.c:4389
+#: ldlang.c:4532
msgid "%P%Fmultiple STARTUP files\n"
msgstr ""
-#: ldlang.c:4657
+#: ldlang.c:4575
+msgid "%X%P:%S: section has both a load address and a load region\n"
+msgstr ""
+
+#: ldlang.c:4825
msgid "%F%P: bfd_record_phdr failed: %E\n"
msgstr ""
-#: ldlang.c:4676
+#: ldlang.c:4844
msgid "%X%P: section `%s' assigned to non-existent phdr `%s'\n"
msgstr ""
-#: ldlang.c:5002
+#: ldlang.c:5143
msgid "%X%P: unknown language `%s' in version information\n"
msgstr ""
-#: ldlang.c:5054
+#: ldlang.c:5195
msgid ""
"%X%P: anonymous version tag cannot be combined with other version tags\n"
msgstr ""
-#: ldlang.c:5061
+#: ldlang.c:5202
msgid "%X%P: duplicate version tag `%s'\n"
msgstr ""
-#: ldlang.c:5074 ldlang.c:5087
+#: ldlang.c:5215 ldlang.c:5228
msgid "%X%P: duplicate expression `%s' in version information\n"
msgstr ""
-#: ldlang.c:5129
+#: ldlang.c:5270
msgid "%X%P: unable to find version dependency `%s'\n"
msgstr ""
-#: ldlang.c:5151
+#: ldlang.c:5292
msgid "%X%P: unable to read .exports section contents\n"
msgstr ""
-#: ldmain.c:195
+#: ldmain.c:198
msgid "%X%P: can't set BFD default target to `%s': %E\n"
msgstr ""
-#: ldmain.c:284
+#: ldmain.c:290
msgid "%P%F: -r and --mpc860c0 may not be used together\n"
msgstr ""
-#: ldmain.c:286
+#: ldmain.c:292
msgid "%P%F: --relax and -r may not be used together\n"
msgstr ""
-#: ldmain.c:288
+#: ldmain.c:294
msgid "%P%F: -r and -shared may not be used together\n"
msgstr ""
-#: ldmain.c:294
+#: ldmain.c:300
msgid "%P%F: -F may not be used without -shared\n"
msgstr ""
-#: ldmain.c:296
+#: ldmain.c:302
msgid "%P%F: -f may not be used without -shared\n"
msgstr ""
-#: ldmain.c:335
+#: ldmain.c:341
msgid "using external linker script:"
msgstr ""
-#: ldmain.c:337
+#: ldmain.c:343
msgid "using internal linker script:"
msgstr ""
-#: ldmain.c:371
+#: ldmain.c:377
msgid "%P%F: no input files\n"
msgstr ""
-#: ldmain.c:376
+#: ldmain.c:382
msgid "%P: mode %s\n"
msgstr ""
-#: ldmain.c:393
+#: ldmain.c:399
msgid "%P%F: cannot open map file %s: %E\n"
msgstr ""
-#: ldmain.c:440
+#: ldmain.c:432
msgid "%P: link errors found, deleting executable `%s'\n"
msgstr ""
-#: ldmain.c:451
+#: ldmain.c:443
msgid "%F%B: final close failed: %E\n"
msgstr ""
-#: ldmain.c:475
+#: ldmain.c:467
msgid "%X%P: unable to open for source of copy `%s'\n"
msgstr ""
-#: ldmain.c:477
+#: ldmain.c:469
msgid "%X%P: unable to open for destination of copy `%s'\n"
msgstr ""
-#: ldmain.c:483
+#: ldmain.c:475
msgid "%P: Error writing file `%s'\n"
msgstr ""
-#: ldmain.c:489 pe-dll.c:1442
+#: ldmain.c:481 pe-dll.c:1463
#, c-format
msgid "%P: Error closing file `%s'\n"
msgstr ""
-#: ldmain.c:506
+#: ldmain.c:498
#, c-format
msgid "%s: total time in link: %ld.%06ld\n"
msgstr ""
-#: ldmain.c:509
+#: ldmain.c:501
#, c-format
msgid "%s: data size %ld\n"
msgstr ""
-#: ldmain.c:550
+#: ldmain.c:542
msgid "%P%F: missing argument to -m\n"
msgstr ""
-#: ldmain.c:678 ldmain.c:699 ldmain.c:730
+#: ldmain.c:670 ldmain.c:691 ldmain.c:722
msgid "%P%F: bfd_hash_table_init failed: %E\n"
msgstr ""
-#: ldmain.c:683 ldmain.c:702
+#: ldmain.c:675 ldmain.c:694
msgid "%P%F: bfd_hash_lookup failed: %E\n"
msgstr ""
-#: ldmain.c:717
+#: ldmain.c:709
msgid "%X%P: error: duplicate retain-symbols-file\n"
msgstr ""
-#: ldmain.c:761
+#: ldmain.c:753
msgid "%P%F: bfd_hash_lookup for insertion failed: %E\n"
msgstr ""
-#: ldmain.c:766
+#: ldmain.c:758
msgid "%P: `-retain-symbols-file' overrides `-s' and `-S'\n"
msgstr ""
-#: ldmain.c:842
+#: ldmain.c:834
msgid ""
"Archive member included because of file (symbol)\n"
"\n"
msgstr ""
-#: ldmain.c:913
+#: ldmain.c:905
msgid "%X%C: multiple definition of `%T'\n"
msgstr ""
-#: ldmain.c:916
+#: ldmain.c:908
msgid "%D: first defined here\n"
msgstr ""
-#: ldmain.c:920
+#: ldmain.c:912
msgid "%P: Disabling relaxation: it will not work with multiple definitions\n"
msgstr ""
-#: ldmain.c:951
+#: ldmain.c:943
msgid "%B: warning: definition of `%T' overriding common\n"
msgstr ""
-#: ldmain.c:954
+#: ldmain.c:946
msgid "%B: warning: common is here\n"
msgstr ""
-#: ldmain.c:961
+#: ldmain.c:953
msgid "%B: warning: common of `%T' overridden by definition\n"
msgstr ""
-#: ldmain.c:964
+#: ldmain.c:956
msgid "%B: warning: defined here\n"
msgstr ""
-#: ldmain.c:971
+#: ldmain.c:963
msgid "%B: warning: common of `%T' overridden by larger common\n"
msgstr ""
-#: ldmain.c:974
+#: ldmain.c:966
msgid "%B: warning: larger common is here\n"
msgstr ""
-#: ldmain.c:978
+#: ldmain.c:970
msgid "%B: warning: common of `%T' overriding smaller common\n"
msgstr ""
-#: ldmain.c:981
+#: ldmain.c:973
msgid "%B: warning: smaller common is here\n"
msgstr ""
-#: ldmain.c:985
+#: ldmain.c:977
msgid "%B: warning: multiple common of `%T'\n"
msgstr ""
-#: ldmain.c:987
+#: ldmain.c:979
msgid "%B: warning: previous common is here\n"
msgstr ""
-#: ldmain.c:1008 ldmain.c:1047
+#: ldmain.c:1000 ldmain.c:1039
msgid "%P: warning: global constructor %s used\n"
msgstr ""
-#: ldmain.c:1057
+#: ldmain.c:1049
msgid "%P%F: BFD backend error: BFD_RELOC_CTOR unsupported\n"
msgstr ""
-#: ldmain.c:1241
+#: ldmain.c:1233
msgid "%F%P: bfd_hash_table_init failed: %E\n"
msgstr ""
-#: ldmain.c:1248
+#: ldmain.c:1240
msgid "%F%P: bfd_hash_lookup failed: %E\n"
msgstr ""
-#: ldmain.c:1268
+#: ldmain.c:1260
msgid "%C: undefined reference to `%T'\n"
msgstr ""
-#: ldmain.c:1274
+#: ldmain.c:1266
msgid "%D: more undefined references to `%T' follow\n"
msgstr ""
-#: ldmain.c:1281
+#: ldmain.c:1273
msgid "%B: undefined reference to `%T'\n"
msgstr ""
-#: ldmain.c:1287
+#: ldmain.c:1279
msgid "%B: more undefined references to `%T' follow\n"
msgstr ""
-#: ldmain.c:1307 ldmain.c:1328 ldmain.c:1347
+#: ldmain.c:1299 ldmain.c:1320 ldmain.c:1339
msgid "%P%X: generated"
msgstr ""
-#: ldmain.c:1310
+#: ldmain.c:1302
msgid " relocation truncated to fit: %s %T"
msgstr ""
-#: ldmain.c:1331
+#: ldmain.c:1323
#, c-format
msgid "dangerous relocation: %s\n"
msgstr ""
-#: ldmain.c:1350
+#: ldmain.c:1342
msgid " reloc refers to symbol `%T' which is not being output\n"
msgstr ""
-#: ldmisc.c:179
+#: ldmisc.c:157
msgid "no symbol"
msgstr ""
-#: ldmisc.c:243
+#: ldmisc.c:221
#, c-format
msgid "built in linker script:%u"
msgstr ""
-#: ldmisc.c:293 ldmisc.c:297
+#: ldmisc.c:271 ldmisc.c:275
msgid "%B%F: could not read symbols\n"
msgstr ""
#. We use abfd->filename in this initial line,
#. in case filename is a .h file or something
#. similarly unhelpful.
-#: ldmisc.c:333
+#: ldmisc.c:311
msgid "%B: In function `%T':\n"
msgstr ""
-#: ldmisc.c:442
+#: ldmisc.c:463
msgid "%F%P: internal error %s %d\n"
msgstr ""
-#: ldmisc.c:492
+#: ldmisc.c:513
msgid "%P: internal error: aborting at %s line %d in %s\n"
msgstr ""
-#: ldmisc.c:495
+#: ldmisc.c:516
msgid "%P: internal error: aborting at %s line %d\n"
msgstr ""
-#: ldmisc.c:497
+#: ldmisc.c:518
msgid "%P%F: please report this bug\n"
msgstr ""
@@ -1001,532 +1007,536 @@ msgstr ""
msgid "%P%F: bfd_new_link_order failed\n"
msgstr ""
-#: ldwrite.c:321
+#: ldwrite.c:325
msgid "%F%P: clone section failed: %E\n"
msgstr ""
-#: ldwrite.c:360
+#: ldwrite.c:364
#, c-format
msgid "%8x something else\n"
msgstr ""
-#: ldwrite.c:543
+#: ldwrite.c:547
msgid "%F%P: final link failed: %E\n"
msgstr ""
-#: lexsup.c:175 lexsup.c:270
+#: lexsup.c:172 lexsup.c:267
msgid "KEYWORD"
msgstr ""
-#: lexsup.c:175
+#: lexsup.c:172
msgid "Shared library control for HP/UX compatibility"
msgstr ""
-#: lexsup.c:178
+#: lexsup.c:175
msgid "ARCH"
msgstr ""
-#: lexsup.c:178
+#: lexsup.c:175
msgid "Set architecture"
msgstr ""
-#: lexsup.c:180 lexsup.c:337
+#: lexsup.c:177 lexsup.c:336
msgid "TARGET"
msgstr ""
-#: lexsup.c:180
+#: lexsup.c:177
msgid "Specify target for following input files"
msgstr ""
-#: lexsup.c:182 lexsup.c:223 lexsup.c:235 lexsup.c:244 lexsup.c:315
-#: lexsup.c:344 lexsup.c:384
+#: lexsup.c:179 lexsup.c:220 lexsup.c:232 lexsup.c:241 lexsup.c:312
+#: lexsup.c:343 lexsup.c:383
msgid "FILE"
msgstr ""
-#: lexsup.c:182
+#: lexsup.c:179
msgid "Read MRI format linker script"
msgstr ""
-#: lexsup.c:184
+#: lexsup.c:181
msgid "Force common symbols to be defined"
msgstr ""
-#: lexsup.c:188 lexsup.c:374 lexsup.c:376 lexsup.c:378
+#: lexsup.c:185 lexsup.c:373 lexsup.c:375 lexsup.c:377
msgid "ADDRESS"
msgstr ""
-#: lexsup.c:188
+#: lexsup.c:185
msgid "Set start address"
msgstr ""
-#: lexsup.c:190
+#: lexsup.c:187
msgid "Export all dynamic symbols"
msgstr ""
-#: lexsup.c:192
+#: lexsup.c:189
msgid "Link big-endian objects"
msgstr ""
-#: lexsup.c:194
+#: lexsup.c:191
msgid "Link little-endian objects"
msgstr ""
-#: lexsup.c:196 lexsup.c:199
+#: lexsup.c:193 lexsup.c:196
msgid "SHLIB"
msgstr ""
-#: lexsup.c:196
+#: lexsup.c:193
msgid "Auxiliary filter for shared object symbol table"
msgstr ""
-#: lexsup.c:199
+#: lexsup.c:196
msgid "Filter for shared object symbol table"
msgstr ""
-#: lexsup.c:201
+#: lexsup.c:198
msgid "Ignored"
msgstr ""
-#: lexsup.c:203
+#: lexsup.c:200
msgid "SIZE"
msgstr ""
-#: lexsup.c:203
+#: lexsup.c:200
msgid "Small data size (if no size, same as --shared)"
msgstr ""
-#: lexsup.c:206
+#: lexsup.c:203
msgid "FILENAME"
msgstr ""
-#: lexsup.c:206
+#: lexsup.c:203
msgid "Set internal name of shared library"
msgstr ""
-#: lexsup.c:208
+#: lexsup.c:205
msgid "PROGRAM"
msgstr ""
-#: lexsup.c:208
+#: lexsup.c:205
msgid "Set PROGRAM as the dynamic linker to use"
msgstr ""
-#: lexsup.c:210
+#: lexsup.c:207
msgid "LIBNAME"
msgstr ""
-#: lexsup.c:210
+#: lexsup.c:207
msgid "Search for library LIBNAME"
msgstr ""
-#: lexsup.c:212
+#: lexsup.c:209
msgid "DIRECTORY"
msgstr ""
-#: lexsup.c:212
+#: lexsup.c:209
msgid "Add DIRECTORY to library search path"
msgstr ""
-#: lexsup.c:214
+#: lexsup.c:211
msgid "EMULATION"
msgstr ""
-#: lexsup.c:214
+#: lexsup.c:211
msgid "Set emulation"
msgstr ""
-#: lexsup.c:216
+#: lexsup.c:213
msgid "Print map file on standard output"
msgstr ""
-#: lexsup.c:218
+#: lexsup.c:215
msgid "Do not page align data"
msgstr ""
-#: lexsup.c:220
+#: lexsup.c:217
msgid "Do not page align data, do not make text readonly"
msgstr ""
-#: lexsup.c:223
+#: lexsup.c:220
msgid "Set output file name"
msgstr ""
-#: lexsup.c:225
+#: lexsup.c:222
msgid "Optimize output file"
msgstr ""
-#: lexsup.c:227
+#: lexsup.c:224
msgid "Ignored for SVR4 compatibility"
msgstr ""
-#: lexsup.c:231
+#: lexsup.c:228
msgid "Generate relocateable output"
msgstr ""
-#: lexsup.c:235
+#: lexsup.c:232
msgid "Just link symbols (if directory, same as --rpath)"
msgstr ""
-#: lexsup.c:238
+#: lexsup.c:235
msgid "Strip all symbols"
msgstr ""
-#: lexsup.c:240
+#: lexsup.c:237
msgid "Strip debugging symbols"
msgstr ""
-#: lexsup.c:242
+#: lexsup.c:239
msgid "Trace file opens"
msgstr ""
-#: lexsup.c:244
+#: lexsup.c:241
msgid "Read linker script"
msgstr ""
-#: lexsup.c:246 lexsup.c:262 lexsup.c:301 lexsup.c:313 lexsup.c:368
-#: lexsup.c:387 lexsup.c:407
+#: lexsup.c:243 lexsup.c:259 lexsup.c:298 lexsup.c:310 lexsup.c:367
+#: lexsup.c:386 lexsup.c:406
msgid "SYMBOL"
msgstr ""
-#: lexsup.c:246
+#: lexsup.c:243
msgid "Start with undefined reference to SYMBOL"
msgstr ""
-#: lexsup.c:248
+#: lexsup.c:245
msgid "[=SECTION]"
msgstr ""
-#: lexsup.c:248
+#: lexsup.c:245
msgid "Don't merge input [SECTION | orphan] sections"
msgstr ""
-#: lexsup.c:250
+#: lexsup.c:247
msgid "Build global constructor/destructor tables"
msgstr ""
-#: lexsup.c:252
+#: lexsup.c:249
msgid "Print version information"
msgstr ""
-#: lexsup.c:254
+#: lexsup.c:251
msgid "Print version and emulation information"
msgstr ""
-#: lexsup.c:256
+#: lexsup.c:253
msgid "Discard all local symbols"
msgstr ""
-#: lexsup.c:258
+#: lexsup.c:255
msgid "Discard temporary local symbols (default)"
msgstr ""
-#: lexsup.c:260
+#: lexsup.c:257
msgid "Don't discard any local symbols"
msgstr ""
-#: lexsup.c:262
+#: lexsup.c:259
msgid "Trace mentions of SYMBOL"
msgstr ""
-#: lexsup.c:264 lexsup.c:346 lexsup.c:348
+#: lexsup.c:261 lexsup.c:345 lexsup.c:347
msgid "PATH"
msgstr ""
-#: lexsup.c:264
+#: lexsup.c:261
msgid "Default search path for Solaris compatibility"
msgstr ""
-#: lexsup.c:266
+#: lexsup.c:263
msgid "Start a group"
msgstr ""
-#: lexsup.c:268
+#: lexsup.c:265
msgid "End a group"
msgstr ""
-#: lexsup.c:270
+#: lexsup.c:267
msgid "Ignored for SunOS compatibility"
msgstr ""
-#: lexsup.c:272
+#: lexsup.c:269
msgid "Link against shared libraries"
msgstr ""
-#: lexsup.c:278
+#: lexsup.c:275
msgid "Do not link against shared libraries"
msgstr ""
-#: lexsup.c:286
+#: lexsup.c:283
msgid "Bind global references locally"
msgstr ""
-#: lexsup.c:288
+#: lexsup.c:285
msgid "Check section addresses for overlaps (default)"
msgstr ""
-#: lexsup.c:290
+#: lexsup.c:287
msgid "Do not check section addresses for overlaps"
msgstr ""
-#: lexsup.c:293
+#: lexsup.c:290
msgid "Output cross reference table"
msgstr ""
-#: lexsup.c:295
+#: lexsup.c:292
msgid "SYMBOL=EXPRESSION"
msgstr ""
-#: lexsup.c:295
+#: lexsup.c:292
msgid "Define a symbol"
msgstr ""
-#: lexsup.c:297
+#: lexsup.c:294
msgid "[=STYLE]"
msgstr ""
-#: lexsup.c:297
+#: lexsup.c:294
msgid "Demangle symbol names [using STYLE]"
msgstr ""
-#: lexsup.c:299
+#: lexsup.c:296
msgid "Generate embedded relocs"
msgstr ""
-#: lexsup.c:301
+#: lexsup.c:298
msgid "Call SYMBOL at unload-time"
msgstr ""
-#: lexsup.c:303
+#: lexsup.c:300
msgid "Force generation of file with .exe suffix"
msgstr ""
-#: lexsup.c:305
+#: lexsup.c:302
msgid "Remove unused sections (on some targets)"
msgstr ""
-#: lexsup.c:308
+#: lexsup.c:305
msgid "Don't remove unused sections (default)"
msgstr ""
-#: lexsup.c:311
+#: lexsup.c:308
msgid "Print option help"
msgstr ""
-#: lexsup.c:313
+#: lexsup.c:310
msgid "Call SYMBOL at load-time"
msgstr ""
-#: lexsup.c:315
+#: lexsup.c:312
msgid "Write a map file"
msgstr ""
-#: lexsup.c:317
+#: lexsup.c:314
msgid "Do not define Common storage"
msgstr ""
-#: lexsup.c:319
+#: lexsup.c:316
msgid "Do not demangle symbol names"
msgstr ""
-#: lexsup.c:321
+#: lexsup.c:318
msgid "Use less memory and more disk I/O"
msgstr ""
-#: lexsup.c:323
+#: lexsup.c:320
msgid "Allow no undefined symbols"
msgstr ""
-#: lexsup.c:325
+#: lexsup.c:322
msgid "Allow undefined symbols in shared objects"
msgstr ""
-#: lexsup.c:327
+#: lexsup.c:324
+msgid "Allow multiple definitions"
+msgstr ""
+
+#: lexsup.c:326
msgid "Don't warn about mismatched input files"
msgstr ""
-#: lexsup.c:329
+#: lexsup.c:328
msgid "Turn off --whole-archive"
msgstr ""
-#: lexsup.c:331
+#: lexsup.c:330
msgid "Create an output file even if errors occur"
msgstr ""
-#: lexsup.c:335
+#: lexsup.c:334
msgid ""
"Only use library directories specified on\n"
"\t\t\t\tthe command line"
msgstr ""
-#: lexsup.c:337
+#: lexsup.c:336
msgid "Specify target of output file"
msgstr ""
-#: lexsup.c:339
+#: lexsup.c:338
msgid "Ignored for Linux compatibility"
msgstr ""
-#: lexsup.c:341
+#: lexsup.c:340
msgid "Relax branches on certain targets"
msgstr ""
-#: lexsup.c:344
+#: lexsup.c:343
msgid "Keep only symbols listed in FILE"
msgstr ""
-#: lexsup.c:346
+#: lexsup.c:345
msgid "Set runtime shared library search path"
msgstr ""
-#: lexsup.c:348
+#: lexsup.c:347
msgid "Set link time shared library search path"
msgstr ""
-#: lexsup.c:350
+#: lexsup.c:349
msgid "Create a shared library"
msgstr ""
-#: lexsup.c:354
+#: lexsup.c:353
msgid "Sort common symbols by size"
msgstr ""
-#: lexsup.c:358
+#: lexsup.c:357
msgid "COUNT"
msgstr ""
-#: lexsup.c:358
+#: lexsup.c:357
msgid "How many tags to reserve in .dynamic section"
msgstr ""
-#: lexsup.c:360
+#: lexsup.c:359
msgid "[=SIZE]"
msgstr ""
-#: lexsup.c:360
+#: lexsup.c:359
msgid "Split output sections every SIZE octets"
msgstr ""
-#: lexsup.c:362
+#: lexsup.c:361
msgid "[=COUNT]"
msgstr ""
-#: lexsup.c:362
+#: lexsup.c:361
msgid "Split output sections every COUNT relocs"
msgstr ""
-#: lexsup.c:364
+#: lexsup.c:363
msgid "Print memory usage statistics"
msgstr ""
-#: lexsup.c:366
+#: lexsup.c:365
msgid "Display target specific options"
msgstr ""
-#: lexsup.c:368
+#: lexsup.c:367
msgid "Do task level linking"
msgstr ""
-#: lexsup.c:370
+#: lexsup.c:369
msgid "Use same format as native linker"
msgstr ""
-#: lexsup.c:372
+#: lexsup.c:371
msgid "SECTION=ADDRESS"
msgstr ""
-#: lexsup.c:372
+#: lexsup.c:371
msgid "Set address of named section"
msgstr ""
-#: lexsup.c:374
+#: lexsup.c:373
msgid "Set address of .bss section"
msgstr ""
-#: lexsup.c:376
+#: lexsup.c:375
msgid "Set address of .data section"
msgstr ""
-#: lexsup.c:378
+#: lexsup.c:377
msgid "Set address of .text section"
msgstr ""
-#: lexsup.c:380
+#: lexsup.c:379
msgid "Output lots of information during link"
msgstr ""
-#: lexsup.c:384
+#: lexsup.c:383
msgid "Read version information script"
msgstr ""
-#: lexsup.c:387
+#: lexsup.c:386
msgid ""
"Take export symbols list from .exports, using\n"
"\t\t\t\tSYMBOL as the version."
msgstr ""
-#: lexsup.c:390
+#: lexsup.c:389
msgid "Warn about duplicate common symbols"
msgstr ""
-#: lexsup.c:392
+#: lexsup.c:391
msgid "Warn if global constructors/destructors are seen"
msgstr ""
-#: lexsup.c:395
+#: lexsup.c:394
msgid "Warn if the multiple GP values are used"
msgstr ""
-#: lexsup.c:397
+#: lexsup.c:396
msgid "Warn only once per undefined symbol"
msgstr ""
-#: lexsup.c:399
+#: lexsup.c:398
msgid "Warn if start of section changes due to alignment"
msgstr ""
-#: lexsup.c:402
+#: lexsup.c:401
msgid "Treat warnings as errors"
msgstr ""
-#: lexsup.c:405
+#: lexsup.c:404
msgid "Include all objects from following archives"
msgstr ""
-#: lexsup.c:407
+#: lexsup.c:406
msgid "Use wrapper functions for SYMBOL"
msgstr ""
-#: lexsup.c:409
+#: lexsup.c:408
msgid "[=WORDS]"
msgstr ""
-#: lexsup.c:409
+#: lexsup.c:408
msgid ""
"Modify problematic branches in last WORDS (1-10,\n"
"\t\t\t\tdefault 5) words of a page"
msgstr ""
-#: lexsup.c:575
+#: lexsup.c:574
msgid "%P: unrecognized option '%s'\n"
msgstr ""
-#: lexsup.c:577
+#: lexsup.c:576
msgid "%P%F: use the --help option for usage information\n"
msgstr ""
-#: lexsup.c:596
+#: lexsup.c:595
msgid "%P%F: unrecognized -a option `%s'\n"
msgstr ""
-#: lexsup.c:609
+#: lexsup.c:608
msgid "%P%F: unrecognized -assert option `%s'\n"
msgstr ""
-#: lexsup.c:652
+#: lexsup.c:651
msgid "%F%P: unknown demangling style `%s'"
msgstr ""
-#: lexsup.c:712
+#: lexsup.c:711
msgid "%P%F: invalid number `%s'\n"
msgstr ""
@@ -1538,65 +1548,65 @@ msgstr ""
#. an error message here. We cannot just make this a warning,
#. increment optind, and continue because getopt is too confused
#. and will seg-fault the next time around.
-#: lexsup.c:810
+#: lexsup.c:812
msgid "%P%F: bad -rpath option\n"
msgstr ""
-#: lexsup.c:908
+#: lexsup.c:910
msgid "%P%F: -shared not supported\n"
msgstr ""
-#: lexsup.c:940
+#: lexsup.c:942
msgid "%P%F: invalid argument to option \"--section-start\"\n"
msgstr ""
-#: lexsup.c:946
+#: lexsup.c:948
msgid "%P%F: missing argument(s) to option \"--section-start\"\n"
msgstr ""
-#: lexsup.c:1095
+#: lexsup.c:1097
msgid "%P%F: may not nest groups (--help for usage)\n"
msgstr ""
-#: lexsup.c:1102
+#: lexsup.c:1104
msgid "%P%F: group ended before it began (--help for usage)\n"
msgstr ""
-#: lexsup.c:1116
+#: lexsup.c:1118
msgid "%P%F: invalid argument to option \"mpc860c0\"\n"
msgstr ""
-#: lexsup.c:1171
+#: lexsup.c:1173
msgid "%P%F: invalid hex number `%s'\n"
msgstr ""
-#: lexsup.c:1183
+#: lexsup.c:1185
#, c-format
msgid "Usage: %s [options] file...\n"
msgstr ""
-#: lexsup.c:1185
+#: lexsup.c:1187
msgid "Options:\n"
msgstr ""
#. Note: Various tools (such as libtool) depend upon the
#. format of the listings below - do not change them.
-#: lexsup.c:1268
+#: lexsup.c:1270
#, c-format
msgid "%s: supported targets:"
msgstr ""
-#: lexsup.c:1276
+#: lexsup.c:1278
#, c-format
msgid "%s: supported emulations: "
msgstr ""
-#: lexsup.c:1281
+#: lexsup.c:1283
#, c-format
msgid "%s: emulation specific options:\n"
msgstr ""
-#: lexsup.c:1285
+#: lexsup.c:1287
#, c-format
msgid "Report bugs to %s\n"
msgstr ""
@@ -1605,61 +1615,61 @@ msgstr ""
msgid "%P%F: unknown format type %s\n"
msgstr ""
-#: pe-dll.c:316
+#: pe-dll.c:321
#, c-format
msgid "%XUnsupported PEI architecture: %s\n"
msgstr ""
-#: pe-dll.c:650
+#: pe-dll.c:671
#, c-format
msgid "%XError, duplicate EXPORT with ordinals: %s (%d vs %d)\n"
msgstr ""
-#: pe-dll.c:657
+#: pe-dll.c:678
#, c-format
msgid "Warning, duplicate EXPORT: %s\n"
msgstr ""
-#: pe-dll.c:721
+#: pe-dll.c:742
#, c-format
msgid "%XCannot export %s: symbol not defined\n"
msgstr ""
-#: pe-dll.c:727
+#: pe-dll.c:748
#, c-format
msgid "%XCannot export %s: symbol wrong type (%d vs %d)\n"
msgstr ""
-#: pe-dll.c:734
+#: pe-dll.c:755
#, c-format
msgid "%XCannot export %s: symbol not found\n"
msgstr ""
-#: pe-dll.c:849
+#: pe-dll.c:870
#, c-format
msgid "%XError, ordinal used twice: %d (%s vs %s)\n"
msgstr ""
-#: pe-dll.c:1160
+#: pe-dll.c:1181
#, c-format
msgid "%XError: %d-bit reloc in dll\n"
msgstr ""
-#: pe-dll.c:1295
+#: pe-dll.c:1316
#, c-format
msgid "%s: Can't open output def file %s\n"
msgstr ""
-#: pe-dll.c:1438
+#: pe-dll.c:1459
msgid "; no contents available\n"
msgstr ""
-#: pe-dll.c:2107
+#: pe-dll.c:2128
#, c-format
msgid "%XCan't open .lib file: %s\n"
msgstr ""
-#: pe-dll.c:2112
+#: pe-dll.c:2133
#, c-format
msgid "Creating library file: %s\n"
msgstr ""
diff --git a/contrib/binutils/ld/scripttempl/elf.sc b/contrib/binutils/ld/scripttempl/elf.sc
index fd31d03..6bbe1b8 100644
--- a/contrib/binutils/ld/scripttempl/elf.sc
+++ b/contrib/binutils/ld/scripttempl/elf.sc
@@ -60,6 +60,8 @@
# .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.
@@ -70,6 +72,14 @@ if [ -z "$MACHINE" ]; then OUTPUT_ARCH=${ARCH}; else OUTPUT_ARCH=${ARCH}:${MACHI
test -z "${ELFSIZE}" && ELFSIZE=32
test -z "${ALIGNMENT}" && ALIGNMENT="${ELFSIZE} / 8"
test "$LD_FLAG" = "N" && DATA_ADDR=.
+test -n "$CREATE_SHLIB" && test -n "$SHLIB_DATA_ADDR" && COMMONPAGESIZE=""
+test -z "$CREATE_SHLIB" && test -n "$DATA_ADDR" && COMMONPAGESIZE=""
+DATA_SEGMENT_ALIGN="ALIGN(${MAXPAGESIZE}) + (. & (${MAXPAGESIZE} - 1))"
+DATA_SEGMENT_END=""
+if test -n "${COMMONPAGESIZE}"; then
+ DATA_SEGMENT_ALIGN="DATA_SEGMENT_ALIGN(${MAXPAGESIZE}, ${COMMONPAGESIZE})"
+ DATA_SEGMENT_END=". = DATA_SEGMENT_END (.);"
+fi
INTERP=".interp ${RELOCATING-0} : { *(.interp) }"
PLT=".plt ${RELOCATING-0} : { *(.plt) }"
DYNAMIC=".dynamic ${RELOCATING-0} : { *(.dynamic) }"
@@ -200,6 +210,10 @@ eval $COMBRELOCCAT <<EOF
${OTHER_READONLY_RELOC_SECTIONS}
.rel.data ${RELOCATING-0} : { *(.rel.data${RELOCATING+ .rel.data.* .rel.gnu.linkonce.d.*}) }
.rela.data ${RELOCATING-0} : { *(.rela.data${RELOCATING+ .rela.data.* .rela.gnu.linkonce.d.*}) }
+ .rel.tdata ${RELOCATING-0} : { *(.rel.tdata${RELOCATING+ .rel.tdata.* .rel.gnu.linkonce.td.*}) }
+ .rela.tdata ${RELOCATING-0} : { *(.rela.tdata${RELOCATING+ .rela.tdata.* .rela.gnu.linkonce.td.*}) }
+ .rel.tbss ${RELOCATING-0} : { *(.rel.tbss${RELOCATING+ .rel.tbss.* .rel.gnu.linkonce.tb.*}) }
+ .rela.tbss ${RELOCATING-0} : { *(.rela.tbss${RELOCATING+ .rela.tbss.* .rela.gnu.linkonce.tb.*}) }
.rel.ctors ${RELOCATING-0} : { *(.rel.ctors) }
.rela.ctors ${RELOCATING-0} : { *(.rela.ctors) }
.rel.dtors ${RELOCATING-0} : { *(.rel.dtors) }
@@ -269,8 +283,8 @@ cat <<EOF
/* 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-${RELOCATING+. = ${DATA_ADDR-ALIGN(${MAXPAGESIZE}) + (. & (${MAXPAGESIZE} - 1))};}}
- ${CREATE_SHLIB+${RELOCATING+. = ${SHLIB_DATA_ADDR-ALIGN(${MAXPAGESIZE}) + (. & (${MAXPAGESIZE} - 1))};}}
+ ${CREATE_SHLIB-${RELOCATING+. = ${DATA_ADDR-${DATA_SEGMENT_ALIGN}};}}
+ ${CREATE_SHLIB+${RELOCATING+. = ${SHLIB_DATA_ADDR-${DATA_SEGMENT_ALIGN}};}}
/* Ensure the __preinit_array_start label is properly aligned. We
could instead move the label definition inside the section, but
@@ -296,6 +310,8 @@ cat <<EOF
${CONSTRUCTING+SORT(CONSTRUCTORS)}
}
.data1 ${RELOCATING-0} : { *(.data1) }
+ .tdata ${RELOCATING-0} : { *(.tdata${RELOCATING+ .tdata.* .gnu.linkonce.td.*}) }
+ .tbss ${RELOCATING-0} : { *(.tbss${RELOCATING+ .tbss.* .gnu.linkonce.tb.*})${RELOCATING+ *(.tcommon)} }
.eh_frame ${RELOCATING-0} : { KEEP (*(.eh_frame)) }
.gcc_except_table ${RELOCATING-0} : { *(.gcc_except_table) }
${WRITABLE_RODATA+${RODATA}}
@@ -333,6 +349,7 @@ cat <<EOF
${RELOCATING+_end = .;}
${RELOCATING+${OTHER_BSS_END_SYMBOLS}}
${RELOCATING+PROVIDE (end = .);}
+ ${RELOCATING+${DATA_SEGMENT_END}}
/* Stabs debugging sections. */
.stab 0 : { *(.stab) }
diff --git a/contrib/binutils/ld/scripttempl/sh.sc b/contrib/binutils/ld/scripttempl/sh.sc
index 036dd21..e7f049f 100644
--- a/contrib/binutils/ld/scripttempl/sh.sc
+++ b/contrib/binutils/ld/scripttempl/sh.sc
@@ -29,6 +29,11 @@ SECTIONS
.data :
{
*(.data)
+ ${RELOCATING+*(.gcc_exc*)}
+ ${RELOCATING+___EH_FRAME_BEGIN__ = . ;}
+ ${RELOCATING+*(.eh_fram*)}
+ ${RELOCATING+___EH_FRAME_END__ = . ;}
+ ${RELOCATING+LONG(0);}
${RELOCATING+ _edata = . ; }
} ${RELOCATING+ > ram}
.bss :
OpenPOWER on IntegriCloud